9148ec01ec
- Made sessionDir parameter optional in SessionManager.create(), forkFrom(), continueRecent(), and list() methods with automatic default computation. - Updated SessionManager.getDefaultSessionDir() to accept optional agentDir parameter for custom sessions root configuration. - Changed SessionManager.list() signature to require cwd parameter as first argument with sessionDir now optional. - Implemented multi-root session migration support by replacing global migration state with per-root tracking and extracting session directory encoding logic. - Added resolveManagedSessionRoot() function to determine if session directory is managed and extract its root.
Examples
Example code for omp-coding-agent SDK, hooks, and custom tools.
Directories
sdk/
Programmatic usage via createAgentSession(). Shows how to customize models, prompts, tools, hooks, and session management.
hooks/
Example hooks for intercepting tool calls, adding safety gates, and integrating with external systems.
custom-tools/
Example custom tools that extend the agent's capabilities.