@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
package/package.json
CHANGED
|
@@ -1,212 +1,212 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
}
|
|
2
|
+
"name": "@e4779/pi-fabric",
|
|
3
|
+
"version": "0.138.1-fork.1",
|
|
4
|
+
"description": "A programmable tool and agent runtime for Pi",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"bin": {
|
|
8
|
+
"pi-fabric": "./dist/cli/index.js"
|
|
9
|
+
},
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"exports": {
|
|
12
|
+
".": {
|
|
13
|
+
"types": "./dist/index.d.ts",
|
|
14
|
+
"import": "./dist/index.js"
|
|
15
|
+
},
|
|
16
|
+
"./protocol": {
|
|
17
|
+
"types": "./dist/protocol.d.ts",
|
|
18
|
+
"import": "./dist/protocol.js"
|
|
19
|
+
},
|
|
20
|
+
"./agents": {
|
|
21
|
+
"types": "./dist/agents.d.ts",
|
|
22
|
+
"import": "./dist/agents.js"
|
|
23
|
+
},
|
|
24
|
+
"./runners": {
|
|
25
|
+
"types": "./dist/runners.d.ts",
|
|
26
|
+
"import": "./dist/runners.js"
|
|
27
|
+
},
|
|
28
|
+
"./durable": {
|
|
29
|
+
"types": "./dist/durable.d.ts",
|
|
30
|
+
"import": "./dist/durable.js"
|
|
31
|
+
},
|
|
32
|
+
"./durable-host": {
|
|
33
|
+
"types": "./dist/durable-host.d.ts",
|
|
34
|
+
"import": "./dist/durable-host.js"
|
|
35
|
+
},
|
|
36
|
+
"./durable-extension": {
|
|
37
|
+
"types": "./dist/durable-extension.d.ts",
|
|
38
|
+
"import": "./dist/durable-extension.js"
|
|
39
|
+
},
|
|
40
|
+
"./durable-extension/wasm": {
|
|
41
|
+
"types": "./dist/durable-extension-wasm.d.ts",
|
|
42
|
+
"import": "./dist/durable-extension-wasm.js"
|
|
43
|
+
},
|
|
44
|
+
"./mcp": {
|
|
45
|
+
"types": "./dist/mcp.d.ts",
|
|
46
|
+
"import": "./dist/mcp.js"
|
|
47
|
+
},
|
|
48
|
+
"./assessment": {
|
|
49
|
+
"types": "./dist/assessment.d.ts",
|
|
50
|
+
"import": "./dist/assessment.js"
|
|
51
|
+
},
|
|
52
|
+
"./jev": {
|
|
53
|
+
"types": "./dist/jev.d.ts",
|
|
54
|
+
"import": "./dist/jev.js"
|
|
55
|
+
},
|
|
56
|
+
"./memory": {
|
|
57
|
+
"types": "./dist/memory.d.ts",
|
|
58
|
+
"import": "./dist/memory.js"
|
|
59
|
+
},
|
|
60
|
+
"./scope": {
|
|
61
|
+
"types": "./dist/scope.d.ts",
|
|
62
|
+
"import": "./dist/scope.js"
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
"files": [
|
|
66
|
+
"dist/",
|
|
67
|
+
"skillsets/",
|
|
68
|
+
"docs/",
|
|
69
|
+
"README.md",
|
|
70
|
+
"LICENSE",
|
|
71
|
+
"THIRD_PARTY_NOTICES.md",
|
|
72
|
+
"proofs/",
|
|
73
|
+
"scripts/verified-kernels.ts"
|
|
74
|
+
],
|
|
75
|
+
"scripts": {
|
|
76
|
+
"proof:generate": "bun scripts/verified-kernels.ts --write",
|
|
77
|
+
"proof:check": "bun scripts/verified-kernels.ts --check",
|
|
78
|
+
"proof:artifact": "bun scripts/verified-kernels.ts --artifact",
|
|
79
|
+
"proof:dist": "node scripts/smoke-verified-kernels.mjs",
|
|
80
|
+
"benchmark:verification": "node scripts/benchmark-verification.mjs",
|
|
81
|
+
"build": "bun run proof:artifact && node scripts/build-dist.mjs",
|
|
82
|
+
"typecheck": "tsc --noEmit",
|
|
83
|
+
"test:pi1": "bun run build && vitest run tests/pi1-sdk.test.ts tests/pi1-public-contract.test.ts tests/pi110-compaction-contract.test.ts",
|
|
84
|
+
"test:jev:live": "PI_FABRIC_JEV_LIVE=1 vitest run tests/jev-live.test.ts",
|
|
85
|
+
"test:jev:dist": "node scripts/smoke-jev.mjs",
|
|
86
|
+
"test:changed": "node scripts/test-affected.mjs",
|
|
87
|
+
"test:affected": "node scripts/test-affected.mjs --base $PI_TEST_BASE",
|
|
88
|
+
"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",
|
|
89
|
+
"test:related": "vitest related --run",
|
|
90
|
+
"check:fast": "bun run typecheck && bun run test:changed",
|
|
91
|
+
"certify:context": "bun run build && node scripts/certify-context.mjs",
|
|
92
|
+
"certify:entropy": "bun run build && node scripts/certify-entropy.mjs",
|
|
93
|
+
"benchmark:real-resume": "bun run build && node scripts/benchmark-real-resume.mjs",
|
|
94
|
+
"benchmark:memory-heads": "bun run build && node scripts/benchmark-memory-heads.mjs",
|
|
95
|
+
"benchmark:memory-recall": "bun run build && node scripts/benchmark-memory-recall.mjs",
|
|
96
|
+
"benchmark:conversation": "bun run build && node --expose-gc scripts/benchmark-conversation.mjs",
|
|
97
|
+
"benchmark:kitty": "bun scripts/benchmark-kitty.mjs",
|
|
98
|
+
"benchmark:provider-dispatch": "node scripts/benchmark-provider-dispatch.mjs",
|
|
99
|
+
"benchmark:activity": "node --expose-gc scripts/benchmark-activity.mjs",
|
|
100
|
+
"benchmark:turn-cpu": "node scripts/benchmark-turn-cpu.mjs",
|
|
101
|
+
"benchmark:startup": "node scripts/benchmark-startup.mjs",
|
|
102
|
+
"lint:dead": "knip --no-gitignore",
|
|
103
|
+
"assert:lazy-graph": "node scripts/assert-lazy-graph-host-free.mjs",
|
|
104
|
+
"assert:build-artifacts": "node scripts/assert-build-artifacts.mjs",
|
|
105
|
+
"prepack": "bun run proof:check && bun run typecheck && bun run build && node scripts/bundle-pi-packages.mjs"
|
|
106
|
+
},
|
|
107
|
+
"keywords": [
|
|
108
|
+
"pi-package",
|
|
109
|
+
"pi-extension",
|
|
110
|
+
"codemode",
|
|
111
|
+
"mcp",
|
|
112
|
+
"agents",
|
|
113
|
+
"actors",
|
|
114
|
+
"steering",
|
|
115
|
+
"mesh",
|
|
116
|
+
"swarm",
|
|
117
|
+
"workflows",
|
|
118
|
+
"rlm",
|
|
119
|
+
"orchestration"
|
|
120
|
+
],
|
|
121
|
+
"license": "MIT",
|
|
122
|
+
"funding": {
|
|
123
|
+
"type": "opencollective",
|
|
124
|
+
"url": "https://opencollective.com/pi-fabric"
|
|
125
|
+
},
|
|
126
|
+
"author": "monotykamary",
|
|
127
|
+
"repository": {
|
|
128
|
+
"type": "git",
|
|
129
|
+
"url": "git+https://github.com/e4779/pi-fabric.git"
|
|
130
|
+
},
|
|
131
|
+
"homepage": "https://github.com/fabric-runtime/pi-fabric#readme",
|
|
132
|
+
"bugs": {
|
|
133
|
+
"url": "https://github.com/fabric-runtime/pi-fabric/issues"
|
|
134
|
+
},
|
|
135
|
+
"engines": {
|
|
136
|
+
"node": ">=24"
|
|
137
|
+
},
|
|
138
|
+
"pi": {
|
|
139
|
+
"extensions": [
|
|
140
|
+
"./dist/extension-bootstrap.js"
|
|
141
|
+
],
|
|
142
|
+
"skills": [],
|
|
143
|
+
"image": "https://raw.githubusercontent.com/fabric-runtime/pi-fabric/main/media/banner.svg"
|
|
144
|
+
},
|
|
145
|
+
"dependencies": {
|
|
146
|
+
"@earendil-works/chord": "1.5.0",
|
|
147
|
+
"@earendil-works/pi-codemode": "1.5.0",
|
|
148
|
+
"@earendil-works/pi-durable": "1.5.0",
|
|
149
|
+
"@jitl/quickjs-singlefile-mjs-release-sync": "^0.32.0",
|
|
150
|
+
"@lezer/common": "^1.5.2",
|
|
151
|
+
"@lezer/python": "^1.1.19",
|
|
152
|
+
"@pydantic/monty": "0.0.23",
|
|
153
|
+
"@shikijs/langs": "4.4.3",
|
|
154
|
+
"@shikijs/themes": "4.4.3",
|
|
155
|
+
"cross-spawn": "^7.0.6",
|
|
156
|
+
"diff": "^9.0.0",
|
|
157
|
+
"mcporter": "^0.12.3",
|
|
158
|
+
"pi-fabric-worker-sdk": "npm:@earendil-works/pi-coding-agent@1.5.0",
|
|
159
|
+
"quickjs-emscripten-core": "^0.32.0",
|
|
160
|
+
"shiki": "4.4.3",
|
|
161
|
+
"typescript": "^6.0.3",
|
|
162
|
+
"yaml": "^2.9.0"
|
|
163
|
+
},
|
|
164
|
+
"peerDependencies": {
|
|
165
|
+
"@earendil-works/pi-agent-core": "*",
|
|
166
|
+
"@earendil-works/pi-ai": "*",
|
|
167
|
+
"@earendil-works/pi-coding-agent": "*",
|
|
168
|
+
"@earendil-works/pi-tui": "*",
|
|
169
|
+
"typebox": "*",
|
|
170
|
+
"@earendil-works/chord": ">=1.4.0",
|
|
171
|
+
"@earendil-works/pi-codemode": ">=1.4.0",
|
|
172
|
+
"@earendil-works/pi-durable": ">=1.4.0"
|
|
173
|
+
},
|
|
174
|
+
"devDependencies": {
|
|
175
|
+
"@earendil-works/pi-agent-core": "1.5.0",
|
|
176
|
+
"@earendil-works/pi-ai": "1.5.0",
|
|
177
|
+
"@earendil-works/pi-coding-agent": "1.5.0",
|
|
178
|
+
"@earendil-works/pi-tui": "1.5.0",
|
|
179
|
+
"@types/cross-spawn": "^6.0.6",
|
|
180
|
+
"@types/node": "^26.1.2",
|
|
181
|
+
"esbuild": "^0.25.12",
|
|
182
|
+
"gdp-wired": "0.31.1",
|
|
183
|
+
"knip": "^6.29.0",
|
|
184
|
+
"typebox": "1.3.27",
|
|
185
|
+
"vitest": "^4.1.10"
|
|
186
|
+
},
|
|
187
|
+
"workspaces": [
|
|
188
|
+
"."
|
|
189
|
+
],
|
|
190
|
+
"overrides": {
|
|
191
|
+
"@modelcontextprotocol/sdk": "1.31.0",
|
|
192
|
+
"brace-expansion": "5.0.12",
|
|
193
|
+
"fast-uri": "3.1.7",
|
|
194
|
+
"nanoid": "3.3.18",
|
|
195
|
+
"proxy-addr": "2.0.8",
|
|
196
|
+
"source-map-js": "1.2.2"
|
|
197
|
+
},
|
|
198
|
+
"optionalDependencies": {
|
|
199
|
+
"jev-fabric": "0.8.0"
|
|
200
|
+
},
|
|
201
|
+
"peerDependenciesMeta": {
|
|
202
|
+
"@earendil-works/chord": {
|
|
203
|
+
"optional": true
|
|
204
|
+
},
|
|
205
|
+
"@earendil-works/pi-codemode": {
|
|
206
|
+
"optional": true
|
|
207
|
+
},
|
|
208
|
+
"@earendil-works/pi-durable": {
|
|
209
|
+
"optional": true
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
}
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
// What a compaction summary puts in front of the model. Three kernels, each a
|
|
2
|
+
// claim about context salience rather than about cut safety:
|
|
3
|
+
//
|
|
4
|
+
// - summaryAllocation: the user's words take summary bytes before operational
|
|
5
|
+
// residue (files, activity, failures, transcript) gets any.
|
|
6
|
+
// - userStaleness: how long the agent has run since the user last spoke,
|
|
7
|
+
// counted from user messages only; background deliveries never reset it.
|
|
8
|
+
// - failureLedger: every failure is accounted exactly once as open, aged or
|
|
9
|
+
// resolved. Unresolved failures from the newest window are itemized first;
|
|
10
|
+
// failures an earlier summary already itemized fill only the room they leave.
|
|
11
|
+
import { all, bool, fun, min, nat, oneOf, rule, when, yes } from "gdp-wired";
|
|
12
|
+
import type { Kernel } from "./kernel.js";
|
|
13
|
+
|
|
14
|
+
export type ContextBug =
|
|
15
|
+
| "operations are allocated first"
|
|
16
|
+
| "allocation ignores the limit"
|
|
17
|
+
| "background messages reset staleness"
|
|
18
|
+
| "compactions before any user message count"
|
|
19
|
+
| "aged failures vanish"
|
|
20
|
+
| "aged failures crowd out fresh ones"
|
|
21
|
+
| "itemized failures ignore the limit"
|
|
22
|
+
| "resolved failures stay open";
|
|
23
|
+
|
|
24
|
+
/** Byte allocation inside the summary's remaining space. Demands are the
|
|
25
|
+
* capped sizes of the protected user blocks and of the operational blocks. */
|
|
26
|
+
const allocation = (bug?: ContextBug) => fun("summary allocation")
|
|
27
|
+
.inputs({ limit: nat, user: nat, operations: nat })
|
|
28
|
+
.returns(({ limit, user, operations }) => {
|
|
29
|
+
if (bug === "operations are allocated first") {
|
|
30
|
+
const ops = min(operations, limit);
|
|
31
|
+
return { userBytes: min(user, limit.minus(ops)), operationBytes: ops };
|
|
32
|
+
}
|
|
33
|
+
const userBytes = min(user, limit);
|
|
34
|
+
const rest = bug === "allocation ignores the limit" ? limit : limit.minus(userBytes);
|
|
35
|
+
return { userBytes, operationBytes: min(operations, rest) };
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
/** Op codes, in order: 0 user, 1 background, 2 compaction, 3 other. */
|
|
39
|
+
export const STALENESS_OPS = ["user", "background", "compaction", "other"] as const;
|
|
40
|
+
|
|
41
|
+
const staleness = (bug?: ContextBug) => rule("user staleness")
|
|
42
|
+
.inputs({ op: oneOf(...STALENESS_OPS) })
|
|
43
|
+
.state({ seen: bool.from(false), compactions: 0, background: 0 })
|
|
44
|
+
.step(({ op, seen, compactions, background }) => {
|
|
45
|
+
const counting = bug === "compactions before any user message count" ? yes : seen;
|
|
46
|
+
const resets = bug === "background messages reset staleness" ? op.is("user").or(op.is("background")) : op.is("user");
|
|
47
|
+
return {
|
|
48
|
+
seen: op.is("user").or(seen),
|
|
49
|
+
compactions: when(resets, 0, when(op.is("compaction").and(counting), compactions.plus(1), compactions)),
|
|
50
|
+
background: when(resets, 0, when(op.is("background").and(seen), background.plus(1), background)),
|
|
51
|
+
};
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
/** Production folds fresh failures newest first, then aged ones newest first,
|
|
55
|
+
* then resolved ones. `skipped` counts fresh open failures left without room. */
|
|
56
|
+
const ledger = (bug?: ContextBug) => rule("failure ledger")
|
|
57
|
+
.params({ limit: nat })
|
|
58
|
+
.inputs({ fresh: bool, resolved: bool })
|
|
59
|
+
.state({ total: 0, open: 0, aged: 0, settled: 0, itemized: 0, skipped: 0 })
|
|
60
|
+
.flags(({ fresh, resolved, itemized, skipped, limit }) => ({
|
|
61
|
+
isOpen: bug === "resolved failures stay open" ? fresh : resolved.not().and(fresh),
|
|
62
|
+
isAged: resolved.not().and(fresh.not()),
|
|
63
|
+
room: bug === "itemized failures ignore the limit" ? yes : itemized.lt(limit),
|
|
64
|
+
agedAllowed: bug === "aged failures crowd out fresh ones" ? yes : skipped.eq(0),
|
|
65
|
+
}))
|
|
66
|
+
.step(({ resolved, total, open, aged, settled, itemized, skipped, isOpen, isAged, room, agedAllowed }) => ({
|
|
67
|
+
total: total.plus(1),
|
|
68
|
+
open: when(isOpen, open.plus(1), open),
|
|
69
|
+
aged: bug === "aged failures vanish" ? aged : when(isAged, aged.plus(1), aged),
|
|
70
|
+
settled: when(resolved.and(isOpen.not()), settled.plus(1), settled),
|
|
71
|
+
itemized: when(room.and(isOpen.or(isAged.and(agedAllowed))), itemized.plus(1), itemized),
|
|
72
|
+
skipped: when(isOpen.and(room.not()), skipped.plus(1), skipped),
|
|
73
|
+
}));
|
|
74
|
+
|
|
75
|
+
export const contextKernels = (bug?: ContextBug): Kernel[] => {
|
|
76
|
+
const a = allocation(bug), s = staleness(bug), l = ledger(bug);
|
|
77
|
+
return [
|
|
78
|
+
{ id: "summaryAllocation", fun: a, decisions: [
|
|
79
|
+
a.law("user_first: the user's words lose bytes only when they alone exceed the limit", () => [],
|
|
80
|
+
({ userBytes }, { user, limit }) => all(userBytes.atMost(user), userBytes.atMost(limit), userBytes.eq(user).or(userBytes.eq(limit)))),
|
|
81
|
+
a.law("allocation_within: user and operational bytes together stay within the limit", () => [],
|
|
82
|
+
({ userBytes, operationBytes }, { limit }) => userBytes.plus(operationBytes).atMost(limit)),
|
|
83
|
+
a.law("operations_use_the_rest: operations receive what the user leaves, up to their demand", () => [],
|
|
84
|
+
({ userBytes, operationBytes }, { limit, operations }) => all(
|
|
85
|
+
operationBytes.atMost(operations),
|
|
86
|
+
operationBytes.eq(operations).or(userBytes.plus(operationBytes).eq(limit)))),
|
|
87
|
+
] },
|
|
88
|
+
{
|
|
89
|
+
id: "userStaleness",
|
|
90
|
+
rule: s,
|
|
91
|
+
laws: [
|
|
92
|
+
s.law("unanchored_is_zero: before any user message, nothing is counted", ({ seen, compactions, background }) =>
|
|
93
|
+
seen.or(compactions.eq(0).and(background.eq(0)))),
|
|
94
|
+
],
|
|
95
|
+
stepLaws: [
|
|
96
|
+
s.stepLaw("user_resets: a user message anchors and clears staleness", (_e, after) =>
|
|
97
|
+
all(after.seen, after.compactions.eq(0), after.background.eq(0)), ({ op }) => op.is("user")),
|
|
98
|
+
s.stepLaw("background_never_resets: a background delivery leaves the compaction count and anchor alone", ({ seen, compactions }, after) =>
|
|
99
|
+
all(after.compactions.eq(compactions), after.seen.iff(seen)), ({ op }) => op.is("background")),
|
|
100
|
+
s.stepLaw("compaction_counts_once: an anchored compaction adds exactly one", ({ compactions }, after) =>
|
|
101
|
+
after.compactions.eq(compactions.plus(1)), ({ op, seen }) => op.is("compaction").and(seen)),
|
|
102
|
+
s.stepLaw("only_user_clears: no other entry lowers either count", ({ compactions, background }, after) =>
|
|
103
|
+
all(compactions.atMost(after.compactions), background.atMost(after.background)), ({ op }) => op.is("user").not()),
|
|
104
|
+
],
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
id: "failureLedger",
|
|
108
|
+
rule: l,
|
|
109
|
+
laws: [
|
|
110
|
+
l.law("failures_conserved: every failure is open, aged or resolved, exactly once", ({ total, open, aged, settled }) =>
|
|
111
|
+
total.eq(open.plus(aged).plus(settled))),
|
|
112
|
+
l.law("itemized_bounded: itemized failures are unresolved and within the limit", ({ itemized, open, aged, limit }) =>
|
|
113
|
+
itemized.atMost(open.plus(aged)).and(itemized.atMost(limit))),
|
|
114
|
+
l.law("skipped_are_open: only fresh open failures are counted as left out", ({ skipped, open }) => skipped.atMost(open)),
|
|
115
|
+
],
|
|
116
|
+
stepLaws: [
|
|
117
|
+
l.stepLaw("resolved_never_itemized: a resolved failure is never itemized", ({ itemized }, after) =>
|
|
118
|
+
after.itemized.eq(itemized), ({ resolved }) => resolved),
|
|
119
|
+
l.stepLaw("open_itemized_with_room: a fresh open failure is itemized while room remains", ({ itemized }, after) =>
|
|
120
|
+
after.itemized.eq(itemized.plus(1)), ({ fresh, resolved, itemized, limit }) => all(fresh, resolved.not(), itemized.lt(limit))),
|
|
121
|
+
l.stepLaw("fresh_first: an aged failure takes no room once a fresh open failure was left out", ({ itemized }, after) =>
|
|
122
|
+
after.itemized.eq(itemized), ({ fresh, resolved, skipped }) => all(fresh.not(), resolved.not(), skipped.gt(0))),
|
|
123
|
+
l.stepLaw("aged_fills_room: an aged failure is itemized while room remains and no fresh one was left out", ({ itemized }, after) =>
|
|
124
|
+
after.itemized.eq(itemized.plus(1)), ({ fresh, resolved, skipped, itemized, limit }) => all(fresh.not(), resolved.not(), skipped.eq(0), itemized.lt(limit))),
|
|
125
|
+
],
|
|
126
|
+
},
|
|
127
|
+
];
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
export const CONTEXT_BUGS: ContextBug[] = [
|
|
131
|
+
"operations are allocated first",
|
|
132
|
+
"allocation ignores the limit",
|
|
133
|
+
"background messages reset staleness",
|
|
134
|
+
"compactions before any user message count",
|
|
135
|
+
"aged failures vanish",
|
|
136
|
+
"aged failures crowd out fresh ones",
|
|
137
|
+
"itemized failures ignore the limit",
|
|
138
|
+
"resolved failures stay open",
|
|
139
|
+
];
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
// Host output ceilings and provider deadline-pause admission. The adapter owns
|
|
2
|
+
// JS number validation and callback identity; the compiled decisions own policy.
|
|
3
|
+
import { bool, fun, nat, when } from "gdp-wired";
|
|
4
|
+
import type { Kernel } from "./kernel.js";
|
|
5
|
+
|
|
6
|
+
type ExecutionBug = "invalid ceiling accepted" | "zero ceiling accepted" | "override discarded" | "default discarded"
|
|
7
|
+
| "hard deadline pauses" | "missing callback admitted" | "human wait refused";
|
|
8
|
+
|
|
9
|
+
export const executionKernels = (bug?: ExecutionBug): Kernel[] => {
|
|
10
|
+
const ceiling = fun("host output ceiling")
|
|
11
|
+
.inputs({ present: bool, valid: bool, requested: nat, fallback: nat })
|
|
12
|
+
.returns(({ present, valid, requested, fallback }) => ({
|
|
13
|
+
accepted: bug === "invalid ceiling accepted" ? present.or(present.not())
|
|
14
|
+
: present.not().or(valid.and(bug === "zero ceiling accepted" ? requested.atLeast(0) : requested.gt(0))),
|
|
15
|
+
limit: bug === "override discarded" ? fallback
|
|
16
|
+
: bug === "default discarded" ? requested
|
|
17
|
+
: when(present.and(valid, requested.gt(0)), requested, fallback),
|
|
18
|
+
}));
|
|
19
|
+
const wait = fun("provider human wait admission")
|
|
20
|
+
.inputs({ available: bool, hardDeadline: bool })
|
|
21
|
+
.returns(({ available, hardDeadline }) => ({
|
|
22
|
+
allowed: bug === "hard deadline pauses" ? available
|
|
23
|
+
: bug === "missing callback admitted" ? hardDeadline.not()
|
|
24
|
+
: bug === "human wait refused" ? available.and(available.not())
|
|
25
|
+
: available.and(hardDeadline.not()),
|
|
26
|
+
}));
|
|
27
|
+
return [{ id: "outputCeiling", fun: ceiling, decisions: [
|
|
28
|
+
ceiling.law("ceiling_safe: a present accepted override is valid and positive", () => [],
|
|
29
|
+
(o, e) => o.accepted.and(e.present).implies(e.valid.and(e.requested.gt(0)))),
|
|
30
|
+
ceiling.law("ceiling_complete: absent or valid positive overrides are accepted",
|
|
31
|
+
e => e.present.not().or(e.valid.and(e.requested.gt(0))), o => o.accepted),
|
|
32
|
+
ceiling.law("ceiling_default: omission preserves the host default", e => e.present.not(),
|
|
33
|
+
(o, e) => o.limit.eq(e.fallback)),
|
|
34
|
+
ceiling.law("ceiling_override: a valid positive host override is preserved exactly",
|
|
35
|
+
e => e.present.and(e.valid, e.requested.gt(0)), (o, e) => o.limit.eq(e.requested)),
|
|
36
|
+
ceiling.law("ceiling_positive: accepted limits stay positive with a positive default",
|
|
37
|
+
e => e.fallback.gt(0), o => o.accepted.implies(o.limit.gt(0))),
|
|
38
|
+
] }, { id: "humanWaitAdmission", fun: wait, decisions: [
|
|
39
|
+
wait.law("human_wait_safe: a callback requires runtime support and no hard deadline", () => [],
|
|
40
|
+
(o, e) => o.allowed.implies(e.available.and(e.hardDeadline.not()))),
|
|
41
|
+
wait.law("human_wait_complete: runtime support without a hard deadline exposes the callback",
|
|
42
|
+
e => e.available.and(e.hardDeadline.not()), o => o.allowed),
|
|
43
|
+
] }];
|
|
44
|
+
};
|
|
45
|
+
export const EXECUTION_BUGS: ExecutionBug[] = [
|
|
46
|
+
"invalid ceiling accepted", "zero ceiling accepted", "override discarded", "default discarded",
|
|
47
|
+
"hard deadline pauses", "missing callback admitted", "human wait refused",
|
|
48
|
+
];
|