@ashx-j/lunr-dev 0.2.19-dev.10.1 → 0.2.21-dev.12.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +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-computer-use.d.ts.map +1 -1
- package/dist/builtin-extensions/lunr-computer-use.js +15 -14
- package/dist/builtin-extensions/lunr-computer-use.js.map +1 -1
- package/dist/builtin-extensions/lunr-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/computer-use/image.d.ts +26 -0
- package/dist/core/computer-use/image.d.ts.map +1 -0
- package/dist/core/computer-use/image.js +64 -0
- package/dist/core/computer-use/image.js.map +1 -0
- package/dist/core/computer-use/policy.d.ts.map +1 -1
- package/dist/core/computer-use/policy.js +2 -6
- package/dist/core/computer-use/policy.js.map +1 -1
- package/dist/core/computer-use/schemas.d.ts +13 -10
- package/dist/core/computer-use/schemas.d.ts.map +1 -1
- package/dist/core/computer-use/schemas.js +26 -35
- package/dist/core/computer-use/schemas.js.map +1 -1
- package/dist/core/computer-use/workflow.d.ts +16 -8
- package/dist/core/computer-use/workflow.d.ts.map +1 -1
- package/dist/core/computer-use/workflow.js +271 -260
- package/dist/core/computer-use/workflow.js.map +1 -1
- package/dist/core/customize.d.ts +2 -0
- package/dist/core/customize.d.ts.map +1 -1
- package/dist/core/customize.js +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-RSGP5GDN.js → agent-session-services-QANFGM2V.js} +14 -13
- package/dist/node-runtime/{builtin-extensions-7STLFW3A.js → builtin-extensions-SRCYQPZ6.js} +4 -3
- package/dist/node-runtime/{chunk-5OLJGVCB.js → chunk-3ONQTOMR.js} +2 -2
- package/dist/node-runtime/chunk-5ZH3ZFIZ.js +308 -0
- package/dist/node-runtime/{chunk-4SJWFTUP.js → chunk-7NBZ5P7I.js} +1 -1
- package/dist/node-runtime/chunk-A3KMVBZV.js +60 -0
- package/dist/node-runtime/{chunk-FLYMHKCS.js → chunk-BJ6H7DPI.js} +25 -25
- package/dist/node-runtime/{chunk-T5GM5BFH.js → chunk-BYQ2MOFI.js} +6 -6
- package/dist/node-runtime/{chunk-W7S2REEG.js → chunk-CZUBYPFP.js} +157 -74
- package/dist/node-runtime/{chunk-ZRDIMBEQ.js → chunk-D466UAID.js} +9 -6
- package/dist/node-runtime/{chunk-K72NVGUB.js → chunk-GT5F3OKM.js} +1 -1
- package/dist/node-runtime/chunk-H2BI7G7T.js +73 -0
- package/dist/node-runtime/{chunk-ISQDQIZN.js → chunk-HXJS2PJM.js} +2 -2
- package/dist/node-runtime/chunk-LISUTZS3.js +19 -0
- package/dist/node-runtime/{chunk-BKAZ6BKX.js → chunk-LOYUC2ID.js} +7 -7
- package/dist/node-runtime/{chunk-OTT6JMPU.js → chunk-LTYWTR3V.js} +1 -369
- package/dist/node-runtime/{chunk-5Q45AVQG.js → chunk-MW2XJZIK.js} +1 -1
- package/dist/node-runtime/{chunk-MUMMMTW4.js → chunk-N3PNL74S.js} +536 -265
- package/dist/node-runtime/{chunk-HQCKFM2O.js → chunk-VGYZ3APQ.js} +3 -0
- package/dist/node-runtime/{chunk-5NWQCSKR.js → chunk-VQ4UBWSA.js} +11 -1
- package/dist/node-runtime/{chunk-6SPPH4FY.js → chunk-VTGEKB7R.js} +4 -4
- package/dist/node-runtime/chunk-W3SILANP.js +24 -0
- package/dist/node-runtime/{chunk-J7QGQD45.js → chunk-WJVFOIB5.js} +1 -1
- package/dist/node-runtime/{chunk-JT6YCS5B.js → chunk-XAUQOKYK.js} +408 -45
- package/dist/node-runtime/{chunk-LCACDWHJ.js → chunk-XSRCAQK2.js} +13 -13
- package/dist/node-runtime/{chunk-TAP7QTUT.js → chunk-ZOIIMEN6.js} +24 -425
- package/dist/node-runtime/{chunk-MGSB2C3M.js → chunk-ZVSORYRM.js} +1 -1
- package/dist/node-runtime/{command-6UXQ6XZN.js → command-ZURZJDXF.js} +1 -1
- package/dist/node-runtime/{commands-LGR5VT5X.js → commands-BZGSLIP7.js} +3 -3
- package/dist/node-runtime/{customize-XEXL2DGQ.js → customize-LF5VST47.js} +1 -1
- package/dist/node-runtime/{direct-tool-executor-TDJS7TBD.js → direct-tool-executor-BSZDHIYR.js} +4 -4
- package/dist/node-runtime/{extract-IUCVZCWC.js → extract-XLQSJN4V.js} +2 -2
- package/dist/node-runtime/{gateway-3OLC4GQN.js → gateway-FWHRIBK5.js} +9 -9
- package/dist/node-runtime/{gemini-search-NCIDF7NE.js → gemini-search-U7SUMPQA.js} +1 -1
- package/dist/node-runtime/{gemini-url-context-OKIN7AIP.js → gemini-url-context-PXWCBQHK.js} +2 -2
- package/dist/node-runtime/index.js +34 -31
- package/dist/node-runtime/{init-EKE277AG.js → init-DVJUAOUO.js} +3 -3
- package/dist/node-runtime/{interactive-mode-S5M26CQ7.js → interactive-mode-BBASNWHN.js} +18 -15
- package/dist/node-runtime/lunr-computer-use-TJNDAMWM.js +135 -0
- package/dist/node-runtime/{lunr-cron-KKBOGAEF.js → lunr-cron-J64I72C6.js} +5 -5
- package/dist/node-runtime/main.js +22 -20
- package/dist/node-runtime/{package-manager-cli-C4EJOO5Q.js → package-manager-cli-VMYX4Y2S.js} +8 -7
- package/dist/node-runtime/{pi-intercom-EEMBGQID.js → pi-intercom-NV2LW6X7.js} +108 -87
- package/dist/node-runtime/{pi-mcp-adapter-DPTJGAAL.js → pi-mcp-adapter-JLB5YL2F.js} +6 -6
- package/dist/node-runtime/{pi-subagents-VKCLYIBY.js → pi-subagents-WEHV3W7H.js} +1267 -604
- package/dist/node-runtime/{pi-web-access-BV6DSZOP.js → pi-web-access-FN5YC5T6.js} +5 -5
- package/dist/node-runtime/{proxy-modes-R64LU6WZ.js → proxy-modes-OR7ISBXK.js} +7 -7
- package/dist/node-runtime/rpc-entry.js +22 -20
- package/dist/node-runtime/{runtime-bridges-UJ5WJJLN.js → runtime-bridges-2VQTLPOZ.js} +3 -5
- package/dist/node-runtime/{settings-manager-K6IPIQTI.js → settings-manager-3CCU326G.js} +3 -2
- package/dist/node-runtime/{subagent-executor-EFLTO32A.js → subagent-executor-CXKXQDHH.js} +186 -299
- package/dist/node-runtime/{update-cli-I6OVDRPL.js → update-cli-NM7B4CKL.js} +3 -2
- package/dist/node-runtime/{video-extract-ETA5RA7U.js → video-extract-OYT5WKS5.js} +2 -2
- package/dist/node-runtime/workflow-C26QCUTW.js +468 -0
- package/dist/node-runtime/{youtube-extract-SRVGNN26.js → youtube-extract-TQYKGFGS.js} +2 -2
- package/docs/computer-use.md +233 -268
- 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/install-lock/package-lock.json +24 -24
- package/install-lock/package.json +2 -2
- package/npm-shrinkwrap.json +21 -21
- package/package.json +7 -7
- 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-EH2LJQPM.js +0 -64
- package/dist/node-runtime/image-resize-6ZPBFMWW.js +0 -11
- package/dist/node-runtime/lunr-computer-use-4X3KUNF4.js +0 -206
- package/dist/node-runtime/workflow-SA34S4VX.js +0 -325
- package/dist/node-runtime/{chunk-EHMBW7FA.js → chunk-VSELYKWU.js} +3 -3
- package/dist/node-runtime/{chunk-ZSEZY3II.js → chunk-VTPM5V35.js} +0 -0
- package/dist/node-runtime/{src-GPFAU3N6.js → src-BPQFJR76.js} +3 -3
|
@@ -1,8 +1,4 @@
|
|
|
1
1
|
import { createRequire as __lunrRequire } from "node:module"; const require = __lunrRequire(import.meta.url);
|
|
2
|
-
import {
|
|
3
|
-
CONFIG_DIR_NAME,
|
|
4
|
-
getAgentDir
|
|
5
|
-
} from "./chunk-PCIGF2XK.js";
|
|
6
2
|
|
|
7
3
|
// packages/coding-agent/dist/core/usage-adapters/shared.js
|
|
8
4
|
async function fetchWithTimeout(url, init, timeoutMs = 1e4) {
|
|
@@ -435,373 +431,9 @@ function getUsageServiceBridge() {
|
|
|
435
431
|
return globalThis[USAGE_SERVICE_BRIDGE_SYMBOL];
|
|
436
432
|
}
|
|
437
433
|
|
|
438
|
-
// packages/coding-agent/dist/core/rollback.js
|
|
439
|
-
import { spawnSync } from "node:child_process";
|
|
440
|
-
import { createHash } from "node:crypto";
|
|
441
|
-
import { cpSync, existsSync, mkdirSync, readdirSync, readFileSync, renameSync, rmSync, unlinkSync, writeFileSync } from "node:fs";
|
|
442
|
-
import { homedir } from "node:os";
|
|
443
|
-
import { dirname, join, normalize, resolve } from "node:path";
|
|
444
|
-
var ROLLBACK_BASE = join(homedir(), ".lunr", "rollback"), contexts = /* @__PURE__ */ new Map(), lastSessionId, globalSettingsManager, warningHandler;
|
|
445
|
-
function setRollbackWarningHandler(handler) {
|
|
446
|
-
warningHandler = handler;
|
|
447
|
-
}
|
|
448
|
-
function createContext(sessionId) {
|
|
449
|
-
return {
|
|
450
|
-
sessionId,
|
|
451
|
-
settingsManager: globalSettingsManager,
|
|
452
|
-
sessionForceEnabled: !1,
|
|
453
|
-
turns: [],
|
|
454
|
-
currentTurnIndex: -1,
|
|
455
|
-
repoWarningShown: !1,
|
|
456
|
-
externalModWarningShown: !1
|
|
457
|
-
};
|
|
458
|
-
}
|
|
459
|
-
function getContext(sessionId) {
|
|
460
|
-
let sid = sessionId ?? lastSessionId ?? "default", ctx = contexts.get(sid);
|
|
461
|
-
return ctx || (ctx = createContext(sid), contexts.set(sid, ctx)), ctx;
|
|
462
|
-
}
|
|
463
|
-
function initRollback(sm, sid) {
|
|
464
|
-
globalSettingsManager = sm, lastSessionId = sid, contexts.set(sid, createContext(sid));
|
|
465
|
-
let ctx = contexts.get(sid);
|
|
466
|
-
ctx.settingsManager = sm, loadPersistedTurns(ctx);
|
|
467
|
-
}
|
|
468
|
-
function isRollbackEnabled(sessionId) {
|
|
469
|
-
let ctx = getContext(sessionId);
|
|
470
|
-
return (ctx.settingsManager?.getRollbackEnabled() ?? !1) || ctx.sessionForceEnabled;
|
|
471
|
-
}
|
|
472
|
-
function isRollbackSessionForceEnabled(sessionId) {
|
|
473
|
-
return getContext(sessionId).sessionForceEnabled;
|
|
474
|
-
}
|
|
475
|
-
function enableRollbackForSession(sessionId) {
|
|
476
|
-
getContext(sessionId).sessionForceEnabled = !0;
|
|
477
|
-
}
|
|
478
|
-
function disableRollbackForSession(sessionId) {
|
|
479
|
-
getContext(sessionId).sessionForceEnabled = !1;
|
|
480
|
-
}
|
|
481
|
-
function pruneTurns(ctx) {
|
|
482
|
-
let maxTurns = ctx.settingsManager?.getRollbackTurns() ?? 2;
|
|
483
|
-
for (; ctx.turns.length > maxTurns; ) {
|
|
484
|
-
let old = ctx.turns.shift();
|
|
485
|
-
old && cleanupTurnFiles(ctx, old);
|
|
486
|
-
}
|
|
487
|
-
}
|
|
488
|
-
function beginTurn(cwd, sessionId) {
|
|
489
|
-
let ctx = getContext(sessionId);
|
|
490
|
-
if (!isRollbackEnabled(ctx.sessionId))
|
|
491
|
-
return;
|
|
492
|
-
cwd && (ctx.lastCwd = cwd), ctx.currentTurnIndex++;
|
|
493
|
-
let turn = { turnIndex: ctx.currentTurnIndex, cwd, files: /* @__PURE__ */ new Map() };
|
|
494
|
-
ctx.turns.push(turn), pruneTurns(ctx), cwd && ctx.settingsManager?.getRollbackScope() === "tree" && captureTreeBaseline(ctx, cwd);
|
|
495
|
-
}
|
|
496
|
-
function rollbackSnapshotBeforeWrite(absPath, sessionId) {
|
|
497
|
-
let ctx = getContext(sessionId);
|
|
498
|
-
if (!isRollbackEnabled(ctx.sessionId))
|
|
499
|
-
return;
|
|
500
|
-
(ctx.currentTurnIndex < 0 || ctx.turns.length === 0) && beginTurn(ctx.lastCwd, ctx.sessionId);
|
|
501
|
-
let turn = ctx.turns[ctx.turns.length - 1];
|
|
502
|
-
if (turn && !turn.files.has(absPath))
|
|
503
|
-
try {
|
|
504
|
-
let existed = existsSync(absPath), content;
|
|
505
|
-
existed && (content = readFileSync(absPath)), turn.files.set(absPath, {
|
|
506
|
-
existed,
|
|
507
|
-
content,
|
|
508
|
-
createdByTool: !0
|
|
509
|
-
}), persistSnapshot(ctx, turn, absPath);
|
|
510
|
-
} catch {
|
|
511
|
-
}
|
|
512
|
-
}
|
|
513
|
-
function captureTreeBaseline(ctx, cwd) {
|
|
514
|
-
let turn = ctx.turns[ctx.turns.length - 1];
|
|
515
|
-
if (!turn)
|
|
516
|
-
return;
|
|
517
|
-
let entries = gitPorcelain(ctx, cwd);
|
|
518
|
-
if (entries)
|
|
519
|
-
for (let { path } of entries) {
|
|
520
|
-
if (!path)
|
|
521
|
-
continue;
|
|
522
|
-
let abs = join(cwd, path);
|
|
523
|
-
if (!turn.files.has(abs))
|
|
524
|
-
try {
|
|
525
|
-
let existed = existsSync(abs);
|
|
526
|
-
turn.files.set(abs, {
|
|
527
|
-
existed,
|
|
528
|
-
content: existed ? readFileSync(abs) : void 0,
|
|
529
|
-
createdByTool: !1
|
|
530
|
-
}), persistSnapshot(ctx, turn, abs);
|
|
531
|
-
} catch {
|
|
532
|
-
}
|
|
533
|
-
}
|
|
534
|
-
}
|
|
535
|
-
function captureTreeChanges(cwd, sessionId) {
|
|
536
|
-
let ctx = getContext(sessionId);
|
|
537
|
-
if (!isRollbackEnabled(ctx.sessionId) || ctx.settingsManager?.getRollbackScope() !== "tree" || ctx.currentTurnIndex < 0 || ctx.turns.length === 0)
|
|
538
|
-
return;
|
|
539
|
-
let turn = ctx.turns[ctx.turns.length - 1];
|
|
540
|
-
if (!turn)
|
|
541
|
-
return;
|
|
542
|
-
let entries = gitPorcelain(ctx, cwd);
|
|
543
|
-
if (entries)
|
|
544
|
-
for (let { status, path, source } of entries) {
|
|
545
|
-
if (!path)
|
|
546
|
-
continue;
|
|
547
|
-
let abs = join(cwd, path);
|
|
548
|
-
if (!turn.files.has(abs))
|
|
549
|
-
try {
|
|
550
|
-
if (status === "??" || status.includes("R")) {
|
|
551
|
-
if (turn.files.set(abs, { existed: !1, createdByTool: !1 }), persistSnapshot(ctx, turn, abs), status.includes("R") && source) {
|
|
552
|
-
let sourceAbs = join(cwd, source);
|
|
553
|
-
if (!turn.files.has(sourceAbs)) {
|
|
554
|
-
let headSrc = spawnSync("git", ["show", `HEAD:${source}`], {
|
|
555
|
-
cwd,
|
|
556
|
-
timeout: 5e3,
|
|
557
|
-
maxBuffer: 33554432
|
|
558
|
-
});
|
|
559
|
-
!headSrc.error && headSrc.status === 0 && headSrc.stdout && (turn.files.set(sourceAbs, {
|
|
560
|
-
existed: !0,
|
|
561
|
-
content: headSrc.stdout,
|
|
562
|
-
createdByTool: !1
|
|
563
|
-
}), persistSnapshot(ctx, turn, sourceAbs));
|
|
564
|
-
}
|
|
565
|
-
}
|
|
566
|
-
} else {
|
|
567
|
-
let head = spawnSync("git", ["show", `HEAD:${path}`], {
|
|
568
|
-
cwd,
|
|
569
|
-
timeout: 5e3,
|
|
570
|
-
maxBuffer: 33554432
|
|
571
|
-
});
|
|
572
|
-
if (head.error || head.status !== 0 || !head.stdout)
|
|
573
|
-
continue;
|
|
574
|
-
turn.files.set(abs, {
|
|
575
|
-
existed: !0,
|
|
576
|
-
content: head.stdout,
|
|
577
|
-
createdByTool: !1
|
|
578
|
-
}), persistSnapshot(ctx, turn, abs);
|
|
579
|
-
}
|
|
580
|
-
} catch {
|
|
581
|
-
}
|
|
582
|
-
}
|
|
583
|
-
}
|
|
584
|
-
function gitPorcelain(ctx, cwd) {
|
|
585
|
-
try {
|
|
586
|
-
let result = spawnSync("git", ["status", "--porcelain", "-z"], { cwd, encoding: "utf8", timeout: 5e3 });
|
|
587
|
-
if (result.error || result.status !== 0) {
|
|
588
|
-
warnOnce(ctx, "Rollback tree scope: not a git repository (or git failed) \u2014 bash side-effects won't be captured.");
|
|
589
|
-
return;
|
|
590
|
-
}
|
|
591
|
-
let fields = (result.stdout ?? "").split("\0").filter((f) => f.length > 0), entries = [];
|
|
592
|
-
for (let i = 0; i < fields.length; i++) {
|
|
593
|
-
let field = fields[i], status = field.slice(0, 2), path = field.slice(3), source;
|
|
594
|
-
(status.includes("R") || status.includes("C")) && (source = fields[i + 1], i++), entries.push({ status, path, source });
|
|
595
|
-
}
|
|
596
|
-
return entries;
|
|
597
|
-
} catch {
|
|
598
|
-
warnOnce(ctx, "Rollback tree scope: not a git repository (or git failed) \u2014 bash side-effects won't be captured.");
|
|
599
|
-
return;
|
|
600
|
-
}
|
|
601
|
-
}
|
|
602
|
-
function warnOnce(ctx, message) {
|
|
603
|
-
if (!ctx.repoWarningShown) {
|
|
604
|
-
ctx.repoWarningShown = !0;
|
|
605
|
-
try {
|
|
606
|
-
warningHandler?.(message);
|
|
607
|
-
} catch {
|
|
608
|
-
}
|
|
609
|
-
}
|
|
610
|
-
}
|
|
611
|
-
function persistSnapshot(ctx, turn, absPath) {
|
|
612
|
-
try {
|
|
613
|
-
let snap = turn.files.get(absPath);
|
|
614
|
-
if (!snap)
|
|
615
|
-
return;
|
|
616
|
-
let turnDir = getTurnDir(ctx, turn.turnIndex);
|
|
617
|
-
mkdirSync(turnDir, { recursive: !0 });
|
|
618
|
-
let manifestPath = join(turnDir, "manifest.json"), manifest = readManifest(manifestPath), entry = { existed: snap.existed, createdByTool: snap.createdByTool };
|
|
619
|
-
if (snap.content) {
|
|
620
|
-
let snapFile = snapFileName(absPath);
|
|
621
|
-
writeFileSync(join(turnDir, snapFile), snap.content), entry.snapFile = snapFile;
|
|
622
|
-
}
|
|
623
|
-
manifest.files[absPath] = entry, turn.cwd && (manifest.cwd = turn.cwd), writeFileSync(manifestPath, JSON.stringify(manifest, null, 2));
|
|
624
|
-
} catch {
|
|
625
|
-
}
|
|
626
|
-
}
|
|
627
|
-
function readManifest(path) {
|
|
628
|
-
if (!existsSync(path))
|
|
629
|
-
return { files: {} };
|
|
630
|
-
try {
|
|
631
|
-
let parsed = JSON.parse(readFileSync(path, "utf-8"));
|
|
632
|
-
if (parsed && typeof parsed == "object" && !Array.isArray(parsed)) {
|
|
633
|
-
let files = parsed.files;
|
|
634
|
-
return {
|
|
635
|
-
cwd: typeof parsed.cwd == "string" ? parsed.cwd : void 0,
|
|
636
|
-
files: files && typeof files == "object" && !Array.isArray(files) ? files : {}
|
|
637
|
-
};
|
|
638
|
-
}
|
|
639
|
-
return { files: {} };
|
|
640
|
-
} catch {
|
|
641
|
-
return { files: {} };
|
|
642
|
-
}
|
|
643
|
-
}
|
|
644
|
-
function loadPersistedTurns(ctx) {
|
|
645
|
-
try {
|
|
646
|
-
let sessionDir = join(ROLLBACK_BASE, ctx.sessionId);
|
|
647
|
-
if (!existsSync(sessionDir))
|
|
648
|
-
return;
|
|
649
|
-
let loaded = [];
|
|
650
|
-
for (let dirName of readdirSync(sessionDir)) {
|
|
651
|
-
let match = /^turn-(\d+)$/.exec(dirName);
|
|
652
|
-
if (!match)
|
|
653
|
-
continue;
|
|
654
|
-
let turnIndex = Number(match[1]), turnDir = join(sessionDir, dirName), manifest = readManifest(join(turnDir, "manifest.json")), files = /* @__PURE__ */ new Map();
|
|
655
|
-
for (let [absPath, meta] of Object.entries(manifest.files)) {
|
|
656
|
-
let content;
|
|
657
|
-
if (meta.snapFile)
|
|
658
|
-
try {
|
|
659
|
-
content = readFileSync(join(turnDir, meta.snapFile));
|
|
660
|
-
} catch {
|
|
661
|
-
content = void 0;
|
|
662
|
-
}
|
|
663
|
-
files.set(absPath, { existed: meta.existed, content, createdByTool: meta.createdByTool });
|
|
664
|
-
}
|
|
665
|
-
loaded.push({ turnIndex, cwd: manifest.cwd, files });
|
|
666
|
-
}
|
|
667
|
-
loaded.sort((a, b) => a.turnIndex - b.turnIndex), ctx.turns = loaded, ctx.currentTurnIndex = loaded.length > 0 ? loaded[loaded.length - 1].turnIndex : -1, pruneTurns(ctx);
|
|
668
|
-
} catch {
|
|
669
|
-
}
|
|
670
|
-
}
|
|
671
|
-
function getTurnDir(ctx, turnIndex) {
|
|
672
|
-
return join(ROLLBACK_BASE, ctx.sessionId, `turn-${turnIndex}`);
|
|
673
|
-
}
|
|
674
|
-
function cleanupTurnFiles(ctx, turn) {
|
|
675
|
-
try {
|
|
676
|
-
let dir = getTurnDir(ctx, turn.turnIndex);
|
|
677
|
-
existsSync(dir) && rmSync(dir, { recursive: !0, force: !0 });
|
|
678
|
-
} catch {
|
|
679
|
-
}
|
|
680
|
-
}
|
|
681
|
-
function isPathUnderRoot(absPath, root) {
|
|
682
|
-
let normRoot = normalize(root).replace(/\\$/g, ""), normPath = normalize(absPath).replace(/\\$/g, "");
|
|
683
|
-
return process.platform === "win32" && (normRoot = normRoot.toLowerCase(), normPath = normPath.toLowerCase()), normPath === normRoot || normPath.startsWith(`${normRoot}/`) || normPath.startsWith(`${normRoot}\\`);
|
|
684
|
-
}
|
|
685
|
-
function isWithinAllowedRoots(absPath, turn) {
|
|
686
|
-
return turn.cwd ? [
|
|
687
|
-
ROLLBACK_BASE,
|
|
688
|
-
join(homedir(), CONFIG_DIR_NAME),
|
|
689
|
-
// lunr: agent settings / cron jobs.json live under the config dir
|
|
690
|
-
// lunr: simple-memory lives next to the lunr agent dir (~/.lunr/simple-memory)
|
|
691
|
-
join(dirname(getAgentDir()), "simple-memory"),
|
|
692
|
-
resolve(turn.cwd)
|
|
693
|
-
].some((root) => isPathUnderRoot(absPath, root)) : !0;
|
|
694
|
-
}
|
|
695
|
-
function warnExternalModification(ctx, message) {
|
|
696
|
-
if (!(ctx.externalModWarningShown || !warningHandler)) {
|
|
697
|
-
ctx.externalModWarningShown = !0;
|
|
698
|
-
try {
|
|
699
|
-
warningHandler(message);
|
|
700
|
-
} catch {
|
|
701
|
-
}
|
|
702
|
-
}
|
|
703
|
-
}
|
|
704
|
-
function peekRollbackTurnsConsumed(sessionId) {
|
|
705
|
-
let ctx = getContext(sessionId);
|
|
706
|
-
if (!isRollbackEnabled(ctx.sessionId) || ctx.turns.length === 0)
|
|
707
|
-
return 0;
|
|
708
|
-
let consumed = 0;
|
|
709
|
-
for (let i = ctx.turns.length - 1; i >= 0 && (consumed++, !(ctx.turns[i].files.size > 0)); i--)
|
|
710
|
-
;
|
|
711
|
-
return consumed;
|
|
712
|
-
}
|
|
713
|
-
function rollbackLastTurn(sessionId) {
|
|
714
|
-
let ctx = getContext(sessionId), empty = { restored: [], deleted: [], turnsConsumed: 0 };
|
|
715
|
-
if (!isRollbackEnabled(ctx.sessionId))
|
|
716
|
-
return empty;
|
|
717
|
-
let turnsConsumed = 0;
|
|
718
|
-
for (; ctx.turns.length > 0 && ctx.turns[ctx.turns.length - 1].files.size === 0; ) {
|
|
719
|
-
let skipped = ctx.turns.pop();
|
|
720
|
-
skipped && (cleanupTurnFiles(ctx, skipped), turnsConsumed++);
|
|
721
|
-
}
|
|
722
|
-
if (ctx.turns.length === 0)
|
|
723
|
-
return empty;
|
|
724
|
-
turnsConsumed++;
|
|
725
|
-
let turn = ctx.turns[ctx.turns.length - 1], capture = ctx.settingsManager?.getRollbackCapture() ?? "copies", restored = [], deleted = [];
|
|
726
|
-
for (let [absPath, snap] of turn.files)
|
|
727
|
-
try {
|
|
728
|
-
if (!isWithinAllowedRoots(absPath, turn)) {
|
|
729
|
-
warnExternalModification(ctx, `Rollback skipped ${absPath}: outside the session working directory or lunR config dir.`);
|
|
730
|
-
continue;
|
|
731
|
-
}
|
|
732
|
-
if (snap.existed && snap.content) {
|
|
733
|
-
if (!snap.createdByTool && existsSync(absPath) && readFileSync(absPath).equals(snap.content))
|
|
734
|
-
continue;
|
|
735
|
-
mkdirSync(dirname(absPath), { recursive: !0 }), writeFileSync(absPath, snap.content), restored.push(absPath);
|
|
736
|
-
} else snap.existed || (snap.createdByTool || capture === "hybrid" || capture === "shadow-git") && existsSync(absPath) && (unlinkSync(absPath), deleted.push(absPath));
|
|
737
|
-
} catch {
|
|
738
|
-
}
|
|
739
|
-
return cleanupTurnFiles(ctx, turn), ctx.turns.pop(), { restored, deleted, turnsConsumed };
|
|
740
|
-
}
|
|
741
|
-
function migrateRollbackSession(oldSessionId, newSessionId) {
|
|
742
|
-
if (oldSessionId === newSessionId)
|
|
743
|
-
return;
|
|
744
|
-
let ctx = contexts.get(oldSessionId);
|
|
745
|
-
ctx && (contexts.delete(oldSessionId), ctx.sessionId = newSessionId, contexts.set(newSessionId, ctx));
|
|
746
|
-
try {
|
|
747
|
-
let oldDir = join(ROLLBACK_BASE, oldSessionId), newDir = join(ROLLBACK_BASE, newSessionId);
|
|
748
|
-
if (existsSync(oldDir)) {
|
|
749
|
-
existsSync(newDir) && rmSync(newDir, { recursive: !0, force: !0 });
|
|
750
|
-
try {
|
|
751
|
-
renameSync(oldDir, newDir);
|
|
752
|
-
} catch {
|
|
753
|
-
cpSync(oldDir, newDir, { recursive: !0 }), rmSync(oldDir, { recursive: !0, force: !0 });
|
|
754
|
-
}
|
|
755
|
-
}
|
|
756
|
-
} catch {
|
|
757
|
-
}
|
|
758
|
-
}
|
|
759
|
-
function clearRollback(sessionId) {
|
|
760
|
-
if (sessionId === void 0) {
|
|
761
|
-
for (let ctx2 of contexts.values()) {
|
|
762
|
-
for (let turn of ctx2.turns)
|
|
763
|
-
cleanupTurnFiles(ctx2, turn);
|
|
764
|
-
try {
|
|
765
|
-
let sessionDir = join(ROLLBACK_BASE, ctx2.sessionId);
|
|
766
|
-
existsSync(sessionDir) && rmSync(sessionDir, { recursive: !0, force: !0 });
|
|
767
|
-
} catch {
|
|
768
|
-
}
|
|
769
|
-
}
|
|
770
|
-
contexts.clear();
|
|
771
|
-
return;
|
|
772
|
-
}
|
|
773
|
-
let ctx = contexts.get(sessionId);
|
|
774
|
-
if (ctx) {
|
|
775
|
-
for (let turn of ctx.turns)
|
|
776
|
-
cleanupTurnFiles(ctx, turn);
|
|
777
|
-
try {
|
|
778
|
-
let sessionDir = join(ROLLBACK_BASE, sessionId);
|
|
779
|
-
existsSync(sessionDir) && rmSync(sessionDir, { recursive: !0, force: !0 });
|
|
780
|
-
} catch {
|
|
781
|
-
}
|
|
782
|
-
contexts.delete(sessionId);
|
|
783
|
-
}
|
|
784
|
-
}
|
|
785
|
-
function snapFileName(absPath) {
|
|
786
|
-
return `${createHash("sha1").update(absPath).digest("hex")}.snap`;
|
|
787
|
-
}
|
|
788
|
-
|
|
789
434
|
export {
|
|
790
435
|
getAllPlanUsageResults,
|
|
791
436
|
clearPlanUsageCache,
|
|
792
437
|
registerUsageServiceBridge,
|
|
793
|
-
getUsageServiceBridge
|
|
794
|
-
setRollbackWarningHandler,
|
|
795
|
-
initRollback,
|
|
796
|
-
isRollbackEnabled,
|
|
797
|
-
isRollbackSessionForceEnabled,
|
|
798
|
-
enableRollbackForSession,
|
|
799
|
-
disableRollbackForSession,
|
|
800
|
-
beginTurn,
|
|
801
|
-
rollbackSnapshotBeforeWrite,
|
|
802
|
-
captureTreeChanges,
|
|
803
|
-
peekRollbackTurnsConsumed,
|
|
804
|
-
rollbackLastTurn,
|
|
805
|
-
migrateRollbackSession,
|
|
806
|
-
clearRollback
|
|
438
|
+
getUsageServiceBridge
|
|
807
439
|
};
|