@ashx-j/lunr 0.2.19 → 0.2.21
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 +36 -1
- package/README.md +2 -2
- package/dist/builtin-extensions/index.d.ts.map +1 -1
- package/dist/builtin-extensions/index.js +0 -2
- package/dist/builtin-extensions/index.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 +9 -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 +360 -351
- package/dist/builtin-extensions/pi-intercom/index.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 +8 -6
- package/dist/builtin-extensions/pi-subagents/src/extension/index.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/index.js +128 -57
- 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 +38 -13
- package/dist/builtin-extensions/pi-subagents/src/extension/schemas.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/tool-description.d.ts +4 -3
- package/dist/builtin-extensions/pi-subagents/src/extension/tool-description.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/tool-description.js +24 -14
- package/dist/builtin-extensions/pi-subagents/src/extension/tool-description.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/intercom/native-supervisor-channel.d.ts +8 -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 +247 -18
- 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 +179 -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 +89 -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 +541 -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 +11 -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 +38 -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/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 +46 -31
- package/dist/builtin-extensions/pi-subagents/src/runs/background/subagent-runner.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/subagent-wait.d.ts +3 -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 +64 -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 +2 -1
- 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.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/chain-execution.js +21 -8
- 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 +1 -1
- 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 +71 -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/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 +3 -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 +7 -2
- 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-prompt-runtime.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/subagent-prompt-runtime.js +13 -3
- 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 +68 -11
- 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 +21 -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/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/core/customize.d.ts +2 -0
- package/dist/core/customize.d.ts.map +1 -1
- package/dist/core/customize.js +3 -0
- package/dist/core/customize.js.map +1 -1
- package/dist/core/permissions.d.ts +1 -0
- package/dist/core/permissions.d.ts.map +1 -1
- package/dist/core/permissions.js +8 -4
- package/dist/core/permissions.js.map +1 -1
- package/dist/core/plan-mode.d.ts.map +1 -1
- package/dist/core/plan-mode.js +0 -5
- package/dist/core/plan-mode.js.map +1 -1
- package/dist/core/runtime-bridges.d.ts.map +1 -1
- package/dist/core/runtime-bridges.js +0 -2
- package/dist/core/runtime-bridges.js.map +1 -1
- package/dist/core/settings-manager.d.ts +4 -0
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +11 -0
- package/dist/core/settings-manager.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-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/modes/interactive/components/assistant-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/assistant-message.js +12 -18
- package/dist/modes/interactive/components/assistant-message.js.map +1 -1
- package/dist/modes/interactive/components/settings-selector.d.ts +4 -0
- package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector.js +73 -1
- package/dist/modes/interactive/components/settings-selector.js.map +1 -1
- package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
- package/dist/modes/interactive/components/tool-execution.js +12 -0
- 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 +1 -0
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +44 -22
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/node-runtime/{agent-session-services-35WNVGMR.js → agent-session-services-C743TYQE.js} +6 -5
- package/dist/node-runtime/{builtin-extensions-322XDDEM.js → builtin-extensions-JCOPAAB5.js} +3 -2
- package/dist/node-runtime/{chunk-XATUM2HK.js → chunk-25I2BHAA.js} +1 -1
- package/dist/node-runtime/{chunk-TXHKBRHZ.js → chunk-2BUAYZ7K.js} +136 -53
- package/dist/node-runtime/chunk-5ZH3ZFIZ.js +308 -0
- package/dist/node-runtime/{chunk-J26TSGDL.js → chunk-6N22HULO.js} +8 -5
- package/dist/node-runtime/chunk-A3KMVBZV.js +60 -0
- package/dist/node-runtime/{chunk-4FX25LWP.js → chunk-AWVD5IEY.js} +20 -421
- package/dist/node-runtime/{chunk-ZRCBN365.js → chunk-GB2MGFLI.js} +12 -12
- package/dist/node-runtime/chunk-LISUTZS3.js +19 -0
- package/dist/node-runtime/{chunk-PNJSG3IZ.js → chunk-LTYWTR3V.js} +1 -369
- package/dist/node-runtime/{chunk-TFBIJTM3.js → chunk-PDNXVXMD.js} +13 -13
- package/dist/node-runtime/{chunk-MCUNIRD5.js → chunk-SY2TFMLO.js} +532 -261
- package/dist/node-runtime/{chunk-HQCKFM2O.js → chunk-VGYZ3APQ.js} +3 -0
- package/dist/node-runtime/{chunk-4DJ6HEGH.js → chunk-VZR3NCM7.js} +3 -3
- package/dist/node-runtime/chunk-W3SILANP.js +24 -0
- package/dist/node-runtime/{chunk-CBGB57XT.js → chunk-WLLDXJRT.js} +10 -0
- package/dist/node-runtime/{chunk-ATGA2WLC.js → chunk-XI77KVKA.js} +399 -36
- package/dist/node-runtime/{chunk-4CSFRBCN.js → chunk-Y5KOEMBH.js} +1 -1
- package/dist/node-runtime/{chunk-AROOY4BB.js → chunk-YMEAYRBE.js} +1 -1
- package/dist/node-runtime/{command-DWUM5X3U.js → command-P4NYCJ2M.js} +1 -1
- package/dist/node-runtime/{customize-XEXL2DGQ.js → customize-LF5VST47.js} +1 -1
- package/dist/node-runtime/{gateway-UZXMFGWY.js → gateway-BM6NLOH4.js} +2 -2
- package/dist/node-runtime/index.js +16 -13
- package/dist/node-runtime/{interactive-mode-QT5IKGQ5.js → interactive-mode-EVVBA64D.js} +11 -8
- package/dist/node-runtime/{lunr-cron-QPBTKBGI.js → lunr-cron-4VHP4E4B.js} +2 -2
- package/dist/node-runtime/main.js +14 -12
- package/dist/node-runtime/{package-manager-cli-7RKSZGEN.js → package-manager-cli-N37546V5.js} +5 -4
- package/dist/node-runtime/{pi-intercom-EEMBGQID.js → pi-intercom-NV2LW6X7.js} +108 -87
- package/dist/node-runtime/{pi-subagents-7YJ3I4VE.js → pi-subagents-6MUIFNDM.js} +1262 -599
- package/dist/node-runtime/rpc-entry.js +14 -12
- package/dist/node-runtime/{runtime-bridges-3RKBDLNA.js → runtime-bridges-2VQTLPOZ.js} +3 -5
- package/dist/node-runtime/{settings-manager-GHPTUN7R.js → settings-manager-CUGAZWAB.js} +2 -1
- package/dist/node-runtime/{subagent-executor-5Q5A4HJ2.js → subagent-executor-MH4A7CCF.js} +181 -294
- package/dist/node-runtime/{update-cli-L3JIBH2U.js → update-cli-XTZMZGOL.js} +2 -1
- package/docs/features.md +22 -4
- package/docs/keybindings.md +3 -1
- package/docs/settings.md +3 -2
- 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 +4 -4
- 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/chunk-3NMWLTPV.js +0 -64
|
@@ -0,0 +1,308 @@
|
|
|
1
|
+
import { createRequire as __lunrRequire } from "node:module"; const require = __lunrRequire(import.meta.url);
|
|
2
|
+
|
|
3
|
+
// node_modules/unicode-animations/dist/chunk-F2BWZODB.js
|
|
4
|
+
var BRAILLE_DOT_MAP = [
|
|
5
|
+
[1, 8],
|
|
6
|
+
// row 0
|
|
7
|
+
[2, 16],
|
|
8
|
+
// row 1
|
|
9
|
+
[4, 32],
|
|
10
|
+
// row 2
|
|
11
|
+
[64, 128]
|
|
12
|
+
// row 3
|
|
13
|
+
];
|
|
14
|
+
function gridToBraille(grid) {
|
|
15
|
+
let rows = grid.length, cols = grid[0] ? grid[0].length : 0, charCount = Math.ceil(cols / 2), result = "";
|
|
16
|
+
for (let c = 0; c < charCount; c++) {
|
|
17
|
+
let code = 10240;
|
|
18
|
+
for (let r = 0; r < 4 && r < rows; r++)
|
|
19
|
+
for (let d = 0; d < 2; d++) {
|
|
20
|
+
let col = c * 2 + d;
|
|
21
|
+
col < cols && grid[r] && grid[r][col] && (code |= BRAILLE_DOT_MAP[r][d]);
|
|
22
|
+
}
|
|
23
|
+
result += String.fromCodePoint(code);
|
|
24
|
+
}
|
|
25
|
+
return result;
|
|
26
|
+
}
|
|
27
|
+
function makeGrid(rows, cols) {
|
|
28
|
+
return rows <= 0 || cols <= 0 ? [] : Array.from({ length: rows }, () => Array(cols).fill(!1));
|
|
29
|
+
}
|
|
30
|
+
function genScan() {
|
|
31
|
+
let frames = [];
|
|
32
|
+
for (let pos = -1; pos < 9; pos++) {
|
|
33
|
+
let g = makeGrid(4, 8);
|
|
34
|
+
for (let r = 0; r < 4; r++)
|
|
35
|
+
for (let c = 0; c < 8; c++)
|
|
36
|
+
(c === pos || c === pos - 1) && (g[r][c] = !0);
|
|
37
|
+
frames.push(gridToBraille(g));
|
|
38
|
+
}
|
|
39
|
+
return frames;
|
|
40
|
+
}
|
|
41
|
+
function genRain() {
|
|
42
|
+
let frames = [], offsets = [0, 3, 1, 5, 2, 7, 4, 6];
|
|
43
|
+
for (let f = 0; f < 12; f++) {
|
|
44
|
+
let g = makeGrid(4, 8);
|
|
45
|
+
for (let c = 0; c < 8; c++) {
|
|
46
|
+
let row = (f + offsets[c]) % 6;
|
|
47
|
+
row < 4 && (g[row][c] = !0);
|
|
48
|
+
}
|
|
49
|
+
frames.push(gridToBraille(g));
|
|
50
|
+
}
|
|
51
|
+
return frames;
|
|
52
|
+
}
|
|
53
|
+
function genScanLine() {
|
|
54
|
+
let frames = [], positions = [0, 1, 2, 3, 2, 1];
|
|
55
|
+
for (let row of positions) {
|
|
56
|
+
let g = makeGrid(4, 6);
|
|
57
|
+
for (let c = 0; c < 6; c++)
|
|
58
|
+
g[row][c] = !0, row > 0 && (g[row - 1][c] = c % 2 === 0);
|
|
59
|
+
frames.push(gridToBraille(g));
|
|
60
|
+
}
|
|
61
|
+
return frames;
|
|
62
|
+
}
|
|
63
|
+
function genPulse() {
|
|
64
|
+
let frames = [], radii = [0.5, 1.2, 2, 3, 3.5];
|
|
65
|
+
for (let r of radii) {
|
|
66
|
+
let g = makeGrid(4, 6);
|
|
67
|
+
for (let row = 0; row < 4; row++)
|
|
68
|
+
for (let col = 0; col < 6; col++) {
|
|
69
|
+
let dist = Math.sqrt((col - 2.5) ** 2 + (row - 1.5) ** 2);
|
|
70
|
+
Math.abs(dist - r) < 0.9 && (g[row][col] = !0);
|
|
71
|
+
}
|
|
72
|
+
frames.push(gridToBraille(g));
|
|
73
|
+
}
|
|
74
|
+
return frames;
|
|
75
|
+
}
|
|
76
|
+
function genSnake() {
|
|
77
|
+
let path = [];
|
|
78
|
+
for (let r = 0; r < 4; r++)
|
|
79
|
+
if (r % 2 === 0)
|
|
80
|
+
for (let c = 0; c < 4; c++) path.push([r, c]);
|
|
81
|
+
else
|
|
82
|
+
for (let c = 3; c >= 0; c--) path.push([r, c]);
|
|
83
|
+
let frames = [];
|
|
84
|
+
for (let i = 0; i < path.length; i++) {
|
|
85
|
+
let g = makeGrid(4, 4);
|
|
86
|
+
for (let t = 0; t < 4; t++) {
|
|
87
|
+
let idx = (i - t + path.length) % path.length;
|
|
88
|
+
g[path[idx][0]][path[idx][1]] = !0;
|
|
89
|
+
}
|
|
90
|
+
frames.push(gridToBraille(g));
|
|
91
|
+
}
|
|
92
|
+
return frames;
|
|
93
|
+
}
|
|
94
|
+
function genSparkle() {
|
|
95
|
+
let patterns = [
|
|
96
|
+
[1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0],
|
|
97
|
+
[0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0],
|
|
98
|
+
[0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1],
|
|
99
|
+
[1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0],
|
|
100
|
+
[0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1],
|
|
101
|
+
[0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0]
|
|
102
|
+
], W = 8, H = 4, frames = [];
|
|
103
|
+
for (let pat of patterns) {
|
|
104
|
+
let g = makeGrid(H, W);
|
|
105
|
+
for (let r = 0; r < H; r++)
|
|
106
|
+
for (let c = 0; c < W; c++)
|
|
107
|
+
g[r][c] = !!pat[r * W + c];
|
|
108
|
+
frames.push(gridToBraille(g));
|
|
109
|
+
}
|
|
110
|
+
return frames;
|
|
111
|
+
}
|
|
112
|
+
function genCascade() {
|
|
113
|
+
let frames = [];
|
|
114
|
+
for (let offset = -2; offset < 12; offset++) {
|
|
115
|
+
let g = makeGrid(4, 8);
|
|
116
|
+
for (let r = 0; r < 4; r++)
|
|
117
|
+
for (let c = 0; c < 8; c++) {
|
|
118
|
+
let diag = c + r;
|
|
119
|
+
(diag === offset || diag === offset - 1) && (g[r][c] = !0);
|
|
120
|
+
}
|
|
121
|
+
frames.push(gridToBraille(g));
|
|
122
|
+
}
|
|
123
|
+
return frames;
|
|
124
|
+
}
|
|
125
|
+
function genColumns() {
|
|
126
|
+
let frames = [];
|
|
127
|
+
for (let col = 0; col < 6; col++)
|
|
128
|
+
for (let fillTo = 3; fillTo >= 0; fillTo--) {
|
|
129
|
+
let g = makeGrid(4, 6);
|
|
130
|
+
for (let pc = 0; pc < col; pc++)
|
|
131
|
+
for (let r = 0; r < 4; r++) g[r][pc] = !0;
|
|
132
|
+
for (let r = fillTo; r < 4; r++) g[r][col] = !0;
|
|
133
|
+
frames.push(gridToBraille(g));
|
|
134
|
+
}
|
|
135
|
+
let full = makeGrid(4, 6);
|
|
136
|
+
for (let r = 0; r < 4; r++) for (let c = 0; c < 6; c++) full[r][c] = !0;
|
|
137
|
+
return frames.push(gridToBraille(full)), frames.push(gridToBraille(makeGrid(4, 6))), frames;
|
|
138
|
+
}
|
|
139
|
+
function genOrbit() {
|
|
140
|
+
let path = [
|
|
141
|
+
[0, 0],
|
|
142
|
+
[0, 1],
|
|
143
|
+
[1, 1],
|
|
144
|
+
[2, 1],
|
|
145
|
+
[3, 1],
|
|
146
|
+
[3, 0],
|
|
147
|
+
[2, 0],
|
|
148
|
+
[1, 0]
|
|
149
|
+
], frames = [];
|
|
150
|
+
for (let i = 0; i < path.length; i++) {
|
|
151
|
+
let g = makeGrid(4, 2);
|
|
152
|
+
g[path[i][0]][path[i][1]] = !0;
|
|
153
|
+
let t1 = (i - 1 + path.length) % path.length;
|
|
154
|
+
g[path[t1][0]][path[t1][1]] = !0, frames.push(gridToBraille(g));
|
|
155
|
+
}
|
|
156
|
+
return frames;
|
|
157
|
+
}
|
|
158
|
+
function genBreathe() {
|
|
159
|
+
let stages = [
|
|
160
|
+
[],
|
|
161
|
+
[[1, 0]],
|
|
162
|
+
[[0, 1], [2, 0]],
|
|
163
|
+
[[0, 0], [1, 1], [3, 0]],
|
|
164
|
+
[[0, 0], [1, 1], [2, 0], [3, 1]],
|
|
165
|
+
[[0, 0], [0, 1], [1, 1], [2, 0], [3, 1]],
|
|
166
|
+
[[0, 0], [0, 1], [1, 0], [2, 1], [3, 0], [3, 1]],
|
|
167
|
+
[[0, 0], [0, 1], [1, 0], [1, 1], [2, 0], [3, 0], [3, 1]],
|
|
168
|
+
[[0, 0], [0, 1], [1, 0], [1, 1], [2, 0], [2, 1], [3, 0], [3, 1]]
|
|
169
|
+
], frames = [], sequence = [...stages, ...stages.slice().reverse().slice(1)];
|
|
170
|
+
for (let dots of sequence) {
|
|
171
|
+
let g = makeGrid(4, 2);
|
|
172
|
+
for (let [r, c] of dots) g[r][c] = !0;
|
|
173
|
+
frames.push(gridToBraille(g));
|
|
174
|
+
}
|
|
175
|
+
return frames;
|
|
176
|
+
}
|
|
177
|
+
function genWaveRows() {
|
|
178
|
+
let frames = [];
|
|
179
|
+
for (let f = 0; f < 16; f++) {
|
|
180
|
+
let g = makeGrid(4, 8);
|
|
181
|
+
for (let c = 0; c < 8; c++) {
|
|
182
|
+
let phase = f - c * 0.5, row = Math.round((Math.sin(phase * 0.8) + 1) / 2 * 3);
|
|
183
|
+
g[row][c] = !0, row > 0 && (g[row - 1][c] = (f + c) % 3 === 0);
|
|
184
|
+
}
|
|
185
|
+
frames.push(gridToBraille(g));
|
|
186
|
+
}
|
|
187
|
+
return frames;
|
|
188
|
+
}
|
|
189
|
+
function genCheckerboard() {
|
|
190
|
+
let frames = [];
|
|
191
|
+
for (let phase = 0; phase < 4; phase++) {
|
|
192
|
+
let g = makeGrid(4, 6);
|
|
193
|
+
for (let r = 0; r < 4; r++)
|
|
194
|
+
for (let c = 0; c < 6; c++)
|
|
195
|
+
phase < 2 ? g[r][c] = (r + c + phase) % 2 === 0 : g[r][c] = (r + c + phase) % 3 === 0;
|
|
196
|
+
frames.push(gridToBraille(g));
|
|
197
|
+
}
|
|
198
|
+
return frames;
|
|
199
|
+
}
|
|
200
|
+
function genHelix() {
|
|
201
|
+
let frames = [];
|
|
202
|
+
for (let f = 0; f < 16; f++) {
|
|
203
|
+
let g = makeGrid(4, 8);
|
|
204
|
+
for (let c = 0; c < 8; c++) {
|
|
205
|
+
let phase = (f + c) * (Math.PI / 4), y1 = Math.round((Math.sin(phase) + 1) / 2 * 3), y2 = Math.round((Math.sin(phase + Math.PI) + 1) / 2 * 3);
|
|
206
|
+
g[y1][c] = !0, g[y2][c] = !0;
|
|
207
|
+
}
|
|
208
|
+
frames.push(gridToBraille(g));
|
|
209
|
+
}
|
|
210
|
+
return frames;
|
|
211
|
+
}
|
|
212
|
+
function genFillSweep() {
|
|
213
|
+
let frames = [];
|
|
214
|
+
for (let row = 3; row >= 0; row--) {
|
|
215
|
+
let g = makeGrid(4, 4);
|
|
216
|
+
for (let r = row; r < 4; r++)
|
|
217
|
+
for (let c = 0; c < 4; c++) g[r][c] = !0;
|
|
218
|
+
frames.push(gridToBraille(g));
|
|
219
|
+
}
|
|
220
|
+
let full = makeGrid(4, 4);
|
|
221
|
+
for (let r = 0; r < 4; r++) for (let c = 0; c < 4; c++) full[r][c] = !0;
|
|
222
|
+
frames.push(gridToBraille(full)), frames.push(gridToBraille(full));
|
|
223
|
+
for (let row = 0; row < 4; row++) {
|
|
224
|
+
let g = makeGrid(4, 4);
|
|
225
|
+
for (let r = row + 1; r < 4; r++)
|
|
226
|
+
for (let c = 0; c < 4; c++) g[r][c] = !0;
|
|
227
|
+
frames.push(gridToBraille(g));
|
|
228
|
+
}
|
|
229
|
+
return frames.push(gridToBraille(makeGrid(4, 4))), frames;
|
|
230
|
+
}
|
|
231
|
+
function genDiagonalSwipe() {
|
|
232
|
+
let frames = [];
|
|
233
|
+
for (let d = 0; d <= 6; d++) {
|
|
234
|
+
let g = makeGrid(4, 4);
|
|
235
|
+
for (let r = 0; r < 4; r++)
|
|
236
|
+
for (let c = 0; c < 4; c++)
|
|
237
|
+
r + c <= d && (g[r][c] = !0);
|
|
238
|
+
frames.push(gridToBraille(g));
|
|
239
|
+
}
|
|
240
|
+
let full = makeGrid(4, 4);
|
|
241
|
+
for (let r = 0; r < 4; r++) for (let c = 0; c < 4; c++) full[r][c] = !0;
|
|
242
|
+
frames.push(gridToBraille(full));
|
|
243
|
+
for (let d = 0; d <= 6; d++) {
|
|
244
|
+
let g = makeGrid(4, 4);
|
|
245
|
+
for (let r = 0; r < 4; r++)
|
|
246
|
+
for (let c = 0; c < 4; c++)
|
|
247
|
+
r + c > d && (g[r][c] = !0);
|
|
248
|
+
frames.push(gridToBraille(g));
|
|
249
|
+
}
|
|
250
|
+
return frames.push(gridToBraille(makeGrid(4, 4))), frames;
|
|
251
|
+
}
|
|
252
|
+
var spinners = {
|
|
253
|
+
// === Classic braille single-char ===
|
|
254
|
+
braille: {
|
|
255
|
+
frames: ["\u280B", "\u2819", "\u2839", "\u2838", "\u283C", "\u2834", "\u2826", "\u2827", "\u2807", "\u280F"],
|
|
256
|
+
interval: 80
|
|
257
|
+
},
|
|
258
|
+
braillewave: {
|
|
259
|
+
frames: [
|
|
260
|
+
"\u2801\u2802\u2804\u2840",
|
|
261
|
+
"\u2802\u2804\u2840\u2880",
|
|
262
|
+
"\u2804\u2840\u2880\u2820",
|
|
263
|
+
"\u2840\u2880\u2820\u2810",
|
|
264
|
+
"\u2880\u2820\u2810\u2808",
|
|
265
|
+
"\u2820\u2810\u2808\u2801",
|
|
266
|
+
"\u2810\u2808\u2801\u2802",
|
|
267
|
+
"\u2808\u2801\u2802\u2804"
|
|
268
|
+
],
|
|
269
|
+
interval: 100
|
|
270
|
+
},
|
|
271
|
+
dna: {
|
|
272
|
+
frames: [
|
|
273
|
+
"\u280B\u2809\u2819\u281A",
|
|
274
|
+
"\u2809\u2819\u281A\u2812",
|
|
275
|
+
"\u2819\u281A\u2812\u2802",
|
|
276
|
+
"\u281A\u2812\u2802\u2802",
|
|
277
|
+
"\u2812\u2802\u2802\u2812",
|
|
278
|
+
"\u2802\u2802\u2812\u2832",
|
|
279
|
+
"\u2802\u2812\u2832\u2834",
|
|
280
|
+
"\u2812\u2832\u2834\u2824",
|
|
281
|
+
"\u2832\u2834\u2824\u2804",
|
|
282
|
+
"\u2834\u2824\u2804\u280B",
|
|
283
|
+
"\u2824\u2804\u280B\u2809",
|
|
284
|
+
"\u2804\u280B\u2809\u2819"
|
|
285
|
+
],
|
|
286
|
+
interval: 80
|
|
287
|
+
},
|
|
288
|
+
// === Generated braille grid animations ===
|
|
289
|
+
scan: { frames: genScan(), interval: 70 },
|
|
290
|
+
rain: { frames: genRain(), interval: 100 },
|
|
291
|
+
scanline: { frames: genScanLine(), interval: 120 },
|
|
292
|
+
pulse: { frames: genPulse(), interval: 180 },
|
|
293
|
+
snake: { frames: genSnake(), interval: 80 },
|
|
294
|
+
sparkle: { frames: genSparkle(), interval: 150 },
|
|
295
|
+
cascade: { frames: genCascade(), interval: 60 },
|
|
296
|
+
columns: { frames: genColumns(), interval: 60 },
|
|
297
|
+
orbit: { frames: genOrbit(), interval: 100 },
|
|
298
|
+
breathe: { frames: genBreathe(), interval: 100 },
|
|
299
|
+
waverows: { frames: genWaveRows(), interval: 90 },
|
|
300
|
+
checkerboard: { frames: genCheckerboard(), interval: 250 },
|
|
301
|
+
helix: { frames: genHelix(), interval: 80 },
|
|
302
|
+
fillsweep: { frames: genFillSweep(), interval: 100 },
|
|
303
|
+
diagswipe: { frames: genDiagonalSwipe(), interval: 60 }
|
|
304
|
+
};
|
|
305
|
+
|
|
306
|
+
export {
|
|
307
|
+
spinners
|
|
308
|
+
};
|
|
@@ -3,6 +3,7 @@ import {
|
|
|
3
3
|
isUserInstructionsPath
|
|
4
4
|
} from "./chunk-M3LZLQW2.js";
|
|
5
5
|
import {
|
|
6
|
+
CONFIG_DIR_NAME,
|
|
6
7
|
getAgentDir
|
|
7
8
|
} from "./chunk-FQMM2EZ2.js";
|
|
8
9
|
|
|
@@ -125,7 +126,7 @@ function isCodeRewriteMutating(input) {
|
|
|
125
126
|
return input?.dry_run === !1;
|
|
126
127
|
}
|
|
127
128
|
function planModeBlockReason(toolName, input) {
|
|
128
|
-
if (BLOCKED_TOOLS.has(toolName) || toolName === "code_rewrite" && isCodeRewriteMutating(input)
|
|
129
|
+
if (BLOCKED_TOOLS.has(toolName) || toolName === "code_rewrite" && isCodeRewriteMutating(input))
|
|
129
130
|
return PLAN_MODE_BLOCK_MESSAGE;
|
|
130
131
|
if (toolName === "bash") {
|
|
131
132
|
let command = readBashCommand(input);
|
|
@@ -395,8 +396,7 @@ var READ_ONLY_TOOLS = /* @__PURE__ */ new Set([
|
|
|
395
396
|
"lsp_symbols",
|
|
396
397
|
"lsp_code_actions",
|
|
397
398
|
"lsp_completions",
|
|
398
|
-
"memory_load"
|
|
399
|
-
"settings_load"
|
|
399
|
+
"memory_load"
|
|
400
400
|
]), MUTATING_TOOLS = /* @__PURE__ */ new Set(["bash", "edit", "write", "memory_add", "memory_remove", "cron"]), REJECT_REASON = "Rejected by user (permission mode: manual).", NO_HANDLER_REASON = "Mutating tool blocked in manual mode: no approval channel available.", LARGE_SUBAGENT_LAUNCH_REJECT_REASON = "Large subagent launch rejected by user.", NO_LARGE_SUBAGENT_LAUNCH_HANDLER_REASON = "Large subagent launch blocked: no approval channel available.", LARGE_SUBAGENT_LAUNCH_ACTION = "large-subagent-launch", FULL_CHILD_ACTION = "subagent-full", contexts = /* @__PURE__ */ new Map(), defaultContext = { mode: "manual", approvals: /* @__PURE__ */ new Set() }, approvalHandler, turnLargeLaunchDecisions = /* @__PURE__ */ new WeakMap();
|
|
401
401
|
function getContext(sessionId) {
|
|
402
402
|
return sessionId ? contexts.get(sessionId) ?? defaultContext : defaultContext;
|
|
@@ -444,7 +444,7 @@ function isPathOutsideCwd(absPath, cwd) {
|
|
|
444
444
|
function resolvePath(cwd, p) {
|
|
445
445
|
return typeof p != "string" || !p ? "" : resolve(cwd, p);
|
|
446
446
|
}
|
|
447
|
-
var GLOBAL_AGENTS_FILE_WRITE_BLOCK_REASON = "The agents instruction tree is user-managed. The agent cannot change ~/.lunr/agent/agents/.", MEMORY_FILE_DIRECT_WRITE_BLOCK_REASON = "Memory is model-managed through the memory tools. Do not directly change ~/.lunr/simple-memory/memory.md.";
|
|
447
|
+
var GLOBAL_AGENTS_FILE_WRITE_BLOCK_REASON = "The agents instruction tree is user-managed. The agent cannot change ~/.lunr/agent/agents/.", MEMORY_FILE_DIRECT_WRITE_BLOCK_REASON = "Memory is model-managed through the memory tools. Do not directly change ~/.lunr/simple-memory/memory.md.", SETTINGS_FILE_DIRECT_WRITE_BLOCK_REASON = "lunR settings are user-managed through /settings. Do not directly change settings.json.";
|
|
448
448
|
function protectedFileWriteReason(toolName, input, cwd) {
|
|
449
449
|
if (toolName !== "edit" && toolName !== "write" && toolName !== "code_rewrite")
|
|
450
450
|
return;
|
|
@@ -459,6 +459,9 @@ function protectedFileWriteReason(toolName, input, cwd) {
|
|
|
459
459
|
return GLOBAL_AGENTS_FILE_WRITE_BLOCK_REASON;
|
|
460
460
|
if (normalize(target) === normalize(join(dirname(getAgentDir()), "simple-memory", "memory.md")))
|
|
461
461
|
return MEMORY_FILE_DIRECT_WRITE_BLOCK_REASON;
|
|
462
|
+
let globalSettings = normalize(join(getAgentDir(), "settings.json")), projectSettings = normalize(join(cwd, CONFIG_DIR_NAME, "settings.json")), normalizedTarget = normalize(target);
|
|
463
|
+
if (normalizedTarget === globalSettings || normalizedTarget === projectSettings)
|
|
464
|
+
return SETTINGS_FILE_DIRECT_WRITE_BLOCK_REASON;
|
|
462
465
|
}
|
|
463
466
|
function isMutatingTool(toolName) {
|
|
464
467
|
return MUTATING_TOOLS.has(toolName);
|
|
@@ -487,7 +490,7 @@ function getRequestedChildLaunches(input) {
|
|
|
487
490
|
return collectRequestedChildLaunches(input, launches), launches;
|
|
488
491
|
}
|
|
489
492
|
function requiresManualApproval(toolName, input) {
|
|
490
|
-
return isMutatingTool(toolName) ? !0 : toolName
|
|
493
|
+
return isMutatingTool(toolName) ? !0 : toolName === "subagent" ? getRequestedChildLaunches(input).some((launch) => launch.permissions === "full") : toolName === "code_rewrite" && isCodeRewriteMutating(input);
|
|
491
494
|
}
|
|
492
495
|
function firstTaskText(value) {
|
|
493
496
|
return typeof value == "string" && value.trim() ? sanitizeDetail(value) : "";
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { createRequire as __lunrRequire } from "node:module"; const require = __lunrRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
spinners
|
|
4
|
+
} from "./chunk-5ZH3ZFIZ.js";
|
|
5
|
+
|
|
6
|
+
// packages/coding-agent/dist/core/subagent-cancellation.js
|
|
7
|
+
var key = /* @__PURE__ */ Symbol.for("@lunr/subagent-cancellation"), store = globalThis, handlers = store[key] ?? /* @__PURE__ */ new Map();
|
|
8
|
+
store[key] = handlers;
|
|
9
|
+
function registerSubagentCancellation(sessionId, handler) {
|
|
10
|
+
return handlers.set(sessionId, handler), () => {
|
|
11
|
+
handlers.get(sessionId) === handler && handlers.delete(sessionId);
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
function getSubagentCancellation(sessionId) {
|
|
15
|
+
return handlers.get(sessionId);
|
|
16
|
+
}
|
|
17
|
+
function createSubagentCancellation(options) {
|
|
18
|
+
let stopping;
|
|
19
|
+
return {
|
|
20
|
+
hasActiveRuns: () => options.isCurrent() && (options.pendingLaunches.size > 0 || options.getActiveRunIds().length > 0),
|
|
21
|
+
stop() {
|
|
22
|
+
return stopping || (stopping = (async () => {
|
|
23
|
+
if (await Promise.allSettled([...options.pendingLaunches]), !options.isCurrent())
|
|
24
|
+
return { requested: 0, failed: 0 };
|
|
25
|
+
let results = await Promise.allSettled(options.getActiveRunIds().map((id) => options.stopRun(id)));
|
|
26
|
+
return {
|
|
27
|
+
requested: results.filter((result) => result.status === "fulfilled" && result.value).length,
|
|
28
|
+
failed: results.filter((result) => result.status === "rejected" || !result.value).length
|
|
29
|
+
};
|
|
30
|
+
})().finally(() => {
|
|
31
|
+
stopping = void 0;
|
|
32
|
+
}), stopping);
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
var SubagentEscapeSequence = class {
|
|
37
|
+
sessionId;
|
|
38
|
+
firstPress;
|
|
39
|
+
press(sessionId, active, now = Date.now()) {
|
|
40
|
+
if (!active) {
|
|
41
|
+
this.firstPress = void 0, this.sessionId = void 0;
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
let second = this.sessionId === sessionId && this.firstPress !== void 0 && now - this.firstPress < 500;
|
|
45
|
+
return this.sessionId = sessionId, this.firstPress = second ? void 0 : now, second ? "children" : "parent";
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
// packages/coding-agent/dist/core/subagent-spinner.js
|
|
50
|
+
function getSubagentSpinnerDefinition(name) {
|
|
51
|
+
return spinners[name];
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export {
|
|
55
|
+
registerSubagentCancellation,
|
|
56
|
+
getSubagentCancellation,
|
|
57
|
+
createSubagentCancellation,
|
|
58
|
+
SubagentEscapeSequence,
|
|
59
|
+
getSubagentSpinnerDefinition
|
|
60
|
+
};
|