omp-fabric 0.85.0
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 +170 -0
- package/THIRD_PARTY_NOTICES.md +33 -0
- package/dist/activity/store.d.ts +32 -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/manager.d.ts +175 -0
- package/dist/actors/manager.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/types.d.ts +211 -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 +127 -0
- package/dist/agents/compact-control.js.map +7 -0
- package/dist/agents/constants.d.ts +5 -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.d.ts +19 -0
- package/dist/agents/handoff.d.ts.map +1 -0
- package/dist/agents/manager.d.ts +68 -0
- package/dist/agents/manager.d.ts.map +1 -0
- package/dist/agents/omp-binary.d.ts +7 -0
- package/dist/agents/omp-binary.d.ts.map +1 -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/session-export.d.ts +9 -0
- package/dist/agents/session-export.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 +29 -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 +251 -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/async-settlement.d.ts +4 -0
- package/dist/async-settlement.d.ts.map +1 -0
- package/dist/audit/details.d.ts +82 -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 +95 -0
- package/dist/audit/trace.d.ts.map +1 -0
- package/dist/capture/catalog.d.ts +29 -0
- package/dist/capture/catalog.d.ts.map +1 -0
- package/dist/capture/interceptor.d.ts +21 -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-2GQC324T.js +5001 -0
- package/dist/chunks/chunk-2GQC324T.js.map +7 -0
- package/dist/chunks/chunk-2KEWFW56.js +1229 -0
- package/dist/chunks/chunk-2KEWFW56.js.map +7 -0
- package/dist/chunks/chunk-3J7BKUNG.js +354 -0
- package/dist/chunks/chunk-3J7BKUNG.js.map +7 -0
- package/dist/chunks/chunk-4A4MVZQW.js +253 -0
- package/dist/chunks/chunk-4A4MVZQW.js.map +7 -0
- package/dist/chunks/chunk-4HQDSTHN.js +221 -0
- package/dist/chunks/chunk-4HQDSTHN.js.map +7 -0
- package/dist/chunks/chunk-4LEDA76O.js +688 -0
- package/dist/chunks/chunk-4LEDA76O.js.map +7 -0
- package/dist/chunks/chunk-5GTPD4BA.js +1318 -0
- package/dist/chunks/chunk-5GTPD4BA.js.map +7 -0
- package/dist/chunks/chunk-5IWFSDU5.js +87 -0
- package/dist/chunks/chunk-5IWFSDU5.js.map +7 -0
- package/dist/chunks/chunk-6N4XGAZY.js +21 -0
- package/dist/chunks/chunk-6N4XGAZY.js.map +7 -0
- package/dist/chunks/chunk-6QBPSZJ5.js +647 -0
- package/dist/chunks/chunk-6QBPSZJ5.js.map +7 -0
- package/dist/chunks/chunk-6X6WUU2K.js +73 -0
- package/dist/chunks/chunk-6X6WUU2K.js.map +7 -0
- package/dist/chunks/chunk-7363CD5A.js +38 -0
- package/dist/chunks/chunk-7363CD5A.js.map +7 -0
- package/dist/chunks/chunk-77FQHHZD.js +231 -0
- package/dist/chunks/chunk-77FQHHZD.js.map +7 -0
- package/dist/chunks/chunk-7BIA5BJN.js +112 -0
- package/dist/chunks/chunk-7BIA5BJN.js.map +7 -0
- package/dist/chunks/chunk-7BOAOKWH.js +64 -0
- package/dist/chunks/chunk-7BOAOKWH.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-7VIQNUPS.js +17 -0
- package/dist/chunks/chunk-7VIQNUPS.js.map +7 -0
- package/dist/chunks/chunk-CT2AJ2UI.js +225 -0
- package/dist/chunks/chunk-CT2AJ2UI.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-ED3BRM6P.js +17 -0
- package/dist/chunks/chunk-ED3BRM6P.js.map +7 -0
- package/dist/chunks/chunk-G2IBGGBM.js +42 -0
- package/dist/chunks/chunk-G2IBGGBM.js.map +7 -0
- package/dist/chunks/chunk-GKOFZ76R.js +1596 -0
- package/dist/chunks/chunk-GKOFZ76R.js.map +7 -0
- package/dist/chunks/chunk-HDJBUXDX.js +1102 -0
- package/dist/chunks/chunk-HDJBUXDX.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-JHKOG5GS.js +187 -0
- package/dist/chunks/chunk-JHKOG5GS.js.map +7 -0
- package/dist/chunks/chunk-JP4LIZFT.js +1334 -0
- package/dist/chunks/chunk-JP4LIZFT.js.map +7 -0
- package/dist/chunks/chunk-JSBTB3P6.js +127 -0
- package/dist/chunks/chunk-JSBTB3P6.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-KIH3KLZU.js +95 -0
- package/dist/chunks/chunk-KIH3KLZU.js.map +7 -0
- package/dist/chunks/chunk-KIREBD2V.js +2208 -0
- package/dist/chunks/chunk-KIREBD2V.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-NCPJZXLM.js +57 -0
- package/dist/chunks/chunk-NCPJZXLM.js.map +7 -0
- package/dist/chunks/chunk-OJZNMROB.js +195 -0
- package/dist/chunks/chunk-OJZNMROB.js.map +7 -0
- package/dist/chunks/chunk-OPTP4PSE.js +469 -0
- package/dist/chunks/chunk-OPTP4PSE.js.map +7 -0
- package/dist/chunks/chunk-QPXSCMTG.js +24 -0
- package/dist/chunks/chunk-QPXSCMTG.js.map +7 -0
- package/dist/chunks/chunk-ROKMBLGN.js +1265 -0
- package/dist/chunks/chunk-ROKMBLGN.js.map +7 -0
- package/dist/chunks/chunk-SXMWV447.js +2445 -0
- package/dist/chunks/chunk-SXMWV447.js.map +7 -0
- package/dist/chunks/chunk-T5ZA5YRU.js +786 -0
- package/dist/chunks/chunk-T5ZA5YRU.js.map +7 -0
- package/dist/chunks/chunk-T6OAX4FO.js +1835 -0
- package/dist/chunks/chunk-T6OAX4FO.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-UOSJZXJV.js +142 -0
- package/dist/chunks/chunk-UOSJZXJV.js.map +7 -0
- package/dist/chunks/chunk-UPCARIJP.js +6627 -0
- package/dist/chunks/chunk-UPCARIJP.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-XU5Z4JCQ.js +297 -0
- package/dist/chunks/chunk-XU5Z4JCQ.js.map +7 -0
- package/dist/chunks/chunk-YWEXP724.js +427 -0
- package/dist/chunks/chunk-YWEXP724.js.map +7 -0
- package/dist/chunks/chunk-YZZIKJX6.js +60 -0
- package/dist/chunks/chunk-YZZIKJX6.js.map +7 -0
- package/dist/chunks/chunk-ZNAJDPT7.js +2203 -0
- package/dist/chunks/chunk-ZNAJDPT7.js.map +7 -0
- package/dist/chunks/chunk-ZTM45GH5.js +163 -0
- package/dist/chunks/chunk-ZTM45GH5.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 +98 -0
- package/dist/compaction/hook.d.ts.map +1 -0
- package/dist/compaction/hook.js +19 -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-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 +269 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/core/action-registry.d.ts +159 -0
- package/dist/core/action-registry.d.ts.map +1 -0
- package/dist/core/action-registry.js +17 -0
- package/dist/core/action-registry.js.map +7 -0
- package/dist/core/action-repair.d.ts +20 -0
- package/dist/core/action-repair.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 +30 -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 +13 -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/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/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/omp-bash-error.d.ts +11 -0
- package/dist/core/omp-bash-error.d.ts.map +1 -0
- package/dist/core/omp-tools.d.ts +9 -0
- package/dist/core/omp-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 +6 -0
- package/dist/core/session-context.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 +12 -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 +52 -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 +7 -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 +51 -0
- package/dist/entropy/compiled-surface.d.ts.map +1 -0
- package/dist/entropy/compiler.d.ts +28 -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 +15 -0
- package/dist/entropy/index.d.ts.map +1 -0
- package/dist/entropy/index.js +172 -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/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 +13 -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 +35 -0
- package/dist/entropy/trial.d.ts.map +1 -0
- package/dist/entropy/types.d.ts +158 -0
- package/dist/entropy/types.d.ts.map +1 -0
- package/dist/execution-service.d.ts +63 -0
- package/dist/execution-service.d.ts.map +1 -0
- package/dist/fabric-exec-arguments.d.ts +5 -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 +90 -0
- package/dist/fabric-runtime-state.d.ts.map +1 -0
- package/dist/fabric-runtime-state.js +13060 -0
- package/dist/fabric-runtime-state.js.map +7 -0
- package/dist/fabric-state.d.ts +89 -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 +6 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +5719 -0
- package/dist/index.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/memory/context.d.ts +112 -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 +23 -0
- package/dist/memory/discovery.js.map +7 -0
- package/dist/memory/index.d.ts +107 -0
- package/dist/memory/index.d.ts.map +1 -0
- package/dist/memory/lineage.d.ts +20 -0
- package/dist/memory/lineage.d.ts.map +1 -0
- package/dist/memory/normalize.d.ts +170 -0
- package/dist/memory/normalize.d.ts.map +1 -0
- package/dist/memory/normalize.js +22 -0
- package/dist/memory/normalize.js.map +7 -0
- package/dist/memory/regex.d.ts +19 -0
- package/dist/memory/regex.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 +22 -0
- package/dist/memory/search.js.map +7 -0
- package/dist/memory/tokenize.d.ts +24 -0
- package/dist/memory/tokenize.d.ts.map +1 -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 +60 -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 +45 -0
- package/dist/prewalk/handoff.d.ts.map +1 -0
- package/dist/protocol.d.ts +273 -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-provider.d.ts +59 -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/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 +27 -0
- package/dist/providers/mcp-provider.d.ts.map +1 -0
- package/dist/providers/memory-provider.d.ts +35 -0
- package/dist/providers/memory-provider.d.ts.map +1 -0
- package/dist/providers/memory-provider.js +16 -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/omp-bash-cwd.d.ts +31 -0
- package/dist/providers/omp-bash-cwd.d.ts.map +1 -0
- package/dist/providers/omp-tools-provider.d.ts +15 -0
- package/dist/providers/omp-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/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 +25 -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 +152 -0
- package/dist/residency/launcher.js.map +7 -0
- package/dist/residency/omp-entry.d.ts +3 -0
- package/dist/residency/omp-entry.d.ts.map +1 -0
- package/dist/residency/omp-entry.js +41 -0
- package/dist/residency/omp-entry.js.map +7 -0
- package/dist/residency/protocol.d.ts +119 -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 +291 -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/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 +226 -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 +35 -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/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 +319 -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/quickjs-runtime.d.ts +24 -0
- package/dist/runtime/quickjs-runtime.d.ts.map +1 -0
- package/dist/runtime/quickjs-runtime.js +12 -0
- package/dist/runtime/quickjs-runtime.js.map +7 -0
- package/dist/runtime/type-checker.d.ts +21 -0
- package/dist/runtime/type-checker.d.ts.map +1 -0
- package/dist/runtime/type-checker.js +15 -0
- package/dist/runtime/type-checker.js.map +7 -0
- package/dist/runtime-paths.d.ts +7 -0
- package/dist/runtime-paths.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/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/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 +39 -0
- package/dist/speculation/store.d.ts.map +1 -0
- package/dist/speculation/stream-tap.d.ts +27 -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/code-preview-shell.d.ts +26 -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 +15 -0
- package/dist/ui/conversation-chrome.d.ts.map +1 -0
- package/dist/ui/conversation-chrome.js +10 -0
- package/dist/ui/conversation-chrome.js.map +7 -0
- package/dist/ui/conversation-native-reader.d.ts +106 -0
- package/dist/ui/conversation-native-reader.d.ts.map +1 -0
- package/dist/ui/conversation-native-reader.js +784 -0
- package/dist/ui/conversation-native-reader.js.map +7 -0
- package/dist/ui/conversation-queue-store.d.ts +12 -0
- package/dist/ui/conversation-queue-store.d.ts.map +1 -0
- package/dist/ui/conversation-queue.d.ts +242 -0
- package/dist/ui/conversation-queue.d.ts.map +1 -0
- package/dist/ui/conversation-render.d.ts +45 -0
- package/dist/ui/conversation-render.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 +170 -0
- package/dist/ui/conversation.d.ts.map +1 -0
- package/dist/ui/conversation.js +1868 -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-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 +188 -0
- package/dist/ui/dashboard.d.ts.map +1 -0
- package/dist/ui/dashboard.js +4604 -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 +8 -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 +2 -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/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.d.ts +57 -0
- package/dist/ui/settings.d.ts.map +1 -0
- package/dist/ui/settings.js +1908 -0
- package/dist/ui/settings.js.map +7 -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 +7 -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/symbol-theme.d.ts +3 -0
- package/dist/ui/symbol-theme.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/options.d.ts +3 -0
- package/dist/worker/options.d.ts.map +1 -0
- package/dist/worker/options.js +104 -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 +123 -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 +1061 -0
- package/dist/worker.js.map +7 -0
- package/docs/agents.md +564 -0
- package/docs/architecture.md +139 -0
- package/docs/audit-trace.md +116 -0
- package/docs/certification.md +134 -0
- package/docs/compaction.md +332 -0
- package/docs/component-calculus.md +191 -0
- package/docs/components.md +329 -0
- package/docs/configuration.md +478 -0
- package/docs/entropy.md +396 -0
- package/docs/interface.md +149 -0
- package/docs/memory-recall.md +614 -0
- package/docs/programmatic-compaction.md +207 -0
- package/docs/provider-component-calculus.md +378 -0
- package/docs/providers.md +109 -0
- package/docs/repairs.md +69 -0
- package/docs/residency-runtime.md +82 -0
- package/docs/schema-enforcement.md +166 -0
- package/docs/skills.md +48 -0
- package/docs/speculation.md +132 -0
- package/docs/state-layer.md +197 -0
- package/package.json +116 -0
- package/skills/fabric-advisor/SKILL.md +29 -0
- package/skills/fabric-ambient/SKILL.md +44 -0
- package/skills/fabric-ambient/references/setup.md +90 -0
- package/skills/fabric-council/SKILL.md +94 -0
- package/skills/fabric-exec/SKILL.md +123 -0
- package/skills/fabric-exec/references/agents.md +211 -0
- package/skills/fabric-exec/references/mcp.md +49 -0
- package/skills/fabric-exec/references/mesh.md +51 -0
- package/skills/fabric-fusion/SKILL.md +332 -0
- package/skills/fabric-guide/SKILL.md +28 -0
- package/skills/fabric-rlm/SKILL.md +284 -0
- package/skills/fabric-schema/SKILL.md +121 -0
- package/skills/fabric-spec/SKILL.md +42 -0
- package/skills/fabric-supervisor/SKILL.md +37 -0
- package/skills/fabric-swarm/SKILL.md +80 -0
- package/skills/fabric-workflow/SKILL.md +133 -0
|
@@ -0,0 +1,786 @@
|
|
|
1
|
+
import {
|
|
2
|
+
isOmpShellRef
|
|
3
|
+
} from "./chunk-6N4XGAZY.js";
|
|
4
|
+
|
|
5
|
+
// src/audit/projection.ts
|
|
6
|
+
var emptyProjection = (args) => ({
|
|
7
|
+
value: {},
|
|
8
|
+
droppedValues: topLevelKeyCount(args)
|
|
9
|
+
});
|
|
10
|
+
var topLevelKeyCount = (value) => {
|
|
11
|
+
try {
|
|
12
|
+
return Object.keys(value).length;
|
|
13
|
+
} catch {
|
|
14
|
+
return 1;
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
var finiteNumber = (value) => typeof value === "number" && Number.isFinite(value) ? value : void 0;
|
|
18
|
+
var stringValue = (value) => typeof value === "string" ? value : void 0;
|
|
19
|
+
var isWindowsDrivePath = (value) => {
|
|
20
|
+
if (value.length < 3 || value[1] !== ":" || value[2] !== "\\" && value[2] !== "/") {
|
|
21
|
+
return false;
|
|
22
|
+
}
|
|
23
|
+
const drive = value.charCodeAt(0);
|
|
24
|
+
return drive >= 65 && drive <= 90 || drive >= 97 && drive <= 122;
|
|
25
|
+
};
|
|
26
|
+
var localPath = (value) => {
|
|
27
|
+
if (typeof value !== "string" || value.includes("\0")) return void 0;
|
|
28
|
+
if (!isWindowsDrivePath(value)) {
|
|
29
|
+
try {
|
|
30
|
+
const absolute = new URL(value);
|
|
31
|
+
if (absolute.protocol) return void 0;
|
|
32
|
+
} catch {
|
|
33
|
+
}
|
|
34
|
+
try {
|
|
35
|
+
const based = new URL(value, "https://fabric.invalid/");
|
|
36
|
+
if (based.hostname !== "fabric.invalid") return void 0;
|
|
37
|
+
} catch {
|
|
38
|
+
return void 0;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
const query = value.indexOf("?");
|
|
42
|
+
const fragment = value.indexOf("#");
|
|
43
|
+
const end = Math.min(
|
|
44
|
+
query < 0 ? value.length : query,
|
|
45
|
+
fragment < 0 ? value.length : fragment
|
|
46
|
+
);
|
|
47
|
+
return value.slice(0, end) || void 0;
|
|
48
|
+
};
|
|
49
|
+
var copyString = (output, args, key) => {
|
|
50
|
+
const value = stringValue(args[key]);
|
|
51
|
+
if (value !== void 0) output[key] = value;
|
|
52
|
+
};
|
|
53
|
+
var copyNumber = (output, args, key) => {
|
|
54
|
+
const value = finiteNumber(args[key]);
|
|
55
|
+
if (value !== void 0) output[key] = value;
|
|
56
|
+
};
|
|
57
|
+
var structuralIdentifier = (value) => {
|
|
58
|
+
if (typeof value !== "string" || value.length === 0) return void 0;
|
|
59
|
+
for (let index = 0; index < value.length; index++) {
|
|
60
|
+
const code = value.charCodeAt(index);
|
|
61
|
+
const alphanumeric = code >= 48 && code <= 57 || code >= 65 && code <= 90 || code >= 97 && code <= 122;
|
|
62
|
+
if (alphanumeric) continue;
|
|
63
|
+
if (index > 0 && (code === 45 || code === 46 || code === 47 || code === 58 || code === 95)) {
|
|
64
|
+
continue;
|
|
65
|
+
}
|
|
66
|
+
return void 0;
|
|
67
|
+
}
|
|
68
|
+
return value;
|
|
69
|
+
};
|
|
70
|
+
var copyIdentifier = (output, args, key) => {
|
|
71
|
+
const value = structuralIdentifier(args[key]);
|
|
72
|
+
if (value !== void 0) output[key] = value;
|
|
73
|
+
};
|
|
74
|
+
var copyPath = (output, args) => {
|
|
75
|
+
const value = localPath(args.path);
|
|
76
|
+
if (value !== void 0) output.path = value;
|
|
77
|
+
};
|
|
78
|
+
var projected = (args, build) => {
|
|
79
|
+
const value = {};
|
|
80
|
+
try {
|
|
81
|
+
build(value);
|
|
82
|
+
} catch {
|
|
83
|
+
return emptyProjection(args);
|
|
84
|
+
}
|
|
85
|
+
return {
|
|
86
|
+
value,
|
|
87
|
+
droppedValues: Math.max(0, topLevelKeyCount(args) - Object.keys(value).length)
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
var idOnlyAgentActions = /* @__PURE__ */ new Set([
|
|
91
|
+
"agents.wait",
|
|
92
|
+
"agents.status",
|
|
93
|
+
"agents.stop",
|
|
94
|
+
"agents.cleanup",
|
|
95
|
+
"agents.ask",
|
|
96
|
+
"agents.tell",
|
|
97
|
+
"agents.steer",
|
|
98
|
+
"agents.followUp",
|
|
99
|
+
"agents.setSteeringMode",
|
|
100
|
+
"agents.setFollowUpMode",
|
|
101
|
+
"agents.compact",
|
|
102
|
+
"agents.actorStatus",
|
|
103
|
+
"agents.setModel",
|
|
104
|
+
"agents.setThinking",
|
|
105
|
+
"agents.setTools",
|
|
106
|
+
"agents.setEvents",
|
|
107
|
+
"agents.setDeliveryPolicy",
|
|
108
|
+
"agents.clearMessages",
|
|
109
|
+
"agents.setInstructions",
|
|
110
|
+
"agents.messages",
|
|
111
|
+
"agents.remove",
|
|
112
|
+
"agents.import",
|
|
113
|
+
"agents.export",
|
|
114
|
+
"agents.log"
|
|
115
|
+
]);
|
|
116
|
+
var projectFabricAuditArgs = (ref, args) => {
|
|
117
|
+
switch (ref) {
|
|
118
|
+
case "fabric.discovery.providers":
|
|
119
|
+
case "fabric.discovery.models":
|
|
120
|
+
case "fabric.workflow.progress":
|
|
121
|
+
return emptyProjection(args);
|
|
122
|
+
case "fabric.approval.auto":
|
|
123
|
+
return projected(args, (output) => {
|
|
124
|
+
copyIdentifier(output, args, "action");
|
|
125
|
+
copyIdentifier(output, args, "risk");
|
|
126
|
+
});
|
|
127
|
+
case "fabric.discovery.catalog":
|
|
128
|
+
return projected(args, (output) => {
|
|
129
|
+
copyIdentifier(output, args, "provider");
|
|
130
|
+
copyNumber(output, args, "limit");
|
|
131
|
+
});
|
|
132
|
+
case "fabric.discovery.list":
|
|
133
|
+
return projected(args, (output) => {
|
|
134
|
+
copyIdentifier(output, args, "provider");
|
|
135
|
+
copyIdentifier(output, args, "namespace");
|
|
136
|
+
copyNumber(output, args, "limit");
|
|
137
|
+
});
|
|
138
|
+
case "fabric.discovery.search":
|
|
139
|
+
return projected(args, (output) => copyNumber(output, args, "limit"));
|
|
140
|
+
case "fabric.discovery.describe":
|
|
141
|
+
return projected(args, (output) => copyIdentifier(output, args, "ref"));
|
|
142
|
+
case "fabric.workflow.configure":
|
|
143
|
+
return projected(args, (output) => copyString(output, args, "name"));
|
|
144
|
+
case "agents.switchModel":
|
|
145
|
+
return projected(args, (output) => {
|
|
146
|
+
copyIdentifier(output, args, "model");
|
|
147
|
+
copyIdentifier(output, args, "provider");
|
|
148
|
+
});
|
|
149
|
+
case "fabric.workflow.phase":
|
|
150
|
+
return projected(args, (output) => {
|
|
151
|
+
copyString(output, args, "name");
|
|
152
|
+
copyIdentifier(output, args, "id");
|
|
153
|
+
copyNumber(output, args, "total");
|
|
154
|
+
});
|
|
155
|
+
case "fabric.workflow.item":
|
|
156
|
+
return projected(args, (output) => {
|
|
157
|
+
copyIdentifier(output, args, "id");
|
|
158
|
+
copyIdentifier(output, args, "status");
|
|
159
|
+
copyIdentifier(output, args, "phase");
|
|
160
|
+
copyIdentifier(output, args, "kind");
|
|
161
|
+
copyNumber(output, args, "total");
|
|
162
|
+
copyNumber(output, args, "completed");
|
|
163
|
+
});
|
|
164
|
+
case "fabric.workflow.event":
|
|
165
|
+
return projected(args, (output) => copyIdentifier(output, args, "level"));
|
|
166
|
+
case "fabric.workflow.parallel":
|
|
167
|
+
case "fabric.workflow.pipeline":
|
|
168
|
+
return projected(args, (output) => {
|
|
169
|
+
copyIdentifier(output, args, "kind");
|
|
170
|
+
copyNumber(output, args, "itemCount");
|
|
171
|
+
copyNumber(output, args, "stageCount");
|
|
172
|
+
copyNumber(output, args, "concurrency");
|
|
173
|
+
});
|
|
174
|
+
case "omp.read":
|
|
175
|
+
return projected(args, (output) => {
|
|
176
|
+
copyPath(output, args);
|
|
177
|
+
copyNumber(output, args, "offset");
|
|
178
|
+
copyNumber(output, args, "limit");
|
|
179
|
+
});
|
|
180
|
+
case "omp.grep":
|
|
181
|
+
return projected(args, (output) => {
|
|
182
|
+
copyPath(output, args);
|
|
183
|
+
copyNumber(output, args, "context");
|
|
184
|
+
copyNumber(output, args, "limit");
|
|
185
|
+
});
|
|
186
|
+
case "omp.find":
|
|
187
|
+
case "omp.ls":
|
|
188
|
+
return projected(args, (output) => {
|
|
189
|
+
copyPath(output, args);
|
|
190
|
+
copyNumber(output, args, "limit");
|
|
191
|
+
});
|
|
192
|
+
case "omp.edit":
|
|
193
|
+
case "omp.write":
|
|
194
|
+
return projected(args, (output) => copyPath(output, args));
|
|
195
|
+
case "omp.bash":
|
|
196
|
+
return projected(args, (output) => copyString(output, args, "command"));
|
|
197
|
+
case "mesh.publish":
|
|
198
|
+
return projected(args, (output) => {
|
|
199
|
+
copyString(output, args, "topic");
|
|
200
|
+
copyString(output, args, "to");
|
|
201
|
+
});
|
|
202
|
+
case "mesh.read":
|
|
203
|
+
return projected(args, (output) => {
|
|
204
|
+
copyString(output, args, "topic");
|
|
205
|
+
copyString(output, args, "to");
|
|
206
|
+
copyNumber(output, args, "after");
|
|
207
|
+
copyNumber(output, args, "limit");
|
|
208
|
+
});
|
|
209
|
+
case "mesh.get":
|
|
210
|
+
case "mesh.put":
|
|
211
|
+
case "mesh.delete":
|
|
212
|
+
return projected(args, (output) => copyString(output, args, "key"));
|
|
213
|
+
case "mesh.list":
|
|
214
|
+
return projected(args, (output) => {
|
|
215
|
+
copyString(output, args, "prefix");
|
|
216
|
+
copyNumber(output, args, "limit");
|
|
217
|
+
});
|
|
218
|
+
default:
|
|
219
|
+
if (idOnlyAgentActions.has(ref)) {
|
|
220
|
+
return projected(args, (output) => copyString(output, args, "id"));
|
|
221
|
+
}
|
|
222
|
+
return emptyProjection(args);
|
|
223
|
+
}
|
|
224
|
+
};
|
|
225
|
+
var projectFabricAuditResult = (ref, result) => {
|
|
226
|
+
if (typeof result !== "object" || result === null || Array.isArray(result)) {
|
|
227
|
+
return void 0;
|
|
228
|
+
}
|
|
229
|
+
const record = result;
|
|
230
|
+
if (ref === "fabric.approval.auto") {
|
|
231
|
+
return projected(record, (output) => {
|
|
232
|
+
copyIdentifier(output, record, "action");
|
|
233
|
+
copyIdentifier(output, record, "risk");
|
|
234
|
+
copyIdentifier(output, record, "decision");
|
|
235
|
+
copyIdentifier(output, record, "model");
|
|
236
|
+
copyNumber(output, record, "at");
|
|
237
|
+
});
|
|
238
|
+
}
|
|
239
|
+
if (ref !== "omp.write") return void 0;
|
|
240
|
+
const details = typeof record.details === "object" && record.details !== null && !Array.isArray(record.details) ? record.details : void 0;
|
|
241
|
+
if (record.created !== true && details?.created !== true) return void 0;
|
|
242
|
+
return {
|
|
243
|
+
value: { created: true },
|
|
244
|
+
droppedValues: Math.max(0, topLevelKeyCount(record) - 1)
|
|
245
|
+
};
|
|
246
|
+
};
|
|
247
|
+
|
|
248
|
+
// src/audit/trace.ts
|
|
249
|
+
var FABRIC_EXECUTION_TRACE_KIND = "omp-fabric.execution";
|
|
250
|
+
var FABRIC_EXECUTION_TRACE_VERSION = 1;
|
|
251
|
+
var FABRIC_EXECUTION_TRACE_MAX_BYTES = 512 * 1024;
|
|
252
|
+
var MAX_IDENTIFIER_BYTES = 1024;
|
|
253
|
+
var MAX_PHASE_BYTES = 1024;
|
|
254
|
+
var MAX_STRING_BYTES = 16 * 1024;
|
|
255
|
+
var MAX_ERROR_BYTES = 8 * 1024;
|
|
256
|
+
var MAX_ARGS_BYTES = 64 * 1024;
|
|
257
|
+
var MAX_RESULT_BYTES = 64 * 1024;
|
|
258
|
+
var MAX_DEPTH = 12;
|
|
259
|
+
var MAX_KEYS = 128;
|
|
260
|
+
var MAX_ARRAY_ITEMS = 128;
|
|
261
|
+
var MAX_NODES = 8192;
|
|
262
|
+
var MAX_RECORDED_OPERATIONS = 2048;
|
|
263
|
+
var MAX_PHASES = 512;
|
|
264
|
+
var DROP = Symbol("drop");
|
|
265
|
+
var emptyCounts = () => ({
|
|
266
|
+
droppedValues: 0,
|
|
267
|
+
truncatedValues: 0,
|
|
268
|
+
redactedValues: 0
|
|
269
|
+
});
|
|
270
|
+
var byteLength = (value) => Buffer.byteLength(value, "utf8");
|
|
271
|
+
var serializedBytes = (value) => byteLength(JSON.stringify(value));
|
|
272
|
+
var truncateUtf8 = (value, maxBytes) => {
|
|
273
|
+
if (byteLength(value) <= maxBytes) return value;
|
|
274
|
+
const suffix = "\u2026[truncated]";
|
|
275
|
+
const available = Math.max(0, maxBytes - byteLength(suffix));
|
|
276
|
+
let low = 0;
|
|
277
|
+
let high = value.length;
|
|
278
|
+
while (low < high) {
|
|
279
|
+
const middle = Math.ceil((low + high) / 2);
|
|
280
|
+
if (byteLength(value.slice(0, middle)) <= available) low = middle;
|
|
281
|
+
else high = middle - 1;
|
|
282
|
+
}
|
|
283
|
+
return `${value.slice(0, low)}${suffix}`;
|
|
284
|
+
};
|
|
285
|
+
var truncateUtf8Middle = (value, maxBytes) => {
|
|
286
|
+
if (byteLength(value) <= maxBytes) return value;
|
|
287
|
+
const marker = "\n\u2026[truncated]\n";
|
|
288
|
+
const available = Math.max(0, maxBytes - byteLength(marker));
|
|
289
|
+
const headBytes = Math.floor(available / 2);
|
|
290
|
+
const tailBytes = available - headBytes;
|
|
291
|
+
const head = truncateUtf8(value, headBytes + byteLength("\u2026[truncated]")).replace(/…\[truncated\]$/, "");
|
|
292
|
+
let tailStart = value.length;
|
|
293
|
+
while (tailStart > 0 && byteLength(value.slice(tailStart - 1)) <= tailBytes) tailStart--;
|
|
294
|
+
return `${head}${marker}${value.slice(tailStart)}`;
|
|
295
|
+
};
|
|
296
|
+
var boundedIdentifier = (value, maxBytes = MAX_IDENTIFIER_BYTES) => truncateUtf8(value, maxBytes);
|
|
297
|
+
var normalizedKey = (key) => key.toLowerCase().replaceAll(/[^a-z0-9]/g, "");
|
|
298
|
+
var isSensitiveKey = (key) => {
|
|
299
|
+
const normalized = normalizedKey(key);
|
|
300
|
+
return [
|
|
301
|
+
"password",
|
|
302
|
+
"passwd",
|
|
303
|
+
"secret",
|
|
304
|
+
"token",
|
|
305
|
+
"accesstoken",
|
|
306
|
+
"refreshtoken",
|
|
307
|
+
"authorization",
|
|
308
|
+
"cookie",
|
|
309
|
+
"credential",
|
|
310
|
+
"credentials",
|
|
311
|
+
"apikey",
|
|
312
|
+
"privatekey",
|
|
313
|
+
"clientsecret"
|
|
314
|
+
].some((sensitive) => normalized === sensitive || normalized.endsWith(sensitive));
|
|
315
|
+
};
|
|
316
|
+
var isMediaKey = (key) => ["media", "image", "images", "audio", "video", "base64"].includes(normalizedKey(key));
|
|
317
|
+
var isMediaObject = (value) => {
|
|
318
|
+
if (value.type === "image" || value.type === "audio" || value.type === "video") return true;
|
|
319
|
+
const mimeType = value.mimeType ?? value.mime_type;
|
|
320
|
+
return typeof mimeType === "string" && (mimeType.startsWith("image/") || mimeType.startsWith("audio/") || mimeType.startsWith("video/"));
|
|
321
|
+
};
|
|
322
|
+
var looksLikeBase64 = (value) => {
|
|
323
|
+
if (value.startsWith("data:") && value.includes(";base64,")) return true;
|
|
324
|
+
if (value.length < 1024 || value.length % 4 !== 0) return false;
|
|
325
|
+
for (let index = 0; index < value.length; index++) {
|
|
326
|
+
const code = value.charCodeAt(index);
|
|
327
|
+
const valid = code >= 65 && code <= 90 || code >= 97 && code <= 122 || code >= 48 && code <= 57 || code === 43 || code === 47 || code === 61 || code === 10 || code === 13;
|
|
328
|
+
if (!valid) return false;
|
|
329
|
+
}
|
|
330
|
+
return true;
|
|
331
|
+
};
|
|
332
|
+
var sanitize = (input, maxBytes) => {
|
|
333
|
+
const counts = emptyCounts();
|
|
334
|
+
const ancestors = /* @__PURE__ */ new Set();
|
|
335
|
+
let nodes = 0;
|
|
336
|
+
const visit = (value2, depth, key) => {
|
|
337
|
+
nodes++;
|
|
338
|
+
if (nodes > MAX_NODES) {
|
|
339
|
+
counts.droppedValues++;
|
|
340
|
+
return DROP;
|
|
341
|
+
}
|
|
342
|
+
if (key !== void 0 && isSensitiveKey(key)) {
|
|
343
|
+
counts.redactedValues++;
|
|
344
|
+
return "[REDACTED]";
|
|
345
|
+
}
|
|
346
|
+
if (key !== void 0 && isMediaKey(key)) {
|
|
347
|
+
counts.droppedValues++;
|
|
348
|
+
return DROP;
|
|
349
|
+
}
|
|
350
|
+
if (value2 === null || typeof value2 === "boolean") return value2;
|
|
351
|
+
if (typeof value2 === "number") {
|
|
352
|
+
if (Number.isFinite(value2)) return value2;
|
|
353
|
+
counts.truncatedValues++;
|
|
354
|
+
return `[non-finite:${String(value2)}]`;
|
|
355
|
+
}
|
|
356
|
+
if (typeof value2 === "string") {
|
|
357
|
+
if (looksLikeBase64(value2)) {
|
|
358
|
+
counts.droppedValues++;
|
|
359
|
+
return "[OMITTED_BASE64]";
|
|
360
|
+
}
|
|
361
|
+
const bounded = truncateUtf8(value2, MAX_STRING_BYTES);
|
|
362
|
+
if (bounded !== value2) counts.truncatedValues++;
|
|
363
|
+
return bounded;
|
|
364
|
+
}
|
|
365
|
+
if (typeof value2 === "bigint") {
|
|
366
|
+
counts.truncatedValues++;
|
|
367
|
+
return `${String(value2)}n`;
|
|
368
|
+
}
|
|
369
|
+
if (typeof value2 === "undefined" || typeof value2 === "function" || typeof value2 === "symbol") {
|
|
370
|
+
counts.droppedValues++;
|
|
371
|
+
return DROP;
|
|
372
|
+
}
|
|
373
|
+
if (typeof value2 !== "object") {
|
|
374
|
+
counts.droppedValues++;
|
|
375
|
+
return DROP;
|
|
376
|
+
}
|
|
377
|
+
if (depth >= MAX_DEPTH) {
|
|
378
|
+
counts.truncatedValues++;
|
|
379
|
+
return "[MAX_DEPTH]";
|
|
380
|
+
}
|
|
381
|
+
if (ancestors.has(value2)) {
|
|
382
|
+
counts.droppedValues++;
|
|
383
|
+
return "[CIRCULAR]";
|
|
384
|
+
}
|
|
385
|
+
const record = value2;
|
|
386
|
+
if (!Array.isArray(value2) && isMediaObject(record)) {
|
|
387
|
+
counts.droppedValues++;
|
|
388
|
+
return "[OMITTED_MEDIA]";
|
|
389
|
+
}
|
|
390
|
+
ancestors.add(value2);
|
|
391
|
+
if (Array.isArray(value2)) {
|
|
392
|
+
const output2 = [];
|
|
393
|
+
const limit2 = Math.min(value2.length, MAX_ARRAY_ITEMS);
|
|
394
|
+
for (let index = 0; index < limit2; index++) {
|
|
395
|
+
const item = visit(value2[index], depth + 1);
|
|
396
|
+
output2.push(item === DROP ? "[DROPPED]" : item);
|
|
397
|
+
}
|
|
398
|
+
if (value2.length > limit2) {
|
|
399
|
+
counts.droppedValues += value2.length - limit2;
|
|
400
|
+
counts.truncatedValues++;
|
|
401
|
+
}
|
|
402
|
+
ancestors.delete(value2);
|
|
403
|
+
return output2;
|
|
404
|
+
}
|
|
405
|
+
const output = {};
|
|
406
|
+
const keys = Object.keys(record).sort();
|
|
407
|
+
const limit = Math.min(keys.length, MAX_KEYS);
|
|
408
|
+
for (let index = 0; index < limit; index++) {
|
|
409
|
+
const childKey = keys[index];
|
|
410
|
+
const child = visit(record[childKey], depth + 1, childKey);
|
|
411
|
+
if (child !== DROP) output[childKey] = child;
|
|
412
|
+
}
|
|
413
|
+
if (keys.length > limit) {
|
|
414
|
+
counts.droppedValues += keys.length - limit;
|
|
415
|
+
counts.truncatedValues++;
|
|
416
|
+
}
|
|
417
|
+
ancestors.delete(value2);
|
|
418
|
+
return output;
|
|
419
|
+
};
|
|
420
|
+
let value = visit(input, 0);
|
|
421
|
+
if (value === DROP) value = "[DROPPED]";
|
|
422
|
+
const originalBytes = serializedBytes(value);
|
|
423
|
+
if (originalBytes > maxBytes) {
|
|
424
|
+
counts.truncatedValues++;
|
|
425
|
+
if (Array.isArray(value)) {
|
|
426
|
+
const output = [];
|
|
427
|
+
for (const item of value) {
|
|
428
|
+
const next = [...output, item];
|
|
429
|
+
if (serializedBytes(next) > maxBytes - 128) break;
|
|
430
|
+
output.push(item);
|
|
431
|
+
}
|
|
432
|
+
counts.droppedValues += value.length - output.length;
|
|
433
|
+
value = output;
|
|
434
|
+
} else if (typeof value === "object" && value !== null) {
|
|
435
|
+
const output = {};
|
|
436
|
+
const entries = Object.entries(value);
|
|
437
|
+
let included = 0;
|
|
438
|
+
for (const [childKey, child] of entries) {
|
|
439
|
+
const next = { ...output, [childKey]: child };
|
|
440
|
+
if (serializedBytes(next) > maxBytes - 128) break;
|
|
441
|
+
output[childKey] = child;
|
|
442
|
+
included++;
|
|
443
|
+
}
|
|
444
|
+
counts.droppedValues += entries.length - included;
|
|
445
|
+
value = output;
|
|
446
|
+
}
|
|
447
|
+
}
|
|
448
|
+
return { value, counts };
|
|
449
|
+
};
|
|
450
|
+
var sanitizeObject = (value, droppedValues = 0) => {
|
|
451
|
+
const sanitized = sanitize(value, MAX_ARGS_BYTES);
|
|
452
|
+
sanitized.counts.droppedValues += droppedValues;
|
|
453
|
+
if (typeof sanitized.value === "object" && sanitized.value !== null && !Array.isArray(sanitized.value)) {
|
|
454
|
+
return sanitized;
|
|
455
|
+
}
|
|
456
|
+
sanitized.counts.droppedValues++;
|
|
457
|
+
return { value: {}, counts: sanitized.counts };
|
|
458
|
+
};
|
|
459
|
+
var projectedArgs = (ref, args) => {
|
|
460
|
+
const projection = projectFabricAuditArgs(ref, args);
|
|
461
|
+
return sanitizeObject(projection.value, projection.droppedValues);
|
|
462
|
+
};
|
|
463
|
+
var sanitizeString = (value, maxBytes) => {
|
|
464
|
+
const bounded = truncateUtf8(value, maxBytes);
|
|
465
|
+
return {
|
|
466
|
+
value: bounded,
|
|
467
|
+
counts: {
|
|
468
|
+
...emptyCounts(),
|
|
469
|
+
truncatedValues: bounded === value ? 0 : 1
|
|
470
|
+
}
|
|
471
|
+
};
|
|
472
|
+
};
|
|
473
|
+
var addCounts = (target, source) => {
|
|
474
|
+
target.droppedValues += source.droppedValues;
|
|
475
|
+
target.truncatedValues += source.truncatedValues;
|
|
476
|
+
target.redactedValues += source.redactedValues;
|
|
477
|
+
};
|
|
478
|
+
var lexicalIdentity = (ref) => {
|
|
479
|
+
const separator = ref.indexOf(".");
|
|
480
|
+
if (separator <= 0 || separator === ref.length - 1) return {};
|
|
481
|
+
return {
|
|
482
|
+
provider: ref.slice(0, separator),
|
|
483
|
+
action: ref.slice(separator + 1)
|
|
484
|
+
};
|
|
485
|
+
};
|
|
486
|
+
var FabricTraceSafeError = class extends Error {
|
|
487
|
+
};
|
|
488
|
+
var FabricResolutionError = class extends FabricTraceSafeError {
|
|
489
|
+
};
|
|
490
|
+
var errorCause = (error) => {
|
|
491
|
+
const message = error instanceof Error ? error.message : typeof error === "string" ? error : void 0;
|
|
492
|
+
const trimmed = message?.trim();
|
|
493
|
+
return trimmed ? truncateUtf8Middle(trimmed, MAX_ERROR_BYTES - 256) : void 0;
|
|
494
|
+
};
|
|
495
|
+
var failureMessage = (stage, outcome, cause) => {
|
|
496
|
+
if (outcome === "timed_out") return "Call timed out";
|
|
497
|
+
if (outcome === "aborted") return "Call aborted";
|
|
498
|
+
const summary = `Call failed during ${stage}`;
|
|
499
|
+
return cause ? `${summary}: ${cause}` : summary;
|
|
500
|
+
};
|
|
501
|
+
var executionErrorMessage = (outcome) => {
|
|
502
|
+
if (outcome === "succeeded") return void 0;
|
|
503
|
+
if (outcome === "timed_out") return "Execution timed out";
|
|
504
|
+
if (outcome === "aborted") return "Execution aborted";
|
|
505
|
+
return "Execution failed";
|
|
506
|
+
};
|
|
507
|
+
var FabricExecutionTraceOperationHandle = class {
|
|
508
|
+
constructor(recorder, operation) {
|
|
509
|
+
this.recorder = recorder;
|
|
510
|
+
this.operation = operation;
|
|
511
|
+
}
|
|
512
|
+
resolved(provider, action) {
|
|
513
|
+
if (!this.operation || this.recorder.sealed) return;
|
|
514
|
+
const boundedProvider = boundedIdentifier(provider);
|
|
515
|
+
const boundedAction = boundedIdentifier(action);
|
|
516
|
+
if (this.operation.provider !== boundedProvider) {
|
|
517
|
+
this.operation.provider = this.recorder.snapshotIdentifier(provider);
|
|
518
|
+
}
|
|
519
|
+
if (this.operation.action !== boundedAction) {
|
|
520
|
+
this.operation.action = this.recorder.snapshotIdentifier(action);
|
|
521
|
+
}
|
|
522
|
+
}
|
|
523
|
+
prepared(args) {
|
|
524
|
+
if (!this.operation || this.recorder.sealed) return;
|
|
525
|
+
this.operation.args = projectedArgs(this.operation.projectionRef, args);
|
|
526
|
+
}
|
|
527
|
+
succeed(result, meta) {
|
|
528
|
+
if (!this.operation || this.recorder.sealed) return;
|
|
529
|
+
const projected2 = projectFabricAuditResult(this.operation.projectionRef, result);
|
|
530
|
+
if (projected2 !== void 0) {
|
|
531
|
+
this.operation.result = sanitize(projected2.value, MAX_RESULT_BYTES);
|
|
532
|
+
this.operation.result.counts.droppedValues += projected2.droppedValues;
|
|
533
|
+
} else if (result !== void 0) {
|
|
534
|
+
this.operation.droppedResultValues++;
|
|
535
|
+
}
|
|
536
|
+
this.operation.outcome = "succeeded";
|
|
537
|
+
if (meta?.resultTruncated === true) this.operation.resultTruncated = true;
|
|
538
|
+
}
|
|
539
|
+
fail(stage, error, outcome = "failed", result, meta) {
|
|
540
|
+
if (!this.operation || this.recorder.sealed) return;
|
|
541
|
+
this.operation.failureStage = stage;
|
|
542
|
+
if (error instanceof FabricTraceSafeError) this.operation.causeSafe = true;
|
|
543
|
+
const cause = outcome === "failed" && (this.operation.causeSafe === true || isOmpShellRef(this.operation.projectionRef) && stage === "invoke") ? errorCause(error) : void 0;
|
|
544
|
+
this.operation.error = sanitizeString(
|
|
545
|
+
failureMessage(stage, outcome, cause),
|
|
546
|
+
MAX_ERROR_BYTES
|
|
547
|
+
);
|
|
548
|
+
this.operation.outcome = outcome;
|
|
549
|
+
if (meta?.resultTruncated === true) this.operation.resultTruncated = true;
|
|
550
|
+
const projected2 = projectFabricAuditResult(this.operation.projectionRef, result);
|
|
551
|
+
if (projected2 !== void 0) {
|
|
552
|
+
this.operation.result = sanitize(projected2.value, MAX_RESULT_BYTES);
|
|
553
|
+
this.operation.result.counts.droppedValues += projected2.droppedValues;
|
|
554
|
+
} else if (result !== void 0) {
|
|
555
|
+
this.operation.droppedResultValues++;
|
|
556
|
+
}
|
|
557
|
+
}
|
|
558
|
+
};
|
|
559
|
+
var FabricExecutionTraceRecorder = class {
|
|
560
|
+
#operations = [];
|
|
561
|
+
#nextSequence = 0;
|
|
562
|
+
#droppedOperations = 0;
|
|
563
|
+
#truncatedIdentifiers = 0;
|
|
564
|
+
sealed = false;
|
|
565
|
+
snapshotIdentifier(value, maxBytes = MAX_IDENTIFIER_BYTES) {
|
|
566
|
+
const bounded = boundedIdentifier(value, maxBytes);
|
|
567
|
+
if (bounded !== value) this.#truncatedIdentifiers++;
|
|
568
|
+
return bounded;
|
|
569
|
+
}
|
|
570
|
+
issueCall(ref, args) {
|
|
571
|
+
const sequence = this.#nextSequence++;
|
|
572
|
+
if (this.sealed || this.#operations.length >= MAX_RECORDED_OPERATIONS) {
|
|
573
|
+
this.#droppedOperations++;
|
|
574
|
+
return new FabricExecutionTraceOperationHandle(this, void 0);
|
|
575
|
+
}
|
|
576
|
+
const identity = lexicalIdentity(ref);
|
|
577
|
+
const operation = {
|
|
578
|
+
type: "call",
|
|
579
|
+
sequence,
|
|
580
|
+
ref: this.snapshotIdentifier(ref),
|
|
581
|
+
projectionRef: ref,
|
|
582
|
+
...identity.provider ? { provider: this.snapshotIdentifier(identity.provider) } : {},
|
|
583
|
+
...identity.action ? { action: this.snapshotIdentifier(identity.action) } : {},
|
|
584
|
+
args: projectedArgs(ref, args),
|
|
585
|
+
droppedResultValues: 0
|
|
586
|
+
};
|
|
587
|
+
this.#operations.push(operation);
|
|
588
|
+
return new FabricExecutionTraceOperationHandle(this, operation);
|
|
589
|
+
}
|
|
590
|
+
// safeError must contain no guest source text, tool output, or argument
|
|
591
|
+
// payloads — callers pass it only for Fabric-generated failure summaries
|
|
592
|
+
// (for example the type-check stage). Guest and provider error text is
|
|
593
|
+
// deliberately not persisted here.
|
|
594
|
+
seal(outcome, phases, safeError) {
|
|
595
|
+
this.sealed = true;
|
|
596
|
+
for (const operation of this.#operations) {
|
|
597
|
+
if (!operation.outcome) {
|
|
598
|
+
operation.outcome = outcome === "timed_out" ? "timed_out" : outcome === "aborted" ? "aborted" : "failed";
|
|
599
|
+
operation.failureStage ??= "invoke";
|
|
600
|
+
} else if (operation.outcome === "aborted" && outcome === "timed_out") {
|
|
601
|
+
operation.outcome = "timed_out";
|
|
602
|
+
}
|
|
603
|
+
if (operation.outcome !== "succeeded") {
|
|
604
|
+
const preserveCause = operation.error !== void 0 && (operation.causeSafe === true || isOmpShellRef(operation.projectionRef) && operation.outcome === "failed");
|
|
605
|
+
if (!preserveCause) {
|
|
606
|
+
operation.error = sanitizeString(
|
|
607
|
+
failureMessage(operation.failureStage ?? "invoke", operation.outcome),
|
|
608
|
+
MAX_ERROR_BYTES
|
|
609
|
+
);
|
|
610
|
+
}
|
|
611
|
+
}
|
|
612
|
+
}
|
|
613
|
+
const counts = {
|
|
614
|
+
droppedValues: 0,
|
|
615
|
+
truncatedValues: this.#truncatedIdentifiers,
|
|
616
|
+
redactedValues: 0,
|
|
617
|
+
droppedOperations: this.#droppedOperations
|
|
618
|
+
};
|
|
619
|
+
const operations = this.#operations.map((operation) => {
|
|
620
|
+
addCounts(counts, operation.args.counts);
|
|
621
|
+
counts.droppedValues += operation.droppedResultValues;
|
|
622
|
+
if (operation.error) addCounts(counts, operation.error.counts);
|
|
623
|
+
if (operation.result) addCounts(counts, operation.result.counts);
|
|
624
|
+
return {
|
|
625
|
+
type: "call",
|
|
626
|
+
sequence: operation.sequence,
|
|
627
|
+
ref: operation.ref,
|
|
628
|
+
...operation.provider ? { provider: operation.provider } : {},
|
|
629
|
+
...operation.action ? { action: operation.action } : {},
|
|
630
|
+
args: operation.args.value,
|
|
631
|
+
outcome: operation.outcome,
|
|
632
|
+
...operation.failureStage ? { failureStage: operation.failureStage } : {},
|
|
633
|
+
...operation.error ? { error: operation.error.value } : {},
|
|
634
|
+
...operation.result ? { result: operation.result.value } : {},
|
|
635
|
+
...operation.resultTruncated === true ? { resultTruncated: true } : {}
|
|
636
|
+
};
|
|
637
|
+
});
|
|
638
|
+
const boundedPhases = phases.slice(0, MAX_PHASES).map((phase) => {
|
|
639
|
+
const bounded = boundedIdentifier(phase, MAX_PHASE_BYTES);
|
|
640
|
+
if (bounded !== phase) counts.truncatedValues++;
|
|
641
|
+
return bounded;
|
|
642
|
+
});
|
|
643
|
+
if (phases.length > boundedPhases.length) {
|
|
644
|
+
counts.droppedValues += phases.length - boundedPhases.length;
|
|
645
|
+
counts.truncatedValues++;
|
|
646
|
+
}
|
|
647
|
+
const safeRunError = safeError?.trim() || executionErrorMessage(outcome);
|
|
648
|
+
const runError = safeRunError ? sanitizeString(safeRunError, MAX_ERROR_BYTES) : void 0;
|
|
649
|
+
if (runError) addCounts(counts, runError.counts);
|
|
650
|
+
const trace = {
|
|
651
|
+
kind: FABRIC_EXECUTION_TRACE_KIND,
|
|
652
|
+
version: FABRIC_EXECUTION_TRACE_VERSION,
|
|
653
|
+
outcome,
|
|
654
|
+
phases: boundedPhases,
|
|
655
|
+
operations,
|
|
656
|
+
counts,
|
|
657
|
+
...runError ? { error: runError.value } : {}
|
|
658
|
+
};
|
|
659
|
+
let traceBytes = serializedBytes(trace);
|
|
660
|
+
const adjustMutation = (beforeValueBytes, afterValueBytes, beforeCountsBytes) => {
|
|
661
|
+
traceBytes += afterValueBytes - beforeValueBytes + serializedBytes(trace.counts) - beforeCountsBytes;
|
|
662
|
+
};
|
|
663
|
+
for (let index = trace.operations.length - 1; traceBytes > FABRIC_EXECUTION_TRACE_MAX_BYTES && index >= 0; index--) {
|
|
664
|
+
const operation = trace.operations[index];
|
|
665
|
+
if (operation.result === void 0) continue;
|
|
666
|
+
const beforeOperationBytes = serializedBytes(operation);
|
|
667
|
+
const beforeCountsBytes = serializedBytes(trace.counts);
|
|
668
|
+
delete operation.result;
|
|
669
|
+
trace.counts.droppedValues++;
|
|
670
|
+
adjustMutation(
|
|
671
|
+
beforeOperationBytes,
|
|
672
|
+
serializedBytes(operation),
|
|
673
|
+
beforeCountsBytes
|
|
674
|
+
);
|
|
675
|
+
}
|
|
676
|
+
for (let index = trace.operations.length - 1; traceBytes > FABRIC_EXECUTION_TRACE_MAX_BYTES && index >= 0; index--) {
|
|
677
|
+
const operation = trace.operations[index];
|
|
678
|
+
if (Object.keys(operation.args).length === 0) continue;
|
|
679
|
+
const beforeOperationBytes = serializedBytes(operation);
|
|
680
|
+
const beforeCountsBytes = serializedBytes(trace.counts);
|
|
681
|
+
operation.args = {};
|
|
682
|
+
trace.counts.droppedValues++;
|
|
683
|
+
trace.counts.truncatedValues++;
|
|
684
|
+
adjustMutation(
|
|
685
|
+
beforeOperationBytes,
|
|
686
|
+
serializedBytes(operation),
|
|
687
|
+
beforeCountsBytes
|
|
688
|
+
);
|
|
689
|
+
}
|
|
690
|
+
while (traceBytes > FABRIC_EXECUTION_TRACE_MAX_BYTES && trace.operations.length > 0) {
|
|
691
|
+
const beforeCountsBytes = serializedBytes(trace.counts);
|
|
692
|
+
const operation = trace.operations.pop();
|
|
693
|
+
traceBytes -= serializedBytes(operation);
|
|
694
|
+
if (trace.operations.length > 0) traceBytes--;
|
|
695
|
+
trace.counts.droppedOperations++;
|
|
696
|
+
traceBytes += serializedBytes(trace.counts) - beforeCountsBytes;
|
|
697
|
+
}
|
|
698
|
+
while (traceBytes > FABRIC_EXECUTION_TRACE_MAX_BYTES && trace.phases.length > 0) {
|
|
699
|
+
const beforeCountsBytes = serializedBytes(trace.counts);
|
|
700
|
+
const phase = trace.phases.pop();
|
|
701
|
+
traceBytes -= serializedBytes(phase);
|
|
702
|
+
if (trace.phases.length > 0) traceBytes--;
|
|
703
|
+
trace.counts.droppedValues++;
|
|
704
|
+
traceBytes += serializedBytes(trace.counts) - beforeCountsBytes;
|
|
705
|
+
}
|
|
706
|
+
return trace;
|
|
707
|
+
}
|
|
708
|
+
};
|
|
709
|
+
var executionOutcomeFromError = (error, signal) => {
|
|
710
|
+
if (signal?.aborted) return "aborted";
|
|
711
|
+
return error === void 0 ? "succeeded" : "failed";
|
|
712
|
+
};
|
|
713
|
+
var isRecord = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
714
|
+
var hasOnlyKeys = (value, keys) => Object.keys(value).every((key) => keys.includes(key));
|
|
715
|
+
var outcomes = /* @__PURE__ */ new Set(["succeeded", "failed", "aborted", "timed_out"]);
|
|
716
|
+
var stages = /* @__PURE__ */ new Set(["resolve", "prepare", "validate", "approve", "invoke", "guard"]);
|
|
717
|
+
var isJsonValue = (value, ancestors = /* @__PURE__ */ new Set(), depth = 0) => {
|
|
718
|
+
if (value === null || typeof value === "string" || typeof value === "boolean") return true;
|
|
719
|
+
if (typeof value === "number") return Number.isFinite(value);
|
|
720
|
+
if (typeof value !== "object" || depth > MAX_DEPTH + 2 || ancestors.has(value)) return false;
|
|
721
|
+
ancestors.add(value);
|
|
722
|
+
const valid = Array.isArray(value) ? value.every((item) => isJsonValue(item, ancestors, depth + 1)) : Object.values(value).every((item) => isJsonValue(item, ancestors, depth + 1));
|
|
723
|
+
ancestors.delete(value);
|
|
724
|
+
return valid;
|
|
725
|
+
};
|
|
726
|
+
var isFabricExecutionTraceOperationV1Unchecked = (value) => {
|
|
727
|
+
if (!isRecord(value)) return false;
|
|
728
|
+
if (!hasOnlyKeys(value, ["type", "sequence", "ref", "provider", "action", "args", "outcome", "failureStage", "error", "result", "resultTruncated"])) return false;
|
|
729
|
+
if (value.type !== "call" || !Number.isSafeInteger(value.sequence) || value.sequence < 0) return false;
|
|
730
|
+
if (typeof value.ref !== "string" || !isRecord(value.args) || !isJsonValue(value.args)) return false;
|
|
731
|
+
if (!outcomes.has(value.outcome)) return false;
|
|
732
|
+
if (value.provider !== void 0 && typeof value.provider !== "string") return false;
|
|
733
|
+
if (value.action !== void 0 && typeof value.action !== "string") return false;
|
|
734
|
+
if (value.failureStage !== void 0 && !stages.has(value.failureStage)) return false;
|
|
735
|
+
if (value.error !== void 0 && typeof value.error !== "string") return false;
|
|
736
|
+
if (value.resultTruncated !== void 0 && typeof value.resultTruncated !== "boolean") return false;
|
|
737
|
+
return value.result === void 0 || isJsonValue(value.result);
|
|
738
|
+
};
|
|
739
|
+
var isFabricExecutionTraceOperationV1 = (value) => {
|
|
740
|
+
try {
|
|
741
|
+
return isFabricExecutionTraceOperationV1Unchecked(value);
|
|
742
|
+
} catch {
|
|
743
|
+
return false;
|
|
744
|
+
}
|
|
745
|
+
};
|
|
746
|
+
var isFabricExecutionTraceV1Unchecked = (value) => {
|
|
747
|
+
if (!isRecord(value)) return false;
|
|
748
|
+
if (!hasOnlyKeys(value, ["kind", "version", "outcome", "phases", "operations", "counts", "error"])) return false;
|
|
749
|
+
if (value.kind !== FABRIC_EXECUTION_TRACE_KIND || value.version !== FABRIC_EXECUTION_TRACE_VERSION) return false;
|
|
750
|
+
if (!outcomes.has(value.outcome)) return false;
|
|
751
|
+
if (!Array.isArray(value.phases) || !value.phases.every((phase) => typeof phase === "string")) return false;
|
|
752
|
+
if (!Array.isArray(value.operations) || !value.operations.every(isFabricExecutionTraceOperationV1)) return false;
|
|
753
|
+
if (!isRecord(value.counts) || !hasOnlyKeys(value.counts, ["droppedValues", "truncatedValues", "redactedValues", "droppedOperations"])) return false;
|
|
754
|
+
const counts = value.counts;
|
|
755
|
+
if (!["droppedValues", "truncatedValues", "redactedValues", "droppedOperations"].every((key) => Number.isSafeInteger(counts[key]) && counts[key] >= 0)) return false;
|
|
756
|
+
if (value.error !== void 0 && typeof value.error !== "string") return false;
|
|
757
|
+
for (let index = 1; index < value.operations.length; index++) {
|
|
758
|
+
if (value.operations[index].sequence <= value.operations[index - 1].sequence) return false;
|
|
759
|
+
}
|
|
760
|
+
return serializedBytes(value) <= FABRIC_EXECUTION_TRACE_MAX_BYTES;
|
|
761
|
+
};
|
|
762
|
+
var isFabricExecutionTraceV1 = (value) => {
|
|
763
|
+
try {
|
|
764
|
+
return isFabricExecutionTraceV1Unchecked(value);
|
|
765
|
+
} catch {
|
|
766
|
+
return false;
|
|
767
|
+
}
|
|
768
|
+
};
|
|
769
|
+
var readFabricExecutionTraceV1 = (value) => isFabricExecutionTraceV1(value) ? value : void 0;
|
|
770
|
+
|
|
771
|
+
export {
|
|
772
|
+
projectFabricAuditArgs,
|
|
773
|
+
projectFabricAuditResult,
|
|
774
|
+
FABRIC_EXECUTION_TRACE_KIND,
|
|
775
|
+
FABRIC_EXECUTION_TRACE_VERSION,
|
|
776
|
+
FABRIC_EXECUTION_TRACE_MAX_BYTES,
|
|
777
|
+
FabricTraceSafeError,
|
|
778
|
+
FabricResolutionError,
|
|
779
|
+
FabricExecutionTraceOperationHandle,
|
|
780
|
+
FabricExecutionTraceRecorder,
|
|
781
|
+
executionOutcomeFromError,
|
|
782
|
+
isFabricExecutionTraceOperationV1,
|
|
783
|
+
isFabricExecutionTraceV1,
|
|
784
|
+
readFabricExecutionTraceV1
|
|
785
|
+
};
|
|
786
|
+
//# sourceMappingURL=chunk-T5ZA5YRU.js.map
|