d1e16d2101
- Replaced all direct `process.cwd()` calls with `getProjectDir()` utility function across 40+ files to centralize project directory resolution logic. - Added `getProjectDir()` and `setProjectDir()` functions to `@oh-my-pi/pi-utils/dirs` module to provide abstracted project directory management. - Made `SessionManager.list()` method asynchronous to support asynchronous session discovery operations. - Updated default working directory resolution throughout codebase to use `getProjectDir()` instead of `process.cwd()` for improved project directory detection.
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.