@ashx-j/lunr 0.2.26 → 0.2.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -1
- package/LICENSE +22 -0
- package/dist/builtin-extensions/ashxj-thinking.d.ts +1 -1
- package/dist/builtin-extensions/ashxj-thinking.d.ts.map +1 -1
- package/dist/builtin-extensions/ashxj-thinking.js +1 -1
- package/dist/builtin-extensions/ashxj-thinking.js.map +1 -1
- package/dist/builtin-extensions/ashxj-tui.d.ts +11 -1
- package/dist/builtin-extensions/ashxj-tui.d.ts.map +1 -1
- package/dist/builtin-extensions/ashxj-tui.js +6 -10
- package/dist/builtin-extensions/ashxj-tui.js.map +1 -1
- package/dist/builtin-extensions/lunr-cron.d.ts +4 -5
- package/dist/builtin-extensions/lunr-cron.d.ts.map +1 -1
- package/dist/builtin-extensions/lunr-cron.js +94 -108
- package/dist/builtin-extensions/lunr-cron.js.map +1 -1
- package/dist/builtin-extensions/lunr-local-providers/local-servers.d.ts.map +1 -1
- package/dist/builtin-extensions/lunr-local-providers/local-servers.js +3 -1
- package/dist/builtin-extensions/lunr-local-providers/local-servers.js.map +1 -1
- package/dist/builtin-extensions/narumiruna-pi-goal/src/commands.d.ts.map +1 -1
- package/dist/builtin-extensions/narumiruna-pi-goal/src/commands.js +2 -2
- package/dist/builtin-extensions/narumiruna-pi-goal/src/commands.js.map +1 -1
- package/dist/builtin-extensions/narumiruna-pi-goal/src/goal.d.ts.map +1 -1
- package/dist/builtin-extensions/narumiruna-pi-goal/src/goal.js +1 -1
- package/dist/builtin-extensions/narumiruna-pi-goal/src/goal.js.map +1 -1
- package/dist/builtin-extensions/narumiruna-pi-goal/src/runtime.d.ts.map +1 -1
- package/dist/builtin-extensions/narumiruna-pi-goal/src/runtime.js +1 -1
- package/dist/builtin-extensions/narumiruna-pi-goal/src/runtime.js.map +1 -1
- package/dist/builtin-extensions/pi-intercom/index.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-intercom/index.js +2 -2
- package/dist/builtin-extensions/pi-intercom/index.js.map +1 -1
- package/dist/builtin-extensions/pi-lsp-extension/bemol-extension/index.d.ts +1 -1
- package/dist/builtin-extensions/pi-lsp-extension/bemol-extension/index.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-lsp-extension/bemol-extension/index.js +1 -1
- package/dist/builtin-extensions/pi-lsp-extension/bemol-extension/index.js.map +1 -1
- package/dist/builtin-extensions/pi-lsp-extension/src/index.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-lsp-extension/src/index.js +1 -15
- package/dist/builtin-extensions/pi-lsp-extension/src/index.js.map +1 -1
- package/dist/builtin-extensions/pi-lsp-extension/src/lsp-client.d.ts +6 -0
- package/dist/builtin-extensions/pi-lsp-extension/src/lsp-client.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-lsp-extension/src/lsp-client.js +187 -132
- package/dist/builtin-extensions/pi-lsp-extension/src/lsp-client.js.map +1 -1
- package/dist/builtin-extensions/pi-lsp-extension/src/lsp-manager.d.ts +8 -0
- package/dist/builtin-extensions/pi-lsp-extension/src/lsp-manager.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-lsp-extension/src/lsp-manager.js +142 -112
- package/dist/builtin-extensions/pi-lsp-extension/src/lsp-manager.js.map +1 -1
- package/dist/builtin-extensions/pi-lsp-extension/src/tools/code-rewrite.d.ts +12 -1
- package/dist/builtin-extensions/pi-lsp-extension/src/tools/code-rewrite.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-lsp-extension/src/tools/code-rewrite.js +14 -7
- package/dist/builtin-extensions/pi-lsp-extension/src/tools/code-rewrite.js.map +1 -1
- package/dist/builtin-extensions/pi-lsp-extension/src/tree-sitter/rewrite-engine.d.ts +11 -3
- package/dist/builtin-extensions/pi-lsp-extension/src/tree-sitter/rewrite-engine.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-lsp-extension/src/tree-sitter/rewrite-engine.js +67 -41
- package/dist/builtin-extensions/pi-lsp-extension/src/tree-sitter/rewrite-engine.js.map +1 -1
- package/dist/builtin-extensions/pi-lsp-extension/src/tree-sitter/search-engine.d.ts +4 -2
- package/dist/builtin-extensions/pi-lsp-extension/src/tree-sitter/search-engine.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-lsp-extension/src/tree-sitter/search-engine.js +3 -0
- package/dist/builtin-extensions/pi-lsp-extension/src/tree-sitter/search-engine.js.map +1 -1
- package/dist/builtin-extensions/pi-mcp-adapter/commands.d.ts +2 -1
- package/dist/builtin-extensions/pi-mcp-adapter/commands.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-mcp-adapter/commands.js +6 -6
- package/dist/builtin-extensions/pi-mcp-adapter/commands.js.map +1 -1
- package/dist/builtin-extensions/pi-mcp-adapter/config.d.ts +1 -1
- package/dist/builtin-extensions/pi-mcp-adapter/config.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-mcp-adapter/config.js +11 -5
- package/dist/builtin-extensions/pi-mcp-adapter/config.js.map +1 -1
- package/dist/builtin-extensions/pi-mcp-adapter/direct-tool-executor.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-mcp-adapter/direct-tool-executor.js +2 -2
- package/dist/builtin-extensions/pi-mcp-adapter/direct-tool-executor.js.map +1 -1
- package/dist/builtin-extensions/pi-mcp-adapter/host-html-template.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-mcp-adapter/host-html-template.js +1 -1
- package/dist/builtin-extensions/pi-mcp-adapter/host-html-template.js.map +1 -1
- package/dist/builtin-extensions/pi-mcp-adapter/index.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-mcp-adapter/index.js +48 -40
- package/dist/builtin-extensions/pi-mcp-adapter/index.js.map +1 -1
- package/dist/builtin-extensions/pi-mcp-adapter/init.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-mcp-adapter/init.js +3 -1
- package/dist/builtin-extensions/pi-mcp-adapter/init.js.map +1 -1
- package/dist/builtin-extensions/pi-mcp-adapter/mcp-auth-flow.d.ts +12 -40
- package/dist/builtin-extensions/pi-mcp-adapter/mcp-auth-flow.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-mcp-adapter/mcp-auth-flow.js +166 -235
- package/dist/builtin-extensions/pi-mcp-adapter/mcp-auth-flow.js.map +1 -1
- package/dist/builtin-extensions/pi-mcp-adapter/mcp-callback-server.d.ts +5 -0
- package/dist/builtin-extensions/pi-mcp-adapter/mcp-callback-server.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-mcp-adapter/mcp-callback-server.js +43 -13
- package/dist/builtin-extensions/pi-mcp-adapter/mcp-callback-server.js.map +1 -1
- package/dist/builtin-extensions/pi-mcp-adapter/mcp-oauth-provider.d.ts +14 -3
- package/dist/builtin-extensions/pi-mcp-adapter/mcp-oauth-provider.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-mcp-adapter/mcp-oauth-provider.js +73 -21
- package/dist/builtin-extensions/pi-mcp-adapter/mcp-oauth-provider.js.map +1 -1
- package/dist/builtin-extensions/pi-mcp-adapter/proxy-modes.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-mcp-adapter/proxy-modes.js +4 -4
- package/dist/builtin-extensions/pi-mcp-adapter/proxy-modes.js.map +1 -1
- package/dist/builtin-extensions/pi-mcp-adapter/server-manager.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-mcp-adapter/server-manager.js +2 -2
- package/dist/builtin-extensions/pi-mcp-adapter/server-manager.js.map +1 -1
- package/dist/builtin-extensions/pi-mcp-adapter/state.d.ts +2 -0
- package/dist/builtin-extensions/pi-mcp-adapter/state.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-mcp-adapter/state.js.map +1 -1
- package/dist/builtin-extensions/pi-ollama-cloud/index.d.ts +1 -1
- package/dist/builtin-extensions/pi-ollama-cloud/index.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-ollama-cloud/index.js +1 -1
- package/dist/builtin-extensions/pi-ollama-cloud/index.js.map +1 -1
- package/dist/builtin-extensions/pi-ollama-cloud/models.d.ts +11 -5
- package/dist/builtin-extensions/pi-ollama-cloud/models.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-ollama-cloud/models.js +12 -32
- package/dist/builtin-extensions/pi-ollama-cloud/models.js.map +1 -1
- package/dist/builtin-extensions/pi-prompt-template-model/index.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-prompt-template-model/index.js +5 -3
- package/dist/builtin-extensions/pi-prompt-template-model/index.js.map +1 -1
- package/dist/builtin-extensions/pi-prompt-template-model/prompt-loader.d.ts +2 -1
- package/dist/builtin-extensions/pi-prompt-template-model/prompt-loader.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-prompt-template-model/prompt-loader.js +21 -12
- package/dist/builtin-extensions/pi-prompt-template-model/prompt-loader.js.map +1 -1
- package/dist/builtin-extensions/pi-prompt-template-model/tool-manager.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-prompt-template-model/tool-manager.js +7 -24
- package/dist/builtin-extensions/pi-prompt-template-model/tool-manager.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/index.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/index.js +39 -77
- package/dist/builtin-extensions/pi-subagents/src/extension/index.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/notify.d.ts +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/notify.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/notify.js +15 -31
- package/dist/builtin-extensions/pi-subagents/src/runs/background/notify.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/result-watcher.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/result-watcher.js +7 -2
- package/dist/builtin-extensions/pi-subagents/src/runs/background/result-watcher.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/subagent-runner.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/subagent-runner.js +10 -2
- package/dist/builtin-extensions/pi-subagents/src/runs/background/subagent-runner.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/chain-execution.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/chain-execution.js +8 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/chain-execution.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/execution.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/execution.js +106 -24
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/execution.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/subagent-executor.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/subagent-executor.js +25 -5
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/subagent-executor.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/model-fallback.d.ts +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/model-fallback.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/model-fallback.js +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/model-fallback.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/parallel-utils.d.ts +7 -8
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/parallel-utils.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/parallel-utils.js +60 -32
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/parallel-utils.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/shared/utils.d.ts +1 -1
- package/dist/builtin-extensions/pi-subagents/src/shared/utils.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/shared/utils.js +15 -5
- package/dist/builtin-extensions/pi-subagents/src/shared/utils.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/slash/prompt-workflows.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/slash/prompt-workflows.js +4 -3
- package/dist/builtin-extensions/pi-subagents/src/slash/prompt-workflows.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/tui/render.d.ts +1 -1
- package/dist/builtin-extensions/pi-subagents/src/tui/render.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/tui/render.js +17 -8
- package/dist/builtin-extensions/pi-subagents/src/tui/render.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/watchdog/review.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/watchdog/review.js +3 -3
- package/dist/builtin-extensions/pi-subagents/src/watchdog/review.js.map +1 -1
- package/dist/builtin-extensions/pi-tps.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-tps.js +20 -17
- package/dist/builtin-extensions/pi-tps.js.map +1 -1
- package/dist/builtin-extensions/pi-web-access/activity.d.ts +1 -0
- package/dist/builtin-extensions/pi-web-access/activity.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-web-access/activity.js +27 -5
- package/dist/builtin-extensions/pi-web-access/activity.js.map +1 -1
- package/dist/builtin-extensions/pi-web-access/bounded-body.d.ts +3 -0
- package/dist/builtin-extensions/pi-web-access/bounded-body.d.ts.map +1 -0
- package/dist/builtin-extensions/pi-web-access/bounded-body.js +43 -0
- package/dist/builtin-extensions/pi-web-access/bounded-body.js.map +1 -0
- package/dist/builtin-extensions/pi-web-access/content-page.d.ts +24 -0
- package/dist/builtin-extensions/pi-web-access/content-page.d.ts.map +1 -0
- package/dist/builtin-extensions/pi-web-access/content-page.js +57 -0
- package/dist/builtin-extensions/pi-web-access/content-page.js.map +1 -0
- package/dist/builtin-extensions/pi-web-access/extract.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-web-access/extract.js +7 -2
- package/dist/builtin-extensions/pi-web-access/extract.js.map +1 -1
- package/dist/builtin-extensions/pi-web-access/github-extract.d.ts +0 -1
- package/dist/builtin-extensions/pi-web-access/github-extract.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-web-access/github-extract.js +147 -36
- package/dist/builtin-extensions/pi-web-access/github-extract.js.map +1 -1
- package/dist/builtin-extensions/pi-web-access/index.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-web-access/index.js +48 -73
- package/dist/builtin-extensions/pi-web-access/index.js.map +1 -1
- package/dist/builtin-extensions/pi-web-access/session-cleanup.d.ts +12 -4
- package/dist/builtin-extensions/pi-web-access/session-cleanup.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-web-access/session-cleanup.js +35 -12
- package/dist/builtin-extensions/pi-web-access/session-cleanup.js.map +1 -1
- package/dist/builtin-extensions/pi-web-access/storage.d.ts +9 -6
- package/dist/builtin-extensions/pi-web-access/storage.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-web-access/storage.js +36 -24
- package/dist/builtin-extensions/pi-web-access/storage.js.map +1 -1
- package/dist/builtin-extensions/simple-pi-memory.d.ts +1 -1
- package/dist/builtin-extensions/simple-pi-memory.d.ts.map +1 -1
- package/dist/builtin-extensions/simple-pi-memory.js +1 -1
- package/dist/builtin-extensions/simple-pi-memory.js.map +1 -1
- package/dist/cli/install-cli.d.ts.map +1 -1
- package/dist/cli/install-cli.js +38 -30
- package/dist/cli/install-cli.js.map +1 -1
- package/dist/core/agent-session-runtime.d.ts +13 -0
- package/dist/core/agent-session-runtime.d.ts.map +1 -1
- package/dist/core/agent-session-runtime.js +75 -11
- package/dist/core/agent-session-runtime.js.map +1 -1
- package/dist/core/agent-session-services.d.ts +1 -0
- package/dist/core/agent-session-services.d.ts.map +1 -1
- package/dist/core/agent-session-services.js +1 -0
- package/dist/core/agent-session-services.js.map +1 -1
- package/dist/core/agent-session.d.ts +40 -6
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +309 -76
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/browser/runtime.d.ts +2 -0
- package/dist/core/browser/runtime.d.ts.map +1 -1
- package/dist/core/browser/runtime.js +80 -45
- package/dist/core/browser/runtime.js.map +1 -1
- package/dist/core/browser/setup.d.ts.map +1 -1
- package/dist/core/browser/setup.js +12 -1
- package/dist/core/browser/setup.js.map +1 -1
- package/dist/core/computer-use/adapter.d.ts.map +1 -1
- package/dist/core/computer-use/adapter.js +7 -2
- package/dist/core/computer-use/adapter.js.map +1 -1
- package/dist/core/computer-use/image.d.ts.map +1 -1
- package/dist/core/computer-use/image.js +17 -5
- package/dist/core/computer-use/image.js.map +1 -1
- package/dist/core/computer-use/schemas.d.ts.map +1 -1
- package/dist/core/computer-use/schemas.js +23 -6
- package/dist/core/computer-use/schemas.js.map +1 -1
- package/dist/core/computer-use/workflow.d.ts.map +1 -1
- package/dist/core/computer-use/workflow.js +459 -119
- package/dist/core/computer-use/workflow.js.map +1 -1
- package/dist/core/cron/jobs.d.ts +26 -8
- package/dist/core/cron/jobs.d.ts.map +1 -1
- package/dist/core/cron/jobs.js +357 -232
- package/dist/core/cron/jobs.js.map +1 -1
- package/dist/core/cron/origin-context.d.ts +1 -0
- package/dist/core/cron/origin-context.d.ts.map +1 -1
- package/dist/core/cron/origin-context.js.map +1 -1
- package/dist/core/cron/scheduler.d.ts +22 -17
- package/dist/core/cron/scheduler.d.ts.map +1 -1
- package/dist/core/cron/scheduler.js +153 -73
- package/dist/core/cron/scheduler.js.map +1 -1
- package/dist/core/extensions/index.d.ts +1 -1
- package/dist/core/extensions/index.d.ts.map +1 -1
- package/dist/core/extensions/index.js.map +1 -1
- package/dist/core/extensions/runner.d.ts +1 -0
- package/dist/core/extensions/runner.d.ts.map +1 -1
- package/dist/core/extensions/runner.js +8 -0
- package/dist/core/extensions/runner.js.map +1 -1
- package/dist/core/extensions/types.d.ts +8 -0
- package/dist/core/extensions/types.d.ts.map +1 -1
- package/dist/core/extensions/types.js.map +1 -1
- package/dist/core/footer-data-provider.d.ts +4 -0
- package/dist/core/footer-data-provider.d.ts.map +1 -1
- package/dist/core/footer-data-provider.js +22 -1
- package/dist/core/footer-data-provider.js.map +1 -1
- package/dist/core/large-subagent-launch.d.ts +1 -1
- package/dist/core/large-subagent-launch.d.ts.map +1 -1
- package/dist/core/large-subagent-launch.js +7 -7
- package/dist/core/large-subagent-launch.js.map +1 -1
- package/dist/core/model-registry.d.ts +2 -0
- package/dist/core/model-registry.d.ts.map +1 -1
- package/dist/core/model-registry.js +5 -0
- package/dist/core/model-registry.js.map +1 -1
- package/dist/core/model-runtime.d.ts +4 -1
- package/dist/core/model-runtime.d.ts.map +1 -1
- package/dist/core/model-runtime.js +40 -4
- package/dist/core/model-runtime.js.map +1 -1
- package/dist/core/package-manager.d.ts.map +1 -1
- package/dist/core/package-manager.js.map +1 -1
- package/dist/core/permissions.d.ts +3 -3
- package/dist/core/permissions.d.ts.map +1 -1
- package/dist/core/permissions.js +11 -35
- package/dist/core/permissions.js.map +1 -1
- package/dist/core/plan-mode.d.ts +5 -13
- package/dist/core/plan-mode.d.ts.map +1 -1
- package/dist/core/plan-mode.js +126 -116
- package/dist/core/plan-mode.js.map +1 -1
- package/dist/core/project-trust.d.ts.map +1 -1
- package/dist/core/project-trust.js +1 -1
- package/dist/core/project-trust.js.map +1 -1
- package/dist/core/prompt-resource-bridge.d.ts +12 -0
- package/dist/core/prompt-resource-bridge.d.ts.map +1 -0
- package/dist/core/prompt-resource-bridge.js +9 -0
- package/dist/core/prompt-resource-bridge.js.map +1 -0
- package/dist/core/protected-targets.d.ts +6 -0
- package/dist/core/protected-targets.d.ts.map +1 -0
- package/dist/core/protected-targets.js +45 -0
- package/dist/core/protected-targets.js.map +1 -0
- package/dist/core/resource-loader.d.ts.map +1 -1
- package/dist/core/resource-loader.js +7 -0
- package/dist/core/resource-loader.js.map +1 -1
- package/dist/core/rollback.d.ts +19 -3
- package/dist/core/rollback.d.ts.map +1 -1
- package/dist/core/rollback.js +172 -56
- package/dist/core/rollback.js.map +1 -1
- package/dist/core/runtime-credentials.d.ts +3 -0
- package/dist/core/runtime-credentials.d.ts.map +1 -1
- package/dist/core/runtime-credentials.js +14 -1
- package/dist/core/runtime-credentials.js.map +1 -1
- package/dist/core/sdk.d.ts +3 -0
- package/dist/core/sdk.d.ts.map +1 -1
- package/dist/core/sdk.js +1 -0
- package/dist/core/sdk.js.map +1 -1
- package/dist/core/session-manager.d.ts +6 -0
- package/dist/core/session-manager.d.ts.map +1 -1
- package/dist/core/session-manager.js +95 -32
- package/dist/core/session-manager.js.map +1 -1
- package/dist/core/session-ownership.d.ts.map +1 -1
- package/dist/core/session-ownership.js +8 -3
- package/dist/core/session-ownership.js.map +1 -1
- package/dist/core/session-retention.d.ts.map +1 -1
- package/dist/core/session-retention.js +18 -7
- package/dist/core/session-retention.js.map +1 -1
- package/dist/core/session-startup-settings.d.ts +10 -0
- package/dist/core/session-startup-settings.d.ts.map +1 -0
- package/dist/core/session-startup-settings.js +70 -0
- package/dist/core/session-startup-settings.js.map +1 -0
- package/dist/core/subscriptions.d.ts +16 -7
- package/dist/core/subscriptions.d.ts.map +1 -1
- package/dist/core/subscriptions.js +96 -55
- package/dist/core/subscriptions.js.map +1 -1
- package/dist/core/trust-manager.d.ts +2 -1
- package/dist/core/trust-manager.d.ts.map +1 -1
- package/dist/core/trust-manager.js +6 -1
- package/dist/core/trust-manager.js.map +1 -1
- package/dist/core/update-check.d.ts.map +1 -1
- package/dist/core/update-check.js.map +1 -1
- package/dist/core/usage-adapters/kimi-coding.d.ts +2 -2
- package/dist/core/usage-adapters/kimi-coding.d.ts.map +1 -1
- package/dist/core/usage-adapters/kimi-coding.js +2 -2
- package/dist/core/usage-adapters/kimi-coding.js.map +1 -1
- package/dist/core/usage-adapters/openai-codex.d.ts +3 -2
- package/dist/core/usage-adapters/openai-codex.d.ts.map +1 -1
- package/dist/core/usage-adapters/openai-codex.js +3 -3
- package/dist/core/usage-adapters/openai-codex.js.map +1 -1
- package/dist/core/usage-adapters/xai.d.ts +2 -2
- package/dist/core/usage-adapters/xai.d.ts.map +1 -1
- package/dist/core/usage-adapters/xai.js +3 -3
- package/dist/core/usage-adapters/xai.js.map +1 -1
- package/dist/core/usage-adapters/zai.d.ts +2 -2
- package/dist/core/usage-adapters/zai.d.ts.map +1 -1
- package/dist/core/usage-adapters/zai.js +2 -2
- package/dist/core/usage-adapters/zai.js.map +1 -1
- package/dist/core/usage-service.d.ts +9 -2
- package/dist/core/usage-service.d.ts.map +1 -1
- package/dist/core/usage-service.js +95 -50
- package/dist/core/usage-service.js.map +1 -1
- package/dist/gateway/agent-bridge.d.ts +9 -1
- package/dist/gateway/agent-bridge.d.ts.map +1 -1
- package/dist/gateway/agent-bridge.js +91 -37
- package/dist/gateway/agent-bridge.js.map +1 -1
- package/dist/gateway/buttons.d.ts +8 -1
- package/dist/gateway/buttons.d.ts.map +1 -1
- package/dist/gateway/buttons.js +76 -18
- package/dist/gateway/buttons.js.map +1 -1
- package/dist/gateway/commands.d.ts +1 -0
- package/dist/gateway/commands.d.ts.map +1 -1
- package/dist/gateway/commands.js +10 -4
- package/dist/gateway/commands.js.map +1 -1
- package/dist/gateway/cron.d.ts +12 -11
- package/dist/gateway/cron.d.ts.map +1 -1
- package/dist/gateway/cron.js +65 -56
- package/dist/gateway/cron.js.map +1 -1
- package/dist/gateway/index.d.ts.map +1 -1
- package/dist/gateway/index.js +2 -1
- package/dist/gateway/index.js.map +1 -1
- package/dist/gateway/mobile-commands.d.ts +1 -0
- package/dist/gateway/mobile-commands.d.ts.map +1 -1
- package/dist/gateway/mobile-commands.js +56 -14
- package/dist/gateway/mobile-commands.js.map +1 -1
- package/dist/gateway/presenter.d.ts +12 -2
- package/dist/gateway/presenter.d.ts.map +1 -1
- package/dist/gateway/presenter.js +73 -38
- package/dist/gateway/presenter.js.map +1 -1
- package/dist/gateway/router.d.ts +2 -2
- package/dist/gateway/router.d.ts.map +1 -1
- package/dist/gateway/router.js +17 -2
- package/dist/gateway/router.js.map +1 -1
- package/dist/gateway/service.d.ts +2 -0
- package/dist/gateway/service.d.ts.map +1 -1
- package/dist/gateway/service.js +153 -0
- package/dist/gateway/service.js.map +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +86 -33
- package/dist/main.js.map +1 -1
- package/dist/modes/interactive/components/assistant-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/assistant-message.js +6 -4
- package/dist/modes/interactive/components/assistant-message.js.map +1 -1
- package/dist/modes/interactive/components/copyable-text.d.ts.map +1 -1
- package/dist/modes/interactive/components/copyable-text.js +3 -2
- package/dist/modes/interactive/components/copyable-text.js.map +1 -1
- package/dist/modes/interactive/components/extension-editor.d.ts.map +1 -1
- package/dist/modes/interactive/components/extension-editor.js +1 -1
- package/dist/modes/interactive/components/extension-editor.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +2 -2
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +96 -109
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/interactive/smooth-streaming.d.ts.map +1 -1
- package/dist/modes/interactive/smooth-streaming.js.map +1 -1
- package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-mode.js +2 -1
- package/dist/modes/rpc/rpc-mode.js.map +1 -1
- package/dist/node-runtime/{adapter-VFG7WNPX.js → adapter-247RTYLS.js} +4 -5
- package/dist/node-runtime/agent-session-services-KDMSPQDY.js +53 -0
- package/dist/node-runtime/{brave-UWDA3I22.js → brave-2AFFAXNN.js} +1 -1
- package/dist/node-runtime/{builtin-extensions-I2HIFEMY.js → builtin-extensions-OX6KELNX.js} +8 -7
- package/dist/node-runtime/{chunk-QH6YL7VK.js → chunk-252ZVPPF.js} +3 -3
- package/dist/node-runtime/{chunk-PCEW76PM.js → chunk-2OIPYKLZ.js} +6 -6
- package/dist/node-runtime/{chunk-XBWPBZBN.js → chunk-2SWW7KMW.js} +1 -1
- package/dist/node-runtime/{chunk-UQUCFAJ3.js → chunk-2VIW3IMF.js} +40 -7
- package/dist/node-runtime/{chunk-UOEDI7RP.js → chunk-4KNKQGHM.js} +2 -2
- package/dist/node-runtime/{chunk-FQMM2EZ2.js → chunk-64XTQNLA.js} +29 -7
- package/dist/node-runtime/{chunk-SPVDBUOS.js → chunk-6O3IW3IA.js} +2 -2
- package/dist/node-runtime/{chunk-5ZQXRPMC.js → chunk-6ZZHGUSA.js} +2 -2
- package/dist/node-runtime/chunk-A2WO6WIN.js +1197 -0
- package/dist/node-runtime/{chunk-WIF24I7G.js → chunk-APVM5NEU.js} +149 -144
- package/dist/node-runtime/{chunk-RCR3XAQY.js → chunk-AYHH7YSD.js} +177 -144
- package/dist/node-runtime/{chunk-LWYIVUGV.js → chunk-B2IBAXNX.js} +48 -31
- package/dist/node-runtime/{chunk-M3LZLQW2.js → chunk-BDRGN3L2.js} +1 -0
- package/dist/node-runtime/{chunk-GJ2RDBRL.js → chunk-BYC6RKCN.js} +4 -2
- package/dist/node-runtime/{chunk-UVWCDQYF.js → chunk-C3P6Q3B2.js} +455 -278
- package/dist/node-runtime/{chunk-SN2KSMPQ.js → chunk-DQSCFU7R.js} +13 -7
- package/dist/node-runtime/{chunk-4SBQAI4T.js → chunk-EBLAZVSA.js} +2058 -73
- package/dist/node-runtime/{chunk-2KIPT4HJ.js → chunk-EPR2F3GU.js} +68 -20
- package/dist/node-runtime/{chunk-CSFI6YXL.js → chunk-ES6PBSIE.js} +1 -1
- package/dist/node-runtime/{chunk-IF24A3FH.js → chunk-EVM653DD.js} +4 -4
- package/dist/node-runtime/{chunk-HTFRRDSF.js → chunk-F2SMQ6ES.js} +3 -2
- package/dist/node-runtime/chunk-F2V2F4ZG.js +114 -0
- package/dist/node-runtime/{chunk-IKU6Y7DL.js → chunk-FE3WZI7F.js} +9 -6
- package/dist/node-runtime/{chunk-GYIXXQAO.js → chunk-FIRA54AC.js} +2 -5
- package/dist/node-runtime/{chunk-6VYZ5UFP.js → chunk-FLGEEH27.js} +1 -1
- package/dist/node-runtime/{chunk-5EFIU3OM.js → chunk-FTKEZL27.js} +1 -1
- package/dist/node-runtime/{chunk-RGQAEOM5.js → chunk-FYIFPFXE.js} +23 -6
- package/dist/node-runtime/{chunk-HMBGROQK.js → chunk-GLDXBBL6.js} +3 -3
- package/dist/node-runtime/{chunk-KWA4OC2J.js → chunk-H6YBCWKG.js} +1 -1
- package/dist/node-runtime/{chunk-2MI5OPMN.js → chunk-HNNHHJAB.js} +68 -50
- package/dist/node-runtime/{chunk-I74LN5JG.js → chunk-HUD2RFJW.js} +2 -2
- package/dist/node-runtime/{chunk-I54LGHWM.js → chunk-I2H5QMWW.js} +3 -3
- package/dist/node-runtime/{chunk-XHIRAZ26.js → chunk-IAZSK7KK.js} +1 -1
- package/dist/node-runtime/{chunk-X3PGBLQ7.js → chunk-IHHTWSXN.js} +9 -9
- package/dist/node-runtime/{chunk-DAPBPCBP.js → chunk-IPP5BIV5.js} +25 -3
- package/dist/node-runtime/{chunk-QFWG2RVL.js → chunk-IXG6F4NT.js} +11 -0
- package/dist/node-runtime/{chunk-RDDAZOMU.js → chunk-JL4HYQXK.js} +1 -1
- package/dist/node-runtime/{chunk-CDVHZOOK.js → chunk-JQYNHAKX.js} +1 -1
- package/dist/node-runtime/{chunk-L24TPBS4.js → chunk-JWEVT363.js} +37 -29
- package/dist/node-runtime/{chunk-2HMIRK7W.js → chunk-LHV3V67B.js} +5 -5
- package/dist/node-runtime/{chunk-UAEOTO52.js → chunk-MNQXDFPV.js} +6 -2
- package/dist/node-runtime/{chunk-T4DA4XE7.js → chunk-MQPKUHRN.js} +162 -82
- package/dist/node-runtime/{chunk-MPKSOJBT.js → chunk-NHATCSOI.js} +4 -7
- package/dist/node-runtime/{chunk-RMQZU2YU.js → chunk-NNNR3QIY.js} +1 -1
- package/dist/node-runtime/{chunk-RWTKOC3B.js → chunk-QBTJG3UM.js} +1 -1
- package/dist/node-runtime/{chunk-P7XBVXGT.js → chunk-QNVMKNNN.js} +18 -14
- package/dist/node-runtime/{chunk-GS42T6MX.js → chunk-QW3AAHWN.js} +1 -1
- package/dist/node-runtime/{chunk-DVQSHCVP.js → chunk-R4WSB2MQ.js} +5 -5
- package/dist/node-runtime/{chunk-B4HP6ZWM.js → chunk-RHCGYWO7.js} +1 -1
- package/dist/node-runtime/{chunk-2CFDTH5B.js → chunk-RLGY2QIL.js} +45 -59
- package/dist/node-runtime/{chunk-KKUTQQV7.js → chunk-RYRGL7P4.js} +1 -1
- package/dist/node-runtime/{chunk-5Q4A37RB.js → chunk-TCT6PCUR.js} +32 -11
- package/dist/node-runtime/{chunk-D5UCKPBQ.js → chunk-UBWW2PID.js} +1 -1
- package/dist/node-runtime/{chunk-E75WFZ33.js → chunk-UNUZICC4.js} +3 -3
- package/dist/node-runtime/{chunk-RAK2QA2B.js → chunk-UYRKUKFE.js} +4 -4
- package/dist/node-runtime/{chunk-LWJXTA6Z.js → chunk-VSUEAI7O.js} +1377 -45
- package/dist/node-runtime/{chunk-NAY6UUQZ.js → chunk-WDIVLMOH.js} +1 -1
- package/dist/node-runtime/{chunk-E24EO34J.js → chunk-WPXUR3HE.js} +1 -1
- package/dist/node-runtime/{chunk-SLVOAQOY.js → chunk-WXYNALHD.js} +113 -1
- package/dist/node-runtime/{chunk-KJ6DWS3K.js → chunk-XEOCUEUJ.js} +121 -60
- package/dist/node-runtime/chunk-YD3IZAZ7.js +47 -0
- package/dist/node-runtime/chunk-YSB6URMT.js +41 -0
- package/dist/node-runtime/{chunk-LJTIVM7I.js → chunk-ZDJUR45D.js} +427 -126
- package/dist/node-runtime/{chunk-YWOJIGFY.js → chunk-ZEVFBFNF.js} +95 -142
- package/dist/node-runtime/{chunk-5B6VKFEV.js → chunk-ZIQUS5QO.js} +1 -1
- package/dist/node-runtime/cli-runtime.js +4 -4
- package/dist/node-runtime/{command-FSBU2EVZ.js → command-3HMSY6W2.js} +5 -5
- package/dist/node-runtime/{commands-EMBQQVVT.js → commands-D6A6H4TS.js} +11 -18
- package/dist/node-runtime/{commands-NAAL7KNT.js → commands-OCSSEEWJ.js} +16 -16
- package/dist/node-runtime/{config-QDD5PUE2.js → config-CU7M7BTK.js} +1 -1
- package/dist/node-runtime/{config-D4QUPAHX.js → config-DS7XLMEM.js} +2 -2
- package/dist/node-runtime/{direct-tool-executor-4D7UXYU4.js → direct-tool-executor-2QJXVQD2.js} +6 -11
- package/dist/node-runtime/{exa-LL64QZR2.js → exa-6VBZNPGE.js} +1 -1
- package/dist/node-runtime/{export-html-VM4J2MNR.js → export-html-BRWF5AHI.js} +4 -4
- package/dist/node-runtime/{extension-input-E7BJZ35H.js → extension-input-VBBMX7YV.js} +5 -5
- package/dist/node-runtime/{extension-selector-WU42XDTU.js → extension-selector-T5AOG5XB.js} +5 -5
- package/dist/node-runtime/{extract-EQJE7FZZ.js → extract-BFX2N35A.js} +3 -3
- package/dist/node-runtime/{gateway-DQM333YV.js → gateway-6623C2U3.js} +51 -42
- package/dist/node-runtime/{gemini-search-35OCRFLN.js → gemini-search-C66QHDT6.js} +2 -2
- package/dist/node-runtime/{gemini-url-context-UQY3PHHW.js → gemini-url-context-T7DEK73R.js} +3 -3
- package/dist/node-runtime/{github-extract-F64RZOEA.js → github-extract-HOGE3D6F.js} +107 -38
- package/dist/node-runtime/{goal-NJEE5CTU.js → goal-AIHEDUYA.js} +5 -5
- package/dist/node-runtime/index.js +50 -48
- package/dist/node-runtime/{init-P5AUV77I.js → init-JBQJIPYI.js} +3 -6
- package/dist/node-runtime/{install-cli-NN4YAU44.js → install-cli-INGHIVBY.js} +30 -25
- package/dist/node-runtime/interactive-mode-FM5DNUSW.js +74 -0
- package/dist/node-runtime/{interactive-view-NGFAMHPW.js → interactive-view-K33PM4OS.js} +8 -8
- package/dist/node-runtime/{lsp-manager-3ASUSO4T.js → lsp-manager-S554V5HR.js} +240 -155
- package/dist/node-runtime/{lunr-browser-IR7TL3J7.js → lunr-browser-H4FDOR3C.js} +7 -7
- package/dist/node-runtime/{lunr-computer-use-Y23CCDIJ.js → lunr-computer-use-VDP2QNRQ.js} +9 -9
- package/dist/node-runtime/{lunr-cron-USHC4LXH.js → lunr-cron-LKVA5CZZ.js} +93 -80
- package/dist/node-runtime/main.js +42 -41
- package/dist/node-runtime/{mobile-commands-O5LCHL32.js → mobile-commands-XT3NQXLD.js} +12 -12
- package/dist/node-runtime/{model-runtime-OO5HFLWE.js → model-runtime-MZ2JMDV4.js} +4 -4
- package/dist/node-runtime/{openai-search-B3MSNCQA.js → openai-search-K72LJDYN.js} +1 -1
- package/dist/node-runtime/{package-manager-cli-Q7BL6KZO.js → package-manager-cli-CYM262SI.js} +20 -20
- package/dist/node-runtime/{parallel-AI2MNSCU.js → parallel-X724NCNU.js} +1 -1
- package/dist/node-runtime/{perplexity-QVJW3I35.js → perplexity-RDHQHVMK.js} +2 -2
- package/dist/node-runtime/{pi-intercom-QM53RLTS.js → pi-intercom-NHHEPBMI.js} +2 -2
- package/dist/node-runtime/{pi-mcp-adapter-3PHF4KZ4.js → pi-mcp-adapter-PP3GQJQ2.js} +98 -94
- package/dist/node-runtime/{pi-ollama-cloud-2F3Y2QNM.js → pi-ollama-cloud-4MNWIMFN.js} +11 -24
- package/dist/node-runtime/{pi-prompt-template-model-QWTCGLJU.js → pi-prompt-template-model-FTGELLS5.js} +32 -36
- package/dist/node-runtime/{pi-subagents-7IBSSGEW.js → pi-subagents-LT3CTO4E.js} +98 -106
- package/dist/node-runtime/{pi-web-access-WTGMNZ32.js → pi-web-access-Z3LP246C.js} +144 -108
- package/dist/node-runtime/{print-mode-XQ76CYMT.js → print-mode-2XHN5SUA.js} +3 -3
- package/dist/node-runtime/{process-registry-4FAKZQOL.js → process-registry-Q4QWIU33.js} +3 -3
- package/dist/node-runtime/{proxy-modes-5FAPSZEZ.js → proxy-modes-VEGC6QG5.js} +8 -15
- package/dist/node-runtime/rpc-entry.js +42 -41
- package/dist/node-runtime/{rpc-mode-O3XV4SID.js → rpc-mode-32DHJPEJ.js} +4 -4
- package/dist/node-runtime/{runtime-4VA6JKNF.js → runtime-EDUUGAQD.js} +56 -46
- package/dist/node-runtime/{runtime-EFPPD2UW.js → runtime-UGXM4NPQ.js} +2 -2
- package/dist/node-runtime/{runtime-bridges-7WVCLI76.js → runtime-bridges-DNKMNJCF.js} +7 -7
- package/dist/node-runtime/{service-MDQIPQ26.js → service-IHLGFLBT.js} +6 -4
- package/dist/node-runtime/{session-handoff-GWARVEWT.js → session-handoff-LNSPDTKY.js} +4 -4
- package/dist/node-runtime/{session-manager-JB5J6XBN.js → session-manager-YIFIAVGC.js} +3 -3
- package/dist/node-runtime/{session-selector-GIM4DHQ2.js → session-selector-I73U3EIO.js} +7 -7
- package/dist/node-runtime/{settings-manager-DJDM5AHM.js → settings-manager-P2TKGYTR.js} +5 -5
- package/dist/node-runtime/{setup-JBKOLJ6F.js → setup-H7CCELIL.js} +15 -1
- package/dist/node-runtime/{setup-PFBWRNUI.js → setup-OLQ4GXWS.js} +17 -17
- package/dist/node-runtime/{src-IVPNZ2BX.js → src-6RV4PXKJ.js} +64 -36
- package/dist/node-runtime/{subagent-executor-LPZ4BHWE.js → subagent-executor-Q5F7DBVM.js} +119 -58
- package/dist/node-runtime/{tavily-WEZFVFP7.js → tavily-KZBFYQB6.js} +1 -1
- package/dist/node-runtime/{theme-UOO5RVFN.js → theme-YLVZKKZD.js} +2 -2
- package/dist/node-runtime/{trust-manager-MMISNCYO.js → trust-manager-ZCU76D23.js} +2 -2
- package/dist/node-runtime/{update-cli-HNMOTNGX.js → update-cli-F3XXJANQ.js} +6 -6
- package/dist/node-runtime/{usage-service-LFB2SWYV.js → usage-service-CPAGBED5.js} +1 -1
- package/dist/node-runtime/{video-extract-OOZHR7SU.js → video-extract-UPKYIBW3.js} +3 -3
- package/dist/node-runtime/{workflow-OHPBEFO4.js → workflow-ICDI4N3J.js} +208 -78
- package/dist/node-runtime/{youtube-extract-FNPAUNHU.js → youtube-extract-77NT7FWH.js} +4 -4
- package/dist/utils/clipboard-image.d.ts.map +1 -1
- package/dist/utils/clipboard-image.js.map +1 -1
- package/dist/utils/exif-orientation.d.ts.map +1 -1
- package/dist/utils/exif-orientation.js +25 -10
- package/dist/utils/exif-orientation.js.map +1 -1
- package/dist/utils/image-resize-core.d.ts.map +1 -1
- package/dist/utils/image-resize-core.js +2 -0
- package/dist/utils/image-resize-core.js.map +1 -1
- package/dist/utils/paths.d.ts +4 -0
- package/dist/utils/paths.d.ts.map +1 -1
- package/dist/utils/paths.js +33 -2
- package/dist/utils/paths.js.map +1 -1
- package/dist/utils/sanitize-terminal-text.d.ts +7 -0
- package/dist/utils/sanitize-terminal-text.d.ts.map +1 -0
- package/dist/utils/sanitize-terminal-text.js +67 -0
- package/dist/utils/sanitize-terminal-text.js.map +1 -0
- package/docs/browser.md +1 -1
- package/docs/custom-provider.md +3 -3
- package/docs/extensions.md +8 -4
- package/docs/features.md +15 -7
- package/docs/keybindings.md +1 -1
- package/docs/models.md +5 -5
- package/docs/packages.md +1 -1
- package/docs/providers.md +2 -2
- package/docs/rpc.md +7 -7
- package/docs/security.md +10 -5
- package/docs/sessions.md +2 -2
- package/docs/skills.md +1 -1
- package/docs/terminal-setup.md +7 -7
- package/docs/themes.md +1 -1
- package/docs/usage.md +1 -1
- package/examples/extensions/auto-commit-on-exit.ts +1 -1
- package/examples/extensions/bash-spawn-hook.ts +1 -1
- package/examples/extensions/built-in-tool-renderer.ts +1 -1
- package/examples/extensions/claude-rules.ts +1 -1
- package/examples/extensions/commands.ts +1 -1
- package/examples/extensions/custom-compaction.ts +1 -1
- package/examples/extensions/custom-provider-anthropic/index.ts +3 -3
- package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
- package/examples/extensions/custom-provider-anthropic/package.json +1 -1
- package/examples/extensions/custom-provider-gitlab-duo/index.ts +1 -1
- package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
- package/examples/extensions/doom-overlay/index.ts +1 -1
- package/examples/extensions/git-merge-and-resolve.ts +2 -2
- package/examples/extensions/gondolin/index.ts +1 -1
- package/examples/extensions/gondolin/package-lock.json +2 -2
- package/examples/extensions/gondolin/package.json +1 -1
- package/examples/extensions/hidden-thinking-label.ts +1 -1
- package/examples/extensions/inline-bash.ts +2 -2
- package/examples/extensions/input-transform-streaming.ts +2 -2
- package/examples/extensions/input-transform.ts +2 -2
- package/examples/extensions/interactive-shell.ts +1 -1
- package/examples/extensions/kimi-deferred-tools.ts +1 -1
- package/examples/extensions/mac-system-theme.ts +1 -1
- package/examples/extensions/minimal-mode.ts +1 -1
- package/examples/extensions/modal-editor.ts +1 -1
- package/examples/extensions/model-status.ts +1 -1
- package/examples/extensions/notify.ts +3 -3
- package/examples/extensions/overlay-qa-tests.ts +1 -1
- package/examples/extensions/overlay-test.ts +1 -1
- package/examples/extensions/pirate.ts +1 -1
- package/examples/extensions/preset.ts +3 -3
- package/examples/extensions/project-trust.ts +4 -4
- package/examples/extensions/prompt-customizer.ts +1 -1
- package/examples/extensions/rainbow-editor.ts +1 -1
- package/examples/extensions/rpc-demo.ts +1 -1
- package/examples/extensions/sandbox/index.ts +7 -7
- package/examples/extensions/sandbox/package-lock.json +2 -2
- package/examples/extensions/sandbox/package.json +1 -1
- package/examples/extensions/shutdown-command.ts +5 -5
- package/examples/extensions/ssh.ts +2 -2
- package/examples/extensions/subagent/README.md +3 -3
- package/examples/extensions/subagent/index.ts +2 -2
- package/examples/extensions/titlebar-spinner.ts +1 -1
- package/examples/extensions/tool-override.ts +1 -1
- package/examples/extensions/tools.ts +1 -1
- package/examples/extensions/with-deps/package-lock.json +2 -2
- package/examples/extensions/with-deps/package.json +1 -1
- package/examples/extensions/working-indicator.ts +1 -1
- package/examples/extensions/working-message-test.ts +1 -1
- package/examples/sdk/01-minimal.ts +1 -1
- package/examples/sdk/03-custom-prompt.ts +1 -1
- package/examples/sdk/04-skills.ts +1 -1
- package/examples/sdk/06-extensions.ts +2 -2
- package/examples/sdk/08-prompt-templates.ts +1 -1
- package/install-lock/package-lock.json +24 -24
- package/install-lock/package.json +2 -2
- package/npm-shrinkwrap.json +60 -24
- package/package.json +9 -9
- package/dist/modes/interactive/components/exit-card.d.ts +0 -22
- package/dist/modes/interactive/components/exit-card.d.ts.map +0 -1
- package/dist/modes/interactive/components/exit-card.js +0 -69
- package/dist/modes/interactive/components/exit-card.js.map +0 -1
- package/dist/node-runtime/agent-session-services-5YXS2PLF.js +0 -51
- package/dist/node-runtime/chunk-2IDTZAG5.js +0 -1415
- package/dist/node-runtime/chunk-3MISGG4S.js +0 -769
- package/dist/node-runtime/chunk-4HXHDDCF.js +0 -16
- package/dist/node-runtime/chunk-5B5QN3ZQ.js +0 -356
- package/dist/node-runtime/chunk-7IQGBKBJ.js +0 -2033
- package/dist/node-runtime/chunk-AUXVGBO4.js +0 -19
- package/dist/node-runtime/chunk-PTFBPO3C.js +0 -50
- package/dist/node-runtime/interactive-mode-YOHZVMKX.js +0 -74
- package/dist/node-runtime/mcp-auth-flow-QVLFVLEO.js +0 -33
|
@@ -2,13 +2,13 @@ import { createRequire as __lunrRequire } from "node:module"; const require = __
|
|
|
2
2
|
import {
|
|
3
3
|
checkForUpdate,
|
|
4
4
|
markUpdateNotified
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-H6YBCWKG.js";
|
|
6
6
|
import {
|
|
7
7
|
getSubagentSpinnerDefinition
|
|
8
8
|
} from "./chunk-US544NN6.js";
|
|
9
9
|
import {
|
|
10
10
|
computeContextBreakdown
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-JQYNHAKX.js";
|
|
12
12
|
import {
|
|
13
13
|
copyToClipboard,
|
|
14
14
|
readClipboardText
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
import {
|
|
21
21
|
BootScreenComponent,
|
|
22
22
|
registerPermissionModeBridge
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-QBTJG3UM.js";
|
|
24
24
|
import {
|
|
25
25
|
nextModeForGoal,
|
|
26
26
|
registerPermissionModeControlBridge
|
|
@@ -34,9 +34,12 @@ import {
|
|
|
34
34
|
beginTurn,
|
|
35
35
|
captureTreeChanges,
|
|
36
36
|
clearRollback,
|
|
37
|
+
commitRollbackTurn,
|
|
37
38
|
disableRollbackForSession,
|
|
38
39
|
enableRollbackForSession,
|
|
39
40
|
formatMissingSessionCwdPrompt,
|
|
41
|
+
getRollbackRecoveryBlockReason,
|
|
42
|
+
getRollbackTargetUserId,
|
|
40
43
|
initRollback,
|
|
41
44
|
isRollbackEnabled,
|
|
42
45
|
isRollbackSessionForceEnabled,
|
|
@@ -45,24 +48,19 @@ import {
|
|
|
45
48
|
peekRollbackTurnsConsumed,
|
|
46
49
|
rollbackLastTurn,
|
|
47
50
|
setRollbackWarningHandler
|
|
48
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-ZDJUR45D.js";
|
|
49
52
|
import {
|
|
50
53
|
notifyTodosEnabledChanged
|
|
51
54
|
} from "./chunk-CCCN2UCX.js";
|
|
52
55
|
import {
|
|
53
56
|
parseGitUrl
|
|
54
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-UYRKUKFE.js";
|
|
55
58
|
import {
|
|
56
59
|
createAllToolDefinitions,
|
|
57
60
|
ensureTool,
|
|
58
61
|
getToolPath,
|
|
59
62
|
truncateToVisualLines
|
|
60
|
-
} from "./chunk-
|
|
61
|
-
import {
|
|
62
|
-
DEFAULT_MAX_BYTES,
|
|
63
|
-
DEFAULT_MAX_LINES,
|
|
64
|
-
truncateTail
|
|
65
|
-
} from "./chunk-53YJI7JU.js";
|
|
63
|
+
} from "./chunk-ZEVFBFNF.js";
|
|
66
64
|
import {
|
|
67
65
|
formatGroupedCall,
|
|
68
66
|
getTextOutput,
|
|
@@ -70,17 +68,22 @@ import {
|
|
|
70
68
|
toolGroupRole,
|
|
71
69
|
toolGroupTree,
|
|
72
70
|
toolStatusDot
|
|
73
|
-
} from "./chunk-
|
|
71
|
+
} from "./chunk-6ZZHGUSA.js";
|
|
72
|
+
import {
|
|
73
|
+
DEFAULT_MAX_BYTES,
|
|
74
|
+
DEFAULT_MAX_LINES,
|
|
75
|
+
truncateTail
|
|
76
|
+
} from "./chunk-53YJI7JU.js";
|
|
74
77
|
import {
|
|
75
78
|
convertToPng,
|
|
76
79
|
processImage
|
|
77
|
-
} from "./chunk-
|
|
80
|
+
} from "./chunk-IAZSK7KK.js";
|
|
78
81
|
import {
|
|
79
82
|
formatCatalogRefreshSummary,
|
|
80
83
|
hasGrokCliXaiAuth,
|
|
81
84
|
refreshModelCandidatesForInit,
|
|
82
85
|
stripJsonComments
|
|
83
|
-
} from "./chunk-
|
|
86
|
+
} from "./chunk-XEOCUEUJ.js";
|
|
84
87
|
import {
|
|
85
88
|
HTTP_IDLE_TIMEOUT_CHOICES,
|
|
86
89
|
SKILL_TAG_CHARACTERS,
|
|
@@ -88,38 +91,30 @@ import {
|
|
|
88
91
|
SUBAGENT_SPINNER_NAMES,
|
|
89
92
|
configureHttpDispatcher,
|
|
90
93
|
formatHttpIdleTimeoutMs
|
|
91
|
-
} from "./chunk-
|
|
94
|
+
} from "./chunk-HUD2RFJW.js";
|
|
92
95
|
import {
|
|
93
96
|
ProjectTrustStore,
|
|
94
97
|
getProjectTrustOptions,
|
|
95
98
|
hasTrustRequiringProjectResources
|
|
96
|
-
} from "./chunk-
|
|
99
|
+
} from "./chunk-F2SMQ6ES.js";
|
|
97
100
|
import {
|
|
98
|
-
computeFileLists,
|
|
99
|
-
createFileOps,
|
|
100
101
|
defaultModelPerProvider,
|
|
101
|
-
extractFileOpsFromMessage,
|
|
102
102
|
findExactModelReferenceMatch,
|
|
103
103
|
resolveModelScope
|
|
104
|
-
} from "./chunk-
|
|
104
|
+
} from "./chunk-FIRA54AC.js";
|
|
105
105
|
import {
|
|
106
106
|
SubagentEscapeSequence,
|
|
107
107
|
getSubagentCancellation
|
|
108
108
|
} from "./chunk-BBUVIEZB.js";
|
|
109
109
|
import {
|
|
110
|
-
AUTO_MODE_ADDENDUM,
|
|
111
|
-
READ_ONLY_MODE_ADDENDUM,
|
|
112
|
-
getPermissionMode,
|
|
113
110
|
nextPermissionMode,
|
|
114
111
|
registerApprovalHandler,
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
setPermissionMode
|
|
118
|
-
} from "./chunk-WIF24I7G.js";
|
|
112
|
+
restorePermissionModeAfterPlan
|
|
113
|
+
} from "./chunk-APVM5NEU.js";
|
|
119
114
|
import {
|
|
120
115
|
getGlobalInstructionsPath,
|
|
121
116
|
getModelInstructionsPath
|
|
122
|
-
} from "./chunk-
|
|
117
|
+
} from "./chunk-BDRGN3L2.js";
|
|
123
118
|
import {
|
|
124
119
|
clearRegistry,
|
|
125
120
|
isWindows,
|
|
@@ -129,21 +124,21 @@ import {
|
|
|
129
124
|
pause,
|
|
130
125
|
restart,
|
|
131
126
|
resume
|
|
132
|
-
} from "./chunk-
|
|
127
|
+
} from "./chunk-RYRGL7P4.js";
|
|
133
128
|
import {
|
|
134
129
|
killTrackedDetachedChildren
|
|
135
|
-
} from "./chunk-
|
|
130
|
+
} from "./chunk-ES6PBSIE.js";
|
|
136
131
|
import {
|
|
137
132
|
cancelSessionHandoff,
|
|
138
133
|
markSessionHandoff,
|
|
139
134
|
recordTuiActivity,
|
|
140
135
|
registerTransferHandler,
|
|
141
136
|
requestSessionTransfer
|
|
142
|
-
} from "./chunk-
|
|
137
|
+
} from "./chunk-I2H5QMWW.js";
|
|
143
138
|
import {
|
|
144
139
|
SessionManager,
|
|
145
140
|
sessionEntryToContextMessages
|
|
146
|
-
} from "./chunk-
|
|
141
|
+
} from "./chunk-EPR2F3GU.js";
|
|
147
142
|
import {
|
|
148
143
|
createCompactionSummaryMessage
|
|
149
144
|
} from "./chunk-FVDOXRUD.js";
|
|
@@ -161,16 +156,16 @@ import {
|
|
|
161
156
|
import {
|
|
162
157
|
getAllPlanUsageResults,
|
|
163
158
|
getUsageServiceBridge
|
|
164
|
-
} from "./chunk-
|
|
159
|
+
} from "./chunk-HNNHHJAB.js";
|
|
165
160
|
import {
|
|
166
161
|
SessionSelectorComponent
|
|
167
|
-
} from "./chunk-
|
|
162
|
+
} from "./chunk-2OIPYKLZ.js";
|
|
168
163
|
import {
|
|
169
164
|
CustomEditor
|
|
170
165
|
} from "./chunk-H2EOZYMP.js";
|
|
171
166
|
import {
|
|
172
167
|
KeybindingsManager
|
|
173
|
-
} from "./chunk-
|
|
168
|
+
} from "./chunk-FTKEZL27.js";
|
|
174
169
|
import {
|
|
175
170
|
time
|
|
176
171
|
} from "./chunk-PVCDKGR6.js";
|
|
@@ -179,23 +174,23 @@ import {
|
|
|
179
174
|
} from "./chunk-CCZJ3PYY.js";
|
|
180
175
|
import {
|
|
181
176
|
ExtensionSelectorComponent
|
|
182
|
-
} from "./chunk-
|
|
177
|
+
} from "./chunk-252ZVPPF.js";
|
|
183
178
|
import {
|
|
184
179
|
ExtensionInputComponent
|
|
185
|
-
} from "./chunk-
|
|
180
|
+
} from "./chunk-GLDXBBL6.js";
|
|
186
181
|
import {
|
|
187
182
|
CountdownTimer
|
|
188
183
|
} from "./chunk-I6R76AG7.js";
|
|
189
184
|
import {
|
|
190
185
|
DynamicBorder
|
|
191
|
-
} from "./chunk-
|
|
186
|
+
} from "./chunk-FLGEEH27.js";
|
|
192
187
|
import {
|
|
193
188
|
formatKeyText,
|
|
194
189
|
keyDisplayText,
|
|
195
190
|
keyHint,
|
|
196
191
|
keyText,
|
|
197
192
|
rawKeyHint
|
|
198
|
-
} from "./chunk-
|
|
193
|
+
} from "./chunk-QW3AAHWN.js";
|
|
199
194
|
import {
|
|
200
195
|
FS_WATCH_RETRY_DELAY_MS,
|
|
201
196
|
Theme,
|
|
@@ -221,7 +216,7 @@ import {
|
|
|
221
216
|
stopThemeWatcher,
|
|
222
217
|
theme,
|
|
223
218
|
watchWithErrorHandler
|
|
224
|
-
} from "./chunk-
|
|
219
|
+
} from "./chunk-JL4HYQXK.js";
|
|
225
220
|
import {
|
|
226
221
|
APP_NAME,
|
|
227
222
|
APP_TITLE,
|
|
@@ -235,7 +230,7 @@ import {
|
|
|
235
230
|
getDocsPath,
|
|
236
231
|
getShareViewerUrl,
|
|
237
232
|
normalizePath
|
|
238
|
-
} from "./chunk-
|
|
233
|
+
} from "./chunk-64XTQNLA.js";
|
|
239
234
|
|
|
240
235
|
// packages/coding-agent/dist/modes/interactive/interactive-mode.js
|
|
241
236
|
import * as crypto from "node:crypto";
|
|
@@ -244,7 +239,6 @@ import * as os2 from "node:os";
|
|
|
244
239
|
import * as path2 from "node:path";
|
|
245
240
|
import { getSupportedThinkingLevels } from "@ashx-j/lunr-ai/compat";
|
|
246
241
|
import { CombinedAutocompleteProvider, Container as Container19, collectImageMarkerIds, formatImageMarker, fuzzyFilter as fuzzyFilter5, isFocusable, Markdown as Markdown10, matchesKey as matchesKey2, ProcessTerminal, Spacer as Spacer19, setKeybindings, Text as Text21, TruncatedText as TruncatedText2, TUI, visibleWidth as visibleWidth6 } from "@ashx-j/lunr-tui";
|
|
247
|
-
import chalk from "chalk";
|
|
248
242
|
import { spawn as spawn3, spawnSync } from "child_process";
|
|
249
243
|
|
|
250
244
|
// packages/coding-agent/dist/core/cache-stats.js
|
|
@@ -421,6 +415,9 @@ function shouldPollGitHead(repoDir) {
|
|
|
421
415
|
var FooterDataProvider = class _FooterDataProvider {
|
|
422
416
|
cwd;
|
|
423
417
|
static WATCH_DEBOUNCE_MS = 500;
|
|
418
|
+
static DIFFSTAT_REFRESH_MS = 2e3;
|
|
419
|
+
diffstatTimer = null;
|
|
420
|
+
diffstatStale = !0;
|
|
424
421
|
extensionStatuses = /* @__PURE__ */ new Map();
|
|
425
422
|
cachedBranch = void 0;
|
|
426
423
|
cachedDiffstat = void 0;
|
|
@@ -447,7 +444,9 @@ var FooterDataProvider = class _FooterDataProvider {
|
|
|
447
444
|
}
|
|
448
445
|
/** Staged + unstaged added/removed vs HEAD. Null until the asynchronous lookup completes. */
|
|
449
446
|
getGitDiffstat() {
|
|
450
|
-
return this.
|
|
447
|
+
return this.diffstatStale && !this.refreshInFlight && this.refreshGitData(), !this.disposed && !this.diffstatTimer && (this.diffstatTimer = setTimeout(() => {
|
|
448
|
+
this.diffstatTimer = null, this.diffstatStale = !0, this.notifyBranchChange();
|
|
449
|
+
}, _FooterDataProvider.DIFFSTAT_REFRESH_MS), this.diffstatTimer.unref()), this.cachedDiffstat ?? null;
|
|
451
450
|
}
|
|
452
451
|
/** Extension status texts set via ctx.ui.setStatus() */
|
|
453
452
|
getExtensionStatuses() {
|
|
@@ -474,11 +473,14 @@ var FooterDataProvider = class _FooterDataProvider {
|
|
|
474
473
|
this.availableProviderCount = count;
|
|
475
474
|
}
|
|
476
475
|
setCwd(cwd) {
|
|
477
|
-
this.cwd !== cwd && (this.cwd = cwd, this.refreshTimer && (clearTimeout(this.refreshTimer), this.refreshTimer = null), this.clearGitWatchers(), this.cachedBranch = void 0, this.cachedDiffstat = void 0, this.gitPaths = void 0, this.refreshInFlight && (this.refreshPending = !0), this.notifyBranchChange());
|
|
476
|
+
this.cwd !== cwd && (this.cwd = cwd, this.clearDiffstatTimer(), this.diffstatStale = !0, this.refreshTimer && (clearTimeout(this.refreshTimer), this.refreshTimer = null), this.clearGitWatchers(), this.cachedBranch = void 0, this.cachedDiffstat = void 0, this.gitPaths = void 0, this.refreshInFlight && (this.refreshPending = !0), this.notifyBranchChange());
|
|
478
477
|
}
|
|
479
478
|
/** Internal: cleanup */
|
|
480
479
|
dispose() {
|
|
481
|
-
this.disposed = !0, this.refreshTimer && (clearTimeout(this.refreshTimer), this.refreshTimer = null), this.clearGitWatchers(), this.branchChangeCallbacks.clear();
|
|
480
|
+
this.disposed = !0, this.clearDiffstatTimer(), this.refreshTimer && (clearTimeout(this.refreshTimer), this.refreshTimer = null), this.clearGitWatchers(), this.branchChangeCallbacks.clear();
|
|
481
|
+
}
|
|
482
|
+
clearDiffstatTimer() {
|
|
483
|
+
this.diffstatTimer && clearTimeout(this.diffstatTimer), this.diffstatTimer = null;
|
|
482
484
|
}
|
|
483
485
|
notifyBranchChange() {
|
|
484
486
|
for (let cb of this.branchChangeCallbacks)
|
|
@@ -516,7 +518,7 @@ var FooterDataProvider = class _FooterDataProvider {
|
|
|
516
518
|
if (this.disposed || this.cwd !== cwd)
|
|
517
519
|
return;
|
|
518
520
|
let prevBranch = this.cachedBranch, prevDiff = this.cachedDiffstat, branchChanged = prevBranch !== nextBranch, diffChanged = prevDiff?.added !== nextDiff?.added || prevDiff?.removed !== nextDiff?.removed;
|
|
519
|
-
this.cachedBranch = nextBranch, this.cachedDiffstat = nextDiff, (branchChanged || diffChanged) && this.notifyBranchChange();
|
|
521
|
+
this.cachedBranch = nextBranch, this.cachedDiffstat = nextDiff, this.diffstatStale = !1, (branchChanged || diffChanged) && this.notifyBranchChange();
|
|
520
522
|
} finally {
|
|
521
523
|
this.refreshInFlight = !1, this.refreshPending && !this.disposed && (this.refreshPending = !1, this.scheduleRefresh());
|
|
522
524
|
}
|
|
@@ -1115,6 +1117,52 @@ var ArminComponent = class {
|
|
|
1115
1117
|
// packages/coding-agent/dist/modes/interactive/components/assistant-message.js
|
|
1116
1118
|
import { Container, Markdown as Markdown2, Spacer, Text } from "@ashx-j/lunr-tui";
|
|
1117
1119
|
|
|
1120
|
+
// packages/coding-agent/dist/utils/sanitize-terminal-text.js
|
|
1121
|
+
function sanitizeTerminalText(source) {
|
|
1122
|
+
if (!/[\x00-\x08\x0b-\x1f\x7f-\x9f]/.test(source))
|
|
1123
|
+
return source;
|
|
1124
|
+
let parts = [], index = 0, plainStart = 0;
|
|
1125
|
+
for (; index < source.length; ) {
|
|
1126
|
+
let code = source.charCodeAt(index);
|
|
1127
|
+
if (code === 9 || code === 10 || code >= 32 && (code < 127 || code > 159)) {
|
|
1128
|
+
index++;
|
|
1129
|
+
continue;
|
|
1130
|
+
}
|
|
1131
|
+
if (parts.push(source.slice(plainStart, index)), index++, code === 13)
|
|
1132
|
+
source.charCodeAt(index) === 10 && index++, parts.push(`
|
|
1133
|
+
`);
|
|
1134
|
+
else {
|
|
1135
|
+
let sequence = code;
|
|
1136
|
+
if (code === 27 && index < source.length) {
|
|
1137
|
+
let next = source.charCodeAt(index);
|
|
1138
|
+
if (next >= 64 && next <= 95)
|
|
1139
|
+
sequence = next + 64, index++;
|
|
1140
|
+
else {
|
|
1141
|
+
for (; source.charCodeAt(index) >= 32 && source.charCodeAt(index) <= 47; )
|
|
1142
|
+
index++;
|
|
1143
|
+
source.charCodeAt(index) >= 48 && source.charCodeAt(index) <= 126 && index++;
|
|
1144
|
+
}
|
|
1145
|
+
}
|
|
1146
|
+
if (sequence === 155) {
|
|
1147
|
+
for (; source.charCodeAt(index) >= 32 && source.charCodeAt(index) <= 63; )
|
|
1148
|
+
index++;
|
|
1149
|
+
source.charCodeAt(index) >= 64 && source.charCodeAt(index) <= 126 && index++;
|
|
1150
|
+
} else if ([144, 152, 157, 158, 159].includes(sequence))
|
|
1151
|
+
for (; index < source.length; ) {
|
|
1152
|
+
let next = source.charCodeAt(index++);
|
|
1153
|
+
if (next === 156 || sequence === 157 && next === 7)
|
|
1154
|
+
break;
|
|
1155
|
+
if (next === 27 && source.charCodeAt(index) === 92) {
|
|
1156
|
+
index++;
|
|
1157
|
+
break;
|
|
1158
|
+
}
|
|
1159
|
+
}
|
|
1160
|
+
}
|
|
1161
|
+
plainStart = index;
|
|
1162
|
+
}
|
|
1163
|
+
return parts.push(source.slice(plainStart)), parts.join("");
|
|
1164
|
+
}
|
|
1165
|
+
|
|
1118
1166
|
// packages/coding-agent/dist/modes/interactive/components/copyable-text.js
|
|
1119
1167
|
import { truncateToWidth, visibleWidth, wrapTextWithAnsi } from "@ashx-j/lunr-tui";
|
|
1120
1168
|
function sourceLines(source) {
|
|
@@ -1208,13 +1256,13 @@ var CopyableTextBlockComponent = class {
|
|
|
1208
1256
|
let horizontalPad = Math.min(this.outputPad, Math.max(0, width - 1)), pad = " ".repeat(horizontalPad), contentWidth = Math.max(1, width - horizontalPad * 2), paint = (content) => {
|
|
1209
1257
|
let line = truncateToWidth(`${pad}${content}`, width, "");
|
|
1210
1258
|
return theme.bg("userMessageBg", `${line}${" ".repeat(Math.max(0, width - visibleWidth(line)))}`);
|
|
1211
|
-
}, lines = [paint("")], payloadLines = this.payload.replace(/\t/g, " ").split(`
|
|
1259
|
+
}, lines = [paint("")], payloadLines = sanitizeTerminalText(this.payload).replace(/\t/g, " ").split(`
|
|
1212
1260
|
`);
|
|
1213
1261
|
for (let payloadLine of payloadLines)
|
|
1214
1262
|
for (let wrappedLine of wrapTextWithAnsi(payloadLine, contentWidth))
|
|
1215
1263
|
lines.push(paint(theme.fg("userMessageText", wrappedLine)));
|
|
1216
1264
|
if (typeof this.status == "object")
|
|
1217
|
-
for (let wrappedLine of wrapTextWithAnsi(`Copy failed: ${this.status.error}`, contentWidth))
|
|
1265
|
+
for (let wrappedLine of wrapTextWithAnsi(`Copy failed: ${sanitizeTerminalText(this.status.error)}`, contentWidth))
|
|
1218
1266
|
lines.push(paint(theme.fg("error", wrappedLine)));
|
|
1219
1267
|
return lines.push(paint("")), this.renderedRows = lines.length, lines;
|
|
1220
1268
|
}
|
|
@@ -1405,7 +1453,7 @@ var OSC133_ZONE_START = "\x1B]133;A\x07", OSC133_ZONE_END = "\x1B]133;B\x07", OS
|
|
|
1405
1453
|
if (content.type === "text" && content.text.trim())
|
|
1406
1454
|
for (let segment of parseCopyableTextSegments(content.text)) {
|
|
1407
1455
|
if (segment.type === "markdown") {
|
|
1408
|
-
let trimmed = segment.text.trim();
|
|
1456
|
+
let trimmed = sanitizeTerminalText(segment.text).trim();
|
|
1409
1457
|
if (!trimmed)
|
|
1410
1458
|
continue;
|
|
1411
1459
|
let text = isFirstTextBlock ? `\u25CF ${trimmed}` : trimmed;
|
|
@@ -1430,7 +1478,7 @@ var OSC133_ZONE_START = "\x1B]133;A\x07", OSC133_ZONE_END = "\x1B]133;B\x07", OS
|
|
|
1430
1478
|
if (i--, displayBlocks.length === 0 || this.hideThinkingBlock)
|
|
1431
1479
|
continue;
|
|
1432
1480
|
let sourceBlocks = sourceThinkingRuns[thinkingRunIndex] ?? [], fullyRevealed = displayBlocks.length === sourceBlocks.length && displayBlocks.every((block, index) => block === sourceBlocks[index]);
|
|
1433
|
-
this.renderThinkingRun(thinkingRunIndex, displayBlocks, message, i, fullyRevealed);
|
|
1481
|
+
this.renderThinkingRun(thinkingRunIndex, displayBlocks.map(sanitizeTerminalText), message, i, fullyRevealed);
|
|
1434
1482
|
}
|
|
1435
1483
|
}
|
|
1436
1484
|
let hasToolCalls = message.content.some((c) => c.type === "toolCall");
|
|
@@ -1439,10 +1487,10 @@ var OSC133_ZONE_START = "\x1B]133;A\x07", OSC133_ZONE_END = "\x1B]133;B\x07", OS
|
|
|
1439
1487
|
else if (!hasToolCalls) {
|
|
1440
1488
|
if (message.stopReason === "aborted") {
|
|
1441
1489
|
let abortMessage = message.errorMessage && message.errorMessage !== "Request was aborted" ? message.errorMessage : "Operation aborted";
|
|
1442
|
-
this.contentContainer.addChild(new Spacer(1)), this.contentContainer.addChild(new Text(theme.fg("error", abortMessage), this.outputPad, 0));
|
|
1490
|
+
this.contentContainer.addChild(new Spacer(1)), this.contentContainer.addChild(new Text(theme.fg("error", sanitizeTerminalText(abortMessage)), this.outputPad, 0));
|
|
1443
1491
|
} else if (message.stopReason === "error") {
|
|
1444
1492
|
let errorMsg = message.errorMessage || "Unknown error";
|
|
1445
|
-
this.contentContainer.addChild(new Spacer(1)), this.contentContainer.addChild(new Text(theme.fg("error", `Error: ${errorMsg}`), this.outputPad, 0));
|
|
1493
|
+
this.contentContainer.addChild(new Spacer(1)), this.contentContainer.addChild(new Text(theme.fg("error", `Error: ${sanitizeTerminalText(errorMsg)}`), this.outputPad, 0));
|
|
1446
1494
|
}
|
|
1447
1495
|
}
|
|
1448
1496
|
this.onThinkingAnimationChange?.(this.thinkingAnimationActive);
|
|
@@ -2059,36 +2107,6 @@ var DaxnutsComponent = class {
|
|
|
2059
2107
|
}
|
|
2060
2108
|
};
|
|
2061
2109
|
|
|
2062
|
-
// packages/coding-agent/dist/modes/interactive/components/boot-ascii.js
|
|
2063
|
-
var MOON_ASCII_SMALL = ["\u263E"];
|
|
2064
|
-
|
|
2065
|
-
// packages/coding-agent/dist/modes/interactive/components/exit-card.js
|
|
2066
|
-
function formatTokens2(count) {
|
|
2067
|
-
return count < 1e3 ? count.toString() : count < 1e4 ? `${(count / 1e3).toFixed(1)}k` : count < 1e6 ? `${Math.round(count / 1e3)}k` : count < 1e7 ? `${(count / 1e6).toFixed(1)}M` : `${Math.round(count / 1e6)}M`;
|
|
2068
|
-
}
|
|
2069
|
-
function computeExitCardStats(entries) {
|
|
2070
|
-
let turns = 0, tokens = 0, fileOps = createFileOps();
|
|
2071
|
-
for (let entry of entries) {
|
|
2072
|
-
if (entry.type !== "message")
|
|
2073
|
-
continue;
|
|
2074
|
-
let message = entry.message;
|
|
2075
|
-
if (message.role === "user")
|
|
2076
|
-
turns++;
|
|
2077
|
-
else if (message.role === "assistant") {
|
|
2078
|
-
let usage = message.usage;
|
|
2079
|
-
usage && (tokens += (usage.input ?? 0) + (usage.cacheRead ?? 0) + (usage.cacheWrite ?? 0) + (usage.output ?? 0)), extractFileOpsFromMessage(message, fileOps);
|
|
2080
|
-
}
|
|
2081
|
-
}
|
|
2082
|
-
let { modifiedFiles } = computeFileLists(fileOps);
|
|
2083
|
-
return { turns, tokens, filesChanged: modifiedFiles.length };
|
|
2084
|
-
}
|
|
2085
|
-
function buildExitCard(stats) {
|
|
2086
|
-
if (stats.turns === 0)
|
|
2087
|
-
return [];
|
|
2088
|
-
let line1 = `${MOON_ASCII_SMALL[0] ?? "\u263E"} ${stats.turns} turn${stats.turns === 1 ? "" : "s"} \xB7 ${formatTokens2(stats.tokens)} tok`, line2 = `${stats.filesChanged} file${stats.filesChanged === 1 ? "" : "s"} changed`, moonPad = " ", innerLeft = ` ${line1}`, innerRight = ` ${moonPad}${line2}`, innerWidth = Math.max(innerLeft.length, innerRight.length), pad = (s) => `${s}${" ".repeat(Math.max(0, innerWidth - s.length))}`, top = `\u256D${"\u2500".repeat(innerWidth + 2)}\u256E`, bottom = `\u2570${"\u2500".repeat(innerWidth + 2)}\u256F`, body1 = `\u2502 ${pad(innerLeft)} \u2502`, body2 = `\u2502 ${pad(innerRight)} \u2502`;
|
|
2089
|
-
return [top, body1, body2, bottom];
|
|
2090
|
-
}
|
|
2091
|
-
|
|
2092
2110
|
// packages/coding-agent/dist/modes/interactive/components/extension-editor.js
|
|
2093
2111
|
import { spawn } from "node:child_process";
|
|
2094
2112
|
import * as fs from "node:fs";
|
|
@@ -2140,7 +2158,7 @@ var ExtensionEditorComponent = class extends Container6 {
|
|
|
2140
2158
|
fs.writeFileSync(tmpFile, currentText, "utf-8"), this.tui.stop();
|
|
2141
2159
|
let [editor, ...editorArgs] = editorCmd.split(" ");
|
|
2142
2160
|
if (process.stdout.write(`Launching external editor: ${editorCmd}
|
|
2143
|
-
|
|
2161
|
+
lunR will resume when the editor exits.
|
|
2144
2162
|
`), await new Promise((resolve4) => {
|
|
2145
2163
|
let child = spawn(editor, [...editorArgs, tmpFile], {
|
|
2146
2164
|
stdio: "inherit",
|
|
@@ -5601,18 +5619,6 @@ function isAnthropicSubscriptionAuthKey(apiKey) {
|
|
|
5601
5619
|
function isUnknownModel(model) {
|
|
5602
5620
|
return !!model && model.provider === "unknown" && model.id === "unknown" && model.api === "unknown";
|
|
5603
5621
|
}
|
|
5604
|
-
function quoteIfNeeded(value) {
|
|
5605
|
-
return value.length > 0 && !/[^a-zA-Z0-9_\-./~:@]/.test(value) ? value : `'${value.replace(/'/g, "'\\''")}'`;
|
|
5606
|
-
}
|
|
5607
|
-
function formatResumeCommand(sessionManager) {
|
|
5608
|
-
if (!process.stdout.isTTY || !sessionManager.isPersisted())
|
|
5609
|
-
return;
|
|
5610
|
-
let sessionFile = sessionManager.getSessionFile();
|
|
5611
|
-
if (!sessionFile || !fs2.existsSync(sessionFile))
|
|
5612
|
-
return;
|
|
5613
|
-
let args = [APP_NAME];
|
|
5614
|
-
return sessionManager.usesDefaultSessionDir() || args.push("--session-dir", quoteIfNeeded(sessionManager.getSessionDir())), args.push("--session", sessionManager.getSessionId()), args.join(" ");
|
|
5615
|
-
}
|
|
5616
5622
|
function hasDefaultModelProvider(providerId) {
|
|
5617
5623
|
return providerId in defaultModelPerProvider;
|
|
5618
5624
|
}
|
|
@@ -5783,15 +5789,15 @@ var InteractiveMode = class _InteractiveMode {
|
|
|
5783
5789
|
}
|
|
5784
5790
|
constructor(runtimeHost, options = {}) {
|
|
5785
5791
|
this.runtimeHost = runtimeHost, this.options = options, this.autoTrustOnReloadCwd = options.autoTrustOnReloadCwd, this.runtimeHost.setBeforeSessionInvalidate((reason) => {
|
|
5786
|
-
this.resetExtensionUI(), this.previousPermissionMode = void 0, this.preGoalPermissionMode = void 0,
|
|
5792
|
+
this.stopPlanUsagePolling(), this.resetExtensionUI(), this.previousPermissionMode = void 0, this.preGoalPermissionMode = void 0, clearRegistry(), reason !== "fork" && clearRollback(this.sessionManager.getSessionId());
|
|
5787
5793
|
}), this.runtimeHost.setRebindSession(async () => {
|
|
5788
|
-
await this.rebindCurrentSession({ renderBeforeBind: !0 }), initRollback(this.settingsManager, this.sessionManager.getSessionId());
|
|
5789
|
-
let mode = this.
|
|
5790
|
-
|
|
5791
|
-
}), this.version = VERSION, this.ui = options.startupView?.ui ?? new TUI(new ProcessTerminal(), this.settingsManager.getShowHardwareCursor()), this.ui.setClearOnShrink(this.settingsManager.getClearOnShrink()), registerPermissionModeBridge(() =>
|
|
5794
|
+
await this.rebindCurrentSession({ renderBeforeBind: !0 }), this.startPlanUsagePolling(), initRollback(this.settingsManager, this.sessionManager.getSessionId());
|
|
5795
|
+
let mode = this.session.permissionMode;
|
|
5796
|
+
this.syncPermissionModeEffects(mode);
|
|
5797
|
+
}), this.version = VERSION, this.ui = options.startupView?.ui ?? new TUI(new ProcessTerminal(), this.settingsManager.getShowHardwareCursor()), this.ui.setClearOnShrink(this.settingsManager.getClearOnShrink()), registerPermissionModeBridge(() => this.session.permissionMode), registerPermissionModeControlBridge({
|
|
5792
5798
|
enterGoalAuto: () => this.enterGoalAuto(),
|
|
5793
5799
|
leaveGoalAuto: () => this.leaveGoalAuto()
|
|
5794
|
-
}),
|
|
5800
|
+
}), this.headerContainer = new Container19(), options.startupView && (this.headerContainer.addChild(new Spacer19(1)), this.headerContainer.addChild(options.startupView.header), this.customFooter = options.startupView.footer), this.loadedResourcesContainer = new Container19(), this.chatContainer = new Container19(), this.pendingMessagesContainer = new Container19(), this.statusContainer = options.startupView?.statusContainer ?? new Container19(), this.widgetContainerAbove = new Container19(), this.widgetContainerBelow = new Container19(), this.keybindings = options.startupView?.keybindings ?? KeybindingsManager.create(), setKeybindings(this.keybindings);
|
|
5795
5801
|
let editorPaddingX = this.settingsManager.getEditorPaddingX(), autocompleteMaxVisible = this.settingsManager.getAutocompleteMaxVisible();
|
|
5796
5802
|
this.defaultEditor = options.startupView?.editor ?? new CustomEditor(this.ui, getEditorTheme(), this.keybindings, {
|
|
5797
5803
|
paddingX: editorPaddingX,
|
|
@@ -5914,7 +5920,7 @@ var InteractiveMode = class _InteractiveMode {
|
|
|
5914
5920
|
return resp;
|
|
5915
5921
|
}
|
|
5916
5922
|
return "reject";
|
|
5917
|
-
}), initRollback(this.settingsManager, this.sessionManager.getSessionId()), setRollbackWarningHandler((msg) => this.showStatus(msg)), this.syncPermissionModeEffects(this.
|
|
5923
|
+
}), initRollback(this.settingsManager, this.sessionManager.getSessionId()), setRollbackWarningHandler((msg) => this.showStatus(msg)), this.syncPermissionModeEffects(this.session.permissionMode), await this.themeController.applyFromSettings(), this.headerContainer.clear(), this.options.verbose || !this.settingsManager.getQuietStartup()) {
|
|
5918
5924
|
let header = theme.bold(theme.fg("accent", APP_NAME)) + theme.fg("dim", ` v${this.version}`);
|
|
5919
5925
|
this.builtInHeader = new BootScreenComponent(header, this.buildBootRows()), this.headerContainer.addChild(new Spacer19(1)), this.headerContainer.addChild(this.builtInHeader);
|
|
5920
5926
|
} else
|
|
@@ -5957,17 +5963,22 @@ var InteractiveMode = class _InteractiveMode {
|
|
|
5957
5963
|
this.deferredBuiltinAttachPromise && await this.deferredBuiltinAttachPromise;
|
|
5958
5964
|
}
|
|
5959
5965
|
planUsageTimer;
|
|
5966
|
+
planUsageBridge;
|
|
5960
5967
|
startPlanUsagePolling() {
|
|
5961
|
-
|
|
5968
|
+
this.stopPlanUsagePolling();
|
|
5969
|
+
let bridge = getUsageServiceBridge(this.session.modelRuntime);
|
|
5962
5970
|
if (!bridge)
|
|
5963
5971
|
return;
|
|
5964
|
-
bridge.setOnUpdate(() => this.ui.requestRender());
|
|
5972
|
+
this.planUsageBridge = bridge, bridge.setOnUpdate(() => this.ui.requestRender());
|
|
5965
5973
|
let tick = () => {
|
|
5966
5974
|
let provider = this.session.model?.provider;
|
|
5967
5975
|
provider && bridge.prefetch(provider);
|
|
5968
5976
|
};
|
|
5969
5977
|
tick(), this.planUsageTimer = setInterval(tick, 6e4), this.planUsageTimer.unref?.();
|
|
5970
5978
|
}
|
|
5979
|
+
stopPlanUsagePolling() {
|
|
5980
|
+
this.planUsageTimer && (clearInterval(this.planUsageTimer), this.planUsageTimer = void 0), this.planUsageBridge?.setOnUpdate(void 0), this.planUsageBridge = void 0;
|
|
5981
|
+
}
|
|
5971
5982
|
/** Background npm version check. Never blocks first paint. Workspace installs skip. */
|
|
5972
5983
|
async maybeNotifyCliUpdate() {
|
|
5973
5984
|
try {
|
|
@@ -6049,7 +6060,7 @@ var InteractiveMode = class _InteractiveMode {
|
|
|
6049
6060
|
if (extendedKeys !== "on" && extendedKeys !== "always")
|
|
6050
6061
|
return "tmux extended-keys is off. Modified Enter keys may not work. Add `set -g extended-keys on` to ~/.tmux.conf and restart tmux.";
|
|
6051
6062
|
if (extendedKeysFormat === "xterm")
|
|
6052
|
-
return "tmux extended-keys-format is xterm.
|
|
6063
|
+
return "tmux extended-keys-format is xterm. lunR works best with csi-u. Add `set -g extended-keys-format csi-u` to ~/.tmux.conf and restart tmux.";
|
|
6053
6064
|
}
|
|
6054
6065
|
}
|
|
6055
6066
|
getMarkdownThemeWithSettings() {
|
|
@@ -7344,7 +7355,7 @@ ${message}`, ["Yes", "No"], opts) === "Yes";
|
|
|
7344
7355
|
break;
|
|
7345
7356
|
}
|
|
7346
7357
|
case "agent_end":
|
|
7347
|
-
this.session.refreshModelFromRegistry(), this.
|
|
7358
|
+
this.session.refreshModelFromRegistry(), this.ui.terminal.setProgress(!1), this.clearStatusIndicator("working"), this.stopSmoothStreaming(), this.streamingComponent && (this.chatContainer.removeChild(this.streamingComponent), this.streamingComponent = void 0, this.streamingMessage = void 0), this.pendingTools.clear(), this.browserActivityComponent = void 0, this.maybeAutoNameSession(), captureTreeChanges(this.sessionManager.getCwd(), this.sessionManager.getSessionId()), this.ui.requestRender();
|
|
7348
7359
|
break;
|
|
7349
7360
|
case "agent_settled":
|
|
7350
7361
|
if (this.pendingCompactionRender) {
|
|
@@ -7360,7 +7371,7 @@ ${message}`, ["Yes", "No"], opts) === "Yes";
|
|
|
7360
7371
|
break;
|
|
7361
7372
|
}
|
|
7362
7373
|
case "compaction_end": {
|
|
7363
|
-
this.
|
|
7374
|
+
this.ui.terminal.setProgress(!1), this.autoCompactionEscapeHandler && (this.defaultEditor.onEscape = this.autoCompactionEscapeHandler, this.autoCompactionEscapeHandler = void 0), this.clearStatusIndicator("compaction"), event.aborted ? event.reason === "manual" ? this.showError("Compaction cancelled") : this.showStatus("Auto-compaction cancelled") : event.result ? this.session.isIdle ? this.renderCompactionResult(event.result) : this.pendingCompactionRender = event.result : event.errorMessage && (event.reason === "manual" ? this.showError(event.errorMessage) : (this.chatContainer.addChild(new Spacer19(1)), this.chatContainer.addChild(new Text21(theme.fg("error", event.errorMessage), 1, 0)))), this.flushCompactionQueue({ willRetry: event.willRetry }), this.ui.requestRender();
|
|
7364
7375
|
break;
|
|
7365
7376
|
}
|
|
7366
7377
|
case "auto_retry_start": {
|
|
@@ -7596,7 +7607,7 @@ ${message}`, ["Yes", "No"], opts) === "Yes";
|
|
|
7596
7607
|
async shutdown(options) {
|
|
7597
7608
|
if (this.isShuttingDown)
|
|
7598
7609
|
return;
|
|
7599
|
-
if (this.isShuttingDown = !0, this.
|
|
7610
|
+
if (this.isShuttingDown = !0, this.session.stopAdmission(), this.unregisterSessionTransfer?.(), this.stopSmoothStreaming(), this.stopPlanUsagePolling(), options?.fromSignal) {
|
|
7600
7611
|
await this.runtimeHost.dispose(), this.themeController.disableAutoSync(), await this.ui.terminal.drainInput(1e3);
|
|
7601
7612
|
try {
|
|
7602
7613
|
killAll();
|
|
@@ -7607,14 +7618,7 @@ ${message}`, ["Yes", "No"], opts) === "Yes";
|
|
|
7607
7618
|
this.themeController.disableAutoSync(), await this.ui.terminal.drainInput(1e3);
|
|
7608
7619
|
let tracked = list().filter((p) => p.status !== "exited");
|
|
7609
7620
|
tracked.length > 0 && await this.confirmDisclaimerWithLabels("Session processes still running", `${tracked.length} process(es) started during this session are still alive.
|
|
7610
|
-
Kill them before exit?`) && killAll(), this.stop(), await this.runtimeHost.dispose();
|
|
7611
|
-
let entries = this.sessionManager?.getEntries?.(), exitStats = entries ? computeExitCardStats(entries) : { turns: 0, tokens: 0, filesChanged: 0 }, cardLines = buildExitCard(exitStats);
|
|
7612
|
-
cardLines.length > 0 && process.stdout.write(`${chalk.dim(cardLines.join(`
|
|
7613
|
-
`))}
|
|
7614
|
-
`);
|
|
7615
|
-
let resumeCommand = this.sessionManager && typeof this.sessionManager.isPersisted == "function" ? formatResumeCommand(this.sessionManager) : void 0;
|
|
7616
|
-
resumeCommand && process.stdout.write(`${chalk.dim("To resume this session:")} ${resumeCommand}
|
|
7617
|
-
`), process.exit(0);
|
|
7621
|
+
Kill them before exit?`) && killAll(), this.stop(), await this.runtimeHost.dispose(), process.exit(0);
|
|
7618
7622
|
}
|
|
7619
7623
|
emergencyTerminalExit() {
|
|
7620
7624
|
this.isShuttingDown = !0, this.unregisterSignalHandlers(), killTrackedDetachedChildren();
|
|
@@ -7740,7 +7744,7 @@ Kill them before exit?`) && killAll(), this.stop(), await this.runtimeHost.dispo
|
|
|
7740
7744
|
recordTuiActivity(this.sessionManager, this.runtimeHost.services.agentDir), this.session.cycleThinkingLevel() === void 0 ? this.showStatus("Current model does not support thinking") : (this.footer.invalidate(), this.updateEditorBorderColor());
|
|
7741
7745
|
}
|
|
7742
7746
|
cyclePermissionMode() {
|
|
7743
|
-
this.applyPermissionMode(nextPermissionMode(
|
|
7747
|
+
this.applyPermissionMode(nextPermissionMode(this.session.permissionMode), { silent: !0 });
|
|
7744
7748
|
}
|
|
7745
7749
|
async cycleModel(direction) {
|
|
7746
7750
|
if (!(this.runtimeHost.isDetached || this.transferInProgress)) {
|
|
@@ -7816,7 +7820,7 @@ Kill them before exit?`) && killAll(), this.stop(), await this.runtimeHost.dispo
|
|
|
7816
7820
|
fs2.writeFileSync(tmpFile, currentText, "utf-8"), this.ui.stop();
|
|
7817
7821
|
let [editor, ...editorArgs] = editorCmd.split(" ");
|
|
7818
7822
|
if (process.stdout.write(`Launching external editor: ${editorCmd}
|
|
7819
|
-
|
|
7823
|
+
lunR will resume when the editor exits.
|
|
7820
7824
|
`), await new Promise((resolve4) => {
|
|
7821
7825
|
let child = spawn3(editor, [...editorArgs, tmpFile], {
|
|
7822
7826
|
stdio: "inherit",
|
|
@@ -8153,7 +8157,7 @@ Pi will resume when the editor exits.
|
|
|
8153
8157
|
this.settingsManager.setClearOnShrink(enabled), this.ui.setClearOnShrink(enabled), !enabled && !this.activeStatusIndicator && this.statusContainer.clear();
|
|
8154
8158
|
},
|
|
8155
8159
|
onShowTerminalProgressChange: (enabled) => {
|
|
8156
|
-
this.settingsManager.setShowTerminalProgress(enabled);
|
|
8160
|
+
this.settingsManager.setShowTerminalProgress(enabled), enabled || this.ui.terminal.setProgress(!1);
|
|
8157
8161
|
},
|
|
8158
8162
|
onModelTiersEnabledChange: (enabled) => {
|
|
8159
8163
|
this.settingsManager.setModelTiersEnabled(enabled), getModelTiersBridge()?.refreshToolDescription();
|
|
@@ -8245,7 +8249,7 @@ Pi will resume when the editor exits.
|
|
|
8245
8249
|
return;
|
|
8246
8250
|
}
|
|
8247
8251
|
if (action === "status") {
|
|
8248
|
-
this.showStatus((await import("./service-
|
|
8252
|
+
this.showStatus((await import("./service-IHLGFLBT.js")).serviceStatusText());
|
|
8249
8253
|
return;
|
|
8250
8254
|
}
|
|
8251
8255
|
this.ui.stop();
|
|
@@ -8260,7 +8264,7 @@ Pi will resume when the editor exits.
|
|
|
8260
8264
|
} finally {
|
|
8261
8265
|
this.ui.start(), this.ui.requestRender(!0);
|
|
8262
8266
|
}
|
|
8263
|
-
this.showStatus((await import("./service-
|
|
8267
|
+
this.showStatus((await import("./service-IHLGFLBT.js")).serviceStatusText());
|
|
8264
8268
|
})().catch((error) => this.showStatus(error instanceof Error ? error.message : String(error)));
|
|
8265
8269
|
},
|
|
8266
8270
|
onDefaultPermissionModeChange: (mode) => {
|
|
@@ -8336,7 +8340,14 @@ Pi will resume when the editor exits.
|
|
|
8336
8340
|
let extraDefaults = result.incomplete.length, asked = [], ollama, runner = this.session.extensionRunner, cloudRefresh = globalThis[/* @__PURE__ */ Symbol.for("@lunr/ollama-cloud-refresh")];
|
|
8337
8341
|
if (cloudRefresh && allowNetwork)
|
|
8338
8342
|
try {
|
|
8339
|
-
|
|
8343
|
+
let resolution = await runtime.getAuth("ollama-cloud");
|
|
8344
|
+
await cloudRefresh({
|
|
8345
|
+
ui: runner.createCommandContext().ui,
|
|
8346
|
+
auth: resolution ? {
|
|
8347
|
+
apiKey: resolution.auth.apiKey,
|
|
8348
|
+
headers: Object.fromEntries(Object.entries(resolution.auth.headers ?? {}).filter((entry) => entry[1] !== null))
|
|
8349
|
+
} : void 0
|
|
8350
|
+
});
|
|
8340
8351
|
} catch (error) {
|
|
8341
8352
|
ollama = `ollama-cloud refresh failed: ${error instanceof Error ? error.message : String(error)}`;
|
|
8342
8353
|
}
|
|
@@ -9644,9 +9655,9 @@ ${theme.fg("dim", "Cache Re-billed:")} ${detail}`;
|
|
|
9644
9655
|
}
|
|
9645
9656
|
// /plan is a shortcut into read-only mode for planning.
|
|
9646
9657
|
async handlePlanCommand(args) {
|
|
9647
|
-
let sub = args.toLowerCase(), inReadOnly =
|
|
9658
|
+
let sub = args.toLowerCase(), inReadOnly = this.session.permissionMode === "read-only";
|
|
9648
9659
|
if (sub === "status") {
|
|
9649
|
-
this.showStatus(inReadOnly ? "Read mode is active. /plan off to leave it." : `Permission mode: ${
|
|
9660
|
+
this.showStatus(inReadOnly ? "Read mode is active. /plan off to leave it." : `Permission mode: ${this.session.permissionMode}.`);
|
|
9650
9661
|
return;
|
|
9651
9662
|
}
|
|
9652
9663
|
if (sub !== "" && sub !== "on" && sub !== "off") {
|
|
@@ -9663,7 +9674,7 @@ ${theme.fg("dim", "Cache Re-billed:")} ${detail}`;
|
|
|
9663
9674
|
handleModeCommand(args) {
|
|
9664
9675
|
let sub = args.toLowerCase();
|
|
9665
9676
|
if (sub === "status") {
|
|
9666
|
-
this.showStatus(`Permission mode: ${
|
|
9677
|
+
this.showStatus(`Permission mode: ${this.session.permissionMode === "read-only" ? "read" : this.session.permissionMode}`);
|
|
9667
9678
|
return;
|
|
9668
9679
|
}
|
|
9669
9680
|
if (sub === "yolo" || sub === "auto" || sub === "read-only" || sub === "read") {
|
|
@@ -9689,23 +9700,23 @@ ${theme.fg("dim", "Cache Re-billed:")} ${detail}`;
|
|
|
9689
9700
|
}
|
|
9690
9701
|
/** Apply addendum + auto-rollback for a mode without a status toast. */
|
|
9691
9702
|
syncPermissionModeEffects(mode) {
|
|
9692
|
-
this.runtimeHost.isDetached || this.transferInProgress || (this.
|
|
9703
|
+
this.runtimeHost.isDetached || this.transferInProgress || (this.session.setPermissionMode(mode), mode === "auto" && enableRollbackForSession(this.sessionManager.getSessionId()));
|
|
9693
9704
|
}
|
|
9694
9705
|
// lunr: `/goal` forces session auto without writing settings.
|
|
9695
9706
|
enterGoalAuto() {
|
|
9696
|
-
let next = nextModeForGoal(
|
|
9697
|
-
this.preGoalPermissionMode = next.saved, next.mode !==
|
|
9707
|
+
let next = nextModeForGoal(this.session.permissionMode, "enter", this.preGoalPermissionMode);
|
|
9708
|
+
this.preGoalPermissionMode = next.saved, next.mode !== this.session.permissionMode && this.applyPermissionMode(next.mode, { silent: !0 });
|
|
9698
9709
|
}
|
|
9699
9710
|
leaveGoalAuto() {
|
|
9700
|
-
let next = nextModeForGoal(
|
|
9701
|
-
this.preGoalPermissionMode = next.saved, next.mode !==
|
|
9711
|
+
let next = nextModeForGoal(this.session.permissionMode, "leave", this.preGoalPermissionMode);
|
|
9712
|
+
this.preGoalPermissionMode = next.saved, next.mode !== this.session.permissionMode && this.applyPermissionMode(next.mode, { silent: !0 });
|
|
9702
9713
|
}
|
|
9703
9714
|
applyPermissionMode(mode, opts) {
|
|
9704
9715
|
if (this.runtimeHost.isDetached || this.transferInProgress)
|
|
9705
9716
|
return;
|
|
9706
|
-
|
|
9707
|
-
let prev =
|
|
9708
|
-
mode === "read-only" && prev !== "read-only" && (this.previousPermissionMode = prev), setPermissionMode(mode), this.ui.requestRender(), mode === "
|
|
9717
|
+
recordTuiActivity(this.sessionManager, this.runtimeHost.services.agentDir);
|
|
9718
|
+
let prev = this.session.permissionMode;
|
|
9719
|
+
mode === "read-only" && prev !== "read-only" && (this.previousPermissionMode = prev), this.session.setPermissionMode(mode), this.ui.requestRender(), mode === "auto" && prev !== "auto" ? enableRollbackForSession(this.sessionManager.getSessionId()) : mode !== "auto" && prev === "auto" && disableRollbackForSession(this.sessionManager.getSessionId()), !opts?.silent && (mode === "auto" && prev !== "auto" ? this.showStatus("Auto mode active \u2014 fully autonomous. Rollback enabled for this session.") : mode === "read-only" ? this.showStatus("Read mode active. Changes are blocked.") : this.showStatus(`Permission mode: ${mode}`));
|
|
9709
9720
|
}
|
|
9710
9721
|
// Approval dialog for one subagent call launching more than two children.
|
|
9711
9722
|
// "Reject with feedback" collects a one-line
|
|
@@ -9764,37 +9775,60 @@ ${theme.fg("dim", "Cache Re-billed:")} ${detail}`;
|
|
|
9764
9775
|
this.showWarning("Wait for the current response to finish before running /rollback.");
|
|
9765
9776
|
return;
|
|
9766
9777
|
}
|
|
9767
|
-
if (!isRollbackEnabled()) {
|
|
9778
|
+
if (!isRollbackEnabled(this.sessionManager.getSessionId())) {
|
|
9768
9779
|
this.showStatus("Rollback is disabled \u2014 enable it in /settings \u2192 Rollback");
|
|
9769
9780
|
return;
|
|
9770
9781
|
}
|
|
9771
|
-
let
|
|
9772
|
-
|
|
9782
|
+
let recoveryBlocked = getRollbackRecoveryBlockReason(this.sessionManager.getSessionId());
|
|
9783
|
+
if (recoveryBlocked) {
|
|
9784
|
+
this.showWarning(recoveryBlocked);
|
|
9785
|
+
return;
|
|
9786
|
+
}
|
|
9787
|
+
let turnsToConsume = Math.max(1, peekRollbackTurnsConsumed(this.sessionManager.getSessionId())), branch = this.sessionManager.getBranch(), targetUserId = getRollbackTargetUserId(this.sessionManager.getSessionId());
|
|
9788
|
+
if (targetUserId && !branch.some((entry) => entry.id === targetUserId)) {
|
|
9789
|
+
this.showWarning("Rollback recovery belongs to another chat branch. Return to that branch to retry.");
|
|
9790
|
+
return;
|
|
9791
|
+
}
|
|
9792
|
+
let userMessagesSeen = 0, fallbackUserId;
|
|
9793
|
+
for (let i = branch.length - 1; !targetUserId && i >= 0; i--) {
|
|
9773
9794
|
let entry = branch[i];
|
|
9774
|
-
if (entry.type === "message" && entry.message.role === "user" && (userMessagesSeen++,
|
|
9795
|
+
if (entry.type === "message" && entry.message.role === "user" && (userMessagesSeen++, fallbackUserId = entry.id, userMessagesSeen >= turnsToConsume))
|
|
9775
9796
|
break;
|
|
9776
9797
|
}
|
|
9777
|
-
if (!targetUserId) {
|
|
9798
|
+
if (targetUserId ??= fallbackUserId, !targetUserId) {
|
|
9778
9799
|
this.showStatus("Nothing to roll back");
|
|
9779
9800
|
return;
|
|
9780
9801
|
}
|
|
9781
9802
|
let result;
|
|
9803
|
+
try {
|
|
9804
|
+
result = rollbackLastTurn(this.sessionManager.getSessionId(), { deferCommit: !0, targetUserId });
|
|
9805
|
+
} catch (error) {
|
|
9806
|
+
this.showError(`Rollback could not prepare recovery: ${error instanceof Error ? error.message : String(error)}`);
|
|
9807
|
+
return;
|
|
9808
|
+
}
|
|
9809
|
+
if (!result.complete) {
|
|
9810
|
+
let failures = result.failed.slice(0, 3).map(({ path: file, error }) => `${path2.basename(file)}: ${error}`).join("; ");
|
|
9811
|
+
this.showWarning(`Rollback incomplete. ${result.restored.length} file(s) restored, ${result.deleted.length} deleted, ${result.failed.length} failed. ${failures}. Chat unchanged. /rollback retries this turn's unfinished recovery.`);
|
|
9812
|
+
return;
|
|
9813
|
+
}
|
|
9814
|
+
let chatRewound = !1;
|
|
9782
9815
|
try {
|
|
9783
9816
|
let oldSid = this.sessionManager.getSessionId(), forkResult = await this.runtimeHost.fork(targetUserId, { position: "before" });
|
|
9784
9817
|
if (forkResult.cancelled) {
|
|
9785
|
-
this.
|
|
9818
|
+
this.showWarning("File recovery complete. Chat rewind cancelled. /rollback retries the same turn without restoring completed files again.");
|
|
9786
9819
|
return;
|
|
9787
9820
|
}
|
|
9788
|
-
migrateRollbackSession(oldSid, this.sessionManager.getSessionId()), result
|
|
9821
|
+
chatRewound = !0, migrateRollbackSession(oldSid, this.sessionManager.getSessionId()), result.turnIndex !== void 0 && commitRollbackTurn(this.sessionManager.getSessionId(), result.turnIndex), this.redoStack.length = 0, forkResult.selectedText && !this.editor.getText().trim() && this.editor.setText(forkResult.selectedText);
|
|
9789
9822
|
} catch (error) {
|
|
9790
|
-
|
|
9823
|
+
let message = error instanceof Error ? error.message : String(error);
|
|
9824
|
+
this.showError(chatRewound ? `Chat rewound, but finishing rollback failed: ${message}` : `File recovery complete; chat rewind failed: ${message}. /rollback retries the same turn.`);
|
|
9791
9825
|
return;
|
|
9792
9826
|
}
|
|
9793
9827
|
let names = (paths) => {
|
|
9794
9828
|
let base = paths.slice(0, 3).map((p) => path2.basename(p)).join(", ");
|
|
9795
9829
|
return paths.length > 3 ? `${base}, \u2026` : base;
|
|
9796
9830
|
}, parts = [];
|
|
9797
|
-
result.restored.length > 0 && parts.push(`${result.restored.length} file(s) restored (${names(result.restored)})`), result.deleted.length > 0 && parts.push(`${result.deleted.length} file(s) deleted (${names(result.deleted)})`), parts.length === 0 && parts.push("no file changes to restore"), this.showStatus(`Rollback complete \u2014 ${parts.join("; ")}.`);
|
|
9831
|
+
result.restored.length > 0 && parts.push(`${result.restored.length} file(s) restored (${names(result.restored)})`), result.deleted.length > 0 && parts.push(`${result.deleted.length} file(s) deleted (${names(result.deleted)})`), parts.length === 0 && parts.push(result.turnIndex === void 0 ? "no file changes to restore" : "file recovery complete"), this.showStatus(`Rollback complete \u2014 ${parts.join("; ")}.`);
|
|
9798
9832
|
}
|
|
9799
9833
|
/**
|
|
9800
9834
|
* Get capitalized display string for an app keybinding action.
|
|
@@ -9949,7 +9983,7 @@ ${theme.fg("muted", debugLogPath)}`, 1, 1)), this.ui.requestRender();
|
|
|
9949
9983
|
}
|
|
9950
9984
|
}
|
|
9951
9985
|
stop() {
|
|
9952
|
-
this.setThinkingAnimation(!1), this.stopCatalogRefresh?.(), this.stopCatalogRefresh = void 0, this.
|
|
9986
|
+
this.setThinkingAnimation(!1), this.stopCatalogRefresh?.(), this.stopCatalogRefresh = void 0, this.ui.terminal.setProgress(!1), this.clearStatusIndicator(), this.themeController.disableAutoSync(), this.clearExtensionTerminalInputListeners(), this.footer.dispose(), this.footerDataProvider.dispose(), this.disposeChatToolComponents(), this.unsubscribe && this.unsubscribe(), this.isInitialized && (this.ui.stop(), this.isInitialized = !1), this.unregisterSignalHandlers();
|
|
9953
9987
|
}
|
|
9954
9988
|
};
|
|
9955
9989
|
|
|
@@ -9972,7 +10006,6 @@ export {
|
|
|
9972
10006
|
TreeSelectorComponent,
|
|
9973
10007
|
UserMessageComponent,
|
|
9974
10008
|
UserMessageSelectorComponent,
|
|
9975
|
-
formatResumeCommand,
|
|
9976
10009
|
startInteractiveToolInstalls,
|
|
9977
10010
|
InteractiveMode
|
|
9978
10011
|
};
|