@e4779/pi-fabric 0.92.17-fork.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +181 -0
- package/THIRD_PARTY_NOTICES.md +33 -0
- package/dist/activity/store.d.ts +33 -0
- package/dist/activity/store.d.ts.map +1 -0
- package/dist/activity/types.d.ts +104 -0
- package/dist/activity/types.d.ts.map +1 -0
- package/dist/actors/binding-store.d.ts +17 -0
- package/dist/actors/binding-store.d.ts.map +1 -0
- package/dist/actors/context.d.ts +13 -0
- package/dist/actors/context.d.ts.map +1 -0
- package/dist/actors/delivery-policy.d.ts +8 -0
- package/dist/actors/delivery-policy.d.ts.map +1 -0
- package/dist/actors/directory.d.ts +47 -0
- package/dist/actors/directory.d.ts.map +1 -0
- package/dist/actors/global-registry.d.ts +47 -0
- package/dist/actors/global-registry.d.ts.map +1 -0
- package/dist/actors/host-event-observer.d.ts +5 -0
- package/dist/actors/host-event-observer.d.ts.map +1 -0
- package/dist/actors/host-event-payload.d.ts +14 -0
- package/dist/actors/host-event-payload.d.ts.map +1 -0
- package/dist/actors/log-store.d.ts +22 -0
- package/dist/actors/log-store.d.ts.map +1 -0
- package/dist/actors/manager.d.ts +175 -0
- package/dist/actors/manager.d.ts.map +1 -0
- package/dist/actors/mesh-monitor.d.ts +22 -0
- package/dist/actors/mesh-monitor.d.ts.map +1 -0
- package/dist/actors/predicate.d.ts +7 -0
- package/dist/actors/predicate.d.ts.map +1 -0
- package/dist/actors/registry-store.d.ts +15 -0
- package/dist/actors/registry-store.d.ts.map +1 -0
- package/dist/actors/types.d.ts +218 -0
- package/dist/actors/types.d.ts.map +1 -0
- package/dist/agents/bash-worktree-add.d.ts +24 -0
- package/dist/agents/bash-worktree-add.d.ts.map +1 -0
- package/dist/agents/budget-ledger.d.ts +88 -0
- package/dist/agents/budget-ledger.d.ts.map +1 -0
- package/dist/agents/claude-cli.d.ts +32 -0
- package/dist/agents/claude-cli.d.ts.map +1 -0
- package/dist/agents/claude-cli.js +17 -0
- package/dist/agents/claude-cli.js.map +7 -0
- package/dist/agents/clone-first-worktree.d.ts +17 -0
- package/dist/agents/clone-first-worktree.d.ts.map +1 -0
- package/dist/agents/compact-control.d.ts +32 -0
- package/dist/agents/compact-control.d.ts.map +1 -0
- package/dist/agents/compact-control.js +129 -0
- package/dist/agents/compact-control.js.map +7 -0
- package/dist/agents/constants.d.ts +9 -0
- package/dist/agents/constants.d.ts.map +1 -0
- package/dist/agents/cow-clone.d.ts +8 -0
- package/dist/agents/cow-clone.d.ts.map +1 -0
- package/dist/agents/handoff-completion.d.ts +4 -0
- package/dist/agents/handoff-completion.d.ts.map +1 -0
- package/dist/agents/handoff.d.ts +19 -0
- package/dist/agents/handoff.d.ts.map +1 -0
- package/dist/agents/lifecycle.d.ts +32 -0
- package/dist/agents/lifecycle.d.ts.map +1 -0
- package/dist/agents/manager.d.ts +75 -0
- package/dist/agents/manager.d.ts.map +1 -0
- package/dist/agents/pi-binary.d.ts +7 -0
- package/dist/agents/pi-binary.d.ts.map +1 -0
- package/dist/agents/request.d.ts +13 -0
- package/dist/agents/request.d.ts.map +1 -0
- package/dist/agents/result.d.ts +8 -0
- package/dist/agents/result.d.ts.map +1 -0
- package/dist/agents/result.js +9 -0
- package/dist/agents/result.js.map +7 -0
- package/dist/agents/rm.d.ts +15 -0
- package/dist/agents/rm.d.ts.map +1 -0
- package/dist/agents/semaphore.d.ts +7 -0
- package/dist/agents/semaphore.d.ts.map +1 -0
- package/dist/agents/service-provider.d.ts +9 -0
- package/dist/agents/service-provider.d.ts.map +1 -0
- package/dist/agents/service-schema.d.ts +6 -0
- package/dist/agents/service-schema.d.ts.map +1 -0
- package/dist/agents/service-types.d.ts +192 -0
- package/dist/agents/service-types.d.ts.map +1 -0
- package/dist/agents/service.d.ts +36 -0
- package/dist/agents/service.d.ts.map +1 -0
- package/dist/agents/session-export.d.ts +39 -0
- package/dist/agents/session-export.d.ts.map +1 -0
- package/dist/agents/session-pins.d.ts +24 -0
- package/dist/agents/session-pins.d.ts.map +1 -0
- package/dist/agents/thinking-transfer.d.ts +39 -0
- package/dist/agents/thinking-transfer.d.ts.map +1 -0
- package/dist/agents/transports/herdr-transport.d.ts +10 -0
- package/dist/agents/transports/herdr-transport.d.ts.map +1 -0
- package/dist/agents/transports/localterm-transport.d.ts +7 -0
- package/dist/agents/transports/localterm-transport.d.ts.map +1 -0
- package/dist/agents/transports/process-transport.d.ts +7 -0
- package/dist/agents/transports/process-transport.d.ts.map +1 -0
- package/dist/agents/transports/process-utils.d.ts +33 -0
- package/dist/agents/transports/process-utils.d.ts.map +1 -0
- package/dist/agents/transports/screen-transport.d.ts +7 -0
- package/dist/agents/transports/screen-transport.d.ts.map +1 -0
- package/dist/agents/transports/tmux-transport.d.ts +7 -0
- package/dist/agents/transports/tmux-transport.d.ts.map +1 -0
- package/dist/agents/types.d.ts +280 -0
- package/dist/agents/types.d.ts.map +1 -0
- package/dist/agents/veda-cli.d.ts +22 -0
- package/dist/agents/veda-cli.d.ts.map +1 -0
- package/dist/agents/veda-cli.js +13 -0
- package/dist/agents/veda-cli.js.map +7 -0
- package/dist/agents/worktree-manager.d.ts +14 -0
- package/dist/agents/worktree-manager.d.ts.map +1 -0
- package/dist/agents/worktree-paths.d.ts +5 -0
- package/dist/agents/worktree-paths.d.ts.map +1 -0
- package/dist/agents.d.ts +8 -0
- package/dist/agents.d.ts.map +1 -0
- package/dist/agents.js +761 -0
- package/dist/agents.js.map +7 -0
- package/dist/async-settlement.d.ts +4 -0
- package/dist/async-settlement.d.ts.map +1 -0
- package/dist/audit/details.d.ts +86 -0
- package/dist/audit/details.d.ts.map +1 -0
- package/dist/audit/index.d.ts +4 -0
- package/dist/audit/index.d.ts.map +1 -0
- package/dist/audit/projection.d.ts +20 -0
- package/dist/audit/projection.d.ts.map +1 -0
- package/dist/audit/trace.d.ts +99 -0
- package/dist/audit/trace.d.ts.map +1 -0
- package/dist/capture/catalog.d.ts +30 -0
- package/dist/capture/catalog.d.ts.map +1 -0
- package/dist/capture/interceptor.d.ts +20 -0
- package/dist/capture/interceptor.d.ts.map +1 -0
- package/dist/capture/wrapper.d.ts +15 -0
- package/dist/capture/wrapper.d.ts.map +1 -0
- package/dist/chunks/chunk-2DMJ7MEI.js +1984 -0
- package/dist/chunks/chunk-2DMJ7MEI.js.map +7 -0
- package/dist/chunks/chunk-2PZWDVJB.js +738 -0
- package/dist/chunks/chunk-2PZWDVJB.js.map +7 -0
- package/dist/chunks/chunk-2UQV52II.js +440 -0
- package/dist/chunks/chunk-2UQV52II.js.map +7 -0
- package/dist/chunks/chunk-32BNQ75J.js +1445 -0
- package/dist/chunks/chunk-32BNQ75J.js.map +7 -0
- package/dist/chunks/chunk-3H7SDWZI.js +467 -0
- package/dist/chunks/chunk-3H7SDWZI.js.map +7 -0
- package/dist/chunks/chunk-3MEHEH6B.js +41 -0
- package/dist/chunks/chunk-3MEHEH6B.js.map +7 -0
- package/dist/chunks/chunk-3QECYQGA.js +70 -0
- package/dist/chunks/chunk-3QECYQGA.js.map +7 -0
- package/dist/chunks/chunk-3WIGAX56.js +644 -0
- package/dist/chunks/chunk-3WIGAX56.js.map +7 -0
- package/dist/chunks/chunk-3YZUQESG.js +16 -0
- package/dist/chunks/chunk-3YZUQESG.js.map +7 -0
- package/dist/chunks/chunk-4JETKRFE.js +287 -0
- package/dist/chunks/chunk-4JETKRFE.js.map +7 -0
- package/dist/chunks/chunk-4SSMGBF4.js +93 -0
- package/dist/chunks/chunk-4SSMGBF4.js.map +7 -0
- package/dist/chunks/chunk-5SU3YXBS.js +15 -0
- package/dist/chunks/chunk-5SU3YXBS.js.map +7 -0
- package/dist/chunks/chunk-656HWVFU.js +409 -0
- package/dist/chunks/chunk-656HWVFU.js.map +7 -0
- package/dist/chunks/chunk-7A6NVHB5.js +1242 -0
- package/dist/chunks/chunk-7A6NVHB5.js.map +7 -0
- package/dist/chunks/chunk-7TB7NXSL.js +58 -0
- package/dist/chunks/chunk-7TB7NXSL.js.map +7 -0
- package/dist/chunks/chunk-AAHHYDTO.js +24 -0
- package/dist/chunks/chunk-AAHHYDTO.js.map +7 -0
- package/dist/chunks/chunk-ARLYAW2A.js +95 -0
- package/dist/chunks/chunk-ARLYAW2A.js.map +7 -0
- package/dist/chunks/chunk-AYBIR4YV.js +210 -0
- package/dist/chunks/chunk-AYBIR4YV.js.map +7 -0
- package/dist/chunks/chunk-BOTRGFQQ.js +87 -0
- package/dist/chunks/chunk-BOTRGFQQ.js.map +7 -0
- package/dist/chunks/chunk-CGPK5WHX.js +96 -0
- package/dist/chunks/chunk-CGPK5WHX.js.map +7 -0
- package/dist/chunks/chunk-CI56CW53.js +470 -0
- package/dist/chunks/chunk-CI56CW53.js.map +7 -0
- package/dist/chunks/chunk-CPSW2GW4.js +1466 -0
- package/dist/chunks/chunk-CPSW2GW4.js.map +7 -0
- package/dist/chunks/chunk-CQFP2RCP.js +64 -0
- package/dist/chunks/chunk-CQFP2RCP.js.map +7 -0
- package/dist/chunks/chunk-D5WKZONW.js +797 -0
- package/dist/chunks/chunk-D5WKZONW.js.map +7 -0
- package/dist/chunks/chunk-DLXPTBPL.js +151 -0
- package/dist/chunks/chunk-DLXPTBPL.js.map +7 -0
- package/dist/chunks/chunk-G4LADAYY.js +287 -0
- package/dist/chunks/chunk-G4LADAYY.js.map +7 -0
- package/dist/chunks/chunk-GXNR6NRU.js +447 -0
- package/dist/chunks/chunk-GXNR6NRU.js.map +7 -0
- package/dist/chunks/chunk-IGVDD2HT.js +10 -0
- package/dist/chunks/chunk-IGVDD2HT.js.map +7 -0
- package/dist/chunks/chunk-J2HV2URQ.js +1125 -0
- package/dist/chunks/chunk-J2HV2URQ.js.map +7 -0
- package/dist/chunks/chunk-KAD7UWT2.js +99 -0
- package/dist/chunks/chunk-KAD7UWT2.js.map +7 -0
- package/dist/chunks/chunk-KYXZJNV6.js +227 -0
- package/dist/chunks/chunk-KYXZJNV6.js.map +7 -0
- package/dist/chunks/chunk-LMAVZN7J.js +8 -0
- package/dist/chunks/chunk-LMAVZN7J.js.map +7 -0
- package/dist/chunks/chunk-M3S7XITB.js +110 -0
- package/dist/chunks/chunk-M3S7XITB.js.map +7 -0
- package/dist/chunks/chunk-MGDLRV2R.js +112 -0
- package/dist/chunks/chunk-MGDLRV2R.js.map +7 -0
- package/dist/chunks/chunk-MGWQOKBV.js +30 -0
- package/dist/chunks/chunk-MGWQOKBV.js.map +7 -0
- package/dist/chunks/chunk-N5GUXC6F.js +184 -0
- package/dist/chunks/chunk-N5GUXC6F.js.map +7 -0
- package/dist/chunks/chunk-NQOEHX62.js +215 -0
- package/dist/chunks/chunk-NQOEHX62.js.map +7 -0
- package/dist/chunks/chunk-OKOHRXGF.js +100 -0
- package/dist/chunks/chunk-OKOHRXGF.js.map +7 -0
- package/dist/chunks/chunk-OP2KTYQB.js +286 -0
- package/dist/chunks/chunk-OP2KTYQB.js.map +7 -0
- package/dist/chunks/chunk-OTCASLY2.js +52 -0
- package/dist/chunks/chunk-OTCASLY2.js.map +7 -0
- package/dist/chunks/chunk-PAN6C3JM.js +42 -0
- package/dist/chunks/chunk-PAN6C3JM.js.map +7 -0
- package/dist/chunks/chunk-PH7ZJ27F.js +6873 -0
- package/dist/chunks/chunk-PH7ZJ27F.js.map +7 -0
- package/dist/chunks/chunk-PM5I335G.js +225 -0
- package/dist/chunks/chunk-PM5I335G.js.map +7 -0
- package/dist/chunks/chunk-PSNXUZMY.js +218 -0
- package/dist/chunks/chunk-PSNXUZMY.js.map +7 -0
- package/dist/chunks/chunk-PXAICAUT.js +24 -0
- package/dist/chunks/chunk-PXAICAUT.js.map +7 -0
- package/dist/chunks/chunk-RERA6YWA.js +359 -0
- package/dist/chunks/chunk-RERA6YWA.js.map +7 -0
- package/dist/chunks/chunk-RNOPHITP.js +1720 -0
- package/dist/chunks/chunk-RNOPHITP.js.map +7 -0
- package/dist/chunks/chunk-RRGTKHXZ.js +931 -0
- package/dist/chunks/chunk-RRGTKHXZ.js.map +7 -0
- package/dist/chunks/chunk-SWB2OHYW.js +93 -0
- package/dist/chunks/chunk-SWB2OHYW.js.map +7 -0
- package/dist/chunks/chunk-T3A5GNCW.js +19 -0
- package/dist/chunks/chunk-T3A5GNCW.js.map +7 -0
- package/dist/chunks/chunk-TPLMVELH.js +118 -0
- package/dist/chunks/chunk-TPLMVELH.js.map +7 -0
- package/dist/chunks/chunk-TSRKCXNI.js +17 -0
- package/dist/chunks/chunk-TSRKCXNI.js.map +7 -0
- package/dist/chunks/chunk-U5FYOMG5.js +119 -0
- package/dist/chunks/chunk-U5FYOMG5.js.map +7 -0
- package/dist/chunks/chunk-U6CTHPZC.js +1924 -0
- package/dist/chunks/chunk-U6CTHPZC.js.map +7 -0
- package/dist/chunks/chunk-UDFDF7IY.js +1572 -0
- package/dist/chunks/chunk-UDFDF7IY.js.map +7 -0
- package/dist/chunks/chunk-UKMQK5VP.js +231 -0
- package/dist/chunks/chunk-UKMQK5VP.js.map +7 -0
- package/dist/chunks/chunk-UQ4LTUH4.js +2181 -0
- package/dist/chunks/chunk-UQ4LTUH4.js.map +7 -0
- package/dist/chunks/chunk-UTR3I23Z.js +65 -0
- package/dist/chunks/chunk-UTR3I23Z.js.map +7 -0
- package/dist/chunks/chunk-VPPIJRNZ.js +50 -0
- package/dist/chunks/chunk-VPPIJRNZ.js.map +7 -0
- package/dist/chunks/chunk-VRYEGVHR.js +195 -0
- package/dist/chunks/chunk-VRYEGVHR.js.map +7 -0
- package/dist/chunks/chunk-VRZNFNPB.js +4218 -0
- package/dist/chunks/chunk-VRZNFNPB.js.map +7 -0
- package/dist/chunks/chunk-VXZZJ44D.js +295 -0
- package/dist/chunks/chunk-VXZZJ44D.js.map +7 -0
- package/dist/chunks/chunk-W3FRE4VI.js +297 -0
- package/dist/chunks/chunk-W3FRE4VI.js.map +7 -0
- package/dist/chunks/chunk-WVH324VF.js +60 -0
- package/dist/chunks/chunk-WVH324VF.js.map +7 -0
- package/dist/chunks/chunk-X7G62ZGH.js +151 -0
- package/dist/chunks/chunk-X7G62ZGH.js.map +7 -0
- package/dist/chunks/chunk-XB3RJVT4.js +17 -0
- package/dist/chunks/chunk-XB3RJVT4.js.map +7 -0
- package/dist/chunks/chunk-XT4346N7.js +651 -0
- package/dist/chunks/chunk-XT4346N7.js.map +7 -0
- package/dist/chunks/chunk-Y7KNRAFL.js +1180 -0
- package/dist/chunks/chunk-Y7KNRAFL.js.map +7 -0
- package/dist/chunks/chunk-YK5AZ7CZ.js +692 -0
- package/dist/chunks/chunk-YK5AZ7CZ.js.map +7 -0
- package/dist/chunks/chunk-YU4O6SWQ.js +246 -0
- package/dist/chunks/chunk-YU4O6SWQ.js.map +7 -0
- package/dist/chunks/chunk-YU62DDKK.js +22 -0
- package/dist/chunks/chunk-YU62DDKK.js.map +7 -0
- package/dist/chunks/chunk-Z63R5GVN.js +121 -0
- package/dist/chunks/chunk-Z63R5GVN.js.map +7 -0
- package/dist/chunks/chunk-ZDNGXLEC.js +221 -0
- package/dist/chunks/chunk-ZDNGXLEC.js.map +7 -0
- package/dist/chunks/chunk-ZZ4LHQYJ.js +777 -0
- package/dist/chunks/chunk-ZZ4LHQYJ.js.map +7 -0
- package/dist/commands/fabric.d.ts +17 -0
- package/dist/commands/fabric.d.ts.map +1 -0
- package/dist/compaction/bounds.d.ts +23 -0
- package/dist/compaction/bounds.d.ts.map +1 -0
- package/dist/compaction/branch-details.d.ts +83 -0
- package/dist/compaction/branch-details.d.ts.map +1 -0
- package/dist/compaction/branch-summary.d.ts +9 -0
- package/dist/compaction/branch-summary.d.ts.map +1 -0
- package/dist/compaction/enrichers.d.ts +10 -0
- package/dist/compaction/enrichers.d.ts.map +1 -0
- package/dist/compaction/hook.d.ts +99 -0
- package/dist/compaction/hook.d.ts.map +1 -0
- package/dist/compaction/hook.js +22 -0
- package/dist/compaction/hook.js.map +7 -0
- package/dist/compaction/instructions.d.ts +38 -0
- package/dist/compaction/instructions.d.ts.map +1 -0
- package/dist/compaction/normalize.d.ts +83 -0
- package/dist/compaction/normalize.d.ts.map +1 -0
- package/dist/compaction/projections.d.ts +31 -0
- package/dist/compaction/projections.d.ts.map +1 -0
- package/dist/compaction/qa.d.ts +27 -0
- package/dist/compaction/qa.d.ts.map +1 -0
- package/dist/compaction/render.d.ts +10 -0
- package/dist/compaction/render.d.ts.map +1 -0
- package/dist/compaction/threshold.d.ts +5 -0
- package/dist/compaction/threshold.d.ts.map +1 -0
- package/dist/compaction/trace-events.d.ts +23 -0
- package/dist/compaction/trace-events.d.ts.map +1 -0
- package/dist/components/catalog.d.ts +25 -0
- package/dist/components/catalog.d.ts.map +1 -0
- package/dist/components/effect-policy.d.ts +21 -0
- package/dist/components/effect-policy.d.ts.map +1 -0
- package/dist/components/effect-scope.d.ts +31 -0
- package/dist/components/effect-scope.d.ts.map +1 -0
- package/dist/components/loader.d.ts +27 -0
- package/dist/components/loader.d.ts.map +1 -0
- package/dist/components/model-guidance.d.ts +48 -0
- package/dist/components/model-guidance.d.ts.map +1 -0
- package/dist/components/provider-component.d.ts +31 -0
- package/dist/components/provider-component.d.ts.map +1 -0
- package/dist/components/supervisor.d.ts +29 -0
- package/dist/components/supervisor.d.ts.map +1 -0
- package/dist/components/types.d.ts +140 -0
- package/dist/components/types.d.ts.map +1 -0
- package/dist/config-migrations.d.ts +11 -0
- package/dist/config-migrations.d.ts.map +1 -0
- package/dist/config.d.ts +282 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/core/action-arguments.d.ts +12 -0
- package/dist/core/action-arguments.d.ts.map +1 -0
- package/dist/core/action-registry.d.ts +170 -0
- package/dist/core/action-registry.d.ts.map +1 -0
- package/dist/core/action-registry.js +20 -0
- package/dist/core/action-registry.js.map +7 -0
- package/dist/core/action-repair.d.ts +15 -0
- package/dist/core/action-repair.d.ts.map +1 -0
- package/dist/core/action-result.d.ts +13 -0
- package/dist/core/action-result.d.ts.map +1 -0
- package/dist/core/agent-dir.d.ts +2 -0
- package/dist/core/agent-dir.d.ts.map +1 -0
- package/dist/core/approval-controller.d.ts +31 -0
- package/dist/core/approval-controller.d.ts.map +1 -0
- package/dist/core/atomic-write.d.ts +15 -0
- package/dist/core/atomic-write.d.ts.map +1 -0
- package/dist/core/auto-approval-classifier.d.ts +17 -0
- package/dist/core/auto-approval-classifier.d.ts.map +1 -0
- package/dist/core/call-preview.d.ts +8 -0
- package/dist/core/call-preview.d.ts.map +1 -0
- package/dist/core/child-tool-allowlist.d.ts +3 -0
- package/dist/core/child-tool-allowlist.d.ts.map +1 -0
- package/dist/core/compact-controller.d.ts +42 -0
- package/dist/core/compact-controller.d.ts.map +1 -0
- package/dist/core/core-override-guidance.d.ts +7 -0
- package/dist/core/core-override-guidance.d.ts.map +1 -0
- package/dist/core/damaged-file.d.ts +6 -0
- package/dist/core/damaged-file.d.ts.map +1 -0
- package/dist/core/direct-tool-approval.d.ts +19 -0
- package/dist/core/direct-tool-approval.d.ts.map +1 -0
- package/dist/core/effect-conflict.d.ts +3 -0
- package/dist/core/effect-conflict.d.ts.map +1 -0
- package/dist/core/file-lock.d.ts +12 -0
- package/dist/core/file-lock.d.ts.map +1 -0
- package/dist/core/kernel-skills.d.ts +3 -0
- package/dist/core/kernel-skills.d.ts.map +1 -0
- package/dist/core/model-resolution.d.ts +62 -0
- package/dist/core/model-resolution.d.ts.map +1 -0
- package/dist/core/model-usage.d.ts +8 -0
- package/dist/core/model-usage.d.ts.map +1 -0
- package/dist/core/pi-arguments.d.ts +3 -0
- package/dist/core/pi-arguments.d.ts.map +1 -0
- package/dist/core/pi-bash-error.d.ts +9 -0
- package/dist/core/pi-bash-error.d.ts.map +1 -0
- package/dist/core/pi-tools.d.ts +9 -0
- package/dist/core/pi-tools.d.ts.map +1 -0
- package/dist/core/provider-bindings.d.ts +47 -0
- package/dist/core/provider-bindings.d.ts.map +1 -0
- package/dist/core/proxy-contract.d.ts +18 -0
- package/dist/core/proxy-contract.d.ts.map +1 -0
- package/dist/core/session-context.d.ts +14 -0
- package/dist/core/session-context.d.ts.map +1 -0
- package/dist/core/shell-jobs.d.ts +99 -0
- package/dist/core/shell-jobs.d.ts.map +1 -0
- package/dist/core/skill-block.d.ts +10 -0
- package/dist/core/skill-block.d.ts.map +1 -0
- package/dist/core/skill-dir.d.ts +4 -0
- package/dist/core/skill-dir.d.ts.map +1 -0
- package/dist/core/skill-prompt.d.ts +3 -0
- package/dist/core/skill-prompt.d.ts.map +1 -0
- package/dist/core/skill-references.d.ts +7 -0
- package/dist/core/skill-references.d.ts.map +1 -0
- package/dist/core/stable-hash.d.ts +3 -0
- package/dist/core/stable-hash.d.ts.map +1 -0
- package/dist/core/system-guidance.d.ts +13 -0
- package/dist/core/system-guidance.d.ts.map +1 -0
- package/dist/core/token-math.d.ts +16 -0
- package/dist/core/token-math.d.ts.map +1 -0
- package/dist/core/tool-ownership.d.ts +47 -0
- package/dist/core/tool-ownership.d.ts.map +1 -0
- package/dist/core/tool-result-proxy.d.ts +18 -0
- package/dist/core/tool-result-proxy.d.ts.map +1 -0
- package/dist/entropy/active.d.ts +9 -0
- package/dist/entropy/active.d.ts.map +1 -0
- package/dist/entropy/compiled-store.d.ts +16 -0
- package/dist/entropy/compiled-store.d.ts.map +1 -0
- package/dist/entropy/compiled-surface.d.ts +57 -0
- package/dist/entropy/compiled-surface.d.ts.map +1 -0
- package/dist/entropy/compiler.d.ts +27 -0
- package/dist/entropy/compiler.d.ts.map +1 -0
- package/dist/entropy/corpus.d.ts +22 -0
- package/dist/entropy/corpus.d.ts.map +1 -0
- package/dist/entropy/fingerprint.d.ts +9 -0
- package/dist/entropy/fingerprint.d.ts.map +1 -0
- package/dist/entropy/index.d.ts +16 -0
- package/dist/entropy/index.d.ts.map +1 -0
- package/dist/entropy/index.js +194 -0
- package/dist/entropy/index.js.map +7 -0
- package/dist/entropy/meter.d.ts +10 -0
- package/dist/entropy/meter.d.ts.map +1 -0
- package/dist/entropy/normal-form.d.ts +40 -0
- package/dist/entropy/normal-form.d.ts.map +1 -0
- package/dist/entropy/passes.d.ts +13 -0
- package/dist/entropy/passes.d.ts.map +1 -0
- package/dist/entropy/pool-store.d.ts +15 -0
- package/dist/entropy/pool-store.d.ts.map +1 -0
- package/dist/entropy/pool.d.ts +41 -0
- package/dist/entropy/pool.d.ts.map +1 -0
- package/dist/entropy/presentation.d.ts +12 -0
- package/dist/entropy/presentation.d.ts.map +1 -0
- package/dist/entropy/sessions.d.ts +47 -0
- package/dist/entropy/sessions.d.ts.map +1 -0
- package/dist/entropy/surface.d.ts +30 -0
- package/dist/entropy/surface.d.ts.map +1 -0
- package/dist/entropy/trial.d.ts +38 -0
- package/dist/entropy/trial.d.ts.map +1 -0
- package/dist/entropy/types.d.ts +181 -0
- package/dist/entropy/types.d.ts.map +1 -0
- package/dist/execution-service.d.ts +66 -0
- package/dist/execution-service.d.ts.map +1 -0
- package/dist/fabric-exec-arguments.d.ts +7 -0
- package/dist/fabric-exec-arguments.d.ts.map +1 -0
- package/dist/fabric-exec-tool.d.ts +8 -0
- package/dist/fabric-exec-tool.d.ts.map +1 -0
- package/dist/fabric-runtime-state.d.ts +96 -0
- package/dist/fabric-runtime-state.d.ts.map +1 -0
- package/dist/fabric-runtime-state.js +11928 -0
- package/dist/fabric-runtime-state.js.map +7 -0
- package/dist/fabric-state.d.ts +95 -0
- package/dist/fabric-state.d.ts.map +1 -0
- package/dist/failure-progress.d.ts +3 -0
- package/dist/failure-progress.d.ts.map +1 -0
- package/dist/host-compatibility.d.ts +5 -0
- package/dist/host-compatibility.d.ts.map +1 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +6094 -0
- package/dist/index.js.map +7 -0
- package/dist/jev/auth.d.ts +5 -0
- package/dist/jev/auth.d.ts.map +1 -0
- package/dist/jev/browser.d.ts +37 -0
- package/dist/jev/browser.d.ts.map +1 -0
- package/dist/jev/browser.js +13 -0
- package/dist/jev/browser.js.map +7 -0
- package/dist/jev/client.d.ts +29 -0
- package/dist/jev/client.d.ts.map +1 -0
- package/dist/jev/client.js +11 -0
- package/dist/jev/client.js.map +7 -0
- package/dist/jev/config.d.ts +17 -0
- package/dist/jev/config.d.ts.map +1 -0
- package/dist/jev/guest-types.d.ts +2 -0
- package/dist/jev/guest-types.d.ts.map +1 -0
- package/dist/jev/manager.d.ts +36 -0
- package/dist/jev/manager.d.ts.map +1 -0
- package/dist/jev/observation.d.ts +59 -0
- package/dist/jev/observation.d.ts.map +1 -0
- package/dist/jev/observation.js +20 -0
- package/dist/jev/observation.js.map +7 -0
- package/dist/jev/types.d.ts +142 -0
- package/dist/jev/types.d.ts.map +1 -0
- package/dist/jev/validation.d.ts +8 -0
- package/dist/jev/validation.d.ts.map +1 -0
- package/dist/jev.d.ts +9 -0
- package/dist/jev.d.ts.map +1 -0
- package/dist/jev.js +49 -0
- package/dist/jev.js.map +7 -0
- package/dist/lifecycle/broker.d.ts +30 -0
- package/dist/lifecycle/broker.d.ts.map +1 -0
- package/dist/lifecycle/delivery-scheduler.d.ts +30 -0
- package/dist/lifecycle/delivery-scheduler.d.ts.map +1 -0
- package/dist/lifecycle/types.d.ts +91 -0
- package/dist/lifecycle/types.d.ts.map +1 -0
- package/dist/log-tail.d.ts +11 -0
- package/dist/log-tail.d.ts.map +1 -0
- package/dist/main-agent.d.ts +70 -0
- package/dist/main-agent.d.ts.map +1 -0
- package/dist/managed-host.d.ts +22 -0
- package/dist/managed-host.d.ts.map +1 -0
- package/dist/mcp.d.ts +9 -0
- package/dist/mcp.d.ts.map +1 -0
- package/dist/mcp.js +21 -0
- package/dist/mcp.js.map +7 -0
- package/dist/memory/client.d.ts +31 -0
- package/dist/memory/client.d.ts.map +1 -0
- package/dist/memory/context.d.ts +114 -0
- package/dist/memory/context.d.ts.map +1 -0
- package/dist/memory/digest.d.ts +48 -0
- package/dist/memory/digest.d.ts.map +1 -0
- package/dist/memory/digest.js +7 -0
- package/dist/memory/digest.js.map +7 -0
- package/dist/memory/discovery.d.ts +43 -0
- package/dist/memory/discovery.d.ts.map +1 -0
- package/dist/memory/discovery.js +25 -0
- package/dist/memory/discovery.js.map +7 -0
- package/dist/memory/expand-service.d.ts +4 -0
- package/dist/memory/expand-service.d.ts.map +1 -0
- package/dist/memory/host-source.d.ts +60 -0
- package/dist/memory/host-source.d.ts.map +1 -0
- package/dist/memory/index.d.ts +113 -0
- package/dist/memory/index.d.ts.map +1 -0
- package/dist/memory/lineage.d.ts +25 -0
- package/dist/memory/lineage.d.ts.map +1 -0
- package/dist/memory/normalize.d.ts +188 -0
- package/dist/memory/normalize.d.ts.map +1 -0
- package/dist/memory/normalize.js +26 -0
- package/dist/memory/normalize.js.map +7 -0
- package/dist/memory/portable.d.ts +66 -0
- package/dist/memory/portable.d.ts.map +1 -0
- package/dist/memory/provider.d.ts +15 -0
- package/dist/memory/provider.d.ts.map +1 -0
- package/dist/memory/recall-service.d.ts +5 -0
- package/dist/memory/recall-service.d.ts.map +1 -0
- package/dist/memory/regex.d.ts +19 -0
- package/dist/memory/regex.d.ts.map +1 -0
- package/dist/memory/request-cache.d.ts +49 -0
- package/dist/memory/request-cache.d.ts.map +1 -0
- package/dist/memory/request-context.d.ts +57 -0
- package/dist/memory/request-context.d.ts.map +1 -0
- package/dist/memory/request-limits.d.ts +8 -0
- package/dist/memory/request-limits.d.ts.map +1 -0
- package/dist/memory/search.d.ts +98 -0
- package/dist/memory/search.d.ts.map +1 -0
- package/dist/memory/search.js +24 -0
- package/dist/memory/search.js.map +7 -0
- package/dist/memory/sessions-service.d.ts +3 -0
- package/dist/memory/sessions-service.d.ts.map +1 -0
- package/dist/memory/source-observation.d.ts +28 -0
- package/dist/memory/source-observation.d.ts.map +1 -0
- package/dist/memory/tokenize.d.ts +24 -0
- package/dist/memory/tokenize.d.ts.map +1 -0
- package/dist/memory.d.ts +8 -0
- package/dist/memory.d.ts.map +1 -0
- package/dist/memory.js +119 -0
- package/dist/memory.js.map +7 -0
- package/dist/mesh/store.d.ts +78 -0
- package/dist/mesh/store.d.ts.map +1 -0
- package/dist/output-budget.d.ts +12 -0
- package/dist/output-budget.d.ts.map +1 -0
- package/dist/prewalk/arm.d.ts +8 -0
- package/dist/prewalk/arm.d.ts.map +1 -0
- package/dist/prewalk/controller.d.ts +66 -0
- package/dist/prewalk/controller.d.ts.map +1 -0
- package/dist/prewalk/fs-drift.d.ts +19 -0
- package/dist/prewalk/fs-drift.d.ts.map +1 -0
- package/dist/prewalk/handoff.d.ts +46 -0
- package/dist/prewalk/handoff.d.ts.map +1 -0
- package/dist/protocol.d.ts +275 -0
- package/dist/protocol.d.ts.map +1 -0
- package/dist/protocol.js +46 -0
- package/dist/protocol.js.map +7 -0
- package/dist/providers/agents-actions.d.ts +3 -0
- package/dist/providers/agents-actions.d.ts.map +1 -0
- package/dist/providers/agents-message-router.d.ts +29 -0
- package/dist/providers/agents-message-router.d.ts.map +1 -0
- package/dist/providers/agents-progress.d.ts +18 -0
- package/dist/providers/agents-progress.d.ts.map +1 -0
- package/dist/providers/agents-provider.d.ts +51 -0
- package/dist/providers/agents-provider.d.ts.map +1 -0
- package/dist/providers/arg-normalization.d.ts +15 -0
- package/dist/providers/arg-normalization.d.ts.map +1 -0
- package/dist/providers/captured-tools-provider.d.ts +23 -0
- package/dist/providers/captured-tools-provider.d.ts.map +1 -0
- package/dist/providers/compact-provider.d.ts +14 -0
- package/dist/providers/compact-provider.d.ts.map +1 -0
- package/dist/providers/components-provider.d.ts +12 -0
- package/dist/providers/components-provider.d.ts.map +1 -0
- package/dist/providers/jev-provider.d.ts +70 -0
- package/dist/providers/jev-provider.d.ts.map +1 -0
- package/dist/providers/jev-provider.js +28 -0
- package/dist/providers/jev-provider.js.map +7 -0
- package/dist/providers/mcp-descriptor-cache.d.ts +47 -0
- package/dist/providers/mcp-descriptor-cache.d.ts.map +1 -0
- package/dist/providers/mcp-provider.d.ts +47 -0
- package/dist/providers/mcp-provider.d.ts.map +1 -0
- package/dist/providers/memory-provider.d.ts +32 -0
- package/dist/providers/memory-provider.d.ts.map +1 -0
- package/dist/providers/memory-provider.js +23 -0
- package/dist/providers/memory-provider.js.map +7 -0
- package/dist/providers/mesh-provider.d.ts +17 -0
- package/dist/providers/mesh-provider.d.ts.map +1 -0
- package/dist/providers/pi-bash-cwd.d.ts +49 -0
- package/dist/providers/pi-bash-cwd.d.ts.map +1 -0
- package/dist/providers/pi-tools-provider.d.ts +25 -0
- package/dist/providers/pi-tools-provider.d.ts.map +1 -0
- package/dist/providers/schema-provider.d.ts +15 -0
- package/dist/providers/schema-provider.d.ts.map +1 -0
- package/dist/providers/state-provider.d.ts +16 -0
- package/dist/providers/state-provider.d.ts.map +1 -0
- package/dist/providers/write-diff-limits.d.ts +5 -0
- package/dist/providers/write-diff-limits.d.ts.map +1 -0
- package/dist/providers/write-preview.d.ts +3 -0
- package/dist/providers/write-preview.d.ts.map +1 -0
- package/dist/ref-names.d.ts +2 -0
- package/dist/ref-names.d.ts.map +1 -0
- package/dist/repairs/active.d.ts +7 -0
- package/dist/repairs/active.d.ts.map +1 -0
- package/dist/repairs/apply.d.ts +7 -0
- package/dist/repairs/apply.d.ts.map +1 -0
- package/dist/repairs/catalog-digest.d.ts +5 -0
- package/dist/repairs/catalog-digest.d.ts.map +1 -0
- package/dist/repairs/classify.d.ts +10 -0
- package/dist/repairs/classify.d.ts.map +1 -0
- package/dist/repairs/compiler.d.ts +33 -0
- package/dist/repairs/compiler.d.ts.map +1 -0
- package/dist/repairs/promote.d.ts +4 -0
- package/dist/repairs/promote.d.ts.map +1 -0
- package/dist/repairs/store.d.ts +10 -0
- package/dist/repairs/store.d.ts.map +1 -0
- package/dist/repairs/types.d.ts +49 -0
- package/dist/repairs/types.d.ts.map +1 -0
- package/dist/repeat-guard.d.ts +25 -0
- package/dist/repeat-guard.d.ts.map +1 -0
- package/dist/residency/actor-client.d.ts +16 -0
- package/dist/residency/actor-client.d.ts.map +1 -0
- package/dist/residency/actor-client.js +9 -0
- package/dist/residency/actor-client.js.map +7 -0
- package/dist/residency/client.d.ts +44 -0
- package/dist/residency/client.d.ts.map +1 -0
- package/dist/residency/host.d.ts +3 -0
- package/dist/residency/host.d.ts.map +1 -0
- package/dist/residency/host.js +32 -0
- package/dist/residency/host.js.map +7 -0
- package/dist/residency/launcher-owner.d.ts +7 -0
- package/dist/residency/launcher-owner.d.ts.map +1 -0
- package/dist/residency/launcher.d.ts +3 -0
- package/dist/residency/launcher.d.ts.map +1 -0
- package/dist/residency/launcher.js +154 -0
- package/dist/residency/launcher.js.map +7 -0
- package/dist/residency/pi-entry.d.ts +3 -0
- package/dist/residency/pi-entry.d.ts.map +1 -0
- package/dist/residency/pi-entry.js +48 -0
- package/dist/residency/pi-entry.js.map +7 -0
- package/dist/residency/protocol.d.ts +122 -0
- package/dist/residency/protocol.d.ts.map +1 -0
- package/dist/run-display.d.ts +3 -0
- package/dist/run-display.d.ts.map +1 -0
- package/dist/runtime/core-override-guest-types.d.ts +15 -0
- package/dist/runtime/core-override-guest-types.d.ts.map +1 -0
- package/dist/runtime/core-override-guest-types.js +9 -0
- package/dist/runtime/core-override-guest-types.js.map +7 -0
- package/dist/runtime/core-tool-properties.d.ts +6 -0
- package/dist/runtime/core-tool-properties.d.ts.map +1 -0
- package/dist/runtime/cpython-child-source.d.ts +2 -0
- package/dist/runtime/cpython-child-source.d.ts.map +1 -0
- package/dist/runtime/cpython-linux-sandbox.d.ts +2 -0
- package/dist/runtime/cpython-linux-sandbox.d.ts.map +1 -0
- package/dist/runtime/cpython-runtime.d.ts +9 -0
- package/dist/runtime/cpython-runtime.d.ts.map +1 -0
- package/dist/runtime/cpython-runtime.js +677 -0
- package/dist/runtime/cpython-runtime.js.map +7 -0
- package/dist/runtime/dynamic-guest-types.d.ts +3 -0
- package/dist/runtime/dynamic-guest-types.d.ts.map +1 -0
- package/dist/runtime/dynamic-guest-types.js +8 -0
- package/dist/runtime/dynamic-guest-types.js.map +7 -0
- package/dist/runtime/guest-code-repair.d.ts +2 -0
- package/dist/runtime/guest-code-repair.d.ts.map +1 -0
- package/dist/runtime/guest-stack-map.d.ts +11 -0
- package/dist/runtime/guest-stack-map.d.ts.map +1 -0
- package/dist/runtime/guest-types.d.ts +40 -0
- package/dist/runtime/guest-types.d.ts.map +1 -0
- package/dist/runtime/guest-types.js +13 -0
- package/dist/runtime/guest-types.js.map +7 -0
- package/dist/runtime/kernel.d.ts +30 -0
- package/dist/runtime/kernel.d.ts.map +1 -0
- package/dist/runtime/monty-bridge.d.ts +4 -0
- package/dist/runtime/monty-bridge.d.ts.map +1 -0
- package/dist/runtime/monty-runtime.d.ts +6 -0
- package/dist/runtime/monty-runtime.d.ts.map +1 -0
- package/dist/runtime/monty-runtime.js +485 -0
- package/dist/runtime/monty-runtime.js.map +7 -0
- package/dist/runtime/monty-source.d.ts +10 -0
- package/dist/runtime/monty-source.d.ts.map +1 -0
- package/dist/runtime/monty-values.d.ts +7 -0
- package/dist/runtime/monty-values.d.ts.map +1 -0
- package/dist/runtime/node-process-child-source.d.ts +2 -0
- package/dist/runtime/node-process-child-source.d.ts.map +1 -0
- package/dist/runtime/node-process-runtime.d.ts +10 -0
- package/dist/runtime/node-process-runtime.d.ts.map +1 -0
- package/dist/runtime/node-process-runtime.js +16 -0
- package/dist/runtime/node-process-runtime.js.map +7 -0
- package/dist/runtime/orchestration.d.ts +3 -0
- package/dist/runtime/orchestration.d.ts.map +1 -0
- package/dist/runtime/python-arguments.d.ts +2 -0
- package/dist/runtime/python-arguments.d.ts.map +1 -0
- package/dist/runtime/python-error-guidance.d.ts +6 -0
- package/dist/runtime/python-error-guidance.d.ts.map +1 -0
- package/dist/runtime/quickjs-runtime.d.ts +8 -0
- package/dist/runtime/quickjs-runtime.d.ts.map +1 -0
- package/dist/runtime/quickjs-runtime.js +15 -0
- package/dist/runtime/quickjs-runtime.js.map +7 -0
- package/dist/runtime/type-checker.d.ts +18 -0
- package/dist/runtime/type-checker.d.ts.map +1 -0
- package/dist/runtime/type-checker.js +11 -0
- package/dist/runtime/type-checker.js.map +7 -0
- package/dist/runtime/typescript-kernel.d.ts +14 -0
- package/dist/runtime/typescript-kernel.d.ts.map +1 -0
- package/dist/runtime/typescript-kernel.js +53 -0
- package/dist/runtime/typescript-kernel.js.map +7 -0
- package/dist/runtime-paths.d.ts +7 -0
- package/dist/runtime-paths.d.ts.map +1 -0
- package/dist/runtime-state-builtins.d.ts +26 -0
- package/dist/runtime-state-builtins.d.ts.map +1 -0
- package/dist/runtime-state-speculation.d.ts +16 -0
- package/dist/runtime-state-speculation.d.ts.map +1 -0
- package/dist/schema/controller.d.ts +35 -0
- package/dist/schema/controller.d.ts.map +1 -0
- package/dist/schema/policy.d.ts +2 -0
- package/dist/schema/policy.d.ts.map +1 -0
- package/dist/schema/types.d.ts +86 -0
- package/dist/schema/types.d.ts.map +1 -0
- package/dist/schema/workspace.d.ts +19 -0
- package/dist/schema/workspace.d.ts.map +1 -0
- package/dist/speculation/eligibility.d.ts +22 -0
- package/dist/speculation/eligibility.d.ts.map +1 -0
- package/dist/speculation/freshness.d.ts +10 -0
- package/dist/speculation/freshness.d.ts.map +1 -0
- package/dist/speculation/partial-json.d.ts +9 -0
- package/dist/speculation/partial-json.d.ts.map +1 -0
- package/dist/speculation/python-scanner.d.ts +7 -0
- package/dist/speculation/python-scanner.d.ts.map +1 -0
- package/dist/speculation/python-scanner.js +166 -0
- package/dist/speculation/python-scanner.js.map +7 -0
- package/dist/speculation/scanner.d.ts +13 -0
- package/dist/speculation/scanner.d.ts.map +1 -0
- package/dist/speculation/scanner.js +182 -0
- package/dist/speculation/scanner.js.map +7 -0
- package/dist/speculation/store.d.ts +41 -0
- package/dist/speculation/store.d.ts.map +1 -0
- package/dist/speculation/stream-tap.d.ts +30 -0
- package/dist/speculation/stream-tap.d.ts.map +1 -0
- package/dist/speculation/types.d.ts +44 -0
- package/dist/speculation/types.d.ts.map +1 -0
- package/dist/state/complexity.d.ts +13 -0
- package/dist/state/complexity.d.ts.map +1 -0
- package/dist/state/evidence-runner.d.ts +17 -0
- package/dist/state/evidence-runner.d.ts.map +1 -0
- package/dist/state/store.d.ts +76 -0
- package/dist/state/store.d.ts.map +1 -0
- package/dist/state/types.d.ts +165 -0
- package/dist/state/types.d.ts.map +1 -0
- package/dist/storage/retention.d.ts +22 -0
- package/dist/storage/retention.d.ts.map +1 -0
- package/dist/thinking.d.ts +19 -0
- package/dist/thinking.d.ts.map +1 -0
- package/dist/topology/control-plane.d.ts +58 -0
- package/dist/topology/control-plane.d.ts.map +1 -0
- package/dist/topology/participant-directory.d.ts +33 -0
- package/dist/topology/participant-directory.d.ts.map +1 -0
- package/dist/topology/peer-settle.d.ts +51 -0
- package/dist/topology/peer-settle.d.ts.map +1 -0
- package/dist/topology/records.d.ts +6 -0
- package/dist/topology/records.d.ts.map +1 -0
- package/dist/topology/types.d.ts +89 -0
- package/dist/topology/types.d.ts.map +1 -0
- package/dist/type-error-guidance.d.ts +3 -0
- package/dist/type-error-guidance.d.ts.map +1 -0
- package/dist/ui/arc-group.d.ts +17 -0
- package/dist/ui/arc-group.d.ts.map +1 -0
- package/dist/ui/border-status-editor.d.ts +22 -0
- package/dist/ui/border-status-editor.d.ts.map +1 -0
- package/dist/ui/code-preview-shell.d.ts +11 -0
- package/dist/ui/code-preview-shell.d.ts.map +1 -0
- package/dist/ui/code-preview.d.ts +53 -0
- package/dist/ui/code-preview.d.ts.map +1 -0
- package/dist/ui/controller.d.ts +20 -0
- package/dist/ui/controller.d.ts.map +1 -0
- package/dist/ui/conversation-chrome.d.ts +16 -0
- package/dist/ui/conversation-chrome.d.ts.map +1 -0
- package/dist/ui/conversation-chrome.js +11 -0
- package/dist/ui/conversation-chrome.js.map +7 -0
- package/dist/ui/conversation-commands.d.ts +12 -0
- package/dist/ui/conversation-commands.d.ts.map +1 -0
- package/dist/ui/conversation-history.d.ts +6 -0
- package/dist/ui/conversation-history.d.ts.map +1 -0
- package/dist/ui/conversation-host.d.ts +7 -0
- package/dist/ui/conversation-host.d.ts.map +1 -0
- package/dist/ui/conversation-host.js +9 -0
- package/dist/ui/conversation-host.js.map +7 -0
- package/dist/ui/conversation-native-reader-checkpoint.d.ts +8 -0
- package/dist/ui/conversation-native-reader-checkpoint.d.ts.map +1 -0
- package/dist/ui/conversation-native-reader-replay.d.ts +10 -0
- package/dist/ui/conversation-native-reader-replay.d.ts.map +1 -0
- package/dist/ui/conversation-native-reader.d.ts +110 -0
- package/dist/ui/conversation-native-reader.d.ts.map +1 -0
- package/dist/ui/conversation-native-reader.js +1050 -0
- package/dist/ui/conversation-native-reader.js.map +7 -0
- package/dist/ui/conversation-queue-store.d.ts +14 -0
- package/dist/ui/conversation-queue-store.d.ts.map +1 -0
- package/dist/ui/conversation-queue.d.ts +244 -0
- package/dist/ui/conversation-queue.d.ts.map +1 -0
- package/dist/ui/conversation-render.d.ts +104 -0
- package/dist/ui/conversation-render.d.ts.map +1 -0
- package/dist/ui/conversation-selection.d.ts +18 -0
- package/dist/ui/conversation-selection.d.ts.map +1 -0
- package/dist/ui/conversation-shortcut.d.ts +3 -0
- package/dist/ui/conversation-shortcut.d.ts.map +1 -0
- package/dist/ui/conversation-targets.d.ts +7 -0
- package/dist/ui/conversation-targets.d.ts.map +1 -0
- package/dist/ui/conversation-targets.js +12 -0
- package/dist/ui/conversation-targets.js.map +7 -0
- package/dist/ui/conversation-transcript.d.ts +25 -0
- package/dist/ui/conversation-transcript.d.ts.map +1 -0
- package/dist/ui/conversation.d.ts +219 -0
- package/dist/ui/conversation.d.ts.map +1 -0
- package/dist/ui/conversation.js +2861 -0
- package/dist/ui/conversation.js.map +7 -0
- package/dist/ui/core-tool-render.d.ts +20 -0
- package/dist/ui/core-tool-render.d.ts.map +1 -0
- package/dist/ui/dashboard-detail.d.ts +68 -0
- package/dist/ui/dashboard-detail.d.ts.map +1 -0
- package/dist/ui/dashboard-fabric-graph.d.ts +50 -0
- package/dist/ui/dashboard-fabric-graph.d.ts.map +1 -0
- package/dist/ui/dashboard-graph-controller.d.ts +52 -0
- package/dist/ui/dashboard-graph-controller.d.ts.map +1 -0
- package/dist/ui/dashboard-modal-controller.d.ts +36 -0
- package/dist/ui/dashboard-modal-controller.d.ts.map +1 -0
- package/dist/ui/dashboard-model.d.ts +111 -0
- package/dist/ui/dashboard-model.d.ts.map +1 -0
- package/dist/ui/dashboard-presentation.d.ts +6 -0
- package/dist/ui/dashboard-presentation.d.ts.map +1 -0
- package/dist/ui/dashboard.d.ts +156 -0
- package/dist/ui/dashboard.d.ts.map +1 -0
- package/dist/ui/dashboard.js +4622 -0
- package/dist/ui/dashboard.js.map +7 -0
- package/dist/ui/diff-background.d.ts +12 -0
- package/dist/ui/diff-background.d.ts.map +1 -0
- package/dist/ui/dynamic-border.d.ts +8 -0
- package/dist/ui/dynamic-border.d.ts.map +1 -0
- package/dist/ui/escape-halt.d.ts +11 -0
- package/dist/ui/escape-halt.d.ts.map +1 -0
- package/dist/ui/fabric-actor-delivery-selector.d.ts +17 -0
- package/dist/ui/fabric-actor-delivery-selector.d.ts.map +1 -0
- package/dist/ui/fabric-actor-tool-selector.d.ts +22 -0
- package/dist/ui/fabric-actor-tool-selector.d.ts.map +1 -0
- package/dist/ui/fabric-code-parser.d.ts +9 -0
- package/dist/ui/fabric-code-parser.d.ts.map +1 -0
- package/dist/ui/fabric-host-event-selector.d.ts +29 -0
- package/dist/ui/fabric-host-event-selector.d.ts.map +1 -0
- package/dist/ui/fabric-model-selector.d.ts +64 -0
- package/dist/ui/fabric-model-selector.d.ts.map +1 -0
- package/dist/ui/fabric-render.d.ts +113 -0
- package/dist/ui/fabric-render.d.ts.map +1 -0
- package/dist/ui/fabric-thinking-selector.d.ts +26 -0
- package/dist/ui/fabric-thinking-selector.d.ts.map +1 -0
- package/dist/ui/fabric-title-hint.d.ts +3 -0
- package/dist/ui/fabric-title-hint.d.ts.map +1 -0
- package/dist/ui/format.d.ts +9 -0
- package/dist/ui/format.d.ts.map +1 -0
- package/dist/ui/handoff-completion.d.ts +3 -0
- package/dist/ui/handoff-completion.d.ts.map +1 -0
- package/dist/ui/highlight.d.ts +69 -0
- package/dist/ui/highlight.d.ts.map +1 -0
- package/dist/ui/model-picker.d.ts +46 -0
- package/dist/ui/model-picker.d.ts.map +1 -0
- package/dist/ui/model-picker.js +17 -0
- package/dist/ui/model-picker.js.map +7 -0
- package/dist/ui/preview-lines.d.ts +16 -0
- package/dist/ui/preview-lines.d.ts.map +1 -0
- package/dist/ui/row-balance.d.ts +29 -0
- package/dist/ui/row-balance.d.ts.map +1 -0
- package/dist/ui/settings-component.d.ts +26 -0
- package/dist/ui/settings-component.d.ts.map +1 -0
- package/dist/ui/settings-rpc.d.ts +15 -0
- package/dist/ui/settings-rpc.d.ts.map +1 -0
- package/dist/ui/settings-section-context.d.ts +18 -0
- package/dist/ui/settings-section-context.d.ts.map +1 -0
- package/dist/ui/settings-sections-agents.d.ts +5 -0
- package/dist/ui/settings-sections-agents.d.ts.map +1 -0
- package/dist/ui/settings-sections-execution.d.ts +8 -0
- package/dist/ui/settings-sections-execution.d.ts.map +1 -0
- package/dist/ui/settings-sections-lifecycle.d.ts +6 -0
- package/dist/ui/settings-sections-lifecycle.d.ts.map +1 -0
- package/dist/ui/settings-sections-presentation.d.ts +6 -0
- package/dist/ui/settings-sections-presentation.d.ts.map +1 -0
- package/dist/ui/settings-sections.d.ts +12 -0
- package/dist/ui/settings-sections.d.ts.map +1 -0
- package/dist/ui/settings-submenus.d.ts +74 -0
- package/dist/ui/settings-submenus.d.ts.map +1 -0
- package/dist/ui/settings-values.d.ts +63 -0
- package/dist/ui/settings-values.d.ts.map +1 -0
- package/dist/ui/settings.d.ts +21 -0
- package/dist/ui/settings.d.ts.map +1 -0
- package/dist/ui/settings.js +1985 -0
- package/dist/ui/settings.js.map +7 -0
- package/dist/ui/shell-hang-keys.d.ts +11 -0
- package/dist/ui/shell-hang-keys.d.ts.map +1 -0
- package/dist/ui/shiki-language.d.ts +7 -0
- package/dist/ui/shiki-language.d.ts.map +1 -0
- package/dist/ui/shiki-theme.d.ts +7 -0
- package/dist/ui/shiki-theme.d.ts.map +1 -0
- package/dist/ui/snapshot.d.ts +17 -0
- package/dist/ui/snapshot.d.ts.map +1 -0
- package/dist/ui/spinner.d.ts +6 -0
- package/dist/ui/spinner.d.ts.map +1 -0
- package/dist/ui/state-file-preview.d.ts +13 -0
- package/dist/ui/state-file-preview.d.ts.map +1 -0
- package/dist/ui/structured.d.ts +9 -0
- package/dist/ui/structured.d.ts.map +1 -0
- package/dist/ui/tool-call-timing.d.ts +2 -0
- package/dist/ui/tool-call-timing.d.ts.map +1 -0
- package/dist/ui/tool-display.d.ts +8 -0
- package/dist/ui/tool-display.d.ts.map +1 -0
- package/dist/ui/topology.d.ts +162 -0
- package/dist/ui/topology.d.ts.map +1 -0
- package/dist/ui/transcript-parser.d.ts +18 -0
- package/dist/ui/transcript-parser.d.ts.map +1 -0
- package/dist/ui/transcript-reader.d.ts +10 -0
- package/dist/ui/transcript-reader.d.ts.map +1 -0
- package/dist/ui/transcript-sanitization.d.ts +14 -0
- package/dist/ui/transcript-sanitization.d.ts.map +1 -0
- package/dist/ui/transcript.d.ts +52 -0
- package/dist/ui/transcript.d.ts.map +1 -0
- package/dist/ui/types.d.ts +84 -0
- package/dist/ui/types.d.ts.map +1 -0
- package/dist/ui/widget.d.ts +16 -0
- package/dist/ui/widget.d.ts.map +1 -0
- package/dist/ui/word-diff/alignment.d.ts +6 -0
- package/dist/ui/word-diff/alignment.d.ts.map +1 -0
- package/dist/ui/word-diff/change-block.d.ts +18 -0
- package/dist/ui/word-diff/change-block.d.ts.map +1 -0
- package/dist/ui/word-diff/changed-line.d.ts +14 -0
- package/dist/ui/word-diff/changed-line.d.ts.map +1 -0
- package/dist/ui/word-diff/emphasis.d.ts +9 -0
- package/dist/ui/word-diff/emphasis.d.ts.map +1 -0
- package/dist/ui/word-diff/line-emphasis.d.ts +7 -0
- package/dist/ui/word-diff/line-emphasis.d.ts.map +1 -0
- package/dist/ui/word-diff/line-matching.d.ts +10 -0
- package/dist/ui/word-diff/line-matching.d.ts.map +1 -0
- package/dist/ui/word-diff/line-similarity.d.ts +16 -0
- package/dist/ui/word-diff/line-similarity.d.ts.map +1 -0
- package/dist/ui/word-diff/normalize.d.ts +3 -0
- package/dist/ui/word-diff/normalize.d.ts.map +1 -0
- package/dist/ui/word-diff/parse.d.ts +17 -0
- package/dist/ui/word-diff/parse.d.ts.map +1 -0
- package/dist/ui/word-diff/range-refinement.d.ts +5 -0
- package/dist/ui/word-diff/range-refinement.d.ts.map +1 -0
- package/dist/ui/word-diff/ranges.d.ts +11 -0
- package/dist/ui/word-diff/ranges.d.ts.map +1 -0
- package/dist/ui/word-diff/smart-filter.d.ts +3 -0
- package/dist/ui/word-diff/smart-filter.d.ts.map +1 -0
- package/dist/ui/word-diff/sparse-line-matching.d.ts +25 -0
- package/dist/ui/word-diff/sparse-line-matching.d.ts.map +1 -0
- package/dist/ui/word-diff/text-boundaries.d.ts +11 -0
- package/dist/ui/word-diff/text-boundaries.d.ts.map +1 -0
- package/dist/ui/word-diff/token-alignment.d.ts +9 -0
- package/dist/ui/word-diff/token-alignment.d.ts.map +1 -0
- package/dist/ui/word-diff/token-text-refinement.d.ts +4 -0
- package/dist/ui/word-diff/token-text-refinement.d.ts.map +1 -0
- package/dist/ui/word-diff/tokens.d.ts +16 -0
- package/dist/ui/word-diff/tokens.d.ts.map +1 -0
- package/dist/ui/word-diff/types.d.ts +10 -0
- package/dist/ui/word-diff/types.d.ts.map +1 -0
- package/dist/util.d.ts +3 -0
- package/dist/util.d.ts.map +1 -0
- package/dist/worker/model-control.d.ts +14 -0
- package/dist/worker/model-control.d.ts.map +1 -0
- package/dist/worker/model-control.js +118 -0
- package/dist/worker/model-control.js.map +7 -0
- package/dist/worker/options.d.ts +3 -0
- package/dist/worker/options.d.ts.map +1 -0
- package/dist/worker/options.js +156 -0
- package/dist/worker/options.js.map +7 -0
- package/dist/worker/run-record.d.ts +22 -0
- package/dist/worker/run-record.d.ts.map +1 -0
- package/dist/worker/run-record.js +124 -0
- package/dist/worker/run-record.js.map +7 -0
- package/dist/worker/session-export.d.ts +45 -0
- package/dist/worker/session-export.d.ts.map +1 -0
- package/dist/worker/session-export.js +91 -0
- package/dist/worker/session-export.js.map +7 -0
- package/dist/worker.d.ts +3 -0
- package/dist/worker.d.ts.map +1 -0
- package/dist/worker.js +1074 -0
- package/dist/worker.js.map +7 -0
- package/docs/agents.md +618 -0
- package/docs/architecture.md +141 -0
- package/docs/audit-trace.md +116 -0
- package/docs/certification.md +166 -0
- package/docs/compaction.md +345 -0
- package/docs/component-calculus.md +191 -0
- package/docs/components.md +330 -0
- package/docs/configuration.md +529 -0
- package/docs/entropy.md +214 -0
- package/docs/interface.md +210 -0
- package/docs/jev.md +289 -0
- package/docs/kernels.md +186 -0
- package/docs/memory-recall.md +664 -0
- package/docs/programmatic-compaction.md +205 -0
- package/docs/provider-component-calculus.md +378 -0
- package/docs/providers.md +163 -0
- package/docs/repairs.md +90 -0
- package/docs/residency-runtime.md +82 -0
- package/docs/schema-enforcement.md +166 -0
- package/docs/skills.md +50 -0
- package/docs/speculation.md +171 -0
- package/docs/state-layer.md +197 -0
- package/package.json +135 -0
- package/skillsets/python/fabric-advisor/SKILL.md +29 -0
- package/skillsets/python/fabric-ambient/SKILL.md +44 -0
- package/skillsets/python/fabric-ambient/references/setup.md +67 -0
- package/skillsets/python/fabric-council/SKILL.md +54 -0
- package/skillsets/python/fabric-exec/SKILL.md +74 -0
- package/skillsets/python/fabric-exec/references/agents.md +65 -0
- package/skillsets/python/fabric-exec/references/mcp.md +23 -0
- package/skillsets/python/fabric-exec/references/mesh.md +27 -0
- package/skillsets/python/fabric-fusion/SKILL.md +112 -0
- package/skillsets/python/fabric-guide/SKILL.md +29 -0
- package/skillsets/python/fabric-jev/SKILL.md +162 -0
- package/skillsets/python/fabric-rlm/SKILL.md +120 -0
- package/skillsets/python/fabric-schema/SKILL.md +55 -0
- package/skillsets/python/fabric-spec/SKILL.md +42 -0
- package/skillsets/python/fabric-supervisor/SKILL.md +37 -0
- package/skillsets/python/fabric-swarm/SKILL.md +40 -0
- package/skillsets/python/fabric-workflow/SKILL.md +62 -0
- package/skillsets/typescript/fabric-advisor/SKILL.md +29 -0
- package/skillsets/typescript/fabric-ambient/SKILL.md +44 -0
- package/skillsets/typescript/fabric-ambient/references/setup.md +90 -0
- package/skillsets/typescript/fabric-council/SKILL.md +94 -0
- package/skillsets/typescript/fabric-exec/SKILL.md +142 -0
- package/skillsets/typescript/fabric-exec/references/agents.md +218 -0
- package/skillsets/typescript/fabric-exec/references/mcp.md +49 -0
- package/skillsets/typescript/fabric-exec/references/mesh.md +51 -0
- package/skillsets/typescript/fabric-fusion/SKILL.md +332 -0
- package/skillsets/typescript/fabric-guide/SKILL.md +29 -0
- package/skillsets/typescript/fabric-jev/SKILL.md +159 -0
- package/skillsets/typescript/fabric-rlm/SKILL.md +284 -0
- package/skillsets/typescript/fabric-schema/SKILL.md +121 -0
- package/skillsets/typescript/fabric-spec/SKILL.md +42 -0
- package/skillsets/typescript/fabric-supervisor/SKILL.md +37 -0
- package/skillsets/typescript/fabric-swarm/SKILL.md +80 -0
- package/skillsets/typescript/fabric-workflow/SKILL.md +133 -0
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import {
|
|
2
|
+
checkRequest,
|
|
3
|
+
checkResponse,
|
|
4
|
+
jsonText
|
|
5
|
+
} from "./chunk-Z63R5GVN.js";
|
|
6
|
+
import {
|
|
7
|
+
runAbortable
|
|
8
|
+
} from "./chunk-7TB7NXSL.js";
|
|
9
|
+
|
|
10
|
+
// src/jev/client.ts
|
|
11
|
+
import { execFile } from "node:child_process";
|
|
12
|
+
var JevCredentials = class {
|
|
13
|
+
constructor(command, env = process.env, providerAuth) {
|
|
14
|
+
this.command = command;
|
|
15
|
+
this.env = env;
|
|
16
|
+
this.providerAuth = providerAuth;
|
|
17
|
+
}
|
|
18
|
+
#cached;
|
|
19
|
+
status() {
|
|
20
|
+
const source = this.providerAuth?.configured() ? "pi" : this.env.TYPESAFE_API_KEY?.trim() ? "environment" : this.command.length ? "command" : "missing";
|
|
21
|
+
return { configured: source !== "missing", source, verified: false };
|
|
22
|
+
}
|
|
23
|
+
async resolve(signal) {
|
|
24
|
+
signal.throwIfAborted();
|
|
25
|
+
if (this.providerAuth) {
|
|
26
|
+
try {
|
|
27
|
+
const key = await this.providerAuth.resolve(signal);
|
|
28
|
+
signal.throwIfAborted();
|
|
29
|
+
if (key?.trim()) return key.trim();
|
|
30
|
+
} catch {
|
|
31
|
+
throw new Error("Jev Pi credential resolution failed");
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
const env = this.env.TYPESAFE_API_KEY?.trim();
|
|
35
|
+
if (env) return env;
|
|
36
|
+
if (this.#cached) return this.#cached;
|
|
37
|
+
const [file, ...args] = this.command;
|
|
38
|
+
if (!file) throw new Error("Jev credentials unavailable: set TYPESAFE_API_KEY or configure jev.credentialCommand");
|
|
39
|
+
const secret = await new Promise((resolve, reject) => {
|
|
40
|
+
execFile(file, args, { encoding: "utf8", timeout: 5e3, maxBuffer: 16384, signal, windowsHide: true }, (error, stdout) => {
|
|
41
|
+
if (error) reject(new Error("Jev credential resolver failed"));
|
|
42
|
+
else resolve(stdout.trim());
|
|
43
|
+
});
|
|
44
|
+
});
|
|
45
|
+
signal.throwIfAborted();
|
|
46
|
+
if (!secret || /[\r\n]/.test(secret)) throw new Error("Jev credential resolver returned an invalid credential");
|
|
47
|
+
this.#cached = secret;
|
|
48
|
+
return secret;
|
|
49
|
+
}
|
|
50
|
+
clear() {
|
|
51
|
+
this.#cached = void 0;
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
var JevClient = class {
|
|
55
|
+
constructor(config, fetcher = fetch, credentials) {
|
|
56
|
+
this.config = config;
|
|
57
|
+
this.fetcher = fetcher;
|
|
58
|
+
this.credentials = credentials ?? new JevCredentials(config.credentialCommand);
|
|
59
|
+
}
|
|
60
|
+
credentials;
|
|
61
|
+
async evaluate(request, signal) {
|
|
62
|
+
checkRequest(request, this.config.maxRequestBytes);
|
|
63
|
+
const timedSignal = AbortSignal.any([signal, AbortSignal.timeout(this.config.requestTimeoutMs)]);
|
|
64
|
+
const key = await runAbortable(timedSignal, () => this.credentials.resolve(timedSignal));
|
|
65
|
+
const body = jsonText({ ...request, model: request.model ?? this.config.model }, this.config.maxRequestBytes, "Jev request");
|
|
66
|
+
let response;
|
|
67
|
+
try {
|
|
68
|
+
response = await runAbortable(timedSignal, () => this.fetcher("https://api.typesafe.ai/v1/systemone", {
|
|
69
|
+
method: "POST",
|
|
70
|
+
redirect: "error",
|
|
71
|
+
signal: timedSignal,
|
|
72
|
+
headers: { "Content-Type": "application/json", Authorization: `Bearer ${key}` },
|
|
73
|
+
body
|
|
74
|
+
}));
|
|
75
|
+
} catch {
|
|
76
|
+
throw new Error(timedSignal.aborted ? "Jev request cancelled or timed out" : "Jev network request failed");
|
|
77
|
+
}
|
|
78
|
+
if (!response.ok) {
|
|
79
|
+
await response.body?.cancel();
|
|
80
|
+
throw new Error(`TypeSafe HTTP ${response.status}${[429, 529].includes(response.status) ? ": rate limited; back off before retrying" : ""}`);
|
|
81
|
+
}
|
|
82
|
+
const reader = response.body?.getReader();
|
|
83
|
+
if (!reader) throw new Error("TypeSafe returned an empty response");
|
|
84
|
+
const chunks = [];
|
|
85
|
+
let bytes = 0;
|
|
86
|
+
try {
|
|
87
|
+
for (; ; ) {
|
|
88
|
+
const { value, done } = await runAbortable(timedSignal, () => reader.read());
|
|
89
|
+
if (done) break;
|
|
90
|
+
bytes += value.byteLength;
|
|
91
|
+
if (bytes > 1048576) throw new Error("oversize");
|
|
92
|
+
chunks.push(value);
|
|
93
|
+
}
|
|
94
|
+
return checkResponse(JSON.parse(Buffer.concat(chunks).toString("utf8")), request);
|
|
95
|
+
} catch {
|
|
96
|
+
throw new Error(timedSignal.aborted ? "Jev response cancelled or timed out" : "TypeSafe returned an invalid or oversized typed response");
|
|
97
|
+
} finally {
|
|
98
|
+
await reader.cancel().catch(() => void 0);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
close() {
|
|
102
|
+
this.credentials.clear();
|
|
103
|
+
}
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
export {
|
|
107
|
+
JevCredentials,
|
|
108
|
+
JevClient
|
|
109
|
+
};
|
|
110
|
+
//# sourceMappingURL=chunk-M3S7XITB.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/jev/client.ts"],
|
|
4
|
+
"sourcesContent": ["import { execFile } from \"node:child_process\";\nimport { runAbortable } from \"../async-settlement.js\";\nimport type { FabricJevConfig } from \"./config.js\";\nimport type { JevRequest, JevResponse } from \"./types.js\";\nimport { checkRequest, checkResponse, jsonText } from \"./validation.js\";\n\nexport interface JevCredentialSource {\n configured(): boolean;\n resolve(signal: AbortSignal): Promise<string | undefined>;\n}\nexport class JevCredentials {\n #cached: string | undefined;\n constructor(readonly command: readonly string[], private readonly env: NodeJS.ProcessEnv = process.env, private readonly providerAuth?: JevCredentialSource) {}\n status() {\n const source = this.providerAuth?.configured() ? \"pi\" : this.env.TYPESAFE_API_KEY?.trim() ? \"environment\" : this.command.length ? \"command\" : \"missing\";\n return { configured: source !== \"missing\", source, verified: false };\n }\n async resolve(signal: AbortSignal): Promise<string> {\n signal.throwIfAborted();\n if (this.providerAuth) {\n try {\n const key = await this.providerAuth.resolve(signal);\n signal.throwIfAborted();\n if (key?.trim()) return key.trim();\n } catch { throw new Error(\"Jev Pi credential resolution failed\"); }\n }\n const env = this.env.TYPESAFE_API_KEY?.trim();\n if (env) return env;\n if (this.#cached) return this.#cached;\n const [file, ...args] = this.command;\n if (!file) throw new Error(\"Jev credentials unavailable: set TYPESAFE_API_KEY or configure jev.credentialCommand\");\n const secret = await new Promise<string>((resolve, reject) => {\n execFile(file, args, { encoding: \"utf8\", timeout: 5_000, maxBuffer: 16_384, signal, windowsHide: true }, (error, stdout) => {\n // Never propagate subprocess errors: they can contain stdout/stderr secrets.\n if (error) reject(new Error(\"Jev credential resolver failed\"));\n else resolve(stdout.trim());\n });\n });\n signal.throwIfAborted();\n if (!secret || /[\\r\\n]/.test(secret)) throw new Error(\"Jev credential resolver returned an invalid credential\");\n this.#cached = secret;\n return secret;\n }\n clear(): void { this.#cached = undefined; }\n}\nexport class JevClient {\n readonly credentials: JevCredentials;\n constructor(readonly config: FabricJevConfig, private readonly fetcher: typeof fetch = fetch, credentials?: JevCredentials) {\n this.credentials = credentials ?? new JevCredentials(config.credentialCommand);\n }\n async evaluate(request: JevRequest, signal: AbortSignal): Promise<JevResponse> {\n checkRequest(request, this.config.maxRequestBytes);\n const timedSignal = AbortSignal.any([signal, AbortSignal.timeout(this.config.requestTimeoutMs)]);\n const key = await runAbortable(timedSignal, () => this.credentials.resolve(timedSignal));\n const body = jsonText({ ...request, model: request.model ?? this.config.model }, this.config.maxRequestBytes, \"Jev request\");\n let response: Response;\n try {\n response = await runAbortable(timedSignal, () => this.fetcher(\"https://api.typesafe.ai/v1/systemone\", {\n method: \"POST\", redirect: \"error\", signal: timedSignal,\n headers: { \"Content-Type\": \"application/json\", Authorization: `Bearer ${key}` }, body,\n }));\n } catch {\n throw new Error(timedSignal.aborted ? \"Jev request cancelled or timed out\" : \"Jev network request failed\");\n }\n if (!response.ok) {\n await response.body?.cancel();\n // No automatic retry: the controller decides whether a delayed decision is still useful.\n throw new Error(`TypeSafe HTTP ${response.status}${[429, 529].includes(response.status) ? \": rate limited; back off before retrying\" : \"\"}`);\n }\n const reader = response.body?.getReader();\n if (!reader) throw new Error(\"TypeSafe returned an empty response\");\n const chunks: Uint8Array[] = [];\n let bytes = 0;\n try {\n for (;;) {\n const { value, done } = await runAbortable(timedSignal, () => reader.read());\n if (done) break;\n bytes += value.byteLength;\n if (bytes > 1_048_576) throw new Error(\"oversize\");\n chunks.push(value);\n }\n return checkResponse(JSON.parse(Buffer.concat(chunks).toString(\"utf8\")), request);\n } catch {\n throw new Error(timedSignal.aborted ? \"Jev response cancelled or timed out\" : \"TypeSafe returned an invalid or oversized typed response\");\n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MAAM,UAAU;AACxC,QAAI,CAAC,OAAQ,OAAM,IAAI,MAAM,qCAAqC;AAClE,UAAM,SAAuB,CAAC;AAC9B,QAAI,QAAQ;AACZ,QAAI;AACF,iBAAS;AACP,cAAM,EAAE,OAAO,KAAK,IAAI,MAAM,aAAa,aAAa,MAAM,OAAO,KAAK,CAAC;AAC3E,YAAI,KAAM;AACV,iBAAS,MAAM;AACf,YAAI,QAAQ,QAAW,OAAM,IAAI,MAAM,UAAU;AACjD,eAAO,KAAK,KAAK;AAAA,MACnB;AACA,aAAO,cAAc,KAAK,MAAM,OAAO,OAAO,MAAM,EAAE,SAAS,MAAM,CAAC,GAAG,OAAO;AAAA,IAClF,QAAQ;AACN,YAAM,IAAI,MAAM,YAAY,UAAU,wCAAwC,0DAA0D;AAAA,IAC1I,UAAE;AAAU,YAAM,OAAO,OAAO,EAAE,MAAM,MAAM,MAAS;AAAA,IAAG;AAAA,EAC5D;AAAA,EACA,QAAc;AAAE,SAAK,YAAY,MAAM;AAAA,EAAG;AAC5C;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import {
|
|
2
|
+
readSessionHeader
|
|
3
|
+
} from "./chunk-XT4346N7.js";
|
|
4
|
+
|
|
5
|
+
// src/memory/discovery.ts
|
|
6
|
+
import fs from "node:fs";
|
|
7
|
+
import path from "node:path";
|
|
8
|
+
var SESSIONS_SUBDIR = "sessions";
|
|
9
|
+
var isJsonlFile = (name) => name.endsWith(".jsonl");
|
|
10
|
+
var encodeCwdDir = (cwd) => `--${path.resolve(cwd).replace(/^[/\\]/, "").replace(/[/\\:]/g, "-")}--`;
|
|
11
|
+
var sessionDirForCwd = (cwd, agentDir) => path.join(agentDir, SESSIONS_SUBDIR, encodeCwdDir(cwd));
|
|
12
|
+
var listJsonlInDir = (dir) => {
|
|
13
|
+
try {
|
|
14
|
+
return fs.readdirSync(dir, { withFileTypes: true }).filter((entry) => entry.isFile() && isJsonlFile(entry.name)).map((entry) => path.join(dir, entry.name));
|
|
15
|
+
} catch {
|
|
16
|
+
return [];
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
var statMtime = (file) => {
|
|
20
|
+
try {
|
|
21
|
+
return fs.statSync(file).mtimeMs;
|
|
22
|
+
} catch {
|
|
23
|
+
return 0;
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
var refFromFile = (file) => {
|
|
27
|
+
const header = readSessionHeader(file);
|
|
28
|
+
return {
|
|
29
|
+
id: header?.sessionId ?? path.basename(file, ".jsonl"),
|
|
30
|
+
file,
|
|
31
|
+
cwd: header?.cwd ?? "",
|
|
32
|
+
mtime: statMtime(file)
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
var sessionsDirRoot = (agentDir) => path.join(agentDir, SESSIONS_SUBDIR);
|
|
36
|
+
var compareRefsByRecency = (left, right) => {
|
|
37
|
+
if (right.mtime !== left.mtime) return right.mtime - left.mtime;
|
|
38
|
+
return left.file < right.file ? -1 : left.file > right.file ? 1 : 0;
|
|
39
|
+
};
|
|
40
|
+
var enumerateAllSessions = (agentDir, maxSessions) => {
|
|
41
|
+
const root = sessionsDirRoot(agentDir);
|
|
42
|
+
let projectDirs = [];
|
|
43
|
+
try {
|
|
44
|
+
projectDirs = fs.readdirSync(root, { withFileTypes: true }).filter((entry) => entry.isDirectory()).map((entry) => path.join(root, entry.name));
|
|
45
|
+
} catch {
|
|
46
|
+
return [];
|
|
47
|
+
}
|
|
48
|
+
const files = [];
|
|
49
|
+
for (const dir of projectDirs) {
|
|
50
|
+
for (const file of listJsonlInDir(dir)) files.push(file);
|
|
51
|
+
}
|
|
52
|
+
return files.map(refFromFile).sort(compareRefsByRecency).slice(0, Math.max(1, maxSessions));
|
|
53
|
+
};
|
|
54
|
+
var newestSessionInDir = (dir) => {
|
|
55
|
+
const files = listJsonlInDir(dir);
|
|
56
|
+
if (files.length === 0) return null;
|
|
57
|
+
return files.map(refFromFile).sort(compareRefsByRecency)[0];
|
|
58
|
+
};
|
|
59
|
+
var AmbiguousSessionError = class extends Error {
|
|
60
|
+
constructor(session, candidates) {
|
|
61
|
+
super(`Session id ${JSON.stringify(session)} is ambiguous; use an exact session file path.`);
|
|
62
|
+
this.session = session;
|
|
63
|
+
this.candidates = candidates;
|
|
64
|
+
this.name = "AmbiguousSessionError";
|
|
65
|
+
}
|
|
66
|
+
code = "ambiguous_session";
|
|
67
|
+
};
|
|
68
|
+
var resolveSessionTarget = (agentDir, target) => {
|
|
69
|
+
if (target.endsWith(".jsonl") && fs.existsSync(target)) {
|
|
70
|
+
return refFromFile(path.resolve(target));
|
|
71
|
+
}
|
|
72
|
+
const all = enumerateAllSessions(agentDir, Number.MAX_SAFE_INTEGER);
|
|
73
|
+
const byId = all.filter((ref) => ref.id === target);
|
|
74
|
+
if (byId.length > 1) throw new AmbiguousSessionError(target, byId.map((ref) => ref.file));
|
|
75
|
+
if (byId.length === 1) return byId[0];
|
|
76
|
+
const byStem = all.filter((ref) => path.basename(ref.file, ".jsonl") === target);
|
|
77
|
+
if (byStem.length > 1) throw new AmbiguousSessionError(target, byStem.map((ref) => ref.file));
|
|
78
|
+
return byStem[0] ?? null;
|
|
79
|
+
};
|
|
80
|
+
var resolveScope = (input) => {
|
|
81
|
+
const scope = input.scope?.trim();
|
|
82
|
+
if (scope.startsWith("session:")) {
|
|
83
|
+
const target = scope.slice("session:".length).trim();
|
|
84
|
+
const ref = resolveSessionTarget(input.agentDir, target);
|
|
85
|
+
return ref ? [ref] : [];
|
|
86
|
+
}
|
|
87
|
+
if (scope === "global") {
|
|
88
|
+
return enumerateAllSessions(input.agentDir, input.maxSessions);
|
|
89
|
+
}
|
|
90
|
+
if (scope === "project") {
|
|
91
|
+
const dir2 = sessionDirForCwd(input.cwd, input.agentDir);
|
|
92
|
+
return listJsonlInDir(dir2).map(refFromFile).sort(compareRefsByRecency).slice(0, Math.max(1, input.maxSessions));
|
|
93
|
+
}
|
|
94
|
+
if (input.sessionFile) {
|
|
95
|
+
const ref = refFromFile(input.sessionFile);
|
|
96
|
+
return [ref];
|
|
97
|
+
}
|
|
98
|
+
const dir = sessionDirForCwd(input.cwd, input.agentDir);
|
|
99
|
+
const newest = newestSessionInDir(dir);
|
|
100
|
+
return newest ? [newest] : [];
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
export {
|
|
104
|
+
encodeCwdDir,
|
|
105
|
+
sessionDirForCwd,
|
|
106
|
+
sessionsDirRoot,
|
|
107
|
+
enumerateAllSessions,
|
|
108
|
+
AmbiguousSessionError,
|
|
109
|
+
resolveSessionTarget,
|
|
110
|
+
resolveScope
|
|
111
|
+
};
|
|
112
|
+
//# sourceMappingURL=chunk-MGDLRV2R.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/memory/discovery.ts"],
|
|
4
|
+
"sourcesContent": ["import fs from \"node:fs\";\nimport path from \"node:path\";\nimport { readSessionHeader } from \"./normalize.js\";\n\nexport interface SessionRef {\n id: string;\n file: string;\n cwd: string;\n mtime: number;\n}\n\nexport interface ResolveScopeInput {\n agentDir: string;\n cwd: string;\n scope: string;\n sessionId?: string;\n sessionFile?: string;\n maxSessions: number;\n}\n\nconst SESSIONS_SUBDIR = \"sessions\";\n\nconst isJsonlFile = (name: string): boolean => name.endsWith(\".jsonl\");\n\n/** Encode a cwd into the safe directory name pi stores session files under. */\nexport const encodeCwdDir = (cwd: string): string =>\n `--${path.resolve(cwd).replace(/^[/\\\\]/, \"\").replace(/[/\\\\:]/g, \"-\")}--`;\n\n/** Directory pi stores this project's session JSONL files under. */\nexport const sessionDirForCwd = (cwd: string, agentDir: string): string =>\n path.join(agentDir, SESSIONS_SUBDIR, encodeCwdDir(cwd));\n\nconst listJsonlInDir = (dir: string): string[] => {\n try {\n return fs\n .readdirSync(dir, { withFileTypes: true })\n .filter((entry) => entry.isFile() && isJsonlFile(entry.name))\n .map((entry) => path.join(dir, entry.name));\n } catch {\n return [];\n }\n};\n\nconst statMtime = (file: string): number => {\n try {\n return fs.statSync(file).mtimeMs;\n } catch {\n return 0;\n }\n};\n\nconst refFromFile = (file: string): SessionRef => {\n const header = readSessionHeader(file);\n return {\n id: header?.sessionId ?? path.basename(file, \".jsonl\"),\n file,\n cwd: header?.cwd ?? \"\",\n mtime: statMtime(file),\n };\n};\n\nexport const sessionsDirRoot = (agentDir: string): string => path.join(agentDir, SESSIONS_SUBDIR);\n\nconst compareRefsByRecency = (left: SessionRef, right: SessionRef): number => {\n if (right.mtime !== left.mtime) return right.mtime - left.mtime;\n return left.file < right.file ? -1 : left.file > right.file ? 1 : 0;\n};\n\n/**\n * Enumerate every session JSONL file under the agent dir, newest first by\n * file mtime. Bounded by `maxSessions`. Returns refs with resolved cwd and\n * sessionId from each file header (falling back to the file stem).\n */\nexport const enumerateAllSessions = (agentDir: string, maxSessions: number): SessionRef[] => {\n const root = sessionsDirRoot(agentDir);\n let projectDirs: string[] = [];\n try {\n projectDirs = fs\n .readdirSync(root, { withFileTypes: true })\n .filter((entry) => entry.isDirectory())\n .map((entry) => path.join(root, entry.name));\n } catch {\n return [];\n }\n const files: string[] = [];\n for (const dir of projectDirs) {\n for (const file of listJsonlInDir(dir)) files.push(file);\n }\n return files\n .map(refFromFile)\n .sort(compareRefsByRecency)\n .slice(0, Math.max(1, maxSessions));\n};\n\nconst newestSessionInDir = (dir: string): SessionRef | null => {\n const files = listJsonlInDir(dir);\n if (files.length === 0) return null;\n return files\n .map(refFromFile)\n .sort(compareRefsByRecency)[0]!;\n};\n\nexport class AmbiguousSessionError extends Error {\n readonly code = \"ambiguous_session\";\n\n constructor(\n readonly session: string,\n readonly candidates: string[],\n ) {\n super(`Session id ${JSON.stringify(session)} is ambiguous; use an exact session file path.`);\n this.name = \"AmbiguousSessionError\";\n }\n}\n\nexport const resolveSessionTarget = (\n agentDir: string,\n target: string,\n): SessionRef | null => {\n if (target.endsWith(\".jsonl\") && fs.existsSync(target)) {\n return refFromFile(path.resolve(target));\n }\n const all = enumerateAllSessions(agentDir, Number.MAX_SAFE_INTEGER);\n const byId = all.filter((ref) => ref.id === target);\n if (byId.length > 1) throw new AmbiguousSessionError(target, byId.map((ref) => ref.file));\n if (byId.length === 1) return byId[0]!;\n const byStem = all.filter((ref) => path.basename(ref.file, \".jsonl\") === target);\n if (byStem.length > 1) throw new AmbiguousSessionError(target, byStem.map((ref) => ref.file));\n return byStem[0] ?? null;\n};\n\n/**\n * Resolve a scope string into the concrete set of session files to search.\n *\n * - `session` (default): the current session file (from invocation context\n * if available, else the newest session for the current cwd).\n * - `project`: all sessions stored under the current cwd's default session dir.\n * - `global`: all sessions under the agent dir, bounded by `maxSessions`.\n * - `session:<id-or-path>`: one specific session by id or file path.\n */\nexport const resolveScope = (input: ResolveScopeInput): SessionRef[] => {\n const scope = input.scope?.trim();\n if (scope.startsWith(\"session:\")) {\n const target = scope.slice(\"session:\".length).trim();\n const ref = resolveSessionTarget(input.agentDir, target);\n return ref ? [ref] : [];\n }\n if (scope === \"global\") {\n return enumerateAllSessions(input.agentDir, input.maxSessions);\n }\n if (scope === \"project\") {\n const dir = sessionDirForCwd(input.cwd, input.agentDir);\n return listJsonlInDir(dir)\n .map(refFromFile)\n .sort(compareRefsByRecency)\n .slice(0, Math.max(1, input.maxSessions));\n }\n // default: session\n if (input.sessionFile) {\n const ref = refFromFile(input.sessionFile);\n return [ref];\n }\n const dir = sessionDirForCwd(input.cwd, input.agentDir);\n const newest = newestSessionInDir(dir);\n return newest ? [newest] : [];\n};\n"],
|
|
5
|
+
"mappings": ";;;;;AAAA,OAAO,QAAQ;AACf,OAAO,UAAU;AAmBjB,IAAM,kBAAkB;AAExB,IAAM,cAAc,CAAC,SAA0B,KAAK,SAAS,QAAQ;AAG9D,IAAM,eAAe,CAAC,QAC3B,KAAK,KAAK,QAAQ,GAAG,EAAE,QAAQ,UAAU,EAAE,EAAE,QAAQ,WAAW,GAAG,CAAC;AAG/D,IAAM,mBAAmB,CAAC,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AC,UAA2C;AACtE,QAAM,QAAQ,MAAM,OAAO,KAAK;AAChC,MAAI,MAAM,WAAW,UAAU,GAAG;AAChC,UAAM,SAAS,MAAM,MAAM,WAAW,MAAM,EAAE,KAAK;AACnD,UAAM,MAAM,qBAAqB,MAAM,UAAU,MAAM;AACvD,WAAO,MAAM,CAAC,GAAG,IAAI,CAAC;AAAA,EACxB;AACA,MAAI,UAAU,UAAU;AACtB,WAAO,qBAAqB,MAAM,UAAU,MAAM,WAAW;AAAA,EAC/D;AACA,MAAI,UAAU,WAAW;AACvB,UAAMA,OAAM,iBAAiB,MAAM,KAAK,MAAM,QAAQ;AACtD,WAAO,eAAeA,IAAG,EACtB,IAAI,WAAW,EACf,KAAK,oBAAoB,EACzB,MAAM,GAAG,KAAK,IAAI,GAAG,MAAM,WAAW,CAAC;AAAA,EAC5C;AAEA,MAAI,MAAM,aAAa;AACrB,UAAM,MAAM,YAAY,MAAM,WAAW;AACzC,WAAO,CAAC,GAAG;AAAA,EACb;AACA,QAAM,MAAM,iBAAiB,MAAM,KAAK,MAAM,QAAQ;AACtD,QAAM,SAAS,mBAAmB,GAAG;AACrC,SAAO,SAAS,CAAC,MAAM,IAAI,CAAC;AAC9B;",
|
|
6
|
+
"names": ["dir"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
// src/thinking.ts
|
|
2
|
+
var DEFAULT_FABRIC_THINKING = "medium";
|
|
3
|
+
var THINKING_LEVELS = [
|
|
4
|
+
"off",
|
|
5
|
+
"minimal",
|
|
6
|
+
"low",
|
|
7
|
+
"medium",
|
|
8
|
+
"high",
|
|
9
|
+
"xhigh",
|
|
10
|
+
"max"
|
|
11
|
+
];
|
|
12
|
+
var isFabricThinking = (value) => typeof value === "string" && THINKING_LEVELS.includes(value);
|
|
13
|
+
var LABELS = {
|
|
14
|
+
off: "Off",
|
|
15
|
+
minimal: "Minimal",
|
|
16
|
+
low: "Low",
|
|
17
|
+
medium: "Medium",
|
|
18
|
+
high: "High",
|
|
19
|
+
xhigh: "XHigh",
|
|
20
|
+
max: "Max"
|
|
21
|
+
};
|
|
22
|
+
var thinkingLabel = (level) => LABELS[level];
|
|
23
|
+
|
|
24
|
+
export {
|
|
25
|
+
DEFAULT_FABRIC_THINKING,
|
|
26
|
+
THINKING_LEVELS,
|
|
27
|
+
isFabricThinking,
|
|
28
|
+
thinkingLabel
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=chunk-MGWQOKBV.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/thinking.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * Shared thinking (reasoning effort) level type and helpers.\n *\n * Fabric resolves a thinking level per run (explicit call/actor value, else the\n * Fabric default, \"medium\"). Pi receives it via \"--thinking\" and clamps it to\n * the model's supported levels using next-highest fallback (see pi-ai\n * clampThinkingLevel). Claude receives it via \"--effort\"; off/minimal map to\n * low. Fabric itself only selects the requested/default level.\n */\nexport type FabricThinking = \"off\" | \"minimal\" | \"low\" | \"medium\" | \"high\" | \"xhigh\" | \"max\";\n\n/** Fabric-wide default thinking level, used when a call/actor omits one. */\nexport const DEFAULT_FABRIC_THINKING: FabricThinking = \"medium\";\n\n/** Ordered lowest -> highest; matches pi-ai's EXTENDED_THINKING_LEVELS. */\nexport const THINKING_LEVELS: readonly FabricThinking[] = [\n \"off\",\n \"minimal\",\n \"low\",\n \"medium\",\n \"high\",\n \"xhigh\",\n \"max\",\n];\n\n/** Type guard for a Fabric thinking level value (config, CLI args, JSON). */\nexport const isFabricThinking = (value: unknown): value is FabricThinking =>\n typeof value === \"string\" && (THINKING_LEVELS as readonly string[]).includes(value);\n\nconst LABELS: Record<FabricThinking, string> = {\n off: \"Off\",\n minimal: \"Minimal\",\n low: \"Low\",\n medium: \"Medium\",\n high: \"High\",\n xhigh: \"XHigh\",\n max: \"Max\",\n};\n\n/** Human-readable label for a thinking level (shown in pickers and settings). */\nexport const thinkingLabel = (level: FabricThinking): string => LABELS[level];\n"],
|
|
5
|
+
"mappings": ";AAYO,IAAM,0BAA0C;AAGhD,IAAM,kBAA6C;AAAA,EACxD;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAGO,IAAM,mBAAmB,CAAC,UAC/B,OAAO,UAAU,YAAa,gBAAsC,SAAS,KAAK;AAEpF,IAAM,SAAyC;AAAA,EAC7C,KAAK;AAAA,EACL,SAAS;AAAA,EACT,KAAK;AAAA,EACL,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,OAAO;AAAA,EACP,KAAK;AACP;AAGO,IAAM,gBAAgB,CAAC,UAAkC,OAAO,KAAK;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
// src/runtime/type-checker.ts
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
import ts from "typescript";
|
|
4
|
+
var compilerOptions = {
|
|
5
|
+
target: ts.ScriptTarget.ES2022,
|
|
6
|
+
module: ts.ModuleKind.ESNext,
|
|
7
|
+
moduleResolution: ts.ModuleResolutionKind.NodeNext,
|
|
8
|
+
strict: false,
|
|
9
|
+
noImplicitAny: false,
|
|
10
|
+
strictNullChecks: false,
|
|
11
|
+
strictFunctionTypes: false,
|
|
12
|
+
strictBindCallApply: false,
|
|
13
|
+
alwaysStrict: false,
|
|
14
|
+
strictPropertyInitialization: false,
|
|
15
|
+
noImplicitThis: false,
|
|
16
|
+
useUnknownInCatchVariables: false,
|
|
17
|
+
noEmit: false,
|
|
18
|
+
sourceMap: true,
|
|
19
|
+
skipLibCheck: true,
|
|
20
|
+
lib: ["lib.es2022.d.ts"]
|
|
21
|
+
};
|
|
22
|
+
var TYPE_CORRECTNESS_CODES = /* @__PURE__ */ new Set([
|
|
23
|
+
2339,
|
|
24
|
+
2551,
|
|
25
|
+
2322,
|
|
26
|
+
2345,
|
|
27
|
+
2367,
|
|
28
|
+
2531,
|
|
29
|
+
2532,
|
|
30
|
+
18047,
|
|
31
|
+
18048,
|
|
32
|
+
7006,
|
|
33
|
+
7008,
|
|
34
|
+
7019,
|
|
35
|
+
7031,
|
|
36
|
+
7032,
|
|
37
|
+
7033,
|
|
38
|
+
7034
|
|
39
|
+
]);
|
|
40
|
+
var nextCheckerId = 0;
|
|
41
|
+
var normalizeTypeScriptPath = (fileName) => fileName.replaceAll("\\", "/");
|
|
42
|
+
var wrapFabricGuestCode = (code) => `async function __piFabricMain() {
|
|
43
|
+
${code}
|
|
44
|
+
}
|
|
45
|
+
`;
|
|
46
|
+
var FabricTypeChecker = class {
|
|
47
|
+
constructor(declarations) {
|
|
48
|
+
this.declarations = declarations;
|
|
49
|
+
const id = ++nextCheckerId;
|
|
50
|
+
this.#guestFile = normalizeTypeScriptPath(path.resolve(`/__pi_fabric_guest_${id}.ts`));
|
|
51
|
+
this.#declarationFile = normalizeTypeScriptPath(
|
|
52
|
+
path.resolve(`/__pi_fabric_globals_${id}.d.ts`)
|
|
53
|
+
);
|
|
54
|
+
this.#sourceFile = ts.createSourceFile(
|
|
55
|
+
this.#guestFile,
|
|
56
|
+
"",
|
|
57
|
+
ts.ScriptTarget.ES2022,
|
|
58
|
+
true
|
|
59
|
+
);
|
|
60
|
+
this.#declarationSource = ts.createSourceFile(
|
|
61
|
+
this.#declarationFile,
|
|
62
|
+
declarations,
|
|
63
|
+
ts.ScriptTarget.ES2022,
|
|
64
|
+
true
|
|
65
|
+
);
|
|
66
|
+
const isGuestFile = (fileName) => this.#baseHost.getCanonicalFileName(normalizeTypeScriptPath(fileName)) === this.#baseHost.getCanonicalFileName(this.#guestFile);
|
|
67
|
+
const isDeclarationFile = (fileName) => this.#baseHost.getCanonicalFileName(normalizeTypeScriptPath(fileName)) === this.#baseHost.getCanonicalFileName(this.#declarationFile);
|
|
68
|
+
this.#host = {
|
|
69
|
+
...this.#baseHost,
|
|
70
|
+
fileExists: (fileName) => isGuestFile(fileName) || isDeclarationFile(fileName) || this.#baseHost.fileExists(fileName),
|
|
71
|
+
readFile: (fileName) => {
|
|
72
|
+
if (isGuestFile(fileName)) return this.#sourceText;
|
|
73
|
+
if (isDeclarationFile(fileName)) return this.declarations;
|
|
74
|
+
return this.#baseHost.readFile(fileName);
|
|
75
|
+
},
|
|
76
|
+
getSourceFile: (fileName, languageVersion, onError, shouldCreateNewSourceFile) => {
|
|
77
|
+
if (isGuestFile(fileName)) return this.#sourceFile;
|
|
78
|
+
if (isDeclarationFile(fileName)) return this.#declarationSource;
|
|
79
|
+
const cached = this.#stableFiles.get(fileName);
|
|
80
|
+
if (cached) return cached;
|
|
81
|
+
const source = this.#baseHost.getSourceFile(
|
|
82
|
+
fileName,
|
|
83
|
+
languageVersion,
|
|
84
|
+
onError,
|
|
85
|
+
shouldCreateNewSourceFile
|
|
86
|
+
);
|
|
87
|
+
if (source) this.#stableFiles.set(fileName, source);
|
|
88
|
+
return source;
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
#guestFile;
|
|
93
|
+
#declarationFile;
|
|
94
|
+
#baseHost = ts.createCompilerHost(compilerOptions, true);
|
|
95
|
+
#stableFiles = /* @__PURE__ */ new Map();
|
|
96
|
+
#declarationSource;
|
|
97
|
+
#host;
|
|
98
|
+
#sourceText = "";
|
|
99
|
+
#sourceFile;
|
|
100
|
+
#program;
|
|
101
|
+
check(code, includeTypeCorrectness = false) {
|
|
102
|
+
this.#sourceText = wrapFabricGuestCode(code);
|
|
103
|
+
this.#sourceFile = ts.createSourceFile(
|
|
104
|
+
this.#guestFile,
|
|
105
|
+
this.#sourceText,
|
|
106
|
+
ts.ScriptTarget.ES2022,
|
|
107
|
+
true
|
|
108
|
+
);
|
|
109
|
+
const program = ts.createProgram({
|
|
110
|
+
rootNames: [this.#declarationFile, this.#guestFile],
|
|
111
|
+
options: compilerOptions,
|
|
112
|
+
host: this.#host,
|
|
113
|
+
...this.#program ? { oldProgram: this.#program } : {}
|
|
114
|
+
});
|
|
115
|
+
this.#program = program;
|
|
116
|
+
const diagnostics = [
|
|
117
|
+
...program.getSyntacticDiagnostics(this.#sourceFile),
|
|
118
|
+
...program.getSemanticDiagnostics(this.#sourceFile).filter((diagnostic) => includeTypeCorrectness || !TYPE_CORRECTNESS_CODES.has(diagnostic.code))
|
|
119
|
+
];
|
|
120
|
+
const errors = diagnostics.map((diagnostic) => {
|
|
121
|
+
const message = ts.flattenDiagnosticMessageText(diagnostic.messageText, "\n");
|
|
122
|
+
if (!diagnostic.file || diagnostic.start === void 0) {
|
|
123
|
+
return { line: 0, column: 0, message };
|
|
124
|
+
}
|
|
125
|
+
const position = diagnostic.file.getLineAndCharacterOfPosition(diagnostic.start);
|
|
126
|
+
return {
|
|
127
|
+
line: Math.max(1, position.line),
|
|
128
|
+
column: position.character + 1,
|
|
129
|
+
message
|
|
130
|
+
};
|
|
131
|
+
});
|
|
132
|
+
if (errors.length > 0) return { errors };
|
|
133
|
+
let javascript;
|
|
134
|
+
let sourceMap;
|
|
135
|
+
program.emit(this.#sourceFile, (fileName, content) => {
|
|
136
|
+
if (fileName.endsWith(".js.map")) sourceMap = content;
|
|
137
|
+
else if (fileName.endsWith(".js")) javascript = content;
|
|
138
|
+
});
|
|
139
|
+
return {
|
|
140
|
+
errors,
|
|
141
|
+
...javascript ? { javascript } : {},
|
|
142
|
+
...sourceMap ? { sourceMap } : {}
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
};
|
|
146
|
+
var checkerCache = /* @__PURE__ */ new Map();
|
|
147
|
+
var MAX_CHECKERS = 4;
|
|
148
|
+
var checkerFor = (declarations) => {
|
|
149
|
+
const cached = checkerCache.get(declarations);
|
|
150
|
+
if (cached) {
|
|
151
|
+
checkerCache.delete(declarations);
|
|
152
|
+
checkerCache.set(declarations, cached);
|
|
153
|
+
return cached;
|
|
154
|
+
}
|
|
155
|
+
const checker = new FabricTypeChecker(declarations);
|
|
156
|
+
checkerCache.set(declarations, checker);
|
|
157
|
+
while (checkerCache.size > MAX_CHECKERS) {
|
|
158
|
+
const oldest = checkerCache.keys().next().value;
|
|
159
|
+
if (oldest === void 0) break;
|
|
160
|
+
checkerCache.delete(oldest);
|
|
161
|
+
}
|
|
162
|
+
return checker;
|
|
163
|
+
};
|
|
164
|
+
var transpileFabricCodeWithSourceMap = (code) => {
|
|
165
|
+
const result = ts.transpileModule(wrapFabricGuestCode(code), {
|
|
166
|
+
compilerOptions: {
|
|
167
|
+
target: ts.ScriptTarget.ES2022,
|
|
168
|
+
module: ts.ModuleKind.ESNext,
|
|
169
|
+
sourceMap: true
|
|
170
|
+
}
|
|
171
|
+
});
|
|
172
|
+
return {
|
|
173
|
+
code: result.outputText,
|
|
174
|
+
...result.sourceMapText ? { sourceMap: result.sourceMapText } : {}
|
|
175
|
+
};
|
|
176
|
+
};
|
|
177
|
+
var typeCheckFabricCode = (code, declarations, includeTypeCorrectness = false) => checkerFor(declarations).check(code, includeTypeCorrectness);
|
|
178
|
+
|
|
179
|
+
export {
|
|
180
|
+
normalizeTypeScriptPath,
|
|
181
|
+
transpileFabricCodeWithSourceMap,
|
|
182
|
+
typeCheckFabricCode
|
|
183
|
+
};
|
|
184
|
+
//# sourceMappingURL=chunk-N5GUXC6F.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/runtime/type-checker.ts"],
|
|
4
|
+
"sourcesContent": ["import path from \"node:path\";\nimport ts from \"typescript\";\n\nexport interface FabricTypeError {\n line: number;\n column: number;\n message: string;\n}\n\nexport interface FabricTypeCheckResult {\n errors: FabricTypeError[];\n javascript?: string;\n sourceMap?: string;\n}\n\nconst compilerOptions: ts.CompilerOptions = {\n target: ts.ScriptTarget.ES2022,\n module: ts.ModuleKind.ESNext,\n moduleResolution: ts.ModuleResolutionKind.NodeNext,\n strict: false,\n noImplicitAny: false,\n strictNullChecks: false,\n strictFunctionTypes: false,\n strictBindCallApply: false,\n alwaysStrict: false,\n strictPropertyInitialization: false,\n noImplicitThis: false,\n useUnknownInCatchVariables: false,\n noEmit: false,\n sourceMap: true,\n skipLibCheck: true,\n lib: [\"lib.es2022.d.ts\"],\n};\n\nconst TYPE_CORRECTNESS_CODES = new Set<number>([\n 2339, 2551,\n 2322, 2345, 2367,\n 2531, 2532, 18047, 18048,\n 7006, 7008, 7019, 7031, 7032, 7033, 7034,\n]);\n\nlet nextCheckerId = 0;\n\nexport const normalizeTypeScriptPath = (fileName: string): string =>\n fileName.replaceAll(\"\\\\\", \"/\");\n\n/** Guest programs execute inside this wrapper; user code starts on wrapped line 2. */\nconst wrapFabricGuestCode = (code: string): string =>\n `async function __piFabricMain() {\\n${code}\\n}\\n`;\n\nclass FabricTypeChecker {\n readonly #guestFile: string;\n readonly #declarationFile: string;\n readonly #baseHost = ts.createCompilerHost(compilerOptions, true);\n readonly #stableFiles = new Map<string, ts.SourceFile>();\n readonly #declarationSource: ts.SourceFile;\n readonly #host: ts.CompilerHost;\n #sourceText = \"\";\n #sourceFile: ts.SourceFile;\n #program: ts.Program | undefined;\n\n constructor(readonly declarations: string) {\n const id = ++nextCheckerId;\n this.#guestFile = normalizeTypeScriptPath(path.resolve(`/__pi_fabric_guest_${id}.ts`));\n this.#declarationFile = normalizeTypeScriptPath(\n path.resolve(`/__pi_fabric_globals_${id}.d.ts`),\n );\n this.#sourceFile = ts.createSourceFile(\n this.#guestFile,\n \"\",\n ts.ScriptTarget.ES2022,\n true,\n );\n this.#declarationSource = ts.createSourceFile(\n this.#declarationFile,\n declarations,\n ts.ScriptTarget.ES2022,\n true,\n );\n const isGuestFile = (fileName: string): boolean =>\n this.#baseHost.getCanonicalFileName(normalizeTypeScriptPath(fileName)) ===\n this.#baseHost.getCanonicalFileName(this.#guestFile);\n const isDeclarationFile = (fileName: string): boolean =>\n this.#baseHost.getCanonicalFileName(normalizeTypeScriptPath(fileName)) ===\n this.#baseHost.getCanonicalFileName(this.#declarationFile);\n this.#host = {\n ...this.#baseHost,\n fileExists: (fileName) =>\n isGuestFile(fileName) ||\n isDeclarationFile(fileName) ||\n this.#baseHost.fileExists(fileName),\n readFile: (fileName) => {\n if (isGuestFile(fileName)) return this.#sourceText;\n if (isDeclarationFile(fileName)) return this.declarations;\n return this.#baseHost.readFile(fileName);\n },\n getSourceFile: (fileName, languageVersion, onError, shouldCreateNewSourceFile) => {\n if (isGuestFile(fileName)) return this.#sourceFile;\n if (isDeclarationFile(fileName)) return this.#declarationSource;\n const cached = this.#stableFiles.get(fileName);\n if (cached) return cached;\n const source = this.#baseHost.getSourceFile(\n fileName,\n languageVersion,\n onError,\n shouldCreateNewSourceFile,\n );\n if (source) this.#stableFiles.set(fileName, source);\n return source;\n },\n };\n }\n\n check(code: string, includeTypeCorrectness = false): FabricTypeCheckResult {\n this.#sourceText = wrapFabricGuestCode(code);\n this.#sourceFile = ts.createSourceFile(\n this.#guestFile,\n this.#sourceText,\n ts.ScriptTarget.ES2022,\n true,\n );\n const program = ts.createProgram({\n rootNames: [this.#declarationFile, this.#guestFile],\n options: compilerOptions,\n host: this.#host,\n ...(this.#program ? { oldProgram: this.#program } : {}),\n });\n this.#program = program;\n const diagnostics = [\n ...program.getSyntacticDiagnostics(this.#sourceFile),\n ...program\n .getSemanticDiagnostics(this.#sourceFile)\n .filter((diagnostic) => includeTypeCorrectness || !TYPE_CORRECTNESS_CODES.has(diagnostic.code)),\n ];\n const errors = diagnostics.map((diagnostic) => {\n const message = ts.flattenDiagnosticMessageText(diagnostic.messageText, \"\\n\");\n if (!diagnostic.file || diagnostic.start === undefined) {\n return { line: 0, column: 0, message };\n }\n const position = diagnostic.file.getLineAndCharacterOfPosition(diagnostic.start);\n return {\n line: Math.max(1, position.line),\n column: position.character + 1,\n message,\n };\n });\n if (errors.length > 0) return { errors };\n\n let javascript: string | undefined;\n let sourceMap: string | undefined;\n program.emit(this.#sourceFile, (fileName, content) => {\n if (fileName.endsWith(\".js.map\")) sourceMap = content;\n else if (fileName.endsWith(\".js\")) javascript = content;\n });\n return {\n errors,\n ...(javascript ? { javascript } : {}),\n ...(sourceMap ? { sourceMap } : {}),\n };\n }\n}\n\nconst checkerCache = new Map<string, FabricTypeChecker>();\nconst MAX_CHECKERS = 4;\n\nconst checkerFor = (declarations: string): FabricTypeChecker => {\n const cached = checkerCache.get(declarations);\n if (cached) {\n checkerCache.delete(declarations);\n checkerCache.set(declarations, cached);\n return cached;\n }\n const checker = new FabricTypeChecker(declarations);\n checkerCache.set(declarations, checker);\n while (checkerCache.size > MAX_CHECKERS) {\n const oldest = checkerCache.keys().next().value as string | undefined;\n if (oldest === undefined) break;\n checkerCache.delete(oldest);\n }\n return checker;\n};\n\nexport interface FabricTranspileResult {\n code: string;\n sourceMap?: string;\n}\n\nexport const transpileFabricCodeWithSourceMap = (code: string): FabricTranspileResult => {\n const result = ts.transpileModule(wrapFabricGuestCode(code), {\n compilerOptions: {\n target: ts.ScriptTarget.ES2022,\n module: ts.ModuleKind.ESNext,\n sourceMap: true,\n },\n });\n return {\n code: result.outputText,\n ...(result.sourceMapText ? { sourceMap: result.sourceMapText } : {}),\n };\n};\n\nexport const typeCheckFabricCode = (\n code: string,\n declarations: string,\n includeTypeCorrectness = false,\n): FabricTypeCheckResult => checkerFor(declarations).check(code, includeTypeCorrectness);\n"],
|
|
5
|
+
"mappings": ";AAAA,OAAO,UAAU;AACjB,OAAO,QAAQ;AAcf,IAAM,kBAAsC;AAAA,EAC1C,QAAQ,GAAG,aAAa;AAAA,EACxB,QAAQ,GAAG,WAAW;AAAA,EACtB,kBAAkB,GAAG,qBAAqB;AAAA,EAC1C,QAAQ;AAAA,EACR,eAAe;AAAA,EACf,kBAAkB;AAAA,EAClB,qBAAqB;AAAA,EACrB,qBAAqB;AAAA,EACrB,cAAc;AAAA,EACd,8BAA8B;AAAA,EAC9B,gBAAgB;AAAA,EAChB,4BAA4B;AAAA,EAC5B,QAAQ;AAAA,EACR,WAAW;AAAA,EACX,cAAc;AAAA,EACd,KAAK,CAAC,iBAAiB;A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