@eminent337/aery 0.67.68 → 0.74.2
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 +418 -5
- package/README.md +67 -37
- package/dist/bun/cli.d.ts +3 -0
- package/dist/bun/cli.d.ts.map +1 -0
- package/dist/bun/cli.js +9 -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 +341 -0
- package/dist/cli/args.js.map +1 -0
- package/dist/cli/capabilities.d.ts +61 -0
- package/dist/cli/capabilities.d.ts.map +1 -0
- package/dist/cli/capabilities.js +155 -0
- package/dist/cli/capabilities.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/doctor.d.ts +32 -0
- package/dist/cli/doctor.d.ts.map +1 -0
- package/dist/cli/doctor.js +133 -0
- package/dist/cli/doctor.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 +20 -0
- package/dist/cli.js.map +1 -0
- package/dist/config.d.ts +92 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +399 -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 +2521 -0
- package/dist/core/agent-session.js.map +1 -0
- package/dist/core/auth-guidance.d.ts +6 -0
- package/dist/core/auth-guidance.d.ts.map +1 -0
- package/dist/core/auth-guidance.js +32 -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/custom-openai-compatible.d.ts +14 -0
- package/dist/core/custom-openai-compatible.d.ts.map +1 -0
- package/dist/core/custom-openai-compatible.js +128 -0
- package/dist/core/custom-openai-compatible.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 +1066 -0
- package/dist/core/export-html/template.html +55 -0
- package/dist/core/export-html/template.js +1834 -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 +24 -0
- package/dist/core/extensions/loader.d.ts.map +1 -0
- package/dist/core/extensions/loader.js +488 -0
- package/dist/core/extensions/loader.js.map +1 -0
- package/dist/core/extensions/runner.d.ts +159 -0
- package/dist/core/extensions/runner.d.ts.map +1 -0
- package/dist/core/extensions/runner.js +824 -0
- package/dist/core/extensions/runner.js.map +1 -0
- package/dist/core/extensions/types.d.ts +1173 -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 +150 -0
- package/dist/core/model-registry.d.ts.map +1 -0
- package/dist/core/model-registry.js +728 -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 +495 -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 +198 -0
- package/dist/core/package-manager.d.ts.map +1 -0
- package/dist/core/package-manager.js +1975 -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/provider-display-names.d.ts +2 -0
- package/dist/core/provider-display-names.d.ts.map +1 -0
- package/dist/core/provider-display-names.js +33 -0
- package/dist/core/provider-display-names.js.map +1 -0
- package/dist/core/provider-setup-check.d.ts +14 -0
- package/dist/core/provider-setup-check.d.ts.map +1 -0
- package/dist/core/provider-setup-check.js +22 -0
- package/dist/core/provider-setup-check.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 +282 -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 +335 -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 +338 -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 +324 -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/output-accumulator.d.ts +50 -0
- package/dist/core/tools/output-accumulator.d.ts.map +1 -0
- package/dist/core/tools/output-accumulator.js +178 -0
- package/dist/core/tools/output-accumulator.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 +289 -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 +583 -0
- package/dist/main.js.map +1 -0
- package/dist/migrations.d.ts +61 -0
- package/dist/migrations.d.ts.map +1 -0
- package/dist/migrations.js +456 -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/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 +503 -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 +26 -0
- package/dist/modes/interactive/components/extension-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/extension-selector.js +83 -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 +13 -0
- package/dist/modes/interactive/components/keybinding-hints.d.ts.map +1 -0
- package/dist/modes/interactive/components/keybinding-hints.js +36 -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 +160 -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 +31 -0
- package/dist/modes/interactive/components/oauth-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/oauth-selector.js +165 -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 +375 -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 +1093 -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 +369 -0
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -0
- package/dist/modes/interactive/interactive-mode.js +4612 -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 +973 -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 +601 -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 +460 -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/ansi.d.ts +2 -0
- package/dist/utils/ansi.d.ts.map +1 -0
- package/dist/utils/ansi.js +52 -0
- package/dist/utils/ansi.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 +12 -0
- package/dist/utils/child-process.d.ts.map +1 -0
- package/dist/utils/child-process.js +86 -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 +117 -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/html.d.ts +7 -0
- package/dist/utils/html.d.ts.map +1 -0
- package/dist/utils/html.js +40 -0
- package/dist/utils/html.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 +3 -0
- package/dist/utils/mime.d.ts.map +1 -0
- package/dist/utils/mime.js +69 -0
- package/dist/utils/mime.js.map +1 -0
- package/dist/utils/paths.d.ts +16 -0
- package/dist/utils/paths.d.ts.map +1 -0
- package/dist/utils/paths.js +50 -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/pi-user-agent.d.ts +2 -0
- package/dist/utils/pi-user-agent.d.ts.map +1 -0
- package/dist/utils/pi-user-agent.js +5 -0
- package/dist/utils/pi-user-agent.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/syntax-highlight.d.ts +12 -0
- package/dist/utils/syntax-highlight.d.ts.map +1 -0
- package/dist/utils/syntax-highlight.js +118 -0
- package/dist/utils/syntax-highlight.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 +325 -0
- package/dist/utils/tools-manager.js.map +1 -0
- package/dist/utils/uuid.d.ts +2 -0
- package/dist/utils/uuid.d.ts.map +1 -0
- package/dist/utils/uuid.js +40 -0
- package/dist/utils/uuid.js.map +1 -0
- package/dist/utils/version-check.d.ts +14 -0
- package/dist/utils/version-check.d.ts.map +1 -0
- package/dist/utils/version-check.js +77 -0
- package/dist/utils/version-check.js.map +1 -0
- package/docs/compaction.md +17 -17
- package/docs/custom-provider.md +42 -33
- package/docs/development.md +4 -4
- package/docs/docs.json +148 -0
- package/docs/extensions.md +308 -80
- 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 +70 -0
- package/docs/json.md +4 -4
- package/docs/keybindings.md +2 -2
- package/docs/models.md +84 -5
- package/docs/packages.md +15 -10
- package/docs/prompt-templates.md +2 -2
- package/docs/providers.md +68 -20
- package/docs/quickstart.md +142 -0
- package/docs/rpc.md +6 -6
- package/docs/sdk.md +58 -78
- package/docs/{session.md → session-format.md} +8 -8
- package/docs/sessions.md +137 -0
- package/docs/settings.md +49 -17
- package/docs/shell-aliases.md +1 -1
- package/docs/skills.md +4 -4
- package/docs/terminal-setup.md +2 -2
- package/docs/termux.md +6 -6
- package/docs/themes.md +6 -6
- package/docs/tmux.md +0 -0
- package/docs/tui.md +22 -22
- package/docs/usage.md +277 -0
- package/docs/windows.md +1 -1
- package/examples/README.md +0 -0
- package/examples/extensions/README.md +6 -6
- package/examples/extensions/antigravity-image-gen.ts +18 -18
- package/examples/extensions/auto-commit-on-exit.ts +1 -1
- package/examples/extensions/bash-spawn-hook.ts +3 -3
- package/examples/extensions/bookmark.ts +1 -1
- package/examples/extensions/border-status-editor.ts +145 -0
- package/examples/extensions/built-in-tool-renderer.ts +3 -3
- package/examples/extensions/claude-rules.ts +2 -2
- package/examples/extensions/commands.ts +2 -2
- package/examples/extensions/confirm-destructive.ts +1 -1
- package/examples/extensions/custom-compaction.ts +3 -3
- package/examples/extensions/custom-footer.ts +3 -3
- package/examples/extensions/custom-header.ts +2 -2
- package/examples/extensions/custom-provider-anthropic/index.ts +2 -2
- package/examples/extensions/custom-provider-anthropic/package-lock.json +4 -4
- package/examples/extensions/custom-provider-anthropic/package.json +2 -2
- package/examples/extensions/custom-provider-gitlab-duo/index.ts +2 -2
- package/examples/extensions/custom-provider-gitlab-duo/package.json +2 -2
- package/examples/extensions/custom-provider-gitlab-duo/test.ts +1 -1
- package/examples/extensions/custom-provider-qwen-cli/index.ts +3 -3
- package/examples/extensions/custom-provider-qwen-cli/package.json +2 -2
- package/examples/extensions/dirty-repo-guard.ts +1 -1
- 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 +2 -2
- package/examples/extensions/doom-overlay/doom-engine.ts +0 -0
- package/examples/extensions/doom-overlay/doom-keys.ts +1 -1
- package/examples/extensions/doom-overlay/index.ts +1 -1
- 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 +1 -1
- package/examples/extensions/dynamic-resources/dynamic.md +0 -0
- package/examples/extensions/dynamic-resources/index.ts +1 -1
- package/examples/extensions/dynamic-tools.ts +3 -3
- package/examples/extensions/event-bus.ts +1 -1
- package/examples/extensions/file-trigger.ts +1 -1
- package/examples/extensions/git-checkpoint.ts +1 -1
- package/examples/extensions/github-issue-autocomplete.ts +185 -0
- package/examples/extensions/handoff.ts +52 -14
- package/examples/extensions/hello.ts +2 -2
- package/examples/extensions/hidden-thinking-label.ts +1 -1
- package/examples/extensions/inline-bash.ts +1 -1
- package/examples/extensions/input-transform.ts +1 -1
- package/examples/extensions/interactive-shell.ts +1 -1
- package/examples/extensions/mac-system-theme.ts +1 -1
- package/examples/extensions/message-renderer.ts +2 -2
- package/examples/extensions/minimal-mode.ts +3 -3
- package/examples/extensions/modal-editor.ts +2 -2
- package/examples/extensions/model-status.ts +1 -1
- package/examples/extensions/notify.ts +1 -1
- package/examples/extensions/overlay-qa-tests.ts +3 -3
- package/examples/extensions/overlay-test.ts +2 -2
- package/examples/extensions/permission-gate.ts +1 -1
- package/examples/extensions/pirate.ts +2 -2
- package/examples/extensions/plan-mode/README.md +0 -0
- package/examples/extensions/plan-mode/index.ts +4 -4
- package/examples/extensions/plan-mode/utils.ts +0 -0
- package/examples/extensions/preset.ts +15 -9
- package/examples/extensions/prompt-customizer.ts +97 -0
- package/examples/extensions/protected-paths.ts +1 -1
- package/examples/extensions/provider-payload.ts +2 -2
- package/examples/extensions/qna.ts +3 -3
- package/examples/extensions/question.ts +3 -3
- package/examples/extensions/questionnaire.ts +3 -3
- package/examples/extensions/rainbow-editor.ts +1 -1
- package/examples/extensions/reload-runtime.ts +2 -2
- package/examples/extensions/rpc-demo.ts +1 -1
- package/examples/extensions/sandbox/index.ts +8 -8
- package/examples/extensions/sandbox/package-lock.json +7 -7
- package/examples/extensions/sandbox/package.json +2 -2
- package/examples/extensions/send-user-message.ts +1 -1
- package/examples/extensions/session-name.ts +1 -1
- package/examples/extensions/shutdown-command.ts +2 -2
- package/examples/extensions/snake.ts +2 -2
- package/examples/extensions/space-invaders.ts +2 -2
- package/examples/extensions/ssh.ts +2 -2
- package/examples/extensions/status-line.ts +1 -1
- package/examples/extensions/stitch.ts +168 -0
- package/examples/extensions/structured-output.ts +65 -0
- package/examples/extensions/subagent/README.md +11 -11
- package/examples/extensions/subagent/agents/aery-agent.md +22 -0
- package/examples/extensions/subagent/agents/aery-ai.md +25 -0
- package/examples/extensions/subagent/agents/aery-core.md +19 -0
- package/examples/extensions/subagent/agents/aery-mom.md +25 -0
- package/examples/extensions/subagent/agents/aery-pods.md +24 -0
- package/examples/extensions/subagent/agents/aery-review.md +22 -0
- package/examples/extensions/subagent/agents/aery-tui.md +24 -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 +2 -2
- package/examples/extensions/subagent/index.ts +9 -9
- 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 +4 -4
- package/examples/extensions/system-prompt-header.ts +1 -1
- package/examples/extensions/tic-tac-toe.ts +4 -4
- package/examples/extensions/timed-confirm.ts +1 -1
- package/examples/extensions/titlebar-spinner.ts +1 -1
- package/examples/extensions/todo.ts +4 -4
- package/examples/extensions/tool-override.ts +3 -3
- package/examples/extensions/tools.ts +4 -4
- package/examples/extensions/trigger-compact.ts +1 -1
- package/examples/extensions/truncated-tool.ts +4 -4
- package/examples/extensions/widget-placement.ts +1 -1
- package/examples/extensions/with-deps/index.ts +2 -2
- package/examples/extensions/with-deps/package-lock.json +4 -4
- package/examples/extensions/with-deps/package.json +2 -2
- package/examples/extensions/working-indicator.ts +1 -1
- package/examples/extensions/working-message-test.ts +25 -0
- package/examples/rpc-extension-ui.ts +1 -1
- package/examples/sdk/01-minimal.ts +16 -12
- package/examples/sdk/02-custom-model.ts +14 -10
- package/examples/sdk/03-custom-prompt.ts +26 -18
- package/examples/sdk/04-skills.ts +4 -4
- package/examples/sdk/05-tools.ts +9 -5
- package/examples/sdk/06-extensions.ts +15 -11
- package/examples/sdk/07-context-files.ts +3 -3
- package/examples/sdk/08-prompt-templates.ts +4 -4
- package/examples/sdk/09-api-keys-and-oauth.ts +11 -7
- package/examples/sdk/10-settings.ts +5 -5
- package/examples/sdk/11-sessions.ts +5 -1
- package/examples/sdk/12-full-control.ts +13 -9
- package/examples/sdk/13-session-runtime.ts +1 -1
- package/examples/sdk/README.md +8 -11
- package/package.json +94 -101
- package/docs/tree.md +0 -233
package/docs/usage.md
ADDED
|
@@ -0,0 +1,277 @@
|
|
|
1
|
+
# Using Pi
|
|
2
|
+
|
|
3
|
+
This page collects day-to-day usage details that do not fit on the quickstart page.
|
|
4
|
+
|
|
5
|
+
## Interactive Mode
|
|
6
|
+
|
|
7
|
+
<p align="center"><img src="images/interactive-mode.png" alt="Interactive Mode" width="600"></p>
|
|
8
|
+
|
|
9
|
+
The interface has four main areas:
|
|
10
|
+
|
|
11
|
+
- **Startup header** - shortcuts, loaded context files, prompt templates, skills, and extensions
|
|
12
|
+
- **Messages** - user messages, assistant responses, tool calls, tool results, notifications, errors, and extension UI
|
|
13
|
+
- **Editor** - where you type; border color indicates the current thinking level
|
|
14
|
+
- **Footer** - working directory, session name, token/cache usage, cost, context usage, and current model
|
|
15
|
+
|
|
16
|
+
The editor can be replaced temporarily by built-in UI such as `/settings` or by custom extension UI.
|
|
17
|
+
|
|
18
|
+
### Editor Features
|
|
19
|
+
|
|
20
|
+
| Feature | How |
|
|
21
|
+
|---------|-----|
|
|
22
|
+
| File reference | Type `@` to fuzzy-search project files |
|
|
23
|
+
| Path completion | Press Tab to complete paths |
|
|
24
|
+
| Multi-line input | Shift+Enter, or Ctrl+Enter on Windows Terminal |
|
|
25
|
+
| Images | Paste with Ctrl+V, Alt+V on Windows, or drag into the terminal |
|
|
26
|
+
| Shell command | `!command` runs and sends output to the model |
|
|
27
|
+
| Hidden shell command | `!!command` runs without sending output to the model |
|
|
28
|
+
| External editor | Ctrl+G opens `$VISUAL` or `$EDITOR` |
|
|
29
|
+
|
|
30
|
+
See [Keybindings](keybindings.md) for all shortcuts and customization.
|
|
31
|
+
|
|
32
|
+
## Slash Commands
|
|
33
|
+
|
|
34
|
+
Type `/` in the editor to open command completion. Extensions can register custom commands, skills are available as `/skill:name`, and prompt templates expand via `/templatename`.
|
|
35
|
+
|
|
36
|
+
| Command | Description |
|
|
37
|
+
|---------|-------------|
|
|
38
|
+
| `/login`, `/logout` | Manage OAuth or API-key credentials |
|
|
39
|
+
| `/model` | Switch models |
|
|
40
|
+
| `/scoped-models` | Enable/disable models for Ctrl+P cycling |
|
|
41
|
+
| `/settings` | Thinking level, theme, message delivery, transport |
|
|
42
|
+
| `/resume` | Pick from previous sessions |
|
|
43
|
+
| `/new` | Start a new session |
|
|
44
|
+
| `/name <name>` | Set session display name |
|
|
45
|
+
| `/session` | Show session file, ID, messages, tokens, and cost |
|
|
46
|
+
| `/tree` | Jump to any point in the session and continue from there |
|
|
47
|
+
| `/fork` | Create a new session from a previous user message |
|
|
48
|
+
| `/clone` | Duplicate the current active branch into a new session |
|
|
49
|
+
| `/compact [prompt]` | Manually compact context, optionally with custom instructions |
|
|
50
|
+
| `/copy` | Copy last assistant message to clipboard |
|
|
51
|
+
| `/export [file]` | Export session to HTML |
|
|
52
|
+
| `/share` | Upload as private GitHub gist with shareable HTML link |
|
|
53
|
+
| `/reload` | Reload keybindings, extensions, skills, prompts, and context files |
|
|
54
|
+
| `/hotkeys` | Show all keyboard shortcuts |
|
|
55
|
+
| `/changelog` | Display version history |
|
|
56
|
+
| `/quit` | Quit pi |
|
|
57
|
+
|
|
58
|
+
## Message Queue
|
|
59
|
+
|
|
60
|
+
You can submit messages while the agent is still working:
|
|
61
|
+
|
|
62
|
+
- **Enter** queues a steering message, delivered after the current assistant turn finishes executing its tool calls.
|
|
63
|
+
- **Alt+Enter** queues a follow-up message, delivered after the agent finishes all work.
|
|
64
|
+
- **Escape** aborts and restores queued messages to the editor.
|
|
65
|
+
- **Alt+Up** retrieves queued messages back to the editor.
|
|
66
|
+
|
|
67
|
+
On Windows Terminal, Alt+Enter is fullscreen by default. Remap it as described in [Terminal setup](terminal-setup.md) if you want pi to receive the shortcut.
|
|
68
|
+
|
|
69
|
+
Configure delivery in [Settings](settings.md) with `steeringMode` and `followUpMode`.
|
|
70
|
+
|
|
71
|
+
## Sessions
|
|
72
|
+
|
|
73
|
+
Sessions are saved automatically to `~/.aery/agent/sessions/`, organized by working directory.
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
pi -c # Continue most recent session
|
|
77
|
+
pi -r # Browse and select a session
|
|
78
|
+
pi --no-session # Ephemeral mode; do not save
|
|
79
|
+
pi --session <path|id> # Use a specific session file or session ID
|
|
80
|
+
pi --fork <path|id> # Fork a session into a new session file
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Useful session commands:
|
|
84
|
+
|
|
85
|
+
- `/session` shows the current session file and ID.
|
|
86
|
+
- `/tree` navigates the in-file session tree and can summarize abandoned branches.
|
|
87
|
+
- `/fork` creates a new session from an earlier user message.
|
|
88
|
+
- `/clone` duplicates the current active branch into a new session file.
|
|
89
|
+
- `/compact` summarizes older messages to free context.
|
|
90
|
+
|
|
91
|
+
See [Sessions](sessions.md) and [Compaction](compaction.md) for details.
|
|
92
|
+
|
|
93
|
+
## Context Files
|
|
94
|
+
|
|
95
|
+
Pi loads `AGENTS.md` or `CLAUDE.md` at startup from:
|
|
96
|
+
|
|
97
|
+
- `~/.aery/agent/AGENTS.md` for global instructions
|
|
98
|
+
- parent directories, walking up from the current working directory
|
|
99
|
+
- the current directory
|
|
100
|
+
|
|
101
|
+
Use context files for project conventions, commands, safety rules, and preferences. Disable loading with `--no-context-files` or `-nc`.
|
|
102
|
+
|
|
103
|
+
### System Prompt Files
|
|
104
|
+
|
|
105
|
+
Replace the default system prompt with:
|
|
106
|
+
|
|
107
|
+
- `.aery/SYSTEM.md` for a project
|
|
108
|
+
- `~/.aery/agent/SYSTEM.md` globally
|
|
109
|
+
|
|
110
|
+
Append to the default prompt without replacing it with `APPEND_SYSTEM.md` in either location.
|
|
111
|
+
|
|
112
|
+
## Exporting and Sharing Sessions
|
|
113
|
+
|
|
114
|
+
Use `/export [file]` to write a session to HTML.
|
|
115
|
+
|
|
116
|
+
Use `/share` to upload a private GitHub gist with a shareable HTML link.
|
|
117
|
+
|
|
118
|
+
If you use pi for open source work and want to publish sessions for model, prompt, tool, and evaluation research, see [`badlogic/pi-share-hf`](https://github.com/badlogic/pi-share-hf). It publishes sessions to Hugging Face datasets.
|
|
119
|
+
|
|
120
|
+
## CLI Reference
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
pi [options] [@files...] [messages...]
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
### Package Commands
|
|
127
|
+
|
|
128
|
+
```bash
|
|
129
|
+
pi install <source> [-l] # Install package, -l for project-local
|
|
130
|
+
pi remove <source> [-l] # Remove package
|
|
131
|
+
pi uninstall <source> [-l] # Alias for remove
|
|
132
|
+
pi update [source|self|pi] # Update pi and packages; skips pinned packages
|
|
133
|
+
pi update --extensions # Update packages only
|
|
134
|
+
pi update --self # Update pi only
|
|
135
|
+
pi update --extension <src> # Update one package
|
|
136
|
+
pi list # List installed packages
|
|
137
|
+
pi config # Enable/disable package resources
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
See [Pi Packages](packages.md) for package sources and security notes.
|
|
141
|
+
|
|
142
|
+
### Modes
|
|
143
|
+
|
|
144
|
+
| Flag | Description |
|
|
145
|
+
|------|-------------|
|
|
146
|
+
| default | Interactive mode |
|
|
147
|
+
| `-p`, `--print` | Print response and exit |
|
|
148
|
+
| `--mode json` | Output all events as JSON lines; see [JSON mode](json.md) |
|
|
149
|
+
| `--mode rpc` | RPC mode over stdin/stdout; see [RPC mode](rpc.md) |
|
|
150
|
+
| `--export <in> [out]` | Export a session to HTML |
|
|
151
|
+
|
|
152
|
+
In print mode, pi also reads piped stdin and merges it into the initial prompt:
|
|
153
|
+
|
|
154
|
+
```bash
|
|
155
|
+
cat README.md | pi -p "Summarize this text"
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
### Model Options
|
|
159
|
+
|
|
160
|
+
| Option | Description |
|
|
161
|
+
|--------|-------------|
|
|
162
|
+
| `--provider <name>` | Provider, such as `anthropic`, `openai`, or `google` |
|
|
163
|
+
| `--model <pattern>` | Model pattern or ID; supports `provider/id` and optional `:<thinking>` |
|
|
164
|
+
| `--api-key <key>` | API key, overriding environment variables |
|
|
165
|
+
| `--thinking <level>` | `off`, `minimal`, `low`, `medium`, `high`, `xhigh` |
|
|
166
|
+
| `--models <patterns>` | Comma-separated patterns for Ctrl+P cycling |
|
|
167
|
+
| `--list-models [search]` | List available models |
|
|
168
|
+
|
|
169
|
+
### Session Options
|
|
170
|
+
|
|
171
|
+
| Option | Description |
|
|
172
|
+
|--------|-------------|
|
|
173
|
+
| `-c`, `--continue` | Continue the most recent session |
|
|
174
|
+
| `-r`, `--resume` | Browse and select a session |
|
|
175
|
+
| `--session <path\|id>` | Use a specific session file or partial UUID |
|
|
176
|
+
| `--fork <path\|id>` | Fork a session file or partial UUID into a new session |
|
|
177
|
+
| `--session-dir <dir>` | Custom session storage directory |
|
|
178
|
+
| `--no-session` | Ephemeral mode; do not save |
|
|
179
|
+
|
|
180
|
+
### Tool Options
|
|
181
|
+
|
|
182
|
+
| Option | Description |
|
|
183
|
+
|--------|-------------|
|
|
184
|
+
| `--tools <list>`, `-t <list>` | Allowlist specific built-in, extension, and custom tools |
|
|
185
|
+
| `--no-builtin-tools`, `-nbt` | Disable built-in tools but keep extension/custom tools enabled |
|
|
186
|
+
| `--no-tools`, `-nt` | Disable all tools |
|
|
187
|
+
|
|
188
|
+
Built-in tools: `read`, `bash`, `edit`, `write`, `grep`, `find`, `ls`.
|
|
189
|
+
|
|
190
|
+
### Resource Options
|
|
191
|
+
|
|
192
|
+
| Option | Description |
|
|
193
|
+
|--------|-------------|
|
|
194
|
+
| `-e`, `--extension <source>` | Load an extension from path, npm, or git; repeatable |
|
|
195
|
+
| `--no-extensions` | Disable extension discovery |
|
|
196
|
+
| `--skill <path>` | Load a skill; repeatable |
|
|
197
|
+
| `--no-skills` | Disable skill discovery |
|
|
198
|
+
| `--prompt-template <path>` | Load a prompt template; repeatable |
|
|
199
|
+
| `--no-prompt-templates` | Disable prompt template discovery |
|
|
200
|
+
| `--theme <path>` | Load a theme; repeatable |
|
|
201
|
+
| `--no-themes` | Disable theme discovery |
|
|
202
|
+
| `--no-context-files`, `-nc` | Disable `AGENTS.md` and `CLAUDE.md` discovery |
|
|
203
|
+
|
|
204
|
+
Combine `--no-*` with explicit flags to load exactly what you need, ignoring settings. Example:
|
|
205
|
+
|
|
206
|
+
```bash
|
|
207
|
+
pi --no-extensions -e ./my-extension.ts
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
### Other Options
|
|
211
|
+
|
|
212
|
+
| Option | Description |
|
|
213
|
+
|--------|-------------|
|
|
214
|
+
| `--system-prompt <text>` | Replace default prompt; context files and skills are still appended |
|
|
215
|
+
| `--append-system-prompt <text>` | Append to system prompt |
|
|
216
|
+
| `--verbose` | Force verbose startup |
|
|
217
|
+
| `-h`, `--help` | Show help |
|
|
218
|
+
| `-v`, `--version` | Show version |
|
|
219
|
+
|
|
220
|
+
### File Arguments
|
|
221
|
+
|
|
222
|
+
Prefix files with `@` to include them in the message:
|
|
223
|
+
|
|
224
|
+
```bash
|
|
225
|
+
pi @prompt.md "Answer this"
|
|
226
|
+
pi -p @screenshot.png "What's in this image?"
|
|
227
|
+
pi @code.ts @test.ts "Review these files"
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
### Examples
|
|
231
|
+
|
|
232
|
+
```bash
|
|
233
|
+
# Interactive with initial prompt
|
|
234
|
+
pi "List all .ts files in src/"
|
|
235
|
+
|
|
236
|
+
# Non-interactive
|
|
237
|
+
pi -p "Summarize this codebase"
|
|
238
|
+
|
|
239
|
+
# Non-interactive with piped stdin
|
|
240
|
+
cat README.md | pi -p "Summarize this text"
|
|
241
|
+
|
|
242
|
+
# Different model
|
|
243
|
+
pi --provider openai --model gpt-4o "Help me refactor"
|
|
244
|
+
|
|
245
|
+
# Model with provider prefix
|
|
246
|
+
pi --model openai/gpt-4o "Help me refactor"
|
|
247
|
+
|
|
248
|
+
# Model with thinking level shorthand
|
|
249
|
+
pi --model sonnet:high "Solve this complex problem"
|
|
250
|
+
|
|
251
|
+
# Limit model cycling
|
|
252
|
+
pi --models "claude-*,gpt-4o"
|
|
253
|
+
|
|
254
|
+
# Read-only mode
|
|
255
|
+
pi --tools read,grep,find,ls -p "Review the code"
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
### Environment Variables
|
|
259
|
+
|
|
260
|
+
| Variable | Description |
|
|
261
|
+
|----------|-------------|
|
|
262
|
+
| `AERY_CODING_AGENT_DIR` | Override config directory; default is `~/.aery/agent` |
|
|
263
|
+
| `AERY_CODING_AGENT_SESSION_DIR` | Override session storage directory; overridden by `--session-dir` |
|
|
264
|
+
| `AERY_PACKAGE_DIR` | Override package directory, useful for Nix/Guix store paths |
|
|
265
|
+
| `AERY_OFFLINE` | Disable startup network operations, including update checks, package update checks, and install/update telemetry |
|
|
266
|
+
| `AERY_SKIP_VERSION_CHECK` | Skip the Pi version update check at startup. This prevents the `eminent337.github.io` latest-version request |
|
|
267
|
+
| `AERY_TELEMETRY` | Override install/update telemetry: `1`/`true`/`yes` or `0`/`false`/`no`. This does not disable update checks |
|
|
268
|
+
| `AERY_CACHE_RETENTION` | Set to `long` for extended prompt cache where supported |
|
|
269
|
+
| `VISUAL`, `EDITOR` | External editor for Ctrl+G |
|
|
270
|
+
|
|
271
|
+
## Design Principles
|
|
272
|
+
|
|
273
|
+
Pi keeps the core small and pushes workflow-specific behavior into extensions, skills, prompt templates, and packages.
|
|
274
|
+
|
|
275
|
+
It intentionally does not include built-in MCP, sub-agents, permission popups, plan mode, to-dos, or background bash. You can build or install those workflows as extensions or packages, or use external tools such as containers and tmux.
|
|
276
|
+
|
|
277
|
+
For the full rationale, read the [blog post](https://mariozechner.at/posts/2025-11-30-pi-coding-agent/).
|
package/docs/windows.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Pi requires a bash shell on Windows. Checked locations (in order):
|
|
4
4
|
|
|
5
|
-
1. Custom path from `~/.
|
|
5
|
+
1. Custom path from `~/.aery/agent/settings.json`
|
|
6
6
|
2. Git Bash (`C:\Program Files\Git\bin\bash.exe`)
|
|
7
7
|
3. `bash.exe` on PATH (Cygwin, MSYS2, WSL)
|
|
8
8
|
|
package/examples/README.md
CHANGED
|
File without changes
|
|
@@ -9,7 +9,7 @@ Example extensions for pi-coding-agent.
|
|
|
9
9
|
pi --extension examples/extensions/permission-gate.ts
|
|
10
10
|
|
|
11
11
|
# Or copy to extensions directory for auto-discovery
|
|
12
|
-
cp permission-gate.ts ~/.
|
|
12
|
+
cp permission-gate.ts ~/.aery/agent/extensions/
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|
## Examples
|
|
@@ -34,10 +34,10 @@ cp permission-gate.ts ~/.pi/agent/extensions/
|
|
|
34
34
|
| `questionnaire.ts` | Multi-question input with tab bar navigation between questions |
|
|
35
35
|
| `tool-override.ts` | Override built-in tools (e.g., add logging/access control to `read`) |
|
|
36
36
|
| `dynamic-tools.ts` | Register tools after startup (`session_start`) and at runtime via command, with prompt snippets and tool-specific prompt guidelines |
|
|
37
|
+
| `structured-output.ts` | Final structured-output tool that returns `terminate: true` so the agent can end on the tool call |
|
|
37
38
|
| `built-in-tool-renderer.ts` | Custom compact rendering for built-in tools (read, bash, edit, write) while keeping original behavior |
|
|
38
39
|
| `minimal-mode.ts` | Override built-in tool rendering for minimal display (only tool calls, no output in collapsed mode) |
|
|
39
40
|
| `truncated-tool.ts` | Wraps ripgrep with proper output truncation (50KB/2000 lines) |
|
|
40
|
-
| `antigravity-image-gen.ts` | Generate images via Google Antigravity with optional save-to-disk modes |
|
|
41
41
|
| `ssh.ts` | Delegate all tools to a remote machine via SSH using pluggable operations |
|
|
42
42
|
| `subagent/` | Delegate tasks to specialized subagents with isolated context windows |
|
|
43
43
|
|
|
@@ -51,6 +51,7 @@ cp permission-gate.ts ~/.pi/agent/extensions/
|
|
|
51
51
|
| `handoff.ts` | Transfer context to a new focused session via `/handoff <goal>` |
|
|
52
52
|
| `qna.ts` | Extracts questions from last response into editor via `ctx.ui.setEditorText()` |
|
|
53
53
|
| `status-line.ts` | Shows turn progress in footer via `ctx.ui.setStatus()` with themed colors |
|
|
54
|
+
| `github-issue-autocomplete.ts` | Adds `#1234` issue completions by stacking a custom autocomplete provider that preloads open issues from `gh issue list` |
|
|
54
55
|
| `widget-placement.ts` | Shows widgets above and below the editor via `ctx.ui.setWidget()` placement |
|
|
55
56
|
| `hidden-thinking-label.ts` | Customizes the collapsed thinking label via `ctx.ui.setHiddenThinkingLabel()` |
|
|
56
57
|
| `working-indicator.ts` | Customizes the streaming working indicator via `ctx.ui.setWorkingIndicator()` |
|
|
@@ -123,7 +124,6 @@ cp permission-gate.ts ~/.pi/agent/extensions/
|
|
|
123
124
|
|-----------|-------------|
|
|
124
125
|
| `custom-provider-anthropic/` | Custom Anthropic provider with OAuth support and custom streaming implementation |
|
|
125
126
|
| `custom-provider-gitlab-duo/` | GitLab Duo provider using pi-ai's built-in Anthropic/OpenAI streaming via proxy |
|
|
126
|
-
| `custom-provider-qwen-cli/` | Qwen CLI provider with OAuth device flow and OpenAI-compatible models |
|
|
127
127
|
|
|
128
128
|
### External Dependencies
|
|
129
129
|
|
|
@@ -137,8 +137,8 @@ cp permission-gate.ts ~/.pi/agent/extensions/
|
|
|
137
137
|
See [docs/extensions.md](../../docs/extensions.md) for full documentation.
|
|
138
138
|
|
|
139
139
|
```typescript
|
|
140
|
-
import type { ExtensionAPI } from "@
|
|
141
|
-
import { Type } from "
|
|
140
|
+
import type { ExtensionAPI } from "@eminent337/aery";
|
|
141
|
+
import { Type } from "typebox";
|
|
142
142
|
|
|
143
143
|
export default function (pi: ExtensionAPI) {
|
|
144
144
|
// Subscribe to lifecycle events
|
|
@@ -179,7 +179,7 @@ export default function (pi: ExtensionAPI) {
|
|
|
179
179
|
|
|
180
180
|
**Use StringEnum for string parameters** (required for Google API compatibility):
|
|
181
181
|
```typescript
|
|
182
|
-
import { StringEnum } from "@
|
|
182
|
+
import { StringEnum } from "@eminent337/aery-ai";
|
|
183
183
|
|
|
184
184
|
// Good
|
|
185
185
|
action: StringEnum(["list", "add"] as const)
|
|
@@ -11,17 +11,17 @@
|
|
|
11
11
|
*
|
|
12
12
|
* Save modes (tool param, env var, or config file):
|
|
13
13
|
* save=none - Don't save to disk (default)
|
|
14
|
-
* save=project - Save to <repo>/.
|
|
15
|
-
* save=global - Save to ~/.
|
|
16
|
-
* save=custom - Save to saveDir param or
|
|
14
|
+
* save=project - Save to <repo>/.aery/generated-images/
|
|
15
|
+
* save=global - Save to ~/.aery/agent/generated-images/
|
|
16
|
+
* save=custom - Save to saveDir param or AERY_IMAGE_SAVE_DIR
|
|
17
17
|
*
|
|
18
18
|
* Environment variables:
|
|
19
|
-
*
|
|
20
|
-
*
|
|
19
|
+
* AERY_IMAGE_SAVE_MODE - Default save mode (none|project|global|custom)
|
|
20
|
+
* AERY_IMAGE_SAVE_DIR - Directory for custom save mode
|
|
21
21
|
*
|
|
22
22
|
* Config files (project overrides global):
|
|
23
|
-
* ~/.
|
|
24
|
-
* <repo>/.
|
|
23
|
+
* ~/.aery/agent/extensions/antigravity-image-gen.json
|
|
24
|
+
* <repo>/.aery/extensions/antigravity-image-gen.json
|
|
25
25
|
* Example: { "save": "global" }
|
|
26
26
|
*/
|
|
27
27
|
|
|
@@ -29,9 +29,9 @@ import { randomUUID } from "node:crypto";
|
|
|
29
29
|
import { existsSync, readFileSync } from "node:fs";
|
|
30
30
|
import { mkdir, writeFile } from "node:fs/promises";
|
|
31
31
|
import { join } from "node:path";
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import { type Static, Type } from "
|
|
32
|
+
import { type ExtensionAPI, getAgentDir, withFileMutationQueue } from "@eminent337/aery";
|
|
33
|
+
import { StringEnum } from "@eminent337/aery-ai";
|
|
34
|
+
import { type Static, Type } from "typebox";
|
|
35
35
|
|
|
36
36
|
const PROVIDER = "google-antigravity";
|
|
37
37
|
|
|
@@ -51,7 +51,7 @@ const ANTIGRAVITY_ENDPOINT = "https://daily-cloudcode-pa.sandbox.googleapis.com"
|
|
|
51
51
|
const DEFAULT_ANTIGRAVITY_VERSION = "1.21.9";
|
|
52
52
|
|
|
53
53
|
const ANTIGRAVITY_HEADERS = {
|
|
54
|
-
"User-Agent": `antigravity/${process.env.
|
|
54
|
+
"User-Agent": `antigravity/${process.env.AERY_AI_ANTIGRAVITY_VERSION || DEFAULT_ANTIGRAVITY_VERSION} darwin/arm64`,
|
|
55
55
|
"X-Goog-Api-Client": "google-cloud-sdk vscode_cloudshelleditor/0.1",
|
|
56
56
|
"Client-Metadata": JSON.stringify({
|
|
57
57
|
ideType: "IDE_UNSPECIFIED",
|
|
@@ -74,7 +74,7 @@ const TOOL_PARAMS = Type.Object({
|
|
|
74
74
|
save: Type.Optional(StringEnum(SAVE_MODES)),
|
|
75
75
|
saveDir: Type.Optional(
|
|
76
76
|
Type.String({
|
|
77
|
-
description: "Directory to save image when save=custom. Defaults to
|
|
77
|
+
description: "Directory to save image when save=custom. Defaults to AERY_IMAGE_SAVE_DIR if set.",
|
|
78
78
|
}),
|
|
79
79
|
),
|
|
80
80
|
});
|
|
@@ -185,13 +185,13 @@ function readConfigFile(path: string): ExtensionConfig {
|
|
|
185
185
|
function loadConfig(cwd: string): ExtensionConfig {
|
|
186
186
|
const globalPath = join(getAgentDir(), "extensions", "antigravity-image-gen.json");
|
|
187
187
|
const globalConfig = readConfigFile(globalPath);
|
|
188
|
-
const projectConfig = readConfigFile(join(cwd, ".
|
|
188
|
+
const projectConfig = readConfigFile(join(cwd, ".aery", "extensions", "antigravity-image-gen.json"));
|
|
189
189
|
return { ...globalConfig, ...projectConfig };
|
|
190
190
|
}
|
|
191
191
|
|
|
192
192
|
function resolveSaveConfig(params: ToolParams, cwd: string): SaveConfig {
|
|
193
193
|
const config = loadConfig(cwd);
|
|
194
|
-
const envMode = (process.env.
|
|
194
|
+
const envMode = (process.env.AERY_IMAGE_SAVE_MODE || "").toLowerCase();
|
|
195
195
|
const paramMode = params.save;
|
|
196
196
|
const mode = (paramMode || envMode || config.save || DEFAULT_SAVE_MODE) as SaveMode;
|
|
197
197
|
|
|
@@ -200,7 +200,7 @@ function resolveSaveConfig(params: ToolParams, cwd: string): SaveConfig {
|
|
|
200
200
|
}
|
|
201
201
|
|
|
202
202
|
if (mode === "project") {
|
|
203
|
-
return { mode, outputDir: join(cwd, ".
|
|
203
|
+
return { mode, outputDir: join(cwd, ".aery", "generated-images") };
|
|
204
204
|
}
|
|
205
205
|
|
|
206
206
|
if (mode === "global") {
|
|
@@ -209,9 +209,9 @@ function resolveSaveConfig(params: ToolParams, cwd: string): SaveConfig {
|
|
|
209
209
|
}
|
|
210
210
|
|
|
211
211
|
if (mode === "custom") {
|
|
212
|
-
const dir = params.saveDir || process.env.
|
|
212
|
+
const dir = params.saveDir || process.env.AERY_IMAGE_SAVE_DIR || config.saveDir;
|
|
213
213
|
if (!dir || !dir.trim()) {
|
|
214
|
-
throw new Error("save=custom requires saveDir or
|
|
214
|
+
throw new Error("save=custom requires saveDir or AERY_IMAGE_SAVE_DIR.");
|
|
215
215
|
}
|
|
216
216
|
return { mode, outputDir: dir };
|
|
217
217
|
}
|
|
@@ -355,7 +355,7 @@ export default function antigravityImageGen(pi: ExtensionAPI) {
|
|
|
355
355
|
name: "generate_image",
|
|
356
356
|
label: "Generate image",
|
|
357
357
|
description:
|
|
358
|
-
"Generate an image via Google Antigravity image models. Returns the image as a tool result attachment. Optional saving via save=project|global|custom|none, or
|
|
358
|
+
"Generate an image via Google Antigravity image models. Returns the image as a tool result attachment. Optional saving via save=project|global|custom|none, or AERY_IMAGE_SAVE_MODE/AERY_IMAGE_SAVE_DIR.",
|
|
359
359
|
parameters: TOOL_PARAMS,
|
|
360
360
|
async execute(_toolCallId, params: ToolParams, signal, onUpdate, ctx) {
|
|
361
361
|
const { accessToken, projectId } = await getCredentials(ctx);
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Uses the last assistant message to generate a commit message.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import type { ExtensionAPI } from "@
|
|
8
|
+
import type { ExtensionAPI } from "@eminent337/aery";
|
|
9
9
|
|
|
10
10
|
export default function (pi: ExtensionAPI) {
|
|
11
11
|
pi.on("session_shutdown", async (_event, ctx) => {
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
* pi -e ./bash-spawn-hook.ts
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
import type { ExtensionAPI } from "@
|
|
11
|
-
import { createBashTool } from "@
|
|
10
|
+
import type { ExtensionAPI } from "@eminent337/aery";
|
|
11
|
+
import { createBashTool } from "@eminent337/aery";
|
|
12
12
|
|
|
13
13
|
export default function (pi: ExtensionAPI) {
|
|
14
14
|
const cwd = process.cwd();
|
|
@@ -17,7 +17,7 @@ export default function (pi: ExtensionAPI) {
|
|
|
17
17
|
spawnHook: ({ command, cwd, env }) => ({
|
|
18
18
|
command: `source ~/.profile\n${command}`,
|
|
19
19
|
cwd,
|
|
20
|
-
env: { ...env,
|
|
20
|
+
env: { ...env, AERY_SPAWN_HOOK: "1" },
|
|
21
21
|
}),
|
|
22
22
|
});
|
|
23
23
|
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* Usage: /bookmark [label] - bookmark the last assistant message
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
import type { ExtensionAPI } from "@
|
|
10
|
+
import type { ExtensionAPI } from "@eminent337/aery";
|
|
11
11
|
|
|
12
12
|
export default function (pi: ExtensionAPI) {
|
|
13
13
|
pi.registerCommand("bookmark", {
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import { CustomEditor, type ExtensionAPI, type ExtensionContext, type KeybindingsManager } from "@eminent337/aery";
|
|
2
|
+
import type { Component, EditorTheme, TUI } from "@eminent337/aery-tui";
|
|
3
|
+
import { truncateToWidth, visibleWidth } from "@eminent337/aery-tui";
|
|
4
|
+
|
|
5
|
+
function fitBorder(
|
|
6
|
+
left: string,
|
|
7
|
+
right: string,
|
|
8
|
+
width: number,
|
|
9
|
+
border: (text: string) => string,
|
|
10
|
+
fill: (text: string) => string = border,
|
|
11
|
+
): string {
|
|
12
|
+
if (width <= 0) return "";
|
|
13
|
+
if (width === 1) return border("─");
|
|
14
|
+
|
|
15
|
+
let leftText = left;
|
|
16
|
+
let rightText = right;
|
|
17
|
+
const fixedWidth = 2;
|
|
18
|
+
const minimumGap = 3;
|
|
19
|
+
|
|
20
|
+
while (
|
|
21
|
+
fixedWidth + visibleWidth(leftText) + visibleWidth(rightText) + minimumGap > width &&
|
|
22
|
+
visibleWidth(rightText) > 0
|
|
23
|
+
) {
|
|
24
|
+
rightText = truncateToWidth(rightText, Math.max(0, visibleWidth(rightText) - 1), "");
|
|
25
|
+
}
|
|
26
|
+
while (
|
|
27
|
+
fixedWidth + visibleWidth(leftText) + visibleWidth(rightText) + minimumGap > width &&
|
|
28
|
+
visibleWidth(leftText) > 0
|
|
29
|
+
) {
|
|
30
|
+
leftText = truncateToWidth(leftText, Math.max(0, visibleWidth(leftText) - 1), "");
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const gapWidth = Math.max(0, width - fixedWidth - visibleWidth(leftText) - visibleWidth(rightText));
|
|
34
|
+
return `${border("─")}${leftText}${fill("─".repeat(gapWidth))}${rightText}${border("─")}`;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
function formatCwd(cwd: string): string {
|
|
38
|
+
const home = process.env.HOME;
|
|
39
|
+
if (home && cwd.startsWith(home)) {
|
|
40
|
+
return `~${cwd.slice(home.length)}`;
|
|
41
|
+
}
|
|
42
|
+
return cwd;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
function formatContext(ctx: ExtensionContext): string {
|
|
46
|
+
const usage = ctx.getContextUsage();
|
|
47
|
+
const contextWindow = usage?.contextWindow ?? ctx.model?.contextWindow;
|
|
48
|
+
if (!contextWindow || !usage || usage.percent === null) {
|
|
49
|
+
return "ctx ?";
|
|
50
|
+
}
|
|
51
|
+
return `ctx ${Math.round(usage.percent)}%/${(contextWindow / 1000).toFixed(0)}k`;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
function formatThinking(level: string): string {
|
|
55
|
+
return level === "off" ? "off" : level;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
class EmptyFooter implements Component {
|
|
59
|
+
render(): string[] {
|
|
60
|
+
return [];
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
invalidate(): void {}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export default function (pi: ExtensionAPI) {
|
|
67
|
+
let isWorking = false;
|
|
68
|
+
let spinnerIndex = 0;
|
|
69
|
+
let spinnerTimer: ReturnType<typeof setInterval> | undefined;
|
|
70
|
+
let activeTui: TUI | undefined;
|
|
71
|
+
const spinnerFrames = ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"];
|
|
72
|
+
|
|
73
|
+
const stopSpinner = () => {
|
|
74
|
+
if (spinnerTimer) {
|
|
75
|
+
clearInterval(spinnerTimer);
|
|
76
|
+
spinnerTimer = undefined;
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
pi.on("agent_start", () => {
|
|
81
|
+
isWorking = true;
|
|
82
|
+
stopSpinner();
|
|
83
|
+
spinnerTimer = setInterval(() => {
|
|
84
|
+
spinnerIndex = (spinnerIndex + 1) % spinnerFrames.length;
|
|
85
|
+
activeTui?.requestRender();
|
|
86
|
+
}, 80);
|
|
87
|
+
activeTui?.requestRender();
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
pi.on("agent_end", () => {
|
|
91
|
+
isWorking = false;
|
|
92
|
+
stopSpinner();
|
|
93
|
+
activeTui?.requestRender();
|
|
94
|
+
});
|
|
95
|
+
|
|
96
|
+
pi.on("session_shutdown", () => {
|
|
97
|
+
stopSpinner();
|
|
98
|
+
activeTui = undefined;
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
pi.on("session_start", (_event, ctx) => {
|
|
102
|
+
ctx.ui.setWorkingVisible(false);
|
|
103
|
+
ctx.ui.setFooter(() => new EmptyFooter());
|
|
104
|
+
|
|
105
|
+
let branch: string | undefined;
|
|
106
|
+
|
|
107
|
+
const refreshBranch = async () => {
|
|
108
|
+
const result = await pi.exec("git", ["branch", "--show-current"], { cwd: ctx.cwd }).catch(() => undefined);
|
|
109
|
+
const stdout = result?.stdout.trim();
|
|
110
|
+
branch = stdout && stdout.length > 0 ? stdout : undefined;
|
|
111
|
+
activeTui?.requestRender();
|
|
112
|
+
};
|
|
113
|
+
void refreshBranch();
|
|
114
|
+
|
|
115
|
+
class BorderStatusEditor extends CustomEditor {
|
|
116
|
+
constructor(tui: TUI, theme: EditorTheme, keybindings: KeybindingsManager) {
|
|
117
|
+
super(tui, theme, keybindings, { paddingX: 0 });
|
|
118
|
+
activeTui = tui;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
render(width: number): string[] {
|
|
122
|
+
const lines = super.render(width);
|
|
123
|
+
if (lines.length < 2) return lines;
|
|
124
|
+
|
|
125
|
+
const thm = ctx.ui.theme;
|
|
126
|
+
const model = ctx.model ? `${ctx.model.provider}/${ctx.model.id}` : "no model";
|
|
127
|
+
const thinking = pi.getThinkingLevel();
|
|
128
|
+
const topLeft = isWorking ? thm.fg("accent", ` ${spinnerFrames[spinnerIndex]} `) : "";
|
|
129
|
+
const topRight = "";
|
|
130
|
+
const bottomLeft = thm.fg("muted", ` ${model} · ${formatThinking(thinking)} `);
|
|
131
|
+
const bottomRight = thm.fg(
|
|
132
|
+
"muted",
|
|
133
|
+
` ${formatContext(ctx)} · ${formatCwd(ctx.cwd)}${branch ? ` (${branch})` : ""} `,
|
|
134
|
+
);
|
|
135
|
+
const borderColor = (text: string) => this.borderColor(text);
|
|
136
|
+
|
|
137
|
+
lines[0] = fitBorder(topLeft, topRight, width, borderColor);
|
|
138
|
+
lines[lines.length - 1] = fitBorder(bottomLeft, bottomRight, width, borderColor);
|
|
139
|
+
return lines;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
ctx.ui.setEditorComponent((tui, theme, keybindings) => new BorderStatusEditor(tui, theme, keybindings));
|
|
144
|
+
});
|
|
145
|
+
}
|
|
@@ -25,9 +25,9 @@
|
|
|
25
25
|
* pi -e ./built-in-tool-renderer.ts
|
|
26
26
|
*/
|
|
27
27
|
|
|
28
|
-
import type { BashToolDetails, EditToolDetails, ExtensionAPI, ReadToolDetails } from "@
|
|
29
|
-
import { createBashTool, createEditTool, createReadTool, createWriteTool } from "@
|
|
30
|
-
import { Text } from "@
|
|
28
|
+
import type { BashToolDetails, EditToolDetails, ExtensionAPI, ReadToolDetails } from "@eminent337/aery";
|
|
29
|
+
import { createBashTool, createEditTool, createReadTool, createWriteTool } from "@eminent337/aery";
|
|
30
|
+
import { Text } from "@eminent337/aery-tui";
|
|
31
31
|
|
|
32
32
|
export default function (pi: ExtensionAPI) {
|
|
33
33
|
const cwd = process.cwd();
|
|
@@ -12,14 +12,14 @@
|
|
|
12
12
|
* - Organize with subdirectories: Group related rules (e.g., frontend/, backend/)
|
|
13
13
|
*
|
|
14
14
|
* Usage:
|
|
15
|
-
* 1. Copy this file to ~/.
|
|
15
|
+
* 1. Copy this file to ~/.aery/agent/extensions/ or your project's .aery/extensions/
|
|
16
16
|
* 2. Create .claude/rules/ folder in your project root
|
|
17
17
|
* 3. Add .md files with your rules
|
|
18
18
|
*/
|
|
19
19
|
|
|
20
20
|
import * as fs from "node:fs";
|
|
21
21
|
import * as path from "node:path";
|
|
22
|
-
import type { ExtensionAPI } from "@
|
|
22
|
+
import type { ExtensionAPI } from "@eminent337/aery";
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
25
|
* Recursively find all .md files in a directory
|