@ashx-j/lunr-dev 0.2.19-dev.10.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 +60 -2
- package/README.md +2 -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 -2
- 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 +15 -14
- 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 +6 -5
- package/dist/builtin-extensions/lunr-todos.d.ts.map +1 -1
- package/dist/builtin-extensions/lunr-todos.js +24 -7
- package/dist/builtin-extensions/lunr-todos.js.map +1 -1
- package/dist/builtin-extensions/pi-intercom/broker/spawn.d.ts +6 -4
- package/dist/builtin-extensions/pi-intercom/broker/spawn.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-intercom/broker/spawn.js +114 -61
- package/dist/builtin-extensions/pi-intercom/broker/spawn.js.map +1 -1
- package/dist/builtin-extensions/pi-intercom/index.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-intercom/index.js +365 -351
- 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/fanout-child.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/fanout-child.js +2 -2
- package/dist/builtin-extensions/pi-subagents/src/extension/fanout-child.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/index.d.ts +9 -7
- package/dist/builtin-extensions/pi-subagents/src/extension/index.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/index.js +143 -59
- package/dist/builtin-extensions/pi-subagents/src/extension/index.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/schemas.d.ts +18 -8
- package/dist/builtin-extensions/pi-subagents/src/extension/schemas.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/schemas.js +39 -14
- 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 +5 -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 +32 -17
- 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 +12 -2
- 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 +401 -58
- package/dist/builtin-extensions/pi-subagents/src/intercom/native-supervisor-channel.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/intercom/result-intercom.d.ts +1 -0
- package/dist/builtin-extensions/pi-subagents/src/intercom/result-intercom.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/intercom/result-intercom.js +1 -1
- package/dist/builtin-extensions/pi-subagents/src/intercom/result-intercom.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/intercom/supervisor-ask.d.ts +29 -0
- package/dist/builtin-extensions/pi-subagents/src/intercom/supervisor-ask.d.ts.map +1 -0
- package/dist/builtin-extensions/pi-subagents/src/intercom/supervisor-ask.js +184 -0
- package/dist/builtin-extensions/pi-subagents/src/intercom/supervisor-ask.js.map +1 -0
- package/dist/builtin-extensions/pi-subagents/src/intercom/supervisor-questions.d.ts +91 -0
- package/dist/builtin-extensions/pi-subagents/src/intercom/supervisor-questions.d.ts.map +1 -0
- package/dist/builtin-extensions/pi-subagents/src/intercom/supervisor-questions.js +542 -0
- package/dist/builtin-extensions/pi-subagents/src/intercom/supervisor-questions.js.map +1 -0
- package/dist/builtin-extensions/pi-subagents/src/runs/background/async-execution.d.ts +13 -1
- 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 +42 -12
- package/dist/builtin-extensions/pi-subagents/src/runs/background/async-execution.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/async-job-tracker.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/async-job-tracker.js +3 -2
- package/dist/builtin-extensions/pi-subagents/src/runs/background/async-job-tracker.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/async-resume.d.ts +2 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/async-resume.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/async-resume.js +35 -8
- package/dist/builtin-extensions/pi-subagents/src/runs/background/async-resume.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/notify.d.ts +7 -3
- 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 +26 -4
- 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 +1 -0
- 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 +55 -38
- 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 +100 -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 +47 -32
- 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 +6 -6
- 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 +75 -5
- package/dist/builtin-extensions/pi-subagents/src/runs/background/subagent-wait.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/top-level-async.d.ts +15 -2
- package/dist/builtin-extensions/pi-subagents/src/runs/background/top-level-async.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/top-level-async.js +14 -4
- package/dist/builtin-extensions/pi-subagents/src/runs/background/top-level-async.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 +43 -4
- 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 +26 -9
- 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 +4 -3
- 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 +0 -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 +94 -25
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/subagent-executor.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/acceptance.d.ts +2 -0
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/acceptance.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/acceptance.js +75 -18
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/acceptance.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/completion-guard.d.ts +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/completion-guard.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/completion-guard.js +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/completion-guard.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/model-fallback.d.ts +13 -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 +67 -11
- 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 +1 -0
- 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.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/pi-args.d.ts +5 -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 +25 -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 +17 -5
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/subagent-prompt-runtime.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/task-intent.d.ts +2 -2
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/task-intent.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/task-intent.js +5 -10
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/task-intent.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/shared/async-guidance.d.ts +2 -0
- package/dist/builtin-extensions/pi-subagents/src/shared/async-guidance.d.ts.map +1 -0
- package/dist/builtin-extensions/pi-subagents/src/shared/async-guidance.js +3 -0
- package/dist/builtin-extensions/pi-subagents/src/shared/async-guidance.js.map +1 -0
- package/dist/builtin-extensions/pi-subagents/src/shared/child-spec.d.ts +3 -0
- 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 +70 -13
- package/dist/builtin-extensions/pi-subagents/src/shared/child-spec.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/shared/formatters.d.ts +12 -1
- package/dist/builtin-extensions/pi-subagents/src/shared/formatters.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/shared/formatters.js +21 -2
- package/dist/builtin-extensions/pi-subagents/src/shared/formatters.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/shared/types.d.ts +23 -4
- package/dist/builtin-extensions/pi-subagents/src/shared/types.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/shared/types.js +1 -1
- package/dist/builtin-extensions/pi-subagents/src/shared/types.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/slash/delegation-adapters.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/slash/delegation-adapters.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/slash/prompt-workflows.d.ts +7 -0
- 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 +11 -7
- package/dist/builtin-extensions/pi-subagents/src/slash/prompt-workflows.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/slash/slash-commands.d.ts +6 -0
- package/dist/builtin-extensions/pi-subagents/src/slash/slash-commands.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/slash/slash-commands.js +46 -29
- package/dist/builtin-extensions/pi-subagents/src/slash/slash-commands.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-subagents/src/tui/render.d.ts +46 -4
- package/dist/builtin-extensions/pi-subagents/src/tui/render.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/tui/render.js +407 -450
- package/dist/builtin-extensions/pi-subagents/src/tui/render.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/watchdog/register-main.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/watchdog/register-main.js +1 -1
- package/dist/builtin-extensions/pi-subagents/src/watchdog/register-main.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/watchdog/tool-actions.d.ts +2 -13
- package/dist/builtin-extensions/pi-subagents/src/watchdog/tool-actions.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/watchdog/tool-actions.js +5 -91
- package/dist/builtin-extensions/pi-subagents/src/watchdog/tool-actions.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 +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 +27 -0
- package/dist/core/computer-use/image.d.ts.map +1 -0
- package/dist/core/computer-use/image.js +72 -0
- package/dist/core/computer-use/image.js.map +1 -0
- package/dist/core/computer-use/policy.d.ts.map +1 -1
- package/dist/core/computer-use/policy.js +2 -6
- package/dist/core/computer-use/policy.js.map +1 -1
- package/dist/core/computer-use/schemas.d.ts +14 -10
- package/dist/core/computer-use/schemas.d.ts.map +1 -1
- package/dist/core/computer-use/schemas.js +27 -35
- package/dist/core/computer-use/schemas.js.map +1 -1
- package/dist/core/computer-use/workflow.d.ts +16 -8
- package/dist/core/computer-use/workflow.d.ts.map +1 -1
- package/dist/core/computer-use/workflow.js +337 -260
- package/dist/core/computer-use/workflow.js.map +1 -1
- package/dist/core/customize.d.ts +2 -0
- package/dist/core/customize.d.ts.map +1 -1
- package/dist/core/customize.js +17 -13
- 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 +17 -23
- package/dist/core/permissions.d.ts.map +1 -1
- package/dist/core/permissions.js +79 -146
- 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 -24
- 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 -2
- 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 +24 -1
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +78 -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-cancellation.d.ts +21 -0
- package/dist/core/subagent-cancellation.d.ts.map +1 -0
- package/dist/core/subagent-cancellation.js +53 -0
- package/dist/core/subagent-cancellation.js.map +1 -0
- 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-spinner-setting.d.ts +6 -0
- package/dist/core/subagent-spinner-setting.d.ts.map +1 -0
- package/dist/core/subagent-spinner-setting.js +12 -0
- package/dist/core/subagent-spinner-setting.js.map +1 -0
- package/dist/core/subagent-spinner.d.ts +4 -0
- package/dist/core/subagent-spinner.d.ts.map +1 -0
- package/dist/core/subagent-spinner.js +6 -0
- package/dist/core/subagent-spinner.js.map +1 -0
- 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 +90 -35
- 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 +16 -1
- package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector.js +147 -4
- 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 +55 -44
- package/dist/modes/interactive/components/tool-execution.js.map +1 -1
- package/dist/modes/interactive/extension-widget-order.d.ts +8 -0
- package/dist/modes/interactive/extension-widget-order.d.ts.map +1 -0
- package/dist/modes/interactive/extension-widget-order.js +37 -0
- package/dist/modes/interactive/extension-widget-order.js.map +1 -0
- package/dist/modes/interactive/interactive-mode.d.ts +11 -2
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +386 -155
- 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-7STLFW3A.js → builtin-extensions-4GNDR6U3.js} +8 -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-OTT6JMPU.js → chunk-2MI5OPMN.js} +17 -370
- package/dist/node-runtime/{chunk-W3CVH5RX.js → chunk-2TKODGBZ.js} +11 -6
- package/dist/node-runtime/{chunk-K72NVGUB.js → chunk-33SIKK3Y.js} +38 -164
- package/dist/node-runtime/{chunk-GZQHMEWL.js → chunk-3DKIWPKN.js} +19 -4
- package/dist/node-runtime/{chunk-5OLJGVCB.js → chunk-3ONQTOMR.js} +2 -2
- 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-BKAZ6BKX.js → chunk-4SBQAI4T.js} +31 -31
- package/dist/node-runtime/{chunk-W7S2REEG.js → chunk-53ARRUHA.js} +785 -285
- package/dist/node-runtime/{chunk-ZSEZY3II.js → chunk-5Q4A37RB.js} +10 -4
- package/dist/node-runtime/{chunk-SWSN6HAB.js → chunk-5UZOPGE3.js} +1 -1
- package/dist/node-runtime/{chunk-LCACDWHJ.js → chunk-5Z5PCXGY.js} +263 -222
- package/dist/node-runtime/chunk-5ZH3ZFIZ.js +308 -0
- package/dist/node-runtime/chunk-7JIYPIQU.js +356 -0
- package/dist/node-runtime/{chunk-ZRDIMBEQ.js → chunk-AJ6R5VTV.js} +66 -91
- package/dist/node-runtime/chunk-ATIF3RX5.js +352 -0
- package/dist/node-runtime/chunk-BBUVIEZB.js +51 -0
- 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-MUMMMTW4.js → chunk-DRJI7ZSC.js} +572 -401
- package/dist/node-runtime/{chunk-6SPPH4FY.js → chunk-E75WFZ33.js} +4 -4
- package/dist/node-runtime/{chunk-MJQDX3BA.js → chunk-EBB4BJW4.js} +3 -3
- package/dist/node-runtime/{chunk-5NWQCSKR.js → chunk-EOEAQIJV.js} +70 -3
- 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-FLYMHKCS.js → chunk-JJWZB7S3.js} +60 -48
- 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-EHMBW7FA.js → chunk-LWYIVUGV.js} +5 -4
- package/dist/node-runtime/{chunk-T5GM5BFH.js → chunk-MFV2LOOX.js} +186 -2194
- 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-4SJWFTUP.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-QFADHUQV.js +74 -0
- package/dist/node-runtime/chunk-RBZQU6TJ.js +27 -0
- package/dist/node-runtime/{chunk-MGSB2C3M.js → chunk-RVOQBXTA.js} +10 -6
- package/dist/node-runtime/{chunk-ISQDQIZN.js → chunk-RW4PYFNE.js} +14 -94
- package/dist/node-runtime/chunk-TP7K7YWS.js +2830 -0
- package/dist/node-runtime/{chunk-TAP7QTUT.js → chunk-TVLBDVTR.js} +46 -436
- 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-J7QGQD45.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-5Q45AVQG.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-LGR5VT5X.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-XEXL2DGQ.js → customize-VFJV3U6A.js} +2 -1
- package/dist/node-runtime/{direct-tool-executor-TDJS7TBD.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-IUCVZCWC.js → extract-EQJE7FZZ.js} +2 -2
- package/dist/node-runtime/gateway-QENRQA5X.js +1476 -0
- package/dist/node-runtime/{gemini-search-NCIDF7NE.js → gemini-search-35OCRFLN.js} +1 -1
- package/dist/node-runtime/{gemini-url-context-OKIN7AIP.js → gemini-url-context-UQY3PHHW.js} +2 -2
- package/dist/node-runtime/index.js +120 -77
- package/dist/node-runtime/{init-EKE277AG.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-IAUNXSXH.js +138 -0
- package/dist/node-runtime/{lunr-cron-KKBOGAEF.js → lunr-cron-P6ZJGVEF.js} +22 -8
- package/dist/node-runtime/main.js +50 -35
- 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-C4EJOO5Q.js → package-manager-cli-J337RKTI.js} +28 -19
- package/dist/node-runtime/{pi-intercom-EEMBGQID.js → pi-intercom-QM53RLTS.js} +114 -88
- package/dist/node-runtime/{pi-mcp-adapter-DPTJGAAL.js → pi-mcp-adapter-3PHF4KZ4.js} +9 -8
- package/dist/node-runtime/{pi-subagents-VKCLYIBY.js → pi-subagents-RCHPB6UK.js} +1476 -646
- package/dist/node-runtime/{pi-web-access-BV6DSZOP.js → pi-web-access-PNG35XW7.js} +11 -11
- package/dist/node-runtime/process-registry-PVJ44F7H.js +31 -0
- package/dist/node-runtime/{proxy-modes-R64LU6WZ.js → proxy-modes-5FAPSZEZ.js} +14 -14
- package/dist/node-runtime/rpc-entry.js +50 -35
- 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-K6IPIQTI.js → settings-manager-HIBIUNBK.js} +13 -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-EFLTO32A.js → subagent-executor-2BH76MMS.js} +242 -314
- 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-I6OVDRPL.js → update-cli-TVTPVUNM.js} +7 -3
- package/dist/node-runtime/usage-service-LFB2SWYV.js +37 -0
- package/dist/node-runtime/{video-extract-ETA5RA7U.js → video-extract-OOZHR7SU.js} +2 -2
- package/dist/node-runtime/workflow-TVJNKKQP.js +509 -0
- package/dist/node-runtime/{youtube-extract-SRVGNN26.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 +319 -268
- package/docs/extensions.md +2 -0
- package/docs/features.md +129 -30
- package/docs/index.md +1 -1
- package/docs/interactive-startup.md +2 -1
- package/docs/keybindings.md +4 -2
- package/docs/providers.md +6 -2
- package/docs/quickstart.md +2 -2
- package/docs/sessions.md +10 -0
- package/docs/settings.md +6 -3
- 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/builtin-extensions/lunr-settings-tools.d.ts +0 -4
- package/dist/builtin-extensions/lunr-settings-tools.d.ts.map +0 -1
- package/dist/builtin-extensions/lunr-settings-tools.js +0 -120
- package/dist/builtin-extensions/lunr-settings-tools.js.map +0 -1
- package/dist/core/settings-tools-bridge.d.ts +0 -35
- package/dist/core/settings-tools-bridge.d.ts.map +0 -1
- package/dist/core/settings-tools-bridge.js +0 -56
- package/dist/core/settings-tools-bridge.js.map +0 -1
- package/dist/node-runtime/agent-session-services-RSGP5GDN.js +0 -39
- package/dist/node-runtime/chunk-EH2LJQPM.js +0 -64
- package/dist/node-runtime/chunk-HQCKFM2O.js +0 -56
- package/dist/node-runtime/chunk-JT6YCS5B.js +0 -5648
- package/dist/node-runtime/command-6UXQ6XZN.js +0 -13
- package/dist/node-runtime/gateway-3OLC4GQN.js +0 -2139
- package/dist/node-runtime/image-resize-6ZPBFMWW.js +0 -11
- package/dist/node-runtime/interactive-mode-S5M26CQ7.js +0 -59
- package/dist/node-runtime/lunr-computer-use-4X3KUNF4.js +0 -206
- package/dist/node-runtime/runtime-bridges-UJ5WJJLN.js +0 -14
- package/dist/node-runtime/workflow-SA34S4VX.js +0 -325
- 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-GPFAU3N6.js → src-IVPNZ2BX.js} +6 -6
|
@@ -1,46 +1,76 @@
|
|
|
1
1
|
import { randomUUID } from "node:crypto";
|
|
2
|
+
import { prepareComputerImage, screenshotDimensions } from "./image.js";
|
|
2
3
|
import { DesktopLease } from "./lease.js";
|
|
3
|
-
|
|
4
|
-
|
|
4
|
+
import { computerSchemas } from "./schemas.js";
|
|
5
|
+
export function driverData(reply) {
|
|
6
|
+
if (reply.structuredContent && typeof reply.structuredContent === "object" && !Array.isArray(reply.structuredContent))
|
|
7
|
+
return Object.fromEntries(Object.entries(reply.structuredContent));
|
|
5
8
|
if (Array.isArray(reply.content))
|
|
6
9
|
for (const item of reply.content) {
|
|
7
|
-
if (item.type
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
10
|
+
if (item.type !== "text" || typeof item.text !== "string")
|
|
11
|
+
continue;
|
|
12
|
+
try {
|
|
13
|
+
const value = JSON.parse(item.text);
|
|
14
|
+
if (value && typeof value === "object" && !Array.isArray(value))
|
|
15
|
+
return Object.fromEntries(Object.entries(value));
|
|
11
16
|
}
|
|
17
|
+
catch { }
|
|
12
18
|
}
|
|
13
|
-
return content;
|
|
14
|
-
}
|
|
15
|
-
export function driverData(reply) {
|
|
16
|
-
if (reply.structuredContent &&
|
|
17
|
-
typeof reply.structuredContent === "object" &&
|
|
18
|
-
!Array.isArray(reply.structuredContent))
|
|
19
|
-
return Object.fromEntries(Object.entries(reply.structuredContent));
|
|
20
|
-
for (const item of resultContent(reply)) {
|
|
21
|
-
if (item.type !== "text")
|
|
22
|
-
continue;
|
|
23
|
-
try {
|
|
24
|
-
const value = JSON.parse(item.text);
|
|
25
|
-
if (value && typeof value === "object" && !Array.isArray(value))
|
|
26
|
-
return Object.fromEntries(Object.entries(value));
|
|
27
|
-
}
|
|
28
|
-
catch { }
|
|
29
|
-
}
|
|
30
19
|
return {};
|
|
31
20
|
}
|
|
32
21
|
export function driverRefused(reply) {
|
|
33
22
|
const data = driverData(reply);
|
|
34
|
-
const
|
|
35
|
-
|
|
23
|
+
const acknowledged = data.activated === true || data.success === true || data.verified === true || data.effect === "confirmed";
|
|
24
|
+
const uncertain = [data.status, data.effect].some((value) => value === "partial" || value === "unverifiable");
|
|
25
|
+
return reply.isError === true ||
|
|
36
26
|
(data.refusal !== undefined && data.refusal !== null && data.refusal !== false) ||
|
|
37
|
-
(data.error !== undefined && data.error !== null) ||
|
|
38
|
-
data.effect === "refused" ||
|
|
39
|
-
data.
|
|
40
|
-
(data.status !== undefined &&
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
27
|
+
(data.error !== undefined && data.error !== null && data.error !== false) ||
|
|
28
|
+
data.effect === "refused" || data.status === "refused" || data.status === "failed" || data.success === false ||
|
|
29
|
+
data.code === "window_target_mismatch" ||
|
|
30
|
+
(data.status !== undefined && !acknowledged && !uncertain && !["ok", "success", "completed"].includes(String(data.status))) ||
|
|
31
|
+
(data.code !== undefined && data.code !== 0 && !acknowledged && !uncertain);
|
|
32
|
+
}
|
|
33
|
+
function record(value) {
|
|
34
|
+
return value !== null && typeof value === "object" && !Array.isArray(value) ? Object.fromEntries(Object.entries(value)) : {};
|
|
35
|
+
}
|
|
36
|
+
function select(data, keys) {
|
|
37
|
+
const result = {};
|
|
38
|
+
for (const key of keys) {
|
|
39
|
+
const value = data[key];
|
|
40
|
+
if (typeof value === "string")
|
|
41
|
+
result[key] = value.slice(0, 240);
|
|
42
|
+
else if (typeof value === "boolean" || (typeof value === "number" && Number.isFinite(value)))
|
|
43
|
+
result[key] = value;
|
|
44
|
+
}
|
|
45
|
+
return result;
|
|
46
|
+
}
|
|
47
|
+
function typingRecovery(data, text) {
|
|
48
|
+
if (typeof text !== "string")
|
|
49
|
+
return {};
|
|
50
|
+
const requested = data.requested_chars;
|
|
51
|
+
const delivered = data.delivered_chars;
|
|
52
|
+
if (typeof requested !== "number" || !Number.isSafeInteger(requested) || requested < 0 ||
|
|
53
|
+
requested > 20000 || requested !== Array.from(text).length)
|
|
54
|
+
return {};
|
|
55
|
+
const validDelivered = typeof delivered === "number" && Number.isSafeInteger(delivered) && delivered >= 0 && delivered <= requested;
|
|
56
|
+
return {
|
|
57
|
+
requested_chars: requested,
|
|
58
|
+
delivered_chars: validDelivered ? delivered : undefined,
|
|
59
|
+
retryable: typeof data.retryable === "boolean" ? data.retryable : undefined,
|
|
60
|
+
retry_from_character: validDelivered && data.retry_from_character === delivered ? delivered : undefined,
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
function outcome(reply, text) {
|
|
64
|
+
const data = driverData(reply);
|
|
65
|
+
return {
|
|
66
|
+
...select(data, ["status", "effect", "refusal", "error", "code", "path", "verified", "verify", "success", "activated"]),
|
|
67
|
+
refusal: typeof data.refusal === "object" && data.refusal !== null ? select(record(data.refusal), ["code", "message", "facility"]) : select(data, ["refusal"]).refusal,
|
|
68
|
+
error: typeof data.error === "object" && data.error !== null ? select(record(data.error), ["code", "message", "facility"]) : select(data, ["error"]).error,
|
|
69
|
+
escalation: record(data.escalation).recommended === "foreground" ? "foreground" : undefined,
|
|
70
|
+
input: driverRefused(reply) ? "refused_or_failed" : "dispatched",
|
|
71
|
+
applicationEffect: "unverified",
|
|
72
|
+
...typingRecovery(data, text),
|
|
73
|
+
};
|
|
44
74
|
}
|
|
45
75
|
function abortable(pending, signal) {
|
|
46
76
|
return new Promise((resolve, reject) => {
|
|
@@ -60,8 +90,32 @@ function abortable(pending, signal) {
|
|
|
60
90
|
abort();
|
|
61
91
|
});
|
|
62
92
|
}
|
|
93
|
+
const freshActionGuidance = "This failed call consumes the active token. Get a fresh capture of the exact target before any next action, including window focus. Copy the returned token exactly; never abbreviate or reconstruct it. This rejection does not prove foreground typing failed or that earlier calls had no effect.";
|
|
94
|
+
class ObservationError extends Error {
|
|
95
|
+
code;
|
|
96
|
+
constructor(code, message) {
|
|
97
|
+
super(`Stale observation. ${message}`);
|
|
98
|
+
this.code = code;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
function targetFrom(input) {
|
|
102
|
+
if (input.desktop === true) {
|
|
103
|
+
if (input.pid !== undefined || input.window_id !== undefined)
|
|
104
|
+
throw new Error("Desktop target cannot include pid/window_id.");
|
|
105
|
+
return { desktop: true };
|
|
106
|
+
}
|
|
107
|
+
if (typeof input.pid !== "number" || !Number.isInteger(input.pid) || input.pid < 1 ||
|
|
108
|
+
typeof input.window_id !== "number" || !Number.isInteger(input.window_id) || input.window_id < 1)
|
|
109
|
+
throw new Error("Window target requires positive integer pid and window_id.");
|
|
110
|
+
return { pid: input.pid, window_id: input.window_id };
|
|
111
|
+
}
|
|
112
|
+
function sameTarget(a, b) {
|
|
113
|
+
return a.desktop === true ? b.desktop === true : b.desktop !== true && a.pid === b.pid && a.window_id === b.window_id;
|
|
114
|
+
}
|
|
63
115
|
export class ComputerWorkflow {
|
|
64
116
|
observation;
|
|
117
|
+
lastCapture;
|
|
118
|
+
lastAction;
|
|
65
119
|
abort = new AbortController();
|
|
66
120
|
closing;
|
|
67
121
|
driver;
|
|
@@ -71,249 +125,272 @@ export class ComputerWorkflow {
|
|
|
71
125
|
this.lease = lease;
|
|
72
126
|
this.driver.setProcessObserver?.((pid) => this.lease.trackProcess(pid));
|
|
73
127
|
}
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
128
|
+
fresh(input, previous) {
|
|
129
|
+
if (!previous)
|
|
130
|
+
throw new ObservationError("observation_unavailable", "No active observation is available.");
|
|
131
|
+
if (previous.token !== input.observation)
|
|
132
|
+
throw new ObservationError("observation_mismatch", "Token does not match the active observation.");
|
|
133
|
+
if (!sameTarget(previous.target, targetFrom(input)))
|
|
134
|
+
throw new ObservationError("observation_target_mismatch", "Token belongs to a different target.");
|
|
135
|
+
if (Date.now() - previous.time > 30000)
|
|
136
|
+
throw new ObservationError("observation_expired", "The active observation is older than 30 seconds.");
|
|
137
|
+
return previous;
|
|
138
|
+
}
|
|
139
|
+
async capture(target, signal, previous, crop) {
|
|
140
|
+
const time = Date.now();
|
|
141
|
+
const reply = await abortable(this.driver.call(target.desktop ? "get_desktop_state" : "get_window_state", target.desktop ? {} : { pid: target.pid, window_id: target.window_id, include_accessibility_tree: false, include_screenshot: true, max_dimension: 2560 }, signal), signal);
|
|
142
|
+
if (driverRefused(reply))
|
|
143
|
+
throw new Error(`Capture refused: ${JSON.stringify(outcome(reply))}`);
|
|
144
|
+
const data = driverData(reply);
|
|
145
|
+
const images = Array.isArray(reply.content) ? reply.content.filter((item) => item.type === "image") : [];
|
|
146
|
+
if (images.length !== 1 || typeof images[0].data !== "string" || typeof images[0].mimeType !== "string")
|
|
147
|
+
throw new Error("Capture must return exactly one screenshot.");
|
|
148
|
+
const image = { type: "image", data: images[0].data, mimeType: images[0].mimeType };
|
|
149
|
+
const dimensions = screenshotDimensions(image);
|
|
150
|
+
if (data.screenshot_frame_valid === false || data.screenshot_error != null || dimensions.width !== data.screenshot_width || dimensions.height !== data.screenshot_height)
|
|
151
|
+
throw new Error("Screenshot dimensions or frame could not be verified. Capture again.");
|
|
152
|
+
const geometry = JSON.stringify(select(record(data.window_bounds), ["x", "y", "width", "height"]));
|
|
153
|
+
if (crop && previous && (previous.sourceWidth !== dimensions.width || previous.sourceHeight !== dimensions.height || previous.geometry !== geometry))
|
|
154
|
+
throw new Error("Target geometry changed. Capture a full image before selecting a crop.");
|
|
155
|
+
const prepared = await abortable(prepareComputerImage(image, crop), signal);
|
|
156
|
+
signal.throwIfAborted();
|
|
157
|
+
return { ...prepared, token: randomUUID(), target, time, geometry };
|
|
158
|
+
}
|
|
159
|
+
imageResult(observation, extra = {}) {
|
|
160
|
+
this.observation = observation;
|
|
161
|
+
const { width, height, region, sourceWidth, sourceHeight, scaleX, scaleY, target, token } = observation;
|
|
162
|
+
return {
|
|
163
|
+
content: [{ type: "text", text: JSON.stringify({
|
|
164
|
+
...extra, observation: token, target, image: { width, height },
|
|
165
|
+
mapping: { sourceWidth, sourceHeight, ...region, scaleX, scaleY },
|
|
166
|
+
coordinates: "Use returned-image pixels; mapping is applied automatically.",
|
|
167
|
+
}) }, observation.image],
|
|
168
|
+
details: { observation: token }, isError: false,
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
crop(input, previous) {
|
|
172
|
+
const crop = record(input.crop);
|
|
173
|
+
const { x, y, width, height } = crop;
|
|
174
|
+
if (typeof x !== "number" || typeof y !== "number" || typeof width !== "number" || typeof height !== "number" ||
|
|
175
|
+
![x, y, width, height].every(Number.isFinite) || x < 0 || y < 0 || width <= 0 || height <= 0 ||
|
|
176
|
+
x + width > previous.width || y + height > previous.height || Object.keys(crop).some((key) => !["x", "y", "width", "height"].includes(key)))
|
|
177
|
+
throw new Error("Crop must fit the latest returned image.");
|
|
178
|
+
const left = Math.floor(previous.region.x + x * previous.scaleX);
|
|
179
|
+
const top = Math.floor(previous.region.y + y * previous.scaleY);
|
|
180
|
+
const right = Math.min(previous.sourceWidth, Math.ceil(previous.region.x + (x + width) * previous.scaleX));
|
|
181
|
+
const bottom = Math.min(previous.sourceHeight, Math.ceil(previous.region.y + (y + height) * previous.scaleY));
|
|
182
|
+
return { x: left, y: top, width: right - left, height: bottom - top };
|
|
183
|
+
}
|
|
184
|
+
action(name, input, previous) {
|
|
185
|
+
const args = previous.target.desktop ? { scope: "desktop" } : { pid: previous.target.pid, window_id: previous.target.window_id };
|
|
186
|
+
if (previous.target.desktop && input.foreground !== true)
|
|
187
|
+
throw new Error("Desktop input requires foreground=true.");
|
|
188
|
+
if (name !== "computer_window")
|
|
189
|
+
args.delivery_mode = input.foreground === true ? "foreground" : "background";
|
|
190
|
+
for (const key of ["x", "y", "from_x", "from_y", "to_x", "to_y"]) {
|
|
191
|
+
if (name === "computer_window")
|
|
192
|
+
break;
|
|
193
|
+
const value = input[key];
|
|
194
|
+
if (value === undefined)
|
|
195
|
+
continue;
|
|
196
|
+
const horizontal = key.endsWith("x");
|
|
197
|
+
if (typeof value !== "number" || !Number.isFinite(value) || value < 0 || value >= (horizontal ? previous.width : previous.height))
|
|
198
|
+
throw new Error("Coordinate outside the observed image.");
|
|
199
|
+
args[key] = (horizontal ? previous.region.x : previous.region.y) + value * (horizontal ? previous.scaleX : previous.scaleY);
|
|
200
|
+
}
|
|
201
|
+
if ((input.x === undefined) !== (input.y === undefined))
|
|
202
|
+
throw new Error("Provide a complete x/y pair.");
|
|
203
|
+
if (previous.target.desktop && ["computer_key", "computer_text"].includes(name) && input.x !== undefined)
|
|
204
|
+
throw new Error("Desktop keyboard input uses the observed focused field. Change focus with a separate grounded click.");
|
|
205
|
+
let operation;
|
|
206
|
+
switch (name) {
|
|
207
|
+
case "computer_click":
|
|
208
|
+
case "computer_scroll":
|
|
209
|
+
if (input.x === undefined || input.y === undefined)
|
|
210
|
+
throw new Error("This action requires x/y image coordinates.");
|
|
211
|
+
operation = name === "computer_click" ? "click" : "scroll";
|
|
212
|
+
for (const key of name === "computer_click" ? ["button", "count", "modifier"] : ["direction", "amount", "by"])
|
|
213
|
+
if (input[key] !== undefined)
|
|
214
|
+
args[key] = input[key];
|
|
215
|
+
break;
|
|
216
|
+
case "computer_drag":
|
|
217
|
+
if (!["from_x", "from_y", "to_x", "to_y"].every((key) => typeof args[key] === "number"))
|
|
218
|
+
throw new Error("Drag requires both endpoints.");
|
|
219
|
+
operation = "drag";
|
|
220
|
+
break;
|
|
221
|
+
case "computer_key": {
|
|
222
|
+
if ((input.key === undefined) === (input.keys === undefined))
|
|
223
|
+
throw new Error("Provide key OR keys.");
|
|
224
|
+
const keys = Array.isArray(input.keys) ? input.keys : undefined;
|
|
225
|
+
const last = keys?.at(-1);
|
|
226
|
+
const modifiers = new Set(["ctrl", "control", "shift", "alt", "win", "windows", "cmd", "command"]);
|
|
227
|
+
const foregroundShortcut = process.platform === "win32" && input.foreground === true && input.x === undefined &&
|
|
228
|
+
keys !== undefined && keys.length >= 2 && keys.slice(0, -1).every((key) => typeof key === "string" && modifiers.has(key.toLowerCase())) &&
|
|
229
|
+
typeof last === "string" && !modifiers.has(last.toLowerCase());
|
|
230
|
+
// Pinned Windows hotkey routes XAML through UIA before honoring foreground; press_key honors SendInput.
|
|
231
|
+
operation = input.keys === undefined || foregroundShortcut ? "press_key" : "hotkey";
|
|
232
|
+
if (foregroundShortcut) {
|
|
233
|
+
args.key = last;
|
|
234
|
+
args.modifiers = keys.slice(0, -1);
|
|
112
235
|
}
|
|
113
|
-
else
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
previous.desktop) &&
|
|
127
|
-
!previous.pixels)
|
|
128
|
-
throw new Error("Pixel input needs a fresh image observation.");
|
|
129
|
-
for (const key of ["x", "from_x", "to_x", "y", "from_y", "to_y"]) {
|
|
130
|
-
if (name === "computer_window")
|
|
131
|
-
break;
|
|
236
|
+
else
|
|
237
|
+
args[input.keys === undefined ? "key" : "keys"] = input.keys ?? input.key;
|
|
238
|
+
break;
|
|
239
|
+
}
|
|
240
|
+
case "computer_text":
|
|
241
|
+
operation = "type_text";
|
|
242
|
+
args.text = input.text;
|
|
243
|
+
break;
|
|
244
|
+
case "computer_window":
|
|
245
|
+
if (previous.target.desktop)
|
|
246
|
+
throw new Error("Window management requires an exact window target.");
|
|
247
|
+
if (input.action === "frame") {
|
|
248
|
+
for (const key of ["x", "y", "width", "height"]) {
|
|
132
249
|
const value = input[key];
|
|
133
|
-
if (value !==
|
|
134
|
-
(
|
|
135
|
-
|
|
136
|
-
value < 0 ||
|
|
137
|
-
value >= (key.endsWith("x") ? previous.width : previous.height)))
|
|
138
|
-
throw new Error("Coordinate outside the observed image.");
|
|
139
|
-
if (typeof value === "number" && previous.desktop)
|
|
140
|
-
args[key] = value * (key.endsWith("x") ? previous.scaleX : previous.scaleY);
|
|
141
|
-
}
|
|
142
|
-
if (previous.desktop) {
|
|
143
|
-
if (name === "computer_window" || input.foreground !== true || input.element_index !== undefined)
|
|
144
|
-
throw new Error("Desktop input requires explicit foreground control and image grounding, not a window or accessibility element.");
|
|
145
|
-
args.scope = "desktop";
|
|
146
|
-
if ((name === "computer_key" || name === "computer_text") &&
|
|
147
|
-
(input.x !== undefined || input.y !== undefined))
|
|
148
|
-
throw new Error("Desktop keyboard input targets the observed focused field; use a separate grounded click to change focus.");
|
|
149
|
-
if (name === "computer_scroll" && (typeof input.x !== "number" || typeof input.y !== "number"))
|
|
150
|
-
throw new Error("Desktop scrolling requires x and y in the observed image.");
|
|
151
|
-
}
|
|
152
|
-
if (input.element_index !== undefined) {
|
|
153
|
-
if (typeof previous.snapshot !== "string")
|
|
154
|
-
throw new Error("Driver omitted its snapshot identity. Observe again; input refused.");
|
|
155
|
-
args.snapshot_id = previous.snapshot;
|
|
156
|
-
}
|
|
157
|
-
if (name !== "computer_window" &&
|
|
158
|
-
((input.x !== undefined) !== (input.y !== undefined) ||
|
|
159
|
-
(input.element_index !== undefined && input.x !== undefined)))
|
|
160
|
-
throw new Error("Provide an accessibility element OR a complete x/y pair.");
|
|
161
|
-
args.delivery_mode = input.foreground === true ? "foreground" : "background";
|
|
162
|
-
switch (name) {
|
|
163
|
-
case "computer_click":
|
|
164
|
-
if ((input.element_index !== undefined) ===
|
|
165
|
-
(typeof input.x === "number" && typeof input.y === "number"))
|
|
166
|
-
throw new Error("Provide an element OR both x and y.");
|
|
167
|
-
operation =
|
|
168
|
-
input.element_index === undefined
|
|
169
|
-
? "click"
|
|
170
|
-
: input.button === "right"
|
|
171
|
-
? "right_click"
|
|
172
|
-
: input.count === 2
|
|
173
|
-
? "double_click"
|
|
174
|
-
: "click";
|
|
175
|
-
if (input.element_index !== undefined && input.button === "right" && input.count === 2)
|
|
176
|
-
throw new Error("Use fresh image coordinates for a double right-click; the accessibility right-click operation has no count parameter.");
|
|
177
|
-
if (operation === "double_click" && process.platform === "darwin") {
|
|
178
|
-
if (Array.isArray(input.modifier) && input.modifier.length)
|
|
179
|
-
throw new Error("The pinned macOS accessibility double-click does not support modifiers. Observe an image and use a pixel double-click instead.");
|
|
180
|
-
delete args.modifier;
|
|
181
|
-
}
|
|
182
|
-
if (operation !== "click") {
|
|
183
|
-
delete args.button;
|
|
184
|
-
delete args.count;
|
|
185
|
-
}
|
|
186
|
-
break;
|
|
187
|
-
case "computer_drag":
|
|
188
|
-
operation = "drag";
|
|
189
|
-
break;
|
|
190
|
-
case "computer_key":
|
|
191
|
-
if ((input.key !== undefined) === (input.keys !== undefined))
|
|
192
|
-
throw new Error("Provide one key OR a modifier shortcut in keys.");
|
|
193
|
-
operation = input.keys !== undefined ? "hotkey" : "press_key";
|
|
194
|
-
break;
|
|
195
|
-
case "computer_scroll":
|
|
196
|
-
operation = "scroll";
|
|
197
|
-
break;
|
|
198
|
-
case "computer_text":
|
|
199
|
-
if ((input.x !== undefined) !== (input.y !== undefined) ||
|
|
200
|
-
(input.element_index !== undefined && input.x !== undefined))
|
|
201
|
-
throw new Error("Provide an element OR both x and y, or omit both to type into the observed focused field.");
|
|
202
|
-
operation = "type_text";
|
|
203
|
-
break;
|
|
204
|
-
case "computer_window":
|
|
205
|
-
if (input.action === "minimize" || input.action === "restore") {
|
|
206
|
-
if (input.element_index === undefined ||
|
|
207
|
-
["x", "y", "width", "height"].some((key) => args[key] !== undefined))
|
|
208
|
-
throw new Error("Minimize/restore requires the fresh accessibility index of that window control, without frame coordinates. If unavailable, observe and use the desktop's window controls instead.");
|
|
209
|
-
operation = "click";
|
|
210
|
-
delete args.action;
|
|
211
|
-
break;
|
|
212
|
-
}
|
|
213
|
-
if (input.element_index !== undefined)
|
|
214
|
-
throw new Error("Only minimize/restore accepts a window-control element.");
|
|
215
|
-
operation = input.action === "focus" ? "bring_to_front" : "set_window_frame";
|
|
216
|
-
delete args.action;
|
|
217
|
-
if (operation === "set_window_frame" &&
|
|
218
|
-
!["x", "y", "width", "height"].every((key) => typeof args[key] === "number"))
|
|
219
|
-
throw new Error("Frame changes require x, y, width, and height.");
|
|
220
|
-
if (operation === "bring_to_front" &&
|
|
221
|
-
["x", "y", "width", "height"].some((key) => args[key] !== undefined))
|
|
222
|
-
throw new Error("Focus does not accept frame coordinates.");
|
|
223
|
-
delete args.delivery_mode;
|
|
224
|
-
break;
|
|
225
|
-
default:
|
|
226
|
-
throw new Error("Unknown computer operation.");
|
|
250
|
+
if (typeof value !== "number" || !Number.isFinite(value) || (["width", "height"].includes(key) && value <= 0))
|
|
251
|
+
throw new Error("Frame requires valid x/y/width/height.");
|
|
252
|
+
args[key] = value;
|
|
227
253
|
}
|
|
254
|
+
operation = "set_window_frame";
|
|
228
255
|
}
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
256
|
+
else if (input.action === "focus" && ["x", "y", "width", "height"].every((key) => input[key] === undefined))
|
|
257
|
+
operation = "bring_to_front";
|
|
258
|
+
else
|
|
259
|
+
throw new Error("Use frame or focus. Minimize/restore uses a fresh image click on the visible control.");
|
|
260
|
+
break;
|
|
261
|
+
default: throw new Error("Unknown computer action.");
|
|
262
|
+
}
|
|
263
|
+
return { operation, args };
|
|
264
|
+
}
|
|
265
|
+
async execute(name, input, signal) {
|
|
266
|
+
const combined = AbortSignal.any([this.abort.signal, this.lease.signal, AbortSignal.timeout(90000), ...(signal ? [signal] : [])]);
|
|
267
|
+
let inputDispatched = false;
|
|
268
|
+
let failureCode = "workflow_unavailable";
|
|
269
|
+
let actionOutcome;
|
|
270
|
+
try {
|
|
271
|
+
const result = await this.lease.run(async () => {
|
|
272
|
+
failureCode = "invalid_arguments";
|
|
273
|
+
if (!Object.hasOwn(computerSchemas, name))
|
|
274
|
+
throw new Error("Unknown computer operation.");
|
|
275
|
+
const schema = computerSchemas[name];
|
|
276
|
+
if (Object.keys(input).some((key) => !Object.hasOwn(schema.properties, key)))
|
|
277
|
+
throw new Error("Unsupported computer argument. Use image coordinates only.");
|
|
278
|
+
const previous = this.observation;
|
|
279
|
+
this.observation = undefined;
|
|
280
|
+
if (name === "computer_apps" || name === "computer_launch") {
|
|
281
|
+
const operation = name === "computer_launch" ? "launch_app" : input.pid === undefined ? "list_apps" : "list_windows";
|
|
282
|
+
if (input.query !== undefined && (typeof input.query !== "string" || !input.query.trim() || Array.from(input.query).length > 240))
|
|
283
|
+
throw new Error("Discovery query must be a nonblank string of at most 240 characters.");
|
|
284
|
+
const query = typeof input.query === "string" ? input.query.trim() : undefined;
|
|
285
|
+
const needle = query?.toLowerCase();
|
|
286
|
+
const offset = input.offset ?? 0;
|
|
287
|
+
if (typeof offset !== "number" || !Number.isSafeInteger(offset) || offset < 0)
|
|
288
|
+
throw new Error("Discovery offset must be a nonnegative safe integer.");
|
|
289
|
+
const args = name === "computer_launch" ? { name: input.name } : input.pid === undefined ? {} : { pid: input.pid };
|
|
290
|
+
combined.throwIfAborted();
|
|
291
|
+
inputDispatched = name === "computer_launch";
|
|
292
|
+
failureCode = "discovery_failed";
|
|
293
|
+
const reply = await abortable(this.driver.call(operation, args, combined), combined);
|
|
294
|
+
const data = driverData(reply);
|
|
295
|
+
const discovered = data.apps ?? data.windows;
|
|
296
|
+
const rows = Array.isArray(discovered) && needle ? discovered.filter((row) => {
|
|
297
|
+
const item = record(row);
|
|
298
|
+
return [item.name, item.app_name, item.title].some((value) => typeof value === "string" && value.toLowerCase().includes(needle));
|
|
299
|
+
}) : discovered;
|
|
300
|
+
const metadata = Array.isArray(rows) ? rows.slice(offset, offset + 50).map((row) => {
|
|
301
|
+
const item = record(row);
|
|
302
|
+
return { ...select(item, ["pid", "window_id", "name", "app_name", "title", "active", "running", "is_on_screen", "minimized"]),
|
|
303
|
+
bounds: item.bounds ? select(record(item.bounds), ["x", "y", "width", "height"]) : undefined };
|
|
304
|
+
}) : undefined;
|
|
305
|
+
const remaining = Array.isArray(rows) ? Math.max(0, rows.length - offset - (metadata?.length ?? 0)) : 0;
|
|
306
|
+
return { content: [{ type: "text", text: JSON.stringify({
|
|
307
|
+
...outcome(reply), ...select(data, ["pid", "window_id", "name", "title"]),
|
|
308
|
+
items: metadata, query, offset, total: Array.isArray(rows) ? rows.length : undefined,
|
|
309
|
+
omitted: remaining || undefined, next_offset: remaining ? offset + 50 : undefined,
|
|
310
|
+
guidance: name === "computer_launch" ? "Capture the exact target before input." : remaining ? "Pass next_offset as offset with the same pid and query. Lists refresh per call." : undefined,
|
|
311
|
+
}) }], details: {}, isError: driverRefused(reply) };
|
|
312
|
+
}
|
|
313
|
+
const target = targetFrom(input);
|
|
314
|
+
if (name === "computer_observe") {
|
|
315
|
+
const crop = input.crop === undefined ? undefined : this.crop(input, this.fresh(input, previous));
|
|
316
|
+
failureCode = "capture_failed";
|
|
317
|
+
const captured = await this.capture(target, combined, previous, crop);
|
|
318
|
+
const unchanged = this.lastCapture?.fingerprint === captured.fingerprint && sameTarget(this.lastCapture.target, target);
|
|
319
|
+
const repeats = crop ? 0 : unchanged ? (this.lastCapture?.repeats ?? 0) + 1 : 1;
|
|
320
|
+
this.lastCapture = { fingerprint: captured.fingerprint, target, repeats };
|
|
321
|
+
if (repeats >= 3)
|
|
322
|
+
return {
|
|
323
|
+
content: [{ type: "text", text: "Three captures are unchanged. Workflow stopped; stop polling and reconsider the target or approach. No input token issued." }], details: {}, isError: true,
|
|
252
324
|
};
|
|
253
|
-
|
|
254
|
-
item.mimeType = resized.mimeType;
|
|
255
|
-
}
|
|
256
|
-
content.push({
|
|
257
|
-
type: "text",
|
|
258
|
-
text: "Desktop coordinates use this returned image. Desktop input requires foreground=true. Prefer window-local accessibility/background control when available.",
|
|
259
|
-
});
|
|
325
|
+
return this.imageResult(captured, { unchanged });
|
|
260
326
|
}
|
|
327
|
+
const grounded = this.fresh(input, previous);
|
|
328
|
+
const { operation, args } = this.action(name, input, grounded);
|
|
329
|
+
const { button = "left", count = 1, modifier = [], ...clickArgs } = args;
|
|
330
|
+
const signature = JSON.stringify({ operation, args: operation === "click"
|
|
331
|
+
? { ...clickArgs, button, count, modifier: Array.isArray(modifier) ? [...new Set(modifier)].sort() : modifier }
|
|
332
|
+
: args });
|
|
333
|
+
if (this.lastAction?.unchanged && this.lastAction.signature === signature && this.lastAction.fingerprint === grounded.fingerprint)
|
|
334
|
+
throw new Error("The identical action had no visible change. Choose a different grounded action; never retry blindly.");
|
|
261
335
|
combined.throwIfAborted();
|
|
262
|
-
|
|
263
|
-
const
|
|
264
|
-
|
|
265
|
-
|
|
336
|
+
inputDispatched = true;
|
|
337
|
+
const reply = await abortable(this.driver.call(operation, args, combined), combined);
|
|
338
|
+
combined.throwIfAborted();
|
|
339
|
+
actionOutcome = outcome(reply, name === "computer_text" ? input.text : undefined);
|
|
340
|
+
const recoveryGuidance = "retry_from_character" in actionOutcome && actionOutcome.retry_from_character !== undefined
|
|
341
|
+
? "Verify the field in a fresh image before considering any remaining suffix. retry_from_character is a zero-based Unicode code-point offset, not UTF-16. retryable is driver advice, not authorization to retry."
|
|
266
342
|
: undefined;
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
(
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
data.screenshot_height === undefined ||
|
|
292
|
-
data.screenshot_height === height),
|
|
293
|
-
width,
|
|
294
|
-
height,
|
|
295
|
-
desktop: input.desktop === true,
|
|
296
|
-
scaleX: desktopImage?.scaleX ?? 1,
|
|
297
|
-
scaleY: desktopImage?.scaleY ?? 1,
|
|
298
|
-
};
|
|
343
|
+
if (driverRefused(reply)) {
|
|
344
|
+
const data = driverData(reply);
|
|
345
|
+
const backgroundUnavailable = [data.code, data.refusal, data.error, record(data.refusal).code, record(data.error).code].includes("background_unavailable");
|
|
346
|
+
const guidance = [
|
|
347
|
+
"The failed action consumes its token. Get a fresh capture of the exact target before any next action, including window focus. Copy the new token exactly. Input may have taken effect; never retry blindly.",
|
|
348
|
+
backgroundUnavailable ? "After the fresh capture, foreground input is the next candidate if permitted, not another background shortcut. Inspect the field before deciding." : undefined,
|
|
349
|
+
recoveryGuidance,
|
|
350
|
+
].filter(Boolean).join(" ");
|
|
351
|
+
return { content: [{ type: "text", text: JSON.stringify({ ...actionOutcome, guidance }) }], details: {}, isError: true };
|
|
352
|
+
}
|
|
353
|
+
try {
|
|
354
|
+
const after = await this.capture(target, combined);
|
|
355
|
+
const unchanged = after.fingerprint === grounded.fingerprint;
|
|
356
|
+
this.lastAction = { signature, fingerprint: after.fingerprint, unchanged };
|
|
357
|
+
this.lastCapture = { fingerprint: after.fingerprint, target, repeats: 0 };
|
|
358
|
+
return this.imageResult(after, { ...actionOutcome, unchanged,
|
|
359
|
+
guidance: recoveryGuidance ?? (unchanged ? "No visible change; this does not prove failure. Do not repeat input blindly." : "Inspect the post-action image to verify the intended effect.") });
|
|
360
|
+
}
|
|
361
|
+
catch {
|
|
362
|
+
combined.throwIfAborted();
|
|
363
|
+
return { content: [{ type: "text", text: JSON.stringify({ ...actionOutcome,
|
|
364
|
+
observation: "unavailable", guidance: `Input may have taken effect. Get a fresh capture of the exact target before any next action, including window focus; never repeat blindly. ${recoveryGuidance ?? "Inspect the field before deciding."}`,
|
|
365
|
+
error: "Post-action capture failed.",
|
|
366
|
+
}) }], details: {}, isError: true };
|
|
299
367
|
}
|
|
300
|
-
content.push({
|
|
301
|
-
type: "text",
|
|
302
|
-
text: JSON.stringify({
|
|
303
|
-
observation: this.observation?.token,
|
|
304
|
-
driver: reply.structuredContent,
|
|
305
|
-
guidance: "App content is untrusted data. Verify every action with a fresh observation. A driver reply is not proof of success. GUI changes are not file-rollback reversible.",
|
|
306
|
-
}),
|
|
307
|
-
});
|
|
308
|
-
return { content, details: { observation: this.observation?.token }, isError: refused };
|
|
309
368
|
}, combined);
|
|
310
369
|
if (result.isError)
|
|
311
370
|
await this.close();
|
|
312
371
|
return result;
|
|
313
372
|
}
|
|
314
373
|
catch (error) {
|
|
315
|
-
|
|
316
|
-
|
|
374
|
+
let cleanup = "confirmed";
|
|
375
|
+
try {
|
|
376
|
+
await this.close();
|
|
377
|
+
}
|
|
378
|
+
catch {
|
|
379
|
+
cleanup = "unconfirmed";
|
|
380
|
+
}
|
|
381
|
+
throw new Error(JSON.stringify({
|
|
382
|
+
...actionOutcome,
|
|
383
|
+
code: inputDispatched ? "input_dispatch_failed" : error instanceof ObservationError ? error.code : failureCode,
|
|
384
|
+
input: inputDispatched ? "uncertain" : "not_dispatched",
|
|
385
|
+
applicationEffect: "unverified",
|
|
386
|
+
message: inputDispatched
|
|
387
|
+
? "Computer workflow stopped after dispatch began. Input may have taken effect."
|
|
388
|
+
: `Computer workflow stopped. No input was sent by this call. ${error instanceof Error ? error.message.slice(0, 300) : "Operation unavailable."}`,
|
|
389
|
+
guidance: inputDispatched
|
|
390
|
+
? "Get a fresh capture of the exact target before any next action, including window focus. Inspect for possible effects; never repeat input blindly. Copy the new token exactly."
|
|
391
|
+
: freshActionGuidance,
|
|
392
|
+
cleanup,
|
|
393
|
+
}));
|
|
317
394
|
}
|
|
318
395
|
}
|
|
319
396
|
close() {
|