@e4779/pi-fabric 0.92.17-fork.3
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/LICENSE +21 -0
- package/README.md +181 -0
- package/THIRD_PARTY_NOTICES.md +33 -0
- package/dist/activity/store.d.ts +33 -0
- package/dist/activity/store.d.ts.map +1 -0
- package/dist/activity/types.d.ts +104 -0
- package/dist/activity/types.d.ts.map +1 -0
- package/dist/actors/binding-store.d.ts +17 -0
- package/dist/actors/binding-store.d.ts.map +1 -0
- package/dist/actors/context.d.ts +13 -0
- package/dist/actors/context.d.ts.map +1 -0
- package/dist/actors/delivery-policy.d.ts +8 -0
- package/dist/actors/delivery-policy.d.ts.map +1 -0
- package/dist/actors/directory.d.ts +47 -0
- package/dist/actors/directory.d.ts.map +1 -0
- package/dist/actors/global-registry.d.ts +47 -0
- package/dist/actors/global-registry.d.ts.map +1 -0
- package/dist/actors/host-event-observer.d.ts +5 -0
- package/dist/actors/host-event-observer.d.ts.map +1 -0
- package/dist/actors/host-event-payload.d.ts +14 -0
- package/dist/actors/host-event-payload.d.ts.map +1 -0
- package/dist/actors/log-store.d.ts +22 -0
- package/dist/actors/log-store.d.ts.map +1 -0
- package/dist/actors/manager.d.ts +175 -0
- package/dist/actors/manager.d.ts.map +1 -0
- package/dist/actors/mesh-monitor.d.ts +22 -0
- package/dist/actors/mesh-monitor.d.ts.map +1 -0
- package/dist/actors/predicate.d.ts +7 -0
- package/dist/actors/predicate.d.ts.map +1 -0
- package/dist/actors/registry-store.d.ts +15 -0
- package/dist/actors/registry-store.d.ts.map +1 -0
- package/dist/actors/types.d.ts +218 -0
- package/dist/actors/types.d.ts.map +1 -0
- package/dist/agents/bash-worktree-add.d.ts +24 -0
- package/dist/agents/bash-worktree-add.d.ts.map +1 -0
- package/dist/agents/budget-ledger.d.ts +88 -0
- package/dist/agents/budget-ledger.d.ts.map +1 -0
- package/dist/agents/claude-cli.d.ts +32 -0
- package/dist/agents/claude-cli.d.ts.map +1 -0
- package/dist/agents/claude-cli.js +17 -0
- package/dist/agents/claude-cli.js.map +7 -0
- package/dist/agents/clone-first-worktree.d.ts +17 -0
- package/dist/agents/clone-first-worktree.d.ts.map +1 -0
- package/dist/agents/compact-control.d.ts +32 -0
- package/dist/agents/compact-control.d.ts.map +1 -0
- package/dist/agents/compact-control.js +129 -0
- package/dist/agents/compact-control.js.map +7 -0
- package/dist/agents/constants.d.ts +9 -0
- package/dist/agents/constants.d.ts.map +1 -0
- package/dist/agents/cow-clone.d.ts +8 -0
- package/dist/agents/cow-clone.d.ts.map +1 -0
- package/dist/agents/handoff-completion.d.ts +4 -0
- package/dist/agents/handoff-completion.d.ts.map +1 -0
- package/dist/agents/handoff.d.ts +19 -0
- package/dist/agents/handoff.d.ts.map +1 -0
- package/dist/agents/lifecycle.d.ts +32 -0
- package/dist/agents/lifecycle.d.ts.map +1 -0
- package/dist/agents/manager.d.ts +75 -0
- package/dist/agents/manager.d.ts.map +1 -0
- package/dist/agents/pi-binary.d.ts +7 -0
- package/dist/agents/pi-binary.d.ts.map +1 -0
- package/dist/agents/request.d.ts +13 -0
- package/dist/agents/request.d.ts.map +1 -0
- package/dist/agents/result.d.ts +8 -0
- package/dist/agents/result.d.ts.map +1 -0
- package/dist/agents/result.js +9 -0
- package/dist/agents/result.js.map +7 -0
- package/dist/agents/rm.d.ts +15 -0
- package/dist/agents/rm.d.ts.map +1 -0
- package/dist/agents/semaphore.d.ts +7 -0
- package/dist/agents/semaphore.d.ts.map +1 -0
- package/dist/agents/service-provider.d.ts +9 -0
- package/dist/agents/service-provider.d.ts.map +1 -0
- package/dist/agents/service-schema.d.ts +6 -0
- package/dist/agents/service-schema.d.ts.map +1 -0
- package/dist/agents/service-types.d.ts +192 -0
- package/dist/agents/service-types.d.ts.map +1 -0
- package/dist/agents/service.d.ts +36 -0
- package/dist/agents/service.d.ts.map +1 -0
- package/dist/agents/session-export.d.ts +39 -0
- package/dist/agents/session-export.d.ts.map +1 -0
- package/dist/agents/session-pins.d.ts +24 -0
- package/dist/agents/session-pins.d.ts.map +1 -0
- package/dist/agents/thinking-transfer.d.ts +39 -0
- package/dist/agents/thinking-transfer.d.ts.map +1 -0
- package/dist/agents/transports/herdr-transport.d.ts +10 -0
- package/dist/agents/transports/herdr-transport.d.ts.map +1 -0
- package/dist/agents/transports/localterm-transport.d.ts +7 -0
- package/dist/agents/transports/localterm-transport.d.ts.map +1 -0
- package/dist/agents/transports/process-transport.d.ts +7 -0
- package/dist/agents/transports/process-transport.d.ts.map +1 -0
- package/dist/agents/transports/process-utils.d.ts +33 -0
- package/dist/agents/transports/process-utils.d.ts.map +1 -0
- package/dist/agents/transports/screen-transport.d.ts +7 -0
- package/dist/agents/transports/screen-transport.d.ts.map +1 -0
- package/dist/agents/transports/tmux-transport.d.ts +7 -0
- package/dist/agents/transports/tmux-transport.d.ts.map +1 -0
- package/dist/agents/types.d.ts +280 -0
- package/dist/agents/types.d.ts.map +1 -0
- package/dist/agents/veda-cli.d.ts +22 -0
- package/dist/agents/veda-cli.d.ts.map +1 -0
- package/dist/agents/veda-cli.js +13 -0
- package/dist/agents/veda-cli.js.map +7 -0
- package/dist/agents/worktree-manager.d.ts +14 -0
- package/dist/agents/worktree-manager.d.ts.map +1 -0
- package/dist/agents/worktree-paths.d.ts +5 -0
- package/dist/agents/worktree-paths.d.ts.map +1 -0
- package/dist/agents.d.ts +8 -0
- package/dist/agents.d.ts.map +1 -0
- package/dist/agents.js +761 -0
- package/dist/agents.js.map +7 -0
- package/dist/async-settlement.d.ts +4 -0
- package/dist/async-settlement.d.ts.map +1 -0
- package/dist/audit/details.d.ts +86 -0
- package/dist/audit/details.d.ts.map +1 -0
- package/dist/audit/index.d.ts +4 -0
- package/dist/audit/index.d.ts.map +1 -0
- package/dist/audit/projection.d.ts +20 -0
- package/dist/audit/projection.d.ts.map +1 -0
- package/dist/audit/trace.d.ts +99 -0
- package/dist/audit/trace.d.ts.map +1 -0
- package/dist/capture/catalog.d.ts +30 -0
- package/dist/capture/catalog.d.ts.map +1 -0
- package/dist/capture/interceptor.d.ts +20 -0
- package/dist/capture/interceptor.d.ts.map +1 -0
- package/dist/capture/wrapper.d.ts +15 -0
- package/dist/capture/wrapper.d.ts.map +1 -0
- package/dist/chunks/chunk-2DMJ7MEI.js +1984 -0
- package/dist/chunks/chunk-2DMJ7MEI.js.map +7 -0
- package/dist/chunks/chunk-2PZWDVJB.js +738 -0
- package/dist/chunks/chunk-2PZWDVJB.js.map +7 -0
- package/dist/chunks/chunk-2UQV52II.js +440 -0
- package/dist/chunks/chunk-2UQV52II.js.map +7 -0
- package/dist/chunks/chunk-32BNQ75J.js +1445 -0
- package/dist/chunks/chunk-32BNQ75J.js.map +7 -0
- package/dist/chunks/chunk-3H7SDWZI.js +467 -0
- package/dist/chunks/chunk-3H7SDWZI.js.map +7 -0
- package/dist/chunks/chunk-3MEHEH6B.js +41 -0
- package/dist/chunks/chunk-3MEHEH6B.js.map +7 -0
- package/dist/chunks/chunk-3QECYQGA.js +70 -0
- package/dist/chunks/chunk-3QECYQGA.js.map +7 -0
- package/dist/chunks/chunk-3WIGAX56.js +644 -0
- package/dist/chunks/chunk-3WIGAX56.js.map +7 -0
- package/dist/chunks/chunk-3YZUQESG.js +16 -0
- package/dist/chunks/chunk-3YZUQESG.js.map +7 -0
- package/dist/chunks/chunk-4JETKRFE.js +287 -0
- package/dist/chunks/chunk-4JETKRFE.js.map +7 -0
- package/dist/chunks/chunk-4SSMGBF4.js +93 -0
- package/dist/chunks/chunk-4SSMGBF4.js.map +7 -0
- package/dist/chunks/chunk-5SU3YXBS.js +15 -0
- package/dist/chunks/chunk-5SU3YXBS.js.map +7 -0
- package/dist/chunks/chunk-656HWVFU.js +409 -0
- package/dist/chunks/chunk-656HWVFU.js.map +7 -0
- package/dist/chunks/chunk-7A6NVHB5.js +1242 -0
- package/dist/chunks/chunk-7A6NVHB5.js.map +7 -0
- package/dist/chunks/chunk-7TB7NXSL.js +58 -0
- package/dist/chunks/chunk-7TB7NXSL.js.map +7 -0
- package/dist/chunks/chunk-AAHHYDTO.js +24 -0
- package/dist/chunks/chunk-AAHHYDTO.js.map +7 -0
- package/dist/chunks/chunk-ARLYAW2A.js +95 -0
- package/dist/chunks/chunk-ARLYAW2A.js.map +7 -0
- package/dist/chunks/chunk-AYBIR4YV.js +210 -0
- package/dist/chunks/chunk-AYBIR4YV.js.map +7 -0
- package/dist/chunks/chunk-BOTRGFQQ.js +87 -0
- package/dist/chunks/chunk-BOTRGFQQ.js.map +7 -0
- package/dist/chunks/chunk-CGPK5WHX.js +96 -0
- package/dist/chunks/chunk-CGPK5WHX.js.map +7 -0
- package/dist/chunks/chunk-CI56CW53.js +470 -0
- package/dist/chunks/chunk-CI56CW53.js.map +7 -0
- package/dist/chunks/chunk-CPSW2GW4.js +1466 -0
- package/dist/chunks/chunk-CPSW2GW4.js.map +7 -0
- package/dist/chunks/chunk-CQFP2RCP.js +64 -0
- package/dist/chunks/chunk-CQFP2RCP.js.map +7 -0
- package/dist/chunks/chunk-D5WKZONW.js +797 -0
- package/dist/chunks/chunk-D5WKZONW.js.map +7 -0
- package/dist/chunks/chunk-DLXPTBPL.js +151 -0
- package/dist/chunks/chunk-DLXPTBPL.js.map +7 -0
- package/dist/chunks/chunk-G4LADAYY.js +287 -0
- package/dist/chunks/chunk-G4LADAYY.js.map +7 -0
- package/dist/chunks/chunk-GXNR6NRU.js +447 -0
- package/dist/chunks/chunk-GXNR6NRU.js.map +7 -0
- package/dist/chunks/chunk-IGVDD2HT.js +10 -0
- package/dist/chunks/chunk-IGVDD2HT.js.map +7 -0
- package/dist/chunks/chunk-J2HV2URQ.js +1125 -0
- package/dist/chunks/chunk-J2HV2URQ.js.map +7 -0
- package/dist/chunks/chunk-KAD7UWT2.js +99 -0
- package/dist/chunks/chunk-KAD7UWT2.js.map +7 -0
- package/dist/chunks/chunk-KYXZJNV6.js +227 -0
- package/dist/chunks/chunk-KYXZJNV6.js.map +7 -0
- package/dist/chunks/chunk-LMAVZN7J.js +8 -0
- package/dist/chunks/chunk-LMAVZN7J.js.map +7 -0
- package/dist/chunks/chunk-M3S7XITB.js +110 -0
- package/dist/chunks/chunk-M3S7XITB.js.map +7 -0
- package/dist/chunks/chunk-MGDLRV2R.js +112 -0
- package/dist/chunks/chunk-MGDLRV2R.js.map +7 -0
- package/dist/chunks/chunk-MGWQOKBV.js +30 -0
- package/dist/chunks/chunk-MGWQOKBV.js.map +7 -0
- package/dist/chunks/chunk-N5GUXC6F.js +184 -0
- package/dist/chunks/chunk-N5GUXC6F.js.map +7 -0
- package/dist/chunks/chunk-NQOEHX62.js +215 -0
- package/dist/chunks/chunk-NQOEHX62.js.map +7 -0
- package/dist/chunks/chunk-OKOHRXGF.js +100 -0
- package/dist/chunks/chunk-OKOHRXGF.js.map +7 -0
- package/dist/chunks/chunk-OP2KTYQB.js +286 -0
- package/dist/chunks/chunk-OP2KTYQB.js.map +7 -0
- package/dist/chunks/chunk-OTCASLY2.js +52 -0
- package/dist/chunks/chunk-OTCASLY2.js.map +7 -0
- package/dist/chunks/chunk-PAN6C3JM.js +42 -0
- package/dist/chunks/chunk-PAN6C3JM.js.map +7 -0
- package/dist/chunks/chunk-PH7ZJ27F.js +6873 -0
- package/dist/chunks/chunk-PH7ZJ27F.js.map +7 -0
- package/dist/chunks/chunk-PM5I335G.js +225 -0
- package/dist/chunks/chunk-PM5I335G.js.map +7 -0
- package/dist/chunks/chunk-PSNXUZMY.js +218 -0
- package/dist/chunks/chunk-PSNXUZMY.js.map +7 -0
- package/dist/chunks/chunk-PXAICAUT.js +24 -0
- package/dist/chunks/chunk-PXAICAUT.js.map +7 -0
- package/dist/chunks/chunk-RERA6YWA.js +359 -0
- package/dist/chunks/chunk-RERA6YWA.js.map +7 -0
- package/dist/chunks/chunk-RNOPHITP.js +1720 -0
- package/dist/chunks/chunk-RNOPHITP.js.map +7 -0
- package/dist/chunks/chunk-RRGTKHXZ.js +931 -0
- package/dist/chunks/chunk-RRGTKHXZ.js.map +7 -0
- package/dist/chunks/chunk-SWB2OHYW.js +93 -0
- package/dist/chunks/chunk-SWB2OHYW.js.map +7 -0
- package/dist/chunks/chunk-T3A5GNCW.js +19 -0
- package/dist/chunks/chunk-T3A5GNCW.js.map +7 -0
- package/dist/chunks/chunk-TPLMVELH.js +118 -0
- package/dist/chunks/chunk-TPLMVELH.js.map +7 -0
- package/dist/chunks/chunk-TSRKCXNI.js +17 -0
- package/dist/chunks/chunk-TSRKCXNI.js.map +7 -0
- package/dist/chunks/chunk-U5FYOMG5.js +119 -0
- package/dist/chunks/chunk-U5FYOMG5.js.map +7 -0
- package/dist/chunks/chunk-U6CTHPZC.js +1924 -0
- package/dist/chunks/chunk-U6CTHPZC.js.map +7 -0
- package/dist/chunks/chunk-UDFDF7IY.js +1572 -0
- package/dist/chunks/chunk-UDFDF7IY.js.map +7 -0
- package/dist/chunks/chunk-UKMQK5VP.js +231 -0
- package/dist/chunks/chunk-UKMQK5VP.js.map +7 -0
- package/dist/chunks/chunk-UQ4LTUH4.js +2181 -0
- package/dist/chunks/chunk-UQ4LTUH4.js.map +7 -0
- package/dist/chunks/chunk-UTR3I23Z.js +65 -0
- package/dist/chunks/chunk-UTR3I23Z.js.map +7 -0
- package/dist/chunks/chunk-VPPIJRNZ.js +50 -0
- package/dist/chunks/chunk-VPPIJRNZ.js.map +7 -0
- package/dist/chunks/chunk-VRYEGVHR.js +195 -0
- package/dist/chunks/chunk-VRYEGVHR.js.map +7 -0
- package/dist/chunks/chunk-VRZNFNPB.js +4218 -0
- package/dist/chunks/chunk-VRZNFNPB.js.map +7 -0
- package/dist/chunks/chunk-VXZZJ44D.js +295 -0
- package/dist/chunks/chunk-VXZZJ44D.js.map +7 -0
- package/dist/chunks/chunk-W3FRE4VI.js +297 -0
- package/dist/chunks/chunk-W3FRE4VI.js.map +7 -0
- package/dist/chunks/chunk-WVH324VF.js +60 -0
- package/dist/chunks/chunk-WVH324VF.js.map +7 -0
- package/dist/chunks/chunk-X7G62ZGH.js +151 -0
- package/dist/chunks/chunk-X7G62ZGH.js.map +7 -0
- package/dist/chunks/chunk-XB3RJVT4.js +17 -0
- package/dist/chunks/chunk-XB3RJVT4.js.map +7 -0
- package/dist/chunks/chunk-XT4346N7.js +651 -0
- package/dist/chunks/chunk-XT4346N7.js.map +7 -0
- package/dist/chunks/chunk-Y7KNRAFL.js +1180 -0
- package/dist/chunks/chunk-Y7KNRAFL.js.map +7 -0
- package/dist/chunks/chunk-YK5AZ7CZ.js +692 -0
- package/dist/chunks/chunk-YK5AZ7CZ.js.map +7 -0
- package/dist/chunks/chunk-YU4O6SWQ.js +246 -0
- package/dist/chunks/chunk-YU4O6SWQ.js.map +7 -0
- package/dist/chunks/chunk-YU62DDKK.js +22 -0
- package/dist/chunks/chunk-YU62DDKK.js.map +7 -0
- package/dist/chunks/chunk-Z63R5GVN.js +121 -0
- package/dist/chunks/chunk-Z63R5GVN.js.map +7 -0
- package/dist/chunks/chunk-ZDNGXLEC.js +221 -0
- package/dist/chunks/chunk-ZDNGXLEC.js.map +7 -0
- package/dist/chunks/chunk-ZZ4LHQYJ.js +777 -0
- package/dist/chunks/chunk-ZZ4LHQYJ.js.map +7 -0
- package/dist/commands/fabric.d.ts +17 -0
- package/dist/commands/fabric.d.ts.map +1 -0
- package/dist/compaction/bounds.d.ts +23 -0
- package/dist/compaction/bounds.d.ts.map +1 -0
- package/dist/compaction/branch-details.d.ts +83 -0
- package/dist/compaction/branch-details.d.ts.map +1 -0
- package/dist/compaction/branch-summary.d.ts +9 -0
- package/dist/compaction/branch-summary.d.ts.map +1 -0
- package/dist/compaction/enrichers.d.ts +10 -0
- package/dist/compaction/enrichers.d.ts.map +1 -0
- package/dist/compaction/hook.d.ts +99 -0
- package/dist/compaction/hook.d.ts.map +1 -0
- package/dist/compaction/hook.js +22 -0
- package/dist/compaction/hook.js.map +7 -0
- package/dist/compaction/instructions.d.ts +38 -0
- package/dist/compaction/instructions.d.ts.map +1 -0
- package/dist/compaction/normalize.d.ts +83 -0
- package/dist/compaction/normalize.d.ts.map +1 -0
- package/dist/compaction/projections.d.ts +31 -0
- package/dist/compaction/projections.d.ts.map +1 -0
- package/dist/compaction/qa.d.ts +27 -0
- package/dist/compaction/qa.d.ts.map +1 -0
- package/dist/compaction/render.d.ts +10 -0
- package/dist/compaction/render.d.ts.map +1 -0
- package/dist/compaction/threshold.d.ts +5 -0
- package/dist/compaction/threshold.d.ts.map +1 -0
- package/dist/compaction/trace-events.d.ts +23 -0
- package/dist/compaction/trace-events.d.ts.map +1 -0
- package/dist/components/catalog.d.ts +25 -0
- package/dist/components/catalog.d.ts.map +1 -0
- package/dist/components/effect-policy.d.ts +21 -0
- package/dist/components/effect-policy.d.ts.map +1 -0
- package/dist/components/effect-scope.d.ts +31 -0
- package/dist/components/effect-scope.d.ts.map +1 -0
- package/dist/components/loader.d.ts +27 -0
- package/dist/components/loader.d.ts.map +1 -0
- package/dist/components/model-guidance.d.ts +48 -0
- package/dist/components/model-guidance.d.ts.map +1 -0
- package/dist/components/provider-component.d.ts +31 -0
- package/dist/components/provider-component.d.ts.map +1 -0
- package/dist/components/supervisor.d.ts +29 -0
- package/dist/components/supervisor.d.ts.map +1 -0
- package/dist/components/types.d.ts +140 -0
- package/dist/components/types.d.ts.map +1 -0
- package/dist/config-migrations.d.ts +11 -0
- package/dist/config-migrations.d.ts.map +1 -0
- package/dist/config.d.ts +282 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/core/action-arguments.d.ts +12 -0
- package/dist/core/action-arguments.d.ts.map +1 -0
- package/dist/core/action-registry.d.ts +170 -0
- package/dist/core/action-registry.d.ts.map +1 -0
- package/dist/core/action-registry.js +20 -0
- package/dist/core/action-registry.js.map +7 -0
- package/dist/core/action-repair.d.ts +15 -0
- package/dist/core/action-repair.d.ts.map +1 -0
- package/dist/core/action-result.d.ts +13 -0
- package/dist/core/action-result.d.ts.map +1 -0
- package/dist/core/agent-dir.d.ts +2 -0
- package/dist/core/agent-dir.d.ts.map +1 -0
- package/dist/core/approval-controller.d.ts +31 -0
- package/dist/core/approval-controller.d.ts.map +1 -0
- package/dist/core/atomic-write.d.ts +15 -0
- package/dist/core/atomic-write.d.ts.map +1 -0
- package/dist/core/auto-approval-classifier.d.ts +17 -0
- package/dist/core/auto-approval-classifier.d.ts.map +1 -0
- package/dist/core/call-preview.d.ts +8 -0
- package/dist/core/call-preview.d.ts.map +1 -0
- package/dist/core/child-tool-allowlist.d.ts +3 -0
- package/dist/core/child-tool-allowlist.d.ts.map +1 -0
- package/dist/core/compact-controller.d.ts +42 -0
- package/dist/core/compact-controller.d.ts.map +1 -0
- package/dist/core/core-override-guidance.d.ts +7 -0
- package/dist/core/core-override-guidance.d.ts.map +1 -0
- package/dist/core/damaged-file.d.ts +6 -0
- package/dist/core/damaged-file.d.ts.map +1 -0
- package/dist/core/direct-tool-approval.d.ts +19 -0
- package/dist/core/direct-tool-approval.d.ts.map +1 -0
- package/dist/core/effect-conflict.d.ts +3 -0
- package/dist/core/effect-conflict.d.ts.map +1 -0
- package/dist/core/file-lock.d.ts +12 -0
- package/dist/core/file-lock.d.ts.map +1 -0
- package/dist/core/kernel-skills.d.ts +3 -0
- package/dist/core/kernel-skills.d.ts.map +1 -0
- package/dist/core/model-resolution.d.ts +62 -0
- package/dist/core/model-resolution.d.ts.map +1 -0
- package/dist/core/model-usage.d.ts +8 -0
- package/dist/core/model-usage.d.ts.map +1 -0
- package/dist/core/pi-arguments.d.ts +3 -0
- package/dist/core/pi-arguments.d.ts.map +1 -0
- package/dist/core/pi-bash-error.d.ts +9 -0
- package/dist/core/pi-bash-error.d.ts.map +1 -0
- package/dist/core/pi-tools.d.ts +9 -0
- package/dist/core/pi-tools.d.ts.map +1 -0
- package/dist/core/provider-bindings.d.ts +47 -0
- package/dist/core/provider-bindings.d.ts.map +1 -0
- package/dist/core/proxy-contract.d.ts +18 -0
- package/dist/core/proxy-contract.d.ts.map +1 -0
- package/dist/core/session-context.d.ts +14 -0
- package/dist/core/session-context.d.ts.map +1 -0
- package/dist/core/shell-jobs.d.ts +99 -0
- package/dist/core/shell-jobs.d.ts.map +1 -0
- package/dist/core/skill-block.d.ts +10 -0
- package/dist/core/skill-block.d.ts.map +1 -0
- package/dist/core/skill-dir.d.ts +4 -0
- package/dist/core/skill-dir.d.ts.map +1 -0
- package/dist/core/skill-prompt.d.ts +3 -0
- package/dist/core/skill-prompt.d.ts.map +1 -0
- package/dist/core/skill-references.d.ts +7 -0
- package/dist/core/skill-references.d.ts.map +1 -0
- package/dist/core/stable-hash.d.ts +3 -0
- package/dist/core/stable-hash.d.ts.map +1 -0
- package/dist/core/system-guidance.d.ts +13 -0
- package/dist/core/system-guidance.d.ts.map +1 -0
- package/dist/core/token-math.d.ts +16 -0
- package/dist/core/token-math.d.ts.map +1 -0
- package/dist/core/tool-ownership.d.ts +47 -0
- package/dist/core/tool-ownership.d.ts.map +1 -0
- package/dist/core/tool-result-proxy.d.ts +18 -0
- package/dist/core/tool-result-proxy.d.ts.map +1 -0
- package/dist/entropy/active.d.ts +9 -0
- package/dist/entropy/active.d.ts.map +1 -0
- package/dist/entropy/compiled-store.d.ts +16 -0
- package/dist/entropy/compiled-store.d.ts.map +1 -0
- package/dist/entropy/compiled-surface.d.ts +57 -0
- package/dist/entropy/compiled-surface.d.ts.map +1 -0
- package/dist/entropy/compiler.d.ts +27 -0
- package/dist/entropy/compiler.d.ts.map +1 -0
- package/dist/entropy/corpus.d.ts +22 -0
- package/dist/entropy/corpus.d.ts.map +1 -0
- package/dist/entropy/fingerprint.d.ts +9 -0
- package/dist/entropy/fingerprint.d.ts.map +1 -0
- package/dist/entropy/index.d.ts +16 -0
- package/dist/entropy/index.d.ts.map +1 -0
- package/dist/entropy/index.js +194 -0
- package/dist/entropy/index.js.map +7 -0
- package/dist/entropy/meter.d.ts +10 -0
- package/dist/entropy/meter.d.ts.map +1 -0
- package/dist/entropy/normal-form.d.ts +40 -0
- package/dist/entropy/normal-form.d.ts.map +1 -0
- package/dist/entropy/passes.d.ts +13 -0
- package/dist/entropy/passes.d.ts.map +1 -0
- package/dist/entropy/pool-store.d.ts +15 -0
- package/dist/entropy/pool-store.d.ts.map +1 -0
- package/dist/entropy/pool.d.ts +41 -0
- package/dist/entropy/pool.d.ts.map +1 -0
- package/dist/entropy/presentation.d.ts +12 -0
- package/dist/entropy/presentation.d.ts.map +1 -0
- package/dist/entropy/sessions.d.ts +47 -0
- package/dist/entropy/sessions.d.ts.map +1 -0
- package/dist/entropy/surface.d.ts +30 -0
- package/dist/entropy/surface.d.ts.map +1 -0
- package/dist/entropy/trial.d.ts +38 -0
- package/dist/entropy/trial.d.ts.map +1 -0
- package/dist/entropy/types.d.ts +181 -0
- package/dist/entropy/types.d.ts.map +1 -0
- package/dist/execution-service.d.ts +66 -0
- package/dist/execution-service.d.ts.map +1 -0
- package/dist/fabric-exec-arguments.d.ts +7 -0
- package/dist/fabric-exec-arguments.d.ts.map +1 -0
- package/dist/fabric-exec-tool.d.ts +8 -0
- package/dist/fabric-exec-tool.d.ts.map +1 -0
- package/dist/fabric-runtime-state.d.ts +96 -0
- package/dist/fabric-runtime-state.d.ts.map +1 -0
- package/dist/fabric-runtime-state.js +11928 -0
- package/dist/fabric-runtime-state.js.map +7 -0
- package/dist/fabric-state.d.ts +95 -0
- package/dist/fabric-state.d.ts.map +1 -0
- package/dist/failure-progress.d.ts +3 -0
- package/dist/failure-progress.d.ts.map +1 -0
- package/dist/host-compatibility.d.ts +5 -0
- package/dist/host-compatibility.d.ts.map +1 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +6094 -0
- package/dist/index.js.map +7 -0
- package/dist/jev/auth.d.ts +5 -0
- package/dist/jev/auth.d.ts.map +1 -0
- package/dist/jev/browser.d.ts +37 -0
- package/dist/jev/browser.d.ts.map +1 -0
- package/dist/jev/browser.js +13 -0
- package/dist/jev/browser.js.map +7 -0
- package/dist/jev/client.d.ts +29 -0
- package/dist/jev/client.d.ts.map +1 -0
- package/dist/jev/client.js +11 -0
- package/dist/jev/client.js.map +7 -0
- package/dist/jev/config.d.ts +17 -0
- package/dist/jev/config.d.ts.map +1 -0
- package/dist/jev/guest-types.d.ts +2 -0
- package/dist/jev/guest-types.d.ts.map +1 -0
- package/dist/jev/manager.d.ts +36 -0
- package/dist/jev/manager.d.ts.map +1 -0
- package/dist/jev/observation.d.ts +59 -0
- package/dist/jev/observation.d.ts.map +1 -0
- package/dist/jev/observation.js +20 -0
- package/dist/jev/observation.js.map +7 -0
- package/dist/jev/types.d.ts +142 -0
- package/dist/jev/types.d.ts.map +1 -0
- package/dist/jev/validation.d.ts +8 -0
- package/dist/jev/validation.d.ts.map +1 -0
- package/dist/jev.d.ts +9 -0
- package/dist/jev.d.ts.map +1 -0
- package/dist/jev.js +49 -0
- package/dist/jev.js.map +7 -0
- package/dist/lifecycle/broker.d.ts +30 -0
- package/dist/lifecycle/broker.d.ts.map +1 -0
- package/dist/lifecycle/delivery-scheduler.d.ts +30 -0
- package/dist/lifecycle/delivery-scheduler.d.ts.map +1 -0
- package/dist/lifecycle/types.d.ts +91 -0
- package/dist/lifecycle/types.d.ts.map +1 -0
- package/dist/log-tail.d.ts +11 -0
- package/dist/log-tail.d.ts.map +1 -0
- package/dist/main-agent.d.ts +70 -0
- package/dist/main-agent.d.ts.map +1 -0
- package/dist/managed-host.d.ts +22 -0
- package/dist/managed-host.d.ts.map +1 -0
- package/dist/mcp.d.ts +9 -0
- package/dist/mcp.d.ts.map +1 -0
- package/dist/mcp.js +21 -0
- package/dist/mcp.js.map +7 -0
- package/dist/memory/client.d.ts +31 -0
- package/dist/memory/client.d.ts.map +1 -0
- package/dist/memory/context.d.ts +114 -0
- package/dist/memory/context.d.ts.map +1 -0
- package/dist/memory/digest.d.ts +48 -0
- package/dist/memory/digest.d.ts.map +1 -0
- package/dist/memory/digest.js +7 -0
- package/dist/memory/digest.js.map +7 -0
- package/dist/memory/discovery.d.ts +43 -0
- package/dist/memory/discovery.d.ts.map +1 -0
- package/dist/memory/discovery.js +25 -0
- package/dist/memory/discovery.js.map +7 -0
- package/dist/memory/expand-service.d.ts +4 -0
- package/dist/memory/expand-service.d.ts.map +1 -0
- package/dist/memory/host-source.d.ts +60 -0
- package/dist/memory/host-source.d.ts.map +1 -0
- package/dist/memory/index.d.ts +113 -0
- package/dist/memory/index.d.ts.map +1 -0
- package/dist/memory/lineage.d.ts +25 -0
- package/dist/memory/lineage.d.ts.map +1 -0
- package/dist/memory/normalize.d.ts +188 -0
- package/dist/memory/normalize.d.ts.map +1 -0
- package/dist/memory/normalize.js +26 -0
- package/dist/memory/normalize.js.map +7 -0
- package/dist/memory/portable.d.ts +66 -0
- package/dist/memory/portable.d.ts.map +1 -0
- package/dist/memory/provider.d.ts +15 -0
- package/dist/memory/provider.d.ts.map +1 -0
- package/dist/memory/recall-service.d.ts +5 -0
- package/dist/memory/recall-service.d.ts.map +1 -0
- package/dist/memory/regex.d.ts +19 -0
- package/dist/memory/regex.d.ts.map +1 -0
- package/dist/memory/request-cache.d.ts +49 -0
- package/dist/memory/request-cache.d.ts.map +1 -0
- package/dist/memory/request-context.d.ts +57 -0
- package/dist/memory/request-context.d.ts.map +1 -0
- package/dist/memory/request-limits.d.ts +8 -0
- package/dist/memory/request-limits.d.ts.map +1 -0
- package/dist/memory/search.d.ts +98 -0
- package/dist/memory/search.d.ts.map +1 -0
- package/dist/memory/search.js +24 -0
- package/dist/memory/search.js.map +7 -0
- package/dist/memory/sessions-service.d.ts +3 -0
- package/dist/memory/sessions-service.d.ts.map +1 -0
- package/dist/memory/source-observation.d.ts +28 -0
- package/dist/memory/source-observation.d.ts.map +1 -0
- package/dist/memory/tokenize.d.ts +24 -0
- package/dist/memory/tokenize.d.ts.map +1 -0
- package/dist/memory.d.ts +8 -0
- package/dist/memory.d.ts.map +1 -0
- package/dist/memory.js +119 -0
- package/dist/memory.js.map +7 -0
- package/dist/mesh/store.d.ts +78 -0
- package/dist/mesh/store.d.ts.map +1 -0
- package/dist/output-budget.d.ts +12 -0
- package/dist/output-budget.d.ts.map +1 -0
- package/dist/prewalk/arm.d.ts +8 -0
- package/dist/prewalk/arm.d.ts.map +1 -0
- package/dist/prewalk/controller.d.ts +66 -0
- package/dist/prewalk/controller.d.ts.map +1 -0
- package/dist/prewalk/fs-drift.d.ts +19 -0
- package/dist/prewalk/fs-drift.d.ts.map +1 -0
- package/dist/prewalk/handoff.d.ts +46 -0
- package/dist/prewalk/handoff.d.ts.map +1 -0
- package/dist/protocol.d.ts +275 -0
- package/dist/protocol.d.ts.map +1 -0
- package/dist/protocol.js +46 -0
- package/dist/protocol.js.map +7 -0
- package/dist/providers/agents-actions.d.ts +3 -0
- package/dist/providers/agents-actions.d.ts.map +1 -0
- package/dist/providers/agents-message-router.d.ts +29 -0
- package/dist/providers/agents-message-router.d.ts.map +1 -0
- package/dist/providers/agents-progress.d.ts +18 -0
- package/dist/providers/agents-progress.d.ts.map +1 -0
- package/dist/providers/agents-provider.d.ts +51 -0
- package/dist/providers/agents-provider.d.ts.map +1 -0
- package/dist/providers/arg-normalization.d.ts +15 -0
- package/dist/providers/arg-normalization.d.ts.map +1 -0
- package/dist/providers/captured-tools-provider.d.ts +23 -0
- package/dist/providers/captured-tools-provider.d.ts.map +1 -0
- package/dist/providers/compact-provider.d.ts +14 -0
- package/dist/providers/compact-provider.d.ts.map +1 -0
- package/dist/providers/components-provider.d.ts +12 -0
- package/dist/providers/components-provider.d.ts.map +1 -0
- package/dist/providers/jev-provider.d.ts +70 -0
- package/dist/providers/jev-provider.d.ts.map +1 -0
- package/dist/providers/jev-provider.js +28 -0
- package/dist/providers/jev-provider.js.map +7 -0
- package/dist/providers/mcp-descriptor-cache.d.ts +47 -0
- package/dist/providers/mcp-descriptor-cache.d.ts.map +1 -0
- package/dist/providers/mcp-provider.d.ts +47 -0
- package/dist/providers/mcp-provider.d.ts.map +1 -0
- package/dist/providers/memory-provider.d.ts +32 -0
- package/dist/providers/memory-provider.d.ts.map +1 -0
- package/dist/providers/memory-provider.js +23 -0
- package/dist/providers/memory-provider.js.map +7 -0
- package/dist/providers/mesh-provider.d.ts +17 -0
- package/dist/providers/mesh-provider.d.ts.map +1 -0
- package/dist/providers/pi-bash-cwd.d.ts +49 -0
- package/dist/providers/pi-bash-cwd.d.ts.map +1 -0
- package/dist/providers/pi-tools-provider.d.ts +25 -0
- package/dist/providers/pi-tools-provider.d.ts.map +1 -0
- package/dist/providers/schema-provider.d.ts +15 -0
- package/dist/providers/schema-provider.d.ts.map +1 -0
- package/dist/providers/state-provider.d.ts +16 -0
- package/dist/providers/state-provider.d.ts.map +1 -0
- package/dist/providers/write-diff-limits.d.ts +5 -0
- package/dist/providers/write-diff-limits.d.ts.map +1 -0
- package/dist/providers/write-preview.d.ts +3 -0
- package/dist/providers/write-preview.d.ts.map +1 -0
- package/dist/ref-names.d.ts +2 -0
- package/dist/ref-names.d.ts.map +1 -0
- package/dist/repairs/active.d.ts +7 -0
- package/dist/repairs/active.d.ts.map +1 -0
- package/dist/repairs/apply.d.ts +7 -0
- package/dist/repairs/apply.d.ts.map +1 -0
- package/dist/repairs/catalog-digest.d.ts +5 -0
- package/dist/repairs/catalog-digest.d.ts.map +1 -0
- package/dist/repairs/classify.d.ts +10 -0
- package/dist/repairs/classify.d.ts.map +1 -0
- package/dist/repairs/compiler.d.ts +33 -0
- package/dist/repairs/compiler.d.ts.map +1 -0
- package/dist/repairs/promote.d.ts +4 -0
- package/dist/repairs/promote.d.ts.map +1 -0
- package/dist/repairs/store.d.ts +10 -0
- package/dist/repairs/store.d.ts.map +1 -0
- package/dist/repairs/types.d.ts +49 -0
- package/dist/repairs/types.d.ts.map +1 -0
- package/dist/repeat-guard.d.ts +25 -0
- package/dist/repeat-guard.d.ts.map +1 -0
- package/dist/residency/actor-client.d.ts +16 -0
- package/dist/residency/actor-client.d.ts.map +1 -0
- package/dist/residency/actor-client.js +9 -0
- package/dist/residency/actor-client.js.map +7 -0
- package/dist/residency/client.d.ts +44 -0
- package/dist/residency/client.d.ts.map +1 -0
- package/dist/residency/host.d.ts +3 -0
- package/dist/residency/host.d.ts.map +1 -0
- package/dist/residency/host.js +32 -0
- package/dist/residency/host.js.map +7 -0
- package/dist/residency/launcher-owner.d.ts +7 -0
- package/dist/residency/launcher-owner.d.ts.map +1 -0
- package/dist/residency/launcher.d.ts +3 -0
- package/dist/residency/launcher.d.ts.map +1 -0
- package/dist/residency/launcher.js +154 -0
- package/dist/residency/launcher.js.map +7 -0
- package/dist/residency/pi-entry.d.ts +3 -0
- package/dist/residency/pi-entry.d.ts.map +1 -0
- package/dist/residency/pi-entry.js +48 -0
- package/dist/residency/pi-entry.js.map +7 -0
- package/dist/residency/protocol.d.ts +122 -0
- package/dist/residency/protocol.d.ts.map +1 -0
- package/dist/run-display.d.ts +3 -0
- package/dist/run-display.d.ts.map +1 -0
- package/dist/runtime/core-override-guest-types.d.ts +15 -0
- package/dist/runtime/core-override-guest-types.d.ts.map +1 -0
- package/dist/runtime/core-override-guest-types.js +9 -0
- package/dist/runtime/core-override-guest-types.js.map +7 -0
- package/dist/runtime/core-tool-properties.d.ts +6 -0
- package/dist/runtime/core-tool-properties.d.ts.map +1 -0
- package/dist/runtime/cpython-child-source.d.ts +2 -0
- package/dist/runtime/cpython-child-source.d.ts.map +1 -0
- package/dist/runtime/cpython-linux-sandbox.d.ts +2 -0
- package/dist/runtime/cpython-linux-sandbox.d.ts.map +1 -0
- package/dist/runtime/cpython-runtime.d.ts +9 -0
- package/dist/runtime/cpython-runtime.d.ts.map +1 -0
- package/dist/runtime/cpython-runtime.js +677 -0
- package/dist/runtime/cpython-runtime.js.map +7 -0
- package/dist/runtime/dynamic-guest-types.d.ts +3 -0
- package/dist/runtime/dynamic-guest-types.d.ts.map +1 -0
- package/dist/runtime/dynamic-guest-types.js +8 -0
- package/dist/runtime/dynamic-guest-types.js.map +7 -0
- package/dist/runtime/guest-code-repair.d.ts +2 -0
- package/dist/runtime/guest-code-repair.d.ts.map +1 -0
- package/dist/runtime/guest-stack-map.d.ts +11 -0
- package/dist/runtime/guest-stack-map.d.ts.map +1 -0
- package/dist/runtime/guest-types.d.ts +40 -0
- package/dist/runtime/guest-types.d.ts.map +1 -0
- package/dist/runtime/guest-types.js +13 -0
- package/dist/runtime/guest-types.js.map +7 -0
- package/dist/runtime/kernel.d.ts +30 -0
- package/dist/runtime/kernel.d.ts.map +1 -0
- package/dist/runtime/monty-bridge.d.ts +4 -0
- package/dist/runtime/monty-bridge.d.ts.map +1 -0
- package/dist/runtime/monty-runtime.d.ts +6 -0
- package/dist/runtime/monty-runtime.d.ts.map +1 -0
- package/dist/runtime/monty-runtime.js +485 -0
- package/dist/runtime/monty-runtime.js.map +7 -0
- package/dist/runtime/monty-source.d.ts +10 -0
- package/dist/runtime/monty-source.d.ts.map +1 -0
- package/dist/runtime/monty-values.d.ts +7 -0
- package/dist/runtime/monty-values.d.ts.map +1 -0
- package/dist/runtime/node-process-child-source.d.ts +2 -0
- package/dist/runtime/node-process-child-source.d.ts.map +1 -0
- package/dist/runtime/node-process-runtime.d.ts +10 -0
- package/dist/runtime/node-process-runtime.d.ts.map +1 -0
- package/dist/runtime/node-process-runtime.js +16 -0
- package/dist/runtime/node-process-runtime.js.map +7 -0
- package/dist/runtime/orchestration.d.ts +3 -0
- package/dist/runtime/orchestration.d.ts.map +1 -0
- package/dist/runtime/python-arguments.d.ts +2 -0
- package/dist/runtime/python-arguments.d.ts.map +1 -0
- package/dist/runtime/python-error-guidance.d.ts +6 -0
- package/dist/runtime/python-error-guidance.d.ts.map +1 -0
- package/dist/runtime/quickjs-runtime.d.ts +8 -0
- package/dist/runtime/quickjs-runtime.d.ts.map +1 -0
- package/dist/runtime/quickjs-runtime.js +15 -0
- package/dist/runtime/quickjs-runtime.js.map +7 -0
- package/dist/runtime/type-checker.d.ts +18 -0
- package/dist/runtime/type-checker.d.ts.map +1 -0
- package/dist/runtime/type-checker.js +11 -0
- package/dist/runtime/type-checker.js.map +7 -0
- package/dist/runtime/typescript-kernel.d.ts +14 -0
- package/dist/runtime/typescript-kernel.d.ts.map +1 -0
- package/dist/runtime/typescript-kernel.js +53 -0
- package/dist/runtime/typescript-kernel.js.map +7 -0
- package/dist/runtime-paths.d.ts +7 -0
- package/dist/runtime-paths.d.ts.map +1 -0
- package/dist/runtime-state-builtins.d.ts +26 -0
- package/dist/runtime-state-builtins.d.ts.map +1 -0
- package/dist/runtime-state-speculation.d.ts +16 -0
- package/dist/runtime-state-speculation.d.ts.map +1 -0
- package/dist/schema/controller.d.ts +35 -0
- package/dist/schema/controller.d.ts.map +1 -0
- package/dist/schema/policy.d.ts +2 -0
- package/dist/schema/policy.d.ts.map +1 -0
- package/dist/schema/types.d.ts +86 -0
- package/dist/schema/types.d.ts.map +1 -0
- package/dist/schema/workspace.d.ts +19 -0
- package/dist/schema/workspace.d.ts.map +1 -0
- package/dist/speculation/eligibility.d.ts +22 -0
- package/dist/speculation/eligibility.d.ts.map +1 -0
- package/dist/speculation/freshness.d.ts +10 -0
- package/dist/speculation/freshness.d.ts.map +1 -0
- package/dist/speculation/partial-json.d.ts +9 -0
- package/dist/speculation/partial-json.d.ts.map +1 -0
- package/dist/speculation/python-scanner.d.ts +7 -0
- package/dist/speculation/python-scanner.d.ts.map +1 -0
- package/dist/speculation/python-scanner.js +166 -0
- package/dist/speculation/python-scanner.js.map +7 -0
- package/dist/speculation/scanner.d.ts +13 -0
- package/dist/speculation/scanner.d.ts.map +1 -0
- package/dist/speculation/scanner.js +182 -0
- package/dist/speculation/scanner.js.map +7 -0
- package/dist/speculation/store.d.ts +41 -0
- package/dist/speculation/store.d.ts.map +1 -0
- package/dist/speculation/stream-tap.d.ts +30 -0
- package/dist/speculation/stream-tap.d.ts.map +1 -0
- package/dist/speculation/types.d.ts +44 -0
- package/dist/speculation/types.d.ts.map +1 -0
- package/dist/state/complexity.d.ts +13 -0
- package/dist/state/complexity.d.ts.map +1 -0
- package/dist/state/evidence-runner.d.ts +17 -0
- package/dist/state/evidence-runner.d.ts.map +1 -0
- package/dist/state/store.d.ts +76 -0
- package/dist/state/store.d.ts.map +1 -0
- package/dist/state/types.d.ts +165 -0
- package/dist/state/types.d.ts.map +1 -0
- package/dist/storage/retention.d.ts +22 -0
- package/dist/storage/retention.d.ts.map +1 -0
- package/dist/thinking.d.ts +19 -0
- package/dist/thinking.d.ts.map +1 -0
- package/dist/topology/control-plane.d.ts +58 -0
- package/dist/topology/control-plane.d.ts.map +1 -0
- package/dist/topology/participant-directory.d.ts +33 -0
- package/dist/topology/participant-directory.d.ts.map +1 -0
- package/dist/topology/peer-settle.d.ts +51 -0
- package/dist/topology/peer-settle.d.ts.map +1 -0
- package/dist/topology/records.d.ts +6 -0
- package/dist/topology/records.d.ts.map +1 -0
- package/dist/topology/types.d.ts +89 -0
- package/dist/topology/types.d.ts.map +1 -0
- package/dist/type-error-guidance.d.ts +3 -0
- package/dist/type-error-guidance.d.ts.map +1 -0
- package/dist/ui/arc-group.d.ts +17 -0
- package/dist/ui/arc-group.d.ts.map +1 -0
- package/dist/ui/border-status-editor.d.ts +22 -0
- package/dist/ui/border-status-editor.d.ts.map +1 -0
- package/dist/ui/code-preview-shell.d.ts +11 -0
- package/dist/ui/code-preview-shell.d.ts.map +1 -0
- package/dist/ui/code-preview.d.ts +53 -0
- package/dist/ui/code-preview.d.ts.map +1 -0
- package/dist/ui/controller.d.ts +20 -0
- package/dist/ui/controller.d.ts.map +1 -0
- package/dist/ui/conversation-chrome.d.ts +16 -0
- package/dist/ui/conversation-chrome.d.ts.map +1 -0
- package/dist/ui/conversation-chrome.js +11 -0
- package/dist/ui/conversation-chrome.js.map +7 -0
- package/dist/ui/conversation-commands.d.ts +12 -0
- package/dist/ui/conversation-commands.d.ts.map +1 -0
- package/dist/ui/conversation-history.d.ts +6 -0
- package/dist/ui/conversation-history.d.ts.map +1 -0
- package/dist/ui/conversation-host.d.ts +7 -0
- package/dist/ui/conversation-host.d.ts.map +1 -0
- package/dist/ui/conversation-host.js +9 -0
- package/dist/ui/conversation-host.js.map +7 -0
- package/dist/ui/conversation-native-reader-checkpoint.d.ts +8 -0
- package/dist/ui/conversation-native-reader-checkpoint.d.ts.map +1 -0
- package/dist/ui/conversation-native-reader-replay.d.ts +10 -0
- package/dist/ui/conversation-native-reader-replay.d.ts.map +1 -0
- package/dist/ui/conversation-native-reader.d.ts +110 -0
- package/dist/ui/conversation-native-reader.d.ts.map +1 -0
- package/dist/ui/conversation-native-reader.js +1050 -0
- package/dist/ui/conversation-native-reader.js.map +7 -0
- package/dist/ui/conversation-queue-store.d.ts +14 -0
- package/dist/ui/conversation-queue-store.d.ts.map +1 -0
- package/dist/ui/conversation-queue.d.ts +244 -0
- package/dist/ui/conversation-queue.d.ts.map +1 -0
- package/dist/ui/conversation-render.d.ts +104 -0
- package/dist/ui/conversation-render.d.ts.map +1 -0
- package/dist/ui/conversation-selection.d.ts +18 -0
- package/dist/ui/conversation-selection.d.ts.map +1 -0
- package/dist/ui/conversation-shortcut.d.ts +3 -0
- package/dist/ui/conversation-shortcut.d.ts.map +1 -0
- package/dist/ui/conversation-targets.d.ts +7 -0
- package/dist/ui/conversation-targets.d.ts.map +1 -0
- package/dist/ui/conversation-targets.js +12 -0
- package/dist/ui/conversation-targets.js.map +7 -0
- package/dist/ui/conversation-transcript.d.ts +25 -0
- package/dist/ui/conversation-transcript.d.ts.map +1 -0
- package/dist/ui/conversation.d.ts +219 -0
- package/dist/ui/conversation.d.ts.map +1 -0
- package/dist/ui/conversation.js +2861 -0
- package/dist/ui/conversation.js.map +7 -0
- package/dist/ui/core-tool-render.d.ts +20 -0
- package/dist/ui/core-tool-render.d.ts.map +1 -0
- package/dist/ui/dashboard-detail.d.ts +68 -0
- package/dist/ui/dashboard-detail.d.ts.map +1 -0
- package/dist/ui/dashboard-fabric-graph.d.ts +50 -0
- package/dist/ui/dashboard-fabric-graph.d.ts.map +1 -0
- package/dist/ui/dashboard-graph-controller.d.ts +52 -0
- package/dist/ui/dashboard-graph-controller.d.ts.map +1 -0
- package/dist/ui/dashboard-modal-controller.d.ts +36 -0
- package/dist/ui/dashboard-modal-controller.d.ts.map +1 -0
- package/dist/ui/dashboard-model.d.ts +111 -0
- package/dist/ui/dashboard-model.d.ts.map +1 -0
- package/dist/ui/dashboard-presentation.d.ts +6 -0
- package/dist/ui/dashboard-presentation.d.ts.map +1 -0
- package/dist/ui/dashboard.d.ts +156 -0
- package/dist/ui/dashboard.d.ts.map +1 -0
- package/dist/ui/dashboard.js +4622 -0
- package/dist/ui/dashboard.js.map +7 -0
- package/dist/ui/diff-background.d.ts +12 -0
- package/dist/ui/diff-background.d.ts.map +1 -0
- package/dist/ui/dynamic-border.d.ts +8 -0
- package/dist/ui/dynamic-border.d.ts.map +1 -0
- package/dist/ui/escape-halt.d.ts +11 -0
- package/dist/ui/escape-halt.d.ts.map +1 -0
- package/dist/ui/fabric-actor-delivery-selector.d.ts +17 -0
- package/dist/ui/fabric-actor-delivery-selector.d.ts.map +1 -0
- package/dist/ui/fabric-actor-tool-selector.d.ts +22 -0
- package/dist/ui/fabric-actor-tool-selector.d.ts.map +1 -0
- package/dist/ui/fabric-code-parser.d.ts +9 -0
- package/dist/ui/fabric-code-parser.d.ts.map +1 -0
- package/dist/ui/fabric-host-event-selector.d.ts +29 -0
- package/dist/ui/fabric-host-event-selector.d.ts.map +1 -0
- package/dist/ui/fabric-model-selector.d.ts +64 -0
- package/dist/ui/fabric-model-selector.d.ts.map +1 -0
- package/dist/ui/fabric-render.d.ts +113 -0
- package/dist/ui/fabric-render.d.ts.map +1 -0
- package/dist/ui/fabric-thinking-selector.d.ts +26 -0
- package/dist/ui/fabric-thinking-selector.d.ts.map +1 -0
- package/dist/ui/fabric-title-hint.d.ts +3 -0
- package/dist/ui/fabric-title-hint.d.ts.map +1 -0
- package/dist/ui/format.d.ts +9 -0
- package/dist/ui/format.d.ts.map +1 -0
- package/dist/ui/handoff-completion.d.ts +3 -0
- package/dist/ui/handoff-completion.d.ts.map +1 -0
- package/dist/ui/highlight.d.ts +69 -0
- package/dist/ui/highlight.d.ts.map +1 -0
- package/dist/ui/model-picker.d.ts +46 -0
- package/dist/ui/model-picker.d.ts.map +1 -0
- package/dist/ui/model-picker.js +17 -0
- package/dist/ui/model-picker.js.map +7 -0
- package/dist/ui/preview-lines.d.ts +16 -0
- package/dist/ui/preview-lines.d.ts.map +1 -0
- package/dist/ui/row-balance.d.ts +29 -0
- package/dist/ui/row-balance.d.ts.map +1 -0
- package/dist/ui/settings-component.d.ts +26 -0
- package/dist/ui/settings-component.d.ts.map +1 -0
- package/dist/ui/settings-rpc.d.ts +15 -0
- package/dist/ui/settings-rpc.d.ts.map +1 -0
- package/dist/ui/settings-section-context.d.ts +18 -0
- package/dist/ui/settings-section-context.d.ts.map +1 -0
- package/dist/ui/settings-sections-agents.d.ts +5 -0
- package/dist/ui/settings-sections-agents.d.ts.map +1 -0
- package/dist/ui/settings-sections-execution.d.ts +8 -0
- package/dist/ui/settings-sections-execution.d.ts.map +1 -0
- package/dist/ui/settings-sections-lifecycle.d.ts +6 -0
- package/dist/ui/settings-sections-lifecycle.d.ts.map +1 -0
- package/dist/ui/settings-sections-presentation.d.ts +6 -0
- package/dist/ui/settings-sections-presentation.d.ts.map +1 -0
- package/dist/ui/settings-sections.d.ts +12 -0
- package/dist/ui/settings-sections.d.ts.map +1 -0
- package/dist/ui/settings-submenus.d.ts +74 -0
- package/dist/ui/settings-submenus.d.ts.map +1 -0
- package/dist/ui/settings-values.d.ts +63 -0
- package/dist/ui/settings-values.d.ts.map +1 -0
- package/dist/ui/settings.d.ts +21 -0
- package/dist/ui/settings.d.ts.map +1 -0
- package/dist/ui/settings.js +1985 -0
- package/dist/ui/settings.js.map +7 -0
- package/dist/ui/shell-hang-keys.d.ts +11 -0
- package/dist/ui/shell-hang-keys.d.ts.map +1 -0
- package/dist/ui/shiki-language.d.ts +7 -0
- package/dist/ui/shiki-language.d.ts.map +1 -0
- package/dist/ui/shiki-theme.d.ts +7 -0
- package/dist/ui/shiki-theme.d.ts.map +1 -0
- package/dist/ui/snapshot.d.ts +17 -0
- package/dist/ui/snapshot.d.ts.map +1 -0
- package/dist/ui/spinner.d.ts +6 -0
- package/dist/ui/spinner.d.ts.map +1 -0
- package/dist/ui/state-file-preview.d.ts +13 -0
- package/dist/ui/state-file-preview.d.ts.map +1 -0
- package/dist/ui/structured.d.ts +9 -0
- package/dist/ui/structured.d.ts.map +1 -0
- package/dist/ui/tool-call-timing.d.ts +2 -0
- package/dist/ui/tool-call-timing.d.ts.map +1 -0
- package/dist/ui/tool-display.d.ts +8 -0
- package/dist/ui/tool-display.d.ts.map +1 -0
- package/dist/ui/topology.d.ts +162 -0
- package/dist/ui/topology.d.ts.map +1 -0
- package/dist/ui/transcript-parser.d.ts +18 -0
- package/dist/ui/transcript-parser.d.ts.map +1 -0
- package/dist/ui/transcript-reader.d.ts +10 -0
- package/dist/ui/transcript-reader.d.ts.map +1 -0
- package/dist/ui/transcript-sanitization.d.ts +14 -0
- package/dist/ui/transcript-sanitization.d.ts.map +1 -0
- package/dist/ui/transcript.d.ts +52 -0
- package/dist/ui/transcript.d.ts.map +1 -0
- package/dist/ui/types.d.ts +84 -0
- package/dist/ui/types.d.ts.map +1 -0
- package/dist/ui/widget.d.ts +16 -0
- package/dist/ui/widget.d.ts.map +1 -0
- package/dist/ui/word-diff/alignment.d.ts +6 -0
- package/dist/ui/word-diff/alignment.d.ts.map +1 -0
- package/dist/ui/word-diff/change-block.d.ts +18 -0
- package/dist/ui/word-diff/change-block.d.ts.map +1 -0
- package/dist/ui/word-diff/changed-line.d.ts +14 -0
- package/dist/ui/word-diff/changed-line.d.ts.map +1 -0
- package/dist/ui/word-diff/emphasis.d.ts +9 -0
- package/dist/ui/word-diff/emphasis.d.ts.map +1 -0
- package/dist/ui/word-diff/line-emphasis.d.ts +7 -0
- package/dist/ui/word-diff/line-emphasis.d.ts.map +1 -0
- package/dist/ui/word-diff/line-matching.d.ts +10 -0
- package/dist/ui/word-diff/line-matching.d.ts.map +1 -0
- package/dist/ui/word-diff/line-similarity.d.ts +16 -0
- package/dist/ui/word-diff/line-similarity.d.ts.map +1 -0
- package/dist/ui/word-diff/normalize.d.ts +3 -0
- package/dist/ui/word-diff/normalize.d.ts.map +1 -0
- package/dist/ui/word-diff/parse.d.ts +17 -0
- package/dist/ui/word-diff/parse.d.ts.map +1 -0
- package/dist/ui/word-diff/range-refinement.d.ts +5 -0
- package/dist/ui/word-diff/range-refinement.d.ts.map +1 -0
- package/dist/ui/word-diff/ranges.d.ts +11 -0
- package/dist/ui/word-diff/ranges.d.ts.map +1 -0
- package/dist/ui/word-diff/smart-filter.d.ts +3 -0
- package/dist/ui/word-diff/smart-filter.d.ts.map +1 -0
- package/dist/ui/word-diff/sparse-line-matching.d.ts +25 -0
- package/dist/ui/word-diff/sparse-line-matching.d.ts.map +1 -0
- package/dist/ui/word-diff/text-boundaries.d.ts +11 -0
- package/dist/ui/word-diff/text-boundaries.d.ts.map +1 -0
- package/dist/ui/word-diff/token-alignment.d.ts +9 -0
- package/dist/ui/word-diff/token-alignment.d.ts.map +1 -0
- package/dist/ui/word-diff/token-text-refinement.d.ts +4 -0
- package/dist/ui/word-diff/token-text-refinement.d.ts.map +1 -0
- package/dist/ui/word-diff/tokens.d.ts +16 -0
- package/dist/ui/word-diff/tokens.d.ts.map +1 -0
- package/dist/ui/word-diff/types.d.ts +10 -0
- package/dist/ui/word-diff/types.d.ts.map +1 -0
- package/dist/util.d.ts +3 -0
- package/dist/util.d.ts.map +1 -0
- package/dist/worker/model-control.d.ts +14 -0
- package/dist/worker/model-control.d.ts.map +1 -0
- package/dist/worker/model-control.js +118 -0
- package/dist/worker/model-control.js.map +7 -0
- package/dist/worker/options.d.ts +3 -0
- package/dist/worker/options.d.ts.map +1 -0
- package/dist/worker/options.js +156 -0
- package/dist/worker/options.js.map +7 -0
- package/dist/worker/run-record.d.ts +22 -0
- package/dist/worker/run-record.d.ts.map +1 -0
- package/dist/worker/run-record.js +124 -0
- package/dist/worker/run-record.js.map +7 -0
- package/dist/worker/session-export.d.ts +45 -0
- package/dist/worker/session-export.d.ts.map +1 -0
- package/dist/worker/session-export.js +91 -0
- package/dist/worker/session-export.js.map +7 -0
- package/dist/worker.d.ts +3 -0
- package/dist/worker.d.ts.map +1 -0
- package/dist/worker.js +1074 -0
- package/dist/worker.js.map +7 -0
- package/docs/agents.md +618 -0
- package/docs/architecture.md +141 -0
- package/docs/audit-trace.md +116 -0
- package/docs/certification.md +166 -0
- package/docs/compaction.md +345 -0
- package/docs/component-calculus.md +191 -0
- package/docs/components.md +330 -0
- package/docs/configuration.md +529 -0
- package/docs/entropy.md +214 -0
- package/docs/interface.md +210 -0
- package/docs/jev.md +289 -0
- package/docs/kernels.md +186 -0
- package/docs/memory-recall.md +664 -0
- package/docs/programmatic-compaction.md +205 -0
- package/docs/provider-component-calculus.md +378 -0
- package/docs/providers.md +163 -0
- package/docs/repairs.md +90 -0
- package/docs/residency-runtime.md +82 -0
- package/docs/schema-enforcement.md +166 -0
- package/docs/skills.md +50 -0
- package/docs/speculation.md +171 -0
- package/docs/state-layer.md +197 -0
- package/package.json +135 -0
- package/skillsets/python/fabric-advisor/SKILL.md +29 -0
- package/skillsets/python/fabric-ambient/SKILL.md +44 -0
- package/skillsets/python/fabric-ambient/references/setup.md +67 -0
- package/skillsets/python/fabric-council/SKILL.md +54 -0
- package/skillsets/python/fabric-exec/SKILL.md +74 -0
- package/skillsets/python/fabric-exec/references/agents.md +65 -0
- package/skillsets/python/fabric-exec/references/mcp.md +23 -0
- package/skillsets/python/fabric-exec/references/mesh.md +27 -0
- package/skillsets/python/fabric-fusion/SKILL.md +112 -0
- package/skillsets/python/fabric-guide/SKILL.md +29 -0
- package/skillsets/python/fabric-jev/SKILL.md +162 -0
- package/skillsets/python/fabric-rlm/SKILL.md +120 -0
- package/skillsets/python/fabric-schema/SKILL.md +55 -0
- package/skillsets/python/fabric-spec/SKILL.md +42 -0
- package/skillsets/python/fabric-supervisor/SKILL.md +37 -0
- package/skillsets/python/fabric-swarm/SKILL.md +40 -0
- package/skillsets/python/fabric-workflow/SKILL.md +62 -0
- package/skillsets/typescript/fabric-advisor/SKILL.md +29 -0
- package/skillsets/typescript/fabric-ambient/SKILL.md +44 -0
- package/skillsets/typescript/fabric-ambient/references/setup.md +90 -0
- package/skillsets/typescript/fabric-council/SKILL.md +94 -0
- package/skillsets/typescript/fabric-exec/SKILL.md +142 -0
- package/skillsets/typescript/fabric-exec/references/agents.md +218 -0
- package/skillsets/typescript/fabric-exec/references/mcp.md +49 -0
- package/skillsets/typescript/fabric-exec/references/mesh.md +51 -0
- package/skillsets/typescript/fabric-fusion/SKILL.md +332 -0
- package/skillsets/typescript/fabric-guide/SKILL.md +29 -0
- package/skillsets/typescript/fabric-jev/SKILL.md +159 -0
- package/skillsets/typescript/fabric-rlm/SKILL.md +284 -0
- package/skillsets/typescript/fabric-schema/SKILL.md +121 -0
- package/skillsets/typescript/fabric-spec/SKILL.md +42 -0
- package/skillsets/typescript/fabric-supervisor/SKILL.md +37 -0
- package/skillsets/typescript/fabric-swarm/SKILL.md +80 -0
- package/skillsets/typescript/fabric-workflow/SKILL.md +133 -0
|
@@ -0,0 +1,644 @@
|
|
|
1
|
+
import {
|
|
2
|
+
writeJsonAtomic,
|
|
3
|
+
writeJsonAtomicAsync
|
|
4
|
+
} from "./chunk-KAD7UWT2.js";
|
|
5
|
+
import {
|
|
6
|
+
MAX_NORMAL_FORM_PLANS,
|
|
7
|
+
isNormalFormPlan,
|
|
8
|
+
provesNormalFormPlan
|
|
9
|
+
} from "./chunk-G4LADAYY.js";
|
|
10
|
+
import {
|
|
11
|
+
stableJsonHash
|
|
12
|
+
} from "./chunk-3YZUQESG.js";
|
|
13
|
+
|
|
14
|
+
// src/entropy/types.ts
|
|
15
|
+
var ENTROPY_METRIC_VERSION = 3;
|
|
16
|
+
var ENTROPY_WEIGHTS = {
|
|
17
|
+
shape: 1,
|
|
18
|
+
failureStage: 1,
|
|
19
|
+
churn: 4,
|
|
20
|
+
navigation: 4,
|
|
21
|
+
flow: 1,
|
|
22
|
+
lexicon: 2,
|
|
23
|
+
staticFreedom: 0.25
|
|
24
|
+
};
|
|
25
|
+
var ENTROPY_INVOCATION_STAGES = ["resolve", "prepare", "validate"];
|
|
26
|
+
|
|
27
|
+
// src/entropy/compiled-surface.ts
|
|
28
|
+
import { Value } from "typebox/value";
|
|
29
|
+
var COMPILED_SURFACE_VERSION = 2;
|
|
30
|
+
var MAX_COMPILED_SURFACE_PROPOSALS = 256;
|
|
31
|
+
var emptyCompiledSurface = () => ({
|
|
32
|
+
version: COMPILED_SURFACE_VERSION,
|
|
33
|
+
metricVersion: ENTROPY_METRIC_VERSION,
|
|
34
|
+
actions: [],
|
|
35
|
+
quarantined: [],
|
|
36
|
+
normalizations: [],
|
|
37
|
+
applied: [],
|
|
38
|
+
gate: { passed: true, beforeScore: 0, afterScore: 0, reasons: [] },
|
|
39
|
+
evidenceDigest: stableJsonHash([])
|
|
40
|
+
});
|
|
41
|
+
var compiledSurfaceEffectChanged = (before, after) => stableJsonHash(before?.version === COMPILED_SURFACE_VERSION ? before.normalizations ?? [] : []) !== stableJsonHash(after.version === COMPILED_SURFACE_VERSION ? after.normalizations ?? [] : []);
|
|
42
|
+
var comparableCompiledSurfaceScore = (file, metricVersion) => file?.version === COMPILED_SURFACE_VERSION && file.metricVersion === metricVersion ? file.gate.afterScore : void 0;
|
|
43
|
+
var isPlainRecord = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
44
|
+
var schemaDigest = (schema) => stableJsonHash(schema);
|
|
45
|
+
var effectiveSchemaFor = (_ref, liveSchema, _file) => liveSchema;
|
|
46
|
+
var applyCompiledSurface = (live, _file) => live;
|
|
47
|
+
var quarantinedRefNames = (_file) => /* @__PURE__ */ new Set();
|
|
48
|
+
var isQuarantinedRef = (_ref, _liveSchema, _file) => false;
|
|
49
|
+
var mergeCompiledSurfaces = (local, incoming, live) => {
|
|
50
|
+
const schemas = new Map(live.actions.map((action) => [action.ref, action.inputSchema]));
|
|
51
|
+
const plans = /* @__PURE__ */ new Map();
|
|
52
|
+
let droppedNormalizations = 0;
|
|
53
|
+
for (const file of [local, incoming]) {
|
|
54
|
+
if (!file || file.version !== COMPILED_SURFACE_VERSION) continue;
|
|
55
|
+
for (const plan of file.normalizations ?? []) {
|
|
56
|
+
if (!provesNormalFormPlan(plan, schemas.get(plan.ref))) {
|
|
57
|
+
droppedNormalizations++;
|
|
58
|
+
continue;
|
|
59
|
+
}
|
|
60
|
+
if (plans.size >= MAX_NORMAL_FORM_PLANS || plans.has(plan.ref)) continue;
|
|
61
|
+
plans.set(plan.ref, plan);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
const normalizations = [...plans.values()].sort((a, b) => a.ref < b.ref ? -1 : a.ref > b.ref ? 1 : 0);
|
|
65
|
+
return {
|
|
66
|
+
file: {
|
|
67
|
+
...emptyCompiledSurface(),
|
|
68
|
+
normalizations,
|
|
69
|
+
applied: normalizations.slice(0, MAX_COMPILED_SURFACE_PROPOSALS).map((plan) => ({ kind: "normal-form", ref: plan.ref, detail: `${plan.rules.length} proven rules` })),
|
|
70
|
+
evidenceDigest: stableJsonHash(normalizations)
|
|
71
|
+
},
|
|
72
|
+
droppedOverlays: (local?.actions.length ?? 0) + incoming.actions.length,
|
|
73
|
+
droppedQuarantines: (local?.quarantined.length ?? 0) + incoming.quarantined.length,
|
|
74
|
+
droppedNormalizations
|
|
75
|
+
};
|
|
76
|
+
};
|
|
77
|
+
var replaySuccessfulCalls = (surface, before, traces, touchedRefs, auditCalls) => {
|
|
78
|
+
const schemaByRef = new Map(surface.actions.map((action) => [action.ref, action.inputSchema]));
|
|
79
|
+
const beforeByRef = new Map(before.actions.map((action) => [action.ref, action.inputSchema]));
|
|
80
|
+
const accepts = (schema, args) => {
|
|
81
|
+
try {
|
|
82
|
+
return isPlainRecord(schema) && Value.Check(schema, args);
|
|
83
|
+
} catch {
|
|
84
|
+
return false;
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
const violations = [];
|
|
88
|
+
const auditedRefs = /* @__PURE__ */ new Set();
|
|
89
|
+
if (auditCalls) {
|
|
90
|
+
const auditArgsByRef = /* @__PURE__ */ new Map();
|
|
91
|
+
for (const call of auditCalls) {
|
|
92
|
+
if (!touchedRefs.has(call.ref)) continue;
|
|
93
|
+
const bucket = auditArgsByRef.get(call.ref) ?? [];
|
|
94
|
+
bucket.push(call.args);
|
|
95
|
+
auditArgsByRef.set(call.ref, bucket);
|
|
96
|
+
}
|
|
97
|
+
for (const [ref, argsList] of auditArgsByRef) {
|
|
98
|
+
auditedRefs.add(ref);
|
|
99
|
+
const schema = schemaByRef.get(ref);
|
|
100
|
+
if (schema === void 0) {
|
|
101
|
+
violations.push({ ref, reason: "absent from the candidate surface" });
|
|
102
|
+
continue;
|
|
103
|
+
}
|
|
104
|
+
const declared = beforeByRef.get(ref);
|
|
105
|
+
for (const args of argsList) {
|
|
106
|
+
if (declared !== void 0 && !accepts(declared, args)) continue;
|
|
107
|
+
if (!accepts(schema, args)) {
|
|
108
|
+
violations.push({
|
|
109
|
+
ref,
|
|
110
|
+
reason: "recorded arguments no longer validate against the compiled schema"
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
for (const sourceTrace of traces) {
|
|
117
|
+
for (const operation of sourceTrace.operations) {
|
|
118
|
+
if (operation.outcome !== "succeeded") continue;
|
|
119
|
+
if (operation.ref.startsWith("fabric.")) continue;
|
|
120
|
+
if (!touchedRefs.has(operation.ref)) continue;
|
|
121
|
+
if (auditedRefs.has(operation.ref)) continue;
|
|
122
|
+
const schema = schemaByRef.get(operation.ref);
|
|
123
|
+
if (schema === void 0) {
|
|
124
|
+
violations.push({ ref: operation.ref, reason: "absent from the candidate surface" });
|
|
125
|
+
continue;
|
|
126
|
+
}
|
|
127
|
+
if (!accepts(schema, operation.args)) {
|
|
128
|
+
violations.push({
|
|
129
|
+
ref: operation.ref,
|
|
130
|
+
reason: "recorded arguments no longer validate against the compiled schema"
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
return violations;
|
|
136
|
+
};
|
|
137
|
+
var COOPERATIVE_REPLAY_CHUNK = 64;
|
|
138
|
+
var replayYield = () => new Promise((resolve) => setImmediate(resolve));
|
|
139
|
+
var replaySuccessfulCallsAsync = async (surface, before, traces, touchedRefs, auditCalls) => {
|
|
140
|
+
const schemaByRef = new Map(surface.actions.map((action) => [action.ref, action.inputSchema]));
|
|
141
|
+
const beforeByRef = new Map(before.actions.map((action) => [action.ref, action.inputSchema]));
|
|
142
|
+
const accepts = (schema, args) => {
|
|
143
|
+
try {
|
|
144
|
+
return isPlainRecord(schema) && Value.Check(schema, args);
|
|
145
|
+
} catch {
|
|
146
|
+
return false;
|
|
147
|
+
}
|
|
148
|
+
};
|
|
149
|
+
const violations = [];
|
|
150
|
+
const auditedRefs = /* @__PURE__ */ new Set();
|
|
151
|
+
let processed = 0;
|
|
152
|
+
await replayYield();
|
|
153
|
+
if (auditCalls) {
|
|
154
|
+
const auditArgsByRef = /* @__PURE__ */ new Map();
|
|
155
|
+
for (const call of auditCalls) {
|
|
156
|
+
if (touchedRefs.has(call.ref)) {
|
|
157
|
+
const bucket = auditArgsByRef.get(call.ref) ?? [];
|
|
158
|
+
bucket.push(call.args);
|
|
159
|
+
auditArgsByRef.set(call.ref, bucket);
|
|
160
|
+
}
|
|
161
|
+
processed += 1;
|
|
162
|
+
if (processed % COOPERATIVE_REPLAY_CHUNK === 0) await replayYield();
|
|
163
|
+
}
|
|
164
|
+
for (const [ref, argsList] of auditArgsByRef) {
|
|
165
|
+
auditedRefs.add(ref);
|
|
166
|
+
const schema = schemaByRef.get(ref);
|
|
167
|
+
if (schema === void 0) {
|
|
168
|
+
violations.push({ ref, reason: "absent from the candidate surface" });
|
|
169
|
+
continue;
|
|
170
|
+
}
|
|
171
|
+
const declared = beforeByRef.get(ref);
|
|
172
|
+
for (const args of argsList) {
|
|
173
|
+
if (declared === void 0 || accepts(declared, args)) {
|
|
174
|
+
if (!accepts(schema, args)) {
|
|
175
|
+
violations.push({
|
|
176
|
+
ref,
|
|
177
|
+
reason: "recorded arguments no longer validate against the compiled schema"
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
processed += 1;
|
|
182
|
+
if (processed % COOPERATIVE_REPLAY_CHUNK === 0) await replayYield();
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
for (const sourceTrace of traces) {
|
|
187
|
+
for (const operation of sourceTrace.operations) {
|
|
188
|
+
if (operation.outcome === "succeeded" && !operation.ref.startsWith("fabric.") && touchedRefs.has(operation.ref) && !auditedRefs.has(operation.ref)) {
|
|
189
|
+
const schema = schemaByRef.get(operation.ref);
|
|
190
|
+
if (schema === void 0) {
|
|
191
|
+
violations.push({ ref: operation.ref, reason: "absent from the candidate surface" });
|
|
192
|
+
} else if (!accepts(schema, operation.args)) {
|
|
193
|
+
violations.push({
|
|
194
|
+
ref: operation.ref,
|
|
195
|
+
reason: "recorded arguments no longer validate against the compiled schema"
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
processed += 1;
|
|
200
|
+
if (processed % COOPERATIVE_REPLAY_CHUNK === 0) await replayYield();
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
return violations;
|
|
204
|
+
};
|
|
205
|
+
|
|
206
|
+
// src/entropy/compiled-store.ts
|
|
207
|
+
import fs2 from "node:fs";
|
|
208
|
+
import path2 from "node:path";
|
|
209
|
+
|
|
210
|
+
// src/core/file-lock.ts
|
|
211
|
+
import { randomUUID } from "node:crypto";
|
|
212
|
+
import fs from "node:fs";
|
|
213
|
+
import path from "node:path";
|
|
214
|
+
var DEFAULT_LOCK_ATTEMPTS = 50;
|
|
215
|
+
var DEFAULT_LOCK_DELAY_MS = 5;
|
|
216
|
+
var DEFAULT_STALE_LOCK_MS = 3e4;
|
|
217
|
+
var errorCode = (error) => typeof error === "object" && error !== null && "code" in error ? String(error.code) : void 0;
|
|
218
|
+
var sleepSync = (() => {
|
|
219
|
+
try {
|
|
220
|
+
const buffer = new Int32Array(new SharedArrayBuffer(4));
|
|
221
|
+
return (ms) => {
|
|
222
|
+
Atomics.wait(buffer, 0, 0, ms);
|
|
223
|
+
};
|
|
224
|
+
} catch {
|
|
225
|
+
return () => void 0;
|
|
226
|
+
}
|
|
227
|
+
})();
|
|
228
|
+
var processAlive = (pid) => {
|
|
229
|
+
if (!Number.isSafeInteger(pid) || pid <= 0) return false;
|
|
230
|
+
try {
|
|
231
|
+
process.kill(pid, 0);
|
|
232
|
+
return true;
|
|
233
|
+
} catch {
|
|
234
|
+
return false;
|
|
235
|
+
}
|
|
236
|
+
};
|
|
237
|
+
var sleepAsync = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
|
|
238
|
+
var reapStaleLockAsync = async (lock, verify) => {
|
|
239
|
+
const claim = `${lock}.reap-${process.pid}-${randomUUID()}`;
|
|
240
|
+
try {
|
|
241
|
+
await fs.promises.rename(lock, claim);
|
|
242
|
+
} catch {
|
|
243
|
+
return false;
|
|
244
|
+
}
|
|
245
|
+
if (!await verify(claim)) {
|
|
246
|
+
try {
|
|
247
|
+
await fs.promises.rename(claim, lock);
|
|
248
|
+
} catch {
|
|
249
|
+
if (await verify(claim)) {
|
|
250
|
+
await fs.promises.rm(claim, { recursive: true, force: true });
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
return false;
|
|
254
|
+
}
|
|
255
|
+
await fs.promises.rm(claim, { recursive: true, force: true });
|
|
256
|
+
return true;
|
|
257
|
+
};
|
|
258
|
+
var withExclusiveFileLockAsync = async (options, operation) => {
|
|
259
|
+
const attempts = options.attempts ?? DEFAULT_LOCK_ATTEMPTS;
|
|
260
|
+
const delayMs = options.delayMs ?? DEFAULT_LOCK_DELAY_MS;
|
|
261
|
+
const staleMs = options.staleMs ?? DEFAULT_STALE_LOCK_MS;
|
|
262
|
+
await fs.promises.mkdir(options.directory, { recursive: true, mode: 448 });
|
|
263
|
+
const lock = path.join(options.directory, options.lockName);
|
|
264
|
+
const ownerPath = path.join(lock, "owner");
|
|
265
|
+
const token = randomUUID();
|
|
266
|
+
let acquired = false;
|
|
267
|
+
for (let attempt = 0; attempt < attempts; attempt++) {
|
|
268
|
+
try {
|
|
269
|
+
await fs.promises.mkdir(lock, { mode: 448 });
|
|
270
|
+
try {
|
|
271
|
+
await fs.promises.writeFile(ownerPath, `${token}
|
|
272
|
+
${process.pid}
|
|
273
|
+
${Date.now()}
|
|
274
|
+
`, {
|
|
275
|
+
encoding: "utf-8",
|
|
276
|
+
mode: 384
|
|
277
|
+
});
|
|
278
|
+
} catch (error) {
|
|
279
|
+
await fs.promises.rm(lock, { recursive: true, force: true });
|
|
280
|
+
throw error;
|
|
281
|
+
}
|
|
282
|
+
acquired = true;
|
|
283
|
+
break;
|
|
284
|
+
} catch (error) {
|
|
285
|
+
if (errorCode(error) !== "EEXIST") throw error;
|
|
286
|
+
try {
|
|
287
|
+
const firstOwner = await fs.promises.readFile(ownerPath, "utf8");
|
|
288
|
+
const [, pidText, createdText] = firstOwner.trim().split("\n");
|
|
289
|
+
const stale = Date.now() - Number(createdText) > staleMs;
|
|
290
|
+
if (stale && !processAlive(Number(pidText))) {
|
|
291
|
+
const secondOwner = await fs.promises.readFile(ownerPath, "utf8");
|
|
292
|
+
if (secondOwner === firstOwner && await reapStaleLockAsync(lock, async (claimed) => {
|
|
293
|
+
try {
|
|
294
|
+
const owner = await fs.promises.readFile(path.join(claimed, "owner"), "utf8");
|
|
295
|
+
const [, pid, created] = owner.trim().split("\n");
|
|
296
|
+
return Date.now() - Number(created) > staleMs && !processAlive(Number(pid));
|
|
297
|
+
} catch {
|
|
298
|
+
return false;
|
|
299
|
+
}
|
|
300
|
+
})) {
|
|
301
|
+
continue;
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
} catch {
|
|
305
|
+
try {
|
|
306
|
+
const first = await fs.promises.stat(lock);
|
|
307
|
+
if (Date.now() - first.mtimeMs > staleMs && await reapStaleLockAsync(lock, async (claimed) => {
|
|
308
|
+
try {
|
|
309
|
+
return Date.now() - (await fs.promises.stat(claimed)).mtimeMs > staleMs;
|
|
310
|
+
} catch {
|
|
311
|
+
return false;
|
|
312
|
+
}
|
|
313
|
+
})) {
|
|
314
|
+
continue;
|
|
315
|
+
}
|
|
316
|
+
} catch {
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
if (attempt === attempts - 1) break;
|
|
320
|
+
await sleepAsync(delayMs);
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
if (!acquired) throw new Error(options.timeoutMessage);
|
|
324
|
+
try {
|
|
325
|
+
return await operation();
|
|
326
|
+
} finally {
|
|
327
|
+
try {
|
|
328
|
+
const owner = await fs.promises.readFile(ownerPath, "utf8");
|
|
329
|
+
if (owner.startsWith(`${token}
|
|
330
|
+
`)) {
|
|
331
|
+
await fs.promises.rm(lock, { recursive: true, force: true });
|
|
332
|
+
}
|
|
333
|
+
} catch {
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
};
|
|
337
|
+
var reapStaleLock = (lock, verify) => {
|
|
338
|
+
const claim = `${lock}.reap-${process.pid}-${randomUUID()}`;
|
|
339
|
+
try {
|
|
340
|
+
fs.renameSync(lock, claim);
|
|
341
|
+
} catch {
|
|
342
|
+
return false;
|
|
343
|
+
}
|
|
344
|
+
if (!verify(claim)) {
|
|
345
|
+
try {
|
|
346
|
+
fs.renameSync(claim, lock);
|
|
347
|
+
} catch {
|
|
348
|
+
if (verify(claim)) fs.rmSync(claim, { recursive: true, force: true });
|
|
349
|
+
}
|
|
350
|
+
return false;
|
|
351
|
+
}
|
|
352
|
+
fs.rmSync(claim, { recursive: true, force: true });
|
|
353
|
+
return true;
|
|
354
|
+
};
|
|
355
|
+
var withExclusiveFileLock = (options, operation) => {
|
|
356
|
+
const attempts = options.attempts ?? DEFAULT_LOCK_ATTEMPTS;
|
|
357
|
+
const delayMs = options.delayMs ?? DEFAULT_LOCK_DELAY_MS;
|
|
358
|
+
const staleMs = options.staleMs ?? DEFAULT_STALE_LOCK_MS;
|
|
359
|
+
fs.mkdirSync(options.directory, { recursive: true, mode: 448 });
|
|
360
|
+
const lock = path.join(options.directory, options.lockName);
|
|
361
|
+
const ownerPath = path.join(lock, "owner");
|
|
362
|
+
const token = randomUUID();
|
|
363
|
+
let acquired = false;
|
|
364
|
+
for (let attempt = 0; attempt < attempts; attempt++) {
|
|
365
|
+
try {
|
|
366
|
+
fs.mkdirSync(lock, { mode: 448 });
|
|
367
|
+
try {
|
|
368
|
+
fs.writeFileSync(ownerPath, `${token}
|
|
369
|
+
${process.pid}
|
|
370
|
+
${Date.now()}
|
|
371
|
+
`, {
|
|
372
|
+
encoding: "utf-8",
|
|
373
|
+
mode: 384
|
|
374
|
+
});
|
|
375
|
+
} catch (error) {
|
|
376
|
+
fs.rmSync(lock, { recursive: true, force: true });
|
|
377
|
+
throw error;
|
|
378
|
+
}
|
|
379
|
+
acquired = true;
|
|
380
|
+
break;
|
|
381
|
+
} catch (error) {
|
|
382
|
+
if (errorCode(error) !== "EEXIST") throw error;
|
|
383
|
+
try {
|
|
384
|
+
const firstOwner = fs.readFileSync(ownerPath, "utf8");
|
|
385
|
+
const [, pidText, createdText] = firstOwner.trim().split("\n");
|
|
386
|
+
const stale = Date.now() - Number(createdText) > staleMs;
|
|
387
|
+
if (stale && !processAlive(Number(pidText))) {
|
|
388
|
+
const secondOwner = fs.readFileSync(ownerPath, "utf8");
|
|
389
|
+
if (secondOwner === firstOwner && reapStaleLock(lock, (claimed) => {
|
|
390
|
+
try {
|
|
391
|
+
const owner = fs.readFileSync(path.join(claimed, "owner"), "utf8");
|
|
392
|
+
const [, pid, created] = owner.trim().split("\n");
|
|
393
|
+
return Date.now() - Number(created) > staleMs && !processAlive(Number(pid));
|
|
394
|
+
} catch {
|
|
395
|
+
return false;
|
|
396
|
+
}
|
|
397
|
+
})) {
|
|
398
|
+
continue;
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
} catch {
|
|
402
|
+
try {
|
|
403
|
+
const first = fs.statSync(lock);
|
|
404
|
+
if (Date.now() - first.mtimeMs > staleMs && reapStaleLock(lock, (claimed) => {
|
|
405
|
+
try {
|
|
406
|
+
return Date.now() - fs.statSync(claimed).mtimeMs > staleMs;
|
|
407
|
+
} catch {
|
|
408
|
+
return false;
|
|
409
|
+
}
|
|
410
|
+
})) {
|
|
411
|
+
continue;
|
|
412
|
+
}
|
|
413
|
+
} catch {
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
if (attempt === attempts - 1) break;
|
|
417
|
+
sleepSync(delayMs);
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
if (!acquired) throw new Error(options.timeoutMessage);
|
|
421
|
+
try {
|
|
422
|
+
return operation();
|
|
423
|
+
} finally {
|
|
424
|
+
try {
|
|
425
|
+
const owner = fs.readFileSync(ownerPath, "utf8");
|
|
426
|
+
if (owner.startsWith(`${token}
|
|
427
|
+
`)) {
|
|
428
|
+
fs.rmSync(lock, { recursive: true, force: true });
|
|
429
|
+
}
|
|
430
|
+
} catch {
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
};
|
|
434
|
+
|
|
435
|
+
// src/entropy/compiled-store.ts
|
|
436
|
+
var COMPILED_LOCK_ATTEMPTS = 50;
|
|
437
|
+
var COMPILED_LOCK_DELAY_MS = 5;
|
|
438
|
+
var COMPILED_STALE_LOCK_MS = 3e4;
|
|
439
|
+
var compiledSurfaceDirectory = (agentDir) => path2.join(agentDir, "fabric", "entropy");
|
|
440
|
+
var compiledPath = (directory) => path2.join(directory, "compiled.json");
|
|
441
|
+
var isRecord = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
442
|
+
var errorCode2 = (error) => isRecord(error) && typeof error.code === "string" ? error.code : void 0;
|
|
443
|
+
var errorText = (error) => (error instanceof Error ? error.message : String(error)).slice(0, 200);
|
|
444
|
+
var parseOverlayEntry = (value) => {
|
|
445
|
+
if (!isRecord(value) || typeof value.ref !== "string" || !value.ref.trim()) return void 0;
|
|
446
|
+
if (!isRecord(value.inputSchema)) return void 0;
|
|
447
|
+
if (typeof value.baseSchemaDigest !== "string" || !value.baseSchemaDigest.trim()) {
|
|
448
|
+
return void 0;
|
|
449
|
+
}
|
|
450
|
+
return {
|
|
451
|
+
ref: value.ref.trim(),
|
|
452
|
+
inputSchema: value.inputSchema,
|
|
453
|
+
baseSchemaDigest: value.baseSchemaDigest.trim()
|
|
454
|
+
};
|
|
455
|
+
};
|
|
456
|
+
var parseQuarantineEntry = (value) => {
|
|
457
|
+
if (!isRecord(value) || typeof value.ref !== "string" || !value.ref.trim()) return void 0;
|
|
458
|
+
if (typeof value.baseSchemaDigest !== "string" || !value.baseSchemaDigest.trim()) {
|
|
459
|
+
return void 0;
|
|
460
|
+
}
|
|
461
|
+
return { ref: value.ref.trim(), baseSchemaDigest: value.baseSchemaDigest.trim() };
|
|
462
|
+
};
|
|
463
|
+
var parseAppliedProposal = (value) => {
|
|
464
|
+
if (!isRecord(value)) return void 0;
|
|
465
|
+
if (typeof value.kind !== "string" || !value.kind.trim()) return void 0;
|
|
466
|
+
if (typeof value.ref !== "string" || !value.ref.trim()) return void 0;
|
|
467
|
+
if (typeof value.detail !== "string" || !value.detail.trim()) return void 0;
|
|
468
|
+
return {
|
|
469
|
+
kind: value.kind.trim(),
|
|
470
|
+
ref: value.ref.trim(),
|
|
471
|
+
detail: value.detail.trim()
|
|
472
|
+
};
|
|
473
|
+
};
|
|
474
|
+
var parseGateRecord = (value) => {
|
|
475
|
+
if (!isRecord(value) || typeof value.passed !== "boolean") return void 0;
|
|
476
|
+
if (typeof value.beforeScore !== "number" || typeof value.afterScore !== "number" || !Number.isFinite(value.beforeScore) || !Number.isFinite(value.afterScore)) {
|
|
477
|
+
return void 0;
|
|
478
|
+
}
|
|
479
|
+
if (!Array.isArray(value.reasons) || !value.reasons.every((r) => typeof r === "string")) {
|
|
480
|
+
return void 0;
|
|
481
|
+
}
|
|
482
|
+
return {
|
|
483
|
+
passed: value.passed,
|
|
484
|
+
beforeScore: value.beforeScore,
|
|
485
|
+
afterScore: value.afterScore,
|
|
486
|
+
reasons: value.reasons
|
|
487
|
+
};
|
|
488
|
+
};
|
|
489
|
+
var parseCompiledSurfaceFile = (value) => {
|
|
490
|
+
if (!isRecord(value) || value.version !== 1 && value.version !== COMPILED_SURFACE_VERSION) return void 0;
|
|
491
|
+
if (value.version === COMPILED_SURFACE_VERSION) {
|
|
492
|
+
if (!Array.isArray(value.normalizations) || value.normalizations.length > MAX_NORMAL_FORM_PLANS || !value.normalizations.every(isNormalFormPlan) || new Set(value.normalizations.map((plan) => plan.ref)).size !== value.normalizations.length) return void 0;
|
|
493
|
+
if (!Array.isArray(value.actions) || value.actions.length !== 0 || !Array.isArray(value.quarantined) || value.quarantined.length !== 0) return void 0;
|
|
494
|
+
}
|
|
495
|
+
if (!Number.isSafeInteger(value.metricVersion) || value.metricVersion < 1) {
|
|
496
|
+
return void 0;
|
|
497
|
+
}
|
|
498
|
+
if (!Array.isArray(value.actions) || !value.actions.every((entry) => parseOverlayEntry(entry))) {
|
|
499
|
+
return void 0;
|
|
500
|
+
}
|
|
501
|
+
if (!Array.isArray(value.quarantined) || !value.quarantined.every((entry) => parseQuarantineEntry(entry))) {
|
|
502
|
+
return void 0;
|
|
503
|
+
}
|
|
504
|
+
if (!Array.isArray(value.applied) || value.applied.length > MAX_COMPILED_SURFACE_PROPOSALS || !value.applied.every((entry) => parseAppliedProposal(entry))) {
|
|
505
|
+
return void 0;
|
|
506
|
+
}
|
|
507
|
+
if (!parseGateRecord(value.gate)) return void 0;
|
|
508
|
+
if (typeof value.evidenceDigest !== "string" || !value.evidenceDigest.trim()) return void 0;
|
|
509
|
+
const overlaySeen = /* @__PURE__ */ new Set();
|
|
510
|
+
for (const entry of value.actions) {
|
|
511
|
+
const parsed = parseOverlayEntry(entry);
|
|
512
|
+
if (overlaySeen.has(parsed.ref)) return void 0;
|
|
513
|
+
overlaySeen.add(parsed.ref);
|
|
514
|
+
}
|
|
515
|
+
return {
|
|
516
|
+
version: value.version,
|
|
517
|
+
...value.version === COMPILED_SURFACE_VERSION ? { normalizations: value.normalizations } : {},
|
|
518
|
+
metricVersion: value.metricVersion,
|
|
519
|
+
actions: value.actions.map((entry) => parseOverlayEntry(entry)),
|
|
520
|
+
quarantined: value.quarantined.map((entry) => parseQuarantineEntry(entry)),
|
|
521
|
+
applied: value.applied.map((entry) => parseAppliedProposal(entry)),
|
|
522
|
+
gate: parseGateRecord(value.gate),
|
|
523
|
+
evidenceDigest: value.evidenceDigest.trim()
|
|
524
|
+
};
|
|
525
|
+
};
|
|
526
|
+
var parseCompiledSurfaceArtifact = (value) => parseCompiledSurfaceFile(value);
|
|
527
|
+
var loadCompiledSurface = (agentDir) => {
|
|
528
|
+
const file = compiledPath(compiledSurfaceDirectory(agentDir));
|
|
529
|
+
let raw;
|
|
530
|
+
try {
|
|
531
|
+
raw = fs2.readFileSync(file, "utf8");
|
|
532
|
+
} catch (error) {
|
|
533
|
+
if (errorCode2(error) === "ENOENT") return {};
|
|
534
|
+
return { error: `compiled surface is unreadable: ${errorText(error)}` };
|
|
535
|
+
}
|
|
536
|
+
let parsed;
|
|
537
|
+
try {
|
|
538
|
+
parsed = JSON.parse(raw);
|
|
539
|
+
} catch {
|
|
540
|
+
return { error: "compiled surface is malformed JSON" };
|
|
541
|
+
}
|
|
542
|
+
const parsedFile = parseCompiledSurfaceFile(parsed);
|
|
543
|
+
if (!parsedFile) return { error: "compiled surface is invalid" };
|
|
544
|
+
return { file: parsedFile };
|
|
545
|
+
};
|
|
546
|
+
var loadCompiledSurfaceAsync = async (agentDir) => {
|
|
547
|
+
const file = compiledPath(compiledSurfaceDirectory(agentDir));
|
|
548
|
+
let raw;
|
|
549
|
+
try {
|
|
550
|
+
raw = await fs2.promises.readFile(file, "utf8");
|
|
551
|
+
} catch (error) {
|
|
552
|
+
if (errorCode2(error) === "ENOENT") return {};
|
|
553
|
+
return { error: `compiled surface is unreadable: ${errorText(error)}` };
|
|
554
|
+
}
|
|
555
|
+
let parsed;
|
|
556
|
+
try {
|
|
557
|
+
parsed = JSON.parse(raw);
|
|
558
|
+
} catch {
|
|
559
|
+
return { error: "compiled surface is malformed JSON" };
|
|
560
|
+
}
|
|
561
|
+
const parsedFile = parseCompiledSurfaceFile(parsed);
|
|
562
|
+
return parsedFile ? { file: parsedFile } : { error: "compiled surface is invalid" };
|
|
563
|
+
};
|
|
564
|
+
var saveCompiledSurface = (agentDir, file) => withExclusiveFileLock(
|
|
565
|
+
{
|
|
566
|
+
directory: compiledSurfaceDirectory(agentDir),
|
|
567
|
+
lockName: "compiled.lock",
|
|
568
|
+
timeoutMessage: "Timed out waiting for the compiled entropy surface lock",
|
|
569
|
+
attempts: COMPILED_LOCK_ATTEMPTS,
|
|
570
|
+
delayMs: COMPILED_LOCK_DELAY_MS,
|
|
571
|
+
staleMs: COMPILED_STALE_LOCK_MS
|
|
572
|
+
},
|
|
573
|
+
() => {
|
|
574
|
+
const loaded = loadCompiledSurface(agentDir);
|
|
575
|
+
if (loaded.error) throw new Error(loaded.error);
|
|
576
|
+
const target = compiledPath(compiledSurfaceDirectory(agentDir));
|
|
577
|
+
const serialized = `${JSON.stringify(file, null, 2)}
|
|
578
|
+
`;
|
|
579
|
+
try {
|
|
580
|
+
if (fs2.readFileSync(target, "utf8") === serialized) return { file, written: false };
|
|
581
|
+
} catch {
|
|
582
|
+
}
|
|
583
|
+
writeJsonAtomic(target, file, { space: 2, newline: true, mode: 384, dirMode: 448 });
|
|
584
|
+
return { file, written: true };
|
|
585
|
+
}
|
|
586
|
+
);
|
|
587
|
+
var saveCompiledSurfaceAsync = async (agentDir, file) => withExclusiveFileLockAsync(
|
|
588
|
+
{
|
|
589
|
+
directory: compiledSurfaceDirectory(agentDir),
|
|
590
|
+
lockName: "compiled.lock",
|
|
591
|
+
timeoutMessage: "Timed out waiting for the compiled entropy surface lock",
|
|
592
|
+
attempts: COMPILED_LOCK_ATTEMPTS,
|
|
593
|
+
delayMs: COMPILED_LOCK_DELAY_MS,
|
|
594
|
+
staleMs: COMPILED_STALE_LOCK_MS
|
|
595
|
+
},
|
|
596
|
+
async () => {
|
|
597
|
+
const loaded = await loadCompiledSurfaceAsync(agentDir);
|
|
598
|
+
if (loaded.error) throw new Error(loaded.error);
|
|
599
|
+
const target = compiledPath(compiledSurfaceDirectory(agentDir));
|
|
600
|
+
const serialized = `${JSON.stringify(file, null, 2)}
|
|
601
|
+
`;
|
|
602
|
+
try {
|
|
603
|
+
if (await fs2.promises.readFile(target, "utf8") === serialized) {
|
|
604
|
+
return { file, written: false };
|
|
605
|
+
}
|
|
606
|
+
} catch {
|
|
607
|
+
}
|
|
608
|
+
await writeJsonAtomicAsync(target, file, {
|
|
609
|
+
space: 2,
|
|
610
|
+
newline: true,
|
|
611
|
+
mode: 384,
|
|
612
|
+
dirMode: 448
|
|
613
|
+
});
|
|
614
|
+
return { file, written: true };
|
|
615
|
+
}
|
|
616
|
+
);
|
|
617
|
+
|
|
618
|
+
export {
|
|
619
|
+
ENTROPY_METRIC_VERSION,
|
|
620
|
+
ENTROPY_WEIGHTS,
|
|
621
|
+
ENTROPY_INVOCATION_STAGES,
|
|
622
|
+
COMPILED_SURFACE_VERSION,
|
|
623
|
+
MAX_COMPILED_SURFACE_PROPOSALS,
|
|
624
|
+
emptyCompiledSurface,
|
|
625
|
+
compiledSurfaceEffectChanged,
|
|
626
|
+
comparableCompiledSurfaceScore,
|
|
627
|
+
schemaDigest,
|
|
628
|
+
effectiveSchemaFor,
|
|
629
|
+
applyCompiledSurface,
|
|
630
|
+
quarantinedRefNames,
|
|
631
|
+
isQuarantinedRef,
|
|
632
|
+
mergeCompiledSurfaces,
|
|
633
|
+
replaySuccessfulCalls,
|
|
634
|
+
replaySuccessfulCallsAsync,
|
|
635
|
+
withExclusiveFileLockAsync,
|
|
636
|
+
withExclusiveFileLock,
|
|
637
|
+
compiledSurfaceDirectory,
|
|
638
|
+
parseCompiledSurfaceArtifact,
|
|
639
|
+
loadCompiledSurface,
|
|
640
|
+
loadCompiledSurfaceAsync,
|
|
641
|
+
saveCompiledSurface,
|
|
642
|
+
saveCompiledSurfaceAsync
|
|
643
|
+
};
|
|
644
|
+
//# sourceMappingURL=chunk-3WIGAX56.js.map
|