@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
|
@@ -8,7 +8,6 @@ import * as os from "node:os";
|
|
|
8
8
|
import * as path from "node:path";
|
|
9
9
|
import { getSupportedThinkingLevels, } from "@ashx-j/lunr-ai/compat";
|
|
10
10
|
import { CombinedAutocompleteProvider, Container, collectImageMarkerIds, formatImageMarker, fuzzyFilter, isFocusable, Markdown, matchesKey, ProcessTerminal, Spacer, setKeybindings, Text, TruncatedText, TUI, visibleWidth, } from "@ashx-j/lunr-tui";
|
|
11
|
-
import chalk from "chalk";
|
|
12
11
|
import { spawn, spawnSync } from "child_process";
|
|
13
12
|
import { APP_NAME, APP_TITLE, appendDebugLog, CONFIG_DIR_NAME, getAgentDir, getAuthPath, getDebugLogPath, getDocsPath, getShareViewerUrl, VERSION, } from "../../config.js";
|
|
14
13
|
import { parseSkillBlock } from "../../core/agent-session.js";
|
|
@@ -30,10 +29,9 @@ import { refreshModelCandidatesForInit } from "../../core/model-runtime.js";
|
|
|
30
29
|
import { getModelTiersBridge } from "../../core/model-tiers.js";
|
|
31
30
|
import { registerPermissionModeBridge } from "../../core/permission-mode.js";
|
|
32
31
|
import { nextModeForGoal, registerPermissionModeControlBridge } from "../../core/permission-mode-control.js";
|
|
33
|
-
import {
|
|
34
|
-
import { READ_ONLY_MODE_ADDENDUM } from "../../core/plan-mode.js";
|
|
32
|
+
import { nextPermissionMode, registerApprovalHandler, restorePermissionModeAfterPlan, } from "../../core/permissions.js";
|
|
35
33
|
import * as processRegistry from "../../core/process-registry.js";
|
|
36
|
-
import { captureTreeChanges, clearRollback, disableRollbackForSession, enableRollbackForSession, initRollback, isRollbackEnabled, isRollbackSessionForceEnabled, migrateRollbackSession, peekRollbackTurnsConsumed, beginTurn as rollbackBeginTurn, rollbackLastTurn, setRollbackWarningHandler, } from "../../core/rollback.js";
|
|
34
|
+
import { captureTreeChanges, clearRollback, commitRollbackTurn, disableRollbackForSession, enableRollbackForSession, getRollbackRecoveryBlockReason, getRollbackTargetUserId, initRollback, isRollbackEnabled, isRollbackSessionForceEnabled, migrateRollbackSession, peekRollbackTurnsConsumed, beginTurn as rollbackBeginTurn, rollbackLastTurn, setRollbackWarningHandler, } from "../../core/rollback.js";
|
|
37
35
|
import { getSearchCuratorSetting, setSearchCuratorSetting } from "../../core/search-curator.js";
|
|
38
36
|
import { formatMissingSessionCwdPrompt, MissingSessionCwdError } from "../../core/session-cwd.js";
|
|
39
37
|
import { cancelSessionHandoff, markSessionHandoff, recordTuiActivity, registerTransferHandler, requestSessionTransfer, } from "../../core/session-handoff.js";
|
|
@@ -66,7 +64,6 @@ import { CustomEntryComponent } from "./components/custom-entry.js";
|
|
|
66
64
|
import { CustomMessageComponent } from "./components/custom-message.js";
|
|
67
65
|
import { DaxnutsComponent } from "./components/daxnuts.js";
|
|
68
66
|
import { DynamicBorder } from "./components/dynamic-border.js";
|
|
69
|
-
import { buildExitCard, computeExitCardStats } from "./components/exit-card.js";
|
|
70
67
|
import { ExtensionEditorComponent } from "./components/extension-editor.js";
|
|
71
68
|
import { ExtensionInputComponent } from "./components/extension-input.js";
|
|
72
69
|
import { ExtensionSelectorComponent } from "./components/extension-selector.js";
|
|
@@ -143,27 +140,6 @@ function isAnthropicSubscriptionAuthKey(apiKey) {
|
|
|
143
140
|
function isUnknownModel(model) {
|
|
144
141
|
return !!model && model.provider === "unknown" && model.id === "unknown" && model.api === "unknown";
|
|
145
142
|
}
|
|
146
|
-
function quoteIfNeeded(value) {
|
|
147
|
-
if (value.length > 0 && !/[^a-zA-Z0-9_\-./~:@]/.test(value)) {
|
|
148
|
-
return value;
|
|
149
|
-
}
|
|
150
|
-
return `'${value.replace(/'/g, `'\\''`)}'`;
|
|
151
|
-
}
|
|
152
|
-
export function formatResumeCommand(sessionManager) {
|
|
153
|
-
if (!process.stdout.isTTY)
|
|
154
|
-
return undefined;
|
|
155
|
-
if (!sessionManager.isPersisted())
|
|
156
|
-
return undefined;
|
|
157
|
-
const sessionFile = sessionManager.getSessionFile();
|
|
158
|
-
if (!sessionFile || !fs.existsSync(sessionFile))
|
|
159
|
-
return undefined;
|
|
160
|
-
const args = [APP_NAME];
|
|
161
|
-
if (!sessionManager.usesDefaultSessionDir()) {
|
|
162
|
-
args.push("--session-dir", quoteIfNeeded(sessionManager.getSessionDir()));
|
|
163
|
-
}
|
|
164
|
-
args.push("--session", sessionManager.getSessionId());
|
|
165
|
-
return args.join(" ");
|
|
166
|
-
}
|
|
167
143
|
function hasDefaultModelProvider(providerId) {
|
|
168
144
|
return providerId in defaultModelPerProvider;
|
|
169
145
|
}
|
|
@@ -345,11 +321,11 @@ export class InteractiveMode {
|
|
|
345
321
|
this.options = options;
|
|
346
322
|
this.autoTrustOnReloadCwd = options.autoTrustOnReloadCwd;
|
|
347
323
|
this.runtimeHost.setBeforeSessionInvalidate((reason) => {
|
|
324
|
+
this.stopPlanUsagePolling();
|
|
348
325
|
this.resetExtensionUI();
|
|
349
|
-
//
|
|
326
|
+
// Reset UI mode history before binding the replacement session.
|
|
350
327
|
this.previousPermissionMode = undefined;
|
|
351
328
|
this.preGoalPermissionMode = undefined;
|
|
352
|
-
resetPermissions(this.settingsManager.getDefaultPermissionMode());
|
|
353
329
|
// lunr: clear process registry and rollback state
|
|
354
330
|
processRegistry.clearRegistry();
|
|
355
331
|
// lunr: on fork (/rollback, tree navigation) the snapshots SURVIVE —
|
|
@@ -361,22 +337,21 @@ export class InteractiveMode {
|
|
|
361
337
|
});
|
|
362
338
|
this.runtimeHost.setRebindSession(async () => {
|
|
363
339
|
await this.rebindCurrentSession({ renderBeforeBind: true });
|
|
340
|
+
this.startPlanUsagePolling();
|
|
364
341
|
// lunr: re-init rollback for the new session id + re-apply auto force-enable.
|
|
365
342
|
initRollback(this.settingsManager, this.sessionManager.getSessionId());
|
|
366
|
-
const mode = this.
|
|
367
|
-
resetPermissions(mode);
|
|
343
|
+
const mode = this.session.permissionMode;
|
|
368
344
|
this.syncPermissionModeEffects(mode);
|
|
369
345
|
});
|
|
370
346
|
this.version = VERSION;
|
|
371
347
|
this.ui = options.startupView?.ui ?? new TUI(new ProcessTerminal(), this.settingsManager.getShowHardwareCursor());
|
|
372
348
|
this.ui.setClearOnShrink(this.settingsManager.getClearOnShrink());
|
|
373
349
|
// lunr: register the permission-mode footer bridge (provider-side: InteractiveMode owns the state).
|
|
374
|
-
registerPermissionModeBridge(() =>
|
|
350
|
+
registerPermissionModeBridge(() => this.session.permissionMode);
|
|
375
351
|
registerPermissionModeControlBridge({
|
|
376
352
|
enterGoalAuto: () => this.enterGoalAuto(),
|
|
377
353
|
leaveGoalAuto: () => this.leaveGoalAuto(),
|
|
378
354
|
});
|
|
379
|
-
resetPermissions(this.sessionManager.getPermissionMode() ?? this.settingsManager.getDefaultPermissionMode());
|
|
380
355
|
this.headerContainer = new Container();
|
|
381
356
|
if (options.startupView) {
|
|
382
357
|
this.headerContainer.addChild(new Spacer(1));
|
|
@@ -630,7 +605,7 @@ export class InteractiveMode {
|
|
|
630
605
|
// lunr: initialize rollback service for this session.
|
|
631
606
|
initRollback(this.settingsManager, this.sessionManager.getSessionId());
|
|
632
607
|
setRollbackWarningHandler((msg) => this.showStatus(msg));
|
|
633
|
-
this.syncPermissionModeEffects(this.
|
|
608
|
+
this.syncPermissionModeEffects(this.session.permissionMode);
|
|
634
609
|
await this.themeController.applyFromSettings();
|
|
635
610
|
this.headerContainer.clear();
|
|
636
611
|
// Add boot screen header (unless silenced)
|
|
@@ -716,10 +691,13 @@ export class InteractiveMode {
|
|
|
716
691
|
}
|
|
717
692
|
}
|
|
718
693
|
planUsageTimer;
|
|
694
|
+
planUsageBridge;
|
|
719
695
|
startPlanUsagePolling() {
|
|
720
|
-
|
|
696
|
+
this.stopPlanUsagePolling();
|
|
697
|
+
const bridge = getUsageServiceBridge(this.session.modelRuntime);
|
|
721
698
|
if (!bridge)
|
|
722
699
|
return;
|
|
700
|
+
this.planUsageBridge = bridge;
|
|
723
701
|
bridge.setOnUpdate(() => this.ui.requestRender());
|
|
724
702
|
const tick = () => {
|
|
725
703
|
const provider = this.session.model?.provider;
|
|
@@ -730,6 +708,14 @@ export class InteractiveMode {
|
|
|
730
708
|
this.planUsageTimer = setInterval(tick, 60_000);
|
|
731
709
|
this.planUsageTimer.unref?.();
|
|
732
710
|
}
|
|
711
|
+
stopPlanUsagePolling() {
|
|
712
|
+
if (this.planUsageTimer) {
|
|
713
|
+
clearInterval(this.planUsageTimer);
|
|
714
|
+
this.planUsageTimer = undefined;
|
|
715
|
+
}
|
|
716
|
+
this.planUsageBridge?.setOnUpdate(undefined);
|
|
717
|
+
this.planUsageBridge = undefined;
|
|
718
|
+
}
|
|
733
719
|
/** Background npm version check. Never blocks first paint. Workspace installs skip. */
|
|
734
720
|
async maybeNotifyCliUpdate() {
|
|
735
721
|
try {
|
|
@@ -858,7 +844,7 @@ export class InteractiveMode {
|
|
|
858
844
|
return "tmux extended-keys is off. Modified Enter keys may not work. Add `set -g extended-keys on` to ~/.tmux.conf and restart tmux.";
|
|
859
845
|
}
|
|
860
846
|
if (extendedKeysFormat === "xterm") {
|
|
861
|
-
return "tmux extended-keys-format is xterm.
|
|
847
|
+
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.";
|
|
862
848
|
}
|
|
863
849
|
return undefined;
|
|
864
850
|
}
|
|
@@ -3051,9 +3037,7 @@ export class InteractiveMode {
|
|
|
3051
3037
|
}
|
|
3052
3038
|
case "agent_end":
|
|
3053
3039
|
this.session.refreshModelFromRegistry();
|
|
3054
|
-
|
|
3055
|
-
this.ui.terminal.setProgress(false);
|
|
3056
|
-
}
|
|
3040
|
+
this.ui.terminal.setProgress(false);
|
|
3057
3041
|
this.clearStatusIndicator("working");
|
|
3058
3042
|
this.stopSmoothStreaming();
|
|
3059
3043
|
if (this.streamingComponent) {
|
|
@@ -3090,9 +3074,7 @@ export class InteractiveMode {
|
|
|
3090
3074
|
break;
|
|
3091
3075
|
}
|
|
3092
3076
|
case "compaction_end": {
|
|
3093
|
-
|
|
3094
|
-
this.ui.terminal.setProgress(false);
|
|
3095
|
-
}
|
|
3077
|
+
this.ui.terminal.setProgress(false);
|
|
3096
3078
|
if (this.autoCompactionEscapeHandler) {
|
|
3097
3079
|
this.defaultEditor.onEscape = this.autoCompactionEscapeHandler;
|
|
3098
3080
|
this.autoCompactionEscapeHandler = undefined;
|
|
@@ -3497,13 +3479,10 @@ export class InteractiveMode {
|
|
|
3497
3479
|
if (this.isShuttingDown)
|
|
3498
3480
|
return;
|
|
3499
3481
|
this.isShuttingDown = true;
|
|
3482
|
+
this.session.stopAdmission();
|
|
3500
3483
|
this.unregisterSessionTransfer?.();
|
|
3501
3484
|
this.stopSmoothStreaming();
|
|
3502
|
-
|
|
3503
|
-
clearInterval(this.planUsageTimer);
|
|
3504
|
-
this.planUsageTimer = undefined;
|
|
3505
|
-
}
|
|
3506
|
-
getUsageServiceBridge()?.setOnUpdate(undefined);
|
|
3485
|
+
this.stopPlanUsagePolling();
|
|
3507
3486
|
// Keep signal handlers registered until terminal cleanup has completed.
|
|
3508
3487
|
// `signal-exit` checks the listener list during the same SIGTERM/SIGHUP
|
|
3509
3488
|
// dispatch and re-sends the signal if only its own listeners remain.
|
|
@@ -3542,21 +3521,6 @@ export class InteractiveMode {
|
|
|
3542
3521
|
}
|
|
3543
3522
|
this.stop();
|
|
3544
3523
|
await this.runtimeHost.dispose();
|
|
3545
|
-
// lunr: exit summary card — print a closing card for non-empty sessions,
|
|
3546
|
-
// before the resume line. Fires on all interactive exits reaching shutdown
|
|
3547
|
-
// (/quit, double ctrl+c, ctrl+d). Skipped for empty sessions (0 user msgs).
|
|
3548
|
-
const entries = this.sessionManager?.getEntries?.();
|
|
3549
|
-
const exitStats = entries ? computeExitCardStats(entries) : { turns: 0, tokens: 0, filesChanged: 0 };
|
|
3550
|
-
const cardLines = buildExitCard(exitStats);
|
|
3551
|
-
if (cardLines.length > 0) {
|
|
3552
|
-
process.stdout.write(`${chalk.dim(cardLines.join("\n"))}\n`);
|
|
3553
|
-
}
|
|
3554
|
-
const resumeCommand = this.sessionManager && typeof this.sessionManager.isPersisted === "function"
|
|
3555
|
-
? formatResumeCommand(this.sessionManager)
|
|
3556
|
-
: undefined;
|
|
3557
|
-
if (resumeCommand) {
|
|
3558
|
-
process.stdout.write(`${chalk.dim("To resume this session:")} ${resumeCommand}\n`);
|
|
3559
|
-
}
|
|
3560
3524
|
process.exit(0);
|
|
3561
3525
|
}
|
|
3562
3526
|
emergencyTerminalExit() {
|
|
@@ -3756,7 +3720,7 @@ export class InteractiveMode {
|
|
|
3756
3720
|
}
|
|
3757
3721
|
}
|
|
3758
3722
|
cyclePermissionMode() {
|
|
3759
|
-
this.applyPermissionMode(nextPermissionMode(
|
|
3723
|
+
this.applyPermissionMode(nextPermissionMode(this.session.permissionMode), { silent: true });
|
|
3760
3724
|
}
|
|
3761
3725
|
async cycleModel(direction) {
|
|
3762
3726
|
if (this.runtimeHost.isDetached || this.transferInProgress)
|
|
@@ -3876,7 +3840,7 @@ export class InteractiveMode {
|
|
|
3876
3840
|
this.ui.stop();
|
|
3877
3841
|
// Split by space to support editor arguments (e.g., "code --wait")
|
|
3878
3842
|
const [editor, ...editorArgs] = editorCmd.split(" ");
|
|
3879
|
-
process.stdout.write(`Launching external editor: ${editorCmd}\
|
|
3843
|
+
process.stdout.write(`Launching external editor: ${editorCmd}\nlunR will resume when the editor exits.\n`);
|
|
3880
3844
|
// Do not use spawnSync here. On Windows, synchronous child_process calls can keep
|
|
3881
3845
|
// Node/libuv's console input read active after ui.stop() pauses stdin, racing
|
|
3882
3846
|
// vim/nvim for the console input buffer until Ctrl+C cancels the pending read.
|
|
@@ -4351,6 +4315,8 @@ export class InteractiveMode {
|
|
|
4351
4315
|
},
|
|
4352
4316
|
onShowTerminalProgressChange: (enabled) => {
|
|
4353
4317
|
this.settingsManager.setShowTerminalProgress(enabled);
|
|
4318
|
+
if (!enabled)
|
|
4319
|
+
this.ui.terminal.setProgress(false);
|
|
4354
4320
|
},
|
|
4355
4321
|
onModelTiersEnabledChange: (enabled) => {
|
|
4356
4322
|
this.settingsManager.setModelTiersEnabled(enabled);
|
|
@@ -4573,7 +4539,16 @@ export class InteractiveMode {
|
|
|
4573
4539
|
const cloudRefresh = globalThis[Symbol.for("@lunr/ollama-cloud-refresh")];
|
|
4574
4540
|
if (cloudRefresh && allowNetwork) {
|
|
4575
4541
|
try {
|
|
4576
|
-
|
|
4542
|
+
const resolution = await runtime.getAuth("ollama-cloud");
|
|
4543
|
+
await cloudRefresh({
|
|
4544
|
+
ui: runner.createCommandContext().ui,
|
|
4545
|
+
auth: resolution
|
|
4546
|
+
? {
|
|
4547
|
+
apiKey: resolution.auth.apiKey,
|
|
4548
|
+
headers: Object.fromEntries(Object.entries(resolution.auth.headers ?? {}).filter((entry) => entry[1] !== null)),
|
|
4549
|
+
}
|
|
4550
|
+
: undefined,
|
|
4551
|
+
});
|
|
4577
4552
|
}
|
|
4578
4553
|
catch (error) {
|
|
4579
4554
|
ollama = `ollama-cloud refresh failed: ${error instanceof Error ? error.message : String(error)}`;
|
|
@@ -6480,9 +6455,11 @@ export class InteractiveMode {
|
|
|
6480
6455
|
// /plan is a shortcut into read-only mode for planning.
|
|
6481
6456
|
async handlePlanCommand(args) {
|
|
6482
6457
|
const sub = args.toLowerCase();
|
|
6483
|
-
const inReadOnly =
|
|
6458
|
+
const inReadOnly = this.session.permissionMode === "read-only";
|
|
6484
6459
|
if (sub === "status") {
|
|
6485
|
-
this.showStatus(inReadOnly
|
|
6460
|
+
this.showStatus(inReadOnly
|
|
6461
|
+
? "Read mode is active. /plan off to leave it."
|
|
6462
|
+
: `Permission mode: ${this.session.permissionMode}.`);
|
|
6486
6463
|
return;
|
|
6487
6464
|
}
|
|
6488
6465
|
if (sub !== "" && sub !== "on" && sub !== "off") {
|
|
@@ -6501,7 +6478,7 @@ export class InteractiveMode {
|
|
|
6501
6478
|
handleModeCommand(args) {
|
|
6502
6479
|
const sub = args.toLowerCase();
|
|
6503
6480
|
if (sub === "status") {
|
|
6504
|
-
this.showStatus(`Permission mode: ${
|
|
6481
|
+
this.showStatus(`Permission mode: ${this.session.permissionMode === "read-only" ? "read" : this.session.permissionMode}`);
|
|
6505
6482
|
return;
|
|
6506
6483
|
}
|
|
6507
6484
|
if (sub === "yolo" || sub === "auto" || sub === "read-only" || sub === "read") {
|
|
@@ -6536,53 +6513,35 @@ export class InteractiveMode {
|
|
|
6536
6513
|
syncPermissionModeEffects(mode) {
|
|
6537
6514
|
if (this.runtimeHost.isDetached || this.transferInProgress)
|
|
6538
6515
|
return;
|
|
6539
|
-
this.
|
|
6540
|
-
if (mode === "
|
|
6541
|
-
this.session.setSystemPromptAppend(READ_ONLY_MODE_ADDENDUM);
|
|
6542
|
-
}
|
|
6543
|
-
else if (mode === "auto") {
|
|
6544
|
-
this.session.setSystemPromptAppend(AUTO_MODE_ADDENDUM);
|
|
6516
|
+
this.session.setPermissionMode(mode);
|
|
6517
|
+
if (mode === "auto")
|
|
6545
6518
|
enableRollbackForSession(this.sessionManager.getSessionId());
|
|
6546
|
-
}
|
|
6547
|
-
else {
|
|
6548
|
-
this.session.setSystemPromptAppend(undefined);
|
|
6549
|
-
}
|
|
6550
6519
|
}
|
|
6551
6520
|
// lunr: `/goal` forces session auto without writing settings.
|
|
6552
6521
|
enterGoalAuto() {
|
|
6553
|
-
const next = nextModeForGoal(
|
|
6522
|
+
const next = nextModeForGoal(this.session.permissionMode, "enter", this.preGoalPermissionMode);
|
|
6554
6523
|
this.preGoalPermissionMode = next.saved;
|
|
6555
|
-
if (next.mode !==
|
|
6524
|
+
if (next.mode !== this.session.permissionMode) {
|
|
6556
6525
|
this.applyPermissionMode(next.mode, { silent: true });
|
|
6557
6526
|
}
|
|
6558
6527
|
}
|
|
6559
6528
|
leaveGoalAuto() {
|
|
6560
|
-
const next = nextModeForGoal(
|
|
6529
|
+
const next = nextModeForGoal(this.session.permissionMode, "leave", this.preGoalPermissionMode);
|
|
6561
6530
|
this.preGoalPermissionMode = next.saved;
|
|
6562
|
-
if (next.mode !==
|
|
6531
|
+
if (next.mode !== this.session.permissionMode) {
|
|
6563
6532
|
this.applyPermissionMode(next.mode, { silent: true });
|
|
6564
6533
|
}
|
|
6565
6534
|
}
|
|
6566
6535
|
applyPermissionMode(mode, opts) {
|
|
6567
6536
|
if (this.runtimeHost.isDetached || this.transferInProgress)
|
|
6568
6537
|
return;
|
|
6569
|
-
this.sessionManager.setPermissionMode(mode);
|
|
6570
6538
|
recordTuiActivity(this.sessionManager, this.runtimeHost.services.agentDir);
|
|
6571
|
-
const prev =
|
|
6539
|
+
const prev = this.session.permissionMode;
|
|
6572
6540
|
if (mode === "read-only" && prev !== "read-only") {
|
|
6573
6541
|
this.previousPermissionMode = prev;
|
|
6574
6542
|
}
|
|
6575
|
-
setPermissionMode(mode);
|
|
6543
|
+
this.session.setPermissionMode(mode);
|
|
6576
6544
|
this.ui.requestRender();
|
|
6577
|
-
if (mode === "read-only") {
|
|
6578
|
-
this.session.setSystemPromptAppend(READ_ONLY_MODE_ADDENDUM);
|
|
6579
|
-
}
|
|
6580
|
-
else if (mode === "auto") {
|
|
6581
|
-
this.session.setSystemPromptAppend(AUTO_MODE_ADDENDUM);
|
|
6582
|
-
}
|
|
6583
|
-
else {
|
|
6584
|
-
this.session.setSystemPromptAppend(undefined);
|
|
6585
|
-
}
|
|
6586
6545
|
if (mode === "auto" && prev !== "auto") {
|
|
6587
6546
|
enableRollbackForSession(this.sessionManager.getSessionId());
|
|
6588
6547
|
}
|
|
@@ -6682,10 +6641,15 @@ export class InteractiveMode {
|
|
|
6682
6641
|
this.showWarning("Wait for the current response to finish before running /rollback.");
|
|
6683
6642
|
return;
|
|
6684
6643
|
}
|
|
6685
|
-
if (!isRollbackEnabled()) {
|
|
6644
|
+
if (!isRollbackEnabled(this.sessionManager.getSessionId())) {
|
|
6686
6645
|
this.showStatus("Rollback is disabled — enable it in /settings → Rollback");
|
|
6687
6646
|
return;
|
|
6688
6647
|
}
|
|
6648
|
+
const recoveryBlocked = getRollbackRecoveryBlockReason(this.sessionManager.getSessionId());
|
|
6649
|
+
if (recoveryBlocked) {
|
|
6650
|
+
this.showWarning(recoveryBlocked);
|
|
6651
|
+
return;
|
|
6652
|
+
}
|
|
6689
6653
|
// lunr: how many turns the rollback will consume — the newest non-empty turn
|
|
6690
6654
|
// plus any empty (chat-only) turns on top of it. The conversation must rewind
|
|
6691
6655
|
// past the same number of user messages or files and messages desync.
|
|
@@ -6695,43 +6659,68 @@ export class InteractiveMode {
|
|
|
6695
6659
|
// the current branch) BEFORE mutating anything — forking to it is what makes
|
|
6696
6660
|
// the rewind persistent.
|
|
6697
6661
|
const branch = this.sessionManager.getBranch();
|
|
6698
|
-
let targetUserId;
|
|
6662
|
+
let targetUserId = getRollbackTargetUserId(this.sessionManager.getSessionId());
|
|
6663
|
+
if (targetUserId && !branch.some((entry) => entry.id === targetUserId)) {
|
|
6664
|
+
this.showWarning("Rollback recovery belongs to another chat branch. Return to that branch to retry.");
|
|
6665
|
+
return;
|
|
6666
|
+
}
|
|
6699
6667
|
let userMessagesSeen = 0;
|
|
6700
|
-
|
|
6668
|
+
let fallbackUserId;
|
|
6669
|
+
for (let i = branch.length - 1; !targetUserId && i >= 0; i--) {
|
|
6701
6670
|
const entry = branch[i];
|
|
6702
6671
|
if (entry.type === "message" && entry.message.role === "user") {
|
|
6703
6672
|
userMessagesSeen++;
|
|
6704
|
-
|
|
6673
|
+
fallbackUserId = entry.id;
|
|
6705
6674
|
if (userMessagesSeen >= turnsToConsume)
|
|
6706
6675
|
break;
|
|
6707
6676
|
}
|
|
6708
6677
|
}
|
|
6678
|
+
targetUserId ??= fallbackUserId;
|
|
6709
6679
|
if (!targetUserId) {
|
|
6710
6680
|
this.showStatus("Nothing to roll back");
|
|
6711
6681
|
return;
|
|
6712
6682
|
}
|
|
6713
6683
|
let result;
|
|
6714
6684
|
try {
|
|
6715
|
-
|
|
6716
|
-
|
|
6717
|
-
|
|
6718
|
-
|
|
6685
|
+
result = rollbackLastTurn(this.sessionManager.getSessionId(), { deferCommit: true, targetUserId });
|
|
6686
|
+
}
|
|
6687
|
+
catch (error) {
|
|
6688
|
+
this.showError(`Rollback could not prepare recovery: ${error instanceof Error ? error.message : String(error)}`);
|
|
6689
|
+
return;
|
|
6690
|
+
}
|
|
6691
|
+
if (!result.complete) {
|
|
6692
|
+
const failures = result.failed
|
|
6693
|
+
.slice(0, 3)
|
|
6694
|
+
.map(({ path: file, error }) => `${path.basename(file)}: ${error}`)
|
|
6695
|
+
.join("; ");
|
|
6696
|
+
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.`);
|
|
6697
|
+
return;
|
|
6698
|
+
}
|
|
6699
|
+
let chatRewound = false;
|
|
6700
|
+
try {
|
|
6701
|
+
// Restore first, but keep snapshots and completed-path receipts until
|
|
6702
|
+
// the fork succeeds. A veto or exception retries only this chat rewind.
|
|
6719
6703
|
const oldSid = this.sessionManager.getSessionId();
|
|
6720
6704
|
const forkResult = await this.runtimeHost.fork(targetUserId, { position: "before" });
|
|
6721
6705
|
if (forkResult.cancelled) {
|
|
6722
|
-
this.
|
|
6706
|
+
this.showWarning("File recovery complete. Chat rewind cancelled. /rollback retries the same turn without restoring completed files again.");
|
|
6723
6707
|
return;
|
|
6724
6708
|
}
|
|
6709
|
+
chatRewound = true;
|
|
6725
6710
|
migrateRollbackSession(oldSid, this.sessionManager.getSessionId());
|
|
6726
|
-
result
|
|
6727
|
-
|
|
6711
|
+
if (result.turnIndex !== undefined)
|
|
6712
|
+
commitRollbackTurn(this.sessionManager.getSessionId(), result.turnIndex);
|
|
6713
|
+
// /redo cannot cross a fork because the branched session has new entry ids.
|
|
6728
6714
|
this.redoStack.length = 0;
|
|
6729
6715
|
if (forkResult.selectedText && !this.editor.getText().trim()) {
|
|
6730
6716
|
this.editor.setText(forkResult.selectedText);
|
|
6731
6717
|
}
|
|
6732
6718
|
}
|
|
6733
6719
|
catch (error) {
|
|
6734
|
-
|
|
6720
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
6721
|
+
this.showError(chatRewound
|
|
6722
|
+
? `Chat rewound, but finishing rollback failed: ${message}`
|
|
6723
|
+
: `File recovery complete; chat rewind failed: ${message}. /rollback retries the same turn.`);
|
|
6735
6724
|
return;
|
|
6736
6725
|
}
|
|
6737
6726
|
const names = (paths) => {
|
|
@@ -6747,7 +6736,7 @@ export class InteractiveMode {
|
|
|
6747
6736
|
if (result.deleted.length > 0)
|
|
6748
6737
|
parts.push(`${result.deleted.length} file(s) deleted (${names(result.deleted)})`);
|
|
6749
6738
|
if (parts.length === 0)
|
|
6750
|
-
parts.push("no file changes to restore");
|
|
6739
|
+
parts.push(result.turnIndex === undefined ? "no file changes to restore" : "file recovery complete");
|
|
6751
6740
|
this.showStatus(`Rollback complete — ${parts.join("; ")}.`);
|
|
6752
6741
|
}
|
|
6753
6742
|
/**
|
|
@@ -7023,9 +7012,7 @@ ${toggleThinking ? `| \`${toggleThinking}\` | Toggle thinking block visibility |
|
|
|
7023
7012
|
this.setThinkingAnimation(false);
|
|
7024
7013
|
this.stopCatalogRefresh?.();
|
|
7025
7014
|
this.stopCatalogRefresh = undefined;
|
|
7026
|
-
|
|
7027
|
-
this.ui.terminal.setProgress(false);
|
|
7028
|
-
}
|
|
7015
|
+
this.ui.terminal.setProgress(false);
|
|
7029
7016
|
this.clearStatusIndicator();
|
|
7030
7017
|
this.themeController.disableAutoSync();
|
|
7031
7018
|
this.clearExtensionTerminalInputListeners();
|