@ashx-j/lunr 0.2.21 → 0.2.22
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 +1 -1
- package/README.md +20 -4
- package/dist/builtin-extensions/index.d.ts.map +1 -1
- package/dist/builtin-extensions/index.js +1 -0
- package/dist/builtin-extensions/index.js.map +1 -1
- package/dist/builtin-extensions/lunr-browser.d.ts +3 -0
- package/dist/builtin-extensions/lunr-browser.d.ts.map +1 -0
- package/dist/builtin-extensions/lunr-browser.js +56 -0
- package/dist/builtin-extensions/lunr-browser.js.map +1 -0
- package/dist/builtin-extensions/lunr-todos.d.ts.map +1 -1
- package/dist/builtin-extensions/lunr-todos.js +15 -0
- package/dist/builtin-extensions/lunr-todos.js.map +1 -1
- package/dist/builtin-extensions/pi-intercom/index.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-intercom/index.js +3 -0
- package/dist/builtin-extensions/pi-intercom/index.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/control-notices.d.ts +1 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/control-notices.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/control-notices.js +5 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/control-notices.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/index.d.ts +2 -2
- package/dist/builtin-extensions/pi-subagents/src/extension/index.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/index.js +18 -5
- package/dist/builtin-extensions/pi-subagents/src/extension/index.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/tool-description.d.ts +4 -3
- package/dist/builtin-extensions/pi-subagents/src/extension/tool-description.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/tool-description.js +3 -0
- 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.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/intercom/intercom-bridge.js +4 -11
- package/dist/builtin-extensions/pi-subagents/src/intercom/intercom-bridge.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/intercom/native-supervisor-channel.d.ts +4 -1
- package/dist/builtin-extensions/pi-subagents/src/intercom/native-supervisor-channel.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/intercom/native-supervisor-channel.js +160 -51
- package/dist/builtin-extensions/pi-subagents/src/intercom/native-supervisor-channel.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/intercom/supervisor-ask.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/intercom/supervisor-ask.js +5 -0
- package/dist/builtin-extensions/pi-subagents/src/intercom/supervisor-ask.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/intercom/supervisor-questions.d.ts +2 -0
- package/dist/builtin-extensions/pi-subagents/src/intercom/supervisor-questions.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/intercom/supervisor-questions.js +3 -2
- package/dist/builtin-extensions/pi-subagents/src/intercom/supervisor-questions.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/auto-drain.d.ts +1 -0
- package/dist/builtin-extensions/pi-subagents/src/runs/background/auto-drain.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/auto-drain.js +2 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/auto-drain.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/subagent-wait.d.ts +1 -0
- package/dist/builtin-extensions/pi-subagents/src/runs/background/subagent-wait.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/subagent-wait.js +2 -0
- package/dist/builtin-extensions/pi-subagents/src/runs/background/subagent-wait.js.map +1 -1
- 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 +3 -0
- 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 +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/subagent-prompt-runtime.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/shared/types.d.ts +1 -0
- package/dist/builtin-extensions/pi-subagents/src/shared/types.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/shared/types.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/tui/communication.d.ts +18 -0
- package/dist/builtin-extensions/pi-subagents/src/tui/communication.d.ts.map +1 -0
- package/dist/builtin-extensions/pi-subagents/src/tui/communication.js +47 -0
- package/dist/builtin-extensions/pi-subagents/src/tui/communication.js.map +1 -0
- package/dist/builtin-extensions/pi-web-access/index.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-web-access/index.js +11 -7
- package/dist/builtin-extensions/pi-web-access/index.js.map +1 -1
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +2 -1
- package/dist/cli/args.js.map +1 -1
- package/dist/cli/install-cli.d.ts.map +1 -1
- package/dist/cli/install-cli.js +15 -45
- package/dist/cli/install-cli.js.map +1 -1
- package/dist/core/agent-session-runtime.d.ts +9 -0
- package/dist/core/agent-session-runtime.d.ts.map +1 -1
- package/dist/core/agent-session-runtime.js +126 -29
- package/dist/core/agent-session-runtime.js.map +1 -1
- package/dist/core/agent-session.d.ts +3 -0
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +20 -2
- 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/customize.d.ts.map +1 -1
- package/dist/core/customize.js +15 -14
- package/dist/core/customize.js.map +1 -1
- package/dist/core/export-html/index.d.ts.map +1 -1
- package/dist/core/export-html/index.js +1 -1
- package/dist/core/export-html/index.js.map +1 -1
- package/dist/core/extensions/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-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.map +1 -1
- package/dist/core/permissions.js +9 -0
- package/dist/core/permissions.js.map +1 -1
- package/dist/core/plan-mode.d.ts.map +1 -1
- package/dist/core/plan-mode.js +3 -0
- 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-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 +13 -0
- 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 +184 -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 +7 -0
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +18 -0
- 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 +2 -0
- package/dist/core/slash-commands.js.map +1 -1
- package/dist/core/system-prompt.d.ts.map +1 -1
- package/dist/core/system-prompt.js +5 -2
- 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 +11 -2
- package/dist/core/tools/render-utils.d.ts.map +1 -1
- package/dist/core/tools/render-utils.js +31 -4
- 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 +112 -17
- 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 +34 -11
- package/dist/gateway/adapters/telegram.js.map +1 -1
- package/dist/gateway/agent-bridge.d.ts +14 -3
- package/dist/gateway/agent-bridge.d.ts.map +1 -1
- package/dist/gateway/agent-bridge.js +252 -60
- package/dist/gateway/agent-bridge.js.map +1 -1
- package/dist/gateway/approval.d.ts +1 -0
- package/dist/gateway/approval.d.ts.map +1 -1
- package/dist/gateway/approval.js +60 -18
- 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 +18 -3
- 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.map +1 -1
- package/dist/gateway/commands.js +18 -3
- package/dist/gateway/commands.js.map +1 -1
- package/dist/gateway/config.d.ts +5 -0
- package/dist/gateway/config.d.ts.map +1 -1
- package/dist/gateway/config.js +5 -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/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 +85 -26
- 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 +422 -0
- package/dist/gateway/mobile-commands.js.map +1 -0
- package/dist/gateway/presenter.d.ts +16 -0
- package/dist/gateway/presenter.d.ts.map +1 -0
- package/dist/gateway/presenter.js +210 -0
- package/dist/gateway/presenter.js.map +1 -0
- package/dist/gateway/router.d.ts +1 -0
- package/dist/gateway/router.d.ts.map +1 -1
- package/dist/gateway/router.js +32 -3
- 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 +395 -0
- package/dist/gateway/service.js.map +1 -0
- package/dist/gateway/setup.d.ts +4 -0
- package/dist/gateway/setup.d.ts.map +1 -0
- package/dist/gateway/setup.js +146 -0
- package/dist/gateway/setup.js.map +1 -0
- 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 +2 -1
- package/dist/main.js.map +1 -1
- package/dist/modes/interactive/components/assistant-message.d.ts +11 -2
- package/dist/modes/interactive/components/assistant-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/assistant-message.js +53 -16
- package/dist/modes/interactive/components/assistant-message.js.map +1 -1
- package/dist/modes/interactive/components/copyable-text.d.ts +31 -0
- package/dist/modes/interactive/components/copyable-text.d.ts.map +1 -0
- package/dist/modes/interactive/components/copyable-text.js +165 -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 +5 -0
- package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector.js +38 -0
- package/dist/modes/interactive/components/settings-selector.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +3 -0
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +151 -7
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/node-runtime/agent-session-services-NQ6GKOIK.js +49 -0
- package/dist/node-runtime/{builtin-extensions-JCOPAAB5.js → builtin-extensions-GVC6IFDU.js} +6 -5
- package/dist/node-runtime/{chunk-LTYWTR3V.js → chunk-2MI5OPMN.js} +17 -2
- package/dist/node-runtime/{chunk-W3CVH5RX.js → chunk-2TKODGBZ.js} +11 -6
- package/dist/node-runtime/chunk-4EULYYR4.js +62 -0
- package/dist/node-runtime/chunk-5BNJ4JUH.js +672 -0
- package/dist/node-runtime/{chunk-6N22HULO.js → chunk-5D7LC2ZQ.js} +7 -2
- package/dist/node-runtime/{chunk-KBKMCJDU.js → chunk-5ZQXRPMC.js} +19 -4
- package/dist/node-runtime/{chunk-6KDIOJL3.js → chunk-6427XAWG.js} +3 -3
- package/dist/node-runtime/{chunk-BOHIDQT4.js → chunk-6B2POMK7.js} +1 -1
- package/dist/node-runtime/{chunk-RNBHABBA.js → chunk-7QWNYZDI.js} +7 -0
- package/dist/node-runtime/chunk-AZJHNQKQ.js +205 -0
- package/dist/node-runtime/{chunk-A3KMVBZV.js → chunk-BBUVIEZB.js} +1 -10
- package/dist/node-runtime/chunk-BFNXONG3.js +521 -0
- package/dist/node-runtime/{chunk-IRPJXI6U.js → chunk-BX2RB477.js} +1 -1
- package/dist/node-runtime/chunk-CCCN2UCX.js +14 -0
- package/dist/node-runtime/{chunk-25I2BHAA.js → chunk-CSUZVNYE.js} +1 -1
- package/dist/node-runtime/{chunk-QZMODZQ2.js → chunk-E24EO34J.js} +2 -1
- package/dist/node-runtime/{chunk-2BUAYZ7K.js → chunk-EQ63ANHL.js} +422 -123
- package/dist/node-runtime/{chunk-GB2MGFLI.js → chunk-GJSAD4AB.js} +216 -201
- package/dist/node-runtime/{chunk-W3SILANP.js → chunk-GMHJCCEN.js} +8 -8
- package/dist/node-runtime/{chunk-DDWHZ633.js → chunk-GNN7H3B7.js} +1 -1
- package/dist/node-runtime/chunk-GS66LV4M.js +2830 -0
- package/dist/node-runtime/{chunk-6BEIBLQ3.js → chunk-H3XF4UVQ.js} +1 -1
- package/dist/node-runtime/chunk-H4K3JDRB.js +47 -0
- package/dist/node-runtime/{chunk-YMEAYRBE.js → chunk-HTFRRDSF.js} +2 -7
- package/dist/node-runtime/chunk-IMLCWLPI.js +9 -0
- package/dist/node-runtime/{chunk-Y5KOEMBH.js → chunk-IQIEU7SB.js} +9 -674
- package/dist/node-runtime/{chunk-OPEK5RRY.js → chunk-IVXYUAJE.js} +1 -1
- package/dist/node-runtime/{chunk-PDNXVXMD.js → chunk-IWOWXRWU.js} +58 -48
- package/dist/node-runtime/chunk-KKUTQQV7.js +144 -0
- package/dist/node-runtime/{chunk-AWVD5IEY.js → chunk-LMBNLFXQ.js} +23 -12
- package/dist/node-runtime/{chunk-7NBZ5P7I.js → chunk-NAY6UUQZ.js} +1 -1
- package/dist/node-runtime/chunk-OAR4TYZE.js +146 -0
- package/dist/node-runtime/{chunk-STERBGUB.js → chunk-OFKSVRV7.js} +2 -2
- package/dist/node-runtime/{chunk-JZQ7F36T.js → chunk-ORH324EP.js} +19 -3
- package/dist/node-runtime/{chunk-2SJB2AWP.js → chunk-PC2Z5TKZ.js} +3 -3
- package/dist/node-runtime/{chunk-SY2TFMLO.js → chunk-QDGKKKUM.js} +46 -151
- package/dist/node-runtime/chunk-R3K2F5GI.js +122 -0
- package/dist/node-runtime/chunk-RMQZU2YU.js +117 -0
- package/dist/node-runtime/{chunk-XI77KVKA.js → chunk-TDL7UWJ7.js} +283 -2999
- package/dist/node-runtime/{chunk-G6LRAP36.js → chunk-TQGPP4SC.js} +1 -1
- package/dist/node-runtime/chunk-UAEOTO52.js +119 -0
- package/dist/node-runtime/{chunk-VZR3NCM7.js → chunk-UAFLNHSH.js} +18 -14
- package/dist/node-runtime/{chunk-AY6CAJSL.js → chunk-UJOCPOMX.js} +6 -3
- package/dist/node-runtime/chunk-UP2XBVH5.js +40 -0
- package/dist/node-runtime/{chunk-WJVFOIB5.js → chunk-UQUCFAJ3.js} +1 -1
- package/dist/node-runtime/chunk-URD2SLIT.js +1019 -0
- package/dist/node-runtime/chunk-US544NN6.js +13 -0
- package/dist/node-runtime/chunk-UWPJL22I.js +341 -0
- package/dist/node-runtime/chunk-V2A7CEXK.js +355 -0
- package/dist/node-runtime/chunk-VJPTNWAP.js +708 -0
- package/dist/node-runtime/{chunk-WKDK4C5P.js → chunk-VSSXXL36.js} +38 -164
- package/dist/node-runtime/{chunk-4I23VTC4.js → chunk-VWCE2HSZ.js} +21 -124
- package/dist/node-runtime/{chunk-WLLDXJRT.js → chunk-WADV2VDS.js} +22 -1014
- package/dist/node-runtime/{chunk-GKLEQ3I4.js → chunk-XLTL257W.js} +126 -27
- package/dist/node-runtime/chunk-YPHAIRZT.js +10 -0
- package/dist/node-runtime/cli-runtime.js +2 -2
- package/dist/node-runtime/command-3JHHXOPX.js +45 -0
- package/dist/node-runtime/commands-2JVNFGMQ.js +36 -0
- package/dist/node-runtime/{commands-MV5KOZ64.js → commands-KAMO2T6P.js} +10 -10
- package/dist/node-runtime/config-RORQUQFG.js +20 -0
- package/dist/node-runtime/{customize-LF5VST47.js → customize-VFJV3U6A.js} +2 -1
- package/dist/node-runtime/{direct-tool-executor-BK7CLEBX.js → direct-tool-executor-YAVOLDFY.js} +8 -8
- package/dist/node-runtime/{export-html-TEXVV5RP.js → export-html-KBFVV63J.js} +4 -3
- package/dist/node-runtime/{extension-input-O4HSAEM4.js → extension-input-K24TVKVW.js} +4 -4
- package/dist/node-runtime/{extension-selector-X5FCX43D.js → extension-selector-SPNF7EDR.js} +4 -4
- package/dist/node-runtime/{extract-XLQSJN4V.js → extract-EQJE7FZZ.js} +2 -2
- package/dist/node-runtime/{gateway-BM6NLOH4.js → gateway-VFO6SFKK.js} +275 -994
- package/dist/node-runtime/{gemini-search-U7SUMPQA.js → gemini-search-35OCRFLN.js} +1 -1
- package/dist/node-runtime/{gemini-url-context-PXWCBQHK.js → gemini-url-context-UQY3PHHW.js} +2 -2
- package/dist/node-runtime/index.js +104 -65
- package/dist/node-runtime/{init-3C7Z24OI.js → init-X2LIUB2H.js} +3 -3
- package/dist/node-runtime/{install-cli-EXMJQESX.js → install-cli-C3CF7O7N.js} +21 -82
- package/dist/node-runtime/interactive-mode-LOM6AIF6.js +72 -0
- package/dist/node-runtime/{interactive-view-ILS6TAN5.js → interactive-view-IDSCPPK7.js} +8 -8
- package/dist/node-runtime/lunr-browser-YNW7FTYX.js +87 -0
- package/dist/node-runtime/{lunr-cron-4VHP4E4B.js → lunr-cron-BKHGNBKT.js} +19 -5
- package/dist/node-runtime/main.js +44 -31
- package/dist/node-runtime/{memory-cap-3S4XRLNP.js → memory-cap-EL3KL4JJ.js} +2 -1
- package/dist/node-runtime/mobile-commands-HMP25WBC.js +32 -0
- package/dist/node-runtime/model-runtime-PLQKAG4B.js +16 -0
- package/dist/node-runtime/{model-tiers-NJLHUEGK.js → model-tiers-OU3U5CZG.js} +2 -1
- package/dist/node-runtime/{package-manager-cli-N37546V5.js → package-manager-cli-VCK4E2RC.js} +22 -15
- package/dist/node-runtime/{pi-intercom-NV2LW6X7.js → pi-intercom-HBPK5HSJ.js} +4 -1
- package/dist/node-runtime/{pi-mcp-adapter-GUFZWW54.js → pi-mcp-adapter-E6WULBKF.js} +4 -4
- package/dist/node-runtime/{pi-subagents-6MUIFNDM.js → pi-subagents-FEUDLJOE.js} +201 -78
- package/dist/node-runtime/{pi-web-access-2CQGFLT2.js → pi-web-access-WTGMNZ32.js} +15 -15
- package/dist/node-runtime/process-registry-4FAKZQOL.js +31 -0
- package/dist/node-runtime/{proxy-modes-V6YVFH3C.js → proxy-modes-OSQCWRBI.js} +9 -9
- package/dist/node-runtime/rpc-entry.js +44 -31
- package/dist/node-runtime/{rpc-mode-W5ZTLTMZ.js → rpc-mode-P5ODXPEG.js} +2 -2
- package/dist/node-runtime/runtime-4VA6JKNF.js +373 -0
- package/dist/node-runtime/{runtime-bridges-2VQTLPOZ.js → runtime-bridges-3XUQ46XW.js} +6 -5
- package/dist/node-runtime/service-ISSP6VHE.js +36 -0
- package/dist/node-runtime/session-handoff-HC7R5E24.js +33 -0
- package/dist/node-runtime/{session-manager-E7AREDTV.js → session-manager-CFN4UFM2.js} +2 -1
- package/dist/node-runtime/{session-selector-FJ7M2AIX.js → session-selector-LHRMJOKT.js} +5 -4
- package/dist/node-runtime/{settings-manager-CUGAZWAB.js → settings-manager-UUZ6NUXI.js} +7 -2
- package/dist/node-runtime/setup-JBKOLJ6F.js +18 -0
- package/dist/node-runtime/setup-NRXVZBLJ.js +155 -0
- package/dist/node-runtime/{subagent-executor-MH4A7CCF.js → subagent-executor-MLUMBWCP.js} +22 -18
- package/dist/node-runtime/theme-U7IGOA7O.js +68 -0
- package/dist/node-runtime/trust-manager-MMISNCYO.js +17 -0
- package/dist/node-runtime/{update-cli-XTZMZGOL.js → update-cli-4TP25CNW.js} +7 -2
- package/dist/node-runtime/usage-service-LFB2SWYV.js +37 -0
- package/dist/node-runtime/{video-extract-OYT5WKS5.js → video-extract-OOZHR7SU.js} +2 -2
- package/dist/node-runtime/{youtube-extract-TQYKGFGS.js → youtube-extract-FNPAUNHU.js} +6 -6
- package/docs/browser.md +86 -0
- package/docs/extensions.md +2 -0
- package/docs/features.md +94 -16
- package/docs/interactive-startup.md +2 -1
- package/docs/sessions.md +10 -0
- package/docs/settings.md +1 -0
- package/docs/tui.md +2 -0
- package/docs/usage.md +16 -0
- 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/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/package.json +7 -4
- package/scripts/install-browser.mjs +20 -0
- package/dist/node-runtime/agent-session-services-C743TYQE.js +0 -37
- package/dist/node-runtime/chunk-VGYZ3APQ.js +0 -59
- package/dist/node-runtime/command-P4NYCJ2M.js +0 -13
- package/dist/node-runtime/interactive-mode-EVVBA64D.js +0 -59
- package/dist/node-runtime/{chunk-UWQYRSYQ.js → chunk-YJMMG7C6.js} +25 -25
- package/dist/node-runtime/{mcp-panel-IIGMXQGP.js → mcp-panel-KTTFXJZ4.js} +3 -3
- package/dist/node-runtime/{src-BPQFJR76.js → src-IVPNZ2BX.js} +9 -9
|
@@ -2,7 +2,7 @@ import { createRequire as __lunrRequire } from "node:module"; const require = __
|
|
|
2
2
|
import {
|
|
3
3
|
lightBuiltinExtensions,
|
|
4
4
|
loadAllBuiltinExtensions
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-LMBNLFXQ.js";
|
|
6
6
|
import {
|
|
7
7
|
createProjectTrustContext,
|
|
8
8
|
createStartupTui,
|
|
@@ -11,14 +11,10 @@ import {
|
|
|
11
11
|
showFirstTimeSetup,
|
|
12
12
|
showStartupSelector,
|
|
13
13
|
startStartupTui
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import {
|
|
16
|
-
ProjectTrustStore,
|
|
17
|
-
hasTrustRequiringProjectResources
|
|
18
|
-
} from "./chunk-YMEAYRBE.js";
|
|
14
|
+
} from "./chunk-UAFLNHSH.js";
|
|
19
15
|
import {
|
|
20
16
|
applyInheritedSubagentPermissions
|
|
21
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-CSUZVNYE.js";
|
|
22
18
|
import {
|
|
23
19
|
MissingSessionCwdError,
|
|
24
20
|
createAgentSessionFromServices,
|
|
@@ -27,11 +23,7 @@ import {
|
|
|
27
23
|
formatMissingSessionCwdPrompt,
|
|
28
24
|
formatNoModelsAvailableMessage,
|
|
29
25
|
getMissingSessionCwdIssue
|
|
30
|
-
} from "./chunk-
|
|
31
|
-
import {
|
|
32
|
-
resolveCliModel,
|
|
33
|
-
resolveModelScope
|
|
34
|
-
} from "./chunk-STERBGUB.js";
|
|
26
|
+
} from "./chunk-TDL7UWJ7.js";
|
|
35
27
|
import {
|
|
36
28
|
restoreStdout,
|
|
37
29
|
takeOverStdout
|
|
@@ -39,57 +31,68 @@ import {
|
|
|
39
31
|
import {
|
|
40
32
|
detectSupportedImageMimeTypeFromFile,
|
|
41
33
|
resolveReadPath
|
|
42
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-VSSXXL36.js";
|
|
35
|
+
import {
|
|
36
|
+
processImage
|
|
37
|
+
} from "./chunk-AD6VXAO7.js";
|
|
43
38
|
import {
|
|
44
39
|
SettingsManager,
|
|
45
40
|
applyHttpProxySettings,
|
|
46
41
|
configureHttpDispatcher
|
|
47
|
-
} from "./chunk-
|
|
48
|
-
import {
|
|
49
|
-
SessionManager,
|
|
50
|
-
assertValidSessionId
|
|
51
|
-
} from "./chunk-GKLEQ3I4.js";
|
|
42
|
+
} from "./chunk-WADV2VDS.js";
|
|
52
43
|
import {
|
|
53
44
|
bindRuntimeBridges
|
|
54
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-GMHJCCEN.js";
|
|
55
46
|
import {
|
|
56
|
-
|
|
57
|
-
|
|
47
|
+
ProjectTrustStore,
|
|
48
|
+
hasTrustRequiringProjectResources
|
|
49
|
+
} from "./chunk-HTFRRDSF.js";
|
|
58
50
|
import {
|
|
59
|
-
|
|
60
|
-
|
|
51
|
+
resolveCliModel,
|
|
52
|
+
resolveModelScope
|
|
53
|
+
} from "./chunk-OFKSVRV7.js";
|
|
61
54
|
import {
|
|
62
55
|
migrateLegacyGlobalInstructions
|
|
63
56
|
} from "./chunk-M3LZLQW2.js";
|
|
64
57
|
import {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
} from "./chunk-PVCDKGR6.js";
|
|
58
|
+
SessionManager,
|
|
59
|
+
assertValidSessionId
|
|
60
|
+
} from "./chunk-XLTL257W.js";
|
|
69
61
|
import {
|
|
70
62
|
registerCustomizeBridge
|
|
71
|
-
} from "./chunk-
|
|
63
|
+
} from "./chunk-4EULYYR4.js";
|
|
72
64
|
import {
|
|
73
65
|
registerMemoryCapBridge
|
|
74
|
-
} from "./chunk-
|
|
75
|
-
import {
|
|
76
|
-
parseArgs,
|
|
77
|
-
printHelp
|
|
78
|
-
} from "./chunk-QZMODZQ2.js";
|
|
66
|
+
} from "./chunk-UJOCPOMX.js";
|
|
79
67
|
import {
|
|
80
|
-
|
|
81
|
-
} from "./chunk-
|
|
68
|
+
registerModelTierBridge
|
|
69
|
+
} from "./chunk-2TKODGBZ.js";
|
|
82
70
|
import {
|
|
83
71
|
SessionSelectorComponent
|
|
84
|
-
} from "./chunk-
|
|
72
|
+
} from "./chunk-ORH324EP.js";
|
|
73
|
+
import {
|
|
74
|
+
SessionOwnership
|
|
75
|
+
} from "./chunk-UAEOTO52.js";
|
|
85
76
|
import {
|
|
86
77
|
KeybindingsManager,
|
|
87
78
|
migrateKeybindingsConfig
|
|
88
79
|
} from "./chunk-5EFIU3OM.js";
|
|
80
|
+
import {
|
|
81
|
+
printTimings,
|
|
82
|
+
resetTimings,
|
|
83
|
+
time
|
|
84
|
+
} from "./chunk-PVCDKGR6.js";
|
|
85
|
+
import {
|
|
86
|
+
parseArgs,
|
|
87
|
+
printHelp
|
|
88
|
+
} from "./chunk-E24EO34J.js";
|
|
89
|
+
import {
|
|
90
|
+
markStartupMilestone
|
|
91
|
+
} from "./chunk-CCZJ3PYY.js";
|
|
89
92
|
import {
|
|
90
93
|
initTheme,
|
|
91
94
|
stopThemeWatcher
|
|
92
|
-
} from "./chunk-
|
|
95
|
+
} from "./chunk-7QWNYZDI.js";
|
|
93
96
|
import {
|
|
94
97
|
APP_NAME,
|
|
95
98
|
CONFIG_DIR_NAME,
|
|
@@ -281,7 +284,14 @@ async function pruneDir(dir, cutoffMs, excludeFile, deleted) {
|
|
|
281
284
|
let filePath = join(dir, entry.name);
|
|
282
285
|
if (!(excludeFile && sameFile(filePath, excludeFile)))
|
|
283
286
|
try {
|
|
284
|
-
(await stat2(filePath)).mtimeMs < cutoffMs
|
|
287
|
+
if ((await stat2(filePath)).mtimeMs < cutoffMs) {
|
|
288
|
+
let ownership = new SessionOwnership(filePath);
|
|
289
|
+
try {
|
|
290
|
+
(await stat2(filePath)).mtimeMs < cutoffMs && (await unlink(filePath), deleted.push(filePath));
|
|
291
|
+
} finally {
|
|
292
|
+
ownership.release();
|
|
293
|
+
}
|
|
294
|
+
}
|
|
285
295
|
} catch {
|
|
286
296
|
}
|
|
287
297
|
}
|
|
@@ -719,18 +729,18 @@ async function promptForMissingSessionCwd(issue, settingsManager, startupView) {
|
|
|
719
729
|
async function main(args, options) {
|
|
720
730
|
resetTimings(), (args.includes("--offline") || isTruthyEnvFlag(process.env.PI_OFFLINE)) && (process.env.PI_OFFLINE = "1");
|
|
721
731
|
let cwd = process.cwd(), agentDir = getAgentDir(), bootstrapSettingsManager = SettingsManager.create(cwd, agentDir, { projectTrusted: !1 });
|
|
722
|
-
if (applyHttpProxySettings(bootstrapSettingsManager.getGlobalSettings().httpProxy), configureHttpDispatcher(), ["setup", "features", "uninstall"].includes(args[0])) {
|
|
723
|
-
let { handleInstallCli } = await import("./install-cli-
|
|
732
|
+
if (applyHttpProxySettings(bootstrapSettingsManager.getGlobalSettings().httpProxy), configureHttpDispatcher(), ["setup", "features", "uninstall", "browser"].includes(args[0])) {
|
|
733
|
+
let { handleInstallCli } = await import("./install-cli-C3CF7O7N.js");
|
|
724
734
|
if (await handleInstallCli(args))
|
|
725
735
|
return;
|
|
726
736
|
}
|
|
727
737
|
if (args[0] === "update") {
|
|
728
|
-
let { handleUpdateCli } = await import("./update-cli-
|
|
738
|
+
let { handleUpdateCli } = await import("./update-cli-4TP25CNW.js");
|
|
729
739
|
if (await handleUpdateCli(args))
|
|
730
740
|
return;
|
|
731
741
|
}
|
|
732
742
|
if (["install", "remove", "uninstall", "list", "config"].includes(args[0])) {
|
|
733
|
-
let { handleConfigCommand, handlePackageCommand } = await import("./package-manager-cli-
|
|
743
|
+
let { handleConfigCommand, handlePackageCommand } = await import("./package-manager-cli-VCK4E2RC.js");
|
|
734
744
|
if (await handlePackageCommand(args, { extensionFactories: options?.extensionFactories })) {
|
|
735
745
|
process.exit(process.exitCode ?? 0);
|
|
736
746
|
return;
|
|
@@ -739,7 +749,7 @@ async function main(args, options) {
|
|
|
739
749
|
return;
|
|
740
750
|
}
|
|
741
751
|
if (args[0] === "gateway") {
|
|
742
|
-
let { handleGatewayCommand } = await import("./command-
|
|
752
|
+
let { handleGatewayCommand } = await import("./command-3JHHXOPX.js");
|
|
743
753
|
if (await handleGatewayCommand(args))
|
|
744
754
|
return;
|
|
745
755
|
}
|
|
@@ -754,7 +764,7 @@ async function main(args, options) {
|
|
|
754
764
|
if (time("parseArgs"), parsed.version && (console.log(VERSION), process.exit(0)), parsed.export) {
|
|
755
765
|
let result;
|
|
756
766
|
try {
|
|
757
|
-
let { exportFromFile } = await import("./export-html-
|
|
767
|
+
let { exportFromFile } = await import("./export-html-KBFVV63J.js"), outputPath = parsed.messages.length > 0 ? parsed.messages[0] : void 0;
|
|
758
768
|
result = await exportFromFile(parsed.export, outputPath);
|
|
759
769
|
} catch (error) {
|
|
760
770
|
let message = error instanceof Error ? error.message : "Failed to export session";
|
|
@@ -762,7 +772,7 @@ async function main(args, options) {
|
|
|
762
772
|
}
|
|
763
773
|
console.log(`Exported to: ${result}`), process.exit(0);
|
|
764
774
|
}
|
|
765
|
-
let appMode = resolveAppMode(parsed, process.stdin.isTTY, process.stdout.isTTY), interactiveModeImport = appMode === "interactive" ? import("./interactive-mode-
|
|
775
|
+
let appMode = resolveAppMode(parsed, process.stdin.isTTY, process.stdout.isTTY), interactiveModeImport = appMode === "interactive" ? import("./interactive-mode-LOM6AIF6.js") : void 0, startupView = appMode === "interactive" ? options?.startupView : void 0;
|
|
766
776
|
options?.startupView && !startupView && options.startupView.stop(), applyInheritedSubagentPermissions(), appMode !== "interactive" && !isPlainRuntimeMetadataCommand(parsed) && takeOverStdout(), parsed.mode === "rpc" && parsed.fileArgs.length > 0 && (console.error(chalk4.red("Error: @file arguments are not supported in RPC mode")), process.exit(1)), validateForkFlags(parsed), validateSessionIdFlags(parsed);
|
|
767
777
|
let { migratedAuthProviders: migratedProviders, deprecationWarnings } = runMigrations(cwd);
|
|
768
778
|
time("runMigrations");
|
|
@@ -772,7 +782,7 @@ async function main(args, options) {
|
|
|
772
782
|
if (missingSessionCwdIssue)
|
|
773
783
|
if (appMode === "interactive") {
|
|
774
784
|
let selectedCwd = await promptForMissingSessionCwd(missingSessionCwdIssue, startupSettingsManager, startupView);
|
|
775
|
-
selectedCwd || process.exit(0), sessionManager = SessionManager.open(missingSessionCwdIssue.sessionFile, sessionDir, selectedCwd);
|
|
785
|
+
selectedCwd || process.exit(0), sessionManager.dispose(), sessionManager = SessionManager.open(missingSessionCwdIssue.sessionFile, sessionDir, selectedCwd);
|
|
776
786
|
} else
|
|
777
787
|
console.error(chalk4.red(new MissingSessionCwdError(missingSessionCwdIssue).message)), process.exit(1);
|
|
778
788
|
if (parsed.name !== void 0) {
|
|
@@ -919,12 +929,12 @@ ${EXTENSION_LOAD_FAILURE_HINT}` : "";
|
|
|
919
929
|
extensionHint && console.error(chalk4.yellow(EXTENSION_LOAD_FAILURE_HINT)), process.exit(1);
|
|
920
930
|
}
|
|
921
931
|
if (time("createAgentSession"), appMode !== "interactive" && !session.model && (console.error(chalk4.red(formatNoModelsAvailableMessage())), process.exit(1)), startupBenchmark && appMode !== "interactive" && (console.error(chalk4.red("Error: PI_STARTUP_BENCHMARK only supports interactive mode")), process.exit(1)), appMode === "rpc") {
|
|
922
|
-
let { runRpcMode } = await import("./rpc-mode-
|
|
932
|
+
let { runRpcMode } = await import("./rpc-mode-P5ODXPEG.js");
|
|
923
933
|
printTimings(), await runRpcMode(runtime);
|
|
924
934
|
} else if (appMode === "interactive") {
|
|
925
935
|
let [{ InteractiveMode }, { loadDeferredBuiltinExtensions }] = await Promise.all([
|
|
926
936
|
interactiveModeImport,
|
|
927
|
-
import("./builtin-extensions-
|
|
937
|
+
import("./builtin-extensions-GVC6IFDU.js")
|
|
928
938
|
]), interactiveMode = new InteractiveMode(runtime, {
|
|
929
939
|
migratedProviders,
|
|
930
940
|
modelFallbackMessage,
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import { createRequire as __lunrRequire } from "node:module"; const require = __lunrRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
getShellConfig,
|
|
4
|
+
killProcessTree
|
|
5
|
+
} from "./chunk-CSFI6YXL.js";
|
|
6
|
+
|
|
7
|
+
// packages/coding-agent/dist/core/process-registry.js
|
|
8
|
+
import { spawn } from "node:child_process";
|
|
9
|
+
var isWin32 = process.platform === "win32", EXIT_NOISE_GATE_MS = 3e3, EXIT_TTL_MS = 300 * 1e3, MAX_TRACKED = 100, processes = /* @__PURE__ */ new Map();
|
|
10
|
+
function register(pid, command, cwd, sessionId) {
|
|
11
|
+
if (pid) {
|
|
12
|
+
if (processes.size >= MAX_TRACKED) {
|
|
13
|
+
let oldest;
|
|
14
|
+
for (let [p, entry] of processes) {
|
|
15
|
+
if (entry.status === "exited") {
|
|
16
|
+
oldest = { pid: p, entry };
|
|
17
|
+
break;
|
|
18
|
+
}
|
|
19
|
+
(!oldest || entry.startedAt < oldest.entry.startedAt) && (oldest = { pid: p, entry });
|
|
20
|
+
}
|
|
21
|
+
oldest && processes.delete(oldest.pid);
|
|
22
|
+
}
|
|
23
|
+
processes.set(pid, { pid, command, cwd, startedAt: Date.now(), status: "running", sessionId });
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
function unregister(pid) {
|
|
27
|
+
pid && processes.delete(pid);
|
|
28
|
+
}
|
|
29
|
+
function markExited(pid, exitCode) {
|
|
30
|
+
if (!pid)
|
|
31
|
+
return;
|
|
32
|
+
let entry = processes.get(pid);
|
|
33
|
+
if (!entry)
|
|
34
|
+
return;
|
|
35
|
+
if (Date.now() - entry.startedAt < EXIT_NOISE_GATE_MS) {
|
|
36
|
+
processes.delete(pid);
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
entry.status = "exited", entry.exitCode = exitCode ?? void 0, entry.exitedAt = Date.now();
|
|
40
|
+
}
|
|
41
|
+
function list(sessionId) {
|
|
42
|
+
return prune(), [...processes.values()].filter((p) => sessionId === void 0 || p.sessionId === sessionId);
|
|
43
|
+
}
|
|
44
|
+
function prune() {
|
|
45
|
+
for (let [pid, entry] of processes) {
|
|
46
|
+
if (entry.status === "exited") {
|
|
47
|
+
(!entry.exitedAt || Date.now() - entry.exitedAt > EXIT_TTL_MS) && processes.delete(pid);
|
|
48
|
+
continue;
|
|
49
|
+
}
|
|
50
|
+
isAlive(pid) || markExited(pid, null);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
function isAlive(pid) {
|
|
54
|
+
try {
|
|
55
|
+
return process.kill(pid, 0), !0;
|
|
56
|
+
} catch (error) {
|
|
57
|
+
return error.code !== "ESRCH";
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
function kill(pid) {
|
|
61
|
+
processes.has(pid) && (killProcessTree(pid), isAlive(pid) || markExited(pid, null));
|
|
62
|
+
}
|
|
63
|
+
function killAll(sessionId) {
|
|
64
|
+
for (let [pid, entry] of processes)
|
|
65
|
+
if (!(sessionId !== void 0 && entry.sessionId !== sessionId)) {
|
|
66
|
+
try {
|
|
67
|
+
killProcessTree(pid);
|
|
68
|
+
} catch {
|
|
69
|
+
}
|
|
70
|
+
isAlive(pid) || markExited(pid, null);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
function pause(pid) {
|
|
74
|
+
if (isWin32)
|
|
75
|
+
throw new Error("Pause/resume is unsupported on Windows.");
|
|
76
|
+
if (!processes.has(pid))
|
|
77
|
+
throw new Error(`Process ${pid} is not tracked.`);
|
|
78
|
+
try {
|
|
79
|
+
process.kill(pid, "SIGSTOP");
|
|
80
|
+
let entry = processes.get(pid);
|
|
81
|
+
entry && (entry.status = "paused");
|
|
82
|
+
} catch {
|
|
83
|
+
processes.delete(pid);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
function resume(pid) {
|
|
87
|
+
if (isWin32)
|
|
88
|
+
throw new Error("Pause/resume is unsupported on Windows.");
|
|
89
|
+
if (!processes.has(pid))
|
|
90
|
+
throw new Error(`Process ${pid} is not tracked.`);
|
|
91
|
+
try {
|
|
92
|
+
process.kill(pid, "SIGCONT");
|
|
93
|
+
let entry = processes.get(pid);
|
|
94
|
+
entry && (entry.status = "running");
|
|
95
|
+
} catch {
|
|
96
|
+
processes.delete(pid);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
function restart(pid) {
|
|
100
|
+
let entry = processes.get(pid);
|
|
101
|
+
if (entry) {
|
|
102
|
+
try {
|
|
103
|
+
killProcessTree(pid);
|
|
104
|
+
} catch {
|
|
105
|
+
}
|
|
106
|
+
processes.delete(pid);
|
|
107
|
+
try {
|
|
108
|
+
let shellConfig = getShellConfig(), child = spawn(shellConfig.shell, [...shellConfig.args, entry.command], {
|
|
109
|
+
cwd: entry.cwd,
|
|
110
|
+
detached: !0,
|
|
111
|
+
stdio: "ignore",
|
|
112
|
+
windowsHide: !0
|
|
113
|
+
});
|
|
114
|
+
if (child.pid)
|
|
115
|
+
return register(child.pid, entry.command, entry.cwd, entry.sessionId), child.unref(), child.pid;
|
|
116
|
+
} catch {
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
function isWindows() {
|
|
121
|
+
return isWin32;
|
|
122
|
+
}
|
|
123
|
+
function clearRegistry(sessionId) {
|
|
124
|
+
if (sessionId === void 0) {
|
|
125
|
+
processes.clear();
|
|
126
|
+
return;
|
|
127
|
+
}
|
|
128
|
+
for (let [pid, entry] of processes)
|
|
129
|
+
entry.sessionId === sessionId && processes.delete(pid);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
export {
|
|
133
|
+
register,
|
|
134
|
+
unregister,
|
|
135
|
+
markExited,
|
|
136
|
+
list,
|
|
137
|
+
kill,
|
|
138
|
+
killAll,
|
|
139
|
+
pause,
|
|
140
|
+
resume,
|
|
141
|
+
restart,
|
|
142
|
+
isWindows,
|
|
143
|
+
clearRegistry
|
|
144
|
+
};
|
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
import { createRequire as __lunrRequire } from "node:module"; const require = __lunrRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
typebox_exports
|
|
4
|
+
} from "./chunk-PL6JKXWI.js";
|
|
2
5
|
import {
|
|
3
6
|
spinners
|
|
4
7
|
} from "./chunk-5ZH3ZFIZ.js";
|
|
5
8
|
import {
|
|
6
|
-
|
|
7
|
-
} from "./chunk-
|
|
9
|
+
TODOS_ENABLED_CHANGED_SYMBOL
|
|
10
|
+
} from "./chunk-CCCN2UCX.js";
|
|
8
11
|
import {
|
|
9
12
|
isPlanModeActive,
|
|
10
13
|
requestPlanApproval
|
|
11
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-5D7LC2ZQ.js";
|
|
12
15
|
import {
|
|
13
16
|
ashxj_tui_default
|
|
14
17
|
} from "./chunk-JHYKXIMM.js";
|
|
@@ -17,7 +20,7 @@ import {
|
|
|
17
20
|
} from "./chunk-PVCDKGR6.js";
|
|
18
21
|
import {
|
|
19
22
|
keyText
|
|
20
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-GNN7H3B7.js";
|
|
21
24
|
import {
|
|
22
25
|
getAgentDir
|
|
23
26
|
} from "./chunk-FQMM2EZ2.js";
|
|
@@ -802,17 +805,24 @@ function lunr_todos_default(pi) {
|
|
|
802
805
|
let next = todos.filter((t) => t.status !== "completed");
|
|
803
806
|
next.length !== todos.length && (todos = next, refreshWidget());
|
|
804
807
|
}
|
|
808
|
+
let handleEnabledChanged = (enabled) => {
|
|
809
|
+
enabled || (todos = [], refreshWidget());
|
|
810
|
+
};
|
|
811
|
+
function registerEnabledBridge() {
|
|
812
|
+
globalThis[TODOS_ENABLED_CHANGED_SYMBOL] = handleEnabledChanged;
|
|
813
|
+
}
|
|
814
|
+
registerEnabledBridge();
|
|
805
815
|
function registerExpandedBridge() {
|
|
806
816
|
globalThis[EXPANDED_BRIDGE_SYMBOL] = (value) => {
|
|
807
817
|
expanded = !!value, refreshWidget();
|
|
808
818
|
};
|
|
809
819
|
}
|
|
810
820
|
registerExpandedBridge(), pi.on("session_start", (_event, ctx) => {
|
|
811
|
-
lastCtx = ctx, todos = [], expanded = ctx.hasUI ? ctx.ui.getToolsExpanded?.() ?? !1 : !1, registerExpandedBridge(), ctx.hasUI && ctx.ui.setWidget(WIDGET_KEY, void 0);
|
|
821
|
+
lastCtx = ctx, todos = [], expanded = ctx.hasUI ? ctx.ui.getToolsExpanded?.() ?? !1 : !1, registerExpandedBridge(), registerEnabledBridge(), ctx.hasUI && ctx.ui.setWidget(WIDGET_KEY, void 0);
|
|
812
822
|
}), pi.on("message_start", (event, ctx) => {
|
|
813
823
|
event.message?.role === "user" && (lastCtx = ctx, pruneCompleted());
|
|
814
824
|
}), pi.on("session_shutdown", () => {
|
|
815
|
-
lastCtx?.hasUI && lastCtx.ui.setWidget(WIDGET_KEY, void 0), lastCtx = null, delete globalThis[EXPANDED_BRIDGE_SYMBOL];
|
|
825
|
+
lastCtx?.hasUI && lastCtx.ui.setWidget(WIDGET_KEY, void 0), lastCtx = null, delete globalThis[EXPANDED_BRIDGE_SYMBOL], globalThis[TODOS_ENABLED_CHANGED_SYMBOL] === handleEnabledChanged && delete globalThis[TODOS_ENABLED_CHANGED_SYMBOL];
|
|
816
826
|
}), pi.registerTool({
|
|
817
827
|
name: "todo",
|
|
818
828
|
label: "Todo",
|
|
@@ -915,13 +925,14 @@ var lightBuiltinExtensions = [
|
|
|
915
925
|
], DEFERRED_BUILTIN_LOADERS = [
|
|
916
926
|
{ name: "pi-ollama-cloud", load: () => import("./pi-ollama-cloud-2F3Y2QNM.js") },
|
|
917
927
|
{ name: "narumiruna-pi-goal", load: () => import("./goal-NJEE5CTU.js") },
|
|
918
|
-
{ name: "lunr-cron", load: () => import("./lunr-cron-
|
|
919
|
-
{ name: "pi-intercom", load: () => import("./pi-intercom-
|
|
928
|
+
{ name: "lunr-cron", load: () => import("./lunr-cron-BKHGNBKT.js") },
|
|
929
|
+
{ name: "pi-intercom", load: () => import("./pi-intercom-HBPK5HSJ.js") },
|
|
920
930
|
{ name: "pi-prompt-template-model", load: () => import("./pi-prompt-template-model-QWTCGLJU.js") },
|
|
921
|
-
{ name: "pi-subagents", load: () => import("./pi-subagents-
|
|
922
|
-
{ name: "pi-web-access", load: () => import("./pi-web-access-
|
|
923
|
-
{ name: "
|
|
924
|
-
{ name: "pi-
|
|
931
|
+
{ name: "pi-subagents", load: () => import("./pi-subagents-FEUDLJOE.js") },
|
|
932
|
+
{ name: "pi-web-access", load: () => import("./pi-web-access-WTGMNZ32.js") },
|
|
933
|
+
{ name: "lunr-browser", load: () => import("./lunr-browser-YNW7FTYX.js") },
|
|
934
|
+
{ name: "pi-lsp-extension", load: () => import("./src-IVPNZ2BX.js") },
|
|
935
|
+
{ name: "pi-mcp-adapter", load: () => import("./pi-mcp-adapter-E6WULBKF.js") }
|
|
925
936
|
], DEFERRED_BUILTIN_EXTENSION_NAMES = DEFERRED_BUILTIN_LOADERS.map((entry) => entry.name), DEFERRED_BUILTIN_FLAGS = ["mcp-config"];
|
|
926
937
|
async function loadDeferredBuiltinExtensions() {
|
|
927
938
|
return await Promise.all(DEFERRED_BUILTIN_LOADERS.map(async ({ name, load }) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createRequire as __lunrRequire } from "node:module"; const require = __lunrRequire(import.meta.url);
|
|
2
2
|
|
|
3
3
|
// packages/coding-agent/dist/builtin-extensions/pi-web-access/lazy.js
|
|
4
|
-
var loadExtract = () => import("./extract-
|
|
4
|
+
var loadExtract = () => import("./extract-EQJE7FZZ.js"), loadGeminiSearch = () => import("./gemini-search-35OCRFLN.js"), loadCuratorServer = () => import("./curator-server-XCM43VEF.js"), loadSummaryReview = () => import("./summary-review-YSMXKITO.js"), loadGeminiWeb = () => import("./gemini-web-MM446SEH.js"), loadGeminiApi = () => import("./gemini-api-QE7ANVDZ.js"), loadOpenAISearch = () => import("./openai-search-B3MSNCQA.js"), loadBrave = () => import("./brave-UWDA3I22.js"), loadParallel = () => import("./parallel-AI2MNSCU.js"), loadTavily = () => import("./tavily-WEZFVFP7.js"), loadPerplexity = () => import("./perplexity-QVJW3I35.js"), loadExa = () => import("./exa-LL64QZR2.js"), loadGithubExtract = () => import("./github-extract-F64RZOEA.js"), loadPdfExtract = () => import("./pdf-extract-IPE6H4HP.js"), loadYoutubeExtract = () => import("./youtube-extract-FNPAUNHU.js"), loadVideoExtract = () => import("./video-extract-OOZHR7SU.js"), loadGeminiUrlContext = () => import("./gemini-url-context-UQY3PHHW.js");
|
|
5
5
|
|
|
6
6
|
export {
|
|
7
7
|
loadExtract,
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import { createRequire as __lunrRequire } from "node:module"; const require = __lunrRequire(import.meta.url);
|
|
2
|
+
|
|
3
|
+
// packages/coding-agent/dist/builtin-extensions/pi-subagents/src/runs/shared/subagent-control.js
|
|
4
|
+
var CONTROL_EVENT_TYPES = ["active_long_running", "needs_attention"], CONTROL_NOTIFICATION_CHANNELS = ["event", "async", "intercom"], DEFAULT_NOTIFY_ON = ["active_long_running", "needs_attention"], DEFAULT_CONTROL_CONFIG = {
|
|
5
|
+
enabled: !0,
|
|
6
|
+
needsAttentionAfterMs: 6e4,
|
|
7
|
+
activeNoticeAfterMs: 24e4,
|
|
8
|
+
failedToolAttemptsBeforeAttention: 3,
|
|
9
|
+
notifyOn: DEFAULT_NOTIFY_ON,
|
|
10
|
+
notifyChannels: CONTROL_NOTIFICATION_CHANNELS
|
|
11
|
+
};
|
|
12
|
+
function parsePositiveInt(value) {
|
|
13
|
+
if (typeof value == "number" && !(!Number.isFinite(value) || !Number.isInteger(value) || value < 1))
|
|
14
|
+
return value;
|
|
15
|
+
}
|
|
16
|
+
function parseControlList(value, allowed) {
|
|
17
|
+
if (!Array.isArray(value))
|
|
18
|
+
return;
|
|
19
|
+
if (value.length === 0)
|
|
20
|
+
return [];
|
|
21
|
+
let allowedSet = new Set(allowed), parsed = value.filter((entry) => typeof entry == "string" && allowedSet.has(entry));
|
|
22
|
+
return parsed.length > 0 ? Array.from(new Set(parsed)) : void 0;
|
|
23
|
+
}
|
|
24
|
+
function resolveControlConfig(globalConfig, override) {
|
|
25
|
+
let enabled = override?.enabled ?? globalConfig?.enabled ?? DEFAULT_CONTROL_CONFIG.enabled, needsAttentionAfterMs = parsePositiveInt(override?.needsAttentionAfterMs) ?? parsePositiveInt(globalConfig?.needsAttentionAfterMs) ?? DEFAULT_CONTROL_CONFIG.needsAttentionAfterMs, activeNoticeAfterMs = parsePositiveInt(override?.activeNoticeAfterMs) ?? parsePositiveInt(globalConfig?.activeNoticeAfterMs) ?? DEFAULT_CONTROL_CONFIG.activeNoticeAfterMs, activeNoticeAfterTurns = parsePositiveInt(override?.activeNoticeAfterTurns) ?? parsePositiveInt(globalConfig?.activeNoticeAfterTurns), activeNoticeAfterTokens = parsePositiveInt(override?.activeNoticeAfterTokens) ?? parsePositiveInt(globalConfig?.activeNoticeAfterTokens), failedToolAttemptsBeforeAttention = parsePositiveInt(override?.failedToolAttemptsBeforeAttention) ?? parsePositiveInt(globalConfig?.failedToolAttemptsBeforeAttention) ?? DEFAULT_CONTROL_CONFIG.failedToolAttemptsBeforeAttention, notifyOn = parseControlList(override?.notifyOn, CONTROL_EVENT_TYPES) ?? parseControlList(globalConfig?.notifyOn, CONTROL_EVENT_TYPES) ?? DEFAULT_CONTROL_CONFIG.notifyOn, notifyChannels = parseControlList(override?.notifyChannels, CONTROL_NOTIFICATION_CHANNELS) ?? parseControlList(globalConfig?.notifyChannels, CONTROL_NOTIFICATION_CHANNELS) ?? DEFAULT_CONTROL_CONFIG.notifyChannels;
|
|
26
|
+
return {
|
|
27
|
+
enabled,
|
|
28
|
+
needsAttentionAfterMs,
|
|
29
|
+
activeNoticeAfterMs,
|
|
30
|
+
activeNoticeAfterTurns,
|
|
31
|
+
activeNoticeAfterTokens,
|
|
32
|
+
failedToolAttemptsBeforeAttention,
|
|
33
|
+
notifyOn: [...notifyOn],
|
|
34
|
+
notifyChannels: [...notifyChannels]
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
function deriveActivityState(input) {
|
|
38
|
+
if (!input.config.enabled)
|
|
39
|
+
return;
|
|
40
|
+
let now = input.now ?? Date.now(), lastActivity = input.lastActivityAt ?? input.startedAt;
|
|
41
|
+
return Math.max(0, now - lastActivity) > input.config.needsAttentionAfterMs ? "needs_attention" : void 0;
|
|
42
|
+
}
|
|
43
|
+
function buildControlEvent(input) {
|
|
44
|
+
let ts = input.ts ?? Date.now(), type = input.type ?? (input.to === "active_long_running" ? "active_long_running" : "needs_attention"), elapsedMs = input.elapsedMs ?? (input.lastActivityAt ? Math.max(0, ts - input.lastActivityAt) : void 0), elapsedSeconds = elapsedMs !== void 0 ? Math.floor(elapsedMs / 1e3) : void 0, message = input.message ?? (type === "active_long_running" ? `${input.agent} is still active but long-running` : elapsedSeconds !== void 0 ? `${input.agent} needs attention (no observed activity for ${elapsedSeconds}s)` : `${input.agent} needs attention`);
|
|
45
|
+
return {
|
|
46
|
+
type,
|
|
47
|
+
...input.from ? { from: input.from } : {},
|
|
48
|
+
to: input.to,
|
|
49
|
+
ts,
|
|
50
|
+
runId: input.runId,
|
|
51
|
+
agent: input.agent,
|
|
52
|
+
...input.index !== void 0 ? { index: input.index } : {},
|
|
53
|
+
message,
|
|
54
|
+
reason: input.reason ?? (type === "active_long_running" ? "active_long_running" : "idle"),
|
|
55
|
+
...input.turns !== void 0 ? { turns: input.turns } : {},
|
|
56
|
+
...input.tokens !== void 0 ? { tokens: input.tokens } : {},
|
|
57
|
+
...input.toolCount !== void 0 ? { toolCount: input.toolCount } : {},
|
|
58
|
+
...input.currentTool ? { currentTool: input.currentTool } : {},
|
|
59
|
+
...input.currentToolDurationMs !== void 0 ? { currentToolDurationMs: input.currentToolDurationMs } : {},
|
|
60
|
+
...input.currentPath ? { currentPath: input.currentPath } : {},
|
|
61
|
+
...elapsedMs !== void 0 ? { elapsedMs } : {},
|
|
62
|
+
...input.recentFailureSummary ? { recentFailureSummary: input.recentFailureSummary } : {}
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
function shouldNotifyControlEvent(config, event) {
|
|
66
|
+
return config.enabled && config.notifyOn.includes(event.type);
|
|
67
|
+
}
|
|
68
|
+
function isDiagnosticControlEvent(event) {
|
|
69
|
+
return event?.type === "active_long_running" || ["idle", "active_long_running", "time_threshold", "turn_threshold", "token_threshold", "completion_guard"].includes(event?.reason ?? "");
|
|
70
|
+
}
|
|
71
|
+
function controlNotificationKey(event, childIntercomTarget) {
|
|
72
|
+
return `${childIntercomTarget ?? (event.index !== void 0 ? `${event.runId}:${event.index}` : event.runId)}:${event.type}:${event.reason ?? "idle"}`;
|
|
73
|
+
}
|
|
74
|
+
function claimControlNotification(config, event, seenKeys, childIntercomTarget) {
|
|
75
|
+
if (!shouldNotifyControlEvent(config, event))
|
|
76
|
+
return !1;
|
|
77
|
+
let key = controlNotificationKey(event, childIntercomTarget);
|
|
78
|
+
return seenKeys.has(key) ? !1 : (seenKeys.add(key), !0);
|
|
79
|
+
}
|
|
80
|
+
function formatLongRunningFacts(event) {
|
|
81
|
+
let facts = [];
|
|
82
|
+
return event.elapsedMs !== void 0 && facts.push(`elapsed ${Math.floor(Math.max(0, event.elapsedMs) / 1e3)}s`), event.turns !== void 0 && facts.push(`${event.turns} turns`), event.tokens !== void 0 && facts.push(`${event.tokens} tokens`), event.toolCount !== void 0 && facts.push(`${event.toolCount} tools`), event.currentTool && facts.push(`tool ${event.currentTool}${event.currentToolDurationMs !== void 0 ? ` ${Math.floor(Math.max(0, event.currentToolDurationMs) / 1e3)}s` : ""}`), event.currentPath && facts.push(`path ${event.currentPath}`), facts.length > 0 ? facts.join(" | ") : void 0;
|
|
83
|
+
}
|
|
84
|
+
function formatControlNoticeMessage(event, childIntercomTarget) {
|
|
85
|
+
let runTarget = event.runId;
|
|
86
|
+
if (event.reason === "completion_guard")
|
|
87
|
+
return [
|
|
88
|
+
`Subagent failed: ${event.agent}`,
|
|
89
|
+
`Run: ${runTarget}${event.index !== void 0 ? ` step ${event.index + 1}` : ""}`,
|
|
90
|
+
`Signal: ${event.message}`,
|
|
91
|
+
"Next: read the output artifact or session from the subagent result, then retry with a more explicit implementation prompt or handle the fix directly.",
|
|
92
|
+
childIntercomTarget ? `Run intercom target (may be inactive): ${childIntercomTarget}` : void 0
|
|
93
|
+
].filter((line) => !!line).join(`
|
|
94
|
+
`);
|
|
95
|
+
let nudgeCommand = `subagent({ action: "resume", id: "${runTarget}", ${event.index !== void 0 ? `index: ${event.index}, ` : ""}message: "What are you blocked on? Reply with the smallest next step or ask for a decision." })`;
|
|
96
|
+
if (event.type === "active_long_running") {
|
|
97
|
+
let facts = formatLongRunningFacts(event);
|
|
98
|
+
return [
|
|
99
|
+
`Subagent active but long-running: ${event.agent}`,
|
|
100
|
+
`Run: ${runTarget}${event.index !== void 0 ? ` step ${event.index + 1}` : ""}`,
|
|
101
|
+
`Signal: ${event.message}`,
|
|
102
|
+
facts ? `Facts: ${facts}` : void 0,
|
|
103
|
+
"Hint: Inspect status, then nudge if the work seems stuck. Live async nudges interrupt the child before sending the follow-up.",
|
|
104
|
+
`Nudge: ${nudgeCommand}`,
|
|
105
|
+
childIntercomTarget ? `Direct intercom target: ${childIntercomTarget}` : void 0,
|
|
106
|
+
`Status: subagent({ action: "status", id: "${runTarget}" })`,
|
|
107
|
+
`Interrupt: subagent({ action: "interrupt", id: "${runTarget}" })`
|
|
108
|
+
].filter((line) => !!line).join(`
|
|
109
|
+
`);
|
|
110
|
+
}
|
|
111
|
+
return [
|
|
112
|
+
`Subagent needs attention: ${event.agent}`,
|
|
113
|
+
`Run: ${runTarget}${event.index !== void 0 ? ` step ${event.index + 1}` : ""}`,
|
|
114
|
+
`Signal: ${event.message}`,
|
|
115
|
+
event.recentFailureSummary ? `Recent failures: ${event.recentFailureSummary}` : void 0,
|
|
116
|
+
"Hint: Inspect status first unless the run is clearly blocked. Live async nudges interrupt the child before sending the follow-up.",
|
|
117
|
+
`Nudge: ${nudgeCommand}`,
|
|
118
|
+
childIntercomTarget ? `Direct intercom target: ${childIntercomTarget}` : void 0,
|
|
119
|
+
`Status: subagent({ action: "status", id: "${runTarget}" })`,
|
|
120
|
+
`Interrupt: subagent({ action: "interrupt", id: "${runTarget}" })`
|
|
121
|
+
].filter((line) => !!line).join(`
|
|
122
|
+
`);
|
|
123
|
+
}
|
|
124
|
+
function formatControlIntercomMessage(event, childIntercomTarget) {
|
|
125
|
+
return [
|
|
126
|
+
event.reason === "completion_guard" ? "subagent failed" : event.type === "active_long_running" ? "subagent active but long-running" : "subagent needs attention",
|
|
127
|
+
"",
|
|
128
|
+
event.reason === "completion_guard" ? `${event.agent} failed in run ${event.runId}.` : event.type === "active_long_running" ? `${event.agent} is still active but long-running in run ${event.runId}.` : `${event.agent} needs attention in run ${event.runId}.`,
|
|
129
|
+
"",
|
|
130
|
+
formatControlNoticeMessage(event, childIntercomTarget)
|
|
131
|
+
].join(`
|
|
132
|
+
`);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
export {
|
|
136
|
+
DEFAULT_CONTROL_CONFIG,
|
|
137
|
+
resolveControlConfig,
|
|
138
|
+
deriveActivityState,
|
|
139
|
+
buildControlEvent,
|
|
140
|
+
shouldNotifyControlEvent,
|
|
141
|
+
isDiagnosticControlEvent,
|
|
142
|
+
controlNotificationKey,
|
|
143
|
+
claimControlNotification,
|
|
144
|
+
formatControlNoticeMessage,
|
|
145
|
+
formatControlIntercomMessage
|
|
146
|
+
};
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
buildSessionContext,
|
|
7
7
|
sessionEntryToContextMessages
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-XLTL257W.js";
|
|
9
9
|
import {
|
|
10
10
|
convertToLlm,
|
|
11
11
|
createBranchSummaryMessage,
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
} from "./chunk-FVDOXRUD.js";
|
|
15
15
|
import {
|
|
16
16
|
isValidThinkingLevel
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-E24EO34J.js";
|
|
18
18
|
|
|
19
19
|
// packages/coding-agent/dist/core/compaction/utils.js
|
|
20
20
|
function createFileOps() {
|