@e4779/pi-fabric 0.117.2-fork.31 → 0.131.4-fork.33
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 +13 -6
- 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/feedback.d.ts +5 -0
- package/dist/actors/feedback.d.ts.map +1 -0
- 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/completion-inbox.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-core-socket.d.ts +13 -0
- package/dist/agents/transports/herdr-core-socket.d.ts.map +1 -0
- package/dist/agents/transports/herdr-core-transport.d.ts +10 -0
- package/dist/agents/transports/herdr-core-transport.d.ts.map +1 -0
- 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 +38 -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-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-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-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-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-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-ASOJYFKU.js +1316 -0
- package/dist/chunks/chunk-ASOJYFKU.js.map +7 -0
- 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-C7Z6F3SO.js → chunk-DGUXJSYA.js} +64 -33
- package/dist/chunks/chunk-DGUXJSYA.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-XCEEQ5AB.js → chunk-G2DZJ5LK.js} +1607 -1567
- package/dist/chunks/chunk-G2DZJ5LK.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-GO32KSEZ.js → chunk-HRVYXRWZ.js} +85 -10
- package/dist/chunks/chunk-HRVYXRWZ.js.map +7 -0
- package/dist/chunks/{chunk-MLLYR3Y6.js → chunk-HSEZPCL5.js} +19 -78
- package/dist/chunks/chunk-HSEZPCL5.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-3FJUP3GV.js → chunk-L6H46CPY.js} +2 -2
- package/dist/chunks/{chunk-SPCJXN4K.js → chunk-LKYLD5SN.js} +298 -65
- package/dist/chunks/chunk-LKYLD5SN.js.map +7 -0
- package/dist/chunks/{chunk-K7J2ABAZ.js → chunk-LRSZFYUC.js} +92 -32
- package/dist/chunks/chunk-LRSZFYUC.js.map +7 -0
- package/dist/chunks/{chunk-GIK2WNAK.js → chunk-LZ2ZXOCU.js} +112 -23
- package/dist/chunks/chunk-LZ2ZXOCU.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-ASSLHWZS.js → chunk-MX53BRAC.js} +2 -2
- 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-3UGN25XS.js → chunk-RKJPBTBB.js} +98 -1664
- package/dist/chunks/chunk-RKJPBTBB.js.map +7 -0
- 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-EKODKR6Y.js → chunk-TEMKDJJY.js} +148 -72
- package/dist/chunks/chunk-TEMKDJJY.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-LNASO4VT.js → chunk-U6Y6TKJL.js} +45 -20
- package/dist/chunks/chunk-U6Y6TKJL.js.map +7 -0
- package/dist/chunks/chunk-UD7LFV43.js +28 -0
- package/dist/chunks/chunk-UD7LFV43.js.map +7 -0
- 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-VGRUWTMG.js} +1993 -659
- package/dist/chunks/chunk-VGRUWTMG.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-WKFRGICG.js +101 -0
- package/dist/chunks/chunk-WKFRGICG.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-5UBRGTVN.js → chunk-ZHROHNEE.js} +31 -15
- package/dist/chunks/chunk-ZHROHNEE.js.map +7 -0
- 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 +40 -3
- 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/call-presentation.d.ts +14 -0
- package/dist/core/call-presentation.d.ts.map +1 -0
- 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 +13 -10
- 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 +2205 -839
- 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/feedback.d.ts +5 -0
- package/dist/feedback.d.ts.map +1 -0
- 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/main-agent.d.ts +2 -1
- package/dist/main-agent.d.ts.map +1 -1
- 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-model.d.ts.map +1 -1
- package/dist/ui/dashboard.d.ts.map +1 -1
- package/dist/ui/dashboard.js +23 -16
- package/dist/ui/dashboard.js.map +2 -2
- package/dist/ui/fabric-render.d.ts +7 -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 +2 -1
- package/dist/ui/settings-values.d.ts.map +1 -1
- package/dist/ui/settings.js +60 -19
- 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 +40 -18
- 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 +172 -22
- package/docs/architecture.md +5 -1
- package/docs/audit-trace.md +2 -1
- package/docs/background-tasks.md +126 -28
- package/docs/codemode-parity.md +2 -2
- package/docs/compaction.md +21 -5
- package/docs/components.md +1 -1
- package/docs/configuration.md +113 -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 +22 -17
- package/docs/jev.md +2 -2
- 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 +94 -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 +110 -22
- package/skillsets/typescript/fabric-exec/SKILL.md +7 -7
- package/skillsets/typescript/fabric-exec/references/agents.md +17 -8
- 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-C7Z6F3SO.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-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-3FJUP3GV.js.map → chunk-L6H46CPY.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-ASSLHWZS.js.map → chunk-MX53BRAC.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-LEU5CDSL.js.map → chunk-XFOSUGLU.js.map} +0 -0
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
#!/usr/bin/env bun
|
|
2
|
+
// Proves the registered gdp-wired kernels and compiles them to the generated
|
|
3
|
+
// modules Fabric executes. `--artifact` only checks the receipt's hashes, so a
|
|
4
|
+
// build never loads the prover.
|
|
5
|
+
import { createHash } from "node:crypto";
|
|
6
|
+
import { readFileSync, writeFileSync } from "node:fs";
|
|
7
|
+
import { availableParallelism } from "node:os";
|
|
8
|
+
import type { ProofTask, ProofResult } from "./verified-kernel-worker.js";
|
|
9
|
+
import { resolve } from "node:path";
|
|
10
|
+
import { fileURLToPath } from "node:url";
|
|
11
|
+
|
|
12
|
+
const root = fileURLToPath(new URL("../", import.meta.url));
|
|
13
|
+
const read = (path: string): string => readFileSync(resolve(root, path), "utf8");
|
|
14
|
+
const hash = (text: string): string => createHash("sha256").update(text).digest("hex");
|
|
15
|
+
const receipt = "src/verified/generated/manifest.json";
|
|
16
|
+
const stems = ["policy", "compaction", "resources", "lifecycle", "storage", "provider", "authority", "grants", "speculation", "budget", "actor-name"];
|
|
17
|
+
const sources = ["proofs/index.ts", "proofs/kernel.ts", ...stems.map((stem) => `proofs/${stem}.ts`), "scripts/verified-kernels.ts", "scripts/verified-kernel-pool.ts", "scripts/verified-kernel-worker.ts"];
|
|
18
|
+
const artifacts = stems.flatMap((stem) => [`src/verified/generated/${stem}.js`, `src/verified/generated/${stem}.d.ts`]);
|
|
19
|
+
const pinned = (): string => {
|
|
20
|
+
const version = (JSON.parse(read("package.json")) as { devDependencies?: Record<string, string> }).devDependencies?.["gdp-wired"];
|
|
21
|
+
if (!version || !/^\d+\.\d+\.\d+$/.test(version)) throw new Error("gdp-wired must be pinned to an exact devDependency version");
|
|
22
|
+
return version;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
interface Manifest {
|
|
26
|
+
version: 3;
|
|
27
|
+
prover: string;
|
|
28
|
+
inputs: Record<string, string>;
|
|
29
|
+
outputs: Record<string, string>;
|
|
30
|
+
claims: Record<string, string[]>;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const mode = process.argv[2];
|
|
34
|
+
const explicitJobs = process.argv.length === 5 && process.argv[3] === "--jobs";
|
|
35
|
+
const jobs = explicitJobs ? Number(process.argv[4]) : Math.min(4, availableParallelism());
|
|
36
|
+
if ((process.argv.length !== 3 && !explicitJobs) || !["--write", "--check", "--artifact"].includes(mode ?? "") ||
|
|
37
|
+
(mode === "--artifact" && explicitJobs) || !Number.isSafeInteger(jobs) || jobs < 1 || jobs > 4) {
|
|
38
|
+
throw new Error("Usage: bun scripts/verified-kernels.ts --write|--check [--jobs 1..4] | --artifact");
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
if (mode === "--artifact") {
|
|
42
|
+
const stored = JSON.parse(read(receipt)) as Manifest;
|
|
43
|
+
const stale = stored.version !== 3 || stored.prover !== `gdp-wired@${pinned()}` ||
|
|
44
|
+
JSON.stringify(stored.inputs) !== JSON.stringify(Object.fromEntries(sources.map((path) => [path, hash(read(path))]))) ||
|
|
45
|
+
JSON.stringify(stored.outputs) !== JSON.stringify(Object.fromEntries(artifacts.map((path) => [path, hash(read(path))])));
|
|
46
|
+
if (stale) throw new Error("Verified kernel artifact is stale. Run bun run proof:generate.");
|
|
47
|
+
console.log("Verified kernel artifact matches its proof sources.");
|
|
48
|
+
process.exit(0);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
const installed = (JSON.parse(read("node_modules/gdp-wired/package.json")) as { version: string }).version;
|
|
52
|
+
if (installed !== pinned()) throw new Error(`gdp-wired ${pinned()} is pinned, but ${installed} is installed`);
|
|
53
|
+
const { modules } = await import("../proofs/index.js");
|
|
54
|
+
const { runWorkerTasks } = await import("./verified-kernel-pool.js");
|
|
55
|
+
const started = performance.now();
|
|
56
|
+
const plans = modules.map(module => ({ module, kernels: module.kernels() }));
|
|
57
|
+
if (new Set(modules.map(module => module.stem)).size !== stems.length || modules.length !== stems.length) throw new Error("Kernel module registry differs from the artifact inventory");
|
|
58
|
+
for (const { module, kernels } of plans) {
|
|
59
|
+
if (`proofs/${module.stem}.ts` !== module.source || !stems.includes(module.stem) || new Set(kernels.map(kernel => kernel.id)).size !== kernels.length) throw new Error(`Invalid kernel module ${module.stem}`);
|
|
60
|
+
}
|
|
61
|
+
const tasks: ProofTask[] = plans.flatMap(({ module, kernels }) => [
|
|
62
|
+
...kernels.map(kernel => ({ kind: "kernel" as const, stem: module.stem, id: kernel.id })),
|
|
63
|
+
{ kind: "mutations" as const, stem: module.stem },
|
|
64
|
+
]);
|
|
65
|
+
console.log(`Checking ${tasks.length - modules.length} kernels and ${modules.reduce((count, module) => count + module.bugs.length, 0)} broken variants with ${jobs} isolated workers`);
|
|
66
|
+
const results = await runWorkerTasks<ProofTask, ProofResult>(tasks, {
|
|
67
|
+
worker: new URL("./verified-kernel-worker.ts", import.meta.url), jobs,
|
|
68
|
+
onResult(result, task) {
|
|
69
|
+
if (!result || result.kind !== task.kind || result.stem !== task.stem || !Array.isArray(result.failures)) throw new Error("Invalid proof worker result");
|
|
70
|
+
if (task.kind === "kernel") {
|
|
71
|
+
if (result.kind !== "kernel" || result.id !== task.id || typeof result.compiled !== "string") throw new Error("Missing compiled kernel result");
|
|
72
|
+
const kernel = plans.find(plan => plan.module.stem === task.stem)!.kernels.find(kernel => kernel.id === task.id)!;
|
|
73
|
+
const names = [...(kernel.laws ?? []), ...(kernel.stepLaws ?? [])].map(law => law.name).join("; ");
|
|
74
|
+
const expected = [
|
|
75
|
+
...(kernel.rule && names ? [`${kernel.id}: ${names}`] : []),
|
|
76
|
+
...(kernel.decisions ?? []).map(decision => `${kernel.id}: ${decision.name}`),
|
|
77
|
+
];
|
|
78
|
+
if (JSON.stringify(result.claims) !== JSON.stringify(expected)) throw new Error(`Incomplete proof claims for ${task.stem}.${task.id}`);
|
|
79
|
+
console.log(`${result.failures.length ? "failed" : "proved"} ${task.stem}.${task.id} (${Math.round(result.seconds * 1000)} ms)`);
|
|
80
|
+
} else {
|
|
81
|
+
const count = plans.find(plan => plan.module.stem === task.stem)!.module.bugs.length;
|
|
82
|
+
if (result.kind !== "mutations" || (result.refused !== count && result.failures.length === 0)) throw new Error(`Incomplete mutation refusals for ${task.stem}`);
|
|
83
|
+
console.log(`refused ${result.refused} broken variants of ${task.stem}`);
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
});
|
|
87
|
+
const proved = new Map(results.filter((result): result is Extract<ProofResult, { kind: "kernel" }> => result.kind === "kernel").map(result => [`${result.stem}.${result.id}`, result]));
|
|
88
|
+
|
|
89
|
+
const failures = results.flatMap(result => result.failures);
|
|
90
|
+
const claims: Record<string, string[]> = {};
|
|
91
|
+
const files = new Map<string, string>();
|
|
92
|
+
for (const { module, kernels } of plans) {
|
|
93
|
+
claims[module.stem] = kernels.flatMap(kernel => proved.get(`${module.stem}.${kernel.id}`)!.claims);
|
|
94
|
+
|
|
95
|
+
const header = `// Generated by scripts/verified-kernels.ts from ${module.source} with gdp-wired@${installed}. Do not edit.\n`;
|
|
96
|
+
// Each compiled machine opens with the runtime helpers it calls, one per line;
|
|
97
|
+
// emit each helper once per module.
|
|
98
|
+
const helpers = new Map<string, string>();
|
|
99
|
+
const js = kernels.map((kernel) => {
|
|
100
|
+
const lines = proved.get(`${module.stem}.${kernel.id}`)!.compiled.trimEnd().split("\n");
|
|
101
|
+
const start = lines.findIndex((line) => line.startsWith("export function init("));
|
|
102
|
+
if (start < 1) throw new Error(`Unrecognized compiled machine layout in ${kernel.id}`);
|
|
103
|
+
for (const line of lines.slice(1, start)) {
|
|
104
|
+
const name = /^function (\$\w+)\(/.exec(line)?.[1];
|
|
105
|
+
if (name === undefined || (helpers.has(name) && helpers.get(name) !== line)) throw new Error(`Unrecognized compiled machine layout in ${kernel.id}`);
|
|
106
|
+
helpers.set(name, line);
|
|
107
|
+
}
|
|
108
|
+
// `fork` copies a state for branching searches; Fabric never branches, so it is not shipped.
|
|
109
|
+
const forkAt = lines.findIndex((line) => line.startsWith("export function fork("));
|
|
110
|
+
if (forkAt < start || lines[forkAt + 2] !== "}") throw new Error(`Unrecognized compiled machine layout in ${kernel.id}`);
|
|
111
|
+
const body = [lines[0], ...lines.slice(start, forkAt), ...lines.slice(forkAt + 3)].join("\n").replace(/^export function /gm, "function ");
|
|
112
|
+
if (/\bexport\b|\bimport\b|\brequire\(|\bprocess\b|\bglobalThis\b/.test(body)) throw new Error(`Unexpected host access in ${kernel.id}`);
|
|
113
|
+
return `export const ${kernel.id} = /* @__PURE__ */ (() => {\n${body}\nreturn { init, step };\n})();\n`;
|
|
114
|
+
}).join("\n");
|
|
115
|
+
const dts = [
|
|
116
|
+
"export interface MachineState { scalars: Record<string, number>; maps: Record<string, Map<number, number>>; defaults?: Record<string, number> }",
|
|
117
|
+
"export interface Machine { init(params: object): MachineState; step(params: object, state: MachineState, input: object): MachineState }",
|
|
118
|
+
...kernels.map((kernel) => `export declare const ${kernel.id}: Machine;`),
|
|
119
|
+
].join("\n");
|
|
120
|
+
files.set(`src/verified/generated/${module.stem}.js`, `${header}${[...helpers.values()].join("\n")}\n\n${js}`);
|
|
121
|
+
files.set(`src/verified/generated/${module.stem}.d.ts`, `${header}${dts}\n`);
|
|
122
|
+
}
|
|
123
|
+
if (failures.length) throw new Error(`Verified kernels failed:\n${failures.join("\n")}`);
|
|
124
|
+
|
|
125
|
+
const manifest: Manifest = {
|
|
126
|
+
version: 3,
|
|
127
|
+
prover: `gdp-wired@${installed}`,
|
|
128
|
+
inputs: Object.fromEntries(sources.map((path) => [path, hash(read(path))])),
|
|
129
|
+
outputs: Object.fromEntries(artifacts.map((path) => [path, hash(files.get(path)!)])),
|
|
130
|
+
claims,
|
|
131
|
+
};
|
|
132
|
+
files.set(receipt, `${JSON.stringify(manifest, null, 2)}\n`);
|
|
133
|
+
if (mode === "--write") {
|
|
134
|
+
for (const [path, text] of files) writeFileSync(resolve(root, path), text);
|
|
135
|
+
console.log(`Wrote ${files.size} verified kernel artifacts.`);
|
|
136
|
+
} else {
|
|
137
|
+
const drift = [...files].filter(([path, text]) => { try { return read(path) !== text; } catch { return true; } }).map(([path]) => path);
|
|
138
|
+
if (drift.length) throw new Error(`Generated kernels differ from the proved sources: ${drift.join(", ")}. Run bun run proof:generate.`);
|
|
139
|
+
console.log("Verified kernels reproduce byte for byte.");
|
|
140
|
+
}
|
|
141
|
+
console.log(`Proof verification completed in ${((performance.now() - started) / 1000).toFixed(2)}s (${jobs} workers)`);
|
|
@@ -6,11 +6,13 @@ disable-model-invocation: true
|
|
|
6
6
|
|
|
7
7
|
# Fabric Council — Python
|
|
8
8
|
|
|
9
|
-
Use one Python `fabric_exec`. Pass `payloads.task
|
|
9
|
+
Use one Python `fabric_exec`. Pass `payloads.task`, a JSON array in `payloads.roles`, and a synthesis model key in `payloads.synthesis`; an empty `payloads.synthesis` keeps the session default. Choose 3–8 distinct non-empty roles with useful disagreements, not redundant reviewers. A role is a string or an object with `role` and optional `model` and `thinking`; a role without `model` runs on the session default. Label the outer `display` and every child.
|
|
10
10
|
|
|
11
11
|
```python
|
|
12
12
|
import asyncio
|
|
13
13
|
import json
|
|
14
|
+
import uuid
|
|
15
|
+
from datetime import datetime, timezone
|
|
14
16
|
|
|
15
17
|
async def ask(task, name, options=None):
|
|
16
18
|
request = {"task": task, "name": name, "tools": ["read", "grep", "find", "ls"]}
|
|
@@ -21,34 +23,106 @@ async def ask(task, name, options=None):
|
|
|
21
23
|
raise RuntimeError(result.get("error") or result["status"])
|
|
22
24
|
return result["value"] if result.get("value") is not None else result["text"]
|
|
23
25
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
role = role.strip()
|
|
27
|
-
if role and role not in roles:
|
|
28
|
-
roles.append(role)
|
|
29
|
-
if len(roles) < 3 or len(roles) > 5:
|
|
30
|
-
raise ValueError("Council requires 3–5 distinct non-empty roles.")
|
|
26
|
+
def text(value):
|
|
27
|
+
return value.strip() if isinstance(value, str) else ""
|
|
31
28
|
|
|
32
|
-
|
|
29
|
+
def canonical(keys, needle, owner):
|
|
30
|
+
key = keys.get(needle.lower())
|
|
31
|
+
if key is not None:
|
|
32
|
+
return key
|
|
33
|
+
model_id = needle.lower().split("/")[-1]
|
|
34
|
+
near = [candidate for candidate in keys.values() if candidate.lower().endswith("/" + model_id)]
|
|
35
|
+
hint = " Did you mean: " + ", ".join(near[:8]) + "?" if near else ""
|
|
36
|
+
raise ValueError("Council: model " + needle + " for " + owner + " is not in the model registry." + hint)
|
|
37
|
+
|
|
38
|
+
specs = json.loads(π.roles)
|
|
39
|
+
if not isinstance(specs, list):
|
|
40
|
+
raise ValueError("Council roles must be a JSON array.")
|
|
41
|
+
seats = []
|
|
42
|
+
for spec in specs:
|
|
43
|
+
entry = {"role": spec} if isinstance(spec, str) else spec
|
|
44
|
+
if not isinstance(entry, dict):
|
|
45
|
+
raise ValueError("Each council role must be a string or an object with role and optional model and thinking.")
|
|
46
|
+
role = text(entry.get("role"))
|
|
47
|
+
if not role:
|
|
48
|
+
if isinstance(spec, str):
|
|
49
|
+
continue
|
|
50
|
+
raise ValueError("A council role object needs a non-empty role.")
|
|
51
|
+
if [value for value in [entry.get("model"), entry.get("thinking")] if value is not None and not isinstance(value, str)]:
|
|
52
|
+
raise ValueError("Council role " + role + " has a non-string model or thinking.")
|
|
53
|
+
if text(entry.get("thinking")) and text(entry.get("thinking")) not in ["off", "minimal", "low", "medium", "high", "xhigh", "max"]:
|
|
54
|
+
raise ValueError("Council role " + role + " has unknown thinking " + text(entry.get("thinking")) + ".")
|
|
55
|
+
seat = {"role": role}
|
|
56
|
+
if text(entry.get("model")):
|
|
57
|
+
seat["model"] = text(entry.get("model"))
|
|
58
|
+
if text(entry.get("thinking")):
|
|
59
|
+
seat["thinking"] = text(entry.get("thinking"))
|
|
60
|
+
earlier = [other for other in seats if other["role"] == role]
|
|
61
|
+
if not earlier:
|
|
62
|
+
seats.append(seat)
|
|
63
|
+
elif earlier[0].get("model") != seat.get("model") or earlier[0].get("thinking") != seat.get("thinking"):
|
|
64
|
+
raise ValueError("Council role " + role + " appears twice with different settings.")
|
|
65
|
+
if len(seats) < 3 or len(seats) > 8:
|
|
66
|
+
raise ValueError("Council requires 3–8 distinct non-empty roles.")
|
|
67
|
+
synthesis_model = text(π.synthesis)
|
|
68
|
+
if synthesis_model or [seat for seat in seats if seat.get("model")]:
|
|
69
|
+
# Match registry keys exactly before any agent runs, so a typo spends nothing.
|
|
70
|
+
keys = {}
|
|
71
|
+
for entry in await tools.models():
|
|
72
|
+
keys[entry["key"].lower()] = entry["key"]
|
|
73
|
+
for seat in seats:
|
|
74
|
+
if seat.get("model"):
|
|
75
|
+
seat["model"] = canonical(keys, seat["model"], "role " + seat["role"])
|
|
76
|
+
if synthesis_model:
|
|
77
|
+
synthesis_model = canonical(keys, synthesis_model, "synthesis")
|
|
78
|
+
|
|
79
|
+
async def review(seat):
|
|
80
|
+
options = {}
|
|
81
|
+
outcome = {"role": seat["role"]}
|
|
82
|
+
if seat.get("model"):
|
|
83
|
+
options["model"] = seat["model"]
|
|
84
|
+
outcome["model"] = seat["model"]
|
|
85
|
+
if seat.get("thinking"):
|
|
86
|
+
options["thinking"] = seat["thinking"]
|
|
33
87
|
try:
|
|
34
|
-
report = await ask("Act as the " + role + " council member. Independently analyze:\n" + π.task, role)
|
|
35
|
-
|
|
88
|
+
report = await ask("Act as the " + seat["role"] + " council member. Independently analyze:\n" + π.task, seat["role"], options)
|
|
89
|
+
outcome.update({"status": "completed", "report": report})
|
|
36
90
|
except Exception as error:
|
|
37
|
-
|
|
91
|
+
outcome.update({"status": "failed", "error": str(error)})
|
|
92
|
+
return outcome
|
|
38
93
|
|
|
39
|
-
outcomes = await asyncio.gather(*[review(
|
|
94
|
+
outcomes = await asyncio.gather(*[review(seat) for seat in seats])
|
|
40
95
|
completed = [item for item in outcomes if item["status"] == "completed"]
|
|
41
96
|
failures = [item for item in outcomes if item["status"] == "failed"]
|
|
42
|
-
coverage = {"requested": len(
|
|
97
|
+
coverage = {"requested": len(seats), "completed": len(completed)}
|
|
98
|
+
# Name the model each seat and the synthesis requested; an unpinned seat ran on the session default.
|
|
99
|
+
summary = {"coverage": coverage, "seats": [dict(seats[index], status=outcomes[index]["status"]) for index in range(len(seats))]}
|
|
100
|
+
if synthesis_model:
|
|
101
|
+
summary["synthesisModel"] = synthesis_model
|
|
43
102
|
if not completed:
|
|
44
|
-
return
|
|
103
|
+
return dict(summary, status="failed", failures=failures, result=None)
|
|
104
|
+
# Park completed reports in mesh before synthesis: an audit trail that survives this
|
|
105
|
+
# program, and full-text recovery when synthesis fails or a budget runs out.
|
|
106
|
+
# The run id keeps same-second councils from overwriting each other: mesh.put is create-or-update.
|
|
107
|
+
reports_key = "council/" + datetime.now(timezone.utc).strftime("%Y-%m-%d-%H-%M-%S") + "-" + uuid.uuid4().hex[:8] + "/reports"
|
|
108
|
+
try:
|
|
109
|
+
await mesh.put(
|
|
110
|
+
key=reports_key,
|
|
111
|
+
value=[
|
|
112
|
+
{"role": item.get("role"), **({"model": item["model"]} if item.get("model") else {}), "report": item["report"]}
|
|
113
|
+
for item in completed
|
|
114
|
+
],
|
|
115
|
+
)
|
|
116
|
+
reports = reports_key
|
|
117
|
+
except Exception as error:
|
|
118
|
+
reports = {"error": str(error)}
|
|
45
119
|
if len(completed) == 1:
|
|
46
|
-
return
|
|
120
|
+
return dict(summary, status="partial", failures=failures, result=completed[0]["report"], reports=reports, synthesisSkipped="Only one role completed; another agent adds no diversity.")
|
|
47
121
|
try:
|
|
48
|
-
result = await ask("Synthesize only the completed reports into one decision. Reject unsupported claims, preserve material disagreements, and attribute concerns to roles. Never infer views of failed roles.\nTask:\n" + π.task + "\nReports:\n" + json.dumps(completed), "council synthesis")
|
|
49
|
-
return
|
|
122
|
+
result = await ask("Synthesize only the completed reports into one decision. Reject unsupported claims, preserve material disagreements, and attribute concerns to roles. Never infer views of failed roles.\nTask:\n" + π.task + "\nReports:\n" + json.dumps(completed), "council synthesis", {"model": synthesis_model} if synthesis_model else None)
|
|
123
|
+
return dict(summary, status="partial" if failures else "success", failures=failures, result=result, reports=reports)
|
|
50
124
|
except Exception as error:
|
|
51
|
-
return
|
|
125
|
+
return dict(summary, status="partial", failures=failures, result=None, synthesisError=str(error), reports=reports, fallback=[{"role": item.get("role"), "status": "completed", "report": item["report"] if isinstance(reports, dict) else item["report"][:1200]} for item in completed])
|
|
52
126
|
```
|
|
53
127
|
|
|
54
|
-
Reserve at least the role count plus one agent call. Concurrency remains host-limited; usage settles afterward, not as a hard token reservation.
|
|
128
|
+
Reserve at least the role count plus one agent call. Concurrency remains host-limited; usage settles afterward, not as a hard token reservation. Model keys must match a Pi registry key from `tools.models()` exactly, ignoring case; the program refuses a `models.aliases` name or a partial id, and checks every key before any agent runs. Whenever at least one seat completes, full role reports are parked to mesh under a `council/<timestamp>-<run>/reports` key carried by every outcome as `reports`: `mesh.get` it for audit or to retry a budget-starved synthesis with one plain agent, and `mesh.delete` it when no longer needed; on synthesis failure the fallback result carries report heads plus that mesh key, not the full texts; the synthesis prompt still embeds every completed report, so synthesis input grows with total report size. When mesh storage itself fails, `reports` is an `{"error": ...}` object instead of a key — never pass it to `mesh.get` or `mesh.delete` — and the synthesis-failure fallback then carries the full untruncated reports. A single completed role returns its full report directly as `result` without a synthesis call. Every result lists `seats` with each role's pinned model, thinking, and status, plus `synthesisModel` when one was pinned. These are the models the program requested; keeping a run on its pinned model is the host's job. Successful synthesis returns the compact decision, coverage, seats, failures, and `reports` (the mesh key, or the storage error object when parking failed); raw reports return only on synthesis failure. A partial result is useful evidence with named gaps, not permission for an automatic whole-council rerun. Retry only the failed role or synthesis when needed. Do not use a council for a lookup.
|
|
@@ -40,7 +40,7 @@ Use top-level `payloads` for multiline content. Only exact keys supplied in this
|
|
|
40
40
|
|
|
41
41
|
## Discovery and host actions
|
|
42
42
|
|
|
43
|
-
Known actions use `await mcp.<server>.<tool>(...)`, `await extensions.<name>(...)`, or stable providers `memory`, `state`, `schema`, `compact`, `thinking`, `decisions`, `programs`, `components`, `agents`, and `mesh`. Underscore-prefixed capability names require `tools.call` with the exact discovered ref. Host methods accept one dict or keyword arguments, not callback functions. Supply acyclic JSON-compatible arguments.
|
|
43
|
+
Known actions use `await mcp.<server>.<tool>(...)`, `await extensions.<name>(...)`, or stable providers `memory`, `state`, `schema`, `compact`, `thinking`, `decisions`, `programs`, `components`, `agents`, and `mesh`. A provider another extension registers is also a global named after it: `await context.task_add(title="x")` is `tools.call` with the same policy. Reserved or hyphenated provider names (and `tasks`, `sessions`) have no global; call them with `tools.call`. Underscore-prefixed capability names require `tools.call` with the exact discovered ref. Host methods accept one dict or keyword arguments, not callback functions. Supply acyclic JSON-compatible arguments.
|
|
44
44
|
|
|
45
45
|
```python
|
|
46
46
|
hits = await tools.search(query="deployment status", limit=3)
|
|
@@ -55,7 +55,7 @@ Inspect `inputSchema` and `outputSchema` before calling a dynamic action. `await
|
|
|
55
55
|
|
|
56
56
|
`memory.recall` searches evidence; catalog descriptions are navigation, not evidence. Follow returned `follow` and `next` dictionaries with `await tools.call(hit["follow"])` and `await tools.call(result["next"])`. Use `memory.expand` and explicit loops for paging, not guest callback helpers. Do not parse Pi session JSONL manually. Discover exact schemas with `tools.describe` rather than guessing fields.
|
|
57
57
|
|
|
58
|
-
`state` records claims and verification; `await state.verify(binding={"commit": sha})` binds the certificate (a commit that differs from git HEAD fails closed). Under Schema enforce, protected changes must use `schema.hypothesize`, `schema.verify`, and `schema.commit` in one invocation; do not bypass host gates. `compact.request` requests compaction rather than running an alternate executor. `await compact.pressure()` returns a read-only dict with `band` (`ok`/`warn`/`urgent`/`unknown`), `headroomTokens`, and `owner`; `await compact.carry(add=["fact"])` keeps a bounded focus list in every Fabric summary until `compact.carry(clear=True)` (no arguments reads `{"items": [...]}`). `await thinking.set(level="high", scope="turn")` raises Main's reasoning effort until the next agent_end (`scope="turns"` with `turns=1..20`, or `"session"` until `await thinking.reset()`); levels clamp into `thinking.bounds` and the model's levels, and `await thinking.status()` reports `level`, `available`, `bounds`, `baseline`, and any `override`. `d = (await decisions.raise(title="Deploy?", input="confirm"))["id"]` stores a durable pending decision (`holder` `"user"` by default, so only a person answers through `/fabric decisions` or `pi-fabric decisions answer`); `await decisions.wait(id=d)` returns the record once answered, expired, or cancelled, and `decisions.list`, `decisions.answer(id=..., optionId=...)`, and `decisions.cancel(id=...)` cover the rest. `onExpire="escalate"` with `escalation={"hopTimeoutMs": 600000}` hands an unanswered decision up its chain (default supervisor, root, user) at each deadline; the current holder passes it up now with `await decisions.escalate(id=d, reason="...")`. Never answer a decision you raised. `await programs.save(name="triage", code=source, inputSchema={...})` stores a content-addressed candidate and returns `{"ref": "triage@<digest12>", "digest": ...}`; `await programs.run(ref="triage", input={...})` runs a saved program nested with this program's capabilities and approvals, its `input` global set from `input`, and returns its value. `programs.list(name=..., status=...)` and `programs.get(ref=...)` read; only the user promotes or retires with `/fabric programs`.
|
|
58
|
+
`state` records claims and verification; `await state.verify(binding={"commit": sha})` binds the certificate (a commit that differs from git HEAD fails closed). Under Schema enforce, protected changes must use `schema.hypothesize`, `schema.verify`, and `schema.commit` in one invocation; do not bypass host gates. `compact.request` requests compaction rather than running an alternate executor; `seed="..."` is queued after the commit as a labelled Fabric message that starts a turn. `await compact.pressure()` returns a read-only dict with `band` (`ok`/`warn`/`urgent`/`unknown`), `headroomTokens`, and `owner`; `await compact.carry(add=["fact"])` keeps a bounded focus list in every Fabric summary until `compact.carry(clear=True)` (no arguments reads `{"items": [...]}`). `await thinking.set(level="high", scope="turn")` raises Main's reasoning effort until the next agent_end (`scope="turns"` with `turns=1..20`, or `"session"` until `await thinking.reset()`); levels clamp into `thinking.bounds` and the model's levels, and `await thinking.status()` reports `level`, `available`, `bounds`, `baseline`, and any `override`. `d = (await decisions.raise(title="Deploy?", input="confirm"))["id"]` stores a durable pending decision (`holder` `"user"` by default, so only a person answers through `/fabric decisions` or `pi-fabric decisions answer`); `await decisions.wait(id=d)` returns the record once answered, expired, or cancelled; the program deadline pauses while it waits, and with no `timeoutMs` and no decision deadline it returns the still-open record after `executor.maxTimeoutMs`; and `decisions.list`, `decisions.answer(id=..., optionId=...)`, and `decisions.cancel(id=...)` cover the rest. `onExpire="escalate"` with `escalation={"hopTimeoutMs": 600000}` hands an unanswered decision up its chain (default supervisor, root, user) at each deadline; the current holder passes it up now with `await decisions.escalate(id=d, reason="...")`. Never answer a decision you raised. `await programs.save(name="triage", code=source, inputSchema={...})` stores a content-addressed candidate and returns `{"ref": "triage@<digest12>", "digest": ...}`; `await programs.run(ref="triage", input={...})` runs a saved program nested with this program's capabilities and approvals, its `input` global set from `input`, and returns its value. `programs.list(name=..., status=...)` and `programs.get(ref=...)` read; only the user promotes or retires with `/fabric programs`.
|
|
59
59
|
|
|
60
60
|
Advanced agent/mesh workflows require explicit user intent. Branch pointers: read `<skill-dir>/references/agents.md` for child agents and persistent actors, `<skill-dir>/references/mesh.md` for coordination, and `<skill-dir>/references/mcp.md` for MCP naming/management only when the task needs those surfaces. Peer means another root Pi session: query `await agents.peers()` first, not child-agent lists. Agent calls inherit this kernel unless a child's language is explicitly selected; that does not change this program's language. Omit agent `timeoutMs` unless requesting longer than the configured default. Use discovered host actions with ordinary loops and `asyncio.gather`; use the selected Python skill tree, never launch another interpreter to run workflow programs.
|
|
61
61
|
|
|
@@ -13,11 +13,15 @@ result = await agents.run(name="security-review", task="Review the current diff
|
|
|
13
13
|
return {"status": result["status"], "text": result["text"], "error": result.get("error")}
|
|
14
14
|
```
|
|
15
15
|
|
|
16
|
-
Request fields include task, name, runner, kernel, transport, model, persona, thinking, thinkingBounds, tools, timeoutMs, extensions, recursive, cwd, worktree, worktreeSetup, seed, seedMessages, readOnly, writableRoots, shell, scope, schema. Omit timeoutMs normally; per-call values below the configured agent timeout floor are ignored. Use top-level agentBudget for bounded calls; the Python guest has no callback-helper tokenBudget API. Host concurrency and settled-usage checks still apply.
|
|
16
|
+
Request fields include task, agent, name, runner, kernel, transport, model, modelMatch, persona, thinking, thinkingBounds, tools, timeoutMs, extensions, recursive, cwd, worktree, worktreeSetup, seed, seedMessages, readOnly, writableRoots, shell, scope, schema, systemPrompt, skills, plus spawn-only residency and queue. Omit timeoutMs normally; per-call values below the configured agent timeout floor are ignored. Use top-level agentBudget for bounded calls; the Python guest has no callback-helper tokenBudget API. Host concurrency and settled-usage checks still apply.
|
|
17
17
|
|
|
18
18
|
- Pi children inherit Python and its configured backend, including recursive and alternate-cwd launches. Explicit child kernel selection changes only the child, never this invocation. Claude/Veda and extensions=False reject concrete Fabric kernels; omitted/inherit leaves their harness native. Do not hop interpreters to run this program.
|
|
19
19
|
- `runner` defaults to configured policy; Pi, Claude, and Veda are available. Only Pi supports recursion. Veda persona/model follow its backend; Claude keys come from `await agents.models(runner="claude")`. Extensions may register more runner ids; requests needing an undeclared runner capability fail before launch. `outcome == "indeterminate"` means Fabric cannot confirm the work ran and never retries it; inspect before re-running.
|
|
20
|
-
- Pi
|
|
20
|
+
- `modelMatch="exact"` (Pi runners only) selects a listed `provider/id` without aliases, closest or fuzzy matching, or alias thinking. Missing, malformed or unlisted models and non-Pi runners are refused before launch. Admission is strict, and a child guard detects session model switches and some rewrites of known API payloads. **This is not a security guarantee or final-dispatch enforcement:** later hooks, unknown API payloads, providers and extension-made calls can route data elsewhere. Attribution may detect drift only after a call; do not rely on this mode to prevent data disclosure. See `docs/agents.md`.
|
|
21
|
+
- `systemPrompt` is appended to the child's system prompt (Veda gets it as a `<system_instructions>` block); blank is ignored and durable spawn refuses it.
|
|
22
|
+
- `skills` picks the child's Pi skills by name from this session's skills: `False` gives none; `["writing"]` preloads those in full and keeps this session's others listed; `{"preload": ["writing"], "inherit": False}` keeps only the preloaded ones. Omitted keeps Pi's own discovery. An unknown name fails before launch and lists the names. Pi runners only; Claude, Veda and durable spawn refuse it.
|
|
23
|
+
- `agent="name"` fills the request from a Markdown agent file (user `~/.pi/agent/agents`, project `.pi/agents`; project wins): body is `systemPrompt`, plus `model`, `tools`, `thinking` or `effort`, `skills`, `context.skills`, and `runtimes.fabric`. Fields on the call win; an unknown name fails before launch listing the names. `await agents.definitions()` lists them with `scope`, `shadows` and `warnings`.
|
|
24
|
+
- Pi models must resolve in the owner's visible registry. `await tools.models()` lists Pi models; `agents.models` uses the requested or configured runner. Use canonical keys; report unresolved/ambiguous choices rather than guessing. To check one known key without reading the whole list, pass it as `model`: only entries whose `key` equals it exactly and case-sensitively are returned (no alias or fuzzy resolution, `[]` when absent), e.g. `known = await agents.models(runner="pi", model="provider/id")`.
|
|
21
25
|
- `tools` is a native allowlist, inherited by nested calls for extension-enabled full-code Pi children. Claude maps supported core tools to its native names. `extensions=False` disables Fabric, not ordinary tools.
|
|
22
26
|
- `cwd` is a real directory, relative to the caller or absolute; symlinks canonicalize. Invalid/non-directory paths fail without fallback. Recursive Pi requests accept cwd too (`agents.run(..., runner="pi", recursive=True, cwd="../other")`). Omission inherits the immediate caller’s effective directory. Project/mesh lineage and kernel/backend inheritance stay with the caller; cwd does not grant project trust, and Pi evaluates the actual target/worktree path under its own rules. Descendant tools are intersected with the inherited optional-tool allowlist, including durable transfer. Cwd is not filesystem isolation.
|
|
23
27
|
- `worktree=True` creates a retained dedicated Git worktree in the selected repository. Verify canonical repository identity, never infer it from directory naming. Abort with zero changes on mismatch. Partition concurrent edit ownership; never edit shared files concurrently. Inspect and stop active work before cleanup; leave unrelated worktrees alone.
|
|
@@ -28,14 +32,16 @@ Request fields include task, name, runner, kernel, transport, model, persona, th
|
|
|
28
32
|
- Children may read `PI_FABRIC_LINEAGE` (also `(await agents.self())["lineage"]`), `PI_FABRIC_WRITE_POLICY`, `PI_FABRIC_SCOPE`, `PI_FABRIC_THINKING_BOUNDS`, `PI_FABRIC_DEPTH`, and `PI_FABRIC_AGENT_NAME`; other `PI_FABRIC_*` variables are internal.
|
|
29
33
|
- `schema` requests validated structured output. `thinking` is configured/clamped reasoning effort; with `thinking.bounds` configured a clamped run reports `requestedThinking`. `thinkingBounds={"min": ..., "max": ...}` narrows the child's bounds and must lie inside the caller's bounds.
|
|
30
34
|
|
|
31
|
-
|
|
35
|
+
For a long workflow (many agents or beads) whose result you do not need before continuing, call `fabric_exec` with `background: true`: the call returns a task ID, the program keeps running, and its result arrives as a background task event. The user can then steer you while it runs. Do not start the same program again while it runs.
|
|
36
|
+
|
|
37
|
+
`agents.spawn` returns a handle; `wait`, `status`, `stop`, and `cleanup` take its id. Unread detached results are batched after the current tool turn, or wake idle Main once; concise UI notices appear immediately. `wait`/`join` and terminal `status` acknowledge results and retract pending notifications, even after completion. Running status and UI/list polling do not acknowledge them. Return the relevant outcome to Main from your program; prefer `wait` over status polling. Escape/error parks results until new input. `residency="durable"` is a spawn-only opt-in to outlive Main, requiring trusted mesh and no Schema enforce; unread deliveries and acknowledgments survive reconnects. `spawn` waits inside the call for a free `agents.maxConcurrent` slot; `queue=True` returns at once with `status: "queued"`, and the run starts when a slot frees, even after the program ends. `wait`, `status` and `list` accept the id meanwhile, and `stop` cancels it without launching. Not with `residency="durable"`.
|
|
32
38
|
|
|
33
39
|
```python
|
|
34
40
|
handle = await agents.spawn(task="Map the persistence layer.", tools=["read", "grep", "find", "ls"])
|
|
35
41
|
return await agents.wait(id=handle["id"])
|
|
36
42
|
```
|
|
37
43
|
|
|
38
|
-
`agents.list(scope="local")` lists local children; lineage/project include federated participants. Peer is reserved for another root Pi session: query `await agents.peers()` first, not children. A `<fabric-peers>` transcript message is a host notice (not a user request) listing the other root sessions sharing this project's files by label and participant id, sent only when that set changes; pass a listed id to `agents.steer` to coordinate. `agents.self`, `members`, and `main` expose participant identity and capabilities. Cross-process steer/followUp/stop route through the authenticated owner and return after acknowledgment; do not publish control topics yourself. If the owner restarted, an unexecuted command fails with "targets a previous owner incarnation"; Fabric does not retry, so re-read the participant and resend only if still wanted. Prefer steering useful running children over destroying their context. Check status before steering a finished child. Provider-registered work appears as `kind="provider"` members with ids `provider:<provider>:<id>`; `agents.stop`, `steer`, and `followUp` accept those ids and call the provider (stop returns `{"ref", "outcome": "confirmed" | "unconfirmed"}`). Cancelling or timing out a program stops the non-detached provider work it started.
|
|
44
|
+
`agents.list(scope="local")` lists local children; lineage/project include federated participants. Peer is reserved for another root Pi session: query `await agents.peers()` first, not children. A `<fabric-peers>` transcript message is a host notice (not a user request) listing the other root sessions sharing this project's files by label and participant id, sent only when that set changes; pass a listed id to `agents.steer` to coordinate. `agents.self`, `members`, and `main` expose participant identity and capabilities. Cross-process steer/followUp/stop route through the authenticated owner and return after acknowledgment; do not publish control topics yourself. If the owner restarted, an unexecuted command fails with "targets a previous owner incarnation"; Fabric does not retry, so re-read the participant and resend only if still wanted. Prefer steering useful running children over destroying their context. Check status before steering a finished child. Provider-registered work appears as `kind="provider"` members with ids `provider:<provider>:<id>`; `agents.stop`, `steer`, and `followUp` accept those ids and call the provider (stop returns `{"ref", "outcome": "confirmed" | "unconfirmed"}`). Cancelling or timing out a program stops the non-detached provider work it started. `agents.sleep(id=...)` parks an idle hosted run in this session and `agents.wake(id=...)` resumes it; both need a runner with the `sleep` capability and return `{"id", "requested"}`. The run stays `running` with `sleeping: true` once the runner reports it. Other runners, unknown ids, and finished runs raise.
|
|
39
45
|
|
|
40
46
|
## Lifecycle subscriptions
|
|
41
47
|
|
|
@@ -109,4 +109,4 @@ except Exception as error:
|
|
|
109
109
|
|
|
110
110
|
Reserve panel count plus one agent call; concurrency and settled usage are host-limited, not hard token reservations. Plain non-recursive agents keep deliberation one level. Claude is optional and uses canonical `claude/` keys; never pass a concrete Fabric kernel to a native Claude child. Pi children inherit Python.
|
|
111
111
|
|
|
112
|
-
Successful comparison returns only compact structured analysis. Successful acting keeps reference advice private. Zero completed references mean no actor spend; partial reference coverage still permits one actor. Failed aggregation returns completed work as fallback. Never automatically rerun successful references or the full panel; retry only missing coverage or aggregation. For
|
|
112
|
+
Successful comparison returns only compact structured analysis. Successful acting keeps reference advice private. Zero completed references mean no actor spend; partial reference coverage still permits one actor. Failed aggregation returns completed work as fallback. Never automatically rerun successful references or the full panel; retry only missing coverage or aggregation. For role diversity, on one model or with a model pinned to each role, recommend `/skill:fabric-council` for the user; do not invoke another user-only skill yourself.
|
|
@@ -11,7 +11,7 @@ Recommend the smallest sufficient path; do not invoke it. Core coding needs no a
|
|
|
11
11
|
| Need | Recommend |
|
|
12
12
|
|---|---|
|
|
13
13
|
| Finite discover → fan-out → verify work | `/skill:fabric-workflow` |
|
|
14
|
-
|
|
|
14
|
+
| Independent roles and synthesis, optionally one model per seat | `/skill:fabric-council` |
|
|
15
15
|
| Different models compared by a judge, or read-only references executed by one actor | `/skill:fabric-fusion` |
|
|
16
16
|
| Work too large for one context window | `/skill:fabric-rlm` |
|
|
17
17
|
| Evidence-gated or transactional local-file mutation | `/skill:fabric-schema` |
|
|
@@ -6,41 +6,93 @@ disable-model-invocation: true
|
|
|
6
6
|
|
|
7
7
|
# Fabric Council
|
|
8
8
|
|
|
9
|
-
Use one `fabric_exec` call with bounded role fan-out. Choose three to
|
|
9
|
+
Use one `fabric_exec` call with bounded role fan-out. Choose three to eight roles that disagree usefully rather than duplicating one another, such as correctness, security, operability, maintainability, and requirements skepticism. Pin a model to a role when you want vendor diversity as well as role diversity.
|
|
10
10
|
|
|
11
11
|
```ts
|
|
12
|
+
type CouncilSeat = { role: string; model?: string; thinking?: FabricThinking };
|
|
12
13
|
type CouncilOutcome =
|
|
13
|
-
| { role: string; status: "completed"; report: string }
|
|
14
|
-
| { role: string; status: "failed"; error: string };
|
|
14
|
+
| { role: string; model?: string; status: "completed"; report: string }
|
|
15
|
+
| { role: string; model?: string; status: "failed"; error: string };
|
|
15
16
|
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
)
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
const text = (value: unknown): string => (typeof value === "string" ? value.trim() : "");
|
|
18
|
+
const specs: unknown = JSON.parse(π.roles);
|
|
19
|
+
if (!Array.isArray(specs)) throw new Error("Council roles must be a JSON array.");
|
|
20
|
+
const seats: CouncilSeat[] = [];
|
|
21
|
+
for (const spec of specs) {
|
|
22
|
+
const entry = (typeof spec === "string" ? { role: spec } : spec) as Record<string, unknown> | null;
|
|
23
|
+
if (!entry || typeof entry !== "object") {
|
|
24
|
+
throw new Error("Each council role must be a string or a { role, model?, thinking? } object.");
|
|
25
|
+
}
|
|
26
|
+
const role = text(entry.role);
|
|
27
|
+
if (!role) {
|
|
28
|
+
if (typeof spec === "string") continue;
|
|
29
|
+
throw new Error("A council role object needs a non-empty role.");
|
|
30
|
+
}
|
|
31
|
+
if ([entry.model, entry.thinking].some((value) => value != null && typeof value !== "string")) {
|
|
32
|
+
throw new Error(`Council role "${role}" has a non-string model or thinking.`);
|
|
33
|
+
}
|
|
34
|
+
const thinking = text(entry.thinking);
|
|
35
|
+
if (thinking && !["off", "minimal", "low", "medium", "high", "xhigh", "max"].includes(thinking)) {
|
|
36
|
+
throw new Error(`Council role "${role}" has unknown thinking "${thinking}".`);
|
|
37
|
+
}
|
|
38
|
+
const seat: CouncilSeat = { role };
|
|
39
|
+
if (text(entry.model)) seat.model = text(entry.model);
|
|
40
|
+
if (text(entry.thinking)) seat.thinking = text(entry.thinking) as FabricThinking;
|
|
41
|
+
const earlier = seats.find((other) => other.role === role);
|
|
42
|
+
if (!earlier) seats.push(seat);
|
|
43
|
+
else if (earlier.model !== seat.model || earlier.thinking !== seat.thinking) {
|
|
44
|
+
throw new Error(`Council role "${role}" appears twice with different settings.`);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
if (seats.length < 3 || seats.length > 8) {
|
|
48
|
+
throw new Error("Council requires 3–8 distinct non-empty roles.");
|
|
49
|
+
}
|
|
50
|
+
let synthesisModel = text(π.synthesis) || undefined;
|
|
51
|
+
if (synthesisModel || seats.some((seat) => seat.model)) {
|
|
52
|
+
// Match registry keys exactly before any agent runs, so a typo spends nothing.
|
|
53
|
+
const keys = new Map((await tools.models()).map((entry) => [entry.key.toLowerCase(), entry.key]));
|
|
54
|
+
const canonical = (needle: string, owner: string): string => {
|
|
55
|
+
const key = keys.get(needle.toLowerCase());
|
|
56
|
+
if (key) return key;
|
|
57
|
+
const id = needle.toLowerCase().split("/").pop();
|
|
58
|
+
const near = [...keys.values()].filter((candidate) => candidate.toLowerCase().endsWith(`/${id}`));
|
|
59
|
+
throw new Error(
|
|
60
|
+
`Council: model "${needle}" for ${owner} is not in the model registry.` +
|
|
61
|
+
(near.length ? ` Did you mean: ${near.slice(0, 8).join(", ")}?` : ""),
|
|
62
|
+
);
|
|
63
|
+
};
|
|
64
|
+
for (const seat of seats) if (seat.model) seat.model = canonical(seat.model, `role "${seat.role}"`);
|
|
65
|
+
if (synthesisModel) synthesisModel = canonical(synthesisModel, "synthesis");
|
|
21
66
|
}
|
|
22
67
|
await workflow.configure({
|
|
23
68
|
name: "Council review",
|
|
24
|
-
description: `${
|
|
69
|
+
description: `${seats.length} independent perspectives with best-effort synthesis`,
|
|
25
70
|
});
|
|
26
|
-
await phase("Deliberate", { total:
|
|
71
|
+
await phase("Deliberate", { total: seats.length + 1 });
|
|
27
72
|
const outcomes = await parallel(
|
|
28
|
-
|
|
73
|
+
seats.map((seat) => async (): Promise<CouncilOutcome> => {
|
|
74
|
+
const pin = seat.model ? { model: seat.model } : {};
|
|
29
75
|
try {
|
|
30
76
|
const report = await agent(
|
|
31
|
-
`Act as the ${role} council member. Independently analyze this task:\n\n${π.task}`,
|
|
32
|
-
{
|
|
77
|
+
`Act as the ${seat.role} council member. Independently analyze this task:\n\n${π.task}`,
|
|
78
|
+
{
|
|
79
|
+
label: seat.role,
|
|
80
|
+
tools: ["read", "grep", "find", "ls"],
|
|
81
|
+
...pin,
|
|
82
|
+
...(seat.thinking ? { thinking: seat.thinking } : {}),
|
|
83
|
+
},
|
|
33
84
|
);
|
|
34
|
-
return { role, status: "completed", report };
|
|
85
|
+
return { role: seat.role, ...pin, status: "completed", report };
|
|
35
86
|
} catch (error) {
|
|
36
87
|
return {
|
|
37
|
-
role,
|
|
88
|
+
role: seat.role,
|
|
89
|
+
...pin,
|
|
38
90
|
status: "failed",
|
|
39
91
|
error: error instanceof Error ? error.message : String(error),
|
|
40
92
|
};
|
|
41
93
|
}
|
|
42
94
|
}),
|
|
43
|
-
{ concurrency:
|
|
95
|
+
{ concurrency: seats.length },
|
|
44
96
|
);
|
|
45
97
|
const completed = outcomes.filter(
|
|
46
98
|
(outcome): outcome is Extract<CouncilOutcome, { status: "completed" }> =>
|
|
@@ -50,16 +102,40 @@ const failures = outcomes.filter(
|
|
|
50
102
|
(outcome): outcome is Extract<CouncilOutcome, { status: "failed" }> =>
|
|
51
103
|
outcome.status === "failed",
|
|
52
104
|
);
|
|
53
|
-
const coverage = { requested:
|
|
105
|
+
const coverage = { requested: seats.length, completed: completed.length };
|
|
106
|
+
// Name the model each seat and the synthesis requested; an unpinned seat ran on the session default.
|
|
107
|
+
const pins = {
|
|
108
|
+
seats: seats.map((seat, index) => ({ ...seat, status: outcomes[index].status })),
|
|
109
|
+
...(synthesisModel ? { synthesisModel } : {}),
|
|
110
|
+
};
|
|
54
111
|
if (completed.length === 0) {
|
|
55
|
-
return { status: "failed", coverage, failures, result: null };
|
|
112
|
+
return { status: "failed", coverage, ...pins, failures, result: null };
|
|
113
|
+
}
|
|
114
|
+
// Park completed reports in mesh before synthesis: an audit trail that survives this
|
|
115
|
+
// program, and full-text recovery when synthesis fails or a budget runs out.
|
|
116
|
+
// The run suffix keeps same-second councils from overwriting each other: mesh.put is create-or-update.
|
|
117
|
+
const reportsKey = `council/${new Date().toISOString().slice(0, 19).replace(/[:T]/g, "-")}-${Math.random().toString(36).slice(2, 8)}/reports`;
|
|
118
|
+
let reports: string | { error: string } = reportsKey;
|
|
119
|
+
try {
|
|
120
|
+
await mesh.put({
|
|
121
|
+
key: reportsKey,
|
|
122
|
+
value: completed.map((outcome) => ({
|
|
123
|
+
role: outcome.role,
|
|
124
|
+
...(outcome.model ? { model: outcome.model } : {}),
|
|
125
|
+
report: outcome.report,
|
|
126
|
+
})),
|
|
127
|
+
});
|
|
128
|
+
} catch (error) {
|
|
129
|
+
reports = { error: error instanceof Error ? error.message : String(error) };
|
|
56
130
|
}
|
|
57
131
|
if (completed.length === 1) {
|
|
58
132
|
return {
|
|
59
133
|
status: "partial",
|
|
60
134
|
coverage,
|
|
135
|
+
...pins,
|
|
61
136
|
failures,
|
|
62
137
|
result: completed[0].report,
|
|
138
|
+
reports,
|
|
63
139
|
synthesisSkipped: "Only one role completed; another agent would add no diversity.",
|
|
64
140
|
};
|
|
65
141
|
}
|
|
@@ -67,28 +143,40 @@ if (completed.length === 1) {
|
|
|
67
143
|
try {
|
|
68
144
|
const result = await agent(
|
|
69
145
|
`Synthesize these completed reports into one decision. Reject unsupported claims, preserve material disagreements, attribute each concern to its role. Do not infer the views of failed roles.\n\nTask:\n${π.task}\n\nReports:\n${JSON.stringify(completed)}`,
|
|
70
|
-
{
|
|
146
|
+
{
|
|
147
|
+
label: "council synthesis",
|
|
148
|
+
tools: ["read", "grep", "find", "ls"],
|
|
149
|
+
...(synthesisModel ? { model: synthesisModel } : {}),
|
|
150
|
+
},
|
|
71
151
|
);
|
|
72
152
|
return {
|
|
73
153
|
status: failures.length === 0 ? "success" : "partial",
|
|
74
154
|
coverage,
|
|
155
|
+
...pins,
|
|
75
156
|
failures,
|
|
76
157
|
result,
|
|
158
|
+
reports,
|
|
77
159
|
};
|
|
78
160
|
} catch (error) {
|
|
79
161
|
return {
|
|
80
162
|
status: "partial",
|
|
81
163
|
coverage,
|
|
164
|
+
...pins,
|
|
82
165
|
failures,
|
|
83
166
|
result: null,
|
|
84
167
|
synthesisError: error instanceof Error ? error.message : String(error),
|
|
85
|
-
|
|
168
|
+
reports,
|
|
169
|
+
fallback: completed.map((outcome) => ({
|
|
170
|
+
role: outcome.role,
|
|
171
|
+
status: "completed",
|
|
172
|
+
report: typeof reports === "string" ? outcome.report.slice(0, 1200) : outcome.report,
|
|
173
|
+
})),
|
|
86
174
|
};
|
|
87
175
|
}
|
|
88
176
|
```
|
|
89
177
|
|
|
90
|
-
Pass the task as `strings.task
|
|
178
|
+
Pass the task as `strings.task`, the JSON role array as `strings.roles`, and the synthesis model key as `strings.synthesis`; an empty `strings.synthesis` keeps the session default. A role is a string or `{ "role": "security", "model": "provider/id", "thinking": "high" }`, and a role without `model` runs on the session default. Model keys must match a Pi registry key from `tools.models()` exactly, ignoring case; the skill refuses a `models.aliases` name or a partial id, and checks every key before any agent runs. Every result lists `seats`, each with its role, pinned model and thinking, and status, plus `synthesisModel` when one was pinned. These are the models the skill requested; keeping a run on its pinned model is the host's job. Successful synthesis returns the compact decision, coverage, seats, failures, and `reports` (the mesh key, or the storage error object when parking failed). Whenever at least one seat completes, the full role reports are parked to mesh under a `council/<timestamp>-<run>/reports` key and every outcome carries it as `reports`: check `typeof reports === "string"` first, because a failed `mesh.put` yields an `{ error }` object instead of a key — never pass that to `mesh.get` or `mesh.delete`, and the synthesis-failure fallback then carries the full untruncated reports. Otherwise `mesh.get` the key for audit or to retry a budget-starved synthesis with one plain agent, and `mesh.delete` it when no longer needed. On synthesis failure the fallback result carries report heads plus that mesh key, not the full texts; the synthesis prompt still embeds every completed report, so synthesis input grows with total report size. One surviving role returns directly without spending another agent call.
|
|
91
179
|
|
|
92
|
-
Concurrent calls can overshoot an observational `tokenBudget` because usage settles afterward. Reserve at least `
|
|
180
|
+
Concurrent calls can overshoot an observational `tokenBudget` because usage settles afterward. Reserve at least `seats.length + 1` top-level agent calls when synthesis may run, and use a finite role set rather than relying on token accounting as a hard concurrent ceiling. A budget-exhausted synthesis loses nothing: the parked reports are complete, so re-run only the synthesis step.
|
|
93
181
|
|
|
94
182
|
Status is `success`, `partial`, or `failed`. A partial result is usable evidence with named gaps and must not trigger an automatic whole-council rerun. If a missing perspective matters, retry that role with one plain agent using the original task and role; do not invoke a new council or rerun successful roles. Do not use a council for a lookup or a decision with no meaningful competing considerations.
|