@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
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
// Requires GitHub CLI (`gh`) and a GitHub repository checkout.
|
|
2
|
+
// Preloads the latest open issues once per session, then filters them locally for fast `#...` completion.
|
|
3
|
+
|
|
4
|
+
import type { ExtensionAPI } from "@eminent337/aery";
|
|
5
|
+
import {
|
|
6
|
+
type AutocompleteItem,
|
|
7
|
+
type AutocompleteProvider,
|
|
8
|
+
type AutocompleteSuggestions,
|
|
9
|
+
fuzzyFilter,
|
|
10
|
+
} from "@eminent337/aery-tui";
|
|
11
|
+
|
|
12
|
+
type GitHubIssue = {
|
|
13
|
+
number: number;
|
|
14
|
+
title: string;
|
|
15
|
+
state: string;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
type RepoResolution = { ok: true; repo: string } | { ok: false; error: string };
|
|
19
|
+
|
|
20
|
+
const MAX_ISSUES = 100;
|
|
21
|
+
const MAX_SUGGESTIONS = 20;
|
|
22
|
+
|
|
23
|
+
function extractIssueToken(textBeforeCursor: string): string | undefined {
|
|
24
|
+
const match = textBeforeCursor.match(/(?:^|[ \t])#([^\s#]*)$/);
|
|
25
|
+
return match?.[1];
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
function parseGitHubRepo(remoteUrl: string): string | undefined {
|
|
29
|
+
const sshMatch = remoteUrl.match(/^git@github\.com:([^/]+\/[^/]+?)(?:\.git)?$/);
|
|
30
|
+
if (sshMatch) {
|
|
31
|
+
return sshMatch[1];
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
const httpsMatch = remoteUrl.match(/^https?:\/\/github\.com\/([^/]+\/[^/]+?)(?:\.git)?$/);
|
|
35
|
+
if (httpsMatch) {
|
|
36
|
+
return httpsMatch[1];
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
return undefined;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
async function resolveGitHubRepo(pi: ExtensionAPI, cwd: string): Promise<RepoResolution> {
|
|
43
|
+
const result = await pi.exec("git", ["remote", "-v"], { cwd, timeout: 5_000 });
|
|
44
|
+
if (result.code !== 0) {
|
|
45
|
+
return { ok: false, error: "github-issue-autocomplete: cwd is not a git repository" };
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
for (const line of result.stdout.split("\n")) {
|
|
49
|
+
const columns = line.trim().split(/\s+/);
|
|
50
|
+
const remoteUrl = columns[1];
|
|
51
|
+
if (!remoteUrl) {
|
|
52
|
+
continue;
|
|
53
|
+
}
|
|
54
|
+
const repo = parseGitHubRepo(remoteUrl);
|
|
55
|
+
if (repo) {
|
|
56
|
+
return { ok: true, repo };
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
return { ok: false, error: "github-issue-autocomplete: cwd is not a GitHub repository" };
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
function formatIssueItem(issue: GitHubIssue): AutocompleteItem {
|
|
64
|
+
return {
|
|
65
|
+
value: `#${issue.number}`,
|
|
66
|
+
label: `#${issue.number}`,
|
|
67
|
+
description: `[${issue.state.toLowerCase()}] ${issue.title}`,
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
function filterIssues(issues: GitHubIssue[], query: string): AutocompleteItem[] {
|
|
72
|
+
if (!query.trim()) {
|
|
73
|
+
return issues.slice(0, MAX_SUGGESTIONS).map(formatIssueItem);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
if (/^\d+$/.test(query)) {
|
|
77
|
+
const numericMatches = issues
|
|
78
|
+
.filter((issue) => String(issue.number).startsWith(query))
|
|
79
|
+
.slice(0, MAX_SUGGESTIONS)
|
|
80
|
+
.map(formatIssueItem);
|
|
81
|
+
if (numericMatches.length > 0) {
|
|
82
|
+
return numericMatches;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
return fuzzyFilter(issues, query, (issue) => `${issue.number} ${issue.title}`)
|
|
87
|
+
.slice(0, MAX_SUGGESTIONS)
|
|
88
|
+
.map(formatIssueItem);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
function createIssueAutocompleteProvider(
|
|
92
|
+
current: AutocompleteProvider,
|
|
93
|
+
getIssues: () => Promise<GitHubIssue[] | undefined>,
|
|
94
|
+
): AutocompleteProvider {
|
|
95
|
+
return {
|
|
96
|
+
async getSuggestions(lines, cursorLine, cursorCol, options): Promise<AutocompleteSuggestions | null> {
|
|
97
|
+
const currentLine = lines[cursorLine] ?? "";
|
|
98
|
+
const textBeforeCursor = currentLine.slice(0, cursorCol);
|
|
99
|
+
const token = extractIssueToken(textBeforeCursor);
|
|
100
|
+
if (token === undefined) {
|
|
101
|
+
return current.getSuggestions(lines, cursorLine, cursorCol, options);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
const issues = await getIssues();
|
|
105
|
+
if (options.signal.aborted || !issues || issues.length === 0) {
|
|
106
|
+
return current.getSuggestions(lines, cursorLine, cursorCol, options);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
const suggestions = filterIssues(issues, token);
|
|
110
|
+
if (suggestions.length === 0) {
|
|
111
|
+
return current.getSuggestions(lines, cursorLine, cursorCol, options);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
return {
|
|
115
|
+
items: suggestions,
|
|
116
|
+
prefix: `#${token}`,
|
|
117
|
+
};
|
|
118
|
+
},
|
|
119
|
+
|
|
120
|
+
applyCompletion(lines, cursorLine, cursorCol, item, prefix) {
|
|
121
|
+
return current.applyCompletion(lines, cursorLine, cursorCol, item, prefix);
|
|
122
|
+
},
|
|
123
|
+
|
|
124
|
+
shouldTriggerFileCompletion(lines, cursorLine, cursorCol) {
|
|
125
|
+
return current.shouldTriggerFileCompletion?.(lines, cursorLine, cursorCol) ?? true;
|
|
126
|
+
},
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
export default function (pi: ExtensionAPI): void {
|
|
131
|
+
pi.on("session_start", async (_event, ctx) => {
|
|
132
|
+
const resolvedRepo = await resolveGitHubRepo(pi, ctx.cwd);
|
|
133
|
+
if (!resolvedRepo.ok) {
|
|
134
|
+
ctx.ui.notify(resolvedRepo.error, "error");
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
const repo = resolvedRepo.repo;
|
|
139
|
+
let issuesPromise: Promise<GitHubIssue[] | undefined> | undefined;
|
|
140
|
+
let loadErrorShown = false;
|
|
141
|
+
|
|
142
|
+
const getIssues = async (): Promise<GitHubIssue[] | undefined> => {
|
|
143
|
+
issuesPromise ||= (async () => {
|
|
144
|
+
const result = await pi.exec(
|
|
145
|
+
"gh",
|
|
146
|
+
[
|
|
147
|
+
"issue",
|
|
148
|
+
"list",
|
|
149
|
+
"--repo",
|
|
150
|
+
repo,
|
|
151
|
+
"--state",
|
|
152
|
+
"open",
|
|
153
|
+
"--limit",
|
|
154
|
+
String(MAX_ISSUES),
|
|
155
|
+
"--json",
|
|
156
|
+
"number,title,state",
|
|
157
|
+
],
|
|
158
|
+
{ cwd: ctx.cwd, timeout: 5_000 },
|
|
159
|
+
);
|
|
160
|
+
if (result.code !== 0) {
|
|
161
|
+
if (!loadErrorShown) {
|
|
162
|
+
loadErrorShown = true;
|
|
163
|
+
const details = result.stderr.trim() || `exit code ${result.code}`;
|
|
164
|
+
ctx.ui.notify(`github-issue-autocomplete: failed to load issues: ${details}`, "error");
|
|
165
|
+
}
|
|
166
|
+
return undefined;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
try {
|
|
170
|
+
return JSON.parse(result.stdout) as GitHubIssue[];
|
|
171
|
+
} catch {
|
|
172
|
+
if (!loadErrorShown) {
|
|
173
|
+
loadErrorShown = true;
|
|
174
|
+
ctx.ui.notify("github-issue-autocomplete: failed to parse gh issue list output", "error");
|
|
175
|
+
}
|
|
176
|
+
return undefined;
|
|
177
|
+
}
|
|
178
|
+
})();
|
|
179
|
+
return issuesPromise;
|
|
180
|
+
};
|
|
181
|
+
|
|
182
|
+
void getIssues();
|
|
183
|
+
ctx.ui.addAutocompleteProvider((current) => createIssueAutocompleteProvider(current, getIssues));
|
|
184
|
+
});
|
|
185
|
+
}
|
|
@@ -12,9 +12,9 @@
|
|
|
12
12
|
* The generated prompt appears as a draft in the editor for review/editing.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
import { complete, type Message } from "@eminent337/aery-ai";
|
|
16
15
|
import type { ExtensionAPI, SessionEntry } from "@eminent337/aery";
|
|
17
16
|
import { BorderedLoader, convertToLlm, serializeConversation } from "@eminent337/aery";
|
|
17
|
+
import { complete, type Message } from "@eminent337/aery-ai";
|
|
18
18
|
|
|
19
19
|
const SYSTEM_PROMPT = `You are a context transfer assistant. Given a conversation history and the user's goal for a new thread, generate a focused prompt that:
|
|
20
20
|
|
|
@@ -135,19 +135,20 @@ export default function (pi: ExtensionAPI) {
|
|
|
135
135
|
return;
|
|
136
136
|
}
|
|
137
137
|
|
|
138
|
-
// Create new session with parent tracking
|
|
138
|
+
// Create new session with parent tracking. Use the replacement-session
|
|
139
|
+
// context for post-switch UI work; the original ctx is stale after a
|
|
140
|
+
// successful session replacement.
|
|
139
141
|
const newSessionResult = await ctx.newSession({
|
|
140
142
|
parentSession: currentSessionFile,
|
|
143
|
+
withSession: async (replacementCtx) => {
|
|
144
|
+
replacementCtx.ui.setEditorText(editedPrompt);
|
|
145
|
+
replacementCtx.ui.notify("Handoff ready. Submit when ready.", "info");
|
|
146
|
+
},
|
|
141
147
|
});
|
|
142
148
|
|
|
143
149
|
if (newSessionResult.cancelled) {
|
|
144
150
|
ctx.ui.notify("New session cancelled", "info");
|
|
145
|
-
return;
|
|
146
151
|
}
|
|
147
|
-
|
|
148
|
-
// Set the edited prompt in the main editor for submission
|
|
149
|
-
ctx.ui.setEditorText(editedPrompt);
|
|
150
|
-
ctx.ui.notify("Handoff ready. Submit when ready.", "info");
|
|
151
152
|
},
|
|
152
153
|
});
|
|
153
154
|
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -12,9 +12,9 @@
|
|
|
12
12
|
* - Progress tracking widget during execution
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
import type { AgentMessage } from "@eminent337/aery-core";
|
|
16
|
-
import type { AssistantMessage, TextContent } from "@eminent337/aery-ai";
|
|
17
15
|
import type { ExtensionAPI, ExtensionContext } from "@eminent337/aery";
|
|
16
|
+
import type { AssistantMessage, TextContent } from "@eminent337/aery-ai";
|
|
17
|
+
import type { AgentMessage } from "@eminent337/aery-core";
|
|
18
18
|
import { Key } from "@eminent337/aery-tui";
|
|
19
19
|
import { extractTodoItems, isSafeCommand, markCompletedSteps, type TodoItem } from "./utils.js";
|
|
20
20
|
|
|
File without changes
|
|
@@ -40,9 +40,9 @@
|
|
|
40
40
|
|
|
41
41
|
import { existsSync, readFileSync } from "node:fs";
|
|
42
42
|
import { join } from "node:path";
|
|
43
|
-
import type { Api, Model } from "@eminent337/aery-ai";
|
|
44
43
|
import type { ExtensionAPI, ExtensionContext } from "@eminent337/aery";
|
|
45
44
|
import { DynamicBorder, getAgentDir } from "@eminent337/aery";
|
|
45
|
+
import type { Api, Model } from "@eminent337/aery-ai";
|
|
46
46
|
import { Container, Key, type SelectItem, SelectList, Text } from "@eminent337/aery-tui";
|
|
47
47
|
|
|
48
48
|
// Preset configuration
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Prompt Customizer Extension
|
|
3
|
+
*
|
|
4
|
+
* Demonstrates using systemPromptOptions to make informed, context-aware
|
|
5
|
+
* modifications to the system prompt without re-discovering resources.
|
|
6
|
+
*
|
|
7
|
+
* This extension adds tool-specific guidance based on what tools and skills
|
|
8
|
+
* are currently active, respecting whatever the user has configured.
|
|
9
|
+
*
|
|
10
|
+
* Usage:
|
|
11
|
+
* 1. Copy this file to ~/.aery/agent/extensions/ or your project's .pi/extensions/
|
|
12
|
+
* 2. Use the extension — it automatically adapts to your active tools and skills
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import type { BuildSystemPromptOptions, ExtensionAPI } from "@eminent337/aery";
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Adds tool-specific guidance that adapts to the active tool set.
|
|
19
|
+
* Instead of appending one-size-fits-all instructions, this reads what's
|
|
20
|
+
* actually loaded and tailors the guidance accordingly.
|
|
21
|
+
*/
|
|
22
|
+
function addToolGuidance(options: BuildSystemPromptOptions, basePrompt: string): string {
|
|
23
|
+
const hasTool = (name: string) => options.selectedTools?.includes(name) ?? false;
|
|
24
|
+
|
|
25
|
+
const parts: string[] = [];
|
|
26
|
+
|
|
27
|
+
if (hasTool("read")) {
|
|
28
|
+
parts.push(
|
|
29
|
+
"• Use the `read` tool for file contents (supports text and images).",
|
|
30
|
+
" - For large files, use `offset` and `limit` to read in chunks.",
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
if (hasTool("bash")) {
|
|
35
|
+
parts.push("• Execute commands with the `bash` tool. Use it for file operations like `ls`, `find`, `grep`.");
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
if (hasTool("edit")) {
|
|
39
|
+
parts.push(
|
|
40
|
+
"• Use the `edit` tool for precise text replacements in files. Match exact content including whitespace.",
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
if (hasTool("write")) {
|
|
45
|
+
parts.push("• Use the `write` tool to create new files or overwrite existing ones completely.");
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
if (options.skills && options.skills.length > 0) {
|
|
49
|
+
const skillNames = options.skills.map((s) => s.name).join(", ");
|
|
50
|
+
parts.push(`\nAvailable skills: ${skillNames}`, "Use skill documentation for best practices on specific tools.");
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
if (parts.length === 0) {
|
|
54
|
+
return basePrompt;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
return `${basePrompt}
|
|
58
|
+
|
|
59
|
+
## Tool Guidance
|
|
60
|
+
|
|
61
|
+
${parts.join("\n")}
|
|
62
|
+
`;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Merges extension instructions with user-provided append prompts.
|
|
67
|
+
* This respects whatever the user configured via --append-system-prompt
|
|
68
|
+
* flags or files, rather than duplicating that work.
|
|
69
|
+
*/
|
|
70
|
+
function mergeWithUserAppend(options: BuildSystemPromptOptions): string {
|
|
71
|
+
const userAppend = options.appendSystemPrompt;
|
|
72
|
+
const extensionSpecific = `
|
|
73
|
+
## Extension-Added Context
|
|
74
|
+
|
|
75
|
+
This prompt includes tool guidance and skill information loaded dynamically.
|
|
76
|
+
If you have additional requirements, configure them via --append-system-prompt or project context files.
|
|
77
|
+
`;
|
|
78
|
+
|
|
79
|
+
if (userAppend) {
|
|
80
|
+
return `${userAppend}\n\n${extensionSpecific}`;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
return extensionSpecific;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export default function promptCustomizer(pi: ExtensionAPI) {
|
|
87
|
+
pi.on("before_agent_start", async (event) => {
|
|
88
|
+
const { systemPrompt, systemPromptOptions } = event;
|
|
89
|
+
|
|
90
|
+
const customPrompt = addToolGuidance(systemPromptOptions, systemPrompt);
|
|
91
|
+
const appendSection = mergeWithUserAppend(systemPromptOptions);
|
|
92
|
+
|
|
93
|
+
return {
|
|
94
|
+
systemPrompt: `${customPrompt}${appendSection}`,
|
|
95
|
+
};
|
|
96
|
+
});
|
|
97
|
+
}
|
|
File without changes
|
|
File without changes
|
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
* 3. Loads the result into the editor for user to fill in answers
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
import { complete, type UserMessage } from "@eminent337/aery-ai";
|
|
11
10
|
import type { ExtensionAPI } from "@eminent337/aery";
|
|
12
11
|
import { BorderedLoader } from "@eminent337/aery";
|
|
12
|
+
import { complete, type UserMessage } from "@eminent337/aery-ai";
|
|
13
13
|
|
|
14
14
|
const SYSTEM_PROMPT = `You are a question extractor. Given text from a conversation, extract any questions that need answering and format them for the user to fill in.
|
|
15
15
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
import type { ExtensionAPI } from "@eminent337/aery";
|
|
8
8
|
import { Editor, type EditorTheme, Key, matchesKey, Text, truncateToWidth } from "@eminent337/aery-tui";
|
|
9
|
-
import { Type } from "
|
|
9
|
+
import { Type } from "typebox";
|
|
10
10
|
|
|
11
11
|
interface OptionWithDesc {
|
|
12
12
|
label: string;
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
import type { ExtensionAPI } from "@eminent337/aery";
|
|
9
9
|
import { Editor, type EditorTheme, Key, matchesKey, Text, truncateToWidth } from "@eminent337/aery-tui";
|
|
10
|
-
import { Type } from "
|
|
10
|
+
import { Type } from "typebox";
|
|
11
11
|
|
|
12
12
|
// Types
|
|
13
13
|
interface QuestionOption {
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Structured Output Tool
|
|
3
|
+
*
|
|
4
|
+
* Demonstrates `terminate: true` so the agent can end on a tool call
|
|
5
|
+
* without paying for an extra follow-up LLM turn.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import { defineTool, type ExtensionAPI } from "@eminent337/aery";
|
|
9
|
+
import { Text } from "@eminent337/aery-tui";
|
|
10
|
+
import { Type } from "typebox";
|
|
11
|
+
|
|
12
|
+
interface StructuredOutputDetails {
|
|
13
|
+
headline: string;
|
|
14
|
+
summary: string;
|
|
15
|
+
actionItems: string[];
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const structuredOutputTool = defineTool({
|
|
19
|
+
name: "structured_output",
|
|
20
|
+
label: "Structured Output",
|
|
21
|
+
description:
|
|
22
|
+
"Return a final structured answer. Use this as your last action when the user asks for structured output or a machine-readable summary.",
|
|
23
|
+
promptSnippet: "Emit a final structured answer as a terminating tool result",
|
|
24
|
+
promptGuidelines: [
|
|
25
|
+
"Use structured_output as your final action when the user asks for structured output, JSON-like output, or a machine-readable summary.",
|
|
26
|
+
"After calling structured_output, do not emit another assistant response in the same turn.",
|
|
27
|
+
],
|
|
28
|
+
parameters: Type.Object({
|
|
29
|
+
headline: Type.String({ description: "Short title for the result" }),
|
|
30
|
+
summary: Type.String({ description: "One-paragraph summary" }),
|
|
31
|
+
actionItems: Type.Array(Type.String(), { description: "Concrete next steps or key bullets" }),
|
|
32
|
+
}),
|
|
33
|
+
|
|
34
|
+
async execute(_toolCallId, params) {
|
|
35
|
+
return {
|
|
36
|
+
content: [{ type: "text", text: `Saved structured output: ${params.headline}` }],
|
|
37
|
+
details: {
|
|
38
|
+
headline: params.headline,
|
|
39
|
+
summary: params.summary,
|
|
40
|
+
actionItems: params.actionItems,
|
|
41
|
+
} satisfies StructuredOutputDetails,
|
|
42
|
+
terminate: true,
|
|
43
|
+
};
|
|
44
|
+
},
|
|
45
|
+
|
|
46
|
+
renderResult(result, _options, theme) {
|
|
47
|
+
const details = result.details as StructuredOutputDetails | undefined;
|
|
48
|
+
if (!details) {
|
|
49
|
+
const text = result.content[0];
|
|
50
|
+
return new Text(text?.type === "text" ? text.text : "", 0, 0);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
const lines = [
|
|
54
|
+
theme.fg("toolTitle", theme.bold(details.headline)),
|
|
55
|
+
theme.fg("text", details.summary),
|
|
56
|
+
"",
|
|
57
|
+
...details.actionItems.map((item, index) => theme.fg("muted", `${index + 1}. ${item}`)),
|
|
58
|
+
];
|
|
59
|
+
return new Text(lines.join("\n"), 0, 0);
|
|
60
|
+
},
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
export default function (pi: ExtensionAPI) {
|
|
64
|
+
pi.registerTool(structuredOutputTool);
|
|
65
|
+
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -16,12 +16,12 @@ import { spawn } from "node:child_process";
|
|
|
16
16
|
import * as fs from "node:fs";
|
|
17
17
|
import * as os from "node:os";
|
|
18
18
|
import * as path from "node:path";
|
|
19
|
-
import type
|
|
19
|
+
import { type ExtensionAPI, getMarkdownTheme, withFileMutationQueue } from "@eminent337/aery";
|
|
20
20
|
import type { Message } from "@eminent337/aery-ai";
|
|
21
21
|
import { StringEnum } from "@eminent337/aery-ai";
|
|
22
|
-
import
|
|
22
|
+
import type { AgentToolResult } from "@eminent337/aery-core";
|
|
23
23
|
import { Container, Markdown, Spacer, Text } from "@eminent337/aery-tui";
|
|
24
|
-
import { Type } from "
|
|
24
|
+
import { Type } from "typebox";
|
|
25
25
|
import { type AgentConfig, type AgentScope, discoverAgents } from "./agents.js";
|
|
26
26
|
|
|
27
27
|
const MAX_PARALLEL_TASKS = 8;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { complete, getModel } from "@eminent337/aery-ai";
|
|
2
1
|
import type { ExtensionAPI, ExtensionCommandContext } from "@eminent337/aery";
|
|
3
2
|
import { DynamicBorder, getMarkdownTheme } from "@eminent337/aery";
|
|
3
|
+
import { complete, getModel } from "@eminent337/aery-ai";
|
|
4
4
|
import { Container, Markdown, matchesKey, Text } from "@eminent337/aery-tui";
|
|
5
5
|
|
|
6
6
|
type ContentBlock = {
|
|
File without changes
|
|
@@ -17,10 +17,10 @@
|
|
|
17
17
|
* separate variables. Only the agent cursor is ever exposed to the agent.
|
|
18
18
|
*/
|
|
19
19
|
|
|
20
|
-
import { StringEnum } from "@eminent337/aery-ai";
|
|
21
20
|
import type { ExtensionAPI, ExtensionContext, Theme, ToolExecutionMode } from "@eminent337/aery";
|
|
21
|
+
import { StringEnum } from "@eminent337/aery-ai";
|
|
22
22
|
import { type Component, matchesKey, Text, truncateToWidth, visibleWidth } from "@eminent337/aery-tui";
|
|
23
|
-
import { Type } from "
|
|
23
|
+
import { Type } from "typebox";
|
|
24
24
|
|
|
25
25
|
// Thrown from the tool on illegal actions. The agent runtime surfaces thrown
|
|
26
26
|
// errors as tool errors (isError=true) without resetting any of our state.
|
|
File without changes
|
|
File without changes
|
|
@@ -10,10 +10,10 @@
|
|
|
10
10
|
* correct for that point in history.
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
import { StringEnum } from "@eminent337/aery-ai";
|
|
14
13
|
import type { ExtensionAPI, ExtensionContext, Theme } from "@eminent337/aery";
|
|
14
|
+
import { StringEnum } from "@eminent337/aery-ai";
|
|
15
15
|
import { matchesKey, Text, truncateToWidth } from "@eminent337/aery-tui";
|
|
16
|
-
import { Type } from "
|
|
16
|
+
import { Type } from "typebox";
|
|
17
17
|
|
|
18
18
|
interface Todo {
|
|
19
19
|
id: number;
|
|
@@ -20,12 +20,12 @@
|
|
|
20
20
|
* pi -e ./tool-override.ts
|
|
21
21
|
*/
|
|
22
22
|
|
|
23
|
-
import type { TextContent } from "@eminent337/aery-ai";
|
|
24
23
|
import { type ExtensionAPI, getAgentDir, withFileMutationQueue } from "@eminent337/aery";
|
|
25
|
-
import {
|
|
24
|
+
import type { TextContent } from "@eminent337/aery-ai";
|
|
26
25
|
import { constants, readFileSync } from "fs";
|
|
27
26
|
import { access, appendFile, readFile } from "fs/promises";
|
|
28
27
|
import { join, resolve } from "path";
|
|
28
|
+
import { Type } from "typebox";
|
|
29
29
|
|
|
30
30
|
const LOG_FILE = join(getAgentDir(), "read-access.log");
|
|
31
31
|
|
|
File without changes
|
|
File without changes
|