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
|
@@ -0,0 +1 @@
|
|
|
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;IASrB,YAAoB,UAA4B,EAAE;QAA9B,YAAO,GAAP,OAAO,CAAuB;QAR1C,YAAO,GAAwB,IAAI,CAAC;QACpC,sBAAiB,GAAwB,IAAI,CAAC;QAC9C,mBAAc,GAAuB,EAAE,CAAC;QACxC,oBAAe,GACtB,IAAI,GAAG,EAAE,CAAC;QACH,cAAS,GAAG,CAAC,CAAC;QACd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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"]}
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1 @@
|
|
|
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;IAChE,cAAc,EAAE,CAAC;IACjB,I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AC","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"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rpc-types.d.ts","sourceRoot":"","sources":["../../../src/modes/rpc/rpc-types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAC1E,OAAO,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAC1D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AACvE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAM5D,MAAM,MAAM,UAAU,GAEnB;IAAE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sourceRoot":"","sources":["../src/package-manager-cli.ts"],"names":[],"mappings":"AAMA,MAAM,MAAM,cAAc,GAAG,SAAS,GAAG,QAAQ,GAAG,QAAQ,GAAG,MAAM,CAAC;AAsItE,wBAAsB,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,OAAO,CAAC,CAoB1E;AAED,wBAAsB,oBAAoB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,OAAO,CAAC,CA2G3E"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"package-manager-cli.js","sourceRoot":"","sources":["../src/package-manager-cli.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAY7D,SAAS,oBAAoB,CAAC,eAAgC,EAAE,OAAe;IAC9E,MAAM,MAAM,GAAG,eAAe,CAAC,WAAW,EAAE,CAAC;IAC7C,KAAK,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,MAAM,EAAE,CAAC;QACvC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,YAAY,OAAO,KAAK,KAAK,eAAe,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;QACzF,IAAI,KAAK,CAAC,KAAK,EAAE,CAAC;YACjB,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;QACvC,CAAC;IACF,CAAC;AACF,CAAC;AAED,SAAS,sBAAsB,CAAC,OAAuB;IACtD,QAAQ,OAAO,EAAE,CAAC;QACjB,KAAK,SAAS;YACb,OAAO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oBACP,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAC,CAAC;gBAC9C,CAAC;gBACD,OAAO,IAAI,CAAC;QACd,CAAC;IACF,CAAC;IAAC,OAAO,KAAc,EAAE,CAAC;QACzB,MAAM,OAAO,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,+BAA+B,CAAC;QACzF,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,UAAU,OAAO,EAAE,CAAC,CAAC,CAAC;QAC9C,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;QACrB,OAAO,IAAI,CAAC;IACb,CAAC;AACF,CAAC","sourcesContent":["import chalk from \"chalk\";\nimport { selectConfig } from \"./cli/config-selector.js\";\nimport { APP_NAME, getAgentDir } from \"./config.js\";\nimport { DefaultPackageManager } from \"./core/package-manager.js\";\nimport { SettingsManager } from \"./core/settings-manager.js\";\n\nexport type PackageCommand = \"install\" | \"remove\" | \"update\" | \"list\";\n\ninterface PackageCommandOptions {\n\tcommand: PackageCommand;\n\tsource?: string;\n\tlocal: boolean;\n\thelp: boolean;\n\tinvalidOption?: string;\n}\n\nfunction reportSettingsErrors(settingsManager: SettingsManager, context: string): void {\n\tconst errors = settingsManager.drainErrors();\n\tfor (const { scope, error } of errors) {\n\t\tconsole.error(chalk.yellow(`Warning (${context}, ${scope} settings): ${error.message}`));\n\t\tif (error.stack) {\n\t\t\tconsole.error(chalk.dim(error.stack));\n\t\t}\n\t}\n}\n\nfunction getPackageCommandUsage(command: PackageCommand): string {\n\tswitch (command) {\n\t\tcase \"install\":\n\t\t\treturn `${APP_NAME} install <source> [-l]`;\n\t\tcase \"remove\":\n\t\t\treturn `${APP_NAME} remove <source> [-l]`;\n\t\tcase \"update\":\n\t\t\treturn `${APP_NAME} update [source]`;\n\t\tcase \"list\":\n\t\t\treturn `${APP_NAME} list`;\n\t}\n}\n\nfunction printPackageCommandHelp(command: PackageCommand): void {\n\tswitch (command) {\n\t\tcase \"install\":\n\t\t\tconsole.log(`${chalk.bold(\"Usage:\")}\n ${getPackageCommandUsage(\"install\")}\n\nInstall a package and add it to settings.\n\nOptions:\n -l, --local Install project-locally (.pi/settings.json)\n\nExamples:\n ${APP_NAME} install npm:@foo/bar\n ${APP_NAME} install git:github.com/user/repo\n ${APP_NAME} install git:git@github.com:user/repo\n ${APP_NAME} install https://github.com/user/repo\n ${APP_NAME} install ssh://git@github.com/user/repo\n ${APP_NAME} install ./local/path\n`);\n\t\t\treturn;\n\n\t\tcase \"remove\":\n\t\t\tconsole.log(`${chalk.bold(\"Usage:\")}\n ${getPackageCommandUsage(\"remove\")}\n\nRemove a package and its source from settings.\nAlias: ${APP_NAME} uninstall <source> [-l]\n\nOptions:\n -l, --local Remove from project settings (.pi/settings.json)\n\nExamples:\n ${APP_NAME} remove npm:@foo/bar\n ${APP_NAME} uninstall npm:@foo/bar\n`);\n\t\t\treturn;\n\n\t\tcase \"update\":\n\t\t\tconsole.log(`${chalk.bold(\"Usage:\")}\n ${getPackageCommandUsage(\"update\")}\n\nUpdate installed packages.\nIf <source> is provided, only that package is updated.\n`);\n\t\t\treturn;\n\n\t\tcase \"list\":\n\t\t\tconsole.log(`${chalk.bold(\"Usage:\")}\n ${getPackageCommandUsage(\"list\")}\n\nList installed packages from user and project settings.\n`);\n\t\t\treturn;\n\t}\n}\n\nfunction parsePackageCommand(args: string[]): PackageCommandOptions | undefined {\n\tconst [rawCommand, ...rest] = args;\n\tlet command: PackageCommand | undefined;\n\tif (rawCommand === \"uninstall\") {\n\t\tcommand = \"remove\";\n\t} else if (rawCommand === \"install\" || rawCommand === \"remove\" || rawCommand === \"update\" || rawCommand === \"list\") {\n\t\tcommand = rawCommand;\n\t}\n\tif (!command) {\n\t\treturn undefined;\n\t}\n\n\tlet local = false;\n\tlet help = false;\n\tlet invalidOption: string | undefined;\n\tlet source: string | undefined;\n\n\tfor (const arg of rest) {\n\t\tif (arg === \"-h\" || arg === \"--help\") {\n\t\t\thelp = true;\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (arg === \"-l\" || arg === \"--local\") {\n\t\t\tif (command === \"install\" || command === \"remove\") {\n\t\t\t\tlocal = true;\n\t\t\t} else {\n\t\t\t\tinvalidOption = invalidOption ?? arg;\n\t\t\t}\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (arg.startsWith(\"-\")) {\n\t\t\tinvalidOption = invalidOption ?? arg;\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (!source) {\n\t\t\tsource = arg;\n\t\t}\n\t}\n\n\treturn { command, source, local, help, invalidOption };\n}\n\nexport async function handleConfigCommand(args: string[]): Promise<boolean> {\n\tif (args[0] !== \"config\") {\n\t\treturn false;\n\t}\n\n\tconst cwd = process.cwd();\n\tconst agentDir = getAgentDir();\n\tconst settingsManager = SettingsManager.create(cwd, agentDir);\n\treportSettingsErrors(settingsManager, \"config command\");\n\tconst packageManager = new DefaultPackageManager({ cwd, agentDir, settingsManager });\n\tconst resolvedPaths = await packageManager.resolve();\n\n\tawait selectConfig({\n\t\tresolvedPaths,\n\t\tsettingsManager,\n\t\tcwd,\n\t\tagentDir,\n\t});\n\n\tprocess.exit(0);\n}\n\nexport async function handlePackageCommand(args: string[]): Promise<boolean> {\n\tconst options = parsePackageCommand(args);\n\tif (!options) {\n\t\treturn false;\n\t}\n\n\tif (options.help) {\n\t\tprintPackageCommandHelp(options.command);\n\t\treturn true;\n\t}\n\n\tif (options.invalidOption) {\n\t\tconsole.error(chalk.red(`Unknown option ${options.invalidOption} for \"${options.command}\".`));\n\t\tconsole.error(chalk.dim(`Use \"${APP_NAME} --help\" or \"${getPackageCommandUsage(options.command)}\".`));\n\t\tprocess.exitCode = 1;\n\t\treturn true;\n\t}\n\n\tconst source = options.source;\n\tif ((options.command === \"install\" || options.command === \"remove\") && !source) {\n\t\tconsole.error(chalk.red(`Missing ${options.command} source.`));\n\t\tconsole.error(chalk.dim(`Usage: ${getPackageCommandUsage(options.command)}`));\n\t\tprocess.exitCode = 1;\n\t\treturn true;\n\t}\n\n\tconst cwd = process.cwd();\n\tconst agentDir = getAgentDir();\n\tconst settingsManager = SettingsManager.create(cwd, agentDir);\n\treportSettingsErrors(settingsManager, \"package command\");\n\tconst packageManager = new DefaultPackageManager({ cwd, agentDir, settingsManager });\n\n\tpackageManager.setProgressCallback((event) => {\n\t\tif (event.type === \"start\") {\n\t\t\tprocess.stdout.write(chalk.dim(`${event.message}\\n`));\n\t\t}\n\t});\n\n\ttry {\n\t\tswitch (options.command) {\n\t\t\tcase \"install\":\n\t\t\t\tawait packageManager.installAndPersist(source!, { local: options.local });\n\t\t\t\tconsole.log(chalk.green(`Installed ${source}`));\n\t\t\t\treturn true;\n\n\t\t\tcase \"remove\": {\n\t\t\t\tconst removed = await packageManager.removeAndPersist(source!, { local: options.local });\n\t\t\t\tif (!removed) {\n\t\t\t\t\tconsole.error(chalk.red(`No matching package found for ${source}`));\n\t\t\t\t\tprocess.exitCode = 1;\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tconsole.log(chalk.green(`Removed ${source}`));\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tcase \"list\": {\n\t\t\t\tconst configuredPackages = packageManager.listConfiguredPackages();\n\t\t\t\tconst userPackages = configuredPackages.filter((pkg) => pkg.scope === \"user\");\n\t\t\t\tconst projectPackages = configuredPackages.filter((pkg) => pkg.scope === \"project\");\n\n\t\t\t\tif (configuredPackages.length === 0) {\n\t\t\t\t\tconsole.log(chalk.dim(\"No packages installed.\"));\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\tconst formatPackage = (pkg: (typeof configuredPackages)[number]) => {\n\t\t\t\t\tconst display = pkg.filtered ? `${pkg.source} (filtered)` : pkg.source;\n\t\t\t\t\tconsole.log(` ${display}`);\n\t\t\t\t\tif (pkg.installedPath) {\n\t\t\t\t\t\tconsole.log(chalk.dim(` ${pkg.installedPath}`));\n\t\t\t\t\t}\n\t\t\t\t};\n\n\t\t\t\tif (userPackages.length > 0) {\n\t\t\t\t\tconsole.log(chalk.bold(\"User packages:\"));\n\t\t\t\t\tfor (const pkg of userPackages) {\n\t\t\t\t\t\tformatPackage(pkg);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (projectPackages.length > 0) {\n\t\t\t\t\tif (userPackages.length > 0) console.log();\n\t\t\t\t\tconsole.log(chalk.bold(\"Project packages:\"));\n\t\t\t\t\tfor (const pkg of projectPackages) {\n\t\t\t\t\t\tformatPackage(pkg);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tcase \"update\":\n\t\t\t\tawait packageManager.update(source);\n\t\t\t\tif (source) {\n\t\t\t\t\tconsole.log(chalk.green(`Updated ${source}`));\n\t\t\t\t} else {\n\t\t\t\t\tconsole.log(chalk.green(\"Updated packages\"));\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t}\n\t} catch (error: unknown) {\n\t\tconst message = error instanceof Error ? error.message : \"Unknown package command error\";\n\t\tconsole.error(chalk.red(`Error: ${message}`));\n\t\tprocess.exitCode = 1;\n\t\treturn true;\n\t}\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"changelog.d.ts","sourceRoot":"","sources":["../../src/utils/changelog.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,cAAc;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;CAChB;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,aAAa,EAAE,MAAM,GAAG,cAAc,EAAE,CAyDtE;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,EAAE,EAAE,cAAc,EAAE,EAAE,EAAE,cAAc,GAAG,MAAM,CAI9E;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,OAAO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AE,CAAC,KAAK,GAAG,EAAE,CAAC,KAAK,CAAC;AAC5B,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,aAAa,CAAC,OAAyB,EAAE,WAAmB;IAC3E,oBAAoB;IACpB,MAAM,KAAK,GAAG,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACjD,MAAM,IAAI,GAAmB;QAC5B,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC;QACpB,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC;QACpB,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC;QACpB,OAAO,EAAE,EAAE;KACX,CAAC;IAEF,OAAO,OAAO,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,eAAe,CAAC,KAAK,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AACpE,CAAC;AAED,2DAA2D;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC","sourcesContent":["import { existsSync, readFileSync } from \"fs\";\n\nexport interface ChangelogEntry {\n\tmajor: number;\n\tminor: number;\n\tpatch: number;\n\tcontent: string;\n}\n\n/**\n * Parse changelog entries from CHANGELOG.md\n * Scans for ## lines and collects content until next ## or EOF\n */\nexport function parseChangelog(changelogPath: string): ChangelogEntry[] {\n\tif (!existsSync(changelogPath)) {\n\t\treturn [];\n\t}\n\n\ttry {\n\t\tconst content = readFileSync(changelogPath, \"utf-8\");\n\t\tconst lines = content.split(\"\\n\");\n\t\tconst entries: ChangelogEntry[] = [];\n\n\t\tlet currentLines: string[] = [];\n\t\tlet currentVersion: { major: number; minor: number; patch: number } | null = null;\n\n\t\tfor (const line of lines) {\n\t\t\t// Check if this is a version header (## [x.y.z] ...)\n\t\t\tif (line.startsWith(\"## \")) {\n\t\t\t\t// Save previous entry if exists\n\t\t\t\tif (currentVersion && currentLines.length > 0) {\n\t\t\t\t\tentries.push({\n\t\t\t\t\t\t...currentVersion,\n\t\t\t\t\t\tcontent: currentLines.join(\"\\n\").trim(),\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\t// Try to parse version from this line\n\t\t\t\tconst versionMatch = line.match(/##\\s+\\[?(\\d+)\\.(\\d+)\\.(\\d+)\\]?/);\n\t\t\t\tif (versionMatch) {\n\t\t\t\t\tcurrentVersion = {\n\t\t\t\t\t\tmajor: Number.parseInt(versionMatch[1], 10),\n\t\t\t\t\t\tminor: Number.parseInt(versionMatch[2], 10),\n\t\t\t\t\t\tpatch: Number.parseInt(versionMatch[3], 10),\n\t\t\t\t\t};\n\t\t\t\t\tcurrentLines = [line];\n\t\t\t\t} else {\n\t\t\t\t\t// Reset if we can't parse version\n\t\t\t\t\tcurrentVersion = null;\n\t\t\t\t\tcurrentLines = [];\n\t\t\t\t}\n\t\t\t} else if (currentVersion) {\n\t\t\t\t// Collect lines for current version\n\t\t\t\tcurrentLines.push(line);\n\t\t\t}\n\t\t}\n\n\t\t// Save last entry\n\t\tif (currentVersion && currentLines.length > 0) {\n\t\t\tentries.push({\n\t\t\t\t...currentVersion,\n\t\t\t\tcontent: currentLines.join(\"\\n\").trim(),\n\t\t\t});\n\t\t}\n\n\t\treturn entries;\n\t} catch (error) {\n\t\tconsole.error(`Warning: Could not parse changelog: ${error}`);\n\t\treturn [];\n\t}\n}\n\n/**\n * Compare versions. Returns: -1 if v1 < v2, 0 if v1 === v2, 1 if v1 > v2\n */\nexport function compareVersions(v1: ChangelogEntry, v2: ChangelogEntry): number {\n\tif (v1.major !== v2.major) return v1.major - v2.major;\n\tif (v1.minor !== v2.minor) return v1.minor - v2.minor;\n\treturn v1.patch - v2.patch;\n}\n\n/**\n * Get entries newer than lastVersion\n */\nexport function getNewEntries(entries: ChangelogEntry[], lastVersion: string): ChangelogEntry[] {\n\t// Parse lastVersion\n\tconst parts = lastVersion.split(\".\").map(Number);\n\tconst last: ChangelogEntry = {\n\t\tmajor: parts[0] || 0,\n\t\tminor: parts[1] || 0,\n\t\tpatch: parts[2] || 0,\n\t\tcontent: \"\",\n\t};\n\n\treturn entries.filter((entry) => compareVersions(entry, last) > 0);\n}\n\n// Re-export getChangelogPath from paths.ts for convenience\nexport { getChangelogPath } from \"../config.js\";\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"child-process.d.ts","sourceRoot":"","sources":["../../src/utils/child-process.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAIvD;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,YAAY,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAyE/E"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"child-process.js","sourceRoot":"","sources":["../../src/utils/child-process.ts"],"names":[],"mappings":"AAEA,MAAM,mBAAmB,GAAG,GAAG,CAAC;AAEhC;;;;;;;GAOG;AACH,MAAM,UAAU,mBAAmB,CAAC,KAAmB;IACtD,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACtC,IAAI,OAAO,GAAG,KAAK,CAAC;QACpB,IAAI,MAAM,GAAG,KAAK,CAAC;QACnB,IAAI,QAAQ,GAAkB,IAAI,CAAC;QACnC,IAAI,aAAyC,CAAC;QAC9C,IAAI,WAAW,GAAG,KAAK,CAAC,MAAM,KAAK,IAAI,CAAC;QACxC,IAAI,WAAW,GAAG,KAAK,CAAC,MAAM,KAAK,IAAI,CAAC;QAExC,MAAM,OAAO,GAAG,GAAG,EAAE;YACpB,IAAI,aAAa,EAAE,CAAC;gBACnB,YAAY,CAAC,aAAa,CAAC,CAAC;gBAC5B,aAAa,GAAG,SAAS,CAAC;YAC3B,CAAC;YACD,KAAK,CAAC,cAAc,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;YACvC,KAAK,CAAC,cAAc,CAAC,MAAM,E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G,IAAI,CAAC;YAChB,sBAAsB,EAAE,CAAC;YACzB,IAAI,CAAC,OAAO,EAAE,CAAC;gBACd,aAAa,GAAG,UAAU,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,mBAAmB,CAAC,CAAC;YACvE,CAAC;QACF,CAAC,CAAC;QAEF,MAAM,OAAO,GAAG,CAAC,IAAmB,EAAE,EAAE;YACvC,QAAQ,CAAC,IAAI,CAAC,CAAC;QAChB,CAAC,CAAC;QAEF,KAAK,CAAC,MAAM,EAAE,IAAI,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC;QACvC,KAAK,CAAC,MAAM,EAAE,IAAI,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC;QACvC,KAAK,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QAC7B,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAC3B,KAAK,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAC9B,CAAC,CAAC,CAAC;AACJ,CAAC","sourcesContent":["import type { ChildProcess } from \"node:child_process\";\n\nconst EXIT_STDIO_GRACE_MS = 100;\n\n/**\n * Wait for a child process to terminate without hanging on inherited stdio handles.\n *\n * On Windows, daemonized descendants can inherit the child's stdout/stderr pipe\n * handles. In that case the child emits `exit`, but `close` can hang forever even\n * though the original process is already gone. We wait briefly for stdio to end,\n * then forcibly stop tracking the inherited handles.\n */\nexport function waitForChildProcess(child: ChildProcess): Promise<number | null> {\n\treturn new Promise((resolve, reject) => {\n\t\tlet settled = false;\n\t\tlet exited = false;\n\t\tlet exitCode: number | null = null;\n\t\tlet postExitTimer: NodeJS.Timeout | undefined;\n\t\tlet stdoutEnded = child.stdout === null;\n\t\tlet stderrEnded = child.stderr === null;\n\n\t\tconst cleanup = () => {\n\t\t\tif (postExitTimer) {\n\t\t\t\tclearTimeout(postExitTimer);\n\t\t\t\tpostExitTimer = undefined;\n\t\t\t}\n\t\t\tchild.removeListener(\"error\", onError);\n\t\t\tchild.removeListener(\"exit\", onExit);\n\t\t\tchild.removeListener(\"close\", onClose);\n\t\t\tchild.stdout?.removeListener(\"end\", onStdoutEnd);\n\t\t\tchild.stderr?.removeListener(\"end\", onStderrEnd);\n\t\t};\n\n\t\tconst finalize = (code: number | null) => {\n\t\t\tif (settled) return;\n\t\t\tsettled = true;\n\t\t\tcleanup();\n\t\t\tchild.stdout?.destroy();\n\t\t\tchild.stderr?.destroy();\n\t\t\tresolve(code);\n\t\t};\n\n\t\tconst maybeFinalizeAfterExit = () => {\n\t\t\tif (!exited || settled) return;\n\t\t\tif (stdoutEnded && stderrEnded) {\n\t\t\t\tfinalize(exitCode);\n\t\t\t}\n\t\t};\n\n\t\tconst onStdoutEnd = () => {\n\t\t\tstdoutEnded = true;\n\t\t\tmaybeFinalizeAfterExit();\n\t\t};\n\n\t\tconst onStderrEnd = () => {\n\t\t\tstderrEnded = true;\n\t\t\tmaybeFinalizeAfterExit();\n\t\t};\n\n\t\tconst onError = (err: Error) => {\n\t\t\tif (settled) return;\n\t\t\tsettled = true;\n\t\t\tcleanup();\n\t\t\treject(err);\n\t\t};\n\n\t\tconst onExit = (code: number | null) => {\n\t\t\texited = true;\n\t\t\texitCode = code;\n\t\t\tmaybeFinalizeAfterExit();\n\t\t\tif (!settled) {\n\t\t\t\tpostExitTimer = setTimeout(() => finalize(code), EXIT_STDIO_GRACE_MS);\n\t\t\t}\n\t\t};\n\n\t\tconst onClose = (code: number | null) => {\n\t\t\tfinalize(code);\n\t\t};\n\n\t\tchild.stdout?.once(\"end\", onStdoutEnd);\n\t\tchild.stderr?.once(\"end\", onStderrEnd);\n\t\tchild.once(\"error\", onError);\n\t\tchild.once(\"exit\", onExit);\n\t\tchild.once(\"close\", onClose);\n\t});\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clipboard-image.d.ts","sourceRoot":"","sources":["../../src/utils/clipboard-image.ts"],"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AwB,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC/C,MAAM,QAAQ,GAAG,MAAM,YAAY,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QACjD,IAAI,CAAC,QAAQ,EAAE,CAAC;YACf,OAAO,IAAI,CAAC;QACb,CAAC;QACD,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,WAAW,EAAE,CAAC;IACnD,CAAC;IAED,OAAO,KAAK,CAAC;AACd,CAAC","sourcesContent":["import { spawnSync } from \"child_process\";\nimport { randomUUID } from \"crypto\";\nimport { readFileSync, unlinkSync } from \"fs\";\nimport { tmpdir } from \"os\";\nimport { join } from \"path\";\n\nimport { clipboard } from \"./clipboard-native.js\";\nimport { loadPhoton } from \"./photon.js\";\n\nexport type ClipboardImage = {\n\tbytes: Uint8Array;\n\tmimeType: string;\n};\n\nconst SUPPORTED_IMAGE_MIME_TYPES = [\"image/png\", \"image/jpeg\", \"image/webp\", \"image/gif\"] as const;\n\nconst DEFAULT_LIST_TIMEOUT_MS = 1000;\nconst DEFAULT_READ_TIMEOUT_MS = 3000;\nconst DEFAULT_POWERSHELL_TIMEOUT_MS = 5000;\nconst DEFAULT_MAX_BUFFER_BYTES = 50 * 1024 * 1024;\n\nexport function isWaylandSession(env: NodeJS.ProcessEnv = process.env): boolean {\n\treturn Boolean(env.WAYLAND_DISPLAY) || env.XDG_SESSION_TYPE === \"wayland\";\n}\n\nfunction baseMimeType(mimeType: string): string {\n\treturn mimeType.split(\";\")[0]?.trim().toLowerCase() ?? mimeType.toLowerCase();\n}\n\nexport function extensionForImageMimeType(mimeType: string): string | null {\n\tswitch (baseMimeType(mimeType)) {\n\t\tcase \"image/png\":\n\t\t\treturn \"png\";\n\t\tcase \"image/jpeg\":\n\t\t\treturn \"jpg\";\n\t\tcase \"image/webp\":\n\t\t\treturn \"webp\";\n\t\tcase \"image/gif\":\n\t\t\treturn \"gif\";\n\t\tdefault:\n\t\t\treturn null;\n\t}\n}\n\nfunction selectPreferredImageMimeType(mimeTypes: string[]): string | null {\n\tconst normalized = mimeTypes\n\t\t.map((t) => t.trim())\n\t\t.filter(Boolean)\n\t\t.map((t) => ({ raw: t, base: baseMimeType(t) }));\n\n\tfor (const preferred of SUPPORTED_IMAGE_MIME_TYPES) {\n\t\tconst match = normalized.find((t) => t.base === preferred);\n\t\tif (match) {\n\t\t\treturn match.raw;\n\t\t}\n\t}\n\n\tconst anyImage = normalized.find((t) => t.base.startsWith(\"image/\"));\n\treturn anyImage?.raw ?? null;\n}\n\nfunction isSupportedImageMimeType(mimeType: string): boolean {\n\tconst base = baseMimeType(mimeType);\n\treturn SUPPORTED_IMAGE_MIME_TYPES.some((t) => t === base);\n}\n\n/**\n * Convert unsupported image formats to PNG using Photon.\n * Returns null if conversion is unavailable or fails.\n */\nasync function convertToPng(bytes: Uint8Array): Promise<Uint8Array | null> {\n\tconst photon = await loadPhoton();\n\tif (!photon) {\n\t\treturn null;\n\t}\n\n\ttry {\n\t\tconst image = photon.PhotonImage.new_from_byteslice(bytes);\n\t\ttry {\n\t\t\treturn image.get_bytes();\n\t\t} finally {\n\t\t\timage.free();\n\t\t}\n\t} catch {\n\t\treturn null;\n\t}\n}\n\nfunction runCommand(\n\tcommand: string,\n\targs: string[],\n\toptions?: { timeoutMs?: number; maxBufferBytes?: number; env?: NodeJS.ProcessEnv },\n): { stdout: Buffer; ok: boolean } {\n\tconst timeoutMs = options?.timeoutMs ?? DEFAULT_READ_TIMEOUT_MS;\n\tconst maxBufferBytes = options?.maxBufferBytes ?? DEFAULT_MAX_BUFFER_BYTES;\n\n\tconst result = spawnSync(command, args, {\n\t\ttimeout: timeoutMs,\n\t\tmaxBuffer: maxBufferBytes,\n\t\tenv: options?.env,\n\t});\n\n\tif (result.error) {\n\t\treturn { ok: false, stdout: Buffer.alloc(0) };\n\t}\n\n\tif (result.status !== 0) {\n\t\treturn { ok: false, stdout: Buffer.alloc(0) };\n\t}\n\n\tconst stdout = Buffer.isBuffer(result.stdout)\n\t\t? result.stdout\n\t\t: Buffer.from(result.stdout ?? \"\", typeof result.stdout === \"string\" ? \"utf-8\" : undefined);\n\n\treturn { ok: true, stdout };\n}\n\nfunction readClipboardImageViaWlPaste(): ClipboardImage | null {\n\tconst list = runCommand(\"wl-paste\", [\"--list-types\"], { timeoutMs: DEFAULT_LIST_TIMEOUT_MS });\n\tif (!list.ok) {\n\t\treturn null;\n\t}\n\n\tconst types = list.stdout\n\t\t.toString(\"utf-8\")\n\t\t.split(/\\r?\\n/)\n\t\t.map((t) => t.trim())\n\t\t.filter(Boolean);\n\n\tconst selectedType = selectPreferredImageMimeType(types);\n\tif (!selectedType) {\n\t\treturn null;\n\t}\n\n\tconst data = runCommand(\"wl-paste\", [\"--type\", selectedType, \"--no-newline\"]);\n\tif (!data.ok || data.stdout.length === 0) {\n\t\treturn null;\n\t}\n\n\treturn { bytes: data.stdout, mimeType: baseMimeType(selectedType) };\n}\n\nfunction isWSL(env: NodeJS.ProcessEnv = process.env): boolean {\n\tif (env.WSL_DISTRO_NAME || env.WSLENV) {\n\t\treturn true;\n\t}\n\n\ttry {\n\t\tconst release = readFileSync(\"/proc/version\", \"utf-8\");\n\t\treturn /microsoft|wsl/i.test(release);\n\t} catch {\n\t\treturn false;\n\t}\n}\n\n/**\n * On WSL, the Linux clipboard (Wayland/X11) does not receive image data from\n * Windows screenshots (Win+Shift+S). PowerShell can access the Windows clipboard\n * directly, so we use it as a fallback.\n */\nfunction readClipboardImageViaPowerShell(): ClipboardImage | null {\n\tconst tmpFile = join(tmpdir(), `pi-wsl-clip-${randomUUID()}.png`);\n\n\ttry {\n\t\tconst winPathResult = runCommand(\"wslpath\", [\"-w\", tmpFile], { timeoutMs: DEFAULT_LIST_TIMEOUT_MS });\n\t\tif (!winPathResult.ok) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst winPath = winPathResult.stdout.toString(\"utf-8\").trim();\n\t\tif (!winPath) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst psScript = [\n\t\t\t\"Add-Type -AssemblyName System.Windows.Forms\",\n\t\t\t\"Add-Type -AssemblyName System.Drawing\",\n\t\t\t\"$path = $env:PI_WSL_CLIPBOARD_IMAGE_PATH\",\n\t\t\t\"$img = [System.Windows.Forms.Clipboard]::GetImage()\",\n\t\t\t\"if ($img) { $img.Save($path, [System.Drawing.Imaging.ImageFormat]::Png); Write-Output 'ok' } else { Write-Output 'empty' }\",\n\t\t].join(\"; \");\n\n\t\tconst result = runCommand(\"powershell.exe\", [\"-NoProfile\", \"-Command\", psScript], {\n\t\t\ttimeoutMs: DEFAULT_POWERSHELL_TIMEOUT_MS,\n\t\t\tenv: { ...process.env, PI_WSL_CLIPBOARD_IMAGE_PATH: winPath },\n\t\t});\n\t\tif (!result.ok) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst output = result.stdout.toString(\"utf-8\").trim();\n\t\tif (output !== \"ok\") {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst bytes = readFileSync(tmpFile);\n\t\tif (bytes.length === 0) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn { bytes: new Uint8Array(bytes), mimeType: \"image/png\" };\n\t} catch {\n\t\treturn null;\n\t} finally {\n\t\ttry {\n\t\t\tunlinkSync(tmpFile);\n\t\t} catch {\n\t\t\t// Ignore cleanup errors.\n\t\t}\n\t}\n}\n\nfunction readClipboardImageViaXclip(): ClipboardImage | null {\n\tconst targets = runCommand(\"xclip\", [\"-selection\", \"clipboard\", \"-t\", \"TARGETS\", \"-o\"], {\n\t\ttimeoutMs: DEFAULT_LIST_TIMEOUT_MS,\n\t});\n\n\tlet candidateTypes: string[] = [];\n\tif (targets.ok) {\n\t\tcandidateTypes = targets.stdout\n\t\t\t.toString(\"utf-8\")\n\t\t\t.split(/\\r?\\n/)\n\t\t\t.map((t) => t.trim())\n\t\t\t.filter(Boolean);\n\t}\n\n\tconst preferred = candidateTypes.length > 0 ? selectPreferredImageMimeType(candidateTypes) : null;\n\tconst tryTypes = preferred ? [preferred, ...SUPPORTED_IMAGE_MIME_TYPES] : [...SUPPORTED_IMAGE_MIME_TYPES];\n\n\tfor (const mimeType of tryTypes) {\n\t\tconst data = runCommand(\"xclip\", [\"-selection\", \"clipboard\", \"-t\", mimeType, \"-o\"]);\n\t\tif (data.ok && data.stdout.length > 0) {\n\t\t\treturn { bytes: data.stdout, mimeType: baseMimeType(mimeType) };\n\t\t}\n\t}\n\n\treturn null;\n}\n\nasync function readClipboardImageViaNativeClipboard(): Promise<ClipboardImage | null> {\n\tif (!clipboard || !clipboard.hasImage()) {\n\t\treturn null;\n\t}\n\n\tconst imageData = await clipboard.getImageBinary();\n\tif (!imageData || imageData.length === 0) {\n\t\treturn null;\n\t}\n\n\tconst bytes = imageData instanceof Uint8Array ? imageData : Uint8Array.from(imageData);\n\treturn { bytes, mimeType: \"image/png\" };\n}\n\nexport async function readClipboardImage(options?: {\n\tenv?: NodeJS.ProcessEnv;\n\tplatform?: NodeJS.Platform;\n}): Promise<ClipboardImage | null> {\n\tconst env = options?.env ?? process.env;\n\tconst platform = options?.platform ?? process.platform;\n\n\tif (env.TERMUX_VERSION) {\n\t\treturn null;\n\t}\n\n\tlet image: ClipboardImage | null = null;\n\n\tif (platform === \"linux\") {\n\t\tconst wsl = isWSL(env);\n\t\tconst wayland = isWaylandSession(env);\n\n\t\tif (wayland || wsl) {\n\t\t\timage = readClipboardImageViaWlPaste() ?? readClipboardImageViaXclip();\n\t\t}\n\n\t\tif (!image && wsl) {\n\t\t\timage = readClipboardImageViaPowerShell();\n\t\t}\n\n\t\tif (!image && !wayland) {\n\t\t\timage = await readClipboardImageViaNativeClipboard();\n\t\t}\n\t} else {\n\t\timage = await readClipboardImageViaNativeClipboard();\n\t}\n\n\tif (!image) {\n\t\treturn null;\n\t}\n\n\t// Convert unsupported formats (e.g., BMP from WSLg) to PNG\n\tif (!isSupportedImageMimeType(image.mimeType)) {\n\t\tconst pngBytes = await convertToPng(image.bytes);\n\t\tif (!pngBytes) {\n\t\t\treturn null;\n\t\t}\n\t\treturn { bytes: pngBytes, mimeType: \"image/png\" };\n\t}\n\n\treturn image;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clipboard-native.d.ts","sourceRoot":"","sources":["../../src/utils/clipboard-native.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,eAAe,GAAG;IAC7B,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACzC,QAAQ,EAAE,MAAM,OAAO,CAAC;IACxB,cAAc,EAAE,MAAM,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;CAC7C,CAAC;AAGF,QAAA,IAAI,SAAS,EAAE,eAAe,GAAG,IAAW,CAAC;AAY7C,OAAO,EAAE,SAAS,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clipboard-native.js","sourceRoot":"","sources":["../../src/utils/clipboard-native.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAQvC,MAAM,OAAO,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC/C,IAAI,SAAS,GAA2B,IAAI,CAAC;AAE7C,MAAM,UAAU,GAAG,OAAO,CAAC,QAAQ,KAAK,OAAO,IAAI,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,IAAI,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;AAE/G,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,IAAI,UAAU,EAAE,CAAC;IAC/C,IAAI,CAAC;QACJ,SAAS,GAAG,OAAO,CAAC,yBAAyB,CAAoB,CAAC;IACnE,CAAC;IAAC,MAAM,CAAC;QACR,SAAS,GAAG,IAAI,CAAC;IAClB,CAAC;AACF,CAAC;AAED,OAAO,EAAE,SAAS,EAAE,CAAC","sourcesContent":["import { createRequire } from \"module\";\n\nexport type ClipboardModule = {\n\tsetText: (text: string) => Promise<void>;\n\thasImage: () => boolean;\n\tgetImageBinary: () => Promise<Array<number>>;\n};\n\nconst require = createRequire(import.meta.url);\nlet clipboard: ClipboardModule | null = null;\n\nconst hasDisplay = process.platform !== \"linux\" || Boolean(process.env.DISPLAY || process.env.WAYLAND_DISPLAY);\n\nif (!process.env.TERMUX_VERSION && hasDisplay) {\n\ttry {\n\t\tclipboard = require(\"@mariozechner/clipboard\") as ClipboardModule;\n\t} catch {\n\t\tclipboard = null;\n\t}\n}\n\nexport { clipboard };\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clipboard.d.ts","sourceRoot":"","sources":["../../src/utils/clipboard.ts"],"names":[],"mappings":"AAmBA,wBAAsB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CA6DjE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clipboard.js","sourceRoot":"","sources":["../../src/utils/clipboard.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,IAAI,CAAC;AAC9B,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAQlD,SAAS,kBAAkB,CAAC,OAAmC;IAC9D,IAAI,CAAC;QACJ,QAAQ,CAAC,4BAA4B,EAAE,OAAO,CAAC,CAAC;IACjD,CAAC;IAAC,MAAM,CAAC;QACR,QAAQ,CAAC,0BAA0B,EAAE,OAAO,CAAC,CAAC;IAC/C,CAAC;AACF,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,eAAe,CAAC,IAAY;IACjD,6DAA6D;IAC7D,MAAM,OAAO,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,QAAQ,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;oBACrE,QAAQ,CAAC,eAAe,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,CAAC;oBAC/C,sEAAsE;oBACtE,MAAM,IAAI,GAAG,KAAK,CAAC,SAAS,EAAE,EAAE,EAAE,EAAE,KAAK,EAAE,CAAC,MAAM,EAAE,QAAQ,EAAE,QAAQ,CAAC,EAAE,CAAC,CAAC;oBAC3E,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,EAAE;wBAC3B,6CAA6C;oBAC9C,CAAC,CAAC,CAAC;oBACH,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;oBACvB,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC;oBACjB,IAAI,CAAC,KAAK,EAAE,CAAC;gBACd,CAAC;gBAAC,MAAM,CAAC;oBACR,IAAI,aAAa,EAAE,CAAC;wBACnB,kBAAkB,CAAC,OAAO,CAAC,CAAC;oBAC7B,CAAC;gBACF,CAAC;YACF,CAAC;iBAAM,IAAI,aAAa,EAAE,CAAC;gBAC1B,kBAAkB,CAAC,OAAO,CAAC,CAAC;YAC7B,CAAC;QACF,CAAC;IACF,CAAC;IAAC,MAAM,CAAC;QACR,8CAA8C;IAC/C,CAAC;AACF,CAAC","sourcesContent":["import { execSync, spawn } from \"child_process\";\nimport { platform } from \"os\";\nimport { isWaylandSession } from \"./clipboard-image.js\";\nimport { clipboard } from \"./clipboard-native.js\";\n\ntype NativeClipboardExecOptions = {\n\tinput: string;\n\ttimeout: number;\n\tstdio: [\"pipe\", \"ignore\", \"ignore\"];\n};\n\nfunction copyToX11Clipboard(options: NativeClipboardExecOptions): void {\n\ttry {\n\t\texecSync(\"xclip -selection clipboard\", options);\n\t} catch {\n\t\texecSync(\"xsel --clipboard --input\", options);\n\t}\n}\n\nexport async function copyToClipboard(text: string): Promise<void> {\n\t// Always emit OSC 52 - works over SSH/mosh, harmless locally\n\tconst encoded = Buffer.from(text).toString(\"base64\");\n\tprocess.stdout.write(`\\x1b]52;c;${encoded}\\x07`);\n\n\ttry {\n\t\tif (clipboard) {\n\t\t\tawait clipboard.setText(text);\n\t\t\treturn;\n\t\t}\n\t} catch {\n\t\t// Fall through to platform-specific clipboard tools.\n\t}\n\n\t// Also try native tools (best effort for local sessions)\n\tconst p = platform();\n\tconst options: NativeClipboardExecOptions = { input: text, timeout: 5000, stdio: [\"pipe\", \"ignore\", \"ignore\"] };\n\n\ttry {\n\t\tif (p === \"darwin\") {\n\t\t\texecSync(\"pbcopy\", options);\n\t\t} else if (p === \"win32\") {\n\t\t\texecSync(\"clip\", options);\n\t\t} else {\n\t\t\t// Linux. Try Termux, Wayland, or X11 clipboard tools.\n\t\t\tif (process.env.TERMUX_VERSION) {\n\t\t\t\ttry {\n\t\t\t\t\texecSync(\"termux-clipboard-set\", options);\n\t\t\t\t\treturn;\n\t\t\t\t} catch {\n\t\t\t\t\t// Fall back to Wayland or X11 tools.\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst hasWaylandDisplay = Boolean(process.env.WAYLAND_DISPLAY);\n\t\t\tconst hasX11Display = Boolean(process.env.DISPLAY);\n\t\t\tconst isWayland = isWaylandSession();\n\t\t\tif (isWayland && hasWaylandDisplay) {\n\t\t\t\ttry {\n\t\t\t\t\t// Verify wl-copy exists (spawn errors are async and won't be caught)\n\t\t\t\t\texecSync(\"which wl-copy\", { stdio: \"ignore\" });\n\t\t\t\t\t// wl-copy with execSync hangs due to fork behavior; use spawn instead\n\t\t\t\t\tconst proc = spawn(\"wl-copy\", [], { stdio: [\"pipe\", \"ignore\", \"ignore\"] });\n\t\t\t\t\tproc.stdin.on(\"error\", () => {\n\t\t\t\t\t\t// Ignore EPIPE errors if wl-copy exits early\n\t\t\t\t\t});\n\t\t\t\t\tproc.stdin.write(text);\n\t\t\t\t\tproc.stdin.end();\n\t\t\t\t\tproc.unref();\n\t\t\t\t} catch {\n\t\t\t\t\tif (hasX11Display) {\n\t\t\t\t\t\tcopyToX11Clipboard(options);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (hasX11Display) {\n\t\t\t\tcopyToX11Clipboard(options);\n\t\t\t}\n\t\t}\n\t} catch {\n\t\t// Ignore - OSC 52 already emitted as fallback\n\t}\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"exif-orientation.d.ts","sourceRoot":"","sources":["../../src/utils/exif-orientation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD,KAAK,MAAM,GAAG,cAAc,4BAA4B,CAAC,CAAC;AAgJ1D,wBAAgB,oBAAoB,CACnC,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,eAAe,EACtB,aAAa,EAAE,UAAU,GACvB,eAAe,CAgCjB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"exif-orientation.js","sourceRoot":"","sources":["../../src/utils/exif-orientation.ts"],"names":[],"mappings":"AAIA,SAAS,uBAAuB,CAAC,KAAiB,EAAE,SAAiB;IACpE,IAAI,SAAS,GAAG,CAAC,GAAG,KAAK,CAAC,MAAM;QAAE,OAAO,CAAC,CAAC;IAE3C,MAAM,SAAS,GAAG,CAAC,KAAK,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,GAAG,KAAK,CAAC,SAAS,GAAG,CAAC,CAAC,CAAC;IACjE,MAAM,EAAE,GAAG,SAAS,KAAK,MAAM,CAAC;IAEhC,MAAM,MAAM,GAAG,CAAC,GAAW,EAAU,EAAE;QACtC,IAAI,EAAE;YAAE,OAAO,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;QAClD,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,GAAG,KAAK,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC;IAC3C,CAAC,CAAC;IAEF,MAAM,MAAM,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,OAAO,QAAQ,CAAC,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;QACrE;YACC,OAAO,KAAK,CAAC;IACf,CAAC;AACF,CAAC","sourcesContent":["import type { PhotonImageType } from \"./photon.js\";\n\ntype Photon = typeof import(\"@silvia-odwyer/photon-node\");\n\nfunction readOrientationFromTiff(bytes: Uint8Array, tiffStart: number): number {\n\tif (tiffStart + 8 > bytes.length) return 1;\n\n\tconst byteOrder = (bytes[tiffStart] << 8) | bytes[tiffStart + 1];\n\tconst le = byteOrder === 0x4949;\n\n\tconst read16 = (pos: number): number => {\n\t\tif (le) return bytes[pos] | (bytes[pos + 1] << 8);\n\t\treturn (bytes[pos] << 8) | bytes[pos + 1];\n\t};\n\n\tconst read32 = (pos: number): number => {\n\t\tif (le) return bytes[pos] | (bytes[pos + 1] << 8) | (bytes[pos + 2] << 16) | (bytes[pos + 3] << 24);\n\t\treturn ((bytes[pos] << 24) | (bytes[pos + 1] << 16) | (bytes[pos + 2] << 8) | bytes[pos + 3]) >>> 0;\n\t};\n\n\tconst ifdOffset = read32(tiffStart + 4);\n\tconst ifdStart = tiffStart + ifdOffset;\n\tif (ifdStart + 2 > bytes.length) return 1;\n\n\tconst entryCount = read16(ifdStart);\n\tfor (let i = 0; i < entryCount; i++) {\n\t\tconst entryPos = ifdStart + 2 + i * 12;\n\t\tif (entryPos + 12 > bytes.length) return 1;\n\n\t\tif (read16(entryPos) === 0x0112) {\n\t\t\tconst value = read16(entryPos + 8);\n\t\t\treturn value >= 1 && value <= 8 ? value : 1;\n\t\t}\n\t}\n\n\treturn 1;\n}\n\nfunction findJpegTiffOffset(bytes: Uint8Array): number {\n\tlet offset = 2;\n\twhile (offset < bytes.length - 1) {\n\t\tif (bytes[offset] !== 0xff) return -1;\n\t\tconst marker = bytes[offset + 1];\n\t\tif (marker === 0xff) {\n\t\t\toffset++;\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (marker === 0xe1) {\n\t\t\tif (offset + 4 >= bytes.length) return -1;\n\t\t\tconst segmentStart = offset + 4;\n\t\t\tif (segmentStart + 6 > bytes.length) return -1;\n\t\t\tif (!hasExifHeader(bytes, segmentStart)) return -1;\n\t\t\treturn segmentStart + 6;\n\t\t}\n\n\t\tif (offset + 4 > bytes.length) return -1;\n\t\tconst length = (bytes[offset + 2] << 8) | bytes[offset + 3];\n\t\toffset += 2 + length;\n\t}\n\n\treturn -1;\n}\n\nfunction findWebpTiffOffset(bytes: Uint8Array): number {\n\tlet offset = 12;\n\twhile (offset + 8 <= bytes.length) {\n\t\tconst chunkId = String.fromCharCode(bytes[offset], bytes[offset + 1], bytes[offset + 2], bytes[offset + 3]);\n\t\tconst chunkSize =\n\t\t\tbytes[offset + 4] | (bytes[offset + 5] << 8) | (bytes[offset + 6] << 16) | (bytes[offset + 7] << 24);\n\t\tconst dataStart = offset + 8;\n\n\t\tif (chunkId === \"EXIF\") {\n\t\t\tif (dataStart + chunkSize > bytes.length) return -1;\n\t\t\t// Some WebP files have \"Exif\\0\\0\" prefix before the TIFF header\n\t\t\tconst tiffStart = chunkSize >= 6 && hasExifHeader(bytes, dataStart) ? dataStart + 6 : dataStart;\n\t\t\treturn tiffStart;\n\t\t}\n\n\t\t// RIFF chunks are padded to even size\n\t\toffset = dataStart + chunkSize + (chunkSize % 2);\n\t}\n\n\treturn -1;\n}\n\nfunction hasExifHeader(bytes: Uint8Array, offset: number): boolean {\n\treturn (\n\t\tbytes[offset] === 0x45 &&\n\t\tbytes[offset + 1] === 0x78 &&\n\t\tbytes[offset + 2] === 0x69 &&\n\t\tbytes[offset + 3] === 0x66 &&\n\t\tbytes[offset + 4] === 0x00 &&\n\t\tbytes[offset + 5] === 0x00\n\t);\n}\n\nfunction getExifOrientation(bytes: Uint8Array): number {\n\tlet tiffOffset = -1;\n\n\t// JPEG: starts with FF D8\n\tif (bytes.length >= 2 && bytes[0] === 0xff && bytes[1] === 0xd8) {\n\t\ttiffOffset = findJpegTiffOffset(bytes);\n\t}\n\t// WebP: starts with RIFF....WEBP\n\telse if (\n\t\tbytes.length >= 12 &&\n\t\tbytes[0] === 0x52 &&\n\t\tbytes[1] === 0x49 &&\n\t\tbytes[2] === 0x46 &&\n\t\tbytes[3] === 0x46 &&\n\t\tbytes[8] === 0x57 &&\n\t\tbytes[9] === 0x45 &&\n\t\tbytes[10] === 0x42 &&\n\t\tbytes[11] === 0x50\n\t) {\n\t\ttiffOffset = findWebpTiffOffset(bytes);\n\t}\n\n\tif (tiffOffset === -1) return 1;\n\treturn readOrientationFromTiff(bytes, tiffOffset);\n}\n\ntype DstIndexFn = (x: number, y: number, w: number, h: number) => number;\n\nfunction rotate90(photon: Photon, image: PhotonImageType, dstIndex: DstIndexFn): PhotonImageType {\n\tconst w = image.get_width();\n\tconst h = image.get_height();\n\tconst src = image.get_raw_pixels();\n\tconst dst = new Uint8Array(src.length);\n\n\tfor (let y = 0; y < h; y++) {\n\t\tfor (let x = 0; x < w; x++) {\n\t\t\tconst srcIdx = (y * w + x) * 4;\n\t\t\tconst dstIdx = dstIndex(x, y, w, h) * 4;\n\t\t\tdst[dstIdx] = src[srcIdx];\n\t\t\tdst[dstIdx + 1] = src[srcIdx + 1];\n\t\t\tdst[dstIdx + 2] = src[srcIdx + 2];\n\t\t\tdst[dstIdx + 3] = src[srcIdx + 3];\n\t\t}\n\t}\n\n\treturn new photon.PhotonImage(dst, h, w);\n}\n\n// Flip orientations mutate in-place. Rotations return a new image (caller must free the old one if different).\nexport function applyExifOrientation(\n\tphoton: Photon,\n\timage: PhotonImageType,\n\toriginalBytes: Uint8Array,\n): PhotonImageType {\n\tconst orientation = getExifOrientation(originalBytes);\n\tif (orientation === 1) return image;\n\n\tswitch (orientation) {\n\t\tcase 2:\n\t\t\tphoton.fliph(image);\n\t\t\treturn image;\n\t\tcase 3:\n\t\t\tphoton.fliph(image);\n\t\t\tphoton.flipv(image);\n\t\t\treturn image;\n\t\tcase 4:\n\t\t\tphoton.flipv(image);\n\t\t\treturn image;\n\t\tcase 5: {\n\t\t\tconst rotated = rotate90(photon, image, (x, y, _w, h) => x * h + (h - 1 - y));\n\t\t\tphoton.fliph(rotated);\n\t\t\treturn rotated;\n\t\t}\n\t\tcase 6:\n\t\t\treturn rotate90(photon, image, (x, y, _w, h) => x * h + (h - 1 - y));\n\t\tcase 7: {\n\t\t\tconst rotated = rotate90(photon, image, (x, y, w, h) => (w - 1 - x) * h + y);\n\t\t\tphoton.fliph(rotated);\n\t\t\treturn rotated;\n\t\t}\n\t\tcase 8:\n\t\t\treturn rotate90(photon, image, (x, y, w, h) => (w - 1 - x) * h + y);\n\t\tdefault:\n\t\t\treturn image;\n\t}\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"frontmatter.d.ts","sourceRoot":"","sources":["../../src/utils/frontmatter.ts"],"names":[],"mappings":"AAEA,KAAK,iBAAiB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI;IAC3D,WAAW,EAAE,CAAC,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;CACb,CAAC;AAsBF,eAAO,MAAM,gBAAgB,GAAI,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC3F,SAAS,MAAM,KACb,iBAAiB,CAAC,CAAC,CAOrB,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAAI,SAAS,MAAM,KAAG,MAAwC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"frontmatter.js","sourceRoot":"","sources":["../../src/utils/frontmatter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AAO7B,MAAM,iBAAiB,GAAG,CAAC,KAAa,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AC,OAAe,EAAU,EAAE,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC","sourcesContent":["import { parse } from \"yaml\";\n\ntype ParsedFrontmatter<T extends Record<string, unknown>> = {\n\tfrontmatter: T;\n\tbody: string;\n};\n\nconst normalizeNewlines = (value: string): string => value.replace(/\\r\\n/g, \"\\n\").replace(/\\r/g, \"\\n\");\n\nconst extractFrontmatter = (content: string): { yamlString: string | null; body: string } => {\n\tconst normalized = normalizeNewlines(content);\n\n\tif (!normalized.startsWith(\"---\")) {\n\t\treturn { yamlString: null, body: normalized };\n\t}\n\n\tconst endIndex = normalized.indexOf(\"\\n---\", 3);\n\tif (endIndex === -1) {\n\t\treturn { yamlString: null, body: normalized };\n\t}\n\n\treturn {\n\t\tyamlString: normalized.slice(4, endIndex),\n\t\tbody: normalized.slice(endIndex + 4).trim(),\n\t};\n};\n\nexport const parseFrontmatter = <T extends Record<string, unknown> = Record<string, unknown>>(\n\tcontent: string,\n): ParsedFrontmatter<T> => {\n\tconst { yamlString, body } = extractFrontmatter(content);\n\tif (!yamlString) {\n\t\treturn { frontmatter: {} as T, body };\n\t}\n\tconst parsed = parse(yamlString);\n\treturn { frontmatter: (parsed ?? {}) as T, body };\n};\n\nexport const stripFrontmatter = (content: string): string => parseFrontmatter(content).body;\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"git.d.ts","sourceRoot":"","sources":["../../src/utils/git.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG;IACvB,mCAAmC;IACnC,IAAI,EAAE,KAAK,CAAC;IACZ,iEAAiE;IACjE,IAAI,EAAE,MAAM,CAAC;IACb,2CAA2C;IAC3C,IAAI,EAAE,MAAM,CAAC;IACb,0CAA0C;IAC1C,IAAI,EAAE,MAAM,CAAC;IACb,iDAAiD;IACjD,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,gEAAgE;IAChE,MAAM,EAAE,OAAO,CAAC;C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H,CAAC;IACF,CAAC;IAED,OAAO,kBAAkB,CAAC,GAAG,CAAC,CAAC;AAChC,CAAC","sourcesContent":["import hostedGitInfo from \"hosted-git-info\";\n\n/**\n * Parsed git URL information.\n */\nexport type GitSource = {\n\t/** Always \"git\" for git sources */\n\ttype: \"git\";\n\t/** Clone URL (always valid for git clone, without ref suffix) */\n\trepo: string;\n\t/** Git host domain (e.g., \"github.com\") */\n\thost: string;\n\t/** Repository path (e.g., \"user/repo\") */\n\tpath: string;\n\t/** Git ref (branch, tag, commit) if specified */\n\tref?: string;\n\t/** True if ref was specified (package won't be auto-updated) */\n\tpinned: boolean;\n};\n\nfunction splitRef(url: string): { repo: string; ref?: string } {\n\tconst scpLikeMatch = url.match(/^git@([^:]+):(.+)$/);\n\tif (scpLikeMatch) {\n\t\tconst pathWithMaybeRef = scpLikeMatch[2] ?? \"\";\n\t\tconst refSeparator = pathWithMaybeRef.indexOf(\"@\");\n\t\tif (refSeparator < 0) return { repo: url };\n\t\tconst repoPath = pathWithMaybeRef.slice(0, refSeparator);\n\t\tconst ref = pathWithMaybeRef.slice(refSeparator + 1);\n\t\tif (!repoPath || !ref) return { repo: url };\n\t\treturn {\n\t\t\trepo: `git@${scpLikeMatch[1] ?? \"\"}:${repoPath}`,\n\t\t\tref,\n\t\t};\n\t}\n\n\tif (url.includes(\"://\")) {\n\t\ttry {\n\t\t\tconst parsed = new URL(url);\n\t\t\tconst pathWithMaybeRef = parsed.pathname.replace(/^\\/+/, \"\");\n\t\t\tconst refSeparator = pathWithMaybeRef.indexOf(\"@\");\n\t\t\tif (refSeparator < 0) return { repo: url };\n\t\t\tconst repoPath = pathWithMaybeRef.slice(0, refSeparator);\n\t\t\tconst ref = pathWithMaybeRef.slice(refSeparator + 1);\n\t\t\tif (!repoPath || !ref) return { repo: url };\n\t\t\tparsed.pathname = `/${repoPath}`;\n\t\t\treturn {\n\t\t\t\trepo: parsed.toString().replace(/\\/$/, \"\"),\n\t\t\t\tref,\n\t\t\t};\n\t\t} catch {\n\t\t\treturn { repo: url };\n\t\t}\n\t}\n\n\tconst slashIndex = url.indexOf(\"/\");\n\tif (slashIndex < 0) {\n\t\treturn { repo: url };\n\t}\n\tconst host = url.slice(0, slashIndex);\n\tconst pathWithMaybeRef = url.slice(slashIndex + 1);\n\tconst refSeparator = pathWithMaybeRef.indexOf(\"@\");\n\tif (refSeparator < 0) {\n\t\treturn { repo: url };\n\t}\n\tconst repoPath = pathWithMaybeRef.slice(0, refSeparator);\n\tconst ref = pathWithMaybeRef.slice(refSeparator + 1);\n\tif (!repoPath || !ref) {\n\t\treturn { repo: url };\n\t}\n\treturn {\n\t\trepo: `${host}/${repoPath}`,\n\t\tref,\n\t};\n}\n\nfunction parseGenericGitUrl(url: string): GitSource | null {\n\tconst { repo: repoWithoutRef, ref } = splitRef(url);\n\tlet repo = repoWithoutRef;\n\tlet host = \"\";\n\tlet path = \"\";\n\n\tconst scpLikeMatch = repoWithoutRef.match(/^git@([^:]+):(.+)$/);\n\tif (scpLikeMatch) {\n\t\thost = scpLikeMatch[1] ?? \"\";\n\t\tpath = scpLikeMatch[2] ?? \"\";\n\t} else if (\n\t\trepoWithoutRef.startsWith(\"https://\") ||\n\t\trepoWithoutRef.startsWith(\"http://\") ||\n\t\trepoWithoutRef.startsWith(\"ssh://\") ||\n\t\trepoWithoutRef.startsWith(\"git://\")\n\t) {\n\t\ttry {\n\t\t\tconst parsed = new URL(repoWithoutRef);\n\t\t\thost = parsed.hostname;\n\t\t\tpath = parsed.pathname.replace(/^\\/+/, \"\");\n\t\t} catch {\n\t\t\treturn null;\n\t\t}\n\t} else {\n\t\tconst slashIndex = repoWithoutRef.indexOf(\"/\");\n\t\tif (slashIndex < 0) {\n\t\t\treturn null;\n\t\t}\n\t\thost = repoWithoutRef.slice(0, slashIndex);\n\t\tpath = repoWithoutRef.slice(slashIndex + 1);\n\t\tif (!host.includes(\".\") && host !== \"localhost\") {\n\t\t\treturn null;\n\t\t}\n\t\trepo = `https://${repoWithoutRef}`;\n\t}\n\n\tconst normalizedPath = path.replace(/\\.git$/, \"\").replace(/^\\/+/, \"\");\n\tif (!host || !normalizedPath || normalizedPath.split(\"/\").length < 2) {\n\t\treturn null;\n\t}\n\n\treturn {\n\t\ttype: \"git\",\n\t\trepo,\n\t\thost,\n\t\tpath: normalizedPath,\n\t\tref,\n\t\tpinned: Boolean(ref),\n\t};\n}\n\n/**\n * Parse git source into a GitSource.\n *\n * Rules:\n * - With git: prefix, accept all historical shorthand forms.\n * - Without git: prefix, only accept explicit protocol URLs.\n */\nexport function parseGitUrl(source: string): GitSource | null {\n\tconst trimmed = source.trim();\n\tconst hasGitPrefix = trimmed.startsWith(\"git:\");\n\tconst url = hasGitPrefix ? trimmed.slice(4).trim() : trimmed;\n\n\tif (!hasGitPrefix && !/^(https?|ssh|git):\\/\\//i.test(url)) {\n\t\treturn null;\n\t}\n\n\tconst split = splitRef(url);\n\n\tconst hostedCandidates = [split.ref ? `${split.repo}#${split.ref}` : undefined, url].filter(\n\t\t(value): value is string => Boolean(value),\n\t);\n\tfor (const candidate of hostedCandidates) {\n\t\tconst info = hostedGitInfo.fromUrl(candidate);\n\t\tif (info) {\n\t\t\tif (split.ref && info.project?.includes(\"@\")) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst useHttpsPrefix =\n\t\t\t\t!split.repo.startsWith(\"http://\") &&\n\t\t\t\t!split.repo.startsWith(\"https://\") &&\n\t\t\t\t!split.repo.startsWith(\"ssh://\") &&\n\t\t\t\t!split.repo.startsWith(\"git://\") &&\n\t\t\t\t!split.repo.startsWith(\"git@\");\n\t\t\treturn {\n\t\t\t\ttype: \"git\",\n\t\t\t\trepo: useHttpsPrefix ? `https://${split.repo}` : split.repo,\n\t\t\t\thost: info.domain || \"\",\n\t\t\t\tpath: `${info.user}/${info.project}`.replace(/\\.git$/, \"\"),\n\t\t\t\tref: info.committish || split.ref || undefined,\n\t\t\t\tpinned: Boolean(info.committish || split.ref),\n\t\t\t};\n\t\t}\n\t}\n\n\tconst httpsCandidates = [split.ref ? `https://${split.repo}#${split.ref}` : undefined, `https://${url}`].filter(\n\t\t(value): value is string => Boolean(value),\n\t);\n\tfor (const candidate of httpsCandidates) {\n\t\tconst info = hostedGitInfo.fromUrl(candidate);\n\t\tif (info) {\n\t\t\tif (split.ref && info.project?.includes(\"@\")) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\treturn {\n\t\t\t\ttype: \"git\",\n\t\t\t\trepo: `https://${split.repo}`,\n\t\t\t\thost: info.domain || \"\",\n\t\t\t\tpath: `${info.user}/${info.project}`.replace(/\\.git$/, \"\"),\n\t\t\t\tref: info.committish || split.ref || undefined,\n\t\t\t\tpinned: Boolean(info.committish || split.ref),\n\t\t\t};\n\t\t}\n\t}\n\n\treturn parseGenericGitUrl(url);\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"image-convert.d.ts","sourceRoot":"","sources":["../../src/utils/image-convert.ts"],"names":[],"mappings":"AAGA;;;GAGG;AACH,wBAAsB,YAAY,CACjC,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,MAAM,GACd,OAAO,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAAC,CA8BpD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"image-convert.js","sourceRoot":"","sources":["../../src/utils/image-convert.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,YAAY,CACjC,UAAkB,EAClB,QAAgB;IAEhB,oCAAoC;IACpC,IAAI,QAAQ,KAAK,WAAW,EAAE,CAAC;QAC9B,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAE,CAAC;IACvC,CAAC;IAED,MAAM,MAAM,GAAG,MAAM,UAAU,EAAE,CAAC;IAClC,IAAI,CAAC,MAAM,EAAE,CAAC;QACb,sCAAsC;QACtC,OAAO,IAAI,CAAC;IACb,CAAC;IAED,IAAI,CAAC;QACJ,MAAM,KAAK,GAAG,IAAI,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC,CAAC;QAChE,MAAM,QAAQ,GAAG,MAAM,CAAC,WAAW,CAAC,kBAAkB,CAAC,KAAK,CAAC,CAAC;QAC9D,MAAM,KAAK,GAAG,oBAAoB,CAAC,MAAM,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC;QAC5D,IAAI,KAAK,KAAK,QAAQ;YAAE,QAAQ,CAAC,IAAI,EAAE,CAAC;QACxC,IAAI,CAAC;YACJ,MAAM,SAAS,GAAG,KAAK,CAAC,SAAS,EAAE,CAAC;YACpC,OAAO;gBACN,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC;gBAC/C,QAAQ,EAAE,WAAW;aACrB,CAAC;QACH,CAAC;gBAAS,CAAC;YACV,KAAK,CAAC,IAAI,EAAE,CAAC;QACd,CAAC;IACF,CAAC;IAAC,MAAM,CAAC;QACR,oBAAoB;QACpB,OAAO,IAAI,CAAC;IACb,CAAC;AACF,CAAC","sourcesContent":["import { applyExifOrientation } from \"./exif-orientation.js\";\nimport { loadPhoton } from \"./photon.js\";\n\n/**\n * Convert image to PNG format for terminal display.\n * Kitty graphics protocol requires PNG format (f=100).\n */\nexport async function convertToPng(\n\tbase64Data: string,\n\tmimeType: string,\n): Promise<{ data: string; mimeType: string } | null> {\n\t// Already PNG, no conversion needed\n\tif (mimeType === \"image/png\") {\n\t\treturn { data: base64Data, mimeType };\n\t}\n\n\tconst photon = await loadPhoton();\n\tif (!photon) {\n\t\t// Photon not available, can't convert\n\t\treturn null;\n\t}\n\n\ttry {\n\t\tconst bytes = new Uint8Array(Buffer.from(base64Data, \"base64\"));\n\t\tconst rawImage = photon.PhotonImage.new_from_byteslice(bytes);\n\t\tconst image = applyExifOrientation(photon, rawImage, bytes);\n\t\tif (image !== rawImage) rawImage.free();\n\t\ttry {\n\t\t\tconst pngBuffer = image.get_bytes();\n\t\t\treturn {\n\t\t\t\tdata: Buffer.from(pngBuffer).toString(\"base64\"),\n\t\t\t\tmimeType: \"image/png\",\n\t\t\t};\n\t\t} finally {\n\t\t\timage.free();\n\t\t}\n\t} catch {\n\t\t// Conversion failed\n\t\treturn null;\n\t}\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"image-resize.d.ts","sourceRoot":"","sources":["../../src/utils/image-resize.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAInD,MAAM,WAAW,kBAAkB;IAClC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,YAAY;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,cAAc,EAAE,MAAM,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,OAAO,CAAC;CACpB;AA2BD;;;;;;;;;;;;GAYG;AACH,wBAAsB,WAAW,CAAC,GAAG,EAAE,YAAY,EAAE,OAAO,CAAC,EAAE,kBAAkB,GAAG,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC,CAuG/G;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,GAAG,SAAS,CAO5E"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"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,KAAK,IAAI,MAAM,CAAC,MAAM,6BAA6B,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,6BAA6B,CAAC;AACnM,CAAC","sourcesContent":["import type { ImageContent } from \"@orient-cli/ai\";\nimport { applyExifOrientation } from \"./exif-orientation.js\";\nimport { loadPhoton } from \"./photon.js\";\n\nexport interface ImageResizeOptions {\n\tmaxWidth?: number; // Default: 2000\n\tmaxHeight?: number; // Default: 2000\n\tmaxBytes?: number; // Default: 4.5MB of base64 payload (below Anthropic's 5MB limit)\n\tjpegQuality?: number; // Default: 80\n}\n\nexport interface ResizedImage {\n\tdata: string; // base64\n\tmimeType: string;\n\toriginalWidth: number;\n\toriginalHeight: number;\n\twidth: number;\n\theight: number;\n\twasResized: boolean;\n}\n\n// 4.5MB of base64 payload. Provides headroom below Anthropic's 5MB limit.\nconst DEFAULT_MAX_BYTES = 4.5 * 1024 * 1024;\n\nconst DEFAULT_OPTIONS: Required<ImageResizeOptions> = {\n\tmaxWidth: 2000,\n\tmaxHeight: 2000,\n\tmaxBytes: DEFAULT_MAX_BYTES,\n\tjpegQuality: 80,\n};\n\ninterface EncodedCandidate {\n\tdata: string;\n\tencodedSize: number;\n\tmimeType: string;\n}\n\nfunction encodeCandidate(buffer: Uint8Array, mimeType: string): EncodedCandidate {\n\tconst data = Buffer.from(buffer).toString(\"base64\");\n\treturn {\n\t\tdata,\n\t\tencodedSize: Buffer.byteLength(data, \"utf-8\"),\n\t\tmimeType,\n\t};\n}\n\n/**\n * Resize an image to fit within the specified max dimensions and encoded file size.\n * Returns null if the image cannot be resized below maxBytes.\n *\n * Uses Photon (Rust/WASM) for image processing. If Photon is not available,\n * returns null.\n *\n * Strategy for staying under maxBytes:\n * 1. First resize to maxWidth/maxHeight\n * 2. Try both PNG and JPEG formats, pick the smaller one\n * 3. If still too large, try JPEG with decreasing quality\n * 4. If still too large, progressively reduce dimensions until 1x1\n */\nexport async function resizeImage(img: ImageContent, options?: ImageResizeOptions): Promise<ResizedImage | null> {\n\tconst opts = { ...DEFAULT_OPTIONS, ...options };\n\tconst inputBuffer = Buffer.from(img.data, \"base64\");\n\tconst inputBase64Size = Buffer.byteLength(img.data, \"utf-8\");\n\n\tconst photon = await loadPhoton();\n\tif (!photon) {\n\t\treturn null;\n\t}\n\n\tlet image: ReturnType<typeof photon.PhotonImage.new_from_byteslice> | undefined;\n\ttry {\n\t\tconst inputBytes = new Uint8Array(inputBuffer);\n\t\tconst rawImage = photon.PhotonImage.new_from_byteslice(inputBytes);\n\t\timage = applyExifOrientation(photon, rawImage, inputBytes);\n\t\tif (image !== rawImage) rawImage.free();\n\n\t\tconst originalWidth = image.get_width();\n\t\tconst originalHeight = image.get_height();\n\t\tconst format = img.mimeType?.split(\"/\")[1] ?? \"png\";\n\n\t\t// Check if already within all limits (dimensions AND encoded size)\n\t\tif (originalWidth <= opts.maxWidth && originalHeight <= opts.maxHeight && inputBase64Size < opts.maxBytes) {\n\t\t\treturn {\n\t\t\t\tdata: img.data,\n\t\t\t\tmimeType: img.mimeType ?? `image/${format}`,\n\t\t\t\toriginalWidth,\n\t\t\t\toriginalHeight,\n\t\t\t\twidth: originalWidth,\n\t\t\t\theight: originalHeight,\n\t\t\t\twasResized: false,\n\t\t\t};\n\t\t}\n\n\t\t// Calculate initial dimensions respecting max limits\n\t\tlet targetWidth = originalWidth;\n\t\tlet targetHeight = originalHeight;\n\n\t\tif (targetWidth > opts.maxWidth) {\n\t\t\ttargetHeight = Math.round((targetHeight * opts.maxWidth) / targetWidth);\n\t\t\ttargetWidth = opts.maxWidth;\n\t\t}\n\t\tif (targetHeight > opts.maxHeight) {\n\t\t\ttargetWidth = Math.round((targetWidth * opts.maxHeight) / targetHeight);\n\t\t\ttargetHeight = opts.maxHeight;\n\t\t}\n\n\t\tfunction tryEncodings(width: number, height: number, jpegQualities: number[]): EncodedCandidate[] {\n\t\t\tconst resized = photon!.resize(image!, width, height, photon!.SamplingFilter.Lanczos3);\n\n\t\t\ttry {\n\t\t\t\tconst candidates: EncodedCandidate[] = [encodeCandidate(resized.get_bytes(), \"image/png\")];\n\t\t\t\tfor (const quality of jpegQualities) {\n\t\t\t\t\tcandidates.push(encodeCandidate(resized.get_bytes_jpeg(quality), \"image/jpeg\"));\n\t\t\t\t}\n\t\t\t\treturn candidates;\n\t\t\t} finally {\n\t\t\t\tresized.free();\n\t\t\t}\n\t\t}\n\n\t\tconst qualitySteps = Array.from(new Set([opts.jpegQuality, 85, 70, 55, 40]));\n\t\tlet currentWidth = targetWidth;\n\t\tlet currentHeight = targetHeight;\n\n\t\twhile (true) {\n\t\t\tconst candidates = tryEncodings(currentWidth, currentHeight, qualitySteps);\n\t\t\tfor (const candidate of candidates) {\n\t\t\t\tif (candidate.encodedSize < opts.maxBytes) {\n\t\t\t\t\treturn {\n\t\t\t\t\t\tdata: candidate.data,\n\t\t\t\t\t\tmimeType: candidate.mimeType,\n\t\t\t\t\t\toriginalWidth,\n\t\t\t\t\t\toriginalHeight,\n\t\t\t\t\t\twidth: currentWidth,\n\t\t\t\t\t\theight: currentHeight,\n\t\t\t\t\t\twasResized: true,\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (currentWidth === 1 && currentHeight === 1) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tconst nextWidth = currentWidth === 1 ? 1 : Math.max(1, Math.floor(currentWidth * 0.75));\n\t\t\tconst nextHeight = currentHeight === 1 ? 1 : Math.max(1, Math.floor(currentHeight * 0.75));\n\t\t\tif (nextWidth === currentWidth && nextHeight === currentHeight) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcurrentWidth = nextWidth;\n\t\t\tcurrentHeight = nextHeight;\n\t\t}\n\n\t\treturn null;\n\t} catch {\n\t\treturn null;\n\t} finally {\n\t\tif (image) {\n\t\t\timage.free();\n\t\t}\n\t}\n}\n\n/**\n * Format a dimension note for resized images.\n * This helps the model understand the coordinate mapping.\n */\nexport function formatDimensionNote(result: ResizedImage): string | undefined {\n\tif (!result.wasResized) {\n\t\treturn undefined;\n\t}\n\n\tconst scale = result.originalWidth / result.width;\n\treturn `[Image: original ${result.originalWidth}x${result.originalHeight}, displayed at ${result.width}x${result.height}. Multiply coordinates by ${scale.toFixed(2)} to map to original image.]`;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mime.d.ts","sourceRoot":"","sources":["../../src/utils/mime.ts"],"names":[],"mappings":"AAOA,wBAAsB,oCAAoC,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAsBnG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mime.js","sourceRoot":"","sources":["../../src/utils/mime.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACxC,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAE/C,MAAM,gBAAgB,GAAG,IAAI,GAAG,CAAC,CAAC,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,YAAY,CAAC,CAAC,CAAC;AAEzF,MAAM,qBAAqB,GAAG,IAAI,CAAC;AAEnC,MAAM,CAAC,KAAK,UAAU,oCAAoC,CAAC,QAAgB;IAC1E,MAAM,UAAU,GAAG,MAAM,IAAI,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC;IAC7C,IAAI,CAAC;QACJ,MAAM,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAC;QACnD,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,UAAU,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,qBAAqB,EAAE,CAAC,CAAC,CAAC;QACjF,IAAI,SAAS,KAAK,CAAC,EAAE,CAAC;YACrB,OAAO,IAAI,CAAC;QACb,CAAC;QAED,MAAM,QAAQ,GAAG,MAAM,kBAAkB,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC,CAAC;QACzE,IAAI,CAAC,QAAQ,EAAE,CAAC;YACf,OAAO,IAAI,CAAC;QACb,CAAC;QAED,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;YAC1C,OAAO,IAAI,CAAC;QACb,CAAC;QAED,OAAO,QAAQ,CAAC,IAAI,CAAC;IACtB,CAAC;YAAS,CAAC;QACV,MAAM,UAAU,CAAC,KAAK,EAAE,CAAC;IAC1B,CAAC;AACF,CAAC","sourcesContent":["import { open } from \"node:fs/promises\";\nimport { fileTypeFromBuffer } from \"file-type\";\n\nconst IMAGE_MIME_TYPES = new Set([\"image/jpeg\", \"image/png\", \"image/gif\", \"image/webp\"]);\n\nconst FILE_TYPE_SNIFF_BYTES = 4100;\n\nexport async function detectSupportedImageMimeTypeFromFile(filePath: string): Promise<string | null> {\n\tconst fileHandle = await open(filePath, \"r\");\n\ttry {\n\t\tconst buffer = Buffer.alloc(FILE_TYPE_SNIFF_BYTES);\n\t\tconst { bytesRead } = await fileHandle.read(buffer, 0, FILE_TYPE_SNIFF_BYTES, 0);\n\t\tif (bytesRead === 0) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst fileType = await fileTypeFromBuffer(buffer.subarray(0, bytesRead));\n\t\tif (!fileType) {\n\t\t\treturn null;\n\t\t}\n\n\t\tif (!IMAGE_MIME_TYPES.has(fileType.mime)) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn fileType.mime;\n\t} finally {\n\t\tawait fileHandle.close();\n\t}\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"paths.d.ts","sourceRoot":"","sources":["../../src/utils/paths.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAclD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"paths.js","sourceRoot":"","sources":["../../src/utils/paths.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,UAAU,WAAW,CAAC,KAAa;IACxC,MAAM,OAAO,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC;IAC7B,2BAA2B;IAC3B,IACC,OAAO,CAAC,UAAU,CAAC,MAAM,CAAC;QAC1B,OAAO,CAAC,UAAU,CAAC,MAAM,CAAC;QAC1B,OAAO,CAAC,UAAU,CAAC,SAAS,CAAC;QAC7B,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC;QAC3B,OAAO,CAAC,UAAU,CAAC,QAAQ,CAAC;QAC5B,OAAO,CAAC,UAAU,CAAC,MAAM,CAAC,EACzB,CAAC;QACF,OAAO,KAAK,CAAC;IACd,CAAC;IACD,OAAO,IAAI,CAAC;AACb,CAAC","sourcesContent":["/**\n * Returns true if the value is NOT a package source (npm:, git:, etc.)\n * or a URL protocol. Bare names and relative paths without ./ prefix\n * are considered local.\n */\nexport function isLocalPath(value: string): boolean {\n\tconst trimmed = value.trim();\n\t// Known non-local prefixes\n\tif (\n\t\ttrimmed.startsWith(\"npm:\") ||\n\t\ttrimmed.startsWith(\"git:\") ||\n\t\ttrimmed.startsWith(\"github:\") ||\n\t\ttrimmed.startsWith(\"http:\") ||\n\t\ttrimmed.startsWith(\"https:\") ||\n\t\ttrimmed.startsWith(\"ssh:\")\n\t) {\n\t\treturn false;\n\t}\n\treturn true;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"photon.d.ts","sourceRoot":"","sources":["../../src/utils/photon.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAWH,YAAY,EAAE,WAAW,IAAI,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAuFjF;;;GAGG;AACH,wBAAsB,UAAU,IAAI,OAAO,CAAC,cAAc,4BAA4B,CAAC,GAAG,IAAI,CAAC,CAuB9F"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"photon.js","sourceRoot":"","sources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IAAI,CAAC;YACJ,SAAS,CAAC,YAAY,GAAG,oBAAoB,CAAC;QAC/C,CAAC;QAAC,MAAM,CAAC;YACR,MAAM,CAAC,cAAc,CAAC,EAAE,EAAE,cAAc,EAAE;gBACzC,KAAK,EAAE,oBAAoB;gBAC3B,QAAQ,EAAE,IAAI;gBACd,YAAY,EAAE,IAAI;aAClB,CAAC,CAAC;QACJ,CAAC;IACF,CAAC,CAAC;AACH,CAAC;AAED;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,UAAU;IAC/B,IAAI,YAAY,EAAE,CAAC;QAClB,OAAO,YAAY,CAAC;IACrB,CAAC;IAED,IAAI,WAAW,EAAE,CAAC;QACjB,OAAO,WAAW,CAAC;IACpB,CAAC;IAED,WAAW,GAAG,CAAC,KAAK,IAAI,EAAE;QACzB,MAAM,mBAAmB,GAAG,mBAAmB,EAAE,CAAC;QAClD,IAAI,CAAC;YACJ,YAAY,GAAG,MAAM,MAAM,CAAC,4BAA4B,CAAC,CAAC;YAC1D,OAAO,YAAY,CAAC;QACrB,CAAC;QAAC,MAAM,CAAC;YACR,YAAY,GAAG,IAAI,CAAC;YACpB,OAAO,YAAY,CAAC;QACrB,CAAC;gBAAS,CAAC;YACV,mBAAmB,EAAE,CAAC;QACvB,CAAC;IACF,CAAC,CAAC,EAAE,CAAC;IAEL,OAAO,WAAW,CAAC;AACpB,CAAC","sourcesContent":["/**\n * Photon image processing wrapper.\n *\n * This module provides a unified interface to @silvia-odwyer/photon-node that works in:\n * 1. Node.js (development, npm run build)\n * 2. Bun compiled binaries (standalone distribution)\n *\n * The challenge: photon-node's CJS entry uses fs.readFileSync(__dirname + '/photon_rs_bg.wasm')\n * which bakes the build machine's absolute path into Bun compiled binaries.\n *\n * Solution:\n * 1. Patch fs.readFileSync to redirect missing photon_rs_bg.wasm reads\n * 2. Copy photon_rs_bg.wasm next to the executable in build:binary\n */\n\nimport type { PathOrFileDescriptor } from \"fs\";\nimport { createRequire } from \"module\";\nimport * as path from \"path\";\nimport { fileURLToPath } from \"url\";\n\nconst require = createRequire(import.meta.url);\nconst fs = require(\"fs\") as typeof import(\"fs\");\n\n// Re-export types from the main package\nexport type { PhotonImage as PhotonImageType } from \"@silvia-odwyer/photon-node\";\n\ntype ReadFileSync = typeof fs.readFileSync;\n\nconst WASM_FILENAME = \"photon_rs_bg.wasm\";\n\n// Lazy-loaded photon module\nlet photonModule: typeof import(\"@silvia-odwyer/photon-node\") | null = null;\nlet loadPromise: Promise<typeof import(\"@silvia-odwyer/photon-node\") | null> | null = null;\n\nfunction pathOrNull(file: PathOrFileDescriptor): string | null {\n\tif (typeof file === \"string\") {\n\t\treturn file;\n\t}\n\tif (file instanceof URL) {\n\t\treturn fileURLToPath(file);\n\t}\n\treturn null;\n}\n\nfunction getFallbackWasmPaths(): string[] {\n\tconst execDir = path.dirname(process.execPath);\n\treturn [\n\t\tpath.join(execDir, WASM_FILENAME),\n\t\tpath.join(execDir, \"photon\", WASM_FILENAME),\n\t\tpath.join(process.cwd(), WASM_FILENAME),\n\t];\n}\n\nfunction patchPhotonWasmRead(): () => void {\n\tconst originalReadFileSync: ReadFileSync = fs.readFileSync.bind(fs);\n\tconst fallbackPaths = getFallbackWasmPaths();\n\tconst mutableFs = fs as { readFileSync: ReadFileSync };\n\n\tconst patchedReadFileSync: ReadFileSync = ((...args: Parameters<ReadFileSync>) => {\n\t\tconst [file, options] = args;\n\t\tconst resolvedPath = pathOrNull(file);\n\n\t\tif (resolvedPath?.endsWith(WASM_FILENAME)) {\n\t\t\ttry {\n\t\t\t\treturn originalReadFileSync(...args);\n\t\t\t} catch (error) {\n\t\t\t\tconst err = error as NodeJS.ErrnoException;\n\t\t\t\tif (err?.code && err.code !== \"ENOENT\") {\n\t\t\t\t\tthrow error;\n\t\t\t\t}\n\n\t\t\t\tfor (const fallbackPath of fallbackPaths) {\n\t\t\t\t\tif (!fs.existsSync(fallbackPath)) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tif (options === undefined) {\n\t\t\t\t\t\treturn originalReadFileSync(fallbackPath);\n\t\t\t\t\t}\n\t\t\t\t\treturn originalReadFileSync(fallbackPath, options);\n\t\t\t\t}\n\n\t\t\t\tthrow error;\n\t\t\t}\n\t\t}\n\n\t\treturn originalReadFileSync(...args);\n\t}) as ReadFileSync;\n\n\ttry {\n\t\tmutableFs.readFileSync = patchedReadFileSync;\n\t} catch {\n\t\tObject.defineProperty(fs, \"readFileSync\", {\n\t\t\tvalue: patchedReadFileSync,\n\t\t\twritable: true,\n\t\t\tconfigurable: true,\n\t\t});\n\t}\n\n\treturn () => {\n\t\ttry {\n\t\t\tmutableFs.readFileSync = originalReadFileSync;\n\t\t} catch {\n\t\t\tObject.defineProperty(fs, \"readFileSync\", {\n\t\t\t\tvalue: originalReadFileSync,\n\t\t\t\twritable: true,\n\t\t\t\tconfigurable: true,\n\t\t\t});\n\t\t}\n\t};\n}\n\n/**\n * Load the photon module asynchronously.\n * Returns cached module on subsequent calls.\n */\nexport async function loadPhoton(): Promise<typeof import(\"@silvia-odwyer/photon-node\") | null> {\n\tif (photonModule) {\n\t\treturn photonModule;\n\t}\n\n\tif (loadPromise) {\n\t\treturn loadPromise;\n\t}\n\n\tloadPromise = (async () => {\n\t\tconst restoreReadFileSync = patchPhotonWasmRead();\n\t\ttry {\n\t\t\tphotonModule = await import(\"@silvia-odwyer/photon-node\");\n\t\t\treturn photonModule;\n\t\t} catch {\n\t\t\tphotonModule = null;\n\t\t\treturn photonModule;\n\t\t} finally {\n\t\t\trestoreReadFileSync();\n\t\t}\n\t})();\n\n\treturn loadPromise;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shell.d.ts","sourceRoot":"","sources":["../../src/utils/shell.ts"],"names":[],"mappings":"AA2CA;;;;;;GAMG;AACH,wBAAgB,cAAc,IAAI;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,EAAE,CAAA;CAAE,CAoElE;AA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,GAAG,EAAE,SAAS,CAAC,CAAC;YAC9B,CAAC;YAAC,MAAM,CAAC;gBACR,uBAAuB;YACxB,CAAC;QACF,CAAC;IACF,CAAC;AACF,CAAC","sourcesContent":["import { existsSync } from \"node:fs\";\nimport { delimiter } from \"node:path\";\nimport { spawn, spawnSync } from \"child_process\";\nimport { getBinDir, getSettingsPath } from \"../config.js\";\nimport { SettingsManager } from \"../core/settings-manager.js\";\n\nlet cachedShellConfig: { shell: string; args: string[] } | null = null;\n\n/**\n * Find bash executable on PATH (cross-platform)\n */\nfunction findBashOnPath(): string | null {\n\tif (process.platform === \"win32\") {\n\t\t// Windows: Use 'where' and verify file exists (where can return non-existent paths)\n\t\ttry {\n\t\t\tconst result = spawnSync(\"where\", [\"bash.exe\"], { encoding: \"utf-8\", timeout: 5000 });\n\t\t\tif (result.status === 0 && result.stdout) {\n\t\t\t\tconst firstMatch = result.stdout.trim().split(/\\r?\\n/)[0];\n\t\t\t\tif (firstMatch && existsSync(firstMatch)) {\n\t\t\t\t\treturn firstMatch;\n\t\t\t\t}\n\t\t\t}\n\t\t} catch {\n\t\t\t// Ignore errors\n\t\t}\n\t\treturn null;\n\t}\n\n\t// Unix: Use 'which' and trust its output (handles Termux and special filesystems)\n\ttry {\n\t\tconst result = spawnSync(\"which\", [\"bash\"], { encoding: \"utf-8\", timeout: 5000 });\n\t\tif (result.status === 0 && result.stdout) {\n\t\t\tconst firstMatch = result.stdout.trim().split(/\\r?\\n/)[0];\n\t\t\tif (firstMatch) {\n\t\t\t\treturn firstMatch;\n\t\t\t}\n\t\t}\n\t} catch {\n\t\t// Ignore errors\n\t}\n\treturn null;\n}\n\n/**\n * Get shell configuration based on platform.\n * Resolution order:\n * 1. User-specified shellPath in settings.json\n * 2. On Windows: Git Bash in known locations, then bash on PATH\n * 3. On Unix: /bin/bash, then bash on PATH, then fallback to sh\n */\nexport function getShellConfig(): { shell: string; args: string[] } {\n\tif (cachedShellConfig) {\n\t\treturn cachedShellConfig;\n\t}\n\n\tconst settings = SettingsManager.create();\n\tconst customShellPath = settings.getShellPath();\n\n\t// 1. Check user-specified shell path\n\tif (customShellPath) {\n\t\tif (existsSync(customShellPath)) {\n\t\t\tcachedShellConfig = { shell: customShellPath, args: [\"-c\"] };\n\t\t\treturn cachedShellConfig;\n\t\t}\n\t\tthrow new Error(\n\t\t\t`Custom shell path not found: ${customShellPath}\\nPlease update shellPath in ${getSettingsPath()}`,\n\t\t);\n\t}\n\n\tif (process.platform === \"win32\") {\n\t\t// 2. Try Git Bash in known locations\n\t\tconst paths: string[] = [];\n\t\tconst programFiles = process.env.ProgramFiles;\n\t\tif (programFiles) {\n\t\t\tpaths.push(`${programFiles}\\\\Git\\\\bin\\\\bash.exe`);\n\t\t}\n\t\tconst programFilesX86 = process.env[\"ProgramFiles(x86)\"];\n\t\tif (programFilesX86) {\n\t\t\tpaths.push(`${programFilesX86}\\\\Git\\\\bin\\\\bash.exe`);\n\t\t}\n\n\t\tfor (const path of paths) {\n\t\t\tif (existsSync(path)) {\n\t\t\t\tcachedShellConfig = { shell: path, args: [\"-c\"] };\n\t\t\t\treturn cachedShellConfig;\n\t\t\t}\n\t\t}\n\n\t\t// 3. Fallback: search bash.exe on PATH (Cygwin, MSYS2, WSL, etc.)\n\t\tconst bashOnPath = findBashOnPath();\n\t\tif (bashOnPath) {\n\t\t\tcachedShellConfig = { shell: bashOnPath, args: [\"-c\"] };\n\t\t\treturn cachedShellConfig;\n\t\t}\n\n\t\tthrow new Error(\n\t\t\t`No bash shell found. Options:\\n` +\n\t\t\t\t` 1. Install Git for Windows: https://git-scm.com/download/win\\n` +\n\t\t\t\t` 2. Add your bash to PATH (Cygwin, MSYS2, etc.)\\n` +\n\t\t\t\t` 3. Set shellPath in ${getSettingsPath()}\\n\\n` +\n\t\t\t\t`Searched Git Bash in:\\n${paths.map((p) => ` ${p}`).join(\"\\n\")}`,\n\t\t);\n\t}\n\n\t// Unix: try /bin/bash, then bash on PATH, then fallback to sh\n\tif (existsSync(\"/bin/bash\")) {\n\t\tcachedShellConfig = { shell: \"/bin/bash\", args: [\"-c\"] };\n\t\treturn cachedShellConfig;\n\t}\n\n\tconst bashOnPath = findBashOnPath();\n\tif (bashOnPath) {\n\t\tcachedShellConfig = { shell: bashOnPath, args: [\"-c\"] };\n\t\treturn cachedShellConfig;\n\t}\n\n\tcachedShellConfig = { shell: \"sh\", args: [\"-c\"] };\n\treturn cachedShellConfig;\n}\n\nexport function getShellEnv(): NodeJS.ProcessEnv {\n\tconst binDir = getBinDir();\n\tconst pathKey = Object.keys(process.env).find((key) => key.toLowerCase() === \"path\") ?? \"PATH\";\n\tconst currentPath = process.env[pathKey] ?? \"\";\n\tconst pathEntries = currentPath.split(delimiter).filter(Boolean);\n\tconst hasBinDir = pathEntries.includes(binDir);\n\tconst updatedPath = hasBinDir ? currentPath : [binDir, currentPath].filter(Boolean).join(delimiter);\n\n\treturn {\n\t\t...process.env,\n\t\t[pathKey]: updatedPath,\n\t};\n}\n\n/**\n * Sanitize binary output for display/storage.\n * Removes characters that crash string-width or cause display issues:\n * - Control characters (except tab, newline, carriage return)\n * - Lone surrogates\n * - Unicode Format characters (crash string-width due to a bug)\n * - Characters with undefined code points\n */\nexport function sanitizeBinaryOutput(str: string): string {\n\t// Use Array.from to properly iterate over code points (not code units)\n\t// This handles surrogate pairs correctly and catches edge cases where\n\t// codePointAt() might return undefined\n\treturn Array.from(str)\n\t\t.filter((char) => {\n\t\t\t// Filter out characters that cause string-width to crash\n\t\t\t// This includes:\n\t\t\t// - Unicode format characters\n\t\t\t// - Lone surrogates (already filtered by Array.from)\n\t\t\t// - Control chars except \\t \\n \\r\n\t\t\t// - Characters with undefined code points\n\n\t\t\tconst code = char.codePointAt(0);\n\n\t\t\t// Skip if code point is undefined (edge case with invalid strings)\n\t\t\tif (code === undefined) return false;\n\n\t\t\t// Allow tab, newline, carriage return\n\t\t\tif (code === 0x09 || code === 0x0a || code === 0x0d) return true;\n\n\t\t\t// Filter out control characters (0x00-0x1F, except 0x09, 0x0a, 0x0x0d)\n\t\t\tif (code <= 0x1f) return false;\n\n\t\t\t// Filter out Unicode format characters\n\t\t\tif (code >= 0xfff9 && code <= 0xfffb) return false;\n\n\t\t\treturn true;\n\t\t})\n\t\t.join(\"\");\n}\n\n/**\n * Kill a process and all its children (cross-platform)\n */\nexport function killProcessTree(pid: number): void {\n\tif (process.platform === \"win32\") {\n\t\t// Use taskkill on Windows to kill process tree\n\t\ttry {\n\t\t\tspawn(\"taskkill\", [\"/F\", \"/T\", \"/PID\", String(pid)], {\n\t\t\t\tstdio: \"ignore\",\n\t\t\t\tdetached: true,\n\t\t\t});\n\t\t} catch {\n\t\t\t// Ignore errors if taskkill fails\n\t\t}\n\t} else {\n\t\t// Use SIGKILL on Unix/Linux/Mac\n\t\ttry {\n\t\t\tprocess.kill(-pid, \"SIGKILL\");\n\t\t} catch {\n\t\t\t// Fallback to killing just the child if process group kill fails\n\t\t\ttry {\n\t\t\t\tprocess.kill(pid, \"SIGKILL\");\n\t\t\t} catch {\n\t\t\t\t// Process already dead\n\t\t\t}\n\t\t}\n\t}\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sleep.d.ts","sourceRoot":"","sources":["../../src/utils/sleep.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,wBAAgB,KAAK,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAcrE"}
|