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
|
@@ -41,7 +41,7 @@ export type MigrationAction = Readonly<{
|
|
|
41
41
|
| "relationship"
|
|
42
42
|
| "symbol"
|
|
43
43
|
| "semantic"
|
|
44
|
-
| "
|
|
44
|
+
| "proof"
|
|
45
45
|
| "quality";
|
|
46
46
|
state: MigrationActionState;
|
|
47
47
|
safety: MigrationSafety;
|
|
@@ -134,6 +134,19 @@ function actionSort(left: MigrationAction, right: MigrationAction): number {
|
|
|
134
134
|
);
|
|
135
135
|
}
|
|
136
136
|
|
|
137
|
+
export function compareReadyActionIds(
|
|
138
|
+
left: string,
|
|
139
|
+
right: string,
|
|
140
|
+
byId: ReadonlyMap<string, MigrationAction>,
|
|
141
|
+
): number {
|
|
142
|
+
const leftAction = byId.get(left);
|
|
143
|
+
const rightAction = byId.get(right);
|
|
144
|
+
if (leftAction === undefined || rightAction === undefined) {
|
|
145
|
+
return left.localeCompare(right);
|
|
146
|
+
}
|
|
147
|
+
return actionSort(leftAction, rightAction);
|
|
148
|
+
}
|
|
149
|
+
|
|
137
150
|
/** Return actions in a deterministic dependency-first order for agents and the applier. */
|
|
138
151
|
function dependencyOrder(
|
|
139
152
|
actions: readonly MigrationAction[],
|
|
@@ -168,14 +181,7 @@ function dependencyOrder(
|
|
|
168
181
|
}
|
|
169
182
|
ready.push(candidateId);
|
|
170
183
|
queued.add(candidateId);
|
|
171
|
-
ready.sort((left, right) =>
|
|
172
|
-
const leftAction = byId.get(left);
|
|
173
|
-
const rightAction = byId.get(right);
|
|
174
|
-
if (leftAction === undefined || rightAction === undefined) {
|
|
175
|
-
return left.localeCompare(right);
|
|
176
|
-
}
|
|
177
|
-
return actionSort(leftAction, rightAction);
|
|
178
|
-
});
|
|
184
|
+
ready.sort((left, right) => compareReadyActionIds(left, right, byId));
|
|
179
185
|
}
|
|
180
186
|
}
|
|
181
187
|
// Preserve cyclic/missing-dependency actions in canonical order; validation will block them.
|
|
@@ -387,17 +393,18 @@ export function buildActionsFromCoverage(input: {
|
|
|
387
393
|
const req =
|
|
388
394
|
typeof batch.requirementId === "string" ? batch.requirementId : "";
|
|
389
395
|
const ready = batch.state === "ready";
|
|
390
|
-
const automatic =
|
|
396
|
+
const automatic =
|
|
397
|
+
phase === "source_coordinates" &&
|
|
398
|
+
batch.writePolicy === "refresh_then_sync";
|
|
391
399
|
actions.push(
|
|
392
400
|
migrationAction({
|
|
393
401
|
id: `coverage-${id}`,
|
|
394
402
|
code: `coverage_${phase}`,
|
|
395
|
-
category:
|
|
396
|
-
phase === "verification_evidence" ? "verification" : "semantic",
|
|
403
|
+
category: phase === "proof_evidence" ? "proof" : "semantic",
|
|
397
404
|
state: ready ? "ready" : "blocked",
|
|
398
405
|
safety: automatic
|
|
399
406
|
? "automatic"
|
|
400
|
-
: phase === "
|
|
407
|
+
: phase === "proof_evidence"
|
|
401
408
|
? "execution"
|
|
402
409
|
: "review",
|
|
403
410
|
invocation: automatic
|
|
@@ -445,7 +452,7 @@ export function buildActionsFromCoverage(input: {
|
|
|
445
452
|
}
|
|
446
453
|
: {
|
|
447
454
|
kind: "review",
|
|
448
|
-
instruction: `Review ${action} for ${symbolId} using current extraction and Git evidence.`,
|
|
455
|
+
instruction: `Review ${action} for ${symbolId} using current extraction and Git evidence. Query the symbol and validate/upsert a corrected sourceFile/title or an intentional granularity_reason: extractor-miss when extraction cannot locate it.`,
|
|
449
456
|
},
|
|
450
457
|
affectedEntityIds: [symbolId],
|
|
451
458
|
evidence: { repair },
|
|
@@ -527,8 +534,8 @@ export function buildActionsFromStatus(input: {
|
|
|
527
534
|
branchAttachment?: Readonly<Record<string, unknown>>;
|
|
528
535
|
branchStore?: Readonly<Record<string, unknown>>;
|
|
529
536
|
staleReasons?: readonly Readonly<Record<string, unknown>>[];
|
|
530
|
-
|
|
531
|
-
|
|
537
|
+
proofSnapshotAvailable?: boolean;
|
|
538
|
+
proofSnapshotDirty?: boolean;
|
|
532
539
|
kbSnapshotId?: string | null;
|
|
533
540
|
workspaceSnapshot?: string | null;
|
|
534
541
|
configStatus?: MigrationConfigStatus;
|
|
@@ -673,35 +680,35 @@ export function buildActionsFromStatus(input: {
|
|
|
673
680
|
}),
|
|
674
681
|
);
|
|
675
682
|
}
|
|
676
|
-
if (input.
|
|
683
|
+
if (input.proofSnapshotAvailable === false) {
|
|
677
684
|
actions.push(
|
|
678
685
|
migrationAction({
|
|
679
686
|
id: "verification-snapshot-unavailable",
|
|
680
|
-
code: "
|
|
681
|
-
category: "
|
|
687
|
+
code: "proof_snapshot_unavailable",
|
|
688
|
+
category: "proof",
|
|
682
689
|
safety: "operator",
|
|
683
690
|
invocation: {
|
|
684
691
|
kind: "review",
|
|
685
692
|
instruction:
|
|
686
693
|
"Use a runtime that can compute a workspace verification snapshot before claiming proof.",
|
|
687
694
|
},
|
|
688
|
-
evidence: {
|
|
695
|
+
evidence: { proofSnapshotAvailable: false },
|
|
689
696
|
dispositionRequired: true,
|
|
690
697
|
}),
|
|
691
698
|
);
|
|
692
|
-
} else if (input.
|
|
699
|
+
} else if (input.proofSnapshotDirty === true) {
|
|
693
700
|
actions.push(
|
|
694
701
|
migrationAction({
|
|
695
702
|
id: "verification-snapshot-dirty",
|
|
696
|
-
code: "
|
|
697
|
-
category: "
|
|
703
|
+
code: "proof_snapshot_dirty",
|
|
704
|
+
category: "proof",
|
|
698
705
|
safety: "review",
|
|
699
706
|
invocation: {
|
|
700
707
|
kind: "review",
|
|
701
708
|
instruction:
|
|
702
709
|
"Resolve or intentionally record the listed dirty workspace paths before reusing or creating proof receipts.",
|
|
703
710
|
},
|
|
704
|
-
evidence: {
|
|
711
|
+
evidence: { proofSnapshotDirty: true },
|
|
705
712
|
dispositionRequired: true,
|
|
706
713
|
}),
|
|
707
714
|
);
|
|
@@ -732,7 +739,7 @@ export function buildActionsFromStatus(input: {
|
|
|
732
739
|
"storage",
|
|
733
740
|
"schema",
|
|
734
741
|
"freshness",
|
|
735
|
-
"
|
|
742
|
+
"proof",
|
|
736
743
|
],
|
|
737
744
|
incompleteDomains,
|
|
738
745
|
actions,
|
|
@@ -28,7 +28,7 @@ const SNAPSHOT_EXCLUDED_PREFIXES = [
|
|
|
28
28
|
".changeset/",
|
|
29
29
|
".kb/branches/",
|
|
30
30
|
".kb/recovery/",
|
|
31
|
-
".kb/
|
|
31
|
+
".kb/proof/runs/",
|
|
32
32
|
".kb/briefs/",
|
|
33
33
|
".kb/migrations/",
|
|
34
34
|
"docs/",
|
|
@@ -37,7 +37,7 @@ const ALWAYS_IGNORED_GLOBS = [
|
|
|
37
37
|
"**/.git/**",
|
|
38
38
|
"**/.kb/branches/**",
|
|
39
39
|
"**/.kb/recovery/**",
|
|
40
|
-
"**/.kb/
|
|
40
|
+
"**/.kb/proof/runs/**",
|
|
41
41
|
"**/.kb/briefs/**",
|
|
42
42
|
"**/.kb/migrations/**",
|
|
43
43
|
"**/node_modules/**",
|
|
@@ -58,7 +58,7 @@ function includedSnapshotPath(relativePath: string): boolean {
|
|
|
58
58
|
);
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
function
|
|
61
|
+
function withoutProofReceiptFrontmatter(content: string): string {
|
|
62
62
|
const lines = content.match(/[^\n]*\n|[^\n]+$/g) ?? [];
|
|
63
63
|
if (lines[0]?.trim() !== "---") return content;
|
|
64
64
|
let inFrontmatter = true;
|
|
@@ -72,7 +72,7 @@ function withoutVerificationReceiptFrontmatter(content: string): string {
|
|
|
72
72
|
retained.push(line);
|
|
73
73
|
continue;
|
|
74
74
|
}
|
|
75
|
-
if (inFrontmatter && /^
|
|
75
|
+
if (inFrontmatter && /^proof_receipts\s*:/.test(line)) {
|
|
76
76
|
skippingReceipts = true;
|
|
77
77
|
continue;
|
|
78
78
|
}
|
|
@@ -91,14 +91,14 @@ function withoutVerificationReceiptFrontmatter(content: string): string {
|
|
|
91
91
|
function snapshotFileContent(relativePath: string, content: Buffer): Buffer {
|
|
92
92
|
if (relativePath.endsWith(".md")) {
|
|
93
93
|
return Buffer.from(
|
|
94
|
-
|
|
94
|
+
withoutProofReceiptFrontmatter(content.toString("utf8")),
|
|
95
95
|
);
|
|
96
96
|
}
|
|
97
97
|
return content;
|
|
98
98
|
}
|
|
99
99
|
|
|
100
100
|
/**
|
|
101
|
-
* A tracked markdown file whose only change is
|
|
101
|
+
* A tracked markdown file whose only change is proof-receipt frontmatter
|
|
102
102
|
* cannot alter the snapshot hash (receipts are stripped before hashing), so it
|
|
103
103
|
* must not mark the workspace dirty either. CI proof runs append receipts to
|
|
104
104
|
* tracked proof documents before reporting, and would otherwise always surface
|
|
@@ -55,6 +55,7 @@ export async function runOperationJsonQuery<T>(
|
|
|
55
55
|
fileName: string,
|
|
56
56
|
goal: string,
|
|
57
57
|
errorLabel: string,
|
|
58
|
+
signal?: AbortSignal,
|
|
58
59
|
): Promise<T> {
|
|
59
60
|
const modulePath = escapeAtom(
|
|
60
61
|
resolveCoreModulePath(fileName).replaceAll("\\", "/"),
|
|
@@ -73,10 +74,16 @@ export async function runOperationJsonQuery<T>(
|
|
|
73
74
|
const typedStatusQuery = prolog.queryStatusJson;
|
|
74
75
|
const result =
|
|
75
76
|
fileName === "status.pl" && typeof typedStatusQuery === "function"
|
|
76
|
-
? await typedStatusQuery.call(prolog)
|
|
77
|
+
? await typedStatusQuery.call(prolog, signal)
|
|
77
78
|
: oneShotMode
|
|
78
|
-
? await prolog.query(`(use_module('${modulePath}'), ${goal})
|
|
79
|
-
: await runInteractiveModuleQuery(
|
|
79
|
+
? await prolog.query(`(use_module('${modulePath}'), ${goal})`, signal)
|
|
80
|
+
: await runInteractiveModuleQuery(
|
|
81
|
+
prolog,
|
|
82
|
+
modulePath,
|
|
83
|
+
goal,
|
|
84
|
+
errorLabel,
|
|
85
|
+
signal,
|
|
86
|
+
);
|
|
80
87
|
if (!result.success) {
|
|
81
88
|
throw new Error(
|
|
82
89
|
`${errorLabel} query failed: ${result.error ?? "Unknown error"}`,
|
|
@@ -115,14 +122,15 @@ async function runInteractiveModuleQuery(
|
|
|
115
122
|
modulePath: string,
|
|
116
123
|
goal: string,
|
|
117
124
|
errorLabel: string,
|
|
125
|
+
signal?: AbortSignal,
|
|
118
126
|
) {
|
|
119
|
-
const loadResult = await prolog.query(`use_module('${modulePath}')
|
|
127
|
+
const loadResult = await prolog.query(`use_module('${modulePath}')`, signal);
|
|
120
128
|
if (!loadResult.success) {
|
|
121
129
|
throw new Error(
|
|
122
130
|
`${errorLabel} module load failed: ${loadResult.error ?? "Unknown error"}`,
|
|
123
131
|
);
|
|
124
132
|
}
|
|
125
|
-
return prolog.query(goal);
|
|
133
|
+
return prolog.query(goal, signal);
|
|
126
134
|
}
|
|
127
135
|
|
|
128
136
|
export function toPrologAtom(value?: string): string {
|
|
@@ -126,15 +126,14 @@ const REPAIR_PHASES = {
|
|
|
126
126
|
validationRules: [],
|
|
127
127
|
writePolicy: "runtime_recovery",
|
|
128
128
|
},
|
|
129
|
-
|
|
129
|
+
proof_evidence: {
|
|
130
130
|
order: 80,
|
|
131
131
|
objective:
|
|
132
|
-
"Run the
|
|
132
|
+
"Run the configured proof integration with kibi prove and append fresh snapshot-bound passing receipts.",
|
|
133
133
|
workflowSteps: [
|
|
134
134
|
"kb_status",
|
|
135
|
-
"
|
|
136
|
-
"
|
|
137
|
-
"kb_upsert",
|
|
135
|
+
"execute_proof_run",
|
|
136
|
+
"kb_ingest_proof",
|
|
138
137
|
"kb_coverage",
|
|
139
138
|
],
|
|
140
139
|
validationRules: ["required-fields", "no-dangling-refs"],
|
|
@@ -206,12 +205,13 @@ const GAP_PHASE: Readonly<Record<string, RepairPhase>> = {
|
|
|
206
205
|
blocking_contradiction: "contradiction_resolution",
|
|
207
206
|
missing_scenario: "scenario_endpoints",
|
|
208
207
|
missing_scenario_test: "scenario_tests",
|
|
209
|
-
|
|
210
|
-
missing_passing_e2e: "
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
208
|
+
proof_snapshot_unavailable: "snapshot_runtime",
|
|
209
|
+
missing_passing_e2e: "proof_evidence",
|
|
210
|
+
proof_contract_mismatch: "proof_evidence",
|
|
211
|
+
missing_proof_receipt: "proof_evidence",
|
|
212
|
+
stale_proof_receipt: "proof_evidence",
|
|
213
|
+
failed_proof_receipt: "proof_evidence",
|
|
214
|
+
invalid_proof_receipt: "proof_evidence",
|
|
215
215
|
missing_executable_test_symbol: "executable_symbols",
|
|
216
216
|
missing_production_symbol: "production_ownership",
|
|
217
217
|
missing_production_symbol_coverage: "production_coverage",
|
|
@@ -233,12 +233,12 @@ const GAP_STAGE: Readonly<Record<string, string>> = {
|
|
|
233
233
|
missing_scenario: "scenarios",
|
|
234
234
|
missing_scenario_test: "scenario_tests",
|
|
235
235
|
missing_passing_e2e: "passing_e2e",
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
236
|
+
missing_proof_receipt: "passing_e2e",
|
|
237
|
+
stale_proof_receipt: "passing_e2e",
|
|
238
|
+
failed_proof_receipt: "passing_e2e",
|
|
239
|
+
invalid_proof_receipt: "passing_e2e",
|
|
240
|
+
proof_contract_mismatch: "passing_e2e",
|
|
241
|
+
proof_snapshot_unavailable: "passing_e2e",
|
|
242
242
|
missing_executable_test_symbol: "executable_symbols",
|
|
243
243
|
missing_production_symbol: "production_symbols",
|
|
244
244
|
missing_production_symbol_coverage: "production_symbols",
|
|
@@ -427,7 +427,38 @@ function buildRequirementBatches(
|
|
|
427
427
|
);
|
|
428
428
|
const priorBatchIds: string[] = [];
|
|
429
429
|
return phases.map((phase) => {
|
|
430
|
-
const
|
|
430
|
+
const phaseRepairs = byPhase.get(phase) ?? [];
|
|
431
|
+
const coordinatesNeedReview =
|
|
432
|
+
phase === "source_coordinates" &&
|
|
433
|
+
phaseRepairs.some((repair) => {
|
|
434
|
+
const evidence = repair.evidence.coordinateRepairs;
|
|
435
|
+
return (
|
|
436
|
+
repair.gap !== "missing_symbol_coordinates" ||
|
|
437
|
+
!Array.isArray(evidence) ||
|
|
438
|
+
evidence.length === 0 ||
|
|
439
|
+
evidence.some((item) => !isRecord(item) || item.refreshable !== true)
|
|
440
|
+
);
|
|
441
|
+
});
|
|
442
|
+
const definition: RepairPhaseDefinition = coordinatesNeedReview
|
|
443
|
+
? {
|
|
444
|
+
...REPAIR_PHASES[phase],
|
|
445
|
+
objective: phaseRepairs.some(
|
|
446
|
+
(repair) => repair.gap === "missing_requirement_source",
|
|
447
|
+
)
|
|
448
|
+
? "Bind the requirement to its current source document through validated upsert and inspect any missing symbol anchors before refreshing."
|
|
449
|
+
: "Query the affected symbols and repair their sourceFile/title or explicitly author granularity_reason: extractor-miss (or another intentional coarse anchor) through validated upsert before refreshing.",
|
|
450
|
+
workflowSteps: [
|
|
451
|
+
"kb_query",
|
|
452
|
+
"kb_validate_upsert",
|
|
453
|
+
"kb_upsert",
|
|
454
|
+
"kibi sync --refresh-symbol-coordinates",
|
|
455
|
+
"kibi sync",
|
|
456
|
+
"kb_check",
|
|
457
|
+
"kb_coverage",
|
|
458
|
+
],
|
|
459
|
+
writePolicy: "review_then_sequential_upsert",
|
|
460
|
+
}
|
|
461
|
+
: REPAIR_PHASES[phase];
|
|
431
462
|
const id = batchId(requirementId, phase);
|
|
432
463
|
const batch: RepairPlanBatch = {
|
|
433
464
|
id,
|
|
@@ -441,11 +472,17 @@ function buildRequirementBatches(
|
|
|
441
472
|
validationRules: definition.validationRules,
|
|
442
473
|
writePolicy: definition.writePolicy,
|
|
443
474
|
autoApplicable: false,
|
|
444
|
-
repairs:
|
|
445
|
-
(
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
475
|
+
repairs: phaseRepairs
|
|
476
|
+
.map((repair) =>
|
|
477
|
+
coordinatesNeedReview
|
|
478
|
+
? { ...repair, action: definition.objective }
|
|
479
|
+
: repair,
|
|
480
|
+
)
|
|
481
|
+
.sort(
|
|
482
|
+
(left, right) =>
|
|
483
|
+
left.proofPriority - right.proofPriority ||
|
|
484
|
+
left.gap.localeCompare(right.gap),
|
|
485
|
+
),
|
|
449
486
|
};
|
|
450
487
|
priorBatchIds.push(id);
|
|
451
488
|
return batch;
|
|
@@ -36,6 +36,20 @@ function nextActions(value: unknown): KibiResult["nextActions"] {
|
|
|
36
36
|
});
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
+
export function failedEffectStatus(
|
|
40
|
+
effect: OperationEffect,
|
|
41
|
+
failure: Record<string, unknown>,
|
|
42
|
+
): KibiResult["effects"][number] {
|
|
43
|
+
return {
|
|
44
|
+
kind: effect,
|
|
45
|
+
status: "failed",
|
|
46
|
+
detail: failure.detail,
|
|
47
|
+
...(typeof failure.errorCode === "string"
|
|
48
|
+
? { errorCode: failure.errorCode }
|
|
49
|
+
: {}),
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
|
|
39
53
|
function effectStatus(
|
|
40
54
|
effect: OperationEffect,
|
|
41
55
|
data: Record<string, unknown> | undefined,
|
|
@@ -45,16 +59,7 @@ function effectStatus(
|
|
|
45
59
|
const failure = failures.find(
|
|
46
60
|
(entry) => record(entry) && entry.kind === effect,
|
|
47
61
|
);
|
|
48
|
-
if (record(failure))
|
|
49
|
-
return {
|
|
50
|
-
kind: effect,
|
|
51
|
-
status: "failed",
|
|
52
|
-
detail: failure.detail,
|
|
53
|
-
...(typeof failure.errorCode === "string"
|
|
54
|
-
? { errorCode: failure.errorCode }
|
|
55
|
-
: {}),
|
|
56
|
-
};
|
|
57
|
-
}
|
|
62
|
+
if (record(failure)) return failedEffectStatus(effect, failure);
|
|
58
63
|
}
|
|
59
64
|
return { kind: effect, status: "completed" };
|
|
60
65
|
}
|
|
@@ -1,12 +1,24 @@
|
|
|
1
|
+
import type { CapabilityRegistry } from "../../plugins/registry.js";
|
|
2
|
+
import type { PrologErrorRecord } from "../../prolog/error-terms.js";
|
|
1
3
|
import type { BranchAttachment } from "../../utils/branch-resolver.js";
|
|
2
4
|
import type { OperationEffect } from "./types.js";
|
|
3
5
|
|
|
4
6
|
export type { OperationEffect } from "./types.js";
|
|
7
|
+
// implements REQ-capability-plugin-activation-disclosure-v1
|
|
8
|
+
export type { CapabilityRegistry } from "../../plugins/registry.js";
|
|
9
|
+
|
|
10
|
+
/** Lazy or pre-materialized capability-plugin registry for an operation. */
|
|
11
|
+
// implements REQ-capability-plugin-activation-disclosure-v1
|
|
12
|
+
export type OperationPlugins =
|
|
13
|
+
| CapabilityRegistry
|
|
14
|
+
| (() => Promise<CapabilityRegistry>);
|
|
5
15
|
|
|
6
16
|
export type PrologQueryResult = {
|
|
7
17
|
readonly success: boolean;
|
|
8
18
|
readonly bindings: Readonly<Record<string, string>>;
|
|
9
19
|
readonly error?: string;
|
|
20
|
+
/** Structured error term when the failure crossed a kb.pl throw site. */
|
|
21
|
+
readonly errorRecord?: PrologErrorRecord;
|
|
10
22
|
};
|
|
11
23
|
|
|
12
24
|
export type PrologEntityQueryInput = Readonly<{
|
|
@@ -112,7 +124,7 @@ export interface PrologPort {
|
|
|
112
124
|
/** Present on the journaled engine; used to distinguish a persistent port from one-shot SWI. */
|
|
113
125
|
storageStatus?(): Promise<PrologQueryResult>;
|
|
114
126
|
/** Typed public freshness query; avoids exposing module loading over RPC. */
|
|
115
|
-
queryStatusJson?(): Promise<PrologQueryResult>;
|
|
127
|
+
queryStatusJson?(signal?: AbortSignal): Promise<PrologQueryResult>;
|
|
116
128
|
}
|
|
117
129
|
|
|
118
130
|
export type FilesystemStat = {
|
|
@@ -172,6 +184,8 @@ export type RuntimeOptions = {
|
|
|
172
184
|
readonly fs?: FilesystemPort;
|
|
173
185
|
readonly git?: GitPort;
|
|
174
186
|
readonly net?: NetworkPort;
|
|
187
|
+
/** Optional injectable capability registry (or lazy factory). */
|
|
188
|
+
readonly plugins?: OperationPlugins;
|
|
175
189
|
};
|
|
176
190
|
|
|
177
191
|
export type OperationContext = {
|
|
@@ -187,15 +201,25 @@ export type OperationContext = {
|
|
|
187
201
|
readonly sourceFirst?: boolean;
|
|
188
202
|
/** Internal apply-plan capability: source bytes were already approved/published. */
|
|
189
203
|
readonly sourcePlanApplication?: boolean;
|
|
204
|
+
/** Internal apply-plan capability: caller holds the cooperative source lock. */
|
|
205
|
+
readonly sourceMutationLockHeld?: boolean;
|
|
190
206
|
readonly git?: GitPort;
|
|
191
207
|
readonly net?: NetworkPort;
|
|
192
208
|
readonly branchAttachment?: BranchAttachment;
|
|
209
|
+
/** Pre-materialized or lazy capability registry supplied by the host runtime. */
|
|
210
|
+
readonly plugins?: OperationPlugins;
|
|
211
|
+
/** Lazily materialize the workspace capability registry. */
|
|
212
|
+
readonly ensurePlugins?: () => Promise<CapabilityRegistry>;
|
|
193
213
|
};
|
|
194
|
-
|
|
195
214
|
export interface RuntimeOperationSpec<TInput = unknown, TResult = unknown> {
|
|
196
215
|
readonly name: string;
|
|
197
216
|
readonly effects: readonly OperationEffect[];
|
|
198
217
|
readonly requiresProlog: boolean;
|
|
218
|
+
/**
|
|
219
|
+
* When true, MCP embeds envelope `data` JSON in tool `content` for hosts that
|
|
220
|
+
* hide `structuredContent` (discovery/proof lookup). Default false.
|
|
221
|
+
*/
|
|
222
|
+
readonly agentVisibleStructuredData?: boolean;
|
|
199
223
|
execute(input: TInput, context: OperationContext): Promise<TResult>;
|
|
200
224
|
}
|
|
201
225
|
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Kibi — repo-local, per-branch, queryable long-term memory for software projects
|
|
3
|
+
* Copyright (C) 2026 Piotr Franczyk
|
|
4
|
+
*
|
|
5
|
+
* This file is generated by scripts/generate-rule-registry.mjs from
|
|
6
|
+
* packages/core/schema/rule-registry.json. Do not edit it directly; edit the
|
|
7
|
+
* JSON source and regenerate.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
// implements REQ-006
|
|
11
|
+
/** Every selectable kb_check rule name, registry order. */
|
|
12
|
+
export const SELECTABLE_RULE_NAMES: readonly string[] = [
|
|
13
|
+
"must-priority-coverage",
|
|
14
|
+
"symbol-coverage",
|
|
15
|
+
"symbol-traceability",
|
|
16
|
+
"no-dangling-refs",
|
|
17
|
+
"source-relationship-parity",
|
|
18
|
+
"no-cycles",
|
|
19
|
+
"required-fields",
|
|
20
|
+
"deprecated-adr-no-successor",
|
|
21
|
+
"domain-contradictions",
|
|
22
|
+
"logic-coverage",
|
|
23
|
+
"rule-safety",
|
|
24
|
+
"rule-verifiability",
|
|
25
|
+
"query-plan-safety",
|
|
26
|
+
"req-status-vocabulary",
|
|
27
|
+
"strict-fact-shape",
|
|
28
|
+
"strict-req-fact-pairing",
|
|
29
|
+
"predicate-verifiability",
|
|
30
|
+
"strict-readiness",
|
|
31
|
+
"semantic-completeness",
|
|
32
|
+
"proof-contract-symbols",
|
|
33
|
+
];
|
|
34
|
+
|
|
35
|
+
// implements REQ-006
|
|
36
|
+
/** Comma-separated "Allowed:" fragment for the kb_check rules description. */
|
|
37
|
+
export const SELECTABLE_RULES_ALLOWED =
|
|
38
|
+
"must-priority-coverage, symbol-coverage, symbol-traceability, no-dangling-refs, source-relationship-parity, no-cycles, required-fields, deprecated-adr-no-successor, domain-contradictions, logic-coverage, rule-safety, rule-verifiability, query-plan-safety, req-status-vocabulary, strict-fact-shape, strict-req-fact-pairing, predicate-verifiability, strict-readiness, semantic-completeness, proof-contract-symbols";
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { executeCheck } from "../check-executor.js";
|
|
2
2
|
import type { OperationSpec } from "../types.js";
|
|
3
|
+
import {
|
|
4
|
+
SELECTABLE_RULES_ALLOWED,
|
|
5
|
+
SELECTABLE_RULE_NAMES,
|
|
6
|
+
} from "./check-rules.generated.js";
|
|
3
7
|
|
|
4
8
|
export const checkSpec = {
|
|
5
9
|
name: "kb_check",
|
|
@@ -13,28 +17,9 @@ export const checkSpec = {
|
|
|
13
17
|
type: "array",
|
|
14
18
|
items: {
|
|
15
19
|
type: "string",
|
|
16
|
-
enum: [
|
|
17
|
-
"must-priority-coverage",
|
|
18
|
-
"symbol-coverage",
|
|
19
|
-
"symbol-traceability",
|
|
20
|
-
"no-dangling-refs",
|
|
21
|
-
"source-relationship-parity",
|
|
22
|
-
"no-cycles",
|
|
23
|
-
"required-fields",
|
|
24
|
-
"deprecated-adr-no-successor",
|
|
25
|
-
"domain-contradictions",
|
|
26
|
-
"strict-fact-shape",
|
|
27
|
-
"strict-req-fact-pairing",
|
|
28
|
-
"predicate-verifiability",
|
|
29
|
-
"logic-coverage",
|
|
30
|
-
"rule-safety",
|
|
31
|
-
"rule-verifiability",
|
|
32
|
-
"semantic-completeness",
|
|
33
|
-
"query-plan-safety",
|
|
34
|
-
],
|
|
20
|
+
enum: [...SELECTABLE_RULE_NAMES],
|
|
35
21
|
},
|
|
36
|
-
description:
|
|
37
|
-
"Optional rule subset. Allowed: must-priority-coverage, symbol-coverage, symbol-traceability, no-dangling-refs, source-relationship-parity, no-cycles, required-fields, deprecated-adr-no-successor, domain-contradictions, strict-fact-shape, strict-req-fact-pairing, predicate-verifiability, logic-coverage, rule-safety, rule-verifiability, semantic-completeness, query-plan-safety. If omitted, server runs canonical and advisory rules plus the full-KB qualityDiagnostics audit scan, including usage telemetry acceptance when evidence exists; migration rules run only when explicitly selected. Advisory and migration findings are non-blocking qualityDiagnostics. If supplied, server preserves scoped validation and skips the full-KB advisory scan.",
|
|
22
|
+
description: `Optional rule subset. Allowed: ${SELECTABLE_RULES_ALLOWED}. If omitted, server runs canonical and advisory rules plus the full-KB qualityDiagnostics audit scan, including usage telemetry acceptance when evidence exists; migration rules run only when explicitly selected. Advisory and migration findings are non-blocking qualityDiagnostics. If supplied, server preserves scoped validation and skips the full-KB advisory scan.`,
|
|
38
23
|
},
|
|
39
24
|
sourceFiles: {
|
|
40
25
|
type: "array",
|
|
@@ -68,6 +53,12 @@ export const checkSpec = {
|
|
|
68
53
|
description:
|
|
69
54
|
"Optional workspace root for impact diagnostics. Defaults to the MCP server workspace.",
|
|
70
55
|
},
|
|
56
|
+
async: {
|
|
57
|
+
type: "boolean",
|
|
58
|
+
default: false,
|
|
59
|
+
description:
|
|
60
|
+
"When true, start the check as a background job and return a kibi.job.v1 receipt immediately instead of holding the request until the tool timeout. Poll kb_job_status with the returned jobId. Use for full checks on large KBs that exceed the configured tool timeout.",
|
|
61
|
+
},
|
|
71
62
|
},
|
|
72
63
|
},
|
|
73
64
|
requiresProlog: true,
|
|
@@ -70,6 +70,7 @@ export const querySpec = {
|
|
|
70
70
|
},
|
|
71
71
|
requiresProlog: true,
|
|
72
72
|
effects: ["kb-read"],
|
|
73
|
+
agentVisibleStructuredData: true,
|
|
73
74
|
execute: executeQuery,
|
|
74
75
|
} as const satisfies OperationSpec<QueryInput, QueryPayload>;
|
|
75
76
|
|
|
@@ -164,6 +165,7 @@ export const searchSpec = {
|
|
|
164
165
|
},
|
|
165
166
|
requiresProlog: true,
|
|
166
167
|
effects: ["kb-read"],
|
|
168
|
+
agentVisibleStructuredData: true,
|
|
167
169
|
execute: executeSearch,
|
|
168
170
|
} as const satisfies OperationSpec<SearchInput, SearchPayload>;
|
|
169
171
|
|
|
@@ -176,5 +178,6 @@ export const statusSpec = {
|
|
|
176
178
|
// Status must remain available when the branch store cannot be attached.
|
|
177
179
|
requiresProlog: false,
|
|
178
180
|
effects: ["kb-read", "workspace-read"],
|
|
181
|
+
agentVisibleStructuredData: true,
|
|
179
182
|
execute: executeStatus,
|
|
180
183
|
} as const satisfies OperationSpec<StatusInput, StatusPayload>;
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
} from "../../
|
|
2
|
+
PROOF_BINDINGS_SCHEMA,
|
|
3
|
+
PROOF_CONTRACT_SCHEMA,
|
|
4
|
+
} from "../../proof-protocol.js";
|
|
5
|
+
import {
|
|
6
|
+
MAX_PROOF_RECEIPTS,
|
|
7
|
+
PROOF_RECEIPT_SCHEMA,
|
|
8
|
+
} from "../../proof-receipt.js";
|
|
5
9
|
|
|
6
10
|
export const ENTITY_TYPES = [
|
|
7
11
|
"req",
|
|
@@ -152,13 +156,22 @@ export const ENTITY_PROPERTIES_SCHEMA = {
|
|
|
152
156
|
description:
|
|
153
157
|
"Optional typed verification perspective for test entities. Example: 'consumer'.",
|
|
154
158
|
},
|
|
155
|
-
|
|
156
|
-
|
|
159
|
+
proof_contract: {
|
|
160
|
+
...PROOF_CONTRACT_SCHEMA,
|
|
161
|
+
description:
|
|
162
|
+
"Semantic proof contract binding this test to explicit proof obligations executed by one configured integration.",
|
|
163
|
+
},
|
|
164
|
+
proof_bindings: {
|
|
165
|
+
...PROOF_BINDINGS_SCHEMA,
|
|
166
|
+
description:
|
|
167
|
+
"Optional native-runner bindings (native ids, aliases, source coordinates) for proof obligations. Bindings are provenance metadata and never replace the semantic contract.",
|
|
168
|
+
},
|
|
169
|
+
proof_receipts: {
|
|
157
170
|
type: "array",
|
|
158
|
-
maxItems:
|
|
159
|
-
items:
|
|
171
|
+
maxItems: MAX_PROOF_RECEIPTS,
|
|
172
|
+
items: PROOF_RECEIPT_SCHEMA,
|
|
160
173
|
description:
|
|
161
|
-
"Append-only
|
|
174
|
+
"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.",
|
|
162
175
|
},
|
|
163
176
|
fact_kind: {
|
|
164
177
|
type: "string",
|
|
@@ -323,7 +336,7 @@ export const ENTITY_PROPERTIES_SCHEMA = {
|
|
|
323
336
|
allOf: [
|
|
324
337
|
CLAIM_PROVENANCE_CONDITIONAL,
|
|
325
338
|
{
|
|
326
|
-
if: { required: ["
|
|
339
|
+
if: { required: ["proof_receipts"] },
|
|
327
340
|
// biome-ignore lint/suspicious/noThenProperty: JSON Schema conditional keyword.
|
|
328
341
|
then: { required: ["verification_scope"] },
|
|
329
342
|
},
|
|
@@ -143,6 +143,13 @@ export const compileIntentSpec = {
|
|
|
143
143
|
id: { type: "string" },
|
|
144
144
|
title: { type: "string", minLength: 1 },
|
|
145
145
|
body: { type: "string", minLength: 1 },
|
|
146
|
+
scenarioIds: {
|
|
147
|
+
type: "array",
|
|
148
|
+
items: { type: "string", minLength: 1 },
|
|
149
|
+
maxItems: 20,
|
|
150
|
+
description:
|
|
151
|
+
"Stable scenario draft IDs verified by this test. Required when multiple scenario drafts are supplied.",
|
|
152
|
+
},
|
|
146
153
|
verificationScope: {
|
|
147
154
|
type: "string",
|
|
148
155
|
enum: ["unit", "integration", "end_to_end"],
|