mirror of
https://github.com/earendil-works/pi.git
synced 2026-06-18 15:54:04 +08:00
e8f1322eee
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.
e8f1322eee
ยท
2026-01-13 17:53:11 +01:00
History
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)