@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,916 @@
|
|
|
1
|
+
import {
|
|
2
|
+
FabricModelSelector
|
|
3
|
+
} from "../chunks/chunk-J7ZQERKA.js";
|
|
4
|
+
import {
|
|
5
|
+
buildModelSource
|
|
6
|
+
} from "../chunks/chunk-CQFP2RCP.js";
|
|
7
|
+
import {
|
|
8
|
+
resolveAgentDir
|
|
9
|
+
} from "../chunks/chunk-PBDDXBHY.js";
|
|
10
|
+
import {
|
|
11
|
+
formatForeground,
|
|
12
|
+
saveFabricConfig
|
|
13
|
+
} from "../chunks/chunk-4KX6BIPL.js";
|
|
14
|
+
import "../chunks/chunk-OKOHRXGF.js";
|
|
15
|
+
import "../chunks/chunk-F6A6MQ6G.js";
|
|
16
|
+
import "../chunks/chunk-YU62DDKK.js";
|
|
17
|
+
import "../chunks/chunk-GEQMQVNS.js";
|
|
18
|
+
import "../chunks/chunk-G54PEZ44.js";
|
|
19
|
+
import "../chunks/chunk-NENQZCGW.js";
|
|
20
|
+
import "../chunks/chunk-V73NIH6B.js";
|
|
21
|
+
|
|
22
|
+
// src/commands/fabric-handler.ts
|
|
23
|
+
import fs from "node:fs";
|
|
24
|
+
import path from "node:path";
|
|
25
|
+
var extractContentText = (content) => {
|
|
26
|
+
if (typeof content === "string") return content;
|
|
27
|
+
if (Array.isArray(content)) {
|
|
28
|
+
return content.map((part) => {
|
|
29
|
+
if (typeof part !== "object" || part === null) return "";
|
|
30
|
+
const p = part;
|
|
31
|
+
return typeof p.text === "string" ? p.text : typeof p.type === "string" ? p.type : "";
|
|
32
|
+
}).filter(Boolean).join(" ");
|
|
33
|
+
}
|
|
34
|
+
return "";
|
|
35
|
+
};
|
|
36
|
+
var summarizeLogLine = (entry, truncateMiddle) => {
|
|
37
|
+
if (typeof entry !== "object" || entry === null) return truncateMiddle(String(entry), 200);
|
|
38
|
+
const record = entry;
|
|
39
|
+
const type = typeof record.type === "string" ? record.type : void 0;
|
|
40
|
+
const tool = typeof record.toolName === "string" ? record.toolName : void 0;
|
|
41
|
+
const msg = record.message;
|
|
42
|
+
if (typeof msg === "object" && msg !== null && !Array.isArray(msg)) {
|
|
43
|
+
const m = msg;
|
|
44
|
+
const role = typeof m.role === "string" ? m.role : "message";
|
|
45
|
+
const model = typeof m.model === "string" ? m.model : void 0;
|
|
46
|
+
const text = extractContentText(m.content);
|
|
47
|
+
const body = (text || JSON.stringify(m)).replace(/\s+/g, " ");
|
|
48
|
+
return `${role}${model ? ` [${model}]` : ""}: ${truncateMiddle(body, 160)}`;
|
|
49
|
+
}
|
|
50
|
+
if (type) {
|
|
51
|
+
const bits = [type];
|
|
52
|
+
if (tool) bits.push(tool);
|
|
53
|
+
const model = typeof record.modelId === "string" ? record.modelId : void 0;
|
|
54
|
+
const provider = typeof record.provider === "string" && !model ? record.provider : void 0;
|
|
55
|
+
if (provider) bits.push(provider);
|
|
56
|
+
if (model) bits.push(model);
|
|
57
|
+
return bits.join(" ");
|
|
58
|
+
}
|
|
59
|
+
return truncateMiddle(JSON.stringify(record), 160);
|
|
60
|
+
};
|
|
61
|
+
var resolvePrewalkModel = async (state, context) => {
|
|
62
|
+
const configured = state.config.prewalk.model?.trim();
|
|
63
|
+
if (configured) {
|
|
64
|
+
if (configured.includes("/")) return configured;
|
|
65
|
+
context.ui.notify(
|
|
66
|
+
"prewalk.model must use provider/model form.",
|
|
67
|
+
"error"
|
|
68
|
+
);
|
|
69
|
+
return void 0;
|
|
70
|
+
}
|
|
71
|
+
let models = [];
|
|
72
|
+
try {
|
|
73
|
+
models = context.modelRegistry.getAvailable();
|
|
74
|
+
} catch {
|
|
75
|
+
models = [];
|
|
76
|
+
}
|
|
77
|
+
const keys = models.map((model) => `${model.provider}/${model.id}`).sort((left, right) => left.localeCompare(right));
|
|
78
|
+
if (keys.length === 0) {
|
|
79
|
+
context.ui.notify(
|
|
80
|
+
"Prewalk needs an explicit Pi executor model. Configure prewalk.model in /fabric settings.",
|
|
81
|
+
"error"
|
|
82
|
+
);
|
|
83
|
+
return void 0;
|
|
84
|
+
}
|
|
85
|
+
if (!context.hasUI) {
|
|
86
|
+
context.ui.notify(
|
|
87
|
+
"Prewalk needs prewalk.model in non-interactive mode.",
|
|
88
|
+
"error"
|
|
89
|
+
);
|
|
90
|
+
return void 0;
|
|
91
|
+
}
|
|
92
|
+
if (typeof context.ui.custom === "function") {
|
|
93
|
+
try {
|
|
94
|
+
const picked = await context.ui.custom(
|
|
95
|
+
(_tui, theme, _keybindings, done) => new FabricModelSelector({
|
|
96
|
+
theme,
|
|
97
|
+
source: buildModelSource(context.modelRegistry, resolveAgentDir()),
|
|
98
|
+
currentValue: "",
|
|
99
|
+
headerText: "Prewalk executor model. Fabric hands off at the next matching mutation boundary; Main continues on the picked model.",
|
|
100
|
+
inheritRow: false,
|
|
101
|
+
onSelect: (value) => done({ model: value }),
|
|
102
|
+
onCancel: () => done({ model: void 0 })
|
|
103
|
+
})
|
|
104
|
+
);
|
|
105
|
+
if (picked !== void 0) return picked.model;
|
|
106
|
+
} catch {
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
return context.ui.select("Prewalk executor model", keys);
|
|
110
|
+
};
|
|
111
|
+
var armPrewalk = async (host, state, context, pi, task = "") => {
|
|
112
|
+
if (state.config.prewalk.enabled === false) {
|
|
113
|
+
const error = "Fabric prewalk is disabled; re-enable with /fabric prewalk --enable or /fabric settings.";
|
|
114
|
+
context.ui.notify(error, "error");
|
|
115
|
+
return { ok: false, error };
|
|
116
|
+
}
|
|
117
|
+
if (!state.config.fullCodeMode || state.config.schema.mode === "enforce") {
|
|
118
|
+
const error = "Fabric prewalk requires full code mode and Schema enforce mode disabled.";
|
|
119
|
+
context.ui.notify(error, "error");
|
|
120
|
+
return { ok: false, error };
|
|
121
|
+
}
|
|
122
|
+
if (state.config.prewalk.mode === "trajectory" && !state.config.agents.enabled) {
|
|
123
|
+
const error = "Trajectory prewalk requires enabled agents. Choose in-place mode or enable agents.";
|
|
124
|
+
context.ui.notify(error, "error");
|
|
125
|
+
return { ok: false, error };
|
|
126
|
+
}
|
|
127
|
+
const model = await resolvePrewalkModel(state, context);
|
|
128
|
+
if (!model) return { ok: false, error: "Fabric prewalk was not armed." };
|
|
129
|
+
await host.armFabricPrewalkSession(state, context, pi, {
|
|
130
|
+
model,
|
|
131
|
+
...task ? { task } : {}
|
|
132
|
+
});
|
|
133
|
+
const modeLabel = state.config.prewalk.mode === "in-place" ? "Main will continue in place" : "the trajectory will move to a visible child executor";
|
|
134
|
+
context.ui.notify(
|
|
135
|
+
task ? `Fabric prewalk armed for the next matching Fabric boundary; ${modeLabel} with ${model}${state.config.prewalk.alwaysRearm ? "; always re-arm enabled" : ""}` : `Fabric prewalk armed for the next task; ${modeLabel} with ${model}${state.config.prewalk.alwaysRearm ? "; always re-arm enabled" : ""}`,
|
|
136
|
+
"info"
|
|
137
|
+
);
|
|
138
|
+
if (task) pi.sendUserMessage(task);
|
|
139
|
+
return { ok: true };
|
|
140
|
+
};
|
|
141
|
+
var formatRepairStatus = (status) => {
|
|
142
|
+
const top = status.fingerprints.slice(0, 8).map((entry) => ` ${entry.count}\xD7 ${entry.fingerprint}`).join("\n");
|
|
143
|
+
const rows = status.repairs.slice(0, 12).map(
|
|
144
|
+
(repair) => repair.kind === "keyAlias" ? ` ${repair.ref}: ${repair.from} \u2192 ${repair.to}` : ` ${repair.provider}.${repair.from} \u2192 ${repair.to}`
|
|
145
|
+
).join("\n");
|
|
146
|
+
return [
|
|
147
|
+
`repairs: ${status.enabled ? "on" : "off"} \xB7 digest ${status.catalogDigest.slice(0, 12) || "none"}`,
|
|
148
|
+
`table: ${status.repairCount} \xB7 apply hits ${status.applyHits} \xB7 invocation ${status.invocationErrors} \xB7 effect dropped ${status.effectDropped}`,
|
|
149
|
+
status.repairs.length > 0 ? `current:
|
|
150
|
+
${rows}` : "current: (empty)",
|
|
151
|
+
...status.storeError ? [`store: ${status.storeError}`] : [],
|
|
152
|
+
top ? `fingerprints:
|
|
153
|
+
${top}` : "fingerprints: (none this session)"
|
|
154
|
+
].join("\n");
|
|
155
|
+
};
|
|
156
|
+
function resolveActorTarget(actors, key) {
|
|
157
|
+
const byId = actors.find((candidate) => candidate.id === key);
|
|
158
|
+
if (byId) return { actor: byId };
|
|
159
|
+
const byName = actors.filter((candidate) => candidate.name === key);
|
|
160
|
+
if (byName.length === 1) return { actor: byName[0] };
|
|
161
|
+
if (byName.length > 1) return { ambiguous: byName };
|
|
162
|
+
const byPrefix = actors.filter((candidate) => candidate.id.startsWith(key));
|
|
163
|
+
if (byPrefix.length === 1) return { actor: byPrefix[0] };
|
|
164
|
+
if (byPrefix.length > 1) return { ambiguous: byPrefix };
|
|
165
|
+
return {};
|
|
166
|
+
}
|
|
167
|
+
function ambiguousActorMessage(key, candidates) {
|
|
168
|
+
const listed = candidates.map((candidate) => `${candidate.id.slice(0, 8)} (${candidate.name})`).join(", ");
|
|
169
|
+
return `Ambiguous Fabric actor: ${key} matches ${listed}; use a longer id`;
|
|
170
|
+
}
|
|
171
|
+
async function runFabricCommand(pi, deps, host, argumentsText, context) {
|
|
172
|
+
const { state, fabricUi, capturedTools, applyFabricMode, suspendToolCapture } = deps;
|
|
173
|
+
const { restoreBorrowedInPlaceMain, setActiveCompiledSurface, truncateMiddle } = host;
|
|
174
|
+
await state.ensure(context);
|
|
175
|
+
const [command = "dashboard", ...argumentsList] = argumentsText.trim().split(/\s+/).filter(Boolean);
|
|
176
|
+
if (command === "reload") {
|
|
177
|
+
fabricUi.stop();
|
|
178
|
+
suspendToolCapture();
|
|
179
|
+
try {
|
|
180
|
+
await state.initialize(context);
|
|
181
|
+
} catch (error) {
|
|
182
|
+
fabricUi.stop();
|
|
183
|
+
suspendToolCapture();
|
|
184
|
+
throw error;
|
|
185
|
+
}
|
|
186
|
+
if (state.kernelReloadRequired) {
|
|
187
|
+
await context.reload();
|
|
188
|
+
return;
|
|
189
|
+
}
|
|
190
|
+
await restoreBorrowedInPlaceMain(state.prewalk, pi, context);
|
|
191
|
+
context.ui.notify("Pi Fabric reloaded", "info");
|
|
192
|
+
deps.refreshToolDisplay?.();
|
|
193
|
+
return;
|
|
194
|
+
}
|
|
195
|
+
if (command === "settings") {
|
|
196
|
+
const { openFabricSettings } = await import("../ui/settings.js");
|
|
197
|
+
await openFabricSettings(context, {
|
|
198
|
+
reloadResources: () => context.reload(),
|
|
199
|
+
state,
|
|
200
|
+
applyFabricMode,
|
|
201
|
+
capturedTools,
|
|
202
|
+
// Only card-affecting preferences pay for a transcript refresh:
|
|
203
|
+
// refreshToolDisplay re-renders every fabric_exec card, so gating it
|
|
204
|
+
// on the display sections keeps unrelated saves off the transcript.
|
|
205
|
+
onConfigApplied: (id) => {
|
|
206
|
+
if (id.startsWith("codePreview.")) {
|
|
207
|
+
deps.refreshCodePreviewSettings?.();
|
|
208
|
+
deps.refreshToolDisplay?.();
|
|
209
|
+
} else if (id === "ui.toolDisplay" || id === "ui.showAgentToolPreview") {
|
|
210
|
+
deps.refreshToolDisplay?.();
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
});
|
|
214
|
+
return;
|
|
215
|
+
}
|
|
216
|
+
if (command === "schema") {
|
|
217
|
+
const requested = argumentsList[0];
|
|
218
|
+
if (requested === void 0) {
|
|
219
|
+
const status = state.schemaStatus(context);
|
|
220
|
+
context.ui.notify(
|
|
221
|
+
`Schema mode: ${status.mode} (${status.source}) \xB7 executor: ${status.executorRuntime} \xB7 /fabric schema [off|audit|enforce] overrides this session only`,
|
|
222
|
+
"info"
|
|
223
|
+
);
|
|
224
|
+
return;
|
|
225
|
+
}
|
|
226
|
+
if (requested !== "off" && requested !== "audit" && requested !== "enforce") {
|
|
227
|
+
context.ui.notify("Usage: /fabric schema [off|audit|enforce]", "warning");
|
|
228
|
+
return;
|
|
229
|
+
}
|
|
230
|
+
try {
|
|
231
|
+
state.setSchemaMode(context, requested);
|
|
232
|
+
} catch (error) {
|
|
233
|
+
context.ui.notify(
|
|
234
|
+
error instanceof Error ? error.message : String(error),
|
|
235
|
+
"error"
|
|
236
|
+
);
|
|
237
|
+
return;
|
|
238
|
+
}
|
|
239
|
+
context.ui.notify(
|
|
240
|
+
`Schema mode set to ${requested} for this session (config file unchanged; the next session starts from the configured mode)`,
|
|
241
|
+
"info"
|
|
242
|
+
);
|
|
243
|
+
return;
|
|
244
|
+
}
|
|
245
|
+
if (command === "prewalk") {
|
|
246
|
+
const option = argumentsList[0];
|
|
247
|
+
if (option === "--disable" || option === "--enable") {
|
|
248
|
+
const enabled = option === "--enable";
|
|
249
|
+
try {
|
|
250
|
+
const projectTrusted = context.isProjectTrusted();
|
|
251
|
+
const saved = saveFabricConfig(
|
|
252
|
+
{
|
|
253
|
+
cwd: context.cwd,
|
|
254
|
+
agentDir: resolveAgentDir(),
|
|
255
|
+
projectTrusted,
|
|
256
|
+
scope: projectTrusted ? "project" : "global"
|
|
257
|
+
},
|
|
258
|
+
{ prewalk: { enabled } }
|
|
259
|
+
);
|
|
260
|
+
state.reloadConfig(context);
|
|
261
|
+
if (!enabled) {
|
|
262
|
+
state.prewalk.cancel();
|
|
263
|
+
state.prewalkDrift.drop(context.sessionManager.getSessionId());
|
|
264
|
+
context.ui.setStatus("fabric-prewalk", void 0);
|
|
265
|
+
await restoreBorrowedInPlaceMain(state.prewalk, pi, context);
|
|
266
|
+
}
|
|
267
|
+
context.ui.notify(
|
|
268
|
+
`Fabric prewalk ${enabled ? "enabled" : "disabled"} (${saved.scope}: ${saved.path})`,
|
|
269
|
+
"info"
|
|
270
|
+
);
|
|
271
|
+
} catch (error) {
|
|
272
|
+
context.ui.notify(
|
|
273
|
+
`Failed to update Fabric prewalk setting: ${error instanceof Error ? error.message : String(error)}`,
|
|
274
|
+
"error"
|
|
275
|
+
);
|
|
276
|
+
}
|
|
277
|
+
return;
|
|
278
|
+
}
|
|
279
|
+
if (option === "--off" || option === "--cancel") {
|
|
280
|
+
state.prewalk.cancel();
|
|
281
|
+
state.prewalkDrift.drop(context.sessionManager.getSessionId());
|
|
282
|
+
context.ui.setStatus("fabric-prewalk", void 0);
|
|
283
|
+
await restoreBorrowedInPlaceMain(state.prewalk, pi, context);
|
|
284
|
+
context.ui.notify("Fabric prewalk cancelled", "info");
|
|
285
|
+
return;
|
|
286
|
+
}
|
|
287
|
+
if (option === "--status") {
|
|
288
|
+
const status = state.prewalk.status();
|
|
289
|
+
context.ui.notify(
|
|
290
|
+
status.state === "idle" ? "Fabric prewalk is idle" : `Fabric prewalk ${status.state} (${status.mode}) \u2192 ${status.model}${status.task ? `
|
|
291
|
+
Task: ${status.task}` : ""}`,
|
|
292
|
+
"info"
|
|
293
|
+
);
|
|
294
|
+
return;
|
|
295
|
+
}
|
|
296
|
+
const task = argumentsText.trim().slice(command.length).trim();
|
|
297
|
+
await armPrewalk(host, state, context, pi, task);
|
|
298
|
+
return;
|
|
299
|
+
}
|
|
300
|
+
if (command === "tasks") {
|
|
301
|
+
await fabricUi.openTasks(context, argumentsList[0]);
|
|
302
|
+
return;
|
|
303
|
+
}
|
|
304
|
+
if (command === "chat") {
|
|
305
|
+
await fabricUi.openConversation(context, argumentsList.join(" ") || void 0);
|
|
306
|
+
return;
|
|
307
|
+
}
|
|
308
|
+
if (command === "focus") {
|
|
309
|
+
fabricUi.focusWidget(context);
|
|
310
|
+
return;
|
|
311
|
+
}
|
|
312
|
+
if (command === "decisions") {
|
|
313
|
+
const { openFabricDecisions } = await import("../decisions/command.js");
|
|
314
|
+
const renderers = state.questionRenderers.active(state.config.ui.questionRenderers);
|
|
315
|
+
await openFabricDecisions(state.mesh, context, argumentsList[0], renderers);
|
|
316
|
+
return;
|
|
317
|
+
}
|
|
318
|
+
if (command === "programs" || command === "run") {
|
|
319
|
+
const { runFabricProgramsCommand } = await import("../programs/host.js");
|
|
320
|
+
await runFabricProgramsCommand({ state, pi }, context, command, argumentsText.trim().slice(command.length));
|
|
321
|
+
return;
|
|
322
|
+
}
|
|
323
|
+
if (command === "dashboard" || command === "ui") {
|
|
324
|
+
await fabricUi.openDashboard(context);
|
|
325
|
+
return;
|
|
326
|
+
}
|
|
327
|
+
if (command === "providers") {
|
|
328
|
+
const providers = state.registry.providers();
|
|
329
|
+
context.ui.notify(
|
|
330
|
+
providers.map((provider) => `${provider.name} \u2014 ${provider.description}`).join("\n"),
|
|
331
|
+
"info"
|
|
332
|
+
);
|
|
333
|
+
return;
|
|
334
|
+
}
|
|
335
|
+
if (command === "captured") {
|
|
336
|
+
const query = argumentsList.join(" ").toLowerCase();
|
|
337
|
+
const tools = capturedTools.list().filter(
|
|
338
|
+
(tool) => !query || `${tool.name} ${tool.definition.description} ${tool.sourceInfo.path}`.toLowerCase().includes(query)
|
|
339
|
+
);
|
|
340
|
+
const shown = tools.slice(0, 100);
|
|
341
|
+
context.ui.notify(
|
|
342
|
+
shown.length > 0 ? [
|
|
343
|
+
...shown.map((tool) => `${tool.name} [${tool.risk}] \u2014 ${tool.sourceInfo.path}`),
|
|
344
|
+
...tools.length > shown.length ? [`\u2026 ${tools.length - shown.length} more captured tools`] : []
|
|
345
|
+
].join("\n") : query ? `No captured extension tools matching ${JSON.stringify(query)}` : "No extension tools captured",
|
|
346
|
+
"info"
|
|
347
|
+
);
|
|
348
|
+
return;
|
|
349
|
+
}
|
|
350
|
+
if (command === "agents") {
|
|
351
|
+
const agents = state.agents.list();
|
|
352
|
+
context.ui.notify(
|
|
353
|
+
agents.length > 0 ? agents.map(
|
|
354
|
+
(agent) => `${agent.id.slice(0, 8)} ${agent.status} ${agent.runner}/${agent.transport} \u2014 ${agent.name}`
|
|
355
|
+
).join("\n") : "No Fabric agents",
|
|
356
|
+
"info"
|
|
357
|
+
);
|
|
358
|
+
return;
|
|
359
|
+
}
|
|
360
|
+
if (command === "actors") {
|
|
361
|
+
const actors = state.actors.list();
|
|
362
|
+
context.ui.notify(
|
|
363
|
+
actors.length > 0 ? actors.map(
|
|
364
|
+
(actor) => `${actor.id.slice(0, 8)} ${actor.status} ${actor.runner} q:${actor.queued} \u2014 ${actor.name}`
|
|
365
|
+
).join("\n") : "No Fabric actors",
|
|
366
|
+
"info"
|
|
367
|
+
);
|
|
368
|
+
return;
|
|
369
|
+
}
|
|
370
|
+
if (command === "messages") {
|
|
371
|
+
const id = argumentsList[0];
|
|
372
|
+
if (!id) {
|
|
373
|
+
context.ui.notify("Usage: /fabric messages <actor-id>", "warning");
|
|
374
|
+
return;
|
|
375
|
+
}
|
|
376
|
+
try {
|
|
377
|
+
const actor = state.actors.status(id);
|
|
378
|
+
const messages = state.actors.messages(actor.id, 20);
|
|
379
|
+
const shortId = actor.id.slice(0, 8);
|
|
380
|
+
const body = messages.length > 0 ? messages.map((message) => {
|
|
381
|
+
const value = message.text ?? message.error ?? message.action ?? "data";
|
|
382
|
+
const summary = truncateMiddle(value.replace(/\s+/g, " "), 500);
|
|
383
|
+
const runTag = message.runId ? ` [${message.runId.slice(0, 8)}]` : "";
|
|
384
|
+
const usageTag = message.usage ? ` \xB7 ${message.usage.input + message.usage.output} tok` : "";
|
|
385
|
+
return `${message.direction === "in" ? "\u2192" : "\u2190"} ${message.source}${runTag}: ${summary}${usageTag}`;
|
|
386
|
+
}).join("\n") : `No messages for ${actor.name}`;
|
|
387
|
+
const footer = `
|
|
388
|
+
Inspect LLM I/O: /fabric log ${shortId} \xB7 Export: /fabric export-log ${actor.name}`;
|
|
389
|
+
context.ui.notify(`${body}${footer}`, "info");
|
|
390
|
+
} catch (error) {
|
|
391
|
+
context.ui.notify(error instanceof Error ? error.message : String(error), "error");
|
|
392
|
+
}
|
|
393
|
+
return;
|
|
394
|
+
}
|
|
395
|
+
if (command === "log") {
|
|
396
|
+
const id = argumentsList[0];
|
|
397
|
+
if (!id) {
|
|
398
|
+
context.ui.notify(
|
|
399
|
+
"Usage: /fabric log <id> [session|run|all] [--lines N] [--run <runId>]",
|
|
400
|
+
"warning"
|
|
401
|
+
);
|
|
402
|
+
return;
|
|
403
|
+
}
|
|
404
|
+
let type = "session";
|
|
405
|
+
let lines = 40;
|
|
406
|
+
let runId;
|
|
407
|
+
for (let i = 1; i < argumentsList.length; i++) {
|
|
408
|
+
const arg = argumentsList[i];
|
|
409
|
+
if (arg === "session" || arg === "run" || arg === "all") type = arg;
|
|
410
|
+
else if ((arg === "--lines" || arg === "-n") && i + 1 < argumentsList.length) {
|
|
411
|
+
const n = Number(argumentsList[++i]);
|
|
412
|
+
if (n > 0) lines = Math.min(n, 5e3);
|
|
413
|
+
} else if (arg === "--run" && i + 1 < argumentsList.length) {
|
|
414
|
+
runId = argumentsList[++i];
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
try {
|
|
418
|
+
const actor = state.actors.status(id);
|
|
419
|
+
const log = state.actors.readLog(actor.id, { type, lines, ...runId ? { runId } : {} });
|
|
420
|
+
const parts = [`Actor ${actor.name} \xB7 ${log.sessionFile}`];
|
|
421
|
+
if (log.session.length > 0) {
|
|
422
|
+
parts.push(`\u2500\u2500 session (last ${log.session.length} lines) \u2500\u2500`);
|
|
423
|
+
for (const line of log.session) parts.push(summarizeLogLine(line.parsed ?? line.raw, truncateMiddle));
|
|
424
|
+
}
|
|
425
|
+
if (log.run) {
|
|
426
|
+
parts.push(
|
|
427
|
+
`\u2500\u2500 run ${log.run.runId.slice(0, 8)} (${log.run.status?.status ?? "?"}) \u2500\u2500`
|
|
428
|
+
);
|
|
429
|
+
for (const line of log.run.events) parts.push(summarizeLogLine(line.parsed ?? line.raw, truncateMiddle));
|
|
430
|
+
}
|
|
431
|
+
if (log.retainedRuns.length > 0) {
|
|
432
|
+
parts.push(
|
|
433
|
+
`retained runs: ${log.retainedRuns.map((r) => r.slice(0, 8)).join(" ")}`
|
|
434
|
+
);
|
|
435
|
+
}
|
|
436
|
+
context.ui.notify(
|
|
437
|
+
parts.length > 1 ? truncateMiddle(parts.join("\n"), 8e3) : `No log found for ${actor.name}`,
|
|
438
|
+
"info"
|
|
439
|
+
);
|
|
440
|
+
} catch (error) {
|
|
441
|
+
context.ui.notify(error instanceof Error ? error.message : String(error), "error");
|
|
442
|
+
}
|
|
443
|
+
return;
|
|
444
|
+
}
|
|
445
|
+
if (command === "export-log") {
|
|
446
|
+
const id = argumentsList[0];
|
|
447
|
+
const destArg = argumentsList.slice(1).join(" ");
|
|
448
|
+
if (!id) {
|
|
449
|
+
context.ui.notify("Usage: /fabric export-log <id> [path]", "warning");
|
|
450
|
+
return;
|
|
451
|
+
}
|
|
452
|
+
try {
|
|
453
|
+
const target = resolveActorTarget(state.actors.list(), id);
|
|
454
|
+
if (target.ambiguous) {
|
|
455
|
+
context.ui.notify(ambiguousActorMessage(id, target.ambiguous), "error");
|
|
456
|
+
return;
|
|
457
|
+
}
|
|
458
|
+
const actor = target.actor;
|
|
459
|
+
const dest = path.resolve(
|
|
460
|
+
destArg || path.join("fabric-logs", `export-${Date.now()}`)
|
|
461
|
+
);
|
|
462
|
+
fs.mkdirSync(dest, { recursive: true });
|
|
463
|
+
let label;
|
|
464
|
+
let copied = [];
|
|
465
|
+
if (actor) {
|
|
466
|
+
const full = state.actors.status(actor.id);
|
|
467
|
+
label = actor.name;
|
|
468
|
+
if (full.sessionFile && fs.existsSync(full.sessionFile)) {
|
|
469
|
+
fs.copyFileSync(full.sessionFile, path.join(dest, "session.jsonl"));
|
|
470
|
+
copied.push("session.jsonl");
|
|
471
|
+
}
|
|
472
|
+
if (full.logDir && fs.existsSync(full.logDir)) {
|
|
473
|
+
fs.cpSync(full.logDir, path.join(dest, "runs"), { recursive: true });
|
|
474
|
+
copied.push("runs/");
|
|
475
|
+
}
|
|
476
|
+
} else {
|
|
477
|
+
const runDir = state.agents.runDirectory(id);
|
|
478
|
+
const status = state.agents.status(id);
|
|
479
|
+
label = status.name;
|
|
480
|
+
if (runDir && fs.existsSync(runDir)) {
|
|
481
|
+
fs.cpSync(runDir, dest, { recursive: true });
|
|
482
|
+
copied.push("run/");
|
|
483
|
+
}
|
|
484
|
+
}
|
|
485
|
+
if (copied.length === 0) {
|
|
486
|
+
context.ui.notify(`No log files found for ${label}`, "warning");
|
|
487
|
+
return;
|
|
488
|
+
}
|
|
489
|
+
context.ui.notify(`Exported ${label} log \u2192 ${dest} (${copied.join(", ")})`, "info");
|
|
490
|
+
} catch (error) {
|
|
491
|
+
context.ui.notify(error instanceof Error ? error.message : String(error), "error");
|
|
492
|
+
}
|
|
493
|
+
return;
|
|
494
|
+
}
|
|
495
|
+
if (command === "clear-messages") {
|
|
496
|
+
const id = argumentsList[0];
|
|
497
|
+
if (!id) {
|
|
498
|
+
context.ui.notify("Usage: /fabric clear-messages <actor-id>", "warning");
|
|
499
|
+
return;
|
|
500
|
+
}
|
|
501
|
+
try {
|
|
502
|
+
const actor = state.actors.status(id);
|
|
503
|
+
await state.actors.clearMessages(actor.id);
|
|
504
|
+
context.ui.notify(`Cleared message history for ${actor.name}`, "info");
|
|
505
|
+
} catch (error) {
|
|
506
|
+
context.ui.notify(error instanceof Error ? error.message : String(error), "error");
|
|
507
|
+
}
|
|
508
|
+
return;
|
|
509
|
+
}
|
|
510
|
+
if (command === "events") {
|
|
511
|
+
const id = argumentsList[0];
|
|
512
|
+
if (!id) {
|
|
513
|
+
context.ui.notify("Usage: /fabric events <actor-id> [event...]", "warning");
|
|
514
|
+
return;
|
|
515
|
+
}
|
|
516
|
+
try {
|
|
517
|
+
const actor = state.actors.status(id);
|
|
518
|
+
const events = argumentsList.slice(1);
|
|
519
|
+
await state.actors.setEvents(actor.id, events);
|
|
520
|
+
context.ui.notify(
|
|
521
|
+
`Set ${actor.name} events: ${events.join(", ") || "(none)"}`,
|
|
522
|
+
"info"
|
|
523
|
+
);
|
|
524
|
+
} catch (error) {
|
|
525
|
+
context.ui.notify(error instanceof Error ? error.message : String(error), "error");
|
|
526
|
+
}
|
|
527
|
+
return;
|
|
528
|
+
}
|
|
529
|
+
if (command === "stop") {
|
|
530
|
+
const id = argumentsList[0];
|
|
531
|
+
if (!id) {
|
|
532
|
+
context.ui.notify("Usage: /fabric stop <id>", "warning");
|
|
533
|
+
return;
|
|
534
|
+
}
|
|
535
|
+
const target = resolveActorTarget(state.actors.list(), id);
|
|
536
|
+
if (target.ambiguous) {
|
|
537
|
+
context.ui.notify(ambiguousActorMessage(id, target.ambiguous), "error");
|
|
538
|
+
return;
|
|
539
|
+
}
|
|
540
|
+
const actor = target.actor;
|
|
541
|
+
if (actor) {
|
|
542
|
+
await state.actors.stop(actor.id);
|
|
543
|
+
context.ui.notify(`Stopped Fabric actor ${actor.id.slice(0, 8)}`, "info");
|
|
544
|
+
return;
|
|
545
|
+
}
|
|
546
|
+
const agent = state.agents.list().find((candidate) => candidate.id.startsWith(id));
|
|
547
|
+
if (!agent) {
|
|
548
|
+
context.ui.notify(`Unknown Fabric actor or agent: ${id}`, "error");
|
|
549
|
+
return;
|
|
550
|
+
}
|
|
551
|
+
await state.agents.stop(agent.id);
|
|
552
|
+
context.ui.notify(`Stopped Fabric agent ${agent.id.slice(0, 8)}`, "info");
|
|
553
|
+
return;
|
|
554
|
+
}
|
|
555
|
+
if (command === "remove" || command === "kill") {
|
|
556
|
+
const id = argumentsList[0];
|
|
557
|
+
if (!id) {
|
|
558
|
+
context.ui.notify("Usage: /fabric remove <id>", "warning");
|
|
559
|
+
return;
|
|
560
|
+
}
|
|
561
|
+
const target = resolveActorTarget(state.actors.list(), id);
|
|
562
|
+
if (target.ambiguous) {
|
|
563
|
+
context.ui.notify(ambiguousActorMessage(id, target.ambiguous), "error");
|
|
564
|
+
return;
|
|
565
|
+
}
|
|
566
|
+
const actor = target.actor;
|
|
567
|
+
if (actor) {
|
|
568
|
+
await state.actors.remove(actor.id);
|
|
569
|
+
context.ui.notify(`Removed Fabric actor ${actor.id.slice(0, 8)} (${actor.name})`, "info");
|
|
570
|
+
return;
|
|
571
|
+
}
|
|
572
|
+
const agent = state.agents.list().find((candidate) => candidate.id.startsWith(id));
|
|
573
|
+
if (!agent) {
|
|
574
|
+
context.ui.notify(`Unknown Fabric actor or agent: ${id}`, "error");
|
|
575
|
+
return;
|
|
576
|
+
}
|
|
577
|
+
await state.agents.stop(agent.id);
|
|
578
|
+
await state.agents.cleanup(agent.id);
|
|
579
|
+
context.ui.notify(`Removed Fabric agent ${agent.id.slice(0, 8)}`, "info");
|
|
580
|
+
return;
|
|
581
|
+
}
|
|
582
|
+
if (command === "attach") {
|
|
583
|
+
const id = argumentsList[0];
|
|
584
|
+
const agent = id ? state.agents.list().find((candidate) => candidate.id.startsWith(id)) : void 0;
|
|
585
|
+
if (!agent?.attachCommand) {
|
|
586
|
+
context.ui.notify("No attachable Fabric agent found", "warning");
|
|
587
|
+
return;
|
|
588
|
+
}
|
|
589
|
+
context.ui.notify(agent.attachCommand, "info");
|
|
590
|
+
return;
|
|
591
|
+
}
|
|
592
|
+
if (command === "global") {
|
|
593
|
+
const templates = state.globalActors.list();
|
|
594
|
+
context.ui.notify(
|
|
595
|
+
templates.length > 0 ? templates.map((template) => `${template.id.slice(0, 8)} global ${template.runner} \u2014 ${template.name}`).join("\n") : "No global Fabric actor templates",
|
|
596
|
+
"info"
|
|
597
|
+
);
|
|
598
|
+
return;
|
|
599
|
+
}
|
|
600
|
+
if (command === "import") {
|
|
601
|
+
const key = argumentsList[0];
|
|
602
|
+
if (!key) {
|
|
603
|
+
context.ui.notify("Usage: /fabric import <global-actor-name-or-id> [as <new-name>]", "warning");
|
|
604
|
+
return;
|
|
605
|
+
}
|
|
606
|
+
try {
|
|
607
|
+
const def = state.globalActors.resolve(key);
|
|
608
|
+
if (!def) {
|
|
609
|
+
context.ui.notify(`Unknown global actor: ${key}`, "error");
|
|
610
|
+
return;
|
|
611
|
+
}
|
|
612
|
+
const asIndex = argumentsList.indexOf("as");
|
|
613
|
+
const as = asIndex >= 0 && argumentsList[asIndex + 1] ? argumentsList[asIndex + 1] : void 0;
|
|
614
|
+
const actor = await state.actors.create(state.globalActors.toRequest(def, as));
|
|
615
|
+
context.ui.notify(`Imported global actor "${def.name}" as ${actor.name}`, "info");
|
|
616
|
+
} catch (error) {
|
|
617
|
+
context.ui.notify(error instanceof Error ? error.message : String(error), "error");
|
|
618
|
+
}
|
|
619
|
+
return;
|
|
620
|
+
}
|
|
621
|
+
if (command === "export") {
|
|
622
|
+
const id = argumentsList[0];
|
|
623
|
+
const overwrite = argumentsList.includes("--overwrite") || argumentsList.includes("-f");
|
|
624
|
+
if (!id) {
|
|
625
|
+
context.ui.notify("Usage: /fabric export <actor-id> [--overwrite]", "warning");
|
|
626
|
+
return;
|
|
627
|
+
}
|
|
628
|
+
try {
|
|
629
|
+
const target = resolveActorTarget(state.actors.list(), id);
|
|
630
|
+
if (target.ambiguous) {
|
|
631
|
+
context.ui.notify(ambiguousActorMessage(id, target.ambiguous), "error");
|
|
632
|
+
return;
|
|
633
|
+
}
|
|
634
|
+
const actor = target.actor;
|
|
635
|
+
if (!actor) {
|
|
636
|
+
context.ui.notify(`Unknown Fabric actor: ${id}`, "error");
|
|
637
|
+
return;
|
|
638
|
+
}
|
|
639
|
+
const def = state.actors.definition(actor.id);
|
|
640
|
+
const template = state.globalActors.create(def, overwrite);
|
|
641
|
+
context.ui.notify(`Exported "${template.name}" to global actors`, "info");
|
|
642
|
+
} catch (error) {
|
|
643
|
+
context.ui.notify(error instanceof Error ? error.message : String(error), "error");
|
|
644
|
+
}
|
|
645
|
+
return;
|
|
646
|
+
}
|
|
647
|
+
if (command === "repairs") {
|
|
648
|
+
if (argumentsList[0] !== void 0) {
|
|
649
|
+
context.ui.notify("Usage: /fabric repairs", "warning");
|
|
650
|
+
return;
|
|
651
|
+
}
|
|
652
|
+
context.ui.notify(formatRepairStatus(state.repairs.status()), "info");
|
|
653
|
+
return;
|
|
654
|
+
}
|
|
655
|
+
if (command === "entropy") {
|
|
656
|
+
const {
|
|
657
|
+
ENTROPY_METRIC_VERSION,
|
|
658
|
+
entropySurfaceHash,
|
|
659
|
+
liveSurfaceSnapshot,
|
|
660
|
+
surfaceFreedomReport,
|
|
661
|
+
machineSessionFilesAsync,
|
|
662
|
+
measureSessionCorpusAsync,
|
|
663
|
+
projectSessionFilesAsync,
|
|
664
|
+
sessionWindowEvidenceAsync,
|
|
665
|
+
measureEntropyAsync,
|
|
666
|
+
entropyRepairRows,
|
|
667
|
+
entropyReviewSignals,
|
|
668
|
+
formatEntropyReviewSignal,
|
|
669
|
+
loadObservationPoolAsync,
|
|
670
|
+
mergeObservationWindowAsync,
|
|
671
|
+
poolToValueObservations,
|
|
672
|
+
applyCompiledSurface,
|
|
673
|
+
normalFormEvidenceSummary,
|
|
674
|
+
loadCompiledSurfaceAsync,
|
|
675
|
+
parseCompiledSurfaceArtifact,
|
|
676
|
+
saveCompiledSurfaceAsync,
|
|
677
|
+
formatEntropyCommandHints,
|
|
678
|
+
formatEntropyMetric,
|
|
679
|
+
mergeCompiledSurfaces
|
|
680
|
+
} = await import("../entropy/index.js");
|
|
681
|
+
const exportArtifactIndex = argumentsList.indexOf("export-artifact");
|
|
682
|
+
if (exportArtifactIndex >= 0) {
|
|
683
|
+
const target = argumentsList[exportArtifactIndex + 1];
|
|
684
|
+
try {
|
|
685
|
+
const loaded = await loadCompiledSurfaceAsync(resolveAgentDir());
|
|
686
|
+
if (loaded.error) {
|
|
687
|
+
context.ui.notify(loaded.error, "error");
|
|
688
|
+
return;
|
|
689
|
+
}
|
|
690
|
+
if (!loaded.file) {
|
|
691
|
+
context.ui.notify(
|
|
692
|
+
"No compiled surface to export; wait for a compile to pass its gate",
|
|
693
|
+
"warning"
|
|
694
|
+
);
|
|
695
|
+
return;
|
|
696
|
+
}
|
|
697
|
+
const dest = path.resolve(
|
|
698
|
+
target ?? path.join(resolveAgentDir(), "fabric", "entropy", "artifact.json")
|
|
699
|
+
);
|
|
700
|
+
await fs.promises.mkdir(path.dirname(dest), { recursive: true });
|
|
701
|
+
await fs.promises.writeFile(dest, `${JSON.stringify(loaded.file, null, 2)}
|
|
702
|
+
`, {
|
|
703
|
+
encoding: "utf-8",
|
|
704
|
+
mode: 384
|
|
705
|
+
});
|
|
706
|
+
context.ui.notify(
|
|
707
|
+
`Exported compiled surface (${loaded.file.normalizations?.length ?? 0} normal-form plans; legacy restrictions inert) \u2192 ${dest}`,
|
|
708
|
+
"info"
|
|
709
|
+
);
|
|
710
|
+
} catch (error) {
|
|
711
|
+
context.ui.notify(
|
|
712
|
+
error instanceof Error ? error.message : String(error),
|
|
713
|
+
"error"
|
|
714
|
+
);
|
|
715
|
+
}
|
|
716
|
+
return;
|
|
717
|
+
}
|
|
718
|
+
const importIndex = argumentsList.indexOf("import");
|
|
719
|
+
if (importIndex >= 0) {
|
|
720
|
+
const source = argumentsList[importIndex + 1];
|
|
721
|
+
if (!source) {
|
|
722
|
+
context.ui.notify("Usage: /fabric entropy import <artifact.json>", "warning");
|
|
723
|
+
return;
|
|
724
|
+
}
|
|
725
|
+
try {
|
|
726
|
+
const raw = JSON.parse(
|
|
727
|
+
await fs.promises.readFile(path.resolve(source), "utf-8")
|
|
728
|
+
);
|
|
729
|
+
const incoming = parseCompiledSurfaceArtifact(raw);
|
|
730
|
+
if (!incoming) {
|
|
731
|
+
context.ui.notify(`Artifact is invalid: ${source}`, "error");
|
|
732
|
+
return;
|
|
733
|
+
}
|
|
734
|
+
const agentDir = resolveAgentDir();
|
|
735
|
+
const localLoaded = await loadCompiledSurfaceAsync(agentDir);
|
|
736
|
+
if (localLoaded.error) {
|
|
737
|
+
context.ui.notify(localLoaded.error, "error");
|
|
738
|
+
return;
|
|
739
|
+
}
|
|
740
|
+
const live = await liveSurfaceSnapshot({
|
|
741
|
+
registry: state.registry,
|
|
742
|
+
extensionContext: context,
|
|
743
|
+
cwd: state.cwd ?? context.cwd
|
|
744
|
+
});
|
|
745
|
+
const merged = mergeCompiledSurfaces(localLoaded.file, incoming, live);
|
|
746
|
+
const saved = await saveCompiledSurfaceAsync(agentDir, merged.file);
|
|
747
|
+
if (state.config.entropy.compile) setActiveCompiledSurface(saved.file);
|
|
748
|
+
context.ui.notify(
|
|
749
|
+
`Imported compiled surface: ${merged.file.normalizations?.length ?? 0} normal-form plans \xB7 ${merged.droppedOverlays + merged.droppedQuarantines + merged.droppedNormalizations} dropped (unproved rules or legacy restrictions)`,
|
|
750
|
+
"info"
|
|
751
|
+
);
|
|
752
|
+
} catch (error) {
|
|
753
|
+
context.ui.notify(
|
|
754
|
+
error instanceof Error ? error.message : String(error),
|
|
755
|
+
"error"
|
|
756
|
+
);
|
|
757
|
+
}
|
|
758
|
+
return;
|
|
759
|
+
}
|
|
760
|
+
const exportIndex = argumentsList.indexOf("export");
|
|
761
|
+
if (exportIndex >= 0) {
|
|
762
|
+
const target = argumentsList[exportIndex + 1];
|
|
763
|
+
try {
|
|
764
|
+
const snapshot = await liveSurfaceSnapshot({
|
|
765
|
+
registry: state.registry,
|
|
766
|
+
extensionContext: context,
|
|
767
|
+
cwd: state.cwd ?? context.cwd
|
|
768
|
+
});
|
|
769
|
+
const dest = path.resolve(
|
|
770
|
+
target ?? path.join(resolveAgentDir(), "fabric", "entropy", "surface.json")
|
|
771
|
+
);
|
|
772
|
+
await fs.promises.mkdir(path.dirname(dest), { recursive: true });
|
|
773
|
+
await fs.promises.writeFile(dest, `${JSON.stringify(snapshot, null, 2)}
|
|
774
|
+
`, {
|
|
775
|
+
encoding: "utf8",
|
|
776
|
+
mode: 384
|
|
777
|
+
});
|
|
778
|
+
context.ui.notify(
|
|
779
|
+
`Exported ${snapshot.actions.length} surface actions \u2192 ${dest}`,
|
|
780
|
+
"info"
|
|
781
|
+
);
|
|
782
|
+
} catch (error) {
|
|
783
|
+
context.ui.notify(
|
|
784
|
+
error instanceof Error ? error.message : String(error),
|
|
785
|
+
"error"
|
|
786
|
+
);
|
|
787
|
+
}
|
|
788
|
+
return;
|
|
789
|
+
}
|
|
790
|
+
const projectScope = argumentsList.includes("--project");
|
|
791
|
+
const scopedArguments = argumentsList.filter((argument) => argument !== "--project");
|
|
792
|
+
if (scopedArguments[0] !== void 0) {
|
|
793
|
+
context.ui.notify(
|
|
794
|
+
"Usage: /fabric entropy [--project] [export [path] | export-artifact [path] | import <path>]",
|
|
795
|
+
"warning"
|
|
796
|
+
);
|
|
797
|
+
return;
|
|
798
|
+
}
|
|
799
|
+
try {
|
|
800
|
+
const status = state.repairs.status();
|
|
801
|
+
const agentDir = resolveAgentDir();
|
|
802
|
+
const scopeCwd = state.cwd ?? context.cwd;
|
|
803
|
+
const [loadedCompiled, live, files] = await Promise.all([
|
|
804
|
+
loadCompiledSurfaceAsync(agentDir),
|
|
805
|
+
liveSurfaceSnapshot({
|
|
806
|
+
registry: state.registry,
|
|
807
|
+
extensionContext: context,
|
|
808
|
+
cwd: scopeCwd
|
|
809
|
+
}),
|
|
810
|
+
projectScope ? projectSessionFilesAsync(agentDir, scopeCwd) : machineSessionFilesAsync(agentDir, scopeCwd)
|
|
811
|
+
]);
|
|
812
|
+
const snapshot = loadedCompiled.file ? applyCompiledSurface(live, loadedCompiled.file) : live;
|
|
813
|
+
const freedom = surfaceFreedomReport(snapshot);
|
|
814
|
+
const surfaceDigest = entropySurfaceHash(snapshot);
|
|
815
|
+
const corpus = await measureSessionCorpusAsync({
|
|
816
|
+
files,
|
|
817
|
+
surface: snapshot,
|
|
818
|
+
catalogDigest: surfaceDigest
|
|
819
|
+
});
|
|
820
|
+
const formatFreedom = (value) => String(Math.round(value * 100) / 100);
|
|
821
|
+
const worst = freedom.actions.slice(0, 4).map((action) => `${action.ref} ${formatFreedom(action.freedom)}`).join(" \xB7 ");
|
|
822
|
+
const latest = corpus.latest;
|
|
823
|
+
const sessionsLine = corpus.sessions.length === 0 || latest === void 0 ? `session entropy (observed): no fabric_exec traces in the latest ${files.length} ${projectScope ? "project" : "machine"} sessions` : `session entropy (observed): ${corpus.sessions.length} sessions \xB7 latest ${latest.totals.operations} ops \xB7 invocation rejection rate ${formatEntropyMetric(latest.score)} \xB7 ${formatEntropyMetric(latest.totals.invocationRejectionsPer1k)}/1k calls \xB7 lower is better \xB7 slope ${formatEntropyMetric(corpus.trend.slopePerStep)}/session \xB7 ${latest.totals.invocationRejectionsPer1k === 0 && corpus.trend.slopePerStep <= 0 ? "no invocation rejections" : "invocation friction remains"}`;
|
|
824
|
+
const modelsLine = corpus.models.length > 1 ? `models: ${corpus.models.map(
|
|
825
|
+
(model) => `${model.model} behavioral ${formatEntropyMetric(model.latestBehavioralScore)} \xB7 slope ${formatEntropyMetric(model.slopePerSession)}`
|
|
826
|
+
).join(" \xB7 ")}` : void 0;
|
|
827
|
+
const compiledLine = loadedCompiled.error ? `compiled: unavailable \u2014 ${loadedCompiled.error}` : loadedCompiled.file ? `compiled: artifact v${loadedCompiled.file.version} \xB7 ${loadedCompiled.file.normalizations?.length ?? 0} normal-form plans \xB7 canonical capabilities preserved${loadedCompiled.file.version === 1 ? " \xB7 legacy restrictions inert (migration pending)" : ""}` : "compiled: none";
|
|
828
|
+
let reviewLine;
|
|
829
|
+
let normalizationLine = "normal forms: no witness evidence";
|
|
830
|
+
try {
|
|
831
|
+
const [windowEvidence, poolLoaded] = await Promise.all([
|
|
832
|
+
sessionWindowEvidenceAsync(files),
|
|
833
|
+
loadObservationPoolAsync(agentDir)
|
|
834
|
+
]);
|
|
835
|
+
const normal = normalFormEvidenceSummary(windowEvidence.traces);
|
|
836
|
+
normalizationLine = `normal forms: ${normal.normalizedCalls} calls normalized \xB7 ${normal.rulesApplied} rules applied \xB7 ${normal.succeeded} succeeded \xB7 ${normal.subsequentFailures} subsequent failures (not masked)`;
|
|
837
|
+
if (poolLoaded.error) {
|
|
838
|
+
reviewLine = `review: unavailable \u2014 ${poolLoaded.error}`;
|
|
839
|
+
} else if (windowEvidence.traces.length === 0) {
|
|
840
|
+
reviewLine = "review: no window evidence";
|
|
841
|
+
} else {
|
|
842
|
+
const mergedPool = await mergeObservationWindowAsync(
|
|
843
|
+
poolLoaded.file,
|
|
844
|
+
windowEvidence.observationWindows
|
|
845
|
+
);
|
|
846
|
+
const signals = entropyReviewSignals({
|
|
847
|
+
report: await measureEntropyAsync({
|
|
848
|
+
traces: windowEvidence.traces,
|
|
849
|
+
surface: snapshot,
|
|
850
|
+
catalogDigest: surfaceDigest
|
|
851
|
+
}),
|
|
852
|
+
traces: windowEvidence.traces,
|
|
853
|
+
surface: snapshot,
|
|
854
|
+
repairs: entropyRepairRows(state.repairs.repairs),
|
|
855
|
+
valueObservations: poolToValueObservations(mergedPool.file)
|
|
856
|
+
});
|
|
857
|
+
reviewLine = signals.length === 0 ? "review: none" : `review: ${signals.length} suggestion${signals.length === 1 ? "" : "s"} \xB7 ${signals.slice(0, 4).map(formatEntropyReviewSignal).join(" \xB7 ")}${signals.length > 4 ? ` \xB7 +${signals.length - 4} more` : ""}`;
|
|
858
|
+
}
|
|
859
|
+
} catch {
|
|
860
|
+
reviewLine = "review: unavailable";
|
|
861
|
+
}
|
|
862
|
+
context.ui.notify(
|
|
863
|
+
[
|
|
864
|
+
`entropy: metric v${ENTROPY_METRIC_VERSION} \xB7 surface ${surfaceDigest.slice(0, 12)} \xB7 ${freedom.actions.length} actions`,
|
|
865
|
+
`live: invocation errors ${status.invocationErrors} \xB7 effect dropped ${status.effectDropped} \xB7 aliases ${status.repairCount} \xB7 alias hits ${status.applyHits}`,
|
|
866
|
+
compiledLine,
|
|
867
|
+
normalizationLine,
|
|
868
|
+
reviewLine,
|
|
869
|
+
`surface freedom (diagnostic, not objective): mean ${formatFreedom(freedom.mean)}${worst ? ` \xB7 worst ${worst}` : ""}`,
|
|
870
|
+
sessionsLine,
|
|
871
|
+
...modelsLine ? [modelsLine] : [],
|
|
872
|
+
...formatEntropyCommandHints()
|
|
873
|
+
].join("\n"),
|
|
874
|
+
"info"
|
|
875
|
+
);
|
|
876
|
+
} catch (error) {
|
|
877
|
+
context.ui.notify(
|
|
878
|
+
error instanceof Error ? error.message : String(error),
|
|
879
|
+
"error"
|
|
880
|
+
);
|
|
881
|
+
}
|
|
882
|
+
return;
|
|
883
|
+
}
|
|
884
|
+
if (command !== "status") {
|
|
885
|
+
context.ui.notify(
|
|
886
|
+
"Usage: /fabric [status|dashboard|chat [id-or-name]|focus|prewalk [task]|prewalk --off|--disable|--enable|reload|providers|agents|actors|global|import <name> [as <new>]|export <id> [--overwrite]|messages <id>|clear-messages <id>|events <id> [event...]|log <id>|export-log <id>|attach <id>|stop <id>|remove <id>|kill <id>|repairs|entropy|decisions [id]|programs [promote|retire <ref>]|run <ref> [json]]",
|
|
887
|
+
"warning"
|
|
888
|
+
);
|
|
889
|
+
return;
|
|
890
|
+
}
|
|
891
|
+
const config = state.config;
|
|
892
|
+
context.ui.notify(
|
|
893
|
+
[
|
|
894
|
+
`cwd: ${state.cwd}`,
|
|
895
|
+
`mode: ${config.fullCodeMode ? "full code (Fabric-owned core tools)" : "orchestration-only (native Pi tools)"}`,
|
|
896
|
+
`providers: ${state.registry.providers().map((provider) => provider.name).join(", ")}`,
|
|
897
|
+
`runner: ${config.agents.runner} \xB7 transport: ${config.agents.transport} \xB7 model: ${config.agents.runner === "claude" ? config.agents.claude.model || "Claude default" : config.agents.runner === "veda" ? `${config.agents.veda.model || "Veda default"} \xB7 backend ${config.agents.veda.backend} \xB7 persona ${config.agents.veda.persona}` : config.agents.model || "inherit"}`,
|
|
898
|
+
`agent limits: concurrency ${config.agents.maxConcurrent}, per execution ${config.agents.maxPerExecution}, depth ${config.agents.maxDepth}`,
|
|
899
|
+
(() => {
|
|
900
|
+
const prewalk = state.prewalk.status();
|
|
901
|
+
return prewalk.state === "idle" ? `prewalk: idle \xB7 ${config.prewalk.mode} \xB7 model ${config.prewalk.model || "Ask each time"} \xB7 auto-arm & re-arm ${config.prewalk.alwaysRearm ? "on" : "off"}` : `prewalk: ${prewalk.state} \xB7 ${prewalk.mode} \u2192 ${prewalk.model}${prewalk.alwaysRearm ? " \xB7 always re-arm" : ""}`;
|
|
902
|
+
})(),
|
|
903
|
+
config.fullCodeMode && config.capture.enabled ? `captured tools: ${capturedTools.size} \xB7 model visibility: ${config.capture.hideFromModel ? "hidden" : "visible"}` : "captured tools: disabled (native registry preserved)",
|
|
904
|
+
...config.foreground.tools.length > 0 ? [`foreground: ${formatForeground(state.foregroundTools())}`] : [],
|
|
905
|
+
`actors: ${state.actors.list().length} \xB7 mesh: ${config.mesh.enabled ? state.mesh.root : "disabled"}`,
|
|
906
|
+
`MCP: ${config.mcp.enabled ? "enabled" : "disabled"}`,
|
|
907
|
+
`UI: ${config.ui.enabled ? `${config.ui.widget} widget above chat` : "disabled"}`
|
|
908
|
+
].join("\n"),
|
|
909
|
+
"info"
|
|
910
|
+
);
|
|
911
|
+
}
|
|
912
|
+
export {
|
|
913
|
+
armPrewalk,
|
|
914
|
+
runFabricCommand
|
|
915
|
+
};
|
|
916
|
+
//# sourceMappingURL=fabric-handler.js.map
|