orient-cli 0.3.0 → 0.3.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/dist/integrations/notebooklm/notebooklm-extension.js +3 -8
- package/dist/integrations/notebooklm/notebooklm-extension.js.map +1 -1
- package/dist/integrations/playwright/playwright-extension.js +4 -14
- package/dist/integrations/playwright/playwright-extension.js.map +1 -1
- package/dist/integrations/web-search/bridge.js +12 -23
- package/dist/integrations/web-search/bridge.js.map +1 -1
- package/dist/integrations/web-search/web-search-extension.js +0 -3
- package/dist/integrations/web-search/web-search-extension.js.map +1 -1
- package/dist/orient/orient-extension.js +6 -14
- package/dist/orient/orient-extension.js.map +1 -1
- package/package.json +3 -10
- package/scripts/postinstall.mjs +40 -1
- package/vendor/@orient-cli/coding-agent/dist/bun/cli.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/bun/cli.js.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/bun/register-bedrock.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/cli/args.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/cli/args.js.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/cli/config-selector.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/cli/config-selector.js.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/cli/file-processor.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/cli/file-processor.js.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/cli/initial-message.d.ts +18 -0
- package/vendor/@orient-cli/coding-agent/dist/cli/initial-message.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/cli/initial-message.js.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/cli/list-models.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/cli/list-models.js.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/cli/session-picker.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/cli/session-picker.js.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/cli.d.ts.map +1 -0
- package/{node_modules → vendor}/@orient-cli/coding-agent/dist/cli.js +0 -0
- package/vendor/@orient-cli/coding-agent/dist/cli.js.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/config.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/config.js +251 -0
- package/vendor/@orient-cli/coding-agent/dist/config.js.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/core/agent-session-runtime.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/core/agent-session-runtime.js +231 -0
- package/vendor/@orient-cli/coding-agent/dist/core/agent-session-runtime.js.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/core/agent-session-services.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/core/agent-session-services.js.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/core/agent-session.d.ts +617 -0
- package/vendor/@orient-cli/coding-agent/dist/core/agent-session.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/core/agent-session.js +2477 -0
- package/vendor/@orient-cli/coding-agent/dist/core/agent-session.js.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/core/auth-storage.d.ts +136 -0
- package/vendor/@orient-cli/coding-agent/dist/core/auth-storage.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/core/auth-storage.js +418 -0
- package/vendor/@orient-cli/coding-agent/dist/core/auth-storage.js.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/core/bash-executor.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/core/bash-executor.js.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/core/compaction/branch-summarization.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/core/compaction/branch-summarization.js.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/core/compaction/compaction.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/core/compaction/compaction.js.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/core/compaction/index.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/core/compaction/utils.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/core/compaction/utils.js.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/core/defaults.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/core/diagnostics.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/core/event-bus.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/core/event-bus.js.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/core/exec.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/core/exec.js.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/core/export-html/ansi-to-html.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/core/export-html/ansi-to-html.js.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/core/export-html/index.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/core/export-html/index.js.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/core/export-html/tool-renderer.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/core/export-html/tool-renderer.js.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/core/extensions/index.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/core/extensions/loader.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/core/extensions/loader.js.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/core/extensions/runner.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/core/extensions/runner.js +695 -0
- package/vendor/@orient-cli/coding-agent/dist/core/extensions/runner.js.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/core/extensions/types.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/core/extensions/types.js.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/core/extensions/wrapper.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/core/extensions/wrapper.js.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/core/footer-data-provider.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/core/footer-data-provider.js +313 -0
- package/vendor/@orient-cli/coding-agent/dist/core/footer-data-provider.js.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/core/index.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/core/keybindings.d.ts +293 -0
- package/vendor/@orient-cli/coding-agent/dist/core/keybindings.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/core/keybindings.js +247 -0
- package/vendor/@orient-cli/coding-agent/dist/core/keybindings.js.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/core/messages.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/core/messages.js.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/core/model-registry.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/core/model-registry.js +612 -0
- package/vendor/@orient-cli/coding-agent/dist/core/model-registry.js.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/core/model-resolver.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/core/model-resolver.js.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/core/output-guard.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/core/output-guard.js.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/core/package-manager.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/core/package-manager.js +1823 -0
- package/vendor/@orient-cli/coding-agent/dist/core/package-manager.js.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/core/prompt-templates.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/core/prompt-templates.js.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/core/resolve-config-value.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/core/resolve-config-value.js.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/core/resource-loader.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/core/resource-loader.js +681 -0
- package/vendor/@orient-cli/coding-agent/dist/core/resource-loader.js.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/core/sdk.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/core/sdk.js.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/core/session-cwd.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/core/session-cwd.js +37 -0
- package/vendor/@orient-cli/coding-agent/dist/core/session-cwd.js.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/core/session-manager.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/core/session-manager.js +1101 -0
- package/vendor/@orient-cli/coding-agent/dist/core/session-manager.js.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/core/settings-manager.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/core/settings-manager.js +699 -0
- package/vendor/@orient-cli/coding-agent/dist/core/settings-manager.js.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/core/skills.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/core/skills.js.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/core/slash-commands.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/core/source-info.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/core/source-info.js.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/core/system-prompt.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/core/system-prompt.js.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/core/timings.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/core/timings.js.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/core/tools/bash.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/core/tools/bash.js +355 -0
- package/vendor/@orient-cli/coding-agent/dist/core/tools/bash.js.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/core/tools/edit-diff.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/core/tools/edit-diff.js.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/core/tools/edit.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/core/tools/edit.js.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/core/tools/file-mutation-queue.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/core/tools/file-mutation-queue.js.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/core/tools/find.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/core/tools/find.js.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/core/tools/grep.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/core/tools/grep.js.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/core/tools/index.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/core/tools/index.js.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/core/tools/ls.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/core/tools/ls.js.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/core/tools/path-utils.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/core/tools/path-utils.js.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/core/tools/read.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/core/tools/read.js.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/core/tools/render-utils.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/core/tools/render-utils.js.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/core/tools/tool-definition-wrapper.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/core/tools/tool-definition-wrapper.js.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/core/tools/truncate.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/core/tools/truncate.js.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/core/tools/write.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/core/tools/write.js +215 -0
- package/vendor/@orient-cli/coding-agent/dist/core/tools/write.js.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/index.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/main.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/main.js.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/migrations.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/migrations.js.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/modes/index.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/modes/interactive/components/assistant-message.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/modes/interactive/components/assistant-message.js +102 -0
- package/vendor/@orient-cli/coding-agent/dist/modes/interactive/components/assistant-message.js.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/modes/interactive/components/bash-execution.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/modes/interactive/components/bash-execution.js +170 -0
- package/vendor/@orient-cli/coding-agent/dist/modes/interactive/components/bash-execution.js.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/modes/interactive/components/bordered-loader.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/modes/interactive/components/bordered-loader.js +48 -0
- package/vendor/@orient-cli/coding-agent/dist/modes/interactive/components/bordered-loader.js.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/modes/interactive/components/branch-summary-message.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/modes/interactive/components/branch-summary-message.js +42 -0
- package/vendor/@orient-cli/coding-agent/dist/modes/interactive/components/branch-summary-message.js.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/modes/interactive/components/compaction-summary-message.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/modes/interactive/components/compaction-summary-message.js +43 -0
- package/vendor/@orient-cli/coding-agent/dist/modes/interactive/components/compaction-summary-message.js.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/modes/interactive/components/config-selector.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/modes/interactive/components/config-selector.js +470 -0
- package/vendor/@orient-cli/coding-agent/dist/modes/interactive/components/config-selector.js.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/modes/interactive/components/countdown-timer.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/modes/interactive/components/countdown-timer.js +28 -0
- package/vendor/@orient-cli/coding-agent/dist/modes/interactive/components/countdown-timer.js.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/modes/interactive/components/custom-editor.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/modes/interactive/components/custom-editor.js +63 -0
- package/vendor/@orient-cli/coding-agent/dist/modes/interactive/components/custom-editor.js.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/modes/interactive/components/custom-message.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/modes/interactive/components/custom-message.js +74 -0
- package/vendor/@orient-cli/coding-agent/dist/modes/interactive/components/custom-message.js.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/modes/interactive/components/diff.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/modes/interactive/components/diff.js.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/modes/interactive/components/dynamic-border.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/modes/interactive/components/dynamic-border.js +20 -0
- package/vendor/@orient-cli/coding-agent/dist/modes/interactive/components/dynamic-border.js.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/modes/interactive/components/extension-editor.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/modes/interactive/components/extension-editor.js +106 -0
- package/vendor/@orient-cli/coding-agent/dist/modes/interactive/components/extension-editor.js.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/modes/interactive/components/extension-input.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/modes/interactive/components/extension-input.js +55 -0
- package/vendor/@orient-cli/coding-agent/dist/modes/interactive/components/extension-input.js.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/modes/interactive/components/extension-selector.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/modes/interactive/components/extension-selector.js +71 -0
- package/vendor/@orient-cli/coding-agent/dist/modes/interactive/components/extension-selector.js.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/modes/interactive/components/footer.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/modes/interactive/components/footer.js +199 -0
- package/vendor/@orient-cli/coding-agent/dist/modes/interactive/components/footer.js.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/modes/interactive/components/index.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/modes/interactive/components/index.js.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/modes/interactive/components/keybinding-hints.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/modes/interactive/components/keybinding-hints.js.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/modes/interactive/components/login-dialog.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/modes/interactive/components/login-dialog.js +139 -0
- package/vendor/@orient-cli/coding-agent/dist/modes/interactive/components/login-dialog.js.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/modes/interactive/components/model-selector.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/modes/interactive/components/model-selector.js +263 -0
- package/vendor/@orient-cli/coding-agent/dist/modes/interactive/components/model-selector.js.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/modes/interactive/components/oauth-selector.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/modes/interactive/components/oauth-selector.js +92 -0
- package/vendor/@orient-cli/coding-agent/dist/modes/interactive/components/oauth-selector.js.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/modes/interactive/components/orient-banner.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/modes/interactive/components/orient-banner.js.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/modes/interactive/components/scoped-models-selector.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/modes/interactive/components/scoped-models-selector.js +271 -0
- package/vendor/@orient-cli/coding-agent/dist/modes/interactive/components/scoped-models-selector.js.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/modes/interactive/components/session-selector-search.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/modes/interactive/components/session-selector-search.js.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/modes/interactive/components/session-selector.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/modes/interactive/components/session-selector.js +823 -0
- package/vendor/@orient-cli/coding-agent/dist/modes/interactive/components/session-selector.js.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/modes/interactive/components/settings-selector.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/modes/interactive/components/settings-selector.js +299 -0
- package/vendor/@orient-cli/coding-agent/dist/modes/interactive/components/settings-selector.js.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/modes/interactive/components/show-images-selector.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/modes/interactive/components/show-images-selector.js +38 -0
- package/vendor/@orient-cli/coding-agent/dist/modes/interactive/components/show-images-selector.js.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/modes/interactive/components/skill-invocation-message.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/modes/interactive/components/skill-invocation-message.js +45 -0
- package/vendor/@orient-cli/coding-agent/dist/modes/interactive/components/skill-invocation-message.js.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/modes/interactive/components/theme-selector.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/modes/interactive/components/theme-selector.js +48 -0
- package/vendor/@orient-cli/coding-agent/dist/modes/interactive/components/theme-selector.js.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/modes/interactive/components/thinking-selector.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/modes/interactive/components/thinking-selector.js +50 -0
- package/vendor/@orient-cli/coding-agent/dist/modes/interactive/components/thinking-selector.js.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/modes/interactive/components/tool-execution.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/modes/interactive/components/tool-execution.js +261 -0
- package/vendor/@orient-cli/coding-agent/dist/modes/interactive/components/tool-execution.js.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/modes/interactive/components/tree-selector.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/modes/interactive/components/tree-selector.js +1070 -0
- package/vendor/@orient-cli/coding-agent/dist/modes/interactive/components/tree-selector.js.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/modes/interactive/components/user-message-selector.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/modes/interactive/components/user-message-selector.js +110 -0
- package/vendor/@orient-cli/coding-agent/dist/modes/interactive/components/user-message-selector.js.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/modes/interactive/components/user-message.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/modes/interactive/components/user-message.js.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/modes/interactive/components/visual-truncate.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/modes/interactive/components/visual-truncate.js.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/modes/interactive/interactive-mode.d.ts +359 -0
- package/vendor/@orient-cli/coding-agent/dist/modes/interactive/interactive-mode.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/modes/interactive/interactive-mode.js +4081 -0
- package/vendor/@orient-cli/coding-agent/dist/modes/interactive/interactive-mode.js.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/modes/interactive/theme/theme.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/modes/interactive/theme/theme.js +973 -0
- package/vendor/@orient-cli/coding-agent/dist/modes/interactive/theme/theme.js.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/modes/print-mode.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/modes/print-mode.js.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/modes/rpc/jsonl.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/modes/rpc/jsonl.js.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/modes/rpc/rpc-client.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/modes/rpc/rpc-client.js +401 -0
- package/vendor/@orient-cli/coding-agent/dist/modes/rpc/rpc-client.js.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/modes/rpc/rpc-mode.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/modes/rpc/rpc-mode.js.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/modes/rpc/rpc-types.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/package-manager-cli.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/package-manager-cli.js.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/utils/changelog.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/utils/changelog.js.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/utils/child-process.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/utils/child-process.js.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/utils/clipboard-image.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/utils/clipboard-image.js.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/utils/clipboard-native.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/utils/clipboard-native.js.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/utils/clipboard.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/utils/clipboard.js.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/utils/exif-orientation.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/utils/exif-orientation.js.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/utils/frontmatter.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/utils/frontmatter.js.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/utils/git.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/utils/git.js.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/utils/image-convert.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/utils/image-convert.js.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/utils/image-resize.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/utils/image-resize.js.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/utils/mime.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/utils/mime.js.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/utils/paths.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/utils/paths.js.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/utils/photon.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/utils/photon.js.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/utils/shell.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/utils/shell.js.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/utils/sleep.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/utils/sleep.js.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/utils/tools-manager.d.ts.map +1 -0
- package/vendor/@orient-cli/coding-agent/dist/utils/tools-manager.js.map +1 -0
- package/node_modules/@orient-cli/agent-core/README.md +0 -456
- package/node_modules/@orient-cli/ai/README.md +0 -1315
- package/node_modules/@orient-cli/coding-agent/README.md +0 -618
- package/node_modules/@orient-cli/coding-agent/dist/bun/cli.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/bun/cli.js.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/bun/register-bedrock.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/cli/args.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/cli/args.js.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/cli/config-selector.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/cli/config-selector.js.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/cli/file-processor.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/cli/file-processor.js.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/cli/initial-message.d.ts +0 -18
- package/node_modules/@orient-cli/coding-agent/dist/cli/initial-message.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/cli/initial-message.js.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/cli/list-models.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/cli/list-models.js.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/cli/session-picker.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/cli/session-picker.js.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/cli.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/cli.js.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/config.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/config.js +0 -229
- package/node_modules/@orient-cli/coding-agent/dist/config.js.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/core/agent-session-runtime.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/core/agent-session-runtime.js +0 -236
- package/node_modules/@orient-cli/coding-agent/dist/core/agent-session-runtime.js.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/core/agent-session-services.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/core/agent-session-services.js.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/core/agent-session.d.ts +0 -585
- package/node_modules/@orient-cli/coding-agent/dist/core/agent-session.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/core/agent-session.js +0 -2497
- package/node_modules/@orient-cli/coding-agent/dist/core/agent-session.js.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/core/auth-storage.d.ts +0 -132
- package/node_modules/@orient-cli/coding-agent/dist/core/auth-storage.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/core/auth-storage.js +0 -422
- package/node_modules/@orient-cli/coding-agent/dist/core/auth-storage.js.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/core/bash-executor.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/core/bash-executor.js.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/core/compaction/branch-summarization.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/core/compaction/branch-summarization.js.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/core/compaction/compaction.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/core/compaction/compaction.js.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/core/compaction/index.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/core/compaction/utils.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/core/compaction/utils.js.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/core/defaults.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/core/diagnostics.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/core/event-bus.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/core/event-bus.js.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/core/exec.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/core/exec.js.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/core/export-html/ansi-to-html.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/core/export-html/ansi-to-html.js.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/core/export-html/index.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/core/export-html/index.js.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/core/export-html/template.css +0 -1001
- package/node_modules/@orient-cli/coding-agent/dist/core/export-html/template.html +0 -55
- package/node_modules/@orient-cli/coding-agent/dist/core/export-html/template.js +0 -1690
- package/node_modules/@orient-cli/coding-agent/dist/core/export-html/tool-renderer.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/core/export-html/tool-renderer.js.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/core/export-html/vendor/highlight.min.js +0 -1213
- package/node_modules/@orient-cli/coding-agent/dist/core/export-html/vendor/marked.min.js +0 -6
- package/node_modules/@orient-cli/coding-agent/dist/core/extensions/index.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/core/extensions/loader.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/core/extensions/loader.js.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/core/extensions/runner.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/core/extensions/runner.js +0 -701
- package/node_modules/@orient-cli/coding-agent/dist/core/extensions/runner.js.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/core/extensions/types.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/core/extensions/types.js.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/core/extensions/wrapper.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/core/extensions/wrapper.js.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/core/footer-data-provider.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/core/footer-data-provider.js +0 -314
- package/node_modules/@orient-cli/coding-agent/dist/core/footer-data-provider.js.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/core/index.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/core/keybindings.d.ts +0 -293
- package/node_modules/@orient-cli/coding-agent/dist/core/keybindings.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/core/keybindings.js +0 -248
- package/node_modules/@orient-cli/coding-agent/dist/core/keybindings.js.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/core/messages.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/core/messages.js.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/core/model-registry.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/core/model-registry.js +0 -612
- package/node_modules/@orient-cli/coding-agent/dist/core/model-registry.js.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/core/model-resolver.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/core/model-resolver.js.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/core/output-guard.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/core/output-guard.js.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/core/package-manager.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/core/package-manager.js +0 -1829
- package/node_modules/@orient-cli/coding-agent/dist/core/package-manager.js.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/core/prompt-templates.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/core/prompt-templates.js.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/core/resolve-config-value.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/core/resolve-config-value.js.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/core/resource-loader.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/core/resource-loader.js +0 -720
- package/node_modules/@orient-cli/coding-agent/dist/core/resource-loader.js.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/core/sdk.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/core/sdk.js.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/core/session-cwd.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/core/session-cwd.js +0 -38
- package/node_modules/@orient-cli/coding-agent/dist/core/session-cwd.js.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/core/session-manager.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/core/session-manager.js +0 -1105
- package/node_modules/@orient-cli/coding-agent/dist/core/session-manager.js.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/core/settings-manager.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/core/settings-manager.js +0 -708
- package/node_modules/@orient-cli/coding-agent/dist/core/settings-manager.js.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/core/skills.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/core/skills.js.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/core/slash-commands.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/core/source-info.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/core/source-info.js.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/core/system-prompt.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/core/system-prompt.js.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/core/timings.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/core/timings.js.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/bash.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/bash.js +0 -352
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/bash.js.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/edit-diff.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/edit-diff.js.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/edit.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/edit.js.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/file-mutation-queue.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/file-mutation-queue.js.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/find.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/find.js.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/grep.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/grep.js.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/index.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/index.js.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/ls.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/ls.js.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/path-utils.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/path-utils.js.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/read.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/read.js.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/render-utils.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/render-utils.js.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/tool-definition-wrapper.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/tool-definition-wrapper.js.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/truncate.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/truncate.js.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/write.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/write.js +0 -216
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/write.js.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/index.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/main.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/main.js.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/migrations.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/migrations.js.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/modes/index.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/assistant-message.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/assistant-message.js +0 -107
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/assistant-message.js.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/bash-execution.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/bash-execution.js +0 -175
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/bash-execution.js.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/bordered-loader.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/bordered-loader.js +0 -51
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/bordered-loader.js.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/branch-summary-message.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/branch-summary-message.js +0 -44
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/branch-summary-message.js.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/compaction-summary-message.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/compaction-summary-message.js +0 -45
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/compaction-summary-message.js.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/config-selector.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/config-selector.js +0 -479
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/config-selector.js.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/countdown-timer.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/countdown-timer.js +0 -33
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/countdown-timer.js.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/custom-editor.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/custom-editor.js +0 -70
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/custom-editor.js.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/custom-message.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/custom-message.js +0 -79
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/custom-message.js.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/diff.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/diff.js.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/dynamic-border.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/dynamic-border.js +0 -21
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/dynamic-border.js.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/extension-editor.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/extension-editor.js +0 -111
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/extension-editor.js.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/extension-input.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/extension-input.js +0 -61
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/extension-input.js.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/extension-selector.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/extension-selector.js +0 -78
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/extension-selector.js.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/footer.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/footer.js +0 -201
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/footer.js.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/index.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/index.js.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/keybinding-hints.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/keybinding-hints.js.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/login-dialog.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/login-dialog.js +0 -145
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/login-dialog.js.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/model-selector.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/model-selector.js +0 -275
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/model-selector.js.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/oauth-selector.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/oauth-selector.js +0 -97
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/oauth-selector.js.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/orient-banner.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/orient-banner.js.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/scoped-models-selector.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/scoped-models-selector.js +0 -275
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/scoped-models-selector.js.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/session-selector-search.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/session-selector-search.js.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/session-selector.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/session-selector.js +0 -848
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/session-selector.js.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/settings-selector.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/settings-selector.js +0 -301
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/settings-selector.js.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/show-images-selector.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/show-images-selector.js +0 -39
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/show-images-selector.js.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/skill-invocation-message.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/skill-invocation-message.js +0 -47
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/skill-invocation-message.js.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/theme-selector.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/theme-selector.js +0 -50
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/theme-selector.js.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/thinking-selector.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/thinking-selector.js +0 -51
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/thinking-selector.js.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/tool-execution.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/tool-execution.js +0 -274
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/tool-execution.js.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/tree-selector.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/tree-selector.js +0 -1084
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/tree-selector.js.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/user-message-selector.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/user-message-selector.js +0 -113
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/user-message-selector.js.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/user-message.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/user-message.js.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/visual-truncate.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/visual-truncate.js.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/interactive-mode.d.ts +0 -345
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/interactive-mode.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/interactive-mode.js +0 -4106
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/interactive-mode.js.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/theme/dark.json +0 -85
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/theme/light.json +0 -84
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/theme/theme-schema.json +0 -335
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/theme/theme.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/theme/theme.js +0 -979
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/theme/theme.js.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/modes/print-mode.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/modes/print-mode.js.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/modes/rpc/jsonl.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/modes/rpc/jsonl.js.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/modes/rpc/rpc-client.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/modes/rpc/rpc-client.js +0 -402
- package/node_modules/@orient-cli/coding-agent/dist/modes/rpc/rpc-client.js.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/modes/rpc/rpc-mode.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/modes/rpc/rpc-mode.js.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/modes/rpc/rpc-types.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/package-manager-cli.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/package-manager-cli.js.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/utils/changelog.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/utils/changelog.js.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/utils/child-process.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/utils/child-process.js.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/utils/clipboard-image.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/utils/clipboard-image.js.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/utils/clipboard-native.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/utils/clipboard-native.js.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/utils/clipboard.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/utils/clipboard.js.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/utils/exif-orientation.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/utils/exif-orientation.js.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/utils/frontmatter.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/utils/frontmatter.js.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/utils/git.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/utils/git.js.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/utils/image-convert.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/utils/image-convert.js.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/utils/image-resize.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/utils/image-resize.js.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/utils/mime.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/utils/mime.js.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/utils/paths.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/utils/paths.js.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/utils/photon.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/utils/photon.js.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/utils/shell.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/utils/shell.js.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/utils/sleep.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/utils/sleep.js.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/utils/tools-manager.d.ts.map +0 -1
- package/node_modules/@orient-cli/coding-agent/dist/utils/tools-manager.js.map +0 -1
- package/node_modules/@orient-cli/tui/README.md +0 -767
- package/node_modules/mime-db/HISTORY.md +0 -541
- package/node_modules/mime-db/LICENSE +0 -23
- package/node_modules/mime-db/README.md +0 -109
- package/node_modules/mime-db/db.json +0 -9342
- package/node_modules/mime-db/index.js +0 -12
- package/node_modules/mime-db/package.json +0 -56
- package/node_modules/mime-types/HISTORY.md +0 -428
- package/node_modules/mime-types/LICENSE +0 -23
- package/node_modules/mime-types/README.md +0 -126
- package/node_modules/mime-types/index.js +0 -211
- package/node_modules/mime-types/mimeScore.js +0 -57
- package/node_modules/mime-types/package.json +0 -49
- /package/{node_modules → vendor}/@orient-cli/agent-core/dist/agent-loop.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/agent-core/dist/agent-loop.d.ts.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/agent-core/dist/agent-loop.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/agent-core/dist/agent-loop.js.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/agent-core/dist/agent.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/agent-core/dist/agent.d.ts.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/agent-core/dist/agent.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/agent-core/dist/agent.js.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/agent-core/dist/index.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/agent-core/dist/index.d.ts.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/agent-core/dist/index.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/agent-core/dist/index.js.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/agent-core/dist/proxy.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/agent-core/dist/proxy.d.ts.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/agent-core/dist/proxy.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/agent-core/dist/proxy.js.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/agent-core/dist/types.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/agent-core/dist/types.d.ts.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/agent-core/dist/types.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/agent-core/dist/types.js.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/agent-core/package.json +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/api-registry.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/api-registry.d.ts.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/api-registry.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/api-registry.js.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/bedrock-provider.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/bedrock-provider.d.ts.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/bedrock-provider.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/bedrock-provider.js.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/cli.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/cli.d.ts.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/cli.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/cli.js.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/env-api-keys.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/env-api-keys.d.ts.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/env-api-keys.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/env-api-keys.js.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/index.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/index.d.ts.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/index.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/index.js.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/models.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/models.d.ts.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/models.generated.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/models.generated.d.ts.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/models.generated.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/models.generated.js.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/models.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/models.js.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/oauth.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/oauth.d.ts.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/oauth.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/oauth.js.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/providers/amazon-bedrock.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/providers/amazon-bedrock.d.ts.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/providers/amazon-bedrock.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/providers/amazon-bedrock.js.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/providers/anthropic.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/providers/anthropic.d.ts.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/providers/anthropic.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/providers/anthropic.js.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/providers/azure-openai-responses.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/providers/azure-openai-responses.d.ts.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/providers/azure-openai-responses.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/providers/azure-openai-responses.js.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/providers/faux.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/providers/faux.d.ts.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/providers/faux.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/providers/faux.js.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/providers/github-copilot-headers.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/providers/github-copilot-headers.d.ts.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/providers/github-copilot-headers.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/providers/github-copilot-headers.js.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/providers/google-gemini-cli.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/providers/google-gemini-cli.d.ts.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/providers/google-gemini-cli.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/providers/google-gemini-cli.js.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/providers/google-shared.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/providers/google-shared.d.ts.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/providers/google-shared.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/providers/google-shared.js.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/providers/google-vertex.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/providers/google-vertex.d.ts.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/providers/google-vertex.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/providers/google-vertex.js.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/providers/google.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/providers/google.d.ts.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/providers/google.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/providers/google.js.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/providers/mistral.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/providers/mistral.d.ts.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/providers/mistral.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/providers/mistral.js.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/providers/openai-codex-responses.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/providers/openai-codex-responses.d.ts.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/providers/openai-codex-responses.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/providers/openai-codex-responses.js.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/providers/openai-completions.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/providers/openai-completions.d.ts.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/providers/openai-completions.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/providers/openai-completions.js.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/providers/openai-responses-shared.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/providers/openai-responses-shared.d.ts.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/providers/openai-responses-shared.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/providers/openai-responses-shared.js.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/providers/openai-responses.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/providers/openai-responses.d.ts.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/providers/openai-responses.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/providers/openai-responses.js.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/providers/register-builtins.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/providers/register-builtins.d.ts.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/providers/register-builtins.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/providers/register-builtins.js.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/providers/simple-options.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/providers/simple-options.d.ts.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/providers/simple-options.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/providers/simple-options.js.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/providers/transform-messages.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/providers/transform-messages.d.ts.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/providers/transform-messages.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/providers/transform-messages.js.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/stream.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/stream.d.ts.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/stream.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/stream.js.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/types.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/types.d.ts.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/types.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/types.js.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/utils/event-stream.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/utils/event-stream.d.ts.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/utils/event-stream.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/utils/event-stream.js.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/utils/hash.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/utils/hash.d.ts.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/utils/hash.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/utils/hash.js.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/utils/json-parse.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/utils/json-parse.d.ts.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/utils/json-parse.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/utils/json-parse.js.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/utils/oauth/anthropic.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/utils/oauth/anthropic.d.ts.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/utils/oauth/anthropic.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/utils/oauth/anthropic.js.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/utils/oauth/github-copilot.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/utils/oauth/github-copilot.d.ts.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/utils/oauth/github-copilot.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/utils/oauth/github-copilot.js.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/utils/oauth/google-antigravity.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/utils/oauth/google-antigravity.d.ts.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/utils/oauth/google-antigravity.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/utils/oauth/google-antigravity.js.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/utils/oauth/google-gemini-cli.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/utils/oauth/google-gemini-cli.d.ts.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/utils/oauth/google-gemini-cli.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/utils/oauth/google-gemini-cli.js.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/utils/oauth/index.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/utils/oauth/index.d.ts.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/utils/oauth/index.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/utils/oauth/index.js.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/utils/oauth/oauth-page.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/utils/oauth/oauth-page.d.ts.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/utils/oauth/oauth-page.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/utils/oauth/oauth-page.js.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/utils/oauth/openai-codex.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/utils/oauth/openai-codex.d.ts.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/utils/oauth/openai-codex.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/utils/oauth/openai-codex.js.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/utils/oauth/pkce.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/utils/oauth/pkce.d.ts.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/utils/oauth/pkce.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/utils/oauth/pkce.js.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/utils/oauth/types.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/utils/oauth/types.d.ts.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/utils/oauth/types.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/utils/oauth/types.js.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/utils/overflow.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/utils/overflow.d.ts.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/utils/overflow.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/utils/overflow.js.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/utils/sanitize-unicode.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/utils/sanitize-unicode.d.ts.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/utils/sanitize-unicode.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/utils/sanitize-unicode.js.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/utils/typebox-helpers.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/utils/typebox-helpers.d.ts.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/utils/typebox-helpers.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/utils/typebox-helpers.js.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/utils/validation.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/utils/validation.d.ts.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/utils/validation.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/dist/utils/validation.js.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/ai/package.json +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/bun/cli.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/bun/cli.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/bun/register-bedrock.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/bun/register-bedrock.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/bun/register-bedrock.js.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/cli/args.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/cli/args.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/cli/config-selector.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/cli/config-selector.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/cli/file-processor.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/cli/file-processor.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/cli/initial-message.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/cli/list-models.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/cli/list-models.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/cli/session-picker.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/cli/session-picker.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/cli.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/config.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/core/agent-session-runtime.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/core/agent-session-services.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/core/agent-session-services.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/core/bash-executor.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/core/bash-executor.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/core/compaction/branch-summarization.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/core/compaction/branch-summarization.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/core/compaction/compaction.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/core/compaction/compaction.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/core/compaction/index.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/core/compaction/index.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/core/compaction/index.js.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/core/compaction/utils.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/core/compaction/utils.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/core/defaults.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/core/defaults.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/core/defaults.js.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/core/diagnostics.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/core/diagnostics.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/core/diagnostics.js.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/core/event-bus.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/core/event-bus.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/core/exec.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/core/exec.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/core/export-html/ansi-to-html.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/core/export-html/ansi-to-html.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/core/export-html/index.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/core/export-html/index.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/core/export-html/tool-renderer.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/core/export-html/tool-renderer.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/core/extensions/index.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/core/extensions/index.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/core/extensions/index.js.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/core/extensions/loader.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/core/extensions/loader.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/core/extensions/runner.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/core/extensions/types.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/core/extensions/types.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/core/extensions/wrapper.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/core/extensions/wrapper.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/core/footer-data-provider.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/core/index.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/core/index.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/core/index.js.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/core/messages.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/core/messages.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/core/model-registry.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/core/model-resolver.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/core/model-resolver.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/core/output-guard.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/core/output-guard.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/core/package-manager.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/core/prompt-templates.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/core/prompt-templates.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/core/resolve-config-value.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/core/resolve-config-value.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/core/resource-loader.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/core/sdk.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/core/sdk.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/core/session-cwd.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/core/session-manager.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/core/settings-manager.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/core/skills.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/core/skills.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/core/slash-commands.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/core/slash-commands.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/core/slash-commands.js.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/core/source-info.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/core/source-info.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/core/system-prompt.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/core/system-prompt.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/core/timings.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/core/timings.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/core/tools/bash.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/core/tools/edit-diff.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/core/tools/edit-diff.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/core/tools/edit.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/core/tools/edit.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/core/tools/file-mutation-queue.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/core/tools/file-mutation-queue.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/core/tools/find.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/core/tools/find.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/core/tools/grep.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/core/tools/grep.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/core/tools/index.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/core/tools/index.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/core/tools/ls.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/core/tools/ls.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/core/tools/path-utils.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/core/tools/path-utils.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/core/tools/read.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/core/tools/read.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/core/tools/render-utils.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/core/tools/render-utils.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/core/tools/tool-definition-wrapper.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/core/tools/tool-definition-wrapper.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/core/tools/truncate.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/core/tools/truncate.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/core/tools/write.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/index.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/index.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/index.js.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/main.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/main.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/migrations.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/migrations.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/modes/index.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/modes/index.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/modes/index.js.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/modes/interactive/components/assistant-message.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/modes/interactive/components/bash-execution.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/modes/interactive/components/bordered-loader.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/modes/interactive/components/branch-summary-message.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/modes/interactive/components/compaction-summary-message.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/modes/interactive/components/config-selector.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/modes/interactive/components/countdown-timer.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/modes/interactive/components/custom-editor.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/modes/interactive/components/custom-message.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/modes/interactive/components/diff.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/modes/interactive/components/diff.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/modes/interactive/components/dynamic-border.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/modes/interactive/components/extension-editor.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/modes/interactive/components/extension-input.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/modes/interactive/components/extension-selector.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/modes/interactive/components/footer.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/modes/interactive/components/index.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/modes/interactive/components/index.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/modes/interactive/components/keybinding-hints.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/modes/interactive/components/keybinding-hints.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/modes/interactive/components/login-dialog.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/modes/interactive/components/model-selector.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/modes/interactive/components/oauth-selector.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/modes/interactive/components/orient-banner.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/modes/interactive/components/orient-banner.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/modes/interactive/components/scoped-models-selector.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/modes/interactive/components/session-selector-search.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/modes/interactive/components/session-selector-search.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/modes/interactive/components/session-selector.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/modes/interactive/components/settings-selector.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/modes/interactive/components/show-images-selector.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/modes/interactive/components/skill-invocation-message.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/modes/interactive/components/theme-selector.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/modes/interactive/components/thinking-selector.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/modes/interactive/components/tool-execution.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/modes/interactive/components/tree-selector.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/modes/interactive/components/user-message-selector.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/modes/interactive/components/user-message.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/modes/interactive/components/user-message.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/modes/interactive/components/visual-truncate.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/modes/interactive/components/visual-truncate.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/modes/interactive/theme/theme.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/modes/print-mode.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/modes/print-mode.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/modes/rpc/jsonl.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/modes/rpc/jsonl.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/modes/rpc/rpc-client.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/modes/rpc/rpc-mode.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/modes/rpc/rpc-mode.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/modes/rpc/rpc-types.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/modes/rpc/rpc-types.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/modes/rpc/rpc-types.js.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/package-manager-cli.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/package-manager-cli.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/utils/changelog.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/utils/changelog.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/utils/child-process.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/utils/child-process.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/utils/clipboard-image.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/utils/clipboard-image.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/utils/clipboard-native.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/utils/clipboard-native.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/utils/clipboard.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/utils/clipboard.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/utils/exif-orientation.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/utils/exif-orientation.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/utils/frontmatter.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/utils/frontmatter.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/utils/git.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/utils/git.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/utils/image-convert.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/utils/image-convert.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/utils/image-resize.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/utils/image-resize.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/utils/mime.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/utils/mime.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/utils/paths.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/utils/paths.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/utils/photon.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/utils/photon.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/utils/shell.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/utils/shell.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/utils/sleep.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/utils/sleep.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/utils/tools-manager.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/dist/utils/tools-manager.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/coding-agent/package.json +0 -0
- /package/{node_modules → vendor}/@orient-cli/tui/dist/autocomplete.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/tui/dist/autocomplete.d.ts.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/tui/dist/autocomplete.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/tui/dist/autocomplete.js.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/tui/dist/components/box.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/tui/dist/components/box.d.ts.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/tui/dist/components/box.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/tui/dist/components/box.js.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/tui/dist/components/cancellable-loader.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/tui/dist/components/cancellable-loader.d.ts.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/tui/dist/components/cancellable-loader.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/tui/dist/components/cancellable-loader.js.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/tui/dist/components/editor.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/tui/dist/components/editor.d.ts.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/tui/dist/components/editor.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/tui/dist/components/editor.js.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/tui/dist/components/image.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/tui/dist/components/image.d.ts.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/tui/dist/components/image.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/tui/dist/components/image.js.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/tui/dist/components/input.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/tui/dist/components/input.d.ts.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/tui/dist/components/input.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/tui/dist/components/input.js.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/tui/dist/components/loader.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/tui/dist/components/loader.d.ts.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/tui/dist/components/loader.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/tui/dist/components/loader.js.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/tui/dist/components/markdown.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/tui/dist/components/markdown.d.ts.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/tui/dist/components/markdown.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/tui/dist/components/markdown.js.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/tui/dist/components/select-list.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/tui/dist/components/select-list.d.ts.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/tui/dist/components/select-list.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/tui/dist/components/select-list.js.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/tui/dist/components/settings-list.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/tui/dist/components/settings-list.d.ts.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/tui/dist/components/settings-list.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/tui/dist/components/settings-list.js.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/tui/dist/components/spacer.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/tui/dist/components/spacer.d.ts.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/tui/dist/components/spacer.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/tui/dist/components/spacer.js.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/tui/dist/components/text.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/tui/dist/components/text.d.ts.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/tui/dist/components/text.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/tui/dist/components/text.js.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/tui/dist/components/truncated-text.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/tui/dist/components/truncated-text.d.ts.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/tui/dist/components/truncated-text.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/tui/dist/components/truncated-text.js.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/tui/dist/editor-component.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/tui/dist/editor-component.d.ts.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/tui/dist/editor-component.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/tui/dist/editor-component.js.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/tui/dist/fuzzy.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/tui/dist/fuzzy.d.ts.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/tui/dist/fuzzy.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/tui/dist/fuzzy.js.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/tui/dist/index.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/tui/dist/index.d.ts.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/tui/dist/index.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/tui/dist/index.js.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/tui/dist/keybindings.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/tui/dist/keybindings.d.ts.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/tui/dist/keybindings.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/tui/dist/keybindings.js.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/tui/dist/keys.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/tui/dist/keys.d.ts.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/tui/dist/keys.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/tui/dist/keys.js.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/tui/dist/kill-ring.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/tui/dist/kill-ring.d.ts.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/tui/dist/kill-ring.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/tui/dist/kill-ring.js.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/tui/dist/stdin-buffer.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/tui/dist/stdin-buffer.d.ts.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/tui/dist/stdin-buffer.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/tui/dist/stdin-buffer.js.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/tui/dist/terminal-image.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/tui/dist/terminal-image.d.ts.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/tui/dist/terminal-image.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/tui/dist/terminal-image.js.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/tui/dist/terminal.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/tui/dist/terminal.d.ts.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/tui/dist/terminal.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/tui/dist/terminal.js.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/tui/dist/tui.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/tui/dist/tui.d.ts.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/tui/dist/tui.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/tui/dist/tui.js.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/tui/dist/undo-stack.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/tui/dist/undo-stack.d.ts.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/tui/dist/undo-stack.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/tui/dist/undo-stack.js.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/tui/dist/utils.d.ts +0 -0
- /package/{node_modules → vendor}/@orient-cli/tui/dist/utils.d.ts.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/tui/dist/utils.js +0 -0
- /package/{node_modules → vendor}/@orient-cli/tui/dist/utils.js.map +0 -0
- /package/{node_modules → vendor}/@orient-cli/tui/package.json +0 -0
|
@@ -1,402 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* RPC Client for programmatic access to the coding agent.
|
|
3
|
-
*
|
|
4
|
-
* Spawns the agent in RPC mode and provides a typed API for all operations.
|
|
5
|
-
*/
|
|
6
|
-
import { spawn } from "node:child_process";
|
|
7
|
-
import { attachJsonlLineReader, serializeJsonLine } from "./jsonl.js";
|
|
8
|
-
// ============================================================================
|
|
9
|
-
// RPC Client
|
|
10
|
-
// ============================================================================
|
|
11
|
-
export class RpcClient {
|
|
12
|
-
options;
|
|
13
|
-
process = null;
|
|
14
|
-
stopReadingStdout = null;
|
|
15
|
-
eventListeners = [];
|
|
16
|
-
pendingRequests = new Map();
|
|
17
|
-
requestId = 0;
|
|
18
|
-
stderr = "";
|
|
19
|
-
constructor(options = {}) {
|
|
20
|
-
this.options = options;
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* Start the RPC agent process.
|
|
24
|
-
*/
|
|
25
|
-
async start() {
|
|
26
|
-
if (this.process) {
|
|
27
|
-
throw new Error("Client already started");
|
|
28
|
-
}
|
|
29
|
-
const cliPath = this.options.cliPath ?? "dist/cli.js";
|
|
30
|
-
const args = ["--mode", "rpc"];
|
|
31
|
-
if (this.options.provider) {
|
|
32
|
-
args.push("--provider", this.options.provider);
|
|
33
|
-
}
|
|
34
|
-
if (this.options.model) {
|
|
35
|
-
args.push("--model", this.options.model);
|
|
36
|
-
}
|
|
37
|
-
if (this.options.args) {
|
|
38
|
-
args.push(...this.options.args);
|
|
39
|
-
}
|
|
40
|
-
this.process = spawn("node", [cliPath, ...args], {
|
|
41
|
-
cwd: this.options.cwd,
|
|
42
|
-
env: { ...process.env, ...this.options.env },
|
|
43
|
-
stdio: ["pipe", "pipe", "pipe"],
|
|
44
|
-
});
|
|
45
|
-
// Collect stderr for debugging
|
|
46
|
-
this.process.stderr?.on("data", (data) => {
|
|
47
|
-
this.stderr += data.toString();
|
|
48
|
-
process.stderr.write(data);
|
|
49
|
-
});
|
|
50
|
-
// Set up strict JSONL reader for stdout.
|
|
51
|
-
this.stopReadingStdout = attachJsonlLineReader(this.process.stdout, (line) => {
|
|
52
|
-
this.handleLine(line);
|
|
53
|
-
});
|
|
54
|
-
// Wait a moment for process to initialize
|
|
55
|
-
await new Promise((resolve) => setTimeout(resolve, 100));
|
|
56
|
-
if (this.process.exitCode !== null) {
|
|
57
|
-
throw new Error(`Agent process exited immediately with code ${this.process.exitCode}. Stderr: ${this.stderr}`);
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
/**
|
|
61
|
-
* Stop the RPC agent process.
|
|
62
|
-
*/
|
|
63
|
-
async stop() {
|
|
64
|
-
if (!this.process)
|
|
65
|
-
return;
|
|
66
|
-
this.stopReadingStdout?.();
|
|
67
|
-
this.stopReadingStdout = null;
|
|
68
|
-
this.process.kill("SIGTERM");
|
|
69
|
-
// Wait for process to exit
|
|
70
|
-
await new Promise((resolve) => {
|
|
71
|
-
const timeout = setTimeout(() => {
|
|
72
|
-
this.process?.kill("SIGKILL");
|
|
73
|
-
resolve();
|
|
74
|
-
}, 1000);
|
|
75
|
-
this.process?.on("exit", () => {
|
|
76
|
-
clearTimeout(timeout);
|
|
77
|
-
resolve();
|
|
78
|
-
});
|
|
79
|
-
});
|
|
80
|
-
this.process = null;
|
|
81
|
-
this.pendingRequests.clear();
|
|
82
|
-
}
|
|
83
|
-
/**
|
|
84
|
-
* Subscribe to agent events.
|
|
85
|
-
*/
|
|
86
|
-
onEvent(listener) {
|
|
87
|
-
this.eventListeners.push(listener);
|
|
88
|
-
return () => {
|
|
89
|
-
const index = this.eventListeners.indexOf(listener);
|
|
90
|
-
if (index !== -1) {
|
|
91
|
-
this.eventListeners.splice(index, 1);
|
|
92
|
-
}
|
|
93
|
-
};
|
|
94
|
-
}
|
|
95
|
-
/**
|
|
96
|
-
* Get collected stderr output (useful for debugging).
|
|
97
|
-
*/
|
|
98
|
-
getStderr() {
|
|
99
|
-
return this.stderr;
|
|
100
|
-
}
|
|
101
|
-
// =========================================================================
|
|
102
|
-
// Command Methods
|
|
103
|
-
// =========================================================================
|
|
104
|
-
/**
|
|
105
|
-
* Send a prompt to the agent.
|
|
106
|
-
* Returns immediately after sending; use onEvent() to receive streaming events.
|
|
107
|
-
* Use waitForIdle() to wait for completion.
|
|
108
|
-
*/
|
|
109
|
-
async prompt(message, images) {
|
|
110
|
-
await this.send({ type: "prompt", message, images });
|
|
111
|
-
}
|
|
112
|
-
/**
|
|
113
|
-
* Queue a steering message to interrupt the agent mid-run.
|
|
114
|
-
*/
|
|
115
|
-
async steer(message, images) {
|
|
116
|
-
await this.send({ type: "steer", message, images });
|
|
117
|
-
}
|
|
118
|
-
/**
|
|
119
|
-
* Queue a follow-up message to be processed after the agent finishes.
|
|
120
|
-
*/
|
|
121
|
-
async followUp(message, images) {
|
|
122
|
-
await this.send({ type: "follow_up", message, images });
|
|
123
|
-
}
|
|
124
|
-
/**
|
|
125
|
-
* Abort current operation.
|
|
126
|
-
*/
|
|
127
|
-
async abort() {
|
|
128
|
-
await this.send({ type: "abort" });
|
|
129
|
-
}
|
|
130
|
-
/**
|
|
131
|
-
* Start a new session, optionally with parent tracking.
|
|
132
|
-
* @param parentSession - Optional parent session path for lineage tracking
|
|
133
|
-
* @returns Object with `cancelled: true` if an extension cancelled the new session
|
|
134
|
-
*/
|
|
135
|
-
async newSession(parentSession) {
|
|
136
|
-
const response = await this.send({ type: "new_session", parentSession });
|
|
137
|
-
return this.getData(response);
|
|
138
|
-
}
|
|
139
|
-
/**
|
|
140
|
-
* Get current session state.
|
|
141
|
-
*/
|
|
142
|
-
async getState() {
|
|
143
|
-
const response = await this.send({ type: "get_state" });
|
|
144
|
-
return this.getData(response);
|
|
145
|
-
}
|
|
146
|
-
/**
|
|
147
|
-
* Set model by provider and ID.
|
|
148
|
-
*/
|
|
149
|
-
async setModel(provider, modelId) {
|
|
150
|
-
const response = await this.send({ type: "set_model", provider, modelId });
|
|
151
|
-
return this.getData(response);
|
|
152
|
-
}
|
|
153
|
-
/**
|
|
154
|
-
* Cycle to next model.
|
|
155
|
-
*/
|
|
156
|
-
async cycleModel() {
|
|
157
|
-
const response = await this.send({ type: "cycle_model" });
|
|
158
|
-
return this.getData(response);
|
|
159
|
-
}
|
|
160
|
-
/**
|
|
161
|
-
* Get list of available models.
|
|
162
|
-
*/
|
|
163
|
-
async getAvailableModels() {
|
|
164
|
-
const response = await this.send({ type: "get_available_models" });
|
|
165
|
-
return this.getData(response).models;
|
|
166
|
-
}
|
|
167
|
-
/**
|
|
168
|
-
* Set thinking level.
|
|
169
|
-
*/
|
|
170
|
-
async setThinkingLevel(level) {
|
|
171
|
-
await this.send({ type: "set_thinking_level", level });
|
|
172
|
-
}
|
|
173
|
-
/**
|
|
174
|
-
* Cycle thinking level.
|
|
175
|
-
*/
|
|
176
|
-
async cycleThinkingLevel() {
|
|
177
|
-
const response = await this.send({ type: "cycle_thinking_level" });
|
|
178
|
-
return this.getData(response);
|
|
179
|
-
}
|
|
180
|
-
/**
|
|
181
|
-
* Set steering mode.
|
|
182
|
-
*/
|
|
183
|
-
async setSteeringMode(mode) {
|
|
184
|
-
await this.send({ type: "set_steering_mode", mode });
|
|
185
|
-
}
|
|
186
|
-
/**
|
|
187
|
-
* Set follow-up mode.
|
|
188
|
-
*/
|
|
189
|
-
async setFollowUpMode(mode) {
|
|
190
|
-
await this.send({ type: "set_follow_up_mode", mode });
|
|
191
|
-
}
|
|
192
|
-
/**
|
|
193
|
-
* Compact session context.
|
|
194
|
-
*/
|
|
195
|
-
async compact(customInstructions) {
|
|
196
|
-
const response = await this.send({ type: "compact", customInstructions });
|
|
197
|
-
return this.getData(response);
|
|
198
|
-
}
|
|
199
|
-
/**
|
|
200
|
-
* Set auto-compaction enabled/disabled.
|
|
201
|
-
*/
|
|
202
|
-
async setAutoCompaction(enabled) {
|
|
203
|
-
await this.send({ type: "set_auto_compaction", enabled });
|
|
204
|
-
}
|
|
205
|
-
/**
|
|
206
|
-
* Set auto-retry enabled/disabled.
|
|
207
|
-
*/
|
|
208
|
-
async setAutoRetry(enabled) {
|
|
209
|
-
await this.send({ type: "set_auto_retry", enabled });
|
|
210
|
-
}
|
|
211
|
-
/**
|
|
212
|
-
* Abort in-progress retry.
|
|
213
|
-
*/
|
|
214
|
-
async abortRetry() {
|
|
215
|
-
await this.send({ type: "abort_retry" });
|
|
216
|
-
}
|
|
217
|
-
/**
|
|
218
|
-
* Execute a bash command.
|
|
219
|
-
*/
|
|
220
|
-
async bash(command) {
|
|
221
|
-
const response = await this.send({ type: "bash", command });
|
|
222
|
-
return this.getData(response);
|
|
223
|
-
}
|
|
224
|
-
/**
|
|
225
|
-
* Abort running bash command.
|
|
226
|
-
*/
|
|
227
|
-
async abortBash() {
|
|
228
|
-
await this.send({ type: "abort_bash" });
|
|
229
|
-
}
|
|
230
|
-
/**
|
|
231
|
-
* Get session statistics.
|
|
232
|
-
*/
|
|
233
|
-
async getSessionStats() {
|
|
234
|
-
const response = await this.send({ type: "get_session_stats" });
|
|
235
|
-
return this.getData(response);
|
|
236
|
-
}
|
|
237
|
-
/**
|
|
238
|
-
* Export session to HTML.
|
|
239
|
-
*/
|
|
240
|
-
async exportHtml(outputPath) {
|
|
241
|
-
const response = await this.send({ type: "export_html", outputPath });
|
|
242
|
-
return this.getData(response);
|
|
243
|
-
}
|
|
244
|
-
/**
|
|
245
|
-
* Switch to a different session file.
|
|
246
|
-
* @returns Object with `cancelled: true` if an extension cancelled the switch
|
|
247
|
-
*/
|
|
248
|
-
async switchSession(sessionPath) {
|
|
249
|
-
const response = await this.send({ type: "switch_session", sessionPath });
|
|
250
|
-
return this.getData(response);
|
|
251
|
-
}
|
|
252
|
-
/**
|
|
253
|
-
* Fork from a specific message.
|
|
254
|
-
* @returns Object with `text` (the message text) and `cancelled` (if extension cancelled)
|
|
255
|
-
*/
|
|
256
|
-
async fork(entryId) {
|
|
257
|
-
const response = await this.send({ type: "fork", entryId });
|
|
258
|
-
return this.getData(response);
|
|
259
|
-
}
|
|
260
|
-
/**
|
|
261
|
-
* Get messages available for forking.
|
|
262
|
-
*/
|
|
263
|
-
async getForkMessages() {
|
|
264
|
-
const response = await this.send({ type: "get_fork_messages" });
|
|
265
|
-
return this.getData(response).messages;
|
|
266
|
-
}
|
|
267
|
-
/**
|
|
268
|
-
* Get text of last assistant message.
|
|
269
|
-
*/
|
|
270
|
-
async getLastAssistantText() {
|
|
271
|
-
const response = await this.send({ type: "get_last_assistant_text" });
|
|
272
|
-
return this.getData(response).text;
|
|
273
|
-
}
|
|
274
|
-
/**
|
|
275
|
-
* Set the session display name.
|
|
276
|
-
*/
|
|
277
|
-
async setSessionName(name) {
|
|
278
|
-
await this.send({ type: "set_session_name", name });
|
|
279
|
-
}
|
|
280
|
-
/**
|
|
281
|
-
* Get all messages in the session.
|
|
282
|
-
*/
|
|
283
|
-
async getMessages() {
|
|
284
|
-
const response = await this.send({ type: "get_messages" });
|
|
285
|
-
return this.getData(response).messages;
|
|
286
|
-
}
|
|
287
|
-
/**
|
|
288
|
-
* Get available commands (extension commands, prompt templates, skills).
|
|
289
|
-
*/
|
|
290
|
-
async getCommands() {
|
|
291
|
-
const response = await this.send({ type: "get_commands" });
|
|
292
|
-
return this.getData(response).commands;
|
|
293
|
-
}
|
|
294
|
-
// =========================================================================
|
|
295
|
-
// Helpers
|
|
296
|
-
// =========================================================================
|
|
297
|
-
/**
|
|
298
|
-
* Wait for agent to become idle (no streaming).
|
|
299
|
-
* Resolves when agent_end event is received.
|
|
300
|
-
*/
|
|
301
|
-
waitForIdle(timeout = 60000) {
|
|
302
|
-
return new Promise((resolve, reject) => {
|
|
303
|
-
const timer = setTimeout(() => {
|
|
304
|
-
unsubscribe();
|
|
305
|
-
reject(new Error(`Timeout waiting for agent to become idle. Stderr: ${this.stderr}`));
|
|
306
|
-
}, timeout);
|
|
307
|
-
const unsubscribe = this.onEvent((event) => {
|
|
308
|
-
if (event.type === "agent_end") {
|
|
309
|
-
clearTimeout(timer);
|
|
310
|
-
unsubscribe();
|
|
311
|
-
resolve();
|
|
312
|
-
}
|
|
313
|
-
});
|
|
314
|
-
});
|
|
315
|
-
}
|
|
316
|
-
/**
|
|
317
|
-
* Collect events until agent becomes idle.
|
|
318
|
-
*/
|
|
319
|
-
collectEvents(timeout = 60000) {
|
|
320
|
-
return new Promise((resolve, reject) => {
|
|
321
|
-
const events = [];
|
|
322
|
-
const timer = setTimeout(() => {
|
|
323
|
-
unsubscribe();
|
|
324
|
-
reject(new Error(`Timeout collecting events. Stderr: ${this.stderr}`));
|
|
325
|
-
}, timeout);
|
|
326
|
-
const unsubscribe = this.onEvent((event) => {
|
|
327
|
-
events.push(event);
|
|
328
|
-
if (event.type === "agent_end") {
|
|
329
|
-
clearTimeout(timer);
|
|
330
|
-
unsubscribe();
|
|
331
|
-
resolve(events);
|
|
332
|
-
}
|
|
333
|
-
});
|
|
334
|
-
});
|
|
335
|
-
}
|
|
336
|
-
/**
|
|
337
|
-
* Send prompt and wait for completion, returning all events.
|
|
338
|
-
*/
|
|
339
|
-
async promptAndWait(message, images, timeout = 60000) {
|
|
340
|
-
const eventsPromise = this.collectEvents(timeout);
|
|
341
|
-
await this.prompt(message, images);
|
|
342
|
-
return eventsPromise;
|
|
343
|
-
}
|
|
344
|
-
// =========================================================================
|
|
345
|
-
// Internal
|
|
346
|
-
// =========================================================================
|
|
347
|
-
handleLine(line) {
|
|
348
|
-
try {
|
|
349
|
-
const data = JSON.parse(line);
|
|
350
|
-
// Check if it's a response to a pending request
|
|
351
|
-
if (data.type === "response" && data.id && this.pendingRequests.has(data.id)) {
|
|
352
|
-
const pending = this.pendingRequests.get(data.id);
|
|
353
|
-
this.pendingRequests.delete(data.id);
|
|
354
|
-
pending.resolve(data);
|
|
355
|
-
return;
|
|
356
|
-
}
|
|
357
|
-
// Otherwise it's an event
|
|
358
|
-
for (const listener of this.eventListeners) {
|
|
359
|
-
listener(data);
|
|
360
|
-
}
|
|
361
|
-
}
|
|
362
|
-
catch {
|
|
363
|
-
// Ignore non-JSON lines
|
|
364
|
-
}
|
|
365
|
-
}
|
|
366
|
-
async send(command) {
|
|
367
|
-
if (!this.process?.stdin) {
|
|
368
|
-
throw new Error("Client not started");
|
|
369
|
-
}
|
|
370
|
-
const id = `req_${++this.requestId}`;
|
|
371
|
-
const fullCommand = { ...command, id };
|
|
372
|
-
return new Promise((resolve, reject) => {
|
|
373
|
-
this.pendingRequests.set(id, { resolve, reject });
|
|
374
|
-
const timeout = setTimeout(() => {
|
|
375
|
-
this.pendingRequests.delete(id);
|
|
376
|
-
reject(new Error(`Timeout waiting for response to ${command.type}. Stderr: ${this.stderr}`));
|
|
377
|
-
}, 30000);
|
|
378
|
-
this.pendingRequests.set(id, {
|
|
379
|
-
resolve: (response) => {
|
|
380
|
-
clearTimeout(timeout);
|
|
381
|
-
resolve(response);
|
|
382
|
-
},
|
|
383
|
-
reject: (error) => {
|
|
384
|
-
clearTimeout(timeout);
|
|
385
|
-
reject(error);
|
|
386
|
-
},
|
|
387
|
-
});
|
|
388
|
-
this.process.stdin.write(serializeJsonLine(fullCommand));
|
|
389
|
-
});
|
|
390
|
-
}
|
|
391
|
-
getData(response) {
|
|
392
|
-
if (!response.success) {
|
|
393
|
-
const errorResponse = response;
|
|
394
|
-
throw new Error(errorResponse.error);
|
|
395
|
-
}
|
|
396
|
-
// Type assertion: we trust response.data matches T based on the command sent.
|
|
397
|
-
// This is safe because each public method specifies the correct T for its command.
|
|
398
|
-
const successResponse = response;
|
|
399
|
-
return successResponse.data;
|
|
400
|
-
}
|
|
401
|
-
}
|
|
402
|
-
//# sourceMappingURL=rpc-client.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"rpc-client.js","sourceRoot":"","sources":["../../../src/modes/rpc/rpc-client.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAqB,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAM9D,OAAO,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAqCtE,+EAA+E;AAC/E,aAAa;AACb,+EAA+E;AAE/E,MAAM,OAAO,SAAS;IASD,OAAO;IARnB,OAAO,GAAwB,IAAI,CAAC;IACpC,iBAAiB,GAAwB,IAAI,CAAC;IAC9C,cAAc,GAAuB,EAAE,CAAC;IACxC,eAAe,GACtB,IAAI,GAAG,EAAE,CAAC;IACH,SAAS,GAAG,CAAC,CAAC;IACd,MAAM,GAAG,EAAE,CAAC;IAEpB,YAAoB,OAAO,GAAqB,EAAE,EAAE;uBAAhC,OAAO;IAA0B,CAAC;IAEtD;;OAEG;IACH,KAAK,CAAC,KAAK,GAAkB;QAC5B,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;YAClB,MAAM,IAAI,KAAK,CAAC,wBAAwB,CAAC,CAAC;QAC3C,CAAC;QAED,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,I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e,GAAG,QAAkE,CAAC;QAC3F,OAAO,eAAe,CAAC,IAAS,CAAC;IAAA,CACjC;CACD","sourcesContent":["/**\n * RPC Client for programmatic access to the coding agent.\n *\n * Spawns the agent in RPC mode and provides a typed API for all operations.\n */\n\nimport { type ChildProcess, spawn } from \"node:child_process\";\nimport type { AgentEvent, AgentMessage, ThinkingLevel } from \"@orient-cli/agent-core\";\nimport type { ImageContent } from \"@orient-cli/ai\";\nimport type { SessionStats } from \"../../core/agent-session.js\";\nimport type { BashResult } from \"../../core/bash-executor.js\";\nimport type { CompactionResult } from \"../../core/compaction/index.js\";\nimport { attachJsonlLineReader, serializeJsonLine } from \"./jsonl.js\";\nimport type { RpcCommand, RpcResponse, RpcSessionState, RpcSlashCommand } from \"./rpc-types.js\";\n\n// ============================================================================\n// Types\n// ============================================================================\n\n/** Distributive Omit that works with union types */\ntype DistributiveOmit<T, K extends keyof T> = T extends unknown ? Omit<T, K> : never;\n\n/** RpcCommand without the id field (for internal send) */\ntype RpcCommandBody = DistributiveOmit<RpcCommand, \"id\">;\n\nexport interface RpcClientOptions {\n\t/** Path to the CLI entry point (default: searches for dist/cli.js) */\n\tcliPath?: string;\n\t/** Working directory for the agent */\n\tcwd?: string;\n\t/** Environment variables */\n\tenv?: Record<string, string>;\n\t/** Provider to use */\n\tprovider?: string;\n\t/** Model ID to use */\n\tmodel?: string;\n\t/** Additional CLI arguments */\n\targs?: string[];\n}\n\nexport interface ModelInfo {\n\tprovider: string;\n\tid: string;\n\tcontextWindow: number;\n\treasoning: boolean;\n}\n\nexport type RpcEventListener = (event: AgentEvent) => void;\n\n// ============================================================================\n// RPC Client\n// ============================================================================\n\nexport class RpcClient {\n\tprivate process: ChildProcess | null = null;\n\tprivate stopReadingStdout: (() => void) | null = null;\n\tprivate eventListeners: RpcEventListener[] = [];\n\tprivate pendingRequests: Map<string, { resolve: (response: RpcResponse) => void; reject: (error: Error) => void }> =\n\t\tnew Map();\n\tprivate requestId = 0;\n\tprivate stderr = \"\";\n\n\tconstructor(private options: RpcClientOptions = {}) {}\n\n\t/**\n\t * Start the RPC agent process.\n\t */\n\tasync start(): Promise<void> {\n\t\tif (this.process) {\n\t\t\tthrow new Error(\"Client already started\");\n\t\t}\n\n\t\tconst cliPath = this.options.cliPath ?? \"dist/cli.js\";\n\t\tconst args = [\"--mode\", \"rpc\"];\n\n\t\tif (this.options.provider) {\n\t\t\targs.push(\"--provider\", this.options.provider);\n\t\t}\n\t\tif (this.options.model) {\n\t\t\targs.push(\"--model\", this.options.model);\n\t\t}\n\t\tif (this.options.args) {\n\t\t\targs.push(...this.options.args);\n\t\t}\n\n\t\tthis.process = spawn(\"node\", [cliPath, ...args], {\n\t\t\tcwd: this.options.cwd,\n\t\t\tenv: { ...process.env, ...this.options.env },\n\t\t\tstdio: [\"pipe\", \"pipe\", \"pipe\"],\n\t\t});\n\n\t\t// Collect stderr for debugging\n\t\tthis.process.stderr?.on(\"data\", (data) => {\n\t\t\tthis.stderr += data.toString();\n\t\t\tprocess.stderr.write(data);\n\t\t});\n\n\t\t// Set up strict JSONL reader for stdout.\n\t\tthis.stopReadingStdout = attachJsonlLineReader(this.process.stdout!, (line) => {\n\t\t\tthis.handleLine(line);\n\t\t});\n\n\t\t// Wait a moment for process to initialize\n\t\tawait new Promise((resolve) => setTimeout(resolve, 100));\n\n\t\tif (this.process.exitCode !== null) {\n\t\t\tthrow new Error(`Agent process exited immediately with code ${this.process.exitCode}. Stderr: ${this.stderr}`);\n\t\t}\n\t}\n\n\t/**\n\t * Stop the RPC agent process.\n\t */\n\tasync stop(): Promise<void> {\n\t\tif (!this.process) return;\n\n\t\tthis.stopReadingStdout?.();\n\t\tthis.stopReadingStdout = null;\n\t\tthis.process.kill(\"SIGTERM\");\n\n\t\t// Wait for process to exit\n\t\tawait new Promise<void>((resolve) => {\n\t\t\tconst timeout = setTimeout(() => {\n\t\t\t\tthis.process?.kill(\"SIGKILL\");\n\t\t\t\tresolve();\n\t\t\t}, 1000);\n\n\t\t\tthis.process?.on(\"exit\", () => {\n\t\t\t\tclearTimeout(timeout);\n\t\t\t\tresolve();\n\t\t\t});\n\t\t});\n\n\t\tthis.process = null;\n\t\tthis.pendingRequests.clear();\n\t}\n\n\t/**\n\t * Subscribe to agent events.\n\t */\n\tonEvent(listener: RpcEventListener): () => void {\n\t\tthis.eventListeners.push(listener);\n\t\treturn () => {\n\t\t\tconst index = this.eventListeners.indexOf(listener);\n\t\t\tif (index !== -1) {\n\t\t\t\tthis.eventListeners.splice(index, 1);\n\t\t\t}\n\t\t};\n\t}\n\n\t/**\n\t * Get collected stderr output (useful for debugging).\n\t */\n\tgetStderr(): string {\n\t\treturn this.stderr;\n\t}\n\n\t// =========================================================================\n\t// Command Methods\n\t// =========================================================================\n\n\t/**\n\t * Send a prompt to the agent.\n\t * Returns immediately after sending; use onEvent() to receive streaming events.\n\t * Use waitForIdle() to wait for completion.\n\t */\n\tasync prompt(message: string, images?: ImageContent[]): Promise<void> {\n\t\tawait this.send({ type: \"prompt\", message, images });\n\t}\n\n\t/**\n\t * Queue a steering message to interrupt the agent mid-run.\n\t */\n\tasync steer(message: string, images?: ImageContent[]): Promise<void> {\n\t\tawait this.send({ type: \"steer\", message, images });\n\t}\n\n\t/**\n\t * Queue a follow-up message to be processed after the agent finishes.\n\t */\n\tasync followUp(message: string, images?: ImageContent[]): Promise<void> {\n\t\tawait this.send({ type: \"follow_up\", message, images });\n\t}\n\n\t/**\n\t * Abort current operation.\n\t */\n\tasync abort(): Promise<void> {\n\t\tawait this.send({ type: \"abort\" });\n\t}\n\n\t/**\n\t * Start a new session, optionally with parent tracking.\n\t * @param parentSession - Optional parent session path for lineage tracking\n\t * @returns Object with `cancelled: true` if an extension cancelled the new session\n\t */\n\tasync newSession(parentSession?: string): Promise<{ cancelled: boolean }> {\n\t\tconst response = await this.send({ type: \"new_session\", parentSession });\n\t\treturn this.getData(response);\n\t}\n\n\t/**\n\t * Get current session state.\n\t */\n\tasync getState(): Promise<RpcSessionState> {\n\t\tconst response = await this.send({ type: \"get_state\" });\n\t\treturn this.getData(response);\n\t}\n\n\t/**\n\t * Set model by provider and ID.\n\t */\n\tasync setModel(provider: string, modelId: string): Promise<{ provider: string; id: string }> {\n\t\tconst response = await this.send({ type: \"set_model\", provider, modelId });\n\t\treturn this.getData(response);\n\t}\n\n\t/**\n\t * Cycle to next model.\n\t */\n\tasync cycleModel(): Promise<{\n\t\tmodel: { provider: string; id: string };\n\t\tthinkingLevel: ThinkingLevel;\n\t\tisScoped: boolean;\n\t} | null> {\n\t\tconst response = await this.send({ type: \"cycle_model\" });\n\t\treturn this.getData(response);\n\t}\n\n\t/**\n\t * Get list of available models.\n\t */\n\tasync getAvailableModels(): Promise<ModelInfo[]> {\n\t\tconst response = await this.send({ type: \"get_available_models\" });\n\t\treturn this.getData<{ models: ModelInfo[] }>(response).models;\n\t}\n\n\t/**\n\t * Set thinking level.\n\t */\n\tasync setThinkingLevel(level: ThinkingLevel): Promise<void> {\n\t\tawait this.send({ type: \"set_thinking_level\", level });\n\t}\n\n\t/**\n\t * Cycle thinking level.\n\t */\n\tasync cycleThinkingLevel(): Promise<{ level: ThinkingLevel } | null> {\n\t\tconst response = await this.send({ type: \"cycle_thinking_level\" });\n\t\treturn this.getData(response);\n\t}\n\n\t/**\n\t * Set steering mode.\n\t */\n\tasync setSteeringMode(mode: \"all\" | \"one-at-a-time\"): Promise<void> {\n\t\tawait this.send({ type: \"set_steering_mode\", mode });\n\t}\n\n\t/**\n\t * Set follow-up mode.\n\t */\n\tasync setFollowUpMode(mode: \"all\" | \"one-at-a-time\"): Promise<void> {\n\t\tawait this.send({ type: \"set_follow_up_mode\", mode });\n\t}\n\n\t/**\n\t * Compact session context.\n\t */\n\tasync compact(customInstructions?: string): Promise<CompactionResult> {\n\t\tconst response = await this.send({ type: \"compact\", customInstructions });\n\t\treturn this.getData(response);\n\t}\n\n\t/**\n\t * Set auto-compaction enabled/disabled.\n\t */\n\tasync setAutoCompaction(enabled: boolean): Promise<void> {\n\t\tawait this.send({ type: \"set_auto_compaction\", enabled });\n\t}\n\n\t/**\n\t * Set auto-retry enabled/disabled.\n\t */\n\tasync setAutoRetry(enabled: boolean): Promise<void> {\n\t\tawait this.send({ type: \"set_auto_retry\", enabled });\n\t}\n\n\t/**\n\t * Abort in-progress retry.\n\t */\n\tasync abortRetry(): Promise<void> {\n\t\tawait this.send({ type: \"abort_retry\" });\n\t}\n\n\t/**\n\t * Execute a bash command.\n\t */\n\tasync bash(command: string): Promise<BashResult> {\n\t\tconst response = await this.send({ type: \"bash\", command });\n\t\treturn this.getData(response);\n\t}\n\n\t/**\n\t * Abort running bash command.\n\t */\n\tasync abortBash(): Promise<void> {\n\t\tawait this.send({ type: \"abort_bash\" });\n\t}\n\n\t/**\n\t * Get session statistics.\n\t */\n\tasync getSessionStats(): Promise<SessionStats> {\n\t\tconst response = await this.send({ type: \"get_session_stats\" });\n\t\treturn this.getData(response);\n\t}\n\n\t/**\n\t * Export session to HTML.\n\t */\n\tasync exportHtml(outputPath?: string): Promise<{ path: string }> {\n\t\tconst response = await this.send({ type: \"export_html\", outputPath });\n\t\treturn this.getData(response);\n\t}\n\n\t/**\n\t * Switch to a different session file.\n\t * @returns Object with `cancelled: true` if an extension cancelled the switch\n\t */\n\tasync switchSession(sessionPath: string): Promise<{ cancelled: boolean }> {\n\t\tconst response = await this.send({ type: \"switch_session\", sessionPath });\n\t\treturn this.getData(response);\n\t}\n\n\t/**\n\t * Fork from a specific message.\n\t * @returns Object with `text` (the message text) and `cancelled` (if extension cancelled)\n\t */\n\tasync fork(entryId: string): Promise<{ text: string; cancelled: boolean }> {\n\t\tconst response = await this.send({ type: \"fork\", entryId });\n\t\treturn this.getData(response);\n\t}\n\n\t/**\n\t * Get messages available for forking.\n\t */\n\tasync getForkMessages(): Promise<Array<{ entryId: string; text: string }>> {\n\t\tconst response = await this.send({ type: \"get_fork_messages\" });\n\t\treturn this.getData<{ messages: Array<{ entryId: string; text: string }> }>(response).messages;\n\t}\n\n\t/**\n\t * Get text of last assistant message.\n\t */\n\tasync getLastAssistantText(): Promise<string | null> {\n\t\tconst response = await this.send({ type: \"get_last_assistant_text\" });\n\t\treturn this.getData<{ text: string | null }>(response).text;\n\t}\n\n\t/**\n\t * Set the session display name.\n\t */\n\tasync setSessionName(name: string): Promise<void> {\n\t\tawait this.send({ type: \"set_session_name\", name });\n\t}\n\n\t/**\n\t * Get all messages in the session.\n\t */\n\tasync getMessages(): Promise<AgentMessage[]> {\n\t\tconst response = await this.send({ type: \"get_messages\" });\n\t\treturn this.getData<{ messages: AgentMessage[] }>(response).messages;\n\t}\n\n\t/**\n\t * Get available commands (extension commands, prompt templates, skills).\n\t */\n\tasync getCommands(): Promise<RpcSlashCommand[]> {\n\t\tconst response = await this.send({ type: \"get_commands\" });\n\t\treturn this.getData<{ commands: RpcSlashCommand[] }>(response).commands;\n\t}\n\n\t// =========================================================================\n\t// Helpers\n\t// =========================================================================\n\n\t/**\n\t * Wait for agent to become idle (no streaming).\n\t * Resolves when agent_end event is received.\n\t */\n\twaitForIdle(timeout = 60000): Promise<void> {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tconst timer = setTimeout(() => {\n\t\t\t\tunsubscribe();\n\t\t\t\treject(new Error(`Timeout waiting for agent to become idle. Stderr: ${this.stderr}`));\n\t\t\t}, timeout);\n\n\t\t\tconst unsubscribe = this.onEvent((event) => {\n\t\t\t\tif (event.type === \"agent_end\") {\n\t\t\t\t\tclearTimeout(timer);\n\t\t\t\t\tunsubscribe();\n\t\t\t\t\tresolve();\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t}\n\n\t/**\n\t * Collect events until agent becomes idle.\n\t */\n\tcollectEvents(timeout = 60000): Promise<AgentEvent[]> {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tconst events: AgentEvent[] = [];\n\t\t\tconst timer = setTimeout(() => {\n\t\t\t\tunsubscribe();\n\t\t\t\treject(new Error(`Timeout collecting events. Stderr: ${this.stderr}`));\n\t\t\t}, timeout);\n\n\t\t\tconst unsubscribe = this.onEvent((event) => {\n\t\t\t\tevents.push(event);\n\t\t\t\tif (event.type === \"agent_end\") {\n\t\t\t\t\tclearTimeout(timer);\n\t\t\t\t\tunsubscribe();\n\t\t\t\t\tresolve(events);\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t}\n\n\t/**\n\t * Send prompt and wait for completion, returning all events.\n\t */\n\tasync promptAndWait(message: string, images?: ImageContent[], timeout = 60000): Promise<AgentEvent[]> {\n\t\tconst eventsPromise = this.collectEvents(timeout);\n\t\tawait this.prompt(message, images);\n\t\treturn eventsPromise;\n\t}\n\n\t// =========================================================================\n\t// Internal\n\t// =========================================================================\n\n\tprivate handleLine(line: string): void {\n\t\ttry {\n\t\t\tconst data = JSON.parse(line);\n\n\t\t\t// Check if it's a response to a pending request\n\t\t\tif (data.type === \"response\" && data.id && this.pendingRequests.has(data.id)) {\n\t\t\t\tconst pending = this.pendingRequests.get(data.id)!;\n\t\t\t\tthis.pendingRequests.delete(data.id);\n\t\t\t\tpending.resolve(data as RpcResponse);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Otherwise it's an event\n\t\t\tfor (const listener of this.eventListeners) {\n\t\t\t\tlistener(data as AgentEvent);\n\t\t\t}\n\t\t} catch {\n\t\t\t// Ignore non-JSON lines\n\t\t}\n\t}\n\n\tprivate async send(command: RpcCommandBody): Promise<RpcResponse> {\n\t\tif (!this.process?.stdin) {\n\t\t\tthrow new Error(\"Client not started\");\n\t\t}\n\n\t\tconst id = `req_${++this.requestId}`;\n\t\tconst fullCommand = { ...command, id } as RpcCommand;\n\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tthis.pendingRequests.set(id, { resolve, reject });\n\n\t\t\tconst timeout = setTimeout(() => {\n\t\t\t\tthis.pendingRequests.delete(id);\n\t\t\t\treject(new Error(`Timeout waiting for response to ${command.type}. Stderr: ${this.stderr}`));\n\t\t\t}, 30000);\n\n\t\t\tthis.pendingRequests.set(id, {\n\t\t\t\tresolve: (response) => {\n\t\t\t\t\tclearTimeout(timeout);\n\t\t\t\t\tresolve(response);\n\t\t\t\t},\n\t\t\t\treject: (error) => {\n\t\t\t\t\tclearTimeout(timeout);\n\t\t\t\t\treject(error);\n\t\t\t\t},\n\t\t\t});\n\n\t\t\tthis.process!.stdin!.write(serializeJsonLine(fullCommand));\n\t\t});\n\t}\n\n\tprivate getData<T>(response: RpcResponse): T {\n\t\tif (!response.success) {\n\t\t\tconst errorResponse = response as Extract<RpcResponse, { success: false }>;\n\t\t\tthrow new Error(errorResponse.error);\n\t\t}\n\t\t// Type assertion: we trust response.data matches T based on the command sent.\n\t\t// This is safe because each public method specifies the correct T for its command.\n\t\tconst successResponse = response as Extract<RpcResponse, { success: true; data: unknown }>;\n\t\treturn successResponse.data as T;\n\t}\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"rpc-mode.d.ts","sourceRoot":"","sources":["../../../src/modes/rpc/rpc-mode.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAmB/E,YAAY,EACX,UAAU,EACV,qBAAqB,EACrB,sBAAsB,EACtB,WAAW,EACX,eAAe,GACf,MAAM,gBAAgB,CAAC;AAExB;;;GAGG;AACH,wBAAsB,UAAU,CAAC,WAAW,EAAE,mBAAmB,GAAG,OAAO,CAAC,KAAK,CAAC,CAwoBjF","sourcesContent":["/**\n * RPC mode: Headless operation with JSON stdin/stdout protocol.\n *\n * Used for embedding the agent in other applications.\n * Receives commands as JSON on stdin, outputs events and responses as JSON on stdout.\n *\n * Protocol:\n * - Commands: JSON objects with `type` field, optional `id` for correlation\n * - Responses: JSON objects with `type: \"response\"`, `command`, `success`, and optional `data`/`error`\n * - Events: AgentSessionEvent objects streamed as they occur\n * - Extension UI: Extension UI requests are emitted, client responds with extension_ui_response\n */\n\nimport * as crypto from \"node:crypto\";\nimport type { AgentSessionRuntime } from \"../../core/agent-session-runtime.js\";\nimport type {\n\tExtensionUIContext,\n\tExtensionUIDialogOptions,\n\tExtensionWidgetOptions,\n} from \"../../core/extensions/index.js\";\nimport { takeOverStdout, writeRawStdout } from \"../../core/output-guard.js\";\nimport { type Theme, theme } from \"../interactive/theme/theme.js\";\nimport { attachJsonlLineReader, serializeJsonLine } from \"./jsonl.js\";\nimport type {\n\tRpcCommand,\n\tRpcExtensionUIRequest,\n\tRpcExtensionUIResponse,\n\tRpcResponse,\n\tRpcSessionState,\n\tRpcSlashCommand,\n} from \"./rpc-types.js\";\n\n// Re-export types for consumers\nexport type {\n\tRpcCommand,\n\tRpcExtensionUIRequest,\n\tRpcExtensionUIResponse,\n\tRpcResponse,\n\tRpcSessionState,\n} from \"./rpc-types.js\";\n\n/**\n * Run in RPC mode.\n * Listens for JSON commands on stdin, outputs events and responses on stdout.\n */\nexport async function runRpcMode(runtimeHost: AgentSessionRuntime): Promise<never> {\n\ttakeOverStdout();\n\tlet session = runtimeHost.session;\n\tlet unsubscribe: (() => void) | undefined;\n\n\tconst output = (obj: RpcResponse | RpcExtensionUIRequest | object) => {\n\t\twriteRawStdout(serializeJsonLine(obj));\n\t};\n\n\tconst success = <T extends RpcCommand[\"type\"]>(\n\t\tid: string | undefined,\n\t\tcommand: T,\n\t\tdata?: object | null,\n\t): RpcResponse => {\n\t\tif (data === undefined) {\n\t\t\treturn { id, type: \"response\", command, success: true } as RpcResponse;\n\t\t}\n\t\treturn { id, type: \"response\", command, success: true, data } as RpcResponse;\n\t};\n\n\tconst error = (id: string | undefined, command: string, message: string): RpcResponse => {\n\t\treturn { id, type: \"response\", command, success: false, error: message };\n\t};\n\n\t// Pending extension UI requests waiting for response\n\tconst pendingExtensionRequests = new Map<\n\t\tstring,\n\t\t{ resolve: (value: any) => void; reject: (error: Error) => void }\n\t>();\n\n\t// Shutdown request flag\n\tlet shutdownRequested = false;\n\n\t/** Helper for dialog methods with signal/timeout support */\n\tfunction createDialogPromise<T>(\n\t\topts: ExtensionUIDialogOptions | undefined,\n\t\tdefaultValue: T,\n\t\trequest: Record<string, unknown>,\n\t\tparseResponse: (response: RpcExtensionUIResponse) => T,\n\t): Promise<T> {\n\t\tif (opts?.signal?.aborted) return Promise.resolve(defaultValue);\n\n\t\tconst id = crypto.randomUUID();\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tlet timeoutId: ReturnType<typeof setTimeout> | undefined;\n\n\t\t\tconst cleanup = () => {\n\t\t\t\tif (timeoutId) clearTimeout(timeoutId);\n\t\t\t\topts?.signal?.removeEventListener(\"abort\", onAbort);\n\t\t\t\tpendingExtensionRequests.delete(id);\n\t\t\t};\n\n\t\t\tconst onAbort = () => {\n\t\t\t\tcleanup();\n\t\t\t\tresolve(defaultValue);\n\t\t\t};\n\t\t\topts?.signal?.addEventListener(\"abort\", onAbort, { once: true });\n\n\t\t\tif (opts?.timeout) {\n\t\t\t\ttimeoutId = setTimeout(() => {\n\t\t\t\t\tcleanup();\n\t\t\t\t\tresolve(defaultValue);\n\t\t\t\t}, opts.timeout);\n\t\t\t}\n\n\t\t\tpendingExtensionRequests.set(id, {\n\t\t\t\tresolve: (response: RpcExtensionUIResponse) => {\n\t\t\t\t\tcleanup();\n\t\t\t\t\tresolve(parseResponse(response));\n\t\t\t\t},\n\t\t\t\treject,\n\t\t\t});\n\t\t\toutput({ type: \"extension_ui_request\", id, ...request } as RpcExtensionUIRequest);\n\t\t});\n\t}\n\n\t/**\n\t * Create an extension UI context that uses the RPC protocol.\n\t */\n\tconst createExtensionUIContext = (): ExtensionUIContext => ({\n\t\tselect: (title, options, opts) =>\n\t\t\tcreateDialogPromise(opts, undefined, { method: \"select\", title, options, timeout: opts?.timeout }, (r) =>\n\t\t\t\t\"cancelled\" in r && r.cancelled ? undefined : \"value\" in r ? r.value : undefined,\n\t\t\t),\n\n\t\tconfirm: (title, message, opts) =>\n\t\t\tcreateDialogPromise(opts, false, { method: \"confirm\", title, message, timeout: opts?.timeout }, (r) =>\n\t\t\t\t\"cancelled\" in r && r.cancelled ? false : \"confirmed\" in r ? r.confirmed : false,\n\t\t\t),\n\n\t\tinput: (title, placeholder, opts) =>\n\t\t\tcreateDialogPromise(opts, undefined, { method: \"input\", title, placeholder, timeout: opts?.timeout }, (r) =>\n\t\t\t\t\"cancelled\" in r && r.cancelled ? undefined : \"value\" in r ? r.value : undefined,\n\t\t\t),\n\n\t\tnotify(message: string, type?: \"info\" | \"warning\" | \"error\"): void {\n\t\t\t// Fire and forget - no response needed\n\t\t\toutput({\n\t\t\t\ttype: \"extension_ui_request\",\n\t\t\t\tid: crypto.randomUUID(),\n\t\t\t\tmethod: \"notify\",\n\t\t\t\tmessage,\n\t\t\t\tnotifyType: type,\n\t\t\t} as RpcExtensionUIRequest);\n\t\t},\n\n\t\tonTerminalInput(): () => void {\n\t\t\t// Raw terminal input not supported in RPC mode\n\t\t\treturn () => {};\n\t\t},\n\n\t\tsetStatus(key: string, text: string | undefined): void {\n\t\t\t// Fire and forget - no response needed\n\t\t\toutput({\n\t\t\t\ttype: \"extension_ui_request\",\n\t\t\t\tid: crypto.randomUUID(),\n\t\t\t\tmethod: \"setStatus\",\n\t\t\t\tstatusKey: key,\n\t\t\t\tstatusText: text,\n\t\t\t} as RpcExtensionUIRequest);\n\t\t},\n\n\t\tsetWorkingMessage(_message?: string): void {\n\t\t\t// Working message not supported in RPC mode - requires TUI loader access\n\t\t},\n\n\t\tsetHiddenThinkingLabel(_label?: string): void {\n\t\t\t// Hidden thinking label not supported in RPC mode - requires TUI message rendering access\n\t\t},\n\n\t\tsetWidget(key: string, content: unknown, options?: ExtensionWidgetOptions): void {\n\t\t\t// Only support string arrays in RPC mode - factory functions are ignored\n\t\t\tif (content === undefined || Array.isArray(content)) {\n\t\t\t\toutput({\n\t\t\t\t\ttype: \"extension_ui_request\",\n\t\t\t\t\tid: crypto.randomUUID(),\n\t\t\t\t\tmethod: \"setWidget\",\n\t\t\t\t\twidgetKey: key,\n\t\t\t\t\twidgetLines: content as string[] | undefined,\n\t\t\t\t\twidgetPlacement: options?.placement,\n\t\t\t\t} as RpcExtensionUIRequest);\n\t\t\t}\n\t\t\t// Component factories are not supported in RPC mode - would need TUI access\n\t\t},\n\n\t\tsetFooter(_factory: unknown): void {\n\t\t\t// Custom footer not supported in RPC mode - requires TUI access\n\t\t},\n\n\t\tsetHeader(_factory: unknown): void {\n\t\t\t// Custom header not supported in RPC mode - requires TUI access\n\t\t},\n\n\t\tsetTitle(title: string): void {\n\t\t\t// Fire and forget - host can implement terminal title control\n\t\t\toutput({\n\t\t\t\ttype: \"extension_ui_request\",\n\t\t\t\tid: crypto.randomUUID(),\n\t\t\t\tmethod: \"setTitle\",\n\t\t\t\ttitle,\n\t\t\t} as RpcExtensionUIRequest);\n\t\t},\n\n\t\tasync custom() {\n\t\t\t// Custom UI not supported in RPC mode\n\t\t\treturn undefined as never;\n\t\t},\n\n\t\tpasteToEditor(text: string): void {\n\t\t\t// Paste handling not supported in RPC mode - falls back to setEditorText\n\t\t\tthis.setEditorText(text);\n\t\t},\n\n\t\tsetEditorText(text: string): void {\n\t\t\t// Fire and forget - host can implement editor control\n\t\t\toutput({\n\t\t\t\ttype: \"extension_ui_request\",\n\t\t\t\tid: crypto.randomUUID(),\n\t\t\t\tmethod: \"set_editor_text\",\n\t\t\t\ttext,\n\t\t\t} as RpcExtensionUIRequest);\n\t\t},\n\n\t\tgetEditorText(): string {\n\t\t\t// Synchronous method can't wait for RPC response\n\t\t\t// Host should track editor state locally if needed\n\t\t\treturn \"\";\n\t\t},\n\n\t\tasync editor(title: string, prefill?: string): Promise<string | undefined> {\n\t\t\tconst id = crypto.randomUUID();\n\t\t\treturn new Promise((resolve, reject) => {\n\t\t\t\tpendingExtensionRequests.set(id, {\n\t\t\t\t\tresolve: (response: RpcExtensionUIResponse) => {\n\t\t\t\t\t\tif (\"cancelled\" in response && response.cancelled) {\n\t\t\t\t\t\t\tresolve(undefined);\n\t\t\t\t\t\t} else if (\"value\" in response) {\n\t\t\t\t\t\t\tresolve(response.value);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tresolve(undefined);\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\treject,\n\t\t\t\t});\n\t\t\t\toutput({ type: \"extension_ui_request\", id, method: \"editor\", title, prefill } as RpcExtensionUIRequest);\n\t\t\t});\n\t\t},\n\n\t\tsetEditorComponent(): void {\n\t\t\t// Custom editor components not supported in RPC mode\n\t\t},\n\n\t\tget theme() {\n\t\t\treturn theme;\n\t\t},\n\n\t\tgetAllThemes() {\n\t\t\treturn [];\n\t\t},\n\n\t\tgetTheme(_name: string) {\n\t\t\treturn undefined;\n\t\t},\n\n\t\tsetTheme(_theme: string | Theme) {\n\t\t\t// Theme switching not supported in RPC mode\n\t\t\treturn { success: false, error: \"Theme switching not supported in RPC mode\" };\n\t\t},\n\n\t\tgetToolsExpanded() {\n\t\t\t// Tool expansion not supported in RPC mode - no TUI\n\t\t\treturn false;\n\t\t},\n\n\t\tsetToolsExpanded(_expanded: boolean) {\n\t\t\t// Tool expansion not supported in RPC mode - no TUI\n\t\t},\n\t});\n\n\tconst rebindSession = async (): Promise<void> => {\n\t\tsession = runtimeHost.session;\n\t\tawait session.bindExtensions({\n\t\t\tuiContext: createExtensionUIContext(),\n\t\t\tcommandContextActions: {\n\t\t\t\twaitForIdle: () => session.agent.waitForIdle(),\n\t\t\t\tnewSession: async (options) => {\n\t\t\t\t\tconst result = await runtimeHost.newSession(options);\n\t\t\t\t\tif (!result.cancelled) {\n\t\t\t\t\t\tawait rebindSession();\n\t\t\t\t\t}\n\t\t\t\t\treturn result;\n\t\t\t\t},\n\t\t\t\tfork: async (entryId) => {\n\t\t\t\t\tconst result = await runtimeHost.fork(entryId);\n\t\t\t\t\tif (!result.cancelled) {\n\t\t\t\t\t\tawait rebindSession();\n\t\t\t\t\t}\n\t\t\t\t\treturn { cancelled: result.cancelled };\n\t\t\t\t},\n\t\t\t\tnavigateTree: async (targetId, options) => {\n\t\t\t\t\tconst result = await session.navigateTree(targetId, {\n\t\t\t\t\t\tsummarize: options?.summarize,\n\t\t\t\t\t\tcustomInstructions: options?.customInstructions,\n\t\t\t\t\t\treplaceInstructions: options?.replaceInstructions,\n\t\t\t\t\t\tlabel: options?.label,\n\t\t\t\t\t});\n\t\t\t\t\treturn { cancelled: result.cancelled };\n\t\t\t\t},\n\t\t\t\tswitchSession: async (sessionPath) => {\n\t\t\t\t\tconst result = await runtimeHost.switchSession(sessionPath);\n\t\t\t\t\tif (!result.cancelled) {\n\t\t\t\t\t\tawait rebindSession();\n\t\t\t\t\t}\n\t\t\t\t\treturn result;\n\t\t\t\t},\n\t\t\t\treload: async () => {\n\t\t\t\t\tawait session.reload();\n\t\t\t\t},\n\t\t\t},\n\t\t\tshutdownHandler: () => {\n\t\t\t\tshutdownRequested = true;\n\t\t\t},\n\t\t\tonError: (err) => {\n\t\t\t\toutput({ type: \"extension_error\", extensionPath: err.extensionPath, event: err.event, error: err.error });\n\t\t\t},\n\t\t});\n\n\t\tunsubscribe?.();\n\t\tunsubscribe = session.subscribe((event) => {\n\t\t\toutput(event);\n\t\t});\n\t};\n\n\tawait rebindSession();\n\n\t// Handle a single command\n\tconst handleCommand = async (command: RpcCommand): Promise<RpcResponse> => {\n\t\tconst id = command.id;\n\n\t\tswitch (command.type) {\n\t\t\t// =================================================================\n\t\t\t// Prompting\n\t\t\t// =================================================================\n\n\t\t\tcase \"prompt\": {\n\t\t\t\t// Don't await - events will stream\n\t\t\t\t// Extension commands are executed immediately, file prompt templates are expanded\n\t\t\t\t// If streaming and streamingBehavior specified, queues via steer/followUp\n\t\t\t\tsession\n\t\t\t\t\t.prompt(command.message, {\n\t\t\t\t\t\timages: command.images,\n\t\t\t\t\t\tstreamingBehavior: command.streamingBehavior,\n\t\t\t\t\t\tsource: \"rpc\",\n\t\t\t\t\t})\n\t\t\t\t\t.catch((e) => output(error(id, \"prompt\", e.message)));\n\t\t\t\treturn success(id, \"prompt\");\n\t\t\t}\n\n\t\t\tcase \"steer\": {\n\t\t\t\tawait session.steer(command.message, command.images);\n\t\t\t\treturn success(id, \"steer\");\n\t\t\t}\n\n\t\t\tcase \"follow_up\": {\n\t\t\t\tawait session.followUp(command.message, command.images);\n\t\t\t\treturn success(id, \"follow_up\");\n\t\t\t}\n\n\t\t\tcase \"abort\": {\n\t\t\t\tawait session.abort();\n\t\t\t\treturn success(id, \"abort\");\n\t\t\t}\n\n\t\t\tcase \"new_session\": {\n\t\t\t\tconst options = command.parentSession ? { parentSession: command.parentSession } : undefined;\n\t\t\t\tconst result = await runtimeHost.newSession(options);\n\t\t\t\tif (!result.cancelled) {\n\t\t\t\t\tawait rebindSession();\n\t\t\t\t}\n\t\t\t\treturn success(id, \"new_session\", result);\n\t\t\t}\n\n\t\t\t// =================================================================\n\t\t\t// State\n\t\t\t// =================================================================\n\n\t\t\tcase \"get_state\": {\n\t\t\t\tconst state: RpcSessionState = {\n\t\t\t\t\tmodel: session.model,\n\t\t\t\t\tthinkingLevel: session.thinkingLevel,\n\t\t\t\t\tisStreaming: session.isStreaming,\n\t\t\t\t\tisCompacting: session.isCompacting,\n\t\t\t\t\tsteeringMode: session.steeringMode,\n\t\t\t\t\tfollowUpMode: session.followUpMode,\n\t\t\t\t\tsessionFile: session.sessionFile,\n\t\t\t\t\tsessionId: session.sessionId,\n\t\t\t\t\tsessionName: session.sessionName,\n\t\t\t\t\tautoCompactionEnabled: session.autoCompactionEnabled,\n\t\t\t\t\tmessageCount: session.messages.length,\n\t\t\t\t\tpendingMessageCount: session.pendingMessageCount,\n\t\t\t\t};\n\t\t\t\treturn success(id, \"get_state\", state);\n\t\t\t}\n\n\t\t\t// =================================================================\n\t\t\t// Model\n\t\t\t// =================================================================\n\n\t\t\tcase \"set_model\": {\n\t\t\t\tconst models = await session.modelRegistry.getAvailable();\n\t\t\t\tconst model = models.find((m) => m.provider === command.provider && m.id === command.modelId);\n\t\t\t\tif (!model) {\n\t\t\t\t\treturn error(id, \"set_model\", `Model not found: ${command.provider}/${command.modelId}`);\n\t\t\t\t}\n\t\t\t\tawait session.setModel(model);\n\t\t\t\treturn success(id, \"set_model\", model);\n\t\t\t}\n\n\t\t\tcase \"cycle_model\": {\n\t\t\t\tconst result = await session.cycleModel();\n\t\t\t\tif (!result) {\n\t\t\t\t\treturn success(id, \"cycle_model\", null);\n\t\t\t\t}\n\t\t\t\treturn success(id, \"cycle_model\", result);\n\t\t\t}\n\n\t\t\tcase \"get_available_models\": {\n\t\t\t\tconst models = await session.modelRegistry.getAvailable();\n\t\t\t\treturn success(id, \"get_available_models\", { models });\n\t\t\t}\n\n\t\t\t// =================================================================\n\t\t\t// Thinking\n\t\t\t// =================================================================\n\n\t\t\tcase \"set_thinking_level\": {\n\t\t\t\tsession.setThinkingLevel(command.level);\n\t\t\t\treturn success(id, \"set_thinking_level\");\n\t\t\t}\n\n\t\t\tcase \"cycle_thinking_level\": {\n\t\t\t\tconst level = session.cycleThinkingLevel();\n\t\t\t\tif (!level) {\n\t\t\t\t\treturn success(id, \"cycle_thinking_level\", null);\n\t\t\t\t}\n\t\t\t\treturn success(id, \"cycle_thinking_level\", { level });\n\t\t\t}\n\n\t\t\t// =================================================================\n\t\t\t// Queue Modes\n\t\t\t// =================================================================\n\n\t\t\tcase \"set_steering_mode\": {\n\t\t\t\tsession.setSteeringMode(command.mode);\n\t\t\t\treturn success(id, \"set_steering_mode\");\n\t\t\t}\n\n\t\t\tcase \"set_follow_up_mode\": {\n\t\t\t\tsession.setFollowUpMode(command.mode);\n\t\t\t\treturn success(id, \"set_follow_up_mode\");\n\t\t\t}\n\n\t\t\t// =================================================================\n\t\t\t// Compaction\n\t\t\t// =================================================================\n\n\t\t\tcase \"compact\": {\n\t\t\t\tconst result = await session.compact(command.customInstructions);\n\t\t\t\treturn success(id, \"compact\", result);\n\t\t\t}\n\n\t\t\tcase \"set_auto_compaction\": {\n\t\t\t\tsession.setAutoCompactionEnabled(command.enabled);\n\t\t\t\treturn success(id, \"set_auto_compaction\");\n\t\t\t}\n\n\t\t\t// =================================================================\n\t\t\t// Retry\n\t\t\t// =================================================================\n\n\t\t\tcase \"set_auto_retry\": {\n\t\t\t\tsession.setAutoRetryEnabled(command.enabled);\n\t\t\t\treturn success(id, \"set_auto_retry\");\n\t\t\t}\n\n\t\t\tcase \"abort_retry\": {\n\t\t\t\tsession.abortRetry();\n\t\t\t\treturn success(id, \"abort_retry\");\n\t\t\t}\n\n\t\t\t// =================================================================\n\t\t\t// Bash\n\t\t\t// =================================================================\n\n\t\t\tcase \"bash\": {\n\t\t\t\tconst result = await session.executeBash(command.command);\n\t\t\t\treturn success(id, \"bash\", result);\n\t\t\t}\n\n\t\t\tcase \"abort_bash\": {\n\t\t\t\tsession.abortBash();\n\t\t\t\treturn success(id, \"abort_bash\");\n\t\t\t}\n\n\t\t\t// =================================================================\n\t\t\t// Session\n\t\t\t// =================================================================\n\n\t\t\tcase \"get_session_stats\": {\n\t\t\t\tconst stats = session.getSessionStats();\n\t\t\t\treturn success(id, \"get_session_stats\", stats);\n\t\t\t}\n\n\t\t\tcase \"export_html\": {\n\t\t\t\tconst path = await session.exportToHtml(command.outputPath);\n\t\t\t\treturn success(id, \"export_html\", { path });\n\t\t\t}\n\n\t\t\tcase \"switch_session\": {\n\t\t\t\tconst result = await runtimeHost.switchSession(command.sessionPath);\n\t\t\t\tif (!result.cancelled) {\n\t\t\t\t\tawait rebindSession();\n\t\t\t\t}\n\t\t\t\treturn success(id, \"switch_session\", result);\n\t\t\t}\n\n\t\t\tcase \"fork\": {\n\t\t\t\tconst result = await runtimeHost.fork(command.entryId);\n\t\t\t\tif (!result.cancelled) {\n\t\t\t\t\tawait rebindSession();\n\t\t\t\t}\n\t\t\t\treturn success(id, \"fork\", { text: result.selectedText, cancelled: result.cancelled });\n\t\t\t}\n\n\t\t\tcase \"get_fork_messages\": {\n\t\t\t\tconst messages = session.getUserMessagesForForking();\n\t\t\t\treturn success(id, \"get_fork_messages\", { messages });\n\t\t\t}\n\n\t\t\tcase \"get_last_assistant_text\": {\n\t\t\t\tconst text = session.getLastAssistantText();\n\t\t\t\treturn success(id, \"get_last_assistant_text\", { text });\n\t\t\t}\n\n\t\t\tcase \"set_session_name\": {\n\t\t\t\tconst name = command.name.trim();\n\t\t\t\tif (!name) {\n\t\t\t\t\treturn error(id, \"set_session_name\", \"Session name cannot be empty\");\n\t\t\t\t}\n\t\t\t\tsession.setSessionName(name);\n\t\t\t\treturn success(id, \"set_session_name\");\n\t\t\t}\n\n\t\t\t// =================================================================\n\t\t\t// Messages\n\t\t\t// =================================================================\n\n\t\t\tcase \"get_messages\": {\n\t\t\t\treturn success(id, \"get_messages\", { messages: session.messages });\n\t\t\t}\n\n\t\t\t// =================================================================\n\t\t\t// Commands (available for invocation via prompt)\n\t\t\t// =================================================================\n\n\t\t\tcase \"get_commands\": {\n\t\t\t\tconst commands: RpcSlashCommand[] = [];\n\n\t\t\t\tfor (const command of session.extensionRunner?.getRegisteredCommands() ?? []) {\n\t\t\t\t\tcommands.push({\n\t\t\t\t\t\tname: command.invocationName,\n\t\t\t\t\t\tdescription: command.description,\n\t\t\t\t\t\tsource: \"extension\",\n\t\t\t\t\t\tsourceInfo: command.sourceInfo,\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\tfor (const template of session.promptTemplates) {\n\t\t\t\t\tcommands.push({\n\t\t\t\t\t\tname: template.name,\n\t\t\t\t\t\tdescription: template.description,\n\t\t\t\t\t\tsource: \"prompt\",\n\t\t\t\t\t\tsourceInfo: template.sourceInfo,\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\tfor (const skill of session.resourceLoader.getSkills().skills) {\n\t\t\t\t\tcommands.push({\n\t\t\t\t\t\tname: `skill:${skill.name}`,\n\t\t\t\t\t\tdescription: skill.description,\n\t\t\t\t\t\tsource: \"skill\",\n\t\t\t\t\t\tsourceInfo: skill.sourceInfo,\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\treturn success(id, \"get_commands\", { commands });\n\t\t\t}\n\n\t\t\tdefault: {\n\t\t\t\tconst unknownCommand = command as { type: string };\n\t\t\t\treturn error(undefined, unknownCommand.type, `Unknown command: ${unknownCommand.type}`);\n\t\t\t}\n\t\t}\n\t};\n\n\t/**\n\t * Check if shutdown was requested and perform shutdown if so.\n\t * Called after handling each command when waiting for the next command.\n\t */\n\tlet detachInput = () => {};\n\n\tasync function shutdown(): Promise<never> {\n\t\tunsubscribe?.();\n\t\tawait runtimeHost.dispose();\n\t\tdetachInput();\n\t\tprocess.stdin.pause();\n\t\tprocess.exit(0);\n\t}\n\n\tasync function checkShutdownRequested(): Promise<void> {\n\t\tif (!shutdownRequested) return;\n\t\tawait shutdown();\n\t}\n\n\tconst handleInputLine = async (line: string) => {\n\t\tlet parsed: unknown;\n\t\ttry {\n\t\t\tparsed = JSON.parse(line);\n\t\t} catch (parseError: unknown) {\n\t\t\toutput(\n\t\t\t\terror(\n\t\t\t\t\tundefined,\n\t\t\t\t\t\"parse\",\n\t\t\t\t\t`Failed to parse command: ${parseError instanceof Error ? parseError.message : String(parseError)}`,\n\t\t\t\t),\n\t\t\t);\n\t\t\treturn;\n\t\t}\n\n\t\t// Handle extension UI responses\n\t\tif (\n\t\t\ttypeof parsed === \"object\" &&\n\t\t\tparsed !== null &&\n\t\t\t\"type\" in parsed &&\n\t\t\tparsed.type === \"extension_ui_response\"\n\t\t) {\n\t\t\tconst response = parsed as RpcExtensionUIResponse;\n\t\t\tconst pending = pendingExtensionRequests.get(response.id);\n\t\t\tif (pending) {\n\t\t\t\tpendingExtensionRequests.delete(response.id);\n\t\t\t\tpending.resolve(response);\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\tconst command = parsed as RpcCommand;\n\t\ttry {\n\t\t\tconst response = await handleCommand(command);\n\t\t\toutput(response);\n\t\t\tawait checkShutdownRequested();\n\t\t} catch (commandError: unknown) {\n\t\t\toutput(\n\t\t\t\terror(\n\t\t\t\t\tcommand.id,\n\t\t\t\t\tcommand.type,\n\t\t\t\t\tcommandError instanceof Error ? commandError.message : String(commandError),\n\t\t\t\t),\n\t\t\t);\n\t\t}\n\t};\n\n\tconst onInputEnd = () => {\n\t\tvoid shutdown();\n\t};\n\tprocess.stdin.on(\"end\", onInputEnd);\n\n\tdetachInput = (() => {\n\t\tconst detachJsonl = attachJsonlLineReader(process.stdin, (line) => {\n\t\t\tvoid handleInputLine(line);\n\t\t});\n\t\treturn () => {\n\t\t\tdetachJsonl();\n\t\t\tprocess.stdin.off(\"end\", onInputEnd);\n\t\t};\n\t})();\n\n\t// Keep process alive forever\n\treturn new Promise(() => {});\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"rpc-mode.js","sourceRoot":"","sources":["../../../src/modes/rpc/rpc-mode.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AAOtC,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5E,OAAO,EAAc,KAAK,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAmBtE;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,UAAU,CAAC,WAAgC,EAAkB;IAClF,cAAc,EAAE,CAAC;IACjB,IAAI,OAAO,GAAG,WAAW,CAAC,OAAO,CAAC;IAClC,IAAI,WAAqC,CAAC;IAE1C,MAAM,MAAM,GAAG,CAAC,GAAiD,EAAE,EAAE,CAAC;QACrE,cAAc,CAAC,iBAAiB,CAAC,GAAG,CAAC,CAAC,CAAC;IAAA,CACvC,CAAC;IAEF,MAAM,OAAO,GAAG,CACf,EAAsB,EACtB,OAAU,EACV,IAAoB,EACN,EAAE,CAAC;QACjB,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;YACxB,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAiB,C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C,CAAC;YAC9C,MAAM,CAAC,QAAQ,CAAC,CAAC;YACjB,MAAM,sBAAsB,EAAE,CAAC;QAChC,CAAC;QAAC,OAAO,YAAqB,EAAE,CAAC;YAChC,MAAM,CACL,KAAK,CACJ,OAAO,CAAC,EAAE,EACV,OAAO,CAAC,IAAI,EACZ,YAAY,YAAY,KAAK,CAAC,CAAC,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,YAAY,CAAC,CAC3E,CACD,CAAC;QACH,CAAC;IAAA,CACD,CAAC;IAEF,MAAM,UAAU,GAAG,GAAG,EAAE,CAAC;QACxB,KAAK,QAAQ,EAAE,CAAC;IAAA,CAChB,CAAC;IACF,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;IAEpC,WAAW,GAAG,CAAC,GAAG,EAAE,CAAC;QACpB,MAAM,WAAW,GAAG,qBAAqB,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC;YAClE,KAAK,eAAe,CAAC,IAAI,CAAC,CAAC;QAAA,CAC3B,CAAC,CAAC;QACH,OAAO,GAAG,EAAE,CAAC;YACZ,WAAW,EAAE,CAAC;YACd,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;QAAA,CACrC,CAAC;IAAA,CACF,CAAC,EAAE,CAAC;IAEL,6BAA6B;IAC7B,OAAO,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC,EAAC,CAAC,CAAC,CAAC;AAAA,CAC7B","sourcesContent":["/**\n * RPC mode: Headless operation with JSON stdin/stdout protocol.\n *\n * Used for embedding the agent in other applications.\n * Receives commands as JSON on stdin, outputs events and responses as JSON on stdout.\n *\n * Protocol:\n * - Commands: JSON objects with `type` field, optional `id` for correlation\n * - Responses: JSON objects with `type: \"response\"`, `command`, `success`, and optional `data`/`error`\n * - Events: AgentSessionEvent objects streamed as they occur\n * - Extension UI: Extension UI requests are emitted, client responds with extension_ui_response\n */\n\nimport * as crypto from \"node:crypto\";\nimport type { AgentSessionRuntime } from \"../../core/agent-session-runtime.js\";\nimport type {\n\tExtensionUIContext,\n\tExtensionUIDialogOptions,\n\tExtensionWidgetOptions,\n} from \"../../core/extensions/index.js\";\nimport { takeOverStdout, writeRawStdout } from \"../../core/output-guard.js\";\nimport { type Theme, theme } from \"../interactive/theme/theme.js\";\nimport { attachJsonlLineReader, serializeJsonLine } from \"./jsonl.js\";\nimport type {\n\tRpcCommand,\n\tRpcExtensionUIRequest,\n\tRpcExtensionUIResponse,\n\tRpcResponse,\n\tRpcSessionState,\n\tRpcSlashCommand,\n} from \"./rpc-types.js\";\n\n// Re-export types for consumers\nexport type {\n\tRpcCommand,\n\tRpcExtensionUIRequest,\n\tRpcExtensionUIResponse,\n\tRpcResponse,\n\tRpcSessionState,\n} from \"./rpc-types.js\";\n\n/**\n * Run in RPC mode.\n * Listens for JSON commands on stdin, outputs events and responses on stdout.\n */\nexport async function runRpcMode(runtimeHost: AgentSessionRuntime): Promise<never> {\n\ttakeOverStdout();\n\tlet session = runtimeHost.session;\n\tlet unsubscribe: (() => void) | undefined;\n\n\tconst output = (obj: RpcResponse | RpcExtensionUIRequest | object) => {\n\t\twriteRawStdout(serializeJsonLine(obj));\n\t};\n\n\tconst success = <T extends RpcCommand[\"type\"]>(\n\t\tid: string | undefined,\n\t\tcommand: T,\n\t\tdata?: object | null,\n\t): RpcResponse => {\n\t\tif (data === undefined) {\n\t\t\treturn { id, type: \"response\", command, success: true } as RpcResponse;\n\t\t}\n\t\treturn { id, type: \"response\", command, success: true, data } as RpcResponse;\n\t};\n\n\tconst error = (id: string | undefined, command: string, message: string): RpcResponse => {\n\t\treturn { id, type: \"response\", command, success: false, error: message };\n\t};\n\n\t// Pending extension UI requests waiting for response\n\tconst pendingExtensionRequests = new Map<\n\t\tstring,\n\t\t{ resolve: (value: any) => void; reject: (error: Error) => void }\n\t>();\n\n\t// Shutdown request flag\n\tlet shutdownRequested = false;\n\n\t/** Helper for dialog methods with signal/timeout support */\n\tfunction createDialogPromise<T>(\n\t\topts: ExtensionUIDialogOptions | undefined,\n\t\tdefaultValue: T,\n\t\trequest: Record<string, unknown>,\n\t\tparseResponse: (response: RpcExtensionUIResponse) => T,\n\t): Promise<T> {\n\t\tif (opts?.signal?.aborted) return Promise.resolve(defaultValue);\n\n\t\tconst id = crypto.randomUUID();\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tlet timeoutId: ReturnType<typeof setTimeout> | undefined;\n\n\t\t\tconst cleanup = () => {\n\t\t\t\tif (timeoutId) clearTimeout(timeoutId);\n\t\t\t\topts?.signal?.removeEventListener(\"abort\", onAbort);\n\t\t\t\tpendingExtensionRequests.delete(id);\n\t\t\t};\n\n\t\t\tconst onAbort = () => {\n\t\t\t\tcleanup();\n\t\t\t\tresolve(defaultValue);\n\t\t\t};\n\t\t\topts?.signal?.addEventListener(\"abort\", onAbort, { once: true });\n\n\t\t\tif (opts?.timeout) {\n\t\t\t\ttimeoutId = setTimeout(() => {\n\t\t\t\t\tcleanup();\n\t\t\t\t\tresolve(defaultValue);\n\t\t\t\t}, opts.timeout);\n\t\t\t}\n\n\t\t\tpendingExtensionRequests.set(id, {\n\t\t\t\tresolve: (response: RpcExtensionUIResponse) => {\n\t\t\t\t\tcleanup();\n\t\t\t\t\tresolve(parseResponse(response));\n\t\t\t\t},\n\t\t\t\treject,\n\t\t\t});\n\t\t\toutput({ type: \"extension_ui_request\", id, ...request } as RpcExtensionUIRequest);\n\t\t});\n\t}\n\n\t/**\n\t * Create an extension UI context that uses the RPC protocol.\n\t */\n\tconst createExtensionUIContext = (): ExtensionUIContext => ({\n\t\tselect: (title, options, opts) =>\n\t\t\tcreateDialogPromise(opts, undefined, { method: \"select\", title, options, timeout: opts?.timeout }, (r) =>\n\t\t\t\t\"cancelled\" in r && r.cancelled ? undefined : \"value\" in r ? r.value : undefined,\n\t\t\t),\n\n\t\tconfirm: (title, message, opts) =>\n\t\t\tcreateDialogPromise(opts, false, { method: \"confirm\", title, message, timeout: opts?.timeout }, (r) =>\n\t\t\t\t\"cancelled\" in r && r.cancelled ? false : \"confirmed\" in r ? r.confirmed : false,\n\t\t\t),\n\n\t\tinput: (title, placeholder, opts) =>\n\t\t\tcreateDialogPromise(opts, undefined, { method: \"input\", title, placeholder, timeout: opts?.timeout }, (r) =>\n\t\t\t\t\"cancelled\" in r && r.cancelled ? undefined : \"value\" in r ? r.value : undefined,\n\t\t\t),\n\n\t\tnotify(message: string, type?: \"info\" | \"warning\" | \"error\"): void {\n\t\t\t// Fire and forget - no response needed\n\t\t\toutput({\n\t\t\t\ttype: \"extension_ui_request\",\n\t\t\t\tid: crypto.randomUUID(),\n\t\t\t\tmethod: \"notify\",\n\t\t\t\tmessage,\n\t\t\t\tnotifyType: type,\n\t\t\t} as RpcExtensionUIRequest);\n\t\t},\n\n\t\tonTerminalInput(): () => void {\n\t\t\t// Raw terminal input not supported in RPC mode\n\t\t\treturn () => {};\n\t\t},\n\n\t\tsetStatus(key: string, text: string | undefined): void {\n\t\t\t// Fire and forget - no response needed\n\t\t\toutput({\n\t\t\t\ttype: \"extension_ui_request\",\n\t\t\t\tid: crypto.randomUUID(),\n\t\t\t\tmethod: \"setStatus\",\n\t\t\t\tstatusKey: key,\n\t\t\t\tstatusText: text,\n\t\t\t} as RpcExtensionUIRequest);\n\t\t},\n\n\t\tsetWorkingMessage(_message?: string): void {\n\t\t\t// Working message not supported in RPC mode - requires TUI loader access\n\t\t},\n\n\t\tsetHiddenThinkingLabel(_label?: string): void {\n\t\t\t// Hidden thinking label not supported in RPC mode - requires TUI message rendering access\n\t\t},\n\n\t\tsetWidget(key: string, content: unknown, options?: ExtensionWidgetOptions): void {\n\t\t\t// Only support string arrays in RPC mode - factory functions are ignored\n\t\t\tif (content === undefined || Array.isArray(content)) {\n\t\t\t\toutput({\n\t\t\t\t\ttype: \"extension_ui_request\",\n\t\t\t\t\tid: crypto.randomUUID(),\n\t\t\t\t\tmethod: \"setWidget\",\n\t\t\t\t\twidgetKey: key,\n\t\t\t\t\twidgetLines: content as string[] | undefined,\n\t\t\t\t\twidgetPlacement: options?.placement,\n\t\t\t\t} as RpcExtensionUIRequest);\n\t\t\t}\n\t\t\t// Component factories are not supported in RPC mode - would need TUI access\n\t\t},\n\n\t\tsetFooter(_factory: unknown): void {\n\t\t\t// Custom footer not supported in RPC mode - requires TUI access\n\t\t},\n\n\t\tsetHeader(_factory: unknown): void {\n\t\t\t// Custom header not supported in RPC mode - requires TUI access\n\t\t},\n\n\t\tsetTitle(title: string): void {\n\t\t\t// Fire and forget - host can implement terminal title control\n\t\t\toutput({\n\t\t\t\ttype: \"extension_ui_request\",\n\t\t\t\tid: crypto.randomUUID(),\n\t\t\t\tmethod: \"setTitle\",\n\t\t\t\ttitle,\n\t\t\t} as RpcExtensionUIRequest);\n\t\t},\n\n\t\tasync custom() {\n\t\t\t// Custom UI not supported in RPC mode\n\t\t\treturn undefined as never;\n\t\t},\n\n\t\tpasteToEditor(text: string): void {\n\t\t\t// Paste handling not supported in RPC mode - falls back to setEditorText\n\t\t\tthis.setEditorText(text);\n\t\t},\n\n\t\tsetEditorText(text: string): void {\n\t\t\t// Fire and forget - host can implement editor control\n\t\t\toutput({\n\t\t\t\ttype: \"extension_ui_request\",\n\t\t\t\tid: crypto.randomUUID(),\n\t\t\t\tmethod: \"set_editor_text\",\n\t\t\t\ttext,\n\t\t\t} as RpcExtensionUIRequest);\n\t\t},\n\n\t\tgetEditorText(): string {\n\t\t\t// Synchronous method can't wait for RPC response\n\t\t\t// Host should track editor state locally if needed\n\t\t\treturn \"\";\n\t\t},\n\n\t\tasync editor(title: string, prefill?: string): Promise<string | undefined> {\n\t\t\tconst id = crypto.randomUUID();\n\t\t\treturn new Promise((resolve, reject) => {\n\t\t\t\tpendingExtensionRequests.set(id, {\n\t\t\t\t\tresolve: (response: RpcExtensionUIResponse) => {\n\t\t\t\t\t\tif (\"cancelled\" in response && response.cancelled) {\n\t\t\t\t\t\t\tresolve(undefined);\n\t\t\t\t\t\t} else if (\"value\" in response) {\n\t\t\t\t\t\t\tresolve(response.value);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tresolve(undefined);\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\treject,\n\t\t\t\t});\n\t\t\t\toutput({ type: \"extension_ui_request\", id, method: \"editor\", title, prefill } as RpcExtensionUIRequest);\n\t\t\t});\n\t\t},\n\n\t\tsetEditorComponent(): void {\n\t\t\t// Custom editor components not supported in RPC mode\n\t\t},\n\n\t\tget theme() {\n\t\t\treturn theme;\n\t\t},\n\n\t\tgetAllThemes() {\n\t\t\treturn [];\n\t\t},\n\n\t\tgetTheme(_name: string) {\n\t\t\treturn undefined;\n\t\t},\n\n\t\tsetTheme(_theme: string | Theme) {\n\t\t\t// Theme switching not supported in RPC mode\n\t\t\treturn { success: false, error: \"Theme switching not supported in RPC mode\" };\n\t\t},\n\n\t\tgetToolsExpanded() {\n\t\t\t// Tool expansion not supported in RPC mode - no TUI\n\t\t\treturn false;\n\t\t},\n\n\t\tsetToolsExpanded(_expanded: boolean) {\n\t\t\t// Tool expansion not supported in RPC mode - no TUI\n\t\t},\n\t});\n\n\tconst rebindSession = async (): Promise<void> => {\n\t\tsession = runtimeHost.session;\n\t\tawait session.bindExtensions({\n\t\t\tuiContext: createExtensionUIContext(),\n\t\t\tcommandContextActions: {\n\t\t\t\twaitForIdle: () => session.agent.waitForIdle(),\n\t\t\t\tnewSession: async (options) => {\n\t\t\t\t\tconst result = await runtimeHost.newSession(options);\n\t\t\t\t\tif (!result.cancelled) {\n\t\t\t\t\t\tawait rebindSession();\n\t\t\t\t\t}\n\t\t\t\t\treturn result;\n\t\t\t\t},\n\t\t\t\tfork: async (entryId) => {\n\t\t\t\t\tconst result = await runtimeHost.fork(entryId);\n\t\t\t\t\tif (!result.cancelled) {\n\t\t\t\t\t\tawait rebindSession();\n\t\t\t\t\t}\n\t\t\t\t\treturn { cancelled: result.cancelled };\n\t\t\t\t},\n\t\t\t\tnavigateTree: async (targetId, options) => {\n\t\t\t\t\tconst result = await session.navigateTree(targetId, {\n\t\t\t\t\t\tsummarize: options?.summarize,\n\t\t\t\t\t\tcustomInstructions: options?.customInstructions,\n\t\t\t\t\t\treplaceInstructions: options?.replaceInstructions,\n\t\t\t\t\t\tlabel: options?.label,\n\t\t\t\t\t});\n\t\t\t\t\treturn { cancelled: result.cancelled };\n\t\t\t\t},\n\t\t\t\tswitchSession: async (sessionPath) => {\n\t\t\t\t\tconst result = await runtimeHost.switchSession(sessionPath);\n\t\t\t\t\tif (!result.cancelled) {\n\t\t\t\t\t\tawait rebindSession();\n\t\t\t\t\t}\n\t\t\t\t\treturn result;\n\t\t\t\t},\n\t\t\t\treload: async () => {\n\t\t\t\t\tawait session.reload();\n\t\t\t\t},\n\t\t\t},\n\t\t\tshutdownHandler: () => {\n\t\t\t\tshutdownRequested = true;\n\t\t\t},\n\t\t\tonError: (err) => {\n\t\t\t\toutput({ type: \"extension_error\", extensionPath: err.extensionPath, event: err.event, error: err.error });\n\t\t\t},\n\t\t});\n\n\t\tunsubscribe?.();\n\t\tunsubscribe = session.subscribe((event) => {\n\t\t\toutput(event);\n\t\t});\n\t};\n\n\tawait rebindSession();\n\n\t// Handle a single command\n\tconst handleCommand = async (command: RpcCommand): Promise<RpcResponse> => {\n\t\tconst id = command.id;\n\n\t\tswitch (command.type) {\n\t\t\t// =================================================================\n\t\t\t// Prompting\n\t\t\t// =================================================================\n\n\t\t\tcase \"prompt\": {\n\t\t\t\t// Don't await - events will stream\n\t\t\t\t// Extension commands are executed immediately, file prompt templates are expanded\n\t\t\t\t// If streaming and streamingBehavior specified, queues via steer/followUp\n\t\t\t\tsession\n\t\t\t\t\t.prompt(command.message, {\n\t\t\t\t\t\timages: command.images,\n\t\t\t\t\t\tstreamingBehavior: command.streamingBehavior,\n\t\t\t\t\t\tsource: \"rpc\",\n\t\t\t\t\t})\n\t\t\t\t\t.catch((e) => output(error(id, \"prompt\", e.message)));\n\t\t\t\treturn success(id, \"prompt\");\n\t\t\t}\n\n\t\t\tcase \"steer\": {\n\t\t\t\tawait session.steer(command.message, command.images);\n\t\t\t\treturn success(id, \"steer\");\n\t\t\t}\n\n\t\t\tcase \"follow_up\": {\n\t\t\t\tawait session.followUp(command.message, command.images);\n\t\t\t\treturn success(id, \"follow_up\");\n\t\t\t}\n\n\t\t\tcase \"abort\": {\n\t\t\t\tawait session.abort();\n\t\t\t\treturn success(id, \"abort\");\n\t\t\t}\n\n\t\t\tcase \"new_session\": {\n\t\t\t\tconst options = command.parentSession ? { parentSession: command.parentSession } : undefined;\n\t\t\t\tconst result = await runtimeHost.newSession(options);\n\t\t\t\tif (!result.cancelled) {\n\t\t\t\t\tawait rebindSession();\n\t\t\t\t}\n\t\t\t\treturn success(id, \"new_session\", result);\n\t\t\t}\n\n\t\t\t// =================================================================\n\t\t\t// State\n\t\t\t// =================================================================\n\n\t\t\tcase \"get_state\": {\n\t\t\t\tconst state: RpcSessionState = {\n\t\t\t\t\tmodel: session.model,\n\t\t\t\t\tthinkingLevel: session.thinkingLevel,\n\t\t\t\t\tisStreaming: session.isStreaming,\n\t\t\t\t\tisCompacting: session.isCompacting,\n\t\t\t\t\tsteeringMode: session.steeringMode,\n\t\t\t\t\tfollowUpMode: session.followUpMode,\n\t\t\t\t\tsessionFile: session.sessionFile,\n\t\t\t\t\tsessionId: session.sessionId,\n\t\t\t\t\tsessionName: session.sessionName,\n\t\t\t\t\tautoCompactionEnabled: session.autoCompactionEnabled,\n\t\t\t\t\tmessageCount: session.messages.length,\n\t\t\t\t\tpendingMessageCount: session.pendingMessageCount,\n\t\t\t\t};\n\t\t\t\treturn success(id, \"get_state\", state);\n\t\t\t}\n\n\t\t\t// =================================================================\n\t\t\t// Model\n\t\t\t// =================================================================\n\n\t\t\tcase \"set_model\": {\n\t\t\t\tconst models = await session.modelRegistry.getAvailable();\n\t\t\t\tconst model = models.find((m) => m.provider === command.provider && m.id === command.modelId);\n\t\t\t\tif (!model) {\n\t\t\t\t\treturn error(id, \"set_model\", `Model not found: ${command.provider}/${command.modelId}`);\n\t\t\t\t}\n\t\t\t\tawait session.setModel(model);\n\t\t\t\treturn success(id, \"set_model\", model);\n\t\t\t}\n\n\t\t\tcase \"cycle_model\": {\n\t\t\t\tconst result = await session.cycleModel();\n\t\t\t\tif (!result) {\n\t\t\t\t\treturn success(id, \"cycle_model\", null);\n\t\t\t\t}\n\t\t\t\treturn success(id, \"cycle_model\", result);\n\t\t\t}\n\n\t\t\tcase \"get_available_models\": {\n\t\t\t\tconst models = await session.modelRegistry.getAvailable();\n\t\t\t\treturn success(id, \"get_available_models\", { models });\n\t\t\t}\n\n\t\t\t// =================================================================\n\t\t\t// Thinking\n\t\t\t// =================================================================\n\n\t\t\tcase \"set_thinking_level\": {\n\t\t\t\tsession.setThinkingLevel(command.level);\n\t\t\t\treturn success(id, \"set_thinking_level\");\n\t\t\t}\n\n\t\t\tcase \"cycle_thinking_level\": {\n\t\t\t\tconst level = session.cycleThinkingLevel();\n\t\t\t\tif (!level) {\n\t\t\t\t\treturn success(id, \"cycle_thinking_level\", null);\n\t\t\t\t}\n\t\t\t\treturn success(id, \"cycle_thinking_level\", { level });\n\t\t\t}\n\n\t\t\t// =================================================================\n\t\t\t// Queue Modes\n\t\t\t// =================================================================\n\n\t\t\tcase \"set_steering_mode\": {\n\t\t\t\tsession.setSteeringMode(command.mode);\n\t\t\t\treturn success(id, \"set_steering_mode\");\n\t\t\t}\n\n\t\t\tcase \"set_follow_up_mode\": {\n\t\t\t\tsession.setFollowUpMode(command.mode);\n\t\t\t\treturn success(id, \"set_follow_up_mode\");\n\t\t\t}\n\n\t\t\t// =================================================================\n\t\t\t// Compaction\n\t\t\t// =================================================================\n\n\t\t\tcase \"compact\": {\n\t\t\t\tconst result = await session.compact(command.customInstructions);\n\t\t\t\treturn success(id, \"compact\", result);\n\t\t\t}\n\n\t\t\tcase \"set_auto_compaction\": {\n\t\t\t\tsession.setAutoCompactionEnabled(command.enabled);\n\t\t\t\treturn success(id, \"set_auto_compaction\");\n\t\t\t}\n\n\t\t\t// =================================================================\n\t\t\t// Retry\n\t\t\t// =================================================================\n\n\t\t\tcase \"set_auto_retry\": {\n\t\t\t\tsession.setAutoRetryEnabled(command.enabled);\n\t\t\t\treturn success(id, \"set_auto_retry\");\n\t\t\t}\n\n\t\t\tcase \"abort_retry\": {\n\t\t\t\tsession.abortRetry();\n\t\t\t\treturn success(id, \"abort_retry\");\n\t\t\t}\n\n\t\t\t// =================================================================\n\t\t\t// Bash\n\t\t\t// =================================================================\n\n\t\t\tcase \"bash\": {\n\t\t\t\tconst result = await session.executeBash(command.command);\n\t\t\t\treturn success(id, \"bash\", result);\n\t\t\t}\n\n\t\t\tcase \"abort_bash\": {\n\t\t\t\tsession.abortBash();\n\t\t\t\treturn success(id, \"abort_bash\");\n\t\t\t}\n\n\t\t\t// =================================================================\n\t\t\t// Session\n\t\t\t// =================================================================\n\n\t\t\tcase \"get_session_stats\": {\n\t\t\t\tconst stats = session.getSessionStats();\n\t\t\t\treturn success(id, \"get_session_stats\", stats);\n\t\t\t}\n\n\t\t\tcase \"export_html\": {\n\t\t\t\tconst path = await session.exportToHtml(command.outputPath);\n\t\t\t\treturn success(id, \"export_html\", { path });\n\t\t\t}\n\n\t\t\tcase \"switch_session\": {\n\t\t\t\tconst result = await runtimeHost.switchSession(command.sessionPath);\n\t\t\t\tif (!result.cancelled) {\n\t\t\t\t\tawait rebindSession();\n\t\t\t\t}\n\t\t\t\treturn success(id, \"switch_session\", result);\n\t\t\t}\n\n\t\t\tcase \"fork\": {\n\t\t\t\tconst result = await runtimeHost.fork(command.entryId);\n\t\t\t\tif (!result.cancelled) {\n\t\t\t\t\tawait rebindSession();\n\t\t\t\t}\n\t\t\t\treturn success(id, \"fork\", { text: result.selectedText, cancelled: result.cancelled });\n\t\t\t}\n\n\t\t\tcase \"get_fork_messages\": {\n\t\t\t\tconst messages = session.getUserMessagesForForking();\n\t\t\t\treturn success(id, \"get_fork_messages\", { messages });\n\t\t\t}\n\n\t\t\tcase \"get_last_assistant_text\": {\n\t\t\t\tconst text = session.getLastAssistantText();\n\t\t\t\treturn success(id, \"get_last_assistant_text\", { text });\n\t\t\t}\n\n\t\t\tcase \"set_session_name\": {\n\t\t\t\tconst name = command.name.trim();\n\t\t\t\tif (!name) {\n\t\t\t\t\treturn error(id, \"set_session_name\", \"Session name cannot be empty\");\n\t\t\t\t}\n\t\t\t\tsession.setSessionName(name);\n\t\t\t\treturn success(id, \"set_session_name\");\n\t\t\t}\n\n\t\t\t// =================================================================\n\t\t\t// Messages\n\t\t\t// =================================================================\n\n\t\t\tcase \"get_messages\": {\n\t\t\t\treturn success(id, \"get_messages\", { messages: session.messages });\n\t\t\t}\n\n\t\t\t// =================================================================\n\t\t\t// Commands (available for invocation via prompt)\n\t\t\t// =================================================================\n\n\t\t\tcase \"get_commands\": {\n\t\t\t\tconst commands: RpcSlashCommand[] = [];\n\n\t\t\t\tfor (const command of session.extensionRunner?.getRegisteredCommands() ?? []) {\n\t\t\t\t\tcommands.push({\n\t\t\t\t\t\tname: command.invocationName,\n\t\t\t\t\t\tdescription: command.description,\n\t\t\t\t\t\tsource: \"extension\",\n\t\t\t\t\t\tsourceInfo: command.sourceInfo,\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\tfor (const template of session.promptTemplates) {\n\t\t\t\t\tcommands.push({\n\t\t\t\t\t\tname: template.name,\n\t\t\t\t\t\tdescription: template.description,\n\t\t\t\t\t\tsource: \"prompt\",\n\t\t\t\t\t\tsourceInfo: template.sourceInfo,\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\tfor (const skill of session.resourceLoader.getSkills().skills) {\n\t\t\t\t\tcommands.push({\n\t\t\t\t\t\tname: `skill:${skill.name}`,\n\t\t\t\t\t\tdescription: skill.description,\n\t\t\t\t\t\tsource: \"skill\",\n\t\t\t\t\t\tsourceInfo: skill.sourceInfo,\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\treturn success(id, \"get_commands\", { commands });\n\t\t\t}\n\n\t\t\tdefault: {\n\t\t\t\tconst unknownCommand = command as { type: string };\n\t\t\t\treturn error(undefined, unknownCommand.type, `Unknown command: ${unknownCommand.type}`);\n\t\t\t}\n\t\t}\n\t};\n\n\t/**\n\t * Check if shutdown was requested and perform shutdown if so.\n\t * Called after handling each command when waiting for the next command.\n\t */\n\tlet detachInput = () => {};\n\n\tasync function shutdown(): Promise<never> {\n\t\tunsubscribe?.();\n\t\tawait runtimeHost.dispose();\n\t\tdetachInput();\n\t\tprocess.stdin.pause();\n\t\tprocess.exit(0);\n\t}\n\n\tasync function checkShutdownRequested(): Promise<void> {\n\t\tif (!shutdownRequested) return;\n\t\tawait shutdown();\n\t}\n\n\tconst handleInputLine = async (line: string) => {\n\t\tlet parsed: unknown;\n\t\ttry {\n\t\t\tparsed = JSON.parse(line);\n\t\t} catch (parseError: unknown) {\n\t\t\toutput(\n\t\t\t\terror(\n\t\t\t\t\tundefined,\n\t\t\t\t\t\"parse\",\n\t\t\t\t\t`Failed to parse command: ${parseError instanceof Error ? parseError.message : String(parseError)}`,\n\t\t\t\t),\n\t\t\t);\n\t\t\treturn;\n\t\t}\n\n\t\t// Handle extension UI responses\n\t\tif (\n\t\t\ttypeof parsed === \"object\" &&\n\t\t\tparsed !== null &&\n\t\t\t\"type\" in parsed &&\n\t\t\tparsed.type === \"extension_ui_response\"\n\t\t) {\n\t\t\tconst response = parsed as RpcExtensionUIResponse;\n\t\t\tconst pending = pendingExtensionRequests.get(response.id);\n\t\t\tif (pending) {\n\t\t\t\tpendingExtensionRequests.delete(response.id);\n\t\t\t\tpending.resolve(response);\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\tconst command = parsed as RpcCommand;\n\t\ttry {\n\t\t\tconst response = await handleCommand(command);\n\t\t\toutput(response);\n\t\t\tawait checkShutdownRequested();\n\t\t} catch (commandError: unknown) {\n\t\t\toutput(\n\t\t\t\terror(\n\t\t\t\t\tcommand.id,\n\t\t\t\t\tcommand.type,\n\t\t\t\t\tcommandError instanceof Error ? commandError.message : String(commandError),\n\t\t\t\t),\n\t\t\t);\n\t\t}\n\t};\n\n\tconst onInputEnd = () => {\n\t\tvoid shutdown();\n\t};\n\tprocess.stdin.on(\"end\", onInputEnd);\n\n\tdetachInput = (() => {\n\t\tconst detachJsonl = attachJsonlLineReader(process.stdin, (line) => {\n\t\t\tvoid handleInputLine(line);\n\t\t});\n\t\treturn () => {\n\t\t\tdetachJsonl();\n\t\t\tprocess.stdin.off(\"end\", onInputEnd);\n\t\t};\n\t})();\n\n\t// Keep process alive forever\n\treturn new Promise(() => {});\n}\n"]}
|