mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-19 01:04:27 +00:00
Changes from the original: - Explicit [DONE:n] tag tracking (more accurate than auto-marking on tool_result) - Plan: header requirement - only extracts todos from 'Plan:' sections - Utils extracted to separate file for testability - Better session resume - only scans messages after plan-mode-execute marker - Context filtering - properly filters plan-mode-context custom type messages - Refactored to directory structure (index.ts + utils.ts + README.md) The original auto-completed steps on every tool_result, which was inaccurate for multi-tool steps. This version uses explicit [DONE:n] markers that the agent outputs after completing each step. |
||
|---|---|---|
| .. | ||
| extensions | ||
| sdk | ||
| README.md | ||
Examples
Example code for pi-coding-agent SDK and extensions.
Directories
sdk/
Programmatic usage via createAgentSession(). Shows how to customize models, prompts, tools, extensions, and session management.
extensions/
Example extensions demonstrating:
- Lifecycle event handlers (tool interception, safety gates, context modifications)
- Custom tools (todo lists, subagents)
- Commands and keyboard shortcuts
- External integrations (git, file watchers)