@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
|
@@ -22,16 +22,26 @@ import {
|
|
|
22
22
|
import {
|
|
23
23
|
typebox_exports
|
|
24
24
|
} from "./chunk-PL6JKXWI.js";
|
|
25
|
+
import {
|
|
26
|
+
withFileMutationQueue
|
|
27
|
+
} from "./chunk-YSB6URMT.js";
|
|
25
28
|
import {
|
|
26
29
|
DEFAULT_MAX_BYTES,
|
|
27
30
|
DEFAULT_MAX_LINES,
|
|
28
31
|
truncateHead
|
|
29
32
|
} from "./chunk-53YJI7JU.js";
|
|
33
|
+
import {
|
|
34
|
+
protectedTargetWriteReason,
|
|
35
|
+
resolveToCwd
|
|
36
|
+
} from "./chunk-F2V2F4ZG.js";
|
|
37
|
+
import "./chunk-BDRGN3L2.js";
|
|
30
38
|
import {
|
|
31
39
|
isEditToolResult,
|
|
32
40
|
isReadToolResult,
|
|
33
41
|
isWriteToolResult
|
|
34
42
|
} from "./chunk-OR4L3IB2.js";
|
|
43
|
+
import "./chunk-64XTQNLA.js";
|
|
44
|
+
import "./chunk-Q4Q6D4IY.js";
|
|
35
45
|
import {
|
|
36
46
|
__toESM
|
|
37
47
|
} from "./chunk-BRJX2PRC.js";
|
|
@@ -41,7 +51,7 @@ var import_vscode_languageserver_protocol3 = __toESM(require_api(), 1);
|
|
|
41
51
|
|
|
42
52
|
// packages/coding-agent/dist/builtin-extensions/pi-lsp-extension/src/runtime.js
|
|
43
53
|
var defaultLoaders = {
|
|
44
|
-
loadLspManager: () => import("./lsp-manager-
|
|
54
|
+
loadLspManager: () => import("./lsp-manager-S554V5HR.js"),
|
|
45
55
|
loadFileSync: () => import("./file-sync-HCOP2QVF.js"),
|
|
46
56
|
loadTreeSitter: () => import("./parser-manager-TQHWYDH7.js"),
|
|
47
57
|
loadWorkspaceIndex: () => import("./workspace-index-6DBXSTJ6.js")
|
|
@@ -1587,6 +1597,7 @@ function hasErrors(node) {
|
|
|
1587
1597
|
}
|
|
1588
1598
|
|
|
1589
1599
|
// packages/coding-agent/dist/builtin-extensions/pi-lsp-extension/src/tree-sitter/search-engine.js
|
|
1600
|
+
import { createHash } from "node:crypto";
|
|
1590
1601
|
import { resolve as resolve2 } from "node:path";
|
|
1591
1602
|
import { readdir as readdir2, readFile as readFile8, stat } from "node:fs/promises";
|
|
1592
1603
|
async function searchFiles(pattern, rootDir, treeSitter, options = {}) {
|
|
@@ -1600,12 +1611,13 @@ async function searchFiles(pattern, rootDir, treeSitter, options = {}) {
|
|
|
1600
1611
|
let content = await readFile8(file, "utf-8"), tree = await treeSitter.parseWithLanguage(file, content, pattern.languageId);
|
|
1601
1612
|
if (!tree)
|
|
1602
1613
|
continue;
|
|
1603
|
-
let fileMatches = findMatches(tree.rootNode, pattern.root);
|
|
1614
|
+
let sourceHash = createHash("sha256").update(content).digest("hex"), fileMatches = findMatches(tree.rootNode, pattern.root);
|
|
1604
1615
|
for (let m of fileMatches) {
|
|
1605
1616
|
if (matches.length >= maxResults)
|
|
1606
1617
|
break;
|
|
1607
1618
|
matches.push({
|
|
1608
1619
|
file,
|
|
1620
|
+
sourceHash,
|
|
1609
1621
|
line: m.node.startPosition.row + 1,
|
|
1610
1622
|
column: m.node.startPosition.column + 1,
|
|
1611
1623
|
matchedText: m.node.text,
|
|
@@ -1800,6 +1812,8 @@ function createCodeSearchTool(rootDirOrGetter, treeSitter) {
|
|
|
1800
1812
|
import { relative as relative8 } from "node:path";
|
|
1801
1813
|
|
|
1802
1814
|
// packages/coding-agent/dist/builtin-extensions/pi-lsp-extension/src/tree-sitter/rewrite-engine.js
|
|
1815
|
+
import { createHash as createHash2 } from "node:crypto";
|
|
1816
|
+
import { dirname } from "node:path";
|
|
1803
1817
|
import { readFile as readFile9, writeFile } from "node:fs/promises";
|
|
1804
1818
|
var METAVAR_REF_RE = /\$\$\$([A-Z_][A-Z0-9_]*)|\$([A-Z_][A-Z0-9_]*)/g;
|
|
1805
1819
|
function substituteCaptures(template, captures) {
|
|
@@ -1824,28 +1838,47 @@ function computeRewrites(matches, replacementTemplate) {
|
|
|
1824
1838
|
};
|
|
1825
1839
|
});
|
|
1826
1840
|
}
|
|
1827
|
-
async function applyRewrites(matches, replacementTemplate) {
|
|
1841
|
+
async function applyRewrites(matches, replacementTemplate, cwd) {
|
|
1828
1842
|
let byFile = /* @__PURE__ */ new Map();
|
|
1829
|
-
for (let
|
|
1830
|
-
let existing = byFile.get(
|
|
1831
|
-
existing ? existing.push(
|
|
1843
|
+
for (let match of matches) {
|
|
1844
|
+
let existing = byFile.get(match.file);
|
|
1845
|
+
existing ? existing.push(match) : byFile.set(match.file, [match]);
|
|
1846
|
+
}
|
|
1847
|
+
let result = { changes: [], filesModified: 0, modifiedFiles: [], failures: [], skippedFiles: [] }, files = [...byFile.keys()];
|
|
1848
|
+
for (let file of files) {
|
|
1849
|
+
let reason = protectedTargetWriteReason(file, cwd ?? dirname(file));
|
|
1850
|
+
reason && result.failures.push({ file, reason });
|
|
1832
1851
|
}
|
|
1833
|
-
|
|
1852
|
+
if (result.failures.length)
|
|
1853
|
+
return result.skippedFiles = files.filter((file) => !result.failures.some((failure) => failure.file === file)), result;
|
|
1834
1854
|
for (let [file, fileMatches] of byFile) {
|
|
1835
|
-
let
|
|
1836
|
-
|
|
1837
|
-
let
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1855
|
+
let writeAttempted = !1;
|
|
1856
|
+
try {
|
|
1857
|
+
let applied = await withFileMutationQueue(file, async () => {
|
|
1858
|
+
let reason = protectedTargetWriteReason(file, cwd ?? dirname(file));
|
|
1859
|
+
if (reason)
|
|
1860
|
+
throw new Error(reason);
|
|
1861
|
+
let source = await readFile9(file, "utf-8"), sourceHash = createHash2("sha256").update(source).digest("hex"), sorted = [...fileMatches].sort((a, b) => b.startIndex - a.startIndex), nextStart = source.length;
|
|
1862
|
+
for (let match of sorted) {
|
|
1863
|
+
if (match.sourceHash !== sourceHash || !Number.isInteger(match.startIndex) || !Number.isInteger(match.endIndex) || match.startIndex < 0 || match.endIndex > nextStart || match.startIndex > match.endIndex || source.slice(match.startIndex, match.endIndex) !== match.matchedText)
|
|
1864
|
+
throw new Error("Source changed or match offsets are invalid. Search again before applying a rewrite.");
|
|
1865
|
+
nextStart = match.startIndex;
|
|
1866
|
+
}
|
|
1867
|
+
let content = source, changes = [];
|
|
1868
|
+
for (let match of sorted) {
|
|
1869
|
+
let raw = substituteCaptures(replacementTemplate, match.captures), replacement = preserveTrailingSemicolon(match.matchedText, raw);
|
|
1870
|
+
content = content.slice(0, match.startIndex) + replacement + content.slice(match.endIndex), changes.push({ file, line: match.line, column: match.column, before: match.matchedText, after: replacement });
|
|
1871
|
+
}
|
|
1872
|
+
let modified = content !== source;
|
|
1873
|
+
return modified && (writeAttempted = !0, await writeFile(file, content, "utf-8")), { changes: changes.reverse(), modified };
|
|
1844
1874
|
});
|
|
1875
|
+
result.changes.push(...applied.changes), applied.modified && result.modifiedFiles.push(file);
|
|
1876
|
+
} catch (error) {
|
|
1877
|
+
result.failures.push({ file, reason: error instanceof Error ? error.message : String(error), writeAttempted }), result.skippedFiles = files.slice(files.indexOf(file) + 1);
|
|
1878
|
+
break;
|
|
1845
1879
|
}
|
|
1846
|
-
modified && (await writeFile(file, content, "utf-8"), filesModified++);
|
|
1847
1880
|
}
|
|
1848
|
-
return
|
|
1881
|
+
return result.filesModified = result.modifiedFiles.length, result;
|
|
1849
1882
|
}
|
|
1850
1883
|
|
|
1851
1884
|
// packages/coding-agent/dist/builtin-extensions/pi-lsp-extension/src/tools/code-rewrite.js
|
|
@@ -1861,7 +1894,7 @@ function createCodeRewriteTool(rootDirOrGetter, treeSitter, fileChangeCallback)
|
|
|
1861
1894
|
return {
|
|
1862
1895
|
name: "code_rewrite",
|
|
1863
1896
|
label: "Code Rewrite",
|
|
1864
|
-
description: "Transform code matching a structural pattern into a replacement. Use $NAME to capture and reuse single nodes, $$$NAME for sequences. Defaults to dry-run mode (preview only). Set dry_run=false to apply changes. For symbol renames, prefer lsp_rename instead (semantically correct).",
|
|
1897
|
+
description: "Transform code matching a structural pattern into a replacement. Use $NAME to capture and reuse single nodes, $$$NAME for sequences. Defaults to dry-run mode (preview only). Set dry_run=false to apply changes. Apply rejects protected targets and stale source snapshots. Files apply sequentially; a later failure leaves earlier changes in place and reports skipped files. Search again after a stale-source failure. Inspect failed writes before retrying. For symbol renames, prefer lsp_rename instead (semantically correct).",
|
|
1865
1898
|
parameters: RewriteParams,
|
|
1866
1899
|
async execute(_toolCallId, params) {
|
|
1867
1900
|
let rootDir = getRootDir(), { pattern: patternStr, replacement, language, path, dry_run } = params, isDryRun = dry_run !== !1, compiled;
|
|
@@ -1869,7 +1902,7 @@ function createCodeRewriteTool(rootDirOrGetter, treeSitter, fileChangeCallback)
|
|
|
1869
1902
|
compiled = await compilePattern(patternStr, language, treeSitter);
|
|
1870
1903
|
} catch (e) {
|
|
1871
1904
|
return {
|
|
1872
|
-
content: [{ type: "text", text: `Error: ${e.message}` }],
|
|
1905
|
+
content: [{ type: "text", text: `Error: ${e instanceof Error ? e.message : String(e)}` }],
|
|
1873
1906
|
details: { matchCount: 0, filesModified: 0, dryRun: isDryRun }
|
|
1874
1907
|
};
|
|
1875
1908
|
}
|
|
@@ -1883,7 +1916,7 @@ function createCodeRewriteTool(rootDirOrGetter, treeSitter, fileChangeCallback)
|
|
|
1883
1916
|
};
|
|
1884
1917
|
}
|
|
1885
1918
|
let matches = await searchFiles(compiled, rootDir, treeSitter, {
|
|
1886
|
-
path,
|
|
1919
|
+
path: path ? resolveToCwd(path, rootDir) : void 0,
|
|
1887
1920
|
maxResults: 500
|
|
1888
1921
|
});
|
|
1889
1922
|
if (matches.length === 0)
|
|
@@ -1919,13 +1952,16 @@ function createCodeRewriteTool(rootDirOrGetter, treeSitter, fileChangeCallback)
|
|
|
1919
1952
|
details: { matchCount: matches.length, filesModified: uniqueFiles.size, dryRun: !0 }
|
|
1920
1953
|
};
|
|
1921
1954
|
}
|
|
1922
|
-
let result = await applyRewrites(matches, replacement);
|
|
1923
|
-
if (fileChangeCallback && result.filesModified > 0)
|
|
1924
|
-
let
|
|
1925
|
-
for (let file of modifiedFiles)
|
|
1955
|
+
let result = await applyRewrites(matches, replacement, rootDir);
|
|
1956
|
+
if (fileChangeCallback && result.filesModified > 0)
|
|
1957
|
+
for (let file of result.modifiedFiles)
|
|
1926
1958
|
fileChangeCallback.onFileModified(file);
|
|
1927
|
-
}
|
|
1928
1959
|
let lines = [];
|
|
1960
|
+
if (result.failures.length) {
|
|
1961
|
+
lines.push(`Rewrite stopped. ${result.filesModified} file(s) changed before failure; earlier changes remain. ${result.skippedFiles.length} file(s) skipped.`), result.failures.some((failure) => failure.writeAttempted) && lines.push("A failed write may have partially changed its target. Inspect that file before retrying.");
|
|
1962
|
+
for (let failure of result.failures)
|
|
1963
|
+
lines.push(`${relative8(rootDir, failure.file)}: ${failure.reason}`);
|
|
1964
|
+
}
|
|
1929
1965
|
lines.push(`Applied ${result.changes.length} change${result.changes.length !== 1 ? "s" : ""} across ${result.filesModified} file${result.filesModified !== 1 ? "s" : ""}:
|
|
1930
1966
|
`);
|
|
1931
1967
|
for (let c of result.changes) {
|
|
@@ -1938,7 +1974,7 @@ function createCodeRewriteTool(rootDirOrGetter, treeSitter, fileChangeCallback)
|
|
|
1938
1974
|
|
|
1939
1975
|
[Truncated: showing ${truncation.outputLines} of ${truncation.totalLines} lines]`), {
|
|
1940
1976
|
content: [{ type: "text", text: output }],
|
|
1941
|
-
details: { matchCount: matches.length, filesModified: result.filesModified, dryRun: !1 }
|
|
1977
|
+
details: { matchCount: matches.length, filesModified: result.filesModified, dryRun: !1, failures: result.failures, skippedFiles: result.skippedFiles }
|
|
1942
1978
|
};
|
|
1943
1979
|
}
|
|
1944
1980
|
};
|
|
@@ -2141,14 +2177,6 @@ function registerToolWithRuntime(pi, tool, ensure, host) {
|
|
|
2141
2177
|
});
|
|
2142
2178
|
}
|
|
2143
2179
|
function lspExtension(pi) {
|
|
2144
|
-
let origListeners = process.listeners("uncaughtException");
|
|
2145
|
-
process.on("uncaughtException", (err) => {
|
|
2146
|
-
if (err?.code !== "EPIPE") {
|
|
2147
|
-
for (let listener of origListeners)
|
|
2148
|
-
listener(err);
|
|
2149
|
-
origListeners.length === 0 && console.error("[LSP] Uncaught exception:", err);
|
|
2150
|
-
}
|
|
2151
|
-
});
|
|
2152
2180
|
let host = new LspRuntimeHost(), pendingProvider = null, latestCtx = null, projectConfig = null, sessionCwd = process.cwd(), withLatestCtx = (fn) => {
|
|
2153
2181
|
let ctx = latestCtx;
|
|
2154
2182
|
if (ctx)
|
|
@@ -2219,7 +2247,7 @@ function lspExtension(pi) {
|
|
|
2219
2247
|
}
|
|
2220
2248
|
}), ensureRuntime = async () => host.ensureServices(buildBindOptions(sessionCwd || process.cwd()));
|
|
2221
2249
|
pi.on("session_start", async (_event, ctx) => {
|
|
2222
|
-
latestCtx = ctx, sessionCwd = ctx.cwd, projectConfig = loadProjectConfig(ctx.cwd), await host.bindSession(buildBindOptions(ctx.cwd));
|
|
2250
|
+
latestCtx = ctx, sessionCwd = ctx.cwd, projectConfig = ctx.isProjectTrusted() ? loadProjectConfig(ctx.cwd) : null, await host.bindSession(buildBindOptions(ctx.cwd));
|
|
2223
2251
|
let statusText = pendingProvider?.getStatusText?.() ?? "";
|
|
2224
2252
|
if (statusText ? ctx.ui.setStatus("lsp", ctx.ui.theme.fg("accent", `LSP: ${statusText}`)) : ctx.ui.setStatus("lsp", ctx.ui.theme.fg("dim", "LSP: idle")), projectConfig?.autoStart && projectConfig.autoStart.length > 0) {
|
|
2225
2253
|
let langs = projectConfig.autoStart, generation = host.getGeneration();
|
|
@@ -141,7 +141,6 @@ import {
|
|
|
141
141
|
resolveSkillsWithFallback,
|
|
142
142
|
resolveStepBehavior,
|
|
143
143
|
resolveSubagentIntercomTarget,
|
|
144
|
-
resolveSubagentRequestParams,
|
|
145
144
|
resolveSubagentResultStatus,
|
|
146
145
|
resolveSubagentRunId,
|
|
147
146
|
resolveTopLevelParallelConcurrency,
|
|
@@ -179,7 +178,7 @@ import {
|
|
|
179
178
|
writeNestedControlRequest,
|
|
180
179
|
writeNestedEvent,
|
|
181
180
|
writePrivateAtomicJson
|
|
182
|
-
} from "./chunk-
|
|
181
|
+
} from "./chunk-RLGY2QIL.js";
|
|
183
182
|
import {
|
|
184
183
|
DEFAULT_CONTROL_CONFIG,
|
|
185
184
|
buildControlEvent,
|
|
@@ -190,37 +189,45 @@ import {
|
|
|
190
189
|
resolveControlConfig,
|
|
191
190
|
shouldNotifyControlEvent
|
|
192
191
|
} from "./chunk-OAR4TYZE.js";
|
|
192
|
+
import {
|
|
193
|
+
createChildEventDecoder
|
|
194
|
+
} from "./chunk-U5F4IC7R.js";
|
|
193
195
|
import {
|
|
194
196
|
READ_ONLY_WRITE_SPAWN_ERROR,
|
|
195
197
|
resolveChildPermissions,
|
|
196
198
|
snapshotParentPermissionMode
|
|
197
|
-
} from "./chunk-
|
|
198
|
-
import "./chunk-
|
|
199
|
+
} from "./chunk-ZEVFBFNF.js";
|
|
200
|
+
import "./chunk-YSB6URMT.js";
|
|
201
|
+
import "./chunk-6ZZHGUSA.js";
|
|
199
202
|
import "./chunk-53YJI7JU.js";
|
|
200
|
-
import "./chunk-
|
|
201
|
-
import "./chunk-
|
|
203
|
+
import "./chunk-IAZSK7KK.js";
|
|
204
|
+
import "./chunk-TCT6PCUR.js";
|
|
202
205
|
import {
|
|
203
206
|
subagentCommunicationEnabled
|
|
204
|
-
} from "./chunk-
|
|
205
|
-
import "./chunk-
|
|
206
|
-
import "./chunk-
|
|
207
|
+
} from "./chunk-HUD2RFJW.js";
|
|
208
|
+
import "./chunk-4KNKQGHM.js";
|
|
209
|
+
import "./chunk-LHV3V67B.js";
|
|
207
210
|
import "./chunk-URD2SLIT.js";
|
|
208
|
-
import
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
import "./chunk-
|
|
211
|
+
import {
|
|
212
|
+
resolveSubagentRequestParams
|
|
213
|
+
} from "./chunk-APVM5NEU.js";
|
|
214
|
+
import "./chunk-F2V2F4ZG.js";
|
|
215
|
+
import "./chunk-BDRGN3L2.js";
|
|
216
|
+
import "./chunk-FY4A63RK.js";
|
|
217
|
+
import "./chunk-RYRGL7P4.js";
|
|
218
|
+
import "./chunk-ES6PBSIE.js";
|
|
212
219
|
import {
|
|
213
220
|
SessionManager
|
|
214
|
-
} from "./chunk-
|
|
221
|
+
} from "./chunk-EPR2F3GU.js";
|
|
215
222
|
import "./chunk-FVDOXRUD.js";
|
|
216
223
|
import "./chunk-UJOCPOMX.js";
|
|
217
224
|
import "./chunk-IMLCWLPI.js";
|
|
218
|
-
import "./chunk-
|
|
225
|
+
import "./chunk-MNQXDFPV.js";
|
|
219
226
|
import "./chunk-RQ2Q5IYR.js";
|
|
220
|
-
import "./chunk-
|
|
221
|
-
import "./chunk-
|
|
222
|
-
import "./chunk-
|
|
223
|
-
import "./chunk-
|
|
227
|
+
import "./chunk-RHCGYWO7.js";
|
|
228
|
+
import "./chunk-QW3AAHWN.js";
|
|
229
|
+
import "./chunk-JL4HYQXK.js";
|
|
230
|
+
import "./chunk-64XTQNLA.js";
|
|
224
231
|
import "./chunk-Q4Q6D4IY.js";
|
|
225
232
|
import "./chunk-BRJX2PRC.js";
|
|
226
233
|
|
|
@@ -1341,13 +1348,6 @@ function createJsonlWriter(filePath, source, deps = {}) {
|
|
|
1341
1348
|
}
|
|
1342
1349
|
|
|
1343
1350
|
// packages/coding-agent/dist/builtin-extensions/pi-subagents/src/shared/post-exit-stdio-guard.js
|
|
1344
|
-
function trySignalChild(child, signal) {
|
|
1345
|
-
try {
|
|
1346
|
-
return child.kill(signal);
|
|
1347
|
-
} catch {
|
|
1348
|
-
return !1;
|
|
1349
|
-
}
|
|
1350
|
-
}
|
|
1351
1351
|
function attachPostExitStdioGuard(child, options) {
|
|
1352
1352
|
let { idleMs, hardMs } = options, exited = !1, stdoutEnded = !1, stderrEnded = !1, idleTimer, hardTimer, destroyUnendedStdio = () => {
|
|
1353
1353
|
if (!stdoutEnded)
|
|
@@ -1778,7 +1778,35 @@ async function runSingleAttempt(runtimeCwd, spec, task, model, options, shared)
|
|
|
1778
1778
|
env: spawnEnv,
|
|
1779
1779
|
stdio: ["ignore", "pipe", "pipe"],
|
|
1780
1780
|
windowsHide: !0
|
|
1781
|
-
}), jsonlWriter = createJsonlWriter(shared.jsonlPath, proc.stdout),
|
|
1781
|
+
}), jsonlWriter = createJsonlWriter(shared.jsonlPath, proc.stdout), spawned = typeof proc.pid == "number" && proc.pid > 0;
|
|
1782
|
+
proc.once("spawn", () => {
|
|
1783
|
+
spawned = !0;
|
|
1784
|
+
});
|
|
1785
|
+
let processClosed = !1, settled = !1, detached = !1, intercomStarted = !1, assistantError, removeAbortListener, removeInterruptListener, activityTimer, timeoutTimer, timeoutTerminationTimer, timeoutHardKillTimer, turnBudgetSoftReached = !1, turnBudgetTerminationTimer, turnBudgetHardKillTimer, protocolHardKillTimer, cancellationHardKillTimer, interruptTerminationTimer, terminationCheckTimer, terminationUnconfirmedReported = !1, clearCancellationTimers = () => {
|
|
1786
|
+
terminationCheckTimer && clearTimeout(terminationCheckTimer), terminationCheckTimer = void 0, cancellationHardKillTimer && clearTimeout(cancellationHardKillTimer), interruptTerminationTimer && clearTimeout(interruptTerminationTimer), cancellationHardKillTimer = void 0, interruptTerminationTimer = void 0;
|
|
1787
|
+
}, recordProcessError = (error) => {
|
|
1788
|
+
result2.error || (result2.error = error instanceof Error ? error.message : String(error)), progress.error = result2.error, !childExited && !processClosed && !settled && !detached && (progress.status = "running", fireUpdate());
|
|
1789
|
+
}, signalChild = (signal) => {
|
|
1790
|
+
if (childExited || processClosed || settled || detached)
|
|
1791
|
+
return !1;
|
|
1792
|
+
let sent = !1;
|
|
1793
|
+
try {
|
|
1794
|
+
sent = proc.kill(signal);
|
|
1795
|
+
} catch (error) {
|
|
1796
|
+
recordProcessError(error);
|
|
1797
|
+
}
|
|
1798
|
+
return !sent && !childExited && !processClosed && !settled && !detached && recordProcessError(`Subagent ${signal} could not be delivered; child exit is not confirmed.`), signal === "SIGKILL" && !childExited && !processClosed && !settled && !detached && !terminationCheckTimer && !terminationUnconfirmedReported && (terminationCheckTimer = setTimeout(() => {
|
|
1799
|
+
if (terminationCheckTimer = void 0, childExited || processClosed || settled || detached)
|
|
1800
|
+
return;
|
|
1801
|
+
terminationUnconfirmedReported = !0;
|
|
1802
|
+
let message = `Subagent termination unconfirmed after SIGKILL${proc.pid ? ` (diagnostic PID ${proc.pid})` : ""}. This foreground call still owns the child and waits for its exit. Verify the child process before starting replacement work.`;
|
|
1803
|
+
progress.status = "running", progress.error = message, progress.activityState = "needs_attention", progress.durationMs = Date.now() - startTime, appendRecentOutput(progress, [message]), emitUpdateSnapshot(message);
|
|
1804
|
+
}, 2e3), terminationCheckTimer.unref?.()), sent;
|
|
1805
|
+
}, scheduleCancellationHardKill = (delayMs) => {
|
|
1806
|
+
cancellationHardKillTimer || childExited || processClosed || settled || detached || (cancellationHardKillTimer = setTimeout(() => {
|
|
1807
|
+
cancellationHardKillTimer = void 0, !childExited && !processClosed && !settled && !detached && signalChild("SIGKILL");
|
|
1808
|
+
}, delayMs), cancellationHardKillTimer.unref?.());
|
|
1809
|
+
}, clearTurnBudgetTimers = () => {
|
|
1782
1810
|
turnBudgetTerminationTimer && (clearTimeout(turnBudgetTerminationTimer), turnBudgetTerminationTimer = void 0), turnBudgetHardKillTimer && (clearTimeout(turnBudgetHardKillTimer), turnBudgetHardKillTimer = void 0);
|
|
1783
1811
|
}, clearTimeoutTimers = () => {
|
|
1784
1812
|
timeoutTimer && (clearTimeout(timeoutTimer), timeoutTimer = void 0), timeoutTerminationTimer && (clearTimeout(timeoutTerminationTimer), timeoutTerminationTimer = void 0), timeoutHardKillTimer && (clearTimeout(timeoutHardKillTimer), timeoutHardKillTimer = void 0);
|
|
@@ -1800,9 +1828,11 @@ async function runSingleAttempt(runtimeCwd, spec, task, model, options, shared)
|
|
|
1800
1828
|
return;
|
|
1801
1829
|
}
|
|
1802
1830
|
childExited || finalDrainTimer || settled || processClosed || detached || (finalDrainTimer = setTimeout(() => {
|
|
1803
|
-
settled || processClosed || detached
|
|
1804
|
-
|
|
1805
|
-
|
|
1831
|
+
if (settled || processClosed || detached)
|
|
1832
|
+
return;
|
|
1833
|
+
forcedTerminationSignal = signalChild("SIGTERM") || forcedTerminationSignal, !cleanTerminalAssistantStopReceived && !agentSettledReceived && !assistantError && (result2.error = result2.error ?? `Subagent process did not exit within ${FINAL_STOP_GRACE_MS}ms after its terminal event. Forcing termination.`), finalHardKillTimer = setTimeout(() => {
|
|
1834
|
+
settled || processClosed || detached || (forcedTerminationSignal = signalChild("SIGKILL") || forcedTerminationSignal);
|
|
1835
|
+
}, HARD_KILL_MS), finalHardKillTimer.unref?.();
|
|
1806
1836
|
}, FINAL_STOP_GRACE_MS), finalDrainTimer.unref?.());
|
|
1807
1837
|
};
|
|
1808
1838
|
function armWatchdogTail() {
|
|
@@ -1836,7 +1866,7 @@ async function runSingleAttempt(runtimeCwd, spec, task, model, options, shared)
|
|
|
1836
1866
|
return;
|
|
1837
1867
|
options.intercomEvents?.emit(INTERCOM_DETACH_RESPONSE_EVENT, { requestId, accepted: !0, runId: options.runId, agent: spec.childId, childIndex: options.index ?? 0 }), detachForIntercom();
|
|
1838
1868
|
}), finish = (code) => {
|
|
1839
|
-
settled || (settled = !0, clearFinalDrainTimers(), clearWatchdogTailTimer(), clearStdioGuard(), clearTimeoutTimers(), clearTurnBudgetTimers(), protocolHardKillTimer && (clearTimeout(protocolHardKillTimer), protocolHardKillTimer = void 0), activityTimer && (clearInterval(activityTimer), activityTimer = void 0), unsubscribeIntercomDetach?.(), removeAbortListener?.(), removeInterruptListener?.(), resolve7(code));
|
|
1869
|
+
settled || (settled = !0, clearCancellationTimers(), clearFinalDrainTimers(), clearWatchdogTailTimer(), clearStdioGuard(), clearTimeoutTimers(), clearTurnBudgetTimers(), protocolHardKillTimer && (clearTimeout(protocolHardKillTimer), protocolHardKillTimer = void 0), activityTimer && (clearInterval(activityTimer), activityTimer = void 0), unsubscribeIntercomDetach?.(), removeAbortListener?.(), removeInterruptListener?.(), resolve7(code));
|
|
1840
1870
|
}, drainPendingControlEvents = () => {
|
|
1841
1871
|
if (pendingControlEvents.length === 0)
|
|
1842
1872
|
return;
|
|
@@ -1895,10 +1925,10 @@ async function runSingleAttempt(runtimeCwd, spec, task, model, options, shared)
|
|
|
1895
1925
|
if (!budget || result2.timedOut || result2.turnBudgetExceeded || interruptedByControl || processClosed || settled || detached)
|
|
1896
1926
|
return;
|
|
1897
1927
|
let message = turnBudgetExceededMessage(budget, turnCount);
|
|
1898
|
-
result2.turnBudgetExceeded = !0, result2.wrapUpRequested = !0, result2.turnBudget = turnBudgetState(budget, turnCount, !0), result2.error = message, result2.finalOutput = message, progress.status = "failed", progress.error = message, progress.durationMs = Date.now() - startTime, fireUpdate(),
|
|
1899
|
-
processClosed || settled || detached || result2.timedOut ||
|
|
1928
|
+
result2.turnBudgetExceeded = !0, result2.wrapUpRequested = !0, result2.turnBudget = turnBudgetState(budget, turnCount, !0), result2.error = message, result2.finalOutput = message, progress.status = "failed", progress.error = message, progress.durationMs = Date.now() - startTime, fireUpdate(), signalChild("SIGINT"), turnBudgetTerminationTimer = setTimeout(() => {
|
|
1929
|
+
processClosed || settled || detached || result2.timedOut || signalChild("SIGTERM");
|
|
1900
1930
|
}, 1e3), turnBudgetTerminationTimer.unref?.(), turnBudgetHardKillTimer = setTimeout(() => {
|
|
1901
|
-
processClosed || settled || detached || result2.timedOut ||
|
|
1931
|
+
processClosed || settled || detached || result2.timedOut || signalChild("SIGKILL");
|
|
1902
1932
|
}, 4e3), turnBudgetHardKillTimer.unref?.();
|
|
1903
1933
|
}, updateTurnBudget = (turnCount, terminalAssistantStop) => {
|
|
1904
1934
|
let budget = options.turnBudget;
|
|
@@ -1945,11 +1975,19 @@ async function runSingleAttempt(runtimeCwd, spec, task, model, options, shared)
|
|
|
1945
1975
|
progress.durationMs = Date.now() - startTime;
|
|
1946
1976
|
let output = (result2.timedOut || result2.turnBudgetExceeded) && result2.finalOutput ? result2.finalOutput : getFinalOutput(result2.messages);
|
|
1947
1977
|
emitUpdateSnapshot(output || "(running...)");
|
|
1948
|
-
}, processLine = (line) => {
|
|
1978
|
+
}, decodeChildEvent = createChildEventDecoder(), processLine = (line) => {
|
|
1949
1979
|
if (!line.trim())
|
|
1950
1980
|
return;
|
|
1951
|
-
|
|
1952
|
-
|
|
1981
|
+
let evt, assembled;
|
|
1982
|
+
try {
|
|
1983
|
+
assembled = decodeChildEvent(line);
|
|
1984
|
+
} catch {
|
|
1985
|
+
jsonlWriter.writeLine(line), shared.transcriptWriter?.writeStdoutLine(line);
|
|
1986
|
+
return;
|
|
1987
|
+
}
|
|
1988
|
+
if (assembled === void 0)
|
|
1989
|
+
return;
|
|
1990
|
+
line = assembled, jsonlWriter.writeLine(line);
|
|
1953
1991
|
try {
|
|
1954
1992
|
evt = JSON.parse(line);
|
|
1955
1993
|
} catch {
|
|
@@ -2035,15 +2073,15 @@ async function runSingleAttempt(runtimeCwd, spec, task, model, options, shared)
|
|
|
2035
2073
|
let now = Date.now();
|
|
2036
2074
|
updateActivityState(now) && (progress.durationMs = now - startTime, fireUpdate());
|
|
2037
2075
|
}, 1e3), activityTimer.unref?.()), attemptTimeout && (timeoutTimer = setTimeout(() => {
|
|
2038
|
-
processClosed || settled || detached || interruptedByControl || (result2.timedOut = !0, result2.error = attemptTimeout.message, result2.finalOutput = attemptTimeout.message, progress.status = "failed", progress.error = attemptTimeout.message, progress.durationMs = Date.now() - startTime, fireUpdate(),
|
|
2039
|
-
processClosed || settled || detached ||
|
|
2076
|
+
processClosed || settled || detached || interruptedByControl || (result2.timedOut = !0, result2.error = attemptTimeout.message, result2.finalOutput = attemptTimeout.message, progress.status = "failed", progress.error = attemptTimeout.message, progress.durationMs = Date.now() - startTime, fireUpdate(), signalChild("SIGINT"), timeoutTerminationTimer = setTimeout(() => {
|
|
2077
|
+
processClosed || settled || detached || signalChild("SIGTERM");
|
|
2040
2078
|
}, 1e3), timeoutTerminationTimer.unref?.(), timeoutHardKillTimer = setTimeout(() => {
|
|
2041
|
-
processClosed || settled || detached ||
|
|
2079
|
+
processClosed || settled || detached || signalChild("SIGKILL");
|
|
2042
2080
|
}, 4e3), timeoutHardKillTimer.unref?.());
|
|
2043
2081
|
}, attemptTimeout.remainingMs), timeoutTimer.unref?.());
|
|
2044
2082
|
let stderrTail = createBoundedByteTail(), stdoutReader = createBoundedLineReader({ onLine: processLine, onLimit: (limit) => {
|
|
2045
|
-
result2.protocolError || (result2.protocolError = limit, result2.error = formatProtocolOutputLimit(limit), progress.status = "failed", progress.error = result2.error, progress.durationMs = Date.now() - startTime, fireUpdate(), childExited || (
|
|
2046
|
-
childExited ||
|
|
2083
|
+
result2.protocolError || (result2.protocolError = limit, result2.error = formatProtocolOutputLimit(limit), progress.status = "failed", progress.error = result2.error, progress.durationMs = Date.now() - startTime, fireUpdate(), childExited || (signalChild("SIGTERM"), protocolHardKillTimer = setTimeout(() => {
|
|
2084
|
+
childExited || signalChild("SIGKILL");
|
|
2047
2085
|
}, 3e3), protocolHardKillTimer.unref?.()));
|
|
2048
2086
|
} }), stderrReader = createBoundedLineReader({
|
|
2049
2087
|
stream: "stderr",
|
|
@@ -2051,12 +2089,14 @@ async function runSingleAttempt(runtimeCwd, spec, task, model, options, shared)
|
|
|
2051
2089
|
onLine: (line) => shared.transcriptWriter?.writeStderrLine(line),
|
|
2052
2090
|
onLimit: (limit) => shared.transcriptWriter?.writeStderrLine(formatProtocolOutputLimit(limit))
|
|
2053
2091
|
}), clearStdioGuard = attachPostExitStdioGuard(proc, { idleMs: 2e3, hardMs: 8e3 });
|
|
2054
|
-
|
|
2092
|
+
proc.stdout.on("data", (chunk) => stdoutReader.push(chunk)), proc.stderr.on("data", (chunk) => {
|
|
2055
2093
|
stderrTail.push(chunk), stderrReader.push(chunk);
|
|
2056
|
-
})
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2094
|
+
});
|
|
2095
|
+
let confirmChildExit = () => {
|
|
2096
|
+
childExited = !0, terminationUnconfirmedReported && (progress.error = result2.error, progress.activityState = void 0), clearCancellationTimers(), clearFinalDrainTimers();
|
|
2097
|
+
};
|
|
2098
|
+
if (proc.on("exit", confirmChildExit), proc.on("close", (code, signal) => {
|
|
2099
|
+
confirmChildExit(), clearFinalDrainTimers(), clearStdioGuard(), jsonlWriter.close().catch(() => {
|
|
2060
2100
|
});
|
|
2061
2101
|
let toolDiagnosticError = readChildToolDiagnosticError(toolDiagnosticPath);
|
|
2062
2102
|
cleanupTempDir(tempDir), stdoutReader.end(), stderrReader.end();
|
|
@@ -2087,19 +2127,23 @@ async function runSingleAttempt(runtimeCwd, spec, task, model, options, shared)
|
|
|
2087
2127
|
}
|
|
2088
2128
|
!result2.error && closeError && (result2.error = closeError), processClosed = !0, finish(finalCode);
|
|
2089
2129
|
}), proc.on("error", (error) => {
|
|
2130
|
+
if (spawned) {
|
|
2131
|
+
recordProcessError(error);
|
|
2132
|
+
return;
|
|
2133
|
+
}
|
|
2090
2134
|
clearFinalDrainTimers(), clearStdioGuard(), jsonlWriter.close().catch(() => {
|
|
2091
2135
|
}), cleanupTempDir(tempDir), stdoutReader.end(), stderrReader.end(), result2.error || (result2.error = error instanceof Error ? error.message : String(error)), finish(1);
|
|
2092
2136
|
}), options.signal) {
|
|
2093
2137
|
let kill = () => {
|
|
2094
|
-
processClosed || detached || (
|
|
2138
|
+
childExited || processClosed || settled || detached || (signalChild("SIGTERM"), scheduleCancellationHardKill(3e3));
|
|
2095
2139
|
};
|
|
2096
2140
|
options.signal.aborted ? kill() : (options.signal.addEventListener("abort", kill, { once: !0 }), removeAbortListener = () => options.signal?.removeEventListener("abort", kill));
|
|
2097
2141
|
}
|
|
2098
2142
|
if (options.interruptSignal) {
|
|
2099
2143
|
let interrupt = () => {
|
|
2100
|
-
processClosed || detached || settled || result2.timedOut || (interruptedByControl = !0, clearTimeoutTimers(), progress.status = "running", progress.durationMs = Date.now() - startTime, result2.interrupted = !0, result2.finalOutput = "Interrupted. Waiting for explicit next action.", progress.activityState = void 0, fireUpdate(),
|
|
2101
|
-
settled || processClosed || detached ||
|
|
2102
|
-
}, 1e3).unref?.());
|
|
2144
|
+
processClosed || detached || settled || result2.timedOut || (interruptedByControl = !0, clearTimeoutTimers(), progress.status = "running", progress.durationMs = Date.now() - startTime, result2.interrupted = !0, result2.finalOutput = "Interrupted. Waiting for explicit next action.", progress.activityState = void 0, fireUpdate(), signalChild("SIGINT"), interruptTerminationTimer = setTimeout(() => {
|
|
2145
|
+
childExited || settled || processClosed || detached || signalChild("SIGTERM");
|
|
2146
|
+
}, 1e3), interruptTerminationTimer.unref?.(), scheduleCancellationHardKill(4e3));
|
|
2103
2147
|
};
|
|
2104
2148
|
options.interruptSignal.aborted ? interrupt() : (options.interruptSignal.addEventListener("abort", interrupt, { once: !0 }), removeInterruptListener = () => options.interruptSignal?.removeEventListener("abort", interrupt));
|
|
2105
2149
|
}
|
|
@@ -3199,6 +3243,11 @@ function validateChainOutputBindingsWithContext(steps, dynamicFanoutConfig = {},
|
|
|
3199
3243
|
available.add(name);
|
|
3200
3244
|
}
|
|
3201
3245
|
}
|
|
3246
|
+
function withChainHandoff(task, hasNextStep) {
|
|
3247
|
+
return hasNextStep ? `${task}
|
|
3248
|
+
|
|
3249
|
+
Your final output will be handed to the next agent. Briefly summarize results, relevant references, verification, and remaining work.` : task;
|
|
3250
|
+
}
|
|
3202
3251
|
function resolveOutputReferences(template, outputs) {
|
|
3203
3252
|
return template.replace(OUTPUT_REF_PATTERN, (rawReference, name) => {
|
|
3204
3253
|
if (!SAFE_OUTPUT_NAME_PATTERN2.test(name))
|
|
@@ -3308,7 +3357,7 @@ async function runParallelChainTasks(input) {
|
|
|
3308
3357
|
if (toolBudget.error)
|
|
3309
3358
|
throw new Error(toolBudget.error);
|
|
3310
3359
|
let taskCwd = input.worktreeSetup ? input.worktreeSetup.worktrees[taskIndex].agentCwd : resolveChildCwd(input.cwd ?? input.ctx.cwd, task.cwd), outputPath = typeof behavior.output == "string" ? path6.isAbsolute(behavior.output) ? behavior.output : path6.join(input.chainDir, behavior.output) : void 0;
|
|
3311
|
-
taskStr = injectSingleOutputInstruction(taskStr, outputPath, taskChildConfig);
|
|
3360
|
+
taskStr = withChainHandoff(injectSingleOutputInstruction(taskStr, outputPath, taskChildConfig), input.stepIndex < input.totalSteps - 1);
|
|
3312
3361
|
let interruptController = new AbortController();
|
|
3313
3362
|
input.foregroundControl && (input.foregroundControl.currentAgent = task.description || task.agent, input.foregroundControl.currentChildId = task.agent, input.foregroundControl.currentIndex = input.globalTaskIndex + taskIndex, input.foregroundControl.currentActivityState = void 0, input.foregroundControl.updatedAt = Date.now(), input.foregroundControl.interrupt = () => interruptController.signal.aborted ? !1 : (interruptController.abort(), input.foregroundControl.currentActivityState = void 0, input.foregroundControl.updatedAt = Date.now(), !0));
|
|
3314
3363
|
let structuredRuntime = task.outputSchema ? createStructuredOutputRuntime(task.outputSchema, path6.join(input.chainDir, "structured-output")) : void 0, result2 = await runSync(input.ctx.cwd, normalizeChildSpec({
|
|
@@ -3394,7 +3443,17 @@ async function runParallelChainTasks(input) {
|
|
|
3394
3443
|
} : void 0
|
|
3395
3444
|
});
|
|
3396
3445
|
return input.foregroundControl?.currentIndex === input.globalTaskIndex + taskIndex && (input.foregroundControl.interrupt = void 0, input.foregroundControl.updatedAt = Date.now()), result2.exitCode !== 0 && failFast && (aborted = !0), recordRun(task.agent, cleanTask, result2.exitCode, result2.progressSummary?.durationMs ?? 0), result2;
|
|
3397
|
-
}, input.globalSemaphore
|
|
3446
|
+
}, input.globalSemaphore, {
|
|
3447
|
+
signal: input.signal,
|
|
3448
|
+
onAbort: (task) => ({
|
|
3449
|
+
agent: task.agent,
|
|
3450
|
+
task: "(cancelled)",
|
|
3451
|
+
exitCode: 1,
|
|
3452
|
+
messages: [],
|
|
3453
|
+
usage: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0, cost: 0, turns: 0 },
|
|
3454
|
+
error: "Subagent launch cancelled."
|
|
3455
|
+
})
|
|
3456
|
+
});
|
|
3398
3457
|
}
|
|
3399
3458
|
async function executeChain(params) {
|
|
3400
3459
|
let { chain: chainSteps, agents, ctx, signal, runId, cwd, shareEnabled, sessionDirForIndex, sessionFileForIndex, sessionFileForTask, thinkingOverrideForTask, artifactsDir, artifactConfig, includeProgress, clarify, onUpdate, onControlEvent, controlConfig, onDetachedExit, childIntercomTarget, orchestratorIntercomTarget, communicationEnabled, foregroundControl, intercomEvents, chainSkills: chainSkillsParam, chainDir: chainDirBase, modelScope } = params, chainSkills = chainSkillsParam ?? [], results = [], outputs = {}, dynamicChildren = {}, dynamicGroupStatuses = {}, allProgress = [], allArtifactPaths = [], chainAgents = chainSteps.map((step) => isParallelStep(step) ? `[${step.parallel.map((t) => t.description || t.label || t.agent || "child").join("+")}]` : isDynamicParallelStep(step) ? `expand:${step.parallel.description || step.parallel.label || step.parallel.agent || "child"}` : step.description || step.label || step.agent || "child"), totalSteps = chainSteps.length, makeDetailsInput = (overrides = {}) => ({
|
|
@@ -3833,7 +3892,7 @@ ${failureSummary}`;
|
|
|
3833
3892
|
availableModels,
|
|
3834
3893
|
preferredProvider: ctx.model?.provider
|
|
3835
3894
|
}), outputPath = typeof behavior.output == "string" ? path6.isAbsolute(behavior.output) ? behavior.output : path6.join(chainDir, behavior.output) : void 0;
|
|
3836
|
-
stepTask = injectSingleOutputInstruction(stepTask, outputPath, agentConfig);
|
|
3895
|
+
stepTask = withChainHandoff(injectSingleOutputInstruction(stepTask, outputPath, agentConfig), stepIndex < totalSteps - 1);
|
|
3837
3896
|
let validationError = validateFileOnlyOutputMode(behavior.outputMode, outputPath, `Chain step ${stepIndex + 1} (${seqStep.agent})`);
|
|
3838
3897
|
if (validationError)
|
|
3839
3898
|
return buildChainExecutionErrorResult(validationError, makeDetailsInput({ currentStepIndex: stepIndex, currentFlatIndex: globalTaskIndex }));
|
|
@@ -5970,7 +6029,7 @@ function resolveResumeTarget(params, state, options = {}) {
|
|
|
5970
6029
|
}
|
|
5971
6030
|
throw foregroundError && !isAsyncRunNotFound(asyncError) || foregroundError ? foregroundError : asyncError || new Error("Run not found. Provide id or runId.");
|
|
5972
6031
|
}
|
|
5973
|
-
function getAsyncInterruptTarget(state, runId, location
|
|
6032
|
+
function getAsyncInterruptTarget(state, runId, location) {
|
|
5974
6033
|
if (location?.asyncDir)
|
|
5975
6034
|
return {
|
|
5976
6035
|
asyncId: location.resolvedId ?? runId ?? path15.basename(location.asyncDir),
|
|
@@ -5978,10 +6037,7 @@ function getAsyncInterruptTarget(state, runId, location, options = {}) {
|
|
|
5978
6037
|
};
|
|
5979
6038
|
if (runId) {
|
|
5980
6039
|
let direct = state.asyncJobs.get(runId);
|
|
5981
|
-
|
|
5982
|
-
return { asyncId: direct.asyncId, asyncDir: direct.asyncDir };
|
|
5983
|
-
if (options.fallbackToNewest === !1)
|
|
5984
|
-
return;
|
|
6040
|
+
return direct ? { asyncId: direct.asyncId, asyncDir: direct.asyncDir } : void 0;
|
|
5985
6041
|
}
|
|
5986
6042
|
let newest;
|
|
5987
6043
|
for (let job of state.asyncJobs.values())
|
|
@@ -6008,6 +6064,12 @@ function interruptAsyncRun(state, runId, kill, location) {
|
|
|
6008
6064
|
if (!target)
|
|
6009
6065
|
return null;
|
|
6010
6066
|
let status = reconcileAsyncRun(target.asyncDir, { kill }).status;
|
|
6067
|
+
if (state.currentSessionId && status?.sessionId !== state.currentSessionId)
|
|
6068
|
+
return {
|
|
6069
|
+
content: [{ type: "text", text: `Async run '${target.asyncId}' was not found in the active session.` }],
|
|
6070
|
+
isError: !0,
|
|
6071
|
+
details: { mode: "management", results: [] }
|
|
6072
|
+
};
|
|
6011
6073
|
if (!status || status.state !== "running" || typeof status.pid != "number")
|
|
6012
6074
|
return {
|
|
6013
6075
|
content: [{ type: "text", text: `No running async run with an interrupt-capable pid was found for '${runId ?? "current"}'.` }],
|
|
@@ -6031,7 +6093,7 @@ function interruptAsyncRun(state, runId, kill, location) {
|
|
|
6031
6093
|
}
|
|
6032
6094
|
}
|
|
6033
6095
|
function stopAsyncRun(state, runId, kill, location) {
|
|
6034
|
-
let target = getAsyncInterruptTarget(state, runId, location
|
|
6096
|
+
let target = getAsyncInterruptTarget(state, runId, location);
|
|
6035
6097
|
if (!target)
|
|
6036
6098
|
return null;
|
|
6037
6099
|
let status = reconcileAsyncRun(target.asyncDir, { kill }).status;
|
|
@@ -7541,7 +7603,17 @@ async function runForegroundParallelTasks(input) {
|
|
|
7541
7603
|
}).finally(() => {
|
|
7542
7604
|
input.foregroundControl?.currentIndex === index && (input.foregroundControl.interrupt = void 0, input.foregroundControl.updatedAt = Date.now());
|
|
7543
7605
|
});
|
|
7544
|
-
}, input.globalSemaphore
|
|
7606
|
+
}, input.globalSemaphore, {
|
|
7607
|
+
signal: input.signal,
|
|
7608
|
+
onAbort: (task) => ({
|
|
7609
|
+
agent: task.agent,
|
|
7610
|
+
task: task.task ?? "",
|
|
7611
|
+
exitCode: 1,
|
|
7612
|
+
messages: [],
|
|
7613
|
+
usage: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0, cost: 0, turns: 0 },
|
|
7614
|
+
error: "Subagent launch cancelled."
|
|
7615
|
+
})
|
|
7616
|
+
});
|
|
7545
7617
|
}
|
|
7546
7618
|
async function runParallelPath(data, deps) {
|
|
7547
7619
|
let { params, effectiveCwd, agents, ctx, signal, runId, sessionDirForIndex, sessionFileForIndex, sessionFileForTask, thinkingOverrideForTask, shareEnabled, artifactConfig, artifactsDir, backgroundRequestedWhileClarifying, onUpdate, sessionRoot, controlConfig, contextPolicy } = data, onControlEvent = createForegroundControlNotifier(data, deps), childIntercomTarget = data.intercomBridge.active ? resolveSubagentIntercomTarget : void 0, allProgress = [], allArtifactPaths = [], tasks = params.tasks, maxParallelTasks = resolveTopLevelParallelMaxTasks(deps.config.parallel?.maxTasks), parallelConcurrency = resolveTopLevelParallelConcurrency(params.concurrency, deps.config.parallel?.concurrency);
|
|
@@ -8155,7 +8227,14 @@ function createSubagentExecutor(deps) {
|
|
|
8155
8227
|
};
|
|
8156
8228
|
}
|
|
8157
8229
|
if (action === "interrupt") {
|
|
8158
|
-
let targetRunId = paramsWithResolvedCwd.runId ?? paramsWithResolvedCwd.id
|
|
8230
|
+
let targetRunId = paramsWithResolvedCwd.runId ?? paramsWithResolvedCwd.id;
|
|
8231
|
+
if (targetRunId !== void 0 && !targetRunId.trim())
|
|
8232
|
+
return {
|
|
8233
|
+
content: [{ type: "text", text: "Explicit interrupt id must be non-empty." }],
|
|
8234
|
+
isError: !0,
|
|
8235
|
+
details: { mode: "management", results: [] }
|
|
8236
|
+
};
|
|
8237
|
+
let resolved;
|
|
8159
8238
|
if (targetRunId)
|
|
8160
8239
|
try {
|
|
8161
8240
|
resolved = resolveSubagentRunId(targetRunId, { state: deps.state, nested: nestedResolutionScopeForExecutor(deps) });
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createRequire as __lunrRequire } from "node:module"; const require = __lunrRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
activityMonitor
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-IPP5BIV5.js";
|
|
5
5
|
import {
|
|
6
6
|
getWebSearchConfigPath
|
|
7
7
|
} from "./chunk-VRB2IYGG.js";
|
|
@@ -30,8 +30,8 @@ import {
|
|
|
30
30
|
setThemeInstance,
|
|
31
31
|
stopThemeWatcher,
|
|
32
32
|
theme
|
|
33
|
-
} from "./chunk-
|
|
34
|
-
import "./chunk-
|
|
33
|
+
} from "./chunk-JL4HYQXK.js";
|
|
34
|
+
import "./chunk-64XTQNLA.js";
|
|
35
35
|
import "./chunk-Q4Q6D4IY.js";
|
|
36
36
|
import "./chunk-BRJX2PRC.js";
|
|
37
37
|
export {
|
|
@@ -4,9 +4,9 @@ import {
|
|
|
4
4
|
getProjectTrustOptions,
|
|
5
5
|
getProjectTrustParentPath,
|
|
6
6
|
hasTrustRequiringProjectResources
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-F2SMQ6ES.js";
|
|
8
8
|
import "./chunk-URD2SLIT.js";
|
|
9
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-64XTQNLA.js";
|
|
10
10
|
import "./chunk-Q4Q6D4IY.js";
|
|
11
11
|
import "./chunk-BRJX2PRC.js";
|
|
12
12
|
export {
|