project-tiny-context-harness 0.8.11 → 0.8.13
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 -21
- package/README.md +514 -472
- package/assets/README.md +803 -749
- package/assets/README.zh-CN.md +468 -431
- package/assets/agents/.gitkeep +1 -1
- package/assets/agents/AGENTS_CORE.md +22 -24
- package/assets/agents/long-task-implementation.toml +15 -0
- package/assets/context_templates/architecture.md +18 -18
- package/assets/context_templates/area.md +30 -30
- package/assets/context_templates/context.toml +24 -24
- package/assets/context_templates/deployment.md +35 -35
- package/assets/context_templates/global.md +56 -56
- package/assets/context_templates/product-surface-contract.md +70 -70
- package/assets/context_templates/screen-contract.md +189 -189
- package/assets/context_templates/verification.md +25 -25
- package/assets/github/.gitkeep +1 -1
- package/assets/github/harness.yml +39 -39
- package/assets/make/.gitkeep +1 -1
- package/assets/make/ty-context.mk +48 -48
- package/assets/skills/context_development_engineer/SKILL.md +72 -185
- package/assets/skills/context_full_project_export/SKILL.md +28 -28
- package/assets/skills/context_harness_upgrade/SKILL.md +60 -60
- package/assets/skills/context_product_plan/SKILL.md +35 -101
- package/assets/skills/context_surface_contract/SKILL.md +194 -191
- package/assets/skills/context_uiux_design/SKILL.md +49 -172
- package/assets/skills/design-resource-authoring/SKILL.md +54 -88
- package/assets/skills/design-resource-authoring/references/downstream-handoff.md +51 -163
- package/assets/skills/design-resource-authoring/references/formal-selected-web-app-handoff.md +96 -0
- package/assets/skills/design-resource-authoring/references/open-design-provider.md +140 -120
- package/assets/skills/design-resource-authoring/references/recovery-and-writeback.md +199 -0
- package/assets/skills/design-resource-authoring/references/resource-selection.md +158 -181
- package/assets/skills/design-system-authoring/SKILL.md +57 -57
- package/assets/skills/design-system-authoring/agents/openai.yaml +6 -6
- package/assets/skills/design-system-authoring/references/authority-adoption.md +48 -48
- package/assets/skills/design-system-authoring/references/open-design-design-system-provider.md +110 -110
- package/assets/skills/long-task-workflow/SKILL.md +71 -106
- package/assets/skills/long-task-workflow/agents/openai.yaml +1 -1
- package/assets/skills/long-task-workflow/references/authority-lifecycle.md +71 -69
- package/assets/skills/long-task-workflow/references/contract-authoring.md +110 -101
- package/assets/skills/long-task-workflow/references/evidence-design.md +99 -78
- package/assets/skills/long-task-workflow/references/source-authoring.md +90 -90
- package/assets/tools/validate_context.py +442 -442
- package/dist/commands/design-resource-recovery.d.ts +1 -0
- package/dist/commands/design-resource-recovery.js +152 -0
- package/dist/commands/design-resource.js +29 -3
- package/dist/commands/enable.js +2 -0
- package/dist/commands/index.js +2 -2
- package/dist/commands/long-task-revision.js +8 -7
- package/dist/commands/sync.js +2 -0
- package/dist/index.d.ts +3 -3
- package/dist/index.js +2 -0
- package/dist/lib/compact-authoring-support.d.ts +22 -0
- package/dist/lib/compact-authoring-support.js +143 -0
- package/dist/lib/compact-shared-structure-authoring.d.ts +5 -0
- package/dist/lib/compact-shared-structure-authoring.js +9 -0
- package/dist/lib/compact-shared-structure-types.d.ts +61 -0
- package/dist/lib/compact-shared-structure-types.js +1 -0
- package/dist/lib/compact-shared-structure-validation.d.ts +2 -0
- package/dist/lib/compact-shared-structure-validation.js +159 -0
- package/dist/lib/compact-shared-structures.d.ts +3 -0
- package/dist/lib/compact-shared-structures.js +204 -0
- package/dist/lib/design-resource-fact-enums.d.ts +4 -0
- package/dist/lib/design-resource-fact-enums.js +12 -0
- package/dist/lib/design-resource-fact-manifest-shape-evidence.js +2 -2
- package/dist/lib/design-resource-fact-policy.d.ts +2 -2
- package/dist/lib/design-resource-fact-types.d.ts +2 -2
- package/dist/lib/design-resource-handoff-bundle-draft.js +4 -2
- package/dist/lib/design-resource-handoff-input-types.d.ts +3 -0
- package/dist/lib/design-resource-handoff-parser.d.ts +2 -2
- package/dist/lib/design-resource-handoff-parser.js +2 -2
- package/dist/lib/design-resource-handoff-shape.d.ts +2 -0
- package/dist/lib/design-resource-handoff-shape.js +10 -0
- package/dist/lib/design-resource-handoff-snapshot.js +4 -0
- package/dist/lib/design-resource-handoff-validation.d.ts +4 -1
- package/dist/lib/design-resource-handoff-validation.js +11 -0
- package/dist/lib/design-resource-handoff-web-dependency-validation.d.ts +4 -2
- package/dist/lib/design-resource-reconciliation-codec.d.ts +2 -0
- package/dist/lib/design-resource-reconciliation-codec.js +174 -0
- package/dist/lib/design-resource-reconciliation-types.d.ts +62 -0
- package/dist/lib/design-resource-reconciliation-types.js +1 -0
- package/dist/lib/design-resource-reconciliation.d.ts +3 -0
- package/dist/lib/design-resource-reconciliation.js +224 -0
- package/dist/lib/design-resource-recovery-authority-policy.d.ts +8 -0
- package/dist/lib/design-resource-recovery-authority-policy.js +123 -0
- package/dist/lib/design-resource-recovery-catalog-resources.d.ts +6 -0
- package/dist/lib/design-resource-recovery-catalog-resources.js +121 -0
- package/dist/lib/design-resource-recovery-catalog-shape.d.ts +3 -0
- package/dist/lib/design-resource-recovery-catalog-shape.js +104 -0
- package/dist/lib/design-resource-recovery-catalog.d.ts +9 -0
- package/dist/lib/design-resource-recovery-catalog.js +103 -0
- package/dist/lib/design-resource-recovery-cleanup.d.ts +2 -0
- package/dist/lib/design-resource-recovery-cleanup.js +11 -0
- package/dist/lib/design-resource-recovery-codec-primitives.d.ts +19 -0
- package/dist/lib/design-resource-recovery-codec-primitives.js +92 -0
- package/dist/lib/design-resource-recovery-codec.d.ts +4 -0
- package/dist/lib/design-resource-recovery-codec.js +93 -0
- package/dist/lib/design-resource-recovery-current.d.ts +9 -0
- package/dist/lib/design-resource-recovery-current.js +41 -0
- package/dist/lib/design-resource-recovery-delta-policy.d.ts +5 -0
- package/dist/lib/design-resource-recovery-delta-policy.js +108 -0
- package/dist/lib/design-resource-recovery-files.d.ts +37 -0
- package/dist/lib/design-resource-recovery-files.js +204 -0
- package/dist/lib/design-resource-recovery-final-disposition-shape.d.ts +2 -0
- package/dist/lib/design-resource-recovery-final-disposition-shape.js +47 -0
- package/dist/lib/design-resource-recovery-patch-types.d.ts +54 -0
- package/dist/lib/design-resource-recovery-patch-types.js +1 -0
- package/dist/lib/design-resource-recovery-replay.d.ts +7 -0
- package/dist/lib/design-resource-recovery-replay.js +112 -0
- package/dist/lib/design-resource-recovery-repository-bindings.d.ts +9 -0
- package/dist/lib/design-resource-recovery-repository-bindings.js +49 -0
- package/dist/lib/design-resource-recovery-schema.d.ts +5 -0
- package/dist/lib/design-resource-recovery-schema.js +5 -0
- package/dist/lib/design-resource-recovery-shape.d.ts +10 -0
- package/dist/lib/design-resource-recovery-shape.js +184 -0
- package/dist/lib/design-resource-recovery-source-authority.d.ts +5 -0
- package/dist/lib/design-resource-recovery-source-authority.js +219 -0
- package/dist/lib/design-resource-recovery-text.d.ts +17 -0
- package/dist/lib/design-resource-recovery-text.js +186 -0
- package/dist/lib/design-resource-recovery-types.d.ts +197 -0
- package/dist/lib/design-resource-recovery-types.js +1 -0
- package/dist/lib/design-resource-recovery-writeback-policy.d.ts +5 -0
- package/dist/lib/design-resource-recovery-writeback-policy.js +326 -0
- package/dist/lib/design-resource-recovery-writeback-shape.d.ts +6 -0
- package/dist/lib/design-resource-recovery-writeback-shape.js +155 -0
- package/dist/lib/design-resource-recovery.d.ts +44 -0
- package/dist/lib/design-resource-recovery.js +216 -0
- package/dist/lib/design-resource-symbolic-applicability-authority.d.ts +7 -0
- package/dist/lib/design-resource-symbolic-applicability-authority.js +19 -0
- package/dist/lib/design-resource-symbolic-applicability-policy.d.ts +12 -0
- package/dist/lib/design-resource-symbolic-applicability-policy.js +79 -0
- package/dist/lib/design-resource-symbolic-applicability-profiles.d.ts +8 -0
- package/dist/lib/design-resource-symbolic-applicability-profiles.js +55 -0
- package/dist/lib/design-resource-symbolic-applicability-shape.d.ts +2 -0
- package/dist/lib/design-resource-symbolic-applicability-shape.js +76 -0
- package/dist/lib/design-resource-symbolic-applicability-validation.d.ts +7 -0
- package/dist/lib/design-resource-symbolic-applicability-validation.js +128 -0
- package/dist/lib/design-resource-symbolic-compilation.d.ts +3 -0
- package/dist/lib/design-resource-symbolic-compilation.js +13 -0
- package/dist/lib/design-resource-symbolic-denotation.d.ts +3 -0
- package/dist/lib/design-resource-symbolic-denotation.js +167 -0
- package/dist/lib/design-resource-symbolic-disposition-validation.d.ts +4 -0
- package/dist/lib/design-resource-symbolic-disposition-validation.js +28 -0
- package/dist/lib/design-resource-symbolic-fact-policy.d.ts +12 -0
- package/dist/lib/design-resource-symbolic-fact-policy.js +12 -0
- package/dist/lib/design-resource-symbolic-fact-shape.d.ts +3 -0
- package/dist/lib/design-resource-symbolic-fact-shape.js +138 -0
- package/dist/lib/design-resource-symbolic-fact-types.d.ts +213 -0
- package/dist/lib/design-resource-symbolic-fact-types.js +1 -0
- package/dist/lib/design-resource-symbolic-fact-validation.d.ts +3 -0
- package/dist/lib/design-resource-symbolic-fact-validation.js +86 -0
- package/dist/lib/design-resource-symbolic-indexes.d.ts +23 -0
- package/dist/lib/design-resource-symbolic-indexes.js +54 -0
- package/dist/lib/design-resource-symbolic-manifest-shape.d.ts +3 -0
- package/dist/lib/design-resource-symbolic-manifest-shape.js +155 -0
- package/dist/lib/design-resource-symbolic-manifest-validation.d.ts +6 -0
- package/dist/lib/design-resource-symbolic-manifest-validation.js +132 -0
- package/dist/lib/design-resource-symbolic-noninterference-artifact.d.ts +33 -0
- package/dist/lib/design-resource-symbolic-noninterference-artifact.js +110 -0
- package/dist/lib/design-resource-symbolic-noninterference-equivalence.d.ts +3 -0
- package/dist/lib/design-resource-symbolic-noninterference-equivalence.js +77 -0
- package/dist/lib/design-resource-symbolic-noninterference-recompute.d.ts +4 -0
- package/dist/lib/design-resource-symbolic-noninterference-recompute.js +146 -0
- package/dist/lib/design-resource-symbolic-noninterference-scope.d.ts +7 -0
- package/dist/lib/design-resource-symbolic-noninterference-scope.js +49 -0
- package/dist/lib/design-resource-symbolic-noninterference-shape.d.ts +2 -0
- package/dist/lib/design-resource-symbolic-noninterference-shape.js +152 -0
- package/dist/lib/design-resource-symbolic-noninterference-types.d.ts +103 -0
- package/dist/lib/design-resource-symbolic-noninterference-types.js +1 -0
- package/dist/lib/design-resource-symbolic-noninterference-validation.d.ts +5 -0
- package/dist/lib/design-resource-symbolic-noninterference-validation.js +62 -0
- package/dist/lib/design-resource-symbolic-oracle-fingerprint.d.ts +1 -0
- package/dist/lib/design-resource-symbolic-oracle-fingerprint.js +47 -0
- package/dist/lib/design-resource-symbolic-predicate-shape.d.ts +6 -0
- package/dist/lib/design-resource-symbolic-predicate-shape.js +123 -0
- package/dist/lib/design-resource-symbolic-production-closure.d.ts +4 -0
- package/dist/lib/design-resource-symbolic-production-closure.js +144 -0
- package/dist/lib/design-resource-symbolic-proof-authority-validation.d.ts +10 -0
- package/dist/lib/design-resource-symbolic-proof-authority-validation.js +68 -0
- package/dist/lib/design-resource-symbolic-proof-validation.d.ts +10 -0
- package/dist/lib/design-resource-symbolic-proof-validation.js +89 -0
- package/dist/lib/design-resource-symbolic-region-validation.d.ts +19 -0
- package/dist/lib/design-resource-symbolic-region-validation.js +146 -0
- package/dist/lib/design-resource-symbolic-resource-validation.d.ts +5 -0
- package/dist/lib/design-resource-symbolic-resource-validation.js +90 -0
- package/dist/lib/design-resource-symbolic-rule-shape.d.ts +27 -0
- package/dist/lib/design-resource-symbolic-rule-shape.js +158 -0
- package/dist/lib/design-resource-symbolic-safety-validation.d.ts +6 -0
- package/dist/lib/design-resource-symbolic-safety-validation.js +29 -0
- package/dist/lib/design-resource-symbolic-source-ir-evaluation.d.ts +19 -0
- package/dist/lib/design-resource-symbolic-source-ir-evaluation.js +74 -0
- package/dist/lib/design-resource-symbolic-source-ir-evidence.d.ts +44 -0
- package/dist/lib/design-resource-symbolic-source-ir-evidence.js +88 -0
- package/dist/lib/design-resource-symbolic-source-ir-oracle.d.ts +13 -0
- package/dist/lib/design-resource-symbolic-source-ir-oracle.js +96 -0
- package/dist/lib/design-resource-symbolic-source-ir-proof.d.ts +14 -0
- package/dist/lib/design-resource-symbolic-source-ir-proof.js +98 -0
- package/dist/lib/design-resource-symbolic-source-ir-shape.d.ts +2 -0
- package/dist/lib/design-resource-symbolic-source-ir-shape.js +38 -0
- package/dist/lib/design-resource-symbolic-source-ir-types.d.ts +17 -0
- package/dist/lib/design-resource-symbolic-source-ir-types.js +2 -0
- package/dist/lib/design-resource-symbolic-static-dependency-validation.d.ts +2 -0
- package/dist/lib/design-resource-symbolic-static-dependency-validation.js +83 -0
- package/dist/lib/design-resource-symbolic-structural-closure-validation.d.ts +6 -0
- package/dist/lib/design-resource-symbolic-structural-closure-validation.js +79 -0
- package/dist/lib/design-resource-symbolic-validation-support.d.ts +29 -0
- package/dist/lib/design-resource-symbolic-validation-support.js +111 -0
- package/dist/lib/design-resource-v1-capacity-header.d.ts +8 -0
- package/dist/lib/design-resource-v1-capacity-header.js +231 -0
- package/dist/lib/design-resource-v1-capacity.d.ts +5 -0
- package/dist/lib/design-resource-v1-capacity.js +45 -0
- package/dist/lib/init.js +1 -0
- package/dist/lib/long-task-acceptance-shape.js +8 -2
- package/dist/lib/long-task-activation-validation.js +13 -3
- package/dist/lib/long-task-admitted-observation-records.d.ts +25 -0
- package/dist/lib/long-task-admitted-observation-records.js +40 -0
- package/dist/lib/long-task-admitted-observation.d.ts +93 -0
- package/dist/lib/long-task-admitted-observation.js +201 -0
- package/dist/lib/long-task-artifacts.d.ts +1 -0
- package/dist/lib/long-task-artifacts.js +1 -0
- package/dist/lib/long-task-authority-material-diff.js +1 -0
- package/dist/lib/long-task-authority-policy.d.ts +5 -0
- package/dist/lib/long-task-authority-policy.js +5 -0
- package/dist/lib/long-task-authority-revision-details.js +3 -1
- package/dist/lib/long-task-authority.js +2 -1
- package/dist/lib/long-task-check-execution-policy.js +5 -0
- package/dist/lib/long-task-check-runner.d.ts +2 -2
- package/dist/lib/long-task-check-runner.js +440 -23
- package/dist/lib/long-task-claims.d.ts +18 -0
- package/dist/lib/long-task-claims.js +35 -0
- package/dist/lib/long-task-codex-agent-profile.d.ts +42 -0
- package/dist/lib/long-task-codex-agent-profile.js +276 -0
- package/dist/lib/long-task-compact-authoring-projections.d.ts +12 -0
- package/dist/lib/long-task-compact-authoring-projections.js +67 -0
- package/dist/lib/long-task-compact-authoring.d.ts +3 -0
- package/dist/lib/long-task-compact-authoring.js +173 -0
- package/dist/lib/long-task-compact-carrier.d.ts +7 -0
- package/dist/lib/long-task-compact-carrier.js +132 -0
- package/dist/lib/long-task-compact-parser.d.ts +14 -0
- package/dist/lib/long-task-compact-parser.js +123 -0
- package/dist/lib/long-task-compact-primitives.d.ts +22 -0
- package/dist/lib/long-task-compact-primitives.js +132 -0
- package/dist/lib/long-task-compact-projections.d.ts +4 -0
- package/dist/lib/long-task-compact-projections.js +153 -0
- package/dist/lib/long-task-compact-structure-targets.d.ts +2 -0
- package/dist/lib/long-task-compact-structure-targets.js +91 -0
- package/dist/lib/long-task-conformance-policy.js +3 -1
- package/dist/lib/long-task-counterfactual-claim-policy.d.ts +3 -4
- package/dist/lib/long-task-counterfactual-claim-policy.js +11 -3
- package/dist/lib/long-task-counterfactual-sandbox.d.ts +1 -1
- package/dist/lib/long-task-counterfactual-sandbox.js +8 -5
- package/dist/lib/long-task-counterfactual-types.d.ts +2 -0
- package/dist/lib/long-task-delivery-compiler.js +2 -0
- package/dist/lib/long-task-delivery-parser.d.ts +1 -0
- package/dist/lib/long-task-delivery-parser.js +38 -6
- package/dist/lib/long-task-design-resource-handoff.d.ts +2 -1
- package/dist/lib/long-task-design-resource-handoff.js +71 -11
- package/dist/lib/long-task-design-resource-method-binding.d.ts +8 -1
- package/dist/lib/long-task-design-resource-method-binding.js +150 -0
- package/dist/lib/long-task-evidence-capability-codec.js +256 -34
- package/dist/lib/long-task-evidence-capability-policy.d.ts +3 -2
- package/dist/lib/long-task-evidence-capability-policy.js +142 -8
- package/dist/lib/long-task-evidence-capability-runtime.d.ts +5 -2
- package/dist/lib/long-task-evidence-capability-runtime.js +420 -68
- package/dist/lib/long-task-evidence-capability-types.d.ts +70 -2
- package/dist/lib/long-task-evidence-sensitivity-policy.d.ts +9 -0
- package/dist/lib/long-task-evidence-sensitivity-policy.js +31 -1
- package/dist/lib/long-task-evidence-v2.d.ts +4 -4
- package/dist/lib/long-task-evidence-v2.js +322 -44
- package/dist/lib/long-task-exact-comparison.d.ts +16 -0
- package/dist/lib/long-task-exact-comparison.js +28 -0
- package/dist/lib/long-task-execution-observation.d.ts +24 -0
- package/dist/lib/long-task-execution-observation.js +332 -0
- package/dist/lib/long-task-explain-acceptance-link.d.ts +4 -0
- package/dist/lib/long-task-explain-acceptance-link.js +4 -0
- package/dist/lib/long-task-explain-claim-links.d.ts +2 -0
- package/dist/lib/long-task-explain-claim-links.js +2 -0
- package/dist/lib/long-task-explain-source-links.d.ts +6 -0
- package/dist/lib/long-task-final-v2.js +7 -4
- package/dist/lib/long-task-hook-install.d.ts +19 -2
- package/dist/lib/long-task-hook-install.js +288 -91
- package/dist/lib/long-task-json-pointer-observation.d.ts +59 -0
- package/dist/lib/long-task-json-pointer-observation.js +184 -0
- package/dist/lib/long-task-observation-artifact.d.ts +8 -0
- package/dist/lib/long-task-observation-artifact.js +58 -0
- package/dist/lib/long-task-observation-authority.d.ts +17 -0
- package/dist/lib/long-task-observation-authority.js +348 -0
- package/dist/lib/long-task-paths.js +1 -1
- package/dist/lib/long-task-playwright-capability-records.d.ts +2 -0
- package/dist/lib/long-task-playwright-capability-records.js +74 -2
- package/dist/lib/long-task-process-observation.d.ts +6 -0
- package/dist/lib/long-task-process-observation.js +117 -0
- package/dist/lib/long-task-process-runtime-closure.d.ts +13 -0
- package/dist/lib/long-task-process-runtime-closure.js +175 -0
- package/dist/lib/long-task-progress.js +2 -0
- package/dist/lib/long-task-protected-files.d.ts +1 -1
- package/dist/lib/long-task-protected-files.js +1 -30
- package/dist/lib/long-task-risk.js +8 -3
- package/dist/lib/long-task-root-shape.js +10 -1
- package/dist/lib/long-task-runner-environment.d.ts +1 -1
- package/dist/lib/long-task-runner-environment.js +4 -4
- package/dist/lib/long-task-runner-freeze.d.ts +4 -2
- package/dist/lib/long-task-runner-freeze.js +130 -28
- package/dist/lib/long-task-runtime-types.d.ts +111 -0
- package/dist/lib/long-task-scoped-binding.d.ts +13 -0
- package/dist/lib/long-task-scoped-binding.js +11 -0
- package/dist/lib/long-task-semantic-contract-types.d.ts +2 -1
- package/dist/lib/long-task-semantic-fact-binding-types.d.ts +8 -0
- package/dist/lib/long-task-semantic-fact-closure.js +4 -1
- package/dist/lib/long-task-semantic-fact-contract-closure.d.ts +1 -1
- package/dist/lib/long-task-semantic-fact-contract-closure.js +18 -6
- package/dist/lib/long-task-semantic-fact-contract-facts.d.ts +1 -1
- package/dist/lib/long-task-semantic-fact-contract-facts.js +4 -1
- package/dist/lib/long-task-semantic-fact-contract-proofs.d.ts +1 -1
- package/dist/lib/long-task-semantic-fact-contract-proofs.js +12 -3
- package/dist/lib/long-task-semantic-fact-evidence.d.ts +8 -4
- package/dist/lib/long-task-semantic-fact-evidence.js +103 -43
- package/dist/lib/long-task-semantic-fact-shape.js +17 -6
- package/dist/lib/long-task-shape-primitives.d.ts +1 -1
- package/dist/lib/long-task-shape-primitives.js +1 -0
- package/dist/lib/long-task-source-claim-validation.js +4 -1
- package/dist/lib/long-task-source-item-parser.d.ts +2 -2
- package/dist/lib/long-task-source-item-parser.js +20 -11
- package/dist/lib/long-task-source-target-continuity.d.ts +2 -2
- package/dist/lib/long-task-source-target-continuity.js +35 -2
- package/dist/lib/long-task-source-target-index.d.ts +3 -0
- package/dist/lib/long-task-source-target-index.js +19 -0
- package/dist/lib/long-task-stage-policy.js +10 -4
- package/dist/lib/long-task-static-observation-freeze.d.ts +83 -0
- package/dist/lib/long-task-static-observation-freeze.js +428 -0
- package/dist/lib/long-task-status-projection.js +5 -1
- package/dist/lib/long-task-target-policy.d.ts +1 -1
- package/dist/lib/long-task-target-policy.js +3 -0
- package/dist/lib/long-task-ui-design-policy.js +64 -4
- package/dist/lib/long-task-ui-surface-shape.js +195 -0
- package/dist/lib/long-task-ui-surface-types.d.ts +53 -0
- package/dist/lib/long-task-verifier-dependency-closure.js +7 -3
- package/dist/lib/long-task-verifier-v2.js +70 -9
- package/dist/lib/long-task-worker-selection.d.ts +2 -0
- package/dist/lib/long-task-worker-selection.js +7 -0
- package/dist/lib/long-task-workspace-scope.js +3 -1
- package/dist/lib/long-task-workspace.d.ts +1 -1
- package/dist/lib/long-task-workspace.js +12 -13
- package/dist/lib/migrations.js +58 -0
- package/dist/lib/profiles.js +0 -1
- package/dist/lib/repository-path-safety.d.ts +14 -0
- package/dist/lib/repository-path-safety.js +126 -0
- package/dist/lib/semantic-fact-compact-authoring.d.ts +2 -0
- package/dist/lib/semantic-fact-compact-authoring.js +160 -0
- package/dist/lib/semantic-fact-compact-capacity.d.ts +9 -0
- package/dist/lib/semantic-fact-compact-capacity.js +40 -0
- package/dist/lib/semantic-fact-compact-carrier.d.ts +16 -0
- package/dist/lib/semantic-fact-compact-carrier.js +146 -0
- package/dist/lib/semantic-fact-compact-parser.d.ts +17 -0
- package/dist/lib/semantic-fact-compact-parser.js +168 -0
- package/dist/lib/semantic-fact-compact-revision.d.ts +11 -0
- package/dist/lib/semantic-fact-compact-revision.js +64 -0
- package/dist/lib/semantic-fact-compact-support.d.ts +23 -0
- package/dist/lib/semantic-fact-compact-support.js +159 -0
- package/dist/lib/semantic-fact-policy-census.d.ts +1 -0
- package/dist/lib/semantic-fact-policy-census.js +43 -0
- 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/semantic-fact-source-parser.d.ts +5 -0
- package/dist/lib/semantic-fact-source-parser.js +47 -6
- package/dist/lib/structural-closure-cost.d.ts +79 -0
- package/dist/lib/structural-closure-cost.js +91 -0
- package/dist/lib/symbolic-denotation-dag-builder.d.ts +25 -0
- package/dist/lib/symbolic-denotation-dag-builder.js +176 -0
- package/dist/lib/symbolic-denotation-domain-validation.d.ts +3 -0
- package/dist/lib/symbolic-denotation-domain-validation.js +56 -0
- package/dist/lib/symbolic-denotation-engine.d.ts +32 -0
- package/dist/lib/symbolic-denotation-engine.js +140 -0
- package/dist/lib/symbolic-denotation-public.d.ts +11 -0
- package/dist/lib/symbolic-denotation-public.js +12 -0
- package/dist/lib/symbolic-denotation-runtime.d.ts +20 -0
- package/dist/lib/symbolic-denotation-runtime.js +90 -0
- package/dist/lib/symbolic-denotation-support.d.ts +11 -0
- package/dist/lib/symbolic-denotation-support.js +49 -0
- package/dist/lib/symbolic-denotation-types.d.ts +133 -0
- package/dist/lib/symbolic-denotation-types.js +18 -0
- package/dist/lib/symbolic-denotation-validation.d.ts +6 -0
- package/dist/lib/symbolic-denotation-validation.js +126 -0
- package/dist/lib/sync-engine.d.ts +1 -0
- package/dist/lib/sync-engine.js +4 -1
- package/dist/lib/upgrade.js +1 -0
- package/dist/long-task-hook.js +40 -1
- package/dist/public-types.d.ts +8 -0
- package/dist/public-types.js +1 -0
- package/dist/schemas/design-resource-symbolic-noninterference-artifact-v2.schema.json +289 -0
- package/dist/schemas/design-resource-symbolic-source-ir-v1.schema.json +130 -0
- package/dist/schemas/long-task-delivery-v2/long-task-delivery-v2.schema.json +435 -5
- package/migrations/README.md +92 -15
- package/package.json +2 -2
- package/source-mappings.yaml +28 -25
- package/assets/skills/source-plan-authoring/SKILL.md +0 -14
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
import { DESIGN_RESOURCE_RECOVERY_AUDIT_SCHEMA } from "./design-resource-recovery-schema.js";
|
|
2
|
+
import { arrayOf, digest, literal, object, oneOf, optionalArrayOf, parseStrictJsonObject, stringSet, text, } from "./design-resource-recovery-codec-primitives.js";
|
|
3
|
+
import { parseAuthorityIdentity, parseDecisionAuthority, } from "./design-resource-recovery-shape.js";
|
|
4
|
+
import { parseDesignResourceFinalDisposition } from "./design-resource-recovery-final-disposition-shape.js";
|
|
5
|
+
const ORIGINS = [
|
|
6
|
+
"user-direct",
|
|
7
|
+
"necessary-derived",
|
|
8
|
+
"repository-evidence-backed",
|
|
9
|
+
"provider-suggested",
|
|
10
|
+
];
|
|
11
|
+
const STATUSES = ["accepted", "rejected", "unresolved"];
|
|
12
|
+
const SEMANTIC_KINDS = [
|
|
13
|
+
"exact-visual",
|
|
14
|
+
"product",
|
|
15
|
+
"business",
|
|
16
|
+
"permission",
|
|
17
|
+
"data",
|
|
18
|
+
"algorithm",
|
|
19
|
+
"commercial",
|
|
20
|
+
"safety-security",
|
|
21
|
+
"technical",
|
|
22
|
+
];
|
|
23
|
+
export function parseDesignResourceReconciliationAudit(content) {
|
|
24
|
+
const row = object(parseStrictJsonObject(content, "reconciliation_audit"), "reconciliation_audit", [
|
|
25
|
+
"schema_version",
|
|
26
|
+
"session_id",
|
|
27
|
+
"base_raw_byte_digest",
|
|
28
|
+
"design_authority",
|
|
29
|
+
"provider_run",
|
|
30
|
+
"resource_identities",
|
|
31
|
+
"accepted_delta_ids",
|
|
32
|
+
"rejected_delta_ids",
|
|
33
|
+
"unresolved_delta_ids",
|
|
34
|
+
"changed_keys",
|
|
35
|
+
"explicitly_unchanged",
|
|
36
|
+
"requirements_to_resource",
|
|
37
|
+
"resource_to_requirements",
|
|
38
|
+
"unexpected_blast_radius",
|
|
39
|
+
"inactive_delta_leakage",
|
|
40
|
+
], ["writeback_target_raw_byte_digest"]);
|
|
41
|
+
literal(row.schema_version, DESIGN_RESOURCE_RECOVERY_AUDIT_SCHEMA, "reconciliation_audit.schema_version");
|
|
42
|
+
return {
|
|
43
|
+
schema_version: DESIGN_RESOURCE_RECOVERY_AUDIT_SCHEMA,
|
|
44
|
+
session_id: text(row.session_id, "reconciliation_audit.session_id"),
|
|
45
|
+
base_raw_byte_digest: digest(row.base_raw_byte_digest, "reconciliation_audit.base_raw_byte_digest"),
|
|
46
|
+
design_authority: parseAuthorityIdentity(row.design_authority, "reconciliation_audit.design_authority"),
|
|
47
|
+
provider_run: parseProviderRun(row.provider_run),
|
|
48
|
+
resource_identities: optionalArrayOf(row.resource_identities, "reconciliation_audit.resource_identities", parseResourceIdentity),
|
|
49
|
+
...(row.writeback_target_raw_byte_digest === undefined
|
|
50
|
+
? {}
|
|
51
|
+
: {
|
|
52
|
+
writeback_target_raw_byte_digest: digest(row.writeback_target_raw_byte_digest, "reconciliation_audit.writeback_target_raw_byte_digest"),
|
|
53
|
+
}),
|
|
54
|
+
accepted_delta_ids: stringSet(row.accepted_delta_ids, "reconciliation_audit.accepted_delta_ids", { allowEmpty: true }),
|
|
55
|
+
rejected_delta_ids: stringSet(row.rejected_delta_ids, "reconciliation_audit.rejected_delta_ids", { allowEmpty: true }),
|
|
56
|
+
unresolved_delta_ids: stringSet(row.unresolved_delta_ids, "reconciliation_audit.unresolved_delta_ids", { allowEmpty: true }),
|
|
57
|
+
changed_keys: stringSet(row.changed_keys, "reconciliation_audit.changed_keys", { allowEmpty: true }),
|
|
58
|
+
explicitly_unchanged: optionalArrayOf(row.explicitly_unchanged, "reconciliation_audit.explicitly_unchanged", parseUnchanged),
|
|
59
|
+
requirements_to_resource: optionalArrayOf(row.requirements_to_resource, "reconciliation_audit.requirements_to_resource", parseRequirementFinding),
|
|
60
|
+
resource_to_requirements: optionalArrayOf(row.resource_to_requirements, "reconciliation_audit.resource_to_requirements", parseResourceFinding),
|
|
61
|
+
unexpected_blast_radius: optionalArrayOf(row.unexpected_blast_radius, "reconciliation_audit.unexpected_blast_radius", parseBlastFinding),
|
|
62
|
+
inactive_delta_leakage: optionalArrayOf(row.inactive_delta_leakage, "reconciliation_audit.inactive_delta_leakage", parseLeakage),
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
function parseProviderRun(value) {
|
|
66
|
+
const row = object(value, "reconciliation_audit.provider_run", [
|
|
67
|
+
"key",
|
|
68
|
+
"locator",
|
|
69
|
+
"immutable_identity",
|
|
70
|
+
]);
|
|
71
|
+
return {
|
|
72
|
+
key: text(row.key, "provider_run.key"),
|
|
73
|
+
locator: text(row.locator, "provider_run.locator"),
|
|
74
|
+
immutable_identity: text(row.immutable_identity, "provider_run.immutable_identity"),
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
function parseResourceIdentity(value, label) {
|
|
78
|
+
const row = object(value, label, ["key", "raw_byte_digest"]);
|
|
79
|
+
return {
|
|
80
|
+
key: text(row.key, `${label}.key`),
|
|
81
|
+
raw_byte_digest: digest(row.raw_byte_digest, `${label}.raw_byte_digest`),
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
function parseUnchanged(value, label) {
|
|
85
|
+
const row = object(value, label, [
|
|
86
|
+
"key",
|
|
87
|
+
"verdict",
|
|
88
|
+
"resource_refs",
|
|
89
|
+
"condition_refs",
|
|
90
|
+
"basis_source_refs",
|
|
91
|
+
]);
|
|
92
|
+
return {
|
|
93
|
+
key: text(row.key, `${label}.key`),
|
|
94
|
+
verdict: oneOf(row.verdict, ["preserved", "changed", "unresolved"], `${label}.verdict`),
|
|
95
|
+
resource_refs: stringSet(row.resource_refs, `${label}.resource_refs`),
|
|
96
|
+
condition_refs: stringSet(row.condition_refs, `${label}.condition_refs`),
|
|
97
|
+
basis_source_refs: stringSet(row.basis_source_refs, `${label}.basis_source_refs`),
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
function parseRequirementFinding(value, label) {
|
|
101
|
+
const row = object(value, label, [
|
|
102
|
+
"key",
|
|
103
|
+
"verdict",
|
|
104
|
+
"delta_ids",
|
|
105
|
+
"resource_refs",
|
|
106
|
+
"condition_refs",
|
|
107
|
+
]);
|
|
108
|
+
return {
|
|
109
|
+
key: text(row.key, `${label}.key`),
|
|
110
|
+
verdict: oneOf(row.verdict, ["covered", "missing", "distorted", "unsupported", "unresolved"], `${label}.verdict`),
|
|
111
|
+
delta_ids: stringSet(row.delta_ids, `${label}.delta_ids`),
|
|
112
|
+
resource_refs: stringSet(row.resource_refs, `${label}.resource_refs`),
|
|
113
|
+
condition_refs: stringSet(row.condition_refs, `${label}.condition_refs`),
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
function parseResourceFinding(value, label) {
|
|
117
|
+
const row = object(value, label, [
|
|
118
|
+
"key",
|
|
119
|
+
"resource_ref",
|
|
120
|
+
"status",
|
|
121
|
+
"semantic_kind",
|
|
122
|
+
"delta_ids",
|
|
123
|
+
"condition_refs",
|
|
124
|
+
"requirement_bindings",
|
|
125
|
+
]);
|
|
126
|
+
return {
|
|
127
|
+
key: text(row.key, `${label}.key`),
|
|
128
|
+
resource_ref: text(row.resource_ref, `${label}.resource_ref`),
|
|
129
|
+
status: oneOf(row.status, STATUSES, `${label}.status`),
|
|
130
|
+
semantic_kind: oneOf(row.semantic_kind, SEMANTIC_KINDS, `${label}.semantic_kind`),
|
|
131
|
+
delta_ids: stringSet(row.delta_ids, `${label}.delta_ids`),
|
|
132
|
+
condition_refs: stringSet(row.condition_refs, `${label}.condition_refs`),
|
|
133
|
+
requirement_bindings: arrayOf(row.requirement_bindings, `${label}.requirement_bindings`, parseRequirementBinding),
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
function parseRequirementBinding(value, label) {
|
|
137
|
+
const row = object(value, label, [
|
|
138
|
+
"binding_id",
|
|
139
|
+
"requirement_key",
|
|
140
|
+
"delta_id",
|
|
141
|
+
"origin",
|
|
142
|
+
"decision_authority",
|
|
143
|
+
"source_refs",
|
|
144
|
+
"final_disposition",
|
|
145
|
+
]);
|
|
146
|
+
return {
|
|
147
|
+
binding_id: text(row.binding_id, `${label}.binding_id`),
|
|
148
|
+
requirement_key: text(row.requirement_key, `${label}.requirement_key`),
|
|
149
|
+
delta_id: text(row.delta_id, `${label}.delta_id`),
|
|
150
|
+
origin: oneOf(row.origin, ORIGINS, `${label}.origin`),
|
|
151
|
+
decision_authority: parseDecisionAuthority(row.decision_authority, `${label}.decision_authority`),
|
|
152
|
+
source_refs: stringSet(row.source_refs, `${label}.source_refs`, {
|
|
153
|
+
allowEmpty: true,
|
|
154
|
+
}),
|
|
155
|
+
final_disposition: parseDesignResourceFinalDisposition(row.final_disposition, `${label}.final_disposition`),
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
function parseBlastFinding(value, label) {
|
|
159
|
+
const row = object(value, label, ["key", "verdict"]);
|
|
160
|
+
return {
|
|
161
|
+
key: text(row.key, `${label}.key`),
|
|
162
|
+
verdict: oneOf(row.verdict, ["expected", "unexpected", "unresolved"], `${label}.verdict`),
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
function parseLeakage(value, label) {
|
|
166
|
+
const row = object(value, label, ["delta_id", "inactive_reason", "leaked"]);
|
|
167
|
+
if (typeof row.leaked !== "boolean")
|
|
168
|
+
throw new Error(`design_resource_recovery_invalid:${label}.leaked:boolean_required`);
|
|
169
|
+
return {
|
|
170
|
+
delta_id: text(row.delta_id, `${label}.delta_id`),
|
|
171
|
+
inactive_reason: oneOf(row.inactive_reason, ["rejected", "unresolved", "superseded"], `${label}.inactive_reason`),
|
|
172
|
+
leaked: row.leaked,
|
|
173
|
+
};
|
|
174
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { DESIGN_RESOURCE_RECOVERY_AUDIT_SCHEMA } from "./design-resource-recovery-schema.js";
|
|
2
|
+
import type { DesignResourceAuthorityIdentity, DesignResourceDecisionAuthority, DesignResourceDecisionOrigin, DesignResourceDecisionStatus, DesignResourceFinalDisposition, DesignResourceProviderIdentity, DesignResourceSemanticKind } from "./design-resource-recovery-types.js";
|
|
3
|
+
export interface DesignResourceReconciliationAudit {
|
|
4
|
+
schema_version: typeof DESIGN_RESOURCE_RECOVERY_AUDIT_SCHEMA;
|
|
5
|
+
session_id: string;
|
|
6
|
+
base_raw_byte_digest: string;
|
|
7
|
+
design_authority: DesignResourceAuthorityIdentity;
|
|
8
|
+
provider_run: DesignResourceProviderIdentity;
|
|
9
|
+
resource_identities: Array<{
|
|
10
|
+
key: string;
|
|
11
|
+
raw_byte_digest: string;
|
|
12
|
+
}>;
|
|
13
|
+
writeback_target_raw_byte_digest?: string;
|
|
14
|
+
accepted_delta_ids: string[];
|
|
15
|
+
rejected_delta_ids: string[];
|
|
16
|
+
unresolved_delta_ids: string[];
|
|
17
|
+
changed_keys: string[];
|
|
18
|
+
explicitly_unchanged: Array<{
|
|
19
|
+
key: string;
|
|
20
|
+
verdict: "preserved" | "changed" | "unresolved";
|
|
21
|
+
resource_refs: string[];
|
|
22
|
+
condition_refs: string[];
|
|
23
|
+
basis_source_refs: string[];
|
|
24
|
+
}>;
|
|
25
|
+
requirements_to_resource: Array<{
|
|
26
|
+
key: string;
|
|
27
|
+
verdict: "covered" | "missing" | "distorted" | "unsupported" | "unresolved";
|
|
28
|
+
delta_ids: string[];
|
|
29
|
+
resource_refs: string[];
|
|
30
|
+
condition_refs: string[];
|
|
31
|
+
}>;
|
|
32
|
+
resource_to_requirements: Array<{
|
|
33
|
+
key: string;
|
|
34
|
+
resource_ref: string;
|
|
35
|
+
status: DesignResourceDecisionStatus;
|
|
36
|
+
semantic_kind: DesignResourceSemanticKind;
|
|
37
|
+
delta_ids: string[];
|
|
38
|
+
condition_refs: string[];
|
|
39
|
+
requirement_bindings: Array<{
|
|
40
|
+
binding_id: string;
|
|
41
|
+
requirement_key: string;
|
|
42
|
+
delta_id: string;
|
|
43
|
+
origin: DesignResourceDecisionOrigin;
|
|
44
|
+
decision_authority: DesignResourceDecisionAuthority;
|
|
45
|
+
source_refs: string[];
|
|
46
|
+
final_disposition: DesignResourceFinalDisposition;
|
|
47
|
+
}>;
|
|
48
|
+
}>;
|
|
49
|
+
unexpected_blast_radius: Array<{
|
|
50
|
+
key: string;
|
|
51
|
+
verdict: "expected" | "unexpected" | "unresolved";
|
|
52
|
+
}>;
|
|
53
|
+
inactive_delta_leakage: Array<{
|
|
54
|
+
delta_id: string;
|
|
55
|
+
inactive_reason: "rejected" | "unresolved" | "superseded";
|
|
56
|
+
leaked: boolean;
|
|
57
|
+
}>;
|
|
58
|
+
}
|
|
59
|
+
export interface DesignResourceReconciliationResult {
|
|
60
|
+
status: "reconciliation-balanced" | "blocked";
|
|
61
|
+
findings: string[];
|
|
62
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { DesignResourceRecoveryCheckpoint } from "./design-resource-recovery-types.js";
|
|
2
|
+
import type { DesignResourceReconciliationAudit, DesignResourceReconciliationResult } from "./design-resource-reconciliation-types.js";
|
|
3
|
+
export declare function reconcileDesignResourceWriteback(checkpoint: DesignResourceRecoveryCheckpoint, audit: DesignResourceReconciliationAudit): DesignResourceReconciliationResult;
|
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
import { acceptedSupersededDeltaIds, activeAcceptedDesignResourceDeltas, validateDesignResourceRecoverySemantics, } from "./design-resource-recovery-replay.js";
|
|
2
|
+
import { canonicalValueJson } from "./strict-codec.js";
|
|
3
|
+
export function reconcileDesignResourceWriteback(checkpoint, audit) {
|
|
4
|
+
validateDesignResourceRecoverySemantics(checkpoint);
|
|
5
|
+
const findings = [];
|
|
6
|
+
compareValue(findings, "session_identity", audit.session_id, checkpoint.session_id);
|
|
7
|
+
compareValue(findings, "base_identity", audit.base_raw_byte_digest, checkpoint.base.raw_byte_digest);
|
|
8
|
+
compareValue(findings, "design_authority_identity", canonicalValueJson(audit.design_authority), canonicalValueJson(checkpoint.design_authority));
|
|
9
|
+
compareValue(findings, "provider_run_identity", canonicalValueJson(audit.provider_run), canonicalValueJson(checkpoint.provider.run));
|
|
10
|
+
if (checkpoint.writeback) {
|
|
11
|
+
if (!audit.writeback_target_raw_byte_digest)
|
|
12
|
+
findings.push("missing:writeback_target_identity");
|
|
13
|
+
else
|
|
14
|
+
compareValue(findings, "writeback_target_identity", audit.writeback_target_raw_byte_digest, checkpoint.writeback.expected_post_write_raw_byte_digest);
|
|
15
|
+
}
|
|
16
|
+
else if (audit.writeback_target_raw_byte_digest)
|
|
17
|
+
findings.push("unexpected:writeback_target_identity");
|
|
18
|
+
compareIdentityRows(findings, "resource_identity", audit.resource_identities, checkpoint.selected_resource_bindings.map((row) => ({
|
|
19
|
+
key: row.key,
|
|
20
|
+
raw_byte_digest: row.raw_byte_digest,
|
|
21
|
+
})));
|
|
22
|
+
const superseded = acceptedSupersededDeltaIds(checkpoint.deltas);
|
|
23
|
+
const activeAccepted = activeAcceptedDesignResourceDeltas(checkpoint.deltas, superseded);
|
|
24
|
+
const changed = checkpoint.audit_expectations.changed.map((row) => row.key);
|
|
25
|
+
compareExactSet(findings, "accepted_delta_ids", audit.accepted_delta_ids, activeAccepted.map((delta) => delta.delta_id));
|
|
26
|
+
compareExactSet(findings, "rejected_delta_ids", audit.rejected_delta_ids, checkpoint.decision_sets.rejected_delta_ids);
|
|
27
|
+
compareExactSet(findings, "unresolved_delta_ids", audit.unresolved_delta_ids, checkpoint.decision_sets.unresolved_delta_ids);
|
|
28
|
+
compareExactSet(findings, "changed_keys", audit.changed_keys, changed);
|
|
29
|
+
validateUnchanged(checkpoint, audit, findings);
|
|
30
|
+
validateRequirements(checkpoint, audit, findings);
|
|
31
|
+
validateResourceDecisions(checkpoint, audit, activeAccepted, superseded, findings);
|
|
32
|
+
validateBlastAndLeakage(checkpoint, audit, findings);
|
|
33
|
+
findings.sort(compareText);
|
|
34
|
+
return {
|
|
35
|
+
status: findings.length ? "blocked" : "reconciliation-balanced",
|
|
36
|
+
findings,
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
function validateUnchanged(checkpoint, audit, findings) {
|
|
40
|
+
uniqueRows(audit.explicitly_unchanged.map((row) => row.key), "unchanged");
|
|
41
|
+
const expected = checkpoint.audit_expectations.unchanged;
|
|
42
|
+
compareExactSet(findings, "explicitly_unchanged_keys", audit.explicitly_unchanged.map((row) => row.key), expected.map((row) => row.key));
|
|
43
|
+
const expectedByKey = new Map(expected.map((row) => [row.key, row]));
|
|
44
|
+
for (const row of audit.explicitly_unchanged) {
|
|
45
|
+
if (row.verdict !== "preserved")
|
|
46
|
+
findings.push(`unchanged_${row.verdict}:${row.key}`);
|
|
47
|
+
const frozen = expectedByKey.get(row.key);
|
|
48
|
+
if (!frozen)
|
|
49
|
+
continue;
|
|
50
|
+
compareExactSet(findings, `unchanged_resources:${row.key}`, row.resource_refs, frozen.resource_refs);
|
|
51
|
+
compareExactSet(findings, `unchanged_conditions:${row.key}`, row.condition_refs, frozen.condition_refs);
|
|
52
|
+
compareExactSet(findings, `unchanged_basis_sources:${row.key}`, row.basis_source_refs, frozen.basis_source_refs);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
function validateRequirements(checkpoint, audit, findings) {
|
|
56
|
+
uniqueRows(audit.requirements_to_resource.map((row) => row.key), "requirements_to_resource");
|
|
57
|
+
const expected = checkpoint.audit_expectations.changed;
|
|
58
|
+
compareExactSet(findings, "requirements_to_resource_keys", audit.requirements_to_resource.map((row) => row.key), expected.map((row) => row.key));
|
|
59
|
+
const expectedByKey = new Map(expected.map((row) => [row.key, row]));
|
|
60
|
+
for (const row of audit.requirements_to_resource) {
|
|
61
|
+
if (row.verdict !== "covered")
|
|
62
|
+
findings.push(`requirement_${row.verdict}:${row.key}`);
|
|
63
|
+
const frozen = expectedByKey.get(row.key);
|
|
64
|
+
if (!frozen)
|
|
65
|
+
continue;
|
|
66
|
+
compareExactSet(findings, `requirement_delta_ids:${row.key}`, row.delta_ids, frozen.delta_ids);
|
|
67
|
+
compareExactSet(findings, `requirement_resources:${row.key}`, row.resource_refs, frozen.resource_refs);
|
|
68
|
+
compareExactSet(findings, `requirement_conditions:${row.key}`, row.condition_refs, frozen.condition_refs);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
function validateResourceDecisions(checkpoint, audit, activeAccepted, superseded, findings) {
|
|
72
|
+
uniqueRows(audit.resource_to_requirements.map((row) => row.key), "resource_to_requirements");
|
|
73
|
+
const expected = checkpoint.audit_expectations.resource_decisions;
|
|
74
|
+
compareExactSet(findings, "resource_decision_keys", audit.resource_to_requirements.map((row) => row.key), expected.map((row) => row.key));
|
|
75
|
+
const expectedByKey = new Map(expected.map((row) => [row.key, row]));
|
|
76
|
+
const allDeltas = new Map(checkpoint.deltas.map((delta) => [delta.delta_id, delta]));
|
|
77
|
+
const activeIds = new Set(activeAccepted.map((delta) => delta.delta_id));
|
|
78
|
+
const globalBindingIds = [];
|
|
79
|
+
const globalBindingTuples = [];
|
|
80
|
+
const finalOwnerTuples = [];
|
|
81
|
+
for (const row of audit.resource_to_requirements) {
|
|
82
|
+
for (const binding of row.requirement_bindings) {
|
|
83
|
+
globalBindingIds.push(binding.binding_id);
|
|
84
|
+
globalBindingTuples.push(resourceBindingIdentity(row.resource_ref, binding.requirement_key, binding.delta_id));
|
|
85
|
+
}
|
|
86
|
+
const frozen = expectedByKey.get(row.key);
|
|
87
|
+
if (!frozen)
|
|
88
|
+
continue;
|
|
89
|
+
compareValue(findings, `resource_decision_resource:${row.key}`, row.resource_ref, frozen.resource_ref);
|
|
90
|
+
compareValue(findings, `resource_decision_semantic_kind:${row.key}`, row.semantic_kind, frozen.semantic_kind);
|
|
91
|
+
compareExactSet(findings, `resource_decision_conditions:${row.key}`, row.condition_refs, frozen.condition_refs);
|
|
92
|
+
compareExactSet(findings, `resource_decision_delta_ids:${row.key}`, row.delta_ids, frozen.bindings.map((binding) => binding.delta_id));
|
|
93
|
+
uniqueRows(row.requirement_bindings.map((binding) => binding.binding_id), `resource_requirement_binding_ids:${row.key}`);
|
|
94
|
+
compareExactSet(findings, `resource_decision_binding_ids:${row.key}`, row.requirement_bindings.map((binding) => binding.binding_id), frozen.bindings.map((binding) => binding.binding_id));
|
|
95
|
+
const frozenBindings = new Map(frozen.bindings.map((binding) => [binding.binding_id, binding]));
|
|
96
|
+
for (const binding of row.requirement_bindings) {
|
|
97
|
+
const expectedBinding = frozenBindings.get(binding.binding_id);
|
|
98
|
+
if (!expectedBinding)
|
|
99
|
+
continue;
|
|
100
|
+
compareValue(findings, `resource_binding_target:${binding.binding_id}`, binding.requirement_key, expectedBinding.target_key);
|
|
101
|
+
compareValue(findings, `resource_binding_delta:${binding.binding_id}`, binding.delta_id, expectedBinding.delta_id);
|
|
102
|
+
const delta = allDeltas.get(binding.delta_id);
|
|
103
|
+
if (!delta) {
|
|
104
|
+
findings.push(`resource_decision_delta_unknown:${binding.binding_id}`);
|
|
105
|
+
continue;
|
|
106
|
+
}
|
|
107
|
+
compareValue(findings, `resource_decision_status:${binding.binding_id}`, row.status, delta.status);
|
|
108
|
+
if (!delta.target_keys.includes(binding.requirement_key))
|
|
109
|
+
findings.push(`resource_decision_target_mismatch:${binding.binding_id}`);
|
|
110
|
+
compareValue(findings, `resource_binding_semantic_kind:${binding.binding_id}`, row.semantic_kind, delta.semantic_kind);
|
|
111
|
+
compareValue(findings, `resource_decision_origin:${binding.binding_id}`, binding.origin, delta.origin);
|
|
112
|
+
compareValue(findings, `resource_decision_authority:${binding.binding_id}`, binding.decision_authority, delta.decision_authority);
|
|
113
|
+
compareExactSet(findings, `resource_decision_sources:${binding.binding_id}`, binding.source_refs, delta.source_refs);
|
|
114
|
+
validateFinalDisposition(checkpoint, row, binding, delta, expectedBinding.final_disposition, activeIds, superseded, findings);
|
|
115
|
+
if (delta.status === "accepted" &&
|
|
116
|
+
activeIds.has(delta.delta_id) &&
|
|
117
|
+
delta.operation !== "preserve")
|
|
118
|
+
finalOwnerTuples.push(deltaTarget(delta.delta_id, binding.requirement_key));
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
uniqueRows(globalBindingIds, "resource_binding_id_global");
|
|
122
|
+
uniqueRows(globalBindingTuples, "resource_binding_tuple_global");
|
|
123
|
+
uniqueRows(finalOwnerTuples, "final_owner_tuple_global");
|
|
124
|
+
const expectedOwners = activeAccepted.flatMap((delta) => delta.operation === "preserve"
|
|
125
|
+
? []
|
|
126
|
+
: delta.target_keys.map((target) => deltaTarget(delta.delta_id, target)));
|
|
127
|
+
compareExactSet(findings, "active_delta_final_owners", finalOwnerTuples, expectedOwners);
|
|
128
|
+
}
|
|
129
|
+
function validateFinalDisposition(checkpoint, row, binding, delta, frozen, activeIds, superseded, findings) {
|
|
130
|
+
const disposition = binding.final_disposition;
|
|
131
|
+
compareValue(findings, `resource_decision_frozen_disposition:${binding.binding_id}`, canonicalValueJson(disposition), canonicalValueJson(frozen));
|
|
132
|
+
const active = activeIds.has(delta.delta_id) && !superseded.has(delta.delta_id);
|
|
133
|
+
if (delta.status === "rejected" || (delta.status === "accepted" && !active)) {
|
|
134
|
+
if (disposition.kind !== "not-adopted")
|
|
135
|
+
findings.push(`resource_decision_inactive_owner:${binding.binding_id}`);
|
|
136
|
+
return;
|
|
137
|
+
}
|
|
138
|
+
if (delta.status === "unresolved") {
|
|
139
|
+
findings.push(`resource_decision_unresolved:${row.key}`);
|
|
140
|
+
if (disposition.kind !== "unresolved")
|
|
141
|
+
findings.push(`resource_decision_unresolved_owner:${binding.binding_id}`);
|
|
142
|
+
return;
|
|
143
|
+
}
|
|
144
|
+
if (delta.operation === "preserve") {
|
|
145
|
+
findings.push(`resource_decision_preserve_owner_forbidden:${binding.binding_id}`);
|
|
146
|
+
return;
|
|
147
|
+
}
|
|
148
|
+
if (disposition.kind === "proposal-written") {
|
|
149
|
+
const operation = checkpoint.writeback?.patch.operations.find((candidate) => candidate.operation_id === disposition.operation_id);
|
|
150
|
+
if (!operation)
|
|
151
|
+
findings.push(`proposal_owner_operation_missing:${binding.binding_id}`);
|
|
152
|
+
else if (operation.semantic_binding.delta_id !== delta.delta_id ||
|
|
153
|
+
operation.semantic_binding.target_key !== binding.requirement_key)
|
|
154
|
+
findings.push(`proposal_owner_operation_binding_mismatch:${binding.binding_id}`);
|
|
155
|
+
return;
|
|
156
|
+
}
|
|
157
|
+
if (disposition.kind !== "resource-owned-exact-visual") {
|
|
158
|
+
findings.push(`resource_decision_accepted_owner_missing:${binding.binding_id}`);
|
|
159
|
+
return;
|
|
160
|
+
}
|
|
161
|
+
if (delta.semantic_kind !== "exact-visual")
|
|
162
|
+
findings.push(`resource_owner_nonvisual_meaning:${binding.binding_id}`);
|
|
163
|
+
if (disposition.resource_ref !== row.resource_ref)
|
|
164
|
+
findings.push(`resource_owner_identity_mismatch:${binding.binding_id}`);
|
|
165
|
+
compareExactSet(findings, `resource_owner_conditions:${binding.binding_id}`, disposition.condition_refs, row.condition_refs);
|
|
166
|
+
const owner = disposition.downstream_owner;
|
|
167
|
+
if (owner.resource_key !== disposition.resource_ref)
|
|
168
|
+
findings.push(`resource_owner_record_mismatch:${binding.binding_id}`);
|
|
169
|
+
}
|
|
170
|
+
function validateBlastAndLeakage(checkpoint, audit, findings) {
|
|
171
|
+
uniqueRows(audit.unexpected_blast_radius.map((row) => row.key), "unexpected_blast_radius");
|
|
172
|
+
compareExactSet(findings, "unexpected_blast_radius_keys", audit.unexpected_blast_radius.map((row) => row.key), checkpoint.audit_expectations.blast_radius.map((row) => row.key));
|
|
173
|
+
for (const row of audit.unexpected_blast_radius)
|
|
174
|
+
if (row.verdict !== "expected")
|
|
175
|
+
findings.push(`${row.verdict}_blast_radius:${row.key}`);
|
|
176
|
+
uniqueRows(audit.inactive_delta_leakage.map((row) => row.delta_id), "inactive_delta_leakage");
|
|
177
|
+
const expected = checkpoint.audit_expectations.inactive_delta_leakage;
|
|
178
|
+
compareExactSet(findings, "inactive_delta_leakage_ids", audit.inactive_delta_leakage.map((row) => row.delta_id), expected.map((row) => row.delta_id));
|
|
179
|
+
const expectedById = new Map(expected.map((row) => [row.delta_id, row]));
|
|
180
|
+
const active = new Set(activeAcceptedDesignResourceDeltas(checkpoint.deltas).map((delta) => delta.delta_id));
|
|
181
|
+
for (const row of audit.inactive_delta_leakage) {
|
|
182
|
+
const frozen = expectedById.get(row.delta_id);
|
|
183
|
+
if (frozen)
|
|
184
|
+
compareValue(findings, `inactive_delta_reason:${row.delta_id}`, row.inactive_reason, frozen.reason);
|
|
185
|
+
if (active.has(row.delta_id))
|
|
186
|
+
findings.push(`active_delta_in_inactive_universe:${row.delta_id}`);
|
|
187
|
+
if (row.leaked)
|
|
188
|
+
findings.push(`decision_leaked:${row.delta_id}`);
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
function compareIdentityRows(findings, label, actual, expected) {
|
|
192
|
+
uniqueRows(actual.map((row) => row.key), `${label}:actual`);
|
|
193
|
+
uniqueRows(expected.map((row) => row.key), `${label}:expected`);
|
|
194
|
+
compareExactSet(findings, `${label}_keys`, actual.map((row) => row.key), expected.map((row) => row.key));
|
|
195
|
+
const expectedByKey = new Map(expected.map((row) => [row.key, row]));
|
|
196
|
+
for (const row of actual)
|
|
197
|
+
compareValue(findings, `${label}:${row.key}`, row.raw_byte_digest, expectedByKey.get(row.key)?.raw_byte_digest ?? "missing");
|
|
198
|
+
}
|
|
199
|
+
function compareExactSet(findings, label, actual, expected) {
|
|
200
|
+
uniqueRows(actual, `${label}:actual`);
|
|
201
|
+
uniqueRows(expected, `${label}:expected`);
|
|
202
|
+
const left = [...actual].sort(compareText);
|
|
203
|
+
const right = [...expected].sort(compareText);
|
|
204
|
+
if (left.length !== right.length ||
|
|
205
|
+
left.some((value, index) => value !== right[index]))
|
|
206
|
+
findings.push(`set_mismatch:${label}`);
|
|
207
|
+
}
|
|
208
|
+
function compareValue(findings, label, actual, expected) {
|
|
209
|
+
if (actual !== expected)
|
|
210
|
+
findings.push(`identity_mismatch:${label}`);
|
|
211
|
+
}
|
|
212
|
+
function uniqueRows(values, label) {
|
|
213
|
+
if (new Set(values).size !== values.length)
|
|
214
|
+
throw new Error(`design_resource_recovery_invalid:audit_duplicate:${label}`);
|
|
215
|
+
}
|
|
216
|
+
function resourceBindingIdentity(resourceRef, requirementKey, deltaId) {
|
|
217
|
+
return `${resourceRef}\u0000${requirementKey}\u0000${deltaId}`;
|
|
218
|
+
}
|
|
219
|
+
function deltaTarget(deltaId, targetKey) {
|
|
220
|
+
return `${deltaId}\u0000${targetKey}`;
|
|
221
|
+
}
|
|
222
|
+
function compareText(left, right) {
|
|
223
|
+
return left < right ? -1 : left > right ? 1 : 0;
|
|
224
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { DesignResourceAuthoritySourceItem, DesignResourceDelegation, DesignResourceDelta, DesignResourceRecoveryCheckpoint, DesignResourceRecoveryCreateInput } from "./design-resource-recovery-types.js";
|
|
2
|
+
export declare function isDesignResourceAuthoritativeMeaningSourceKind(kind: string): boolean;
|
|
3
|
+
type RecoveryState = DesignResourceRecoveryCreateInput | DesignResourceRecoveryCheckpoint;
|
|
4
|
+
export declare function validateDesignResourceDeltaAuthority(delta: DesignResourceDelta, delegations: Map<string, DesignResourceDelegation>, authoritySources: Map<string, DesignResourceAuthoritySourceItem>): void;
|
|
5
|
+
export declare function indexDesignResourceDelegations(values: DesignResourceDelegation[], scope: Set<string>, authoritySources: Map<string, DesignResourceAuthoritySourceItem>): Map<string, DesignResourceDelegation>;
|
|
6
|
+
export declare function indexDesignResourceAuthoritySources(values: DesignResourceAuthoritySourceItem[]): Map<string, DesignResourceAuthoritySourceItem>;
|
|
7
|
+
export declare function validateDesignResourceBaseMaterialization(state: RecoveryState, authoritySources: Map<string, DesignResourceAuthoritySourceItem>): void;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
const AUTHORITATIVE_MEANING_SOURCE_KINDS = new Set([
|
|
2
|
+
"outcome_result",
|
|
3
|
+
"requirement",
|
|
4
|
+
"control",
|
|
5
|
+
"acceptance",
|
|
6
|
+
"technical_obligation",
|
|
7
|
+
"risk_fact",
|
|
8
|
+
]);
|
|
9
|
+
export function isDesignResourceAuthoritativeMeaningSourceKind(kind) {
|
|
10
|
+
return AUTHORITATIVE_MEANING_SOURCE_KINDS.has(kind);
|
|
11
|
+
}
|
|
12
|
+
export function validateDesignResourceDeltaAuthority(delta, delegations, authoritySources) {
|
|
13
|
+
validateDeltaSourceReferences(delta, authoritySources);
|
|
14
|
+
validateAcceptedAuthorityPresence(delta, authoritySources);
|
|
15
|
+
const delegation = validateDeltaDelegation(delta, delegations);
|
|
16
|
+
validateNonvisualMeaningSource(delta, delegation, authoritySources);
|
|
17
|
+
}
|
|
18
|
+
export function indexDesignResourceDelegations(values, scope, authoritySources) {
|
|
19
|
+
const result = new Map();
|
|
20
|
+
for (const value of values) {
|
|
21
|
+
if (result.has(value.key))
|
|
22
|
+
invalid(`delegation_duplicate:${value.key}`);
|
|
23
|
+
assertUnique(value.allowed_origins, `delegation_origin_duplicate:${value.key}`);
|
|
24
|
+
assertUnique(value.allowed_semantic_kinds, `delegation_semantic_kind_duplicate:${value.key}`);
|
|
25
|
+
assertUnique(value.allowed_target_keys, `delegation_target_duplicate:${value.key}`);
|
|
26
|
+
const source = authoritySources.get(value.source_ref);
|
|
27
|
+
if (!source)
|
|
28
|
+
invalid(`delegation_source_ref_unresolved:${value.key}`);
|
|
29
|
+
if (source.source_item_kind !== "decision")
|
|
30
|
+
invalid(`delegation_source_not_decision:${value.key}`);
|
|
31
|
+
assertSubset(new Set(value.allowed_target_keys), scope, `delegation_target_outside_scope:${value.key}`);
|
|
32
|
+
result.set(value.key, value);
|
|
33
|
+
}
|
|
34
|
+
return result;
|
|
35
|
+
}
|
|
36
|
+
export function indexDesignResourceAuthoritySources(values) {
|
|
37
|
+
const result = new Map();
|
|
38
|
+
const identities = new Set();
|
|
39
|
+
for (const value of values) {
|
|
40
|
+
if (result.has(value.source_ref))
|
|
41
|
+
invalid(`authority_source_ref_duplicate:${value.source_ref}`);
|
|
42
|
+
const identity = `${value.locator}\u0000${value.source_item_key}`;
|
|
43
|
+
if (identities.has(identity))
|
|
44
|
+
invalid(`authority_source_item_aliased:${value.locator}:${value.source_item_key}`);
|
|
45
|
+
identities.add(identity);
|
|
46
|
+
result.set(value.source_ref, value);
|
|
47
|
+
}
|
|
48
|
+
return result;
|
|
49
|
+
}
|
|
50
|
+
export function validateDesignResourceBaseMaterialization(state, authoritySources) {
|
|
51
|
+
if (state.base.materialization.kind !== "authorized-recovery-snapshot")
|
|
52
|
+
return;
|
|
53
|
+
const source = authoritySources.get(state.base.materialization.authorization_ref);
|
|
54
|
+
if (!source)
|
|
55
|
+
invalid("base_snapshot_authorization_ref_unresolved");
|
|
56
|
+
if (source.source_item_kind !== "decision")
|
|
57
|
+
invalid("base_snapshot_authorization_not_decision");
|
|
58
|
+
}
|
|
59
|
+
function validateDeltaSourceReferences(delta, authoritySources) {
|
|
60
|
+
for (const sourceRef of delta.source_refs)
|
|
61
|
+
if (!authoritySources.has(sourceRef))
|
|
62
|
+
invalid(`delta_source_ref_unresolved:${delta.delta_id}:${sourceRef}`);
|
|
63
|
+
}
|
|
64
|
+
function validateAcceptedAuthorityPresence(delta, authoritySources) {
|
|
65
|
+
if (delta.status !== "accepted")
|
|
66
|
+
return;
|
|
67
|
+
if (delta.origin !== "necessary-derived" &&
|
|
68
|
+
delta.decision_authority === "none")
|
|
69
|
+
invalid(`accepted_delta_authority_required:${delta.delta_id}`);
|
|
70
|
+
if (delta.origin === "provider-suggested" &&
|
|
71
|
+
delta.decision_authority !== "explicit-user" &&
|
|
72
|
+
!delta.decision_authority.startsWith("delegated:"))
|
|
73
|
+
invalid(`provider_suggestion_not_authorized:${delta.delta_id}`);
|
|
74
|
+
if (delta.origin === "provider-suggested" && !delta.evidence_refs.length)
|
|
75
|
+
invalid(`provider_suggestion_evidence_required:${delta.delta_id}`);
|
|
76
|
+
if (delta.decision_authority === "explicit-user" &&
|
|
77
|
+
!delta.source_refs.some((sourceRef) => authoritySources.get(sourceRef)?.source_item_kind === "decision"))
|
|
78
|
+
invalid(`explicit_user_source_decision_required:${delta.delta_id}`);
|
|
79
|
+
}
|
|
80
|
+
function validateDeltaDelegation(delta, delegations) {
|
|
81
|
+
if (!delta.decision_authority.startsWith("delegated:"))
|
|
82
|
+
return undefined;
|
|
83
|
+
const key = delta.decision_authority.slice("delegated:".length);
|
|
84
|
+
const delegation = delegations.get(key);
|
|
85
|
+
if (!delegation)
|
|
86
|
+
invalid(`delegation_not_found:${delta.delta_id}:${key}`);
|
|
87
|
+
if (!delta.source_refs.includes(delegation.source_ref))
|
|
88
|
+
invalid(`delegation_source_not_bound:${delta.delta_id}:${key}`);
|
|
89
|
+
if (!delegation.allowed_origins.includes(delta.origin))
|
|
90
|
+
invalid(`delegation_origin_not_allowed:${delta.delta_id}:${key}`);
|
|
91
|
+
if (!delegation.allowed_semantic_kinds.includes(delta.semantic_kind))
|
|
92
|
+
invalid(`delegation_semantic_kind_not_allowed:${delta.delta_id}:${key}`);
|
|
93
|
+
assertSubset(new Set(delta.target_keys), new Set(delegation.allowed_target_keys), `delegation_target_not_allowed:${delta.delta_id}:${key}`);
|
|
94
|
+
return delegation;
|
|
95
|
+
}
|
|
96
|
+
function validateNonvisualMeaningSource(delta, delegation, authoritySources) {
|
|
97
|
+
if (delta.status !== "accepted" || delta.semantic_kind === "exact-visual")
|
|
98
|
+
return;
|
|
99
|
+
const found = delta.source_refs.some((sourceRef) => {
|
|
100
|
+
if (sourceRef === delegation?.source_ref)
|
|
101
|
+
return false;
|
|
102
|
+
const kind = authoritySources.get(sourceRef)?.source_item_kind ?? "";
|
|
103
|
+
return (isDesignResourceAuthoritativeMeaningSourceKind(kind) ||
|
|
104
|
+
(delta.decision_authority === "explicit-user" && kind === "decision"));
|
|
105
|
+
});
|
|
106
|
+
if (!found)
|
|
107
|
+
invalid(`nonvisual_meaning_source_required:${delta.delta_id}`);
|
|
108
|
+
}
|
|
109
|
+
function assertUnique(values, code) {
|
|
110
|
+
if (new Set(values).size !== values.length)
|
|
111
|
+
invalid(code);
|
|
112
|
+
}
|
|
113
|
+
function assertSubset(candidate, owner, code) {
|
|
114
|
+
const outside = [...candidate].filter((value) => !owner.has(value));
|
|
115
|
+
if (outside.length)
|
|
116
|
+
invalid(`${code}:${outside.sort(compareText).join(",")}`);
|
|
117
|
+
}
|
|
118
|
+
function invalid(code) {
|
|
119
|
+
throw new Error(`design_resource_recovery_invalid:${code}`);
|
|
120
|
+
}
|
|
121
|
+
function compareText(left, right) {
|
|
122
|
+
return left < right ? -1 : left > right ? 1 : 0;
|
|
123
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { DesignResourceDelta, DesignResourceRecoveryCheckpoint, DesignResourceRecoveryCreateInput, DesignResourceSelectedResourceBinding } from "./design-resource-recovery-types.js";
|
|
2
|
+
type RecoveryState = DesignResourceRecoveryCreateInput | DesignResourceRecoveryCheckpoint;
|
|
3
|
+
export declare function indexDesignResourceSelectedResources(state: RecoveryState): Map<string, DesignResourceSelectedResourceBinding>;
|
|
4
|
+
export declare function validateDesignResourceDecisionCatalog(rows: RecoveryState["audit_expectations"]["resource_decisions"], deltasById: Map<string, DesignResourceDelta>, activeChangedByTarget: Map<string, string[]>, superseded: Set<string>, selectedResources: Map<string, DesignResourceSelectedResourceBinding>): void;
|
|
5
|
+
export declare function validateDesignResourceConditions(resourceRefs: string[], conditionRefs: string[], selected: Map<string, DesignResourceSelectedResourceBinding>, label: string): void;
|
|
6
|
+
export {};
|