@e4779/pi-fabric 0.102.0-fork.16 → 0.105.0-fork.22
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 +44 -13
- package/THIRD_PARTY_NOTICES.md +10 -2
- package/dist/activity/store.d.ts +3 -0
- package/dist/activity/store.d.ts.map +1 -1
- package/dist/activity/workflow-items.d.ts +33 -0
- package/dist/activity/workflow-items.d.ts.map +1 -0
- package/dist/actors/binding-store.d.ts.map +1 -1
- package/dist/actors/manager.d.ts +6 -0
- package/dist/actors/manager.d.ts.map +1 -1
- package/dist/actors/mesh-monitor.d.ts +2 -2
- package/dist/actors/mesh-monitor.d.ts.map +1 -1
- package/dist/actors/registry-store.d.ts.map +1 -1
- package/dist/actors/types.d.ts +11 -0
- package/dist/actors/types.d.ts.map +1 -1
- package/dist/agents/child-env.d.ts +29 -0
- package/dist/agents/child-env.d.ts.map +1 -0
- package/dist/agents/fork-seed.d.ts +21 -0
- package/dist/agents/fork-seed.d.ts.map +1 -0
- package/dist/agents/handoff.d.ts +7 -1
- package/dist/agents/handoff.d.ts.map +1 -1
- package/dist/agents/hosted-run.d.ts +63 -0
- package/dist/agents/hosted-run.d.ts.map +1 -0
- package/dist/agents/manager.d.ts +21 -1
- package/dist/agents/manager.d.ts.map +1 -1
- package/dist/agents/request.d.ts.map +1 -1
- package/dist/agents/runner-notice.d.ts +7 -0
- package/dist/agents/runner-notice.d.ts.map +1 -0
- package/dist/agents/runner-protocol.d.ts +158 -0
- package/dist/agents/runner-protocol.d.ts.map +1 -0
- package/dist/agents/runner-registry.d.ts +223 -0
- package/dist/agents/runner-registry.d.ts.map +1 -0
- package/dist/agents/transports/process-transport.d.ts.map +1 -1
- package/dist/agents/transports/process-utils.d.ts +4 -1
- package/dist/agents/transports/process-utils.d.ts.map +1 -1
- package/dist/agents/types.d.ts +89 -4
- package/dist/agents/types.d.ts.map +1 -1
- package/dist/agents/worktree-manager.d.ts +21 -0
- package/dist/agents/worktree-manager.d.ts.map +1 -1
- package/dist/agents/write-guard.d.ts +16 -0
- package/dist/agents/write-guard.d.ts.map +1 -0
- package/dist/agents/write-guard.js +13 -0
- package/dist/agents/write-guard.js.map +7 -0
- package/dist/agents.js +13 -12
- package/dist/agents.js.map +1 -1
- package/dist/assessment.d.ts +3 -0
- package/dist/assessment.d.ts.map +1 -0
- package/dist/assessment.js +15 -0
- package/dist/assessment.js.map +7 -0
- package/dist/audit/assessment.d.ts +74 -0
- package/dist/audit/assessment.d.ts.map +1 -0
- package/dist/audit/details.d.ts +4 -0
- package/dist/audit/details.d.ts.map +1 -1
- package/dist/audit/index.d.ts +1 -0
- package/dist/audit/index.d.ts.map +1 -1
- package/dist/audit/projection.d.ts +2 -1
- package/dist/audit/projection.d.ts.map +1 -1
- package/dist/audit/trace.d.ts +16 -1
- package/dist/audit/trace.d.ts.map +1 -1
- package/dist/cache/leases.d.ts +2 -1
- package/dist/cache/leases.d.ts.map +1 -1
- package/dist/capture/interceptor.d.ts.map +1 -1
- package/dist/chunks/chunk-2USMWEE6.js +81 -0
- package/dist/chunks/chunk-2USMWEE6.js.map +7 -0
- package/dist/chunks/chunk-2Y24ML7H.js +115 -0
- package/dist/chunks/chunk-2Y24ML7H.js.map +7 -0
- package/dist/chunks/chunk-3GJJG2FV.js +1329 -0
- package/dist/chunks/chunk-3GJJG2FV.js.map +7 -0
- package/dist/chunks/{chunk-5VTBHJN3.js → chunk-3KDUMDPZ.js} +153 -29
- package/dist/chunks/chunk-3KDUMDPZ.js.map +7 -0
- package/dist/chunks/chunk-4RTHQGES.js +189 -0
- package/dist/chunks/chunk-4RTHQGES.js.map +7 -0
- package/dist/chunks/{chunk-ZZ66L3W5.js → chunk-5MNLVHF5.js} +30 -7
- package/dist/chunks/chunk-5MNLVHF5.js.map +7 -0
- package/dist/chunks/{chunk-RAO6TQFP.js → chunk-5XBYFSI5.js} +26 -6
- package/dist/chunks/chunk-5XBYFSI5.js.map +7 -0
- package/dist/chunks/{chunk-J2HV2URQ.js → chunk-7EYJE4TW.js} +1 -1
- package/dist/chunks/{chunk-J2HV2URQ.js.map → chunk-7EYJE4TW.js.map} +2 -2
- package/dist/chunks/{chunk-57CMH4SW.js → chunk-7JU7Z4XQ.js} +2 -2
- package/dist/chunks/chunk-7QKKLBHJ.js +33 -0
- package/dist/chunks/chunk-7QKKLBHJ.js.map +7 -0
- package/dist/chunks/chunk-7XRUMDV7.js +235 -0
- package/dist/chunks/chunk-7XRUMDV7.js.map +7 -0
- package/dist/chunks/{chunk-DUJ46TIP.js → chunk-ABJCSNZO.js} +4 -4
- package/dist/chunks/chunk-B2Y4364O.js +78 -0
- package/dist/chunks/chunk-B2Y4364O.js.map +7 -0
- package/dist/chunks/{chunk-4TKPBEPB.js → chunk-BVJBYFHD.js} +9 -3
- package/dist/chunks/{chunk-4TKPBEPB.js.map → chunk-BVJBYFHD.js.map} +2 -2
- package/dist/chunks/{chunk-KP4ANT6L.js → chunk-C7EEG6SM.js} +2 -2
- package/dist/chunks/{chunk-NHMICIEU.js → chunk-CCHZXF6K.js} +3 -3
- package/dist/chunks/{chunk-W63E3WEO.js → chunk-CXTTLBUV.js} +3 -2
- package/dist/chunks/chunk-CXTTLBUV.js.map +7 -0
- package/dist/chunks/{chunk-HOX6VW45.js → chunk-CYMDX3XP.js} +1 -1
- package/dist/chunks/{chunk-HOX6VW45.js.map → chunk-CYMDX3XP.js.map} +1 -1
- package/dist/chunks/chunk-DK35W6U7.js +259 -0
- package/dist/chunks/chunk-DK35W6U7.js.map +7 -0
- package/dist/chunks/{chunk-5JN5AWNV.js → chunk-DZ4WN5XJ.js} +3 -3
- package/dist/chunks/chunk-EXWS4ZS3.js +6490 -0
- package/dist/chunks/chunk-EXWS4ZS3.js.map +7 -0
- package/dist/chunks/{chunk-QHYBSIIO.js → chunk-FB24AOIJ.js} +39 -37
- package/dist/chunks/{chunk-QHYBSIIO.js.map → chunk-FB24AOIJ.js.map} +1 -1
- package/dist/chunks/chunk-FSB2VIRZ.js +435 -0
- package/dist/chunks/chunk-FSB2VIRZ.js.map +7 -0
- package/dist/chunks/{chunk-PNDYFU64.js → chunk-GJVPP3NN.js} +81 -11
- package/dist/chunks/chunk-GJVPP3NN.js.map +7 -0
- package/dist/chunks/{chunk-B5D6GA77.js → chunk-GYPDGW27.js} +100 -92
- package/dist/chunks/chunk-GYPDGW27.js.map +7 -0
- package/dist/chunks/{chunk-LEFBW2GK.js → chunk-IAFI4A2I.js} +44 -2
- package/dist/chunks/{chunk-LEFBW2GK.js.map → chunk-IAFI4A2I.js.map} +3 -3
- package/dist/chunks/{chunk-PWS2OXLV.js → chunk-IIPKG52D.js} +1 -1
- package/dist/chunks/chunk-IIPKG52D.js.map +7 -0
- package/dist/chunks/chunk-ITVLKXCI.js +266 -0
- package/dist/chunks/chunk-ITVLKXCI.js.map +7 -0
- package/dist/chunks/chunk-JKQARSWR.js +265 -0
- package/dist/chunks/chunk-JKQARSWR.js.map +7 -0
- package/dist/chunks/{chunk-AYBIR4YV.js → chunk-KJZAOENY.js} +6 -4
- package/dist/chunks/chunk-KJZAOENY.js.map +7 -0
- package/dist/chunks/{chunk-74BA4VSX.js → chunk-KQ6R5EWR.js} +1462 -1405
- package/dist/chunks/chunk-KQ6R5EWR.js.map +7 -0
- package/dist/chunks/chunk-L22K5BWU.js +180 -0
- package/dist/chunks/chunk-L22K5BWU.js.map +7 -0
- package/dist/chunks/{chunk-7XJB2USB.js → chunk-LOLCTWJF.js} +4 -4
- package/dist/chunks/{chunk-QETG2GVX.js → chunk-M5IN6DMF.js} +34 -31
- package/dist/chunks/chunk-M5IN6DMF.js.map +7 -0
- package/dist/chunks/{chunk-64O5L7EW.js → chunk-M6IRQ3QT.js} +2 -2
- package/dist/chunks/{chunk-TX6E5W7H.js → chunk-NTC2MCB6.js} +1 -1
- package/dist/chunks/chunk-NTC2MCB6.js.map +7 -0
- package/dist/chunks/{chunk-EPYLZWJV.js → chunk-OVBKQCYL.js} +2 -2
- package/dist/chunks/{chunk-YV2PHCDB.js → chunk-PYFJW3HC.js} +16 -2
- package/dist/chunks/{chunk-YV2PHCDB.js.map → chunk-PYFJW3HC.js.map} +3 -3
- package/dist/chunks/{chunk-Z5Y65YBX.js → chunk-PYQM7KPL.js} +3 -2
- package/dist/chunks/{chunk-BEJF2JX2.js → chunk-QLFDPXK7.js} +33 -2
- package/dist/chunks/chunk-QLFDPXK7.js.map +7 -0
- package/dist/chunks/chunk-QUWC6YCN.js +125 -0
- package/dist/chunks/chunk-QUWC6YCN.js.map +7 -0
- package/dist/chunks/{chunk-DKVJREDI.js → chunk-QY7YK7M6.js} +2 -2
- package/dist/chunks/{chunk-WMJ2AVQQ.js → chunk-R5F6CHW2.js} +34 -18
- package/dist/chunks/chunk-R5F6CHW2.js.map +7 -0
- package/dist/chunks/chunk-S3IRPDSO.js +57 -0
- package/dist/chunks/chunk-S3IRPDSO.js.map +7 -0
- package/dist/chunks/{chunk-7BG5COXB.js → chunk-SVDHQUTM.js} +21 -4
- package/dist/chunks/chunk-SVDHQUTM.js.map +7 -0
- package/dist/chunks/{chunk-HG4DMARW.js → chunk-T5CU2GPZ.js} +116 -26
- package/dist/chunks/chunk-T5CU2GPZ.js.map +7 -0
- package/dist/chunks/{chunk-RIFG4HS6.js → chunk-TFFZVLR2.js} +141 -9
- package/dist/chunks/chunk-TFFZVLR2.js.map +7 -0
- package/dist/chunks/{chunk-BUQZBG6O.js → chunk-U2UBUKNQ.js} +136 -136
- package/dist/chunks/chunk-U2UBUKNQ.js.map +7 -0
- package/dist/chunks/chunk-U366I5K2.js +363 -0
- package/dist/chunks/chunk-U366I5K2.js.map +7 -0
- package/dist/chunks/{chunk-4NF3S3NM.js → chunk-UTOBAZ5T.js} +1 -1
- package/dist/chunks/chunk-UTOBAZ5T.js.map +7 -0
- package/dist/chunks/chunk-V73NIH6B.js +127 -0
- package/dist/chunks/chunk-V73NIH6B.js.map +7 -0
- package/dist/chunks/{chunk-PN4EKNRE.js → chunk-VON4TSO3.js} +132 -12
- package/dist/chunks/chunk-VON4TSO3.js.map +7 -0
- package/dist/chunks/{chunk-5ZJV4LAX.js → chunk-VPRJOD4Y.js} +4 -4
- package/dist/chunks/{chunk-FDIEQEXS.js → chunk-VSDUSNIA.js} +4 -4
- package/dist/chunks/chunk-VSDUSNIA.js.map +7 -0
- package/dist/chunks/{chunk-RG22JKIC.js → chunk-W7X4XEQU.js} +2 -2
- package/dist/chunks/{chunk-LV4IT75S.js → chunk-WLLXKS6I.js} +2 -2
- package/dist/chunks/chunk-WOLUDZVR.js +197 -0
- package/dist/chunks/chunk-WOLUDZVR.js.map +7 -0
- package/dist/chunks/{chunk-YVDBHS4C.js → chunk-WREA4RNR.js} +3 -3
- package/dist/chunks/{chunk-QE2JFB7F.js → chunk-WYUV6WL3.js} +16 -6
- package/dist/chunks/chunk-WYUV6WL3.js.map +7 -0
- package/dist/chunks/{chunk-NGGI6LDC.js → chunk-X2TRSE7D.js} +2 -2
- package/dist/chunks/{chunk-VRAGOMN4.js → chunk-YRDCJZZW.js} +34 -1
- package/dist/chunks/chunk-YRDCJZZW.js.map +7 -0
- package/dist/chunks/{chunk-CC63CY6R.js → chunk-YYSZBD7S.js} +17 -261
- package/dist/chunks/chunk-YYSZBD7S.js.map +7 -0
- package/dist/chunks/{chunk-A4VP7HDF.js → chunk-ZLNJDTCN.js} +2 -2
- package/dist/chunks/{chunk-G4CSXNBT.js → chunk-ZXKYU6CH.js} +42 -5
- package/dist/chunks/chunk-ZXKYU6CH.js.map +7 -0
- package/dist/cli/decisions.d.ts +8 -0
- package/dist/cli/decisions.d.ts.map +1 -0
- package/dist/cli/decisions.js +131 -0
- package/dist/cli/decisions.js.map +7 -0
- package/dist/cli/index.d.ts +3 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +56 -0
- package/dist/cli/index.js.map +7 -0
- package/dist/cli/mesh.d.ts +3 -0
- package/dist/cli/mesh.d.ts.map +1 -0
- package/dist/cli/mesh.js +126 -0
- package/dist/cli/mesh.js.map +7 -0
- package/dist/commands/fabric.d.ts.map +1 -1
- package/dist/compaction/carry.d.ts +23 -0
- package/dist/compaction/carry.d.ts.map +1 -0
- package/dist/compaction/hook.d.ts +9 -0
- package/dist/compaction/hook.d.ts.map +1 -1
- package/dist/compaction/hook.js +6 -6
- package/dist/compaction/orphan-repair.d.ts +11 -0
- package/dist/compaction/orphan-repair.d.ts.map +1 -0
- package/dist/compaction/orphan-repair.js +75 -0
- package/dist/compaction/orphan-repair.js.map +7 -0
- package/dist/compaction/owner.d.ts +26 -0
- package/dist/compaction/owner.d.ts.map +1 -0
- package/dist/compaction/owner.js +26 -0
- package/dist/compaction/owner.js.map +7 -0
- package/dist/compaction/pressure.d.ts +19 -0
- package/dist/compaction/pressure.d.ts.map +1 -0
- package/dist/compaction/render.d.ts +4 -0
- package/dist/compaction/render.d.ts.map +1 -1
- package/dist/compaction/threshold.d.ts +6 -1
- package/dist/compaction/threshold.d.ts.map +1 -1
- package/dist/components/configuration.js +6 -6
- package/dist/components/provider-component.d.ts +1 -1
- package/dist/components/provider-component.d.ts.map +1 -1
- package/dist/config.d.ts +45 -2
- package/dist/config.d.ts.map +1 -1
- package/dist/core/action-registry.d.ts +5 -1
- package/dist/core/action-registry.d.ts.map +1 -1
- package/dist/core/action-registry.js +8 -8
- package/dist/core/approval-controller.d.ts +5 -1
- package/dist/core/approval-controller.d.ts.map +1 -1
- package/dist/core/approval-overrides.d.ts +11 -0
- package/dist/core/approval-overrides.d.ts.map +1 -0
- package/dist/core/atomic-write.d.ts +77 -0
- package/dist/core/atomic-write.d.ts.map +1 -1
- package/dist/core/compact-controller.d.ts +8 -0
- package/dist/core/compact-controller.d.ts.map +1 -1
- package/dist/core/file-lock.d.ts.map +1 -1
- package/dist/core/foreground-tools.d.ts +45 -0
- package/dist/core/foreground-tools.d.ts.map +1 -0
- package/dist/core/provider-bindings.d.ts +10 -1
- package/dist/core/provider-bindings.d.ts.map +1 -1
- package/dist/core/provider-operations.js.map +1 -1
- package/dist/core/tool-ownership.d.ts +18 -2
- package/dist/core/tool-ownership.d.ts.map +1 -1
- package/dist/decisions/command.d.ts +5 -0
- package/dist/decisions/command.d.ts.map +1 -0
- package/dist/decisions/command.js +74 -0
- package/dist/decisions/command.js.map +7 -0
- package/dist/decisions/host.d.ts +24 -0
- package/dist/decisions/host.d.ts.map +1 -0
- package/dist/decisions/store.d.ts +147 -0
- package/dist/decisions/store.d.ts.map +1 -0
- package/dist/durable.d.ts +38 -0
- package/dist/durable.d.ts.map +1 -0
- package/dist/durable.js +274 -0
- package/dist/durable.js.map +7 -0
- package/dist/entropy/index.js +10 -9
- package/dist/execution-service.d.ts +41 -1
- package/dist/execution-service.d.ts.map +1 -1
- package/dist/extension-bootstrap.d.ts +7 -0
- package/dist/extension-bootstrap.d.ts.map +1 -0
- package/dist/extension-bootstrap.js +51 -0
- package/dist/extension-bootstrap.js.map +7 -0
- package/dist/extension.d.ts +8 -0
- package/dist/extension.d.ts.map +1 -0
- package/dist/fabric-exec-tool.d.ts.map +1 -1
- package/dist/fabric-runtime-state.d.ts +8 -0
- package/dist/fabric-runtime-state.d.ts.map +1 -1
- package/dist/fabric-runtime-state.js +2432 -346
- package/dist/fabric-runtime-state.js.map +4 -4
- package/dist/fabric-state.d.ts +22 -0
- package/dist/fabric-state.d.ts.map +1 -1
- package/dist/host-compatibility.d.ts +1 -1
- package/dist/host-compatibility.d.ts.map +1 -1
- package/dist/index.d.ts +5 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +68 -6250
- package/dist/index.js.map +4 -4
- package/dist/jev/observation.js +5 -5
- package/dist/jev-fabric/bridge.d.ts +15 -0
- package/dist/jev-fabric/bridge.d.ts.map +1 -1
- package/dist/jev-fabric/client.js +1 -1
- package/dist/jev-fabric/client.js.map +2 -2
- package/dist/jev-fabric/operations.d.ts +2 -0
- package/dist/jev-fabric/operations.d.ts.map +1 -1
- package/dist/jev-fabric/operations.js +1 -1
- package/dist/jev-fabric/operations.js.map +2 -2
- package/dist/jev-fabric/resolve.js +1 -1
- package/dist/jev-fabric/resolve.js.map +2 -2
- package/dist/jev.js +9 -9
- package/dist/lifecycle/types.d.ts.map +1 -1
- package/dist/memory/client.d.ts +3 -0
- package/dist/memory/client.d.ts.map +1 -1
- package/dist/memory/digest.js +2 -2
- package/dist/memory/discovery.js +6 -6
- package/dist/memory/expand-service.d.ts.map +1 -1
- package/dist/memory/file-worker.d.ts.map +1 -1
- package/dist/memory/file-worker.js +10 -9
- package/dist/memory/file-worker.js.map +2 -2
- package/dist/memory/host-source.d.ts +2 -1
- package/dist/memory/host-source.d.ts.map +1 -1
- package/dist/memory/normalize.js +5 -5
- package/dist/memory/portable.d.ts +3 -1
- package/dist/memory/portable.d.ts.map +1 -1
- package/dist/memory/request-cache.d.ts +4 -2
- package/dist/memory/request-cache.d.ts.map +1 -1
- package/dist/memory/request-context.d.ts +3 -0
- package/dist/memory/request-context.d.ts.map +1 -1
- package/dist/memory/search.js +7 -7
- package/dist/memory/worker-provider.d.ts.map +1 -1
- package/dist/memory/worker-provider.js +10 -10
- package/dist/memory.js +14 -13
- package/dist/memory.js.map +2 -2
- package/dist/mesh/grants.d.ts +86 -0
- package/dist/mesh/grants.d.ts.map +1 -0
- package/dist/mesh/store.d.ts +89 -0
- package/dist/mesh/store.d.ts.map +1 -1
- package/dist/programs/host.d.ts +22 -0
- package/dist/programs/host.d.ts.map +1 -0
- package/dist/programs/host.js +171 -0
- package/dist/programs/host.js.map +7 -0
- package/dist/programs/source.d.ts +16 -0
- package/dist/programs/source.d.ts.map +1 -0
- package/dist/programs/store.d.ts +81 -0
- package/dist/programs/store.d.ts.map +1 -0
- package/dist/protocol.d.ts +153 -0
- package/dist/protocol.d.ts.map +1 -1
- package/dist/protocol.js +15 -1
- package/dist/providers/agents-actions.d.ts.map +1 -1
- package/dist/providers/agents-message-router.d.ts.map +1 -1
- package/dist/providers/agents-progress.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/cache-provider.d.ts +1 -1
- package/dist/providers/cache-provider.d.ts.map +1 -1
- package/dist/providers/compact-provider.d.ts +13 -1
- package/dist/providers/compact-provider.d.ts.map +1 -1
- package/dist/providers/decisions-provider.d.ts +17 -0
- package/dist/providers/decisions-provider.d.ts.map +1 -0
- package/dist/providers/jev-provider.js +9 -9
- package/dist/providers/memory-provider.d.ts.map +1 -1
- package/dist/providers/memory-provider.js +9 -9
- package/dist/providers/mesh-provider.d.ts +4 -0
- package/dist/providers/mesh-provider.d.ts.map +1 -1
- package/dist/providers/pi-native-mcp.d.ts.map +1 -1
- package/dist/providers/pi-tools-provider.d.ts.map +1 -1
- package/dist/providers/programs-provider.d.ts +18 -0
- package/dist/providers/programs-provider.d.ts.map +1 -0
- package/dist/providers/state-provider.d.ts +4 -1
- package/dist/providers/state-provider.d.ts.map +1 -1
- package/dist/providers/thinking-provider.d.ts +15 -0
- package/dist/providers/thinking-provider.d.ts.map +1 -0
- package/dist/residency/actor-client.js +3 -3
- package/dist/residency/client.d.ts.map +1 -1
- package/dist/residency/host.d.ts +21 -0
- package/dist/residency/host.d.ts.map +1 -1
- package/dist/residency/host.js +28 -22
- package/dist/residency/launcher-owner.d.ts +2 -0
- package/dist/residency/launcher-owner.d.ts.map +1 -1
- package/dist/residency/launcher.js +35 -20
- package/dist/residency/launcher.js.map +3 -3
- package/dist/residency/pi-entry.js +26 -22
- package/dist/residency/pi-entry.js.map +1 -1
- package/dist/residency/protocol.d.ts +12 -2
- package/dist/residency/protocol.d.ts.map +1 -1
- package/dist/runners.d.ts +9 -0
- package/dist/runners.d.ts.map +1 -0
- package/dist/runners.js +182 -0
- package/dist/runners.js.map +7 -0
- 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 +35 -7
- package/dist/runtime/cpython-runtime.js.map +2 -2
- package/dist/runtime/deadline-pause.d.ts +26 -0
- package/dist/runtime/deadline-pause.d.ts.map +1 -0
- package/dist/runtime/guest-types.d.ts +1 -1
- package/dist/runtime/guest-types.d.ts.map +1 -1
- package/dist/runtime/guest-types.js +1 -1
- package/dist/runtime/kernel.d.ts +3 -0
- package/dist/runtime/kernel.d.ts.map +1 -1
- package/dist/runtime/monty-runtime.d.ts.map +1 -1
- package/dist/runtime/monty-runtime.js +33 -12
- package/dist/runtime/monty-runtime.js.map +2 -2
- package/dist/runtime/node-process-runtime.d.ts.map +1 -1
- package/dist/runtime/node-process-runtime.js +4 -3
- package/dist/runtime/orchestration.d.ts.map +1 -1
- package/dist/runtime/quickjs-runtime.d.ts.map +1 -1
- package/dist/runtime/quickjs-runtime.js +2 -1
- package/dist/runtime/typescript-kernel.js +8 -7
- package/dist/runtime/typescript-kernel.js.map +1 -1
- package/dist/runtime-state-builtins.d.ts.map +1 -1
- package/dist/schema/controller.d.ts.map +1 -1
- package/dist/schema/policy.d.ts.map +1 -1
- package/dist/scope.d.ts +69 -0
- package/dist/scope.d.ts.map +1 -0
- package/dist/scope.js +37 -0
- package/dist/scope.js.map +7 -0
- package/dist/speculation/eligibility.d.ts.map +1 -1
- package/dist/speculation/python-scanner.js +1 -1
- package/dist/speculation/python-scanner.js.map +2 -2
- package/dist/speculation/scanner.js +1 -1
- package/dist/speculation/scanner.js.map +2 -2
- package/dist/state/binding.d.ts +17 -0
- package/dist/state/binding.d.ts.map +1 -0
- package/dist/state/store.d.ts +8 -2
- package/dist/state/store.d.ts.map +1 -1
- package/dist/state/types.d.ts +23 -2
- package/dist/state/types.d.ts.map +1 -1
- package/dist/storage/retention.d.ts +7 -0
- package/dist/storage/retention.d.ts.map +1 -1
- package/dist/storage/scratch.d.ts.map +1 -1
- package/dist/thinking-control.d.ts +64 -0
- package/dist/thinking-control.d.ts.map +1 -0
- package/dist/thinking-control.js +15 -0
- package/dist/thinking-control.js.map +7 -0
- package/dist/thinking.d.ts +61 -0
- package/dist/thinking.d.ts.map +1 -1
- package/dist/topology/control-plane.d.ts +13 -0
- package/dist/topology/control-plane.d.ts.map +1 -1
- package/dist/topology/participant-directory.d.ts +2 -0
- package/dist/topology/participant-directory.d.ts.map +1 -1
- package/dist/topology/provider-participants.d.ts +72 -0
- package/dist/topology/provider-participants.d.ts.map +1 -0
- package/dist/topology/records.d.ts.map +1 -1
- package/dist/topology/types.d.ts +13 -3
- package/dist/topology/types.d.ts.map +1 -1
- package/dist/type-error-guidance.js +170 -0
- package/dist/type-error-guidance.js.map +7 -0
- package/dist/ui/controller.d.ts.map +1 -1
- package/dist/ui/conversation-chrome.d.ts +2 -0
- package/dist/ui/conversation-chrome.d.ts.map +1 -1
- package/dist/ui/conversation-chrome.js +1 -1
- package/dist/ui/conversation-latest.d.ts +10 -0
- package/dist/ui/conversation-latest.d.ts.map +1 -0
- package/dist/ui/conversation-native-reader.js +2 -1
- package/dist/ui/conversation-native-reader.js.map +1 -1
- package/dist/ui/conversation-render.d.ts +2 -1
- package/dist/ui/conversation-render.d.ts.map +1 -1
- package/dist/ui/conversation-scrollbar.d.ts +22 -0
- package/dist/ui/conversation-scrollbar.d.ts.map +1 -0
- package/dist/ui/conversation-selection.d.ts +2 -2
- 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 +3 -0
- package/dist/ui/conversation.d.ts.map +1 -1
- package/dist/ui/conversation.js +253 -34
- package/dist/ui/conversation.js.map +4 -4
- package/dist/ui/dashboard-fabric-graph.d.ts.map +1 -1
- package/dist/ui/dashboard.js +14 -15
- package/dist/ui/dashboard.js.map +2 -2
- package/dist/ui/image-overlays.d.ts +16 -0
- package/dist/ui/image-overlays.d.ts.map +1 -0
- package/dist/ui/image-overlays.js +10 -0
- package/dist/ui/image-overlays.js.map +7 -0
- package/dist/ui/kitty-viewport.d.ts +24 -0
- package/dist/ui/kitty-viewport.d.ts.map +1 -0
- package/dist/ui/retention.d.ts +14 -0
- package/dist/ui/retention.d.ts.map +1 -0
- package/dist/ui/settings-sections-execution.d.ts.map +1 -1
- package/dist/ui/settings.d.ts.map +1 -1
- package/dist/ui/settings.js +27 -16
- package/dist/ui/settings.js.map +2 -2
- package/dist/ui/transcript.d.ts +2 -1
- package/dist/ui/transcript.d.ts.map +1 -1
- package/dist/ui/types.d.ts +2 -1
- package/dist/ui/types.d.ts.map +1 -1
- package/dist/ui/widget.d.ts +4 -2
- package/dist/ui/widget.d.ts.map +1 -1
- package/dist/verified/generated/authority-kernel.js +1 -1
- package/dist/verified/generated/kernel.js +1 -1
- package/dist/verified/generated/lifecycle-kernel.js +1 -1
- package/dist/verified/generated/manifest.json +7 -7
- package/dist/verified/generated/provider-kernel.js +1 -1
- package/dist/verified/generated/storage-kernel.js +1 -1
- package/dist/worker/options.d.ts.map +1 -1
- package/dist/worker/options.js +14 -0
- package/dist/worker/options.js.map +2 -2
- package/dist/worker/questions.d.ts +46 -0
- package/dist/worker/questions.d.ts.map +1 -0
- package/dist/worker/questions.js +87 -0
- package/dist/worker/questions.js.map +7 -0
- package/dist/worker/result.d.ts +3 -0
- package/dist/worker/result.d.ts.map +1 -0
- package/dist/worker/result.js +7493 -0
- package/dist/worker/result.js.map +7 -0
- package/dist/worker/run-record.js +10 -113
- package/dist/worker/run-record.js.map +3 -3
- package/dist/worker/startup.d.ts +8 -0
- package/dist/worker/startup.d.ts.map +1 -0
- package/dist/worker.js +111 -22
- package/dist/worker.js.map +4 -4
- package/docs/agents.md +197 -3
- package/docs/architecture.md +8 -1
- package/docs/audit-trace.md +36 -1
- package/docs/background-tasks.md +25 -1
- package/docs/certification.md +1 -1
- package/docs/compaction.md +64 -0
- package/docs/components.md +1 -0
- package/docs/configuration.md +105 -10
- package/docs/decisions.md +144 -0
- package/docs/durable-pi.md +186 -0
- package/docs/interface.md +10 -1
- package/docs/kitty-images.md +89 -0
- package/docs/licenses/typebox-mit.txt +23 -0
- package/docs/memory-recall.md +5 -3
- package/docs/programmatic-compaction.md +67 -11
- package/docs/programs.md +137 -0
- package/docs/provider-capabilities.md +23 -1
- package/docs/providers.md +158 -0
- package/docs/residency-runtime.md +64 -0
- package/docs/schema-enforcement.md +5 -3
- package/docs/shell-composition.md +6 -6
- package/docs/skills.md +2 -1
- package/docs/speculation.md +2 -1
- package/docs/state-layer.md +26 -4
- package/docs/thinking.md +48 -0
- package/docs/verified-kernels.md +1 -1
- package/package.json +48 -12
- package/scripts/test-verified-kernels.mjs +1 -1
- package/scripts/verified-kernels.mjs +1 -1
- package/skillsets/python/fabric-exec/SKILL.md +2 -2
- package/skillsets/python/fabric-exec/references/agents.md +9 -4
- package/skillsets/python/fabric-exec/references/mesh.md +9 -0
- package/skillsets/python/fabric-graph/SKILL.md +109 -0
- package/skillsets/python/fabric-guide/SKILL.md +2 -1
- package/skillsets/typescript/fabric-exec/SKILL.md +20 -2
- package/skillsets/typescript/fabric-exec/references/agents.md +10 -4
- package/skillsets/typescript/fabric-exec/references/mesh.md +10 -0
- package/skillsets/typescript/fabric-graph/SKILL.md +112 -0
- package/skillsets/typescript/fabric-guide/SKILL.md +2 -1
- package/skillsets/typescript/fabric-workflow/SKILL.md +1 -1
- package/dist/chunks/chunk-4NF3S3NM.js.map +0 -7
- package/dist/chunks/chunk-5VTBHJN3.js.map +0 -7
- package/dist/chunks/chunk-74BA4VSX.js.map +0 -7
- package/dist/chunks/chunk-7BG5COXB.js.map +0 -7
- package/dist/chunks/chunk-AYBIR4YV.js.map +0 -7
- package/dist/chunks/chunk-B5D6GA77.js.map +0 -7
- package/dist/chunks/chunk-BEJF2JX2.js.map +0 -7
- package/dist/chunks/chunk-BUQZBG6O.js.map +0 -7
- package/dist/chunks/chunk-CC63CY6R.js.map +0 -7
- package/dist/chunks/chunk-FDIEQEXS.js.map +0 -7
- package/dist/chunks/chunk-G4CSXNBT.js.map +0 -7
- package/dist/chunks/chunk-HG4DMARW.js.map +0 -7
- package/dist/chunks/chunk-KAD7UWT2.js +0 -99
- package/dist/chunks/chunk-KAD7UWT2.js.map +0 -7
- package/dist/chunks/chunk-MGWQOKBV.js +0 -30
- package/dist/chunks/chunk-MGWQOKBV.js.map +0 -7
- package/dist/chunks/chunk-PN4EKNRE.js.map +0 -7
- package/dist/chunks/chunk-PNDYFU64.js.map +0 -7
- package/dist/chunks/chunk-PWS2OXLV.js.map +0 -7
- package/dist/chunks/chunk-QE2JFB7F.js.map +0 -7
- package/dist/chunks/chunk-QETG2GVX.js.map +0 -7
- package/dist/chunks/chunk-RAO6TQFP.js.map +0 -7
- package/dist/chunks/chunk-RIFG4HS6.js.map +0 -7
- package/dist/chunks/chunk-TX6E5W7H.js.map +0 -7
- package/dist/chunks/chunk-VRAGOMN4.js.map +0 -7
- package/dist/chunks/chunk-W63E3WEO.js.map +0 -7
- package/dist/chunks/chunk-WMJ2AVQQ.js.map +0 -7
- package/dist/chunks/chunk-ZZ66L3W5.js.map +0 -7
- /package/dist/chunks/{chunk-57CMH4SW.js.map → chunk-7JU7Z4XQ.js.map} +0 -0
- /package/dist/chunks/{chunk-DUJ46TIP.js.map → chunk-ABJCSNZO.js.map} +0 -0
- /package/dist/chunks/{chunk-KP4ANT6L.js.map → chunk-C7EEG6SM.js.map} +0 -0
- /package/dist/chunks/{chunk-NHMICIEU.js.map → chunk-CCHZXF6K.js.map} +0 -0
- /package/dist/chunks/{chunk-5JN5AWNV.js.map → chunk-DZ4WN5XJ.js.map} +0 -0
- /package/dist/chunks/{chunk-7XJB2USB.js.map → chunk-LOLCTWJF.js.map} +0 -0
- /package/dist/chunks/{chunk-64O5L7EW.js.map → chunk-M6IRQ3QT.js.map} +0 -0
- /package/dist/chunks/{chunk-EPYLZWJV.js.map → chunk-OVBKQCYL.js.map} +0 -0
- /package/dist/chunks/{chunk-Z5Y65YBX.js.map → chunk-PYQM7KPL.js.map} +0 -0
- /package/dist/chunks/{chunk-DKVJREDI.js.map → chunk-QY7YK7M6.js.map} +0 -0
- /package/dist/chunks/{chunk-5ZJV4LAX.js.map → chunk-VPRJOD4Y.js.map} +0 -0
- /package/dist/chunks/{chunk-RG22JKIC.js.map → chunk-W7X4XEQU.js.map} +0 -0
- /package/dist/chunks/{chunk-LV4IT75S.js.map → chunk-WLLXKS6I.js.map} +0 -0
- /package/dist/chunks/{chunk-YVDBHS4C.js.map → chunk-WREA4RNR.js.map} +0 -0
- /package/dist/chunks/{chunk-NGGI6LDC.js.map → chunk-X2TRSE7D.js.map} +0 -0
- /package/dist/chunks/{chunk-A4VP7HDF.js.map → chunk-ZLNJDTCN.js.map} +0 -0
package/docs/interface.md
CHANGED
|
@@ -22,6 +22,8 @@ Press **ctrl+shift+a** or run **`/fabric chat`** to open a full-screen conversat
|
|
|
22
22
|
|
|
23
23
|
The first implicit open prefers a currently active child over stale history; later opens remember a valid selection. The view keeps a lossless native Pi transcript and a multiline Pi editor together, independently of the dashboard’s bounded transcript projection. It uses Pi’s real user, assistant, thinking, tool, skill, custom-message, and summary components, including registered tool renderers such as `fabric_exec`, with complete tool details and native expansion behavior. User backgrounds and editor rules span the terminal width, with Pi's configured output padding, editor padding, and code-block indentation inside them. Markdown and tool previews use the configured Shiki theme. A one-row gap belongs to the transcript's end, not the fixed input dock, so it scrolls away and leaves history unobstructed. While the selected participant is active, Pi's native standalone `Working` loader appears inside the transcript with its normal spacing and colors, above that final gap. The directory/name footer row includes a compact `read-only` badge when needed; status, model, and thinking metadata are not repeated in a separate header. The footer below the editor shows the selected participant's directory, known branch, model, thinking level, and run-scoped token/cache/cost statistics. Unknown usage and context occupancy are marked explicitly; Main's statistics are never substituted. Breadcrumbs preserve `Main → child → grandchild` lineage. Main and other participants keep running: opening, navigating, and closing the view never calls Pi's session-replacement API or starts another worker. Selecting Main restores the original Pi conversation, including its editor. Child drafts and scroll positions survive switching targets and reopening the view for the lifetime of this Pi session.
|
|
24
24
|
|
|
25
|
+
The transcript also follows Pi 1.0's fullscreen scrollbar setting (`auto`, `always`, or `hidden`), theme colors, hover/drag behavior, and auto-hide timing. Only an always-visible scrollbar reserves a transcript column; the editor and footer keep their full width. The thumb describes the loaded history window; existing wheel, page, and top commands continue to fetch older history. While scrolled away from the tail, or when newer history is not loaded, the native-style **↓ Jump to latest message · End** indicator appears at the transcript bottom. Its shortcut label follows Pi's configured binding. Click it or use the shortcut to load the latest history and resume following, without losing the draft or editor focus. Selection drags do not activate it.
|
|
26
|
+
|
|
25
27
|
The composer also uses Pi's native **up/down prompt history**, including configured `tui.editor.historyPrevious` / `tui.editor.historyNext` bindings. Up browses previous prompts from an empty editor or the start of its first visual line; multiline/wrapped arrows still move the cursor normally. Down returns toward newer prompts and restores the draft and cursor you had before browsing. Each target keeps its own newest 100 trimmed prompts, with consecutive duplicates suppressed, across switches and reopening. History is lazily seeded once from that target's currently loaded user text (direct actor envelopes are unwrapped), then remembers ordinary steering/follow-up submissions, parked follow-ups, and submitted slash commands (including failed attempts) in chronological order. Slash entries are ephemeral: they remain only in this target's bounded editor memory for the current Pi session, never in the agent transcript or sent to the model. History does not fetch additional pages or include shell commands, rejected read-only prose, assistant/tool output, or Main's history. Send attempts are remembered as in Pi; failures still preserve the draft. Pasted prompts are sent and recalled as full text, not paste markers. Completion lists retain arrow priority, and queue-row editing uses a separate history-free editor. Resetting the parent session clears local history.
|
|
26
28
|
|
|
27
29
|
Drag across transcript text to select it in either screen mode. Selection uses display-cell coordinates and keeps a stable history snapshot while output streams; it never selects hidden Main content. Releasing the mouse copies automatically when Pi's `fullscreenCopyOnSelect` setting is enabled (the default). Otherwise use the configured copy shortcut (`ctrl+shift+c` by default), `ctrl+c` with an active selection, or `/copy selection`. Escape clears selection first; a second Escape closes. Scrolling after release, resizing, switching targets, changing tool/thinking expansion, and `/latest` clear the selection. Dragging with the wheel can select across already loaded history; load older pages before starting a selection.
|
|
@@ -111,7 +113,7 @@ snapshot equivalence, sharing counts, independent readers, and lifecycle transit
|
|
|
111
113
|
|
|
112
114
|
Fabric ships a general-purpose, theme-aware activity surface that works with any agent setup:
|
|
113
115
|
|
|
114
|
-
- A compact widget above the chat (like `pi-supervisor`) follows the current phase in its header. It lists active and completed one-shot agents plus active actor workers. Their recent or running child tools nest beneath the owner, with compact edit/write change lines and owner metadata. Extensions, custom items, and shared tasks/state stay summarized by the header or appear in the dashboard, so they never occupy widget rows.
|
|
116
|
+
- A compact widget above the chat (like `pi-supervisor`) follows the current phase in its header. It lists active and completed one-shot agents plus active actor workers. Their recent or running child tools nest beneath the owner, with compact edit/write change lines and owner metadata. Extensions, custom items, and shared tasks/state stay summarized by the header or appear in the dashboard, so they never occupy widget rows. Finished agent rows remain for 30 seconds after each agent finishes, matching completed shell rows, then disappear individually even without new activity. Heartbeat/control refreshes do not renew that display lease. Expiry shrinks the natural widget height and updates the overflow count without blank padding; results, logs, dashboard entries, and historical chats remain available. Active agents and idle resident agents/actors are not aged out. The latest completed run summary retains its existing lifetime until a newer run replaces it. Snapshot bounds first preserve every active local agent, then local history, and only then admit remote project records. When a collapsed Fabric result becomes shorter at completion, the card reveals a bounded number of otherwise hidden TypeScript source lines. Those lines replace the removed rows without blank padding, and any residual deficit shrinks naturally.
|
|
115
117
|
- `/fabric` (or `/fabric dashboard`) opens a responsive interactive overlay with two views: **Activity** and a unified **Topology**. Press `1` for Activity and `2` for Topology.
|
|
116
118
|
- **Activity** lays out the workflow phase sidebar on the left and the selected phase's activity on the right. The user-facing Pi agent is always present as **Main**, including when no Fabric child exists and regardless of the status filter. Main remains an actionable queue target. The right pane orders entities under type headings for agents, actors, tools, extensions, tasks, custom items, and shared state, with a blank row between groups. The selectable order matches the rendered group order. One-shot agents stay stable in creation order. Attention-priority work keeps the default focus, so Main does not steal it.
|
|
117
119
|
- **Topology** merges the selected retained run with the live project mesh in one graph rooted at **Main**. It deduplicates agents observed through both run and participant data, and it separates execution membership from coordination infrastructure:
|
|
@@ -203,8 +205,15 @@ async invoke(actionName, args, context) {
|
|
|
203
205
|
/fabric stop <actor-or-agent-id>
|
|
204
206
|
/fabric repairs
|
|
205
207
|
/fabric entropy
|
|
208
|
+
/fabric decisions [id]
|
|
209
|
+
/fabric programs [promote <ref>|retire <ref>]
|
|
210
|
+
/fabric run <ref> [json input]
|
|
206
211
|
```
|
|
207
212
|
|
|
213
|
+
`/fabric decisions` lists open [durable decisions](decisions.md) and answers the picked one through native dialogs.
|
|
214
|
+
|
|
215
|
+
`/fabric programs` lists [saved programs](programs.md) with their status; `promote` and `retire` are the only way to change one. `/fabric run` executes a saved program without the model, with the same approval policy as a model call, and shows the result in the transcript.
|
|
216
|
+
|
|
208
217
|
Actor slash commands mirror the [global template API](agents.md#global-actor-templates). `/fabric global` lists templates. `/fabric import <name> [as <new>]` stamps one into the project. `/fabric export <id> [--overwrite]` promotes a project actor. `/fabric log <id>` previews an actor or run transcript, and `/fabric export-log <id> [path]` writes the raw `session.jsonl` plus retained `runs/` to disk.
|
|
209
218
|
|
|
210
219
|
## Headless focused agents
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
# Kitty images in Fabric conversations and overlays
|
|
2
|
+
|
|
3
|
+
## Other Pi extensions examined
|
|
4
|
+
|
|
5
|
+
These are pinned source snapshots of the public repositories' HEADs at review time,
|
|
6
|
+
not claims that every terminal behaves identically:
|
|
7
|
+
|
|
8
|
+
- [pi-traceline's peek pager](https://github.com/tmustier/pine-of-glass/blob/6e7dd5fd613198fee9fff71df1bc45a579030cce/extensions/pi-traceline/drill-pager.ts#L125-L179)
|
|
9
|
+
caches rendered bodies and Image components. Images are atomic: a partly visible
|
|
10
|
+
block stays a placeholder to avoid painting over the pager's chrome. It
|
|
11
|
+
deletes its own image IDs on disposal. This is a safe alternative to cropping,
|
|
12
|
+
but would make Fabric's partially scrolled images disappear by design.
|
|
13
|
+
- [screenshots-picker](https://github.com/thegalexc/pi-extensions-oss/blob/d9d248ce7fbdeff362ef88394fa8372cf9220815/extensions/screenshots-picker/index.ts#L1113-L1255)
|
|
14
|
+
uses a stable image ID, cached thumbnails/dimensions, and explicit source-pixel
|
|
15
|
+
crops. Thumbnail changes delete the previous placement; its zoom inspector
|
|
16
|
+
deletes/retransmits on each render to prevent stacking.
|
|
17
|
+
- [pi-craft preview](https://github.com/TudeOrangBiasa/pi-craft/blob/a868030b50ac49c4b4c7cb1dabfd194ed0b63816/extensions/preview/index.ts#L2260-L2300)
|
|
18
|
+
tracks IDs per page and explicitly deletes those IDs when rebuilding/closing.
|
|
19
|
+
- [codex-ui-gallery](https://github.com/gwelinder/pi-extension-pack/blob/f7a35faf47e66a636a651162a1dc5cd8268f714f/extensions/codex-ui-gallery/index.ts#L219-L252)
|
|
20
|
+
deletes its owned image on zoom/close. It also exposes a manual
|
|
21
|
+
`codex-gallery-clear` command that deletes all terminal images.
|
|
22
|
+
|
|
23
|
+
None of these inspected implementations provided a reusable public hook to fix
|
|
24
|
+
Pi's base-conversation/overlay compositor. We retain a scoped Pi 1.0 compatibility
|
|
25
|
+
adapter without installing a permanent global patch or copying an extension's
|
|
26
|
+
out-of-band delete loop. The adapter is active only during Fabric custom UI,
|
|
27
|
+
reference-counted across stacked views, and restored even after factory failures.
|
|
28
|
+
|
|
29
|
+
## Fabric's approach
|
|
30
|
+
|
|
31
|
+
- Retain native Image components and IDs. Crop using `y`, `h`, and `r`; preserve
|
|
32
|
+
transmission chunks, image data, and the original retained transcript.
|
|
33
|
+
- Keep reserved image rows empty. Text selection, scrollbars, and overlay padding
|
|
34
|
+
must not trigger line-clears through a placement after it has been drawn.
|
|
35
|
+
- Suppress background image commands before native compositing. Preserve images
|
|
36
|
+
wholly outside the visible terminal; do not delete scrollback to mask a
|
|
37
|
+
panel. The native TUI still owns differential deletion, uploads, and restoration.
|
|
38
|
+
- Do **not** manually delete all images each frame: this can invalidate Pi's
|
|
39
|
+
fullscreen upload cache and cause flicker or expensive retransmissions. Pi's
|
|
40
|
+
regular renderer may still retransmit on scroll/full redraw; this extension
|
|
41
|
+
does not replace its upload policy.
|
|
42
|
+
|
|
43
|
+
## Performance contracts
|
|
44
|
+
|
|
45
|
+
`src/ui/conversation-render.ts` keeps the same immutable retained frame while
|
|
46
|
+
native/dynamic row output is unchanged. Dynamic components still run and can
|
|
47
|
+
update every frame; their output arrays are snapshotted to detect in-place
|
|
48
|
+
mutation. Ordinary renderer callers receive defensive copies. Only the
|
|
49
|
+
conversation view explicitly borrows the readonly frame.
|
|
50
|
+
|
|
51
|
+
`src/ui/kitty-viewport.ts` indexes image spans once per retained frame. Warm
|
|
52
|
+
scrolling uses binary search and a viewport-sized slice, not a backward scan
|
|
53
|
+
through retained blank history. Cropping parses only the first 32 base64
|
|
54
|
+
characters of a PNG header, once per indexed image, and never decodes pixels.
|
|
55
|
+
The cache holds at most two cropped transmissions and 16 MiB of estimated UTF-16
|
|
56
|
+
string storage; oversized crops are rendered without retention. Replacement
|
|
57
|
+
frames, resize, and disposal release the previous index/cache.
|
|
58
|
+
|
|
59
|
+
Overlay filtering checks the visible rows and, when needed, the preceding blank
|
|
60
|
+
reservation run for an image spanning the viewport edge. It returns text-only
|
|
61
|
+
background arrays unchanged. Background arrays are not identity-cached because
|
|
62
|
+
third-party components may mutate them in place.
|
|
63
|
+
|
|
64
|
+
Run the deterministic correctness/performance guards:
|
|
65
|
+
|
|
66
|
+
```sh
|
|
67
|
+
bunx vitest run tests/kitty-viewport.test.ts tests/conversation-kitty.test.ts tests/image-overlays.test.ts tests/conversation-render-cache.test.ts
|
|
68
|
+
bun run benchmark:kitty
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
The benchmark reports warm median/p95 latency for 4 MiB image crops, scrolling
|
|
72
|
+
100,000 blank history rows, and native versus protected overlays over 30,000
|
|
73
|
+
text rows. These are component microbenchmarks, **not terminal latency or whole
|
|
74
|
+
session startup**. Use same-machine before/after runs; no timing threshold is
|
|
75
|
+
used in CI. Tests instead assert bounded row reads/cache bytes, stable retained
|
|
76
|
+
frames, no idle graphics commands, and native fullscreen upload-cache reuse.
|
|
77
|
+
|
|
78
|
+
Observed on the same macOS arm64 machine with Bun 1.4.2, comparing the initial
|
|
79
|
+
uncached image fix with the retained-frame implementation (warm medians, ms):
|
|
80
|
+
|
|
81
|
+
| Workload | Before | After |
|
|
82
|
+
| --- | ---: | ---: |
|
|
83
|
+
| Unchanged 4 MiB crop | 0.2079 | 0.0022 |
|
|
84
|
+
| Scrolling 4 MiB crop | 0.1895 | 0.0041 |
|
|
85
|
+
| Scrolling 100,000 blank rows | 0.5903 | 0.0002 |
|
|
86
|
+
| Protected overlay over 30,000 text rows | 0.6819 | 0.0929 |
|
|
87
|
+
|
|
88
|
+
The separate native-overlay control varies with JIT/GC and host load; these
|
|
89
|
+
numbers demonstrate removal of repeated work, not a promised UI frame rate.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
TypeBox
|
|
2
|
+
|
|
3
|
+
The MIT License (MIT)
|
|
4
|
+
|
|
5
|
+
Copyright (c) 2017-2026 Haydn Paterson
|
|
6
|
+
|
|
7
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
8
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
9
|
+
in the Software without restriction, including without limitation the rights
|
|
10
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
11
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
12
|
+
furnished to do so, subject to the following conditions:
|
|
13
|
+
|
|
14
|
+
The above copyright notice and this permission notice shall be included in
|
|
15
|
+
all copies or substantial portions of the Software.
|
|
16
|
+
|
|
17
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
18
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
19
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
20
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
21
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
22
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
23
|
+
THE SOFTWARE.
|
package/docs/memory-recall.md
CHANGED
|
@@ -52,9 +52,11 @@ A source implements interface version `1`, has an opaque stable `id`, and
|
|
|
52
52
|
provides `listSessions({ limit, signal? })` and
|
|
53
53
|
`loadSession(sessionKey, { signal? })`. Session descriptors have an opaque
|
|
54
54
|
`sessionKey` and content-sensitive `revision`; snapshots add standard Pi
|
|
55
|
-
`records`. Optional `authorize(action, sessionKey)` is rechecked around
|
|
56
|
-
asynchronous reads.
|
|
57
|
-
|
|
55
|
+
`records`. Optional `authorize(action, sessionKey, scope?)` is rechecked around
|
|
56
|
+
asynchronous reads. In a scoped session, `scope` is the caller's host-issued
|
|
57
|
+
[principal and grants](providers.md#principal-and-scope), so a source can refuse
|
|
58
|
+
before content enters context; client calls accept `{ scope }` too. Bind principals
|
|
59
|
+
and permissions in the host, never in model-supplied arguments. The host also owns sanitization and retention.
|
|
58
60
|
|
|
59
61
|
Lists may return a descriptor array or `{ sessions, coverage }`; snapshots
|
|
60
62
|
also support `coverage: { complete: false, reason }`. Report every partial
|
|
@@ -49,8 +49,8 @@ latest instructions.
|
|
|
49
49
|
### Host session: the `compact` provider
|
|
50
50
|
|
|
51
51
|
The provider is always available, with no config guard. Fabric exposes it
|
|
52
|
-
through `fabric_exec` as `compact.request`, `compact.status`,
|
|
53
|
-
`compact.cancel`.
|
|
52
|
+
through `fabric_exec` as `compact.request`, `compact.status`,
|
|
53
|
+
`compact.pressure`, `compact.carry`, and `compact.cancel`.
|
|
54
54
|
|
|
55
55
|
```ts
|
|
56
56
|
// Record an advisory intent. Replaces any pending one and returns
|
|
@@ -66,14 +66,63 @@ await compact.request({
|
|
|
66
66
|
const status = await compact.status();
|
|
67
67
|
// { pending?: { reason?, instructions?, preserve?, requestedBy, requestedAt },
|
|
68
68
|
// last?: { at, requestedBy, status: "committed"|"cancelled"|"failed",
|
|
69
|
-
// summary?, tokensBefore?, estimatedTokensAfter?, error? }
|
|
69
|
+
// summary?, tokensBefore?, estimatedTokensAfter?, error? },
|
|
70
|
+
// lastAuto?: { at, trigger: "headroom"|"tokens"|"ratio", committed },
|
|
71
|
+
// owner: "fabric"|"pi"|"external"|"none",
|
|
72
|
+
// outputReserveTokens }
|
|
73
|
+
|
|
74
|
+
// Read context pressure. Never compacts; the program decides what to do.
|
|
75
|
+
const pressure = await compact.pressure();
|
|
76
|
+
// { tokens, contextWindow, fraction, headroomTokens,
|
|
77
|
+
// band: "ok"|"warn"|"urgent"|"unknown", outputReserveTokens,
|
|
78
|
+
// thresholdFraction?, thresholdTokens?, owner }
|
|
79
|
+
|
|
80
|
+
// Keep a bounded focus list in every Fabric summary until it is cleared.
|
|
81
|
+
await compact.carry({ add: ["Auth regression is still open"] });
|
|
82
|
+
await compact.carry({ remove: ["Auth regression is still open"] });
|
|
83
|
+
await compact.carry({ clear: true });
|
|
84
|
+
const { items } = await compact.carry(); // no arguments reads
|
|
70
85
|
|
|
71
86
|
// Clear a pending intent before the host commits it.
|
|
72
87
|
await compact.cancel();
|
|
73
88
|
```
|
|
74
89
|
|
|
75
|
-
Risk classes: `request`
|
|
76
|
-
and `
|
|
90
|
+
Risk classes: `request`, `carry`, and `cancel` are `write` (they change host
|
|
91
|
+
session state). `status` and `pressure` are `read`, carry no effect, and are
|
|
92
|
+
eligible for speculative pre-launch and for Schema enforce mode.
|
|
93
|
+
|
|
94
|
+
#### Pressure
|
|
95
|
+
|
|
96
|
+
`compact.pressure()` reads Pi's `getContextUsage()` and the active model.
|
|
97
|
+
`fraction` is `tokens / contextWindow`, and `headroomTokens` is
|
|
98
|
+
`contextWindow - tokens`. `band` compares `fraction` with
|
|
99
|
+
`compaction.pressureBands` (default `{ warn: 0.6, urgent: 0.8 }`). The band is
|
|
100
|
+
also `urgent` whenever `compaction.outputReserveTokens` is set and the
|
|
101
|
+
headroom is below it. When Pi has no token count, for example right after a
|
|
102
|
+
compaction and before the next response, the numeric fields are `null` and
|
|
103
|
+
the band is `unknown`. `thresholdTokens` or `thresholdFraction` reports the
|
|
104
|
+
active model's configured Fabric threshold; the token threshold wins when
|
|
105
|
+
both exist. `owner` is the [observed compaction owner](compaction.md#compaction-ownership).
|
|
106
|
+
|
|
107
|
+
#### Carry-forward focus
|
|
108
|
+
|
|
109
|
+
`compact.carry` maintains a list that Fabric's deterministic compactor renders
|
|
110
|
+
under `[Carry Forward]` in **every** summary until it is cleared. It is the
|
|
111
|
+
persistent counterpart of the one-shot `preserve` field. Arguments apply in
|
|
112
|
+
this order: `clear` empties the list, `items` replaces it, `remove` drops exact
|
|
113
|
+
matches, and `add` appends items that are not already present. The result must
|
|
114
|
+
fit the `preserve` limits: at most 16 non-empty items of 2048 characters and
|
|
115
|
+
2048 UTF-8 bytes each. A violation rejects the call and leaves the list
|
|
116
|
+
unchanged.
|
|
117
|
+
|
|
118
|
+
Fabric persists each change as a `pi-fabric-compact-carry` session custom
|
|
119
|
+
entry. The latest entry on the active branch is the current list, so reload,
|
|
120
|
+
restart, and tree navigation restore it without extra state, and a branch
|
|
121
|
+
keeps its own list. A malformed latest entry reads as an empty list. Custom
|
|
122
|
+
entries never enter the model context. The rendered block is bounded to
|
|
123
|
+
3 KiB like the request block; compaction details record
|
|
124
|
+
`carry: { count, renderedOmittedBytes }`. With `compaction.engine: "pi"` or
|
|
125
|
+
another compaction owner, the list is stored but not rendered.
|
|
77
126
|
|
|
78
127
|
With only `instructions` present, Fabric forwards it as ordinary Pi
|
|
79
128
|
`customInstructions`. Manual `/compact` text and programmatic requests then
|
|
@@ -194,24 +243,31 @@ return await agents.wait({ id: handle.id });
|
|
|
194
243
|
and peer sessions, can subscribe to observe compaction transitions.
|
|
195
244
|
Activity-only sessions with the mesh disabled silently skip this step.
|
|
196
245
|
- **Status query**: `compact.status()` gives the context-independent,
|
|
197
|
-
in-memory record of the pending intent
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
it.
|
|
246
|
+
in-memory record of the pending intent, the last commit, and the last
|
|
247
|
+
threshold or headroom compaction (`lastAuto`) for the current initialized
|
|
248
|
+
extension session. The record survives compaction itself. Extension
|
|
249
|
+
reload, session replacement, process restart, and shutdown clear it.
|
|
250
|
+
`owner` and the carry list are derived from the session log and survive
|
|
251
|
+
all of these.
|
|
201
252
|
|
|
202
253
|
## Configuration
|
|
203
254
|
|
|
204
255
|
None required. Programmatic compaction is a first-principles primitive and
|
|
205
256
|
always available. Fabric defines no `compact` config block. The
|
|
206
257
|
model decides when and how to ask, and the host decides when to commit, so
|
|
207
|
-
safety needs no configuration.
|
|
258
|
+
safety needs no configuration. The optional `compaction.pressureBands` and
|
|
259
|
+
`compaction.outputReserveTokens` keys tune what `compact.pressure()` reports;
|
|
260
|
+
see [compaction](compaction.md#headroom-trigger).
|
|
208
261
|
|
|
209
262
|
## Files
|
|
210
263
|
|
|
211
264
|
| File | Role |
|
|
212
265
|
| --- | --- |
|
|
213
266
|
| `src/core/compact-controller.ts` | Pending-intent controller with `request`, `cancel`, `status`, and `maybeCommit`. Uses a single replaceable slot, typed preserve encoding, an in-flight guard, and a quiet clear on benign no-op outcomes (cancelled, already compacted, or session too small). |
|
|
214
|
-
| `src/providers/compact-provider.ts` | Fabric provider that exposes a bounded TypeBox-validated `request` (write, including optional `preserve: string[]`), `status` (read), and `cancel` (
|
|
267
|
+
| `src/providers/compact-provider.ts` | Fabric provider that exposes a bounded TypeBox-validated `request` (write, including optional `preserve: string[]`), `status` (read), `pressure` (read), `carry` (write), and `cancel` (write). Registered always, with activity audit. |
|
|
268
|
+
| `src/compaction/pressure.ts` | Pure pressure projection from Pi's context usage, the active model, and config. |
|
|
269
|
+
| `src/compaction/carry.ts` | Carry-forward entry codec, update semantics, and summary lines. |
|
|
270
|
+
| `src/compaction/owner.ts` | Compaction owner classification and the once-per-session ownership warning. |
|
|
215
271
|
| `src/fabric-state.ts` | Constructs the controller with mesh-publish hooks, registers the provider, and resets on re-init or shutdown. |
|
|
216
272
|
| `src/index.ts` | Invokes `state.compact.maybeCommit(context)` in the existing `agent_settled` handler. |
|
|
217
273
|
| `src/agents/types.ts` | Extends `AgentSteerEntry["type"]` with `"compact"` and adds the optional `instructions` field. |
|
package/docs/programs.md
ADDED
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
# Saved programs
|
|
2
|
+
|
|
3
|
+
A saved program is a `fabric_exec` program, or a Jev program, stored under a name and a content digest. A program saves a candidate with `programs.save`. Another program runs it with `programs.run`, nested in the caller's own execution. A person promotes or retires versions with `/fabric programs`, and a host runs one without the model through `/fabric run` or the `pi-fabric:program:run:v1` event.
|
|
4
|
+
|
|
5
|
+
Programs are a small primitive. They do not schedule themselves, they hold no authority of their own, and mesh events never run them implicitly.
|
|
6
|
+
|
|
7
|
+
## Store
|
|
8
|
+
|
|
9
|
+
Fabric keeps programs in the project state directory, `<project>/.pi/fabric/programs/` (`PI_FABRIC_PROJECT_ROOT` overrides the project root, so child agents share the parent's store).
|
|
10
|
+
|
|
11
|
+
- `<sha256>.json` holds one record.
|
|
12
|
+
- `index.json` maps each name to its digests and creation times.
|
|
13
|
+
- `.lock` serializes every write. A lock left by a crashed writer is reaped after 30 seconds.
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
{
|
|
17
|
+
version: 1,
|
|
18
|
+
digest, // sha256 over the content, see below
|
|
19
|
+
name, // 1..64 characters of [a-z0-9._-], starting with [a-z0-9]
|
|
20
|
+
kind: "fabric" | "jev",
|
|
21
|
+
kernel?: "typescript" | "python", // fabric programs only
|
|
22
|
+
code?, // fabric programs, up to 65,536 characters
|
|
23
|
+
jevProgram?, // jev programs: { name, code, inputSchema, outputSchema, requires, limits? }
|
|
24
|
+
description?, // up to 1,000 characters
|
|
25
|
+
inputSchema?, // JSON Schema object, up to 16 KiB
|
|
26
|
+
createdAt, // epoch ms
|
|
27
|
+
status: "candidate" | "promoted" | "retired",
|
|
28
|
+
trial?, // reserved for trial evidence
|
|
29
|
+
}
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
The digest is the SHA-256 of the canonical JSON (sorted keys) of `{ kind, kernel, code | jevProgram, inputSchema }`. The name, description, timestamps, and status stay outside the digest, so identical content always has one identity:
|
|
33
|
+
|
|
34
|
+
- Saving identical content under the same name returns the existing ref and keeps the first description.
|
|
35
|
+
- Saving identical content under a different name fails with the ref that already holds it.
|
|
36
|
+
- Before anything reads or runs a record, Fabric recomputes its digest. A record edited on disk fails closed with `does not match its content digest`.
|
|
37
|
+
|
|
38
|
+
The store holds at most 1,024 names and 256 versions per name.
|
|
39
|
+
|
|
40
|
+
## Refs
|
|
41
|
+
|
|
42
|
+
A ref names one version:
|
|
43
|
+
|
|
44
|
+
- `name` resolves to the newest promoted version, else the newest candidate. Retired versions never match a bare name.
|
|
45
|
+
- `name@<digest prefix>` takes at least 12 lowercase hex characters. An ambiguous prefix fails.
|
|
46
|
+
- A full 64-character digest names the record directly.
|
|
47
|
+
|
|
48
|
+
`programs.save` returns `name@<first 12 digest characters>`. Traces record the full `name@<digest>`.
|
|
49
|
+
|
|
50
|
+
## Actions
|
|
51
|
+
|
|
52
|
+
| Action | Risk | Result |
|
|
53
|
+
|---|---|---|
|
|
54
|
+
| `programs.save({ name, kind?, kernel?, code?, jevProgram?, description?, inputSchema? })` | write | `{ ref, digest }`, always a `candidate` |
|
|
55
|
+
| `programs.list({ name?, status? })` | read | summaries `{ ref, name, digest, kind, kernel?, description?, createdAt, status }` |
|
|
56
|
+
| `programs.get({ ref })` | read | the record plus its short `ref` |
|
|
57
|
+
| `programs.run({ ref, input?, requirePromoted? })` | execute | the program's return value |
|
|
58
|
+
|
|
59
|
+
`kind` defaults to `"fabric"` and `kernel` to the session kernel. A `jev` program takes `jevProgram` (the `program` object of [`jev.run`](jev.md)) and no `code` or `kernel`. `programs.list` and `programs.get` are speculation-eligible and stay available under Schema enforce. Enforce blocks `programs.save` and `programs.run`. Managed hosts do not offer the provider.
|
|
60
|
+
|
|
61
|
+
No action promotes or retires a program. Those transitions belong to the user.
|
|
62
|
+
|
|
63
|
+
## Nested runs
|
|
64
|
+
|
|
65
|
+
`programs.run` executes a `fabric` program inside the calling execution, through the same host bridge:
|
|
66
|
+
|
|
67
|
+
- **Capabilities.** The nested program sees the caller's committed capability view. It can call only what the caller can call, so a saved program never widens authority.
|
|
68
|
+
- **Approvals and budgets.** Each nested call passes the caller's approval controller and counts against the caller's agent budget. The caller's cancellation and deadline stop the nested program. `programs.run` extends the caller's deadline like other blocking orchestration calls.
|
|
69
|
+
- **Input.** `input` must be JSON-compatible and at most 64 KiB. When the record has an `inputSchema`, Fabric validates `input` (a missing input is checked as `null`) and refuses a mismatch before anything runs. The program reads it from the `input` global; treat `input` as a reserved name.
|
|
70
|
+
- **Kernel.** A `fabric` program runs in the current kernel. A program saved for the other kernel fails with a clear error.
|
|
71
|
+
- **Jev.** A `jev` program runs through `jev.run({ program: jevProgram, input })`, the existing Jev provider path, with that action's own approval and limits.
|
|
72
|
+
- **Status.** A retired version never runs. `requirePromoted: true` refuses anything except a promoted version.
|
|
73
|
+
- **Bounds.** One outer execution runs at most 16 nested programs, which also bounds recursion.
|
|
74
|
+
|
|
75
|
+
Nested logs join the caller's logs with a `[name@digest]` prefix. The trace records one `fabric.program.run` operation with `args: { program: "name@<digest>" }` before the program's own operations, in the caller's sequence space.
|
|
76
|
+
|
|
77
|
+
```ts
|
|
78
|
+
const saved = await programs.save({
|
|
79
|
+
name: "changed-tests",
|
|
80
|
+
description: "Run the tests for files changed since a base ref",
|
|
81
|
+
inputSchema: { type: "object", required: ["base"], properties: { base: { type: "string" } } },
|
|
82
|
+
code: `
|
|
83
|
+
const diff = await pi.bash({ command: "git diff --name-only " + input.base, settle: true });
|
|
84
|
+
return { files: diff.output.split("\\n").filter(Boolean) };
|
|
85
|
+
`,
|
|
86
|
+
});
|
|
87
|
+
return await programs.run({ ref: saved.ref, input: { base: "main" } });
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
## Host runs
|
|
91
|
+
|
|
92
|
+
A host run executes a program without a model turn. It uses the session's root capability view and the same approval policy as a model call. Fabric runs a one-call program that invokes `programs.run`, so every check above applies, and the trace records `fabric.program.run` with `invokedBy: "host"`. The result appears in the transcript as a `pi-fabric-program-run` custom message whose details hold `{ version: 1, invokedBy: "host", program, success, error?, trace }`. The message never starts a turn.
|
|
93
|
+
|
|
94
|
+
Slash commands:
|
|
95
|
+
|
|
96
|
+
- `/fabric programs` lists every version with its status.
|
|
97
|
+
- `/fabric programs promote <ref>` promotes a version. A bare name selects the newest version, including a retired one.
|
|
98
|
+
- `/fabric programs retire <ref>` retires a version.
|
|
99
|
+
- `/fabric run <ref> [json input]` runs a program, for example `/fabric run changed-tests {"base": "main"}`.
|
|
100
|
+
|
|
101
|
+
Daemons and embedders in the same Pi process emit the program run event:
|
|
102
|
+
|
|
103
|
+
```ts
|
|
104
|
+
import { FABRIC_PROGRAM_RUN_EVENT, type FabricProgramRunReplyV1 } from "pi-fabric/protocol";
|
|
105
|
+
|
|
106
|
+
pi.events.emit(FABRIC_PROGRAM_RUN_EVENT, {
|
|
107
|
+
ref: "changed-tests",
|
|
108
|
+
input: { base: "main" },
|
|
109
|
+
requirePromoted: true, // optional: refuse candidates
|
|
110
|
+
signal: controller.signal, // optional: cancels the run
|
|
111
|
+
reply: (result: FabricProgramRunReplyV1) => {
|
|
112
|
+
// { ok: true, program, value, logs } | { ok: false, error, program? }
|
|
113
|
+
},
|
|
114
|
+
});
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
The reply arrives exactly once. A payload without a `reply` function throws synchronously. Other invalid fields, a missing session, an unknown ref, and a failed run all reply `{ ok: false, error }`. The event runs in the live session that Fabric saw at `session_start`.
|
|
118
|
+
|
|
119
|
+
## Mesh-triggered runs
|
|
120
|
+
|
|
121
|
+
Fabric never runs a program because a mesh event arrived. To run one on a schedule or on ingress, give the event `data.fabricProgram = { ref, input? }` and subscribe a durable actor to its topic. The actor's own program calls `programs.run` with that ref, so the run carries the actor's capabilities and approvals:
|
|
122
|
+
|
|
123
|
+
```ts
|
|
124
|
+
await mesh.publish({
|
|
125
|
+
topic: "jobs.nightly",
|
|
126
|
+
kind: "tick",
|
|
127
|
+
afterMs: 3_600_000,
|
|
128
|
+
key: "nightly",
|
|
129
|
+
data: { fabricProgram: { ref: "changed-tests", input: { base: "main" } } },
|
|
130
|
+
});
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
The subscribed actor reads `data.fabricProgram` from its delivered event and calls `await programs.run({ ref: data.fabricProgram.ref, input: data.fabricProgram.input, requirePromoted: true })`. External grant events are untrusted input: the actor should accept only refs from its own allowlist and keep `requirePromoted: true`. See [scheduled events](agents.md#scheduled-events) and [external grants](agents.md#external-grants), and `/skill:fabric-graph` for resumable multi-step graphs built from the same pieces.
|
|
134
|
+
|
|
135
|
+
## Trust boundary
|
|
136
|
+
|
|
137
|
+
Promotion is a review marker written by the user's commands, and `requirePromoted` lets callers rely on it. The store sits in the project directory: a program that can write files there through `pi.write` or a shell can also edit `status`. Content edits still fail the digest check. Treat promotion as a policy convention for cooperating programs, and keep unconfined shell access away from programs you do not trust.
|
|
@@ -167,6 +167,28 @@ and managed or third-party implementations retain their native authority.
|
|
|
167
167
|
See [verified policy kernels](verified-kernels.md) for additional subsystem laws
|
|
168
168
|
and their precise host assumptions.
|
|
169
169
|
|
|
170
|
+
### Principal and scope
|
|
171
|
+
|
|
172
|
+
The host-issued [principal and scope](providers.md#principal-and-scope) is trusted
|
|
173
|
+
host adapter code in `src/scope.ts`. No Bend kernel checks it. Grammar parsing,
|
|
174
|
+
digest canonicalization, issuance sealing, registry injection, child derivation and
|
|
175
|
+
cache keying are tested JavaScript. Capability views and scopes are independent: a
|
|
176
|
+
view limits which actions a caller can dispatch, and a scope tells providers which
|
|
177
|
+
resources the principal may touch. Fabric does not intersect them, and a provider that
|
|
178
|
+
ignores `context.scope` keeps its native authority.
|
|
179
|
+
|
|
180
|
+
### Future verified extension
|
|
181
|
+
|
|
182
|
+
A verified version would add a scope reducer beside the authority kernel and prove
|
|
183
|
+
a narrowing law: for every derived scope `C` of parent `P`, every grant in `C` is
|
|
184
|
+
covered by one grant in `P` (resource-pattern subset under the `/*` and `/**` rules
|
|
185
|
+
and action subset), `C.principal = P.principal`, and `C.parentDigest = P.digest`.
|
|
186
|
+
Then every resource-action pair `C` allows, `P` also allows, transitively along the
|
|
187
|
+
lineage. A positive completeness law would show that every covered request is accepted.
|
|
188
|
+
The pattern-cover relation and the canonical digest codec would remain the reviewed
|
|
189
|
+
specification boundary. Until then, these properties hold only for the host
|
|
190
|
+
implementation and its tests.
|
|
191
|
+
|
|
170
192
|
## Checks and performance
|
|
171
193
|
|
|
172
194
|
Use targeted checks, never the full suite:
|
|
@@ -186,7 +208,7 @@ bun run benchmark:provider-dispatch
|
|
|
186
208
|
bun run benchmark:startup . ../pi-fovea ../pi-contour
|
|
187
209
|
```
|
|
188
210
|
|
|
189
|
-
The contributor toolchain pins Bend 2.0.
|
|
211
|
+
The contributor toolchain pins Bend 2.0.35. `BEND_BIN` can select a trusted
|
|
190
212
|
compiler executable. Normal builds verify artifact hashes without Bend.
|
|
191
213
|
|
|
192
214
|
The dispatch benchmark measures first use and warm full-registry read calls
|