@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
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { createRequire as __lunrRequire } from "node:module"; const require = __lunrRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
DEFAULT_THEME_GLYPHS,
|
|
4
|
+
Theme,
|
|
5
|
+
detectTerminalBackgroundFromEnv,
|
|
6
|
+
detectTerminalBackgroundTheme,
|
|
7
|
+
detectTerminalThemeForAuto,
|
|
8
|
+
getAvailableThemes,
|
|
9
|
+
getAvailableThemesWithPaths,
|
|
10
|
+
getDefaultTheme,
|
|
11
|
+
getEditorTheme,
|
|
12
|
+
getLanguageFromPath,
|
|
13
|
+
getMarkdownTheme,
|
|
14
|
+
getResolvedThemeColors,
|
|
15
|
+
getSelectListTheme,
|
|
16
|
+
getSettingsListTheme,
|
|
17
|
+
getThemeByName,
|
|
18
|
+
getThemeExportColors,
|
|
19
|
+
getThemeForRgbColor,
|
|
20
|
+
getThemeName,
|
|
21
|
+
highlightCode,
|
|
22
|
+
initTheme,
|
|
23
|
+
isLightTheme,
|
|
24
|
+
loadThemeFromPath,
|
|
25
|
+
onThemeChange,
|
|
26
|
+
parseAutoThemeSetting,
|
|
27
|
+
resolveThemeSetting,
|
|
28
|
+
setRegisteredThemes,
|
|
29
|
+
setTheme,
|
|
30
|
+
setThemeInstance,
|
|
31
|
+
stopThemeWatcher,
|
|
32
|
+
theme
|
|
33
|
+
} from "./chunk-PLGA743X.js";
|
|
34
|
+
import "./chunk-PCIGF2XK.js";
|
|
35
|
+
import "./chunk-Q4Q6D4IY.js";
|
|
36
|
+
import "./chunk-BRJX2PRC.js";
|
|
37
|
+
export {
|
|
38
|
+
DEFAULT_THEME_GLYPHS,
|
|
39
|
+
Theme,
|
|
40
|
+
detectTerminalBackgroundFromEnv,
|
|
41
|
+
detectTerminalBackgroundTheme,
|
|
42
|
+
detectTerminalThemeForAuto,
|
|
43
|
+
getAvailableThemes,
|
|
44
|
+
getAvailableThemesWithPaths,
|
|
45
|
+
getDefaultTheme,
|
|
46
|
+
getEditorTheme,
|
|
47
|
+
getLanguageFromPath,
|
|
48
|
+
getMarkdownTheme,
|
|
49
|
+
getResolvedThemeColors,
|
|
50
|
+
getSelectListTheme,
|
|
51
|
+
getSettingsListTheme,
|
|
52
|
+
getThemeByName,
|
|
53
|
+
getThemeExportColors,
|
|
54
|
+
getThemeForRgbColor,
|
|
55
|
+
getThemeName,
|
|
56
|
+
highlightCode,
|
|
57
|
+
initTheme,
|
|
58
|
+
isLightTheme,
|
|
59
|
+
loadThemeFromPath,
|
|
60
|
+
onThemeChange,
|
|
61
|
+
parseAutoThemeSetting,
|
|
62
|
+
resolveThemeSetting,
|
|
63
|
+
setRegisteredThemes,
|
|
64
|
+
setTheme,
|
|
65
|
+
setThemeInstance,
|
|
66
|
+
stopThemeWatcher,
|
|
67
|
+
theme
|
|
68
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { createRequire as __lunrRequire } from "node:module"; const require = __lunrRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
ProjectTrustStore,
|
|
4
|
+
getProjectTrustOptions,
|
|
5
|
+
getProjectTrustParentPath,
|
|
6
|
+
hasTrustRequiringProjectResources
|
|
7
|
+
} from "./chunk-24C5IAJ4.js";
|
|
8
|
+
import "./chunk-URD2SLIT.js";
|
|
9
|
+
import "./chunk-PCIGF2XK.js";
|
|
10
|
+
import "./chunk-Q4Q6D4IY.js";
|
|
11
|
+
import "./chunk-BRJX2PRC.js";
|
|
12
|
+
export {
|
|
13
|
+
ProjectTrustStore,
|
|
14
|
+
getProjectTrustOptions,
|
|
15
|
+
getProjectTrustParentPath,
|
|
16
|
+
hasTrustRequiringProjectResources
|
|
17
|
+
};
|
|
@@ -6,10 +6,14 @@ import {
|
|
|
6
6
|
import "./chunk-DVGWF6A2.js";
|
|
7
7
|
import {
|
|
8
8
|
SettingsManager
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-EOEAQIJV.js";
|
|
10
|
+
import "./chunk-L5LZUGT7.js";
|
|
11
|
+
import "./chunk-2CMV4L24.js";
|
|
10
12
|
import "./chunk-URD2SLIT.js";
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-3ONQTOMR.js";
|
|
14
|
+
import "./chunk-UJOCPOMX.js";
|
|
15
|
+
import "./chunk-IMLCWLPI.js";
|
|
16
|
+
import "./chunk-O2AT4MEU.js";
|
|
13
17
|
import {
|
|
14
18
|
APP_NAME,
|
|
15
19
|
NPM_CLI_PACKAGE,
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { createRequire as __lunrRequire } from "node:module"; const require = __lunrRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
PLAN_USAGE_CACHE_TTL_MS,
|
|
4
|
+
USAGE_SERVICE_BRIDGE_SYMBOL,
|
|
5
|
+
clearPlanUsageCache,
|
|
6
|
+
footerPlanLabel,
|
|
7
|
+
getAllPlanUsageResults,
|
|
8
|
+
getPlanUsage,
|
|
9
|
+
getPlanUsageResult,
|
|
10
|
+
getUsageServiceBridge,
|
|
11
|
+
hasPlanUsageAdapter,
|
|
12
|
+
isFiveHourPlanWindow,
|
|
13
|
+
isWeeklyPlanWindow,
|
|
14
|
+
peekPlanUsage,
|
|
15
|
+
pickPlanWindow,
|
|
16
|
+
planUsageAuthError,
|
|
17
|
+
registerUsageServiceBridge
|
|
18
|
+
} from "./chunk-2MI5OPMN.js";
|
|
19
|
+
import "./chunk-IMLCWLPI.js";
|
|
20
|
+
import "./chunk-BRJX2PRC.js";
|
|
21
|
+
export {
|
|
22
|
+
PLAN_USAGE_CACHE_TTL_MS,
|
|
23
|
+
USAGE_SERVICE_BRIDGE_SYMBOL,
|
|
24
|
+
clearPlanUsageCache,
|
|
25
|
+
footerPlanLabel,
|
|
26
|
+
getAllPlanUsageResults,
|
|
27
|
+
getPlanUsage,
|
|
28
|
+
getPlanUsageResult,
|
|
29
|
+
getUsageServiceBridge,
|
|
30
|
+
hasPlanUsageAdapter,
|
|
31
|
+
isFiveHourPlanWindow,
|
|
32
|
+
isWeeklyPlanWindow,
|
|
33
|
+
peekPlanUsage,
|
|
34
|
+
pickPlanWindow,
|
|
35
|
+
planUsageAuthError,
|
|
36
|
+
registerUsageServiceBridge
|
|
37
|
+
};
|
|
@@ -11,8 +11,8 @@ import {
|
|
|
11
11
|
} from "./chunk-3WFAEVKS.js";
|
|
12
12
|
import {
|
|
13
13
|
extractHeadingTitle
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
14
|
+
} from "./chunk-UQUCFAJ3.js";
|
|
15
|
+
import "./chunk-NAY6UUQZ.js";
|
|
16
16
|
import {
|
|
17
17
|
activityMonitor
|
|
18
18
|
} from "./chunk-DAPBPCBP.js";
|
|
@@ -0,0 +1,509 @@
|
|
|
1
|
+
import { createRequire as __lunrRequire } from "node:module"; const require = __lunrRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
assertOwnedPath
|
|
4
|
+
} from "./chunk-JZHEUQRL.js";
|
|
5
|
+
import {
|
|
6
|
+
computerSchemas
|
|
7
|
+
} from "./chunk-QFADHUQV.js";
|
|
8
|
+
import "./chunk-PL6JKXWI.js";
|
|
9
|
+
import {
|
|
10
|
+
resizeImage
|
|
11
|
+
} from "./chunk-5Q4A37RB.js";
|
|
12
|
+
import {
|
|
13
|
+
require_proper_lockfile
|
|
14
|
+
} from "./chunk-URD2SLIT.js";
|
|
15
|
+
import {
|
|
16
|
+
loadPhoton
|
|
17
|
+
} from "./chunk-RQ2Q5IYR.js";
|
|
18
|
+
import "./chunk-PCIGF2XK.js";
|
|
19
|
+
import "./chunk-Q4Q6D4IY.js";
|
|
20
|
+
import {
|
|
21
|
+
__toESM
|
|
22
|
+
} from "./chunk-BRJX2PRC.js";
|
|
23
|
+
|
|
24
|
+
// packages/coding-agent/dist/core/computer-use/workflow.js
|
|
25
|
+
import { randomUUID as randomUUID2 } from "node:crypto";
|
|
26
|
+
|
|
27
|
+
// packages/coding-agent/dist/core/computer-use/image.js
|
|
28
|
+
import { createHash } from "node:crypto";
|
|
29
|
+
function screenshotDimensions(image) {
|
|
30
|
+
if (image.mimeType !== "image/png" || image.data.length > 64 * 1024 * 1024)
|
|
31
|
+
throw new Error("Expected a bounded PNG screenshot.");
|
|
32
|
+
let bytes = Buffer.from(image.data, "base64");
|
|
33
|
+
if (bytes.length < 24 || !bytes.subarray(0, 8).equals(Buffer.from([137, 80, 78, 71, 13, 10, 26, 10])))
|
|
34
|
+
throw new Error("Invalid screenshot PNG.");
|
|
35
|
+
let width = bytes.readUInt32BE(16), height = bytes.readUInt32BE(20);
|
|
36
|
+
if (!width || !height || width > 16384 || height > 16384 || width * height > 4e7)
|
|
37
|
+
throw new Error("Screenshot dimensions exceed the supported capture budget.");
|
|
38
|
+
return { width, height };
|
|
39
|
+
}
|
|
40
|
+
async function prepareComputerImage(image, crop) {
|
|
41
|
+
let source = screenshotDimensions(image), region = crop ?? { x: 0, y: 0, ...source };
|
|
42
|
+
if (![region.x, region.y, region.width, region.height].every(Number.isInteger) || region.x < 0 || region.y < 0 || region.width < 1 || region.height < 1 || region.x + region.width > source.width || region.y + region.height > source.height)
|
|
43
|
+
throw new Error("Crop is outside the captured image.");
|
|
44
|
+
let bytes = Buffer.from(image.data, "base64"), fingerprint;
|
|
45
|
+
if (crop) {
|
|
46
|
+
let photon = await loadPhoton();
|
|
47
|
+
if (!photon)
|
|
48
|
+
throw new Error("Image processing is unavailable; crop refused.");
|
|
49
|
+
let original = photon.PhotonImage.new_from_byteslice(bytes);
|
|
50
|
+
try {
|
|
51
|
+
if (original.get_width() !== source.width || original.get_height() !== source.height)
|
|
52
|
+
throw new Error("Decoded screenshot dimensions changed.");
|
|
53
|
+
fingerprint = createHash("sha256").update(`${source.width}x${source.height}:`).update(original.get_raw_pixels()).digest("hex");
|
|
54
|
+
let cropped = photon.crop(original, region.x, region.y, region.x + region.width, region.y + region.height);
|
|
55
|
+
try {
|
|
56
|
+
bytes = cropped.get_bytes();
|
|
57
|
+
} finally {
|
|
58
|
+
cropped.free();
|
|
59
|
+
}
|
|
60
|
+
} finally {
|
|
61
|
+
original.free();
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
let ratio = Math.min(1, 1280 / Math.max(region.width, region.height), Math.sqrt(1e6 / (region.width * region.height))), resized = await resizeImage(bytes, "image/png", {
|
|
65
|
+
maxWidth: Math.max(1, Math.floor(region.width * ratio)),
|
|
66
|
+
maxHeight: Math.max(1, Math.floor(region.height * ratio)),
|
|
67
|
+
maxBytes: 1.5 * 1024 * 1024,
|
|
68
|
+
includePixelFingerprint: !crop
|
|
69
|
+
});
|
|
70
|
+
if (!resized || resized.originalWidth !== region.width || resized.originalHeight !== region.height || resized.width < 1 || resized.height < 1 || resized.width > 1280 || resized.height > 1280 || resized.width * resized.height > 1e6)
|
|
71
|
+
throw new Error("Screenshot could not be decoded within the image budget.");
|
|
72
|
+
if (fingerprint ??= resized.fingerprint, !fingerprint)
|
|
73
|
+
throw new Error("Screenshot pixel identity could not be verified.");
|
|
74
|
+
return {
|
|
75
|
+
fingerprint,
|
|
76
|
+
image: { type: "image", data: resized.data, mimeType: resized.mimeType },
|
|
77
|
+
width: resized.width,
|
|
78
|
+
height: resized.height,
|
|
79
|
+
sourceWidth: source.width,
|
|
80
|
+
sourceHeight: source.height,
|
|
81
|
+
region,
|
|
82
|
+
scaleX: region.width / resized.width,
|
|
83
|
+
scaleY: region.height / resized.height
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
// packages/coding-agent/dist/core/computer-use/lease.js
|
|
88
|
+
var import_proper_lockfile = __toESM(require_proper_lockfile(), 1);
|
|
89
|
+
import { randomUUID } from "node:crypto";
|
|
90
|
+
import { mkdir, readFile, rename, rm, writeFile } from "node:fs/promises";
|
|
91
|
+
import { userInfo } from "node:os";
|
|
92
|
+
import { join } from "node:path";
|
|
93
|
+
var DesktopLease = class {
|
|
94
|
+
identity = randomUUID();
|
|
95
|
+
owned = !1;
|
|
96
|
+
tail = Promise.resolve();
|
|
97
|
+
closed = !1;
|
|
98
|
+
controller = new AbortController();
|
|
99
|
+
get signal() {
|
|
100
|
+
return this.controller.signal;
|
|
101
|
+
}
|
|
102
|
+
directory;
|
|
103
|
+
constructor(directory = join(userInfo().homedir, ".lunr", "desktop")) {
|
|
104
|
+
this.directory = directory;
|
|
105
|
+
}
|
|
106
|
+
async owner() {
|
|
107
|
+
try {
|
|
108
|
+
let value = JSON.parse(await readFile(join(this.directory, "workflow-owner.json"), "utf8"));
|
|
109
|
+
if (!value || typeof value != "object" || !("pid" in value) || typeof value.pid != "number" || !Number.isInteger(value.pid) || value.pid < 1 || !("identity" in value) || typeof value.identity != "string")
|
|
110
|
+
throw new Error("Invalid desktop owner record; refusing takeover.");
|
|
111
|
+
let processes = "processes" in value ? value.processes : [];
|
|
112
|
+
if (!Array.isArray(processes) || !processes.every((pid) => Number.isInteger(pid) && pid > 0))
|
|
113
|
+
throw new Error("Invalid runtime owner record; refusing takeover.");
|
|
114
|
+
return { pid: value.pid, identity: value.identity, processes };
|
|
115
|
+
} catch (error) {
|
|
116
|
+
if (error instanceof Error && "code" in error && error.code === "ENOENT")
|
|
117
|
+
return;
|
|
118
|
+
throw error;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
async withOwnerLock(operation) {
|
|
122
|
+
let release = await import_proper_lockfile.default.lock(this.directory, {
|
|
123
|
+
lockfilePath: join(this.directory, "workflow-acquire.lock"),
|
|
124
|
+
retries: 0,
|
|
125
|
+
stale: 1e4
|
|
126
|
+
});
|
|
127
|
+
try {
|
|
128
|
+
await operation();
|
|
129
|
+
} finally {
|
|
130
|
+
await release();
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
async writeOwner(owner) {
|
|
134
|
+
let temporary = join(this.directory, `workflow-owner-${randomUUID()}.tmp`);
|
|
135
|
+
try {
|
|
136
|
+
await writeFile(temporary, JSON.stringify(owner), { mode: 384, flag: "wx" }), await rename(temporary, join(this.directory, "workflow-owner.json"));
|
|
137
|
+
} finally {
|
|
138
|
+
await rm(temporary, { force: !0 });
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
async acquire() {
|
|
142
|
+
await assertOwnedPath(this.directory), await mkdir(this.directory, { recursive: !0, mode: 448 }), await this.withOwnerLock(async () => {
|
|
143
|
+
let owner = await this.owner();
|
|
144
|
+
if (owner && [owner.pid, ...owner.processes].some((pid) => {
|
|
145
|
+
try {
|
|
146
|
+
return process.kill(pid, 0), !0;
|
|
147
|
+
} catch (error) {
|
|
148
|
+
return !(error instanceof Error && "code" in error && error.code === "ESRCH");
|
|
149
|
+
}
|
|
150
|
+
}))
|
|
151
|
+
throw new Error("Desktop busy: another lunR workflow owns this user's desktop. Retry only after it ends.");
|
|
152
|
+
await this.writeOwner({ pid: process.pid, identity: this.identity }), this.owned = !0;
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
async trackProcess(pid) {
|
|
156
|
+
await this.withOwnerLock(async () => {
|
|
157
|
+
let owner = await this.owner();
|
|
158
|
+
if (!owner || owner.identity !== this.identity || !Number.isInteger(pid) || pid < 1)
|
|
159
|
+
throw new Error("Cannot bind runtime to the desktop lease.");
|
|
160
|
+
owner.processes.includes(pid) || owner.processes.push(pid), await this.writeOwner(owner);
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
run(operation, signal) {
|
|
164
|
+
let result = this.tail.then(async () => {
|
|
165
|
+
if (this.closed)
|
|
166
|
+
throw new Error("Desktop workflow ended. Start a new workflow and observe again.");
|
|
167
|
+
if (signal?.throwIfAborted(), this.owned || await this.acquire(), (await this.owner())?.identity !== this.identity)
|
|
168
|
+
throw this.closed = !0, this.controller.abort(new Error("Desktop lease lost.")), new Error("Desktop lease lost. Input refused.");
|
|
169
|
+
return signal?.throwIfAborted(), operation();
|
|
170
|
+
});
|
|
171
|
+
return this.tail = result.catch(() => {
|
|
172
|
+
}), result;
|
|
173
|
+
}
|
|
174
|
+
async close() {
|
|
175
|
+
this.closed = !0, this.controller.abort(), await this.tail, this.owned && (await this.withOwnerLock(async () => {
|
|
176
|
+
(await this.owner())?.identity === this.identity && await rm(join(this.directory, "workflow-owner.json"));
|
|
177
|
+
}), this.owned = !1);
|
|
178
|
+
}
|
|
179
|
+
};
|
|
180
|
+
|
|
181
|
+
// packages/coding-agent/dist/core/computer-use/workflow.js
|
|
182
|
+
function driverData(reply) {
|
|
183
|
+
if (reply.structuredContent && typeof reply.structuredContent == "object" && !Array.isArray(reply.structuredContent))
|
|
184
|
+
return Object.fromEntries(Object.entries(reply.structuredContent));
|
|
185
|
+
if (Array.isArray(reply.content)) {
|
|
186
|
+
for (let item of reply.content)
|
|
187
|
+
if (!(item.type !== "text" || typeof item.text != "string"))
|
|
188
|
+
try {
|
|
189
|
+
let value = JSON.parse(item.text);
|
|
190
|
+
if (value && typeof value == "object" && !Array.isArray(value))
|
|
191
|
+
return Object.fromEntries(Object.entries(value));
|
|
192
|
+
} catch {
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
return {};
|
|
196
|
+
}
|
|
197
|
+
function driverRefused(reply) {
|
|
198
|
+
let data = driverData(reply), acknowledged = data.activated === !0 || data.success === !0 || data.verified === !0 || data.effect === "confirmed", uncertain = [data.status, data.effect].some((value) => value === "partial" || value === "unverifiable");
|
|
199
|
+
return reply.isError === !0 || data.refusal !== void 0 && data.refusal !== null && data.refusal !== !1 || data.error !== void 0 && data.error !== null && data.error !== !1 || data.effect === "refused" || data.status === "refused" || data.status === "failed" || data.success === !1 || data.code === "window_target_mismatch" || data.status !== void 0 && !acknowledged && !uncertain && !["ok", "success", "completed"].includes(String(data.status)) || data.code !== void 0 && data.code !== 0 && !acknowledged && !uncertain;
|
|
200
|
+
}
|
|
201
|
+
function record(value) {
|
|
202
|
+
return value !== null && typeof value == "object" && !Array.isArray(value) ? Object.fromEntries(Object.entries(value)) : {};
|
|
203
|
+
}
|
|
204
|
+
function select(data, keys) {
|
|
205
|
+
let result = {};
|
|
206
|
+
for (let key of keys) {
|
|
207
|
+
let value = data[key];
|
|
208
|
+
typeof value == "string" ? result[key] = value.slice(0, 240) : (typeof value == "boolean" || typeof value == "number" && Number.isFinite(value)) && (result[key] = value);
|
|
209
|
+
}
|
|
210
|
+
return result;
|
|
211
|
+
}
|
|
212
|
+
function typingRecovery(data, text) {
|
|
213
|
+
if (typeof text != "string")
|
|
214
|
+
return {};
|
|
215
|
+
let requested = data.requested_chars, delivered = data.delivered_chars;
|
|
216
|
+
if (typeof requested != "number" || !Number.isSafeInteger(requested) || requested < 0 || requested > 2e4 || requested !== Array.from(text).length)
|
|
217
|
+
return {};
|
|
218
|
+
let validDelivered = typeof delivered == "number" && Number.isSafeInteger(delivered) && delivered >= 0 && delivered <= requested;
|
|
219
|
+
return {
|
|
220
|
+
requested_chars: requested,
|
|
221
|
+
delivered_chars: validDelivered ? delivered : void 0,
|
|
222
|
+
retryable: typeof data.retryable == "boolean" ? data.retryable : void 0,
|
|
223
|
+
retry_from_character: validDelivered && data.retry_from_character === delivered ? delivered : void 0
|
|
224
|
+
};
|
|
225
|
+
}
|
|
226
|
+
function outcome(reply, text) {
|
|
227
|
+
let data = driverData(reply);
|
|
228
|
+
return {
|
|
229
|
+
...select(data, ["status", "effect", "refusal", "error", "code", "path", "verified", "verify", "success", "activated"]),
|
|
230
|
+
refusal: typeof data.refusal == "object" && data.refusal !== null ? select(record(data.refusal), ["code", "message", "facility"]) : select(data, ["refusal"]).refusal,
|
|
231
|
+
error: typeof data.error == "object" && data.error !== null ? select(record(data.error), ["code", "message", "facility"]) : select(data, ["error"]).error,
|
|
232
|
+
escalation: record(data.escalation).recommended === "foreground" ? "foreground" : void 0,
|
|
233
|
+
input: driverRefused(reply) ? "refused_or_failed" : "dispatched",
|
|
234
|
+
applicationEffect: "unverified",
|
|
235
|
+
...typingRecovery(data, text)
|
|
236
|
+
};
|
|
237
|
+
}
|
|
238
|
+
function abortable(pending, signal) {
|
|
239
|
+
return new Promise((resolve, reject) => {
|
|
240
|
+
let abort = () => {
|
|
241
|
+
signal.removeEventListener("abort", abort), reject(signal.reason ?? new Error("Computer operation cancelled."));
|
|
242
|
+
};
|
|
243
|
+
signal.addEventListener("abort", abort, { once: !0 }), pending.then((value) => {
|
|
244
|
+
signal.removeEventListener("abort", abort), resolve(value);
|
|
245
|
+
}, (error) => {
|
|
246
|
+
signal.removeEventListener("abort", abort), reject(error);
|
|
247
|
+
}), signal.aborted && abort();
|
|
248
|
+
});
|
|
249
|
+
}
|
|
250
|
+
var 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.", ObservationError = class extends Error {
|
|
251
|
+
code;
|
|
252
|
+
constructor(code, message) {
|
|
253
|
+
super(`Stale observation. ${message}`), this.code = code;
|
|
254
|
+
}
|
|
255
|
+
};
|
|
256
|
+
function targetFrom(input) {
|
|
257
|
+
if (input.desktop === !0) {
|
|
258
|
+
if (input.pid !== void 0 || input.window_id !== void 0)
|
|
259
|
+
throw new Error("Desktop target cannot include pid/window_id.");
|
|
260
|
+
return { desktop: !0 };
|
|
261
|
+
}
|
|
262
|
+
if (typeof input.pid != "number" || !Number.isInteger(input.pid) || input.pid < 1 || typeof input.window_id != "number" || !Number.isInteger(input.window_id) || input.window_id < 1)
|
|
263
|
+
throw new Error("Window target requires positive integer pid and window_id.");
|
|
264
|
+
return { pid: input.pid, window_id: input.window_id };
|
|
265
|
+
}
|
|
266
|
+
function sameTarget(a, b) {
|
|
267
|
+
return a.desktop === !0 ? b.desktop === !0 : b.desktop !== !0 && a.pid === b.pid && a.window_id === b.window_id;
|
|
268
|
+
}
|
|
269
|
+
var ComputerWorkflow = class {
|
|
270
|
+
observation;
|
|
271
|
+
lastCapture;
|
|
272
|
+
lastAction;
|
|
273
|
+
abort = new AbortController();
|
|
274
|
+
closing;
|
|
275
|
+
driver;
|
|
276
|
+
lease;
|
|
277
|
+
constructor(driver, lease = new DesktopLease()) {
|
|
278
|
+
this.driver = driver, this.lease = lease, this.driver.setProcessObserver?.((pid) => this.lease.trackProcess(pid));
|
|
279
|
+
}
|
|
280
|
+
fresh(input, previous) {
|
|
281
|
+
if (!previous)
|
|
282
|
+
throw new ObservationError("observation_unavailable", "No active observation is available.");
|
|
283
|
+
if (previous.token !== input.observation)
|
|
284
|
+
throw new ObservationError("observation_mismatch", "Token does not match the active observation.");
|
|
285
|
+
if (!sameTarget(previous.target, targetFrom(input)))
|
|
286
|
+
throw new ObservationError("observation_target_mismatch", "Token belongs to a different target.");
|
|
287
|
+
if (Date.now() - previous.time > 3e4)
|
|
288
|
+
throw new ObservationError("observation_expired", "The active observation is older than 30 seconds.");
|
|
289
|
+
return previous;
|
|
290
|
+
}
|
|
291
|
+
async capture(target, signal, previous, crop) {
|
|
292
|
+
let time = Date.now(), 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: !1, include_screenshot: !0, max_dimension: 2560 }, signal), signal);
|
|
293
|
+
if (driverRefused(reply))
|
|
294
|
+
throw new Error(`Capture refused: ${JSON.stringify(outcome(reply))}`);
|
|
295
|
+
let data = driverData(reply), images = Array.isArray(reply.content) ? reply.content.filter((item) => item.type === "image") : [];
|
|
296
|
+
if (images.length !== 1 || typeof images[0].data != "string" || typeof images[0].mimeType != "string")
|
|
297
|
+
throw new Error("Capture must return exactly one screenshot.");
|
|
298
|
+
let image = { type: "image", data: images[0].data, mimeType: images[0].mimeType }, dimensions = screenshotDimensions(image);
|
|
299
|
+
if (data.screenshot_frame_valid === !1 || data.screenshot_error != null || dimensions.width !== data.screenshot_width || dimensions.height !== data.screenshot_height)
|
|
300
|
+
throw new Error("Screenshot dimensions or frame could not be verified. Capture again.");
|
|
301
|
+
let geometry = JSON.stringify(select(record(data.window_bounds), ["x", "y", "width", "height"]));
|
|
302
|
+
if (crop && previous && (previous.sourceWidth !== dimensions.width || previous.sourceHeight !== dimensions.height || previous.geometry !== geometry))
|
|
303
|
+
throw new Error("Target geometry changed. Capture a full image before selecting a crop.");
|
|
304
|
+
let prepared = await abortable(prepareComputerImage(image, crop), signal);
|
|
305
|
+
return signal.throwIfAborted(), { ...prepared, token: randomUUID2(), target, time, geometry };
|
|
306
|
+
}
|
|
307
|
+
imageResult(observation, extra = {}) {
|
|
308
|
+
this.observation = observation;
|
|
309
|
+
let { width, height, region, sourceWidth, sourceHeight, scaleX, scaleY, target, token } = observation;
|
|
310
|
+
return {
|
|
311
|
+
content: [{ type: "text", text: JSON.stringify({
|
|
312
|
+
...extra,
|
|
313
|
+
observation: token,
|
|
314
|
+
target,
|
|
315
|
+
image: { width, height },
|
|
316
|
+
mapping: { sourceWidth, sourceHeight, ...region, scaleX, scaleY },
|
|
317
|
+
coordinates: "Use returned-image pixels; mapping is applied automatically."
|
|
318
|
+
}) }, observation.image],
|
|
319
|
+
details: { observation: token },
|
|
320
|
+
isError: !1
|
|
321
|
+
};
|
|
322
|
+
}
|
|
323
|
+
crop(input, previous) {
|
|
324
|
+
let crop = record(input.crop), { x, y, width, height } = crop;
|
|
325
|
+
if (typeof x != "number" || typeof y != "number" || typeof width != "number" || typeof height != "number" || ![x, y, width, height].every(Number.isFinite) || x < 0 || y < 0 || width <= 0 || height <= 0 || x + width > previous.width || y + height > previous.height || Object.keys(crop).some((key) => !["x", "y", "width", "height"].includes(key)))
|
|
326
|
+
throw new Error("Crop must fit the latest returned image.");
|
|
327
|
+
let left = Math.floor(previous.region.x + x * previous.scaleX), top = Math.floor(previous.region.y + y * previous.scaleY), right = Math.min(previous.sourceWidth, Math.ceil(previous.region.x + (x + width) * previous.scaleX)), bottom = Math.min(previous.sourceHeight, Math.ceil(previous.region.y + (y + height) * previous.scaleY));
|
|
328
|
+
return { x: left, y: top, width: right - left, height: bottom - top };
|
|
329
|
+
}
|
|
330
|
+
action(name, input, previous) {
|
|
331
|
+
let args = previous.target.desktop ? { scope: "desktop" } : { pid: previous.target.pid, window_id: previous.target.window_id };
|
|
332
|
+
if (previous.target.desktop && input.foreground !== !0)
|
|
333
|
+
throw new Error("Desktop input requires foreground=true.");
|
|
334
|
+
name !== "computer_window" && (args.delivery_mode = input.foreground === !0 ? "foreground" : "background");
|
|
335
|
+
for (let key of ["x", "y", "from_x", "from_y", "to_x", "to_y"]) {
|
|
336
|
+
if (name === "computer_window")
|
|
337
|
+
break;
|
|
338
|
+
let value = input[key];
|
|
339
|
+
if (value === void 0)
|
|
340
|
+
continue;
|
|
341
|
+
let horizontal = key.endsWith("x");
|
|
342
|
+
if (typeof value != "number" || !Number.isFinite(value) || value < 0 || value >= (horizontal ? previous.width : previous.height))
|
|
343
|
+
throw new Error("Coordinate outside the observed image.");
|
|
344
|
+
args[key] = (horizontal ? previous.region.x : previous.region.y) + value * (horizontal ? previous.scaleX : previous.scaleY);
|
|
345
|
+
}
|
|
346
|
+
if (input.x === void 0 != (input.y === void 0))
|
|
347
|
+
throw new Error("Provide a complete x/y pair.");
|
|
348
|
+
if (previous.target.desktop && ["computer_key", "computer_text"].includes(name) && input.x !== void 0)
|
|
349
|
+
throw new Error("Desktop keyboard input uses the observed focused field. Change focus with a separate grounded click.");
|
|
350
|
+
let operation;
|
|
351
|
+
switch (name) {
|
|
352
|
+
case "computer_click":
|
|
353
|
+
case "computer_scroll":
|
|
354
|
+
if (input.x === void 0 || input.y === void 0)
|
|
355
|
+
throw new Error("This action requires x/y image coordinates.");
|
|
356
|
+
operation = name === "computer_click" ? "click" : "scroll";
|
|
357
|
+
for (let key of name === "computer_click" ? ["button", "count", "modifier"] : ["direction", "amount", "by"])
|
|
358
|
+
input[key] !== void 0 && (args[key] = input[key]);
|
|
359
|
+
break;
|
|
360
|
+
case "computer_drag":
|
|
361
|
+
if (!["from_x", "from_y", "to_x", "to_y"].every((key) => typeof args[key] == "number"))
|
|
362
|
+
throw new Error("Drag requires both endpoints.");
|
|
363
|
+
operation = "drag";
|
|
364
|
+
break;
|
|
365
|
+
case "computer_key": {
|
|
366
|
+
if (input.key === void 0 == (input.keys === void 0))
|
|
367
|
+
throw new Error("Provide key OR keys.");
|
|
368
|
+
let keys = Array.isArray(input.keys) ? input.keys : void 0, last = keys?.at(-1), modifiers = /* @__PURE__ */ new Set(["ctrl", "control", "shift", "alt", "win", "windows", "cmd", "command"]), foregroundShortcut = process.platform === "win32" && input.foreground === !0 && input.x === void 0 && keys !== void 0 && keys.length >= 2 && keys.slice(0, -1).every((key) => typeof key == "string" && modifiers.has(key.toLowerCase())) && typeof last == "string" && !modifiers.has(last.toLowerCase());
|
|
369
|
+
operation = input.keys === void 0 || foregroundShortcut ? "press_key" : "hotkey", foregroundShortcut ? (args.key = last, args.modifiers = keys.slice(0, -1)) : args[input.keys === void 0 ? "key" : "keys"] = input.keys ?? input.key;
|
|
370
|
+
break;
|
|
371
|
+
}
|
|
372
|
+
case "computer_text":
|
|
373
|
+
operation = "type_text", args.text = input.text;
|
|
374
|
+
break;
|
|
375
|
+
case "computer_window":
|
|
376
|
+
if (previous.target.desktop)
|
|
377
|
+
throw new Error("Window management requires an exact window target.");
|
|
378
|
+
if (input.action === "frame") {
|
|
379
|
+
for (let key of ["x", "y", "width", "height"]) {
|
|
380
|
+
let value = input[key];
|
|
381
|
+
if (typeof value != "number" || !Number.isFinite(value) || ["width", "height"].includes(key) && value <= 0)
|
|
382
|
+
throw new Error("Frame requires valid x/y/width/height.");
|
|
383
|
+
args[key] = value;
|
|
384
|
+
}
|
|
385
|
+
operation = "set_window_frame";
|
|
386
|
+
} else if (input.action === "focus" && ["x", "y", "width", "height"].every((key) => input[key] === void 0))
|
|
387
|
+
operation = "bring_to_front";
|
|
388
|
+
else
|
|
389
|
+
throw new Error("Use frame or focus. Minimize/restore uses a fresh image click on the visible control.");
|
|
390
|
+
break;
|
|
391
|
+
default:
|
|
392
|
+
throw new Error("Unknown computer action.");
|
|
393
|
+
}
|
|
394
|
+
return { operation, args };
|
|
395
|
+
}
|
|
396
|
+
async execute(name, input, signal) {
|
|
397
|
+
let combined = AbortSignal.any([this.abort.signal, this.lease.signal, AbortSignal.timeout(9e4), ...signal ? [signal] : []]), inputDispatched = !1, failureCode = "workflow_unavailable", actionOutcome;
|
|
398
|
+
try {
|
|
399
|
+
let result = await this.lease.run(async () => {
|
|
400
|
+
if (failureCode = "invalid_arguments", !Object.hasOwn(computerSchemas, name))
|
|
401
|
+
throw new Error("Unknown computer operation.");
|
|
402
|
+
let schema = computerSchemas[name];
|
|
403
|
+
if (Object.keys(input).some((key) => !Object.hasOwn(schema.properties, key)))
|
|
404
|
+
throw new Error("Unsupported computer argument. Use image coordinates only.");
|
|
405
|
+
let previous = this.observation;
|
|
406
|
+
if (this.observation = void 0, name === "computer_apps" || name === "computer_launch") {
|
|
407
|
+
let operation2 = name === "computer_launch" ? "launch_app" : input.pid === void 0 ? "list_apps" : "list_windows";
|
|
408
|
+
if (input.query !== void 0 && (typeof input.query != "string" || !input.query.trim() || Array.from(input.query).length > 240))
|
|
409
|
+
throw new Error("Discovery query must be a nonblank string of at most 240 characters.");
|
|
410
|
+
let query = typeof input.query == "string" ? input.query.trim() : void 0, needle = query?.toLowerCase(), offset = input.offset ?? 0;
|
|
411
|
+
if (typeof offset != "number" || !Number.isSafeInteger(offset) || offset < 0)
|
|
412
|
+
throw new Error("Discovery offset must be a nonnegative safe integer.");
|
|
413
|
+
let args2 = name === "computer_launch" ? { name: input.name } : input.pid === void 0 ? {} : { pid: input.pid };
|
|
414
|
+
combined.throwIfAborted(), inputDispatched = name === "computer_launch", failureCode = "discovery_failed";
|
|
415
|
+
let reply2 = await abortable(this.driver.call(operation2, args2, combined), combined), data = driverData(reply2), discovered = data.apps ?? data.windows, rows = Array.isArray(discovered) && needle ? discovered.filter((row) => {
|
|
416
|
+
let item = record(row);
|
|
417
|
+
return [item.name, item.app_name, item.title].some((value) => typeof value == "string" && value.toLowerCase().includes(needle));
|
|
418
|
+
}) : discovered, metadata = Array.isArray(rows) ? rows.slice(offset, offset + 50).map((row) => {
|
|
419
|
+
let item = record(row);
|
|
420
|
+
return {
|
|
421
|
+
...select(item, ["pid", "window_id", "name", "app_name", "title", "active", "running", "is_on_screen", "minimized"]),
|
|
422
|
+
bounds: item.bounds ? select(record(item.bounds), ["x", "y", "width", "height"]) : void 0
|
|
423
|
+
};
|
|
424
|
+
}) : void 0, remaining = Array.isArray(rows) ? Math.max(0, rows.length - offset - (metadata?.length ?? 0)) : 0;
|
|
425
|
+
return { content: [{ type: "text", text: JSON.stringify({
|
|
426
|
+
...outcome(reply2),
|
|
427
|
+
...select(data, ["pid", "window_id", "name", "title"]),
|
|
428
|
+
items: metadata,
|
|
429
|
+
query,
|
|
430
|
+
offset,
|
|
431
|
+
total: Array.isArray(rows) ? rows.length : void 0,
|
|
432
|
+
omitted: remaining || void 0,
|
|
433
|
+
next_offset: remaining ? offset + 50 : void 0,
|
|
434
|
+
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." : void 0
|
|
435
|
+
}) }], details: {}, isError: driverRefused(reply2) };
|
|
436
|
+
}
|
|
437
|
+
let target = targetFrom(input);
|
|
438
|
+
if (name === "computer_observe") {
|
|
439
|
+
let crop = input.crop === void 0 ? void 0 : this.crop(input, this.fresh(input, previous));
|
|
440
|
+
failureCode = "capture_failed";
|
|
441
|
+
let captured = await this.capture(target, combined, previous, crop), unchanged = this.lastCapture?.fingerprint === captured.fingerprint && sameTarget(this.lastCapture.target, target), repeats = crop ? 0 : unchanged ? (this.lastCapture?.repeats ?? 0) + 1 : 1;
|
|
442
|
+
return this.lastCapture = { fingerprint: captured.fingerprint, target, repeats }, repeats >= 3 ? {
|
|
443
|
+
content: [{ type: "text", text: "Three captures are unchanged. Workflow stopped; stop polling and reconsider the target or approach. No input token issued." }],
|
|
444
|
+
details: {},
|
|
445
|
+
isError: !0
|
|
446
|
+
} : this.imageResult(captured, { unchanged });
|
|
447
|
+
}
|
|
448
|
+
let grounded = this.fresh(input, previous), { operation, args } = this.action(name, input, grounded), { button = "left", count = 1, modifier = [], ...clickArgs } = args, signature = JSON.stringify({ operation, args: operation === "click" ? { ...clickArgs, button, count, modifier: Array.isArray(modifier) ? [...new Set(modifier)].sort() : modifier } : args });
|
|
449
|
+
if (this.lastAction?.unchanged && this.lastAction.signature === signature && this.lastAction.fingerprint === grounded.fingerprint)
|
|
450
|
+
throw new Error("The identical action had no visible change. Choose a different grounded action; never retry blindly.");
|
|
451
|
+
combined.throwIfAborted(), inputDispatched = !0;
|
|
452
|
+
let reply = await abortable(this.driver.call(operation, args, combined), combined);
|
|
453
|
+
combined.throwIfAborted(), actionOutcome = outcome(reply, name === "computer_text" ? input.text : void 0);
|
|
454
|
+
let recoveryGuidance = "retry_from_character" in actionOutcome && actionOutcome.retry_from_character !== void 0 ? "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." : void 0;
|
|
455
|
+
if (driverRefused(reply)) {
|
|
456
|
+
let data = driverData(reply), guidance = [
|
|
457
|
+
"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.",
|
|
458
|
+
[data.code, data.refusal, data.error, record(data.refusal).code, record(data.error).code].includes("background_unavailable") ? "After the fresh capture, foreground input is the next candidate if permitted, not another background shortcut. Inspect the field before deciding." : void 0,
|
|
459
|
+
recoveryGuidance
|
|
460
|
+
].filter(Boolean).join(" ");
|
|
461
|
+
return { content: [{ type: "text", text: JSON.stringify({ ...actionOutcome, guidance }) }], details: {}, isError: !0 };
|
|
462
|
+
}
|
|
463
|
+
try {
|
|
464
|
+
let after = await this.capture(target, combined), unchanged = after.fingerprint === grounded.fingerprint;
|
|
465
|
+
return this.lastAction = { signature, fingerprint: after.fingerprint, unchanged }, this.lastCapture = { fingerprint: after.fingerprint, target, repeats: 0 }, this.imageResult(after, {
|
|
466
|
+
...actionOutcome,
|
|
467
|
+
unchanged,
|
|
468
|
+
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.")
|
|
469
|
+
});
|
|
470
|
+
} catch {
|
|
471
|
+
return combined.throwIfAborted(), { content: [{ type: "text", text: JSON.stringify({
|
|
472
|
+
...actionOutcome,
|
|
473
|
+
observation: "unavailable",
|
|
474
|
+
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."}`,
|
|
475
|
+
error: "Post-action capture failed."
|
|
476
|
+
}) }], details: {}, isError: !0 };
|
|
477
|
+
}
|
|
478
|
+
}, combined);
|
|
479
|
+
return result.isError && await this.close(), result;
|
|
480
|
+
} catch (error) {
|
|
481
|
+
let cleanup = "confirmed";
|
|
482
|
+
try {
|
|
483
|
+
await this.close();
|
|
484
|
+
} catch {
|
|
485
|
+
cleanup = "unconfirmed";
|
|
486
|
+
}
|
|
487
|
+
throw new Error(JSON.stringify({
|
|
488
|
+
...actionOutcome,
|
|
489
|
+
code: inputDispatched ? "input_dispatch_failed" : error instanceof ObservationError ? error.code : failureCode,
|
|
490
|
+
input: inputDispatched ? "uncertain" : "not_dispatched",
|
|
491
|
+
applicationEffect: "unverified",
|
|
492
|
+
message: inputDispatched ? "Computer workflow stopped after dispatch began. Input may have taken effect." : `Computer workflow stopped. No input was sent by this call. ${error instanceof Error ? error.message.slice(0, 300) : "Operation unavailable."}`,
|
|
493
|
+
guidance: inputDispatched ? "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." : freshActionGuidance,
|
|
494
|
+
cleanup
|
|
495
|
+
}));
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
close() {
|
|
499
|
+
return this.abort.abort(), this.observation = void 0, this.closing ??= this.stop(), this.closing;
|
|
500
|
+
}
|
|
501
|
+
async stop() {
|
|
502
|
+
await this.driver.close(), await this.lease.close();
|
|
503
|
+
}
|
|
504
|
+
};
|
|
505
|
+
export {
|
|
506
|
+
ComputerWorkflow,
|
|
507
|
+
driverData,
|
|
508
|
+
driverRefused
|
|
509
|
+
};
|