@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
|
@@ -50,6 +50,7 @@ export declare class ShellMonitor {
|
|
|
50
50
|
readonly emit: (batch: ShellMonitorBatch) => void;
|
|
51
51
|
constructor(options: ShellMonitorOptions, emit: (batch: ShellMonitorBatch) => void);
|
|
52
52
|
append(data: Buffer): void;
|
|
53
|
+
flush(): void;
|
|
53
54
|
close(flush?: boolean): void;
|
|
54
55
|
}
|
|
55
56
|
//# sourceMappingURL=shell-monitor.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shell-monitor.d.ts","sourceRoot":"","sources":["../../src/core/shell-monitor.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,IAAI,GAAG,MAAM,CAAC;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,E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BAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAQ9B,CAAC;AAEF,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,mBAAmB,GAAG,SAAS,CAcjF;AAED,yFAAyF;AACzF,qBAAa,YAAY;;IAUX,QAAQ,CAAC,OAAO,EAAE,mBAAmB;IAAE,QAAQ,CAAC,IAAI,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI;gBAA/E,OAAO,EAAE,mBAAmB,EAAW,IAAI,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI;IAEpG,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAwC1B,KAAK,IAAI,IAAI;IAMb,KAAK,CAAC,KAAK,UAAO,GAAG,IAAI;CAa1B"}
|
package/dist/durable/worker.js
CHANGED
|
@@ -8,29 +8,6 @@ import { spawn } from "node:child_process";
|
|
|
8
8
|
import module from "node:module";
|
|
9
9
|
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
10
10
|
|
|
11
|
-
// src/durable/openai-sse-patch.ts
|
|
12
|
-
var openAiSseKeepaliveMarker = "\nif (!sse.data || !sse.data.trim()) continue;";
|
|
13
|
-
var doneGuardPattern = /if\s*\(\s*sse\.data\s*===\s*(["'])\[DONE\]\1\s*\)\s*\{[^{}]*\}/;
|
|
14
|
-
function patchOpenAiSseStreaming(source) {
|
|
15
|
-
if (source.includes("!sse.data.trim()) continue;") || source.includes("!sse.data.trim())continue;")) {
|
|
16
|
-
return { source, applied: false };
|
|
17
|
-
}
|
|
18
|
-
const guard = doneGuardPattern.exec(source);
|
|
19
|
-
if (!guard) {
|
|
20
|
-
throw new Error(
|
|
21
|
-
"openai SSE keepalive patch: `[DONE]` guard not found in the streaming decoder source (upstream layout changed)"
|
|
22
|
-
);
|
|
23
|
-
}
|
|
24
|
-
const insertAt = guard.index + guard[0].length;
|
|
25
|
-
return {
|
|
26
|
-
source: source.slice(0, insertAt) + openAiSseKeepaliveMarker + source.slice(insertAt),
|
|
27
|
-
applied: true
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
function isOpenAiStreamingModuleUrl(url) {
|
|
31
|
-
return url.includes("/openai/core/streaming.");
|
|
32
|
-
}
|
|
33
|
-
|
|
34
11
|
// src/durable/worker-options.ts
|
|
35
12
|
import path from "node:path";
|
|
36
13
|
function parseDurableWorkerOptions(argv, cwd = process.cwd()) {
|
|
@@ -158,25 +135,6 @@ try {
|
|
|
158
135
|
const repaired = repairTypeboxAlias(specifier);
|
|
159
136
|
if (repaired) return repaired;
|
|
160
137
|
return nextResolve(specifier, context);
|
|
161
|
-
},
|
|
162
|
-
// Provider gateways in front of OpenAI-compatible endpoints (observed
|
|
163
|
-
// with GLM-5.2 behind ai-sbt-hub) send bare `data: \n\n` keepalives
|
|
164
|
-
// during long reasoning pauses; the SDK parses the empty payload and
|
|
165
|
-
// aborts the whole generation. Patch its streaming decoder in memory
|
|
166
|
-
// before it loads — no on-disk mutation.
|
|
167
|
-
load(url, context, nextLoad) {
|
|
168
|
-
const loaded = nextLoad(url, context);
|
|
169
|
-
if (loaded.source != null && isOpenAiStreamingModuleUrl(url)) {
|
|
170
|
-
try {
|
|
171
|
-
const text = typeof loaded.source === "string" ? loaded.source : new TextDecoder().decode(loaded.source);
|
|
172
|
-
const patched = patchOpenAiSseStreaming(text);
|
|
173
|
-
if (patched.applied) loaded.source = patched.source;
|
|
174
|
-
} catch (error) {
|
|
175
|
-
process.stderr.write(`pi-fabric worker: openai SSE keepalive patch skipped: ${error instanceof Error ? error.message : String(error)}
|
|
176
|
-
`);
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
return loaded;
|
|
180
138
|
}
|
|
181
139
|
});
|
|
182
140
|
const { runDurableWorker } = await import("./worker-host.js");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../src/durable/worker.ts", "../../src/durable/
|
|
4
|
-
"sourcesContent": ["#!/usr/bin/env node\nimport { spawn } from \"node:child_process\";\nimport module from \"node:module\";\nimport { fileURLToPath, pathToFileURL } from \"node:url\";\nimport { isOpenAiStreamingModuleUrl, patchOpenAiSseStreaming } from \"./openai-sse-patch.js\";\nimport { parseDurableWorkerOptions } from \"./worker-options.js\";\nimport { explainMissingInstall } from \"../worker/missing-install.js\";\n\ntry {\n // This process-only entry is never imported by extension registration.\n const options = parseDurableWorkerOptions(process.argv.slice(2));\n if (process.versions.bun) {\n // Bun cannot install Node's peer-resolution hooks. Keep the pinned SDK in\n // the package's required Node 24+ runtime; never inject ambient NODE_PATH.\n const child = spawn(\"node\", [fileURLToPath(import.meta.url), ...process.argv.slice(2)], { stdio: \"inherit\" });\n const code = await new Promise<number>((resolve, reject) => {\n child.once(\"error\", error => reject(new Error(`Bun-launched durable workers require Node.js 24+ on PATH: ${error.message}`, { cause: error })));\n child.once(\"exit\", (code, signal) => resolve(code ?? (signal ? 1 : 0)));\n });\n process.exitCode = code;\n } else {\n if (Number.parseInt(process.versions.node, 10) < 24) throw new Error(\"Durable Pi workers require Node.js 24+\");\n // Managed Pi installs omit host peers. A subprocess cannot use Main's virtual\n // modules, so it owns a pinned SDK under a non-peer name. Resolve all Pi peers\n // through that SDK's dependency tree (also with non-hoisting installers), not\n // an ambient checkout or another extension's SDK. This hook is process-local\n // and must be installed before importing any durable host/engine modules.\n const sdkEntry = import.meta.resolve(\"pi-fabric-worker-sdk\");\n const sdkName = \"@earendil-works/pi-coding-agent\";\n const peers = [\"@earendil-works/pi-agent-core\", \"@earendil-works/pi-ai\", \"@earendil-works/pi-tui\", \"typebox\"];\n // The SDK's extension loader gives jiti an alias from \"typebox\" (and \"@sinclair/typebox\") to\n // the SDK's require.resolve(\"typebox\") file, and jiti matches aliases as path prefixes. An\n // extension's \"typebox/type\" therefore arrives here as \"<typebox entry file>/type\". Resolve\n // exactly that form as \"typebox/<subpath>\" through the same install's exports map; anything\n // it does not export keeps its original resolution and error. This depends on that alias shape:\n // once the SDK resolves typebox subpaths itself, no specifier carries the prefix and this is inert.\n let typeboxEntry: string | null | undefined;\n const separators = (value: string) => process.platform === \"win32\" ? value.replaceAll(\"\\\\\", \"/\") : value;\n const repairTypeboxAlias = (specifier: string): module.ResolveFnOutput | undefined => {\n if (typeboxEntry === undefined) {\n try { typeboxEntry = module.createRequire(sdkEntry).resolve(\"typebox\"); } catch { typeboxEntry = null; }\n }\n if (!typeboxEntry) return undefined;\n const prefix = `${separators(typeboxEntry)}/`;\n const candidate = separators(specifier);\n if (!candidate.startsWith(prefix) || candidate.length === prefix.length) return undefined;\n try {\n // CommonJS resolution ignores a replaced parentURL, so resolve from a require rooted in the\n // typebox entry file: it self-resolves that install's own exports, never another copy.\n const file = module.createRequire(typeboxEntry).resolve(`typebox/${candidate.slice(prefix.length)}`);\n return { url: pathToFileURL(file).href, shortCircuit: true };\n } catch {\n return undefined;\n }\n };\n module.registerHooks({\n resolve(specifier, context, nextResolve) {\n if (specifier === sdkName || specifier.startsWith(`${sdkName}/`)) {\n return nextResolve(`pi-fabric-worker-sdk${specifier.slice(sdkName.length)}`, { ...context, parentURL: import.meta.url });\n }\n if (peers.some(name => specifier === name || specifier.startsWith(`${name}/`))) {\n return nextResolve(specifier, { ...context, parentURL: sdkEntry });\n }\n const repaired = repairTypeboxAlias(specifier);\n if (repaired) return repaired;\n return nextResolve(specifier, context);\n },\n // Provider gateways in front of OpenAI-compatible endpoints (observed\n // with GLM-5.2 behind ai-sbt-hub) send bare `data: \\n\\n` keepalives\n // during long reasoning pauses; the SDK parses the empty payload and\n // aborts the whole generation. Patch its streaming decoder in memory\n // before it loads \u2014 no on-disk mutation.\n load(url, context, nextLoad) {\n const loaded = nextLoad(url, context);\n if (loaded.source != null && isOpenAiStreamingModuleUrl(url)) {\n try {\n // The default load returns file contents as bytes, not a string.\n const text = typeof loaded.source === \"string\" ? loaded.source : new TextDecoder().decode(loaded.source);\n const patched = patchOpenAiSseStreaming(text);\n if (patched.applied) loaded.source = patched.source;\n } catch (error) {\n process.stderr.write(`pi-fabric worker: openai SSE keepalive patch skipped: ${error instanceof Error ? error.message : String(error)}\\n`);\n }\n }\n return loaded;\n },\n });\n const { runDurableWorker } = await import(\"./worker-host.js\");\n await runDurableWorker(options);\n }\n} catch (caught) {\n const error = explainMissingInstall(caught, import.meta.url);\n process.stderr.write(`Durable Pi worker failed: ${error instanceof Error ? (error === caught ? error.stack ?? error.message : error.message) : String(error)}\\n`);\n process.exitCode = 1;\n}\n", "// Empty SSE keepalive tolerance for the OpenAI SDK's streaming decoder.\n//\n// Gateways in front of OpenAI-compatible endpoints (observed with GLM-5.2\n// behind ai-sbt-hub) hold the connection open during long reasoning pauses\n// with bare `data: \\n\\n` lines instead of SSE comments. The SDK's\n// `Stream.fromSSEResponse` only special-cases `[DONE]`, so an empty payload\n// reaches `JSON.parse(\"\")` and aborts the whole generation with\n// \"Error reading response: malformed server-sent event JSON.\", discarding\n// the partial output. An empty `data:` carries no payload: the consumer loop\n// skips it instead. The patch is applied in memory by the durable worker's\n// module load hook (see durable/worker.ts); nothing on disk is modified.\n\n/** Inserted right after the SDK's `[DONE]` guard inside the SSE consumer loop. */\nexport const openAiSseKeepaliveMarker = \"\\nif (!sse.data || !sse.data.trim()) continue;\";\n\nconst doneGuardPattern = /if\\s*\\(\\s*sse\\.data\\s*===\\s*([\"'])\\[DONE\\]\\1\\s*\\)\\s*\\{[^{}]*\\}/;\n\nexport interface OpenAiSsePatchResult {\n source: string;\n applied: boolean;\n}\n\n/**\n * Rewrite the SDK's SSE consumer so empty or whitespace-only `data:` events\n * are skipped instead of reaching `JSON.parse`. Idempotent; throws when the\n * `[DONE]` guard is absent so an upstream refactor surfaces as a loud\n * warning (the load hook skips patching) rather than a silent regression.\n */\nexport function patchOpenAiSseStreaming(source: string): OpenAiSsePatchResult {\n if (source.includes(\"!sse.data.trim()) continue;\") || source.includes(\"!sse.data.trim())continue;\")) {\n return { source, applied: false };\n }\n const guard = doneGuardPattern.exec(source);\n if (!guard) {\n throw new Error(\n \"openai SSE keepalive patch: `[DONE]` guard not found in the streaming decoder source (upstream layout changed)\",\n );\n }\n const insertAt = guard.index + guard[0].length;\n return {\n source: source.slice(0, insertAt) + openAiSseKeepaliveMarker + source.slice(insertAt),\n applied: true,\n };\n}\n\n/**\n * Whether a module URL is the OpenAI SDK's SSE decoder (`core/streaming.*`).\n * Deliberately loose about the package scope (any package literally named\n * `openai`) and strict about the path, so lookalikes (`not-openai/...`)\n * and unrelated files (`openai/index.mjs`) stay untouched.\n */\nexport function isOpenAiStreamingModuleUrl(url: string): boolean {\n return url.includes(\"/openai/core/streaming.\");\n}\n", "import path from \"node:path\";\nimport type { ThinkingLevel } from \"@earendil-works/pi-agent-core\";\n\nexport interface DurableWorkerOptions {\n directory: string;\n runId: string;\n sessionFile?: string;\n model?: string;\n provider?: string;\n thinking?: ThinkingLevel;\n tools?: string[];\n excludeTools?: string[];\n noTools?: \"all\";\n extensions: string[];\n noExtensions: boolean;\n noSkills: boolean;\n skills: string[];\n appendSystemPrompt: string;\n}\n\n/** Internal worker protocol, deliberately not a second general-purpose Pi CLI. */\nexport function parseDurableWorkerOptions(argv: readonly string[], cwd = process.cwd()): DurableWorkerOptions {\n const options: DurableWorkerOptions = {\n directory: \"\", runId: \"\", extensions: [], noExtensions: false, noSkills: false, skills: [], appendSystemPrompt: \"\",\n };\n const prompts: string[] = [];\n for (let i = 0; i < argv.length; i++) {\n const flag = argv[i]!;\n if (flag === \"--no-session\") continue;\n if (flag === \"--no-extensions\") { options.noExtensions = true; continue; }\n if (flag === \"--no-tools\") { options.noTools = \"all\"; continue; }\n if (flag === \"--no-skills\") { options.noSkills = true; continue; }\n if (![\"--mode\", \"--durable-directory\", \"--durable-run-id\", \"--session\", \"--model\", \"--provider\", \"--thinking\", \"--tools\", \"--exclude-tools\", \"-e\", \"--extension\", \"--skill\", \"--append-system-prompt\"].includes(flag)) {\n throw new Error(`Unsupported durable worker option: ${flag}`);\n }\n const value = argv[++i];\n if (value === undefined || value.startsWith(\"--\")) throw new Error(`Missing value for ${flag}`);\n switch (flag) {\n case \"--mode\": if (value !== \"rpc\") throw new Error(\"The durable worker only supports RPC mode\"); break;\n case \"--durable-directory\": options.directory = path.resolve(cwd, value); break;\n case \"--durable-run-id\": options.runId = value.trim(); break;\n case \"--session\": options.sessionFile = path.resolve(cwd, value); break;\n case \"--model\": options.model = value; break;\n case \"--provider\": options.provider = value; break;\n case \"--thinking\":\n if (![\"off\", \"minimal\", \"low\", \"medium\", \"high\", \"xhigh\", \"max\"].includes(value)) throw new Error(`Invalid thinking level: ${value}`);\n options.thinking = value as ThinkingLevel;\n break;\n case \"--tools\": options.tools = value.split(\",\").map(tool => tool.trim()).filter(Boolean); break;\n case \"--exclude-tools\": options.excludeTools = value.split(\",\").map(tool => tool.trim()).filter(Boolean); break;\n case \"-e\": case \"--extension\": options.extensions.push(value.startsWith(\"builtin:\") ? value : path.resolve(cwd, value)); break;\n case \"--skill\": options.skills.push(path.resolve(cwd, value)); break;\n case \"--append-system-prompt\": prompts.push(value); break;\n }\n }\n if (!options.directory || !options.runId) throw new Error(\"Durable workers require --durable-directory and --durable-run-id\");\n if (options.tools && options.noTools) throw new Error(\"--tools and --no-tools are mutually exclusive\");\n options.appendSystemPrompt = prompts.join(\"\\n\\n\");\n return options;\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;AACA,SAAS,aAAa;AACtB,OAAO,YAAY;AACnB,SAAS,eAAe,qBAAqB;;;
|
|
3
|
+
"sources": ["../../src/durable/worker.ts", "../../src/durable/worker-options.ts"],
|
|
4
|
+
"sourcesContent": ["#!/usr/bin/env node\nimport { spawn } from \"node:child_process\";\nimport module from \"node:module\";\nimport { fileURLToPath, pathToFileURL } from \"node:url\";\nimport { parseDurableWorkerOptions } from \"./worker-options.js\";\nimport { explainMissingInstall } from \"../worker/missing-install.js\";\n\ntry {\n // This process-only entry is never imported by extension registration.\n const options = parseDurableWorkerOptions(process.argv.slice(2));\n if (process.versions.bun) {\n // Bun cannot install Node's peer-resolution hooks. Keep the pinned SDK in\n // the package's required Node 24+ runtime; never inject ambient NODE_PATH.\n const child = spawn(\"node\", [fileURLToPath(import.meta.url), ...process.argv.slice(2)], { stdio: \"inherit\" });\n const code = await new Promise<number>((resolve, reject) => {\n child.once(\"error\", error => reject(new Error(`Bun-launched durable workers require Node.js 24+ on PATH: ${error.message}`, { cause: error })));\n child.once(\"exit\", (code, signal) => resolve(code ?? (signal ? 1 : 0)));\n });\n process.exitCode = code;\n } else {\n if (Number.parseInt(process.versions.node, 10) < 24) throw new Error(\"Durable Pi workers require Node.js 24+\");\n // Managed Pi installs omit host peers. A subprocess cannot use Main's virtual\n // modules, so it owns a pinned SDK under a non-peer name. Resolve all Pi peers\n // through that SDK's dependency tree (also with non-hoisting installers), not\n // an ambient checkout or another extension's SDK. This hook is process-local\n // and must be installed before importing any durable host/engine modules.\n const sdkEntry = import.meta.resolve(\"pi-fabric-worker-sdk\");\n const sdkName = \"@earendil-works/pi-coding-agent\";\n const peers = [\"@earendil-works/pi-agent-core\", \"@earendil-works/pi-ai\", \"@earendil-works/pi-tui\", \"typebox\"];\n // The SDK's extension loader gives jiti an alias from \"typebox\" (and \"@sinclair/typebox\") to\n // the SDK's require.resolve(\"typebox\") file, and jiti matches aliases as path prefixes. An\n // extension's \"typebox/type\" therefore arrives here as \"<typebox entry file>/type\". Resolve\n // exactly that form as \"typebox/<subpath>\" through the same install's exports map; anything\n // it does not export keeps its original resolution and error. This depends on that alias shape:\n // once the SDK resolves typebox subpaths itself, no specifier carries the prefix and this is inert.\n let typeboxEntry: string | null | undefined;\n const separators = (value: string) => process.platform === \"win32\" ? value.replaceAll(\"\\\\\", \"/\") : value;\n const repairTypeboxAlias = (specifier: string): module.ResolveFnOutput | undefined => {\n if (typeboxEntry === undefined) {\n try { typeboxEntry = module.createRequire(sdkEntry).resolve(\"typebox\"); } catch { typeboxEntry = null; }\n }\n if (!typeboxEntry) return undefined;\n const prefix = `${separators(typeboxEntry)}/`;\n const candidate = separators(specifier);\n if (!candidate.startsWith(prefix) || candidate.length === prefix.length) return undefined;\n try {\n // CommonJS resolution ignores a replaced parentURL, so resolve from a require rooted in the\n // typebox entry file: it self-resolves that install's own exports, never another copy.\n const file = module.createRequire(typeboxEntry).resolve(`typebox/${candidate.slice(prefix.length)}`);\n return { url: pathToFileURL(file).href, shortCircuit: true };\n } catch {\n return undefined;\n }\n };\n module.registerHooks({\n resolve(specifier, context, nextResolve) {\n if (specifier === sdkName || specifier.startsWith(`${sdkName}/`)) {\n return nextResolve(`pi-fabric-worker-sdk${specifier.slice(sdkName.length)}`, { ...context, parentURL: import.meta.url });\n }\n if (peers.some(name => specifier === name || specifier.startsWith(`${name}/`))) {\n return nextResolve(specifier, { ...context, parentURL: sdkEntry });\n }\n const repaired = repairTypeboxAlias(specifier);\n if (repaired) return repaired;\n return nextResolve(specifier, context);\n },\n });\n const { runDurableWorker } = await import(\"./worker-host.js\");\n await runDurableWorker(options);\n }\n} catch (caught) {\n const error = explainMissingInstall(caught, import.meta.url);\n process.stderr.write(`Durable Pi worker failed: ${error instanceof Error ? (error === caught ? error.stack ?? error.message : error.message) : String(error)}\\n`);\n process.exitCode = 1;\n}\n", "import path from \"node:path\";\nimport type { ThinkingLevel } from \"@earendil-works/pi-agent-core\";\n\nexport interface DurableWorkerOptions {\n directory: string;\n runId: string;\n sessionFile?: string;\n model?: string;\n provider?: string;\n thinking?: ThinkingLevel;\n tools?: string[];\n excludeTools?: string[];\n noTools?: \"all\";\n extensions: string[];\n noExtensions: boolean;\n noSkills: boolean;\n skills: string[];\n appendSystemPrompt: string;\n}\n\n/** Internal worker protocol, deliberately not a second general-purpose Pi CLI. */\nexport function parseDurableWorkerOptions(argv: readonly string[], cwd = process.cwd()): DurableWorkerOptions {\n const options: DurableWorkerOptions = {\n directory: \"\", runId: \"\", extensions: [], noExtensions: false, noSkills: false, skills: [], appendSystemPrompt: \"\",\n };\n const prompts: string[] = [];\n for (let i = 0; i < argv.length; i++) {\n const flag = argv[i]!;\n if (flag === \"--no-session\") continue;\n if (flag === \"--no-extensions\") { options.noExtensions = true; continue; }\n if (flag === \"--no-tools\") { options.noTools = \"all\"; continue; }\n if (flag === \"--no-skills\") { options.noSkills = true; continue; }\n if (![\"--mode\", \"--durable-directory\", \"--durable-run-id\", \"--session\", \"--model\", \"--provider\", \"--thinking\", \"--tools\", \"--exclude-tools\", \"-e\", \"--extension\", \"--skill\", \"--append-system-prompt\"].includes(flag)) {\n throw new Error(`Unsupported durable worker option: ${flag}`);\n }\n const value = argv[++i];\n if (value === undefined || value.startsWith(\"--\")) throw new Error(`Missing value for ${flag}`);\n switch (flag) {\n case \"--mode\": if (value !== \"rpc\") throw new Error(\"The durable worker only supports RPC mode\"); break;\n case \"--durable-directory\": options.directory = path.resolve(cwd, value); break;\n case \"--durable-run-id\": options.runId = value.trim(); break;\n case \"--session\": options.sessionFile = path.resolve(cwd, value); break;\n case \"--model\": options.model = value; break;\n case \"--provider\": options.provider = value; break;\n case \"--thinking\":\n if (![\"off\", \"minimal\", \"low\", \"medium\", \"high\", \"xhigh\", \"max\"].includes(value)) throw new Error(`Invalid thinking level: ${value}`);\n options.thinking = value as ThinkingLevel;\n break;\n case \"--tools\": options.tools = value.split(\",\").map(tool => tool.trim()).filter(Boolean); break;\n case \"--exclude-tools\": options.excludeTools = value.split(\",\").map(tool => tool.trim()).filter(Boolean); break;\n case \"-e\": case \"--extension\": options.extensions.push(value.startsWith(\"builtin:\") ? value : path.resolve(cwd, value)); break;\n case \"--skill\": options.skills.push(path.resolve(cwd, value)); break;\n case \"--append-system-prompt\": prompts.push(value); break;\n }\n }\n if (!options.directory || !options.runId) throw new Error(\"Durable workers require --durable-directory and --durable-run-id\");\n if (options.tools && options.noTools) throw new Error(\"--tools and --no-tools are mutually exclusive\");\n options.appendSystemPrompt = prompts.join(\"\\n\\n\");\n return options;\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;AACA,SAAS,aAAa;AACtB,OAAO,YAAY;AACnB,SAA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AAG,OAAO,GAAG,GAAG;AAChE,iBAAO,YAAY,uBAAuB,UAAU,MAAM,QAAQ,MAAM,CAAC,IAAI,EAAE,GAAG,SAAS,WAAW,YAAY,IAAI,CAAC;AAAA,QACzH;AACA,YAAI,MAAM,KAAK,UAAQ,cAAc,QAAQ,UAAU,WAAW,GAAG,IAAI,GAAG,CAAC,GAAG;AAC9E,iBAAO,YAAY,WAAW,EAAE,GAAG,SAAS,WAAW,SAAS,CAAC;AAAA,QACnE;AACA,cAAM,WAAW,mBAAmB,SAAS;AAC7C,YAAI,SAAU,QAAO;AACrB,eAAO,YAAY,WAAW,OAAO;AAAA,MACvC;AAAA,IACF,CAAC;AACD,UAAM,EAAE,iBAAiB,IAAI,MAAM,OAAO,kBAAkB;AAC5D,UAAM,iBAAiB,OAAO;AAAA,EAChC;AACF,SAAS,QAAQ;AACf,QAAM,QAAQ,sBAAsB,QAAQ,YAAY,GAAG;AAC3D,UAAQ,OAAO,MAAM,6BAA6B,iBAAiB,QAAS,UAAU,SAAS,MAAM,SAAS,MAAM,UAAU,MAAM,UAAW,OAAO,KAAK,CAAC;AAAA,CAAI;AAChK,UAAQ,WAAW;AACrB;",
|
|
6
6
|
"names": ["code"]
|
|
7
7
|
}
|
|
@@ -79,9 +79,9 @@ export declare const FABRIC_DURABLE_DEFAULTS: Readonly<{
|
|
|
79
79
|
/**
|
|
80
80
|
* Names what replays a recorded run: the journal format, this package's version and the guest engine. A resume
|
|
81
81
|
* recorded under another value is refused. tests/durable-extension-replay.test.ts checks it against package.json.
|
|
82
|
-
*
|
|
82
|
+
* The manifest is bundled as data, keeping Worker imports host-free and release versions in sync.
|
|
83
83
|
*/
|
|
84
|
-
export declare const FABRIC_DURABLE_ENGINE
|
|
84
|
+
export declare const FABRIC_DURABLE_ENGINE: string;
|
|
85
85
|
/**
|
|
86
86
|
* Refusal raised to the program; its message reaches the program as an Error. A granted provider action may throw
|
|
87
87
|
* it to show the program a message; any other error becomes the fixed `Fabric action <ref> failed`.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"durable-extension.d.ts","sourceRoot":"","sources":["../src/durable-extension.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AAE7D,OAAO,KAAK,EACV,cAAc,EACd,SAAS,EACT,UAAU,EAGV,gBAAgB,EAGjB,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"durable-extension.d.ts","sourceRoot":"","sources":["../src/durable-extension.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AAE7D,OAAO,KAAK,EACV,cAAc,EACd,SAAS,EACT,UAAU,EAGV,gBAAgB,EAGjB,MAAM,4BAA4B,CAAC;AAKpC,OAAO,KAAK,EAAkB,mBAAmB,EAA6C,MAAM,qBAAqB,CAAC;AAE1H,uGAAuG;AACvG,MAAM,MAAM,mBAAmB,GAAG,CAChC,IAAI,EAAE,UAAU,EAChB,IAAI,EAAE;IAAE,QAAQ,CAAC,GAAG,EAAE,gBAAgB,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAA;CAAE,KAChE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;AAEhC;;;;GAIG;AACH,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,GAAG,EAAE,mBAAmB,CAAC;IAClC,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,CAAC;CAC/B;AAED,6IAA6I;AAC7I,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,qDAAqD;IACrD,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,mBAAmB,GAAG,wBAAwB,CAAC,CAAC,CAAC;CAC5F;AAED,+FAA+F;AAC/F,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,cAAc,EAAE,cAAc,CAA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C7C,SAAkB,IAAI,0BAA0B;CACjD;AAwID,gFAAgF;AAChF,wBAAgB,qBAAqB,CAAC,OAAO,GAAE,sBAA2B,GAAG,SAAS,CAsRrF"}
|
|
@@ -5,6 +5,220 @@ import {
|
|
|
5
5
|
// src/durable-extension.ts
|
|
6
6
|
import { Type } from "typebox";
|
|
7
7
|
|
|
8
|
+
// package.json
|
|
9
|
+
var package_default = {
|
|
10
|
+
name: "@e4779/pi-fabric",
|
|
11
|
+
version: "0.138.1-fork.1",
|
|
12
|
+
description: "A programmable tool and agent runtime for Pi",
|
|
13
|
+
type: "module",
|
|
14
|
+
main: "./dist/index.js",
|
|
15
|
+
bin: {
|
|
16
|
+
"pi-fabric": "./dist/cli/index.js"
|
|
17
|
+
},
|
|
18
|
+
types: "./dist/index.d.ts",
|
|
19
|
+
exports: {
|
|
20
|
+
".": {
|
|
21
|
+
types: "./dist/index.d.ts",
|
|
22
|
+
import: "./dist/index.js"
|
|
23
|
+
},
|
|
24
|
+
"./protocol": {
|
|
25
|
+
types: "./dist/protocol.d.ts",
|
|
26
|
+
import: "./dist/protocol.js"
|
|
27
|
+
},
|
|
28
|
+
"./agents": {
|
|
29
|
+
types: "./dist/agents.d.ts",
|
|
30
|
+
import: "./dist/agents.js"
|
|
31
|
+
},
|
|
32
|
+
"./runners": {
|
|
33
|
+
types: "./dist/runners.d.ts",
|
|
34
|
+
import: "./dist/runners.js"
|
|
35
|
+
},
|
|
36
|
+
"./durable": {
|
|
37
|
+
types: "./dist/durable.d.ts",
|
|
38
|
+
import: "./dist/durable.js"
|
|
39
|
+
},
|
|
40
|
+
"./durable-host": {
|
|
41
|
+
types: "./dist/durable-host.d.ts",
|
|
42
|
+
import: "./dist/durable-host.js"
|
|
43
|
+
},
|
|
44
|
+
"./durable-extension": {
|
|
45
|
+
types: "./dist/durable-extension.d.ts",
|
|
46
|
+
import: "./dist/durable-extension.js"
|
|
47
|
+
},
|
|
48
|
+
"./durable-extension/wasm": {
|
|
49
|
+
types: "./dist/durable-extension-wasm.d.ts",
|
|
50
|
+
import: "./dist/durable-extension-wasm.js"
|
|
51
|
+
},
|
|
52
|
+
"./mcp": {
|
|
53
|
+
types: "./dist/mcp.d.ts",
|
|
54
|
+
import: "./dist/mcp.js"
|
|
55
|
+
},
|
|
56
|
+
"./assessment": {
|
|
57
|
+
types: "./dist/assessment.d.ts",
|
|
58
|
+
import: "./dist/assessment.js"
|
|
59
|
+
},
|
|
60
|
+
"./jev": {
|
|
61
|
+
types: "./dist/jev.d.ts",
|
|
62
|
+
import: "./dist/jev.js"
|
|
63
|
+
},
|
|
64
|
+
"./memory": {
|
|
65
|
+
types: "./dist/memory.d.ts",
|
|
66
|
+
import: "./dist/memory.js"
|
|
67
|
+
},
|
|
68
|
+
"./scope": {
|
|
69
|
+
types: "./dist/scope.d.ts",
|
|
70
|
+
import: "./dist/scope.js"
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
files: [
|
|
74
|
+
"dist/",
|
|
75
|
+
"skillsets/",
|
|
76
|
+
"docs/",
|
|
77
|
+
"README.md",
|
|
78
|
+
"LICENSE",
|
|
79
|
+
"THIRD_PARTY_NOTICES.md",
|
|
80
|
+
"proofs/",
|
|
81
|
+
"scripts/verified-kernels.ts"
|
|
82
|
+
],
|
|
83
|
+
scripts: {
|
|
84
|
+
"proof:generate": "bun scripts/verified-kernels.ts --write",
|
|
85
|
+
"proof:check": "bun scripts/verified-kernels.ts --check",
|
|
86
|
+
"proof:artifact": "bun scripts/verified-kernels.ts --artifact",
|
|
87
|
+
"proof:dist": "node scripts/smoke-verified-kernels.mjs",
|
|
88
|
+
"benchmark:verification": "node scripts/benchmark-verification.mjs",
|
|
89
|
+
build: "bun run proof:artifact && node scripts/build-dist.mjs",
|
|
90
|
+
typecheck: "tsc --noEmit",
|
|
91
|
+
"test:pi1": "bun run build && vitest run tests/pi1-sdk.test.ts tests/pi1-public-contract.test.ts tests/pi110-compaction-contract.test.ts",
|
|
92
|
+
"test:jev:live": "PI_FABRIC_JEV_LIVE=1 vitest run tests/jev-live.test.ts",
|
|
93
|
+
"test:jev:dist": "node scripts/smoke-jev.mjs",
|
|
94
|
+
"test:changed": "node scripts/test-affected.mjs",
|
|
95
|
+
"test:affected": "node scripts/test-affected.mjs --base $PI_TEST_BASE",
|
|
96
|
+
"test:smoke": "vitest run tests/optional-preview-startup.test.ts tests/script-runtime.test.ts tests/pi-binary.test.ts tests/host-compatibility.test.ts tests/output-budget.test.ts tests/actor-mesh-monitor.test.ts tests/handoff.test.ts tests/config-migrations.test.ts tests/monty-payload-preflight.test.ts tests/bundled-binary-spawn.test.ts tests/worker-installation.test.ts tests/durable-worker-installation.test.ts tests/conversation-native-reader-suspension.test.ts",
|
|
97
|
+
"test:related": "vitest related --run",
|
|
98
|
+
"check:fast": "bun run typecheck && bun run test:changed",
|
|
99
|
+
"certify:context": "bun run build && node scripts/certify-context.mjs",
|
|
100
|
+
"certify:entropy": "bun run build && node scripts/certify-entropy.mjs",
|
|
101
|
+
"benchmark:real-resume": "bun run build && node scripts/benchmark-real-resume.mjs",
|
|
102
|
+
"benchmark:memory-heads": "bun run build && node scripts/benchmark-memory-heads.mjs",
|
|
103
|
+
"benchmark:memory-recall": "bun run build && node scripts/benchmark-memory-recall.mjs",
|
|
104
|
+
"benchmark:conversation": "bun run build && node --expose-gc scripts/benchmark-conversation.mjs",
|
|
105
|
+
"benchmark:kitty": "bun scripts/benchmark-kitty.mjs",
|
|
106
|
+
"benchmark:provider-dispatch": "node scripts/benchmark-provider-dispatch.mjs",
|
|
107
|
+
"benchmark:activity": "node --expose-gc scripts/benchmark-activity.mjs",
|
|
108
|
+
"benchmark:turn-cpu": "node scripts/benchmark-turn-cpu.mjs",
|
|
109
|
+
"benchmark:startup": "node scripts/benchmark-startup.mjs",
|
|
110
|
+
"lint:dead": "knip --no-gitignore",
|
|
111
|
+
"assert:lazy-graph": "node scripts/assert-lazy-graph-host-free.mjs",
|
|
112
|
+
"assert:build-artifacts": "node scripts/assert-build-artifacts.mjs",
|
|
113
|
+
prepack: "bun run proof:check && bun run typecheck && bun run build && node scripts/bundle-pi-packages.mjs"
|
|
114
|
+
},
|
|
115
|
+
keywords: [
|
|
116
|
+
"pi-package",
|
|
117
|
+
"pi-extension",
|
|
118
|
+
"codemode",
|
|
119
|
+
"mcp",
|
|
120
|
+
"agents",
|
|
121
|
+
"actors",
|
|
122
|
+
"steering",
|
|
123
|
+
"mesh",
|
|
124
|
+
"swarm",
|
|
125
|
+
"workflows",
|
|
126
|
+
"rlm",
|
|
127
|
+
"orchestration"
|
|
128
|
+
],
|
|
129
|
+
license: "MIT",
|
|
130
|
+
funding: {
|
|
131
|
+
type: "opencollective",
|
|
132
|
+
url: "https://opencollective.com/pi-fabric"
|
|
133
|
+
},
|
|
134
|
+
author: "monotykamary",
|
|
135
|
+
repository: {
|
|
136
|
+
type: "git",
|
|
137
|
+
url: "git+https://github.com/e4779/pi-fabric.git"
|
|
138
|
+
},
|
|
139
|
+
homepage: "https://github.com/fabric-runtime/pi-fabric#readme",
|
|
140
|
+
bugs: {
|
|
141
|
+
url: "https://github.com/fabric-runtime/pi-fabric/issues"
|
|
142
|
+
},
|
|
143
|
+
engines: {
|
|
144
|
+
node: ">=24"
|
|
145
|
+
},
|
|
146
|
+
pi: {
|
|
147
|
+
extensions: [
|
|
148
|
+
"./dist/extension-bootstrap.js"
|
|
149
|
+
],
|
|
150
|
+
skills: [],
|
|
151
|
+
image: "https://raw.githubusercontent.com/fabric-runtime/pi-fabric/main/media/banner.svg"
|
|
152
|
+
},
|
|
153
|
+
dependencies: {
|
|
154
|
+
"@earendil-works/chord": "1.5.0",
|
|
155
|
+
"@earendil-works/pi-codemode": "1.5.0",
|
|
156
|
+
"@earendil-works/pi-durable": "1.5.0",
|
|
157
|
+
"@jitl/quickjs-singlefile-mjs-release-sync": "^0.32.0",
|
|
158
|
+
"@lezer/common": "^1.5.2",
|
|
159
|
+
"@lezer/python": "^1.1.19",
|
|
160
|
+
"@pydantic/monty": "0.0.23",
|
|
161
|
+
"@shikijs/langs": "4.4.3",
|
|
162
|
+
"@shikijs/themes": "4.4.3",
|
|
163
|
+
"cross-spawn": "^7.0.6",
|
|
164
|
+
diff: "^9.0.0",
|
|
165
|
+
mcporter: "^0.12.3",
|
|
166
|
+
"pi-fabric-worker-sdk": "npm:@earendil-works/pi-coding-agent@1.5.0",
|
|
167
|
+
"quickjs-emscripten-core": "^0.32.0",
|
|
168
|
+
shiki: "4.4.3",
|
|
169
|
+
typescript: "^6.0.3",
|
|
170
|
+
yaml: "^2.9.0"
|
|
171
|
+
},
|
|
172
|
+
peerDependencies: {
|
|
173
|
+
"@earendil-works/pi-agent-core": "*",
|
|
174
|
+
"@earendil-works/pi-ai": "*",
|
|
175
|
+
"@earendil-works/pi-coding-agent": "*",
|
|
176
|
+
"@earendil-works/pi-tui": "*",
|
|
177
|
+
typebox: "*",
|
|
178
|
+
"@earendil-works/chord": ">=1.4.0",
|
|
179
|
+
"@earendil-works/pi-codemode": ">=1.4.0",
|
|
180
|
+
"@earendil-works/pi-durable": ">=1.4.0"
|
|
181
|
+
},
|
|
182
|
+
devDependencies: {
|
|
183
|
+
"@earendil-works/pi-agent-core": "1.5.0",
|
|
184
|
+
"@earendil-works/pi-ai": "1.5.0",
|
|
185
|
+
"@earendil-works/pi-coding-agent": "1.5.0",
|
|
186
|
+
"@earendil-works/pi-tui": "1.5.0",
|
|
187
|
+
"@types/cross-spawn": "^6.0.6",
|
|
188
|
+
"@types/node": "^26.1.2",
|
|
189
|
+
esbuild: "^0.25.12",
|
|
190
|
+
"gdp-wired": "0.31.1",
|
|
191
|
+
knip: "^6.29.0",
|
|
192
|
+
typebox: "1.3.27",
|
|
193
|
+
vitest: "^4.1.10"
|
|
194
|
+
},
|
|
195
|
+
workspaces: [
|
|
196
|
+
"."
|
|
197
|
+
],
|
|
198
|
+
overrides: {
|
|
199
|
+
"@modelcontextprotocol/sdk": "1.31.0",
|
|
200
|
+
"brace-expansion": "5.0.12",
|
|
201
|
+
"fast-uri": "3.1.7",
|
|
202
|
+
nanoid: "3.3.18",
|
|
203
|
+
"proxy-addr": "2.0.8",
|
|
204
|
+
"source-map-js": "1.2.2"
|
|
205
|
+
},
|
|
206
|
+
optionalDependencies: {
|
|
207
|
+
"jev-fabric": "0.8.0"
|
|
208
|
+
},
|
|
209
|
+
peerDependenciesMeta: {
|
|
210
|
+
"@earendil-works/chord": {
|
|
211
|
+
optional: true
|
|
212
|
+
},
|
|
213
|
+
"@earendil-works/pi-codemode": {
|
|
214
|
+
optional: true
|
|
215
|
+
},
|
|
216
|
+
"@earendil-works/pi-durable": {
|
|
217
|
+
optional: true
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
};
|
|
221
|
+
|
|
8
222
|
// src/runtime/sha256.ts
|
|
9
223
|
var K = new Uint32Array([
|
|
10
224
|
1116352408,
|
|
@@ -302,7 +516,7 @@ var MAX_LISTED_CALLS = 20;
|
|
|
302
516
|
var CHARS_PER_TOKEN = 4;
|
|
303
517
|
var TEXT_OUTPUT_SCHEMA = { type: "string" };
|
|
304
518
|
var INTERRUPTED_CODE = "interrupted";
|
|
305
|
-
var FABRIC_DURABLE_ENGINE = `${FABRIC_DURABLE_JOURNAL_FORMAT}/pi-fabric
|
|
519
|
+
var FABRIC_DURABLE_ENGINE = `${FABRIC_DURABLE_JOURNAL_FORMAT}/pi-fabric@${package_default.version}/quickjs-singlefile-0.32`;
|
|
306
520
|
var FabricDurableRefusal = class extends Error {
|
|
307
521
|
name = "FabricDurableRefusal";
|
|
308
522
|
};
|