@ashx-j/lunr 0.2.25 → 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 +31 -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/index.d.ts.map +1 -1
- package/dist/builtin-extensions/index.js +1 -0
- package/dist/builtin-extensions/index.js.map +1 -1
- package/dist/builtin-extensions/lunr-computer-use.d.ts +3 -0
- package/dist/builtin-extensions/lunr-computer-use.d.ts.map +1 -0
- package/dist/builtin-extensions/lunr-computer-use.js +179 -0
- package/dist/builtin-extensions/lunr-computer-use.js.map +1 -0
- 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/extension/schemas.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/schemas.js +1 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/schemas.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/tool-description.d.ts +4 -4
- package/dist/builtin-extensions/pi-subagents/src/extension/tool-description.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/tool-description.js +8 -5
- package/dist/builtin-extensions/pi-subagents/src/extension/tool-description.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 +1 -0
- 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 +21 -4
- 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 +11 -4
- 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 +121 -25
- 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/chain-outputs.d.ts +1 -0
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/chain-outputs.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/chain-outputs.js +5 -0
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/chain-outputs.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/child-tools.d.ts +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/child-tools.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/child-tools.js +2 -0
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/child-tools.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/communication.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/tui/communication.js +1 -1
- package/dist/builtin-extensions/pi-subagents/src/tui/communication.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/tui/render.d.ts +2 -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 +22 -11
- 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 +28 -0
- package/dist/core/computer-use/adapter.d.ts.map +1 -0
- package/dist/core/computer-use/adapter.js +138 -0
- package/dist/core/computer-use/adapter.js.map +1 -0
- package/dist/core/computer-use/image.d.ts +27 -0
- package/dist/core/computer-use/image.d.ts.map +1 -0
- package/dist/core/computer-use/image.js +84 -0
- package/dist/core/computer-use/image.js.map +1 -0
- package/dist/core/computer-use/lease.d.ts +18 -0
- package/dist/core/computer-use/lease.d.ts.map +1 -0
- package/dist/core/computer-use/lease.js +129 -0
- package/dist/core/computer-use/lease.js.map +1 -0
- package/dist/core/computer-use/macos-runtime.d.ts +14 -0
- package/dist/core/computer-use/macos-runtime.d.ts.map +1 -0
- package/dist/core/computer-use/macos-runtime.js +148 -0
- package/dist/core/computer-use/macos-runtime.js.map +1 -0
- package/dist/core/computer-use/policy.d.ts +19 -0
- package/dist/core/computer-use/policy.d.ts.map +1 -0
- package/dist/core/computer-use/policy.js +67 -0
- package/dist/core/computer-use/policy.js.map +1 -0
- package/dist/core/computer-use/release.generated.d.ts +31 -0
- package/dist/core/computer-use/release.generated.d.ts.map +1 -0
- package/dist/core/computer-use/release.generated.js +36 -0
- package/dist/core/computer-use/release.generated.js.map +1 -0
- package/dist/core/computer-use/runtime.d.ts +13 -0
- package/dist/core/computer-use/runtime.d.ts.map +1 -0
- package/dist/core/computer-use/runtime.js +158 -0
- package/dist/core/computer-use/runtime.js.map +1 -0
- package/dist/core/computer-use/schemas.d.ts +100 -0
- package/dist/core/computer-use/schemas.d.ts.map +1 -0
- package/dist/core/computer-use/schemas.js +96 -0
- package/dist/core/computer-use/schemas.js.map +1 -0
- package/dist/core/computer-use/windows-desktop.d.ts +3 -0
- package/dist/core/computer-use/windows-desktop.d.ts.map +1 -0
- package/dist/core/computer-use/windows-desktop.js +48 -0
- package/dist/core/computer-use/windows-desktop.js.map +1 -0
- package/dist/core/computer-use/workflow.d.ts +38 -0
- package/dist/core/computer-use/workflow.d.ts.map +1 -0
- package/dist/core/computer-use/workflow.js +900 -0
- package/dist/core/computer-use/workflow.js.map +1 -0
- 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/loader.d.ts.map +1 -1
- package/dist/core/extensions/loader.js +4 -0
- package/dist/core/extensions/loader.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 +4 -4
- package/dist/core/permissions.d.ts.map +1 -1
- package/dist/core/permissions.js +25 -38
- 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 +135 -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/settings-manager.d.ts +6 -0
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +19 -0
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/subagent-event-transport.d.ts +3 -0
- package/dist/core/subagent-event-transport.d.ts.map +1 -0
- package/dist/core/subagent-event-transport.js +61 -0
- package/dist/core/subagent-event-transport.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/adapters/discord.d.ts.map +1 -1
- package/dist/gateway/adapters/discord.js +2 -2
- package/dist/gateway/adapters/discord.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/approval.d.ts.map +1 -1
- package/dist/gateway/approval.js +3 -3
- package/dist/gateway/approval.js.map +1 -1
- package/dist/gateway/authz.d.ts +4 -4
- package/dist/gateway/authz.d.ts.map +1 -1
- package/dist/gateway/authz.js +8 -12
- package/dist/gateway/authz.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 +12 -10
- 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 +85 -62
- package/dist/gateway/cron.js.map +1 -1
- package/dist/gateway/index.d.ts.map +1 -1
- package/dist/gateway/index.js +5 -4
- 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 +64 -22
- 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 +74 -39
- 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 +22 -9
- 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/gateway/setup.d.ts.map +1 -1
- package/dist/gateway/setup.js +6 -4
- package/dist/gateway/setup.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/components/settings-selector.d.ts +4 -0
- package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector.js +20 -0
- package/dist/modes/interactive/components/settings-selector.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 +104 -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/print-mode.d.ts.map +1 -1
- package/dist/modes/print-mode.js +9 -1
- package/dist/modes/print-mode.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-247RTYLS.js +16 -0
- 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-ZLAX7TUH.js → builtin-extensions-OX6KELNX.js} +9 -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-NRKGMJYU.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-ZXSGTGJ6.js → chunk-APVM5NEU.js} +169 -148
- package/dist/node-runtime/{chunk-RC7DMV45.js → chunk-AYHH7YSD.js} +205 -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-KWIYUUZK.js → chunk-C3P6Q3B2.js} +469 -283
- package/dist/node-runtime/{chunk-YCUZEGJG.js → chunk-DQSCFU7R.js} +17 -8
- package/dist/node-runtime/chunk-EBLAZVSA.js +4170 -0
- 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-FE3WZI7F.js +290 -0
- 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-FY4A63RK.js +73 -0
- package/dist/node-runtime/chunk-FYIFPFXE.js +98 -0
- 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-6XL67VVY.js → chunk-HUD2RFJW.js} +17 -2
- package/dist/node-runtime/{chunk-I54LGHWM.js → chunk-I2H5QMWW.js} +3 -3
- package/dist/node-runtime/chunk-IAZSK7KK.js +108 -0
- package/dist/node-runtime/{chunk-2HHLJWGD.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-WF7PGWRZ.js → chunk-JWEVT363.js} +37 -28
- 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-IJIFHRTB.js → chunk-MQPKUHRN.js} +165 -85
- 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-E4D3IGP2.js → chunk-QNVMKNNN.js} +20 -17
- package/dist/node-runtime/{chunk-GS42T6MX.js → chunk-QW3AAHWN.js} +1 -1
- package/dist/node-runtime/{chunk-7S3T6YEA.js → chunk-R4WSB2MQ.js} +5 -5
- package/dist/node-runtime/{chunk-B4HP6ZWM.js → chunk-RHCGYWO7.js} +1 -1
- package/dist/node-runtime/{chunk-3XPLBUEM.js → chunk-RLGY2QIL.js} +49 -59
- package/dist/node-runtime/{chunk-KKUTQQV7.js → chunk-RYRGL7P4.js} +1 -1
- package/dist/node-runtime/{chunk-AD6VXAO7.js → chunk-TCT6PCUR.js} +47 -115
- package/dist/node-runtime/chunk-U5F4IC7R.js +53 -0
- package/dist/node-runtime/{chunk-OCVIXVTZ.js → chunk-UBWW2PID.js} +13 -2
- package/dist/node-runtime/{chunk-HFVZUPFJ.js → chunk-UNUZICC4.js} +3 -3
- package/dist/node-runtime/{chunk-LQP3RB67.js → chunk-UYRKUKFE.js} +1 -1
- package/dist/node-runtime/{chunk-DSIKTUPW.js → chunk-VSUEAI7O.js} +2993 -3820
- 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-VQFSUJJG.js → chunk-ZDJUR45D.js} +430 -129
- package/dist/node-runtime/{chunk-YDO2F2IA.js → chunk-ZEVFBFNF.js} +95 -142
- package/dist/node-runtime/chunk-ZIQUS5QO.js +180 -0
- package/dist/node-runtime/cli-runtime.js +4 -4
- package/dist/node-runtime/{command-6WDOYKS6.js → command-3HMSY6W2.js} +5 -5
- package/dist/node-runtime/{commands-NZLSOHPE.js → commands-D6A6H4TS.js} +11 -16
- package/dist/node-runtime/commands-OCSSEEWJ.js +37 -0
- 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-77GW4F5P.js → direct-tool-executor-2QJXVQD2.js} +8 -10
- 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-INAYBF4Q.js → gateway-6623C2U3.js} +61 -53
- 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 +54 -48
- package/dist/node-runtime/{init-HS6NQXSK.js → init-JBQJIPYI.js} +3 -4
- package/dist/node-runtime/{install-cli-KL4UDDAD.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-VDP2QNRQ.js +158 -0
- package/dist/node-runtime/{lunr-cron-LWIZJM2N.js → lunr-cron-LKVA5CZZ.js} +94 -79
- package/dist/node-runtime/main.js +42 -39
- package/dist/node-runtime/{mobile-commands-J7OJEKFO.js → mobile-commands-XT3NQXLD.js} +13 -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-VYZM5WHN.js → package-manager-cli-CYM262SI.js} +20 -19
- 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-5UKBZP44.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-DNY7EAIG.js → pi-subagents-LT3CTO4E.js} +114 -116
- package/dist/node-runtime/{pi-web-access-WTGMNZ32.js → pi-web-access-Z3LP246C.js} +144 -108
- package/dist/node-runtime/{print-mode-XSFM26EL.js → print-mode-2XHN5SUA.js} +4 -3
- package/dist/node-runtime/{process-registry-4FAKZQOL.js → process-registry-Q4QWIU33.js} +3 -3
- package/dist/node-runtime/{proxy-modes-LGEUYD7R.js → proxy-modes-VEGC6QG5.js} +9 -13
- package/dist/node-runtime/rpc-entry.js +42 -39
- 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-UGXM4NPQ.js +21 -0
- package/dist/node-runtime/{runtime-bridges-VRDDR73P.js → runtime-bridges-DNKMNJCF.js} +8 -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-J4SPQPDJ.js → settings-manager-P2TKGYTR.js} +6 -5
- package/dist/node-runtime/{setup-JBKOLJ6F.js → setup-H7CCELIL.js} +15 -1
- package/dist/node-runtime/{setup-CQ2NLVK5.js → setup-OLQ4GXWS.js} +22 -21
- package/dist/node-runtime/{src-IVPNZ2BX.js → src-6RV4PXKJ.js} +64 -36
- package/dist/node-runtime/{subagent-executor-KZZQGAKV.js → subagent-executor-Q5F7DBVM.js} +141 -62
- 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-GTFJC7XK.js → update-cli-F3XXJANQ.js} +7 -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-ICDI4N3J.js +767 -0
- 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 +2 -0
- package/dist/utils/image-resize-core.d.ts.map +1 -1
- package/dist/utils/image-resize-core.js +12 -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/computer-use.md +362 -0
- package/docs/custom-provider.md +3 -3
- package/docs/extensions.md +8 -4
- package/docs/features.md +22 -12
- 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 +3841 -0
- package/install-lock/package.json +18 -0
- package/native/computer-use/LICENSE.md +21 -0
- package/npm-shrinkwrap.json +3858 -0
- package/package.json +15 -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-YXXFCP5J.js +0 -49
- package/dist/node-runtime/chunk-4HXHDDCF.js +0 -16
- package/dist/node-runtime/chunk-4TLO4PO2.js +0 -3427
- package/dist/node-runtime/chunk-AUXVGBO4.js +0 -19
- package/dist/node-runtime/chunk-OVX6X377.js +0 -50
- package/dist/node-runtime/chunk-QTU6AKNJ.js +0 -773
- package/dist/node-runtime/chunk-TORR5XBV.js +0 -356
- package/dist/node-runtime/commands-QC6VUZJQ.js +0 -36
- package/dist/node-runtime/interactive-mode-Z5M7WYYZ.js +0 -72
- package/dist/node-runtime/mcp-auth-flow-QIXHW6QN.js +0 -32
package/dist/utils/paths.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"paths.js","sourceRoot":"","sources":["../../src/utils/paths.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,UAAU,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,gBAAgB,CAAC,UAAU,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,CAAC,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,CAAC;QACrG,CAAC;IACF,CAAC;AAAA,CACD","sourcesContent":["import { realpathSync } from \"node:fs\";\nimport { homedir } from \"node:os\";\nimport { isAbsolute, join, resolve as nodeResolvePath, relative, sep } from \"node:path\";\nimport { fileURLToPath } from \"node:url\";\nimport { spawnProcessSync } from \"./child-process.ts\";\n\nconst UNICODE_SPACES = /[\\u00A0\\u2000-\\u200A\\u202F\\u205F\\u3000]/g;\n\nexport interface PathInputOptions {\n\t/** Trim leading/trailing whitespace before normalization. */\n\ttrim?: boolean;\n\t/** Expand leading `~` to a home directory. Defaults to true. */\n\texpandTilde?: boolean;\n\t/** Home directory used for `~` expansion. Defaults to `os.homedir()`. */\n\thomeDir?: string;\n\t/** Strip a leading `@`, used for CLI @file paths. */\n\tstripAtPrefix?: boolean;\n\t/** Normalize unicode space variants to regular spaces. */\n\tnormalizeUnicodeSpaces?: boolean;\n}\n\n/**\n * Resolve a path to its canonical (real) form, following symlinks.\n * Falls back to the raw path if resolution fails (e.g. the target does\n * not exist yet), so that callers never crash on missing filesystem\n * entries.\n */\nexport function canonicalizePath(path: string): string {\n\ttry {\n\t\treturn realpathSync(path);\n\t} catch {\n\t\treturn path;\n\t}\n}\n\n/**\n * Returns true if the value is NOT a package source (npm:, git:, etc.)\n * or a remote URL protocol. Bare names, relative paths, and file: URLs\n * are considered local.\n */\nexport function isLocalPath(value: string): boolean {\n\tconst trimmed = value.trim();\n\t// Known non-local prefixes. file: URLs are local paths and are intentionally resolved by resolvePath().\n\tif (\n\t\ttrimmed.startsWith(\"npm:\") ||\n\t\ttrimmed.startsWith(\"git:\") ||\n\t\ttrimmed.startsWith(\"github:\") ||\n\t\ttrimmed.startsWith(\"http:\") ||\n\t\ttrimmed.startsWith(\"https:\") ||\n\t\ttrimmed.startsWith(\"ssh:\")\n\t) {\n\t\treturn false;\n\t}\n\treturn true;\n}\n\nexport function normalizePath(input: string, options: PathInputOptions = {}): string {\n\tlet normalized = options.trim ? input.trim() : input;\n\tif (options.normalizeUnicodeSpaces) {\n\t\tnormalized = normalized.replace(UNICODE_SPACES, \" \");\n\t}\n\tif (options.stripAtPrefix && normalized.startsWith(\"@\")) {\n\t\tnormalized = normalized.slice(1);\n\t}\n\n\tif (options.expandTilde ?? true) {\n\t\tconst home = options.homeDir ?? homedir();\n\t\tif (normalized === \"~\") return home;\n\t\tif (normalized.startsWith(\"~/\") || (process.platform === \"win32\" && normalized.startsWith(\"~\\\\\"))) {\n\t\t\treturn join(home, normalized.slice(2));\n\t\t}\n\t}\n\n\tif (/^file:\\/\\//.test(normalized)) {\n\t\treturn fileURLToPath(normalized);\n\t}\n\n\treturn normalized;\n}\n\nexport function resolvePath(input: string, baseDir: string = process.cwd(), options: PathInputOptions = {}): string {\n\tconst normalized = normalizePath(input, options);\n\tconst normalizedBaseDir = normalizePath(baseDir);\n\treturn isAbsolute(normalized) ? nodeResolvePath(normalized) : nodeResolvePath(normalizedBaseDir, normalized);\n}\n\nexport function getCwdRelativePath(filePath: string, cwd: string): string | undefined {\n\tconst resolvedCwd = resolvePath(cwd);\n\tconst resolvedPath = resolvePath(filePath, resolvedCwd);\n\tconst relativePath = relative(resolvedCwd, resolvedPath);\n\tconst isInsideCwd =\n\t\trelativePath === \"\" ||\n\t\t(relativePath !== \"..\" && !relativePath.startsWith(`..${sep}`) && !isAbsolute(relativePath));\n\n\treturn isInsideCwd ? relativePath || \".\" : undefined;\n}\n\nexport function formatPathRelativeToCwdOrAbsolute(filePath: string, cwd: string): string {\n\tconst absolutePath = resolvePath(filePath, cwd);\n\treturn (getCwdRelativePath(absolutePath, cwd) ?? absolutePath).split(sep).join(\"/\");\n}\n\nexport function markPathIgnoredByCloudSync(path: string): void {\n\tconst attrs =\n\t\tprocess.platform === \"darwin\"\n\t\t\t? [\"com.dropbox.ignored\", \"com.apple.fileprovider.ignore#P\"]\n\t\t\t: process.platform === \"linux\"\n\t\t\t\t? [\"user.com.dropbox.ignored\"]\n\t\t\t\t: [];\n\n\tfor (const attr of attrs) {\n\t\tif (process.platform === \"darwin\") {\n\t\t\tspawnProcessSync(\"xattr\", [\"-w\", attr, \"1\", path], { encoding: \"utf-8\", stdio: \"ignore\" });\n\t\t} else {\n\t\t\tspawnProcessSync(\"setfattr\", [\"-n\", attr, \"-v\", \"1\", path], { encoding: \"utf-8\", stdio: \"ignore\" });\n\t\t}\n\t}\n}\n"]}
|
|
1
|
+
{"version":3,"file":"paths.js","sourceRoot":"","sources":["../../src/utils/paths.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAClD,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,IAAI,eAAe,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAC3G,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD,MAAM,cAAc,GAAG,0CAA0C,CAAC;AAelE;;;;;GAKG;AACH,MAAM,UAAU,gBAAgB,CAAC,IAAY,EAAU;IACtD,IAAI,CAAC;QACJ,OAAO,YAAY,CAAC,IAAI,CAAC,CAAC;IAC3B,CAAC;IAAC,MAAM,CAAC;QACR,OAAO,IAAI,CAAC;IACb,CAAC;AAAA,CACD;AAED;;GAEG;AACH,MAAM,UAAU,sBAAsB,CAAC,IAAY,EAAU;IAC5D,IAAI,QAAQ,GAAG,eAAe,CAAC,IAAI,CAAC,CAAC;IACrC,MAAM,MAAM,GAAa,EAAE,CAAC;IAC5B,SAAS,CAAC;QACT,IAAI,CAAC;YACJ,O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K,QAAQ;QAC5B,CAAC,CAAC,CAAC,qBAAqB,EAAE,iCAAiC,CAAC;QAC5D,CAAC,CAAC,OAAO,CAAC,QAAQ,KAAK,OAAO;YAC7B,CAAC,CAAC,CAAC,0BAA0B,CAAC;YAC9B,CAAC,CAAC,EAAE,CAAC;IAER,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QAC1B,IAAI,OAAO,CAAC,QAAQ,KAAK,QAAQ,EAAE,CAAC;YACnC,gBAAgB,CAAC,OAAO,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,CAAC,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,CAAC;QAC5F,CAAC;aAAM,CAAC;YACP,gBAAgB,CAAC,UAAU,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,CAAC,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,CAAC;QACrG,CAAC;IACF,CAAC;AAAA,CACD","sourcesContent":["import { lstatSync, realpathSync } from \"node:fs\";\nimport { homedir } from \"node:os\";\nimport { basename, dirname, isAbsolute, join, resolve as nodeResolvePath, relative, sep } from \"node:path\";\nimport { fileURLToPath } from \"node:url\";\nimport { spawnProcessSync } from \"./child-process.ts\";\n\nconst UNICODE_SPACES = /[\\u00A0\\u2000-\\u200A\\u202F\\u205F\\u3000]/g;\n\nexport interface PathInputOptions {\n\t/** Trim leading/trailing whitespace before normalization. */\n\ttrim?: boolean;\n\t/** Expand leading `~` to a home directory. Defaults to true. */\n\texpandTilde?: boolean;\n\t/** Home directory used for `~` expansion. Defaults to `os.homedir()`. */\n\thomeDir?: string;\n\t/** Strip a leading `@`, used for CLI @file paths. */\n\tstripAtPrefix?: boolean;\n\t/** Normalize unicode space variants to regular spaces. */\n\tnormalizeUnicodeSpaces?: boolean;\n}\n\n/**\n * Resolve a path to its canonical (real) form, following symlinks.\n * Falls back to the raw path if resolution fails (e.g. the target does\n * not exist yet), so that callers never crash on missing filesystem\n * entries.\n */\nexport function canonicalizePath(path: string): string {\n\ttry {\n\t\treturn realpathSync(path);\n\t} catch {\n\t\treturn path;\n\t}\n}\n\n/** Resolve an existing target, or the nearest existing parent of a new target.\n * Permission checks must not fall back to an unresolved alias on other I/O errors.\n */\nexport function canonicalizeTargetPath(path: string): string {\n\tlet ancestor = nodeResolvePath(path);\n\tconst suffix: string[] = [];\n\tfor (;;) {\n\t\ttry {\n\t\t\treturn join(realpathSync(ancestor), ...suffix);\n\t\t} catch (error) {\n\t\t\tif (!error || typeof error !== \"object\" || !(\"code\" in error) || error.code !== \"ENOENT\") throw error;\n\t\t\t// A dangling link is an existing alias with an unresolved destination.\n\t\t\t// Reject it instead of treating it as an ordinary missing filename.\n\t\t\ttry {\n\t\t\t\tif (lstatSync(ancestor).isSymbolicLink()) throw new Error(`Cannot resolve symbolic link: ${ancestor}`);\n\t\t\t} catch (statError) {\n\t\t\t\tif (!statError || typeof statError !== \"object\" || !(\"code\" in statError) || statError.code !== \"ENOENT\")\n\t\t\t\t\tthrow statError;\n\t\t\t}\n\t\t\tconst parent = dirname(ancestor);\n\t\t\tif (parent === ancestor) throw error;\n\t\t\tsuffix.unshift(basename(ancestor));\n\t\t\tancestor = parent;\n\t\t}\n\t}\n}\n\n/**\n * Returns true if the value is NOT a package source (npm:, git:, etc.)\n * or a remote URL protocol. Bare names, relative paths, and file: URLs\n * are considered local.\n */\nexport function isLocalPath(value: string): boolean {\n\tconst trimmed = value.trim();\n\t// Known non-local prefixes. file: URLs are local paths and are intentionally resolved by resolvePath().\n\tif (\n\t\ttrimmed.startsWith(\"npm:\") ||\n\t\ttrimmed.startsWith(\"git:\") ||\n\t\ttrimmed.startsWith(\"github:\") ||\n\t\ttrimmed.startsWith(\"http:\") ||\n\t\ttrimmed.startsWith(\"https:\") ||\n\t\ttrimmed.startsWith(\"ssh:\")\n\t) {\n\t\treturn false;\n\t}\n\treturn true;\n}\n\nexport function normalizePath(input: string, options: PathInputOptions = {}): string {\n\tlet normalized = options.trim ? input.trim() : input;\n\tif (options.normalizeUnicodeSpaces) {\n\t\tnormalized = normalized.replace(UNICODE_SPACES, \" \");\n\t}\n\tif (options.stripAtPrefix && normalized.startsWith(\"@\")) {\n\t\tnormalized = normalized.slice(1);\n\t}\n\n\tif (options.expandTilde ?? true) {\n\t\tconst home = options.homeDir ?? homedir();\n\t\tif (normalized === \"~\") return home;\n\t\tif (normalized.startsWith(\"~/\") || (process.platform === \"win32\" && normalized.startsWith(\"~\\\\\"))) {\n\t\t\treturn join(home, normalized.slice(2));\n\t\t}\n\t}\n\n\tif (/^file:\\/\\//.test(normalized)) {\n\t\treturn fileURLToPath(normalized);\n\t}\n\n\treturn normalized;\n}\n\nexport function resolvePath(input: string, baseDir: string = process.cwd(), options: PathInputOptions = {}): string {\n\tconst normalized = normalizePath(input, options);\n\tconst normalizedBaseDir = normalizePath(baseDir);\n\treturn isAbsolute(normalized) ? nodeResolvePath(normalized) : nodeResolvePath(normalizedBaseDir, normalized);\n}\n\nexport function getCwdRelativePath(filePath: string, cwd: string): string | undefined {\n\tconst resolvedCwd = resolvePath(cwd);\n\tconst resolvedPath = resolvePath(filePath, resolvedCwd);\n\tconst relativePath = relative(resolvedCwd, resolvedPath);\n\tconst isInsideCwd =\n\t\trelativePath === \"\" ||\n\t\t(relativePath !== \"..\" && !relativePath.startsWith(`..${sep}`) && !isAbsolute(relativePath));\n\n\treturn isInsideCwd ? relativePath || \".\" : undefined;\n}\n\nexport function formatPathRelativeToCwdOrAbsolute(filePath: string, cwd: string): string {\n\tconst absolutePath = resolvePath(filePath, cwd);\n\treturn (getCwdRelativePath(absolutePath, cwd) ?? absolutePath).split(sep).join(\"/\");\n}\n\nexport function markPathIgnoredByCloudSync(path: string): void {\n\tconst attrs =\n\t\tprocess.platform === \"darwin\"\n\t\t\t? [\"com.dropbox.ignored\", \"com.apple.fileprovider.ignore#P\"]\n\t\t\t: process.platform === \"linux\"\n\t\t\t\t? [\"user.com.dropbox.ignored\"]\n\t\t\t\t: [];\n\n\tfor (const attr of attrs) {\n\t\tif (process.platform === \"darwin\") {\n\t\t\tspawnProcessSync(\"xattr\", [\"-w\", attr, \"1\", path], { encoding: \"utf-8\", stdio: \"ignore\" });\n\t\t} else {\n\t\t\tspawnProcessSync(\"setfattr\", [\"-n\", attr, \"-v\", \"1\", path], { encoding: \"utf-8\", stdio: \"ignore\" });\n\t\t}\n\t}\n}\n"]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Remove terminal instructions from untrusted display source before applying styles.
|
|
3
|
+
* Stored messages and explicit clipboard payloads must retain their original source.
|
|
4
|
+
* This is not for rendered output, which can contain trusted links and image protocols.
|
|
5
|
+
*/
|
|
6
|
+
export declare function sanitizeTerminalText(source: string): string;
|
|
7
|
+
//# sourceMappingURL=sanitize-terminal-text.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sanitize-terminal-text.d.ts","sourceRoot":"","sources":["../../src/utils/sanitize-terminal-text.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAmD3D","sourcesContent":["/**\n * Remove terminal instructions from untrusted display source before applying styles.\n * Stored messages and explicit clipboard payloads must retain their original source.\n * This is not for rendered output, which can contain trusted links and image protocols.\n */\nexport function sanitizeTerminalText(source: string): string {\n\tif (!/[\\x00-\\x08\\x0b-\\x1f\\x7f-\\x9f]/.test(source)) return source;\n\n\tconst parts: string[] = [];\n\tlet index = 0;\n\tlet plainStart = 0;\n\twhile (index < source.length) {\n\t\tconst code = source.charCodeAt(index);\n\t\tif (code === 9 || code === 10 || (code >= 32 && (code < 127 || code > 159))) {\n\t\t\tindex++;\n\t\t\tcontinue;\n\t\t}\n\t\tparts.push(source.slice(plainStart, index));\n\t\tindex++;\n\t\tif (code === 13) {\n\t\t\t// CR is a terminal cursor instruction. Preserve logical source line endings.\n\t\t\tif (source.charCodeAt(index) === 10) index++;\n\t\t\tparts.push(\"\\n\");\n\t\t} else {\n\t\t\tlet sequence = code;\n\t\t\tif (code === 27 && index < source.length) {\n\t\t\t\tconst next = source.charCodeAt(index);\n\t\t\t\tif (next >= 64 && next <= 95) {\n\t\t\t\t\tsequence = next + 64; // ESC form of a C1 control.\n\t\t\t\t\tindex++;\n\t\t\t\t} else {\n\t\t\t\t\t// ESC intermediates and final byte, including charset selection and RIS.\n\t\t\t\t\twhile (source.charCodeAt(index) >= 32 && source.charCodeAt(index) <= 47) index++;\n\t\t\t\t\tif (source.charCodeAt(index) >= 48 && source.charCodeAt(index) <= 126) index++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (sequence === 155) {\n\t\t\t\t// CSI parameters, intermediates and final byte. Incomplete prefixes stay inert.\n\t\t\t\twhile (source.charCodeAt(index) >= 32 && source.charCodeAt(index) <= 63) index++;\n\t\t\t\tif (source.charCodeAt(index) >= 64 && source.charCodeAt(index) <= 126) index++;\n\t\t\t} else if ([144, 152, 157, 158, 159].includes(sequence)) {\n\t\t\t\t// DCS, SOS, OSC, PM and APC are opaque strings, including split streaming prefixes.\n\t\t\t\twhile (index < source.length) {\n\t\t\t\t\tconst next = source.charCodeAt(index++);\n\t\t\t\t\tif (next === 156 || (sequence === 157 && next === 7)) break;\n\t\t\t\t\tif (next === 27 && source.charCodeAt(index) === 92) {\n\t\t\t\t\t\tindex++;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tplainStart = index;\n\t}\n\tparts.push(source.slice(plainStart));\n\treturn parts.join(\"\");\n}\n"]}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Remove terminal instructions from untrusted display source before applying styles.
|
|
3
|
+
* Stored messages and explicit clipboard payloads must retain their original source.
|
|
4
|
+
* This is not for rendered output, which can contain trusted links and image protocols.
|
|
5
|
+
*/
|
|
6
|
+
export function sanitizeTerminalText(source) {
|
|
7
|
+
if (!/[\x00-\x08\x0b-\x1f\x7f-\x9f]/.test(source))
|
|
8
|
+
return source;
|
|
9
|
+
const parts = [];
|
|
10
|
+
let index = 0;
|
|
11
|
+
let plainStart = 0;
|
|
12
|
+
while (index < source.length) {
|
|
13
|
+
const code = source.charCodeAt(index);
|
|
14
|
+
if (code === 9 || code === 10 || (code >= 32 && (code < 127 || code > 159))) {
|
|
15
|
+
index++;
|
|
16
|
+
continue;
|
|
17
|
+
}
|
|
18
|
+
parts.push(source.slice(plainStart, index));
|
|
19
|
+
index++;
|
|
20
|
+
if (code === 13) {
|
|
21
|
+
// CR is a terminal cursor instruction. Preserve logical source line endings.
|
|
22
|
+
if (source.charCodeAt(index) === 10)
|
|
23
|
+
index++;
|
|
24
|
+
parts.push("\n");
|
|
25
|
+
}
|
|
26
|
+
else {
|
|
27
|
+
let sequence = code;
|
|
28
|
+
if (code === 27 && index < source.length) {
|
|
29
|
+
const next = source.charCodeAt(index);
|
|
30
|
+
if (next >= 64 && next <= 95) {
|
|
31
|
+
sequence = next + 64; // ESC form of a C1 control.
|
|
32
|
+
index++;
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
// ESC intermediates and final byte, including charset selection and RIS.
|
|
36
|
+
while (source.charCodeAt(index) >= 32 && source.charCodeAt(index) <= 47)
|
|
37
|
+
index++;
|
|
38
|
+
if (source.charCodeAt(index) >= 48 && source.charCodeAt(index) <= 126)
|
|
39
|
+
index++;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
if (sequence === 155) {
|
|
43
|
+
// CSI parameters, intermediates and final byte. Incomplete prefixes stay inert.
|
|
44
|
+
while (source.charCodeAt(index) >= 32 && source.charCodeAt(index) <= 63)
|
|
45
|
+
index++;
|
|
46
|
+
if (source.charCodeAt(index) >= 64 && source.charCodeAt(index) <= 126)
|
|
47
|
+
index++;
|
|
48
|
+
}
|
|
49
|
+
else if ([144, 152, 157, 158, 159].includes(sequence)) {
|
|
50
|
+
// DCS, SOS, OSC, PM and APC are opaque strings, including split streaming prefixes.
|
|
51
|
+
while (index < source.length) {
|
|
52
|
+
const next = source.charCodeAt(index++);
|
|
53
|
+
if (next === 156 || (sequence === 157 && next === 7))
|
|
54
|
+
break;
|
|
55
|
+
if (next === 27 && source.charCodeAt(index) === 92) {
|
|
56
|
+
index++;
|
|
57
|
+
break;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
plainStart = index;
|
|
63
|
+
}
|
|
64
|
+
parts.push(source.slice(plainStart));
|
|
65
|
+
return parts.join("");
|
|
66
|
+
}
|
|
67
|
+
//# sourceMappingURL=sanitize-terminal-text.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sanitize-terminal-text.js","sourceRoot":"","sources":["../../src/utils/sanitize-terminal-text.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,UAAU,oBAAoB,CAAC,MAAc,EAAU;IAC5D,IAAI,CAAC,+BAA+B,CAAC,IAAI,CAAC,MAAM,CAAC;QAAE,OAAO,MAAM,CAAC;IAEjE,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,IAAI,KAAK,GAAG,CAAC,CAAC;IACd,IAAI,UAAU,GAAG,CAAC,CAAC;IACnB,OAAO,KAAK,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC;QAC9B,MAAM,IAAI,GAAG,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;QACtC,IAAI,IAAI,KAAK,CAAC,IAAI,IAAI,KAAK,EAAE,IAAI,CAAC,IAAI,IAAI,EAAE,IAAI,CAAC,IAAI,GAAG,GAAG,IAAI,IAAI,GAAG,GAAG,CAAC,CAAC,EAAE,CAAC;YAC7E,KAAK,EAAE,CAAC;YACR,SAAS;QACV,CAAC;QACD,KAAK,CAAC,IAAI,CAAC,MAAM,CAA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IAAI,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,IAAI,GAAG;oBAAE,KAAK,EAAE,CAAC;YAChF,CAAC;iBAAM,IAAI,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC;gBACzD,oFAAoF;gBACpF,OAAO,KAAK,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC;oBAC9B,MAAM,IAAI,GAAG,MAAM,CAAC,UAAU,CAAC,KAAK,EAAE,CAAC,CAAC;oBACxC,IAAI,IAAI,KAAK,GAAG,IAAI,CAAC,QAAQ,KAAK,GAAG,IAAI,IAAI,KAAK,CAAC,CAAC;wBAAE,MAAM;oBAC5D,IAAI,IAAI,KAAK,EAAE,IAAI,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,KAAK,EAAE,EAAE,CAAC;wBACpD,KAAK,EAAE,CAAC;wBACR,MAAM;oBACP,CAAC;gBACF,CAAC;YACF,CAAC;QACF,CAAC;QACD,UAAU,GAAG,KAAK,CAAC;IACpB,CAAC;IACD,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC;IACrC,OAAO,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAAA,CACtB","sourcesContent":["/**\n * Remove terminal instructions from untrusted display source before applying styles.\n * Stored messages and explicit clipboard payloads must retain their original source.\n * This is not for rendered output, which can contain trusted links and image protocols.\n */\nexport function sanitizeTerminalText(source: string): string {\n\tif (!/[\\x00-\\x08\\x0b-\\x1f\\x7f-\\x9f]/.test(source)) return source;\n\n\tconst parts: string[] = [];\n\tlet index = 0;\n\tlet plainStart = 0;\n\twhile (index < source.length) {\n\t\tconst code = source.charCodeAt(index);\n\t\tif (code === 9 || code === 10 || (code >= 32 && (code < 127 || code > 159))) {\n\t\t\tindex++;\n\t\t\tcontinue;\n\t\t}\n\t\tparts.push(source.slice(plainStart, index));\n\t\tindex++;\n\t\tif (code === 13) {\n\t\t\t// CR is a terminal cursor instruction. Preserve logical source line endings.\n\t\t\tif (source.charCodeAt(index) === 10) index++;\n\t\t\tparts.push(\"\\n\");\n\t\t} else {\n\t\t\tlet sequence = code;\n\t\t\tif (code === 27 && index < source.length) {\n\t\t\t\tconst next = source.charCodeAt(index);\n\t\t\t\tif (next >= 64 && next <= 95) {\n\t\t\t\t\tsequence = next + 64; // ESC form of a C1 control.\n\t\t\t\t\tindex++;\n\t\t\t\t} else {\n\t\t\t\t\t// ESC intermediates and final byte, including charset selection and RIS.\n\t\t\t\t\twhile (source.charCodeAt(index) >= 32 && source.charCodeAt(index) <= 47) index++;\n\t\t\t\t\tif (source.charCodeAt(index) >= 48 && source.charCodeAt(index) <= 126) index++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (sequence === 155) {\n\t\t\t\t// CSI parameters, intermediates and final byte. Incomplete prefixes stay inert.\n\t\t\t\twhile (source.charCodeAt(index) >= 32 && source.charCodeAt(index) <= 63) index++;\n\t\t\t\tif (source.charCodeAt(index) >= 64 && source.charCodeAt(index) <= 126) index++;\n\t\t\t} else if ([144, 152, 157, 158, 159].includes(sequence)) {\n\t\t\t\t// DCS, SOS, OSC, PM and APC are opaque strings, including split streaming prefixes.\n\t\t\t\twhile (index < source.length) {\n\t\t\t\t\tconst next = source.charCodeAt(index++);\n\t\t\t\t\tif (next === 156 || (sequence === 157 && next === 7)) break;\n\t\t\t\t\tif (next === 27 && source.charCodeAt(index) === 92) {\n\t\t\t\t\t\tindex++;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tplainStart = index;\n\t}\n\tparts.push(source.slice(plainStart));\n\treturn parts.join(\"\");\n}\n"]}
|
package/docs/browser.md
CHANGED
|
@@ -14,7 +14,7 @@ Use **Browser** in `/settings` to turn it off or on. Turning it off immediately
|
|
|
14
14
|
lunr browser install
|
|
15
15
|
```
|
|
16
16
|
|
|
17
|
-
`lunr setup` also installs matching Chromium automatically, including for Node-based standalone layouts. `PLAYWRIGHT_BROWSERS_PATH` selects an alternate cache and must be consistent between installation and execution. Linux may require Chromium system libraries; install those through your OS administrator. lunR does not install OS packages or disable Chromium's sandbox.
|
|
17
|
+
`lunr setup` also installs matching Chromium automatically, including for Node-based standalone layouts. `PLAYWRIGHT_BROWSERS_PATH` selects an alternate cache and must be consistent between installation and execution. Linux may require Chromium system libraries; install those through your OS administrator. lunR does not install OS packages or disable Chromium's sandbox. Compiled Bun executables cannot run the Chromium installer. Install the same lunR version through npm and run `lunr browser install` through that installation, with the same `PLAYWRIGHT_BROWSERS_PATH` or OS cache as the compiled executable. Setup in a compiled executable can continue after an installer warning; it does not establish that Chromium is installed.
|
|
18
18
|
|
|
19
19
|
## Actions
|
|
20
20
|
|
|
@@ -0,0 +1,362 @@
|
|
|
1
|
+
# Image-only computer use
|
|
2
|
+
|
|
3
|
+
The image-only implementation shipped on `lunr-dev` as `0.2.21-dev.12.1`
|
|
4
|
+
and received user testing. Automated validation passed on the dev integration.
|
|
5
|
+
The stable implementation builds on that work without dev-channel naming or update
|
|
6
|
+
changes, and repairs failure reporting and unchanged-image detection. Smooth cursor animation is not implemented. CuaDriver 0.28.1 has production approval for lunR 0.2.26; broader hardware acceptance remains unverified.
|
|
7
|
+
|
|
8
|
+
## Setup and permissions
|
|
9
|
+
|
|
10
|
+
Run `/computer setup` in the local lunR terminal. Setup verifies and installs the
|
|
11
|
+
bundled runtime without downloading code, capturing the screen, or operating an
|
|
12
|
+
application. It is unavailable in headless and gateway sessions.
|
|
13
|
+
|
|
14
|
+
Windows needs an active, unlocked desktop. On Apple Silicon macOS, setup prints
|
|
15
|
+
the exact installed `CuaDriver.app` path. Add that app to Accessibility and
|
|
16
|
+
Screen & System Audio Recording in System Settings > Privacy & Security, then
|
|
17
|
+
restart lunR. Older macOS versions call the second grant Screen Recording.
|
|
18
|
+
Only the user can grant these permissions. Setup leaves an existing
|
|
19
|
+
`/Applications/CuaDriver.app` alone.
|
|
20
|
+
|
|
21
|
+
Computer use and Allow foreground control default to on. Windows x64/arm64 and
|
|
22
|
+
Apple Silicon expose `computer_load`; detailed tools load on demand. Linux and
|
|
23
|
+
Intel macOS have no native discovery tool. All computer tools except release
|
|
24
|
+
require an image-capable model. There is no text-only accessibility fallback.
|
|
25
|
+
Gateway sessions operate the gateway host, not the chat client's device.
|
|
26
|
+
|
|
27
|
+
`computer_end` releases without approval. Read-only allows relevant observation
|
|
28
|
+
and release, but blocks mutation. Yolo and Auto permit input. Auto allows
|
|
29
|
+
requested, implied, or necessary GUI work without lunR per-call prompts. In
|
|
30
|
+
Yolo, ask before introducing GUI work into an otherwise non-GUI task. These
|
|
31
|
+
intent rules are agent guidance, not a natural-language authorization classifier.
|
|
32
|
+
|
|
33
|
+
Prefer background window input. Foreground window input requires a verified
|
|
34
|
+
background failure and a fresh image. Desktop input requires `desktop=true` and
|
|
35
|
+
`foreground=true`. Disabling foreground control blocks desktop input, foreground
|
|
36
|
+
window input, launch, and window management. An application can still change its
|
|
37
|
+
own focus after background input.
|
|
38
|
+
|
|
39
|
+
Native tools are excluded from children and refuse child execution. Children
|
|
40
|
+
with shell access are not OS-sandboxed. No raw driver administration, update,
|
|
41
|
+
recording, or permission tool is exposed.
|
|
42
|
+
|
|
43
|
+
## Recovery contract
|
|
44
|
+
|
|
45
|
+
A failed tool result keeps its text, any recovery image, and structured outcome details together. The error flag does not mean the input had no effect. Results distinguish validation/preflight without dispatch from uncertain native delivery, and include the workflow state (`ready`, `stopped`, or `cleanup_unconfirmed`). A healthy workflow remains loaded after recoverable mistakes such as an expired or mismatched token or invalid coordinates. Use `computer_observe` directly for a new image and token; `computer_load` is not a runtime restart. Never replay an uncertain click or launch merely because the call reported an error. If the native response is settled and the target remains safe to capture, one recovery image may accompany the failure. When capture fails, do not infer the action failed or substitute another target automatically. An unavailable window calls for explicit app/window discovery or a desktop observation. Broken transport, cancellation, loss of ownership, and unconfirmed cleanup stop the workflow.
|
|
46
|
+
|
|
47
|
+
Launch takes `{name}` only, without an observation token. It may activate an existing app, start a new one, or return without a usable window. If launch status or window discovery is uncertain, try `computer_apps` with the app name or a valid positive returned PID before deciding whether to launch again. Observe an exact discovered PID and window ID before input. Launch has a separate longer native timeout budget inside the 90-second workflow limit; a timeout does not prove that the app did not start.
|
|
48
|
+
|
|
49
|
+
## Observe, act, inspect
|
|
50
|
+
|
|
51
|
+
1. Use `computer_apps` for app identities or windows for a PID. For a known app
|
|
52
|
+
or title, pass `query` to avoid paging through unrelated identities. It matches
|
|
53
|
+
a case-insensitive literal substring in `name`, `app_name`, or `title` before
|
|
54
|
+
pagination and display truncation in the requested collection: ordinary app
|
|
55
|
+
queries match apps, while a PID query matches that PID's windows. It does
|
|
56
|
+
not search every app's windows by title. `total` counts matching rows.
|
|
57
|
+
Omit `query` to browse all rows. With `include_windows:true`, a named app
|
|
58
|
+
query without `pid` also looks up windows for up to five matching running
|
|
59
|
+
PIDs, with at most 50 window rows. More than five matching PIDs asks for a
|
|
60
|
+
narrower query or an explicit PID, rather than choosing one arbitrarily.
|
|
61
|
+
Per-PID lookup failures and truncation are reported; an ordinary query
|
|
62
|
+
stays app-only and cheap. Results allowlist at most 50 rows and truncate titles to
|
|
63
|
+
240 characters. Pass `next_offset` as `offset` with the same PID and query to
|
|
64
|
+
retrieve more matches. Lists refresh per call, so changing native order can
|
|
65
|
+
shift page boundaries. PID zero
|
|
66
|
+
identifies an installed app that is not running. Window `bounds` are native
|
|
67
|
+
geometry, not screenshot coordinates.
|
|
68
|
+
2. Use `computer_observe` with an exact `pid` and `window_id`, or `desktop=true`.
|
|
69
|
+
The result contains one image and a short coordinate/token record.
|
|
70
|
+
3. Choose one action from that image. Pass its `observation` token and coordinates
|
|
71
|
+
in the returned image. The workflow applies the mapping; do not scale twice.
|
|
72
|
+
4. Inspect the post-action image before continuing. The tool executes one action
|
|
73
|
+
and captures the same target once, including when a settled native refusal
|
|
74
|
+
permits safe recovery capture. It never polls or retries input internally.
|
|
75
|
+
5. Call `computer_end` when finished.
|
|
76
|
+
|
|
77
|
+
The token lasts 30 seconds, belongs to one exact target, and permits one action.
|
|
78
|
+
Copy it exactly, without abbreviating or reconstructing it. A failed action
|
|
79
|
+
consumes the active token. Capture again before any next action, including window
|
|
80
|
+
focus. Read-only app discovery preserves an existing token but does not renew
|
|
81
|
+
its original 30-second expiry. `background_unavailable` makes foreground input the next candidate after
|
|
82
|
+
a fresh capture, if permitted. Do not substitute another background shortcut.
|
|
83
|
+
Token rejection does not prove foreground typing failed.
|
|
84
|
+
|
|
85
|
+
Every new observation invalidates the previous token before capture. Failed,
|
|
86
|
+
cancelled, or malformed captures issue no token. Old tokens cannot be replayed,
|
|
87
|
+
including after a successful action returns a new image.
|
|
88
|
+
|
|
89
|
+
Supported input is single, double, and right click with modifiers, a complete
|
|
90
|
+
press-drag-release gesture, scrolling at image coordinates, Unicode text, and
|
|
91
|
+
keys or modifier shortcuts. Window text/keys can use image coordinates or the
|
|
92
|
+
observed focused field. Desktop text/keys use the observed focused field only;
|
|
93
|
+
change focus with a separate grounded click.
|
|
94
|
+
|
|
95
|
+
`computer_window` supports `frame` in native window-bounds units and `focus` on
|
|
96
|
+
an exact observed window. Minimize/restore uses a grounded image click on a
|
|
97
|
+
visible control. The pinned driver has no portable minimize/restore RPC.
|
|
98
|
+
`computer_launch` returns bounded app metadata, not an inferred input target;
|
|
99
|
+
capture an exact window before acting.
|
|
100
|
+
|
|
101
|
+
A successful transport or a changed image does not prove the intended application
|
|
102
|
+
effect. Results preserve partial/unverifiable outcomes and bounded refusal codes.
|
|
103
|
+
Pre-dispatch failures report `input:"not_dispatched"` and state that this call
|
|
104
|
+
sent no input. They do not establish whether earlier calls had an effect. Token
|
|
105
|
+
codes distinguish a missing active observation, a mismatched token, a wrong
|
|
106
|
+
target, and expiry only while that state is available. A closed workflow cannot
|
|
107
|
+
identify whether an old token was consumed or unknown. Recoverable token
|
|
108
|
+
rejections keep a healthy workflow open and report `input:"not_dispatched"`;
|
|
109
|
+
they require a fresh image rather than a new load. Once dispatch begins,
|
|
110
|
+
transport failure reports `input:"uncertain"` and possible effects. Neither path
|
|
111
|
+
retries input. Unparseable driver text is omitted rather than forwarded as a
|
|
112
|
+
message; structured refusal fields remain bounded and allowlisted.
|
|
113
|
+
When input returns but its post-image fails, the tool reports possible effects
|
|
114
|
+
and either allows an explicit fresh observation when safe or stops if runtime
|
|
115
|
+
safety cannot be confirmed. Capture again before deciding; never repeat input blindly.
|
|
116
|
+
After an unchanged post-image, the same action against identical captured pixels
|
|
117
|
+
is refused. Pixel identity hashes decoded full-image RGBA values and dimensions,
|
|
118
|
+
not PNG encoding bytes, before cropping or resizing. Full captures reuse the
|
|
119
|
+
image processor's decode, and crops reuse the existing full-image decode. Click signatures normalize omitted left-button/single-click/empty
|
|
120
|
+
modifier defaults and modifier order. Three consecutive unchanged full observations
|
|
121
|
+
stop polling in that workflow. Crops are explicit requests, not an automatic retry loop.
|
|
122
|
+
|
|
123
|
+
Partial typing retains validated `requested_chars`, `delivered_chars`, `retryable`,
|
|
124
|
+
and `retry_from_character` when supplied by the driver. Counts must be safe integers
|
|
125
|
+
within the submitted text's Unicode code-point length, capped at 20000; the retry
|
|
126
|
+
index must equal the delivered count. The index is zero-based in Unicode code
|
|
127
|
+
points, not UTF-16 units. Verify the field in a fresh image before considering a
|
|
128
|
+
remaining suffix. `retryable` is driver advice, not permission or proof that
|
|
129
|
+
repeating input is safe. The workflow never retries typing automatically.
|
|
130
|
+
|
|
131
|
+
On supported Windows x64/arm64 hosts, `computer_hover` takes exactly
|
|
132
|
+
`{desktop:true,foreground:true,observation,x,y}` from a fresh primary-desktop
|
|
133
|
+
image. It moves the real pointer without pressing a button, waits about 700 ms
|
|
134
|
+
with cancellation support, then returns one full-desktop post-image. A tooltip
|
|
135
|
+
outside a selected crop may appear in that full image. Only the visible topmost
|
|
136
|
+
application receives the hover, which can itself trigger application behavior;
|
|
137
|
+
this is not background window hover or an all-monitor capture. Foreground
|
|
138
|
+
control must be allowed and read-only mode blocks hover. The pinned Windows
|
|
139
|
+
window-scoped movement is a synthetic overlay, so lunR does not offer window
|
|
140
|
+
hover. macOS and unsupported platforms do not register this tool. Desktop
|
|
141
|
+
origin/DPI mapping and tooltip behavior still need an authorized live test.
|
|
142
|
+
|
|
143
|
+
## Image contract and cost limits
|
|
144
|
+
|
|
145
|
+
Window capture requests `include_accessibility_tree:false` and
|
|
146
|
+
`include_screenshot:true`. Neither native accessibility trees nor duplicate raw
|
|
147
|
+
JSON reach the model. The macOS driver still reads minimal native accessibility
|
|
148
|
+
facts for window identity and background-input safety. Windows window discovery
|
|
149
|
+
can use UIA as a fallback. Image-only describes application observation sent to
|
|
150
|
+
the model, not the removal of every native accessibility API call.
|
|
151
|
+
|
|
152
|
+
Window capture requests a 2560-pixel maximum. The runtime can impose a lower
|
|
153
|
+
configured ceiling, so this is not a promised capture resolution. The workflow
|
|
154
|
+
checks actual PNG dimensions against native screenshot metadata and rejects
|
|
155
|
+
invalid frames. Primary-desktop capture is tree-free and uses the native PNG.
|
|
156
|
+
Desktop coordinates map back to that PNG once; macOS `scale_factor` is not an
|
|
157
|
+
additional multiplier.
|
|
158
|
+
|
|
159
|
+
Returned images have a maximum 1280-pixel edge, one million pixels, and 1.5 MiB
|
|
160
|
+
of base64 payload. The existing image processor bounds dimensions and encoding
|
|
161
|
+
size. The workflow refuses images it cannot decode or map. Source PNGs also have
|
|
162
|
+
allocation limits. These are engineering bounds, not measured token savings.
|
|
163
|
+
|
|
164
|
+
For small text or controls, request `crop:{x,y,width,height}` with the latest
|
|
165
|
+
observation token. The rectangle uses that returned image's pixels. The workflow
|
|
166
|
+
captures fresh pixels, maps the rectangle into the full capture, and sends only
|
|
167
|
+
the crop. Its record gives the source dimensions, crop offset, and separate x/y
|
|
168
|
+
ratios. Changed source dimensions or reported window bounds reject the crop;
|
|
169
|
+
request a full image again. Cropping cannot recover detail absent from the native
|
|
170
|
+
capture. Post-action captures return the full target so dialogs outside a crop
|
|
171
|
+
remain visible.
|
|
172
|
+
|
|
173
|
+
Saved sessions retain the returned screenshots. Provider-facing screenshot
|
|
174
|
+
history also accumulates until normal compaction. This change does not prune
|
|
175
|
+
user images, rewrite saved sessions, or implement a generic rolling history
|
|
176
|
+
filter. A targeted `context` hook could remove old computer screenshots while
|
|
177
|
+
leaving sessions intact, but a rolling cutoff changes an earlier prompt prefix
|
|
178
|
+
and can invalidate cached input. That tradeoff needs approved provider measurements
|
|
179
|
+
before adopting a retention policy. Image-only is not automatically cheaper than
|
|
180
|
+
text. Current cost controls bound each new payload, remove tree/JSON duplication,
|
|
181
|
+
and combine one action with its post-image.
|
|
182
|
+
|
|
183
|
+
## Cursor status
|
|
184
|
+
|
|
185
|
+
Cursor animation remains a separate native-runtime decision. The inherited
|
|
186
|
+
runtime launch still uses `--no-overlay`. Upstream Windows drag animation uses a
|
|
187
|
+
timer separate from actual input, and desktop pointer movement can teleport.
|
|
188
|
+
This branch does not claim smooth actual-cursor motion or synchronized drag
|
|
189
|
+
feedback. Any eventual animation must stay local, preserve full gestures and
|
|
190
|
+
cancellation, and send zero intermediate frames to the model.
|
|
191
|
+
|
|
192
|
+
## Ownership and cancellation
|
|
193
|
+
|
|
194
|
+
An OS-account lease spans observations and actions, independent of settings
|
|
195
|
+
profiles. Competing workflows receive busy rather than queueing. Calls within a
|
|
196
|
+
workflow serialize. One cross-process lock covers creation, atomic replacement,
|
|
197
|
+
and deletion of the owner record. A separate lock protects runtime installation.
|
|
198
|
+
A live owner is not displaced because its heartbeat is late.
|
|
199
|
+
|
|
200
|
+
After MCP initialization and before any driver tool dispatch, the adapter records
|
|
201
|
+
the transport PID and, on macOS, daemon PID. Missing identities or failed lease
|
|
202
|
+
updates refuse dispatch. Recovery requires both owner and recorded runtimes to
|
|
203
|
+
have exited. PID reuse and malformed owner records fail closed. A crash during
|
|
204
|
+
initialization can leave an unrecorded idle runtime that received no input.
|
|
205
|
+
|
|
206
|
+
Release, cancellation, agent end, settings changes, and session shutdown close
|
|
207
|
+
the owned runtime before releasing the lease. Queued work cannot survive
|
|
208
|
+
cancellation. Unconfirmed shutdown retains ownership. Cancellation cannot retract
|
|
209
|
+
already delivered input, and forced termination does not prove held input was
|
|
210
|
+
released. Driver-internal helper lifetime and held-input cancellation still need
|
|
211
|
+
native acceptance.
|
|
212
|
+
|
|
213
|
+
Gateway cron creates fresh permission contexts with the configured default mode,
|
|
214
|
+
without gateway approvals or its approval handler. Read-only blocks input, and
|
|
215
|
+
missing approval blocks operations that still require confirmation.
|
|
216
|
+
Session shutdown precedes disposal, even after partial extension binding failure.
|
|
217
|
+
TUI cron continues to use its live permission context.
|
|
218
|
+
|
|
219
|
+
## Runtime and distribution
|
|
220
|
+
|
|
221
|
+
The development pin is [CuaDriver 0.28.1](https://github.com/trycua/cua/releases/tag/cua-driver-rs-v0.28.1),
|
|
222
|
+
source `d8028a7943087ee258dc1b4d19dc12a7cd27669c`. Archive identities and approval
|
|
223
|
+
are in `scripts/computer-use-release.json`; `release.generated.ts` derives from
|
|
224
|
+
it. The upstream MIT license is under `native/computer-use`. No runtime pin or
|
|
225
|
+
native binary changed in the image-only workflow work.
|
|
226
|
+
|
|
227
|
+
The runtime resolves the host's optional payload package or matching archive
|
|
228
|
+
beside a standalone executable. It verifies the archive, extracts a fresh
|
|
229
|
+
reference tree, and checks cached files/helpers against it. Redirected paths and
|
|
230
|
+
escaping symlinks are refused. Installers do not overwrite an existing runtime.
|
|
231
|
+
After confirming all owned processes stopped, an inactive cache can be removed
|
|
232
|
+
for reinstallation. Runtime code is never downloaded at first use.
|
|
233
|
+
|
|
234
|
+
Windows uses system `tar.exe` and an isolated `mcp --direct --embedded
|
|
235
|
+
--no-overlay` process. A hidden system PowerShell metadata probe refuses session
|
|
236
|
+
zero, disconnected sessions, and inaccessible/non-Default input desktops. It
|
|
237
|
+
never switches desktops. Both platforms isolate profiles, strip inherited
|
|
238
|
+
`CUA_*`, set standard permission mode, and disable telemetry/update checks.
|
|
239
|
+
|
|
240
|
+
macOS preserves the unchanged signed app at its stable lunR-owned path, verifies
|
|
241
|
+
its signature with `codesign --verify --deep --strict`, and launches that exact
|
|
242
|
+
path through `open -n -g -W -a`. A private HOME, socket, stdin FIFO, and
|
|
243
|
+
`--parent-liveness-stdio` isolate daemon state and lifetime. Shutdown uses the
|
|
244
|
+
private PID-bound endpoint and waits for the app to exit. No re-signing occurs.
|
|
245
|
+
|
|
246
|
+
Release staging creates exact-version host-specific optional payload packages.
|
|
247
|
+
They contain unchanged archives and no install scripts. Workspace manifests keep
|
|
248
|
+
unpublished payload dependencies out. Standalone asset copying selects one
|
|
249
|
+
opaque archive. The v0.2.26 release records production approval for the pinned
|
|
250
|
+
runtime; the publish workflow checks that approval before building. Dev-channel
|
|
251
|
+
update/publication changes were not ported here.
|
|
252
|
+
|
|
253
|
+
## Verification and remaining acceptance
|
|
254
|
+
|
|
255
|
+
The recovery reporting, bounded window enrichment, and Windows desktop-hover
|
|
256
|
+
contract have offline fake-driver coverage only. The original taskbar-click
|
|
257
|
+
failure phase is still unproven. No new real-desktop, native-runtime, macOS,
|
|
258
|
+
provider-driven, or release qualification is claimed by this change.
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
After integrating v0.2.24 master, all five offline package builds and the Node
|
|
262
|
+
bundle pass. With the PR #118 baseline repairs integrated, validation passes
|
|
263
|
+
391 focused tests across 31 files and eight archive/package tests. Installation and archive staging tests now create inert
|
|
264
|
+
fixtures, so source tests need no native release payload. The Windows installation
|
|
265
|
+
test exercises real extraction, locking, cache reuse, and helper-tamper rejection
|
|
266
|
+
without executing either fixture file. Fake-driver tests cover exact-token
|
|
267
|
+
rejection with zero action dispatch, background refusal followed by fresh-capture
|
|
268
|
+
foreground input, and uncertain or partial post-dispatch outcomes. Real PNG
|
|
269
|
+
fixtures reproduce encoding-independent pixel identity and preserve crop mapping.
|
|
270
|
+
First-paint and first-request checks pass for both browser settings; removing only
|
|
271
|
+
`computer_load` reproduces master's unchanged tool hashes.
|
|
272
|
+
|
|
273
|
+
All three pinned upstream archives match their committed byte counts and SHA-256
|
|
274
|
+
hashes. Seven public-name tarballs staged with those unchanged real payloads pass
|
|
275
|
+
relocated installation, first requests, all supported OS/CPU selections, omitted
|
|
276
|
+
optional-payload recovery, and standalone installer `npm ci --ignore-scripts`.
|
|
277
|
+
Staging validates rewritten JavaScript and declaration imports and exact payload
|
|
278
|
+
versions in both locks. These checks ran on Windows x64 without launching the
|
|
279
|
+
native driver; OS/CPU selection tests do not establish operation on other hardware.
|
|
280
|
+
Archive integrity and packaging are verified, but native signing, permission and
|
|
281
|
+
input acceptance remain separate. The owner approved production publication of
|
|
282
|
+
CuaDriver 0.28.1 with lunR 0.2.26; this does not establish operation on other hardware.
|
|
283
|
+
|
|
284
|
+
The PR also incorporates the separately tracked baseline repairs from PR #118.
|
|
285
|
+
That work fixes AI catalog subpath resolution in extension loading and updates
|
|
286
|
+
fixtures for current gateway, shutdown, provider and subscription contracts.
|
|
287
|
+
Its 152 focused tests across ten files pass. The complete Ubuntu log before
|
|
288
|
+
those repairs records 101 coding-agent failures across 27 suites and 11 AI
|
|
289
|
+
failures, more than the subset exposed by check annotations. Agent passes
|
|
290
|
+
181/181 in that run. Clean full-suite CI still requires broader baseline work;
|
|
291
|
+
local Windows-only diagnostics are not evidence of Ubuntu failures.
|
|
292
|
+
The automated checks did not operate a desktop or launch CuaDriver.
|
|
293
|
+
|
|
294
|
+
A separately authorized Windows x64 smoke test used this branch's compiled
|
|
295
|
+
computer tools with the real pinned runtime. It launched a new blank Notepad
|
|
296
|
+
window, captured that exact window, and typed a fixed 39-character phrase using
|
|
297
|
+
background delivery. The post-action screenshot showed the complete expected
|
|
298
|
+
text and character count. The driver's outcome remained `unverifiable`; the
|
|
299
|
+
image established the application effect. `computer_end` confirmed shutdown and
|
|
300
|
+
released the desktop lease. No document was saved or installed CLI changed.
|
|
301
|
+
This verifies basic launch, window capture and background text input only.
|
|
302
|
+
A later Windows x64 test on an owned scratch Notepad window found that background
|
|
303
|
+
Ctrl+A failed with `tool_invocation_failed`; a fresh image showed no selection.
|
|
304
|
+
A fresh-token `foreground=true` retry initially returned the same XAML/UIA error.
|
|
305
|
+
Pinned upstream source at `d8028a7943087ee258dc1b4d19dc12a7cd27669c`
|
|
306
|
+
routes `hotkey` for a XAML window through UIA before checking `delivery_mode`.
|
|
307
|
+
This native refusal was not a `background_unavailable` code. The unchanged
|
|
308
|
+
screenshot established that the background shortcut had not selected the text.
|
|
309
|
+
|
|
310
|
+
The Windows workflow now sends foreground modifier shortcuts without x/y through
|
|
311
|
+
that pin's `press_key` with `modifiers`, whose foreground branch uses verified
|
|
312
|
+
window focus and SendInput. Background shortcuts, keys with image coordinates,
|
|
313
|
+
and non-Windows dispatch remain unchanged. On a subsequent parent-run test,
|
|
314
|
+
foreground Ctrl+A selected all 39 characters in the same owned Notepad scratch;
|
|
315
|
+
its post-action image showed the selection. Foreground Ctrl+N then opened a
|
|
316
|
+
blank unsaved tab in that window, leaving the earlier scratch tab intact.
|
|
317
|
+
|
|
318
|
+
The parent next cancelled a 2048-character `computer_text` call 86 ms after the
|
|
319
|
+
real SDK call began, while it was still pending. The result reported
|
|
320
|
+
`input_dispatch_failed`, `input:uncertain` and `cleanup:confirmed`. The native
|
|
321
|
+
runtime exited and its desktop lease was absent before a fresh workflow captured
|
|
322
|
+
the same owned window. That image showed exactly six characters in the new tab.
|
|
323
|
+
This verifies partial text input followed by in-flight cancellation, cleanup and
|
|
324
|
+
reacquisition, not a pre-dispatch cancellation or complete text delivery.
|
|
325
|
+
`computer_end` shut down the new runtime and released its lease. Both tabs
|
|
326
|
+
remained unsaved; other user documents were untouched. No global CLI changed.
|
|
327
|
+
The complete-gesture tool API did not exercise held modifier or mouse-button
|
|
328
|
+
release under abort, which remains unverified.
|
|
329
|
+
|
|
330
|
+
The dev integration passed all five offline package builds, the Node bundle,
|
|
331
|
+
265 focused tests across 23 suites, and eight archive/package tests. A real
|
|
332
|
+
Photon fixture checks cropped pixels and coordinate mapping. First-paint and
|
|
333
|
+
first-request checks passed with the regenerated supported-host fingerprint;
|
|
334
|
+
removing only `computer_load` reproduced the unchanged unsupported-host baseline.
|
|
335
|
+
Seven local dev tarballs passed relocated installation, OS/CPU payload selection,
|
|
336
|
+
omitted-optional handling, and installer-lock checks. The dev publication workflow
|
|
337
|
+
also passed. These historical results describe the dev integration. The current branch's
|
|
338
|
+
stable packaging checks are recorded above.
|
|
339
|
+
|
|
340
|
+
The user reported testing the published dev build; specific applications and
|
|
341
|
+
scenarios were not supplied. This does not establish full platform acceptance.
|
|
342
|
+
Native gates remain Windows locked/UAC/integrity states, other Electron/native
|
|
343
|
+
apps, display scaling and moved/resized windows, Unicode, held modifier/button
|
|
344
|
+
release under abort, and macOS TCC/LaunchServices/FIFO/shutdown on hardware.
|
|
345
|
+
Provider-driven computer tool choice has not been live-qualified. Cursor/runtime
|
|
346
|
+
changes need a separate scoped decision before implementation. Provider token
|
|
347
|
+
savings remain unmeasured. An offline fake-driver discovery comparison finds a
|
|
348
|
+
named app at row 118 of 139 synthetic apps in one query instead of three
|
|
349
|
+
unfiltered pages. It
|
|
350
|
+
returns one identity instead of 139 and 147 result-text characters instead of
|
|
351
|
+
8699. The loaded computer-tool definitions grow by 230 serialized characters;
|
|
352
|
+
the first-request definitions are unchanged because detailed tools load on demand.
|
|
353
|
+
These are call and text-payload measurements, not model tokens or billing. The
|
|
354
|
+
comparison uses no desktop, provider, screenshot resizing, or history pruning.
|
|
355
|
+
|
|
356
|
+
## Privacy
|
|
357
|
+
|
|
358
|
+
Images, window titles, and typed text can enter selected-provider requests and
|
|
359
|
+
saved sessions. Disabling driver telemetry does not disable lunR session storage.
|
|
360
|
+
GUI changes are outside filesystem rollback. Application content is untrusted
|
|
361
|
+
task data, never authorization. OS permissions, locked desktops, UAC, and
|
|
362
|
+
integrity restrictions still apply.
|
package/docs/custom-provider.md
CHANGED
|
@@ -211,7 +211,7 @@ models: [{
|
|
|
211
211
|
id: "custom-model",
|
|
212
212
|
// ...
|
|
213
213
|
reasoning: true,
|
|
214
|
-
thinkingLevelMap: { // map
|
|
214
|
+
thinkingLevelMap: { // map lunR levels to provider values; null hides unsupported levels
|
|
215
215
|
minimal: null,
|
|
216
216
|
low: null,
|
|
217
217
|
medium: null,
|
|
@@ -571,7 +571,7 @@ export default function (pi: ExtensionAPI) {
|
|
|
571
571
|
}
|
|
572
572
|
```
|
|
573
573
|
|
|
574
|
-
`message_end` runs before lunR tracks the assistant message for auto-compaction, so the rewritten `errorMessage` is what
|
|
574
|
+
`message_end` runs before lunR tracks the assistant message for auto-compaction, so the rewritten `errorMessage` is what lunR checks. With this in place, lunR will:
|
|
575
575
|
|
|
576
576
|
1. Detect the overflow from `errorMessage`.
|
|
577
577
|
2. Drop the failed assistant message from live context.
|
|
@@ -679,7 +679,7 @@ interface ProviderModelConfig {
|
|
|
679
679
|
/** Whether the model supports extended thinking. */
|
|
680
680
|
reasoning: boolean;
|
|
681
681
|
|
|
682
|
-
/** Maps
|
|
682
|
+
/** Maps lunR thinking levels to provider/model-specific values; null marks a level unsupported. */
|
|
683
683
|
thinkingLevelMap?: Partial<Record<"off" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max", string | null>>;
|
|
684
684
|
|
|
685
685
|
/** Supported input types. */
|
package/docs/extensions.md
CHANGED
|
@@ -663,7 +663,7 @@ pi.on("before_provider_headers", (event, ctx) => {
|
|
|
663
663
|
// Add or override — e.g. a session id for gateway tracing/attribution
|
|
664
664
|
event.headers["x-session-id"] = ctx.sessionManager.getSessionId();
|
|
665
665
|
|
|
666
|
-
// Drop a tracking header
|
|
666
|
+
// Drop a tracking header lunR adds for this call
|
|
667
667
|
event.headers["X-OpenRouter-Title"] = null;
|
|
668
668
|
});
|
|
669
669
|
```
|
|
@@ -1010,6 +1010,10 @@ pi.on("tool_result", async (event, ctx) => {
|
|
|
1010
1010
|
|
|
1011
1011
|
Control flow helpers. `ctx.isIdle()` is false while lunR is processing an agent run, automatic retry, auto-compaction retry, or queued continuation.
|
|
1012
1012
|
|
|
1013
|
+
### ctx.promptWithCompletion()
|
|
1014
|
+
|
|
1015
|
+
`await ctx.promptWithCompletion?.(text, { source: "extension", signal })` atomically admits one idle request and returns its completed messages. It rejects busy or closing sessions, excludes later queued user follow-ups, and waits for owned cancellation to settle. This optional capability is intended for unattended callers that need an exact completion. Use a dedicated `AbortSignal` to cancel that request.
|
|
1016
|
+
|
|
1013
1017
|
### ctx.shutdown()
|
|
1014
1018
|
|
|
1015
1019
|
Request a graceful shutdown of pi.
|
|
@@ -1487,7 +1491,7 @@ Labels persist in the session and survive restarts. Use them to mark important p
|
|
|
1487
1491
|
|
|
1488
1492
|
Register a command.
|
|
1489
1493
|
|
|
1490
|
-
If multiple extensions register the same command name,
|
|
1494
|
+
If multiple extensions register the same command name, lunR keeps them all and assigns numeric invocation suffixes in load order, for example `/review:1` and `/review:2`.
|
|
1491
1495
|
|
|
1492
1496
|
```typescript
|
|
1493
1497
|
pi.registerCommand("stats", {
|
|
@@ -1930,7 +1934,7 @@ async execute(toolCallId, params) {
|
|
|
1930
1934
|
|
|
1931
1935
|
**Important:** Use `StringEnum` from `@ashx-j/lunr-ai` for string enums. `Type.Union`/`Type.Literal` doesn't work with Google's API.
|
|
1932
1936
|
|
|
1933
|
-
**Argument preparation:** `prepareArguments(args)` is optional. If defined, it runs before schema validation and before `execute()`. Use it to mimic an older accepted input shape when
|
|
1937
|
+
**Argument preparation:** `prepareArguments(args)` is optional. If defined, it runs before schema validation and before `execute()`. Use it to mimic an older accepted input shape when lunR resumes an older session whose stored tool call arguments no longer match the current schema. Return the object you want validated against `parameters`. Keep the public schema strict. Do not add deprecated compatibility fields to `parameters` just to keep old resumed sessions working.
|
|
1934
1938
|
|
|
1935
1939
|
Example: an older session may contain an `edit` tool call with top-level `oldText` and `newText`, while the current schema only accepts `edits: [{ oldText, newText }]`.
|
|
1936
1940
|
|
|
@@ -2516,7 +2520,7 @@ ctx.ui.setFooter((tui, theme) => ({
|
|
|
2516
2520
|
ctx.ui.setFooter(undefined); // Restore built-in footer
|
|
2517
2521
|
|
|
2518
2522
|
// Terminal title
|
|
2519
|
-
ctx.ui.setTitle("
|
|
2523
|
+
ctx.ui.setTitle("lunR - my-project");
|
|
2520
2524
|
|
|
2521
2525
|
// Editor text
|
|
2522
2526
|
ctx.ui.setEditorText("Prefill text");
|