@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
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/residency/protocol.ts"],
|
|
4
|
-
"sourcesContent": ["import { createHash } from \"node:crypto\";\nimport fs from \"node:fs\";\nimport path from \"node:path\";\nimport type { FabricOwnedModelGuidance } from \"../components/model-guidance.js\";\nimport type { FabricModelAliases, FabricModelCandidate } from \"../core/model-resolution.js\";\nimport type { FabricAgentConfig, FabricMeshConfig, FabricRetentionConfig } from \"../config.js\";\nimport type { FabricActorInfo, FabricActorRequest } from \"../actors/types.js\";\nimport type { AgentHandleInfo, AgentRunRequest, FabricRunOutcome } from \"../agents/types.js\";\nimport type { FabricKernel } from \"../runtime/kernel.js\";\nimport type { MeshIdentity } from \"../mesh/store.js\";\nimport type { OwnerHeartbeatFields } from \"../core/atomic-write.js\";\nimport type { FabricScope } from \"../protocol.js\";\nexport const sleepUnlessAborted = (ms: number, signal?: AbortSignal): Promise<void> =>\n // Executor form: the configured lib is ES2022, which has no\n // Promise.withResolvers, and an abort listener plus a timer need shared\n // completion control.\n new Promise<void>((resolve, reject) => {\n const aborted = (): Error =>\n signal?.reason instanceof Error ? signal.reason : new Error(\"Fabric residency request was aborted\");\n if (signal?.aborted) {\n reject(aborted());\n return;\n }\n const timer = setTimeout(() => {\n signal?.removeEventListener(\"abort\", onAbort);\n resolve();\n }, Math.max(0, ms));\n timer.unref?.();\n const onAbort = (): void => {\n clearTimeout(timer);\n reject(aborted());\n };\n signal?.addEventListener(\"abort\", onAbort, { once: true });\n });\n\n/**\n * Remove an abandoned file-exchange request. The resident host renames\n * unstarted requests out of `requests/` before running them, so deleting our\n * file cancels work the host has not picked up yet; a late host response is\n * removed as well. Deleting a request the host already moved is a no-op, and\n * in-flight work still runs to completion. Best effort: never throws.\n */\nexport const abandonResidentRequest = (\n requestsPath: string,\n responsesPath: string,\n requestId: string,\n): void => {\n for (const directory of [requestsPath, responsesPath]) {\n try {\n fs.rmSync(path.join(directory, `${requestId}.json`), { force: true });\n } catch { /* best effort: an abandoned request must not raise a second error */ }\n }\n};\n\nexport const RESIDENT_HOST_FORMAT = 1 as const;\nconst RESIDENT_DELIVERY_PREFIX = \"residency/deliveries/\";\n\nconst digest = (value: string): string =>\n createHash(\"sha256\").update(value).digest(\"hex\");\n\nexport const residentHostId = (rootId: string): string =>\n `resident:${digest(rootId).slice(0, 24)}`;\n\nexport const residentRoot = (meshRoot: string, rootId: string): string =>\n path.join(meshRoot, \"residency\", digest(rootId));\n\nexport const residentDeliveryPrefix = (rootId: string): string =>\n `${RESIDENT_DELIVERY_PREFIX}${digest(rootId).slice(0, 32)}/`;\n\nexport interface ResidentPiModelState {\n available: FabricModelCandidate[];\n aliases: FabricModelAliases;\n defaultModel?: string;\n}\n\nexport interface ResidentHostConfig {\n format: typeof RESIDENT_HOST_FORMAT;\n rootId: string;\n sessionId: string;\n cwd: string;\n projectRoot: string;\n meshRoot: string;\n actorRoot: string;\n sessionActorRoot?: string;\n residencyRoot: string;\n fullCodeMode: boolean;\n kernel?: FabricKernel;\n pythonRuntime?: \"cpython\" | \"monty\";\n agents: FabricAgentConfig;\n mesh: FabricMeshConfig;\n retention: FabricRetentionConfig;\n workerPath: string;\n fabricExtensionPath: string;\n piBinary: string;\n claudeBinary: string;\n vedaBinary: string;\n piModels?: ResidentPiModelState;\n modelGuidance?: FabricOwnedModelGuidance[];\n}\n\n// `identity` and `heartbeatAt` are additive (format stays 1): they let a\n// reader in another PID namespace judge the owner by heartbeat.\nexport interface ResidentHostOwner extends OwnerHeartbeatFields {\n format: typeof RESIDENT_HOST_FORMAT;\n hostId: string;\n pid: number;\n token: string;\n startedAt: number;\n readyAt: number;\n}\n\ninterface ResidentSpawnCommand {\n format: typeof RESIDENT_HOST_FORMAT;\n operation: \"spawn\";\n requestId: string;\n rootId: string;\n /** Carries the host-only recursiveToolAuthority deny cap. Absence is not a grant;\n * the receiving manager also applies its own inherited authority. Format stays 1. */\n request: AgentRunRequest;\n /** A registered runner's residentModule, imported by the host before launch. */\n runnerModule?: string;\n createdAt: number;\n}\n\ninterface ResidentCleanupCommand {\n format: typeof RESIDENT_HOST_FORMAT;\n operation: \"cleanup\";\n requestId: string;\n rootId: string;\n id: string;\n deleteBranch: boolean;\n createdAt: number;\n}\n\ninterface ResidentForegroundCommand {\n format: typeof RESIDENT_HOST_FORMAT;\n operation: \"foreground\";\n requestId: string;\n rootId: string;\n id: string;\n createdAt: number;\n}\n\ninterface ResidentRemoveActorCommand {\n format: typeof RESIDENT_HOST_FORMAT;\n operation: \"removeActor\";\n requestId: string;\n rootId: string;\n id: string;\n createdAt: number;\n}\n\ninterface ResidentCreateActorCommand {\n format: typeof RESIDENT_HOST_FORMAT;\n operation: \"createActor\";\n requestId: string;\n rootId: string;\n request: FabricActorRequest;\n createdAt: number;\n}\n\nexport type ResidentCommand =\n | ResidentSpawnCommand\n | ResidentCleanupCommand\n | ResidentForegroundCommand\n | ResidentRemoveActorCommand\n | ResidentCreateActorCommand;\n\nexport interface ResidentCommandResponse {\n format: typeof RESIDENT_HOST_FORMAT;\n requestId: string;\n ok: boolean;\n handle?: AgentHandleInfo;\n actor?: FabricActorInfo;\n error?: string;\n /** Set when a claimed request was interrupted; the same concept as a run record's outcome. */\n outcome?: FabricRunOutcome;\n completedAt: number;\n}\n\nexport interface ResidentAgentMetadata {\n format: typeof RESIDENT_HOST_FORMAT;\n rootId: string;\n id: string;\n runDirectory: string;\n handle: AgentHandleInfo;\n worktreeGitRoot?: string;\n /** Imported again by a restarted host before it re-attaches hosted runs. */\n runnerModule?: string;\n /** The scope the durable child launched with (forwarded by the requesting session). */\n scope?: FabricScope;\n /** Main consumed this terminal result; suppress queued delivery across reconnects. */\n completionConsumedAt?: number;\n createdAt: number;\n updatedAt: number;\n}\n\nexport interface ResidentDeliveryRecord {\n format: typeof RESIDENT_HOST_FORMAT;\n /** Survives payload truncation; lets Main read the authoritative terminal result. */\n agentCompletionId?: string;\n id: string;\n rootId: string;\n from: MeshIdentity;\n delivery: \"steer\" | \"followUp\";\n triggerTurn: boolean;\n message: string;\n data?: unknown;\n createdAt: number;\n}\n"],
|
|
4
|
+
"sourcesContent": ["import { createHash } from \"node:crypto\";\nimport fs from \"node:fs\";\nimport path from \"node:path\";\nimport type { FabricOwnedModelGuidance } from \"../components/model-guidance.js\";\nimport type { FabricModelAliases, FabricModelCandidate } from \"../core/model-resolution.js\";\nimport type { FabricAgentConfig, FabricMeshConfig, FabricRetentionConfig } from \"../config.js\";\nimport type { FabricActorInfo, FabricActorRequest } from \"../actors/types.js\";\nimport type { AgentHandleInfo, AgentRunRequest, FabricRunOutcome } from \"../agents/types.js\";\nimport type { FabricKernel } from \"../runtime/kernel.js\";\nimport type { MeshIdentity } from \"../mesh/store.js\";\nimport type { OwnerHeartbeatFields } from \"../core/atomic-write.js\";\nimport type { FabricScope } from \"../protocol.js\";\nexport const sleepUnlessAborted = (ms: number, signal?: AbortSignal): Promise<void> =>\n // Executor form: the configured lib is ES2022, which has no\n // Promise.withResolvers, and an abort listener plus a timer need shared\n // completion control.\n new Promise<void>((resolve, reject) => {\n const aborted = (): Error =>\n signal?.reason instanceof Error ? signal.reason : new Error(\"Fabric residency request was aborted\");\n if (signal?.aborted) {\n reject(aborted());\n return;\n }\n const timer = setTimeout(() => {\n signal?.removeEventListener(\"abort\", onAbort);\n resolve();\n }, Math.max(0, ms));\n timer.unref?.();\n const onAbort = (): void => {\n clearTimeout(timer);\n reject(aborted());\n };\n signal?.addEventListener(\"abort\", onAbort, { once: true });\n });\n\n/**\n * Remove an abandoned file-exchange request. The resident host renames\n * unstarted requests out of `requests/` before running them, so deleting our\n * file cancels work the host has not picked up yet; a late host response is\n * removed as well. Deleting a request the host already moved is a no-op, and\n * in-flight work still runs to completion. Best effort: never throws.\n */\nexport const abandonResidentRequest = (\n requestsPath: string,\n responsesPath: string,\n requestId: string,\n): void => {\n for (const directory of [requestsPath, responsesPath]) {\n try {\n fs.rmSync(path.join(directory, `${requestId}.json`), { force: true });\n } catch { /* best effort: an abandoned request must not raise a second error */ }\n }\n};\n\nexport const RESIDENT_HOST_FORMAT = 1 as const;\nconst RESIDENT_DELIVERY_PREFIX = \"residency/deliveries/\";\n\nconst digest = (value: string): string =>\n createHash(\"sha256\").update(value).digest(\"hex\");\n\nexport const residentHostId = (rootId: string): string =>\n `resident:${digest(rootId).slice(0, 24)}`;\n\nexport const residentRoot = (meshRoot: string, rootId: string): string =>\n path.join(meshRoot, \"residency\", digest(rootId));\n\nexport const residentDeliveryPrefix = (rootId: string): string =>\n `${RESIDENT_DELIVERY_PREFIX}${digest(rootId).slice(0, 32)}/`;\n\nexport interface ResidentPiModelState {\n available: FabricModelCandidate[];\n aliases: FabricModelAliases;\n defaultModel?: string;\n}\n\nexport interface ResidentHostConfig {\n format: typeof RESIDENT_HOST_FORMAT;\n rootId: string;\n sessionId: string;\n cwd: string;\n projectRoot: string;\n meshRoot: string;\n actorRoot: string;\n sessionActorRoot?: string;\n residencyRoot: string;\n fullCodeMode: boolean;\n kernel?: FabricKernel;\n pythonRuntime?: \"cpython\" | \"monty\";\n agents: FabricAgentConfig;\n mesh: FabricMeshConfig;\n retention: FabricRetentionConfig;\n workerPath: string;\n fabricExtensionPath: string;\n piBinary: string;\n claudeBinary: string;\n vedaBinary: string;\n piModels?: ResidentPiModelState;\n modelGuidance?: FabricOwnedModelGuidance[];\n}\n\n// `identity` and `heartbeatAt` are additive (format stays 1): they let a\n// reader in another PID namespace judge the owner by heartbeat.\nexport interface ResidentHostOwner extends OwnerHeartbeatFields {\n format: typeof RESIDENT_HOST_FORMAT;\n hostId: string;\n pid: number;\n token: string;\n startedAt: number;\n readyAt: number;\n}\n\ninterface ResidentSpawnCommand {\n format: typeof RESIDENT_HOST_FORMAT;\n operation: \"spawn\";\n requestId: string;\n rootId: string;\n /** Carries the host-only recursiveToolAuthority deny cap. Absence is not a grant;\n * the receiving manager also applies its own inherited authority. Format stays 1. */\n request: AgentRunRequest;\n /** A registered runner's residentModule, imported by the host before launch. */\n runnerModule?: string;\n createdAt: number;\n}\n\ninterface ResidentCleanupCommand {\n format: typeof RESIDENT_HOST_FORMAT;\n operation: \"cleanup\";\n requestId: string;\n rootId: string;\n id: string;\n deleteBranch: boolean;\n createdAt: number;\n}\n\ninterface ResidentForegroundCommand {\n format: typeof RESIDENT_HOST_FORMAT;\n operation: \"foreground\";\n requestId: string;\n rootId: string;\n id: string;\n createdAt: number;\n}\n\ninterface ResidentRemoveActorCommand {\n format: typeof RESIDENT_HOST_FORMAT;\n operation: \"removeActor\";\n requestId: string;\n rootId: string;\n id: string;\n createdAt: number;\n}\n\ninterface ResidentCreateActorCommand {\n format: typeof RESIDENT_HOST_FORMAT;\n operation: \"createActor\";\n requestId: string;\n rootId: string;\n request: FabricActorRequest;\n createdAt: number;\n}\n\nexport type ResidentCommand =\n | ResidentSpawnCommand\n | ResidentCleanupCommand\n | ResidentForegroundCommand\n | ResidentRemoveActorCommand\n | ResidentCreateActorCommand;\n\nexport interface ResidentCommandResponse {\n format: typeof RESIDENT_HOST_FORMAT;\n requestId: string;\n ok: boolean;\n handle?: AgentHandleInfo;\n actor?: FabricActorInfo;\n error?: string;\n /** Set when a claimed request was interrupted; the same concept as a run record's outcome. */\n outcome?: FabricRunOutcome;\n completedAt: number;\n}\n\nexport interface ResidentAgentMetadata {\n format: typeof RESIDENT_HOST_FORMAT;\n rootId: string;\n id: string;\n runDirectory: string;\n handle: AgentHandleInfo;\n worktreeGitRoot?: string;\n /** Creation-time relative root; absent in legacy metadata. */\n worktreeRoot?: string;\n /** Imported again by a restarted host before it re-attaches hosted runs. */\n runnerModule?: string;\n /** The scope the durable child launched with (forwarded by the requesting session). */\n scope?: FabricScope;\n /** Main consumed this terminal result; suppress queued delivery across reconnects. */\n completionConsumedAt?: number;\n createdAt: number;\n updatedAt: number;\n}\n\nexport interface ResidentDeliveryRecord {\n format: typeof RESIDENT_HOST_FORMAT;\n /** Survives payload truncation; lets Main read the authoritative terminal result. */\n agentCompletionId?: string;\n id: string;\n rootId: string;\n from: MeshIdentity;\n delivery: \"steer\" | \"followUp\";\n triggerTurn: boolean;\n message: string;\n data?: unknown;\n createdAt: number;\n}\n"],
|
|
5
5
|
"mappings": ";AAAA,SAAS,kBAAkB;AAC3B,OAAO,QAAQ;AACf,OAAO,UAAU;AAUV,IAAM,qBAAqB,CAAC,IAAY;AAAA;AAAA;AAAA;AAAA,EAI7C,IAAI,QAAc,CAAC,SAAS,WAAW;AACrC,UAAM,UAAU,MACd,QAAQ,kBAAkB,QAAQ,OAAO,SAAS,IAAI,MAAM,sCAAsC;AACpG,QAAI,QAAQ,SAAS;AACnB,aAAO,QAAQ,CAAC;AAChB;AAAA,IACF;AACA,UAAM,QAAQ,WAAW,MAAM;AAC7B,cAAQ,oBAAoB,SAAS,OAAO;AAC5C,cAAQ;AAAA,IACV,GAAG,KAAK,IAAI,GAAG,EAAE,CAAC;AAClB,UAAM,QAAQ;AACd,UAAM,UAAU,MAAY;AAC1B,mBAAa,KAAK;AAClB,aAAO,QAAQ,CAAC;AAAA,IAClB;AACA,YAAQ,iBAAiB,SAAS,SAAS,EAAE,MAAM,KAAK,CAAC;AAAA,EAC3D,CAAC;AAAA;AASI,IAAM,yBAAyB,CACpC,cACA,eACA,cACS;AACT,aAAW,aAAa,CAAC,cAAc,aAAa,GAAG;AACrD,QAAI;AACF,SAAG,OAAO,KAAK,KAAK,WAAW,GAAG,SAAS,OAAO,GAAG,EAAE,OAAO,KAAK,CAAC;AAAA,IACtE,QAAQ;AAAA,IAAwE;AAAA,EAClF;AACF;AAEO,IAAM,uBAAuB;AACpC,IAAM,2BAA2B;AAEjC,IAAM,SAAS,CAAC,UACd,WAAW,QAAQ,EAAE,OAAO,KAAK,EAAE,OAAO,KAAK;AAE1C,IAAM,iBAAiB,CAAC,WAC7B,YAAY,OAAO,MAAM,EAAE,MAAM,GAAG,EAAE,CAAC;AAElC,IAAM,eAAe,CAAC,UAAkB,WAC7C,KAAK,KAAK,UAAU,aAAa,OAAO,MAAM,CAAC;AAE1C,IAAM,yBAAyB,CAAC,WACrC,GAAG,wBAAwB,GAAG,OAAO,MAAM,EAAE,MAAM,GAAG,EAAE,CAAC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,6 +1,17 @@
|
|
|
1
|
+
// src/ui/truncate.ts
|
|
2
|
+
import { truncateToWidth, visibleWidth } from "@earendil-works/pi-tui";
|
|
3
|
+
var RESET = "\x1B[0m";
|
|
4
|
+
var truncateStyledText = (text, width, ellipsis = "...") => {
|
|
5
|
+
const truncated = truncateToWidth(text, width, ellipsis);
|
|
6
|
+
if (!ellipsis || width <= 0 || truncated === text) return truncated;
|
|
7
|
+
const marker = visibleWidth(ellipsis) > width ? truncateToWidth(ellipsis, width, "").replace(/\x1b\[0m$/, "") : ellipsis;
|
|
8
|
+
const suffix = `${RESET}${marker}${RESET}`;
|
|
9
|
+
return truncated.endsWith(suffix) ? truncated.slice(0, -suffix.length) + marker + RESET : truncated;
|
|
10
|
+
};
|
|
11
|
+
|
|
1
12
|
// src/ui/format.ts
|
|
2
13
|
import { stripVTControlCharacters } from "node:util";
|
|
3
|
-
import {
|
|
14
|
+
import { visibleWidth as visibleWidth2 } from "@earendil-works/pi-tui";
|
|
4
15
|
var safeText = (value) => String(value ?? "").replace(/\x1b\[[0-?]*[ -/]*[@-~]/g, "").replace(/[\u0000-\u0008\u000b-\u001f\u007f-\u009f]/g, " ").replace(/[\r\n\t]+/g, " ").replace(/\s+/g, " ").trim();
|
|
5
16
|
var formatActorDataPreview = (data, maxChars = 200) => {
|
|
6
17
|
if (data === void 0) return void 0;
|
|
@@ -40,8 +51,8 @@ var formatTokens = (tokens) => {
|
|
|
40
51
|
var formatCost = (usd) => usd <= 0 ? "$0" : usd < 0.01 ? `$${usd.toFixed(4)}` : usd < 1 ? `$${usd.toFixed(3)}` : `$${usd.toFixed(2)}`;
|
|
41
52
|
var formatClock = (timestamp) => new Date(timestamp).toLocaleTimeString([], { hour: "2-digit", minute: "2-digit" });
|
|
42
53
|
var padToWidth = (value, width) => {
|
|
43
|
-
const clipped =
|
|
44
|
-
return clipped + " ".repeat(Math.max(0, width -
|
|
54
|
+
const clipped = truncateStyledText(value, Math.max(0, width), "");
|
|
55
|
+
return clipped + " ".repeat(Math.max(0, width - visibleWidth2(clipped)));
|
|
45
56
|
};
|
|
46
57
|
var wrapPlainText = (value, width, maxLines = 100) => {
|
|
47
58
|
const safe = safeText(value);
|
|
@@ -51,13 +62,13 @@ var wrapPlainText = (value, width, maxLines = 100) => {
|
|
|
51
62
|
let current = "";
|
|
52
63
|
for (const word of words) {
|
|
53
64
|
const candidate = current ? `${current} ${word}` : word;
|
|
54
|
-
if (
|
|
65
|
+
if (visibleWidth2(candidate) <= width) {
|
|
55
66
|
current = candidate;
|
|
56
67
|
continue;
|
|
57
68
|
}
|
|
58
|
-
if (current) lines.push(
|
|
69
|
+
if (current) lines.push(truncateStyledText(current, width));
|
|
59
70
|
current = word;
|
|
60
|
-
while (
|
|
71
|
+
while (visibleWidth2(current) > width && lines.length < maxLines) {
|
|
61
72
|
let chunk = "";
|
|
62
73
|
let consumed = 0;
|
|
63
74
|
const segments = [
|
|
@@ -65,7 +76,7 @@ var wrapPlainText = (value, width, maxLines = 100) => {
|
|
|
65
76
|
];
|
|
66
77
|
for (const { segment } of segments) {
|
|
67
78
|
const candidate2 = chunk + segment;
|
|
68
|
-
if (
|
|
79
|
+
if (visibleWidth2(candidate2) > width) {
|
|
69
80
|
if (!chunk) {
|
|
70
81
|
chunk = "\u2026";
|
|
71
82
|
consumed += segment.length;
|
|
@@ -80,7 +91,7 @@ var wrapPlainText = (value, width, maxLines = 100) => {
|
|
|
80
91
|
}
|
|
81
92
|
if (lines.length >= maxLines) break;
|
|
82
93
|
}
|
|
83
|
-
if (current && lines.length < maxLines) lines.push(
|
|
94
|
+
if (current && lines.length < maxLines) lines.push(truncateStyledText(current, width));
|
|
84
95
|
return lines;
|
|
85
96
|
};
|
|
86
97
|
var BASIC = [
|
|
@@ -148,6 +159,7 @@ var borderBadge = (sample, text) => {
|
|
|
148
159
|
};
|
|
149
160
|
|
|
150
161
|
export {
|
|
162
|
+
truncateStyledText,
|
|
151
163
|
safeText,
|
|
152
164
|
formatActorDataPreview,
|
|
153
165
|
formatDuration,
|
|
@@ -158,4 +170,4 @@ export {
|
|
|
158
170
|
wrapPlainText,
|
|
159
171
|
borderBadge
|
|
160
172
|
};
|
|
161
|
-
//# sourceMappingURL=chunk-
|
|
173
|
+
//# sourceMappingURL=chunk-DWM63MAJ.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/ui/truncate.ts", "../../src/ui/format.ts"],
|
|
4
|
+
"sourcesContent": ["import { truncateToWidth, visibleWidth } from \"@earendil-works/pi-tui\";\n\nconst RESET = \"\\x1b[0m\";\n\n/** Keep a truncation marker in the text's colour, not the terminal default. */\nexport const truncateStyledText = (text: string, width: number, ellipsis = \"...\"): string => {\n const truncated = truncateToWidth(text, width, ellipsis);\n if (!ellipsis || width <= 0 || truncated === text) return truncated;\n\n // pi-tui closes any hyperlink, resets SGR, then emits the marker and another\n // reset. Keep the hyperlink closed, but defer the first reset until after the\n // marker so it inherits the last visible text's style (as footer rows do).\n // Tiny widths can clip the marker itself; retain pi-tui's grapheme handling.\n const marker = visibleWidth(ellipsis) > width\n ? truncateToWidth(ellipsis, width, \"\").replace(/\\x1b\\[0m$/, \"\")\n : ellipsis;\n const suffix = `${RESET}${marker}${RESET}`;\n return truncated.endsWith(suffix)\n ? truncated.slice(0, -suffix.length) + marker + RESET\n : truncated;\n};\n", "import { stripVTControlCharacters } from \"node:util\";\nimport { visibleWidth } from \"@earendil-works/pi-tui\";\nimport { truncateStyledText as truncateToWidth } from \"./truncate.js\";\n\nexport const safeText = (value: unknown): string =>\n String(value ?? \"\")\n .replace(/\\x1b\\[[0-?]*[ -/]*[@-~]/g, \"\")\n .replace(/[\\u0000-\\u0008\\u000b-\\u001f\\u007f-\\u009f]/g, \" \")\n .replace(/[\\r\\n\\t]+/g, \" \")\n .replace(/\\s+/g, \" \")\n .trim();\n\n\nexport const formatActorDataPreview = (data: unknown, maxChars = 200): string | undefined => {\n if (data === undefined) return undefined;\n const clip = (value: string): string => {\n const safe = safeText(value);\n return safe.length > maxChars ? `${safe.slice(0, Math.max(1, maxChars - 1))}\u2026` : safe;\n };\n if (typeof data === \"string\") return clip(data);\n if (\n typeof data === \"object\" &&\n data !== null &&\n !Array.isArray(data) &&\n (data as { fabricTruncated?: unknown }).fabricTruncated === true\n ) {\n const wrapper = data as { preview?: unknown; originalBytes?: unknown };\n const preview = clip(String(wrapper.preview ?? \"\"));\n const suffix =\n typeof wrapper.originalBytes === \"number\"\n ? `[truncated from ${wrapper.originalBytes} bytes]`\n : \"[truncated]\";\n return preview ? `${preview} ${suffix}` : suffix;\n }\n let serialized: string;\n try {\n serialized = JSON.stringify(data) ?? String(data);\n } catch {\n serialized = String(data);\n }\n return clip(serialized);\n};\n\n/** Empty durations are omitted by UI metric/field renderers. */\nexport const formatDuration = (milliseconds: number): string => {\n if (!Number.isFinite(milliseconds) || milliseconds < 1_000) return \"\";\n const seconds = Math.max(0, Math.floor(milliseconds / 1_000));\n if (seconds < 60) return `${seconds}s`;\n const minutes = Math.floor(seconds / 60);\n if (minutes < 60) return `${minutes}m${String(seconds % 60).padStart(2, \"0\")}s`;\n const hours = Math.floor(minutes / 60);\n return `${hours}h${String(minutes % 60).padStart(2, \"0\")}m`;\n};\n\nexport const formatTokens = (tokens: number): string => {\n if (tokens < 1_000) return String(Math.max(0, Math.round(tokens)));\n if (tokens < 100_000) return `${(tokens / 1_000).toFixed(tokens < 10_000 ? 1 : 0)}k`;\n return `${(tokens / 1_000).toFixed(0)}k`;\n};\n\nexport const formatCost = (usd: number): string =>\n usd <= 0 ? \"$0\" : usd < 0.01 ? `$${usd.toFixed(4)}` : usd < 1 ? `$${usd.toFixed(3)}` : `$${usd.toFixed(2)}`;\n\nexport const formatClock = (timestamp: number): string =>\n new Date(timestamp).toLocaleTimeString([], { hour: \"2-digit\", minute: \"2-digit\" });\n\nexport const padToWidth = (value: string, width: number): string => {\n const clipped = truncateToWidth(value, Math.max(0, width), \"\");\n return clipped + \" \".repeat(Math.max(0, width - visibleWidth(clipped)));\n};\n\nexport const wrapPlainText = (value: string, width: number, maxLines = 100): string[] => {\n const safe = safeText(value);\n if (!safe || width <= 0 || maxLines <= 0) return [];\n const words = safe.split(\" \");\n const lines: string[] = [];\n let current = \"\";\n for (const word of words) {\n const candidate = current ? `${current} ${word}` : word;\n if (visibleWidth(candidate) <= width) {\n current = candidate;\n continue;\n }\n if (current) lines.push(truncateToWidth(current, width));\n current = word;\n while (visibleWidth(current) > width && lines.length < maxLines) {\n let chunk = \"\";\n let consumed = 0;\n const segments = [\n ...new Intl.Segmenter(undefined, { granularity: \"grapheme\" }).segment(current),\n ];\n for (const { segment } of segments) {\n const candidate = chunk + segment;\n if (visibleWidth(candidate) > width) {\n if (!chunk) {\n chunk = \"\u2026\";\n consumed += segment.length;\n }\n break;\n }\n chunk = candidate;\n consumed += segment.length;\n }\n if (chunk) lines.push(chunk);\n current = current.slice(consumed);\n }\n if (lines.length >= maxLines) break;\n }\n if (current && lines.length < maxLines) lines.push(truncateToWidth(current, width));\n return lines;\n};\n\ntype Rgb = readonly [number, number, number];\n\n/** xterm's default 16-colour palette, for borders drawn with basic SGR colours. */\nconst BASIC: readonly Rgb[] = [\n [0, 0, 0], [205, 0, 0], [0, 205, 0], [205, 205, 0], [0, 0, 238], [205, 0, 205], [0, 205, 205], [229, 229, 229],\n [127, 127, 127], [255, 0, 0], [0, 255, 0], [255, 255, 0], [92, 92, 255], [255, 0, 255], [0, 255, 255], [255, 255, 255],\n];\n\nconst xterm256 = (index: number): Rgb => {\n if (index < 16) return BASIC[index]!;\n if (index >= 232) {\n const level = 8 + (index - 232) * 10;\n return [level, level, level];\n }\n const cube = index - 16;\n const step = (value: number): number => (value === 0 ? 0 : 55 + value * 40);\n return [step(Math.floor(cube / 36)), step(Math.floor(cube / 6) % 6), step(cube % 6)];\n};\n\n/** The foreground colour a styled sample is drawn in: its SGR background twin and its RGB. */\nconst foreground = (sample: string): { background: string; rgb: Rgb } | undefined => {\n for (const match of sample.matchAll(/\\x1b\\[([0-9;]*)m/g)) {\n const params = (match[1] ?? \"\").split(\";\").map(Number);\n for (let index = 0; index < params.length; index++) {\n const code = params[index]!;\n if (code === 38 && params[index + 1] === 2 && params.length >= index + 5) {\n const rgb: Rgb = [params[index + 2]!, params[index + 3]!, params[index + 4]!];\n return { background: `48;2;${rgb.join(\";\")}`, rgb };\n }\n if (code === 38 && params[index + 1] === 5 && params[index + 2] !== undefined) {\n return { background: `48;5;${params[index + 2]}`, rgb: xterm256(params[index + 2]!) };\n }\n if (code >= 30 && code <= 37) return { background: String(code + 10), rgb: BASIC[code - 30]! };\n if (code >= 90 && code <= 97) return { background: String(code + 10), rgb: BASIC[code - 90 + 8]! };\n }\n }\n return undefined;\n};\n\nconst luminance = ([red, green, blue]: Rgb): number => {\n const channel = (value: number): number => {\n const scaled = value / 255;\n return scaled <= 0.03928 ? scaled / 12.92 : ((scaled + 0.055) / 1.055) ** 2.4;\n };\n return 0.2126 * channel(red) + 0.7152 * channel(green) + 0.0722 * channel(blue);\n};\n\n/**\n * A Claude Code-style badge on the editor border: a block in the border's own\n * colour, which Pi sets from the thinking level, with black or white text,\n * whichever has the higher WCAG contrast. `sample` is any text styled in the\n * border colour; a border drawn without colour gets a plain label, unstyled like it.\n */\nexport const borderBadge = (sample: string, text: string): string => {\n const label = ` ${stripVTControlCharacters(text)} `;\n const colour = foreground(sample);\n if (!colour) return label;\n const light = luminance(colour.rgb);\n // Contrast ratio (L1 + 0.05) / (L2 + 0.05) against black (L = 0) and white (L = 1).\n const black = (light + 0.05) / 0.05;\n const white = 1.05 / (light + 0.05);\n const ink = black >= white ? \"38;2;0;0;0\" : \"38;2;255;255;255\";\n return `\\x1b[${colour.background};${ink}m${label}\\x1b[0m`;\n};\n"],
|
|
5
|
+
"mappings": ";AAAA,SAAS,iBAAiB,oBAAoB;AAE9C,IAAM,QAAQ;AAGP,IAAM,qBAAqB,CAAC,MAAc,OAAe,WAAW,UAAkB;AAC3F,QAAM,YAAY,gBAAgB,MAAM,OAAO,QAAQ;AACvD,MAAI,CAAC,YAAY,SAAS,KAAK,cAAc,KAAM,QAAO;AAM1D,QAAM,SAAS,aAAa,QAAQ,IAAI,QACpC,gBAAgB,UAAU,OAAO,EAAE,EAAE,QAAQ,aAAa,EAAE,IAC5D;AACJ,QAAM,SAAS,GAAG,KAAK,GAAG,MAAM,GAAG,KAAK;AACxC,SAAO,UAAU,SAAS,MAAM,IAC5B,UAAU,MAAM,GAAG,CAAC,OAAO,MAAM,IAAI,SAAS,QAC9C;AACN;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C,CAAC,IAAI,KAAK,SAAS,OAAO,QAAQ,CAAC,CAAE,EAAE;AAAA,MACtF;AACA,UAAI,QAAQ,MAAM,QAAQ,GAAI,QAAO,EAAE,YAAY,OAAO,OAAO,EAAE,GAAG,KAAK,MAAM,OAAO,EAAE,EAAG;AAC7F,UAAI,QAAQ,MAAM,QAAQ,GAAI,QAAO,EAAE,YAAY,OAAO,OAAO,EAAE,GAAG,KAAK,MAAM,OAAO,KAAK,CAAC,EAAG;AAAA,IACnG;AAAA,EACF;AACA,SAAO;AACT;AAEA,IAAM,YAAY,CAAC,CAAC,KAAK,OAAO,IAAI,MAAmB;AACrD,QAAM,UAAU,CAAC,UAA0B;AACzC,UAAM,SAAS,QAAQ;AACvB,WAAO,UAAU,UAAU,SAAS,UAAU,SAAS,SAAS,UAAU;AAAA,EAC5E;AACA,SAAO,SAAS,QAAQ,GAAG,IAAI,SAAS,QAAQ,KAAK,IAAI,SAAS,QAAQ,IAAI;AAChF;AAQO,IAAM,cAAc,CAAC,QAAgB,SAAyB;AACnE,QAAM,QAAQ,IAAI,yBAAyB,IAAI,CAAC;AAChD,QAAM,SAAS,WAAW,MAAM;AAChC,MAAI,CAAC,OAAQ,QAAO;AACpB,QAAM,QAAQ,UAAU,OAAO,GAAG;AAElC,QAAM,SAAS,QAAQ,QAAQ;AAC/B,QAAM,QAAQ,QAAQ,QAAQ;AAC9B,QAAM,MAAM,SAAS,QAAQ,eAAe;AAC5C,SAAO,QAAQ,OAAO,UAAU,IAAI,GAAG,IAAI,KAAK;AAClD;",
|
|
6
|
+
"names": ["visibleWidth", "visibleWidth", "candidate"]
|
|
7
|
+
}
|
|
@@ -10,6 +10,26 @@ import {
|
|
|
10
10
|
idSet,
|
|
11
11
|
members
|
|
12
12
|
} from "./chunk-NJHJKINP.js";
|
|
13
|
+
import {
|
|
14
|
+
executionOutcomeFromError
|
|
15
|
+
} from "./chunk-2OC4YJOL.js";
|
|
16
|
+
import {
|
|
17
|
+
runAbortable,
|
|
18
|
+
settleWithin,
|
|
19
|
+
throwIfAborted
|
|
20
|
+
} from "./chunk-7CIQQOOD.js";
|
|
21
|
+
import {
|
|
22
|
+
FABRIC_NESTED_TOOL_CALL_ID_PREFIX
|
|
23
|
+
} from "./chunk-MPFBOVOD.js";
|
|
24
|
+
import {
|
|
25
|
+
FabricResolutionError,
|
|
26
|
+
FabricTraceSafeError
|
|
27
|
+
} from "./chunk-B2FIGOPI.js";
|
|
28
|
+
import {
|
|
29
|
+
repairCatalogInput,
|
|
30
|
+
validateCatalogArgs,
|
|
31
|
+
validationMessage
|
|
32
|
+
} from "./chunk-4U47NCP2.js";
|
|
13
33
|
import {
|
|
14
34
|
MAX_AUDIT_VALUE_CHARS,
|
|
15
35
|
boundedPreviewValue,
|
|
@@ -18,14 +38,8 @@ import {
|
|
|
18
38
|
failedResultOutcome,
|
|
19
39
|
previewArgs,
|
|
20
40
|
previewResult,
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
validateCatalogArgs,
|
|
24
|
-
validationMessage
|
|
25
|
-
} from "./chunk-7N7IC3Z2.js";
|
|
26
|
-
import {
|
|
27
|
-
executionOutcomeFromError
|
|
28
|
-
} from "./chunk-HSEZPCL5.js";
|
|
41
|
+
strictDecisionResult
|
|
42
|
+
} from "./chunk-2CD7HLVP.js";
|
|
29
43
|
import {
|
|
30
44
|
activeQuarantinedRefNames,
|
|
31
45
|
applyActiveActionName,
|
|
@@ -34,28 +48,16 @@ import {
|
|
|
34
48
|
getActiveRepairCompiler,
|
|
35
49
|
isActiveQuarantine,
|
|
36
50
|
normalizeActiveArguments
|
|
37
|
-
} from "./chunk-
|
|
38
|
-
import {
|
|
39
|
-
runAbortable,
|
|
40
|
-
settleWithin,
|
|
41
|
-
throwIfAborted
|
|
42
|
-
} from "./chunk-7TB7NXSL.js";
|
|
43
|
-
import {
|
|
44
|
-
FABRIC_NESTED_TOOL_CALL_ID_PREFIX
|
|
45
|
-
} from "./chunk-2RWNVCFD.js";
|
|
46
|
-
import {
|
|
47
|
-
FabricResolutionError,
|
|
48
|
-
FabricTraceSafeError
|
|
49
|
-
} from "./chunk-PUBHBEYO.js";
|
|
50
|
-
import {
|
|
51
|
-
stableJsonHash
|
|
52
|
-
} from "./chunk-3YZUQESG.js";
|
|
51
|
+
} from "./chunk-2QJ4MNS6.js";
|
|
53
52
|
import {
|
|
54
53
|
VERIFIED_NAT_MAX,
|
|
55
54
|
consume,
|
|
56
55
|
knownConflict,
|
|
57
56
|
unknownConflict
|
|
58
57
|
} from "./chunk-P7YSPKTM.js";
|
|
58
|
+
import {
|
|
59
|
+
stableJsonHash
|
|
60
|
+
} from "./chunk-3YZUQESG.js";
|
|
59
61
|
|
|
60
62
|
// src/verified/generated/authority.js
|
|
61
63
|
function $n(v, what) {
|
|
@@ -1103,7 +1105,7 @@ var actionDescriptorHash = (action) => descriptorHash({
|
|
|
1103
1105
|
namespace: action.namespace,
|
|
1104
1106
|
effect: action.effect
|
|
1105
1107
|
});
|
|
1106
|
-
var discoveryTerms = (value) => [...value.normalize("NFKC").matchAll(/[\p{L}\p{N}
|
|
1108
|
+
var discoveryTerms = (value) => [...value.normalize("NFKC").matchAll(/[\p{L}\p{N}]+/gu)].map((match) => match[0].toLowerCase());
|
|
1107
1109
|
var scoreActionSearch = (query, action, providerDescription = "") => {
|
|
1108
1110
|
const normalizedQuery = query.normalize("NFKC").trim().toLowerCase();
|
|
1109
1111
|
if (!normalizedQuery) return 0;
|
|
@@ -1491,7 +1493,8 @@ var ActionRegistry = class {
|
|
|
1491
1493
|
parentKey: `provider:${provider.name}`,
|
|
1492
1494
|
ref: action.ref,
|
|
1493
1495
|
name: action.name,
|
|
1494
|
-
|
|
1496
|
+
// Navigation only: full contracts and their hashes stay untouched.
|
|
1497
|
+
description: Array.from(action.description.trim().split(/\r?\n/, 1)[0]).slice(0, 320).join(""),
|
|
1495
1498
|
descriptorHash: actionDescriptorHash(action),
|
|
1496
1499
|
risk: action.risk,
|
|
1497
1500
|
...action.namespace === void 0 ? {} : { namespace: action.namespace },
|
|
@@ -2056,7 +2059,7 @@ var ActionRegistry = class {
|
|
|
2056
2059
|
return void 0;
|
|
2057
2060
|
}
|
|
2058
2061
|
}
|
|
2059
|
-
async endInvocation(parentToolCallId, timeoutMs = 1e3) {
|
|
2062
|
+
async endInvocation(parentToolCallId, timeoutMs = 1e3, signal) {
|
|
2060
2063
|
this.#speculation?.onInvocationEnd?.(parentToolCallId);
|
|
2061
2064
|
const providers = new Set(
|
|
2062
2065
|
this.#providerBindings.entries().map((binding) => binding.provider)
|
|
@@ -2064,7 +2067,7 @@ var ActionRegistry = class {
|
|
|
2064
2067
|
const finalizers = [...providers].flatMap(
|
|
2065
2068
|
(provider) => provider.invocationEnded ? [this.#providerBindings.trackProvider(provider, () => provider.invocationEnded(parentToolCallId), true)] : []
|
|
2066
2069
|
);
|
|
2067
|
-
await settleWithin(finalizers, timeoutMs);
|
|
2070
|
+
await settleWithin(finalizers, timeoutMs, signal);
|
|
2068
2071
|
}
|
|
2069
2072
|
/** Revocation is distinct from rolling withdrawal: pinned old generations may
|
|
2070
2073
|
* survive retirement, but revoked bindings admit no further work. */
|
|
@@ -2364,4 +2367,4 @@ export {
|
|
|
2364
2367
|
scoreActionSearch,
|
|
2365
2368
|
ActionRegistry
|
|
2366
2369
|
};
|
|
2367
|
-
//# sourceMappingURL=chunk-
|
|
2370
|
+
//# sourceMappingURL=chunk-FFJ7TV66.js.map
|