project-tiny-context-harness 0.8.16 → 0.11.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/README.md +119 -41
- package/assets/README.md +184 -55
- package/assets/README.zh-CN.md +114 -40
- package/assets/agents/AGENTS_CORE.md +2 -2
- package/assets/context_templates/context.toml +6 -1
- package/assets/context_templates/screen-contract.md +16 -0
- package/assets/runtime/windows-job-supervisor/formal_process_supervisor_native_helpers.cs +301 -0
- package/assets/runtime/windows-job-supervisor/formal_process_supervisor_native_run.cs +197 -0
- package/assets/runtime/windows-job-supervisor/formal_process_supervisor_native_types.cs +215 -0
- package/assets/runtime/windows-job-supervisor/windows_job_process_supervisor.ps1 +117 -0
- package/assets/skills/context_development_engineer/SKILL.md +16 -30
- package/assets/skills/context_development_engineer/references/engineering-design-reasoning.md +93 -0
- package/assets/skills/context_surface_contract/SKILL.md +13 -2
- package/assets/skills/context_uiux_design/SKILL.md +7 -3
- package/assets/skills/context_uiux_design/references/task-uiux-analysis.md +82 -0
- package/assets/skills/design-resource-authoring/SKILL.md +18 -9
- package/assets/skills/design-resource-authoring/references/authority-delta-assessment.md +52 -0
- package/assets/skills/design-resource-authoring/references/downstream-handoff.md +22 -6
- package/assets/skills/design-resource-authoring/references/formal-selected-web-app-handoff.md +26 -8
- package/assets/skills/design-resource-authoring/references/implementation-feasibility.md +111 -0
- package/assets/skills/design-resource-authoring/references/open-design-provider.md +45 -7
- package/assets/skills/design-resource-authoring/references/recovery-and-writeback.md +7 -1
- package/assets/skills/design-resource-authoring/references/resource-selection.md +115 -3
- package/assets/skills/design-system-authoring/SKILL.md +23 -17
- package/assets/skills/design-system-authoring/references/authority-adoption.md +19 -9
- package/assets/skills/design-system-authoring/references/open-design-design-system-provider.md +4 -0
- package/assets/skills/long-task-workflow/SKILL.md +6 -6
- package/assets/skills/long-task-workflow/references/authority-lifecycle.md +10 -4
- package/assets/skills/long-task-workflow/references/contract-authoring.md +5 -5
- package/assets/skills/long-task-workflow/references/evidence-design.md +14 -3
- package/assets/skills/long-task-workflow/references/source-authoring.md +11 -8
- package/assets/tools/context_rules.json +53 -0
- package/assets/tools/validate_context.py +302 -77
- package/dist/cli.js +2 -1
- package/dist/commands/context-create.d.ts +1 -0
- package/dist/commands/context-create.js +90 -0
- package/dist/commands/context-inspect.d.ts +1 -0
- package/dist/commands/context-inspect.js +98 -0
- package/dist/commands/context-move.d.ts +1 -0
- package/dist/commands/context-move.js +78 -0
- package/dist/commands/context-register.d.ts +1 -0
- package/dist/commands/context-register.js +110 -0
- package/dist/commands/context-transaction.d.ts +1 -0
- package/dist/commands/context-transaction.js +84 -0
- package/dist/commands/context.d.ts +1 -0
- package/dist/commands/context.js +36 -0
- package/dist/commands/design-authority-delta.d.ts +1 -0
- package/dist/commands/design-authority-delta.js +53 -0
- package/dist/commands/design-authority.d.ts +1 -0
- package/dist/commands/design-authority.js +104 -0
- package/dist/commands/design-resource.js +17 -3
- package/dist/commands/doctor.d.ts +1 -1
- package/dist/commands/doctor.js +61 -3
- package/dist/commands/index.js +19 -2
- package/dist/commands/long-task-authoring.js +20 -2
- package/dist/commands/long-task-workdir.d.ts +2 -0
- package/dist/commands/long-task-workdir.js +23 -0
- package/dist/commands/long-task.js +75 -6
- package/dist/commands/route.d.ts +15 -0
- package/dist/commands/route.js +142 -0
- package/dist/index.d.ts +3 -13
- package/dist/index.js +3 -12
- package/dist/lib/cli-exit.d.ts +14 -0
- package/dist/lib/cli-exit.js +19 -0
- package/dist/lib/context-catalog/catalog-default-footprint.d.ts +3 -0
- package/dist/lib/context-catalog/catalog-default-footprint.js +53 -0
- package/dist/lib/context-catalog/catalog-diagnostics.d.ts +9 -0
- package/dist/lib/context-catalog/catalog-diagnostics.js +34 -0
- package/dist/lib/context-catalog/catalog-discovery.d.ts +7 -0
- package/dist/lib/context-catalog/catalog-discovery.js +81 -0
- package/dist/lib/context-catalog/catalog-load.d.ts +8 -0
- package/dist/lib/context-catalog/catalog-load.js +187 -0
- package/dist/lib/context-catalog/catalog-path-validation.d.ts +7 -0
- package/dist/lib/context-catalog/catalog-path-validation.js +62 -0
- package/dist/lib/context-catalog/catalog-paths.d.ts +11 -0
- package/dist/lib/context-catalog/catalog-paths.js +41 -0
- package/dist/lib/context-catalog/catalog-portable-contract.d.ts +15 -0
- package/dist/lib/context-catalog/catalog-portable-contract.js +68 -0
- package/dist/lib/context-catalog/catalog-staged-path-safety.d.ts +1 -0
- package/dist/lib/context-catalog/catalog-staged-path-safety.js +36 -0
- package/dist/lib/context-catalog/catalog-types.d.ts +40 -0
- package/dist/lib/context-catalog/catalog-types.js +1 -0
- package/dist/lib/context-catalog/catalog-validation.d.ts +9 -0
- package/dist/lib/context-catalog/catalog-validation.js +148 -0
- package/dist/lib/context-create/context-create-path.d.ts +2 -0
- package/dist/lib/context-create/context-create-path.js +30 -0
- package/dist/lib/context-create/context-create-template.d.ts +2 -0
- package/dist/lib/context-create/context-create-template.js +95 -0
- package/dist/lib/context-create/context-create-types.d.ts +28 -0
- package/dist/lib/context-create/context-create-types.js +1 -0
- package/dist/lib/context-create/context-create-write.d.ts +1 -0
- package/dist/lib/context-create/context-create-write.js +85 -0
- package/dist/lib/context-create/context-create.d.ts +2 -0
- package/dist/lib/context-create/context-create.js +84 -0
- package/dist/lib/context-default-footprint.d.ts +2 -3
- package/dist/lib/context-default-footprint.js +49 -57
- package/dist/lib/context-doctor/context-doctor-types.d.ts +16 -0
- package/dist/lib/context-doctor/context-doctor-types.js +15 -0
- package/dist/lib/context-doctor/context-doctor.d.ts +2 -0
- package/dist/lib/context-doctor/context-doctor.js +130 -0
- package/dist/lib/context-graph-snapshot.d.ts +5 -0
- package/dist/lib/context-graph-snapshot.js +46 -25
- package/dist/lib/context-inspect/context-inspect-projection.d.ts +9 -0
- package/dist/lib/context-inspect/context-inspect-projection.js +49 -0
- package/dist/lib/context-inspect/context-inspect-render.d.ts +2 -0
- package/dist/lib/context-inspect/context-inspect-render.js +29 -0
- package/dist/lib/context-inspect/context-inspect-types.d.ts +43 -0
- package/dist/lib/context-inspect/context-inspect-types.js +1 -0
- package/dist/lib/context-inspect/context-inspect.d.ts +2 -0
- package/dist/lib/context-inspect/context-inspect.js +104 -0
- package/dist/lib/context-manifest-schema.d.ts +1 -1
- package/dist/lib/context-manifest-schema.js +4 -20
- package/dist/lib/context-markdown/context-markdown-analysis.d.ts +15 -0
- package/dist/lib/context-markdown/context-markdown-analysis.js +245 -0
- package/dist/lib/context-markdown/context-markdown-extract.d.ts +7 -0
- package/dist/lib/context-markdown/context-markdown-extract.js +114 -0
- package/dist/lib/context-markdown/context-markdown-types.d.ts +57 -0
- package/dist/lib/context-markdown/context-markdown-types.js +1 -0
- package/dist/lib/context-move/context-move-input.d.ts +8 -0
- package/dist/lib/context-move/context-move-input.js +17 -0
- package/dist/lib/context-move/context-move-literal-scan.d.ts +20 -0
- package/dist/lib/context-move/context-move-literal-scan.js +213 -0
- package/dist/lib/context-move/context-move-live-validation.d.ts +3 -0
- package/dist/lib/context-move/context-move-live-validation.js +56 -0
- package/dist/lib/context-move/context-move-markdown-plan.d.ts +22 -0
- package/dist/lib/context-move/context-move-markdown-plan.js +39 -0
- package/dist/lib/context-move/context-move-projection.d.ts +3 -0
- package/dist/lib/context-move/context-move-projection.js +11 -0
- package/dist/lib/context-move/context-move-reference-validation.d.ts +11 -0
- package/dist/lib/context-move/context-move-reference-validation.js +64 -0
- package/dist/lib/context-move/context-move-render.d.ts +2 -0
- package/dist/lib/context-move/context-move-render.js +24 -0
- package/dist/lib/context-move/context-move-support.d.ts +10 -0
- package/dist/lib/context-move/context-move-support.js +88 -0
- package/dist/lib/context-move/context-move-transaction-plan.d.ts +24 -0
- package/dist/lib/context-move/context-move-transaction-plan.js +108 -0
- package/dist/lib/context-move/context-move-types.d.ts +74 -0
- package/dist/lib/context-move/context-move-types.js +1 -0
- package/dist/lib/context-move/context-move.d.ts +8 -0
- package/dist/lib/context-move/context-move.js +180 -0
- package/dist/lib/context-mutation/manifest-lossless-patch.d.ts +28 -0
- package/dist/lib/context-mutation/manifest-lossless-patch.js +208 -0
- package/dist/lib/context-mutation/markdown-link-patch.d.ts +34 -0
- package/dist/lib/context-mutation/markdown-link-patch.js +143 -0
- package/dist/lib/context-mutation/markdown-link-spans.d.ts +10 -0
- package/dist/lib/context-mutation/markdown-link-spans.js +179 -0
- package/dist/lib/context-mutation/mutation-cas.d.ts +13 -0
- package/dist/lib/context-mutation/mutation-cas.js +365 -0
- package/dist/lib/context-mutation/mutation-command-support.d.ts +12 -0
- package/dist/lib/context-mutation/mutation-command-support.js +57 -0
- package/dist/lib/context-mutation/mutation-commit.d.ts +12 -0
- package/dist/lib/context-mutation/mutation-commit.js +89 -0
- package/dist/lib/context-mutation/mutation-directories.d.ts +5 -0
- package/dist/lib/context-mutation/mutation-directories.js +56 -0
- package/dist/lib/context-mutation/mutation-file-state.d.ts +14 -0
- package/dist/lib/context-mutation/mutation-file-state.js +137 -0
- package/dist/lib/context-mutation/mutation-journal-file-validation.d.ts +1 -0
- package/dist/lib/context-mutation/mutation-journal-file-validation.js +106 -0
- package/dist/lib/context-mutation/mutation-journal-io.d.ts +5 -0
- package/dist/lib/context-mutation/mutation-journal-io.js +55 -0
- package/dist/lib/context-mutation/mutation-journal-storage.d.ts +18 -0
- package/dist/lib/context-mutation/mutation-journal-storage.js +283 -0
- package/dist/lib/context-mutation/mutation-journal-validation-support.d.ts +16 -0
- package/dist/lib/context-mutation/mutation-journal-validation-support.js +140 -0
- package/dist/lib/context-mutation/mutation-journal-validation.d.ts +3 -0
- package/dist/lib/context-mutation/mutation-journal-validation.js +177 -0
- package/dist/lib/context-mutation/mutation-journal.d.ts +8 -0
- package/dist/lib/context-mutation/mutation-journal.js +111 -0
- package/dist/lib/context-mutation/mutation-live-validation.d.ts +3 -0
- package/dist/lib/context-mutation/mutation-live-validation.js +51 -0
- package/dist/lib/context-mutation/mutation-long-task-guard.d.ts +6 -0
- package/dist/lib/context-mutation/mutation-long-task-guard.js +57 -0
- package/dist/lib/context-mutation/mutation-recovery.d.ts +4 -0
- package/dist/lib/context-mutation/mutation-recovery.js +189 -0
- package/dist/lib/context-mutation/mutation-staged-fs.d.ts +5 -0
- package/dist/lib/context-mutation/mutation-staged-fs.js +56 -0
- package/dist/lib/context-mutation/mutation-types.d.ts +103 -0
- package/dist/lib/context-mutation/mutation-types.js +1 -0
- package/dist/lib/context-register/context-register-input.d.ts +11 -0
- package/dist/lib/context-register/context-register-input.js +43 -0
- package/dist/lib/context-register/context-register-render.d.ts +2 -0
- package/dist/lib/context-register/context-register-render.js +21 -0
- package/dist/lib/context-register/context-register-support.d.ts +6 -0
- package/dist/lib/context-register/context-register-support.js +46 -0
- package/dist/lib/context-register/context-register-types.d.ts +46 -0
- package/dist/lib/context-register/context-register-types.js +1 -0
- package/dist/lib/context-register/context-register.d.ts +8 -0
- package/dist/lib/context-register/context-register.js +155 -0
- package/dist/lib/context-router/context-route-budget.d.ts +15 -0
- package/dist/lib/context-router/context-route-budget.js +14 -0
- package/dist/lib/context-router/context-route-candidates.d.ts +15 -0
- package/dist/lib/context-router/context-route-candidates.js +112 -0
- package/dist/lib/context-router/context-route-order.d.ts +6 -0
- package/dist/lib/context-router/context-route-order.js +53 -0
- package/dist/lib/context-router/context-route-paths.d.ts +16 -0
- package/dist/lib/context-router/context-route-paths.js +109 -0
- package/dist/lib/context-router/context-route-render.d.ts +2 -0
- package/dist/lib/context-router/context-route-render.js +32 -0
- package/dist/lib/context-router/context-route-scan.d.ts +18 -0
- package/dist/lib/context-router/context-route-scan.js +156 -0
- package/dist/lib/context-router/context-route-selection.d.ts +16 -0
- package/dist/lib/context-router/context-route-selection.js +72 -0
- package/dist/lib/context-router/context-route-terms.d.ts +13 -0
- package/dist/lib/context-router/context-route-terms.js +202 -0
- package/dist/lib/context-router/context-route-types.d.ts +101 -0
- package/dist/lib/context-router/context-route-types.js +1 -0
- package/dist/lib/context-router/context-route.d.ts +2 -0
- package/dist/lib/context-router/context-route.js +127 -0
- package/dist/lib/context-units-migration.d.ts +13 -0
- package/dist/lib/context-units-migration.js +217 -0
- package/dist/lib/design-authority-binding.d.ts +7 -0
- package/dist/lib/design-authority-binding.js +96 -0
- package/dist/lib/design-authority-closure.d.ts +3 -0
- package/dist/lib/design-authority-closure.js +201 -0
- package/dist/lib/design-authority-delta-codec-primitives.d.ts +10 -0
- package/dist/lib/design-authority-delta-codec-primitives.js +58 -0
- package/dist/lib/design-authority-delta-codec.d.ts +2 -0
- package/dist/lib/design-authority-delta-codec.js +193 -0
- package/dist/lib/design-authority-delta-types.d.ts +65 -0
- package/dist/lib/design-authority-delta-types.js +6 -0
- package/dist/lib/design-authority-delta-validation.d.ts +2 -0
- package/dist/lib/design-authority-delta-validation.js +16 -0
- package/dist/lib/design-authority-digest.d.ts +8 -0
- package/dist/lib/design-authority-digest.js +36 -0
- package/dist/lib/design-authority-files.d.ts +9 -0
- package/dist/lib/design-authority-files.js +62 -0
- package/dist/lib/design-authority-format.d.ts +2 -0
- package/dist/lib/design-authority-format.js +93 -0
- package/dist/lib/design-authority-links.d.ts +10 -0
- package/dist/lib/design-authority-links.js +137 -0
- package/dist/lib/design-authority-manifest.d.ts +4 -0
- package/dist/lib/design-authority-manifest.js +144 -0
- package/dist/lib/design-authority-tokens.d.ts +9 -0
- package/dist/lib/design-authority-tokens.js +45 -0
- package/dist/lib/design-authority-types.d.ts +80 -0
- package/dist/lib/design-authority-types.js +23 -0
- package/dist/lib/design-md-tool-adapter.d.ts +9 -0
- package/dist/lib/design-md-tool-adapter.js +152 -0
- package/dist/lib/design-md-tool-normalization.d.ts +7 -0
- package/dist/lib/design-md-tool-normalization.js +78 -0
- package/dist/lib/design-md-tool-types.d.ts +99 -0
- package/dist/lib/design-md-tool-types.js +8 -0
- package/dist/lib/design-resource-handoff-bundle.js +5 -0
- package/dist/lib/design-resource-handoff-input-types.d.ts +1 -1
- package/dist/lib/design-resource-handoff-manifest-projection.js +4 -0
- package/dist/lib/design-resource-handoff-set-integrity.js +1 -0
- package/dist/lib/design-resource-handoff-shape.js +18 -2
- package/dist/lib/design-resource-handoff-types.d.ts +8 -0
- package/dist/lib/design-resource-handoff-validation.js +24 -0
- package/dist/lib/design-resource-implementation-feasibility-model.d.ts +35 -0
- package/dist/lib/design-resource-implementation-feasibility-model.js +62 -0
- package/dist/lib/design-resource-implementation-feasibility-shape-sections.d.ts +43 -0
- package/dist/lib/design-resource-implementation-feasibility-shape-sections.js +142 -0
- package/dist/lib/design-resource-implementation-feasibility-shape.d.ts +4 -0
- package/dist/lib/design-resource-implementation-feasibility-shape.js +154 -0
- package/dist/lib/design-resource-implementation-feasibility-source-decision-projection.d.ts +24 -0
- package/dist/lib/design-resource-implementation-feasibility-source-decision-projection.js +106 -0
- package/dist/lib/design-resource-implementation-feasibility-source-decision.d.ts +21 -0
- package/dist/lib/design-resource-implementation-feasibility-source-decision.js +75 -0
- package/dist/lib/design-resource-implementation-feasibility-types.d.ts +135 -0
- package/dist/lib/design-resource-implementation-feasibility-types.js +37 -0
- package/dist/lib/design-resource-implementation-feasibility-validation-cells.d.ts +5 -0
- package/dist/lib/design-resource-implementation-feasibility-validation-cells.js +125 -0
- package/dist/lib/design-resource-implementation-feasibility-validation-document.d.ts +4 -0
- package/dist/lib/design-resource-implementation-feasibility-validation-document.js +167 -0
- package/dist/lib/design-resource-implementation-feasibility-validation-facts.d.ts +3 -0
- package/dist/lib/design-resource-implementation-feasibility-validation-facts.js +76 -0
- package/dist/lib/design-resource-implementation-feasibility-validation-realizations.d.ts +8 -0
- package/dist/lib/design-resource-implementation-feasibility-validation-realizations.js +76 -0
- package/dist/lib/design-resource-implementation-feasibility-validation-support.d.ts +10 -0
- package/dist/lib/design-resource-implementation-feasibility-validation-support.js +75 -0
- package/dist/lib/design-resource-implementation-feasibility-validation.d.ts +3 -0
- package/dist/lib/design-resource-implementation-feasibility-validation.js +138 -0
- package/dist/lib/design-resource-recovery-current.js +22 -0
- package/dist/lib/design-resource-recovery-shape.js +64 -7
- package/dist/lib/design-resource-recovery-types.d.ts +4 -1
- package/dist/lib/design-resource-symbolic-fact-shape.js +9 -1
- package/dist/lib/design-resource-symbolic-fact-types.d.ts +8 -0
- package/dist/lib/design-resource-symbolic-fact-validation.js +25 -0
- package/dist/lib/doctor.d.ts +2 -1
- package/dist/lib/doctor.js +29 -1
- package/dist/lib/fs.js +1 -1
- package/dist/lib/long-task-acceptance-reachability-claims.d.ts +2 -0
- package/dist/lib/long-task-acceptance-reachability-claims.js +279 -0
- package/dist/lib/long-task-acceptance-reachability-design.d.ts +2 -0
- package/dist/lib/long-task-acceptance-reachability-design.js +96 -0
- package/dist/lib/long-task-acceptance-reachability-external.d.ts +9 -0
- package/dist/lib/long-task-acceptance-reachability-external.js +123 -0
- package/dist/lib/long-task-acceptance-reachability-helpers.d.ts +64 -0
- package/dist/lib/long-task-acceptance-reachability-helpers.js +473 -0
- package/dist/lib/long-task-acceptance-reachability-semantic.d.ts +2 -0
- package/dist/lib/long-task-acceptance-reachability-semantic.js +122 -0
- package/dist/lib/long-task-acceptance-reachability-types.d.ts +91 -0
- package/dist/lib/long-task-acceptance-reachability-types.js +1 -0
- package/dist/lib/long-task-acceptance-reachability.d.ts +4 -0
- package/dist/lib/long-task-acceptance-reachability.js +115 -0
- package/dist/lib/long-task-activation-validation.d.ts +6 -0
- package/dist/lib/long-task-activation-validation.js +96 -23
- package/dist/lib/long-task-active-authority-lock-context.d.ts +4 -0
- package/dist/lib/long-task-active-authority-lock-context.js +29 -0
- package/dist/lib/long-task-applicability-identity.d.ts +25 -0
- package/dist/lib/long-task-applicability-identity.js +60 -0
- package/dist/lib/long-task-authoring-preflight-diagnostics.js +8 -0
- package/dist/lib/long-task-authoring-preflight-types.d.ts +2 -0
- package/dist/lib/long-task-authoring-preflight-types.js +9 -0
- package/dist/lib/long-task-authoring-preflight.js +18 -2
- package/dist/lib/long-task-authority-material-diff.js +4 -0
- package/dist/lib/long-task-authority-materials.js +19 -0
- package/dist/lib/long-task-authority-policy.d.ts +3 -0
- package/dist/lib/long-task-authority-policy.js +3 -0
- package/dist/lib/long-task-authority-revision-details.js +2 -1
- package/dist/lib/long-task-authority-types.d.ts +2 -0
- package/dist/lib/long-task-authority.js +2 -0
- package/dist/lib/long-task-check-runner.js +3 -296
- package/dist/lib/long-task-check-shape.js +6 -1
- package/dist/lib/long-task-claim-definitions.js +1 -3
- package/dist/lib/long-task-claim-semantic-proof-floor.d.ts +3 -0
- package/dist/lib/long-task-claim-semantic-proof-floor.js +78 -0
- package/dist/lib/long-task-claims.d.ts +0 -18
- package/dist/lib/long-task-claims.js +15 -14
- package/dist/lib/long-task-command-process.d.ts +9 -0
- package/dist/lib/long-task-command-process.js +178 -0
- package/dist/lib/long-task-compact-authoring.js +3 -0
- package/dist/lib/long-task-compact-projections.js +10 -0
- package/dist/lib/long-task-complete-delivery-evidence-types.d.ts +38 -0
- package/dist/lib/long-task-complete-delivery-evidence-types.js +1 -0
- package/dist/lib/long-task-completion-types.d.ts +109 -0
- package/dist/lib/long-task-completion-types.js +1 -0
- package/dist/lib/long-task-conformance-policy.d.ts +2 -1
- package/dist/lib/long-task-conformance-policy.js +11 -4
- package/dist/lib/long-task-context-authority-topology.js +6 -4
- package/dist/lib/long-task-contract-types.d.ts +52 -1
- package/dist/lib/long-task-counterfactual-sandbox.d.ts +7 -1
- package/dist/lib/long-task-counterfactual-sandbox.js +86 -6
- package/dist/lib/long-task-delivery-compiler-preflight.d.ts +24 -0
- package/dist/lib/long-task-delivery-compiler-preflight.js +32 -0
- package/dist/lib/long-task-delivery-compiler.d.ts +1 -0
- package/dist/lib/long-task-delivery-compiler.js +59 -44
- package/dist/lib/long-task-delivery-parser.d.ts +3 -0
- package/dist/lib/long-task-delivery-parser.js +26 -8
- package/dist/lib/long-task-delivery-types.d.ts +2 -0
- package/dist/lib/long-task-delivery-types.js +2 -0
- package/dist/lib/long-task-delivery-validation.d.ts +11 -3
- package/dist/lib/long-task-delivery-validation.js +23 -8
- package/dist/lib/long-task-design-feasibility-binding-owners.d.ts +6 -0
- package/dist/lib/long-task-design-feasibility-binding-owners.js +52 -0
- package/dist/lib/long-task-design-feasibility-binding.d.ts +14 -0
- package/dist/lib/long-task-design-feasibility-binding.js +114 -0
- package/dist/lib/long-task-design-feasibility-source-closure.d.ts +11 -0
- package/dist/lib/long-task-design-feasibility-source-closure.js +87 -0
- package/dist/lib/long-task-design-obligation.d.ts +50 -0
- package/dist/lib/long-task-design-obligation.js +99 -0
- package/dist/lib/long-task-design-resource-handoff.d.ts +5 -3
- package/dist/lib/long-task-design-resource-handoff.js +64 -4
- package/dist/lib/long-task-design-resource-method-binding.js +20 -2
- package/dist/lib/long-task-effective-external-takeover.d.ts +15 -0
- package/dist/lib/long-task-effective-external-takeover.js +109 -0
- package/dist/lib/long-task-effective-external-ui-takeover.d.ts +5 -0
- package/dist/lib/long-task-effective-external-ui-takeover.js +117 -0
- package/dist/lib/long-task-evidence-capability-codec.js +91 -0
- package/dist/lib/long-task-evidence-capability-runtime.js +62 -14
- package/dist/lib/long-task-evidence-capability-types.d.ts +3 -2
- package/dist/lib/long-task-evidence-v2.d.ts +6 -1
- package/dist/lib/long-task-evidence-v2.js +253 -170
- package/dist/lib/long-task-execution-observation.d.ts +7 -0
- package/dist/lib/long-task-execution-observation.js +21 -4
- package/dist/lib/long-task-expected-authority.d.ts +4 -0
- package/dist/lib/long-task-expected-authority.js +126 -0
- package/dist/lib/long-task-external-confirmation-artifacts.d.ts +9 -0
- package/dist/lib/long-task-external-confirmation-artifacts.js +138 -0
- package/dist/lib/long-task-external-confirmation-attestation.d.ts +20 -0
- package/dist/lib/long-task-external-confirmation-attestation.js +115 -0
- package/dist/lib/long-task-external-confirmation-challenge.d.ts +23 -0
- package/dist/lib/long-task-external-confirmation-challenge.js +164 -0
- package/dist/lib/long-task-external-confirmation-context.d.ts +14 -0
- package/dist/lib/long-task-external-confirmation-context.js +53 -0
- package/dist/lib/long-task-external-confirmation-evaluation.d.ts +11 -0
- package/dist/lib/long-task-external-confirmation-evaluation.js +454 -0
- package/dist/lib/long-task-external-confirmation-expected.d.ts +8 -0
- package/dist/lib/long-task-external-confirmation-expected.js +200 -0
- package/dist/lib/long-task-external-confirmation-identity.d.ts +10 -0
- package/dist/lib/long-task-external-confirmation-identity.js +77 -0
- package/dist/lib/long-task-external-confirmation-plan.d.ts +25 -0
- package/dist/lib/long-task-external-confirmation-plan.js +148 -0
- package/dist/lib/long-task-external-confirmation-preparation.d.ts +4 -0
- package/dist/lib/long-task-external-confirmation-preparation.js +100 -0
- package/dist/lib/long-task-external-confirmation-shape.d.ts +8 -0
- package/dist/lib/long-task-external-confirmation-shape.js +387 -0
- package/dist/lib/long-task-external-confirmation-state.d.ts +10 -0
- package/dist/lib/long-task-external-confirmation-state.js +109 -0
- package/dist/lib/long-task-external-confirmation-types.d.ts +195 -0
- package/dist/lib/long-task-external-confirmation-types.js +1 -0
- package/dist/lib/long-task-final-integrity.d.ts +2 -0
- package/dist/lib/long-task-final-integrity.js +21 -10
- package/dist/lib/long-task-final-v2.d.ts +7 -2
- package/dist/lib/long-task-final-v2.js +179 -55
- package/dist/lib/long-task-finalization-identity.d.ts +27 -0
- package/dist/lib/long-task-finalization-identity.js +58 -0
- package/dist/lib/long-task-finding-context.d.ts +1 -1
- package/dist/lib/long-task-finding-context.js +139 -13
- package/dist/lib/long-task-freshness.d.ts +27 -0
- package/dist/lib/long-task-freshness.js +129 -6
- package/dist/lib/long-task-git.js +3 -3
- package/dist/lib/long-task-material-input-closure.d.ts +3 -0
- package/dist/lib/long-task-material-input-closure.js +92 -0
- package/dist/lib/long-task-obligation-authority-resolution.d.ts +12 -0
- package/dist/lib/long-task-obligation-authority-resolution.js +57 -0
- package/dist/lib/long-task-obligation-semantic-identity.d.ts +16 -0
- package/dist/lib/long-task-obligation-semantic-identity.js +116 -0
- package/dist/lib/long-task-observation-authority.d.ts +11 -0
- package/dist/lib/long-task-observation-authority.js +137 -6
- package/dist/lib/long-task-process-table.d.ts +9 -0
- package/dist/lib/long-task-process-table.js +87 -0
- package/dist/lib/long-task-process-tree.d.ts +8 -0
- package/dist/lib/long-task-process-tree.js +108 -0
- package/dist/lib/long-task-proof-adequacy.d.ts +12 -0
- package/dist/lib/long-task-proof-adequacy.js +57 -0
- package/dist/lib/long-task-proof-capability-floor.d.ts +6 -0
- package/dist/lib/long-task-proof-capability-floor.js +137 -0
- package/dist/lib/long-task-protected-files.d.ts +1 -1
- package/dist/lib/long-task-protected-files.js +1 -1
- package/dist/lib/long-task-repair-frontier-checks.d.ts +8 -0
- package/dist/lib/long-task-repair-frontier-checks.js +93 -0
- package/dist/lib/long-task-repair-frontier-groups.d.ts +2 -0
- package/dist/lib/long-task-repair-frontier-groups.js +64 -0
- package/dist/lib/long-task-repair-frontier-utils.d.ts +6 -0
- package/dist/lib/long-task-repair-frontier-utils.js +27 -0
- package/dist/lib/long-task-repair-frontier.d.ts +14 -0
- package/dist/lib/long-task-repair-frontier.js +132 -0
- package/dist/lib/long-task-risk.d.ts +3 -2
- package/dist/lib/long-task-risk.js +73 -24
- package/dist/lib/long-task-root-shape.js +148 -8
- package/dist/lib/long-task-runner-freeze.d.ts +2 -1
- package/dist/lib/long-task-runner-freeze.js +23 -8
- package/dist/lib/long-task-runtime-types.d.ts +34 -40
- package/dist/lib/long-task-semantic-assurance-policy.js +2 -11
- package/dist/lib/long-task-semantic-contract-types.d.ts +2 -1
- package/dist/lib/long-task-semantic-drift-migration.js +48 -2
- package/dist/lib/long-task-semantic-fact-binding-types.d.ts +20 -0
- package/dist/lib/long-task-semantic-fact-closure.d.ts +5 -1
- package/dist/lib/long-task-semantic-fact-closure.js +33 -5
- package/dist/lib/long-task-semantic-fact-contract-closure.js +176 -1
- package/dist/lib/long-task-semantic-fact-contract-proofs.js +18 -1
- package/dist/lib/long-task-semantic-fact-input-closure.d.ts +16 -2
- package/dist/lib/long-task-semantic-fact-input-closure.js +138 -15
- package/dist/lib/long-task-semantic-fact-provenance-closure.js +1 -1
- package/dist/lib/long-task-semantic-fact-shape.d.ts +2 -1
- package/dist/lib/long-task-semantic-fact-shape.js +35 -1
- package/dist/lib/long-task-semantic-proof-adequacy.d.ts +2 -0
- package/dist/lib/long-task-semantic-proof-adequacy.js +19 -0
- package/dist/lib/long-task-semantic-proof-profile.d.ts +5 -0
- package/dist/lib/long-task-semantic-proof-profile.js +187 -0
- package/dist/lib/long-task-shape-primitives.d.ts +1 -1
- package/dist/lib/long-task-shape-primitives.js +5 -0
- package/dist/lib/long-task-source-anchors.d.ts +10 -0
- package/dist/lib/long-task-source-anchors.js +102 -0
- package/dist/lib/long-task-source-authority-types.d.ts +46 -0
- package/dist/lib/long-task-source-claim-validation.js +36 -0
- package/dist/lib/long-task-source-conservation-facts.d.ts +8 -0
- package/dist/lib/long-task-source-conservation-facts.js +57 -0
- package/dist/lib/long-task-source-conservation-types.d.ts +34 -0
- package/dist/lib/long-task-source-conservation-types.js +1 -0
- package/dist/lib/long-task-source-conservation.d.ts +7 -0
- package/dist/lib/long-task-source-conservation.js +110 -0
- package/dist/lib/long-task-source-fragments.d.ts +6 -0
- package/dist/lib/long-task-source-fragments.js +219 -0
- package/dist/lib/long-task-source-projection-resolution.d.ts +5 -0
- package/dist/lib/long-task-source-projection-resolution.js +57 -0
- package/dist/lib/long-task-source-projection-validation.d.ts +17 -0
- package/dist/lib/long-task-source-projection-validation.js +154 -0
- package/dist/lib/long-task-source-shape.js +14 -6
- package/dist/lib/long-task-source-supersession.d.ts +5 -0
- package/dist/lib/long-task-source-supersession.js +138 -0
- package/dist/lib/long-task-stage-policy.d.ts +7 -2
- package/dist/lib/long-task-stage-policy.js +67 -23
- package/dist/lib/long-task-state.d.ts +18 -4
- package/dist/lib/long-task-state.js +319 -33
- package/dist/lib/long-task-static-observation-freeze.js +4 -3
- package/dist/lib/long-task-status-projection.d.ts +3 -1
- package/dist/lib/long-task-status-projection.js +44 -13
- package/dist/lib/long-task-status-v2.d.ts +10 -6
- package/dist/lib/long-task-status-v2.js +70 -58
- package/dist/lib/long-task-target-policy.d.ts +8 -3
- package/dist/lib/long-task-target-policy.js +40 -9
- package/dist/lib/long-task-terminal-finalization.d.ts +12 -0
- package/dist/lib/long-task-terminal-finalization.js +190 -0
- package/dist/lib/long-task-ui-design-policy.js +15 -4
- package/dist/lib/long-task-ui-surface-policy.d.ts +2 -1
- package/dist/lib/long-task-ui-surface-policy.js +7 -4
- package/dist/lib/long-task-ui-surface-validation.d.ts +3 -1
- package/dist/lib/long-task-ui-surface-validation.js +2 -2
- package/dist/lib/long-task-verifier-counterfactuals.d.ts +11 -0
- package/dist/lib/long-task-verifier-counterfactuals.js +96 -0
- package/dist/lib/long-task-verifier-execution.d.ts +9 -0
- package/dist/lib/long-task-verifier-execution.js +67 -0
- package/dist/lib/long-task-verifier-identity.js +16 -5
- package/dist/lib/long-task-verifier-v2.js +52 -65
- package/dist/lib/long-task-windows-job-supervisor-helper.d.ts +1 -0
- package/dist/lib/long-task-windows-job-supervisor-helper.js +104 -0
- package/dist/lib/long-task-windows-job-supervisor-protocol.d.ts +28 -0
- package/dist/lib/long-task-windows-job-supervisor-protocol.js +124 -0
- package/dist/lib/long-task-windows-job-supervisor-result.d.ts +11 -0
- package/dist/lib/long-task-windows-job-supervisor-result.js +152 -0
- package/dist/lib/long-task-windows-job-supervisor.d.ts +2 -0
- package/dist/lib/long-task-windows-job-supervisor.js +126 -0
- package/dist/lib/long-task-workspace-scope.d.ts +1 -0
- package/dist/lib/long-task-workspace-scope.js +4 -1
- package/dist/lib/long-task-workspace.d.ts +1 -0
- package/dist/lib/long-task-workspace.js +10 -0
- package/dist/lib/migrations.js +43 -2
- package/dist/lib/repository-path-safety.d.ts +3 -0
- package/dist/lib/repository-path-safety.js +39 -3
- package/dist/lib/semantic-fact-input-shape.d.ts +7 -2
- package/dist/lib/semantic-fact-input-shape.js +25 -1
- package/dist/lib/semantic-fact-inventory-types.d.ts +8 -2
- package/dist/lib/semantic-fact-policy-census.d.ts +1 -1
- package/dist/lib/semantic-fact-policy-census.js +5 -2
- package/dist/lib/semantic-fact-policy.d.ts +1 -1
- package/dist/lib/semantic-fact-policy.js +2 -2
- package/dist/lib/semantic-fact-proof-shape.d.ts +1 -1
- package/dist/lib/semantic-fact-property-shape.d.ts +1 -1
- package/dist/lib/validators.d.ts +3 -0
- package/dist/lib/validators.js +45 -157
- package/dist/public-api-core.d.ts +12 -0
- package/dist/public-api-core.js +12 -0
- package/dist/public-api-long-task.d.ts +10 -0
- package/dist/public-api-long-task.js +10 -0
- package/dist/public-types.d.ts +6 -1
- package/dist/schemas/design-authority-delta-assessment-v1.schema.json +191 -0
- package/dist/schemas/long-task-delivery-v2/long-task-delivery-v2.schema.json +166 -2
- package/dist/schemas/long-task-external-confirmation-record-v1.schema.json +155 -0
- package/dist/schemas/long-task-external-confirmation-record-v2.schema.json +209 -0
- package/migrations/README.md +99 -0
- package/package.json +7 -5
- package/source-mappings.yaml +18 -0
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
import { externalClaimCapabilityFloor } from "./long-task-proof-adequacy.js";
|
|
2
|
+
import { claimSemanticCapabilityFloor } from "./long-task-claim-semantic-proof-floor.js";
|
|
3
|
+
import { resolveObligationAuthority } from "./long-task-obligation-authority-resolution.js";
|
|
4
|
+
import { claimObligationRef, claimProofMethod, externalConfirmationSessionMatchesApplicability, objectiveMachineClaimActualAuthority, pendingExternalRow, resolveObjectiveExternalClaimActualAuthority, selectOptionalSurface, } from "./long-task-acceptance-reachability-helpers.js";
|
|
5
|
+
import { objectiveClaimSemanticIdentity } from "./long-task-obligation-semantic-identity.js";
|
|
6
|
+
export function compileClaimReachability(input, rows, external) {
|
|
7
|
+
compileGlobalClaimReachability(input, rows, external);
|
|
8
|
+
compileOutcomeClaimReachability(input, rows, external);
|
|
9
|
+
}
|
|
10
|
+
function compileGlobalClaimReachability(input, rows, external) {
|
|
11
|
+
for (const claim of input.claims.by_global) {
|
|
12
|
+
const summary = input.claims.summary.claims_by_global[claim.local_key];
|
|
13
|
+
for (const applicabilityRef of claim.applicability_refs)
|
|
14
|
+
addClaimObligation(input, rows, external, null, claim.local_key, claim.id, applicabilityRef, summary?.proofs ?? [], [], claim.required_polarity);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
function compileOutcomeClaimReachability(input, rows, external) {
|
|
18
|
+
for (const [outcomeKey, claims] of Object.entries(input.claims.by_outcome))
|
|
19
|
+
for (const claim of claims) {
|
|
20
|
+
if (claim.kind === "semantic_fact")
|
|
21
|
+
continue;
|
|
22
|
+
const summary = input.claims.summary.claims_by_outcome[outcomeKey]?.[claim.local_key];
|
|
23
|
+
for (const applicabilityRef of claim.applicability_refs)
|
|
24
|
+
addClaimObligation(input, rows, external, outcomeKey, claim.local_key, claim.id, applicabilityRef, summary?.proofs ?? [], claim.required_proof_surfaces, claim.required_polarity);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
function addClaimObligation(input, rows, external, outcomeKey, localClaim, fullClaim, applicabilityRef, proofs, requiredSurfaces, requiredPolarity) {
|
|
28
|
+
const matching = proofs.filter((proof) => proof.applicability_ref === applicabilityRef &&
|
|
29
|
+
proof.polarity === requiredPolarity);
|
|
30
|
+
if (!requiredSurfaces.length) {
|
|
31
|
+
addOptionalClaimObligation(input, rows, external, outcomeKey, localClaim, fullClaim, applicabilityRef, matching, requiredPolarity);
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
for (const surface of requiredSurfaces)
|
|
35
|
+
addClaimSurfaceObligation(input, rows, external, outcomeKey, localClaim, fullClaim, applicabilityRef, matching, surface, requiredPolarity);
|
|
36
|
+
}
|
|
37
|
+
function addOptionalClaimObligation(input, rows, external, outcomeKey, localClaim, fullClaim, applicabilityRef, matching, requiredPolarity) {
|
|
38
|
+
const surfaces = [...new Set(matching.map((proof) => proof.proof_surface))];
|
|
39
|
+
if (!surfaces.length)
|
|
40
|
+
surfaces.push("runtime_behavior");
|
|
41
|
+
const profiles = surfaces.map((surface) => claimSurfaceAuthorityProfile(input, outcomeKey, localClaim, fullClaim, applicabilityRef, matching, surface, requiredPolarity));
|
|
42
|
+
const selectedSurface = selectOptionalSurface(matching);
|
|
43
|
+
const selectedProfile = profiles.find((profile) => profile.surface === selectedSurface) ??
|
|
44
|
+
profiles[0];
|
|
45
|
+
const resolution = resolveObligationAuthority({
|
|
46
|
+
source_obligation_ref: selectedProfile.sourceObligationRef,
|
|
47
|
+
proof_surface_selection: "optional",
|
|
48
|
+
machine_candidates: profiles.flatMap((profile) => profile.machineCandidates),
|
|
49
|
+
external_candidates: profiles.flatMap((profile) => profile.externalCandidates),
|
|
50
|
+
});
|
|
51
|
+
const resolvedSurface = resolution.status === "machine_admitted"
|
|
52
|
+
? resolution.machine.proof_surface
|
|
53
|
+
: resolution.status === "external_candidate"
|
|
54
|
+
? resolution.external.proof_surface
|
|
55
|
+
: selectedProfile.surface;
|
|
56
|
+
if (resolution.status === "machine_admitted") {
|
|
57
|
+
const machineProfile = profiles.find((profile) => profile.surface === resolution.machine.proof_surface) ?? selectedProfile;
|
|
58
|
+
for (const profile of profiles)
|
|
59
|
+
for (const route of profile.externalCandidates) {
|
|
60
|
+
if (!route.expected_authority_ref)
|
|
61
|
+
continue;
|
|
62
|
+
external.push({
|
|
63
|
+
source_obligation_ref: profile.sourceObligationRef,
|
|
64
|
+
outcome_key: outcomeKey,
|
|
65
|
+
claim_ref: fullClaim,
|
|
66
|
+
local_claim_ref: localClaim,
|
|
67
|
+
applicability_ref: applicabilityRef,
|
|
68
|
+
fact_ref: null,
|
|
69
|
+
proof_ref: null,
|
|
70
|
+
method: route.method ?? profile.method,
|
|
71
|
+
proof_surface: route.proof_surface,
|
|
72
|
+
evidence_capabilities: [
|
|
73
|
+
...(route.required_evidence_capabilities ?? []),
|
|
74
|
+
].sort(),
|
|
75
|
+
expected_authority_ref: route.expected_authority_ref,
|
|
76
|
+
confirmation_ref: route.confirmation_ref,
|
|
77
|
+
required_polarity: requiredPolarity,
|
|
78
|
+
completion_role: "advisory",
|
|
79
|
+
acceptance_effect: "none",
|
|
80
|
+
semantic_identity: route.semantic_identity ?? null,
|
|
81
|
+
machine_obligation_ref: machineProfile.sourceObligationRef,
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
emitClaimAuthorityResolution(rows, external, outcomeKey, localClaim, fullClaim, applicabilityRef, profiles.find((profile) => profile.surface === resolvedSurface) ??
|
|
86
|
+
selectedProfile, resolution, requiredPolarity);
|
|
87
|
+
}
|
|
88
|
+
function addClaimSurfaceObligation(input, rows, external, outcomeKey, localClaim, fullClaim, applicabilityRef, matching, surface, requiredPolarity) {
|
|
89
|
+
const profile = claimSurfaceAuthorityProfile(input, outcomeKey, localClaim, fullClaim, applicabilityRef, matching, surface, requiredPolarity);
|
|
90
|
+
const resolution = resolveObligationAuthority({
|
|
91
|
+
source_obligation_ref: profile.sourceObligationRef,
|
|
92
|
+
proof_surface_selection: "required",
|
|
93
|
+
machine_candidates: profile.machineCandidates,
|
|
94
|
+
external_candidates: profile.externalCandidates,
|
|
95
|
+
});
|
|
96
|
+
emitClaimAuthorityResolution(rows, external, outcomeKey, localClaim, fullClaim, applicabilityRef, profile, resolution, requiredPolarity);
|
|
97
|
+
}
|
|
98
|
+
function claimSurfaceAuthorityProfile(input, outcomeKey, localClaim, fullClaim, applicabilityRef, matching, surface, requiredPolarity) {
|
|
99
|
+
const capabilityFloorSet = externalClaimCapabilityFloor(input.contract, outcomeKey, localClaim, surface, applicabilityRef);
|
|
100
|
+
for (const capability of claimSemanticCapabilityFloor(input.contract, input.manifest, outcomeKey, localClaim, applicabilityRef))
|
|
101
|
+
capabilityFloorSet.add(capability);
|
|
102
|
+
const capabilityFloor = [...capabilityFloorSet].sort();
|
|
103
|
+
const method = claimProofMethod(capabilityFloor);
|
|
104
|
+
const candidates = matching.filter((proof) => proof.proof_surface === surface);
|
|
105
|
+
const sourceObligationRef = claimObligationRef(fullClaim, applicabilityRef, surface);
|
|
106
|
+
const machineCandidates = candidates.flatMap((proof) => {
|
|
107
|
+
if (!proof.assertion_key)
|
|
108
|
+
return [];
|
|
109
|
+
const check = input.compiled_checks.find((item) => item.outcome_key === outcomeKey && item.key === proof.check_key);
|
|
110
|
+
if (!check)
|
|
111
|
+
return [];
|
|
112
|
+
const authority = objectiveMachineClaimActualAuthority(input.compiled_checks, outcomeKey, proof.check_key, proof.assertion_key, localClaim);
|
|
113
|
+
if (!authority)
|
|
114
|
+
return [];
|
|
115
|
+
const requiredCapabilities = check.required_evidence_capabilities[proof.assertion_key] ?? [];
|
|
116
|
+
const expectedAuthorityRef = check.expected_authority_refs?.[proof.assertion_key];
|
|
117
|
+
if (!expectedAuthorityRef)
|
|
118
|
+
return [];
|
|
119
|
+
return [
|
|
120
|
+
{
|
|
121
|
+
check_key: proof.check_key,
|
|
122
|
+
assertion_key: proof.assertion_key,
|
|
123
|
+
proof_surface: proof.proof_surface,
|
|
124
|
+
method,
|
|
125
|
+
required_evidence_capabilities: requiredCapabilities,
|
|
126
|
+
semantic_identity: objectiveClaimSemanticIdentity({
|
|
127
|
+
contract: input.contract,
|
|
128
|
+
outcome_key: outcomeKey,
|
|
129
|
+
claim_ref: fullClaim,
|
|
130
|
+
local_claim_ref: localClaim,
|
|
131
|
+
applicability_ref: applicabilityRef,
|
|
132
|
+
required_polarity: requiredPolarity,
|
|
133
|
+
expected_authority_ref: expectedAuthorityRef,
|
|
134
|
+
method,
|
|
135
|
+
required_evidence_capabilities: requiredCapabilities,
|
|
136
|
+
observation_authority: authority,
|
|
137
|
+
}),
|
|
138
|
+
},
|
|
139
|
+
];
|
|
140
|
+
});
|
|
141
|
+
const externalCandidates = candidates
|
|
142
|
+
.filter((proof) => proof.check_key.startsWith("EXTERNAL."))
|
|
143
|
+
.flatMap((proof) => {
|
|
144
|
+
const confirmationRef = proof.check_key.slice("EXTERNAL.".length);
|
|
145
|
+
const confirmation = input.contract.global.acceptance.external_confirmations.find((row) => row.key === confirmationRef);
|
|
146
|
+
if (!confirmation)
|
|
147
|
+
return [];
|
|
148
|
+
return (confirmation.obligations ?? [])
|
|
149
|
+
.filter((obligation) => obligation.claim_ref === fullClaim &&
|
|
150
|
+
obligation.applicability_ref === applicabilityRef &&
|
|
151
|
+
obligation.proof_surface === surface &&
|
|
152
|
+
obligation.fact_ref === null &&
|
|
153
|
+
obligation.proof_ref === null)
|
|
154
|
+
.map((obligation) => {
|
|
155
|
+
const authorityResolution = resolveObjectiveExternalClaimActualAuthority(input.compiled_checks, {
|
|
156
|
+
source_obligation_ref: sourceObligationRef,
|
|
157
|
+
outcome_key: outcomeKey,
|
|
158
|
+
claim_ref: fullClaim,
|
|
159
|
+
local_claim_ref: localClaim,
|
|
160
|
+
fact_ref: null,
|
|
161
|
+
proof_ref: null,
|
|
162
|
+
method: obligation.method,
|
|
163
|
+
proof_surface: obligation.proof_surface,
|
|
164
|
+
});
|
|
165
|
+
const authority = authorityResolution.status === "resolved"
|
|
166
|
+
? authorityResolution.authority
|
|
167
|
+
: null;
|
|
168
|
+
const compiledExpectedAuthorityRef = authorityResolution.status === "resolved"
|
|
169
|
+
? authorityResolution.expected_authority_ref
|
|
170
|
+
: null;
|
|
171
|
+
const expectedAuthorityMatches = compiledExpectedAuthorityRef !== null &&
|
|
172
|
+
obligation.expected_authority_ref === compiledExpectedAuthorityRef;
|
|
173
|
+
const objectiveActual = obligation.result_kind === "actual" &&
|
|
174
|
+
obligation.judgment_basis === undefined;
|
|
175
|
+
const semanticIdentity = authority && expectedAuthorityMatches
|
|
176
|
+
? objectiveClaimSemanticIdentity({
|
|
177
|
+
contract: input.contract,
|
|
178
|
+
outcome_key: outcomeKey,
|
|
179
|
+
claim_ref: fullClaim,
|
|
180
|
+
local_claim_ref: localClaim,
|
|
181
|
+
applicability_ref: applicabilityRef,
|
|
182
|
+
required_polarity: requiredPolarity,
|
|
183
|
+
expected_authority_ref: compiledExpectedAuthorityRef,
|
|
184
|
+
method: obligation.method,
|
|
185
|
+
required_evidence_capabilities: obligation.evidence_capabilities,
|
|
186
|
+
observation_authority: authority,
|
|
187
|
+
})
|
|
188
|
+
: null;
|
|
189
|
+
return {
|
|
190
|
+
confirmation_ref: confirmationRef,
|
|
191
|
+
obligation_key: obligation.key,
|
|
192
|
+
proof_surface: obligation.proof_surface,
|
|
193
|
+
method: obligation.method,
|
|
194
|
+
required_evidence_capabilities: [
|
|
195
|
+
...obligation.evidence_capabilities,
|
|
196
|
+
].sort(),
|
|
197
|
+
authority_ambiguous: authorityResolution.status === "ambiguous",
|
|
198
|
+
authority_unresolved: objectiveActual &&
|
|
199
|
+
(authorityResolution.status !== "resolved" ||
|
|
200
|
+
!expectedAuthorityMatches),
|
|
201
|
+
expected_authority_ref: objectiveActual
|
|
202
|
+
? (compiledExpectedAuthorityRef ?? undefined)
|
|
203
|
+
: obligation.expected_authority_ref,
|
|
204
|
+
semantic_identity: semanticIdentity,
|
|
205
|
+
advisory_to_machine: semanticIdentity !== null &&
|
|
206
|
+
expectedAuthorityMatches &&
|
|
207
|
+
objectiveActual &&
|
|
208
|
+
externalConfirmationSessionMatchesApplicability(input.contract, outcomeKey, applicabilityRef, confirmation),
|
|
209
|
+
};
|
|
210
|
+
});
|
|
211
|
+
});
|
|
212
|
+
return {
|
|
213
|
+
surface,
|
|
214
|
+
sourceObligationRef,
|
|
215
|
+
method,
|
|
216
|
+
capabilityFloor,
|
|
217
|
+
machineCandidates,
|
|
218
|
+
externalCandidates,
|
|
219
|
+
};
|
|
220
|
+
}
|
|
221
|
+
function emitClaimAuthorityResolution(rows, external, outcomeKey, localClaim, fullClaim, applicabilityRef, profile, resolution, requiredPolarity) {
|
|
222
|
+
const { sourceObligationRef, method, surface, capabilityFloor } = profile;
|
|
223
|
+
if (resolution.status === "external_candidate") {
|
|
224
|
+
const confirmationRef = resolution.external.confirmation_ref;
|
|
225
|
+
const expectedAuthorityRef = resolution.external.expected_authority_ref;
|
|
226
|
+
if (!expectedAuthorityRef) {
|
|
227
|
+
rows.push(pendingExternalRow(sourceObligationRef, outcomeKey, fullClaim, applicabilityRef, null, null, method, resolution.external.proof_surface, capabilityFloor, confirmationRef));
|
|
228
|
+
return;
|
|
229
|
+
}
|
|
230
|
+
external.push({
|
|
231
|
+
source_obligation_ref: sourceObligationRef,
|
|
232
|
+
outcome_key: outcomeKey,
|
|
233
|
+
claim_ref: fullClaim,
|
|
234
|
+
local_claim_ref: localClaim,
|
|
235
|
+
applicability_ref: applicabilityRef,
|
|
236
|
+
fact_ref: null,
|
|
237
|
+
proof_ref: null,
|
|
238
|
+
method,
|
|
239
|
+
proof_surface: resolution.external.proof_surface,
|
|
240
|
+
evidence_capabilities: capabilityFloor,
|
|
241
|
+
expected_authority_ref: expectedAuthorityRef,
|
|
242
|
+
confirmation_ref: confirmationRef,
|
|
243
|
+
required_polarity: requiredPolarity,
|
|
244
|
+
completion_role: "blocking",
|
|
245
|
+
acceptance_effect: "required",
|
|
246
|
+
semantic_identity: resolution.external.semantic_identity ?? null,
|
|
247
|
+
machine_obligation_ref: null,
|
|
248
|
+
});
|
|
249
|
+
rows.push(pendingExternalRow(sourceObligationRef, outcomeKey, fullClaim, applicabilityRef, null, null, method, resolution.external.proof_surface, capabilityFloor, confirmationRef));
|
|
250
|
+
return;
|
|
251
|
+
}
|
|
252
|
+
if (resolution.status === "machine_admitted") {
|
|
253
|
+
const machine = resolution.machine;
|
|
254
|
+
rows.push({
|
|
255
|
+
obligation_ref: sourceObligationRef,
|
|
256
|
+
source_obligation_ref: sourceObligationRef,
|
|
257
|
+
outcome_key: outcomeKey,
|
|
258
|
+
claim_ref: fullClaim,
|
|
259
|
+
applicability_ref: applicabilityRef,
|
|
260
|
+
fact_ref: null,
|
|
261
|
+
proof_ref: null,
|
|
262
|
+
method,
|
|
263
|
+
proof_surface: machine.proof_surface,
|
|
264
|
+
required_evidence_capabilities: machine.required_evidence_capabilities,
|
|
265
|
+
authority: "machine",
|
|
266
|
+
confirmation_ref: null,
|
|
267
|
+
status: "machine_admitted",
|
|
268
|
+
reason: null,
|
|
269
|
+
session_group: null,
|
|
270
|
+
});
|
|
271
|
+
return;
|
|
272
|
+
}
|
|
273
|
+
rows.push({
|
|
274
|
+
...pendingExternalRow(sourceObligationRef, outcomeKey, fullClaim, applicabilityRef, null, null, method, surface, capabilityFloor, null),
|
|
275
|
+
authority: "none",
|
|
276
|
+
status: "unreachable",
|
|
277
|
+
reason: resolution.reason,
|
|
278
|
+
});
|
|
279
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import type { AcceptanceObligationReachabilityV1, AcceptanceReachabilityInputV1, ExpectedExternalObligation } from "./long-task-acceptance-reachability-types.js";
|
|
2
|
+
export declare function compileDesignFactReachability(input: AcceptanceReachabilityInputV1, rows: AcceptanceObligationReachabilityV1[], external: ExpectedExternalObligation[]): void;
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { designFactObligationDescriptors, externalDesignObligationMatches, } from "./long-task-design-obligation.js";
|
|
2
|
+
import { pendingExternalRow } from "./long-task-acceptance-reachability-helpers.js";
|
|
3
|
+
import { resolveObligationAuthority } from "./long-task-obligation-authority-resolution.js";
|
|
4
|
+
export function compileDesignFactReachability(input, rows, external) {
|
|
5
|
+
const seen = new Set();
|
|
6
|
+
for (const descriptor of designFactObligationDescriptors(input.contract)) {
|
|
7
|
+
if (seen.has(descriptor.source_obligation_ref))
|
|
8
|
+
throw new Error(`design_obligation_identity_duplicate:${descriptor.source_obligation_ref}`);
|
|
9
|
+
seen.add(descriptor.source_obligation_ref);
|
|
10
|
+
const machineCandidates = admittedDesignMachineRoutes(input, descriptor);
|
|
11
|
+
const externalCandidates = input.contract.global.acceptance.external_confirmations
|
|
12
|
+
.filter((confirmation) => confirmation.blocks_target &&
|
|
13
|
+
confirmation.obligations?.some((obligation) => externalDesignObligationMatches(obligation, descriptor)))
|
|
14
|
+
.map((confirmation) => ({
|
|
15
|
+
confirmation_ref: confirmation.key,
|
|
16
|
+
proof_surface: descriptor.proof_surface,
|
|
17
|
+
method: descriptor.method,
|
|
18
|
+
required_evidence_capabilities: descriptor.evidence_capabilities,
|
|
19
|
+
}));
|
|
20
|
+
const resolution = resolveObligationAuthority({
|
|
21
|
+
source_obligation_ref: descriptor.source_obligation_ref,
|
|
22
|
+
proof_surface_selection: "required",
|
|
23
|
+
machine_candidates: machineCandidates,
|
|
24
|
+
external_candidates: externalCandidates,
|
|
25
|
+
});
|
|
26
|
+
if (resolution.status === "machine_admitted") {
|
|
27
|
+
rows.push({
|
|
28
|
+
obligation_ref: descriptor.source_obligation_ref,
|
|
29
|
+
source_obligation_ref: descriptor.source_obligation_ref,
|
|
30
|
+
outcome_key: descriptor.outcome_key,
|
|
31
|
+
claim_ref: descriptor.claim_ref,
|
|
32
|
+
applicability_ref: descriptor.applicability_ref,
|
|
33
|
+
fact_ref: descriptor.fact_ref,
|
|
34
|
+
proof_ref: descriptor.source_obligation_ref,
|
|
35
|
+
method: descriptor.method,
|
|
36
|
+
proof_surface: descriptor.proof_surface,
|
|
37
|
+
required_evidence_capabilities: descriptor.evidence_capabilities,
|
|
38
|
+
authority: "machine",
|
|
39
|
+
confirmation_ref: null,
|
|
40
|
+
status: "machine_admitted",
|
|
41
|
+
reason: null,
|
|
42
|
+
session_group: null,
|
|
43
|
+
});
|
|
44
|
+
continue;
|
|
45
|
+
}
|
|
46
|
+
if (resolution.status === "external_candidate") {
|
|
47
|
+
const expected = {
|
|
48
|
+
source_obligation_ref: descriptor.source_obligation_ref,
|
|
49
|
+
outcome_key: descriptor.outcome_key,
|
|
50
|
+
claim_ref: descriptor.claim_ref,
|
|
51
|
+
local_claim_ref: descriptor.local_claim_ref,
|
|
52
|
+
applicability_ref: descriptor.applicability_ref,
|
|
53
|
+
fact_ref: descriptor.fact_ref,
|
|
54
|
+
proof_ref: descriptor.source_obligation_ref,
|
|
55
|
+
method: descriptor.method,
|
|
56
|
+
proof_surface: descriptor.proof_surface,
|
|
57
|
+
evidence_capabilities: descriptor.evidence_capabilities,
|
|
58
|
+
expected_authority_ref: descriptor.expected_authority_ref,
|
|
59
|
+
confirmation_ref: resolution.external.confirmation_ref,
|
|
60
|
+
required_polarity: "positive",
|
|
61
|
+
completion_role: "blocking",
|
|
62
|
+
acceptance_effect: "required",
|
|
63
|
+
semantic_identity: null,
|
|
64
|
+
machine_obligation_ref: null,
|
|
65
|
+
};
|
|
66
|
+
external.push(expected);
|
|
67
|
+
rows.push(pendingExternalRow(descriptor.source_obligation_ref, descriptor.outcome_key, descriptor.claim_ref, descriptor.applicability_ref, descriptor.fact_ref, descriptor.source_obligation_ref, descriptor.method, descriptor.proof_surface, descriptor.evidence_capabilities, expected.confirmation_ref));
|
|
68
|
+
continue;
|
|
69
|
+
}
|
|
70
|
+
rows.push({
|
|
71
|
+
...pendingExternalRow(descriptor.source_obligation_ref, descriptor.outcome_key, descriptor.claim_ref, descriptor.applicability_ref, descriptor.fact_ref, descriptor.source_obligation_ref, descriptor.method, descriptor.proof_surface, descriptor.evidence_capabilities, null),
|
|
72
|
+
authority: "none",
|
|
73
|
+
reason: resolution.reason === "no_admitted_proof_route"
|
|
74
|
+
? "machine_observer_not_admitted"
|
|
75
|
+
: resolution.reason,
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
function admittedDesignMachineRoutes(input, descriptor) {
|
|
80
|
+
return input.compiled_checks.flatMap((check) => check.outcome_key === descriptor.outcome_key &&
|
|
81
|
+
check.key === descriptor.check_key &&
|
|
82
|
+
check.completion_role === "semantic" &&
|
|
83
|
+
check.observation_authorities.some((authority) => authority.obligation_ref === descriptor.source_obligation_ref &&
|
|
84
|
+
authority.assertion_ref === descriptor.assertion_ref &&
|
|
85
|
+
authority.authority !== "external_confirmation")
|
|
86
|
+
? [
|
|
87
|
+
{
|
|
88
|
+
check_key: check.key,
|
|
89
|
+
assertion_key: descriptor.assertion_ref,
|
|
90
|
+
proof_surface: descriptor.proof_surface,
|
|
91
|
+
method: descriptor.method,
|
|
92
|
+
required_evidence_capabilities: descriptor.evidence_capabilities,
|
|
93
|
+
},
|
|
94
|
+
]
|
|
95
|
+
: []);
|
|
96
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { DeliveryContractV2 } from "./long-task-delivery-types.js";
|
|
2
|
+
import type { CompiledCheckV2 } from "./long-task-delivery-types.js";
|
|
3
|
+
import type { SemanticFactManifestV1 } from "./semantic-fact-types.js";
|
|
4
|
+
import type { AcceptanceObligationReachabilityV1, ExpectedExternalObligation } from "./long-task-acceptance-reachability-types.js";
|
|
5
|
+
export declare function validateExternalDeclarations(contract: DeliveryContractV2, manifest: SemanticFactManifestV1, expected: ExpectedExternalObligation[], compiledChecks: readonly CompiledCheckV2[]): Map<string, {
|
|
6
|
+
obligation_key: string;
|
|
7
|
+
session_group: string;
|
|
8
|
+
}>;
|
|
9
|
+
export declare function addUnboundBlockingConfirmationRows(contract: DeliveryContractV2, rows: AcceptanceObligationReachabilityV1[], expected: ExpectedExternalObligation[]): void;
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import { canonicalValueJson, sha256Hex } from "./strict-codec.js";
|
|
2
|
+
import { effectiveExternalRouteRef, externalConfirmationSessionMatchesApplicability, objectiveExternalActualAdmitted, sameSet, sourceBackedExternalJudgmentAdmitted, } from "./long-task-acceptance-reachability-helpers.js";
|
|
3
|
+
export function validateExternalDeclarations(contract, manifest, expected, compiledChecks) {
|
|
4
|
+
const result = new Map();
|
|
5
|
+
for (const confirmation of contract.global.acceptance
|
|
6
|
+
.external_confirmations) {
|
|
7
|
+
const expectedRows = expected.filter((row) => row.confirmation_ref === confirmation.key);
|
|
8
|
+
if (!expectedRows.length)
|
|
9
|
+
continue;
|
|
10
|
+
const obligations = confirmation.obligations ?? [];
|
|
11
|
+
if (!confirmationShapeComplete(confirmation, obligations.length, expectedRows))
|
|
12
|
+
continue;
|
|
13
|
+
if (!confirmationSetsMatch(confirmation, obligations, expectedRows))
|
|
14
|
+
continue;
|
|
15
|
+
const matched = matchConfirmationRows(contract, manifest, compiledChecks, confirmation, obligations, expectedRows);
|
|
16
|
+
if (!matched)
|
|
17
|
+
continue;
|
|
18
|
+
const sessionGroup = sha256Hex(canonicalValueJson({
|
|
19
|
+
owner: confirmation.owner,
|
|
20
|
+
actor: confirmation.actor,
|
|
21
|
+
target_ref: confirmation.target_ref,
|
|
22
|
+
environment_identity: confirmation.environment_identity,
|
|
23
|
+
scenario: confirmation.scenario,
|
|
24
|
+
evidence_requirements: confirmation.evidence_requirements,
|
|
25
|
+
}));
|
|
26
|
+
for (const match of matched)
|
|
27
|
+
result.set(effectiveExternalRouteRef(confirmation.key, match.source_obligation_ref), {
|
|
28
|
+
obligation_key: match.obligation_key,
|
|
29
|
+
session_group: sessionGroup,
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
return result;
|
|
33
|
+
}
|
|
34
|
+
export function addUnboundBlockingConfirmationRows(contract, rows, expected) {
|
|
35
|
+
for (const confirmation of contract.global.acceptance
|
|
36
|
+
.external_confirmations) {
|
|
37
|
+
if (!confirmation.blocks_target ||
|
|
38
|
+
confirmationFullyProjected(confirmation, expected))
|
|
39
|
+
continue;
|
|
40
|
+
const claimRef = confirmation.impact_claims[0] ?? "GLOBAL.unbound";
|
|
41
|
+
const outcomeKey = contract.outcomes.find((outcome) => claimRef === outcome.key || claimRef.startsWith(`${outcome.key}.`))?.key ?? null;
|
|
42
|
+
rows.push({
|
|
43
|
+
obligation_ref: `external-confirmation:${confirmation.key}`,
|
|
44
|
+
source_obligation_ref: `external-confirmation:${confirmation.key}`,
|
|
45
|
+
outcome_key: outcomeKey,
|
|
46
|
+
claim_ref: claimRef,
|
|
47
|
+
applicability_ref: "unbound",
|
|
48
|
+
fact_ref: null,
|
|
49
|
+
proof_ref: null,
|
|
50
|
+
method: "unbound",
|
|
51
|
+
proof_surface: "runtime_behavior",
|
|
52
|
+
required_evidence_capabilities: [],
|
|
53
|
+
authority: "external_confirmation",
|
|
54
|
+
confirmation_ref: confirmation.key,
|
|
55
|
+
status: "unreachable",
|
|
56
|
+
reason: "blocking_confirmation_has_no_exact_proof_obligations",
|
|
57
|
+
session_group: null,
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
function confirmationFullyProjected(confirmation, expected) {
|
|
62
|
+
const obligations = confirmation.obligations ?? [];
|
|
63
|
+
if (!obligations.length)
|
|
64
|
+
return false;
|
|
65
|
+
const expectedRows = expected.filter((row) => row.confirmation_ref === confirmation.key);
|
|
66
|
+
return (expectedRows.length === obligations.length &&
|
|
67
|
+
new Set(obligations.map((obligation) => obligation.key)).size ===
|
|
68
|
+
obligations.length &&
|
|
69
|
+
sameSet(confirmation.impact_claims, [
|
|
70
|
+
...new Set(obligations.map((obligation) => obligation.claim_ref)),
|
|
71
|
+
]));
|
|
72
|
+
}
|
|
73
|
+
function confirmationShapeComplete(confirmation, obligationCount, expectedRows) {
|
|
74
|
+
const requiresBlockingAssurance = expectedRows.some((row) => row.completion_role === "blocking");
|
|
75
|
+
return Boolean(confirmation.actor &&
|
|
76
|
+
(!requiresBlockingAssurance ||
|
|
77
|
+
confirmation.actor.identity_assurance?.scheme === "ed25519") &&
|
|
78
|
+
confirmation.target_ref &&
|
|
79
|
+
confirmation.environment_identity &&
|
|
80
|
+
confirmation.scenario?.given.length &&
|
|
81
|
+
confirmation.scenario.when.length &&
|
|
82
|
+
confirmation.evidence_requirements?.length &&
|
|
83
|
+
obligationCount);
|
|
84
|
+
}
|
|
85
|
+
function confirmationSetsMatch(confirmation, obligations, expectedRows) {
|
|
86
|
+
return (new Set(obligations.map((row) => row.key)).size === obligations.length &&
|
|
87
|
+
sameSet(confirmation.impact_claims, [
|
|
88
|
+
...new Set(obligations.map((row) => row.claim_ref)),
|
|
89
|
+
]) &&
|
|
90
|
+
obligations.length === expectedRows.length);
|
|
91
|
+
}
|
|
92
|
+
function matchConfirmationRows(contract, manifest, compiledChecks, confirmation, obligations, expectedRows) {
|
|
93
|
+
const used = new Set();
|
|
94
|
+
const matched = [];
|
|
95
|
+
for (const expectedRow of expectedRows) {
|
|
96
|
+
const candidates = obligations.filter((actual) => externalObligationMatches(actual, expectedRow));
|
|
97
|
+
const actual = candidates[0];
|
|
98
|
+
if (candidates.length !== 1 || !actual || used.has(actual.key))
|
|
99
|
+
return null;
|
|
100
|
+
const sessionMatches = externalConfirmationSessionMatchesApplicability(contract, expectedRow.outcome_key, expectedRow.applicability_ref, confirmation);
|
|
101
|
+
const resultKindAdmitted = actual.result_kind === "judgment"
|
|
102
|
+
? sourceBackedExternalJudgmentAdmitted(contract, manifest, expectedRow, actual.judgment_basis, confirmation.actor?.authority_kind)
|
|
103
|
+
: objectiveExternalActualAdmitted(contract, manifest, expectedRow, compiledChecks) && actual.judgment_basis === undefined;
|
|
104
|
+
if (!sessionMatches || !resultKindAdmitted)
|
|
105
|
+
return null;
|
|
106
|
+
used.add(actual.key);
|
|
107
|
+
matched.push({
|
|
108
|
+
source_obligation_ref: expectedRow.source_obligation_ref,
|
|
109
|
+
obligation_key: actual.key,
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
return used.size === obligations.length ? matched : null;
|
|
113
|
+
}
|
|
114
|
+
function externalObligationMatches(actual, expected) {
|
|
115
|
+
return (actual.claim_ref === expected.claim_ref &&
|
|
116
|
+
actual.applicability_ref === expected.applicability_ref &&
|
|
117
|
+
actual.fact_ref === expected.fact_ref &&
|
|
118
|
+
actual.proof_ref === expected.proof_ref &&
|
|
119
|
+
actual.method === expected.method &&
|
|
120
|
+
actual.proof_surface === expected.proof_surface &&
|
|
121
|
+
sameSet(actual.evidence_capabilities, expected.evidence_capabilities) &&
|
|
122
|
+
actual.expected_authority_ref === expected.expected_authority_ref);
|
|
123
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import type { ClaimApplicabilityV2, CompiledCheckV2, CompiledObservationAuthorityV2, DeliveryCheckV2, DeliveryContractV2, EvidenceCapabilityV2, ProofSurface } from "./long-task-delivery-types.js";
|
|
2
|
+
import type { AcceptanceObligationReachabilityV1, ExpectedExternalObligation } from "./long-task-acceptance-reachability-types.js";
|
|
3
|
+
import type { SemanticFactManifestV1 } from "./semantic-fact-types.js";
|
|
4
|
+
export declare function claimProofMethod(capabilities: readonly EvidenceCapabilityV2[]): string;
|
|
5
|
+
export declare function claimObligationRef(fullClaim: string, applicabilityRef: string, surface: ProofSurface): string;
|
|
6
|
+
export declare function effectiveExternalRouteRef(confirmationRef: string, sourceObligationRef: string): string;
|
|
7
|
+
export interface MachineAuthorizedAssertionQueryV1 {
|
|
8
|
+
authority_scope: "ordinary_claim" | "fact_bound" | "any";
|
|
9
|
+
outcome_key?: string | null;
|
|
10
|
+
check_key?: string;
|
|
11
|
+
assertion_key?: string;
|
|
12
|
+
local_claim_ref?: string;
|
|
13
|
+
applicability_ref?: string;
|
|
14
|
+
target_ref?: string;
|
|
15
|
+
check_journey_role?: ClaimApplicabilityV2["journey_role"];
|
|
16
|
+
proof_surface?: ProofSurface;
|
|
17
|
+
polarity?: "positive" | "negative";
|
|
18
|
+
required_evidence_capability?: EvidenceCapabilityV2;
|
|
19
|
+
}
|
|
20
|
+
export interface MachineAuthorizedAssertionV1 {
|
|
21
|
+
check: CompiledCheckV2;
|
|
22
|
+
assertion: CompiledCheckV2["positive_assertions"][number];
|
|
23
|
+
authority: CompiledObservationAuthorityV2;
|
|
24
|
+
polarity: "positive" | "negative";
|
|
25
|
+
}
|
|
26
|
+
export declare function machineAuthorizedAssertions(checks: readonly CompiledCheckV2[], query: MachineAuthorizedAssertionQueryV1): MachineAuthorizedAssertionV1[];
|
|
27
|
+
export declare function machineAuthorizedAssertionExists(checks: readonly CompiledCheckV2[], query: MachineAuthorizedAssertionQueryV1): boolean;
|
|
28
|
+
export declare function machineProofAdmitted(checks: CompiledCheckV2[], outcomeKey: string | null, checkKey: string, assertionKey: string, localClaim: string): boolean;
|
|
29
|
+
export declare function objectiveMachineClaimActualAuthority(checks: readonly CompiledCheckV2[], outcomeKey: string | null, checkKey: string, assertionKey: string, localClaim: string): CompiledObservationAuthorityV2 | null;
|
|
30
|
+
export declare function pendingExternalRow(sourceObligationRef: string, outcomeKey: string | null, claimRef: string, applicabilityRef: string, factRef: string | null, proofRef: string | null, method: string, proofSurface: ProofSurface, capabilities: EvidenceCapabilityV2[], confirmationRef: string | null): AcceptanceObligationReachabilityV1;
|
|
31
|
+
export declare function selectOptionalSurface(proofs: Array<{
|
|
32
|
+
proof_surface: ProofSurface;
|
|
33
|
+
check_key: string;
|
|
34
|
+
}>): ProofSurface;
|
|
35
|
+
export declare function applicabilityProfile(contract: DeliveryContractV2, outcomeKey: string | null, applicabilityRef: string): ClaimApplicabilityV2 | null;
|
|
36
|
+
export declare function externalConfirmationSessionMatchesApplicability(contract: DeliveryContractV2, outcomeKey: string | null, applicabilityRef: string, confirmation: DeliveryContractV2["global"]["acceptance"]["external_confirmations"][number]): boolean;
|
|
37
|
+
export declare function objectiveExternalActualAdmitted(contract: DeliveryContractV2, manifest: SemanticFactManifestV1, expected: ExpectedExternalObligation, compiledChecks?: readonly CompiledCheckV2[]): boolean;
|
|
38
|
+
export declare function exactExternalClaimActualObligationRefsByAssertion(contract: DeliveryContractV2, outcomeKey: string | null, check: DeliveryCheckV2, expectedAuthorityRefs: Readonly<Record<string, string>>): ReadonlyMap<string, string>;
|
|
39
|
+
export declare function objectiveExternalClaimActualAuthority(compiledChecks: readonly CompiledCheckV2[], expected: Pick<ExpectedExternalObligation, "source_obligation_ref" | "outcome_key" | "claim_ref" | "fact_ref" | "proof_ref" | "method" | "proof_surface"> & {
|
|
40
|
+
local_claim_ref?: string;
|
|
41
|
+
}): CompiledObservationAuthorityV2 | null;
|
|
42
|
+
export type ObjectiveExternalClaimActualAuthorityResolutionV1 = {
|
|
43
|
+
status: "resolved";
|
|
44
|
+
check: CompiledCheckV2;
|
|
45
|
+
authority: CompiledObservationAuthorityV2;
|
|
46
|
+
expected_authority_ref: string;
|
|
47
|
+
} | {
|
|
48
|
+
status: "missing";
|
|
49
|
+
} | {
|
|
50
|
+
status: "ambiguous";
|
|
51
|
+
};
|
|
52
|
+
export declare function resolveObjectiveExternalClaimActualAuthority(compiledChecks: readonly CompiledCheckV2[], expected: Pick<ExpectedExternalObligation, "source_obligation_ref" | "outcome_key" | "claim_ref" | "fact_ref" | "proof_ref" | "method" | "proof_surface"> & {
|
|
53
|
+
local_claim_ref?: string;
|
|
54
|
+
}): ObjectiveExternalClaimActualAuthorityResolutionV1;
|
|
55
|
+
export declare function admittedObjectiveExternalComparator(manifest: SemanticFactManifestV1, factRef: string, proofRef: string): "exact_value" | "population_set_equal" | null;
|
|
56
|
+
export declare function objectivePopulationSet(value: unknown): value is string[];
|
|
57
|
+
type JudgmentExpectedObligation = Pick<ExpectedExternalObligation, "claim_ref" | "applicability_ref" | "fact_ref" | "proof_ref" | "method" | "proof_surface"> & {
|
|
58
|
+
confirmation_ref: string | null;
|
|
59
|
+
evidence_capabilities?: readonly EvidenceCapabilityV2[];
|
|
60
|
+
required_evidence_capabilities?: readonly EvidenceCapabilityV2[];
|
|
61
|
+
};
|
|
62
|
+
export declare function sourceBackedExternalJudgmentAdmitted(contract: Pick<DeliveryContractV2, "source_claims" | "global">, manifest: SemanticFactManifestV1, expected: JudgmentExpectedObligation, basis: NonNullable<DeliveryContractV2["global"]["acceptance"]["external_confirmations"][number]["obligations"]>[number]["judgment_basis"] | undefined, actorKind: "human" | "expert" | "external_system" | undefined): boolean;
|
|
63
|
+
export declare function sameSet(left: readonly string[], right: readonly string[]): boolean;
|
|
64
|
+
export {};
|