kibi-cli 1.0.1 → 2.1.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/dist/cli-errors.d.ts +3 -1
- package/dist/cli-errors.d.ts.map +1 -1
- package/dist/cli-errors.js +4 -1
- package/dist/cli-json-command.d.ts +1 -0
- package/dist/cli-json-command.d.ts.map +1 -1
- package/dist/cli-json-command.js +13 -4
- package/dist/cli-operation-loader.js +3 -3
- package/dist/cli-operation-metadata.d.ts +4 -3
- package/dist/cli-operation-metadata.d.ts.map +1 -1
- package/dist/cli-operation-metadata.js +7 -5
- package/dist/cli-protocol.js +1 -1
- package/dist/cli-register-maintenance.d.ts.map +1 -1
- package/dist/cli-register-maintenance.js +7 -0
- package/dist/cli-register-proof.d.ts +3 -0
- package/dist/cli-register-proof.d.ts.map +1 -0
- package/dist/cli-register-proof.js +127 -0
- package/dist/cli-register-reporting.d.ts.map +1 -1
- package/dist/cli-register-reporting.js +7 -0
- package/dist/cli.d.ts +4 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +19 -10
- package/dist/commands/branch.d.ts +1 -0
- package/dist/commands/branch.d.ts.map +1 -1
- package/dist/commands/branch.js +8 -4
- package/dist/commands/check-generated.d.ts +7 -0
- package/dist/commands/check-generated.d.ts.map +1 -0
- package/dist/commands/check-generated.js +192 -0
- package/dist/commands/check.d.ts +14 -0
- package/dist/commands/check.d.ts.map +1 -1
- package/dist/commands/check.js +193 -46
- package/dist/commands/coverage.d.ts +1 -0
- package/dist/commands/coverage.d.ts.map +1 -1
- package/dist/commands/coverage.js +6 -0
- package/dist/commands/doctor.d.ts +22 -0
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +170 -23
- package/dist/commands/engine.d.ts +12 -0
- package/dist/commands/engine.d.ts.map +1 -1
- package/dist/commands/engine.js +42 -0
- package/dist/commands/github-init.d.ts +1 -0
- package/dist/commands/github-init.d.ts.map +1 -1
- package/dist/commands/github-init.js +9 -5
- package/dist/commands/init-helpers.d.ts.map +1 -1
- package/dist/commands/init-helpers.js +49 -10
- package/dist/commands/migrate.d.ts +4 -0
- package/dist/commands/migrate.d.ts.map +1 -1
- package/dist/commands/migrate.js +7 -7
- package/dist/commands/proof-explain.d.ts +10 -0
- package/dist/commands/proof-explain.d.ts.map +1 -0
- package/dist/commands/proof-explain.js +45 -0
- package/dist/commands/proof-impact.d.ts +7 -0
- package/dist/commands/proof-impact.d.ts.map +1 -0
- package/dist/commands/proof-impact.js +39 -0
- package/dist/commands/proof-migrate-legacy.d.ts +7 -0
- package/dist/commands/proof-migrate-legacy.d.ts.map +1 -0
- package/dist/commands/proof-migrate-legacy.js +45 -0
- package/dist/commands/proof-prune.d.ts +8 -0
- package/dist/commands/proof-prune.d.ts.map +1 -0
- package/dist/commands/proof-prune.js +53 -0
- package/dist/commands/prove.d.ts +37 -0
- package/dist/commands/prove.d.ts.map +1 -0
- package/dist/commands/prove.js +470 -0
- package/dist/commands/report.d.ts.map +1 -1
- package/dist/commands/report.js +18 -3
- package/dist/commands/sync/discovery.d.ts +3 -0
- package/dist/commands/sync/discovery.d.ts.map +1 -1
- package/dist/commands/sync/discovery.js +36 -28
- package/dist/commands/sync/manifest.d.ts +2 -1
- package/dist/commands/sync/manifest.d.ts.map +1 -1
- package/dist/commands/sync/manifest.js +55 -21
- package/dist/commands/sync/persistence.d.ts +4 -1
- package/dist/commands/sync/persistence.d.ts.map +1 -1
- package/dist/commands/sync/persistence.js +31 -14
- package/dist/commands/sync/staging.d.ts +1 -0
- package/dist/commands/sync/staging.d.ts.map +1 -1
- package/dist/commands/sync/staging.js +5 -2
- package/dist/commands/sync/untracked-targets.d.ts +24 -0
- package/dist/commands/sync/untracked-targets.d.ts.map +1 -0
- package/dist/commands/sync/untracked-targets.js +108 -0
- package/dist/commands/sync.d.ts +11 -1
- package/dist/commands/sync.d.ts.map +1 -1
- package/dist/commands/sync.js +74 -30
- package/dist/engine-daemon.d.ts +3 -1
- package/dist/engine-daemon.d.ts.map +1 -1
- package/dist/engine-daemon.js +49 -20
- package/dist/engine.d.ts +17 -77
- package/dist/engine.d.ts.map +1 -1
- package/dist/engine.js +331 -91
- package/dist/env/bootstrap.d.ts +84 -0
- package/dist/env/bootstrap.d.ts.map +1 -0
- package/dist/env/bootstrap.js +310 -0
- package/dist/extractors/manifest.d.ts +5 -0
- package/dist/extractors/manifest.d.ts.map +1 -1
- package/dist/extractors/manifest.js +46 -1
- package/dist/extractors/markdown.d.ts +7 -3
- package/dist/extractors/markdown.d.ts.map +1 -1
- package/dist/extractors/markdown.js +60 -24
- package/dist/extractors/playwright-cases.js +1 -1
- package/dist/extractors/relationships.d.ts +6 -0
- package/dist/extractors/relationships.d.ts.map +1 -1
- package/dist/extractors/relationships.js +1 -1
- package/dist/extractors/symbol-coordinates.d.ts.map +1 -1
- package/dist/extractors/symbols-coordinator.d.ts +8 -0
- package/dist/extractors/symbols-coordinator.d.ts.map +1 -1
- package/dist/extractors/symbols-coordinator.js +40 -0
- package/dist/extractors/symbols-ts.d.ts +9 -19
- package/dist/extractors/symbols-ts.d.ts.map +1 -1
- package/dist/extractors/symbols-ts.js +34 -429
- package/dist/intent-search.d.ts +1 -0
- package/dist/intent-search.d.ts.map +1 -1
- package/dist/intent-search.js +11 -8
- package/dist/logic/ir.d.ts +1 -0
- package/dist/logic/ir.d.ts.map +1 -1
- package/dist/logic/ir.js +1 -1
- package/dist/operations/bootstrap/activation.d.ts +2 -1
- package/dist/operations/bootstrap/activation.d.ts.map +1 -1
- package/dist/operations/bootstrap/activation.js +11 -3
- package/dist/operations/bootstrap/generate.d.ts +2 -1
- package/dist/operations/bootstrap/generate.d.ts.map +1 -1
- package/dist/operations/bootstrap/generate.js +6 -3
- package/dist/operations/bootstrap/guidance.d.ts +1 -0
- package/dist/operations/bootstrap/guidance.d.ts.map +1 -1
- package/dist/operations/bootstrap/guidance.js +1 -1
- package/dist/operations/modeling/model-requirement.d.ts +5 -0
- package/dist/operations/modeling/model-requirement.d.ts.map +1 -1
- package/dist/operations/modeling/model-requirement.js +57 -46
- package/dist/operations/modeling/predicate-applicability.d.ts.map +1 -1
- package/dist/operations/modeling/predicate-applicability.js +103 -4
- package/dist/operations/modeling/predicate-catalog-2.d.ts.map +1 -1
- package/dist/operations/modeling/predicate-catalog-2.js +18 -2
- package/dist/operations/modeling/predicate-catalog-3.d.ts.map +1 -1
- package/dist/operations/modeling/predicate-catalog-3.js +17 -1
- package/dist/operations/modeling/predicate-catalog-5.d.ts +10 -0
- package/dist/operations/modeling/predicate-catalog-5.d.ts.map +1 -0
- package/dist/operations/modeling/predicate-catalog-5.js +291 -0
- package/dist/operations/modeling/predicate-catalog.d.ts.map +1 -1
- package/dist/operations/modeling/predicate-catalog.js +4 -0
- package/dist/operations/modeling/predicate-loader.d.ts +1 -0
- package/dist/operations/modeling/predicate-loader.d.ts.map +1 -1
- package/dist/operations/modeling/predicate-loader.js +4 -3
- package/dist/operations/modeling/predicate-ranker.d.ts.map +1 -1
- package/dist/operations/modeling/predicate-ranker.js +4 -1
- package/dist/operations/modeling/predicate-types.d.ts +1 -1
- package/dist/operations/modeling/predicate-types.d.ts.map +1 -1
- package/dist/operations/modeling/predicate-usage-hints-4.d.ts +3 -0
- package/dist/operations/modeling/predicate-usage-hints-4.d.ts.map +1 -0
- package/dist/operations/modeling/predicate-usage-hints-4.js +84 -0
- package/dist/operations/modeling/suggest-predicates.d.ts +4 -2
- package/dist/operations/modeling/suggest-predicates.d.ts.map +1 -1
- package/dist/operations/modeling/suggest-predicates.js +82 -22
- package/dist/operations/mutation/contradictions.d.ts +2 -1
- package/dist/operations/mutation/contradictions.d.ts.map +1 -1
- package/dist/operations/mutation/contradictions.js +26 -5
- package/dist/operations/mutation/delete.d.ts +3 -0
- package/dist/operations/mutation/delete.d.ts.map +1 -1
- package/dist/operations/mutation/delete.js +100 -32
- package/dist/operations/mutation/relationships.d.ts +1 -0
- package/dist/operations/mutation/relationships.d.ts.map +1 -1
- package/dist/operations/mutation/relationships.js +6 -4
- package/dist/operations/mutation/saga.d.ts +51 -0
- package/dist/operations/mutation/saga.d.ts.map +1 -0
- package/dist/operations/mutation/saga.js +67 -0
- package/dist/operations/mutation/serialization.d.ts.map +1 -1
- package/dist/operations/mutation/serialization.js +3 -2
- package/dist/operations/mutation/source-authoring.d.ts +5 -1
- package/dist/operations/mutation/source-authoring.d.ts.map +1 -1
- package/dist/operations/mutation/source-authoring.js +79 -46
- package/dist/operations/mutation/strict-fact.d.ts +1 -0
- package/dist/operations/mutation/strict-fact.d.ts.map +1 -1
- package/dist/operations/mutation/strict-fact.js +8 -5
- package/dist/operations/mutation/symbol-compiler-lock.d.ts +5 -2
- package/dist/operations/mutation/symbol-compiler-lock.d.ts.map +1 -1
- package/dist/operations/mutation/symbol-compiler-lock.js +65 -2
- package/dist/operations/mutation/symbol-granularity.d.ts.map +1 -1
- package/dist/operations/mutation/symbol-granularity.js +11 -89
- package/dist/operations/mutation/symbol-refresh.d.ts +1 -0
- package/dist/operations/mutation/symbol-refresh.d.ts.map +1 -1
- package/dist/operations/mutation/symbol-refresh.js +10 -8
- package/dist/operations/mutation/upsert.d.ts +18 -2
- package/dist/operations/mutation/upsert.d.ts.map +1 -1
- package/dist/operations/mutation/upsert.js +86 -54
- package/dist/operations/mutation/validate-upsert.js +2 -2
- package/dist/operations/mutation/validation.d.ts.map +1 -1
- package/dist/operations/mutation/validation.js +46 -4
- package/dist/operations/mutation/warnings.d.ts +1 -0
- package/dist/operations/mutation/warnings.d.ts.map +1 -1
- package/dist/operations/mutation/warnings.js +7 -5
- package/dist/operations/mutation/workspace-mutation-lock.d.ts +60 -0
- package/dist/operations/mutation/workspace-mutation-lock.d.ts.map +1 -0
- package/dist/operations/mutation/workspace-mutation-lock.js +362 -0
- package/dist/operations/planning/apply-plan.d.ts +8 -106
- package/dist/operations/planning/apply-plan.d.ts.map +1 -1
- package/dist/operations/planning/apply-plan.js +113 -36
- package/dist/operations/planning/compile-intent.d.ts +51 -0
- package/dist/operations/planning/compile-intent.d.ts.map +1 -1
- package/dist/operations/planning/compile-intent.js +133 -17
- package/dist/operations/proof/baseline-diff.d.ts +41 -0
- package/dist/operations/proof/baseline-diff.d.ts.map +1 -0
- package/dist/operations/proof/baseline-diff.js +153 -0
- package/dist/operations/proof/explain.d.ts +75 -0
- package/dist/operations/proof/explain.d.ts.map +1 -0
- package/dist/operations/proof/explain.js +294 -0
- package/dist/operations/proof/impact.d.ts +45 -0
- package/dist/operations/proof/impact.d.ts.map +1 -0
- package/dist/operations/proof/impact.js +118 -0
- package/dist/operations/proof/ingest-proof.d.ts +34 -0
- package/dist/operations/proof/ingest-proof.d.ts.map +1 -0
- package/dist/operations/proof/ingest-proof.js +348 -0
- package/dist/operations/proof/migrate-legacy-receipts.d.ts +30 -0
- package/dist/operations/proof/migrate-legacy-receipts.d.ts.map +1 -0
- package/dist/operations/proof/migrate-legacy-receipts.js +92 -0
- package/dist/operations/proof/prune-receipts.d.ts +35 -0
- package/dist/operations/proof/prune-receipts.d.ts.map +1 -0
- package/dist/operations/proof/prune-receipts.js +91 -0
- package/dist/operations/proof/receipt-document.d.ts +29 -0
- package/dist/operations/proof/receipt-document.d.ts.map +1 -0
- package/dist/operations/proof/receipt-document.js +117 -0
- package/dist/operations/semantic-advisor/analysis-receipt.d.ts.map +1 -1
- package/dist/operations/semantic-advisor/analysis-receipt.js +3 -9
- package/dist/operations/semantic-advisor/analyze-prose.d.ts +1 -0
- package/dist/operations/semantic-advisor/analyze-prose.d.ts.map +1 -1
- package/dist/operations/semantic-advisor/analyze-prose.js +64 -93
- package/dist/operations/semantic-advisor/clauses.d.ts.map +1 -1
- package/dist/operations/semantic-advisor/clauses.js +20 -7
- package/dist/operations/semantic-advisor/plugin-orchestration.d.ts +63 -0
- package/dist/operations/semantic-advisor/plugin-orchestration.d.ts.map +1 -0
- package/dist/operations/semantic-advisor/plugin-orchestration.js +489 -0
- package/dist/operations/semantic-advisor/predicate-rules-core.d.ts +15 -2
- package/dist/operations/semantic-advisor/predicate-rules-core.d.ts.map +1 -1
- package/dist/operations/semantic-advisor/predicate-rules-core.js +7 -140
- package/dist/operations/semantic-advisor/predicate-rules-launcher.d.ts +11 -12
- package/dist/operations/semantic-advisor/predicate-rules-launcher.d.ts.map +1 -1
- package/dist/operations/semantic-advisor/predicate-rules-launcher.js +6 -94
- package/dist/operations/semantic-advisor/predicate-rules-policy.d.ts +16 -0
- package/dist/operations/semantic-advisor/predicate-rules-policy.d.ts.map +1 -1
- package/dist/operations/semantic-advisor/predicate-rules-policy.js +7 -150
- package/dist/operations/semantic-advisor/predicate-rules-product-tail.d.ts +9 -0
- package/dist/operations/semantic-advisor/predicate-rules-product-tail.d.ts.map +1 -1
- package/dist/operations/semantic-advisor/predicate-rules-product-tail.js +7 -102
- package/dist/operations/semantic-advisor/predicate-rules-product.d.ts +13 -0
- package/dist/operations/semantic-advisor/predicate-rules-product.d.ts.map +1 -1
- package/dist/operations/semantic-advisor/predicate-rules-product.js +7 -133
- package/dist/operations/semantic-advisor/strict-count-rules.d.ts +2 -0
- package/dist/operations/semantic-advisor/strict-count-rules.d.ts.map +1 -1
- package/dist/operations/semantic-advisor/strict-count-rules.js +40 -25
- package/dist/operations/semantic-advisor/types.d.ts +1 -0
- package/dist/operations/semantic-advisor/types.d.ts.map +1 -1
- package/dist/plugins/compose-ontology-packs.d.ts +51 -0
- package/dist/plugins/compose-ontology-packs.d.ts.map +1 -0
- package/dist/plugins/compose-ontology-packs.js +257 -0
- package/dist/plugins/compose-semantic-classifier.d.ts +42 -0
- package/dist/plugins/compose-semantic-classifier.d.ts.map +1 -0
- package/dist/plugins/compose-semantic-classifier.js +211 -0
- package/dist/plugins/external-allowlist.d.ts +10 -0
- package/dist/plugins/external-allowlist.d.ts.map +1 -0
- package/dist/plugins/external-allowlist.js +16 -0
- package/dist/plugins/index.d.ts +9 -0
- package/dist/plugins/index.d.ts.map +1 -0
- package/dist/plugins/index.js +33 -0
- package/dist/plugins/load-plugin.d.ts +19 -0
- package/dist/plugins/load-plugin.d.ts.map +1 -0
- package/dist/plugins/load-plugin.js +59 -0
- package/dist/plugins/project-config.d.ts +28 -0
- package/dist/plugins/project-config.d.ts.map +1 -0
- package/dist/plugins/project-config.js +90 -0
- package/dist/plugins/registry.d.ts +93 -0
- package/dist/plugins/registry.d.ts.map +1 -0
- package/dist/plugins/registry.js +338 -0
- package/dist/plugins/resolve-package.d.ts +47 -0
- package/dist/plugins/resolve-package.d.ts.map +1 -0
- package/dist/plugins/resolve-package.js +262 -0
- package/dist/plugins/source-analysis-service.d.ts +44 -0
- package/dist/plugins/source-analysis-service.d.ts.map +1 -0
- package/dist/plugins/source-analysis-service.js +232 -0
- package/dist/prolog/codec.d.ts +13 -1
- package/dist/prolog/codec.d.ts.map +1 -1
- package/dist/prolog/codec.js +269 -154
- package/dist/prolog/error-terms.d.ts +47 -0
- package/dist/prolog/error-terms.d.ts.map +1 -0
- package/dist/prolog/error-terms.js +334 -0
- package/dist/prolog/janitor.d.ts +50 -0
- package/dist/prolog/janitor.d.ts.map +1 -0
- package/dist/prolog/janitor.js +154 -0
- package/dist/prolog/store-lock.d.ts +45 -0
- package/dist/prolog/store-lock.d.ts.map +1 -0
- package/dist/prolog/store-lock.js +195 -0
- package/dist/prolog.d.ts +7 -0
- package/dist/prolog.d.ts.map +1 -1
- package/dist/prolog.js +55 -17
- package/dist/proof/evaluate.d.ts +27 -0
- package/dist/proof/evaluate.d.ts.map +1 -0
- package/dist/proof/evaluate.js +151 -0
- package/dist/proof/inspect.d.ts +12 -0
- package/dist/proof/inspect.d.ts.map +1 -0
- package/dist/proof/inspect.js +236 -0
- package/dist/proof/integrations.d.ts +35 -0
- package/dist/proof/integrations.d.ts.map +1 -0
- package/dist/proof/integrations.js +123 -0
- package/dist/proof/producers/junit-adapter.d.ts +26 -0
- package/dist/proof/producers/junit-adapter.d.ts.map +1 -0
- package/dist/proof/producers/junit-adapter.js +186 -0
- package/dist/{public → proof/producers}/playwright-case-id.d.ts +1 -1
- package/dist/proof/producers/playwright-case-id.d.ts.map +1 -0
- package/dist/{public → proof/producers}/playwright-case-id.js +1 -1
- package/dist/proof/producers/playwright-reporter.d.ts +27 -0
- package/dist/proof/producers/playwright-reporter.d.ts.map +1 -0
- package/dist/proof/producers/playwright-reporter.js +138 -0
- package/dist/proof/producers/tap-adapter.d.ts +10 -0
- package/dist/proof/producers/tap-adapter.d.ts.map +1 -0
- package/dist/proof/producers/tap-adapter.js +200 -0
- package/dist/proof/receipt-outcome.d.ts +2 -0
- package/dist/proof/receipt-outcome.d.ts.map +1 -0
- package/dist/proof/receipt-outcome.js +1 -0
- package/dist/public/diagnostic-usage.js +6 -6
- package/dist/public/distribution-parity.d.ts +7 -1
- package/dist/public/distribution-parity.d.ts.map +1 -1
- package/dist/public/distribution-parity.js +15 -10
- package/dist/public/extractors/symbols-coordinator.d.ts +1 -1
- package/dist/public/extractors/symbols-coordinator.d.ts.map +1 -1
- package/dist/public/extractors/symbols-coordinator.js +1 -1
- package/dist/public/impact/analyzer.d.ts +1 -1
- package/dist/public/impact/analyzer.d.ts.map +1 -1
- package/dist/public/impact/analyzer.js +6 -4
- package/dist/public/impact/coverage-depth-quality.d.ts +1 -0
- package/dist/public/impact/coverage-depth-quality.d.ts.map +1 -1
- package/dist/public/impact/coverage-depth-quality.js +1 -1
- package/dist/public/impact/diagnostics.d.ts.map +1 -1
- package/dist/public/impact/diagnostics.js +2 -2
- package/dist/public/impact/diff-meaning.d.ts +1 -0
- package/dist/public/impact/diff-meaning.d.ts.map +1 -1
- package/dist/public/impact/diff-meaning.js +5 -2
- package/dist/public/impact/full-kb-quality.d.ts +5 -2
- package/dist/public/impact/full-kb-quality.d.ts.map +1 -1
- package/dist/public/impact/full-kb-quality.js +329 -64
- package/dist/public/operations/catalog.d.ts +450 -196
- package/dist/public/operations/catalog.d.ts.map +1 -1
- package/dist/public/operations/catalog.js +6 -4
- package/dist/public/operations/check-executor.d.ts.map +1 -1
- package/dist/public/operations/check-executor.js +4 -8
- package/dist/public/operations/check-helpers.d.ts +1 -1
- package/dist/public/operations/check-helpers.d.ts.map +1 -1
- package/dist/public/operations/check-helpers.js +1 -1
- package/dist/public/operations/contracts.d.ts +7 -0
- package/dist/public/operations/contracts.d.ts.map +1 -1
- package/dist/public/operations/contracts.js +66 -34
- package/dist/public/operations/discovery-entities.d.ts +15 -0
- package/dist/public/operations/discovery-entities.d.ts.map +1 -1
- package/dist/public/operations/discovery-entities.js +38 -0
- package/dist/public/operations/discovery-executors.d.ts +9 -9
- package/dist/public/operations/discovery-executors.d.ts.map +1 -1
- package/dist/public/operations/discovery-executors.js +39 -31
- package/dist/public/operations/index.d.ts +1 -1
- package/dist/public/operations/index.d.ts.map +1 -1
- package/dist/public/operations/index.js +1 -1
- package/dist/public/operations/migration-plan.d.ts +4 -3
- package/dist/public/operations/migration-plan.d.ts.map +1 -1
- package/dist/public/operations/migration-plan.js +23 -21
- package/dist/public/operations/node-ports.js +6 -6
- package/dist/public/operations/prolog-json.d.ts +1 -1
- package/dist/public/operations/prolog-json.d.ts.map +1 -1
- package/dist/public/operations/prolog-json.js +7 -7
- package/dist/public/operations/repair-plan.d.ts +3 -3
- package/dist/public/operations/repair-plan.d.ts.map +1 -1
- package/dist/public/operations/repair-plan.js +49 -19
- package/dist/public/operations/result-envelope.d.ts +1 -0
- package/dist/public/operations/result-envelope.d.ts.map +1 -1
- package/dist/public/operations/result-envelope.js +12 -10
- package/dist/public/operations/runtime-types.d.ts +21 -1
- package/dist/public/operations/runtime-types.d.ts.map +1 -1
- package/dist/public/operations/specs/check-rules.generated.d.ts +5 -0
- package/dist/public/operations/specs/check-rules.generated.d.ts.map +1 -0
- package/dist/public/operations/specs/check-rules.generated.js +35 -0
- package/dist/public/operations/specs/check.d.ts +7 -2
- package/dist/public/operations/specs/check.d.ts.map +1 -1
- package/dist/public/operations/specs/check.js +8 -20
- package/dist/public/operations/specs/discovery.d.ts +3 -0
- package/dist/public/operations/specs/discovery.d.ts.map +1 -1
- package/dist/public/operations/specs/discovery.js +3 -0
- package/dist/public/operations/specs/mutation-schemas.d.ts +257 -163
- package/dist/public/operations/specs/mutation-schemas.d.ts.map +1 -1
- package/dist/public/operations/specs/mutation-schemas.js +15 -7
- package/dist/public/operations/specs/planning.d.ts +9 -0
- package/dist/public/operations/specs/planning.d.ts.map +1 -1
- package/dist/public/operations/specs/planning.js +6 -0
- package/dist/public/operations/specs/proof.d.ts +212 -0
- package/dist/public/operations/specs/proof.d.ts.map +1 -0
- package/dist/public/operations/specs/proof.js +30 -0
- package/dist/public/operations/specs/reporting.d.ts +20 -0
- package/dist/public/operations/specs/reporting.d.ts.map +1 -1
- package/dist/public/operations/specs/reporting.js +112 -12
- package/dist/public/operations/specs/semantic.d.ts +1 -1
- package/dist/public/operations/specs/semantic.d.ts.map +1 -1
- package/dist/public/operations/specs/semantic.js +54 -4
- package/dist/public/operations/specs/upsert.d.ts +257 -163
- package/dist/public/operations/specs/upsert.d.ts.map +1 -1
- package/dist/public/operations/symbol-repair-plan.d.ts +11 -0
- package/dist/public/operations/symbol-repair-plan.d.ts.map +1 -1
- package/dist/public/operations/symbol-repair-plan.js +121 -4
- package/dist/public/operations/types.d.ts +6 -1
- package/dist/public/operations/types.d.ts.map +1 -1
- package/dist/public/proof-fingerprint.d.ts +54 -0
- package/dist/public/proof-fingerprint.d.ts.map +1 -0
- package/dist/public/proof-fingerprint.js +141 -0
- package/dist/public/proof-protocol.d.ts +354 -0
- package/dist/public/proof-protocol.d.ts.map +1 -0
- package/dist/public/proof-protocol.js +454 -0
- package/dist/public/proof-receipt.d.ts +279 -0
- package/dist/public/proof-receipt.d.ts.map +1 -0
- package/dist/public/proof-receipt.js +377 -0
- package/dist/public/schemas/entity.d.ts.map +1 -1
- package/dist/public/schemas/entity.js +21 -7
- package/dist/public/skills/kibi-freshness/SKILL.md +1 -1
- package/dist/public/skills/kibi-usage/SKILL.md +44 -12
- package/dist/public/skills/kibi-usage/resources/operation-access.md +1 -1
- package/dist/public/skills/kibi-usage/resources/proof.md +150 -0
- package/dist/public/skills/kibi-usage/resources/workflows.md +6 -6
- package/dist/public/symbol-granularity.d.ts +3 -14
- package/dist/public/symbol-granularity.d.ts.map +1 -1
- package/dist/public/symbol-granularity.generated.d.ts +16 -0
- package/dist/public/symbol-granularity.generated.d.ts.map +1 -0
- package/dist/public/symbol-granularity.generated.js +53 -0
- package/dist/public/symbol-granularity.js +6 -47
- package/dist/public/telemetry-acceptance.d.ts +3 -77
- package/dist/public/telemetry-acceptance.d.ts.map +1 -1
- package/dist/public/telemetry-acceptance.js +4 -2
- package/dist/public/telemetry-remediation.js +1 -1
- package/dist/report/html-report.css +1240 -0
- package/dist/report/html-report.d.ts +4 -2
- package/dist/report/html-report.d.ts.map +1 -1
- package/dist/report/html-report.js +37 -300
- package/dist/runtime/cli-runtime.d.ts +2 -0
- package/dist/runtime/cli-runtime.d.ts.map +1 -1
- package/dist/runtime/cli-runtime.js +32 -7
- package/dist/schemas/entity.schema.json +355 -215
- package/dist/search-ranking.d.ts +1 -0
- package/dist/search-ranking.d.ts.map +1 -1
- package/dist/search-ranking.js +3 -0
- package/dist/traceability/evidence-model.d.ts +28 -0
- package/dist/traceability/evidence-model.d.ts.map +1 -1
- package/dist/traceability/git-staged.d.ts +20 -0
- package/dist/traceability/git-staged.d.ts.map +1 -1
- package/dist/traceability/git-staged.js +145 -1
- package/dist/traceability/staged-diagnostics.d.ts +7 -0
- package/dist/traceability/staged-diagnostics.d.ts.map +1 -1
- package/dist/traceability/staged-diagnostics.js +78 -7
- package/dist/traceability/staged-file-coverage.d.ts +33 -0
- package/dist/traceability/staged-file-coverage.d.ts.map +1 -0
- package/dist/traceability/staged-file-coverage.js +284 -0
- package/dist/traceability/staged-impact-contract.js +4 -4
- package/dist/traceability/staged-symbols-manifest.d.ts +13 -0
- package/dist/traceability/staged-symbols-manifest.d.ts.map +1 -1
- package/dist/traceability/staged-symbols-manifest.js +138 -27
- package/dist/traceability/symbol-extract.d.ts +24 -2
- package/dist/traceability/symbol-extract.d.ts.map +1 -1
- package/dist/traceability/symbol-extract.js +64 -208
- package/dist/traceability/temp-kb.d.ts +2 -0
- package/dist/traceability/temp-kb.d.ts.map +1 -1
- package/dist/traceability/temp-kb.js +13 -4
- package/dist/types/entities.d.ts +5 -3
- package/dist/types/entities.d.ts.map +1 -1
- package/dist/utils/branch-resolver.d.ts +1 -0
- package/dist/utils/branch-resolver.d.ts.map +1 -1
- package/dist/utils/branch-resolver.js +7 -4
- package/dist/utils/branch-store.d.ts +6 -0
- package/dist/utils/branch-store.d.ts.map +1 -1
- package/dist/utils/branch-store.js +27 -0
- package/dist/utils/kb-paths.d.ts +1 -1
- package/dist/utils/kb-paths.d.ts.map +1 -1
- package/dist/utils/kb-paths.js +1 -1
- package/dist/utils/rule-registry.d.ts +1 -11
- package/dist/utils/rule-registry.d.ts.map +1 -1
- package/dist/utils/rule-registry.generated.d.ts +102 -0
- package/dist/utils/rule-registry.generated.d.ts.map +1 -0
- package/dist/utils/rule-registry.generated.js +131 -0
- package/dist/utils/rule-registry.js +12 -113
- package/dist/utils/strict-modeling.d.ts +1 -0
- package/dist/utils/strict-modeling.d.ts.map +1 -1
- package/dist/utils/strict-modeling.js +1 -1
- package/package.json +20 -20
- package/src/public/diagnostic-usage.ts +6 -6
- package/src/public/distribution-parity.ts +17 -10
- package/src/public/extractors/symbols-coordinator.ts +1 -0
- package/src/public/impact/analyzer.ts +15 -12
- package/src/public/impact/coverage-depth-quality.ts +1 -1
- package/src/public/impact/diagnostics.ts +2 -1
- package/src/public/impact/diff-meaning.ts +11 -4
- package/src/public/impact/full-kb-quality.ts +463 -72
- package/src/public/operations/catalog.ts +10 -4
- package/src/public/operations/check-executor.ts +4 -8
- package/src/public/operations/check-helpers.ts +2 -2
- package/src/public/operations/contracts.ts +78 -34
- package/src/public/operations/discovery-entities.ts +53 -0
- package/src/public/operations/discovery-executors.ts +64 -48
- package/src/public/operations/index.ts +1 -1
- package/src/public/operations/migration-plan.ts +32 -25
- package/src/public/operations/node-ports.ts +6 -6
- package/src/public/operations/prolog-json.ts +13 -5
- package/src/public/operations/repair-plan.ts +60 -23
- package/src/public/operations/result-envelope.ts +15 -10
- package/src/public/operations/runtime-types.ts +26 -2
- package/src/public/operations/specs/check-rules.generated.ts +38 -0
- package/src/public/operations/specs/check.ts +12 -21
- package/src/public/operations/specs/discovery.ts +3 -0
- package/src/public/operations/specs/mutation-schemas.ts +22 -9
- package/src/public/operations/specs/planning.ts +7 -0
- package/src/public/operations/specs/proof.ts +43 -0
- package/src/public/operations/specs/reporting.ts +140 -13
- package/src/public/operations/specs/semantic.ts +79 -17
- package/src/public/operations/symbol-repair-plan.ts +166 -7
- package/src/public/operations/types.ts +6 -1
- package/src/public/proof-fingerprint.ts +216 -0
- package/src/public/proof-protocol-types.d.ts +96 -0
- package/src/public/proof-protocol.ts +589 -0
- package/src/public/proof-receipt.ts +499 -0
- package/src/public/schemas/entity.ts +26 -10
- package/src/public/skills/kibi-freshness/SKILL.md +1 -1
- package/src/public/skills/kibi-usage/SKILL.md +44 -12
- package/src/public/skills/kibi-usage/resources/operation-access.md +1 -1
- package/src/public/skills/kibi-usage/resources/proof.md +150 -0
- package/src/public/skills/kibi-usage/resources/workflows.md +6 -6
- package/src/public/symbol-granularity.generated.ts +74 -0
- package/src/public/symbol-granularity.ts +34 -59
- package/src/public/telemetry-acceptance-types.d.ts +98 -0
- package/src/public/telemetry-acceptance.ts +22 -100
- package/src/public/telemetry-remediation.ts +1 -1
- package/src/schemas/entity.schema.json +355 -215
- package/dist/cli-register-verification.d.ts +0 -3
- package/dist/cli-register-verification.d.ts.map +0 -1
- package/dist/cli-register-verification.js +0 -16
- package/dist/commands/verify.d.ts +0 -10
- package/dist/commands/verify.d.ts.map +0 -1
- package/dist/commands/verify.js +0 -126
- package/dist/operations/verification/ingest-verification.d.ts +0 -29
- package/dist/operations/verification/ingest-verification.d.ts.map +0 -1
- package/dist/operations/verification/ingest-verification.js +0 -192
- package/dist/public/operations/specs/verification.d.ts +0 -78
- package/dist/public/operations/specs/verification.d.ts.map +0 -1
- package/dist/public/operations/specs/verification.js +0 -62
- package/dist/public/playwright-case-id.d.ts.map +0 -1
- package/dist/public/verification-receipt.d.ts +0 -242
- package/dist/public/verification-receipt.d.ts.map +0 -1
- package/dist/public/verification-receipt.js +0 -296
- package/dist/verification/playwright-reporter.d.ts +0 -21
- package/dist/verification/playwright-reporter.d.ts.map +0 -1
- package/dist/verification/playwright-reporter.js +0 -114
- package/src/public/operations/specs/verification.ts +0 -78
- package/src/public/playwright-case-id.ts +0 -35
- package/src/public/verification-receipt.ts +0 -412
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PROOF_BINDINGS_SCHEMA, PROOF_CONTRACT_SCHEMA, } from "../../proof-protocol.js";
|
|
2
|
+
import { MAX_PROOF_RECEIPTS, PROOF_RECEIPT_SCHEMA, } from "../../proof-receipt.js";
|
|
2
3
|
export const ENTITY_TYPES = [
|
|
3
4
|
"req",
|
|
4
5
|
"scenario",
|
|
@@ -129,12 +130,19 @@ export const ENTITY_PROPERTIES_SCHEMA = {
|
|
|
129
130
|
enum: ["internal", "consumer"],
|
|
130
131
|
description: "Optional typed verification perspective for test entities. Example: 'consumer'.",
|
|
131
132
|
},
|
|
132
|
-
|
|
133
|
-
|
|
133
|
+
proof_contract: {
|
|
134
|
+
...PROOF_CONTRACT_SCHEMA,
|
|
135
|
+
description: "Semantic proof contract binding this test to explicit proof obligations executed by one configured integration.",
|
|
136
|
+
},
|
|
137
|
+
proof_bindings: {
|
|
138
|
+
...PROOF_BINDINGS_SCHEMA,
|
|
139
|
+
description: "Optional native-runner bindings (native ids, aliases, source coordinates) for proof obligations. Bindings are provenance metadata and never replace the semantic contract.",
|
|
140
|
+
},
|
|
141
|
+
proof_receipts: {
|
|
134
142
|
type: "array",
|
|
135
|
-
maxItems:
|
|
136
|
-
items:
|
|
137
|
-
description: "Append-only
|
|
143
|
+
maxItems: MAX_PROOF_RECEIPTS,
|
|
144
|
+
items: PROOF_RECEIPT_SCHEMA,
|
|
145
|
+
description: "Append-only proof evidence. Proof accepts only the newest valid passed receipt bound to the current code snapshot, current contract hash, and effective execution fingerprint within the seven-day freshness window. Ingest rotates the oldest entries at the cap.",
|
|
138
146
|
},
|
|
139
147
|
fact_kind: {
|
|
140
148
|
type: "string",
|
|
@@ -285,7 +293,7 @@ export const ENTITY_PROPERTIES_SCHEMA = {
|
|
|
285
293
|
allOf: [
|
|
286
294
|
CLAIM_PROVENANCE_CONDITIONAL,
|
|
287
295
|
{
|
|
288
|
-
if: { required: ["
|
|
296
|
+
if: { required: ["proof_receipts"] },
|
|
289
297
|
// biome-ignore lint/suspicious/noThenProperty: JSON Schema conditional keyword.
|
|
290
298
|
then: { required: ["verification_scope"] },
|
|
291
299
|
},
|
|
@@ -179,6 +179,15 @@ export declare const compileIntentSpec: {
|
|
|
179
179
|
readonly type: "string";
|
|
180
180
|
readonly minLength: 1;
|
|
181
181
|
};
|
|
182
|
+
readonly scenarioIds: {
|
|
183
|
+
readonly type: "array";
|
|
184
|
+
readonly items: {
|
|
185
|
+
readonly type: "string";
|
|
186
|
+
readonly minLength: 1;
|
|
187
|
+
};
|
|
188
|
+
readonly maxItems: 20;
|
|
189
|
+
readonly description: "Stable scenario draft IDs verified by this test. Required when multiple scenario drafts are supplied.";
|
|
190
|
+
};
|
|
182
191
|
readonly verificationScope: {
|
|
183
192
|
readonly type: "string";
|
|
184
193
|
readonly enum: readonly ["unit", "integration", "end_to_end"];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"planning.d.ts","sourceRoot":"","sources":["../../../../src/public/operations/specs/planning.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,gBAAgB,EACjB,MAAM,4CAA4C,CAAC;AACpD,OAAO,EAGL,oBAAoB,EACrB,MAAM,gDAAgD,CAAC;AAGxD,YAAY,EACV,iBAAiB,EACjB,aAAa,EACb,oBAAoB,EACpB,gBAAgB,EAChB,aAAa,EACb,SAAS,EACT,oBAAoB,GACrB,MAAM,gDAAgD,CAAC;AACxD,YAAY,EACV,aAAa,EACb,eAAe,GAChB,MAAM,4CAA4C,CAAC;AACpD,YAAY,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,4CAA4C,CAAC;AAC9E,OAAO,EAAE,oBAAoB,EAAE,MAAM,gDAAgD,CAAC;AAGtF,eAAO,MAAM,iBAAiB
|
|
1
|
+
{"version":3,"file":"planning.d.ts","sourceRoot":"","sources":["../../../../src/public/operations/specs/planning.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,gBAAgB,EACjB,MAAM,4CAA4C,CAAC;AACpD,OAAO,EAGL,oBAAoB,EACrB,MAAM,gDAAgD,CAAC;AAGxD,YAAY,EACV,iBAAiB,EACjB,aAAa,EACb,oBAAoB,EACpB,gBAAgB,EAChB,aAAa,EACb,SAAS,EACT,oBAAoB,GACrB,MAAM,gDAAgD,CAAC;AACxD,YAAY,EACV,aAAa,EACb,eAAe,GAChB,MAAM,4CAA4C,CAAC;AACpD,YAAY,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,4CAA4C,CAAC;AAC9E,OAAO,EAAE,oBAAoB,EAAE,MAAM,gDAAgD,CAAC;AAGtF,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0JsC,CAAC;AAGrE,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqDwC,CAAC"}
|
|
@@ -108,6 +108,12 @@ export const compileIntentSpec = {
|
|
|
108
108
|
id: { type: "string" },
|
|
109
109
|
title: { type: "string", minLength: 1 },
|
|
110
110
|
body: { type: "string", minLength: 1 },
|
|
111
|
+
scenarioIds: {
|
|
112
|
+
type: "array",
|
|
113
|
+
items: { type: "string", minLength: 1 },
|
|
114
|
+
maxItems: 20,
|
|
115
|
+
description: "Stable scenario draft IDs verified by this test. Required when multiple scenario drafts are supplied.",
|
|
116
|
+
},
|
|
111
117
|
verificationScope: {
|
|
112
118
|
type: "string",
|
|
113
119
|
enum: ["unit", "integration", "end_to_end"],
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
import { executeIngestProof } from "../../../operations/proof/ingest-proof.js";
|
|
2
|
+
export type { IngestProofArgs, IngestProofResult, } from "../../../operations/proof/ingest-proof.js";
|
|
3
|
+
export { executeIngestProof } from "../../../operations/proof/ingest-proof.js";
|
|
4
|
+
export declare const ingestProofSpec: {
|
|
5
|
+
readonly name: "kb_ingest_proof";
|
|
6
|
+
readonly cliName: "ingest-proof";
|
|
7
|
+
readonly description: "Ingest a producer-emitted kibi.proof-run.v1 artifact and evaluate it against each selected test's kibi.proof-contract.v1 proof obligations. Revalidates the live workspace snapshot, integration command binding, run-level outcome, attempt history, success policy, and append-only proof-receipt history before deriving and appending idempotent kibi.proof-receipt.v1 receipts. Producers report what happened; Kibi evaluates proof. Prefer `kibi prove` so the configured producer runs automatically; direct ingestion is an integration path for custom producers and agents.";
|
|
8
|
+
readonly businessInputSchema: {
|
|
9
|
+
readonly type: "object";
|
|
10
|
+
readonly required: readonly ["snapshot", "artifact"];
|
|
11
|
+
readonly properties: {
|
|
12
|
+
readonly snapshot: {
|
|
13
|
+
readonly type: "string";
|
|
14
|
+
readonly pattern: "^[a-f0-9]{64}$";
|
|
15
|
+
readonly description: "Workspace snapshot captured immediately before the run.";
|
|
16
|
+
};
|
|
17
|
+
readonly artifact: {
|
|
18
|
+
readonly type: "object";
|
|
19
|
+
readonly description: "Producer-emitted kibi.proof-run.v1 proof artifact. Producers report what happened; Kibi evaluates proof obligations and policies. Produce it via `kibi prove` or direct kb_ingest_proof calls.";
|
|
20
|
+
readonly required: readonly ["version", "producer", "command_argv", "code_snapshot", "environment", "run", "proof_results"];
|
|
21
|
+
readonly properties: {
|
|
22
|
+
readonly version: {
|
|
23
|
+
readonly type: "string";
|
|
24
|
+
readonly const: "kibi.proof-run.v1";
|
|
25
|
+
};
|
|
26
|
+
readonly producer: {
|
|
27
|
+
readonly type: "object";
|
|
28
|
+
readonly required: readonly ["name"];
|
|
29
|
+
readonly properties: {
|
|
30
|
+
readonly name: {
|
|
31
|
+
readonly type: "string";
|
|
32
|
+
readonly minLength: 1;
|
|
33
|
+
};
|
|
34
|
+
readonly version: {
|
|
35
|
+
readonly type: "string";
|
|
36
|
+
readonly minLength: 1;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
readonly additionalProperties: false;
|
|
40
|
+
};
|
|
41
|
+
readonly executor: {
|
|
42
|
+
readonly type: "object";
|
|
43
|
+
readonly required: readonly ["name"];
|
|
44
|
+
readonly properties: {
|
|
45
|
+
readonly name: {
|
|
46
|
+
readonly type: "string";
|
|
47
|
+
readonly minLength: 1;
|
|
48
|
+
};
|
|
49
|
+
readonly version: {
|
|
50
|
+
readonly type: "string";
|
|
51
|
+
readonly minLength: 1;
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
readonly additionalProperties: false;
|
|
55
|
+
};
|
|
56
|
+
readonly command_argv: {
|
|
57
|
+
readonly type: "array";
|
|
58
|
+
readonly minItems: 1;
|
|
59
|
+
readonly items: {
|
|
60
|
+
readonly type: "string";
|
|
61
|
+
readonly minLength: 1;
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
readonly code_snapshot: {
|
|
65
|
+
readonly type: "string";
|
|
66
|
+
readonly pattern: "^[a-f0-9]{64}$";
|
|
67
|
+
};
|
|
68
|
+
readonly environment: {
|
|
69
|
+
readonly type: "object";
|
|
70
|
+
readonly additionalProperties: true;
|
|
71
|
+
};
|
|
72
|
+
readonly run: {
|
|
73
|
+
readonly type: "object";
|
|
74
|
+
readonly required: readonly ["outcome", "exit_code", "started_at", "finished_at"];
|
|
75
|
+
readonly properties: {
|
|
76
|
+
readonly outcome: {
|
|
77
|
+
readonly type: "string";
|
|
78
|
+
readonly enum: readonly ["passed", "failed", "errored", "cancelled", "timed_out", "interrupted", "no_results"];
|
|
79
|
+
};
|
|
80
|
+
readonly exit_code: {
|
|
81
|
+
readonly type: "integer";
|
|
82
|
+
};
|
|
83
|
+
readonly started_at: {
|
|
84
|
+
readonly type: "string";
|
|
85
|
+
readonly minLength: 1;
|
|
86
|
+
};
|
|
87
|
+
readonly finished_at: {
|
|
88
|
+
readonly type: "string";
|
|
89
|
+
readonly minLength: 1;
|
|
90
|
+
};
|
|
91
|
+
readonly failure_phase: {
|
|
92
|
+
readonly type: "string";
|
|
93
|
+
readonly enum: readonly ["setup", "collection", "execution", "teardown", "infrastructure"];
|
|
94
|
+
};
|
|
95
|
+
};
|
|
96
|
+
readonly additionalProperties: false;
|
|
97
|
+
};
|
|
98
|
+
readonly proof_results: {
|
|
99
|
+
readonly type: "array";
|
|
100
|
+
readonly minItems: 1;
|
|
101
|
+
readonly maxItems: 1000;
|
|
102
|
+
readonly items: {
|
|
103
|
+
readonly type: "object";
|
|
104
|
+
readonly description: "One observed proof result. binding distinguishes native-case observations from aggregate-run bindings; attempts must report facts only.";
|
|
105
|
+
readonly required: readonly ["symbol_id", "target", "outcome", "binding", "attempts"];
|
|
106
|
+
readonly properties: {
|
|
107
|
+
readonly symbol_id: {
|
|
108
|
+
readonly type: "string";
|
|
109
|
+
readonly minLength: 1;
|
|
110
|
+
readonly description: "Stable proof symbol ID (SYM-*).";
|
|
111
|
+
};
|
|
112
|
+
readonly target: {
|
|
113
|
+
readonly type: "string";
|
|
114
|
+
readonly minLength: 1;
|
|
115
|
+
readonly description: "Ecosystem-neutral execution target (browser, runtime, database, device, deployment, or default).";
|
|
116
|
+
};
|
|
117
|
+
readonly outcome: {
|
|
118
|
+
readonly type: "string";
|
|
119
|
+
readonly enum: readonly ["passed", "failed", "timed_out", "skipped", "interrupted", "errored"];
|
|
120
|
+
};
|
|
121
|
+
readonly binding: {
|
|
122
|
+
readonly type: "string";
|
|
123
|
+
readonly enum: readonly ["native_case", "aggregate_run"];
|
|
124
|
+
};
|
|
125
|
+
readonly native_id: {
|
|
126
|
+
readonly type: "string";
|
|
127
|
+
readonly minLength: 1;
|
|
128
|
+
};
|
|
129
|
+
readonly attempts: {
|
|
130
|
+
readonly oneOf: readonly [{
|
|
131
|
+
readonly type: "object";
|
|
132
|
+
readonly required: readonly ["status", "entries"];
|
|
133
|
+
readonly properties: {
|
|
134
|
+
readonly status: {
|
|
135
|
+
readonly type: "string";
|
|
136
|
+
readonly const: "complete";
|
|
137
|
+
};
|
|
138
|
+
readonly entries: {
|
|
139
|
+
readonly type: "array";
|
|
140
|
+
readonly minItems: 1;
|
|
141
|
+
readonly maxItems: 100;
|
|
142
|
+
readonly items: {
|
|
143
|
+
readonly type: "object";
|
|
144
|
+
readonly required: readonly ["outcome"];
|
|
145
|
+
readonly properties: {
|
|
146
|
+
readonly outcome: {
|
|
147
|
+
readonly type: "string";
|
|
148
|
+
readonly enum: readonly ["passed", "failed", "timed_out", "skipped", "interrupted", "errored"];
|
|
149
|
+
};
|
|
150
|
+
readonly duration_ms: {
|
|
151
|
+
readonly type: "number";
|
|
152
|
+
readonly minimum: 0;
|
|
153
|
+
};
|
|
154
|
+
};
|
|
155
|
+
readonly additionalProperties: false;
|
|
156
|
+
};
|
|
157
|
+
};
|
|
158
|
+
};
|
|
159
|
+
readonly additionalProperties: false;
|
|
160
|
+
}, {
|
|
161
|
+
readonly type: "object";
|
|
162
|
+
readonly required: readonly ["status"];
|
|
163
|
+
readonly properties: {
|
|
164
|
+
readonly status: {
|
|
165
|
+
readonly type: "string";
|
|
166
|
+
readonly const: "unavailable";
|
|
167
|
+
};
|
|
168
|
+
};
|
|
169
|
+
readonly additionalProperties: false;
|
|
170
|
+
}];
|
|
171
|
+
};
|
|
172
|
+
readonly diagnostics: {
|
|
173
|
+
readonly type: "array";
|
|
174
|
+
readonly items: {
|
|
175
|
+
readonly type: "string";
|
|
176
|
+
readonly minLength: 1;
|
|
177
|
+
};
|
|
178
|
+
};
|
|
179
|
+
};
|
|
180
|
+
readonly additionalProperties: false;
|
|
181
|
+
};
|
|
182
|
+
};
|
|
183
|
+
readonly integration: {
|
|
184
|
+
readonly type: "string";
|
|
185
|
+
readonly minLength: 1;
|
|
186
|
+
};
|
|
187
|
+
readonly diagnostics: {
|
|
188
|
+
readonly type: "array";
|
|
189
|
+
readonly items: {
|
|
190
|
+
readonly type: "string";
|
|
191
|
+
readonly minLength: 1;
|
|
192
|
+
};
|
|
193
|
+
};
|
|
194
|
+
};
|
|
195
|
+
readonly additionalProperties: false;
|
|
196
|
+
};
|
|
197
|
+
readonly testIds: {
|
|
198
|
+
readonly type: "array";
|
|
199
|
+
readonly minItems: 1;
|
|
200
|
+
readonly items: {
|
|
201
|
+
readonly type: "string";
|
|
202
|
+
readonly minLength: 1;
|
|
203
|
+
};
|
|
204
|
+
readonly description: "Existing test entities with proof_contract.v1. Omit to evaluate every test contracted to the artifact's integration.";
|
|
205
|
+
};
|
|
206
|
+
};
|
|
207
|
+
};
|
|
208
|
+
readonly requiresProlog: true;
|
|
209
|
+
readonly effects: readonly ["kb-read", "kb-write", "workspace-read"];
|
|
210
|
+
readonly execute: typeof executeIngestProof;
|
|
211
|
+
};
|
|
212
|
+
//# sourceMappingURL=proof.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"proof.d.ts","sourceRoot":"","sources":["../../../../src/public/operations/specs/proof.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,kBAAkB,EACnB,MAAM,2CAA2C,CAAC;AAInD,YAAY,EACV,eAAe,EACf,iBAAiB,GAClB,MAAM,2CAA2C,CAAC;AACnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,2CAA2C,CAAC;AAG/E,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2B0C,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { executeIngestProof, } from "../../../operations/proof/ingest-proof.js";
|
|
2
|
+
import { PROOF_RUN_ARTIFACT_SCHEMA } from "../../proof-protocol.js";
|
|
3
|
+
export { executeIngestProof } from "../../../operations/proof/ingest-proof.js";
|
|
4
|
+
// implements REQ-kibi-verification-evidence-contract
|
|
5
|
+
export const ingestProofSpec = {
|
|
6
|
+
name: "kb_ingest_proof",
|
|
7
|
+
cliName: "ingest-proof",
|
|
8
|
+
description: "Ingest a producer-emitted kibi.proof-run.v1 artifact and evaluate it against each selected test's kibi.proof-contract.v1 proof obligations. Revalidates the live workspace snapshot, integration command binding, run-level outcome, attempt history, success policy, and append-only proof-receipt history before deriving and appending idempotent kibi.proof-receipt.v1 receipts. Producers report what happened; Kibi evaluates proof. Prefer `kibi prove` so the configured producer runs automatically; direct ingestion is an integration path for custom producers and agents.",
|
|
9
|
+
businessInputSchema: {
|
|
10
|
+
type: "object",
|
|
11
|
+
required: ["snapshot", "artifact"],
|
|
12
|
+
properties: {
|
|
13
|
+
snapshot: {
|
|
14
|
+
type: "string",
|
|
15
|
+
pattern: "^[a-f0-9]{64}$",
|
|
16
|
+
description: "Workspace snapshot captured immediately before the run.",
|
|
17
|
+
},
|
|
18
|
+
artifact: PROOF_RUN_ARTIFACT_SCHEMA,
|
|
19
|
+
testIds: {
|
|
20
|
+
type: "array",
|
|
21
|
+
minItems: 1,
|
|
22
|
+
items: { type: "string", minLength: 1 },
|
|
23
|
+
description: "Existing test entities with proof_contract.v1. Omit to evaluate every test contracted to the artifact's integration.",
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
requiresProlog: true,
|
|
28
|
+
effects: ["kb-read", "kb-write", "workspace-read"],
|
|
29
|
+
execute: executeIngestProof,
|
|
30
|
+
};
|
|
@@ -21,6 +21,8 @@ export type CoverageInput = {
|
|
|
21
21
|
readonly by?: "req" | "symbol" | "type";
|
|
22
22
|
readonly tags?: readonly string[];
|
|
23
23
|
readonly includePassing?: boolean;
|
|
24
|
+
/** Requirement proof-status filter (req mode). Implies include-passing. */
|
|
25
|
+
readonly statuses?: readonly string[];
|
|
24
26
|
readonly includeTransitive?: boolean;
|
|
25
27
|
readonly limit?: number;
|
|
26
28
|
readonly offset?: number;
|
|
@@ -101,6 +103,16 @@ export declare const findGapsSpec: {
|
|
|
101
103
|
readonly effects: readonly ["kb-read"];
|
|
102
104
|
readonly execute: typeof executeFindGaps;
|
|
103
105
|
};
|
|
106
|
+
/**
|
|
107
|
+
* Per-contract receipt binding (W2): compute the current binding hash for
|
|
108
|
+
* every receipt-bearing test (contract + receipt-stripped authored document
|
|
109
|
+
* + bound-symbol code scope) and hand the Prolog coverage stage a
|
|
110
|
+
* TestId -> BindingHash dict. This is the default binding mode since slice 3;
|
|
111
|
+
* KIBI_PROOF_BINDING_MODE=strict-snapshot opts out (receipts then match only
|
|
112
|
+
* against the whole-workspace snapshot they were proven on).
|
|
113
|
+
*/
|
|
114
|
+
export declare function currentProofBindingMode(): "per_contract" | "strict_snapshot";
|
|
115
|
+
export declare function perContractTestBindings(context: OperationContext): Promise<string | null>;
|
|
104
116
|
export declare function executeCoverage(input: CoverageInput, context: OperationContext): Promise<OperationResult<CoveragePayload>>;
|
|
105
117
|
export declare const coverageSpec: {
|
|
106
118
|
readonly name: "kb_coverage";
|
|
@@ -124,6 +136,14 @@ export declare const coverageSpec: {
|
|
|
124
136
|
readonly type: "boolean";
|
|
125
137
|
readonly default: false;
|
|
126
138
|
};
|
|
139
|
+
readonly statuses: {
|
|
140
|
+
readonly type: "array";
|
|
141
|
+
readonly items: {
|
|
142
|
+
readonly type: "string";
|
|
143
|
+
readonly enum: readonly ["proven", "missing", "unresolved", "not_applicable"];
|
|
144
|
+
};
|
|
145
|
+
readonly description: "Requirement proof-status filter (req mode): include only rows whose proofStatus is listed. Selecting statuses implies include-passing; not_applicable rows carry their typed applicability reason in proofStages.applicability.reason. The summary always reflects the whole KB.";
|
|
146
|
+
};
|
|
127
147
|
readonly includeTransitive: {
|
|
128
148
|
readonly type: "boolean";
|
|
129
149
|
readonly default: true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reporting.d.ts","sourceRoot":"","sources":["../../../../src/public/operations/specs/reporting.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"reporting.d.ts","sourceRoot":"","sources":["../../../../src/public/operations/specs/reporting.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,KAAK,mBAAmB,EAEzB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,KAAK,aAAa,EAInB,MAAM,sBAAsB,CAAC;AAM9B,OAAO,EAAE,KAAK,UAAU,EAAmB,MAAM,mBAAmB,CAAC;AACrE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAK5D,OAAO,KAAK,EAAE,eAAe,EAAiB,MAAM,aAAa,CAAC;AAelE,MAAM,MAAM,aAAa,GAAG;IAC1B,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,oBAAoB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAClD,QAAQ,CAAC,oBAAoB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAClD,QAAQ,CAAC,IAAI,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAClC,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B,QAAQ,CAAC,IAAI,EAAE,SAAS,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,EAAE,CAAC;IAC5D,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,IAAI,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;CACnD,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B,QAAQ,CAAC,EAAE,CAAC,EAAE,KAAK,GAAG,QAAQ,GAAG,MAAM,CAAC;IACxC,QAAQ,CAAC,IAAI,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAClC,QAAQ,CAAC,cAAc,CAAC,EAAE,OAAO,CAAC;IAClC,2EAA2E;IAC3E,QAAQ,CAAC,QAAQ,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACtC,QAAQ,CAAC,iBAAiB,CAAC,EAAE,OAAO,CAAC;IACrC,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAC3C,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,uBAAuB,CAAC,EAAE,MAAM,CAAC;IAC1C,QAAQ,CAAC,0BAA0B,CAAC,EAAE,MAAM,CAAC;CAC9C,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IACnD,QAAQ,CAAC,IAAI,EAAE,SAAS,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,EAAE,CAAC;IAC5D,QAAQ,CAAC,UAAU,CAAC,EAAE,UAAU,CAAC;IACjC,QAAQ,CAAC,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;IACnD,QAAQ,CAAC,gBAAgB,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IAC9D,QAAQ,CAAC,aAAa,CAAC,EAAE,aAAa,CAAC;IACvC,QAAQ,CAAC,IAAI,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;CACnD,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG;IACvB,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;IACpC,QAAQ,CAAC,aAAa,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC3C,QAAQ,CAAC,SAAS,CAAC,EAAE,UAAU,GAAG,UAAU,GAAG,MAAM,CAAC;IACtD,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,WAAW,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACzC,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;CAC5B,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IACzB,QAAQ,CAAC,KAAK,EAAE,SAAS,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,EAAE,CAAC;IAC7D,QAAQ,CAAC,KAAK,EAAE,SAAS,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,EAAE,CAAC;IAC7D,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,IAAI,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;CACnD,CAAC;AAiCF,wBAAsB,eAAe,CACnC,KAAK,EAAE,aAAa,EACpB,OAAO,EAAE,gBAAgB,GACxB,OAAO,CAAC,eAAe,CAAC,eAAe,CAAC,CAAC,CA0B3C;AAED,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuByC,CAAC;AAEnE;;;;;;;GAOG;AAEH,wBAAgB,uBAAuB,IAAI,cAAc,GAAG,iBAAiB,CAI5E;AAED,wBAAsB,uBAAuB,CAC3C,OAAO,EAAE,gBAAgB,GACxB,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAsDxB;AAED,wBAAsB,eAAe,CACnC,KAAK,EAAE,aAAa,EACpB,OAAO,EAAE,gBAAgB,GACxB,OAAO,CAAC,eAAe,CAAC,eAAe,CAAC,CAAC,CA2H3C;AAED,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgEyC,CAAC;AAEnE,wBAAsB,YAAY,CAChC,KAAK,EAAE,UAAU,EACjB,OAAO,EAAE,gBAAgB,GACxB,OAAO,CAAC,eAAe,CAAC,YAAY,CAAC,CAAC,CA8BxC;AAED,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyBsC,CAAC"}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { join } from "node:path";
|
|
2
|
+
import { resolveBoundSymbolScope } from "../../../extractors/manifest.js";
|
|
3
|
+
import { PROOF_RECEIPT_MAX_AGE_SECONDS } from "../../proof-receipt.js";
|
|
2
4
|
import { executeStatus } from "../discovery-executors.js";
|
|
3
5
|
import { buildLegacyMigrationPlanFromContext, } from "../legacy-migration-plan.js";
|
|
4
6
|
import { buildActionsFromCoverage, buildMigrationPlan, mergeMigrationPlans, } from "../migration-plan.js";
|
|
5
7
|
import { runOperationJsonQuery, toPrologAtom, toPrologList, } from "../prolog-json.js";
|
|
6
8
|
import { buildRepairPlan } from "../repair-plan.js";
|
|
7
|
-
import { buildSymbolRepairPlan } from "../symbol-repair-plan.js";
|
|
9
|
+
import { addCoordinateRepairEvidence, buildSymbolRepairPlan, } from "../symbol-repair-plan.js";
|
|
8
10
|
import { readWorkspaceSnapshot } from "../workspace-snapshot.js";
|
|
9
11
|
const ENTITY_TYPES = [
|
|
10
12
|
"req",
|
|
@@ -28,6 +30,18 @@ function validateEntityType(type) {
|
|
|
28
30
|
throw new Error(`Invalid type '${type}'. Valid types: ${ENTITY_TYPES.join(", ")}. Use a single type value, or omit this parameter to query all entities.`);
|
|
29
31
|
}
|
|
30
32
|
}
|
|
33
|
+
const COVERAGE_PROOF_STATUSES = new Set([
|
|
34
|
+
"proven",
|
|
35
|
+
"missing",
|
|
36
|
+
"unresolved",
|
|
37
|
+
"not_applicable",
|
|
38
|
+
]);
|
|
39
|
+
function validateCoverageStatus(status) {
|
|
40
|
+
if (!COVERAGE_PROOF_STATUSES.has(status)) {
|
|
41
|
+
throw new Error(`Invalid coverage status '${status}'. Valid statuses: ${[...COVERAGE_PROOF_STATUSES].join(", ")}.`);
|
|
42
|
+
}
|
|
43
|
+
return status;
|
|
44
|
+
}
|
|
31
45
|
export async function executeFindGaps(input, context) {
|
|
32
46
|
validateEntityType(input.type);
|
|
33
47
|
try {
|
|
@@ -73,6 +87,71 @@ export const findGapsSpec = {
|
|
|
73
87
|
effects: ["kb-read"],
|
|
74
88
|
execute: executeFindGaps,
|
|
75
89
|
};
|
|
90
|
+
/**
|
|
91
|
+
* Per-contract receipt binding (W2): compute the current binding hash for
|
|
92
|
+
* every receipt-bearing test (contract + receipt-stripped authored document
|
|
93
|
+
* + bound-symbol code scope) and hand the Prolog coverage stage a
|
|
94
|
+
* TestId -> BindingHash dict. This is the default binding mode since slice 3;
|
|
95
|
+
* KIBI_PROOF_BINDING_MODE=strict-snapshot opts out (receipts then match only
|
|
96
|
+
* against the whole-workspace snapshot they were proven on).
|
|
97
|
+
*/
|
|
98
|
+
// implements REQ-kibi-verification-evidence-contract
|
|
99
|
+
export function currentProofBindingMode() {
|
|
100
|
+
return process.env.KIBI_PROOF_BINDING_MODE?.trim() === "strict-snapshot"
|
|
101
|
+
? "strict_snapshot"
|
|
102
|
+
: "per_contract";
|
|
103
|
+
}
|
|
104
|
+
export async function perContractTestBindings(context) {
|
|
105
|
+
if (currentProofBindingMode() !== "per_contract")
|
|
106
|
+
return null;
|
|
107
|
+
const { loadEntities } = await import("../discovery-entities.js");
|
|
108
|
+
const { receiptBindingHash } = await import("../../proof-fingerprint.js");
|
|
109
|
+
const { removeFrontmatterBlock } = await import("../../../operations/proof/receipt-document.js");
|
|
110
|
+
let tests;
|
|
111
|
+
try {
|
|
112
|
+
tests = await loadEntities(context.prolog, { type: "test" });
|
|
113
|
+
}
|
|
114
|
+
catch {
|
|
115
|
+
return null;
|
|
116
|
+
}
|
|
117
|
+
const entries = [];
|
|
118
|
+
const manifestPath = join(context.workspaceRoot, ".kb", "symbols.yaml");
|
|
119
|
+
for (const test of tests) {
|
|
120
|
+
const testId = typeof test.id === "string" ? test.id : "";
|
|
121
|
+
const contract = test.proof_contract !== undefined &&
|
|
122
|
+
test.proof_contract !== null &&
|
|
123
|
+
typeof test.proof_contract === "object"
|
|
124
|
+
? test.proof_contract
|
|
125
|
+
: undefined;
|
|
126
|
+
const source = typeof test.source === "string" ? test.source : "";
|
|
127
|
+
if (testId === "" || contract === undefined || source === "")
|
|
128
|
+
continue;
|
|
129
|
+
if (!/\.(md|mdx)$/i.test(source))
|
|
130
|
+
continue;
|
|
131
|
+
if (!context.fs)
|
|
132
|
+
continue;
|
|
133
|
+
try {
|
|
134
|
+
const absolute = join(context.workspaceRoot, source);
|
|
135
|
+
const authored = await context.fs.readFile(absolute);
|
|
136
|
+
const stripped = removeFrontmatterBlock(authored, "proof_receipts");
|
|
137
|
+
const rawBindings = Array.isArray(test.proof_bindings)
|
|
138
|
+
? test.proof_bindings
|
|
139
|
+
: [];
|
|
140
|
+
const boundIds = rawBindings
|
|
141
|
+
.map((binding) => typeof binding.symbol_id === "string" ? binding.symbol_id : "")
|
|
142
|
+
.filter((id) => id !== "");
|
|
143
|
+
const codeScope = resolveBoundSymbolScope(manifestPath, boundIds);
|
|
144
|
+
const binding = receiptBindingHash(contract, stripped ?? authored, codeScope);
|
|
145
|
+
entries.push(`${toPrologAtom(testId)}: ${toPrologAtom(binding)}`);
|
|
146
|
+
}
|
|
147
|
+
catch {
|
|
148
|
+
// Unreadable documents keep strict semantics for that test.
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
if (entries.length === 0)
|
|
152
|
+
return null;
|
|
153
|
+
return `_{${entries.join(", ")}}`;
|
|
154
|
+
}
|
|
76
155
|
export async function executeCoverage(input, context) {
|
|
77
156
|
try {
|
|
78
157
|
const snapshotEvidence = await readWorkspaceSnapshot(context);
|
|
@@ -80,8 +159,20 @@ export async function executeCoverage(input, context) {
|
|
|
80
159
|
? snapshotEvidence.snapshot.hash
|
|
81
160
|
: "unknown";
|
|
82
161
|
const checkedAt = context.clock().toISOString();
|
|
83
|
-
const
|
|
84
|
-
const
|
|
162
|
+
const statuses = (input.statuses ?? []).map((status) => validateCoverageStatus(status));
|
|
163
|
+
const bindingsDict = statuses.length === 0 && (input.by ?? "req") === "req"
|
|
164
|
+
? await perContractTestBindings(context)
|
|
165
|
+
: null;
|
|
166
|
+
const goal = bindingsDict !== null
|
|
167
|
+
? `discovery:coverage_report_json('${input.by ?? "req"}', ${toPrologList(input.tags)}, ${input.includePassing ?? false}, per_contract, ${bindingsDict}, ${input.includeTransitive ?? true}, ${input.limit ?? 100}, ${input.offset ?? 0}, ${toPrologAtom(codeSnapshot)}, ${toPrologAtom(checkedAt)}, ${PROOF_RECEIPT_MAX_AGE_SECONDS}, JsonString)`
|
|
168
|
+
: statuses.length > 0
|
|
169
|
+
? `discovery:coverage_report_json('${input.by ?? "req"}', ${toPrologList(input.tags)}, ${input.includePassing ?? false}, ${toPrologList(statuses)}, ${input.includeTransitive ?? true}, ${input.limit ?? 100}, ${input.offset ?? 0}, ${toPrologAtom(codeSnapshot)}, ${toPrologAtom(checkedAt)}, ${PROOF_RECEIPT_MAX_AGE_SECONDS}, JsonString)`
|
|
170
|
+
: `discovery:coverage_report_json('${input.by ?? "req"}', ${toPrologList(input.tags)}, ${input.includePassing ?? false}, ${input.includeTransitive ?? true}, ${input.limit ?? 100}, ${input.offset ?? 0}, ${toPrologAtom(codeSnapshot)}, ${toPrologAtom(checkedAt)}, ${PROOF_RECEIPT_MAX_AGE_SECONDS}, JsonString)`;
|
|
171
|
+
const payload = await runOperationJsonQuery(requireProlog(context), "discovery.pl", goal, "Coverage execution");
|
|
172
|
+
const rows = (input.by ?? "req") === "req"
|
|
173
|
+
? await addCoordinateRepairEvidence(payload.rows, context)
|
|
174
|
+
: payload.rows;
|
|
175
|
+
const repairPlan = buildRepairPlan({ ...payload, rows }, input, codeSnapshot);
|
|
85
176
|
const symbolRepairPlan = input.by === "symbol"
|
|
86
177
|
? await buildSymbolRepairPlan(payload.rows, context)
|
|
87
178
|
: undefined;
|
|
@@ -111,7 +202,7 @@ export async function executeCoverage(input, context) {
|
|
|
111
202
|
: {}),
|
|
112
203
|
workspaceSnapshot: codeSnapshot,
|
|
113
204
|
},
|
|
114
|
-
evaluatedDomains: ["semantic", "
|
|
205
|
+
evaluatedDomains: ["semantic", "proof", "symbol"],
|
|
115
206
|
incompleteDomains: payload.meta?.scopeComplete === false ? ["coverage"] : [],
|
|
116
207
|
actions: buildActionsFromCoverage({
|
|
117
208
|
...(repairPlan !== undefined
|
|
@@ -127,22 +218,23 @@ export async function executeCoverage(input, context) {
|
|
|
127
218
|
: coveragePlan;
|
|
128
219
|
const enrichedPayload = {
|
|
129
220
|
...payload,
|
|
221
|
+
rows,
|
|
130
222
|
...(repairPlan !== undefined ? { repairPlan } : {}),
|
|
131
223
|
...(legacyMigrationPlan !== undefined ? { legacyMigrationPlan } : {}),
|
|
132
224
|
...(symbolRepairPlan !== undefined ? { symbolRepairPlan } : {}),
|
|
133
225
|
migrationPlan,
|
|
134
226
|
meta: {
|
|
135
227
|
...(payload.meta ?? {}),
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
228
|
+
proofReceiptMaxAgeSeconds: PROOF_RECEIPT_MAX_AGE_SECONDS,
|
|
229
|
+
proofSnapshot: codeSnapshot,
|
|
230
|
+
proofSnapshotAvailable: snapshotEvidence.available,
|
|
139
231
|
...(snapshotEvidence.available
|
|
140
232
|
? {
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
233
|
+
proofSnapshotDirty: snapshotEvidence.snapshot.dirty,
|
|
234
|
+
proofSnapshotFileCount: snapshotEvidence.snapshot.fileCount,
|
|
235
|
+
proofSnapshotVersion: snapshotEvidence.snapshot.version,
|
|
144
236
|
}
|
|
145
|
-
: {
|
|
237
|
+
: { proofSnapshotError: snapshotEvidence.error }),
|
|
146
238
|
},
|
|
147
239
|
};
|
|
148
240
|
const fullyCovered = Number(enrichedPayload.summary?.fullyCovered ?? 0);
|
|
@@ -173,6 +265,14 @@ export const coverageSpec = {
|
|
|
173
265
|
by: { type: "string", enum: ["req", "symbol", "type"], default: "req" },
|
|
174
266
|
tags: { type: "array", items: { type: "string" } },
|
|
175
267
|
includePassing: { type: "boolean", default: false },
|
|
268
|
+
statuses: {
|
|
269
|
+
type: "array",
|
|
270
|
+
items: {
|
|
271
|
+
type: "string",
|
|
272
|
+
enum: ["proven", "missing", "unresolved", "not_applicable"],
|
|
273
|
+
},
|
|
274
|
+
description: "Requirement proof-status filter (req mode): include only rows whose proofStatus is listed. Selecting statuses implies include-passing; not_applicable rows carry their typed applicability reason in proofStages.applicability.reason. The summary always reflects the whole KB.",
|
|
275
|
+
},
|
|
176
276
|
includeTransitive: { type: "boolean", default: true },
|
|
177
277
|
limit: { type: "integer", default: 100 },
|
|
178
278
|
offset: { type: "integer", default: 0 },
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { SemanticAdvisorArgs, SemanticAdvisorOperationResult } from "../../../operations/semantic-advisor/types.js";
|
|
2
2
|
import type { OperationContext } from "../runtime-types.js";
|
|
3
|
-
export declare function executeSemanticAdvisor(args: SemanticAdvisorArgs,
|
|
3
|
+
export declare function executeSemanticAdvisor(args: SemanticAdvisorArgs, context?: OperationContext): Promise<SemanticAdvisorOperationResult>;
|
|
4
4
|
declare function executeSemanticAdvisorInput(input: Readonly<Record<string, unknown>>, context: OperationContext): Promise<SemanticAdvisorOperationResult>;
|
|
5
5
|
export declare const semanticAdvisorSpec: {
|
|
6
6
|
readonly name: "kb_semantic_advisor";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"semantic.d.ts","sourceRoot":"","sources":["../../../../src/public/operations/specs/semantic.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,mBAAmB,EACnB,8BAA8B,EAC/B,MAAM,+CAA+C,CAAC;
|
|
1
|
+
{"version":3,"file":"semantic.d.ts","sourceRoot":"","sources":["../../../../src/public/operations/specs/semantic.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,mBAAmB,EACnB,8BAA8B,EAC/B,MAAM,+CAA+C,CAAC;AAEvD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAmB5D,wBAAsB,sBAAsB,CAC1C,IAAI,EAAE,mBAAmB,EACzB,OAAO,CAAC,EAAE,gBAAgB,GACzB,OAAO,CAAC,8BAA8B,CAAC,CA2FzC;AAED,iBAAe,2BAA2B,CACxC,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,EACxC,OAAO,EAAE,gBAAgB,GACxB,OAAO,CAAC,8BAA8B,CAAC,CAiCzC;AAED,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2EE,CAAC"}
|