@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
|
@@ -3,12 +3,13 @@ import { randomUUID } from "crypto";
|
|
|
3
3
|
import { Type } from "typebox";
|
|
4
4
|
import { Text } from "@ashx-j/lunr-tui";
|
|
5
5
|
import { IntercomClient } from "./broker/client.js";
|
|
6
|
-
import { spawnBrokerIfNeeded } from "./broker/spawn.js";
|
|
6
|
+
import { isNativeSupervisorChannelActive, spawnBrokerIfNeeded } from "./broker/spawn.js";
|
|
7
7
|
import { SessionListOverlay } from "./ui/session-list.js";
|
|
8
8
|
import { ComposeOverlay } from "./ui/compose.js";
|
|
9
9
|
import { InlineMessageComponent } from "./ui/inline-message.js";
|
|
10
10
|
import { getAskTimeoutMs, loadConfig } from "./config.js";
|
|
11
11
|
import { ReplyTracker } from "./reply-tracker.js";
|
|
12
|
+
import { isDiagnosticControlEvent } from "../pi-subagents/src/runs/shared/subagent-control.js";
|
|
12
13
|
const SUBAGENT_CONTROL_INTERCOM_EVENT = "subagent:control-intercom";
|
|
13
14
|
const SUBAGENT_RESULT_INTERCOM_EVENT = "subagent:result-intercom";
|
|
14
15
|
const SUBAGENT_RESULT_INTERCOM_DELIVERY_EVENT = "subagent:result-intercom-delivery";
|
|
@@ -310,7 +311,8 @@ function parseSubagentIntercomPayload(payload) {
|
|
|
310
311
|
return null;
|
|
311
312
|
}
|
|
312
313
|
const requestId = typeof record.requestId === "string" ? record.requestId : undefined;
|
|
313
|
-
|
|
314
|
+
const ownerNotificationSessionId = typeof record.ownerNotificationSessionId === "string" ? record.ownerNotificationSessionId : undefined;
|
|
315
|
+
return { to: record.to, message: record.message, ...(requestId ? { requestId } : {}), ...(ownerNotificationSessionId ? { ownerNotificationSessionId } : {}) };
|
|
314
316
|
}
|
|
315
317
|
function resolveIntercomPresenceName(sessionName, sessionId) {
|
|
316
318
|
const trimmedName = sessionName?.trim();
|
|
@@ -364,6 +366,8 @@ function getNamePollMs() {
|
|
|
364
366
|
return 1000;
|
|
365
367
|
}
|
|
366
368
|
export default function piIntercomExtension(pi) {
|
|
369
|
+
if (process.env.PI_SUBAGENT_CHILD === "1" && process.env.PI_SUBAGENT_COMMUNICATION_ENABLED === "0")
|
|
370
|
+
return;
|
|
367
371
|
let client = null;
|
|
368
372
|
const config = loadConfig();
|
|
369
373
|
const askTimeoutMs = getAskTimeoutMs();
|
|
@@ -875,6 +879,9 @@ export default function piIntercomExtension(pi) {
|
|
|
875
879
|
agentRunning = false;
|
|
876
880
|
activeTools.clear();
|
|
877
881
|
startNamePoll();
|
|
882
|
+
if (isNativeSupervisorChannelActive()) {
|
|
883
|
+
return;
|
|
884
|
+
}
|
|
878
885
|
const startupGeneration = runtimeGeneration;
|
|
879
886
|
startupConnectTimer = setTimeout(() => {
|
|
880
887
|
startupConnectTimer = null;
|
|
@@ -899,69 +906,74 @@ export default function piIntercomExtension(pi) {
|
|
|
899
906
|
...(error ? { error: getErrorMessage(error) } : {}),
|
|
900
907
|
});
|
|
901
908
|
}
|
|
909
|
+
const resultDeliveries = new Map();
|
|
910
|
+
const acknowledgedResults = [];
|
|
902
911
|
function relaySubagentIntercomPayload(payload, options) {
|
|
903
912
|
const parsed = parseSubagentIntercomPayload(payload);
|
|
904
913
|
if (!parsed)
|
|
905
914
|
return;
|
|
906
915
|
const relayGeneration = runtimeGeneration;
|
|
907
|
-
|
|
908
|
-
const
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
if (currentSessionTargetMatches(parsed.to)) {
|
|
913
|
-
deliverLocalSubagentRelayMessage(options.sender, options.status, parsed.message);
|
|
914
|
-
if (options.acknowledge)
|
|
915
|
-
emitResultDelivery(parsed.requestId, true);
|
|
916
|
+
const deliverLocal = () => {
|
|
917
|
+
const ctx = getLiveContext(runtimeContext, relayGeneration);
|
|
918
|
+
const ownerSessionId = ctx?.sessionManager.getSessionFile?.() ?? ctx?.sessionManager.getSessionId();
|
|
919
|
+
// The owner already receives subagent-notify; keep the relay ACK without another model message.
|
|
920
|
+
if (options.sender === "subagent-result" && ownerSessionId && parsed.ownerNotificationSessionId === ownerSessionId)
|
|
916
921
|
return;
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
if (!relayStillLive())
|
|
944
|
-
return;
|
|
945
|
-
if (!result.delivered) {
|
|
946
|
-
const error = new Error(result.reason ?? "Session may not exist or has disconnected.");
|
|
947
|
-
recordSubagentDeliveryError(options.errorEntryType, parsed.to, parsed.message, error);
|
|
948
|
-
if (options.acknowledge)
|
|
949
|
-
emitResultDelivery(parsed.requestId, false, error);
|
|
950
|
-
return;
|
|
922
|
+
deliverLocalSubagentRelayMessage(options.sender, options.status, parsed.message);
|
|
923
|
+
};
|
|
924
|
+
const key = options.acknowledge && parsed.requestId ? `${relayGeneration}:${parsed.requestId}` : undefined;
|
|
925
|
+
let delivery = key ? resultDeliveries.get(key) : undefined;
|
|
926
|
+
if (!delivery) {
|
|
927
|
+
delivery = (async () => {
|
|
928
|
+
const relayStillLive = () => !runtimeStarted || Boolean(getLiveContext(runtimeContext, relayGeneration));
|
|
929
|
+
try {
|
|
930
|
+
if (!relayStillLive())
|
|
931
|
+
return false;
|
|
932
|
+
if (currentSessionTargetMatches(parsed.to)) {
|
|
933
|
+
deliverLocal();
|
|
934
|
+
return true;
|
|
935
|
+
}
|
|
936
|
+
const activeClient = await ensureConnected("background");
|
|
937
|
+
const target = await resolveSessionTarget(activeClient, parsed.to) ?? parsed.to;
|
|
938
|
+
if (!relayStillLive())
|
|
939
|
+
return false;
|
|
940
|
+
if (currentSessionTargetMatches(parsed.to, target, activeClient)) {
|
|
941
|
+
deliverLocal();
|
|
942
|
+
return true;
|
|
943
|
+
}
|
|
944
|
+
const result = await activeClient.send(target, { text: parsed.message });
|
|
945
|
+
if (!result.delivered)
|
|
946
|
+
throw new Error(result.reason ?? "Session may not exist or has disconnected.");
|
|
947
|
+
return true;
|
|
951
948
|
}
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
949
|
+
catch (error) {
|
|
950
|
+
if (relayStillLive())
|
|
951
|
+
recordSubagentDeliveryError(options.errorEntryType, parsed.to, parsed.message, error);
|
|
952
|
+
return false;
|
|
953
|
+
}
|
|
954
|
+
})();
|
|
955
|
+
if (key) {
|
|
956
|
+
resultDeliveries.set(key, delivery);
|
|
957
|
+
void delivery.then((delivered) => {
|
|
958
|
+
if (!delivered) {
|
|
959
|
+
if (resultDeliveries.get(key) === delivery)
|
|
960
|
+
resultDeliveries.delete(key);
|
|
961
|
+
return;
|
|
962
|
+
}
|
|
963
|
+
acknowledgedResults.push(key);
|
|
964
|
+
while (acknowledgedResults.length > 1024)
|
|
965
|
+
resultDeliveries.delete(acknowledgedResults.shift());
|
|
966
|
+
});
|
|
961
967
|
}
|
|
962
|
-
}
|
|
968
|
+
}
|
|
969
|
+
void delivery.then((delivered) => {
|
|
970
|
+
if (options.acknowledge)
|
|
971
|
+
emitResultDelivery(parsed.requestId, delivered);
|
|
972
|
+
});
|
|
963
973
|
}
|
|
964
974
|
const unsubscribeSubagentControlIntercom = pi.events.on(SUBAGENT_CONTROL_INTERCOM_EVENT, (payload) => {
|
|
975
|
+
if (isDiagnosticControlEvent(payload?.event))
|
|
976
|
+
return;
|
|
965
977
|
relaySubagentIntercomPayload(payload, {
|
|
966
978
|
sender: "subagent-control",
|
|
967
979
|
status: "needs_attention",
|
|
@@ -1100,7 +1112,8 @@ export default function piIntercomExtension(pi) {
|
|
|
1100
1112
|
}
|
|
1101
1113
|
});
|
|
1102
1114
|
const childOrchestratorMetadata = readChildOrchestratorMetadata();
|
|
1103
|
-
|
|
1115
|
+
const nativeSupervisorChannel = isNativeSupervisorChannelActive();
|
|
1116
|
+
if (childOrchestratorMetadata && !nativeSupervisorChannel) {
|
|
1104
1117
|
pi.registerTool({
|
|
1105
1118
|
name: "contact_supervisor",
|
|
1106
1119
|
label: "Contact Supervisor",
|
|
@@ -1361,10 +1374,11 @@ export default function piIntercomExtension(pi) {
|
|
|
1361
1374
|
},
|
|
1362
1375
|
});
|
|
1363
1376
|
}
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1377
|
+
if (!nativeSupervisorChannel)
|
|
1378
|
+
pi.registerTool({
|
|
1379
|
+
name: "intercom",
|
|
1380
|
+
label: "Intercom",
|
|
1381
|
+
description: `Send a message to another pi session running on this machine.
|
|
1368
1382
|
Use this to communicate findings, request help, or coordinate work with other sessions.
|
|
1369
1383
|
|
|
1370
1384
|
Usage:
|
|
@@ -1374,158 +1388,131 @@ Usage:
|
|
|
1374
1388
|
intercom({ action: "reply", message: "..." }) → Reply to the active/single pending ask
|
|
1375
1389
|
intercom({ action: "pending" }) → List unresolved inbound asks
|
|
1376
1390
|
intercom({ action: "status" }) → Show connection status`,
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1391
|
+
promptSnippet: "Use to coordinate with other local pi sessions: list peers, send updates, ask for help, or check intercom connectivity.",
|
|
1392
|
+
parameters: Type.Object({
|
|
1393
|
+
action: StringEnum(["list", "send", "ask", "reply", "pending", "status"], {
|
|
1394
|
+
description: "Action: 'list', 'send', 'ask', 'reply', 'pending', or 'status'",
|
|
1395
|
+
}),
|
|
1396
|
+
to: Type.Optional(Type.String({
|
|
1397
|
+
description: "Target session name or ID (for 'send', 'ask', or disambiguating 'reply')",
|
|
1398
|
+
})),
|
|
1399
|
+
message: Type.Optional(Type.String({
|
|
1400
|
+
description: "Message to send (for 'send', 'ask', or 'reply' action)",
|
|
1401
|
+
})),
|
|
1402
|
+
attachments: Type.Optional(Type.Array(Type.Object({
|
|
1403
|
+
type: StringEnum(["file", "snippet", "context"]),
|
|
1404
|
+
name: Type.String(),
|
|
1405
|
+
content: Type.String(),
|
|
1406
|
+
language: Type.Optional(Type.String()),
|
|
1407
|
+
}))),
|
|
1408
|
+
replyTo: Type.Optional(Type.String({
|
|
1409
|
+
description: "Message ID to reply to (for threading or responding to an 'ask')",
|
|
1410
|
+
})),
|
|
1381
1411
|
}),
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
if (!currentSession) {
|
|
1412
|
+
async execute(_toolCallId, params, _signal, _onUpdate, ctx) {
|
|
1413
|
+
let connectedClient;
|
|
1414
|
+
try {
|
|
1415
|
+
connectedClient = await ensureConnected("tool");
|
|
1416
|
+
}
|
|
1417
|
+
catch (error) {
|
|
1418
|
+
return {
|
|
1419
|
+
content: [{ type: "text", text: `Intercom not connected: ${getErrorMessage(error)}` }],
|
|
1420
|
+
details: { error: true },
|
|
1421
|
+
};
|
|
1422
|
+
}
|
|
1423
|
+
syncPresenceIdentity(ctx.sessionManager.getSessionId());
|
|
1424
|
+
const { action, to, message, attachments, replyTo } = params;
|
|
1425
|
+
switch (action) {
|
|
1426
|
+
case "list": {
|
|
1427
|
+
try {
|
|
1428
|
+
const mySessionId = connectedClient.sessionId;
|
|
1429
|
+
const sessions = await connectedClient.listSessions();
|
|
1430
|
+
const currentSession = sessions.find(s => s.id === mySessionId);
|
|
1431
|
+
const otherSessions = sessions.filter(s => s.id !== mySessionId);
|
|
1432
|
+
if (!currentSession) {
|
|
1433
|
+
return {
|
|
1434
|
+
content: [{ type: "text", text: "Current session is missing from intercom session list." }],
|
|
1435
|
+
details: { error: true },
|
|
1436
|
+
};
|
|
1437
|
+
}
|
|
1438
|
+
const currentSection = `**Current session:**\n${formatSessionListRow(currentSession, currentSession.cwd, true)}`;
|
|
1439
|
+
const otherSection = otherSessions.length === 0
|
|
1440
|
+
? "**Other sessions:**\nNo other sessions connected."
|
|
1441
|
+
: `**Other sessions:**\n${otherSessions.map(s => formatSessionListRow(s, currentSession.cwd, false)).join("\n")}`;
|
|
1442
|
+
return {
|
|
1443
|
+
content: [{ type: "text", text: `${currentSection}\n\n${otherSection}` }],
|
|
1444
|
+
details: {},
|
|
1445
|
+
};
|
|
1446
|
+
}
|
|
1447
|
+
catch (error) {
|
|
1419
1448
|
return {
|
|
1420
|
-
content: [{ type: "text", text:
|
|
1449
|
+
content: [{ type: "text", text: `Failed to list sessions: ${getErrorMessage(error)}` }],
|
|
1421
1450
|
details: { error: true },
|
|
1422
1451
|
};
|
|
1423
1452
|
}
|
|
1424
|
-
const currentSection = `**Current session:**\n${formatSessionListRow(currentSession, currentSession.cwd, true)}`;
|
|
1425
|
-
const otherSection = otherSessions.length === 0
|
|
1426
|
-
? "**Other sessions:**\nNo other sessions connected."
|
|
1427
|
-
: `**Other sessions:**\n${otherSessions.map(s => formatSessionListRow(s, currentSession.cwd, false)).join("\n")}`;
|
|
1428
|
-
return {
|
|
1429
|
-
content: [{ type: "text", text: `${currentSection}\n\n${otherSection}` }],
|
|
1430
|
-
details: {},
|
|
1431
|
-
};
|
|
1432
|
-
}
|
|
1433
|
-
catch (error) {
|
|
1434
|
-
return {
|
|
1435
|
-
content: [{ type: "text", text: `Failed to list sessions: ${getErrorMessage(error)}` }],
|
|
1436
|
-
details: { error: true },
|
|
1437
|
-
};
|
|
1438
|
-
}
|
|
1439
|
-
}
|
|
1440
|
-
case "send": {
|
|
1441
|
-
if (!to || !message) {
|
|
1442
|
-
return {
|
|
1443
|
-
content: [{ type: "text", text: "Missing 'to' or 'message' parameter" }],
|
|
1444
|
-
details: { error: true },
|
|
1445
|
-
};
|
|
1446
1453
|
}
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
if (sendTo === connectedClient.sessionId) {
|
|
1454
|
+
case "send": {
|
|
1455
|
+
if (!to || !message) {
|
|
1450
1456
|
return {
|
|
1451
|
-
content: [{ type: "text", text: "
|
|
1457
|
+
content: [{ type: "text", text: "Missing 'to' or 'message' parameter" }],
|
|
1452
1458
|
details: { error: true },
|
|
1453
1459
|
};
|
|
1454
1460
|
}
|
|
1455
|
-
|
|
1456
|
-
const
|
|
1457
|
-
|
|
1458
|
-
if (!confirmed) {
|
|
1461
|
+
try {
|
|
1462
|
+
const sendTo = await resolveSessionTarget(connectedClient, to) ?? to;
|
|
1463
|
+
if (sendTo === connectedClient.sessionId) {
|
|
1459
1464
|
return {
|
|
1460
|
-
content: [{ type: "text", text: "
|
|
1461
|
-
details: {},
|
|
1465
|
+
content: [{ type: "text", text: "Cannot message the current session" }],
|
|
1466
|
+
details: { error: true },
|
|
1462
1467
|
};
|
|
1463
1468
|
}
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1469
|
+
if (!replyTo && config.confirmSend && ctx.hasUI) {
|
|
1470
|
+
const attachmentText = attachments?.length ? formatAttachments(attachments) : "";
|
|
1471
|
+
const confirmed = await ctx.ui.confirm("Send Message", `Send to "${to}":\n\n${message}${attachmentText}`);
|
|
1472
|
+
if (!confirmed) {
|
|
1473
|
+
return {
|
|
1474
|
+
content: [{ type: "text", text: "Message cancelled by user" }],
|
|
1475
|
+
details: {},
|
|
1476
|
+
};
|
|
1477
|
+
}
|
|
1478
|
+
}
|
|
1479
|
+
const result = await connectedClient.send(sendTo, {
|
|
1480
|
+
text: message,
|
|
1481
|
+
attachments,
|
|
1482
|
+
replyTo,
|
|
1483
|
+
});
|
|
1484
|
+
if (!result.delivered) {
|
|
1485
|
+
const errorText = result.reason ?? "Session may not exist or has disconnected.";
|
|
1486
|
+
return {
|
|
1487
|
+
content: [{ type: "text", text: `Message to "${to}" was not delivered: ${errorText}` }],
|
|
1488
|
+
details: { messageId: result.id, delivered: false, reason: result.reason },
|
|
1489
|
+
};
|
|
1490
|
+
}
|
|
1491
|
+
pi.appendEntry("intercom_sent", {
|
|
1492
|
+
to,
|
|
1493
|
+
message: { text: message, attachments, replyTo },
|
|
1494
|
+
messageId: result.id,
|
|
1495
|
+
timestamp: Date.now(),
|
|
1496
|
+
});
|
|
1497
|
+
if (replyTo) {
|
|
1498
|
+
replyTracker.markReplied(replyTo);
|
|
1499
|
+
}
|
|
1472
1500
|
return {
|
|
1473
|
-
content: [{ type: "text", text: `Message to
|
|
1474
|
-
details: { messageId: result.id, delivered:
|
|
1501
|
+
content: [{ type: "text", text: `Message sent to ${to}` }],
|
|
1502
|
+
details: { messageId: result.id, delivered: true },
|
|
1475
1503
|
};
|
|
1476
1504
|
}
|
|
1477
|
-
|
|
1478
|
-
to,
|
|
1479
|
-
message: { text: message, attachments, replyTo },
|
|
1480
|
-
messageId: result.id,
|
|
1481
|
-
timestamp: Date.now(),
|
|
1482
|
-
});
|
|
1483
|
-
if (replyTo) {
|
|
1484
|
-
replyTracker.markReplied(replyTo);
|
|
1485
|
-
}
|
|
1486
|
-
return {
|
|
1487
|
-
content: [{ type: "text", text: `Message sent to ${to}` }],
|
|
1488
|
-
details: { messageId: result.id, delivered: true },
|
|
1489
|
-
};
|
|
1490
|
-
}
|
|
1491
|
-
catch (error) {
|
|
1492
|
-
return {
|
|
1493
|
-
content: [{ type: "text", text: `Failed to send: ${getErrorMessage(error)}` }],
|
|
1494
|
-
details: { error: true },
|
|
1495
|
-
};
|
|
1496
|
-
}
|
|
1497
|
-
}
|
|
1498
|
-
case "ask": {
|
|
1499
|
-
if (!to || !message) {
|
|
1500
|
-
return {
|
|
1501
|
-
content: [{ type: "text", text: "Missing 'to' or 'message' parameter" }],
|
|
1502
|
-
details: { error: true },
|
|
1503
|
-
};
|
|
1504
|
-
}
|
|
1505
|
-
if (replyWaiter) {
|
|
1506
|
-
return {
|
|
1507
|
-
content: [{ type: "text", text: "Already waiting for a reply" }],
|
|
1508
|
-
details: { error: true },
|
|
1509
|
-
};
|
|
1510
|
-
}
|
|
1511
|
-
if (_signal?.aborted) {
|
|
1512
|
-
return {
|
|
1513
|
-
content: [{ type: "text", text: "Cancelled" }],
|
|
1514
|
-
details: { error: true },
|
|
1515
|
-
};
|
|
1516
|
-
}
|
|
1517
|
-
let replyPromise = null;
|
|
1518
|
-
try {
|
|
1519
|
-
const sendTo = await resolveSessionTarget(connectedClient, to) ?? to;
|
|
1520
|
-
if (_signal?.aborted) {
|
|
1505
|
+
catch (error) {
|
|
1521
1506
|
return {
|
|
1522
|
-
content: [{ type: "text", text:
|
|
1507
|
+
content: [{ type: "text", text: `Failed to send: ${getErrorMessage(error)}` }],
|
|
1523
1508
|
details: { error: true },
|
|
1524
1509
|
};
|
|
1525
1510
|
}
|
|
1526
|
-
|
|
1511
|
+
}
|
|
1512
|
+
case "ask": {
|
|
1513
|
+
if (!to || !message) {
|
|
1527
1514
|
return {
|
|
1528
|
-
content: [{ type: "text", text: "
|
|
1515
|
+
content: [{ type: "text", text: "Missing 'to' or 'message' parameter" }],
|
|
1529
1516
|
details: { error: true },
|
|
1530
1517
|
};
|
|
1531
1518
|
}
|
|
@@ -1535,198 +1522,225 @@ Usage:
|
|
|
1535
1522
|
details: { error: true },
|
|
1536
1523
|
};
|
|
1537
1524
|
}
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1525
|
+
if (_signal?.aborted) {
|
|
1526
|
+
return {
|
|
1527
|
+
content: [{ type: "text", text: "Cancelled" }],
|
|
1528
|
+
details: { error: true },
|
|
1529
|
+
};
|
|
1530
|
+
}
|
|
1531
|
+
let replyPromise = null;
|
|
1532
|
+
try {
|
|
1533
|
+
const sendTo = await resolveSessionTarget(connectedClient, to) ?? to;
|
|
1534
|
+
if (_signal?.aborted) {
|
|
1535
|
+
return {
|
|
1536
|
+
content: [{ type: "text", text: "Cancelled" }],
|
|
1537
|
+
details: { error: true },
|
|
1538
|
+
};
|
|
1539
|
+
}
|
|
1540
|
+
if (sendTo === connectedClient.sessionId) {
|
|
1541
|
+
return {
|
|
1542
|
+
content: [{ type: "text", text: "Cannot message the current session" }],
|
|
1543
|
+
details: { error: true },
|
|
1544
|
+
};
|
|
1545
|
+
}
|
|
1546
|
+
if (replyWaiter) {
|
|
1547
|
+
return {
|
|
1548
|
+
content: [{ type: "text", text: "Already waiting for a reply" }],
|
|
1549
|
+
details: { error: true },
|
|
1550
|
+
};
|
|
1551
|
+
}
|
|
1552
|
+
const questionId = randomUUID();
|
|
1553
|
+
replyPromise = waitForReply(sendTo, questionId, _signal, () => connectedClient.cancelAsk(questionId));
|
|
1554
|
+
replyPromise.catch(() => undefined);
|
|
1555
|
+
const sendResult = await connectedClient.send(sendTo, {
|
|
1556
|
+
messageId: questionId,
|
|
1557
|
+
text: message,
|
|
1558
|
+
attachments,
|
|
1559
|
+
replyTo,
|
|
1560
|
+
expectsReply: true,
|
|
1561
|
+
});
|
|
1562
|
+
if (!sendResult.delivered) {
|
|
1563
|
+
const errorText = sendResult.reason ?? "Session may not exist or has disconnected.";
|
|
1564
|
+
rejectReplyWaiter(new Error(`Message to "${to}" was not delivered: ${errorText}`));
|
|
1565
|
+
if (replyPromise) {
|
|
1566
|
+
try {
|
|
1567
|
+
await replyPromise;
|
|
1568
|
+
}
|
|
1569
|
+
catch {
|
|
1570
|
+
// The waiter was already rejected above. Keep the delivery failure as the only error here.
|
|
1571
|
+
}
|
|
1572
|
+
}
|
|
1573
|
+
return {
|
|
1574
|
+
content: [{ type: "text", text: `Message to "${to}" was not delivered: ${errorText}` }],
|
|
1575
|
+
details: { error: true },
|
|
1576
|
+
};
|
|
1577
|
+
}
|
|
1578
|
+
pi.appendEntry("intercom_sent", {
|
|
1579
|
+
to,
|
|
1580
|
+
message: { text: message, attachments, replyTo },
|
|
1581
|
+
messageId: sendResult.id,
|
|
1582
|
+
timestamp: Date.now(),
|
|
1583
|
+
});
|
|
1584
|
+
const replyMessage = await replyPromise;
|
|
1585
|
+
const replyText = replyMessage.content.text;
|
|
1586
|
+
const replyAttachments = replyMessage.content.attachments?.length
|
|
1587
|
+
? formatAttachments(replyMessage.content.attachments)
|
|
1588
|
+
: "";
|
|
1589
|
+
pi.appendEntry("intercom_received", {
|
|
1590
|
+
from: to,
|
|
1591
|
+
message: { text: replyText, attachments: replyMessage.content.attachments },
|
|
1592
|
+
messageId: replyMessage.id,
|
|
1593
|
+
timestamp: replyMessage.timestamp,
|
|
1594
|
+
});
|
|
1595
|
+
return {
|
|
1596
|
+
content: [{ type: "text", text: `**Reply from ${to}:**\n${replyText}${replyAttachments}` }],
|
|
1597
|
+
details: {},
|
|
1598
|
+
};
|
|
1599
|
+
}
|
|
1600
|
+
catch (error) {
|
|
1601
|
+
rejectReplyWaiter(toError(error));
|
|
1551
1602
|
if (replyPromise) {
|
|
1552
1603
|
try {
|
|
1553
1604
|
await replyPromise;
|
|
1554
1605
|
}
|
|
1555
1606
|
catch {
|
|
1556
|
-
// The waiter
|
|
1607
|
+
// The waiter is cleanup-only on this path. The real failure is the one from the outer catch.
|
|
1557
1608
|
}
|
|
1558
1609
|
}
|
|
1559
1610
|
return {
|
|
1560
|
-
content: [{ type: "text", text: `
|
|
1611
|
+
content: [{ type: "text", text: `Failed: ${getErrorMessage(error)}` }],
|
|
1561
1612
|
details: { error: true },
|
|
1562
1613
|
};
|
|
1563
1614
|
}
|
|
1564
|
-
pi.appendEntry("intercom_sent", {
|
|
1565
|
-
to,
|
|
1566
|
-
message: { text: message, attachments, replyTo },
|
|
1567
|
-
messageId: sendResult.id,
|
|
1568
|
-
timestamp: Date.now(),
|
|
1569
|
-
});
|
|
1570
|
-
const replyMessage = await replyPromise;
|
|
1571
|
-
const replyText = replyMessage.content.text;
|
|
1572
|
-
const replyAttachments = replyMessage.content.attachments?.length
|
|
1573
|
-
? formatAttachments(replyMessage.content.attachments)
|
|
1574
|
-
: "";
|
|
1575
|
-
pi.appendEntry("intercom_received", {
|
|
1576
|
-
from: to,
|
|
1577
|
-
message: { text: replyText, attachments: replyMessage.content.attachments },
|
|
1578
|
-
messageId: replyMessage.id,
|
|
1579
|
-
timestamp: replyMessage.timestamp,
|
|
1580
|
-
});
|
|
1581
|
-
return {
|
|
1582
|
-
content: [{ type: "text", text: `**Reply from ${to}:**\n${replyText}${replyAttachments}` }],
|
|
1583
|
-
details: {},
|
|
1584
|
-
};
|
|
1585
1615
|
}
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1616
|
+
case "reply": {
|
|
1617
|
+
if (!message) {
|
|
1618
|
+
return {
|
|
1619
|
+
content: [{ type: "text", text: "Missing 'message' parameter" }],
|
|
1620
|
+
details: { error: true },
|
|
1621
|
+
};
|
|
1622
|
+
}
|
|
1623
|
+
try {
|
|
1624
|
+
const target = replyTracker.resolveReplyTarget({ to, replyTo });
|
|
1625
|
+
if (target.from.id === connectedClient.sessionId) {
|
|
1626
|
+
return {
|
|
1627
|
+
content: [{ type: "text", text: "Cannot message the current session" }],
|
|
1628
|
+
details: { error: true },
|
|
1629
|
+
};
|
|
1591
1630
|
}
|
|
1592
|
-
|
|
1593
|
-
|
|
1631
|
+
const result = await connectedClient.send(target.from.id, {
|
|
1632
|
+
text: message,
|
|
1633
|
+
replyTo: target.message.id,
|
|
1634
|
+
});
|
|
1635
|
+
if (!result.delivered) {
|
|
1636
|
+
const errorText = result.reason ?? "Session may not exist or has disconnected.";
|
|
1637
|
+
if (result.reason === "Session not found") {
|
|
1638
|
+
replyTracker.dismissPendingAsk(target.message.id);
|
|
1639
|
+
}
|
|
1640
|
+
return {
|
|
1641
|
+
content: [{ type: "text", text: `Reply to "${target.from.name || target.from.id}" was not delivered: ${errorText}` }],
|
|
1642
|
+
details: { messageId: result.id, delivered: false, reason: result.reason },
|
|
1643
|
+
};
|
|
1594
1644
|
}
|
|
1645
|
+
replyTracker.markReplied(target.message.id);
|
|
1646
|
+
pi.appendEntry("intercom_sent", {
|
|
1647
|
+
to: target.from.name || target.from.id,
|
|
1648
|
+
message: { text: message, replyTo: target.message.id },
|
|
1649
|
+
messageId: result.id,
|
|
1650
|
+
timestamp: Date.now(),
|
|
1651
|
+
});
|
|
1652
|
+
return {
|
|
1653
|
+
content: [{ type: "text", text: `Reply sent to ${target.from.name || target.from.id}` }],
|
|
1654
|
+
details: { messageId: result.id, delivered: true, replyTo: target.message.id },
|
|
1655
|
+
};
|
|
1595
1656
|
}
|
|
1596
|
-
|
|
1597
|
-
content: [{ type: "text", text: `Failed: ${getErrorMessage(error)}` }],
|
|
1598
|
-
details: { error: true },
|
|
1599
|
-
};
|
|
1600
|
-
}
|
|
1601
|
-
}
|
|
1602
|
-
case "reply": {
|
|
1603
|
-
if (!message) {
|
|
1604
|
-
return {
|
|
1605
|
-
content: [{ type: "text", text: "Missing 'message' parameter" }],
|
|
1606
|
-
details: { error: true },
|
|
1607
|
-
};
|
|
1608
|
-
}
|
|
1609
|
-
try {
|
|
1610
|
-
const target = replyTracker.resolveReplyTarget({ to, replyTo });
|
|
1611
|
-
if (target.from.id === connectedClient.sessionId) {
|
|
1657
|
+
catch (error) {
|
|
1612
1658
|
return {
|
|
1613
|
-
content: [{ type: "text", text:
|
|
1659
|
+
content: [{ type: "text", text: `Failed to reply: ${getErrorMessage(error)}` }],
|
|
1614
1660
|
details: { error: true },
|
|
1615
1661
|
};
|
|
1616
1662
|
}
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
if (!result.delivered) {
|
|
1622
|
-
const errorText = result.reason ?? "Session may not exist or has disconnected.";
|
|
1623
|
-
if (result.reason === "Session not found") {
|
|
1624
|
-
replyTracker.dismissPendingAsk(target.message.id);
|
|
1625
|
-
}
|
|
1663
|
+
}
|
|
1664
|
+
case "pending": {
|
|
1665
|
+
const pendingAsks = replyTracker.listPending();
|
|
1666
|
+
if (pendingAsks.length === 0) {
|
|
1626
1667
|
return {
|
|
1627
|
-
content: [{ type: "text", text:
|
|
1628
|
-
details: {
|
|
1668
|
+
content: [{ type: "text", text: "No unresolved inbound asks." }],
|
|
1669
|
+
details: {},
|
|
1629
1670
|
};
|
|
1630
1671
|
}
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
timestamp: Date.now(),
|
|
1672
|
+
const now = Date.now();
|
|
1673
|
+
const lines = pendingAsks.map(({ from, message, receivedAt }) => {
|
|
1674
|
+
const preview = message.content.text.replace(/\s+/g, " ").slice(0, 80);
|
|
1675
|
+
const elapsedSeconds = Math.max(0, Math.floor((now - receivedAt) / 1000));
|
|
1676
|
+
return `- ${from.name || from.id} · ${message.id} · ${elapsedSeconds}s ago · ${preview}`;
|
|
1637
1677
|
});
|
|
1638
1678
|
return {
|
|
1639
|
-
content: [{ type: "text", text:
|
|
1640
|
-
details: { messageId: result.id, delivered: true, replyTo: target.message.id },
|
|
1641
|
-
};
|
|
1642
|
-
}
|
|
1643
|
-
catch (error) {
|
|
1644
|
-
return {
|
|
1645
|
-
content: [{ type: "text", text: `Failed to reply: ${getErrorMessage(error)}` }],
|
|
1646
|
-
details: { error: true },
|
|
1647
|
-
};
|
|
1648
|
-
}
|
|
1649
|
-
}
|
|
1650
|
-
case "pending": {
|
|
1651
|
-
const pendingAsks = replyTracker.listPending();
|
|
1652
|
-
if (pendingAsks.length === 0) {
|
|
1653
|
-
return {
|
|
1654
|
-
content: [{ type: "text", text: "No unresolved inbound asks." }],
|
|
1679
|
+
content: [{ type: "text", text: `**Pending asks:**\n${lines.join("\n")}` }],
|
|
1655
1680
|
details: {},
|
|
1656
1681
|
};
|
|
1657
1682
|
}
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
text: `**Intercom Status:**\nConnected: Yes\nSession ID: ${mySessionId}\nActive sessions: ${sessions.length}`,
|
|
1677
|
-
}],
|
|
1678
|
-
details: {},
|
|
1679
|
-
};
|
|
1683
|
+
case "status": {
|
|
1684
|
+
try {
|
|
1685
|
+
const mySessionId = connectedClient.sessionId;
|
|
1686
|
+
const sessions = await connectedClient.listSessions();
|
|
1687
|
+
return {
|
|
1688
|
+
content: [{
|
|
1689
|
+
type: "text",
|
|
1690
|
+
text: `**Intercom Status:**\nConnected: Yes\nSession ID: ${mySessionId}\nActive sessions: ${sessions.length}`,
|
|
1691
|
+
}],
|
|
1692
|
+
details: {},
|
|
1693
|
+
};
|
|
1694
|
+
}
|
|
1695
|
+
catch (error) {
|
|
1696
|
+
return {
|
|
1697
|
+
content: [{ type: "text", text: `Failed to get status: ${getErrorMessage(error)}` }],
|
|
1698
|
+
details: { error: true },
|
|
1699
|
+
};
|
|
1700
|
+
}
|
|
1680
1701
|
}
|
|
1681
|
-
|
|
1702
|
+
default:
|
|
1682
1703
|
return {
|
|
1683
|
-
content: [{ type: "text", text: `
|
|
1704
|
+
content: [{ type: "text", text: `Unknown action: ${action}` }],
|
|
1684
1705
|
details: { error: true },
|
|
1685
1706
|
};
|
|
1686
|
-
}
|
|
1687
1707
|
}
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
}
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
if (details?.reason && context.expanded) {
|
|
1725
|
-
text += "\n" + theme.fg("dim", `Reason: ${details.reason}`);
|
|
1726
|
-
}
|
|
1727
|
-
return new Text(text, 0, 0);
|
|
1728
|
-
},
|
|
1729
|
-
});
|
|
1708
|
+
},
|
|
1709
|
+
renderCall(args, theme) {
|
|
1710
|
+
const action = typeof args.action === "string" ? args.action : "intercom";
|
|
1711
|
+
const target = typeof args.to === "string" && args.to.trim() ? args.to.trim() : undefined;
|
|
1712
|
+
const messagePreview = previewText(args.message, 96);
|
|
1713
|
+
const attachmentCount = Array.isArray(args.attachments) ? args.attachments.length : 0;
|
|
1714
|
+
let text = theme.fg("toolTitle", theme.bold("intercom "));
|
|
1715
|
+
text += theme.fg(action === "ask" ? "warning" : action === "reply" ? "success" : "accent", action);
|
|
1716
|
+
if (target) {
|
|
1717
|
+
text += " " + theme.fg("muted", "→") + " " + theme.fg("accent", target);
|
|
1718
|
+
}
|
|
1719
|
+
if (attachmentCount > 0) {
|
|
1720
|
+
text += " " + theme.fg("dim", `(${attachmentCount} attachment${attachmentCount === 1 ? "" : "s"})`);
|
|
1721
|
+
}
|
|
1722
|
+
if (messagePreview) {
|
|
1723
|
+
text += "\n " + theme.fg("dim", messagePreview);
|
|
1724
|
+
}
|
|
1725
|
+
return new Text(text, 0, 0);
|
|
1726
|
+
},
|
|
1727
|
+
renderResult(result, { isPartial }, theme, context) {
|
|
1728
|
+
if (isPartial) {
|
|
1729
|
+
return new Text(theme.fg("warning", "Intercom working..."), 0, 0);
|
|
1730
|
+
}
|
|
1731
|
+
const details = result.details;
|
|
1732
|
+
const failed = Boolean(context.isError || details?.error === true || details?.delivered === false);
|
|
1733
|
+
let text = failed ? theme.fg("error", "✗ ") : theme.fg("success", "✓ ");
|
|
1734
|
+
text += theme.fg(failed ? "error" : "text", firstTextContent(result));
|
|
1735
|
+
if (details?.messageId && !context.expanded) {
|
|
1736
|
+
text += theme.fg("dim", ` (${details.messageId.slice(0, 8)})`);
|
|
1737
|
+
}
|
|
1738
|
+
if (details?.reason && context.expanded) {
|
|
1739
|
+
text += "\n" + theme.fg("dim", `Reason: ${details.reason}`);
|
|
1740
|
+
}
|
|
1741
|
+
return new Text(text, 0, 0);
|
|
1742
|
+
},
|
|
1743
|
+
});
|
|
1730
1744
|
async function openIntercomOverlay(ctx) {
|
|
1731
1745
|
const overlayGeneration = runtimeGeneration;
|
|
1732
1746
|
const liveContext = getLiveContext(ctx, overlayGeneration);
|