@ashx-j/lunr-dev 0.2.21-dev.12.1 → 0.2.25-dev.13.1
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 +25 -2
- package/dist/builtin-extensions/ashxj-tui.d.ts.map +1 -1
- package/dist/builtin-extensions/ashxj-tui.js +2 -2
- 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-browser.d.ts +9 -0
- package/dist/builtin-extensions/lunr-browser.d.ts.map +1 -0
- package/dist/builtin-extensions/lunr-browser.js +169 -0
- package/dist/builtin-extensions/lunr-browser.js.map +1 -0
- package/dist/builtin-extensions/lunr-computer-use.d.ts.map +1 -1
- package/dist/builtin-extensions/lunr-computer-use.js +3 -3
- package/dist/builtin-extensions/lunr-computer-use.js.map +1 -1
- package/dist/builtin-extensions/lunr-plan-tools.d.ts +7 -7
- package/dist/builtin-extensions/lunr-plan-tools.d.ts.map +1 -1
- package/dist/builtin-extensions/lunr-plan-tools.js +12 -12
- package/dist/builtin-extensions/lunr-plan-tools.js.map +1 -1
- package/dist/builtin-extensions/lunr-todos.d.ts.map +1 -1
- package/dist/builtin-extensions/lunr-todos.js +15 -0
- package/dist/builtin-extensions/lunr-todos.js.map +1 -1
- package/dist/builtin-extensions/pi-intercom/index.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-intercom/index.js +5 -0
- package/dist/builtin-extensions/pi-intercom/index.js.map +1 -1
- package/dist/builtin-extensions/pi-mcp-adapter/direct-tools.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-mcp-adapter/direct-tools.js +1 -0
- package/dist/builtin-extensions/pi-mcp-adapter/direct-tools.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 +1 -1
- package/dist/builtin-extensions/pi-mcp-adapter/index.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/control-notices.d.ts +1 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/control-notices.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/control-notices.js +5 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/control-notices.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/index.d.ts +2 -2
- package/dist/builtin-extensions/pi-subagents/src/extension/index.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/index.js +18 -5
- 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 -3
- 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 -3
- package/dist/builtin-extensions/pi-subagents/src/extension/tool-description.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/intercom/communication.d.ts +17 -0
- package/dist/builtin-extensions/pi-subagents/src/intercom/communication.d.ts.map +1 -0
- package/dist/builtin-extensions/pi-subagents/src/intercom/communication.js +45 -0
- package/dist/builtin-extensions/pi-subagents/src/intercom/communication.js.map +1 -0
- package/dist/builtin-extensions/pi-subagents/src/intercom/intercom-bridge.d.ts +2 -0
- package/dist/builtin-extensions/pi-subagents/src/intercom/intercom-bridge.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/intercom/intercom-bridge.js +10 -14
- package/dist/builtin-extensions/pi-subagents/src/intercom/intercom-bridge.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/intercom/native-supervisor-channel.d.ts +4 -1
- package/dist/builtin-extensions/pi-subagents/src/intercom/native-supervisor-channel.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/intercom/native-supervisor-channel.js +167 -53
- package/dist/builtin-extensions/pi-subagents/src/intercom/native-supervisor-channel.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/intercom/supervisor-ask.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/intercom/supervisor-ask.js +5 -0
- package/dist/builtin-extensions/pi-subagents/src/intercom/supervisor-ask.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/intercom/supervisor-questions.d.ts +2 -0
- package/dist/builtin-extensions/pi-subagents/src/intercom/supervisor-questions.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/intercom/supervisor-questions.js +3 -2
- package/dist/builtin-extensions/pi-subagents/src/intercom/supervisor-questions.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/async-execution.d.ts +2 -0
- package/dist/builtin-extensions/pi-subagents/src/runs/background/async-execution.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/async-execution.js +4 -0
- package/dist/builtin-extensions/pi-subagents/src/runs/background/async-execution.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/auto-drain.d.ts +1 -0
- package/dist/builtin-extensions/pi-subagents/src/runs/background/auto-drain.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/auto-drain.js +2 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/auto-drain.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/subagent-runner.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/subagent-runner.js +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/subagent-runner.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/subagent-wait.d.ts +3 -0
- package/dist/builtin-extensions/pi-subagents/src/runs/background/subagent-wait.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/subagent-wait.js +11 -0
- package/dist/builtin-extensions/pi-subagents/src/runs/background/subagent-wait.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/wait-tool.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/wait-tool.js +41 -3
- package/dist/builtin-extensions/pi-subagents/src/runs/background/wait-tool.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/chain-execution.d.ts +1 -0
- 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 +5 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/chain-execution.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/execution.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/execution.js +3 -2
- 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 +23 -0
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/subagent-executor.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 +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/child-tools.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/pi-args.d.ts +2 -0
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/pi-args.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/pi-args.js +20 -15
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/pi-args.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/subagent-control.d.ts +1 -0
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/subagent-control.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/subagent-control.js +3 -0
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/subagent-control.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/subagent-prompt-runtime.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/subagent-prompt-runtime.js +4 -2
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/subagent-prompt-runtime.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/shared/child-spec.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/shared/child-spec.js +2 -2
- package/dist/builtin-extensions/pi-subagents/src/shared/child-spec.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/shared/types.d.ts +2 -0
- package/dist/builtin-extensions/pi-subagents/src/shared/types.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/shared/types.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/tui/communication.d.ts +18 -0
- package/dist/builtin-extensions/pi-subagents/src/tui/communication.d.ts.map +1 -0
- package/dist/builtin-extensions/pi-subagents/src/tui/communication.js +48 -0
- package/dist/builtin-extensions/pi-subagents/src/tui/communication.js.map +1 -0
- package/dist/builtin-extensions/pi-web-access/index.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-web-access/index.js +11 -7
- package/dist/builtin-extensions/pi-web-access/index.js.map +1 -1
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +2 -1
- package/dist/cli/args.js.map +1 -1
- package/dist/cli/install-cli.d.ts.map +1 -1
- package/dist/cli/install-cli.js +15 -45
- package/dist/cli/install-cli.js.map +1 -1
- package/dist/core/agent-session-runtime.d.ts +9 -0
- package/dist/core/agent-session-runtime.d.ts.map +1 -1
- package/dist/core/agent-session-runtime.js +126 -29
- package/dist/core/agent-session-runtime.js.map +1 -1
- package/dist/core/agent-session.d.ts +23 -1
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +255 -109
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/browser/network.d.ts +9 -0
- package/dist/core/browser/network.d.ts.map +1 -0
- package/dist/core/browser/network.js +146 -0
- package/dist/core/browser/network.js.map +1 -0
- package/dist/core/browser/runtime.d.ts +24 -0
- package/dist/core/browser/runtime.d.ts.map +1 -0
- package/dist/core/browser/runtime.js +289 -0
- package/dist/core/browser/runtime.js.map +1 -0
- package/dist/core/browser/schema.d.ts +16 -0
- package/dist/core/browser/schema.d.ts.map +1 -0
- package/dist/core/browser/schema.js +36 -0
- package/dist/core/browser/schema.js.map +1 -0
- package/dist/core/browser/settings.d.ts +8 -0
- package/dist/core/browser/settings.d.ts.map +1 -0
- package/dist/core/browser/settings.js +30 -0
- package/dist/core/browser/settings.js.map +1 -0
- package/dist/core/browser/setup.d.ts +2 -0
- package/dist/core/browser/setup.d.ts.map +1 -0
- package/dist/core/browser/setup.js +16 -0
- package/dist/core/browser/setup.js.map +1 -0
- package/dist/core/catalog-cache-scope.d.ts.map +1 -1
- package/dist/core/catalog-cache-scope.js +3 -1
- package/dist/core/catalog-cache-scope.js.map +1 -1
- package/dist/core/computer-use/image.d.ts +1 -0
- package/dist/core/computer-use/image.d.ts.map +1 -1
- package/dist/core/computer-use/image.js +8 -0
- package/dist/core/computer-use/image.js.map +1 -1
- package/dist/core/computer-use/schemas.d.ts +1 -0
- package/dist/core/computer-use/schemas.d.ts.map +1 -1
- package/dist/core/computer-use/schemas.js +2 -1
- package/dist/core/computer-use/schemas.js.map +1 -1
- package/dist/core/computer-use/workflow.d.ts.map +1 -1
- package/dist/core/computer-use/workflow.js +89 -23
- package/dist/core/computer-use/workflow.js.map +1 -1
- package/dist/core/customize.d.ts.map +1 -1
- package/dist/core/customize.js +15 -14
- package/dist/core/customize.js.map +1 -1
- package/dist/core/export-html/index.d.ts.map +1 -1
- package/dist/core/export-html/index.js +1 -1
- package/dist/core/export-html/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 +1 -1
- package/dist/core/extensions/runner.js.map +1 -1
- package/dist/core/extensions/types.d.ts +1 -1
- package/dist/core/extensions/types.d.ts.map +1 -1
- package/dist/core/extensions/types.js.map +1 -1
- package/dist/core/install-features.d.ts.map +1 -1
- package/dist/core/install-features.js +10 -8
- package/dist/core/install-features.js.map +1 -1
- package/dist/core/memory-cap.d.ts.map +1 -1
- package/dist/core/memory-cap.js +5 -3
- package/dist/core/memory-cap.js.map +1 -1
- package/dist/core/model-runtime.d.ts.map +1 -1
- package/dist/core/model-runtime.js +3 -2
- package/dist/core/model-runtime.js.map +1 -1
- package/dist/core/model-tiers.d.ts.map +1 -1
- package/dist/core/model-tiers.js +9 -6
- package/dist/core/model-tiers.js.map +1 -1
- package/dist/core/permissions.d.ts +16 -23
- package/dist/core/permissions.d.ts.map +1 -1
- package/dist/core/permissions.js +71 -142
- package/dist/core/permissions.js.map +1 -1
- package/dist/core/plan-mode.d.ts +10 -12
- package/dist/core/plan-mode.d.ts.map +1 -1
- package/dist/core/plan-mode.js +20 -19
- package/dist/core/plan-mode.js.map +1 -1
- package/dist/core/process-registry.d.ts.map +1 -1
- package/dist/core/process-registry.js +6 -4
- package/dist/core/process-registry.js.map +1 -1
- package/dist/core/runtime-bridges.d.ts.map +1 -1
- package/dist/core/runtime-bridges.js +2 -0
- package/dist/core/runtime-bridges.js.map +1 -1
- package/dist/core/runtime-scope.d.ts +11 -0
- package/dist/core/runtime-scope.d.ts.map +1 -0
- package/dist/core/runtime-scope.js +3 -0
- package/dist/core/runtime-scope.js.map +1 -0
- package/dist/core/sdk.d.ts.map +1 -1
- package/dist/core/sdk.js +26 -6
- package/dist/core/sdk.js.map +1 -1
- package/dist/core/session-handoff.d.ts +35 -0
- package/dist/core/session-handoff.d.ts.map +1 -0
- package/dist/core/session-handoff.js +214 -0
- package/dist/core/session-handoff.js.map +1 -0
- package/dist/core/session-manager.d.ts +20 -0
- package/dist/core/session-manager.d.ts.map +1 -1
- package/dist/core/session-manager.js +191 -22
- package/dist/core/session-manager.js.map +1 -1
- package/dist/core/session-ownership.d.ts +28 -0
- package/dist/core/session-ownership.d.ts.map +1 -0
- package/dist/core/session-ownership.js +138 -0
- package/dist/core/session-ownership.js.map +1 -0
- package/dist/core/session-retention.d.ts.map +1 -1
- package/dist/core/session-retention.js +11 -2
- package/dist/core/session-retention.js.map +1 -1
- package/dist/core/settings-manager.d.ts +20 -1
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +67 -1
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/slash-commands.d.ts.map +1 -1
- package/dist/core/slash-commands.js +6 -4
- package/dist/core/slash-commands.js.map +1 -1
- package/dist/core/subagent-permission-inherit.d.ts +6 -10
- package/dist/core/subagent-permission-inherit.d.ts.map +1 -1
- package/dist/core/subagent-permission-inherit.js +14 -14
- package/dist/core/subagent-permission-inherit.js.map +1 -1
- package/dist/core/subagent-wait-interruption.d.ts +11 -0
- package/dist/core/subagent-wait-interruption.d.ts.map +1 -0
- package/dist/core/subagent-wait-interruption.js +19 -0
- package/dist/core/subagent-wait-interruption.js.map +1 -0
- package/dist/core/system-prompt.d.ts +2 -0
- package/dist/core/system-prompt.d.ts.map +1 -1
- package/dist/core/system-prompt.js +14 -4
- package/dist/core/system-prompt.js.map +1 -1
- package/dist/core/todo-settings.d.ts +5 -0
- package/dist/core/todo-settings.d.ts.map +1 -0
- package/dist/core/todo-settings.js +7 -0
- package/dist/core/todo-settings.js.map +1 -0
- package/dist/core/tools/bash.d.ts.map +1 -1
- package/dist/core/tools/bash.js +4 -4
- package/dist/core/tools/bash.js.map +1 -1
- package/dist/core/tools/edit.d.ts.map +1 -1
- package/dist/core/tools/edit.js +5 -3
- package/dist/core/tools/edit.js.map +1 -1
- package/dist/core/tools/find.d.ts.map +1 -1
- package/dist/core/tools/find.js +4 -4
- package/dist/core/tools/find.js.map +1 -1
- package/dist/core/tools/grep.d.ts.map +1 -1
- package/dist/core/tools/grep.js +4 -4
- package/dist/core/tools/grep.js.map +1 -1
- package/dist/core/tools/ls.d.ts.map +1 -1
- package/dist/core/tools/ls.js +4 -4
- package/dist/core/tools/ls.js.map +1 -1
- package/dist/core/tools/read.d.ts.map +1 -1
- package/dist/core/tools/read.js +4 -4
- package/dist/core/tools/read.js.map +1 -1
- package/dist/core/tools/render-utils.d.ts +14 -5
- package/dist/core/tools/render-utils.d.ts.map +1 -1
- package/dist/core/tools/render-utils.js +34 -7
- package/dist/core/tools/render-utils.js.map +1 -1
- package/dist/core/tools/write.d.ts.map +1 -1
- package/dist/core/tools/write.js +4 -4
- package/dist/core/tools/write.js.map +1 -1
- package/dist/core/usage-service.d.ts.map +1 -1
- package/dist/core/usage-service.js +5 -3
- package/dist/core/usage-service.js.map +1 -1
- package/dist/gateway/adapters/discord.d.ts +12 -1
- package/dist/gateway/adapters/discord.d.ts.map +1 -1
- package/dist/gateway/adapters/discord.js +114 -24
- package/dist/gateway/adapters/discord.js.map +1 -1
- package/dist/gateway/adapters/telegram.d.ts +4 -2
- package/dist/gateway/adapters/telegram.d.ts.map +1 -1
- package/dist/gateway/adapters/telegram.js +41 -11
- package/dist/gateway/adapters/telegram.js.map +1 -1
- package/dist/gateway/agent-bridge.d.ts +18 -4
- package/dist/gateway/agent-bridge.d.ts.map +1 -1
- package/dist/gateway/agent-bridge.js +305 -73
- package/dist/gateway/agent-bridge.js.map +1 -1
- package/dist/gateway/approval.d.ts +3 -6
- package/dist/gateway/approval.d.ts.map +1 -1
- package/dist/gateway/approval.js +62 -24
- package/dist/gateway/approval.js.map +1 -1
- package/dist/gateway/authz.d.ts +2 -0
- package/dist/gateway/authz.d.ts.map +1 -1
- package/dist/gateway/authz.js +13 -0
- package/dist/gateway/authz.js.map +1 -1
- package/dist/gateway/buttons.d.ts +3 -1
- package/dist/gateway/buttons.d.ts.map +1 -1
- package/dist/gateway/buttons.js +45 -20
- package/dist/gateway/buttons.js.map +1 -1
- package/dist/gateway/command.d.ts.map +1 -1
- package/dist/gateway/command.js +49 -4
- package/dist/gateway/command.js.map +1 -1
- package/dist/gateway/commands.d.ts +2 -0
- package/dist/gateway/commands.d.ts.map +1 -1
- package/dist/gateway/commands.js +52 -16
- package/dist/gateway/commands.js.map +1 -1
- package/dist/gateway/config.d.ts +6 -0
- package/dist/gateway/config.d.ts.map +1 -1
- package/dist/gateway/config.js +7 -0
- package/dist/gateway/config.js.map +1 -1
- package/dist/gateway/conversations.d.ts +14 -0
- package/dist/gateway/conversations.d.ts.map +1 -0
- package/dist/gateway/conversations.js +30 -0
- package/dist/gateway/conversations.js.map +1 -0
- package/dist/gateway/cron.d.ts +1 -1
- package/dist/gateway/cron.d.ts.map +1 -1
- package/dist/gateway/cron.js +2 -2
- package/dist/gateway/cron.js.map +1 -1
- package/dist/gateway/download.d.ts +2 -0
- package/dist/gateway/download.d.ts.map +1 -0
- package/dist/gateway/download.js +36 -0
- package/dist/gateway/download.js.map +1 -0
- package/dist/gateway/index.d.ts.map +1 -1
- package/dist/gateway/index.js +106 -47
- package/dist/gateway/index.js.map +1 -1
- package/dist/gateway/mobile-commands.d.ts +24 -0
- package/dist/gateway/mobile-commands.d.ts.map +1 -0
- package/dist/gateway/mobile-commands.js +423 -0
- package/dist/gateway/mobile-commands.js.map +1 -0
- package/dist/gateway/presenter.d.ts +27 -0
- package/dist/gateway/presenter.d.ts.map +1 -0
- package/dist/gateway/presenter.js +308 -0
- package/dist/gateway/presenter.js.map +1 -0
- package/dist/gateway/router.d.ts +6 -5
- package/dist/gateway/router.d.ts.map +1 -1
- package/dist/gateway/router.js +126 -43
- package/dist/gateway/router.js.map +1 -1
- package/dist/gateway/service.d.ts +46 -0
- package/dist/gateway/service.d.ts.map +1 -0
- package/dist/gateway/service.js +404 -0
- package/dist/gateway/service.js.map +1 -0
- package/dist/gateway/setup.d.ts +9 -0
- package/dist/gateway/setup.d.ts.map +1 -0
- package/dist/gateway/setup.js +202 -0
- package/dist/gateway/setup.js.map +1 -0
- package/dist/gateway/stream.d.ts +6 -5
- package/dist/gateway/stream.d.ts.map +1 -1
- package/dist/gateway/stream.js +24 -11
- package/dist/gateway/stream.js.map +1 -1
- package/dist/gateway/types.d.ts +4 -2
- package/dist/gateway/types.d.ts.map +1 -1
- package/dist/gateway/types.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +3 -3
- package/dist/main.js.map +1 -1
- package/dist/modes/interactive/components/assistant-message.d.ts +19 -2
- package/dist/modes/interactive/components/assistant-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/assistant-message.js +78 -17
- package/dist/modes/interactive/components/assistant-message.js.map +1 -1
- package/dist/modes/interactive/components/copyable-text.d.ts +27 -0
- package/dist/modes/interactive/components/copyable-text.d.ts.map +1 -0
- package/dist/modes/interactive/components/copyable-text.js +156 -0
- package/dist/modes/interactive/components/copyable-text.js.map +1 -0
- package/dist/modes/interactive/components/custom-entry.d.ts +1 -0
- package/dist/modes/interactive/components/custom-entry.d.ts.map +1 -1
- package/dist/modes/interactive/components/custom-entry.js +8 -0
- package/dist/modes/interactive/components/custom-entry.js.map +1 -1
- package/dist/modes/interactive/components/custom-message.d.ts +1 -0
- package/dist/modes/interactive/components/custom-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/custom-message.js +8 -0
- package/dist/modes/interactive/components/custom-message.js.map +1 -1
- package/dist/modes/interactive/components/session-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/session-selector.js +16 -0
- package/dist/modes/interactive/components/session-selector.js.map +1 -1
- package/dist/modes/interactive/components/settings-selector.d.ts +12 -1
- package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector.js +74 -3
- package/dist/modes/interactive/components/settings-selector.js.map +1 -1
- package/dist/modes/interactive/components/thinking-tail.d.ts +9 -2
- package/dist/modes/interactive/components/thinking-tail.d.ts.map +1 -1
- package/dist/modes/interactive/components/thinking-tail.js +43 -1
- package/dist/modes/interactive/components/thinking-tail.js.map +1 -1
- package/dist/modes/interactive/components/tool-execution.d.ts +5 -3
- package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
- package/dist/modes/interactive/components/tool-execution.js +44 -45
- package/dist/modes/interactive/components/tool-execution.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +10 -2
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +342 -133
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/interactive/theme/theme.d.ts +1 -0
- package/dist/modes/interactive/theme/theme.d.ts.map +1 -1
- package/dist/modes/interactive/theme/theme.js +23 -0
- package/dist/modes/interactive/theme/theme.js.map +1 -1
- package/dist/node-runtime/agent-session-services-MQUPZSIN.js +51 -0
- package/dist/node-runtime/{builtin-extensions-SRCYQPZ6.js → builtin-extensions-4GNDR6U3.js} +7 -6
- package/dist/node-runtime/{chunk-LTXUQJI4.js → chunk-24C5IAJ4.js} +1 -6
- package/dist/node-runtime/chunk-2BLXLDJR.js +144 -0
- package/dist/node-runtime/{chunk-RQ5DNUNG.js → chunk-2CMV4L24.js} +21 -124
- package/dist/node-runtime/{chunk-LTYWTR3V.js → chunk-2MI5OPMN.js} +17 -2
- package/dist/node-runtime/{chunk-W3CVH5RX.js → chunk-2TKODGBZ.js} +11 -6
- package/dist/node-runtime/{chunk-GT5F3OKM.js → chunk-33SIKK3Y.js} +38 -164
- package/dist/node-runtime/{chunk-GZQHMEWL.js → chunk-3DKIWPKN.js} +19 -4
- package/dist/node-runtime/{chunk-3GHXVUAK.js → chunk-3VEY2IYY.js} +1 -1
- package/dist/node-runtime/chunk-4ER2ZV4Z.js +537 -0
- package/dist/node-runtime/chunk-4EULYYR4.js +62 -0
- package/dist/node-runtime/{chunk-LOYUC2ID.js → chunk-4SBQAI4T.js} +27 -27
- package/dist/node-runtime/{chunk-CZUBYPFP.js → chunk-53ARRUHA.js} +674 -257
- package/dist/node-runtime/{chunk-VTPM5V35.js → chunk-5Q4A37RB.js} +10 -4
- package/dist/node-runtime/{chunk-SWSN6HAB.js → chunk-5UZOPGE3.js} +1 -1
- package/dist/node-runtime/{chunk-XSRCAQK2.js → chunk-5Z5PCXGY.js} +263 -222
- package/dist/node-runtime/chunk-7JIYPIQU.js +356 -0
- package/dist/node-runtime/{chunk-D466UAID.js → chunk-AJ6R5VTV.js} +60 -88
- package/dist/node-runtime/chunk-ATIF3RX5.js +352 -0
- package/dist/node-runtime/{chunk-A3KMVBZV.js → chunk-BBUVIEZB.js} +1 -10
- package/dist/node-runtime/chunk-CCCN2UCX.js +14 -0
- package/dist/node-runtime/chunk-CJS4KQFI.js +3412 -0
- package/dist/node-runtime/chunk-DO6PALE2.js +205 -0
- package/dist/node-runtime/{chunk-N3PNL74S.js → chunk-DRJI7ZSC.js} +63 -163
- package/dist/node-runtime/{chunk-VTGEKB7R.js → chunk-E75WFZ33.js} +1 -1
- package/dist/node-runtime/{chunk-MJQDX3BA.js → chunk-EBB4BJW4.js} +3 -3
- package/dist/node-runtime/{chunk-VQ4UBWSA.js → chunk-EOEAQIJV.js} +63 -6
- package/dist/node-runtime/chunk-EOPL2HMM.js +117 -0
- package/dist/node-runtime/chunk-H4K3JDRB.js +47 -0
- package/dist/node-runtime/{chunk-HRS4HMDX.js → chunk-HT2XEJNP.js} +19 -3
- package/dist/node-runtime/chunk-IMLCWLPI.js +9 -0
- package/dist/node-runtime/{chunk-BJ6H7DPI.js → chunk-JJWZB7S3.js} +62 -50
- package/dist/node-runtime/chunk-KFFOQR4G.js +672 -0
- package/dist/node-runtime/chunk-L5LZUGT7.js +40 -0
- package/dist/node-runtime/chunk-LV6CEFW2.js +97 -0
- package/dist/node-runtime/{chunk-VSELYKWU.js → chunk-LWYIVUGV.js} +2 -1
- package/dist/node-runtime/{chunk-BYQ2MOFI.js → chunk-MFV2LOOX.js} +184 -2192
- package/dist/node-runtime/{chunk-5SQDLSZJ.js → chunk-MNRO3UCV.js} +2 -2
- package/dist/node-runtime/{chunk-JHYKXIMM.js → chunk-MPKSOJBT.js} +1 -1
- package/dist/node-runtime/{chunk-C4O2RSQQ.js → chunk-N4TUWAGA.js} +1 -1
- package/dist/node-runtime/{chunk-7NBZ5P7I.js → chunk-NAY6UUQZ.js} +1 -1
- package/dist/node-runtime/chunk-NKH2QBKF.js +773 -0
- package/dist/node-runtime/chunk-O2AT4MEU.js +124 -0
- package/dist/node-runtime/chunk-OAR4TYZE.js +146 -0
- package/dist/node-runtime/{chunk-DDGMHUOW.js → chunk-OGJN3OZV.js} +2 -1
- package/dist/node-runtime/{chunk-MX3GJNXJ.js → chunk-PLGA743X.js} +23 -0
- package/dist/node-runtime/chunk-Q3FEOEDA.js +1364 -0
- package/dist/node-runtime/{chunk-H2BI7G7T.js → chunk-QFADHUQV.js} +2 -1
- package/dist/node-runtime/{chunk-W3SILANP.js → chunk-RBZQU6TJ.js} +12 -9
- package/dist/node-runtime/{chunk-ZVSORYRM.js → chunk-RVOQBXTA.js} +10 -6
- package/dist/node-runtime/{chunk-HXJS2PJM.js → chunk-RW4PYFNE.js} +14 -94
- package/dist/node-runtime/chunk-TP7K7YWS.js +2830 -0
- package/dist/node-runtime/{chunk-ZOIIMEN6.js → chunk-TVLBDVTR.js} +32 -21
- package/dist/node-runtime/chunk-UAEOTO52.js +119 -0
- package/dist/node-runtime/{chunk-MGWCVY6Y.js → chunk-UDKX3PFN.js} +3 -3
- package/dist/node-runtime/{chunk-AY6CAJSL.js → chunk-UJOCPOMX.js} +6 -3
- package/dist/node-runtime/{chunk-WJVFOIB5.js → chunk-UQUCFAJ3.js} +1 -1
- package/dist/node-runtime/chunk-US544NN6.js +13 -0
- package/dist/node-runtime/{chunk-7AFOFSDY.js → chunk-V3HK3FE7.js} +1 -1
- package/dist/node-runtime/{chunk-6UB6NKA3.js → chunk-VIVYOI7C.js} +130 -27
- package/dist/node-runtime/{chunk-MW2XJZIK.js → chunk-XHIRAZ26.js} +1 -1
- package/dist/node-runtime/chunk-YPHAIRZT.js +10 -0
- package/dist/node-runtime/{chunk-3RCWXWAY.js → chunk-YRUY57IN.js} +1 -1
- package/dist/node-runtime/cli-runtime.js +2 -2
- package/dist/node-runtime/command-PYBNGLPP.js +45 -0
- package/dist/node-runtime/{commands-BZGSLIP7.js → commands-EMBQQVVT.js} +13 -13
- package/dist/node-runtime/commands-Y2OUC2T7.js +37 -0
- package/dist/node-runtime/config-7DYMNJUO.js +20 -0
- package/dist/node-runtime/{customize-LF5VST47.js → customize-VFJV3U6A.js} +2 -1
- package/dist/node-runtime/{direct-tool-executor-BSZDHIYR.js → direct-tool-executor-4D7UXYU4.js} +10 -10
- package/dist/node-runtime/{export-html-E4DT6ZJQ.js → export-html-ETFOKW3M.js} +4 -3
- package/dist/node-runtime/{extension-input-RV5N6APL.js → extension-input-7QODTFAS.js} +4 -4
- package/dist/node-runtime/{extension-selector-CPD5LWDD.js → extension-selector-T65JEDJ5.js} +4 -4
- package/dist/node-runtime/{extract-XLQSJN4V.js → extract-EQJE7FZZ.js} +2 -2
- package/dist/node-runtime/gateway-QENRQA5X.js +1476 -0
- package/dist/node-runtime/{gemini-search-U7SUMPQA.js → gemini-search-35OCRFLN.js} +1 -1
- package/dist/node-runtime/{gemini-url-context-PXWCBQHK.js → gemini-url-context-UQY3PHHW.js} +2 -2
- package/dist/node-runtime/index.js +113 -73
- package/dist/node-runtime/{init-DVJUAOUO.js → init-P5AUV77I.js} +5 -5
- package/dist/node-runtime/{install-cli-TH7IJJQQ.js → install-cli-KHAXYBOO.js} +21 -82
- package/dist/node-runtime/interactive-mode-IN77GQGX.js +74 -0
- package/dist/node-runtime/{interactive-view-N6F4KUIT.js → interactive-view-OMWDFGUQ.js} +10 -10
- package/dist/node-runtime/lunr-browser-VVPRWC3F.js +174 -0
- package/dist/node-runtime/{lunr-computer-use-TJNDAMWM.js → lunr-computer-use-IAUNXSXH.js} +11 -8
- package/dist/node-runtime/{lunr-cron-J64I72C6.js → lunr-cron-P6ZJGVEF.js} +21 -7
- package/dist/node-runtime/main.js +47 -34
- package/dist/node-runtime/{mcp-auth-flow-YL6RWPYG.js → mcp-auth-flow-QVLFVLEO.js} +2 -2
- package/dist/node-runtime/{memory-cap-3S4XRLNP.js → memory-cap-EL3KL4JJ.js} +2 -1
- package/dist/node-runtime/mobile-commands-WKFSFACZ.js +33 -0
- package/dist/node-runtime/model-runtime-YXGJS5OJ.js +16 -0
- package/dist/node-runtime/{model-tiers-NJLHUEGK.js → model-tiers-OU3U5CZG.js} +2 -1
- package/dist/node-runtime/{package-manager-cli-VMYX4Y2S.js → package-manager-cli-J337RKTI.js} +25 -17
- package/dist/node-runtime/{pi-intercom-NV2LW6X7.js → pi-intercom-QM53RLTS.js} +6 -1
- package/dist/node-runtime/{pi-mcp-adapter-JLB5YL2F.js → pi-mcp-adapter-3PHF4KZ4.js} +8 -7
- package/dist/node-runtime/{pi-subagents-WEHV3W7H.js → pi-subagents-RCHPB6UK.js} +255 -88
- package/dist/node-runtime/{pi-web-access-FN5YC5T6.js → pi-web-access-PNG35XW7.js} +15 -15
- package/dist/node-runtime/process-registry-PVJ44F7H.js +31 -0
- package/dist/node-runtime/{proxy-modes-OR7ISBXK.js → proxy-modes-5FAPSZEZ.js} +11 -11
- package/dist/node-runtime/rpc-entry.js +47 -34
- package/dist/node-runtime/{rpc-mode-SJNSOA4G.js → rpc-mode-SH7VB4RH.js} +2 -2
- package/dist/node-runtime/runtime-4VA6JKNF.js +373 -0
- package/dist/node-runtime/runtime-bridges-3CQHWVVY.js +21 -0
- package/dist/node-runtime/service-HGGU3STY.js +36 -0
- package/dist/node-runtime/session-handoff-IAFIK7QP.js +33 -0
- package/dist/node-runtime/{session-manager-QEMZBMTM.js → session-manager-TCEFDKBL.js} +2 -1
- package/dist/node-runtime/{session-selector-URVJLOTK.js → session-selector-HG5J4BDZ.js} +5 -4
- package/dist/node-runtime/{settings-manager-3CCU326G.js → settings-manager-HIBIUNBK.js} +12 -5
- package/dist/node-runtime/setup-JBKOLJ6F.js +18 -0
- package/dist/node-runtime/setup-YU5LKRL3.js +215 -0
- package/dist/node-runtime/{subagent-executor-CXKXQDHH.js → subagent-executor-2BH76MMS.js} +64 -23
- package/dist/node-runtime/theme-WTJWZSGD.js +68 -0
- package/dist/node-runtime/trust-manager-6ZQANSBX.js +17 -0
- package/dist/node-runtime/{update-cli-NM7B4CKL.js → update-cli-TVTPVUNM.js} +6 -3
- package/dist/node-runtime/usage-service-LFB2SWYV.js +37 -0
- package/dist/node-runtime/{video-extract-OYT5WKS5.js → video-extract-OOZHR7SU.js} +2 -2
- package/dist/node-runtime/{workflow-C26QCUTW.js → workflow-TVJNKKQP.js} +80 -39
- package/dist/node-runtime/{youtube-extract-TQYKGFGS.js → youtube-extract-FNPAUNHU.js} +6 -6
- package/dist/startup/interactive-view.d.ts.map +1 -1
- package/dist/startup/interactive-view.js +5 -1
- package/dist/startup/interactive-view.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 +10 -0
- package/dist/utils/image-resize-core.js.map +1 -1
- package/docs/browser.md +86 -0
- package/docs/computer-use.md +134 -48
- package/docs/extensions.md +2 -0
- package/docs/features.md +108 -27
- package/docs/index.md +1 -1
- package/docs/interactive-startup.md +2 -1
- package/docs/keybindings.md +1 -1
- package/docs/providers.md +6 -2
- package/docs/quickstart.md +2 -2
- package/docs/sessions.md +10 -0
- package/docs/settings.md +3 -1
- package/docs/tui.md +2 -0
- package/docs/usage.md +20 -4
- 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/package.json +1 -1
- package/examples/extensions/gondolin/package-lock.json +2 -2
- package/examples/extensions/gondolin/package.json +1 -1
- package/examples/extensions/plan-mode/README.md +1 -1
- package/examples/extensions/sandbox/package-lock.json +2 -2
- package/examples/extensions/sandbox/package.json +1 -1
- package/examples/extensions/with-deps/package-lock.json +2 -2
- package/examples/extensions/with-deps/package.json +1 -1
- package/install-lock/package-lock.json +39 -25
- package/install-lock/package.json +2 -2
- package/npm-shrinkwrap.json +36 -22
- package/package.json +10 -7
- package/scripts/install-browser.mjs +20 -0
- package/dist/node-runtime/agent-session-services-QANFGM2V.js +0 -40
- package/dist/node-runtime/chunk-LISUTZS3.js +0 -19
- package/dist/node-runtime/chunk-VGYZ3APQ.js +0 -59
- package/dist/node-runtime/chunk-XAUQOKYK.js +0 -6011
- package/dist/node-runtime/command-ZURZJDXF.js +0 -13
- package/dist/node-runtime/gateway-FWHRIBK5.js +0 -2139
- package/dist/node-runtime/interactive-mode-BBASNWHN.js +0 -62
- package/dist/node-runtime/runtime-bridges-2VQTLPOZ.js +0 -12
- package/dist/node-runtime/{chunk-U6C7VTR5.js → chunk-7IQGBKBJ.js} +3 -3
- package/dist/node-runtime/{mcp-panel-IIGMXQGP.js → mcp-panel-KTTFXJZ4.js} +3 -3
- package/dist/node-runtime/{src-BPQFJR76.js → src-IVPNZ2BX.js} +9 -9
|
@@ -34,8 +34,10 @@ import { expandPromptTemplate } from "./prompt-templates.js";
|
|
|
34
34
|
import { rollbackSnapshotBeforeWrite } from "./rollback.js";
|
|
35
35
|
import { CURRENT_SESSION_VERSION, getLatestCompactionEntry } from "./session-manager.js";
|
|
36
36
|
import { createSyntheticSourceInfo } from "./source-info.js";
|
|
37
|
+
import { registerSubagentWaitInterruptionOwner, } from "./subagent-wait-interruption.js";
|
|
37
38
|
import { buildSystemPrompt } from "./system-prompt.js";
|
|
38
39
|
import { measureStartup } from "./timings.js";
|
|
40
|
+
import { TODO_TOOL_NAMES } from "./todo-settings.js";
|
|
39
41
|
import { createLocalBashOperations } from "./tools/bash.js";
|
|
40
42
|
import { createAllToolDefinitions } from "./tools/index.js";
|
|
41
43
|
import { createToolDefinitionFromAgentTool } from "./tools/tool-definition-wrapper.js";
|
|
@@ -89,6 +91,11 @@ export class AgentSession {
|
|
|
89
91
|
_isAgentRunActive = false;
|
|
90
92
|
_idleWaitPromise;
|
|
91
93
|
_resolveIdleWait;
|
|
94
|
+
_activePromptRun;
|
|
95
|
+
_waitPromptHandoff;
|
|
96
|
+
_waitPromptAcceptance = Promise.resolve();
|
|
97
|
+
_waitPromptGeneration = 0;
|
|
98
|
+
_unregisterSubagentWaitInterruptionOwners = [];
|
|
92
99
|
/** Tracks pending steering messages for UI display. Removed when delivered. */
|
|
93
100
|
_steeringMessages = [];
|
|
94
101
|
/** Tracks pending follow-up messages for UI display. Removed when delivered. */
|
|
@@ -139,9 +146,9 @@ export class AgentSession {
|
|
|
139
146
|
_baseSystemPrompt = "";
|
|
140
147
|
_baseSystemPromptOptions;
|
|
141
148
|
_systemPromptOverride;
|
|
142
|
-
// lunr: core-owned system-prompt append (
|
|
149
|
+
// lunr: core-owned system-prompt append (read-only mode addendum) applied on top of base/override
|
|
143
150
|
_systemPromptAppend;
|
|
144
|
-
// lunr: core-owned tool-call gates (
|
|
151
|
+
// lunr: core-owned tool-call gates (read-only mode) checked before extension tool_call handlers
|
|
145
152
|
_toolCallGates = [];
|
|
146
153
|
constructor(config) {
|
|
147
154
|
this.agent = config.agent;
|
|
@@ -160,6 +167,10 @@ export class AgentSession {
|
|
|
160
167
|
this._excludedToolNames = config.excludedToolNames ? new Set(config.excludedToolNames) : undefined;
|
|
161
168
|
this._baseToolsOverride = config.baseToolsOverride;
|
|
162
169
|
this._sessionStartEvent = config.sessionStartEvent ?? { type: "session_start", reason: "startup" };
|
|
170
|
+
const waitInterruptionOwner = { register: () => this._registerSubagentWaitInterruption() };
|
|
171
|
+
for (const identity of new Set([this.sessionId, this.sessionFile].filter((value) => !!value))) {
|
|
172
|
+
this._unregisterSubagentWaitInterruptionOwners.push(registerSubagentWaitInterruptionOwner(identity, waitInterruptionOwner));
|
|
173
|
+
}
|
|
163
174
|
// Always subscribe to agent events for internal handling
|
|
164
175
|
// (session persistence, extensions, auto-compaction, retry logic)
|
|
165
176
|
this._unsubscribeAgent = this.agent.subscribe(this._handleAgentEvent);
|
|
@@ -273,7 +284,7 @@ export class AgentSession {
|
|
|
273
284
|
catch {
|
|
274
285
|
// rollback failures must never block the tool call
|
|
275
286
|
}
|
|
276
|
-
// lunr: core-owned gates (
|
|
287
|
+
// lunr: core-owned gates (read-only mode) run first, even without extension handlers
|
|
277
288
|
for (const gate of this._toolCallGates) {
|
|
278
289
|
const gateResult = gate(toolCall.name, args);
|
|
279
290
|
if (gateResult?.block) {
|
|
@@ -640,7 +651,21 @@ export class AgentSession {
|
|
|
640
651
|
* Remove all listeners and disconnect from agent.
|
|
641
652
|
* Call this when completely done with the session.
|
|
642
653
|
*/
|
|
654
|
+
transferring = false;
|
|
655
|
+
setTransferring(value) {
|
|
656
|
+
this.transferring = value;
|
|
657
|
+
if (value)
|
|
658
|
+
this._invalidateWaitPromptHandoffs("Session transfer interrupted the pending prompt.");
|
|
659
|
+
}
|
|
660
|
+
assertCanStartWork() {
|
|
661
|
+
this.sessionManager.assertWritable();
|
|
662
|
+
if (this.transferring)
|
|
663
|
+
throw new Error("Session transfer is in progress. Wait or reclaim the session.");
|
|
664
|
+
}
|
|
643
665
|
dispose() {
|
|
666
|
+
this._invalidateWaitPromptHandoffs("Session closed before the pending prompt could run.");
|
|
667
|
+
for (const unregister of this._unregisterSubagentWaitInterruptionOwners.splice(0))
|
|
668
|
+
unregister();
|
|
644
669
|
try {
|
|
645
670
|
this.abortRetry();
|
|
646
671
|
this.abortCompaction();
|
|
@@ -655,6 +680,7 @@ export class AgentSession {
|
|
|
655
680
|
this._disconnectFromAgent();
|
|
656
681
|
this._eventListeners = [];
|
|
657
682
|
cleanupSessionResources(this.sessionId);
|
|
683
|
+
this.sessionManager.dispose();
|
|
658
684
|
}
|
|
659
685
|
// =========================================================================
|
|
660
686
|
// Read-only State Access
|
|
@@ -679,12 +705,16 @@ export class AgentSession {
|
|
|
679
705
|
get isIdle() {
|
|
680
706
|
return !this._isAgentRunActive;
|
|
681
707
|
}
|
|
708
|
+
/** Whether normal Enter is still being reserved for an interrupted wait handoff. */
|
|
709
|
+
get isWaitPromptHandoffActive() {
|
|
710
|
+
return this._waitPromptHandoff?.accepting === true;
|
|
711
|
+
}
|
|
682
712
|
/** Current effective system prompt (includes any per-turn extension modifications) */
|
|
683
713
|
get systemPrompt() {
|
|
684
714
|
return this.agent.state.systemPrompt;
|
|
685
715
|
}
|
|
686
716
|
/**
|
|
687
|
-
* lunr: register a core-owned tool-call gate (
|
|
717
|
+
* lunr: register a core-owned tool-call gate (read-only mode). Gates run before extension
|
|
688
718
|
* tool_call handlers and even when no extension handles tool_call. Returns an
|
|
689
719
|
* unsubscribe function.
|
|
690
720
|
*/
|
|
@@ -857,6 +887,7 @@ export class AgentSession {
|
|
|
857
887
|
this._baseSystemPromptOptions = {
|
|
858
888
|
cwd: this._cwd,
|
|
859
889
|
modelSlug: this.model ? `${this.model.provider}/${this.model.id}` : undefined,
|
|
890
|
+
automaticSubagentDelegation: this.settingsManager.getAutomaticSubagentDelegation(),
|
|
860
891
|
skills: loadedSkills,
|
|
861
892
|
contextFiles,
|
|
862
893
|
customPrompt: loaderSystemPrompt,
|
|
@@ -874,24 +905,67 @@ export class AgentSession {
|
|
|
874
905
|
// =========================================================================
|
|
875
906
|
// Prompting
|
|
876
907
|
// =========================================================================
|
|
908
|
+
_registerSubagentWaitInterruption() {
|
|
909
|
+
const run = this._activePromptRun;
|
|
910
|
+
const ownerSignal = this.agent.signal;
|
|
911
|
+
const wait = run && ownerSignal ? { controller: new AbortController(), interrupted: false, ownerSignal } : undefined;
|
|
912
|
+
if (run && wait) {
|
|
913
|
+
run.waits.add(wait);
|
|
914
|
+
if (run.gracefulStopRequested) {
|
|
915
|
+
wait.interrupted = true;
|
|
916
|
+
wait.controller.abort();
|
|
917
|
+
}
|
|
918
|
+
}
|
|
919
|
+
const signal = wait?.controller.signal ?? new AbortController().signal;
|
|
920
|
+
return {
|
|
921
|
+
signal,
|
|
922
|
+
wasInterrupted: () => wait?.interrupted === true,
|
|
923
|
+
unregister: () => {
|
|
924
|
+
if (wait)
|
|
925
|
+
run?.waits.delete(wait);
|
|
926
|
+
},
|
|
927
|
+
};
|
|
928
|
+
}
|
|
929
|
+
_interruptSubagentWaits(run, ownerSignal) {
|
|
930
|
+
for (const wait of run.waits) {
|
|
931
|
+
if (wait.ownerSignal !== ownerSignal)
|
|
932
|
+
continue;
|
|
933
|
+
wait.interrupted = true;
|
|
934
|
+
wait.controller.abort();
|
|
935
|
+
}
|
|
936
|
+
}
|
|
937
|
+
_invalidateWaitPromptHandoffs(message) {
|
|
938
|
+
this._waitPromptGeneration++;
|
|
939
|
+
const handoff = this._waitPromptHandoff;
|
|
940
|
+
this._waitPromptHandoff = undefined;
|
|
941
|
+
if (!handoff)
|
|
942
|
+
return;
|
|
943
|
+
const error = new Error(message);
|
|
944
|
+
for (const reservation of handoff.reservations.splice(0))
|
|
945
|
+
reservation.reject(error);
|
|
946
|
+
}
|
|
877
947
|
async _runAgentPrompt(messages) {
|
|
948
|
+
const run = { waits: new Set(), gracefulStopRequested: false };
|
|
949
|
+
this._activePromptRun = run;
|
|
878
950
|
this._isAgentRunActive = true;
|
|
879
951
|
try {
|
|
880
952
|
await this.agent.prompt(messages);
|
|
881
|
-
while (await this._handlePostAgentRun()) {
|
|
953
|
+
while (await this._handlePostAgentRun(run)) {
|
|
882
954
|
await this.agent.continue();
|
|
883
955
|
}
|
|
884
956
|
}
|
|
885
957
|
finally {
|
|
958
|
+
if (this._activePromptRun === run)
|
|
959
|
+
this._activePromptRun = undefined;
|
|
886
960
|
this._systemPromptOverride = undefined;
|
|
887
961
|
this._flushPendingBashMessages();
|
|
888
962
|
await this._emitAgentSettled();
|
|
889
963
|
}
|
|
890
964
|
}
|
|
891
|
-
async _handlePostAgentRun() {
|
|
965
|
+
async _handlePostAgentRun(run) {
|
|
892
966
|
const msg = this._lastAssistantMessage;
|
|
893
967
|
this._lastAssistantMessage = undefined;
|
|
894
|
-
if (!msg) {
|
|
968
|
+
if (!msg || run.gracefulStopRequested) {
|
|
895
969
|
return false;
|
|
896
970
|
}
|
|
897
971
|
// lunr: quota-dead or auth-invalid keys rotate immediately — same-key backoff
|
|
@@ -932,130 +1006,194 @@ export class AgentSession {
|
|
|
932
1006
|
* @throws Error if no model selected or no API key available (when not streaming)
|
|
933
1007
|
*/
|
|
934
1008
|
async prompt(text, options) {
|
|
935
|
-
|
|
1009
|
+
this.assertCanStartWork();
|
|
936
1010
|
const preflightResult = options?.preflightResult;
|
|
1011
|
+
let prepared;
|
|
937
1012
|
let messages;
|
|
938
1013
|
try {
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
if (handled) {
|
|
944
|
-
// Extension command executed, no prompt to send
|
|
945
|
-
preflightResult?.(true);
|
|
946
|
-
return;
|
|
947
|
-
}
|
|
948
|
-
}
|
|
949
|
-
// Emit input event for extension interception (before skill/template expansion)
|
|
950
|
-
let currentText = text;
|
|
951
|
-
let currentImages = options?.images;
|
|
952
|
-
if (this._extensionRunner.hasHandlers("input")) {
|
|
953
|
-
const inputResult = await this._extensionRunner.emitInput(currentText, currentImages, options?.source ?? "interactive", this.isStreaming ? options?.streamingBehavior : undefined);
|
|
954
|
-
if (inputResult.action === "handled") {
|
|
955
|
-
preflightResult?.(true);
|
|
956
|
-
return;
|
|
957
|
-
}
|
|
958
|
-
if (inputResult.action === "transform") {
|
|
959
|
-
currentText = inputResult.text;
|
|
960
|
-
currentImages = inputResult.images ?? currentImages;
|
|
961
|
-
}
|
|
962
|
-
}
|
|
963
|
-
// Expand skill commands (/skill:name args) and prompt templates (/template args)
|
|
964
|
-
let expandedText = currentText;
|
|
965
|
-
if (expandPromptTemplates) {
|
|
966
|
-
expandedText = this._expandSkillCommand(expandedText);
|
|
967
|
-
expandedText = expandPromptTemplate(expandedText, [...this.promptTemplates]);
|
|
1014
|
+
prepared = await this._preparePromptInput(text, options, this.isStreaming ? options?.streamingBehavior : undefined);
|
|
1015
|
+
if (!prepared) {
|
|
1016
|
+
preflightResult?.(true);
|
|
1017
|
+
return;
|
|
968
1018
|
}
|
|
969
|
-
// If streaming, queue via steer() or followUp() based on option
|
|
970
1019
|
if (this.isStreaming) {
|
|
971
1020
|
if (!options?.streamingBehavior) {
|
|
972
1021
|
throw new Error("Agent is already processing. Specify streamingBehavior ('steer' or 'followUp') to queue the message.");
|
|
973
1022
|
}
|
|
974
1023
|
if (options.streamingBehavior === "followUp") {
|
|
975
|
-
await this._queueFollowUp(
|
|
1024
|
+
await this._queueFollowUp(prepared.text, prepared.images);
|
|
976
1025
|
}
|
|
977
1026
|
else {
|
|
978
|
-
await this._queueSteer(
|
|
1027
|
+
await this._queueSteer(prepared.text, prepared.images);
|
|
979
1028
|
}
|
|
980
1029
|
preflightResult?.(true);
|
|
981
1030
|
return;
|
|
982
1031
|
}
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
if (
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1032
|
+
messages = await this._createPromptMessages(prepared);
|
|
1033
|
+
}
|
|
1034
|
+
catch (error) {
|
|
1035
|
+
preflightResult?.(false);
|
|
1036
|
+
throw error;
|
|
1037
|
+
}
|
|
1038
|
+
preflightResult?.(true);
|
|
1039
|
+
await this._runAgentPrompt(messages);
|
|
1040
|
+
}
|
|
1041
|
+
async _preparePromptInput(text, options, streamingBehavior) {
|
|
1042
|
+
const expandPromptTemplates = options?.expandPromptTemplates ?? true;
|
|
1043
|
+
if (expandPromptTemplates && text.startsWith("/") && (await this._tryExecuteExtensionCommand(text))) {
|
|
1044
|
+
return undefined;
|
|
1045
|
+
}
|
|
1046
|
+
let currentText = text;
|
|
1047
|
+
let currentImages = options?.images;
|
|
1048
|
+
if (this._extensionRunner.hasHandlers("input")) {
|
|
1049
|
+
const inputResult = await this._extensionRunner.emitInput(currentText, currentImages, options?.source ?? "interactive", streamingBehavior);
|
|
1050
|
+
if (inputResult.action === "handled")
|
|
1051
|
+
return undefined;
|
|
1052
|
+
if (inputResult.action === "transform") {
|
|
1053
|
+
currentText = inputResult.text;
|
|
1054
|
+
currentImages = inputResult.images ?? currentImages;
|
|
1055
|
+
}
|
|
1056
|
+
}
|
|
1057
|
+
if (expandPromptTemplates) {
|
|
1058
|
+
currentText = this._expandSkillCommand(currentText);
|
|
1059
|
+
currentText = expandPromptTemplate(currentText, [...this.promptTemplates]);
|
|
1060
|
+
}
|
|
1061
|
+
return { text: currentText, images: currentImages };
|
|
1062
|
+
}
|
|
1063
|
+
async _createPromptMessages(input) {
|
|
1064
|
+
this._flushPendingBashMessages();
|
|
1065
|
+
if (!this.model)
|
|
1066
|
+
throw new Error(formatNoModelSelectedMessage());
|
|
1067
|
+
const hasConfiguredAuth = this._modelRuntime.hasConfiguredAuth(this.model.provider) ||
|
|
1068
|
+
(await this._modelRuntime.checkAuth(this.model.provider)) !== undefined;
|
|
1069
|
+
if (!hasConfiguredAuth) {
|
|
1070
|
+
if (this._modelRuntime.isUsingOAuth(this.model.provider)) {
|
|
1071
|
+
throw new Error(`Authentication failed for "${this.model.provider}". ` +
|
|
1072
|
+
`Credentials may have expired or network is unavailable. ` +
|
|
1073
|
+
`Run '/login ${this.model.provider}' to re-authenticate.`);
|
|
1074
|
+
}
|
|
1075
|
+
throw new Error(formatNoApiKeyFoundMessage(this.model.provider));
|
|
1076
|
+
}
|
|
1077
|
+
const lastAssistant = this._findLastAssistantMessage();
|
|
1078
|
+
if (lastAssistant)
|
|
1079
|
+
await this._checkCompaction(lastAssistant, false);
|
|
1080
|
+
const userContent = [{ type: "text", text: input.text }];
|
|
1081
|
+
if (input.images)
|
|
1082
|
+
userContent.push(...input.images);
|
|
1083
|
+
const messages = [
|
|
1084
|
+
{
|
|
1014
1085
|
role: "user",
|
|
1015
1086
|
content: userContent,
|
|
1016
1087
|
timestamp: Date.now(),
|
|
1017
|
-
}
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
content: msg.content ?? [],
|
|
1033
|
-
display: msg.display,
|
|
1034
|
-
details: msg.details,
|
|
1035
|
-
timestamp: Date.now(),
|
|
1036
|
-
});
|
|
1037
|
-
}
|
|
1038
|
-
}
|
|
1039
|
-
// Apply extension-modified system prompt, or reset to base
|
|
1040
|
-
if (result?.systemPrompt !== undefined) {
|
|
1041
|
-
this._systemPromptOverride = result.systemPrompt;
|
|
1042
|
-
this.agent.state.systemPrompt = this._withSystemPromptAppend(result.systemPrompt);
|
|
1043
|
-
}
|
|
1044
|
-
else {
|
|
1045
|
-
// Ensure we're using the base prompt (in case previous turn had modifications)
|
|
1046
|
-
this._systemPromptOverride = undefined;
|
|
1047
|
-
this.agent.state.systemPrompt = this._withSystemPromptAppend(this._baseSystemPrompt);
|
|
1088
|
+
},
|
|
1089
|
+
...this._pendingNextTurnMessages,
|
|
1090
|
+
];
|
|
1091
|
+
this._pendingNextTurnMessages = [];
|
|
1092
|
+
const result = await this._extensionRunner.emitBeforeAgentStart(input.text, input.images, this._baseSystemPrompt, this._baseSystemPromptOptions);
|
|
1093
|
+
if (result?.messages) {
|
|
1094
|
+
for (const msg of result.messages) {
|
|
1095
|
+
messages.push({
|
|
1096
|
+
role: "custom",
|
|
1097
|
+
customType: msg.customType,
|
|
1098
|
+
content: msg.content ?? [],
|
|
1099
|
+
display: msg.display,
|
|
1100
|
+
details: msg.details,
|
|
1101
|
+
timestamp: Date.now(),
|
|
1102
|
+
});
|
|
1048
1103
|
}
|
|
1049
1104
|
}
|
|
1105
|
+
if (result?.systemPrompt !== undefined) {
|
|
1106
|
+
this._systemPromptOverride = result.systemPrompt;
|
|
1107
|
+
this.agent.state.systemPrompt = this._withSystemPromptAppend(result.systemPrompt);
|
|
1108
|
+
}
|
|
1109
|
+
else {
|
|
1110
|
+
this._systemPromptOverride = undefined;
|
|
1111
|
+
this.agent.state.systemPrompt = this._withSystemPromptAppend(this._baseSystemPrompt);
|
|
1112
|
+
}
|
|
1113
|
+
return messages;
|
|
1114
|
+
}
|
|
1115
|
+
async interruptSubagentWaitWithPrompt(text, options) {
|
|
1116
|
+
const acceptance = this._waitPromptAcceptance.then(() => this._reserveWaitPrompt(text, options));
|
|
1117
|
+
this._waitPromptAcceptance = acceptance.then(() => { }, () => { });
|
|
1118
|
+
return acceptance;
|
|
1119
|
+
}
|
|
1120
|
+
async _reserveWaitPrompt(text, options) {
|
|
1121
|
+
this.assertCanStartWork();
|
|
1122
|
+
const activeRun = this._activePromptRun;
|
|
1123
|
+
const existing = this._waitPromptHandoff;
|
|
1124
|
+
const activeWait = activeRun?.waits.values().next().value;
|
|
1125
|
+
const run = existing?.accepting ? existing.run : activeWait ? activeRun : undefined;
|
|
1126
|
+
const ownerSignal = existing?.accepting ? existing.ownerSignal : activeWait?.ownerSignal;
|
|
1127
|
+
if (!run || !ownerSignal)
|
|
1128
|
+
return undefined;
|
|
1129
|
+
const handoff = existing?.run === run && existing.accepting
|
|
1130
|
+
? existing
|
|
1131
|
+
: {
|
|
1132
|
+
run,
|
|
1133
|
+
ownerSignal,
|
|
1134
|
+
generation: this._waitPromptGeneration,
|
|
1135
|
+
reservations: [],
|
|
1136
|
+
draining: false,
|
|
1137
|
+
accepting: true,
|
|
1138
|
+
};
|
|
1139
|
+
this._waitPromptHandoff = handoff;
|
|
1140
|
+
let prepared;
|
|
1141
|
+
try {
|
|
1142
|
+
prepared = await this._preparePromptInput(text, options, undefined);
|
|
1143
|
+
}
|
|
1050
1144
|
catch (error) {
|
|
1051
|
-
|
|
1145
|
+
if (handoff.reservations.length === 0 && this._waitPromptHandoff === handoff) {
|
|
1146
|
+
this._waitPromptHandoff = undefined;
|
|
1147
|
+
}
|
|
1052
1148
|
throw error;
|
|
1053
1149
|
}
|
|
1054
|
-
if (!
|
|
1055
|
-
|
|
1150
|
+
if (!prepared) {
|
|
1151
|
+
if (handoff.reservations.length === 0 && this._waitPromptHandoff === handoff) {
|
|
1152
|
+
this._waitPromptHandoff = undefined;
|
|
1153
|
+
}
|
|
1154
|
+
return { completion: Promise.resolve() };
|
|
1056
1155
|
}
|
|
1057
|
-
|
|
1058
|
-
|
|
1156
|
+
let resolveCompletion = () => { };
|
|
1157
|
+
let rejectCompletion = (_error) => { };
|
|
1158
|
+
const completion = new Promise((resolve, reject) => {
|
|
1159
|
+
resolveCompletion = resolve;
|
|
1160
|
+
rejectCompletion = reject;
|
|
1161
|
+
});
|
|
1162
|
+
handoff.reservations.push({ input: prepared, resolve: resolveCompletion, reject: rejectCompletion });
|
|
1163
|
+
if (!run.gracefulStopRequested && this.agent.requestGracefulStop(handoff.ownerSignal)) {
|
|
1164
|
+
run.gracefulStopRequested = true;
|
|
1165
|
+
}
|
|
1166
|
+
this._interruptSubagentWaits(run, handoff.ownerSignal);
|
|
1167
|
+
if (!handoff.draining) {
|
|
1168
|
+
handoff.draining = true;
|
|
1169
|
+
void this._drainWaitPromptHandoff(handoff);
|
|
1170
|
+
}
|
|
1171
|
+
return { completion };
|
|
1172
|
+
}
|
|
1173
|
+
async _drainWaitPromptHandoff(handoff) {
|
|
1174
|
+
await this.waitForIdle();
|
|
1175
|
+
while (this._waitPromptHandoff === handoff &&
|
|
1176
|
+
handoff.generation === this._waitPromptGeneration &&
|
|
1177
|
+
handoff.reservations.length > 0) {
|
|
1178
|
+
const reservation = handoff.reservations[0];
|
|
1179
|
+
try {
|
|
1180
|
+
this.assertCanStartWork();
|
|
1181
|
+
const messages = await this._createPromptMessages(reservation.input);
|
|
1182
|
+
handoff.accepting = false;
|
|
1183
|
+
await this._runAgentPrompt(messages);
|
|
1184
|
+
reservation.resolve();
|
|
1185
|
+
}
|
|
1186
|
+
catch (error) {
|
|
1187
|
+
reservation.reject(error);
|
|
1188
|
+
}
|
|
1189
|
+
finally {
|
|
1190
|
+
if (handoff.reservations[0] === reservation)
|
|
1191
|
+
handoff.reservations.shift();
|
|
1192
|
+
}
|
|
1193
|
+
}
|
|
1194
|
+
handoff.accepting = false;
|
|
1195
|
+
if (this._waitPromptHandoff === handoff)
|
|
1196
|
+
this._waitPromptHandoff = undefined;
|
|
1059
1197
|
}
|
|
1060
1198
|
/**
|
|
1061
1199
|
* Try to execute an extension command. Returns true if command was found and executed.
|
|
@@ -1123,6 +1261,7 @@ export class AgentSession {
|
|
|
1123
1261
|
* @throws Error if text is an extension command
|
|
1124
1262
|
*/
|
|
1125
1263
|
async steer(text, images) {
|
|
1264
|
+
this.assertCanStartWork();
|
|
1126
1265
|
// Check for extension commands (cannot be queued)
|
|
1127
1266
|
if (text.startsWith("/")) {
|
|
1128
1267
|
this._throwIfExtensionCommand(text);
|
|
@@ -1140,6 +1279,7 @@ export class AgentSession {
|
|
|
1140
1279
|
* @throws Error if text is an extension command
|
|
1141
1280
|
*/
|
|
1142
1281
|
async followUp(text, images) {
|
|
1282
|
+
this.assertCanStartWork();
|
|
1143
1283
|
// Check for extension commands (cannot be queued)
|
|
1144
1284
|
if (text.startsWith("/")) {
|
|
1145
1285
|
this._throwIfExtensionCommand(text);
|
|
@@ -1205,6 +1345,7 @@ export class AgentSession {
|
|
|
1205
1345
|
* @param options.deliverAs Delivery mode: "steer", "followUp", or "nextTurn"
|
|
1206
1346
|
*/
|
|
1207
1347
|
async sendCustomMessage(message, options) {
|
|
1348
|
+
this.assertCanStartWork();
|
|
1208
1349
|
const appMessage = {
|
|
1209
1350
|
role: "custom",
|
|
1210
1351
|
customType: message.customType,
|
|
@@ -1305,6 +1446,7 @@ export class AgentSession {
|
|
|
1305
1446
|
* Abort current operation and wait for agent to become idle.
|
|
1306
1447
|
*/
|
|
1307
1448
|
async abort() {
|
|
1449
|
+
this._invalidateWaitPromptHandoffs("The active run was aborted before the pending prompt could run.");
|
|
1308
1450
|
this.abortRetry();
|
|
1309
1451
|
this.agent.abort();
|
|
1310
1452
|
await this.waitForIdle();
|
|
@@ -2177,7 +2319,7 @@ export class AgentSession {
|
|
|
2177
2319
|
}
|
|
2178
2320
|
void this.abort();
|
|
2179
2321
|
},
|
|
2180
|
-
hasPendingMessages: () => this.pendingMessageCount > 0,
|
|
2322
|
+
hasPendingMessages: () => this.pendingMessageCount > 0 || this.agent.hasQueuedMessages(),
|
|
2181
2323
|
shutdown: () => {
|
|
2182
2324
|
this._extensionShutdownHandler?.();
|
|
2183
2325
|
},
|
|
@@ -2214,7 +2356,9 @@ export class AgentSession {
|
|
|
2214
2356
|
const excludedToolNames = this._excludedToolNames;
|
|
2215
2357
|
const isAllowedTool = (name) => (!allowedToolNames || allowedToolNames.has(name)) &&
|
|
2216
2358
|
!excludedToolNames?.has(name) &&
|
|
2217
|
-
(this.settingsManager.getMemoryEnabled() || !MEMORY_TOOL_NAMES.has(name))
|
|
2359
|
+
(this.settingsManager.getMemoryEnabled() || !MEMORY_TOOL_NAMES.has(name)) &&
|
|
2360
|
+
(this.settingsManager.getTodosEnabled() || !TODO_TOOL_NAMES.has(name)) &&
|
|
2361
|
+
(name !== "browser" || this.settingsManager.getBrowserEnabled());
|
|
2218
2362
|
const registeredTools = this._extensionRunner.getAllRegisteredTools();
|
|
2219
2363
|
const allCustomTools = [
|
|
2220
2364
|
...registeredTools,
|
|
@@ -2322,6 +2466,7 @@ export class AgentSession {
|
|
|
2322
2466
|
});
|
|
2323
2467
|
}
|
|
2324
2468
|
async reload(options) {
|
|
2469
|
+
this._invalidateWaitPromptHandoffs("Extensions reloaded before the pending prompt could run.");
|
|
2325
2470
|
const previousFlagValues = this._extensionRunner.getFlagValues();
|
|
2326
2471
|
await emitSessionShutdownEvent(this._extensionRunner, { type: "session_shutdown", reason: "reload" });
|
|
2327
2472
|
await this.settingsManager.reload();
|
|
@@ -2484,6 +2629,7 @@ export class AgentSession {
|
|
|
2484
2629
|
* @param options.operations Custom BashOperations for remote execution
|
|
2485
2630
|
*/
|
|
2486
2631
|
async executeBash(command, onChunk, options) {
|
|
2632
|
+
this.assertCanStartWork();
|
|
2487
2633
|
this._bashAbortController = new AbortController();
|
|
2488
2634
|
// Apply command prefix if configured (e.g., "shopt -s expand_aliases" for alias support)
|
|
2489
2635
|
const prefix = this.settingsManager.getShellCommandPrefix();
|