@e4779/pi-fabric 0.131.4-fork.33 → 0.138.1-fork.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/README.md +8 -0
- package/dist/actors/context.d.ts.map +1 -1
- package/dist/agents/clone-first-worktree.d.ts +2 -0
- package/dist/agents/clone-first-worktree.d.ts.map +1 -1
- package/dist/agents/completion-inbox.d.ts +2 -1
- package/dist/agents/completion-inbox.d.ts.map +1 -1
- package/dist/agents/handoff.d.ts.map +1 -1
- package/dist/agents/manager.d.ts.map +1 -1
- package/dist/agents/worktree-manager.d.ts +4 -1
- package/dist/agents/worktree-manager.d.ts.map +1 -1
- package/dist/agents/worktree-paths.d.ts +8 -3
- package/dist/agents/worktree-paths.d.ts.map +1 -1
- package/dist/agents.js +6 -1
- package/dist/agents.js.map +1 -1
- package/dist/async-settlement.d.ts +1 -1
- package/dist/async-settlement.d.ts.map +1 -1
- package/dist/audit/details.d.ts.map +1 -1
- package/dist/capture/catalog.d.ts +2 -0
- package/dist/capture/catalog.d.ts.map +1 -1
- package/dist/capture/interceptor.d.ts.map +1 -1
- package/dist/chunks/{chunk-7N7IC3Z2.js → chunk-2CD7HLVP.js} +3 -84
- package/dist/chunks/chunk-2CD7HLVP.js.map +7 -0
- package/dist/chunks/{chunk-7YNE4NB2.js → chunk-2MELFQCQ.js} +2 -2
- package/dist/chunks/{chunk-HSEZPCL5.js → chunk-2OC4YJOL.js} +3 -3
- package/dist/chunks/{chunk-TXCNZCZP.js → chunk-2QJ4MNS6.js} +2 -2
- package/dist/chunks/{chunk-F6A6MQ6G.js → chunk-2WPTD6BI.js} +11 -15
- package/dist/chunks/chunk-2WPTD6BI.js.map +7 -0
- package/dist/chunks/{chunk-QOEOKW2X.js → chunk-3QH6JAE3.js} +2 -2
- package/dist/chunks/chunk-4U47NCP2.js +88 -0
- package/dist/chunks/chunk-4U47NCP2.js.map +7 -0
- package/dist/chunks/{chunk-OJ4HAALD.js → chunk-5VZEAAHD.js} +10 -9
- package/dist/chunks/chunk-5VZEAAHD.js.map +7 -0
- package/dist/chunks/{chunk-LKYLD5SN.js → chunk-6HM4TX7L.js} +10 -8
- package/dist/chunks/chunk-6HM4TX7L.js.map +7 -0
- package/dist/chunks/{chunk-L6H46CPY.js → chunk-6NNL5LOG.js} +2 -2
- package/dist/chunks/{chunk-7TB7NXSL.js → chunk-7CIQQOOD.js} +11 -3
- package/dist/chunks/{chunk-7TB7NXSL.js.map → chunk-7CIQQOOD.js.map} +2 -2
- package/dist/chunks/{chunk-RWKQ5SRW.js → chunk-7ZFPVOV2.js} +2 -2
- package/dist/chunks/{chunk-PUBHBEYO.js → chunk-B2FIGOPI.js} +2 -2
- package/dist/chunks/{chunk-HRDMBGMY.js → chunk-BLT66VHH.js} +331 -22
- package/dist/chunks/chunk-BLT66VHH.js.map +7 -0
- package/dist/chunks/{chunk-4WKD3YM3.js → chunk-C3UPHOJW.js} +3 -3
- package/dist/chunks/{chunk-G2DZJ5LK.js → chunk-CB72SLHB.js} +451 -134
- package/dist/chunks/chunk-CB72SLHB.js.map +7 -0
- package/dist/chunks/{chunk-B5L3X3ID.js → chunk-CCJ6PUZJ.js} +1 -1
- package/dist/chunks/{chunk-B5L3X3ID.js.map → chunk-CCJ6PUZJ.js.map} +1 -1
- package/dist/chunks/{chunk-FK73YJKV.js → chunk-DWM63MAJ.js} +21 -9
- package/dist/chunks/chunk-DWM63MAJ.js.map +7 -0
- package/dist/chunks/{chunk-56NMRVTV.js → chunk-FFJ7TV66.js} +32 -29
- package/dist/chunks/chunk-FFJ7TV66.js.map +7 -0
- package/dist/chunks/{chunk-LRSZFYUC.js → chunk-FUMALXYQ.js} +15 -15
- package/dist/chunks/chunk-FUMALXYQ.js.map +7 -0
- package/dist/chunks/{chunk-TJZYM2SP.js → chunk-G3RQ3HUK.js} +8 -3
- package/dist/chunks/{chunk-TJZYM2SP.js.map → chunk-G3RQ3HUK.js.map} +2 -2
- package/dist/chunks/{chunk-RAA3FAYZ.js → chunk-GNPTDN6K.js} +2 -2
- package/dist/chunks/{chunk-XFOSUGLU.js → chunk-JCGEW5OQ.js} +5 -5
- package/dist/chunks/{chunk-CXYJJ3HZ.js → chunk-LJ2MG6U2.js} +3 -3
- package/dist/chunks/{chunk-3MOY6WIB.js → chunk-LRBDEAKB.js} +3 -3
- package/dist/chunks/{chunk-2RWNVCFD.js → chunk-MPFBOVOD.js} +1 -1
- package/dist/chunks/{chunk-2RWNVCFD.js.map → chunk-MPFBOVOD.js.map} +1 -1
- package/dist/chunks/{chunk-NQ7IWEIF.js → chunk-MQGRQMVM.js} +2 -2
- package/dist/chunks/{chunk-3VK6UGAN.js → chunk-O5SHIUIL.js} +6 -1
- package/dist/chunks/chunk-O5SHIUIL.js.map +7 -0
- package/dist/chunks/{chunk-U6Y6TKJL.js → chunk-OK2EKY3M.js} +15 -11
- package/dist/chunks/chunk-OK2EKY3M.js.map +7 -0
- package/dist/chunks/{chunk-DGUXJSYA.js → chunk-OR44GYXD.js} +70 -3
- package/dist/chunks/chunk-OR44GYXD.js.map +7 -0
- package/dist/chunks/{chunk-DGERP4VL.js → chunk-P4TALNLX.js} +11 -10
- package/dist/chunks/chunk-P4TALNLX.js.map +7 -0
- package/dist/chunks/{chunk-4BYS4ZLY.js → chunk-PHGPOSCP.js} +267 -71
- package/dist/chunks/chunk-PHGPOSCP.js.map +7 -0
- package/dist/chunks/{chunk-3XT5WHSG.js → chunk-QAGEWWCJ.js} +260 -59
- package/dist/chunks/chunk-QAGEWWCJ.js.map +7 -0
- package/dist/chunks/{chunk-WKFRGICG.js → chunk-RBYRHS24.js} +2 -2
- package/dist/chunks/{chunk-ZHROHNEE.js → chunk-RFNYH7S7.js} +8 -8
- package/dist/chunks/{chunk-VGRUWTMG.js → chunk-RPZJVLML.js} +472 -466
- package/dist/chunks/chunk-RPZJVLML.js.map +7 -0
- package/dist/chunks/{chunk-H57KPL3V.js → chunk-S2JWFXW5.js} +2 -2
- package/dist/chunks/{chunk-LZ2ZXOCU.js → chunk-SSB2JN3I.js} +168 -5
- package/dist/chunks/chunk-SSB2JN3I.js.map +7 -0
- package/dist/chunks/{chunk-RKJPBTBB.js → chunk-SVQ7ZHEQ.js} +33 -16
- package/dist/chunks/chunk-SVQ7ZHEQ.js.map +7 -0
- package/dist/chunks/{chunk-MPMEK3IQ.js → chunk-TV5NCPPS.js} +6 -5
- package/dist/chunks/chunk-TV5NCPPS.js.map +7 -0
- package/dist/chunks/{chunk-XOBLUZMB.js → chunk-UIVMSMSQ.js} +10 -1
- package/dist/chunks/chunk-UIVMSMSQ.js.map +7 -0
- package/dist/chunks/{chunk-QGTD3LAZ.js → chunk-UYS5VZUU.js} +9 -3
- package/dist/chunks/chunk-UYS5VZUU.js.map +7 -0
- package/dist/chunks/{chunk-HRVYXRWZ.js → chunk-V5RZK45W.js} +37 -3
- package/dist/chunks/chunk-V5RZK45W.js.map +7 -0
- package/dist/chunks/{chunk-KIFOEBYJ.js → chunk-VEXCD3RA.js} +2 -2
- package/dist/chunks/{chunk-GS67KDMV.js → chunk-VN7AE3EY.js} +2 -2
- package/dist/chunks/{chunk-HFDJWLMS.js → chunk-WFGJUVTH.js} +106 -65
- package/dist/chunks/chunk-WFGJUVTH.js.map +7 -0
- package/dist/chunks/chunk-WMULZZER.js +196 -0
- package/dist/chunks/chunk-WMULZZER.js.map +7 -0
- package/dist/chunks/{chunk-QNMQJNXE.js → chunk-X4HDI7RT.js} +14 -4
- package/dist/chunks/chunk-X4HDI7RT.js.map +7 -0
- package/dist/chunks/{chunk-MX53BRAC.js → chunk-XBAOTA4U.js} +2 -2
- package/dist/chunks/{chunk-MSDL7U6Q.js → chunk-XQCNVH3Y.js} +4 -4
- package/dist/chunks/{chunk-4PBW54I2.js → chunk-YC6NV7FK.js} +88 -54
- package/dist/chunks/chunk-YC6NV7FK.js.map +7 -0
- package/dist/chunks/{chunk-6GWDGTHC.js → chunk-YLO62DWD.js} +4 -4
- package/dist/cli/decisions.js +2 -2
- package/dist/cli/mesh.js +3 -3
- package/dist/commands/fabric-handler.d.ts.map +1 -1
- package/dist/commands/fabric-handler.js +18 -4
- package/dist/commands/fabric-handler.js.map +2 -2
- package/dist/commands/fabric.d.ts.map +1 -1
- package/dist/compaction/branch-summary.d.ts.map +1 -1
- package/dist/compaction/claim-events.js +9 -9
- package/dist/compaction/hook.d.ts.map +1 -1
- package/dist/compaction/hook.js +6 -6
- package/dist/compaction/normalize.d.ts +9 -0
- package/dist/compaction/normalize.d.ts.map +1 -1
- package/dist/compaction/owner.js +7 -7
- package/dist/compaction/projections.d.ts +18 -2
- package/dist/compaction/projections.d.ts.map +1 -1
- package/dist/compaction/qa.d.ts +3 -2
- package/dist/compaction/qa.d.ts.map +1 -1
- package/dist/compaction/render.d.ts +3 -0
- package/dist/compaction/render.d.ts.map +1 -1
- package/dist/compaction/threshold.d.ts.map +1 -1
- package/dist/compaction/user-activity.d.ts +31 -0
- package/dist/compaction/user-activity.d.ts.map +1 -0
- package/dist/components/configuration.js +4 -4
- package/dist/config.d.ts +13 -6
- package/dist/config.d.ts.map +1 -1
- package/dist/core/action-registry.d.ts +1 -1
- package/dist/core/action-registry.d.ts.map +1 -1
- package/dist/core/action-registry.js +10 -9
- package/dist/core/approval-controller.d.ts +3 -0
- package/dist/core/approval-controller.d.ts.map +1 -1
- package/dist/core/atomic-write.d.ts +1 -0
- package/dist/core/atomic-write.d.ts.map +1 -1
- package/dist/core/attached-monitors.d.ts +39 -0
- package/dist/core/attached-monitors.d.ts.map +1 -0
- package/dist/core/control-abort.d.ts +3 -0
- package/dist/core/control-abort.d.ts.map +1 -0
- package/dist/core/crash-guard.d.ts +15 -0
- package/dist/core/crash-guard.d.ts.map +1 -0
- package/dist/core/execution-guidelines.d.ts +6 -0
- package/dist/core/execution-guidelines.d.ts.map +1 -0
- package/dist/core/guidance-delivery.d.ts +19 -0
- package/dist/core/guidance-delivery.d.ts.map +1 -0
- package/dist/core/lifecycle-settlement.d.ts +9 -0
- package/dist/core/lifecycle-settlement.d.ts.map +1 -0
- package/dist/core/observation-actions.d.ts +9 -0
- package/dist/core/observation-actions.d.ts.map +1 -0
- package/dist/core/pasted-images.d.ts +12 -0
- package/dist/core/pasted-images.d.ts.map +1 -0
- package/dist/core/pasted-images.js +139 -0
- package/dist/core/pasted-images.js.map +7 -0
- package/dist/core/permission-queue.d.ts +32 -0
- package/dist/core/permission-queue.d.ts.map +1 -0
- package/dist/core/permission-queue.js +104 -0
- package/dist/core/permission-queue.js.map +7 -0
- package/dist/core/prompt-guidance.d.ts +1 -0
- package/dist/core/prompt-guidance.d.ts.map +1 -1
- package/dist/core/prompt-guidance.js +52 -3
- package/dist/core/prompt-guidance.js.map +3 -3
- package/dist/core/provider-operations.js +1 -1
- package/dist/core/shell-inbox.d.ts +1 -1
- package/dist/core/shell-inbox.d.ts.map +1 -1
- package/dist/core/shell-jobs.d.ts +28 -1
- package/dist/core/shell-jobs.d.ts.map +1 -1
- package/dist/core/shell-monitor.d.ts +1 -0
- package/dist/core/shell-monitor.d.ts.map +1 -1
- package/dist/durable/worker.js +0 -42
- package/dist/durable/worker.js.map +3 -3
- package/dist/durable-extension.d.ts +2 -2
- package/dist/durable-extension.d.ts.map +1 -1
- package/dist/durable-extension.js +215 -1
- package/dist/durable-extension.js.map +3 -3
- package/dist/entropy/index.d.ts +2 -0
- package/dist/entropy/index.d.ts.map +1 -1
- package/dist/entropy/index.js +23 -13
- package/dist/entropy/pool-store.d.ts +8 -1
- package/dist/entropy/pool-store.d.ts.map +1 -1
- package/dist/entropy/pool-worker.d.ts +18 -0
- package/dist/entropy/pool-worker.d.ts.map +1 -0
- package/dist/entropy/pool-writer.d.ts +23 -0
- package/dist/entropy/pool-writer.d.ts.map +1 -0
- package/dist/entropy/pool.d.ts +11 -0
- package/dist/entropy/pool.d.ts.map +1 -1
- package/dist/entropy/sessions.d.ts +5 -0
- package/dist/entropy/sessions.d.ts.map +1 -1
- package/dist/execution-service.d.ts.map +1 -1
- package/dist/extension-bootstrap.d.ts.map +1 -1
- package/dist/extension-bootstrap.js +19 -19
- package/dist/extension.d.ts.map +1 -1
- package/dist/fabric-exec-tool.d.ts.map +1 -1
- package/dist/fabric-runtime-state.d.ts.map +1 -1
- package/dist/fabric-runtime-state.js +534 -261
- package/dist/fabric-runtime-state.js.map +4 -4
- package/dist/fabric-state.d.ts.map +1 -1
- package/dist/index.js +40 -30
- package/dist/index.js.map +1 -1
- package/dist/jev/client.js +2 -2
- package/dist/jev/observation.js +7 -6
- package/dist/jev.js +12 -11
- package/dist/main-agent.d.ts.map +1 -1
- package/dist/managed-host.d.ts +4 -0
- package/dist/managed-host.d.ts.map +1 -1
- package/dist/memory/discovery.js +6 -6
- package/dist/memory/expand-service.d.ts.map +1 -1
- package/dist/memory/file-worker.js +9 -8
- package/dist/memory/file-worker.js.map +1 -1
- package/dist/memory/history-paging.d.ts +9 -0
- package/dist/memory/history-paging.d.ts.map +1 -0
- package/dist/memory/history-paging.js +164 -0
- package/dist/memory/history-paging.js.map +7 -0
- package/dist/memory/index.d.ts.map +1 -1
- package/dist/memory/normalize.js +5 -5
- package/dist/memory/outline-service.d.ts +7 -0
- package/dist/memory/outline-service.d.ts.map +1 -0
- package/dist/memory/request-cache.d.ts +3 -1
- package/dist/memory/request-cache.d.ts.map +1 -1
- package/dist/memory/request-context.d.ts +1 -0
- package/dist/memory/request-context.d.ts.map +1 -1
- package/dist/memory/request-limits.d.ts +2 -0
- package/dist/memory/request-limits.d.ts.map +1 -1
- package/dist/memory/search.js +7 -6
- package/dist/memory/worker-provider.d.ts.map +1 -1
- package/dist/memory/worker-provider.js +10 -9
- package/dist/memory.d.ts +16 -1
- package/dist/memory.d.ts.map +1 -1
- package/dist/memory.js +64 -12
- package/dist/memory.js.map +1 -1
- package/dist/mesh/store.d.ts +2 -1
- package/dist/mesh/store.d.ts.map +1 -1
- package/dist/programs/host.js +2 -2
- package/dist/protocol.d.ts +5 -0
- package/dist/protocol.d.ts.map +1 -1
- package/dist/protocol.js +1 -1
- package/dist/providers/agents-actions.d.ts.map +1 -1
- package/dist/providers/agents-message-router.d.ts +1 -0
- package/dist/providers/agents-message-router.d.ts.map +1 -1
- package/dist/providers/agents-provider.d.ts +2 -0
- package/dist/providers/agents-provider.d.ts.map +1 -1
- package/dist/providers/jev-provider.js +12 -11
- package/dist/providers/memory-provider.d.ts +4 -0
- package/dist/providers/memory-provider.d.ts.map +1 -1
- package/dist/providers/memory-provider.js +9 -8
- package/dist/providers/pi-read-operations.d.ts +24 -0
- package/dist/providers/pi-read-operations.d.ts.map +1 -0
- package/dist/providers/pi-tools-provider.d.ts +7 -0
- package/dist/providers/pi-tools-provider.d.ts.map +1 -1
- package/dist/providers/sessions-provider.d.ts +1 -1
- package/dist/providers/sessions-provider.d.ts.map +1 -1
- package/dist/providers/tasks-provider.d.ts +3 -1
- package/dist/providers/tasks-provider.d.ts.map +1 -1
- package/dist/residency/actor-client.js +3 -3
- package/dist/residency/client.d.ts.map +1 -1
- package/dist/residency/host.d.ts.map +1 -1
- package/dist/residency/host.js +17 -16
- package/dist/residency/launcher.js +1 -1
- package/dist/residency/pi-entry.js +17 -16
- package/dist/residency/pi-entry.js.map +1 -1
- package/dist/residency/protocol.d.ts +2 -0
- package/dist/residency/protocol.d.ts.map +1 -1
- package/dist/runtime/core-override-guest-types.js +2 -2
- package/dist/runtime/cpython-runtime.d.ts.map +1 -1
- package/dist/runtime/cpython-runtime.js +7 -6
- package/dist/runtime/cpython-runtime.js.map +2 -2
- package/dist/runtime/guest-types.d.ts +1 -1
- package/dist/runtime/guest-types.d.ts.map +1 -1
- package/dist/runtime/guest-types.js +1 -1
- package/dist/runtime/monty-runtime.d.ts.map +1 -1
- package/dist/runtime/monty-runtime.js +7 -6
- package/dist/runtime/monty-runtime.js.map +2 -2
- package/dist/runtime/node-process-runtime.d.ts.map +1 -1
- package/dist/runtime/node-process-runtime.js +6 -6
- package/dist/runtime/quickjs-runtime.d.ts.map +1 -1
- package/dist/runtime/quickjs-runtime.js +4 -4
- package/dist/runtime/type-checker.d.ts.map +1 -1
- package/dist/runtime/type-checker.js +1 -1
- package/dist/runtime/typescript-kernel.js +10 -10
- package/dist/runtime-state-builtins.d.ts +2 -0
- package/dist/runtime-state-builtins.d.ts.map +1 -1
- package/dist/schema/policy.d.ts.map +1 -1
- package/dist/speculation/eligibility.d.ts.map +1 -1
- package/dist/speculation/store.d.ts.map +1 -1
- package/dist/topology/participant-directory.d.ts +1 -0
- package/dist/topology/participant-directory.d.ts.map +1 -1
- package/dist/topology/peer-presence.d.ts.map +1 -1
- package/dist/topology/provider-participants.d.ts +1 -0
- package/dist/topology/provider-participants.d.ts.map +1 -1
- package/dist/type-error-guidance.js +1 -1
- package/dist/ui/code-preview-shell.d.ts +1 -0
- package/dist/ui/code-preview-shell.d.ts.map +1 -1
- package/dist/ui/controller.d.ts.map +1 -1
- package/dist/ui/conversation-chrome.d.ts.map +1 -1
- package/dist/ui/conversation-chrome.js +2 -2
- package/dist/ui/conversation-feedback.d.ts +8 -0
- package/dist/ui/conversation-feedback.d.ts.map +1 -0
- package/dist/ui/conversation-latest.d.ts.map +1 -1
- package/dist/ui/conversation-native-reader.d.ts.map +1 -1
- package/dist/ui/conversation-native-reader.js +3 -3
- package/dist/ui/conversation-native-reader.js.map +2 -2
- package/dist/ui/conversation-render.d.ts.map +1 -1
- package/dist/ui/conversation.d.ts +1 -0
- package/dist/ui/conversation.d.ts.map +1 -1
- package/dist/ui/conversation.js +139 -86
- package/dist/ui/conversation.js.map +4 -4
- package/dist/ui/core-tool-render.d.ts.map +1 -1
- package/dist/ui/dashboard-fabric-graph.d.ts.map +1 -1
- package/dist/ui/dashboard.js +47 -48
- package/dist/ui/dashboard.js.map +3 -3
- package/dist/ui/fabric-render.d.ts.map +1 -1
- package/dist/ui/format.d.ts.map +1 -1
- package/dist/ui/highlight.d.ts.map +1 -1
- package/dist/ui/permissions.d.ts +18 -0
- package/dist/ui/permissions.d.ts.map +1 -0
- package/dist/ui/permissions.js +178 -0
- package/dist/ui/permissions.js.map +7 -0
- package/dist/ui/row-balance.d.ts +1 -1
- package/dist/ui/row-balance.d.ts.map +1 -1
- package/dist/ui/settings-sections-execution.d.ts.map +1 -1
- package/dist/ui/settings-values.d.ts.map +1 -1
- package/dist/ui/settings.js +37 -31
- package/dist/ui/settings.js.map +2 -2
- package/dist/ui/shell-hang-keys.d.ts.map +1 -1
- package/dist/ui/shell-tasks.d.ts.map +1 -1
- package/dist/ui/shell-tasks.js +28 -11
- package/dist/ui/shell-tasks.js.map +2 -2
- package/dist/ui/structured.d.ts.map +1 -1
- package/dist/ui/tool-display.d.ts +18 -2
- package/dist/ui/tool-display.d.ts.map +1 -1
- package/dist/ui/truncate.d.ts +3 -0
- package/dist/ui/truncate.d.ts.map +1 -0
- package/dist/ui/widget.d.ts +7 -2
- package/dist/ui/widget.d.ts.map +1 -1
- package/dist/verified/context.d.ts +35 -0
- package/dist/verified/context.d.ts.map +1 -0
- package/dist/verified/execution.d.ts +7 -0
- package/dist/verified/execution.d.ts.map +1 -0
- package/dist/verified/generated/context.d.ts +6 -0
- package/dist/verified/generated/context.js +51 -0
- package/dist/verified/generated/execution.d.ts +5 -0
- package/dist/verified/generated/execution.js +32 -0
- package/dist/verified/generated/manifest.json +34 -3
- package/dist/verified/generated/prompt-guidance.d.ts +4 -0
- package/dist/verified/generated/prompt-guidance.js +17 -0
- package/dist/worker/recovery-watchdog.d.ts +7 -0
- package/dist/worker/recovery-watchdog.d.ts.map +1 -1
- package/dist/worker/recovery-watchdog.js +66 -4
- package/dist/worker/recovery-watchdog.js.map +2 -2
- package/dist/worker.js +22 -3
- package/dist/worker.js.map +2 -2
- package/docs/agents.md +37 -4
- package/docs/architecture.md +13 -0
- package/docs/background-tasks.md +81 -5
- package/docs/benchmarks/cli-resume-2026-11-09.json +1260 -0
- package/docs/benchmarks/interactivity-2026-11-09.json +2280 -0
- package/docs/benchmarks/resume-latency-2026-11-09.json +12105 -0
- package/docs/benchmarks/resume-startup-fix-2026-11-09.json +5452 -0
- package/docs/benchmarks/session-memory-2026-11-09.json +1320 -0
- package/docs/benchmarks/session-memory-fix-2026-11-09.json +280 -0
- package/docs/compaction.md +59 -23
- package/docs/configuration.md +53 -11
- package/docs/entropy.md +4 -1
- package/docs/history-paging.md +99 -0
- package/docs/interactivity-investigation.md +109 -0
- package/docs/interface.md +2 -2
- package/docs/jev.md +1 -1
- package/docs/memory-recall.md +42 -1
- package/docs/providers.md +24 -1
- package/docs/resume-latency-investigation.md +249 -0
- package/docs/session-memory-investigation.md +223 -0
- package/docs/verified-kernels.md +56 -0
- package/package.json +211 -211
- package/proofs/context.ts +139 -0
- package/proofs/execution.ts +48 -0
- package/proofs/index.ts +6 -0
- package/proofs/prompt-guidance.ts +38 -0
- package/scripts/verified-kernels.ts +1 -1
- package/skillsets/python/fabric-council/SKILL.md +31 -21
- package/skillsets/python/fabric-exec/SKILL.md +1 -1
- package/skillsets/python/fabric-exec/references/agents.md +2 -0
- package/skillsets/python/fabric-guide/SKILL.md +1 -0
- package/skillsets/python/fabric-memory/SKILL.md +82 -0
- package/skillsets/typescript/fabric-council/SKILL.md +26 -17
- package/skillsets/typescript/fabric-exec/SKILL.md +3 -2
- package/skillsets/typescript/fabric-exec/references/agents.md +1 -0
- package/skillsets/typescript/fabric-guide/SKILL.md +1 -0
- package/skillsets/typescript/fabric-memory/SKILL.md +87 -0
- package/dist/chunks/chunk-3VK6UGAN.js.map +0 -7
- package/dist/chunks/chunk-3XT5WHSG.js.map +0 -7
- package/dist/chunks/chunk-4BYS4ZLY.js.map +0 -7
- package/dist/chunks/chunk-4PBW54I2.js.map +0 -7
- package/dist/chunks/chunk-56NMRVTV.js.map +0 -7
- package/dist/chunks/chunk-7N7IC3Z2.js.map +0 -7
- package/dist/chunks/chunk-DGERP4VL.js.map +0 -7
- package/dist/chunks/chunk-DGUXJSYA.js.map +0 -7
- package/dist/chunks/chunk-F6A6MQ6G.js.map +0 -7
- package/dist/chunks/chunk-FK73YJKV.js.map +0 -7
- package/dist/chunks/chunk-G2DZJ5LK.js.map +0 -7
- package/dist/chunks/chunk-HFDJWLMS.js.map +0 -7
- package/dist/chunks/chunk-HRDMBGMY.js.map +0 -7
- package/dist/chunks/chunk-HRVYXRWZ.js.map +0 -7
- package/dist/chunks/chunk-LKYLD5SN.js.map +0 -7
- package/dist/chunks/chunk-LRSZFYUC.js.map +0 -7
- package/dist/chunks/chunk-LZ2ZXOCU.js.map +0 -7
- package/dist/chunks/chunk-MPMEK3IQ.js.map +0 -7
- package/dist/chunks/chunk-OJ4HAALD.js.map +0 -7
- package/dist/chunks/chunk-QGTD3LAZ.js.map +0 -7
- package/dist/chunks/chunk-QNMQJNXE.js.map +0 -7
- package/dist/chunks/chunk-RKJPBTBB.js.map +0 -7
- package/dist/chunks/chunk-U6Y6TKJL.js.map +0 -7
- package/dist/chunks/chunk-VGRUWTMG.js.map +0 -7
- package/dist/chunks/chunk-XOBLUZMB.js.map +0 -7
- package/dist/durable/openai-sse-patch.d.ts +0 -21
- package/dist/durable/openai-sse-patch.d.ts.map +0 -1
- /package/dist/chunks/{chunk-7YNE4NB2.js.map → chunk-2MELFQCQ.js.map} +0 -0
- /package/dist/chunks/{chunk-HSEZPCL5.js.map → chunk-2OC4YJOL.js.map} +0 -0
- /package/dist/chunks/{chunk-TXCNZCZP.js.map → chunk-2QJ4MNS6.js.map} +0 -0
- /package/dist/chunks/{chunk-QOEOKW2X.js.map → chunk-3QH6JAE3.js.map} +0 -0
- /package/dist/chunks/{chunk-L6H46CPY.js.map → chunk-6NNL5LOG.js.map} +0 -0
- /package/dist/chunks/{chunk-RWKQ5SRW.js.map → chunk-7ZFPVOV2.js.map} +0 -0
- /package/dist/chunks/{chunk-PUBHBEYO.js.map → chunk-B2FIGOPI.js.map} +0 -0
- /package/dist/chunks/{chunk-4WKD3YM3.js.map → chunk-C3UPHOJW.js.map} +0 -0
- /package/dist/chunks/{chunk-RAA3FAYZ.js.map → chunk-GNPTDN6K.js.map} +0 -0
- /package/dist/chunks/{chunk-XFOSUGLU.js.map → chunk-JCGEW5OQ.js.map} +0 -0
- /package/dist/chunks/{chunk-CXYJJ3HZ.js.map → chunk-LJ2MG6U2.js.map} +0 -0
- /package/dist/chunks/{chunk-3MOY6WIB.js.map → chunk-LRBDEAKB.js.map} +0 -0
- /package/dist/chunks/{chunk-NQ7IWEIF.js.map → chunk-MQGRQMVM.js.map} +0 -0
- /package/dist/chunks/{chunk-WKFRGICG.js.map → chunk-RBYRHS24.js.map} +0 -0
- /package/dist/chunks/{chunk-ZHROHNEE.js.map → chunk-RFNYH7S7.js.map} +0 -0
- /package/dist/chunks/{chunk-H57KPL3V.js.map → chunk-S2JWFXW5.js.map} +0 -0
- /package/dist/chunks/{chunk-KIFOEBYJ.js.map → chunk-VEXCD3RA.js.map} +0 -0
- /package/dist/chunks/{chunk-GS67KDMV.js.map → chunk-VN7AE3EY.js.map} +0 -0
- /package/dist/chunks/{chunk-MX53BRAC.js.map → chunk-XBAOTA4U.js.map} +0 -0
- /package/dist/chunks/{chunk-MSDL7U6Q.js.map → chunk-XQCNVH3Y.js.map} +0 -0
- /package/dist/chunks/{chunk-6GWDGTHC.js.map → chunk-YLO62DWD.js.map} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
readFabricBranchSummaryDetails,
|
|
3
3
|
readFabricProjectionTrace
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-3QH6JAE3.js";
|
|
5
5
|
import {
|
|
6
6
|
lineageSelected
|
|
7
7
|
} from "./chunk-P7YSPKTM.js";
|
|
@@ -654,4 +654,4 @@ export {
|
|
|
654
654
|
expandSessionEntries,
|
|
655
655
|
expandSessionEntriesChecked
|
|
656
656
|
};
|
|
657
|
-
//# sourceMappingURL=chunk-
|
|
657
|
+
//# sourceMappingURL=chunk-S2JWFXW5.js.map
|
|
@@ -8,6 +8,9 @@ import {
|
|
|
8
8
|
MAX_PRESERVE_ITEMS,
|
|
9
9
|
MAX_PRESERVE_ITEM_CHARS
|
|
10
10
|
} from "./chunk-HGD75NZY.js";
|
|
11
|
+
import {
|
|
12
|
+
validationMessage
|
|
13
|
+
} from "./chunk-4U47NCP2.js";
|
|
11
14
|
import {
|
|
12
15
|
FABRIC_ACTOR_HOST_EVENTS
|
|
13
16
|
} from "./chunk-IIPKG52D.js";
|
|
@@ -19,6 +22,149 @@ import {
|
|
|
19
22
|
isFabricRunnerId
|
|
20
23
|
} from "./chunk-6QVQXGMR.js";
|
|
21
24
|
|
|
25
|
+
// src/core/shell-monitor.ts
|
|
26
|
+
import { StringDecoder } from "node:string_decoder";
|
|
27
|
+
var SHELL_MONITOR_INTERVAL_LINES = 256;
|
|
28
|
+
var SHELL_MONITOR_PREVIEWS = 8;
|
|
29
|
+
var shellMonitorSchema = {
|
|
30
|
+
type: "object",
|
|
31
|
+
additionalProperties: false,
|
|
32
|
+
required: ["delivery"],
|
|
33
|
+
properties: {
|
|
34
|
+
delivery: { type: "string", enum: ["ui", "wake"], description: "ui only updates task inspection; wake also delivers bounded events to the owning agent (may use LLM turns)." },
|
|
35
|
+
timeoutMs: { type: "integer", minimum: 1e3, maximum: 18e5, description: "Monitor lifetime, default 5 minutes, maximum 30 minutes. No automatic renewal. With an explicit shell timeout, expiry ends only the watch; without one, it stops the command." },
|
|
36
|
+
intervalMs: { type: "integer", minimum: 1e3, maximum: 6e4, description: "Minimum event batch interval, default 5 seconds. Not a shell polling interval." },
|
|
37
|
+
match: { type: "string", minLength: 1, maxLength: 256, description: "Optional case-sensitive literal substring filter on bounded output lines (not a regex)." }
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
function parseShellMonitor(value) {
|
|
41
|
+
if (value === void 0) return void 0;
|
|
42
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) throw new Error("monitor must be an object");
|
|
43
|
+
const input = value;
|
|
44
|
+
if (Object.keys(input).some((key) => !Object.hasOwn(shellMonitorSchema.properties, key))) throw new Error("Unknown monitor option");
|
|
45
|
+
if (input.delivery !== "ui" && input.delivery !== "wake") throw new Error('monitor.delivery must explicitly be "ui" or "wake"');
|
|
46
|
+
const integer = (key, fallback, max) => {
|
|
47
|
+
const n = input[key] ?? fallback;
|
|
48
|
+
if (typeof n !== "number" || !Number.isInteger(n) || n < 1e3 || n > max) throw new Error(`monitor.${key} must be an integer from 1000 to ${max}`);
|
|
49
|
+
return n;
|
|
50
|
+
};
|
|
51
|
+
if (input.match !== void 0 && (typeof input.match !== "string" || !input.match.length || input.match.length > 256)) throw new Error("monitor.match must be a nonempty literal string of at most 256 characters");
|
|
52
|
+
return {
|
|
53
|
+
delivery: input.delivery,
|
|
54
|
+
timeoutMs: integer("timeoutMs", 3e5, 18e5),
|
|
55
|
+
intervalMs: integer("intervalMs", 5e3, 6e4),
|
|
56
|
+
...typeof input.match === "string" ? { match: input.match } : {}
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
var ShellMonitor = class {
|
|
60
|
+
constructor(options, emit) {
|
|
61
|
+
this.options = options;
|
|
62
|
+
this.emit = emit;
|
|
63
|
+
}
|
|
64
|
+
#decoder = new StringDecoder("utf8");
|
|
65
|
+
#line = "";
|
|
66
|
+
#truncated = false;
|
|
67
|
+
#previous;
|
|
68
|
+
#lines = [];
|
|
69
|
+
#omitted = 0;
|
|
70
|
+
#timer;
|
|
71
|
+
#closed = false;
|
|
72
|
+
append(data) {
|
|
73
|
+
if (this.#closed) return;
|
|
74
|
+
for (let offset = 0; offset < data.length; offset += 4096) this.#accept(this.#decoder.write(data.subarray(offset, offset + 4096)));
|
|
75
|
+
}
|
|
76
|
+
#accept(text) {
|
|
77
|
+
const parts = text.split("\n");
|
|
78
|
+
for (const [index, part] of parts.entries()) {
|
|
79
|
+
const available = Math.max(0, 2048 - this.#line.length);
|
|
80
|
+
if (part.length > available) this.#truncated = true;
|
|
81
|
+
this.#line += part.slice(0, available);
|
|
82
|
+
if (index < parts.length - 1) this.#endLine();
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
#endLine() {
|
|
86
|
+
const line = this.#line.replace(/[\u0000-\u001f\u007f-\u009f]/g, " ").trim();
|
|
87
|
+
const truncated = this.#truncated;
|
|
88
|
+
this.#line = "";
|
|
89
|
+
this.#truncated = false;
|
|
90
|
+
if (!line || this.options.match && !line.includes(this.options.match) || line === this.#previous) return;
|
|
91
|
+
this.#previous = line;
|
|
92
|
+
const preview = line.slice(0, 480) + (truncated || line.length > 480 ? " [line truncated]" : "");
|
|
93
|
+
if (this.#lines.length === SHELL_MONITOR_INTERVAL_LINES) {
|
|
94
|
+
this.#lines.shift();
|
|
95
|
+
this.#omitted++;
|
|
96
|
+
}
|
|
97
|
+
this.#lines.push(preview);
|
|
98
|
+
if (!this.#timer) {
|
|
99
|
+
this.#timer = setTimeout(() => {
|
|
100
|
+
this.#timer = void 0;
|
|
101
|
+
this.#flush();
|
|
102
|
+
}, this.options.intervalMs);
|
|
103
|
+
this.#timer.unref?.();
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
#flush() {
|
|
107
|
+
if (!this.#lines.length) return;
|
|
108
|
+
const batch = { lines: this.#lines, omitted: this.#omitted };
|
|
109
|
+
this.#lines = [];
|
|
110
|
+
this.#omitted = 0;
|
|
111
|
+
this.emit(batch);
|
|
112
|
+
}
|
|
113
|
+
flush() {
|
|
114
|
+
if (this.#timer) clearTimeout(this.#timer);
|
|
115
|
+
this.#timer = void 0;
|
|
116
|
+
this.#flush();
|
|
117
|
+
}
|
|
118
|
+
close(flush = true) {
|
|
119
|
+
if (this.#closed) return;
|
|
120
|
+
if (flush) {
|
|
121
|
+
this.#accept(this.#decoder.end());
|
|
122
|
+
this.#endLine();
|
|
123
|
+
}
|
|
124
|
+
this.#closed = true;
|
|
125
|
+
if (this.#timer) clearTimeout(this.#timer);
|
|
126
|
+
this.#timer = void 0;
|
|
127
|
+
if (flush) this.#flush();
|
|
128
|
+
this.#line = "";
|
|
129
|
+
this.#lines = [];
|
|
130
|
+
}
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
// src/core/observation-actions.ts
|
|
134
|
+
function observationAction(kind) {
|
|
135
|
+
const { match, ...common } = shellMonitorSchema.properties;
|
|
136
|
+
return {
|
|
137
|
+
name: "observe",
|
|
138
|
+
description: `Observe an existing local ${kind === "task" ? "task's new output" : "agent run or provider participant's operational progress"} without restarting it or polling. Delivery ui is human inspection only; wake emits bounded events to the owning agent. Terminal outcomes always bypass filters. Quiet is not failure. Returns an observation task handle: use tasks.get/watch/stop with its id. Stopping or expiring observation never stops the target. One wake observer per target; at most 8 active observations including shell monitors.`,
|
|
139
|
+
inputSchema: { type: "object", additionalProperties: false, required: ["id", "delivery"], properties: {
|
|
140
|
+
...common,
|
|
141
|
+
...kind === "task" ? { match } : {},
|
|
142
|
+
id: { type: "string", minLength: 1, description: "Exact local task or agent run ID; provider participant refs are accepted by agents.observe." },
|
|
143
|
+
events: { type: "array", minItems: 1, uniqueItems: true, items: { type: "string", enum: kind === "task" ? ["output", "quiet", "terminal"] : ["progress", "blocked", "quiet", "terminal"] } },
|
|
144
|
+
quietAfterMs: { type: "integer", minimum: 1e3, maximum: 18e5 },
|
|
145
|
+
description: { type: "string", minLength: 1, maxLength: 120 }
|
|
146
|
+
} },
|
|
147
|
+
risk: "read",
|
|
148
|
+
effect: { kind: "emission", ordering: "ordered" }
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
async function observeExisting(engine, kind, args, context) {
|
|
152
|
+
const invalid = validationMessage(observationAction(kind).inputSchema, args);
|
|
153
|
+
if (invalid) throw new Error(`Invalid ${kind === "task" ? "tasks" : "agents"}.observe arguments: ${invalid}`);
|
|
154
|
+
if (!engine) throw new Error("Observation is unavailable in this host");
|
|
155
|
+
const { id, events, quietAfterMs, description, ...settings } = args;
|
|
156
|
+
const selected = events;
|
|
157
|
+
if (selected?.includes("quiet") && quietAfterMs === void 0) throw new Error("quiet events require quietAfterMs");
|
|
158
|
+
if (quietAfterMs !== void 0 && !selected?.includes("quiet")) throw new Error("quietAfterMs requires events to include quiet");
|
|
159
|
+
return { task: await engine.start({
|
|
160
|
+
...parseShellMonitor(settings),
|
|
161
|
+
target: { kind, id },
|
|
162
|
+
events: selected ?? (kind === "task" ? ["output", "terminal"] : ["progress", "blocked", "terminal"]),
|
|
163
|
+
...typeof quietAfterMs === "number" ? { quietAfterMs } : {},
|
|
164
|
+
...typeof description === "string" ? { description } : {}
|
|
165
|
+
}, context.extensionContext?.sessionManager?.getSessionId?.(), context.signal) };
|
|
166
|
+
}
|
|
167
|
+
|
|
22
168
|
// src/providers/agents-actions.ts
|
|
23
169
|
var RUNNER_ID_SOURCE = "^[a-z][a-z0-9]*(?:[._-][a-z0-9]+)*$";
|
|
24
170
|
var runProperties = {
|
|
@@ -258,6 +404,7 @@ var lifecycleEventSchema = {
|
|
|
258
404
|
enum: [...FABRIC_LIFECYCLE_EVENTS]
|
|
259
405
|
};
|
|
260
406
|
var AGENTS_ACTION_DESCRIPTORS = [
|
|
407
|
+
observationAction("participant"),
|
|
261
408
|
{
|
|
262
409
|
name: "run",
|
|
263
410
|
description: "Run a child agent through Pi or Claude Code and wait for its final result",
|
|
@@ -579,10 +726,15 @@ var AGENTS_ACTION_DESCRIPTORS = [
|
|
|
579
726
|
},
|
|
580
727
|
{
|
|
581
728
|
name: "steer",
|
|
582
|
-
description: "Steer Main, a running one-shot agent between turns, or a persistent actor through its mailbox. The stable id alias main targets the root user-facing Pi session. Non-local targets route over the project mesh.",
|
|
729
|
+
description: "Steer Main, a running one-shot agent between turns, or a persistent actor through its mailbox. The stable id alias main targets the root user-facing Pi session. Peer-root messages are passive by default; set triggerTurn: true only when an idle peer must act. Child-to-Main feedback still wakes by default. Non-local targets route over the project mesh.",
|
|
583
730
|
inputSchema: {
|
|
584
731
|
type: "object",
|
|
585
|
-
properties: {
|
|
732
|
+
properties: {
|
|
733
|
+
id: { type: "string" },
|
|
734
|
+
message: { type: "string" },
|
|
735
|
+
data: {},
|
|
736
|
+
triggerTurn: { type: "boolean", description: "Root Main targets only: start a turn when idle. Defaults to false for peer-root messages and true for child/actor feedback. False still delivers during an active run." }
|
|
737
|
+
},
|
|
586
738
|
required: ["id", "message"],
|
|
587
739
|
additionalProperties: false
|
|
588
740
|
},
|
|
@@ -590,10 +742,15 @@ var AGENTS_ACTION_DESCRIPTORS = [
|
|
|
590
742
|
},
|
|
591
743
|
{
|
|
592
744
|
name: "followUp",
|
|
593
|
-
description: "Queue a follow-up for a running one-shot agent, or enqueue a persistent actor mailbox message. Incoming Main feedback is delivered as hidden steering with a sender notification, even through this legacy followUp method. The stable id alias main targets the root user-facing Pi session. Non-local targets route over the project mesh.",
|
|
745
|
+
description: "Queue a follow-up for a running one-shot agent, or enqueue a persistent actor mailbox message. Incoming Main feedback is delivered as hidden steering with a sender notification, even through this legacy followUp method. The stable id alias main targets the root user-facing Pi session. Peer-root messages are passive by default; set triggerTurn: true only when an idle peer must act. Child-to-Main feedback still wakes by default. Non-local targets route over the project mesh.",
|
|
594
746
|
inputSchema: {
|
|
595
747
|
type: "object",
|
|
596
|
-
properties: {
|
|
748
|
+
properties: {
|
|
749
|
+
id: { type: "string" },
|
|
750
|
+
message: { type: "string" },
|
|
751
|
+
data: {},
|
|
752
|
+
triggerTurn: { type: "boolean", description: "Root Main targets only: start a turn when idle. Defaults to false for peer-root messages and true for child/actor feedback. False still delivers during an active run." }
|
|
753
|
+
},
|
|
597
754
|
required: ["id", "message"],
|
|
598
755
|
additionalProperties: false
|
|
599
756
|
},
|
|
@@ -908,7 +1065,13 @@ var normalizeAgentRunRequest = (args, defaults, options = {}) => {
|
|
|
908
1065
|
};
|
|
909
1066
|
|
|
910
1067
|
export {
|
|
1068
|
+
SHELL_MONITOR_PREVIEWS,
|
|
1069
|
+
shellMonitorSchema,
|
|
1070
|
+
parseShellMonitor,
|
|
1071
|
+
ShellMonitor,
|
|
1072
|
+
observationAction,
|
|
1073
|
+
observeExisting,
|
|
911
1074
|
AGENTS_ACTION_DESCRIPTORS,
|
|
912
1075
|
normalizeAgentRunRequest
|
|
913
1076
|
};
|
|
914
|
-
//# sourceMappingURL=chunk-
|
|
1077
|
+
//# sourceMappingURL=chunk-SSB2JN3I.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/core/shell-monitor.ts", "../../src/core/observation-actions.ts", "../../src/providers/agents-actions.ts", "../../src/agents/request.ts"],
|
|
4
|
+
"sourcesContent": ["import { StringDecoder } from \"node:string_decoder\";\n\nexport interface ShellMonitorOptions {\n delivery: \"ui\" | \"wake\";\n timeoutMs: number;\n intervalMs: number;\n match?: string;\n}\n\nexport interface ShellMonitorBatch {\n lines: string[];\n omitted: number;\n}\n\n/** Lines retained per delivery interval for replay; older lines in a burst are coalesced. */\nexport const SHELL_MONITOR_INTERVAL_LINES = 256;\n/** Newest previews carried by an agent-facing monitor event. */\nexport const SHELL_MONITOR_PREVIEWS = 8;\n\nexport const shellMonitorSchema = {\n type: \"object\", additionalProperties: false, required: [\"delivery\"],\n properties: {\n delivery: { type: \"string\", enum: [\"ui\", \"wake\"], description: \"ui only updates task inspection; wake also delivers bounded events to the owning agent (may use LLM turns).\" },\n timeoutMs: { type: \"integer\", minimum: 1000, maximum: 1800000, description: \"Monitor lifetime, default 5 minutes, maximum 30 minutes. No automatic renewal. With an explicit shell timeout, expiry ends only the watch; without one, it stops the command.\" },\n intervalMs: { type: \"integer\", minimum: 1000, maximum: 60000, description: \"Minimum event batch interval, default 5 seconds. Not a shell polling interval.\" },\n match: { type: \"string\", minLength: 1, maxLength: 256, description: \"Optional case-sensitive literal substring filter on bounded output lines (not a regex).\" },\n },\n};\n\nexport function parseShellMonitor(value: unknown): ShellMonitorOptions | undefined {\n if (value === undefined) return undefined;\n if (!value || typeof value !== \"object\" || Array.isArray(value)) throw new Error(\"monitor must be an object\");\n const input = value as Record<string, unknown>;\n if (Object.keys(input).some(key => !Object.hasOwn(shellMonitorSchema.properties, key))) throw new Error(\"Unknown monitor option\");\n if (input.delivery !== \"ui\" && input.delivery !== \"wake\") throw new Error('monitor.delivery must explicitly be \"ui\" or \"wake\"');\n const integer = (key: string, fallback: number, max: number): number => {\n const n = input[key] ?? fallback;\n if (typeof n !== \"number\" || !Number.isInteger(n) || n < 1000 || n > max) throw new Error(`monitor.${key} must be an integer from 1000 to ${max}`);\n return n;\n };\n if (input.match !== undefined && (typeof input.match !== \"string\" || !input.match.length || input.match.length > 256)) throw new Error(\"monitor.match must be a nonempty literal string of at most 256 characters\");\n return { delivery: input.delivery, timeoutMs: integer(\"timeoutMs\", 300000, 1800000), intervalMs: integer(\"intervalMs\", 5000, 60000),\n ...(typeof input.match === \"string\" ? { match: input.match } : {}) };\n}\n\n/** Bounded, incremental line framing. No inference, regexes, or per-poll model calls. */\nexport class ShellMonitor {\n readonly #decoder = new StringDecoder(\"utf8\");\n #line = \"\";\n #truncated = false;\n #previous: string | undefined;\n #lines: string[] = [];\n #omitted = 0;\n #timer: ReturnType<typeof setTimeout> | undefined;\n #closed = false;\n\n constructor(readonly options: ShellMonitorOptions, readonly emit: (batch: ShellMonitorBatch) => void) {}\n\n append(data: Buffer): void {\n if (this.#closed) return;\n // Decode in bounded pieces even when an operations adapter hands us a huge buffer.\n for (let offset = 0; offset < data.length; offset += 4096) this.#accept(this.#decoder.write(data.subarray(offset, offset + 4096)));\n }\n\n #accept(text: string): void {\n const parts = text.split(\"\\n\");\n for (const [index, part] of parts.entries()) {\n const available = Math.max(0, 2048 - this.#line.length);\n if (part.length > available) this.#truncated = true;\n this.#line += part.slice(0, available);\n if (index < parts.length - 1) this.#endLine();\n }\n }\n\n #endLine(): void {\n const line = this.#line.replace(/[\\u0000-\\u001f\\u007f-\\u009f]/g, \" \").trim();\n const truncated = this.#truncated;\n this.#line = \"\";\n this.#truncated = false;\n if (!line || (this.options.match && !line.includes(this.options.match)) || line === this.#previous) return;\n this.#previous = line;\n const preview = line.slice(0, 480) + (truncated || line.length > 480 ? \" [line truncated]\" : \"\");\n if (this.#lines.length === SHELL_MONITOR_INTERVAL_LINES) { this.#lines.shift(); this.#omitted++; }\n this.#lines.push(preview);\n if (!this.#timer) {\n this.#timer = setTimeout(() => { this.#timer = undefined; this.#flush(); }, this.options.intervalMs);\n this.#timer.unref?.();\n }\n }\n\n #flush(): void {\n if (!this.#lines.length) return;\n const batch = { lines: this.#lines, omitted: this.#omitted };\n this.#lines = [];\n this.#omitted = 0;\n this.emit(batch);\n }\n\n flush(): void {\n if (this.#timer) clearTimeout(this.#timer);\n this.#timer = undefined;\n this.#flush();\n }\n\n close(flush = true): void {\n if (this.#closed) return;\n if (flush) {\n this.#accept(this.#decoder.end());\n this.#endLine();\n }\n this.#closed = true;\n if (this.#timer) clearTimeout(this.#timer);\n this.#timer = undefined;\n if (flush) this.#flush();\n this.#line = \"\";\n this.#lines = [];\n }\n}\n", "import type { FabricActionDescriptor, FabricInvocationContext } from \"../protocol.js\";\nimport { validationMessage } from \"./action-arguments.js\";\nimport type { AttachedMonitors, MonitorEvent, MonitorTarget } from \"./attached-monitors.js\";\nimport { parseShellMonitor, shellMonitorSchema } from \"./shell-monitor.js\";\n\nexport type ObservationSource = () => AttachedMonitors | undefined;\n\n/** Shared semantics, separate discovery on the kind of work being observed. */\nexport function observationAction(kind: MonitorTarget[\"kind\"]): FabricActionDescriptor {\n const { match, ...common } = shellMonitorSchema.properties;\n return {\n name: \"observe\",\n description: `Observe an existing local ${kind === \"task\" ? \"task's new output\" : \"agent run or provider participant's operational progress\"} without restarting it or polling. Delivery ui is human inspection only; wake emits bounded events to the owning agent. Terminal outcomes always bypass filters. Quiet is not failure. Returns an observation task handle: use tasks.get/watch/stop with its id. Stopping or expiring observation never stops the target. One wake observer per target; at most 8 active observations including shell monitors.`,\n inputSchema: { type: \"object\", additionalProperties: false, required: [\"id\", \"delivery\"], properties: {\n ...common,\n ...(kind === \"task\" ? { match } : {}),\n id: { type: \"string\", minLength: 1, description: \"Exact local task or agent run ID; provider participant refs are accepted by agents.observe.\" },\n events: { type: \"array\", minItems: 1, uniqueItems: true, items: { type: \"string\", enum: kind === \"task\" ? [\"output\", \"quiet\", \"terminal\"] : [\"progress\", \"blocked\", \"quiet\", \"terminal\"] } },\n quietAfterMs: { type: \"integer\", minimum: 1000, maximum: 1800000 },\n description: { type: \"string\", minLength: 1, maxLength: 120 },\n } },\n risk: \"read\", effect: { kind: \"emission\", ordering: \"ordered\" },\n };\n}\n\nexport async function observeExisting(engine: AttachedMonitors | undefined, kind: MonitorTarget[\"kind\"], args: Record<string, unknown>, context: FabricInvocationContext) {\n const invalid = validationMessage(observationAction(kind).inputSchema, args);\n if (invalid) throw new Error(`Invalid ${kind === \"task\" ? \"tasks\" : \"agents\"}.observe arguments: ${invalid}`);\n if (!engine) throw new Error(\"Observation is unavailable in this host\");\n const { id, events, quietAfterMs, description, ...settings } = args;\n const selected = events as MonitorEvent[] | undefined;\n if (selected?.includes(\"quiet\") && quietAfterMs === undefined) throw new Error(\"quiet events require quietAfterMs\");\n if (quietAfterMs !== undefined && !selected?.includes(\"quiet\")) throw new Error(\"quietAfterMs requires events to include quiet\");\n return { task: await engine.start({\n ...parseShellMonitor(settings)!, target: { kind, id: id as string },\n events: selected ?? (kind === \"task\" ? [\"output\", \"terminal\"] : [\"progress\", \"blocked\", \"terminal\"]),\n ...(typeof quietAfterMs === \"number\" ? { quietAfterMs } : {}),\n ...(typeof description === \"string\" ? { description } : {}),\n }, context.extensionContext?.sessionManager?.getSessionId?.(), context.signal) };\n}\n", "import { observationAction } from \"../core/observation-actions.js\";\nimport { FABRIC_ACTOR_HOST_EVENTS } from \"../actors/types.js\";\nimport {\n MAX_COMPACTION_INSTRUCTIONS_CHARS,\n MAX_PRESERVE_ITEM_CHARS,\n MAX_PRESERVE_ITEMS,\n} from \"../compaction/instructions.js\";\nimport { FABRIC_LIFECYCLE_EVENTS } from \"../lifecycle/types.js\";\nimport type { FabricActionDescriptor } from \"../protocol.js\";\n\n// RUNNER_ID_PATTERN (src/agents/runner-registry.ts) as source text; kept in sync by a test.\nconst RUNNER_ID_SOURCE = \"^[a-z][a-z0-9]*(?:[._-][a-z0-9]+)*$\";\n\nconst runProperties = {\n task: { type: \"string\", description: \"A self-contained task for the child agent\" },\n agent: {\n type: \"string\",\n minLength: 1,\n description: \"Name of an agent file (see agents.definitions()) whose instructions, model, tools, thinking and runtimes.fabric settings fill this request. Any field passed here wins over the file. An unknown name fails before the child starts.\",\n },\n name: { type: \"string\" },\n runner: {\n type: \"string\",\n pattern: RUNNER_ID_SOURCE,\n maxLength: 64,\n description: \"Execution harness: pi-durable (default), pi, claude, veda, or a runner registered through pi-fabric/runners. Defaults to agents.runner.\",\n },\n kernel: {\n type: \"string\",\n enum: [\"typescript\", \"python\", \"inherit\"],\n description: \"Fabric execution language. Omitted/inherit uses the caller executor.kernel; concrete choices require Pi with extensions enabled. Python uses the configured backend; CPython is native execution.\",\n },\n transport: {\n type: \"string\",\n enum: [\"auto\", \"process\", \"tmux\", \"screen\", \"localterm\", \"herdr\", \"herdr-core\"],\n },\n model: {\n type: \"string\",\n description:\n \"Pi provider/id copied from agents.models({ runner: \\\"pi\\\" }), a configured models.aliases name, or a search term resolved to the closest authenticated model (recency from pi-model-sort breaks ties). Reuse returned keys; never infer version numbers from agent names. Exact keys win; near-miss IDs resolve to the closest visible model on the same provider. Handles report the canonical model. Claude runtime value or Veda backend model/alias are forwarded verbatim. Set modelMatch: \\\"exact\\\" to turn off aliases and near-miss resolution.\",\n },\n modelMatch: {\n type: \"string\",\n enum: [\"exact\"],\n description:\n \"Pi runners only (pi, pi-durable). \\\"exact\\\" selects a listed provider/id without aliases, closest or fuzzy matching, or alias thinking; invalid selectors and other runners are refused before launch. Admission is strict and a child guard detects model switches and some payload rewrites. This is not a security guarantee or final-dispatch enforcement: later hooks, unknown API payloads, providers and extension-made calls can route data elsewhere; attribution checks may detect drift only after a call. Do not rely on it to prevent data disclosure. Omit for default resolution.\",\n },\n persona: {\n type: \"string\",\n description: \"Veda persona name for this run, such as frontend, reviewer, worker, or a custom persona.\",\n },\n holdQuestions: {\n type: \"boolean\",\n const: true,\n description:\n \"Hold this run's routed questions for a person. Each question becomes a root-held Fabric decision with a 30-day deadline (the longest allowed); only this run waits until it is answered (/fabric decisions, pi-fabric decisions answer, or decisions.answer from the main session). Needs agents.childQuestions \\\"route\\\" and a runner that declares questions; refused otherwise. The run's timeoutMs still applies.\",\n },\n thinking: {\n type: \"string\",\n enum: [\"off\", \"minimal\", \"low\", \"medium\", \"high\", \"xhigh\", \"max\"],\n },\n thinkingBounds: {\n type: \"object\",\n properties: {\n min: { type: \"string\", enum: [\"off\", \"minimal\", \"low\", \"medium\", \"high\", \"xhigh\", \"max\"] },\n max: { type: \"string\", enum: [\"off\", \"minimal\", \"low\", \"medium\", \"high\", \"xhigh\", \"max\"] },\n },\n additionalProperties: false,\n description: \"Optional child thinking bounds; must lie inside this session's bounds (omitted ends inherit). Child Fabric sessions never widen them. thinking outside the effective bounds is clamped and reported as requestedThinking.\",\n },\n tools: { type: \"array\", items: { type: \"string\" } },\n timeoutMs: {\n type: \"number\",\n description:\n \"Optional longer wall-clock limit in milliseconds. Omit to use agents.timeoutMs (60 minutes by default); values below the configured default are ignored.\",\n },\n extensions: { type: \"boolean\" },\n recursive: { type: \"boolean\" },\n cwd: {\n type: \"string\",\n description: \"Filesystem execution directory for leaf or recursive Pi runs; relative paths resolve from the caller cwd. Does not change project/mesh ownership or grant target project trust.\",\n },\n worktree: { type: \"boolean\" },\n worktreeSetup: {\n type: \"string\",\n maxLength: 8192,\n description: \"Shell command run in a new worktree before the child starts; overrides agents.worktree.setup. Non-zero exit fails the run.\",\n },\n seed: {\n type: \"string\",\n enum: [\"task\", \"branch\", \"snippet\"],\n description: \"Child context (Pi only). task (default): the task alone. branch: a non-blocking fork of this conversation up to its last completed turn, then the task. snippet: the last seedMessages user/assistant texts prefixed to the task.\",\n },\n seedMessages: { type: \"integer\", minimum: 1, maximum: 50, description: \"snippet only; default 12\" },\n readOnly: { type: \"boolean\", description: \"Pi only: refuse write/edit (and shell unless shell: \\\"unconfined\\\") in the child\" },\n writableRoots: {\n type: \"array\",\n items: { type: \"string\", maxLength: 4096 },\n maxItems: 32,\n description: \"Pi only: confine write/edit to these directories (relative to the child cwd; default the cwd). Shell is refused unless shell: \\\"unconfined\\\".\",\n },\n scope: {\n type: \"object\",\n properties: {\n grants: {\n type: \"array\",\n maxItems: 64,\n items: {\n type: \"object\",\n properties: {\n resource: { type: \"string\", minLength: 3, maxLength: 512 },\n actions: { type: \"array\", minItems: 1, maxItems: 3, items: { type: \"string\", enum: [\"read\", \"write\", \"execute\"] } },\n },\n required: [\"resource\", \"actions\"],\n additionalProperties: false,\n },\n },\n },\n required: [\"grants\"],\n additionalProperties: false,\n description: \"Narrow this session's host-issued scope for the child (each grant must be covered by a parent grant; resource <ns>:<path>, <ns>:<path>/*, <ns>:<path>/**, <ns>:*). Omit to inherit it; refused in an unscoped session.\",\n },\n shell: {\n type: \"string\",\n enum: [\"deny\", \"unconfined\"],\n description: \"With a write policy, bash is refused by default; unconfined allows it and is not a sandbox\",\n },\n schema: { type: \"object\", description: \"Optional JSON Schema for validated structured output\" },\n systemPrompt: {\n type: \"string\",\n description: \"Optional extra system prompt body for this child run. Fabric places it ahead of any component guidance. Pi and Claude runners append the result with --append-system-prompt, and Veda receives it as a <system_instructions> block in its prompt. Useful for reliability-focused prompt rules on models with weak behavioral defaults.\",\n },\n skills: {\n anyOf: [\n { type: \"boolean\", const: false },\n { type: \"array\", items: { type: \"string\", minLength: 1, maxLength: 128, pattern: \"^[^/\\\\\\\\]+$\" }, maxItems: 64 },\n {\n type: \"object\",\n properties: {\n preload: { type: \"array\", items: { type: \"string\", minLength: 1, maxLength: 128, pattern: \"^[^/\\\\\\\\]+$\" }, maxItems: 64 },\n inherit: { type: \"boolean\" },\n },\n additionalProperties: false,\n },\n ],\n description: \"Pi runners only: the child's skills, by name, resolved against this session's skills. false: no skills. A list: those skills preloaded in full, plus this session's other skills. { preload, inherit: false }: only the preloaded skills. Omit to keep the child's own skill discovery. An unknown name fails before launch.\",\n },\n persistSession: {\n type: \"boolean\",\n description: \"Claude runner only: persist the Claude Code transcript for hook-based observability. Defaults to false.\",\n },\n};\n\nconst runSchema = {\n type: \"object\",\n properties: runProperties,\n required: [\"task\"],\n additionalProperties: false,\n};\n\nconst residencySchema = {\n type: \"string\",\n enum: [\"session\", \"durable\"],\n description: \"session stops with the current Pi host; durable transfers execution to Fabric's hidden resident host.\",\n};\n\nconst actorBindingScopeSchema = {\n type: \"string\",\n enum: [\"session\", \"project\"],\n description: \"session (default) changes only this Pi session; project pins the shared actor default and requires ownership.\",\n};\n\nconst actorInvocationProperties = {\n id: { type: \"string\" },\n message: { type: \"string\" },\n data: {},\n model: {\n ...runProperties.model,\n description: \"Optional model pinned only for this actor activation.\",\n },\n thinking: runProperties.thinking,\n};\n\nconst spawnSchema = {\n ...runSchema,\n properties: {\n ...runProperties,\n residency: residencySchema,\n queue: {\n type: \"boolean\",\n description:\n \"Return a handle with status \\\"queued\\\" at once instead of waiting inside this call for a free agents.maxConcurrent slot. The run starts when a slot frees, even after this program ends; wait, status, list, and stop accept the id meanwhile, and stop cancels it without launching. Validation errors still reject the call. Omitted or false keeps the default: spawn waits for a slot.\",\n },\n },\n};\n\nconst handoffCompactionSchema = {\n anyOf: [\n { type: \"boolean\" },\n {\n type: \"object\",\n properties: {\n instructions: {\n type: \"string\",\n maxLength: MAX_COMPACTION_INSTRUCTIONS_CHARS,\n description: \"Custom compaction instructions for the inherited trajectory\",\n },\n preserve: {\n type: \"array\",\n items: { type: \"string\", maxLength: MAX_PRESERVE_ITEM_CHARS },\n maxItems: MAX_PRESERVE_ITEMS,\n description: \"Explicit bounded facts the trajectory summary must preserve\",\n },\n },\n additionalProperties: false,\n },\n ],\n description:\n \"Compact the inherited trajectory with Fabric's deterministic compactor before the executor resumes it. `true` applies the default summary; an object customizes instructions and bounded preserve facts. Omitted keeps the full raw trajectory.\",\n};\n\nconst handoffSchema = {\n type: \"object\",\n properties: {\n task: {\n type: \"string\",\n description: \"Optional instructions for the executor in addition to the inherited trajectory\",\n },\n name: runProperties.name,\n kernel: runProperties.kernel,\n transport: runProperties.transport,\n model: {\n ...runProperties.model,\n description: \"Explicit Pi provider/id target that will continue the inherited trajectory\",\n },\n thinking: runProperties.thinking,\n tools: runProperties.tools,\n timeoutMs: runProperties.timeoutMs,\n extensions: runProperties.extensions,\n recursive: runProperties.recursive,\n schema: runProperties.schema,\n compact: handoffCompactionSchema,\n },\n required: [\"model\"],\n additionalProperties: false,\n};\n\nconst idSchema = {\n type: \"object\",\n properties: { id: { type: \"string\" } },\n required: [\"id\"],\n additionalProperties: false,\n};\n\nconst parkResultSchema = (requested: \"sleep\" | \"wake\") => ({\n type: \"object\",\n properties: { id: { type: \"string\" }, requested: { const: requested } },\n required: [\"id\", \"requested\"],\n additionalProperties: false,\n});\n\nconst lifecycleEventSchema = {\n type: \"string\",\n enum: [...FABRIC_LIFECYCLE_EVENTS],\n};\n\nexport const AGENTS_ACTION_DESCRIPTORS: FabricActionDescriptor[] = [\n observationAction(\"participant\"),\n {\n name: \"run\",\n description: \"Run a child agent through Pi or Claude Code and wait for its final result\",\n inputSchema: runSchema,\n risk: \"agent\",\n },\n {\n name: \"handoff\",\n description:\n \"Schedule a Pi trajectory handoff after the current outer fabric_exec result, then wait for implementation at that boundary\",\n inputSchema: handoffSchema,\n risk: \"agent\",\n },\n {\n name: \"spawn\",\n description:\n \"Start a child agent through Pi or Claude Code and return a handle immediately. For independent launches, await Promise.allSettled and inspect every result so one rejection does not abort pending sibling calls at program exit. Unread detached results are batched at the next safe turn boundary (or wake idle Main) when agents.notifyOnComplete is enabled. wait/join and terminal status acknowledge results and retract pending notifications. Use wait when this program needs the result; do not poll status in a loop.\",\n inputSchema: spawnSchema,\n risk: \"agent\",\n },\n {\n name: \"wait\",\n description: \"Wait for a previously spawned child agent and acknowledge its result, suppressing a duplicate completion notification\",\n effect: { kind: \"emission\", ordering: \"commutative\", resources: [\"agents.completions\"] },\n inputSchema: idSchema,\n risk: \"read\",\n },\n {\n name: \"join\",\n description: \"Alias for agents.wait: wait for a previously spawned child agent with the same progress and completion-notification behavior\",\n effect: { kind: \"emission\", ordering: \"commutative\", resources: [\"agents.completions\"] },\n inputSchema: idSchema,\n risk: \"read\",\n },\n {\n name: \"status\",\n description: \"Get the latest status of any known project participant. A terminal child-agent result acknowledges its pending completion notification; running status does not.\",\n effect: { kind: \"emission\", ordering: \"commutative\", resources: [\"agents.completions\"] },\n inputSchema: idSchema,\n risk: \"read\",\n },\n {\n name: \"list\",\n description: \"List agent participants locally, across the current lineage, or across the project\",\n inputSchema: {\n type: \"object\",\n properties: { scope: { type: \"string\", enum: [\"local\", \"lineage\", \"project\"] } },\n additionalProperties: false,\n },\n risk: \"read\",\n },\n {\n name: \"members\",\n description: \"List the unified project topology of roots, agents, and actors\",\n inputSchema: {\n type: \"object\",\n properties: {\n scope: { type: \"string\", enum: [\"local\", \"lineage\", \"project\"] },\n kinds: {\n type: \"array\",\n items: { type: \"string\", enum: [\"root\", \"agent\", \"actor\"] },\n },\n includeStale: { type: \"boolean\" },\n },\n additionalProperties: false,\n },\n risk: \"read\",\n },\n {\n name: \"self\",\n description: \"Return this caller's intrinsic participant identity in the unified topology\",\n inputSchema: { type: \"object\", properties: {}, additionalProperties: false },\n risk: \"read\",\n },\n {\n name: \"main\",\n description:\n \"Return the root user-facing Main Pi agent target. The stable alias main is also accepted by agents.steer and agents.followUp.\",\n inputSchema: { type: \"object\", properties: {}, additionalProperties: false },\n risk: \"read\",\n },\n {\n name: \"sessions\",\n description: \"List all live root Pi session agents in the project, including the current lineage root and peers, with symmetric participant identities.\",\n inputSchema: { type: \"object\", properties: {}, additionalProperties: false },\n risk: \"read\",\n },\n {\n name: \"departed\",\n description: \"List root Pi sessions that are no longer live, newest first: status stopped (closed cleanly) or lost (lease expired without closing), with sessionId, cwd, label and lastSeenAt. Live sessions are never included.\",\n inputSchema: {\n type: \"object\",\n properties: { limit: { type: \"number\", minimum: 1 } },\n additionalProperties: false,\n },\n risk: \"read\",\n },\n {\n name: \"definitions\",\n description: \"List the named agent files that agents.run and agents.spawn accept in agent: name, description, path, scope (user or project), the file it shadows, and warnings for ignored fields. A file that cannot be read appears with an error.\",\n inputSchema: { type: \"object\", properties: {}, additionalProperties: false },\n risk: \"read\",\n },\n {\n name: \"peers\",\n description: \"List other live root Pi sessions sharing this project mesh. The dashboard-owning session remains Main; these targets are named peers.\",\n inputSchema: { type: \"object\", properties: {}, additionalProperties: false },\n risk: \"read\",\n },\n {\n name: \"subscribe\",\n description:\n \"Create a durable source-qualified participant lifecycle subscription. Events are delivered to Main by default or to another participant through steer/follow-up routing.\",\n inputSchema: {\n type: \"object\",\n properties: {\n from: { type: \"string\", description: \"Exact source participant id; main means this lineage root\" },\n events: { type: \"array\", minItems: 1, items: lifecycleEventSchema },\n to: { type: \"string\", description: \"Target participant id; defaults to main\" },\n delivery: { type: \"string\", enum: [\"steer\", \"followUp\"] },\n triggerTurn: { type: \"boolean\" },\n once: { type: \"boolean\" },\n },\n required: [\"from\", \"events\", \"delivery\", \"triggerTurn\"],\n additionalProperties: false,\n },\n risk: \"agent\",\n },\n {\n name: \"subscriptions\",\n description: \"List durable participant lifecycle subscriptions, optionally filtered by source or target\",\n inputSchema: {\n type: \"object\",\n properties: { from: { type: \"string\" }, to: { type: \"string\" } },\n additionalProperties: false,\n },\n risk: \"read\",\n },\n {\n name: \"unsubscribe\",\n description: \"Remove a participant lifecycle subscription\",\n inputSchema: idSchema,\n risk: \"agent\",\n },\n {\n name: \"models\",\n description:\n \"List models exposed by the selected runner. Claude models are enumerated from the installed Claude Code runtime, not hard-coded. Pass model to look up one exact key instead of reading the whole list. Veda returns an empty list: pass its backend model or alias directly as model.\",\n inputSchema: {\n type: \"object\",\n properties: {\n runner: { type: \"string\", pattern: RUNNER_ID_SOURCE, maxLength: 64 },\n refresh: { type: \"boolean\" },\n model: {\n type: \"string\",\n minLength: 1,\n maxLength: 256,\n description:\n \"Exact model key (the key field of an unfiltered entry, e.g. provider/id or claude/<value>). Returns only the entries whose key matches exactly and case-sensitively, with no alias or fuzzy resolution; an unknown key returns [].\",\n },\n },\n additionalProperties: false,\n },\n risk: \"execute\",\n },\n {\n name: \"switchModel\",\n description:\n \"Switch Main's live Pi session model in place. The model selector accepts an exact provider/id, a configured models.aliases name (alias chains try each target in order until one is authenticated), an exact model id, or a search term; inexact terms resolve to the closest match, preferring recently used models (via pi-model-sort usage, when present).\",\n inputSchema: {\n type: \"object\",\n properties: {\n model: {\n type: \"string\",\n description: \"provider/id, alias name, or search term\",\n },\n provider: { type: \"string\" },\n },\n required: [\"model\"],\n additionalProperties: false,\n },\n risk: \"agent\",\n },\n {\n name: \"stop\",\n description: \"Stop a local or remotely owned agent or actor that advertises the stop capability\",\n inputSchema: idSchema,\n risk: \"agent\",\n },\n {\n name: \"sleep\",\n description:\n \"Park an idle hosted run in this session. Only runners that declare the sleep capability accept it. The run stays running and status shows sleeping: true once the runner reports it.\",\n inputSchema: idSchema,\n outputSchema: parkResultSchema(\"sleep\"),\n risk: \"agent\",\n },\n {\n name: \"wake\",\n description: \"Resume a hosted run in this session that agents.sleep parked. Needs the runner's sleep capability.\",\n inputSchema: idSchema,\n outputSchema: parkResultSchema(\"wake\"),\n risk: \"agent\",\n },\n {\n name: \"cleanup\",\n description: \"Remove a completed agent's run files and optional Git worktree\",\n inputSchema: {\n type: \"object\",\n properties: {\n id: { type: \"string\" },\n deleteBranch: { type: \"boolean\" },\n },\n required: [\"id\"],\n additionalProperties: false,\n },\n risk: \"write\",\n },\n {\n name: \"create\",\n description:\n 'Create a persistent actor with independently selected session or project storage. A stopped live actor with the same name must be explicitly removed first. Use scope \"global\" to save a reusable project-independent template instead of a live actor.',\n inputSchema: {\n type: \"object\",\n properties: {\n name: { type: \"string\" },\n instructions: { type: \"string\" },\n events: {\n type: \"array\",\n items: {\n type: \"string\",\n enum: [...FABRIC_ACTOR_HOST_EVENTS],\n },\n },\n topics: { type: \"array\", items: { type: \"string\" } },\n delivery: {\n type: \"string\",\n enum: [\"mailbox\", \"steer\", \"followUp\", \"nextTurn\"],\n },\n responseMode: { type: \"string\", enum: [\"text\", \"directive\"] },\n triggerTurn: { type: \"boolean\" },\n coalesce: { type: \"boolean\" },\n residency: residencySchema,\n runner: runProperties.runner,\n kernel: runProperties.kernel,\n model: runProperties.model,\n thinking: runProperties.thinking,\n tools: runProperties.tools,\n transport: runProperties.transport,\n timeoutMs: runProperties.timeoutMs,\n extensions: runProperties.extensions,\n requires: {\n type: \"array\",\n maxItems: 128,\n description: \"Exact Fabric provider.action refs committed before every actor run. Object entries may be optional.\",\n items: {\n oneOf: [\n { type: \"string\", minLength: 3, maxLength: 256 },\n {\n type: \"object\",\n properties: {\n ref: { type: \"string\", minLength: 3, maxLength: 256 },\n optional: { type: \"boolean\" },\n },\n required: [\"ref\"],\n additionalProperties: false,\n },\n ],\n },\n },\n validWhile: {\n type: \"object\",\n properties: { version: { const: 1 }, source: { type: \"string\" } },\n required: [\"version\", \"source\"],\n additionalProperties: false,\n },\n scope: {\n type: \"string\",\n enum: [\"session\", \"project\", \"global\"],\n description: \"session isolates the actor to the root Pi session; project shares it across sessions; global creates a non-live template.\",\n },\n },\n required: [\"name\", \"instructions\"],\n oneOf: [\n {\n properties: {\n delivery: { const: \"mailbox\" },\n triggerTurn: { const: false },\n },\n },\n {\n properties: {\n delivery: { const: \"nextTurn\" },\n triggerTurn: { const: false },\n },\n required: [\"delivery\"],\n },\n {\n properties: { delivery: { enum: [\"steer\", \"followUp\"] } },\n required: [\"delivery\", \"triggerTurn\"],\n },\n ],\n additionalProperties: false,\n },\n risk: \"agent\",\n },\n {\n name: \"ask\",\n description: \"Send a message to a persistent actor through its live owner and wait for its next response. Optional model/thinking values apply only to this activation.\",\n inputSchema: {\n type: \"object\",\n properties: actorInvocationProperties,\n required: [\"id\", \"message\"],\n additionalProperties: false,\n },\n risk: \"agent\",\n },\n {\n name: \"tell\",\n description: \"Queue a message through a persistent actor's live owner without waiting. Optional model/thinking values apply only to this activation.\",\n inputSchema: {\n type: \"object\",\n properties: actorInvocationProperties,\n required: [\"id\", \"message\"],\n additionalProperties: false,\n },\n risk: \"agent\",\n },\n {\n name: \"steer\",\n description:\n \"Steer Main, a running one-shot agent between turns, or a persistent actor through its mailbox. The stable id alias main targets the root user-facing Pi session. Peer-root messages are passive by default; set triggerTurn: true only when an idle peer must act. Child-to-Main feedback still wakes by default. Non-local targets route over the project mesh.\",\n inputSchema: {\n type: \"object\",\n properties: {\n id: { type: \"string\" }, message: { type: \"string\" }, data: {},\n triggerTurn: { type: \"boolean\", description: \"Root Main targets only: start a turn when idle. Defaults to false for peer-root messages and true for child/actor feedback. False still delivers during an active run.\" },\n },\n required: [\"id\", \"message\"],\n additionalProperties: false,\n },\n risk: \"agent\",\n },\n {\n name: \"followUp\",\n description:\n \"Queue a follow-up for a running one-shot agent, or enqueue a persistent actor mailbox message. Incoming Main feedback is delivered as hidden steering with a sender notification, even through this legacy followUp method. The stable id alias main targets the root user-facing Pi session. Peer-root messages are passive by default; set triggerTurn: true only when an idle peer must act. Child-to-Main feedback still wakes by default. Non-local targets route over the project mesh.\",\n inputSchema: {\n type: \"object\",\n properties: {\n id: { type: \"string\" }, message: { type: \"string\" }, data: {},\n triggerTurn: { type: \"boolean\", description: \"Root Main targets only: start a turn when idle. Defaults to false for peer-root messages and true for child/actor feedback. False still delivers during an active run.\" },\n },\n required: [\"id\", \"message\"],\n additionalProperties: false,\n },\n risk: \"agent\",\n },\n {\n name: \"setSteeringMode\",\n description:\n \"Set how queued steer messages are delivered to a running one-shot agent: all at once after the current turn, or one per turn (default). Local agent only.\",\n inputSchema: {\n type: \"object\",\n properties: {\n id: { type: \"string\" },\n mode: { type: \"string\", enum: [\"all\", \"one-at-a-time\"] },\n },\n required: [\"id\", \"mode\"],\n additionalProperties: false,\n },\n risk: \"agent\",\n },\n {\n name: \"setFollowUpMode\",\n description:\n \"Set how queued follow-up messages are delivered to a one-shot agent: all when it finishes, or one per completion (default). Local agent only.\",\n inputSchema: {\n type: \"object\",\n properties: {\n id: { type: \"string\" },\n mode: { type: \"string\", enum: [\"all\", \"one-at-a-time\"] },\n },\n required: [\"id\", \"mode\"],\n additionalProperties: false,\n },\n risk: \"agent\",\n },\n {\n name: \"compact\",\n description:\n \"Request an advisory compaction of a running Pi-runner child agent's context at its next safe boundary (between its own turns), preserving the child's accumulated context. Rejected for Claude and Veda children and for registered runners without the compaction capability. The child pi core applies the compaction; Fabric only forwards the intent.\",\n inputSchema: {\n type: \"object\",\n properties: {\n id: { type: \"string\" },\n instructions: {\n type: \"string\",\n description: \"Optional custom compaction instructions forwarded to the child pi\",\n },\n },\n required: [\"id\"],\n additionalProperties: false,\n },\n risk: \"agent\",\n },\n {\n name: \"actorStatus\",\n description: \"Read one persistent actor's status\",\n inputSchema: idSchema,\n risk: \"read\",\n },\n {\n name: \"actors\",\n description:\n 'List persistent actors. Default scope \"project\" lists live actors in this Fabric session; scope \"global\" lists project-independent templates in the global registry.',\n inputSchema: {\n type: \"object\",\n properties: { scope: { type: \"string\", enum: [\"project\", \"global\"] } },\n additionalProperties: false,\n },\n risk: \"read\",\n },\n {\n name: \"messages\",\n description: \"Read a persistent actor's bounded inbox and outbox history\",\n inputSchema: {\n type: \"object\",\n properties: { id: { type: \"string\" }, limit: { type: \"number\", minimum: 1 } },\n required: [\"id\"],\n additionalProperties: false,\n },\n risk: \"read\",\n },\n {\n name: \"setModel\",\n description:\n \"Change or clear a persistent actor model binding. Session scope is the default; project scope explicitly pins the shared definition default.\",\n inputSchema: {\n type: \"object\",\n properties: {\n id: { type: \"string\" },\n model: { type: \"string\" },\n scope: actorBindingScopeSchema,\n },\n required: [\"id\"],\n additionalProperties: false,\n },\n risk: \"agent\",\n },\n {\n name: \"setThinking\",\n description:\n \"Change or clear a persistent actor reasoning-effort binding. Session scope is the default; project scope explicitly pins the shared definition default.\",\n inputSchema: {\n type: \"object\",\n properties: {\n id: { type: \"string\" },\n thinking: runProperties.thinking,\n scope: actorBindingScopeSchema,\n },\n required: [\"id\"],\n additionalProperties: false,\n },\n risk: \"agent\",\n },\n {\n name: \"setTools\",\n description:\n \"Replace a persistent actor's tool allowlist. Takes effect on its next queued message; an empty list disables optional tools.\",\n inputSchema: {\n type: \"object\",\n properties: {\n id: { type: \"string\" },\n tools: runProperties.tools,\n scope: { type: \"string\", enum: [\"project\", \"global\"] },\n },\n required: [\"id\", \"tools\"],\n additionalProperties: false,\n },\n risk: \"agent\",\n },\n {\n name: \"setEvents\",\n description: \"Replace a persistent actor's session-bound Pi and synthetic tool_error event subscriptions\",\n inputSchema: {\n type: \"object\",\n properties: {\n id: { type: \"string\" },\n events: {\n type: \"array\",\n items: {\n type: \"string\",\n enum: [...FABRIC_ACTOR_HOST_EVENTS],\n },\n },\n },\n required: [\"id\", \"events\"],\n additionalProperties: false,\n },\n risk: \"agent\",\n },\n {\n name: \"setDeliveryPolicy\",\n description:\n \"Replace a project actor or global template delivery policy. steer/followUp require an explicit triggerTurn choice; mailbox/nextTurn require false.\",\n inputSchema: {\n type: \"object\",\n properties: {\n id: { type: \"string\" },\n delivery: {\n type: \"string\",\n enum: [\"mailbox\", \"steer\", \"followUp\", \"nextTurn\"],\n },\n triggerTurn: { type: \"boolean\" },\n scope: { type: \"string\", enum: [\"project\", \"global\"] },\n },\n required: [\"id\", \"delivery\", \"triggerTurn\"],\n additionalProperties: false,\n },\n risk: \"agent\",\n },\n {\n name: \"clearMessages\",\n description: \"Clear a persistent actor's recorded message history\",\n inputSchema: idSchema,\n risk: \"write\",\n },\n {\n name: \"remove\",\n description:\n 'Stop and remove a persistent actor. Default scope \"project\" removes a live project actor; scope \"global\" removes a project-independent template from the global registry.',\n inputSchema: {\n type: \"object\",\n properties: {\n id: { type: \"string\" },\n scope: { type: \"string\", enum: [\"project\", \"global\"] },\n },\n required: [\"id\"],\n additionalProperties: false,\n },\n risk: \"agent\",\n },\n {\n name: \"setInstructions\",\n description:\n 'Replace an actor\\'s default instruction (its persona / system-prompt body). Default scope \"project\" edits a live project actor; scope \"global\" edits a project-independent template. Takes effect on the actor\\'s next queued message.',\n inputSchema: {\n type: \"object\",\n properties: {\n id: { type: \"string\" },\n instructions: { type: \"string\" },\n scope: { type: \"string\", enum: [\"project\", \"global\"] },\n },\n required: [\"id\", \"instructions\"],\n additionalProperties: false,\n },\n risk: \"agent\",\n },\n {\n name: \"import\",\n description:\n \"Import a project-independent template from the global registry into the current project as a fresh live actor with no inherited history (no messages, session, or run logs). Identify the template by id or name; optionally rename the imported actor with \\\"as\\\" to avoid colliding with a live actor.\",\n inputSchema: {\n type: \"object\",\n properties: {\n id: { type: \"string\", description: \"Template id or name (one of id/name required)\" },\n name: { type: \"string\", description: \"Template name (one of id/name required)\" },\n as: { type: \"string\", description: \"Optional new name for the imported live actor\" },\n },\n additionalProperties: false,\n },\n risk: \"agent\",\n },\n {\n name: \"export\",\n description:\n \"Export a live project actor's definition to the global registry as a project-independent template, without any history (no messages, session, or run logs). Throws on a name collision unless overwrite is true.\",\n inputSchema: {\n type: \"object\",\n properties: {\n id: { type: \"string\" },\n overwrite: { type: \"boolean\" },\n },\n required: [\"id\"],\n additionalProperties: false,\n },\n risk: \"write\",\n },\n {\n name: \"log\",\n description:\n \"Read an actor or agent run's LLM/agent log: the actor's session transcript (session.jsonl) and/or a retained run's event stream (events.jsonl: tool calls, model responses, usage). Actors retain their last runs so logs survive after success.\",\n inputSchema: {\n type: \"object\",\n properties: {\n id: { type: \"string\", description: \"Actor ID/name or agent run ID\" },\n type: {\n type: \"string\",\n enum: [\"session\", \"run\", \"all\"],\n description:\n \"session = actor session transcript (default for actors); run = last retained run's events; all = both\",\n },\n lines: { type: \"number\", minimum: 1, description: \"Page line limit (default 200)\" },\n before: {\n type: \"number\",\n minimum: 0,\n description: \"Exclusive line cursor returned by a previous page to load older entries\",\n },\n runId: { type: \"string\", description: \"Specific retained run (default: actor's last run)\" },\n },\n required: [\"id\"],\n additionalProperties: false,\n },\n risk: \"read\",\n },\n];\n", "import type { AgentRunRequest } from \"./types.js\";\nimport { isFabricThinking, normalizeThinkingBounds } from \"../thinking.js\";\nimport { aliasThinking, assertExactModelRequest, type FabricModelAliases } from \"../core/model-resolution.js\";\nimport { isFabricRunnerId } from \"./runner-registry.js\";\n\nconst stringArray = (value: unknown): string[] | undefined => {\n if (value === undefined) return undefined;\n if (!Array.isArray(value) || !value.every((entry) => typeof entry === \"string\")) {\n throw new Error(\"Agent tools must be an array of strings\");\n }\n return [...value];\n};\nconst checkedKernel = (value: unknown): AgentRunRequest[\"kernel\"] => {\n if (value === undefined || value === \"inherit\" || value === \"typescript\" || value === \"python\") return value;\n throw new Error(`Invalid Fabric agent kernel: ${String(value)}`);\n};\n\nexport const normalizeAgentRunRequest = (\n args: Record<string, unknown>,\n defaults: {runner: NonNullable<AgentRunRequest[\"runner\"]>; model?: string; timeoutMs: number; inheritedModel?: {provider: string; id: string}; models?: {aliases?: FabricModelAliases}},\n options: {allowCwd?: boolean} = {},\n): AgentRunRequest => {\n const transport =\n args.transport === \"auto\" ||\n args.transport === \"process\" ||\n args.transport === \"tmux\" ||\n args.transport === \"screen\" ||\n args.transport === \"localterm\" ||\n args.transport === \"herdr\" ||\n args.transport === \"herdr-core\"\n ? args.transport\n : undefined;\n // An explicit call or actor level always wins; otherwise an alias can carry\n // the intended effort for the model it selects (e.g. a \"cheap\" alias that is\n // both cheaper and shallower), and the global agents.thinking default applies\n // last, inside the manager.\n const requestedModel =\n typeof args.model === \"string\"\n ? args.model\n : typeof defaults.model === \"string\"\n ? defaults.model\n : undefined;\n // An exact-match request never consults aliases, so no alias level applies either.\n const thinking = isFabricThinking(args.thinking)\n ? args.thinking\n : args.modelMatch === undefined\n ? aliasThinking(defaults.models?.aliases, requestedModel ?? \"\")\n : undefined;\n const tools = stringArray(args.tools);\n const timeoutMs = typeof args.timeoutMs === \"number\" && Number.isFinite(args.timeoutMs) && args.timeoutMs > defaults.timeoutMs ? args.timeoutMs : undefined;\n if (args.runner !== undefined && !isFabricRunnerId(args.runner)) {\n throw new Error(`Invalid Fabric agent runner: ${JSON.stringify(args.runner)}`);\n }\n const runner = args.runner ?? defaults.runner;\n assertExactModelRequest({ modelMatch: args.modelMatch, runner, model: args.model });\n const inheritedModel =\n (runner === \"pi\" || runner === \"pi-durable\") && !defaults.model && defaults.inheritedModel\n ? `${defaults.inheritedModel.provider}/${defaults.inheritedModel.id}`\n : undefined;\n const kernel = checkedKernel(args.kernel);\n const thinkingBounds = args.thinkingBounds === undefined\n ? undefined\n : normalizeThinkingBounds(args.thinkingBounds, \"thinkingBounds\");\n if (args.recursive === true && args.extensions === false) {\n throw new Error(\"Recursive Fabric requires extensions enabled; omit recursive or extensions: false\");\n }\n return {\n task: String(args.task),\n runner,\n ...(kernel !== undefined ? { kernel } : {}),\n ...(typeof args.name === \"string\" ? { name: args.name } : {}),\n ...(transport ? { transport } : {}),\n ...(typeof args.model === \"string\"\n ? { model: args.model }\n : inheritedModel\n ? { model: inheritedModel }\n : {}),\n ...(args.modelMatch === \"exact\" ? { modelMatch: \"exact\" as const } : {}),\n // Shape is checked fail-closed by the manager; only a literal true holds.\n ...(args.holdQuestions !== undefined && args.holdQuestions !== false\n ? { holdQuestions: args.holdQuestions as true }\n : {}),\n ...(args.queue === true ? { queue: true as const } : {}),\n ...(typeof args.persona === \"string\" && args.persona.trim()\n ? { persona: args.persona.trim() }\n : {}),\n ...(thinking ? { thinking } : {}),\n ...(thinkingBounds ? { thinkingBounds } : {}),\n ...(tools ? { tools } : {}),\n ...(timeoutMs !== undefined ? { timeoutMs } : {}),\n ...(typeof args.extensions === \"boolean\"\n ? { extensions: args.extensions }\n : args.recursive === true ? { extensions: true } : {}),\n ...(typeof args.recursive === \"boolean\" ? { recursive: args.recursive } : {}),\n ...(options.allowCwd !== false && typeof args.cwd === \"string\" ? { cwd: args.cwd } : {}),\n ...(typeof args.worktree === \"boolean\" ? { worktree: args.worktree } : {}),\n ...(args.worktreeSetup !== undefined ? { worktreeSetup: args.worktreeSetup as string } : {}),\n // Shapes are checked fail-closed by the manager before launch.\n ...(args.readOnly !== undefined ? { readOnly: args.readOnly as boolean } : {}),\n ...(args.writableRoots !== undefined ? { writableRoots: args.writableRoots as string[] } : {}),\n ...(args.shell !== undefined ? { shell: args.shell as \"deny\" | \"unconfined\" } : {}),\n ...(args.scope !== undefined ? { scope: args.scope as NonNullable<AgentRunRequest[\"scope\"]> } : {}),\n ...(args.residency === \"session\" || args.residency === \"durable\"\n ? { residency: args.residency }\n : {}),\n ...(typeof args.persistSession === \"boolean\"\n ? { persistSession: args.persistSession }\n : {}),\n ...(typeof args.schema === \"object\" && args.schema !== null && !Array.isArray(args.schema)\n ? { schema: args.schema as Record<string, unknown> }\n : {}),\n ...(typeof args.systemPrompt === \"string\" && args.systemPrompt.trim()\n ? { systemPrompt: args.systemPrompt }\n : {}),\n };\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAS,qBAAqB;AAevB,IAAM,+BAA+B;AAErC,IAAM,yBAAyB;AAE/B,IAAM,qBAAqB;AAAA,EAChC,MAAM;AAAA,EAAU,sBAAsB;AAAA,EAAO,UAAU,CAAC,UAAU;AAAA,EAClE,YAAY;AAAA,IACV,UAAU,EAAE,MAAM,UAAU,MAAM,CAAC,MAAM,MAAM,GAAG,aAAa,8GAA8G;AAAA,IAC7K,WAAW,EAAE,MAAM,WAAW,SAAS,KAAM,SAAS,MAAS,aAAa,gLAAgL;AAAA,IAC5P,YAAY,EAAE,MAAM,WAAW,SAAS,KAAM,SAAS,KAAO,aAAa,iFAAiF;AAAA,IAC5J,OAAO,EAAE,MAAM,UAAU,WAAW,GAAG,WAAW,KAAK,aAAa,0FAA0F;AAAA,EAChK;AACF;AAEO,SAAS,kBAAkB,OAAiD;AACjF,MAAI,UAAU,OAAW,QAAO;AAChC,MAAI,CAAC,SAAS,OAAO,UAAU,YAAY,MAAM,QAAQ,KAAK,EAAG,OAAM,IAAI,MAAM,2BAA2B;A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,OAAkC,IACjD,CAAC;AAAA,IACL,GAAI,OAAO,KAAK,iBAAiB,YAAY,KAAK,aAAa,KAAK,IAChE,EAAE,cAAc,KAAK,aAAa,IAClC,CAAC;AAAA,EACP;AACF;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
import {
|
|
2
|
+
diffLineNumberWidth,
|
|
3
|
+
formatDiffLineNumber,
|
|
4
|
+
parseDiffLine
|
|
5
|
+
} from "./chunk-F2LGSRIN.js";
|
|
1
6
|
import {
|
|
2
7
|
ansi256ToRgb,
|
|
3
8
|
effectiveShikiThemeIsLight,
|
|
@@ -8,12 +13,7 @@ import {
|
|
|
8
13
|
observePiTheme,
|
|
9
14
|
observedThemeVariant,
|
|
10
15
|
shikiLanguages
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import {
|
|
13
|
-
diffLineNumberWidth,
|
|
14
|
-
formatDiffLineNumber,
|
|
15
|
-
parseDiffLine
|
|
16
|
-
} from "./chunk-F2LGSRIN.js";
|
|
16
|
+
} from "./chunk-X4HDI7RT.js";
|
|
17
17
|
import {
|
|
18
18
|
countContentLines,
|
|
19
19
|
headlineArg,
|
|
@@ -314,6 +314,7 @@ var nativeTruncated = (audit) => {
|
|
|
314
314
|
const truncation = recordOf(resultDetails(audit)?.truncation);
|
|
315
315
|
return truncation?.truncated === true || audit.resultTruncated === true;
|
|
316
316
|
};
|
|
317
|
+
var READ_OVERSIZED_LINE_NOTICE = /^\[Line \d+ is [^\r\n]+, exceeds [^\r\n]+ limit\. Use bash: [^\r\n]+\]$/;
|
|
317
318
|
var READ_CONTINUATION_NOTICE = /^\[(?:Showing lines \d+-\d+ of \d+(?: \([^)]+\))?|\d+ more lines in file)\. Use offset=\d+ to continue\.\]$/;
|
|
318
319
|
var splitReadContinuationNotice = (text) => {
|
|
319
320
|
const match = /^(.*?)(?:\r?\n){2}(\[[^\r\n]+\])$/s.exec(text);
|
|
@@ -952,6 +953,9 @@ var renderRead = (audit, theme, options) => {
|
|
|
952
953
|
return { lines: [theme.fg("dim", escapeControlChars(output))], hidden: 0 };
|
|
953
954
|
}
|
|
954
955
|
const truncated = nativeTruncated(audit);
|
|
956
|
+
if (truncated && READ_OVERSIZED_LINE_NOTICE.test(output)) {
|
|
957
|
+
return { lines: [arcItem(theme, escapeControlChars(output.slice(1, -1)))], hidden: 0 };
|
|
958
|
+
}
|
|
955
959
|
const { content, notice } = truncated || typeof audit.args?.limit === "number" ? splitReadContinuationNotice(output) : { content: output };
|
|
956
960
|
const rendered = renderContent(content, filePath, theme, options, {
|
|
957
961
|
lineNumbers: options.settings.readLineNumbers,
|
|
@@ -1857,11 +1861,17 @@ var renderFabricWriteArgumentPreview = (input, theme, invalidate) => {
|
|
|
1857
1861
|
}
|
|
1858
1862
|
return renderBoundedLines(rows);
|
|
1859
1863
|
};
|
|
1860
|
-
var shortIdOf = (value) => typeof value === "string" ? value.slice(0, 8) : void 0;
|
|
1864
|
+
var shortIdOf = (value) => typeof value === "string" ? value.startsWith("session:") ? `session:${value.slice(8, 16)}` : value.slice(0, 8) : void 0;
|
|
1861
1865
|
var countOf = (result) => Array.isArray(result) ? String(result.length) : "";
|
|
1862
1866
|
var providerCallDetail = (provider, tool, args, result, preview, previewHeadline) => {
|
|
1863
1867
|
if (provider === "agents") {
|
|
1864
1868
|
if (previewHeadline) return previewHeadline;
|
|
1869
|
+
if (preview && typeof preview === "object" && !Array.isArray(preview)) {
|
|
1870
|
+
const target = preview;
|
|
1871
|
+
if (target.kind === "fabric-agent-target" && target.id === args.id && typeof target.name === "string" && target.name.trim()) {
|
|
1872
|
+
return truncateOneLine(target.name, 80);
|
|
1873
|
+
}
|
|
1874
|
+
}
|
|
1865
1875
|
const name = argString2(args, "name");
|
|
1866
1876
|
const previewName = isFabricAgentToolPreview(preview) ? preview.name : void 0;
|
|
1867
1877
|
const id = shortIdOf(args.id);
|
|
@@ -2177,9 +2187,6 @@ var renderFabricMulticallPartial = (input, theme, invalidate) => {
|
|
|
2177
2187
|
const progress = input.progress ? compactProgressPreview(input.progress) : "";
|
|
2178
2188
|
if (progress) header += theme.fg("dim", ` \xB7 ${progress}`);
|
|
2179
2189
|
const rows = [header];
|
|
2180
|
-
if (input.audits.some(shellBackgroundShortcut)) {
|
|
2181
|
-
rows.push(theme.fg("dim", "Ctrl+B twice \xB7 background waiting shell"));
|
|
2182
|
-
}
|
|
2183
2190
|
const wrapLineIndexes = input.expanded ? /* @__PURE__ */ new Set() : void 0;
|
|
2184
2191
|
if (input.phases.length > 0) {
|
|
2185
2192
|
rows.push(theme.fg("dim", input.phases.map((phase) => `\u25C6 ${phase}`).join(" ")));
|
|
@@ -2229,6 +2236,9 @@ var renderFabricMulticallPartial = (input, theme, invalidate) => {
|
|
|
2229
2236
|
theme.fg("dim", label) + (input.expanded ? "" : theme.fg("dim", " \xB7 ") + expandHint(theme))
|
|
2230
2237
|
);
|
|
2231
2238
|
}
|
|
2239
|
+
if (input.audits.some(shellBackgroundShortcut)) {
|
|
2240
|
+
pushArcItem(rows, arcItem(theme, "(ctrl+b to run in background)"));
|
|
2241
|
+
}
|
|
2232
2242
|
return renderBoundedLines(
|
|
2233
2243
|
rows,
|
|
2234
2244
|
theme,
|
|
@@ -2322,7 +2332,8 @@ var restoreFabricCallHeadlinePreviews = (audits, previews) => {
|
|
|
2322
2332
|
const index = remaining.findIndex((preview2) => preview2.ref === audit.ref);
|
|
2323
2333
|
if (index < 0) return audit;
|
|
2324
2334
|
const [preview] = remaining.splice(index, 1);
|
|
2325
|
-
|
|
2335
|
+
const peerControl = audit.ref === "agents.steer" || audit.ref === "agents.followUp";
|
|
2336
|
+
if (!peerControl && headlineArg(audit.args) || !preview) return audit;
|
|
2326
2337
|
return { ...audit, previewHeadline: preview.headline };
|
|
2327
2338
|
});
|
|
2328
2339
|
};
|
|
@@ -2494,9 +2505,12 @@ var formatJsonAsYaml = (value) => {
|
|
|
2494
2505
|
return (yaml ??= require3(fileURLToPath(import.meta.resolve("yaml")))).stringify(normalized, { indent: 2, lineWidth: 0 }).trimEnd();
|
|
2495
2506
|
};
|
|
2496
2507
|
var isPlainObject = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
2497
|
-
var hoistMultilineStrings = (value, path, sections, seen) => {
|
|
2508
|
+
var hoistMultilineStrings = (value, path, sections, seen, sectionByText) => {
|
|
2498
2509
|
if (typeof value === "string") {
|
|
2499
2510
|
if (!value.includes("\n")) return value;
|
|
2511
|
+
const priorPath = sectionByText.get(value);
|
|
2512
|
+
if (priorPath !== void 0) return `<multi-line string, see section: ${priorPath}>`;
|
|
2513
|
+
sectionByText.set(value, path);
|
|
2500
2514
|
sections.push({ path, text: value });
|
|
2501
2515
|
return `<multi-line string, see section: ${path}>`;
|
|
2502
2516
|
}
|
|
@@ -2504,7 +2518,7 @@ var hoistMultilineStrings = (value, path, sections, seen) => {
|
|
|
2504
2518
|
if (seen.has(value)) return "[circular reference]";
|
|
2505
2519
|
seen.add(value);
|
|
2506
2520
|
const skeleton = value.map(
|
|
2507
|
-
(item, index) => hoistMultilineStrings(item, `${path}[${index}]`, sections, seen)
|
|
2521
|
+
(item, index) => hoistMultilineStrings(item, `${path}[${index}]`, sections, seen, sectionByText)
|
|
2508
2522
|
);
|
|
2509
2523
|
seen.delete(value);
|
|
2510
2524
|
return skeleton;
|
|
@@ -2518,7 +2532,8 @@ var hoistMultilineStrings = (value, path, sections, seen) => {
|
|
|
2518
2532
|
item,
|
|
2519
2533
|
path ? `${path}.${key}` : key,
|
|
2520
2534
|
sections,
|
|
2521
|
-
seen
|
|
2535
|
+
seen,
|
|
2536
|
+
sectionByText
|
|
2522
2537
|
);
|
|
2523
2538
|
}
|
|
2524
2539
|
seen.delete(value);
|
|
@@ -2575,7 +2590,7 @@ var formatFabricValue = (value, format, maxChars) => {
|
|
|
2575
2590
|
if (typeof value === "string") return { text: value };
|
|
2576
2591
|
if (format === "auto" || format === "yaml") {
|
|
2577
2592
|
const sections = [];
|
|
2578
|
-
const skeleton = hoistMultilineStrings(value, "", sections, /* @__PURE__ */ new Set());
|
|
2593
|
+
const skeleton = hoistMultilineStrings(value, "", sections, /* @__PURE__ */ new Set(), /* @__PURE__ */ new Map());
|
|
2579
2594
|
const yaml2 = formatJsonAsYaml(skeleton);
|
|
2580
2595
|
if (yaml2 !== void 0) {
|
|
2581
2596
|
if (sections.length === 0) return { text: yaml2, language: "yaml" };
|
|
@@ -2598,7 +2613,9 @@ var formatFabricValue = (value, format, maxChars) => {
|
|
|
2598
2613
|
|
|
2599
2614
|
export {
|
|
2600
2615
|
continueArcGroup,
|
|
2616
|
+
arcItem,
|
|
2601
2617
|
arcItemStyled,
|
|
2618
|
+
pushArcItem,
|
|
2602
2619
|
isCoreToolAudit,
|
|
2603
2620
|
coreToolRendererEnabled,
|
|
2604
2621
|
coreToolPreviewEnabled,
|
|
@@ -2630,4 +2647,4 @@ export {
|
|
|
2630
2647
|
formatJsonAsYaml,
|
|
2631
2648
|
formatFabricValue
|
|
2632
2649
|
};
|
|
2633
|
-
//# sourceMappingURL=chunk-
|
|
2650
|
+
//# sourceMappingURL=chunk-SVQ7ZHEQ.js.map
|