@eminent337/aery 0.1.58 → 0.1.60
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +0 -0
- package/README.md +0 -0
- package/dist/bun/cli.d.ts +3 -0
- package/dist/bun/cli.d.ts.map +1 -0
- package/dist/bun/cli.js +8 -0
- package/dist/bun/cli.js.map +1 -0
- package/dist/bun/register-bedrock.d.ts +2 -0
- package/dist/bun/register-bedrock.d.ts.map +1 -0
- package/dist/bun/register-bedrock.js +4 -0
- package/dist/bun/register-bedrock.js.map +1 -0
- package/dist/bun/restore-sandbox-env.d.ts +13 -0
- package/dist/bun/restore-sandbox-env.d.ts.map +1 -0
- package/dist/bun/restore-sandbox-env.js +32 -0
- package/dist/bun/restore-sandbox-env.js.map +1 -0
- package/dist/cli/args.d.ts +53 -0
- package/dist/cli/args.d.ts.map +1 -0
- package/dist/cli/args.js +329 -0
- package/dist/cli/args.js.map +1 -0
- package/dist/cli/config-selector.d.ts +14 -0
- package/dist/cli/config-selector.d.ts.map +1 -0
- package/dist/cli/config-selector.js +31 -0
- package/dist/cli/config-selector.js.map +1 -0
- package/dist/cli/file-processor.d.ts +15 -0
- package/dist/cli/file-processor.d.ts.map +1 -0
- package/dist/cli/file-processor.js +83 -0
- package/dist/cli/file-processor.js.map +1 -0
- package/dist/cli/initial-message.d.ts +18 -0
- package/dist/cli/initial-message.d.ts.map +1 -0
- package/dist/cli/initial-message.js +22 -0
- package/dist/cli/initial-message.js.map +1 -0
- package/dist/cli/list-models.d.ts +9 -0
- package/dist/cli/list-models.d.ts.map +1 -0
- package/dist/cli/list-models.js +98 -0
- package/dist/cli/list-models.js.map +1 -0
- package/dist/cli/session-picker.d.ts +9 -0
- package/dist/cli/session-picker.d.ts.map +1 -0
- package/dist/cli/session-picker.js +35 -0
- package/dist/cli/session-picker.js.map +1 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +19 -0
- package/dist/cli.js.map +1 -0
- package/dist/config.d.ts +86 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +332 -0
- package/dist/config.js.map +1 -0
- package/dist/core/agent-session-runtime.d.ts +117 -0
- package/dist/core/agent-session-runtime.d.ts.map +1 -0
- package/dist/core/agent-session-runtime.js +300 -0
- package/dist/core/agent-session-runtime.js.map +1 -0
- package/dist/core/agent-session-services.d.ts +86 -0
- package/dist/core/agent-session-services.d.ts.map +1 -0
- package/dist/core/agent-session-services.js +117 -0
- package/dist/core/agent-session-services.js.map +1 -0
- package/dist/core/agent-session.d.ts +595 -0
- package/dist/core/agent-session.d.ts.map +1 -0
- package/dist/core/agent-session.js +2520 -0
- package/dist/core/agent-session.js.map +1 -0
- package/dist/core/auth-guidance.d.ts +5 -0
- package/dist/core/auth-guidance.d.ts.map +1 -0
- package/dist/core/auth-guidance.js +21 -0
- package/dist/core/auth-guidance.js.map +1 -0
- package/dist/core/auth-storage.d.ts +141 -0
- package/dist/core/auth-storage.d.ts.map +1 -0
- package/dist/core/auth-storage.js +441 -0
- package/dist/core/auth-storage.js.map +1 -0
- package/dist/core/bash-executor.d.ts +32 -0
- package/dist/core/bash-executor.d.ts.map +1 -0
- package/dist/core/bash-executor.js +111 -0
- package/dist/core/bash-executor.js.map +1 -0
- package/dist/core/compaction/branch-summarization.d.ts +88 -0
- package/dist/core/compaction/branch-summarization.d.ts.map +1 -0
- package/dist/core/compaction/branch-summarization.js +243 -0
- package/dist/core/compaction/branch-summarization.js.map +1 -0
- package/dist/core/compaction/compaction.d.ts +121 -0
- package/dist/core/compaction/compaction.d.ts.map +1 -0
- package/dist/core/compaction/compaction.js +615 -0
- package/dist/core/compaction/compaction.js.map +1 -0
- package/dist/core/compaction/index.d.ts +7 -0
- package/dist/core/compaction/index.d.ts.map +1 -0
- package/dist/core/compaction/index.js +7 -0
- package/dist/core/compaction/index.js.map +1 -0
- package/dist/core/compaction/utils.d.ts +38 -0
- package/dist/core/compaction/utils.d.ts.map +1 -0
- package/dist/core/compaction/utils.js +153 -0
- package/dist/core/compaction/utils.js.map +1 -0
- package/dist/core/defaults.d.ts +3 -0
- package/dist/core/defaults.d.ts.map +1 -0
- package/dist/core/defaults.js +2 -0
- package/dist/core/defaults.js.map +1 -0
- package/dist/core/diagnostics.d.ts +15 -0
- package/dist/core/diagnostics.d.ts.map +1 -0
- package/dist/core/diagnostics.js +2 -0
- package/dist/core/diagnostics.js.map +1 -0
- package/dist/core/event-bus.d.ts +9 -0
- package/dist/core/event-bus.d.ts.map +1 -0
- package/dist/core/event-bus.js +25 -0
- package/dist/core/event-bus.js.map +1 -0
- package/dist/core/exec.d.ts +29 -0
- package/dist/core/exec.d.ts.map +1 -0
- package/dist/core/exec.js +75 -0
- package/dist/core/exec.js.map +1 -0
- package/dist/core/export-html/ansi-to-html.d.ts +22 -0
- package/dist/core/export-html/ansi-to-html.d.ts.map +1 -0
- package/dist/core/export-html/ansi-to-html.js +249 -0
- package/dist/core/export-html/ansi-to-html.js.map +1 -0
- package/dist/core/export-html/index.d.ts +37 -0
- package/dist/core/export-html/index.d.ts.map +1 -0
- package/dist/core/export-html/index.js +224 -0
- package/dist/core/export-html/index.js.map +1 -0
- package/dist/core/export-html/template.css +1022 -0
- package/dist/core/export-html/template.html +55 -0
- package/dist/core/export-html/template.js +1770 -0
- package/dist/core/export-html/tool-renderer.d.ts +34 -0
- package/dist/core/export-html/tool-renderer.d.ts.map +1 -0
- package/dist/core/export-html/tool-renderer.js +108 -0
- package/dist/core/export-html/tool-renderer.js.map +1 -0
- package/dist/core/export-html/vendor/highlight.min.js +1213 -0
- package/dist/core/export-html/vendor/marked.min.js +6 -0
- package/dist/core/extensions/index.d.ts +12 -0
- package/dist/core/extensions/index.d.ts.map +1 -0
- package/dist/core/extensions/index.js +9 -0
- package/dist/core/extensions/index.js.map +1 -0
- package/dist/core/extensions/loader.d.ts +25 -0
- package/dist/core/extensions/loader.d.ts.map +1 -0
- package/dist/core/extensions/loader.js +476 -0
- package/dist/core/extensions/loader.js.map +1 -0
- package/dist/core/extensions/runner.d.ts +158 -0
- package/dist/core/extensions/runner.d.ts.map +1 -0
- package/dist/core/extensions/runner.js +784 -0
- package/dist/core/extensions/runner.js.map +1 -0
- package/dist/core/extensions/types.d.ts +1153 -0
- package/dist/core/extensions/types.d.ts.map +1 -0
- package/dist/core/extensions/types.js +45 -0
- package/dist/core/extensions/types.js.map +1 -0
- package/dist/core/extensions/wrapper.d.ts +20 -0
- package/dist/core/extensions/wrapper.d.ts.map +1 -0
- package/dist/core/extensions/wrapper.js +22 -0
- package/dist/core/extensions/wrapper.js.map +1 -0
- package/dist/core/footer-data-provider.d.ts +52 -0
- package/dist/core/footer-data-provider.d.ts.map +1 -0
- package/dist/core/footer-data-provider.js +310 -0
- package/dist/core/footer-data-provider.js.map +1 -0
- package/dist/core/index.d.ts +12 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/index.js +12 -0
- package/dist/core/index.js.map +1 -0
- package/dist/core/keybindings.d.ts +353 -0
- package/dist/core/keybindings.d.ts.map +1 -0
- package/dist/core/keybindings.js +295 -0
- package/dist/core/keybindings.js.map +1 -0
- package/dist/core/messages.d.ts +77 -0
- package/dist/core/messages.d.ts.map +1 -0
- package/dist/core/messages.js +123 -0
- package/dist/core/messages.js.map +1 -0
- package/dist/core/model-registry.d.ts +144 -0
- package/dist/core/model-registry.d.ts.map +1 -0
- package/dist/core/model-registry.js +699 -0
- package/dist/core/model-registry.js.map +1 -0
- package/dist/core/model-resolver.d.ts +110 -0
- package/dist/core/model-resolver.d.ts.map +1 -0
- package/dist/core/model-resolver.js +489 -0
- package/dist/core/model-resolver.js.map +1 -0
- package/dist/core/output-guard.d.ts +6 -0
- package/dist/core/output-guard.d.ts.map +1 -0
- package/dist/core/output-guard.js +59 -0
- package/dist/core/output-guard.js.map +1 -0
- package/dist/core/package-manager.d.ts +199 -0
- package/dist/core/package-manager.d.ts.map +1 -0
- package/dist/core/package-manager.js +1973 -0
- package/dist/core/package-manager.js.map +1 -0
- package/dist/core/prompt-templates.d.ts +52 -0
- package/dist/core/prompt-templates.d.ts.map +1 -0
- package/dist/core/prompt-templates.js +250 -0
- package/dist/core/prompt-templates.js.map +1 -0
- package/dist/core/resolve-config-value.d.ts +23 -0
- package/dist/core/resolve-config-value.d.ts.map +1 -0
- package/dist/core/resolve-config-value.js +126 -0
- package/dist/core/resolve-config-value.js.map +1 -0
- package/dist/core/resource-loader.d.ts +194 -0
- package/dist/core/resource-loader.d.ts.map +1 -0
- package/dist/core/resource-loader.js +727 -0
- package/dist/core/resource-loader.js.map +1 -0
- package/dist/core/sdk.d.ts +107 -0
- package/dist/core/sdk.d.ts.map +1 -0
- package/dist/core/sdk.js +274 -0
- package/dist/core/sdk.js.map +1 -0
- package/dist/core/session-cwd.d.ts +19 -0
- package/dist/core/session-cwd.d.ts.map +1 -0
- package/dist/core/session-cwd.js +38 -0
- package/dist/core/session-cwd.js.map +1 -0
- package/dist/core/session-manager.d.ts +333 -0
- package/dist/core/session-manager.d.ts.map +1 -0
- package/dist/core/session-manager.js +1109 -0
- package/dist/core/session-manager.js.map +1 -0
- package/dist/core/settings-manager.d.ts +261 -0
- package/dist/core/settings-manager.d.ts.map +1 -0
- package/dist/core/settings-manager.js +782 -0
- package/dist/core/settings-manager.js.map +1 -0
- package/dist/core/skills.d.ts +60 -0
- package/dist/core/skills.d.ts.map +1 -0
- package/dist/core/skills.js +404 -0
- package/dist/core/skills.js.map +1 -0
- package/dist/core/slash-commands.d.ts +14 -0
- package/dist/core/slash-commands.d.ts.map +1 -0
- package/dist/core/slash-commands.js +25 -0
- package/dist/core/slash-commands.js.map +1 -0
- package/dist/core/source-info.d.ts +18 -0
- package/dist/core/source-info.d.ts.map +1 -0
- package/dist/core/source-info.js +19 -0
- package/dist/core/source-info.js.map +1 -0
- package/dist/core/system-prompt.d.ts +28 -0
- package/dist/core/system-prompt.d.ts.map +1 -0
- package/dist/core/system-prompt.js +120 -0
- package/dist/core/system-prompt.js.map +1 -0
- package/dist/core/telemetry.d.ts +3 -0
- package/dist/core/telemetry.d.ts.map +1 -0
- package/dist/core/telemetry.js +9 -0
- package/dist/core/telemetry.js.map +1 -0
- package/dist/core/timings.d.ts +8 -0
- package/dist/core/timings.d.ts.map +1 -0
- package/dist/core/timings.js +31 -0
- package/dist/core/timings.js.map +1 -0
- package/dist/core/tools/bash.d.ts +68 -0
- package/dist/core/tools/bash.d.ts.map +1 -0
- package/dist/core/tools/bash.js +355 -0
- package/dist/core/tools/bash.js.map +1 -0
- package/dist/core/tools/edit-diff.d.ts +85 -0
- package/dist/core/tools/edit-diff.d.ts.map +1 -0
- package/dist/core/tools/edit-diff.js +337 -0
- package/dist/core/tools/edit-diff.js.map +1 -0
- package/dist/core/tools/edit.d.ts +49 -0
- package/dist/core/tools/edit.d.ts.map +1 -0
- package/dist/core/tools/edit.js +323 -0
- package/dist/core/tools/edit.js.map +1 -0
- package/dist/core/tools/file-mutation-queue.d.ts +6 -0
- package/dist/core/tools/file-mutation-queue.d.ts.map +1 -0
- package/dist/core/tools/file-mutation-queue.js +37 -0
- package/dist/core/tools/file-mutation-queue.js.map +1 -0
- package/dist/core/tools/find.d.ts +35 -0
- package/dist/core/tools/find.d.ts.map +1 -0
- package/dist/core/tools/find.js +298 -0
- package/dist/core/tools/find.js.map +1 -0
- package/dist/core/tools/grep.d.ts +37 -0
- package/dist/core/tools/grep.d.ts.map +1 -0
- package/dist/core/tools/grep.js +304 -0
- package/dist/core/tools/grep.js.map +1 -0
- package/dist/core/tools/index.d.ts +40 -0
- package/dist/core/tools/index.d.ts.map +1 -0
- package/dist/core/tools/index.js +112 -0
- package/dist/core/tools/index.js.map +1 -0
- package/dist/core/tools/ls.d.ts +37 -0
- package/dist/core/tools/ls.d.ts.map +1 -0
- package/dist/core/tools/ls.js +169 -0
- package/dist/core/tools/ls.js.map +1 -0
- package/dist/core/tools/path-utils.d.ts +8 -0
- package/dist/core/tools/path-utils.d.ts.map +1 -0
- package/dist/core/tools/path-utils.js +81 -0
- package/dist/core/tools/path-utils.js.map +1 -0
- package/dist/core/tools/read.d.ts +35 -0
- package/dist/core/tools/read.d.ts.map +1 -0
- package/dist/core/tools/read.js +232 -0
- package/dist/core/tools/read.js.map +1 -0
- package/dist/core/tools/render-utils.d.ts +21 -0
- package/dist/core/tools/render-utils.d.ts.map +1 -0
- package/dist/core/tools/render-utils.js +49 -0
- package/dist/core/tools/render-utils.js.map +1 -0
- package/dist/core/tools/tool-definition-wrapper.d.ts +14 -0
- package/dist/core/tools/tool-definition-wrapper.d.ts.map +1 -0
- package/dist/core/tools/tool-definition-wrapper.js +34 -0
- package/dist/core/tools/tool-definition-wrapper.js.map +1 -0
- package/dist/core/tools/truncate.d.ts +70 -0
- package/dist/core/tools/truncate.d.ts.map +1 -0
- package/dist/core/tools/truncate.js +205 -0
- package/dist/core/tools/truncate.js.map +1 -0
- package/dist/core/tools/write.d.ts +26 -0
- package/dist/core/tools/write.d.ts.map +1 -0
- package/dist/core/tools/write.js +213 -0
- package/dist/core/tools/write.js.map +1 -0
- package/dist/index.d.ts +28 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +41 -0
- package/dist/index.js.map +1 -0
- package/dist/main.d.ts +12 -0
- package/dist/main.d.ts.map +1 -0
- package/dist/main.js +589 -0
- package/dist/main.js.map +1 -0
- package/dist/migrations.d.ts +33 -0
- package/dist/migrations.d.ts.map +1 -0
- package/dist/migrations.js +281 -0
- package/dist/migrations.js.map +1 -0
- package/dist/modes/index.d.ts +9 -0
- package/dist/modes/index.d.ts.map +1 -0
- package/dist/modes/index.js +8 -0
- package/dist/modes/index.js.map +1 -0
- package/dist/modes/interactive/assets/clankolas.png +0 -0
- package/dist/modes/interactive/components/aery-splash.d.ts +18 -0
- package/dist/modes/interactive/components/aery-splash.d.ts.map +1 -0
- package/dist/modes/interactive/components/aery-splash.js +60 -0
- package/dist/modes/interactive/components/aery-splash.js.map +1 -0
- package/dist/modes/interactive/components/armin.d.ts +34 -0
- package/dist/modes/interactive/components/armin.d.ts.map +1 -0
- package/dist/modes/interactive/components/armin.js +333 -0
- package/dist/modes/interactive/components/armin.js.map +1 -0
- package/dist/modes/interactive/components/assistant-message.d.ts +20 -0
- package/dist/modes/interactive/components/assistant-message.d.ts.map +1 -0
- package/dist/modes/interactive/components/assistant-message.js +121 -0
- package/dist/modes/interactive/components/assistant-message.js.map +1 -0
- package/dist/modes/interactive/components/bash-execution.d.ts +34 -0
- package/dist/modes/interactive/components/bash-execution.d.ts.map +1 -0
- package/dist/modes/interactive/components/bash-execution.js +175 -0
- package/dist/modes/interactive/components/bash-execution.js.map +1 -0
- package/dist/modes/interactive/components/bordered-loader.d.ts +16 -0
- package/dist/modes/interactive/components/bordered-loader.d.ts.map +1 -0
- package/dist/modes/interactive/components/bordered-loader.js +54 -0
- package/dist/modes/interactive/components/bordered-loader.js.map +1 -0
- package/dist/modes/interactive/components/branch-summary-message.d.ts +16 -0
- package/dist/modes/interactive/components/branch-summary-message.d.ts.map +1 -0
- package/dist/modes/interactive/components/branch-summary-message.js +44 -0
- package/dist/modes/interactive/components/branch-summary-message.js.map +1 -0
- package/dist/modes/interactive/components/compaction-summary-message.d.ts +16 -0
- package/dist/modes/interactive/components/compaction-summary-message.d.ts.map +1 -0
- package/dist/modes/interactive/components/compaction-summary-message.js +45 -0
- package/dist/modes/interactive/components/compaction-summary-message.js.map +1 -0
- package/dist/modes/interactive/components/config-selector.d.ts +71 -0
- package/dist/modes/interactive/components/config-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/config-selector.js +481 -0
- package/dist/modes/interactive/components/config-selector.js.map +1 -0
- package/dist/modes/interactive/components/countdown-timer.d.ts +14 -0
- package/dist/modes/interactive/components/countdown-timer.d.ts.map +1 -0
- package/dist/modes/interactive/components/countdown-timer.js +33 -0
- package/dist/modes/interactive/components/countdown-timer.js.map +1 -0
- package/dist/modes/interactive/components/custom-editor.d.ts +21 -0
- package/dist/modes/interactive/components/custom-editor.d.ts.map +1 -0
- package/dist/modes/interactive/components/custom-editor.js +70 -0
- package/dist/modes/interactive/components/custom-editor.js.map +1 -0
- package/dist/modes/interactive/components/custom-message.d.ts +20 -0
- package/dist/modes/interactive/components/custom-message.d.ts.map +1 -0
- package/dist/modes/interactive/components/custom-message.js +79 -0
- package/dist/modes/interactive/components/custom-message.js.map +1 -0
- package/dist/modes/interactive/components/daxnuts.d.ts +23 -0
- package/dist/modes/interactive/components/daxnuts.d.ts.map +1 -0
- package/dist/modes/interactive/components/daxnuts.js +140 -0
- package/dist/modes/interactive/components/daxnuts.js.map +1 -0
- package/dist/modes/interactive/components/diff.d.ts +12 -0
- package/dist/modes/interactive/components/diff.d.ts.map +1 -0
- package/dist/modes/interactive/components/diff.js +133 -0
- package/dist/modes/interactive/components/diff.js.map +1 -0
- package/dist/modes/interactive/components/dynamic-border.d.ts +15 -0
- package/dist/modes/interactive/components/dynamic-border.d.ts.map +1 -0
- package/dist/modes/interactive/components/dynamic-border.js +21 -0
- package/dist/modes/interactive/components/dynamic-border.js.map +1 -0
- package/dist/modes/interactive/components/earendil-announcement.d.ts +5 -0
- package/dist/modes/interactive/components/earendil-announcement.d.ts.map +1 -0
- package/dist/modes/interactive/components/earendil-announcement.js +40 -0
- package/dist/modes/interactive/components/earendil-announcement.js.map +1 -0
- package/dist/modes/interactive/components/extension-editor.d.ts +20 -0
- package/dist/modes/interactive/components/extension-editor.d.ts.map +1 -0
- package/dist/modes/interactive/components/extension-editor.js +111 -0
- package/dist/modes/interactive/components/extension-editor.js.map +1 -0
- package/dist/modes/interactive/components/extension-input.d.ts +23 -0
- package/dist/modes/interactive/components/extension-input.d.ts.map +1 -0
- package/dist/modes/interactive/components/extension-input.js +61 -0
- package/dist/modes/interactive/components/extension-input.js.map +1 -0
- package/dist/modes/interactive/components/extension-selector.d.ts +24 -0
- package/dist/modes/interactive/components/extension-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/extension-selector.js +78 -0
- package/dist/modes/interactive/components/extension-selector.js.map +1 -0
- package/dist/modes/interactive/components/footer.d.ts +27 -0
- package/dist/modes/interactive/components/footer.d.ts.map +1 -0
- package/dist/modes/interactive/components/footer.js +201 -0
- package/dist/modes/interactive/components/footer.js.map +1 -0
- package/dist/modes/interactive/components/index.d.ts +32 -0
- package/dist/modes/interactive/components/index.d.ts.map +1 -0
- package/dist/modes/interactive/components/index.js +33 -0
- package/dist/modes/interactive/components/index.js.map +1 -0
- package/dist/modes/interactive/components/keybinding-hints.d.ts +8 -0
- package/dist/modes/interactive/components/keybinding-hints.d.ts.map +1 -0
- package/dist/modes/interactive/components/keybinding-hints.js +22 -0
- package/dist/modes/interactive/components/keybinding-hints.js.map +1 -0
- package/dist/modes/interactive/components/login-dialog.d.ts +46 -0
- package/dist/modes/interactive/components/login-dialog.d.ts.map +1 -0
- package/dist/modes/interactive/components/login-dialog.js +158 -0
- package/dist/modes/interactive/components/login-dialog.js.map +1 -0
- package/dist/modes/interactive/components/model-selector.d.ts +47 -0
- package/dist/modes/interactive/components/model-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/model-selector.js +278 -0
- package/dist/modes/interactive/components/model-selector.js.map +1 -0
- package/dist/modes/interactive/components/oauth-selector.d.ts +29 -0
- package/dist/modes/interactive/components/oauth-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/oauth-selector.js +141 -0
- package/dist/modes/interactive/components/oauth-selector.js.map +1 -0
- package/dist/modes/interactive/components/scoped-models-selector.d.ts +42 -0
- package/dist/modes/interactive/components/scoped-models-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/scoped-models-selector.js +290 -0
- package/dist/modes/interactive/components/scoped-models-selector.js.map +1 -0
- package/dist/modes/interactive/components/session-selector-search.d.ts +23 -0
- package/dist/modes/interactive/components/session-selector-search.d.ts.map +1 -0
- package/dist/modes/interactive/components/session-selector-search.js +155 -0
- package/dist/modes/interactive/components/session-selector-search.js.map +1 -0
- package/dist/modes/interactive/components/session-selector.d.ts +96 -0
- package/dist/modes/interactive/components/session-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/session-selector.js +861 -0
- package/dist/modes/interactive/components/session-selector.js.map +1 -0
- package/dist/modes/interactive/components/settings-selector.d.ts +67 -0
- package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/settings-selector.js +373 -0
- package/dist/modes/interactive/components/settings-selector.js.map +1 -0
- package/dist/modes/interactive/components/show-images-selector.d.ts +10 -0
- package/dist/modes/interactive/components/show-images-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/show-images-selector.js +39 -0
- package/dist/modes/interactive/components/show-images-selector.js.map +1 -0
- package/dist/modes/interactive/components/skill-invocation-message.d.ts +17 -0
- package/dist/modes/interactive/components/skill-invocation-message.d.ts.map +1 -0
- package/dist/modes/interactive/components/skill-invocation-message.js +47 -0
- package/dist/modes/interactive/components/skill-invocation-message.js.map +1 -0
- package/dist/modes/interactive/components/theme-selector.d.ts +11 -0
- package/dist/modes/interactive/components/theme-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/theme-selector.js +50 -0
- package/dist/modes/interactive/components/theme-selector.js.map +1 -0
- package/dist/modes/interactive/components/thinking-selector.d.ts +11 -0
- package/dist/modes/interactive/components/thinking-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/thinking-selector.js +51 -0
- package/dist/modes/interactive/components/thinking-selector.js.map +1 -0
- package/dist/modes/interactive/components/tool-execution.d.ts +63 -0
- package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -0
- package/dist/modes/interactive/components/tool-execution.js +295 -0
- package/dist/modes/interactive/components/tool-execution.js.map +1 -0
- package/dist/modes/interactive/components/tree-selector.d.ts +89 -0
- package/dist/modes/interactive/components/tree-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/tree-selector.js +1092 -0
- package/dist/modes/interactive/components/tree-selector.js.map +1 -0
- package/dist/modes/interactive/components/user-message-selector.d.ts +30 -0
- package/dist/modes/interactive/components/user-message-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/user-message-selector.js +114 -0
- package/dist/modes/interactive/components/user-message-selector.js.map +1 -0
- package/dist/modes/interactive/components/user-message.d.ts +10 -0
- package/dist/modes/interactive/components/user-message.d.ts.map +1 -0
- package/dist/modes/interactive/components/user-message.js +29 -0
- package/dist/modes/interactive/components/user-message.js.map +1 -0
- package/dist/modes/interactive/components/visual-truncate.d.ts +24 -0
- package/dist/modes/interactive/components/visual-truncate.d.ts.map +1 -0
- package/dist/modes/interactive/components/visual-truncate.js +33 -0
- package/dist/modes/interactive/components/visual-truncate.js.map +1 -0
- package/dist/modes/interactive/interactive-mode.d.ts +359 -0
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -0
- package/dist/modes/interactive/interactive-mode.js +4573 -0
- package/dist/modes/interactive/interactive-mode.js.map +1 -0
- package/dist/modes/interactive/theme/aery.json +84 -0
- package/dist/modes/interactive/theme/catppuccin-mocha.json +81 -0
- package/dist/modes/interactive/theme/dark.json +85 -0
- package/dist/modes/interactive/theme/dracula.json +81 -0
- package/dist/modes/interactive/theme/light.json +84 -0
- package/dist/modes/interactive/theme/nord.json +81 -0
- package/dist/modes/interactive/theme/theme-schema.json +335 -0
- package/dist/modes/interactive/theme/theme.d.ts +81 -0
- package/dist/modes/interactive/theme/theme.d.ts.map +1 -0
- package/dist/modes/interactive/theme/theme.js +975 -0
- package/dist/modes/interactive/theme/theme.js.map +1 -0
- package/dist/modes/interactive/theme/tokyo-night.json +81 -0
- package/dist/modes/print-mode.d.ts +28 -0
- package/dist/modes/print-mode.d.ts.map +1 -0
- package/dist/modes/print-mode.js +131 -0
- package/dist/modes/print-mode.js.map +1 -0
- package/dist/modes/rpc/jsonl.d.ts +17 -0
- package/dist/modes/rpc/jsonl.d.ts.map +1 -0
- package/dist/modes/rpc/jsonl.js +49 -0
- package/dist/modes/rpc/jsonl.js.map +1 -0
- package/dist/modes/rpc/rpc-client.d.ts +224 -0
- package/dist/modes/rpc/rpc-client.d.ts.map +1 -0
- package/dist/modes/rpc/rpc-client.js +410 -0
- package/dist/modes/rpc/rpc-client.js.map +1 -0
- package/dist/modes/rpc/rpc-mode.d.ts +20 -0
- package/dist/modes/rpc/rpc-mode.d.ts.map +1 -0
- package/dist/modes/rpc/rpc-mode.js +597 -0
- package/dist/modes/rpc/rpc-mode.js.map +1 -0
- package/dist/modes/rpc/rpc-types.d.ts +419 -0
- package/dist/modes/rpc/rpc-types.d.ts.map +1 -0
- package/dist/modes/rpc/rpc-types.js +8 -0
- package/dist/modes/rpc/rpc-types.js.map +1 -0
- package/dist/package-manager-cli.d.ts +4 -0
- package/dist/package-manager-cli.d.ts.map +1 -0
- package/dist/package-manager-cli.js +468 -0
- package/dist/package-manager-cli.js.map +1 -0
- package/dist/utils/aery-user-agent.d.ts +2 -0
- package/dist/utils/aery-user-agent.d.ts.map +1 -0
- package/dist/utils/aery-user-agent.js +5 -0
- package/dist/utils/aery-user-agent.js.map +1 -0
- package/dist/utils/changelog.d.ts +21 -0
- package/dist/utils/changelog.d.ts.map +1 -0
- package/dist/utils/changelog.js +87 -0
- package/dist/utils/changelog.js.map +1 -0
- package/dist/utils/child-process.d.ts +11 -0
- package/dist/utils/child-process.d.ts.map +1 -0
- package/dist/utils/child-process.js +78 -0
- package/dist/utils/child-process.js.map +1 -0
- package/dist/utils/clipboard-image.d.ts +11 -0
- package/dist/utils/clipboard-image.d.ts.map +1 -0
- package/dist/utils/clipboard-image.js +245 -0
- package/dist/utils/clipboard-image.js.map +1 -0
- package/dist/utils/clipboard-native.d.ts +8 -0
- package/dist/utils/clipboard-native.d.ts.map +1 -0
- package/dist/utils/clipboard-native.js +14 -0
- package/dist/utils/clipboard-native.js.map +1 -0
- package/dist/utils/clipboard.d.ts +2 -0
- package/dist/utils/clipboard.d.ts.map +1 -0
- package/dist/utils/clipboard.js +110 -0
- package/dist/utils/clipboard.js.map +1 -0
- package/dist/utils/exif-orientation.d.ts +5 -0
- package/dist/utils/exif-orientation.d.ts.map +1 -0
- package/dist/utils/exif-orientation.js +158 -0
- package/dist/utils/exif-orientation.js.map +1 -0
- package/dist/utils/frontmatter.d.ts +8 -0
- package/dist/utils/frontmatter.d.ts.map +1 -0
- package/dist/utils/frontmatter.js +26 -0
- package/dist/utils/frontmatter.js.map +1 -0
- package/dist/utils/fs-watch.d.ts +5 -0
- package/dist/utils/fs-watch.d.ts.map +1 -0
- package/dist/utils/fs-watch.js +25 -0
- package/dist/utils/fs-watch.js.map +1 -0
- package/dist/utils/git.d.ts +26 -0
- package/dist/utils/git.d.ts.map +1 -0
- package/dist/utils/git.js +163 -0
- package/dist/utils/git.js.map +1 -0
- package/dist/utils/image-convert.d.ts +9 -0
- package/dist/utils/image-convert.d.ts.map +1 -0
- package/dist/utils/image-convert.js +39 -0
- package/dist/utils/image-convert.js.map +1 -0
- package/dist/utils/image-resize.d.ts +36 -0
- package/dist/utils/image-resize.d.ts.map +1 -0
- package/dist/utils/image-resize.js +137 -0
- package/dist/utils/image-resize.js.map +1 -0
- package/dist/utils/mime.d.ts +2 -0
- package/dist/utils/mime.d.ts.map +1 -0
- package/dist/utils/mime.js +26 -0
- package/dist/utils/mime.js.map +1 -0
- package/dist/utils/paths.d.ts +14 -0
- package/dist/utils/paths.d.ts.map +1 -0
- package/dist/utils/paths.js +34 -0
- package/dist/utils/paths.js.map +1 -0
- package/dist/utils/photon.d.ts +21 -0
- package/dist/utils/photon.d.ts.map +1 -0
- package/dist/utils/photon.js +121 -0
- package/dist/utils/photon.js.map +1 -0
- package/dist/utils/shell.d.ts +30 -0
- package/dist/utils/shell.d.ts.map +1 -0
- package/dist/utils/shell.js +190 -0
- package/dist/utils/shell.js.map +1 -0
- package/dist/utils/sleep.d.ts +5 -0
- package/dist/utils/sleep.d.ts.map +1 -0
- package/dist/utils/sleep.js +17 -0
- package/dist/utils/sleep.js.map +1 -0
- package/dist/utils/tools-manager.d.ts +3 -0
- package/dist/utils/tools-manager.d.ts.map +1 -0
- package/dist/utils/tools-manager.js +256 -0
- package/dist/utils/tools-manager.js.map +1 -0
- package/dist/utils/version-check.d.ts +7 -0
- package/dist/utils/version-check.d.ts.map +1 -0
- package/dist/utils/version-check.js +70 -0
- package/dist/utils/version-check.js.map +1 -0
- package/docs/compaction.md +0 -0
- package/docs/custom-provider.md +3 -2
- package/docs/development.md +0 -0
- package/docs/docs.json +133 -0
- package/docs/extensions.md +198 -22
- package/docs/images/doom-extension.png +0 -0
- package/docs/images/exy.png +0 -0
- package/docs/images/interactive-mode.png +0 -0
- package/docs/images/tree-view.png +0 -0
- package/docs/index.md +61 -0
- package/docs/json.md +0 -0
- package/docs/keybindings.md +0 -0
- package/docs/models.md +39 -2
- package/docs/packages.md +0 -0
- package/docs/prompt-templates.md +0 -0
- package/docs/providers.md +19 -1
- package/docs/quickstart.md +142 -0
- package/docs/rpc.md +0 -0
- package/docs/sdk.md +1 -1
- package/docs/{session.md → session-format.md} +0 -0
- package/docs/sessions.md +137 -0
- package/docs/settings.md +32 -8
- package/docs/shell-aliases.md +0 -0
- package/docs/skills.md +0 -0
- package/docs/terminal-setup.md +0 -0
- package/docs/termux.md +0 -0
- package/docs/themes.md +0 -0
- package/docs/tmux.md +0 -0
- package/docs/tui.md +0 -0
- package/docs/usage.md +275 -0
- package/docs/windows.md +0 -0
- package/examples/README.md +0 -0
- package/examples/extensions/README.md +2 -0
- package/examples/extensions/antigravity-image-gen.ts +2 -2
- package/examples/extensions/auto-commit-on-exit.ts +0 -0
- package/examples/extensions/bash-spawn-hook.ts +0 -0
- package/examples/extensions/bookmark.ts +0 -0
- package/examples/extensions/border-status-editor.ts +145 -0
- package/examples/extensions/built-in-tool-renderer.ts +0 -0
- package/examples/extensions/claude-rules.ts +0 -0
- package/examples/extensions/commands.ts +0 -0
- package/examples/extensions/confirm-destructive.ts +0 -0
- package/examples/extensions/custom-compaction.ts +1 -1
- package/examples/extensions/custom-footer.ts +1 -1
- package/examples/extensions/custom-header.ts +0 -0
- package/examples/extensions/custom-provider-anthropic/index.ts +1 -1
- package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
- package/examples/extensions/custom-provider-anthropic/package.json +1 -1
- package/examples/extensions/custom-provider-gitlab-duo/index.ts +1 -1
- package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
- package/examples/extensions/custom-provider-gitlab-duo/test.ts +0 -0
- package/examples/extensions/custom-provider-qwen-cli/index.ts +1 -1
- package/examples/extensions/custom-provider-qwen-cli/package.json +1 -1
- package/examples/extensions/dirty-repo-guard.ts +0 -0
- package/examples/extensions/doom-overlay/README.md +0 -0
- package/examples/extensions/doom-overlay/doom/build/doom.js +0 -0
- package/examples/extensions/doom-overlay/doom/doomgeneric_pi.c +0 -0
- package/examples/extensions/doom-overlay/doom-component.ts +0 -0
- package/examples/extensions/doom-overlay/doom-engine.ts +0 -0
- package/examples/extensions/doom-overlay/doom-keys.ts +0 -0
- package/examples/extensions/doom-overlay/index.ts +0 -0
- package/examples/extensions/doom-overlay/wad-finder.ts +0 -0
- package/examples/extensions/dynamic-resources/SKILL.md +0 -0
- package/examples/extensions/dynamic-resources/dynamic.json +0 -0
- package/examples/extensions/dynamic-resources/dynamic.md +0 -0
- package/examples/extensions/dynamic-resources/index.ts +0 -0
- package/examples/extensions/dynamic-tools.ts +2 -2
- package/examples/extensions/event-bus.ts +0 -0
- package/examples/extensions/file-trigger.ts +0 -0
- package/examples/extensions/git-checkpoint.ts +0 -0
- package/examples/extensions/github-issue-autocomplete.ts +185 -0
- package/examples/extensions/handoff.ts +8 -7
- package/examples/extensions/hello.ts +1 -1
- package/examples/extensions/hidden-thinking-label.ts +0 -0
- package/examples/extensions/inline-bash.ts +0 -0
- package/examples/extensions/input-transform.ts +0 -0
- package/examples/extensions/interactive-shell.ts +0 -0
- package/examples/extensions/mac-system-theme.ts +0 -0
- package/examples/extensions/message-renderer.ts +0 -0
- package/examples/extensions/minimal-mode.ts +0 -0
- package/examples/extensions/modal-editor.ts +0 -0
- package/examples/extensions/model-status.ts +0 -0
- package/examples/extensions/notify.ts +0 -0
- package/examples/extensions/overlay-qa-tests.ts +0 -0
- package/examples/extensions/overlay-test.ts +0 -0
- package/examples/extensions/permission-gate.ts +0 -0
- package/examples/extensions/pirate.ts +0 -0
- package/examples/extensions/plan-mode/README.md +0 -0
- package/examples/extensions/plan-mode/index.ts +2 -2
- package/examples/extensions/plan-mode/utils.ts +0 -0
- package/examples/extensions/preset.ts +1 -1
- package/examples/extensions/prompt-customizer.ts +97 -0
- package/examples/extensions/protected-paths.ts +0 -0
- package/examples/extensions/provider-payload.ts +0 -0
- package/examples/extensions/qna.ts +1 -1
- package/examples/extensions/question.ts +1 -1
- package/examples/extensions/questionnaire.ts +1 -1
- package/examples/extensions/rainbow-editor.ts +0 -0
- package/examples/extensions/reload-runtime.ts +1 -1
- package/examples/extensions/rpc-demo.ts +0 -0
- package/examples/extensions/sandbox/index.ts +0 -0
- package/examples/extensions/sandbox/package-lock.json +0 -0
- package/examples/extensions/sandbox/package.json +0 -0
- package/examples/extensions/send-user-message.ts +0 -0
- package/examples/extensions/session-name.ts +0 -0
- package/examples/extensions/shutdown-command.ts +1 -1
- package/examples/extensions/snake.ts +0 -0
- package/examples/extensions/space-invaders.ts +0 -0
- package/examples/extensions/ssh.ts +0 -0
- package/examples/extensions/status-line.ts +0 -0
- package/examples/extensions/structured-output.ts +65 -0
- package/examples/extensions/subagent/README.md +0 -0
- package/examples/extensions/subagent/agents/planner.md +0 -0
- package/examples/extensions/subagent/agents/reviewer.md +0 -0
- package/examples/extensions/subagent/agents/scout.md +0 -0
- package/examples/extensions/subagent/agents/worker.md +0 -0
- package/examples/extensions/subagent/agents.ts +0 -0
- package/examples/extensions/subagent/index.ts +3 -3
- package/examples/extensions/subagent/prompts/implement-and-review.md +0 -0
- package/examples/extensions/subagent/prompts/implement.md +0 -0
- package/examples/extensions/subagent/prompts/scout-and-plan.md +0 -0
- package/examples/extensions/summarize.ts +1 -1
- package/examples/extensions/system-prompt-header.ts +0 -0
- package/examples/extensions/tic-tac-toe.ts +2 -2
- package/examples/extensions/timed-confirm.ts +0 -0
- package/examples/extensions/titlebar-spinner.ts +0 -0
- package/examples/extensions/todo.ts +2 -2
- package/examples/extensions/tool-override.ts +2 -2
- package/examples/extensions/tools.ts +0 -0
- package/examples/extensions/trigger-compact.ts +0 -0
- package/examples/extensions/truncated-tool.ts +1 -1
- package/examples/extensions/widget-placement.ts +0 -0
- package/examples/extensions/with-deps/index.ts +1 -1
- package/examples/extensions/with-deps/package-lock.json +2 -2
- package/examples/extensions/with-deps/package.json +1 -1
- package/examples/extensions/working-indicator.ts +0 -0
- package/examples/extensions/working-message-test.ts +25 -0
- package/examples/rpc-extension-ui.ts +0 -0
- package/examples/sdk/01-minimal.ts +0 -0
- package/examples/sdk/02-custom-model.ts +1 -1
- package/examples/sdk/03-custom-prompt.ts +0 -0
- package/examples/sdk/04-skills.ts +0 -0
- package/examples/sdk/05-tools.ts +0 -0
- package/examples/sdk/06-extensions.ts +0 -0
- package/examples/sdk/07-context-files.ts +0 -0
- package/examples/sdk/08-prompt-templates.ts +0 -0
- package/examples/sdk/09-api-keys-and-oauth.ts +0 -0
- package/examples/sdk/10-settings.ts +0 -0
- package/examples/sdk/11-sessions.ts +0 -0
- package/examples/sdk/12-full-control.ts +1 -1
- package/examples/sdk/13-session-runtime.ts +0 -0
- package/examples/sdk/README.md +0 -0
- package/package.json +3 -4
- package/docs/tree.md +0 -233
package/docs/extensions.md
CHANGED
|
@@ -352,7 +352,7 @@ pi.on("resources_discover", async (event, _ctx) => {
|
|
|
352
352
|
|
|
353
353
|
### Session Events
|
|
354
354
|
|
|
355
|
-
See [
|
|
355
|
+
See [Session Format](session-format.md) for session storage internals and the SessionManager API.
|
|
356
356
|
|
|
357
357
|
#### session_start
|
|
358
358
|
|
|
@@ -431,7 +431,7 @@ pi.on("session_compact", async (event, ctx) => {
|
|
|
431
431
|
|
|
432
432
|
#### session_before_tree / session_tree
|
|
433
433
|
|
|
434
|
-
Fired on `/tree` navigation. See [
|
|
434
|
+
Fired on `/tree` navigation. See [Sessions](sessions.md) for tree navigation concepts.
|
|
435
435
|
|
|
436
436
|
```typescript
|
|
437
437
|
pi.on("session_before_tree", async (event, ctx) => {
|
|
@@ -448,10 +448,12 @@ pi.on("session_tree", async (event, ctx) => {
|
|
|
448
448
|
|
|
449
449
|
#### session_shutdown
|
|
450
450
|
|
|
451
|
-
Fired
|
|
451
|
+
Fired before an extension runtime is torn down.
|
|
452
452
|
|
|
453
453
|
```typescript
|
|
454
|
-
pi.on("session_shutdown", async (
|
|
454
|
+
pi.on("session_shutdown", async (event, ctx) => {
|
|
455
|
+
// event.reason - "quit" | "reload" | "new" | "resume" | "fork"
|
|
456
|
+
// event.targetSessionFile - destination session for session replacement flows
|
|
455
457
|
// Cleanup, save state, etc.
|
|
456
458
|
});
|
|
457
459
|
```
|
|
@@ -467,6 +469,15 @@ pi.on("before_agent_start", async (event, ctx) => {
|
|
|
467
469
|
// event.prompt - user's prompt text
|
|
468
470
|
// event.images - attached images (if any)
|
|
469
471
|
// event.systemPrompt - current system prompt
|
|
472
|
+
// event.systemPromptOptions - structured options used to build the system prompt
|
|
473
|
+
// .customPrompt - any custom system prompt (from --system-prompt, SYSTEM.md, or custom templates)
|
|
474
|
+
// .selectedTools - tools currently active in the prompt
|
|
475
|
+
// .toolSnippets - one-line descriptions for each tool
|
|
476
|
+
// .promptGuidelines - custom guideline bullets
|
|
477
|
+
// .appendSystemPrompt - text from --append-system-prompt flags
|
|
478
|
+
// .cwd - working directory
|
|
479
|
+
// .contextFiles - AGENTS.md files and other loaded context files
|
|
480
|
+
// .skills - loaded skills
|
|
470
481
|
|
|
471
482
|
return {
|
|
472
483
|
// Inject a persistent message (stored in session, sent to LLM)
|
|
@@ -481,6 +492,8 @@ pi.on("before_agent_start", async (event, ctx) => {
|
|
|
481
492
|
});
|
|
482
493
|
```
|
|
483
494
|
|
|
495
|
+
The `systemPromptOptions` field gives extensions access to the same structured data Pi uses to build the system prompt. This lets you inspect what Pi has loaded — custom prompts, guidelines, tool snippets, context files, skills — without re-discovering resources or re-parsing flags. Use it when your extension needs to make deep, informed changes to the system prompt while respecting user-provided configuration.
|
|
496
|
+
|
|
484
497
|
#### agent_start / agent_end
|
|
485
498
|
|
|
486
499
|
Fired once per user prompt.
|
|
@@ -536,7 +549,8 @@ Fired for tool execution lifecycle updates.
|
|
|
536
549
|
In parallel tool mode:
|
|
537
550
|
- `tool_execution_start` is emitted in assistant source order during the preflight phase
|
|
538
551
|
- `tool_execution_update` events may interleave across tools
|
|
539
|
-
- `tool_execution_end` is emitted in
|
|
552
|
+
- `tool_execution_end` is emitted in tool completion order after each tool is finalized
|
|
553
|
+
- final `toolResult` message events are still emitted later in assistant source order
|
|
540
554
|
|
|
541
555
|
```typescript
|
|
542
556
|
pi.on("tool_execution_start", async (event, ctx) => {
|
|
@@ -554,7 +568,7 @@ pi.on("tool_execution_end", async (event, ctx) => {
|
|
|
554
568
|
|
|
555
569
|
#### context
|
|
556
570
|
|
|
557
|
-
Fired before each LLM call. Modify messages non-destructively. See [
|
|
571
|
+
Fired before each LLM call. Modify messages non-destructively. See [Session Format](session-format.md) for message types.
|
|
558
572
|
|
|
559
573
|
```typescript
|
|
560
574
|
pi.on("context", async (event, ctx) => {
|
|
@@ -568,6 +582,8 @@ pi.on("context", async (event, ctx) => {
|
|
|
568
582
|
|
|
569
583
|
Fired after the provider-specific payload is built, right before the request is sent. Handlers run in extension load order. Returning `undefined` keeps the payload unchanged. Returning any other value replaces the payload for later handlers and for the actual request.
|
|
570
584
|
|
|
585
|
+
This hook can rewrite provider-level system instructions or remove them entirely. Those payload-level changes are not reflected by `ctx.getSystemPrompt()`, which reports Pi's system prompt string rather than the final serialized provider payload.
|
|
586
|
+
|
|
571
587
|
```typescript
|
|
572
588
|
pi.on("before_provider_request", (event, ctx) => {
|
|
573
589
|
console.log(JSON.stringify(event.payload, null, 2));
|
|
@@ -687,6 +703,8 @@ pi.on("tool_call", (event) => {
|
|
|
687
703
|
|
|
688
704
|
Fired after tool execution finishes and before `tool_execution_end` plus the final tool result message events are emitted. **Can modify result.**
|
|
689
705
|
|
|
706
|
+
In parallel tool mode, `tool_result` and `tool_execution_end` may interleave in tool completion order, while final `toolResult` message events are still emitted later in assistant source order.
|
|
707
|
+
|
|
690
708
|
`tool_result` handlers chain like middleware:
|
|
691
709
|
- Handlers run in extension load order
|
|
692
710
|
- Each handler sees the latest result after previous handler changes
|
|
@@ -814,7 +832,7 @@ Current working directory.
|
|
|
814
832
|
|
|
815
833
|
### ctx.sessionManager
|
|
816
834
|
|
|
817
|
-
Read-only access to session state. See [
|
|
835
|
+
Read-only access to session state. See [Session Format](session-format.md) for the full SessionManager API and entry types.
|
|
818
836
|
|
|
819
837
|
For `tool_call`, this state is synchronized through the current assistant message before handlers run. In parallel tool execution mode it is still not guaranteed to include sibling tool results from the same assistant message.
|
|
820
838
|
|
|
@@ -904,7 +922,12 @@ ctx.compact({
|
|
|
904
922
|
|
|
905
923
|
### ctx.getSystemPrompt()
|
|
906
924
|
|
|
907
|
-
Returns
|
|
925
|
+
Returns Pi's current system prompt string.
|
|
926
|
+
|
|
927
|
+
- During `before_agent_start`, this reflects chained system-prompt changes made so far for the current turn.
|
|
928
|
+
- It does not include later `context` message mutations.
|
|
929
|
+
- It does not include `before_provider_request` payload rewrites.
|
|
930
|
+
- If later-loaded extensions run after yours, they can still change what is ultimately sent.
|
|
908
931
|
|
|
909
932
|
```typescript
|
|
910
933
|
pi.on("before_agent_start", (event, ctx) => {
|
|
@@ -935,8 +958,11 @@ pi.registerCommand("my-cmd", {
|
|
|
935
958
|
Create a new session:
|
|
936
959
|
|
|
937
960
|
```typescript
|
|
961
|
+
const parentSession = ctx.sessionManager.getSessionFile();
|
|
962
|
+
const kickoff = "Continue in the replacement session";
|
|
963
|
+
|
|
938
964
|
const result = await ctx.newSession({
|
|
939
|
-
parentSession
|
|
965
|
+
parentSession,
|
|
940
966
|
setup: async (sm) => {
|
|
941
967
|
sm.appendMessage({
|
|
942
968
|
role: "user",
|
|
@@ -944,6 +970,10 @@ const result = await ctx.newSession({
|
|
|
944
970
|
timestamp: Date.now(),
|
|
945
971
|
});
|
|
946
972
|
},
|
|
973
|
+
withSession: async (ctx) => {
|
|
974
|
+
// Use only the replacement-session ctx here.
|
|
975
|
+
await ctx.sendUserMessage(kickoff);
|
|
976
|
+
},
|
|
947
977
|
});
|
|
948
978
|
|
|
949
979
|
if (result.cancelled) {
|
|
@@ -951,25 +981,36 @@ if (result.cancelled) {
|
|
|
951
981
|
}
|
|
952
982
|
```
|
|
953
983
|
|
|
984
|
+
Options:
|
|
985
|
+
- `parentSession`: parent session file to record in the new session header
|
|
986
|
+
- `setup`: mutate the new session's `SessionManager` before `withSession` runs
|
|
987
|
+
- `withSession`: run post-switch work against a fresh replacement-session context. Do not use captured old `pi` / command `ctx`; see [Session replacement lifecycle and footguns](#session-replacement-lifecycle-and-footguns).
|
|
988
|
+
|
|
954
989
|
### ctx.fork(entryId, options?)
|
|
955
990
|
|
|
956
991
|
Fork from a specific entry, creating a new session file:
|
|
957
992
|
|
|
958
993
|
```typescript
|
|
959
|
-
const result = await ctx.fork("entry-id-123"
|
|
960
|
-
|
|
961
|
-
|
|
994
|
+
const result = await ctx.fork("entry-id-123", {
|
|
995
|
+
withSession: async (ctx) => {
|
|
996
|
+
// Use only the replacement-session ctx here.
|
|
997
|
+
ctx.ui.notify("Now in the forked session", "info");
|
|
998
|
+
},
|
|
999
|
+
});
|
|
1000
|
+
if (result.cancelled) {
|
|
1001
|
+
// An extension cancelled the fork
|
|
962
1002
|
}
|
|
963
1003
|
|
|
964
1004
|
const cloneResult = await ctx.fork("entry-id-456", { position: "at" });
|
|
965
|
-
if (
|
|
966
|
-
//
|
|
1005
|
+
if (cloneResult.cancelled) {
|
|
1006
|
+
// An extension cancelled the clone
|
|
967
1007
|
}
|
|
968
1008
|
```
|
|
969
1009
|
|
|
970
1010
|
Options:
|
|
971
1011
|
- `position`: `"before"` (default) forks before the selected user message, restoring that prompt into the editor
|
|
972
1012
|
- `position`: `"at"` duplicates the active path through the selected entry without restoring editor text
|
|
1013
|
+
- `withSession`: run post-switch work against a fresh replacement-session context. Do not use captured old `pi` / command `ctx`; see [Session replacement lifecycle and footguns](#session-replacement-lifecycle-and-footguns).
|
|
973
1014
|
|
|
974
1015
|
### ctx.navigateTree(targetId, options?)
|
|
975
1016
|
|
|
@@ -990,17 +1031,24 @@ Options:
|
|
|
990
1031
|
- `replaceInstructions`: If true, `customInstructions` replaces the default prompt instead of being appended
|
|
991
1032
|
- `label`: Label to attach to the branch summary entry (or target entry if not summarizing)
|
|
992
1033
|
|
|
993
|
-
### ctx.switchSession(sessionPath)
|
|
1034
|
+
### ctx.switchSession(sessionPath, options?)
|
|
994
1035
|
|
|
995
1036
|
Switch to a different session file:
|
|
996
1037
|
|
|
997
1038
|
```typescript
|
|
998
|
-
const result = await ctx.switchSession("/path/to/session.jsonl"
|
|
1039
|
+
const result = await ctx.switchSession("/path/to/session.jsonl", {
|
|
1040
|
+
withSession: async (ctx) => {
|
|
1041
|
+
await ctx.sendUserMessage("Resume work in the replacement session");
|
|
1042
|
+
},
|
|
1043
|
+
});
|
|
999
1044
|
if (result.cancelled) {
|
|
1000
1045
|
// An extension cancelled the switch via session_before_switch
|
|
1001
1046
|
}
|
|
1002
1047
|
```
|
|
1003
1048
|
|
|
1049
|
+
Options:
|
|
1050
|
+
- `withSession`: run post-switch work against a fresh replacement-session context. Do not use captured old `pi` / command `ctx`; see [Session replacement lifecycle and footguns](#session-replacement-lifecycle-and-footguns).
|
|
1051
|
+
|
|
1004
1052
|
To discover available sessions, use the static `SessionManager.list()` or `SessionManager.listAll()` methods:
|
|
1005
1053
|
|
|
1006
1054
|
```typescript
|
|
@@ -1016,12 +1064,59 @@ pi.registerCommand("switch", {
|
|
|
1016
1064
|
sessions.map(s => s.file),
|
|
1017
1065
|
);
|
|
1018
1066
|
if (choice) {
|
|
1019
|
-
await ctx.switchSession(choice
|
|
1067
|
+
await ctx.switchSession(choice, {
|
|
1068
|
+
withSession: async (ctx) => {
|
|
1069
|
+
ctx.ui.notify("Switched session", "info");
|
|
1070
|
+
},
|
|
1071
|
+
});
|
|
1020
1072
|
}
|
|
1021
1073
|
},
|
|
1022
1074
|
});
|
|
1023
1075
|
```
|
|
1024
1076
|
|
|
1077
|
+
### Session replacement lifecycle and footguns
|
|
1078
|
+
|
|
1079
|
+
`withSession` receives a fresh `ReplacedSessionContext`, which extends `ExtensionCommandContext` with async `sendMessage()` and `sendUserMessage()` helpers bound to the replacement session.
|
|
1080
|
+
|
|
1081
|
+
Lifecycle and footguns:
|
|
1082
|
+
- `withSession` runs only after the old session has emitted `session_shutdown`, the old runtime has been torn down, the replacement session has been rebound, and the new extension instance has already received `session_start`.
|
|
1083
|
+
- The callback still executes in the original closure, not inside the new extension instance. That means your old extension instance may already have run its shutdown cleanup before `withSession` starts.
|
|
1084
|
+
- Captured old `pi` / old command `ctx` session-bound objects are stale after replacement and will throw if used. Use only the `ctx` passed to `withSession` for session-bound work.
|
|
1085
|
+
- Previously extracted raw objects are still your responsibility. For example, if you capture `const sm = ctx.sessionManager` before replacement, `sm` is still the old `SessionManager` object. Do not reuse it after replacement.
|
|
1086
|
+
- Code in `withSession` should assume any state invalidated by your `session_shutdown` handler is already gone. Only capture plain data that survives shutdown cleanly, such as strings, ids, and serialized config.
|
|
1087
|
+
|
|
1088
|
+
Safe pattern:
|
|
1089
|
+
|
|
1090
|
+
```typescript
|
|
1091
|
+
pi.registerCommand("handoff", {
|
|
1092
|
+
handler: async (_args, ctx) => {
|
|
1093
|
+
const kickoff = "Continue from the replacement session";
|
|
1094
|
+
await ctx.newSession({
|
|
1095
|
+
withSession: async (ctx) => {
|
|
1096
|
+
await ctx.sendUserMessage(kickoff);
|
|
1097
|
+
},
|
|
1098
|
+
});
|
|
1099
|
+
},
|
|
1100
|
+
});
|
|
1101
|
+
```
|
|
1102
|
+
|
|
1103
|
+
Unsafe pattern:
|
|
1104
|
+
|
|
1105
|
+
```typescript
|
|
1106
|
+
pi.registerCommand("handoff", {
|
|
1107
|
+
handler: async (_args, ctx) => {
|
|
1108
|
+
const oldSessionManager = ctx.sessionManager;
|
|
1109
|
+
await ctx.newSession({
|
|
1110
|
+
withSession: async (_ctx) => {
|
|
1111
|
+
// stale old objects: do not do this
|
|
1112
|
+
oldSessionManager.getSessionFile();
|
|
1113
|
+
pi.sendUserMessage("wrong");
|
|
1114
|
+
},
|
|
1115
|
+
});
|
|
1116
|
+
},
|
|
1117
|
+
});
|
|
1118
|
+
```
|
|
1119
|
+
|
|
1025
1120
|
### ctx.reload()
|
|
1026
1121
|
|
|
1027
1122
|
Run the same reload flow as `/reload`.
|
|
@@ -1094,6 +1189,8 @@ Use `aery.setActiveTools()` to enable or disable tools (including dynamically ad
|
|
|
1094
1189
|
|
|
1095
1190
|
Use `promptSnippet` to opt a custom tool into a one-line entry in `Available tools`, and `promptGuidelines` to append tool-specific bullets to the default `Guidelines` section when the tool is active.
|
|
1096
1191
|
|
|
1192
|
+
**Important:** `promptGuidelines` bullets are appended flat to the `Guidelines` section with no tool name prefix. Each guideline must name the tool it refers to — avoid "Use this tool when..." because the LLM cannot tell which tool "this" means. Write "Use my_tool when..." instead.
|
|
1193
|
+
|
|
1097
1194
|
See [dynamic-tools.ts](../examples/extensions/dynamic-tools.ts) for a full example.
|
|
1098
1195
|
|
|
1099
1196
|
```typescript
|
|
@@ -1105,7 +1202,7 @@ pi.registerTool({
|
|
|
1105
1202
|
label: "My Tool",
|
|
1106
1203
|
description: "What this tool does",
|
|
1107
1204
|
promptSnippet: "Summarize or transform text according to action",
|
|
1108
|
-
promptGuidelines: ["Use
|
|
1205
|
+
promptGuidelines: ["Use my_tool when the user asks to summarize previously generated text."],
|
|
1109
1206
|
parameters: Type.Object({
|
|
1110
1207
|
action: StringEnum(["list", "add"] as const),
|
|
1111
1208
|
text: Type.Optional(Type.String()),
|
|
@@ -1531,6 +1628,8 @@ Use `promptSnippet` for a short one-line entry in the `Available tools` section
|
|
|
1531
1628
|
|
|
1532
1629
|
Use `promptGuidelines` to add tool-specific bullets to the default system prompt `Guidelines` section. These bullets are included only while the tool is active (for example, after `aery.setActiveTools([...])`).
|
|
1533
1630
|
|
|
1631
|
+
**Important:** `promptGuidelines` bullets are appended flat to the `Guidelines` section with no tool name prefix or grouping. Each guideline must name the tool it refers to — avoid "Use this tool when..." because the LLM cannot tell which tool "this" means. Write "Use my_tool when..." instead.
|
|
1632
|
+
|
|
1534
1633
|
Note: Some models are idiots and include the @ prefix in tool path arguments. Built-in tools strip a leading @ before resolving paths. If your custom tool accepts a path, normalize a leading @ as well.
|
|
1535
1634
|
|
|
1536
1635
|
If your custom tool mutates files, use `withFileMutationQueue()` so it participates in the same per-file queue as built-in `edit` and `write`. This matters because tool calls run in parallel by default. Without the queue, two tools can read the same old file contents, compute different updates, and then whichever write lands last overwrites the other.
|
|
@@ -1576,7 +1675,7 @@ pi.registerTool({
|
|
|
1576
1675
|
description: "What this tool does (shown to LLM)",
|
|
1577
1676
|
promptSnippet: "List or add items in the project todo list",
|
|
1578
1677
|
promptGuidelines: [
|
|
1579
|
-
"Use
|
|
1678
|
+
"Use my_tool for todo planning instead of direct file edits when the user asks for a task list."
|
|
1580
1679
|
],
|
|
1581
1680
|
parameters: Type.Object({
|
|
1582
1681
|
action: StringEnum(["list", "add"] as const), // Use StringEnum for Google compatibility
|
|
@@ -1610,6 +1709,9 @@ pi.registerTool({
|
|
|
1610
1709
|
return {
|
|
1611
1710
|
content: [{ type: "text", text: "Done" }], // Sent to LLM
|
|
1612
1711
|
details: { data: result }, // For rendering & state
|
|
1712
|
+
// Optional: stop after this tool batch when every finalized tool result
|
|
1713
|
+
// in the batch also returns terminate: true.
|
|
1714
|
+
terminate: true,
|
|
1613
1715
|
};
|
|
1614
1716
|
},
|
|
1615
1717
|
|
|
@@ -1621,6 +1723,8 @@ pi.registerTool({
|
|
|
1621
1723
|
|
|
1622
1724
|
**Signaling errors:** To mark a tool execution as failed (sets `isError: true` on the result and reports it to the LLM), throw an error from `execute`. Returning a value never sets the error flag regardless of what properties you include in the return object.
|
|
1623
1725
|
|
|
1726
|
+
**Early termination:** Return `terminate: true` from `execute()` to hint that the automatic follow-up LLM call should be skipped after the current tool batch. This only takes effect when every finalized tool result in that batch is terminating. See [examples/extensions/structured-output.ts](../examples/extensions/structured-output.ts) for a minimal example where the agent ends on a final structured-output tool call.
|
|
1727
|
+
|
|
1624
1728
|
```typescript
|
|
1625
1729
|
// Correct: throw to signal an error
|
|
1626
1730
|
async execute(toolCallId, params) {
|
|
@@ -1689,7 +1793,7 @@ Extensions can override built-in tools (`read`, `bash`, `edit`, `write`, `grep`,
|
|
|
1689
1793
|
aery -e ./tool-override.ts
|
|
1690
1794
|
```
|
|
1691
1795
|
|
|
1692
|
-
Alternatively, use `--no-tools` to start without any built-in tools:
|
|
1796
|
+
Alternatively, use `--no-builtin-tools` to start without any built-in tools while keeping extension tools enabled:
|
|
1693
1797
|
```bash
|
|
1694
1798
|
# No built-in tools, only extension tools
|
|
1695
1799
|
aery --no-tools -e ./my-extension.ts
|
|
@@ -1965,8 +2069,9 @@ Extensions can interact with users via `ctx.ui` methods and customize how messag
|
|
|
1965
2069
|
- Async operations with cancel (BorderedLoader)
|
|
1966
2070
|
- Settings toggles (SettingsList)
|
|
1967
2071
|
- Status indicators (setStatus)
|
|
1968
|
-
- Working message and indicator during streaming (`setWorkingMessage`, `setWorkingIndicator`)
|
|
2072
|
+
- Working message, visibility, and indicator during streaming (`setWorkingMessage`, `setWorkingVisible`, `setWorkingIndicator`)
|
|
1969
2073
|
- Widgets above/below editor (setWidget)
|
|
2074
|
+
- Autocomplete providers layered on top of built-in slash/path completion (addAutocompleteProvider)
|
|
1970
2075
|
- Custom footers (setFooter)
|
|
1971
2076
|
|
|
1972
2077
|
### Dialogs
|
|
@@ -2046,9 +2151,11 @@ See [examples/extensions/timed-confirm.ts](../examples/extensions/timed-confirm.
|
|
|
2046
2151
|
ctx.ui.setStatus("my-ext", "Processing...");
|
|
2047
2152
|
ctx.ui.setStatus("my-ext", undefined); // Clear
|
|
2048
2153
|
|
|
2049
|
-
// Working
|
|
2154
|
+
// Working loader (shown during streaming)
|
|
2050
2155
|
ctx.ui.setWorkingMessage("Thinking deeply...");
|
|
2051
2156
|
ctx.ui.setWorkingMessage(); // Restore default
|
|
2157
|
+
ctx.ui.setWorkingVisible(false); // Hide the built-in working loader row entirely
|
|
2158
|
+
ctx.ui.setWorkingVisible(true); // Show the built-in working loader row
|
|
2052
2159
|
|
|
2053
2160
|
// Working indicator (shown during streaming)
|
|
2054
2161
|
ctx.ui.setWorkingIndicator({ frames: [ctx.ui.theme.fg("accent", "●")] }); // Static dot
|
|
@@ -2088,6 +2195,28 @@ const current = ctx.ui.getEditorText();
|
|
|
2088
2195
|
// Paste into editor (triggers paste handling, including collapse for large content)
|
|
2089
2196
|
ctx.ui.pasteToEditor("pasted content");
|
|
2090
2197
|
|
|
2198
|
+
// Stack custom autocomplete behavior on top of the built-in provider
|
|
2199
|
+
ctx.ui.addAutocompleteProvider((current) => ({
|
|
2200
|
+
async getSuggestions(lines, line, col, options) {
|
|
2201
|
+
const beforeCursor = (lines[line] ?? "").slice(0, col);
|
|
2202
|
+
const match = beforeCursor.match(/(?:^|[ \t])#([^\s#]*)$/);
|
|
2203
|
+
if (!match) {
|
|
2204
|
+
return current.getSuggestions(lines, line, col, options);
|
|
2205
|
+
}
|
|
2206
|
+
|
|
2207
|
+
return {
|
|
2208
|
+
prefix: `#${match[1] ?? ""}`,
|
|
2209
|
+
items: [{ value: "#2983", label: "#2983", description: "Extension API for autocomplete" }],
|
|
2210
|
+
};
|
|
2211
|
+
},
|
|
2212
|
+
applyCompletion(lines, line, col, item, prefix) {
|
|
2213
|
+
return current.applyCompletion(lines, line, col, item, prefix);
|
|
2214
|
+
},
|
|
2215
|
+
shouldTriggerFileCompletion(lines, line, col) {
|
|
2216
|
+
return current.shouldTriggerFileCompletion?.(lines, line, col) ?? true;
|
|
2217
|
+
},
|
|
2218
|
+
}));
|
|
2219
|
+
|
|
2091
2220
|
// Tool output expansion
|
|
2092
2221
|
const wasExpanded = ctx.ui.getToolsExpanded();
|
|
2093
2222
|
ctx.ui.setToolsExpanded(true);
|
|
@@ -2110,6 +2239,50 @@ ctx.ui.theme.fg("accent", "styled text"); // Access current theme
|
|
|
2110
2239
|
|
|
2111
2240
|
Custom working-indicator frames are rendered verbatim. If you want colors, add them to the frame strings yourself, for example with `ctx.ui.theme.fg(...)`.
|
|
2112
2241
|
|
|
2242
|
+
### Autocomplete Providers
|
|
2243
|
+
|
|
2244
|
+
Use `ctx.ui.addAutocompleteProvider()` to stack custom autocomplete logic on top of the built-in slash-command and path provider.
|
|
2245
|
+
|
|
2246
|
+
Typical pattern:
|
|
2247
|
+
|
|
2248
|
+
- inspect the text before the cursor
|
|
2249
|
+
- return your own suggestions when your extension-specific syntax matches
|
|
2250
|
+
- otherwise delegate to `current.getSuggestions(...)`
|
|
2251
|
+
- delegate `applyCompletion(...)` unless you need custom insertion behavior
|
|
2252
|
+
|
|
2253
|
+
```typescript
|
|
2254
|
+
pi.on("session_start", (_event, ctx) => {
|
|
2255
|
+
ctx.ui.addAutocompleteProvider((current) => ({
|
|
2256
|
+
async getSuggestions(lines, cursorLine, cursorCol, options) {
|
|
2257
|
+
const line = lines[cursorLine] ?? "";
|
|
2258
|
+
const beforeCursor = line.slice(0, cursorCol);
|
|
2259
|
+
const match = beforeCursor.match(/(?:^|[ \t])#([^\s#]*)$/);
|
|
2260
|
+
if (!match) {
|
|
2261
|
+
return current.getSuggestions(lines, cursorLine, cursorCol, options);
|
|
2262
|
+
}
|
|
2263
|
+
|
|
2264
|
+
return {
|
|
2265
|
+
prefix: `#${match[1] ?? ""}`,
|
|
2266
|
+
items: [
|
|
2267
|
+
{ value: "#2983", label: "#2983", description: "Extension API for registering custom @ autocomplete providers" },
|
|
2268
|
+
{ value: "#2753", label: "#2753", description: "Reload stale resource settings" },
|
|
2269
|
+
],
|
|
2270
|
+
};
|
|
2271
|
+
},
|
|
2272
|
+
|
|
2273
|
+
applyCompletion(lines, cursorLine, cursorCol, item, prefix) {
|
|
2274
|
+
return current.applyCompletion(lines, cursorLine, cursorCol, item, prefix);
|
|
2275
|
+
},
|
|
2276
|
+
|
|
2277
|
+
shouldTriggerFileCompletion(lines, cursorLine, cursorCol) {
|
|
2278
|
+
return current.shouldTriggerFileCompletion?.(lines, cursorLine, cursorCol) ?? true;
|
|
2279
|
+
},
|
|
2280
|
+
}));
|
|
2281
|
+
});
|
|
2282
|
+
```
|
|
2283
|
+
|
|
2284
|
+
See [github-issue-autocomplete.ts](../examples/extensions/github-issue-autocomplete.ts) for a complete example that preloads the latest open GitHub issues with `gh issue list` and filters them locally for fast `#...` completion. It requires GitHub CLI (`gh`) and a GitHub repository checkout.
|
|
2285
|
+
|
|
2113
2286
|
### Custom Components
|
|
2114
2287
|
|
|
2115
2288
|
For complex UI, use `ctx.ui.custom()`. This temporarily replaces the editor with your component until `done()` is called:
|
|
@@ -2302,6 +2475,7 @@ All examples in [examples/extensions/](../examples/extensions/).
|
|
|
2302
2475
|
| `questionnaire.ts` | Multi-step wizard tool | `registerTool`, `ui.custom` |
|
|
2303
2476
|
| `todo.ts` | Stateful tool with persistence | `registerTool`, `appendEntry`, `renderResult`, session events |
|
|
2304
2477
|
| `dynamic-tools.ts` | Register tools after startup and during commands | `registerTool`, `session_start`, `registerCommand` |
|
|
2478
|
+
| `structured-output.ts` | Final structured-output tool with `terminate: true` | `registerTool`, terminating tool results |
|
|
2305
2479
|
| `truncated-tool.ts` | Output truncation example | `registerTool`, `truncateHead` |
|
|
2306
2480
|
| `tool-override.ts` | Override built-in read tool | `registerTool` (same name as built-in) |
|
|
2307
2481
|
| **Commands** |||
|
|
@@ -2322,6 +2496,7 @@ All examples in [examples/extensions/](../examples/extensions/).
|
|
|
2322
2496
|
| `provider-payload.ts` | Inspect payloads and provider response headers | `on("before_provider_request")`, `on("after_provider_response")` |
|
|
2323
2497
|
| `system-prompt-header.ts` | Display system prompt info | `on("agent_start")`, `getSystemPrompt` |
|
|
2324
2498
|
| `claude-rules.ts` | Load rules from files | `on("session_start")`, `on("before_agent_start")` |
|
|
2499
|
+
| `prompt-customizer.ts` | Add context-aware tool guidance using `systemPromptOptions` | `on("before_agent_start")`, `BuildSystemPromptOptions` |
|
|
2325
2500
|
| `file-trigger.ts` | File watcher triggers messages | `sendMessage` |
|
|
2326
2501
|
| **Compaction & Sessions** |||
|
|
2327
2502
|
| `custom-compaction.ts` | Custom compaction summary | `on("session_before_compact")` |
|
|
@@ -2331,6 +2506,7 @@ All examples in [examples/extensions/](../examples/extensions/).
|
|
|
2331
2506
|
| **UI Components** |||
|
|
2332
2507
|
| `status-line.ts` | Footer status indicator | `setStatus`, session events |
|
|
2333
2508
|
| `working-indicator.ts` | Customize the streaming working indicator | `setWorkingIndicator`, `registerCommand` |
|
|
2509
|
+
| `github-issue-autocomplete.ts` | Add `#1234` issue completions on top of built-in autocomplete by preloading recent open issues from `gh issue list` | `addAutocompleteProvider`, `on("session_start")`, `exec` |
|
|
2334
2510
|
| `custom-footer.ts` | Replace footer entirely | `registerCommand`, `setFooter` |
|
|
2335
2511
|
| `custom-header.ts` | Replace startup header | `on("session_start")`, `setHeader` |
|
|
2336
2512
|
| `modal-editor.ts` | Vim-style modal editor | `setEditorComponent`, `CustomEditor` |
|
|
File without changes
|
package/docs/images/exy.png
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/docs/index.md
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# Pi Documentation
|
|
2
|
+
|
|
3
|
+
Pi is a minimal terminal coding harness. It is designed to stay small at the core while being extended through TypeScript extensions, skills, prompt templates, themes, and pi packages.
|
|
4
|
+
|
|
5
|
+
## Quick start
|
|
6
|
+
|
|
7
|
+
Install pi with npm:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install -g @eminent337/aery
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Then run it in a project directory:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
pi
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Authenticate with `/login` for subscription providers, or set an API key such as `ANTHROPIC_API_KEY` before starting pi.
|
|
20
|
+
|
|
21
|
+
For the full first-run flow, see [Quickstart](quickstart.md).
|
|
22
|
+
|
|
23
|
+
## Start here
|
|
24
|
+
|
|
25
|
+
- [Quickstart](quickstart.md) - install, authenticate, and run a first session.
|
|
26
|
+
- [Using Pi](usage.md) - interactive mode, slash commands, context files, and CLI reference.
|
|
27
|
+
- [Providers](providers.md) - subscription and API-key setup for built-in providers.
|
|
28
|
+
- [Settings](settings.md) - global and project settings.
|
|
29
|
+
- [Keybindings](keybindings.md) - default shortcuts and custom keybindings.
|
|
30
|
+
- [Sessions](session.md) - session storage format and session files.
|
|
31
|
+
- [Session tree](tree.md) - branching and navigating previous turns.
|
|
32
|
+
- [Compaction](compaction.md) - context compaction and branch summarization.
|
|
33
|
+
|
|
34
|
+
## Customization
|
|
35
|
+
|
|
36
|
+
- [Extensions](extensions.md) - TypeScript modules for tools, commands, events, and custom UI.
|
|
37
|
+
- [Skills](skills.md) - Agent Skills for reusable on-demand capabilities.
|
|
38
|
+
- [Prompt templates](prompt-templates.md) - reusable prompts that expand from slash commands.
|
|
39
|
+
- [Themes](themes.md) - built-in and custom terminal themes.
|
|
40
|
+
- [Pi packages](packages.md) - bundle and share extensions, skills, prompts, and themes.
|
|
41
|
+
- [Custom models](models.md) - add model entries for supported provider APIs.
|
|
42
|
+
- [Custom providers](custom-provider.md) - implement custom APIs and OAuth flows.
|
|
43
|
+
|
|
44
|
+
## Programmatic usage
|
|
45
|
+
|
|
46
|
+
- [SDK](sdk.md) - embed pi in Node.js applications.
|
|
47
|
+
- [RPC mode](rpc.md) - integrate over stdin/stdout JSONL.
|
|
48
|
+
- [JSON event stream mode](json.md) - print mode with structured events.
|
|
49
|
+
- [TUI components](tui.md) - build custom terminal UI for extensions.
|
|
50
|
+
|
|
51
|
+
## Platform setup
|
|
52
|
+
|
|
53
|
+
- [Windows](windows.md)
|
|
54
|
+
- [Termux on Android](termux.md)
|
|
55
|
+
- [tmux](tmux.md)
|
|
56
|
+
- [Terminal setup](terminal-setup.md)
|
|
57
|
+
- [Shell aliases](shell-aliases.md)
|
|
58
|
+
|
|
59
|
+
## Development
|
|
60
|
+
|
|
61
|
+
- [Development](development.md) - local setup, project structure, and debugging.
|
package/docs/json.md
CHANGED
|
File without changes
|
package/docs/keybindings.md
CHANGED
|
File without changes
|
package/docs/models.md
CHANGED
|
@@ -11,6 +11,7 @@ Add custom providers and models (Ollama, vLLM, LM Studio, proxies) via `~/.aery/
|
|
|
11
11
|
- [Model Configuration](#model-configuration)
|
|
12
12
|
- [Overriding Built-in Providers](#overriding-built-in-providers)
|
|
13
13
|
- [Per-model Overrides](#per-model-overrides)
|
|
14
|
+
- [Anthropic Messages Compatibility](#anthropic-messages-compatibility)
|
|
14
15
|
- [OpenAI Compatibility](#openai-compatibility)
|
|
15
16
|
|
|
16
17
|
## Minimal Example
|
|
@@ -195,7 +196,7 @@ If your command is slow, expensive, rate-limited, or should keep using a previou
|
|
|
195
196
|
| `contextWindow` | No | `128000` | Context window size in tokens |
|
|
196
197
|
| `maxTokens` | No | `16384` | Maximum output tokens |
|
|
197
198
|
| `cost` | No | all zeros | `{"input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0}` (per million tokens) |
|
|
198
|
-
| `compat` | No | provider `compat` |
|
|
199
|
+
| `compat` | No | provider `compat` | Provider compatibility overrides. Merged with provider-level `compat` when both are set. |
|
|
199
200
|
|
|
200
201
|
Current behavior:
|
|
201
202
|
- `/model` and `--list-models` list entries by model `id`.
|
|
@@ -269,6 +270,40 @@ Behavior notes:
|
|
|
269
270
|
- You can combine provider-level `baseUrl`/`headers` with `modelOverrides`.
|
|
270
271
|
- If `models` is also defined for a provider, custom models are merged after built-in overrides. A custom model with the same `id` replaces the overridden built-in model entry.
|
|
271
272
|
|
|
273
|
+
## Anthropic Messages Compatibility
|
|
274
|
+
|
|
275
|
+
For providers or proxies using `api: "anthropic-messages"`, use `compat.supportsEagerToolInputStreaming` to control Anthropic fine-grained tool streaming compatibility.
|
|
276
|
+
|
|
277
|
+
By default pi sends per-tool `eager_input_streaming: true`. If a proxy or Anthropic-compatible backend rejects that field, set `supportsEagerToolInputStreaming` to `false`. Pi will omit `tools[].eager_input_streaming` and send the legacy `fine-grained-tool-streaming-2025-05-14` beta header for tool-enabled requests instead.
|
|
278
|
+
|
|
279
|
+
```json
|
|
280
|
+
{
|
|
281
|
+
"providers": {
|
|
282
|
+
"anthropic-proxy": {
|
|
283
|
+
"baseUrl": "https://proxy.example.com",
|
|
284
|
+
"api": "anthropic-messages",
|
|
285
|
+
"apiKey": "ANTHROPIC_PROXY_KEY",
|
|
286
|
+
"compat": {
|
|
287
|
+
"supportsEagerToolInputStreaming": false,
|
|
288
|
+
"supportsLongCacheRetention": true
|
|
289
|
+
},
|
|
290
|
+
"models": [
|
|
291
|
+
{
|
|
292
|
+
"id": "claude-opus-4-7",
|
|
293
|
+
"reasoning": true,
|
|
294
|
+
"input": ["text", "image"]
|
|
295
|
+
}
|
|
296
|
+
]
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
```
|
|
301
|
+
|
|
302
|
+
| Field | Description |
|
|
303
|
+
|-------|-------------|
|
|
304
|
+
| `supportsEagerToolInputStreaming` | Whether the provider accepts per-tool `eager_input_streaming`. Default: `true`. Set to `false` to omit that field and use the legacy fine-grained tool streaming beta header on tool-enabled requests. |
|
|
305
|
+
| `supportsLongCacheRetention` | Whether the provider accepts Anthropic long cache retention (`cache_control.ttl: "1h"`) when cache retention is `long`. Default: `true`. |
|
|
306
|
+
|
|
272
307
|
## OpenAI Compatibility
|
|
273
308
|
|
|
274
309
|
For providers with partial OpenAI compatibility, use the `compat` field.
|
|
@@ -303,9 +338,11 @@ For providers with partial OpenAI compatibility, use the `compat` field.
|
|
|
303
338
|
| `requiresToolResultName` | Include `name` on tool result messages |
|
|
304
339
|
| `requiresAssistantAfterToolResult` | Insert an assistant message before a user message after tool results |
|
|
305
340
|
| `requiresThinkingAsText` | Convert thinking blocks to plain text |
|
|
306
|
-
| `
|
|
341
|
+
| `requiresReasoningContentOnAssistantMessages` | Include empty `reasoning_content` on all replayed assistant messages when reasoning is enabled |
|
|
342
|
+
| `thinkingFormat` | Use `reasoning_effort`, `deepseek`, `zai`, `qwen`, or `qwen-chat-template` thinking parameters |
|
|
307
343
|
| `cacheControlFormat` | Use Anthropic-style `cache_control` markers on the system prompt, last tool definition, and last user/assistant text content. Currently only `anthropic` is supported. |
|
|
308
344
|
| `supportsStrictMode` | Include the `strict` field in tool definitions |
|
|
345
|
+
| `supportsLongCacheRetention` | Whether the provider accepts long cache retention when cache retention is `long`: `prompt_cache_retention: "24h"` for OpenAI prompt caching, or `cache_control.ttl: "1h"` when `cacheControlFormat` is `anthropic`. Default: `true`. |
|
|
309
346
|
| `openRouterRouting` | OpenRouter provider routing preferences. This object is sent as-is in the `provider` field of the [OpenRouter API request](https://openrouter.ai/docs/guides/routing/provider-selection). |
|
|
310
347
|
| `vercelGatewayRouting` | Vercel AI Gateway routing config for provider selection (`only`, `order`) |
|
|
311
348
|
|
package/docs/packages.md
CHANGED
|
File without changes
|
package/docs/prompt-templates.md
CHANGED
|
File without changes
|