@e4779/pi-fabric 0.117.2-fork.30 → 0.131.0-fork.32
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 +12 -5
- package/THIRD_PARTY_NOTICES.md +6 -14
- package/dist/activity/store.d.ts +2 -1
- package/dist/activity/store.d.ts.map +1 -1
- package/dist/actors/binding-store.d.ts +13 -0
- package/dist/actors/binding-store.d.ts.map +1 -1
- package/dist/actors/directory.d.ts.map +1 -1
- package/dist/actors/global-registry.d.ts +8 -0
- package/dist/actors/global-registry.d.ts.map +1 -1
- package/dist/actors/host-event-payload.d.ts +14 -0
- package/dist/actors/host-event-payload.d.ts.map +1 -1
- package/dist/actors/manager.d.ts +4 -3
- package/dist/actors/manager.d.ts.map +1 -1
- package/dist/actors/mesh-monitor.d.ts +2 -0
- package/dist/actors/mesh-monitor.d.ts.map +1 -1
- package/dist/actors/name-policy.d.ts +3 -0
- package/dist/actors/name-policy.d.ts.map +1 -0
- package/dist/actors/registry-store.d.ts +14 -5
- package/dist/actors/registry-store.d.ts.map +1 -1
- package/dist/actors/store-read.d.ts +16 -0
- package/dist/actors/store-read.d.ts.map +1 -0
- package/dist/agents/agent-files.d.ts +80 -0
- package/dist/agents/agent-files.d.ts.map +1 -0
- package/dist/agents/agent-files.js +327 -0
- package/dist/agents/agent-files.js.map +7 -0
- package/dist/agents/child-skills.d.ts +60 -0
- package/dist/agents/child-skills.d.ts.map +1 -0
- package/dist/agents/child-skills.js +94 -0
- package/dist/agents/child-skills.js.map +7 -0
- package/dist/agents/clone-first-worktree.d.ts +6 -0
- package/dist/agents/clone-first-worktree.d.ts.map +1 -1
- package/dist/agents/cow-clone.d.ts.map +1 -1
- package/dist/agents/handoff.d.ts +12 -2
- package/dist/agents/handoff.d.ts.map +1 -1
- package/dist/agents/herdr-status.d.ts +26 -0
- package/dist/agents/herdr-status.d.ts.map +1 -0
- package/dist/agents/herdr-status.js +161 -0
- package/dist/agents/herdr-status.js.map +7 -0
- package/dist/agents/hosted-run.d.ts +20 -4
- package/dist/agents/hosted-run.d.ts.map +1 -1
- package/dist/agents/manager.d.ts +18 -2
- package/dist/agents/manager.d.ts.map +1 -1
- package/dist/agents/model-pin-guard.d.ts +27 -0
- package/dist/agents/model-pin-guard.d.ts.map +1 -0
- package/dist/agents/model-pin-guard.js +86 -0
- package/dist/agents/model-pin-guard.js.map +7 -0
- package/dist/agents/model-pin.d.ts +25 -0
- package/dist/agents/model-pin.d.ts.map +1 -0
- package/dist/agents/provider-bridge.d.ts +7 -6
- package/dist/agents/provider-bridge.d.ts.map +1 -1
- package/dist/agents/provider-bridge.js +33 -5
- package/dist/agents/provider-bridge.js.map +3 -3
- package/dist/agents/request.d.ts.map +1 -1
- package/dist/agents/result.d.ts.map +1 -1
- package/dist/agents/result.js +1 -1
- package/dist/agents/runner-notice.d.ts.map +1 -1
- package/dist/agents/runner-protocol.d.ts +8 -0
- package/dist/agents/runner-protocol.d.ts.map +1 -1
- package/dist/agents/service-schema.d.ts.map +1 -1
- package/dist/agents/transports/herdr-socket.d.ts +12 -0
- package/dist/agents/transports/herdr-socket.d.ts.map +1 -0
- package/dist/agents/transports/herdr-transport.d.ts.map +1 -1
- package/dist/agents/types.d.ts +51 -0
- package/dist/agents/types.d.ts.map +1 -1
- package/dist/agents/worker-recovery.d.ts +75 -0
- package/dist/agents/worker-recovery.d.ts.map +1 -0
- package/dist/agents/worktree-manager.d.ts.map +1 -1
- package/dist/agents.js +12 -11
- package/dist/agents.js.map +2 -2
- package/dist/audit/details.d.ts +36 -1
- package/dist/audit/details.d.ts.map +1 -1
- package/dist/audit/projection.d.ts.map +1 -1
- package/dist/audit/trace-schema.d.ts +50 -0
- package/dist/audit/trace-schema.d.ts.map +1 -0
- package/dist/audit/trace.d.ts +2 -48
- package/dist/audit/trace.d.ts.map +1 -1
- package/dist/chunks/chunk-2RWNVCFD.js +483 -0
- package/dist/chunks/chunk-2RWNVCFD.js.map +7 -0
- package/dist/chunks/chunk-2SCMGO2Z.js +16 -0
- package/dist/chunks/chunk-2SCMGO2Z.js.map +7 -0
- package/dist/chunks/chunk-35EEGOH3.js +324 -0
- package/dist/chunks/chunk-35EEGOH3.js.map +7 -0
- package/dist/chunks/{chunk-3FJUP3GV.js → chunk-36XQFTEN.js} +2 -2
- package/dist/chunks/{chunk-UTOBAZ5T.js → chunk-37NIOSVU.js} +1 -1
- package/dist/chunks/chunk-37NIOSVU.js.map +7 -0
- package/dist/chunks/chunk-3IJEQBFS.js +25 -0
- package/dist/chunks/chunk-3IJEQBFS.js.map +7 -0
- package/dist/chunks/{chunk-EHQQ4KCX.js → chunk-3MOY6WIB.js} +84 -19
- package/dist/chunks/chunk-3MOY6WIB.js.map +7 -0
- package/dist/chunks/chunk-3PKZSIRA.js +1312 -0
- package/dist/chunks/chunk-3PKZSIRA.js.map +7 -0
- package/dist/chunks/chunk-3VK6UGAN.js +64 -0
- package/dist/chunks/chunk-3VK6UGAN.js.map +7 -0
- package/dist/chunks/{chunk-ROTCDDOV.js → chunk-3XT5WHSG.js} +59 -119
- package/dist/chunks/chunk-3XT5WHSG.js.map +7 -0
- package/dist/chunks/{chunk-FIDUHKMM.js → chunk-4BYS4ZLY.js} +16 -16
- package/dist/chunks/chunk-4BYS4ZLY.js.map +7 -0
- package/dist/chunks/{chunk-K7J2ABAZ.js → chunk-4KX6BIPL.js} +91 -31
- package/dist/chunks/chunk-4KX6BIPL.js.map +7 -0
- package/dist/chunks/{chunk-UOM37PE4.js → chunk-4PBW54I2.js} +162 -92
- package/dist/chunks/chunk-4PBW54I2.js.map +7 -0
- package/dist/chunks/{chunk-ZEXCKK4K.js → chunk-4WKD3YM3.js} +3 -3
- package/dist/chunks/{chunk-PK4NIJEV.js → chunk-4XMXFHAR.js} +62 -3
- package/dist/chunks/chunk-4XMXFHAR.js.map +7 -0
- package/dist/chunks/{chunk-4EW7GVUR.js → chunk-56NMRVTV.js} +589 -377
- package/dist/chunks/chunk-56NMRVTV.js.map +7 -0
- package/dist/chunks/{chunk-GIK2WNAK.js → chunk-5BOTHX47.js} +109 -20
- package/dist/chunks/chunk-5BOTHX47.js.map +7 -0
- package/dist/chunks/chunk-5QJFDKPN.js +179 -0
- package/dist/chunks/chunk-5QJFDKPN.js.map +7 -0
- package/dist/chunks/{chunk-P7CBPPHY.js → chunk-6GWDGTHC.js} +5 -5
- package/dist/chunks/{chunk-P7CBPPHY.js.map → chunk-6GWDGTHC.js.map} +1 -1
- package/dist/chunks/chunk-6HO2IUQ5.js +104 -0
- package/dist/chunks/chunk-6HO2IUQ5.js.map +7 -0
- package/dist/chunks/chunk-6OGYPHNQ.js +62 -0
- package/dist/chunks/chunk-6OGYPHNQ.js.map +7 -0
- package/dist/chunks/{chunk-GO32KSEZ.js → chunk-7CIES6X2.js} +84 -9
- package/dist/chunks/chunk-7CIES6X2.js.map +7 -0
- package/dist/chunks/{chunk-G4TLWHRS.js → chunk-7N7IC3Z2.js} +4 -3
- package/dist/chunks/{chunk-G4TLWHRS.js.map → chunk-7N7IC3Z2.js.map} +2 -2
- package/dist/chunks/{chunk-5XBYFSI5.js → chunk-7YNE4NB2.js} +2 -2
- package/dist/chunks/{chunk-NTC2MCB6.js → chunk-B5L3X3ID.js} +1 -1
- package/dist/chunks/{chunk-NTC2MCB6.js.map → chunk-B5L3X3ID.js.map} +1 -1
- package/dist/chunks/chunk-BIBRWZWQ.js +325 -0
- package/dist/chunks/chunk-BIBRWZWQ.js.map +7 -0
- package/dist/chunks/{chunk-K6QXUGS5.js → chunk-BMAEZNZ5.js} +2 -1
- package/dist/chunks/{chunk-FSB2VIRZ.js → chunk-CBIV747V.js} +14 -3
- package/dist/chunks/chunk-CBIV747V.js.map +7 -0
- package/dist/chunks/{chunk-CCHZXF6K.js → chunk-CXYJJ3HZ.js} +3 -3
- package/dist/chunks/{chunk-R2XQ6AHT.js → chunk-DGERP4VL.js} +22 -10
- package/dist/chunks/chunk-DGERP4VL.js.map +7 -0
- package/dist/chunks/chunk-F2LGSRIN.js +38 -0
- package/dist/chunks/chunk-F2LGSRIN.js.map +7 -0
- package/dist/chunks/chunk-F6A6MQ6G.js +609 -0
- package/dist/chunks/chunk-F6A6MQ6G.js.map +7 -0
- package/dist/chunks/{chunk-IR3PIHJM.js → chunk-FK73YJKV.js} +67 -2
- package/dist/chunks/chunk-FK73YJKV.js.map +7 -0
- package/dist/chunks/{chunk-VYQV5JRT.js → chunk-GJVKEHDL.js} +2 -2
- package/dist/chunks/chunk-GJVKEHDL.js.map +7 -0
- package/dist/chunks/{chunk-TIIIHPHF.js → chunk-GS67KDMV.js} +2 -2
- package/dist/chunks/{chunk-D5NYNIST.js → chunk-H57KPL3V.js} +5 -5
- package/dist/chunks/{chunk-KVYNGDGC.js → chunk-HFDJWLMS.js} +6 -6
- package/dist/chunks/{chunk-KVYNGDGC.js.map → chunk-HFDJWLMS.js.map} +1 -1
- package/dist/chunks/{chunk-INRXG4J5.js → chunk-HGD75NZY.js} +2 -2
- package/dist/chunks/{chunk-CRRUW26I.js → chunk-HRDMBGMY.js} +12 -12
- package/dist/chunks/{chunk-CRRUW26I.js.map → chunk-HRDMBGMY.js.map} +2 -2
- package/dist/chunks/{chunk-MLLYR3Y6.js → chunk-HSEZPCL5.js} +19 -78
- package/dist/chunks/chunk-HSEZPCL5.js.map +7 -0
- package/dist/chunks/{chunk-LNASO4VT.js → chunk-IOGDTIGN.js} +44 -19
- package/dist/chunks/chunk-IOGDTIGN.js.map +7 -0
- package/dist/chunks/chunk-JMUUNW2H.js +65 -0
- package/dist/chunks/chunk-JMUUNW2H.js.map +7 -0
- package/dist/chunks/{chunk-UXIBKMUM.js → chunk-KIFOEBYJ.js} +4 -4
- package/dist/chunks/{chunk-SPCJXN4K.js → chunk-LKYLD5SN.js} +298 -65
- package/dist/chunks/chunk-LKYLD5SN.js.map +7 -0
- package/dist/chunks/{chunk-FUY6XVRX.js → chunk-MPMEK3IQ.js} +2 -2
- package/dist/chunks/{chunk-HP5P7NBO.js → chunk-MSDL7U6Q.js} +4 -4
- package/dist/chunks/chunk-N7ZAK2PB.js +132 -0
- package/dist/chunks/chunk-N7ZAK2PB.js.map +7 -0
- package/dist/chunks/{chunk-VSDUSNIA.js → chunk-NBIYYMKS.js} +8 -2
- package/dist/chunks/chunk-NBIYYMKS.js.map +7 -0
- package/dist/chunks/chunk-NENQZCGW.js +45 -0
- package/dist/chunks/chunk-NENQZCGW.js.map +7 -0
- package/dist/chunks/chunk-NJHJKINP.js +47 -0
- package/dist/chunks/chunk-NJHJKINP.js.map +7 -0
- package/dist/chunks/{chunk-U366I5K2.js → chunk-NQ7IWEIF.js} +18 -6
- package/dist/chunks/chunk-NQ7IWEIF.js.map +7 -0
- package/dist/chunks/{chunk-ZQMBS5SH.js → chunk-OJ4HAALD.js} +15 -12
- package/dist/chunks/chunk-OJ4HAALD.js.map +7 -0
- package/dist/chunks/chunk-OZCJU3PZ.js +33 -0
- package/dist/chunks/chunk-OZCJU3PZ.js.map +7 -0
- package/dist/chunks/chunk-P3DCXKL3.js +40 -0
- package/dist/chunks/chunk-P3DCXKL3.js.map +7 -0
- package/dist/chunks/chunk-P7YSPKTM.js +294 -0
- package/dist/chunks/chunk-P7YSPKTM.js.map +7 -0
- package/dist/chunks/chunk-PQVUMJ5J.js +223 -0
- package/dist/chunks/chunk-PQVUMJ5J.js.map +7 -0
- package/dist/chunks/chunk-PUBHBEYO.js +84 -0
- package/dist/chunks/chunk-PUBHBEYO.js.map +7 -0
- package/dist/chunks/{chunk-P4KH4S4S.js → chunk-QGTD3LAZ.js} +5 -20
- package/dist/chunks/chunk-QGTD3LAZ.js.map +7 -0
- package/dist/chunks/{chunk-TIJ3YQXX.js → chunk-QOEOKW2X.js} +2 -2
- package/dist/chunks/{chunk-TIJ3YQXX.js.map → chunk-QOEOKW2X.js.map} +1 -1
- package/dist/chunks/{chunk-QT4W5YVB.js → chunk-RAA3FAYZ.js} +2 -2
- package/dist/chunks/{chunk-WJJXODAB.js → chunk-RLKRZXSX.js} +8 -1
- package/dist/chunks/{chunk-WJJXODAB.js.map → chunk-RLKRZXSX.js.map} +2 -2
- package/dist/chunks/chunk-RWKQ5SRW.js +129 -0
- package/dist/chunks/chunk-RWKQ5SRW.js.map +7 -0
- package/dist/chunks/chunk-SW25R47N.js +71 -0
- package/dist/chunks/chunk-SW25R47N.js.map +7 -0
- package/dist/chunks/{chunk-EFETPXU2.js → chunk-TJZYM2SP.js} +118 -237
- package/dist/chunks/chunk-TJZYM2SP.js.map +7 -0
- package/dist/chunks/{chunk-53N2I4QA.js → chunk-TXCNZCZP.js} +2 -2
- package/dist/chunks/chunk-UD7LFV43.js +28 -0
- package/dist/chunks/chunk-UD7LFV43.js.map +7 -0
- package/dist/chunks/{chunk-ASSLHWZS.js → chunk-UFMYN5TA.js} +2 -2
- package/dist/chunks/{chunk-7QKKLBHJ.js → chunk-UPMWLOKL.js} +10 -1
- package/dist/chunks/{chunk-7QKKLBHJ.js.map → chunk-UPMWLOKL.js.map} +2 -2
- package/dist/chunks/chunk-V4OW2ULC.js +422 -0
- package/dist/chunks/chunk-V4OW2ULC.js.map +7 -0
- package/dist/chunks/{chunk-FE6NOAO7.js → chunk-VNWQIGQL.js} +1820 -649
- package/dist/chunks/chunk-VNWQIGQL.js.map +7 -0
- package/dist/chunks/{chunk-PYFJW3HC.js → chunk-W5FEHVZA.js} +2 -16
- package/dist/chunks/{chunk-PYFJW3HC.js.map → chunk-W5FEHVZA.js.map} +3 -3
- package/dist/chunks/{chunk-XCEEQ5AB.js → chunk-WGMCNCP6.js} +1567 -1564
- package/dist/chunks/chunk-WGMCNCP6.js.map +7 -0
- package/dist/chunks/chunk-WKFRGICG.js +101 -0
- package/dist/chunks/chunk-WKFRGICG.js.map +7 -0
- package/dist/chunks/{chunk-3UGN25XS.js → chunk-WWTGWGH7.js} +80 -1662
- package/dist/chunks/chunk-WWTGWGH7.js.map +7 -0
- package/dist/chunks/{chunk-5UBRGTVN.js → chunk-X7QETPBC.js} +31 -15
- package/dist/chunks/chunk-X7QETPBC.js.map +7 -0
- package/dist/chunks/{chunk-LEU5CDSL.js → chunk-XFOSUGLU.js} +5 -5
- package/dist/chunks/{chunk-MZUC6LLH.js → chunk-XMYG2TKR.js} +4 -4
- package/dist/chunks/{chunk-MZUC6LLH.js.map → chunk-XMYG2TKR.js.map} +1 -1
- package/dist/chunks/chunk-YC65P7ZO.js +57 -0
- package/dist/chunks/chunk-YC65P7ZO.js.map +7 -0
- package/dist/chunks/{chunk-EKODKR6Y.js → chunk-YHFWMAQ5.js} +1 -24
- package/dist/chunks/chunk-YHFWMAQ5.js.map +7 -0
- package/dist/chunks/{chunk-C7Z6F3SO.js → chunk-ZFWICFNJ.js} +27 -20
- package/dist/chunks/{chunk-C7Z6F3SO.js.map → chunk-ZFWICFNJ.js.map} +2 -2
- package/dist/cli/decisions.d.ts.map +1 -1
- package/dist/cli/decisions.js +15 -3
- package/dist/cli/decisions.js.map +2 -2
- package/dist/cli/mesh.js +4 -3
- package/dist/cli/mesh.js.map +1 -1
- package/dist/commands/fabric-handler.d.ts +7 -0
- package/dist/commands/fabric-handler.d.ts.map +1 -0
- package/dist/commands/fabric-handler.js +916 -0
- package/dist/commands/fabric-handler.js.map +7 -0
- package/dist/commands/fabric.d.ts +11 -1
- package/dist/commands/fabric.d.ts.map +1 -1
- package/dist/compaction/claim-events.d.ts +61 -0
- package/dist/compaction/claim-events.d.ts.map +1 -0
- package/dist/compaction/claim-events.js +210 -0
- package/dist/compaction/claim-events.js.map +7 -0
- package/dist/compaction/claim.d.ts +51 -0
- package/dist/compaction/claim.d.ts.map +1 -0
- package/dist/compaction/hook.d.ts +28 -2
- package/dist/compaction/hook.d.ts.map +1 -1
- package/dist/compaction/hook.js +12 -7
- package/dist/compaction/owner.js +9 -8
- package/dist/compaction/trace-events.d.ts +1 -1
- package/dist/compaction/trace-events.d.ts.map +1 -1
- package/dist/components/configuration.js +6 -6
- package/dist/components/effect-scope.d.ts.map +1 -1
- package/dist/config.d.ts +39 -2
- package/dist/config.d.ts.map +1 -1
- package/dist/core/action-arguments.d.ts.map +1 -1
- package/dist/core/action-policy-hooks.d.ts +69 -0
- package/dist/core/action-policy-hooks.d.ts.map +1 -0
- package/dist/core/action-registry.d.ts +31 -10
- package/dist/core/action-registry.d.ts.map +1 -1
- package/dist/core/action-registry.js +12 -9
- package/dist/core/approval-controller.d.ts +23 -3
- package/dist/core/approval-controller.d.ts.map +1 -1
- package/dist/core/atomic-write.d.ts +164 -0
- package/dist/core/atomic-write.d.ts.map +1 -1
- package/dist/core/child-tool-allowlist.d.ts +17 -1
- package/dist/core/child-tool-allowlist.d.ts.map +1 -1
- package/dist/core/compact-controller.d.ts +34 -0
- package/dist/core/compact-controller.d.ts.map +1 -1
- package/dist/core/core-override-guidance.d.ts +3 -1
- package/dist/core/core-override-guidance.d.ts.map +1 -1
- package/dist/core/file-lock.d.ts.map +1 -1
- package/dist/core/foreground-tools.d.ts +4 -1
- package/dist/core/foreground-tools.d.ts.map +1 -1
- package/dist/core/host-policy.d.ts +43 -0
- package/dist/core/host-policy.d.ts.map +1 -0
- package/dist/core/host-sdk-runtime.d.ts.map +1 -1
- package/dist/core/host-sdk.d.ts.map +1 -1
- package/dist/core/host-sdk.js +1 -1
- package/dist/core/managed-host-guidance.d.ts +5 -0
- package/dist/core/managed-host-guidance.d.ts.map +1 -0
- package/dist/core/model-aliases.d.ts +22 -0
- package/dist/core/model-aliases.d.ts.map +1 -0
- package/dist/core/model-resolution.d.ts +41 -20
- package/dist/core/model-resolution.d.ts.map +1 -1
- package/dist/core/native-tool-result.d.ts +1 -0
- package/dist/core/native-tool-result.d.ts.map +1 -1
- package/dist/core/program-tasks.d.ts +52 -0
- package/dist/core/program-tasks.d.ts.map +1 -0
- package/dist/core/prompt-guidance.d.ts +5 -0
- package/dist/core/prompt-guidance.d.ts.map +1 -0
- package/dist/core/prompt-guidance.js +159 -0
- package/dist/core/prompt-guidance.js.map +7 -0
- package/dist/core/provider-operations.d.ts.map +1 -1
- package/dist/core/provider-operations.js +60 -108
- package/dist/core/provider-operations.js.map +3 -3
- package/dist/core/shell-inbox.d.ts.map +1 -1
- package/dist/core/shell-jobs.d.ts +7 -5
- package/dist/core/shell-jobs.d.ts.map +1 -1
- package/dist/core/shell-timing.d.ts.map +1 -1
- package/dist/core/skill-prompt.d.ts +1 -1
- package/dist/core/skill-prompt.d.ts.map +1 -1
- package/dist/core/skill-references.d.ts +1 -1
- package/dist/core/skill-references.d.ts.map +1 -1
- package/dist/core/system-guidance.d.ts.map +1 -1
- package/dist/core/tool-result-proxy.d.ts.map +1 -1
- package/dist/decisions/command.d.ts +2 -1
- package/dist/decisions/command.d.ts.map +1 -1
- package/dist/decisions/command.js +40 -12
- package/dist/decisions/command.js.map +2 -2
- package/dist/decisions/events.d.ts +12 -0
- package/dist/decisions/events.d.ts.map +1 -0
- package/dist/decisions/events.js +130 -0
- package/dist/decisions/events.js.map +7 -0
- package/dist/decisions/host.d.ts +31 -3
- package/dist/decisions/host.d.ts.map +1 -1
- package/dist/decisions/render.d.ts +44 -0
- package/dist/decisions/render.d.ts.map +1 -0
- package/dist/decisions/store.d.ts +8 -0
- package/dist/decisions/store.d.ts.map +1 -1
- package/dist/durable/agent.d.ts +8 -0
- package/dist/durable/agent.d.ts.map +1 -1
- package/dist/durable/extension-load-error.d.ts +8 -0
- package/dist/durable/extension-load-error.d.ts.map +1 -0
- package/dist/durable/session.d.ts +1 -0
- package/dist/durable/session.d.ts.map +1 -1
- package/dist/durable/worker-host.d.ts +10 -1
- package/dist/durable/worker-host.d.ts.map +1 -1
- package/dist/durable/worker-host.js +10 -1181
- package/dist/durable/worker-host.js.map +4 -4
- package/dist/durable/worker-options.d.ts +3 -0
- package/dist/durable/worker-options.d.ts.map +1 -1
- package/dist/durable/worker-role-seed.d.ts +82 -0
- package/dist/durable/worker-role-seed.d.ts.map +1 -0
- package/dist/durable/worker.js +43 -4
- package/dist/durable/worker.js.map +2 -2
- package/dist/durable-controls.d.ts.map +1 -1
- package/dist/durable-extension-wasm.d.ts +8 -0
- package/dist/durable-extension-wasm.d.ts.map +1 -0
- package/dist/durable-extension-wasm.js +32 -0
- package/dist/durable-extension-wasm.js.map +7 -0
- package/dist/durable-extension.d.ts +94 -0
- package/dist/durable-extension.d.ts.map +1 -0
- package/dist/durable-extension.js +649 -0
- package/dist/durable-extension.js.map +7 -0
- package/dist/durable-host.d.ts +8 -0
- package/dist/durable-host.d.ts.map +1 -0
- package/dist/durable-host.js +20 -0
- package/dist/durable-host.js.map +7 -0
- package/dist/durable-journal.d.ts +94 -0
- package/dist/durable-journal.d.ts.map +1 -0
- package/dist/durable.d.ts.map +1 -1
- package/dist/durable.js +10 -8
- package/dist/durable.js.map +2 -2
- package/dist/entropy/index.js +12 -10
- package/dist/entropy/pool-store.d.ts.map +1 -1
- package/dist/execution-service.d.ts +14 -0
- package/dist/execution-service.d.ts.map +1 -1
- package/dist/extension-bootstrap.d.ts.map +1 -1
- package/dist/extension-bootstrap.js +28 -27
- package/dist/extension-bootstrap.js.map +2 -2
- package/dist/extension-copy.d.ts +21 -0
- package/dist/extension-copy.d.ts.map +1 -0
- package/dist/extension-copy.js +90 -0
- package/dist/extension-copy.js.map +7 -0
- package/dist/extension.d.ts +1 -1
- package/dist/extension.d.ts.map +1 -1
- package/dist/fabric-exec-arguments.d.ts.map +1 -1
- package/dist/fabric-exec-tool.d.ts +2 -1
- package/dist/fabric-exec-tool.d.ts.map +1 -1
- package/dist/fabric-runtime-state.d.ts +19 -0
- package/dist/fabric-runtime-state.d.ts.map +1 -1
- package/dist/fabric-runtime-state.js +2125 -786
- package/dist/fabric-runtime-state.js.map +4 -4
- package/dist/fabric-state.d.ts +44 -1
- package/dist/fabric-state.d.ts.map +1 -1
- package/dist/index.d.ts +5 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +88 -53
- package/dist/index.js.map +2 -2
- package/dist/jev/client.js +2 -2
- package/dist/jev/manager.d.ts +3 -0
- package/dist/jev/manager.d.ts.map +1 -1
- package/dist/jev/observation.d.ts +1 -1
- package/dist/jev/observation.js +6 -6
- package/dist/jev-fabric/bridge.d.ts.map +1 -1
- package/dist/jev.js +11 -12
- package/dist/managed-host.d.ts +13 -0
- package/dist/managed-host.d.ts.map +1 -1
- package/dist/memory/digest.js +2 -2
- package/dist/memory/discovery.js +6 -7
- package/dist/memory/file-worker.js +10 -11
- package/dist/memory/file-worker.js.map +1 -1
- package/dist/memory/normalize.js +5 -6
- package/dist/memory/search.js +7 -8
- package/dist/memory/worker-provider.js +11 -12
- package/dist/memory.js +11 -12
- package/dist/memory.js.map +1 -1
- package/dist/mesh/grants.d.ts +3 -3
- package/dist/mesh/grants.d.ts.map +1 -1
- package/dist/mesh/store.d.ts +8 -0
- package/dist/mesh/store.d.ts.map +1 -1
- package/dist/native-codemode.d.ts.map +1 -1
- package/dist/native-tool-catalog.d.ts.map +1 -1
- package/dist/native-tool-catalog.js +12 -3
- package/dist/native-tool-catalog.js.map +2 -2
- package/dist/programs/host.d.ts +18 -6
- package/dist/programs/host.d.ts.map +1 -1
- package/dist/programs/host.js +71 -47
- package/dist/programs/host.js.map +2 -2
- package/dist/programs/source.d.ts +11 -0
- package/dist/programs/source.d.ts.map +1 -1
- package/dist/programs/store.d.ts.map +1 -1
- package/dist/protocol.d.ts +504 -8
- package/dist/protocol.d.ts.map +1 -1
- package/dist/protocol.js +41 -11
- package/dist/provider-globals.d.ts +13 -0
- package/dist/provider-globals.d.ts.map +1 -0
- package/dist/providers/agents-actions.d.ts.map +1 -1
- package/dist/providers/agents-provider.d.ts +3 -0
- package/dist/providers/agents-provider.d.ts.map +1 -1
- package/dist/providers/captured-tools-provider.d.ts +5 -0
- package/dist/providers/captured-tools-provider.d.ts.map +1 -1
- package/dist/providers/compact-provider.d.ts +4 -1
- package/dist/providers/compact-provider.d.ts.map +1 -1
- package/dist/providers/components-provider.d.ts.map +1 -1
- package/dist/providers/decisions-provider.d.ts +9 -1
- package/dist/providers/decisions-provider.d.ts.map +1 -1
- package/dist/providers/jev-provider.d.ts +1 -1
- package/dist/providers/jev-provider.js +11 -12
- package/dist/providers/memory-provider.js +10 -11
- package/dist/providers/pi-tools-provider.d.ts +14 -0
- package/dist/providers/pi-tools-provider.d.ts.map +1 -1
- package/dist/providers/programs-provider.d.ts.map +1 -1
- package/dist/providers/sessions-provider.d.ts +7 -0
- package/dist/providers/sessions-provider.d.ts.map +1 -1
- package/dist/repeat-guard.d.ts +7 -6
- package/dist/repeat-guard.d.ts.map +1 -1
- package/dist/residency/actor-client.js +3 -3
- package/dist/residency/client.d.ts +15 -0
- package/dist/residency/client.d.ts.map +1 -1
- package/dist/residency/host.d.ts.map +1 -1
- package/dist/residency/host.js +34 -23
- package/dist/residency/launcher.js +1 -1
- package/dist/residency/pi-entry.js +34 -23
- 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/runners.js +11 -1
- package/dist/runners.js.map +2 -2
- package/dist/runtime/core-override-guest-types.js +2 -2
- package/dist/runtime/cpython-child-source.d.ts.map +1 -1
- package/dist/runtime/cpython-runtime.d.ts.map +1 -1
- package/dist/runtime/cpython-runtime.js +51 -21
- package/dist/runtime/cpython-runtime.js.map +2 -2
- package/dist/runtime/deadline-pause.d.ts +2 -0
- package/dist/runtime/deadline-pause.d.ts.map +1 -1
- package/dist/runtime/dynamic-guest-types.d.ts.map +1 -1
- package/dist/runtime/dynamic-guest-types.js +2 -1
- package/dist/runtime/exec-journal.d.ts +73 -0
- package/dist/runtime/exec-journal.d.ts.map +1 -0
- package/dist/runtime/exec-journal.js +335 -0
- package/dist/runtime/exec-journal.js.map +7 -0
- package/dist/runtime/guest-types.d.ts +3 -2
- package/dist/runtime/guest-types.d.ts.map +1 -1
- package/dist/runtime/guest-types.js +1 -1
- package/dist/runtime/journal-shim.d.ts +3 -0
- package/dist/runtime/journal-shim.d.ts.map +1 -0
- package/dist/runtime/kernel.d.ts +95 -1
- package/dist/runtime/kernel.d.ts.map +1 -1
- package/dist/runtime/monty-bridge.d.ts +6 -2
- package/dist/runtime/monty-bridge.d.ts.map +1 -1
- package/dist/runtime/monty-runtime.d.ts.map +1 -1
- package/dist/runtime/monty-runtime.js +27 -15
- package/dist/runtime/monty-runtime.js.map +2 -2
- package/dist/runtime/native-codemode-guest.d.ts.map +1 -1
- package/dist/runtime/node-process-runtime.d.ts.map +1 -1
- package/dist/runtime/node-process-runtime.js +7 -5
- package/dist/runtime/quickjs-runtime.d.ts +7 -1
- package/dist/runtime/quickjs-runtime.d.ts.map +1 -1
- package/dist/runtime/quickjs-runtime.js +5 -4
- package/dist/runtime/sha256.d.ts +4 -0
- package/dist/runtime/sha256.d.ts.map +1 -0
- package/dist/runtime/transpile.d.ts +8 -0
- package/dist/runtime/transpile.d.ts.map +1 -0
- package/dist/runtime/type-checker.d.ts +1 -7
- package/dist/runtime/type-checker.d.ts.map +1 -1
- package/dist/runtime/type-checker.js +4 -2
- package/dist/runtime/typescript-kernel.js +13 -10
- package/dist/runtime/typescript-kernel.js.map +1 -1
- package/dist/runtime-state-builtins.d.ts.map +1 -1
- package/dist/speculation/scanner.js +1 -1
- package/dist/speculation/store.d.ts +7 -16
- package/dist/speculation/store.d.ts.map +1 -1
- package/dist/speculation/types.d.ts +1 -0
- package/dist/speculation/types.d.ts.map +1 -1
- package/dist/storage/retention.d.ts.map +1 -1
- package/dist/topology/participant-directory.d.ts +26 -1
- package/dist/topology/participant-directory.d.ts.map +1 -1
- package/dist/topology/peer-presence.d.ts.map +1 -1
- package/dist/topology/peer-settle.js +11 -0
- package/dist/topology/peer-settle.js.map +7 -0
- package/dist/topology/session-label-settings.d.ts +13 -0
- package/dist/topology/session-label-settings.d.ts.map +1 -0
- package/dist/topology/session-label.d.ts +60 -0
- package/dist/topology/session-label.d.ts.map +1 -0
- package/dist/topology/types.d.ts +27 -0
- package/dist/topology/types.d.ts.map +1 -1
- package/dist/type-error-guidance.js +1 -1
- package/dist/ui/controller.d.ts +1 -0
- 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 +3 -2
- package/dist/ui/conversation-commands.d.ts +1 -1
- package/dist/ui/conversation-commands.d.ts.map +1 -1
- package/dist/ui/conversation-native-reader.js +2 -2
- package/dist/ui/conversation-selection.d.ts +4 -1
- package/dist/ui/conversation-selection.d.ts.map +1 -1
- package/dist/ui/conversation-targets.d.ts.map +1 -1
- package/dist/ui/conversation-targets.js +2 -2
- package/dist/ui/conversation.d.ts +25 -24
- package/dist/ui/conversation.d.ts.map +1 -1
- package/dist/ui/conversation.js +170 -339
- package/dist/ui/conversation.js.map +2 -2
- package/dist/ui/core-tool-render.d.ts +1 -0
- package/dist/ui/core-tool-render.d.ts.map +1 -1
- package/dist/ui/dashboard.d.ts.map +1 -1
- package/dist/ui/dashboard.js +17 -13
- package/dist/ui/dashboard.js.map +2 -2
- package/dist/ui/fabric-render.d.ts +6 -0
- package/dist/ui/fabric-render.d.ts.map +1 -1
- package/dist/ui/footer-dock.d.ts +48 -0
- package/dist/ui/footer-dock.d.ts.map +1 -0
- package/dist/ui/format.d.ts +7 -0
- package/dist/ui/format.d.ts.map +1 -1
- package/dist/ui/settings-sections-lifecycle.d.ts.map +1 -1
- package/dist/ui/settings-sections-presentation.d.ts.map +1 -1
- package/dist/ui/settings-values.d.ts +1 -0
- package/dist/ui/settings-values.d.ts.map +1 -1
- package/dist/ui/settings.js +59 -18
- package/dist/ui/settings.js.map +2 -2
- package/dist/ui/shell-hang-keys.d.ts +8 -1
- package/dist/ui/shell-hang-keys.d.ts.map +1 -1
- package/dist/ui/shell-tasks.d.ts +2 -2
- package/dist/ui/shell-tasks.d.ts.map +1 -1
- package/dist/ui/shell-tasks.js +27 -94
- package/dist/ui/shell-tasks.js.map +2 -2
- package/dist/ui/snapshot.d.ts.map +1 -1
- package/dist/ui/terminal-title.d.ts +41 -0
- package/dist/ui/terminal-title.d.ts.map +1 -0
- package/dist/ui/types.d.ts +4 -0
- package/dist/ui/types.d.ts.map +1 -1
- package/dist/ui/widget-keys.d.ts +5 -0
- package/dist/ui/widget-keys.d.ts.map +1 -0
- package/dist/ui/widget.d.ts +34 -16
- package/dist/ui/widget.d.ts.map +1 -1
- package/dist/ui/word-diff/line-emphasis.js +1603 -0
- package/dist/ui/word-diff/line-emphasis.js.map +7 -0
- package/dist/util.d.ts +2 -0
- package/dist/util.d.ts.map +1 -1
- package/dist/verified/authority.d.ts +2 -2
- package/dist/verified/authority.d.ts.map +1 -1
- package/dist/verified/budget.d.ts +4 -0
- package/dist/verified/budget.d.ts.map +1 -0
- package/dist/verified/generated/actor-name.d.ts +4 -0
- package/dist/verified/generated/actor-name.js +17 -0
- package/dist/verified/generated/authority.d.ts +4 -0
- package/dist/verified/generated/authority.js +28 -0
- package/dist/verified/generated/budget.d.ts +4 -0
- package/dist/verified/generated/budget.js +17 -0
- package/dist/verified/generated/compaction.d.ts +4 -0
- package/dist/verified/generated/compaction.js +19 -0
- package/dist/verified/generated/grants.d.ts +4 -0
- package/dist/verified/generated/grants.js +17 -0
- package/dist/verified/generated/lifecycle.d.ts +4 -0
- package/dist/verified/generated/lifecycle.js +50 -0
- package/dist/verified/generated/manifest.json +137 -48
- package/dist/verified/generated/policy.d.ts +17 -0
- package/dist/verified/generated/policy.js +211 -0
- package/dist/verified/generated/provider.d.ts +4 -0
- package/dist/verified/generated/provider.js +18 -0
- package/dist/verified/generated/resources.d.ts +6 -0
- package/dist/verified/generated/resources.js +73 -0
- package/dist/verified/generated/speculation.d.ts +6 -0
- package/dist/verified/generated/speculation.js +48 -0
- package/dist/verified/generated/storage.d.ts +4 -0
- package/dist/verified/generated/storage.js +18 -0
- package/dist/verified/grants.d.ts +22 -0
- package/dist/verified/grants.d.ts.map +1 -0
- package/dist/verified/lifecycle.d.ts +31 -0
- package/dist/verified/lifecycle.d.ts.map +1 -0
- package/dist/verified/machine.d.ts +18 -0
- package/dist/verified/machine.d.ts.map +1 -0
- package/dist/verified/memory.d.ts +1 -1
- package/dist/verified/memory.d.ts.map +1 -1
- package/dist/verified/nat.d.ts +1 -1
- package/dist/verified/nat.d.ts.map +1 -1
- package/dist/verified/policy.d.ts +17 -5
- package/dist/verified/policy.d.ts.map +1 -1
- package/dist/verified/provider.d.ts +22 -0
- package/dist/verified/provider.d.ts.map +1 -0
- package/dist/verified/resources.d.ts +21 -7
- package/dist/verified/resources.d.ts.map +1 -1
- package/dist/verified/speculation.d.ts +36 -0
- package/dist/verified/speculation.d.ts.map +1 -0
- package/dist/verified/storage.d.ts.map +1 -1
- package/dist/worker/missing-install.d.ts +8 -0
- package/dist/worker/missing-install.d.ts.map +1 -0
- package/dist/worker/options.d.ts.map +1 -1
- package/dist/worker/options.js +25 -0
- package/dist/worker/options.js.map +2 -2
- package/dist/worker/prompt-lifecycle.d.ts +16 -0
- package/dist/worker/prompt-lifecycle.d.ts.map +1 -0
- package/dist/worker/prompt-lifecycle.js +90 -0
- package/dist/worker/prompt-lifecycle.js.map +7 -0
- package/dist/worker/questions.d.ts +15 -3
- package/dist/worker/questions.d.ts.map +1 -1
- package/dist/worker/questions.js +53 -8
- package/dist/worker/questions.js.map +2 -2
- package/dist/worker/recovery-watchdog.d.ts +22 -0
- package/dist/worker/recovery-watchdog.d.ts.map +1 -1
- package/dist/worker/recovery-watchdog.js +116 -1
- package/dist/worker/recovery-watchdog.js.map +2 -2
- package/dist/worker/result.js +1 -1
- package/dist/worker/result.js.map +2 -2
- package/dist/worker.js +131 -21
- package/dist/worker.js.map +2 -2
- package/docs/actor-name-policy-handoff.md +5 -0
- package/docs/agents.md +164 -17
- package/docs/architecture.md +5 -1
- package/docs/audit-trace.md +2 -1
- package/docs/background-tasks.md +102 -16
- package/docs/codemode-parity.md +2 -2
- package/docs/compaction.md +21 -5
- package/docs/components.md +1 -1
- package/docs/configuration.md +111 -66
- package/docs/decisions.md +92 -10
- package/docs/durable-extension.md +121 -0
- package/docs/durable-pi.md +306 -6
- package/docs/extractive-history.md +3 -1
- package/docs/interface.md +20 -17
- package/docs/jev.md +1 -1
- package/docs/kernels.md +1 -1
- package/{node_modules/pi-coralbricks-provider/LICENSE → docs/licenses/gdp-wired-mit.txt} +1 -1
- package/docs/managed-host-migration.md +50 -0
- package/docs/programmatic-compaction.md +216 -6
- package/docs/programs.md +23 -1
- package/docs/prompt-cache.md +4 -2
- package/docs/provider-capabilities.md +15 -14
- package/docs/providers.md +99 -3
- package/docs/shell-composition.md +15 -0
- package/docs/short-lock-protocol.md +90 -0
- package/docs/skills.md +5 -1
- package/docs/speculation.md +6 -0
- package/docs/verified-kernels.md +309 -220
- package/package.json +45 -24
- package/proofs/actor-name.ts +27 -0
- package/proofs/authority.ts +62 -0
- package/proofs/budget.ts +24 -0
- package/proofs/compaction.ts +51 -0
- package/proofs/grants.ts +39 -0
- package/proofs/index.ts +40 -0
- package/proofs/kernel.ts +44 -0
- package/proofs/lifecycle.ts +128 -0
- package/proofs/policy.ts +195 -0
- package/proofs/provider.ts +52 -0
- package/proofs/resources.ts +160 -0
- package/proofs/speculation.ts +69 -0
- package/proofs/storage.ts +66 -0
- package/scripts/verified-kernels.ts +141 -0
- package/skillsets/python/fabric-council/SKILL.md +92 -20
- package/skillsets/python/fabric-exec/SKILL.md +2 -2
- package/skillsets/python/fabric-exec/references/agents.md +10 -4
- package/skillsets/python/fabric-fusion/SKILL.md +1 -1
- package/skillsets/python/fabric-guide/SKILL.md +1 -1
- package/skillsets/typescript/fabric-council/SKILL.md +109 -22
- package/skillsets/typescript/fabric-exec/SKILL.md +7 -7
- package/skillsets/typescript/fabric-exec/references/agents.md +12 -3
- package/skillsets/typescript/fabric-fusion/SKILL.md +1 -1
- package/skillsets/typescript/fabric-guide/SKILL.md +1 -1
- package/LAWS.bend +0 -502
- package/PROOF.bend +0 -452
- package/dist/chunks/chunk-3UGN25XS.js.map +0 -7
- package/dist/chunks/chunk-4EW7GVUR.js.map +0 -7
- package/dist/chunks/chunk-5UBRGTVN.js.map +0 -7
- package/dist/chunks/chunk-BN7F52EG.js +0 -525
- package/dist/chunks/chunk-BN7F52EG.js.map +0 -7
- package/dist/chunks/chunk-DK35W6U7.js +0 -259
- package/dist/chunks/chunk-DK35W6U7.js.map +0 -7
- package/dist/chunks/chunk-EFETPXU2.js.map +0 -7
- package/dist/chunks/chunk-EHQQ4KCX.js.map +0 -7
- package/dist/chunks/chunk-EKODKR6Y.js.map +0 -7
- package/dist/chunks/chunk-FE6NOAO7.js.map +0 -7
- package/dist/chunks/chunk-FIDUHKMM.js.map +0 -7
- package/dist/chunks/chunk-FSB2VIRZ.js.map +0 -7
- package/dist/chunks/chunk-GIK2WNAK.js.map +0 -7
- package/dist/chunks/chunk-GO32KSEZ.js.map +0 -7
- package/dist/chunks/chunk-IR3PIHJM.js.map +0 -7
- package/dist/chunks/chunk-ITVLKXCI.js +0 -266
- package/dist/chunks/chunk-ITVLKXCI.js.map +0 -7
- package/dist/chunks/chunk-K7J2ABAZ.js.map +0 -7
- package/dist/chunks/chunk-KJZAOENY.js +0 -212
- package/dist/chunks/chunk-KJZAOENY.js.map +0 -7
- package/dist/chunks/chunk-LNASO4VT.js.map +0 -7
- package/dist/chunks/chunk-MLLYR3Y6.js.map +0 -7
- package/dist/chunks/chunk-P4KH4S4S.js.map +0 -7
- package/dist/chunks/chunk-PK4NIJEV.js.map +0 -7
- package/dist/chunks/chunk-Q2JQ3RYZ.js +0 -99
- package/dist/chunks/chunk-Q2JQ3RYZ.js.map +0 -7
- package/dist/chunks/chunk-R2XQ6AHT.js.map +0 -7
- package/dist/chunks/chunk-ROTCDDOV.js.map +0 -7
- package/dist/chunks/chunk-SPCJXN4K.js.map +0 -7
- package/dist/chunks/chunk-U366I5K2.js.map +0 -7
- package/dist/chunks/chunk-UKMQK5VP.js +0 -231
- package/dist/chunks/chunk-UKMQK5VP.js.map +0 -7
- package/dist/chunks/chunk-UOM37PE4.js.map +0 -7
- package/dist/chunks/chunk-UTOBAZ5T.js.map +0 -7
- package/dist/chunks/chunk-VSDUSNIA.js.map +0 -7
- package/dist/chunks/chunk-VTK2FEH7.js +0 -229
- package/dist/chunks/chunk-VTK2FEH7.js.map +0 -7
- package/dist/chunks/chunk-VYQV5JRT.js.map +0 -7
- package/dist/chunks/chunk-XCEEQ5AB.js.map +0 -7
- package/dist/chunks/chunk-ZLNJDTCN.js +0 -226
- package/dist/chunks/chunk-ZLNJDTCN.js.map +0 -7
- package/dist/chunks/chunk-ZQMBS5SH.js.map +0 -7
- package/dist/ui/conversation-shortcut.d.ts +0 -3
- package/dist/ui/conversation-shortcut.d.ts.map +0 -1
- package/dist/ui/widget-activity.d.ts +0 -21
- package/dist/ui/widget-activity.d.ts.map +0 -1
- package/dist/verified/generated/authority-kernel.d.ts +0 -10
- package/dist/verified/generated/authority-kernel.js +0 -127
- package/dist/verified/generated/kernel.d.ts +0 -31
- package/dist/verified/generated/kernel.js +0 -389
- package/dist/verified/generated/lifecycle-kernel.d.ts +0 -7
- package/dist/verified/generated/lifecycle-kernel.js +0 -164
- package/dist/verified/generated/provider-kernel.d.ts +0 -9
- package/dist/verified/generated/provider-kernel.js +0 -87
- package/dist/verified/generated/storage-kernel.d.ts +0 -11
- package/dist/verified/generated/storage-kernel.js +0 -107
- package/docs/licenses/bend-apache-2.0.txt +0 -202
- package/node_modules/pi-coralbricks-provider/README.md +0 -306
- package/node_modules/pi-coralbricks-provider/auth.ts +0 -30
- package/node_modules/pi-coralbricks-provider/custom-models.json +0 -1
- package/node_modules/pi-coralbricks-provider/deprecated-models.json +0 -1
- package/node_modules/pi-coralbricks-provider/guard.ts +0 -155
- package/node_modules/pi-coralbricks-provider/index.ts +0 -662
- package/node_modules/pi-coralbricks-provider/models.json +0 -88
- package/node_modules/pi-coralbricks-provider/package.json +0 -74
- package/node_modules/pi-coralbricks-provider/park.ts +0 -122
- package/node_modules/pi-coralbricks-provider/patch.json +0 -34
- package/node_modules/pi-coralbricks-provider/scripts/update-models.js +0 -658
- package/node_modules/pi-coralbricks-provider/settings.ts +0 -143
- package/node_modules/pi-coralbricks-provider/sync-policy.ts +0 -309
- package/proofs/abi.json +0 -308
- package/proofs/authority-abi.json +0 -7
- package/proofs/authority-kernel.bend +0 -23
- package/proofs/authority-proof.bend +0 -74
- package/proofs/authority-spec.bend +0 -30
- package/proofs/authority-state.bend +0 -43
- package/proofs/authority-types.d.ts +0 -3
- package/proofs/kernel.bend +0 -139
- package/proofs/lifecycle-abi.json +0 -3
- package/proofs/lifecycle-kernel.bend +0 -11
- package/proofs/lifecycle-proof.bend +0 -249
- package/proofs/lifecycle-spec.bend +0 -261
- package/proofs/lifecycle-types.d.ts +0 -4
- package/proofs/lifecycle.bend +0 -119
- package/proofs/provider-abi.json +0 -4
- package/proofs/provider-kernel.bend +0 -14
- package/proofs/provider-plans.bend +0 -28
- package/proofs/provider-spec.bend +0 -14
- package/proofs/provider-types.d.ts +0 -5
- package/proofs/resource-proof.bend +0 -633
- package/proofs/resource-spec.bend +0 -133
- package/proofs/resources.bend +0 -160
- package/proofs/state-kernel.bend +0 -17
- package/proofs/state-plans.bend +0 -40
- package/proofs/state-proof.bend +0 -42
- package/proofs/state-spec.bend +0 -26
- package/proofs/storage-abi.json +0 -3
- package/proofs/storage-kernel.bend +0 -11
- package/proofs/storage-plans.bend +0 -100
- package/proofs/storage-proof.bend +0 -176
- package/proofs/storage-spec.bend +0 -70
- package/proofs/storage-types.d.ts +0 -8
- package/proofs/types.d.ts +0 -7
- package/scripts/test-verified-kernels.mjs +0 -107
- package/scripts/verified-kernels.mjs +0 -176
- /package/dist/chunks/{chunk-3FJUP3GV.js.map → chunk-36XQFTEN.js.map} +0 -0
- /package/dist/chunks/{chunk-ZEXCKK4K.js.map → chunk-4WKD3YM3.js.map} +0 -0
- /package/dist/chunks/{chunk-5XBYFSI5.js.map → chunk-7YNE4NB2.js.map} +0 -0
- /package/dist/chunks/{chunk-K6QXUGS5.js.map → chunk-BMAEZNZ5.js.map} +0 -0
- /package/dist/chunks/{chunk-CCHZXF6K.js.map → chunk-CXYJJ3HZ.js.map} +0 -0
- /package/dist/chunks/{chunk-TIIIHPHF.js.map → chunk-GS67KDMV.js.map} +0 -0
- /package/dist/chunks/{chunk-D5NYNIST.js.map → chunk-H57KPL3V.js.map} +0 -0
- /package/dist/chunks/{chunk-INRXG4J5.js.map → chunk-HGD75NZY.js.map} +0 -0
- /package/dist/chunks/{chunk-UXIBKMUM.js.map → chunk-KIFOEBYJ.js.map} +0 -0
- /package/dist/chunks/{chunk-FUY6XVRX.js.map → chunk-MPMEK3IQ.js.map} +0 -0
- /package/dist/chunks/{chunk-HP5P7NBO.js.map → chunk-MSDL7U6Q.js.map} +0 -0
- /package/dist/chunks/{chunk-QT4W5YVB.js.map → chunk-RAA3FAYZ.js.map} +0 -0
- /package/dist/chunks/{chunk-53N2I4QA.js.map → chunk-TXCNZCZP.js.map} +0 -0
- /package/dist/chunks/{chunk-ASSLHWZS.js.map → chunk-UFMYN5TA.js.map} +0 -0
- /package/dist/chunks/{chunk-LEU5CDSL.js.map → chunk-XFOSUGLU.js.map} +0 -0
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
// src/runtime/journal-shim.ts
|
|
2
|
+
var journalShimSource = (seed) => `
|
|
3
|
+
(() => {
|
|
4
|
+
const __now = globalThis.__fabricJournalNow;
|
|
5
|
+
delete globalThis.__fabricJournalNow;
|
|
6
|
+
let __s = ${seed >>> 0} >>> 0;
|
|
7
|
+
const random = () => {
|
|
8
|
+
__s = (__s + 0x6D2B79F5) >>> 0;
|
|
9
|
+
let t = __s;
|
|
10
|
+
t = Math.imul(t ^ (t >>> 15), t | 1);
|
|
11
|
+
t ^= t + Math.imul(t ^ (t >>> 7), t | 61);
|
|
12
|
+
return ((t ^ (t >>> 14)) >>> 0) / 4294967296;
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(Math, "random", { value: random, writable: true, configurable: true });
|
|
15
|
+
delete globalThis.WeakRef;
|
|
16
|
+
delete globalThis.FinalizationRegistry;
|
|
17
|
+
const D = globalThis.Date;
|
|
18
|
+
const P = D.prototype;
|
|
19
|
+
const getTime = P.getTime;
|
|
20
|
+
const tzo = P.getTimezoneOffset;
|
|
21
|
+
const W = ["Sun","Mon","Tue","Wed","Thu","Fri","Sat"];
|
|
22
|
+
const M = ["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];
|
|
23
|
+
const p2 = (n) => String(n).padStart(2, "0");
|
|
24
|
+
const yr = (y) => y < 0 ? "-" + String(-y).padStart(4, "0") : String(y).padStart(4, "0");
|
|
25
|
+
const ymd = (d) => W[d.getUTCDay()] + " " + M[d.getUTCMonth()] + " " + p2(d.getUTCDate()) + " " + yr(d.getUTCFullYear());
|
|
26
|
+
const hms = (d) => p2(d.getUTCHours()) + ":" + p2(d.getUTCMinutes()) + ":" + p2(d.getUTCSeconds());
|
|
27
|
+
const ldate = (d) => p2(d.getUTCMonth() + 1) + "/" + p2(d.getUTCDate()) + "/" + yr(d.getUTCFullYear());
|
|
28
|
+
const ltime = (d) => { const h = d.getUTCHours(); return p2(h % 12 === 0 ? 12 : h % 12) + ":" + p2(d.getUTCMinutes()) + ":" + p2(d.getUTCSeconds()) + (h < 12 ? " AM" : " PM"); };
|
|
29
|
+
const define = (target, name, value) => Object.defineProperty(target, name, { value, writable: true, configurable: true });
|
|
30
|
+
const text = (format) => function () { return Number.isNaN(getTime.call(this)) ? "Invalid Date" : format(this); };
|
|
31
|
+
for (const [local, utc] of [["getFullYear","getUTCFullYear"],["getMonth","getUTCMonth"],["getDate","getUTCDate"],["getDay","getUTCDay"],["getHours","getUTCHours"],["getMinutes","getUTCMinutes"],["getSeconds","getUTCSeconds"],["getMilliseconds","getUTCMilliseconds"],["setFullYear","setUTCFullYear"],["setMonth","setUTCMonth"],["setDate","setUTCDate"],["setHours","setUTCHours"],["setMinutes","setUTCMinutes"],["setSeconds","setUTCSeconds"],["setMilliseconds","setUTCMilliseconds"]]) define(P, local, P[utc]);
|
|
32
|
+
if (typeof P.getYear === "function") define(P, "getYear", function () { return P.getUTCFullYear.call(this) - 1900; });
|
|
33
|
+
define(P, "getTimezoneOffset", function () { return Number.isNaN(getTime.call(this)) ? NaN : 0; });
|
|
34
|
+
define(P, "toString", text((d) => ymd(d) + " " + hms(d) + " GMT+0000"));
|
|
35
|
+
define(P, "toDateString", text(ymd));
|
|
36
|
+
define(P, "toTimeString", text((d) => hms(d) + " GMT+0000"));
|
|
37
|
+
define(P, "toLocaleString", text((d) => ldate(d) + ", " + ltime(d)));
|
|
38
|
+
define(P, "toLocaleDateString", text(ldate));
|
|
39
|
+
define(P, "toLocaleTimeString", text(ltime));
|
|
40
|
+
const utcForm = (s) => /(?:Z|[+-]\\d\\d:?\\d\\d|GMT|UTC)(?:\\s*\\(.*\\))?$/i.test(s) || /^[+-]?\\d{4,6}(?:-\\d\\d(?:-\\d\\d)?)?$/.test(s);
|
|
41
|
+
const parse = (value) => {
|
|
42
|
+
const s = String(value).trim();
|
|
43
|
+
const t = D.parse(s);
|
|
44
|
+
if (Number.isNaN(t) || utcForm(s)) return t;
|
|
45
|
+
return t - tzo.call(new D(t)) * 60000;
|
|
46
|
+
};
|
|
47
|
+
function Date(...args) {
|
|
48
|
+
if (new.target === undefined) return P.toString.call(new D(__now()));
|
|
49
|
+
let d;
|
|
50
|
+
if (args.length === 0) d = new D(__now());
|
|
51
|
+
else if (args.length === 1) {
|
|
52
|
+
const v = args[0];
|
|
53
|
+
d = new D(typeof v === "string" ? parse(v) : v instanceof D ? getTime.call(v) : v);
|
|
54
|
+
} else d = new D(D.UTC(...args));
|
|
55
|
+
if (new.target !== Date) Object.setPrototypeOf(d, new.target.prototype);
|
|
56
|
+
return d;
|
|
57
|
+
}
|
|
58
|
+
Date.prototype = P;
|
|
59
|
+
define(P, "constructor", Date);
|
|
60
|
+
Object.defineProperty(Date, "length", { value: 7, configurable: true });
|
|
61
|
+
define(Date, "now", () => __now());
|
|
62
|
+
define(Date, "parse", parse);
|
|
63
|
+
define(Date, "UTC", D.UTC);
|
|
64
|
+
define(globalThis, "Date", Date);
|
|
65
|
+
})();
|
|
66
|
+
`;
|
|
67
|
+
|
|
68
|
+
export {
|
|
69
|
+
journalShimSource
|
|
70
|
+
};
|
|
71
|
+
//# sourceMappingURL=chunk-SW25R47N.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/runtime/journal-shim.ts"],
|
|
4
|
+
"sourcesContent": ["// The guest prelude a journaled QuickJS run evaluates first, kept free of Node\n// modules so the durable extension can use it in a Worker (see exec-journal.ts).\n\n/** Guest prelude that removes the nondeterminism replay cannot reproduce. */\nexport const journalShimSource = (seed: number): string => `\n(() => {\nconst __now = globalThis.__fabricJournalNow;\ndelete globalThis.__fabricJournalNow;\nlet __s = ${seed >>> 0} >>> 0;\nconst random = () => {\n __s = (__s + 0x6D2B79F5) >>> 0;\n let t = __s;\n t = Math.imul(t ^ (t >>> 15), t | 1);\n t ^= t + Math.imul(t ^ (t >>> 7), t | 61);\n return ((t ^ (t >>> 14)) >>> 0) / 4294967296;\n};\nObject.defineProperty(Math, \"random\", { value: random, writable: true, configurable: true });\ndelete globalThis.WeakRef;\ndelete globalThis.FinalizationRegistry;\nconst D = globalThis.Date;\nconst P = D.prototype;\nconst getTime = P.getTime;\nconst tzo = P.getTimezoneOffset;\nconst W = [\"Sun\",\"Mon\",\"Tue\",\"Wed\",\"Thu\",\"Fri\",\"Sat\"];\nconst M = [\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\"];\nconst p2 = (n) => String(n).padStart(2, \"0\");\nconst yr = (y) => y < 0 ? \"-\" + String(-y).padStart(4, \"0\") : String(y).padStart(4, \"0\");\nconst ymd = (d) => W[d.getUTCDay()] + \" \" + M[d.getUTCMonth()] + \" \" + p2(d.getUTCDate()) + \" \" + yr(d.getUTCFullYear());\nconst hms = (d) => p2(d.getUTCHours()) + \":\" + p2(d.getUTCMinutes()) + \":\" + p2(d.getUTCSeconds());\nconst ldate = (d) => p2(d.getUTCMonth() + 1) + \"/\" + p2(d.getUTCDate()) + \"/\" + yr(d.getUTCFullYear());\nconst ltime = (d) => { const h = d.getUTCHours(); return p2(h % 12 === 0 ? 12 : h % 12) + \":\" + p2(d.getUTCMinutes()) + \":\" + p2(d.getUTCSeconds()) + (h < 12 ? \" AM\" : \" PM\"); };\nconst define = (target, name, value) => Object.defineProperty(target, name, { value, writable: true, configurable: true });\nconst text = (format) => function () { return Number.isNaN(getTime.call(this)) ? \"Invalid Date\" : format(this); };\nfor (const [local, utc] of [[\"getFullYear\",\"getUTCFullYear\"],[\"getMonth\",\"getUTCMonth\"],[\"getDate\",\"getUTCDate\"],[\"getDay\",\"getUTCDay\"],[\"getHours\",\"getUTCHours\"],[\"getMinutes\",\"getUTCMinutes\"],[\"getSeconds\",\"getUTCSeconds\"],[\"getMilliseconds\",\"getUTCMilliseconds\"],[\"setFullYear\",\"setUTCFullYear\"],[\"setMonth\",\"setUTCMonth\"],[\"setDate\",\"setUTCDate\"],[\"setHours\",\"setUTCHours\"],[\"setMinutes\",\"setUTCMinutes\"],[\"setSeconds\",\"setUTCSeconds\"],[\"setMilliseconds\",\"setUTCMilliseconds\"]]) define(P, local, P[utc]);\nif (typeof P.getYear === \"function\") define(P, \"getYear\", function () { return P.getUTCFullYear.call(this) - 1900; });\ndefine(P, \"getTimezoneOffset\", function () { return Number.isNaN(getTime.call(this)) ? NaN : 0; });\ndefine(P, \"toString\", text((d) => ymd(d) + \" \" + hms(d) + \" GMT+0000\"));\ndefine(P, \"toDateString\", text(ymd));\ndefine(P, \"toTimeString\", text((d) => hms(d) + \" GMT+0000\"));\ndefine(P, \"toLocaleString\", text((d) => ldate(d) + \", \" + ltime(d)));\ndefine(P, \"toLocaleDateString\", text(ldate));\ndefine(P, \"toLocaleTimeString\", text(ltime));\nconst utcForm = (s) => /(?:Z|[+-]\\\\d\\\\d:?\\\\d\\\\d|GMT|UTC)(?:\\\\s*\\\\(.*\\\\))?$/i.test(s) || /^[+-]?\\\\d{4,6}(?:-\\\\d\\\\d(?:-\\\\d\\\\d)?)?$/.test(s);\nconst parse = (value) => {\n const s = String(value).trim();\n const t = D.parse(s);\n if (Number.isNaN(t) || utcForm(s)) return t;\n return t - tzo.call(new D(t)) * 60000;\n};\nfunction Date(...args) {\n if (new.target === undefined) return P.toString.call(new D(__now()));\n let d;\n if (args.length === 0) d = new D(__now());\n else if (args.length === 1) {\n const v = args[0];\n d = new D(typeof v === \"string\" ? parse(v) : v instanceof D ? getTime.call(v) : v);\n } else d = new D(D.UTC(...args));\n if (new.target !== Date) Object.setPrototypeOf(d, new.target.prototype);\n return d;\n}\nDate.prototype = P;\ndefine(P, \"constructor\", Date);\nObject.defineProperty(Date, \"length\", { value: 7, configurable: true });\ndefine(Date, \"now\", () => __now());\ndefine(Date, \"parse\", parse);\ndefine(Date, \"UTC\", D.UTC);\ndefine(globalThis, \"Date\", Date);\n})();\n`;\n"],
|
|
5
|
+
"mappings": ";AAIO,IAAM,oBAAoB,CAAC,SAAyB;AAAA;AAAA;AAAA;AAAA,YAI/C,SAAS,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Interner,
|
|
3
|
+
bit
|
|
4
|
+
} from "./chunk-NJHJKINP.js";
|
|
1
5
|
import {
|
|
2
6
|
processSender
|
|
3
7
|
} from "./chunk-JKQARSWR.js";
|
|
@@ -5,155 +9,51 @@ import {
|
|
|
5
9
|
readJsonlPage
|
|
6
10
|
} from "./chunk-CGPK5WHX.js";
|
|
7
11
|
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
12
|
+
formatShortLockOwner,
|
|
13
|
+
fsyncDirectory,
|
|
14
|
+
mkdirDurable,
|
|
15
|
+
reapStaleShortLock,
|
|
16
|
+
releaseShortLock,
|
|
17
|
+
tryAcquireShortLock,
|
|
11
18
|
writeFileAtomic
|
|
12
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-F6A6MQ6G.js";
|
|
13
20
|
|
|
14
21
|
// src/mesh/store.ts
|
|
15
22
|
import { randomUUID } from "node:crypto";
|
|
16
23
|
import fs from "node:fs";
|
|
17
24
|
import path from "node:path";
|
|
18
25
|
|
|
19
|
-
// src/verified/generated/storage
|
|
20
|
-
function
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
function c(e) {
|
|
24
|
-
if (e > 281474976710655)
|
|
25
|
-
throw "bend: a Nat past the largest immediate 2^48-1";
|
|
26
|
-
return e;
|
|
27
|
-
}
|
|
28
|
-
function P(e) {
|
|
29
|
-
for (; e !== null && typeof e == "object" && e.$ === "$JMP"; )
|
|
30
|
-
e = e.f(e.x);
|
|
31
|
-
return e;
|
|
26
|
+
// src/verified/generated/storage.js
|
|
27
|
+
function $n(v, what) {
|
|
28
|
+
if (typeof v !== "number" || !Number.isSafeInteger(v) || v < 0) throw new RangeError(what + " must be a natural below 2^53, not " + v);
|
|
29
|
+
return v;
|
|
32
30
|
}
|
|
33
|
-
function
|
|
34
|
-
|
|
31
|
+
function $x(v) {
|
|
32
|
+
if (v > 9007199254740991) throw new RangeError("a value passed 2^53 - 1, past which the proofs over the naturals no longer describe the run");
|
|
33
|
+
return v;
|
|
35
34
|
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
}
|
|
40
|
-
function b(e, t) {
|
|
41
|
-
if (e.$ === "storage-plans.Any")
|
|
42
|
-
return true;
|
|
43
|
-
{
|
|
44
|
-
let n = e.version;
|
|
45
|
-
return D(n, t);
|
|
35
|
+
var storageTransition = /* @__PURE__ */ (() => {
|
|
36
|
+
function init(params) {
|
|
37
|
+
const env = {}, s = {};
|
|
38
|
+
return { scalars: { "out.plan": 0, "out.key": 0, "out.value": 0, "out.identity": 0, "out.version": 0, "out.highWater": 0 }, maps: {} };
|
|
46
39
|
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
}
|
|
52
|
-
function m(e, t, n) {
|
|
53
|
-
return e ? { $: "storage-plans.Revision", high: c(t + 1), low: 0 } : { $: "storage-plans.Revision", high: t, low: c(n + 1) };
|
|
54
|
-
}
|
|
55
|
-
function $(e) {
|
|
56
|
-
let t = e.high, n = e.low;
|
|
57
|
-
return m(u(n, 4294967295), t, n);
|
|
58
|
-
}
|
|
59
|
-
function d(e, t, n) {
|
|
60
|
-
return e ? t : n;
|
|
61
|
-
}
|
|
62
|
-
function y(e, t) {
|
|
63
|
-
return i(h(e), h(t));
|
|
64
|
-
}
|
|
65
|
-
function x(e, t, n, a, r) {
|
|
66
|
-
if (e)
|
|
67
|
-
if (n.$ === "storage-plans.Put") {
|
|
68
|
-
let o = n.value, s = n.identity;
|
|
69
|
-
return { $: "storage-plans.PutNext", key: t, value: o, identity: s, version: $(a), highWater: $(r) };
|
|
70
|
-
} else
|
|
71
|
-
return { $: "storage-plans.DeleteNext", key: t, version: $(a), highWater: $(r) };
|
|
72
|
-
else
|
|
73
|
-
return { $: "storage-plans.Exhausted" };
|
|
74
|
-
}
|
|
75
|
-
function A(e, t, n, a, r) {
|
|
76
|
-
if (t.$ === "storage-plans.Delete")
|
|
77
|
-
return n ? x(y(a, r), e, { $: "storage-plans.Delete" }, a, r) : { $: "storage-plans.Unchanged" };
|
|
78
|
-
{
|
|
79
|
-
let o = t.value, s = t.identity;
|
|
80
|
-
return x(y(d(n, a, r), r), e, { $: "storage-plans.Put", value: o, identity: s }, d(n, a, r), r);
|
|
40
|
+
function step(params, state, input) {
|
|
41
|
+
const env = { "key": $n(input["key"], "input key"), "any": $n(input["any"], "input any"), "expected": $n(input["expected"], "input expected"), "put": $n(input["put"], "input put"), "value": $n(input["value"], "input value"), "identity": $n(input["identity"], "input identity"), "present": $n(input["present"], "input present"), "version": $n(input["version"], "input version"), "highWater": $n(input["highWater"], "input highWater") }, s = state.scalars, dft = { ...state.defaults }, maps = state.maps;
|
|
42
|
+
if (!(env["any"] <= 1 && env["put"] <= 1 && env["present"] <= 1)) throw new RangeError("storage transition: the request fails the rule's assumption, so no proof covers the step it would take");
|
|
43
|
+
const scalars = { ...s, "out.plan": !(env["any"] === 1 || env["expected"] === env["version"]) ? 0 : !(env["put"] === 1) && !(env["present"] === 1) ? 2 : !((env["put"] === 1 ? env["present"] === 1 ? env["version"] : env["highWater"] : env["version"]) < 9007199254740991 && env["highWater"] < 9007199254740991) ? 1 : env["put"] === 1 ? 3 : 4, "out.key": (env["any"] === 1 || env["expected"] === env["version"]) && !(!(env["put"] === 1) && !(env["present"] === 1)) && ((env["put"] === 1 ? env["present"] === 1 ? env["version"] : env["highWater"] : env["version"]) < 9007199254740991 && env["highWater"] < 9007199254740991) ? env["key"] : 0, "out.value": (env["any"] === 1 || env["expected"] === env["version"]) && !(!(env["put"] === 1) && !(env["present"] === 1)) && ((env["put"] === 1 ? env["present"] === 1 ? env["version"] : env["highWater"] : env["version"]) < 9007199254740991 && env["highWater"] < 9007199254740991) && env["put"] === 1 ? env["value"] : 0, "out.identity": (env["any"] === 1 || env["expected"] === env["version"]) && !(!(env["put"] === 1) && !(env["present"] === 1)) && ((env["put"] === 1 ? env["present"] === 1 ? env["version"] : env["highWater"] : env["version"]) < 9007199254740991 && env["highWater"] < 9007199254740991) && env["put"] === 1 ? env["identity"] : 0, "out.version": (env["any"] === 1 || env["expected"] === env["version"]) && !(!(env["put"] === 1) && !(env["present"] === 1)) && ((env["put"] === 1 ? env["present"] === 1 ? env["version"] : env["highWater"] : env["version"]) < 9007199254740991 && env["highWater"] < 9007199254740991) ? $x((env["put"] === 1 ? env["present"] === 1 ? env["version"] : env["highWater"] : env["version"]) + 1) : 0, "out.highWater": (env["any"] === 1 || env["expected"] === env["version"]) && !(!(env["put"] === 1) && !(env["present"] === 1)) && ((env["put"] === 1 ? env["present"] === 1 ? env["version"] : env["highWater"] : env["version"]) < 9007199254740991 && env["highWater"] < 9007199254740991) ? $x(env["highWater"] + 1) : 0 };
|
|
44
|
+
return Object.keys(dft).length ? { scalars, maps: state.maps, defaults: dft } : { scalars, maps: state.maps };
|
|
81
45
|
}
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
return e ? A(t, n, a, r, o) : { $: "storage-plans.Conflict" };
|
|
85
|
-
}
|
|
86
|
-
function E(e, t) {
|
|
87
|
-
let n = e.key, a = e.expected, r = e.change, o = t.present, s = t.version, l = t.highWater;
|
|
88
|
-
return C(b(a, s), n, r, o, s, l);
|
|
89
|
-
}
|
|
90
|
-
function k(e, t) {
|
|
91
|
-
return E(e, t);
|
|
92
|
-
}
|
|
93
|
-
function i(e, t) {
|
|
94
|
-
return e ? t : false;
|
|
95
|
-
}
|
|
96
|
-
function u(e, t) {
|
|
97
|
-
return R(p(e, t));
|
|
98
|
-
}
|
|
99
|
-
function v(e, t) {
|
|
100
|
-
return T(p(e, t));
|
|
101
|
-
}
|
|
102
|
-
function R(e) {
|
|
103
|
-
return e.$ === "EQ";
|
|
104
|
-
}
|
|
105
|
-
function T(e) {
|
|
106
|
-
return e.$ !== "GT";
|
|
107
|
-
}
|
|
108
|
-
var w = /* @__PURE__ */ new Map([["Any", "storage-plans.Any"], ["Revision", "storage-plans.Revision"], ["Exhausted", "storage-plans.Exhausted"], ["Put", "storage-plans.Put"], ["PutNext", "storage-plans.PutNext"], ["DeleteNext", "storage-plans.DeleteNext"], ["Delete", "storage-plans.Delete"], ["Unchanged", "storage-plans.Unchanged"], ["Conflict", "storage-plans.Conflict"]]);
|
|
109
|
-
var U = /* @__PURE__ */ new Map([["storage-plans.Any", "Any"], ["storage-plans.Revision", "Revision"], ["storage-plans.Exhausted", "Exhausted"], ["storage-plans.Put", "Put"], ["storage-plans.PutNext", "PutNext"], ["storage-plans.DeleteNext", "DeleteNext"], ["storage-plans.Delete", "Delete"], ["storage-plans.Unchanged", "Unchanged"], ["storage-plans.Conflict", "Conflict"]]);
|
|
110
|
-
function g(e, t) {
|
|
111
|
-
let n = [e];
|
|
112
|
-
for (let a = [[n, 0]]; a.length > 0; ) {
|
|
113
|
-
let [r, o] = a.pop(), s = r[o];
|
|
114
|
-
if (s === null || typeof s != "object") continue;
|
|
115
|
-
let l = Array.isArray(s) ? [...s] : { ...s };
|
|
116
|
-
typeof l.$ == "string" && (l.$ = t.get(l.$) ?? l.$), r[o] = l;
|
|
117
|
-
for (let N of Object.keys(l)) a.push([l, N]);
|
|
118
|
-
}
|
|
119
|
-
return n[0];
|
|
120
|
-
}
|
|
121
|
-
var j = /* @__PURE__ */ f((e, t) => k(e, t), 2);
|
|
122
|
-
var G = (e, t) => g(j(g(e, w), g(t, w)), U);
|
|
46
|
+
return { init, step };
|
|
47
|
+
})();
|
|
123
48
|
|
|
124
49
|
// src/verified/storage.ts
|
|
125
|
-
var
|
|
126
|
-
var encode = (text) => {
|
|
127
|
-
let result = { $: "Nil" };
|
|
128
|
-
for (let index = text.length - 1; index >= 0; index--) {
|
|
129
|
-
result = { $: "Con", head: text.charCodeAt(index), tail: result };
|
|
130
|
-
}
|
|
131
|
-
return result;
|
|
132
|
-
};
|
|
133
|
-
var decode = (text) => {
|
|
134
|
-
const units = [];
|
|
135
|
-
for (let node = text; node.$ === "Con"; node = node.tail) {
|
|
136
|
-
if (node.head < 0 || node.head > 65535) throw new Error("Invalid storage code unit");
|
|
137
|
-
units.push(String.fromCharCode(node.head));
|
|
138
|
-
}
|
|
139
|
-
return units.join("");
|
|
140
|
-
};
|
|
50
|
+
var PLANS = ["Conflict", "Exhausted", "Unchanged", "PutNext", "DeleteNext"];
|
|
141
51
|
var storageRevision = (value) => {
|
|
142
52
|
if (typeof value !== "number" || !Number.isSafeInteger(value) || value < 0) {
|
|
143
53
|
throw new Error("Invalid Fabric mesh revision: expected a nonnegative safe integer");
|
|
144
54
|
}
|
|
145
55
|
return value;
|
|
146
56
|
};
|
|
147
|
-
var encodeRevision = (value) => {
|
|
148
|
-
const exact = storageRevision(value);
|
|
149
|
-
return { $: "Revision", high: Math.floor(exact / RADIX), low: exact % RADIX };
|
|
150
|
-
};
|
|
151
|
-
var decodeRevision = (value) => {
|
|
152
|
-
if (!Number.isInteger(value.high) || !Number.isInteger(value.low) || value.high < 0 || value.high > 2097151 || value.low < 0 || value.low >= RADIX) {
|
|
153
|
-
throw new Error("Invalid verified storage revision limbs");
|
|
154
|
-
}
|
|
155
|
-
return storageRevision(value.high * RADIX + value.low);
|
|
156
|
-
};
|
|
157
57
|
var serialize = (value) => {
|
|
158
58
|
const json = JSON.stringify(value);
|
|
159
59
|
if (json === void 0) throw new Error("Mesh values must be JSON-serializable");
|
|
@@ -161,27 +61,26 @@ var serialize = (value) => {
|
|
|
161
61
|
};
|
|
162
62
|
var capture = (key, ifVersion, payload) => {
|
|
163
63
|
const expected = ifVersion === void 0 ? void 0 : storageRevision(ifVersion);
|
|
164
|
-
const request = {
|
|
165
|
-
$: "Request",
|
|
166
|
-
key: encode(key),
|
|
167
|
-
expected: expected === void 0 ? { $: "Any" } : { $: "At", version: encodeRevision(expected) },
|
|
168
|
-
change: payload === void 0 ? { $: "Delete" } : {
|
|
169
|
-
$: "Put",
|
|
170
|
-
value: encode(payload.value),
|
|
171
|
-
identity: encode(payload.identity)
|
|
172
|
-
}
|
|
173
|
-
};
|
|
174
64
|
return Object.freeze({
|
|
175
65
|
key,
|
|
176
66
|
transition(present, actualVersion, highWater) {
|
|
177
67
|
const actual = storageRevision(actualVersion);
|
|
178
68
|
const clock = storageRevision(highWater);
|
|
179
69
|
if (clock < actual) throw new Error("Inconsistent Fabric mesh high-water revision");
|
|
180
|
-
const
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
70
|
+
const names = new Interner(1);
|
|
71
|
+
const out = storageTransition.step({}, storageTransition.init({}), {
|
|
72
|
+
key: names.id(key),
|
|
73
|
+
any: bit(expected === void 0),
|
|
74
|
+
expected: expected ?? 0,
|
|
75
|
+
put: bit(payload !== void 0),
|
|
76
|
+
value: names.id(payload?.value ?? ""),
|
|
77
|
+
identity: names.id(payload?.identity ?? ""),
|
|
78
|
+
present: bit(present),
|
|
79
|
+
version: actual,
|
|
80
|
+
highWater: clock
|
|
81
|
+
}).scalars;
|
|
82
|
+
const plan = PLANS[out["out.plan"]];
|
|
83
|
+
switch (plan) {
|
|
185
84
|
case "Conflict":
|
|
186
85
|
throw new Error(`Mesh compare-and-swap failed for ${key}: expected version ${expected}, found ${actual}`);
|
|
187
86
|
case "Exhausted":
|
|
@@ -191,14 +90,16 @@ var capture = (key, ifVersion, payload) => {
|
|
|
191
90
|
case "PutNext":
|
|
192
91
|
return {
|
|
193
92
|
kind: "put",
|
|
194
|
-
key:
|
|
195
|
-
value: JSON.parse(
|
|
196
|
-
identity: JSON.parse(
|
|
197
|
-
version:
|
|
198
|
-
highWater:
|
|
93
|
+
key: names.name(out["out.key"]),
|
|
94
|
+
value: JSON.parse(names.name(out["out.value"])),
|
|
95
|
+
identity: JSON.parse(names.name(out["out.identity"])),
|
|
96
|
+
version: storageRevision(out["out.version"]),
|
|
97
|
+
highWater: storageRevision(out["out.highWater"])
|
|
199
98
|
};
|
|
200
99
|
case "DeleteNext":
|
|
201
|
-
return { kind: "delete", key:
|
|
100
|
+
return { kind: "delete", key: names.name(out["out.key"]), version: storageRevision(out["out.version"]), highWater: storageRevision(out["out.highWater"]) };
|
|
101
|
+
default:
|
|
102
|
+
throw new Error("Invalid verified storage plan");
|
|
202
103
|
}
|
|
203
104
|
}
|
|
204
105
|
});
|
|
@@ -330,12 +231,12 @@ var readState = (filePath, maxBytes, recoverDamage = true) => {
|
|
|
330
231
|
return emptyState();
|
|
331
232
|
}
|
|
332
233
|
};
|
|
333
|
-
var atomicWrite = (filePath, value, maxBytes = Number.POSITIVE_INFINITY) => {
|
|
234
|
+
var atomicWrite = (filePath, value, maxBytes = Number.POSITIVE_INFINITY, fsync = false) => {
|
|
334
235
|
const serialized = JSON.stringify(value, null, 2);
|
|
335
236
|
if (Buffer.byteLength(serialized, "utf8") > maxBytes) {
|
|
336
237
|
throw new Error(`Fabric mesh state exceeds ${maxBytes} bytes`);
|
|
337
238
|
}
|
|
338
|
-
writeFileAtomic(filePath, serialized);
|
|
239
|
+
writeFileAtomic(filePath, serialized, fsync ? { fsync: true, durabilityRoot: path.dirname(filePath) } : void 0);
|
|
339
240
|
};
|
|
340
241
|
var stateSlot = (state, key) => {
|
|
341
242
|
if (state.versions !== void 0 && (typeof state.versions !== "object" || state.versions === null || Array.isArray(state.versions))) {
|
|
@@ -421,7 +322,8 @@ var MeshStore = class {
|
|
|
421
322
|
);
|
|
422
323
|
this.#lockTimeoutMs = Math.max(100, Math.floor(options.lockTimeoutMs ?? LOCK_TIMEOUT_MS));
|
|
423
324
|
this.#staleLockMs = Math.max(100, Math.floor(options.staleLockMs ?? STALE_LOCK_MS));
|
|
424
|
-
|
|
325
|
+
this.durable = options.durability === "fsync";
|
|
326
|
+
mkdirDurable(root, 448, this.durable);
|
|
425
327
|
}
|
|
426
328
|
#eventsPath;
|
|
427
329
|
#statePath;
|
|
@@ -434,6 +336,8 @@ var MeshStore = class {
|
|
|
434
336
|
#maxStateTombstones;
|
|
435
337
|
#lockTimeoutMs;
|
|
436
338
|
#staleLockMs;
|
|
339
|
+
/** Whether committed writes are flushed to stable storage before returning. */
|
|
340
|
+
durable;
|
|
437
341
|
#stateCache;
|
|
438
342
|
#schedulesPath;
|
|
439
343
|
#scheduleCache;
|
|
@@ -490,9 +394,9 @@ var MeshStore = class {
|
|
|
490
394
|
if (Buffer.byteLength(line, "utf8") > limit) {
|
|
491
395
|
throw new Error(`Mesh event exceeds ${limit} bytes`);
|
|
492
396
|
}
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
atomicWrite(this.#counterPath, sequence);
|
|
397
|
+
this.#appendEventLine(`${line}
|
|
398
|
+
`);
|
|
399
|
+
atomicWrite(this.#counterPath, sequence, Number.POSITIVE_INFINITY, this.durable);
|
|
496
400
|
this.#compactEventLog();
|
|
497
401
|
return event;
|
|
498
402
|
}
|
|
@@ -658,10 +562,11 @@ var MeshStore = class {
|
|
|
658
562
|
#writeSchedules(schedules) {
|
|
659
563
|
if (schedules.length === 0) {
|
|
660
564
|
fs.rmSync(this.#schedulesPath, { force: true });
|
|
565
|
+
if (this.durable) fsyncDirectory(this.root);
|
|
661
566
|
this.#scheduleCache = void 0;
|
|
662
567
|
return;
|
|
663
568
|
}
|
|
664
|
-
atomicWrite(this.#schedulesPath, { format: 1, schedules }, MAX_SCHEDULE_FILE_BYTES);
|
|
569
|
+
atomicWrite(this.#schedulesPath, { format: 1, schedules }, MAX_SCHEDULE_FILE_BYTES, this.durable);
|
|
665
570
|
this.#scheduleCache = void 0;
|
|
666
571
|
}
|
|
667
572
|
read(input = {}) {
|
|
@@ -853,12 +758,17 @@ var MeshStore = class {
|
|
|
853
758
|
}
|
|
854
759
|
list(prefix = "", limit = 100) {
|
|
855
760
|
const boundedLimit = Math.max(1, Math.min(Math.floor(limit), this.maxReadEvents));
|
|
856
|
-
return this
|
|
761
|
+
return this.#listEntries(prefix).slice(0, boundedLimit).map((entry) => jsonClone(entry));
|
|
857
762
|
}
|
|
858
763
|
/** Internal project-state scan for host-managed indexes that must reconcile every key. */
|
|
859
764
|
listAll(prefix = "") {
|
|
765
|
+
return this.#listEntries(prefix).map((entry) => jsonClone(entry));
|
|
766
|
+
}
|
|
767
|
+
// Cached entries never escape without cloning. Bound public reads before
|
|
768
|
+
// copying payloads so a small page does not serialize the entire mesh.
|
|
769
|
+
#listEntries(prefix) {
|
|
860
770
|
if (prefix) this.#validateKey(prefix);
|
|
861
|
-
return Object.values(this.#readCachedState().entries).filter((entry) => !prefix || entry.key.startsWith(prefix)).sort((left, right) => left.key.localeCompare(right.key))
|
|
771
|
+
return Object.values(this.#readCachedState().entries).filter((entry) => !prefix || entry.key.startsWith(prefix)).sort((left, right) => left.key.localeCompare(right.key));
|
|
862
772
|
}
|
|
863
773
|
async put(input) {
|
|
864
774
|
const { key, value, identity, ifVersion } = input;
|
|
@@ -884,7 +794,7 @@ var MeshStore = class {
|
|
|
884
794
|
state.highWater = plan.highWater;
|
|
885
795
|
state.tombstoneOrder = (state.tombstoneOrder ?? []).filter((key2) => key2 !== plan.key);
|
|
886
796
|
compactStateTombstones(state, this.#maxStateTombstones);
|
|
887
|
-
atomicWrite(this.#statePath, state, this.#maxStateBytes);
|
|
797
|
+
atomicWrite(this.#statePath, state, this.#maxStateBytes, this.durable);
|
|
888
798
|
this.#cacheState(state);
|
|
889
799
|
return jsonClone(entry);
|
|
890
800
|
});
|
|
@@ -913,7 +823,7 @@ var MeshStore = class {
|
|
|
913
823
|
plan.key
|
|
914
824
|
];
|
|
915
825
|
compactStateTombstones(state, this.#maxStateTombstones);
|
|
916
|
-
atomicWrite(this.#statePath, state, this.#maxStateBytes);
|
|
826
|
+
atomicWrite(this.#statePath, state, this.#maxStateBytes, this.durable);
|
|
917
827
|
this.#cacheState(state);
|
|
918
828
|
return { deleted: true, version: plan.version };
|
|
919
829
|
});
|
|
@@ -949,87 +859,32 @@ var MeshStore = class {
|
|
|
949
859
|
}
|
|
950
860
|
}
|
|
951
861
|
async #withLock(operation) {
|
|
952
|
-
|
|
862
|
+
mkdirDurable(this.root, 448, this.durable, this.root);
|
|
953
863
|
const deadline = Date.now() + this.#lockTimeoutMs;
|
|
954
864
|
const token = randomUUID();
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
fs.writeFileSync(ownerPath, `${token}
|
|
960
|
-
${process.pid}
|
|
961
|
-
${Date.now()}
|
|
962
|
-
${encodeOwnerIdentityLine()}
|
|
963
|
-
`, {
|
|
964
|
-
encoding: "utf8",
|
|
965
|
-
mode: 384
|
|
966
|
-
});
|
|
967
|
-
break;
|
|
968
|
-
} catch (error) {
|
|
969
|
-
if (errorCode(error) !== "EEXIST") throw error;
|
|
970
|
-
if (this.#clearStaleLock(ownerPath)) continue;
|
|
971
|
-
if (Date.now() >= deadline) throw new Error("Timed out waiting for the Fabric mesh lock");
|
|
972
|
-
await delay(10);
|
|
973
|
-
}
|
|
865
|
+
while (!tryAcquireShortLock(this.#lockPath, formatShortLockOwner(token))) {
|
|
866
|
+
if (this.#clearStaleLock()) continue;
|
|
867
|
+
if (Date.now() >= deadline) throw new Error("Timed out waiting for the Fabric mesh lock");
|
|
868
|
+
await delay(10);
|
|
974
869
|
}
|
|
975
870
|
try {
|
|
976
871
|
return operation();
|
|
977
872
|
} finally {
|
|
978
|
-
|
|
979
|
-
const owner = fs.readFileSync(ownerPath, "utf8");
|
|
980
|
-
if (owner.startsWith(`${token}
|
|
981
|
-
`)) {
|
|
982
|
-
fs.rmSync(this.#lockPath, { recursive: true, force: true });
|
|
983
|
-
}
|
|
984
|
-
} catch {
|
|
985
|
-
}
|
|
873
|
+
releaseShortLock(this.#lockPath, token);
|
|
986
874
|
}
|
|
987
875
|
}
|
|
988
876
|
// Returns true when a stale lock was removed and acquisition should retry.
|
|
989
|
-
// A lock
|
|
990
|
-
//
|
|
991
|
-
//
|
|
992
|
-
//
|
|
993
|
-
//
|
|
994
|
-
//
|
|
995
|
-
#clearStaleLock(
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
} catch {
|
|
1001
|
-
try {
|
|
1002
|
-
lockModifiedAt = fs.statSync(this.#lockPath).mtimeMs;
|
|
1003
|
-
} catch {
|
|
1004
|
-
return false;
|
|
1005
|
-
}
|
|
1006
|
-
}
|
|
1007
|
-
if (owner !== void 0) {
|
|
1008
|
-
const [, pidText, createdText, identityLine] = owner.trim().split("\n");
|
|
1009
|
-
const createdAt = Number(createdText);
|
|
1010
|
-
if (Number.isFinite(createdAt) && Date.now() - createdAt <= this.#staleLockMs) return false;
|
|
1011
|
-
if (lockOwnerLiveness(Number(pidText), createdAt, identityLine, {
|
|
1012
|
-
legacyAlive: processAlive,
|
|
1013
|
-
maxHoldMs: Math.max(SHORT_LOCK_MAX_HOLD_MS, this.#staleLockMs)
|
|
1014
|
-
}) !== "dead") return false;
|
|
1015
|
-
try {
|
|
1016
|
-
if (fs.readFileSync(ownerPath, "utf8") !== owner) return false;
|
|
1017
|
-
fs.rmSync(this.#lockPath, { recursive: true, force: true });
|
|
1018
|
-
return true;
|
|
1019
|
-
} catch {
|
|
1020
|
-
return false;
|
|
1021
|
-
}
|
|
1022
|
-
}
|
|
1023
|
-
if (lockModifiedAt === void 0 || Date.now() - lockModifiedAt <= this.#staleLockMs) {
|
|
1024
|
-
return false;
|
|
1025
|
-
}
|
|
1026
|
-
try {
|
|
1027
|
-
if (fs.statSync(this.#lockPath).mtimeMs !== lockModifiedAt) return false;
|
|
1028
|
-
fs.rmSync(this.#lockPath, { recursive: true, force: true });
|
|
1029
|
-
return true;
|
|
1030
|
-
} catch {
|
|
1031
|
-
return false;
|
|
1032
|
-
}
|
|
877
|
+
// A lock without a usable owner (missing, empty or partial owner file) is
|
|
878
|
+
// judged only by the lock directory's age: its owner may be mid-acquire.
|
|
879
|
+
// Otherwise a lock is removed when its owner is dead past the stale window,
|
|
880
|
+
// provably dead within it (same host, PID namespace and boot, and the pid is
|
|
881
|
+
// gone or reused), or older than the short-lock hold ceiling, which only a
|
|
882
|
+
// leaked lock reaches. Removal is a rename claim that re-verifies the owner.
|
|
883
|
+
#clearStaleLock() {
|
|
884
|
+
return reapStaleShortLock(this.#lockPath, {
|
|
885
|
+
staleMs: this.#staleLockMs,
|
|
886
|
+
legacyAlive: processAlive
|
|
887
|
+
});
|
|
1033
888
|
}
|
|
1034
889
|
#readGeneration() {
|
|
1035
890
|
try {
|
|
@@ -1053,6 +908,20 @@ ${encodeOwnerIdentityLine()}
|
|
|
1053
908
|
offset: cursor % CURSOR_OFFSET_BASE
|
|
1054
909
|
};
|
|
1055
910
|
}
|
|
911
|
+
#appendEventLine(line) {
|
|
912
|
+
if (!this.durable) {
|
|
913
|
+
fs.appendFileSync(this.#eventsPath, line, { encoding: "utf8", mode: 384 });
|
|
914
|
+
return;
|
|
915
|
+
}
|
|
916
|
+
const descriptor = fs.openSync(this.#eventsPath, "a", 384);
|
|
917
|
+
try {
|
|
918
|
+
fs.writeFileSync(descriptor, line, "utf8");
|
|
919
|
+
fs.fsyncSync(descriptor);
|
|
920
|
+
} finally {
|
|
921
|
+
fs.closeSync(descriptor);
|
|
922
|
+
}
|
|
923
|
+
fsyncDirectory(this.root);
|
|
924
|
+
}
|
|
1056
925
|
#compactEventLog() {
|
|
1057
926
|
let descriptor;
|
|
1058
927
|
try {
|
|
@@ -1074,15 +943,26 @@ ${encodeOwnerIdentityLine()}
|
|
|
1074
943
|
descriptor = void 0;
|
|
1075
944
|
const temporaryPath = this.#eventsPath + "." + process.pid + "." + randomUUID() + ".tmp";
|
|
1076
945
|
try {
|
|
1077
|
-
|
|
946
|
+
if (this.durable) {
|
|
947
|
+
const temporary = fs.openSync(temporaryPath, "wx", 384);
|
|
948
|
+
try {
|
|
949
|
+
fs.writeFileSync(temporary, retained);
|
|
950
|
+
fs.fsyncSync(temporary);
|
|
951
|
+
} finally {
|
|
952
|
+
fs.closeSync(temporary);
|
|
953
|
+
}
|
|
954
|
+
} else {
|
|
955
|
+
fs.writeFileSync(temporaryPath, retained, { mode: 384 });
|
|
956
|
+
}
|
|
1078
957
|
fs.renameSync(temporaryPath, this.#eventsPath);
|
|
958
|
+
if (this.durable) fsyncDirectory(this.root);
|
|
1079
959
|
} finally {
|
|
1080
960
|
try {
|
|
1081
961
|
fs.rmSync(temporaryPath, { force: true });
|
|
1082
962
|
} catch {
|
|
1083
963
|
}
|
|
1084
964
|
}
|
|
1085
|
-
atomicWrite(this.#generationPath, this.#readGeneration() + 1);
|
|
965
|
+
atomicWrite(this.#generationPath, this.#readGeneration() + 1, Number.POSITIVE_INFINITY, this.durable);
|
|
1086
966
|
} catch (error) {
|
|
1087
967
|
if (errorCode(error) !== "ENOENT") throw error;
|
|
1088
968
|
} finally {
|
|
@@ -1103,6 +983,7 @@ ${encodeOwnerIdentityLine()}
|
|
|
1103
983
|
fs.readSync(descriptor, tail, 0, readBytes, size - readBytes);
|
|
1104
984
|
const newline = tail.lastIndexOf(10);
|
|
1105
985
|
fs.ftruncateSync(descriptor, newline >= 0 ? size - readBytes + newline + 1 : 0);
|
|
986
|
+
if (this.durable) fs.fsyncSync(descriptor);
|
|
1106
987
|
} catch (error) {
|
|
1107
988
|
if (errorCode(error) !== "ENOENT") throw error;
|
|
1108
989
|
} finally {
|
|
@@ -1166,4 +1047,4 @@ export {
|
|
|
1166
1047
|
MESH_MAX_SCHEDULE_AHEAD_MS,
|
|
1167
1048
|
MeshStore
|
|
1168
1049
|
};
|
|
1169
|
-
//# sourceMappingURL=chunk-
|
|
1050
|
+
//# sourceMappingURL=chunk-TJZYM2SP.js.map
|