mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-15 23:01:30 +00:00
- Add --session-dir CLI flag to specify custom session directory - SessionManager API: second param of create(), continueRecent(), list(), open() changed from agentDir to sessionDir (direct directory, no cwd encoding) - When omitted, uses default (~/.pi/agent/sessions/<encoded-cwd>/) - --session now derives sessionDir from file's parent if --session-dir not provided - list() validates session header before processing files - Closes #313 Co-authored-by: scutifer <scutifer@users.noreply.github.com> |
||
|---|---|---|
| .. | ||
| custom-tools | ||
| hooks | ||
| sdk | ||
| README.md | ||
Examples
Example code for pi-coding-agent.
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.
Running Examples
cd packages/coding-agent
npx tsx examples/sdk/01-minimal.ts
npx tsx examples/hooks/permission-gate.ts