kibi-cli 1.0.1 → 2.0.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 +103 -0
- package/dist/cli-register-reporting.d.ts.map +1 -1
- package/dist/cli-register-reporting.js +1 -0
- package/dist/cli.d.ts +4 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +17 -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.d.ts +14 -0
- package/dist/commands/check.d.ts.map +1 -1
- package/dist/commands/check.js +190 -44
- 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 +48 -22
- package/dist/commands/engine.d.ts +12 -0
- package/dist/commands/engine.d.ts.map +1 -1
- package/dist/commands/engine.js +40 -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 +38 -5
- 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-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.js +1 -1
- 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 +1 -1
- package/dist/commands/sync/manifest.d.ts.map +1 -1
- package/dist/commands/sync/manifest.js +53 -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 +25 -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 +14 -76
- package/dist/engine.d.ts.map +1 -1
- package/dist/engine.js +197 -30
- 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 +5 -3
- package/dist/extractors/markdown.d.ts.map +1 -1
- package/dist/extractors/markdown.js +41 -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-ts.d.ts +1 -0
- package/dist/extractors/symbols-ts.d.ts.map +1 -1
- package/dist/extractors/symbols-ts.js +142 -67
- package/dist/intent-search.d.ts +1 -0
- package/dist/intent-search.d.ts.map +1 -1
- package/dist/intent-search.js +7 -3
- 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 +53 -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 +3 -1
- package/dist/operations/modeling/suggest-predicates.d.ts.map +1 -1
- package/dist/operations/modeling/suggest-predicates.js +52 -19
- 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 +2 -2
- 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 +2 -0
- package/dist/operations/planning/compile-intent.d.ts.map +1 -1
- package/dist/operations/planning/compile-intent.js +70 -14
- 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 +307 -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 +88 -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/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 +46 -26
- 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/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/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 +3 -3
- 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/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 +447 -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 +3 -7
- 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 +31 -22
- package/dist/public/operations/discovery-entities.d.ts +3 -0
- package/dist/public/operations/discovery-entities.d.ts.map +1 -1
- package/dist/public/operations/discovery-entities.js +4 -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 +17 -14
- 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/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 +5 -0
- 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 +34 -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/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 +19 -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/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 +118 -3
- package/dist/public/operations/types.d.ts +1 -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 +41 -12
- package/dist/public/skills/kibi-usage/resources/operation-access.md +1 -1
- package/dist/public/skills/kibi-usage/resources/proof.md +105 -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 +20 -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 +282 -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 +14 -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 +5 -0
- package/dist/traceability/symbol-extract.d.ts.map +1 -1
- package/dist/traceability/symbol-extract.js +1 -1
- 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 +97 -0
- package/dist/utils/rule-registry.generated.d.ts.map +1 -0
- package/dist/utils/rule-registry.generated.js +125 -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 +8 -11
- package/src/public/diagnostic-usage.ts +6 -6
- package/src/public/distribution-parity.ts +17 -10
- 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 +3 -7
- package/src/public/operations/contracts.ts +38 -22
- package/src/public/operations/discovery-entities.ts +7 -0
- package/src/public/operations/discovery-executors.ts +26 -23
- 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/repair-plan.ts +60 -23
- package/src/public/operations/result-envelope.ts +15 -10
- package/src/public/operations/runtime-types.ts +5 -0
- package/src/public/operations/specs/check-rules.generated.ts +37 -0
- package/src/public/operations/specs/check.ts +12 -21
- 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/symbol-repair-plan.ts +163 -3
- package/src/public/operations/types.ts +1 -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 +41 -12
- package/src/public/skills/kibi-usage/resources/operation-access.md +1 -1
- package/src/public/skills/kibi-usage/resources/proof.md +105 -0
- package/src/public/skills/kibi-usage/resources/workflows.md +6 -6
- package/src/public/symbol-granularity.generated.ts +41 -0
- package/src/public/symbol-granularity.ts +35 -60
- 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
|
@@ -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-proof-evidence-protocol
|
|
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,15 @@ 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";
|
|
104
115
|
export declare function executeCoverage(input: CoverageInput, context: OperationContext): Promise<OperationResult<CoveragePayload>>;
|
|
105
116
|
export declare const coverageSpec: {
|
|
106
117
|
readonly name: "kb_coverage";
|
|
@@ -124,6 +135,14 @@ export declare const coverageSpec: {
|
|
|
124
135
|
readonly type: "boolean";
|
|
125
136
|
readonly default: false;
|
|
126
137
|
};
|
|
138
|
+
readonly statuses: {
|
|
139
|
+
readonly type: "array";
|
|
140
|
+
readonly items: {
|
|
141
|
+
readonly type: "string";
|
|
142
|
+
readonly enum: readonly ["proven", "missing", "unresolved", "not_applicable"];
|
|
143
|
+
};
|
|
144
|
+
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.";
|
|
145
|
+
};
|
|
127
146
|
readonly includeTransitive: {
|
|
128
147
|
readonly type: "boolean";
|
|
129
148
|
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,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
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-proof-evidence-protocol
|
|
99
|
+
export function currentProofBindingMode() {
|
|
100
|
+
return process.env.KIBI_PROOF_BINDING_MODE?.trim() === "strict-snapshot"
|
|
101
|
+
? "strict_snapshot"
|
|
102
|
+
: "per_contract";
|
|
103
|
+
}
|
|
104
|
+
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 },
|