kibi-cli 0.19.0 → 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.d.ts.map +1 -1
- package/dist/cli-operation-loader.js +53 -20
- package/dist/cli-operation-metadata.d.ts +21 -8
- package/dist/cli-operation-metadata.d.ts.map +1 -1
- package/dist/cli-operation-metadata.js +27 -10
- package/dist/cli-protocol.d.ts.map +1 -1
- package/dist/cli-protocol.js +38 -8
- package/dist/cli-register-foundation.d.ts.map +1 -1
- package/dist/cli-register-foundation.js +14 -2
- package/dist/cli-register-maintenance.d.ts.map +1 -1
- package/dist/cli-register-maintenance.js +33 -4
- 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 +11 -0
- package/dist/cli.d.ts +4 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +17 -8
- package/dist/commands/aggregated-checks.d.ts +1 -2
- package/dist/commands/aggregated-checks.d.ts.map +1 -1
- package/dist/commands/aggregated-checks.js +14 -9
- package/dist/commands/branch.d.ts +37 -0
- package/dist/commands/branch.d.ts.map +1 -1
- package/dist/commands/branch.js +375 -40
- package/dist/commands/check.d.ts +14 -0
- package/dist/commands/check.d.ts.map +1 -1
- package/dist/commands/check.js +209 -110
- 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/discovery-shared.d.ts.map +1 -1
- package/dist/commands/discovery-shared.js +10 -19
- package/dist/commands/doctor.d.ts +26 -1
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +291 -30
- package/dist/commands/engine.d.ts +12 -0
- package/dist/commands/engine.d.ts.map +1 -1
- package/dist/commands/engine.js +50 -7
- package/dist/commands/gc.d.ts +5 -2
- package/dist/commands/gc.d.ts.map +1 -1
- package/dist/commands/gc.js +140 -71
- package/dist/commands/github-init.d.ts +57 -0
- package/dist/commands/github-init.d.ts.map +1 -0
- package/dist/commands/github-init.js +314 -0
- package/dist/commands/init-helpers.d.ts +1 -1
- package/dist/commands/init-helpers.d.ts.map +1 -1
- package/dist/commands/init-helpers.js +109 -28
- package/dist/commands/init.d.ts +2 -0
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +79 -24
- package/dist/commands/legacy-storage-migration.d.ts +54 -0
- package/dist/commands/legacy-storage-migration.d.ts.map +1 -0
- package/dist/commands/legacy-storage-migration.js +277 -0
- package/dist/commands/migrate.d.ts +11 -0
- package/dist/commands/migrate.d.ts.map +1 -1
- package/dist/commands/migrate.js +249 -96
- 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 +24 -0
- package/dist/commands/report.d.ts.map +1 -0
- package/dist/commands/report.js +191 -0
- package/dist/commands/sync/cache.d.ts +16 -3
- package/dist/commands/sync/cache.d.ts.map +1 -1
- package/dist/commands/sync/cache.js +111 -4
- package/dist/commands/sync/discovery.d.ts +26 -2
- package/dist/commands/sync/discovery.d.ts.map +1 -1
- package/dist/commands/sync/discovery.js +204 -15
- package/dist/commands/sync/extraction.d.ts +8 -1
- package/dist/commands/sync/extraction.d.ts.map +1 -1
- package/dist/commands/sync/extraction.js +38 -4
- package/dist/commands/sync/manifest.d.ts +9 -6
- package/dist/commands/sync/manifest.d.ts.map +1 -1
- package/dist/commands/sync/manifest.js +195 -60
- 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 +26 -12
- 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 +17 -1
- package/dist/commands/sync.d.ts.map +1 -1
- package/dist/commands/sync.js +375 -106
- package/dist/diagnostics.d.ts +1 -1
- package/dist/diagnostics.d.ts.map +1 -1
- 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 +34 -3
- package/dist/engine.d.ts.map +1 -1
- package/dist/engine.js +578 -42
- package/dist/env.d.ts.map +1 -1
- package/dist/env.js +5 -6
- package/dist/extractors/manifest.d.ts +13 -1
- package/dist/extractors/manifest.d.ts.map +1 -1
- package/dist/extractors/manifest.js +97 -10
- package/dist/extractors/markdown.d.ts +5 -2
- package/dist/extractors/markdown.d.ts.map +1 -1
- package/dist/extractors/markdown.js +47 -12
- package/dist/extractors/playwright-cases.d.ts +24 -0
- package/dist/extractors/playwright-cases.d.ts.map +1 -0
- package/dist/extractors/playwright-cases.js +126 -0
- package/dist/extractors/relationships.d.ts +6 -0
- package/dist/extractors/relationships.d.ts.map +1 -1
- package/dist/extractors/relationships.js +2 -1
- package/dist/extractors/symbol-coordinates.d.ts +81 -3
- package/dist/extractors/symbol-coordinates.d.ts.map +1 -1
- package/dist/extractors/symbol-coordinates.js +389 -51
- package/dist/extractors/symbols-coordinator.js +11 -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 +61 -0
- package/dist/intent-search.d.ts.map +1 -0
- package/dist/intent-search.js +437 -0
- 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 +5 -0
- package/dist/operations/bootstrap/activation.d.ts.map +1 -0
- package/dist/operations/{autopilot → bootstrap}/activation.js +58 -33
- package/dist/operations/{autopilot → bootstrap}/candidate-helpers.d.ts.map +1 -1
- package/dist/operations/bootstrap/candidates.d.ts +4 -0
- package/dist/operations/{autopilot → bootstrap}/candidates.d.ts.map +1 -1
- package/dist/operations/{autopilot → bootstrap}/candidates.js +22 -8
- package/dist/operations/{autopilot → bootstrap}/discovery-evidence.d.ts +2 -2
- package/dist/operations/{autopilot → bootstrap}/discovery-evidence.d.ts.map +1 -1
- package/dist/operations/{autopilot → bootstrap}/discovery-evidence.js +46 -6
- package/dist/operations/{autopilot → bootstrap}/discovery.d.ts +1 -1
- package/dist/operations/bootstrap/discovery.d.ts.map +1 -0
- package/dist/operations/{autopilot → bootstrap}/discovery.js +21 -14
- package/dist/operations/bootstrap/generate.d.ts +9 -0
- package/dist/operations/bootstrap/generate.d.ts.map +1 -0
- package/dist/operations/bootstrap/generate.js +207 -0
- package/dist/operations/{autopilot → bootstrap}/guidance-actions.d.ts +2 -2
- package/dist/operations/{autopilot → bootstrap}/guidance-actions.d.ts.map +1 -1
- package/dist/operations/{autopilot → bootstrap}/guidance-actions.js +4 -4
- package/dist/operations/{autopilot → bootstrap}/guidance.d.ts +3 -2
- package/dist/operations/bootstrap/guidance.d.ts.map +1 -0
- package/dist/operations/{autopilot → bootstrap}/guidance.js +3 -1
- package/dist/operations/{autopilot → bootstrap}/markdown-candidates.d.ts +2 -2
- package/dist/operations/{autopilot → bootstrap}/markdown-candidates.d.ts.map +1 -1
- package/dist/operations/{autopilot → bootstrap}/markdown-candidates.js +4 -3
- package/dist/operations/bootstrap/presentation.d.ts +15 -0
- package/dist/operations/bootstrap/presentation.d.ts.map +1 -0
- package/dist/operations/bootstrap/presentation.js +177 -0
- package/dist/operations/{autopilot → bootstrap}/requirement-claims.d.ts.map +1 -1
- package/dist/operations/{autopilot → bootstrap}/types.d.ts +63 -21
- package/dist/operations/bootstrap/types.d.ts.map +1 -0
- package/dist/operations/bootstrap/types.js +25 -0
- 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 -63
- package/dist/operations/modeling/predicate-applicability.d.ts +16 -0
- package/dist/operations/modeling/predicate-applicability.d.ts.map +1 -0
- package/dist/operations/modeling/predicate-applicability.js +375 -0
- package/dist/operations/modeling/predicate-applyplan.d.ts +13 -2
- package/dist/operations/modeling/predicate-applyplan.d.ts.map +1 -1
- package/dist/operations/modeling/predicate-applyplan.js +100 -3
- package/dist/operations/modeling/predicate-bindings.d.ts +6 -0
- package/dist/operations/modeling/predicate-bindings.d.ts.map +1 -0
- package/dist/operations/modeling/predicate-bindings.js +122 -0
- 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-4.d.ts.map +1 -1
- package/dist/operations/modeling/predicate-catalog-4.js +155 -0
- 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-inference-1.d.ts.map +1 -1
- package/dist/operations/modeling/predicate-inference-1.js +8 -0
- package/dist/operations/modeling/predicate-inference-launcher.d.ts +10 -0
- package/dist/operations/modeling/predicate-inference-launcher.d.ts.map +1 -0
- package/dist/operations/modeling/predicate-inference-launcher.js +13 -0
- package/dist/operations/modeling/predicate-inference.d.ts.map +1 -1
- package/dist/operations/modeling/predicate-inference.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 +11 -3
- package/dist/operations/modeling/predicate-ranker.d.ts +8 -1
- package/dist/operations/modeling/predicate-ranker.d.ts.map +1 -1
- package/dist/operations/modeling/predicate-ranker.js +159 -24
- package/dist/operations/modeling/predicate-score-3.d.ts.map +1 -1
- package/dist/operations/modeling/predicate-score-3.js +6 -0
- package/dist/operations/modeling/predicate-types.d.ts +35 -1
- package/dist/operations/modeling/predicate-types.d.ts.map +1 -1
- package/dist/operations/modeling/predicate-usage-hints-3.d.ts.map +1 -1
- package/dist/operations/modeling/predicate-usage-hints-3.js +40 -0
- 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/predicate-utils.d.ts.map +1 -1
- package/dist/operations/modeling/predicate-utils.js +2 -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 +203 -32
- 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 +483 -19
- package/dist/operations/mutation/entity-projection.d.ts +11 -0
- package/dist/operations/mutation/entity-projection.d.ts.map +1 -0
- package/dist/operations/mutation/entity-projection.js +14 -0
- package/dist/operations/mutation/relationships.d.ts +11 -0
- package/dist/operations/mutation/relationships.d.ts.map +1 -1
- package/dist/operations/mutation/relationships.js +77 -5
- 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 -1
- package/dist/operations/mutation/source-authoring.d.ts +65 -0
- package/dist/operations/mutation/source-authoring.d.ts.map +1 -0
- package/dist/operations/mutation/source-authoring.js +576 -0
- 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 +54 -0
- package/dist/operations/mutation/symbol-compiler-lock.d.ts.map +1 -0
- package/dist/operations/mutation/symbol-compiler-lock.js +337 -0
- package/dist/operations/mutation/symbol-granularity.d.ts.map +1 -1
- package/dist/operations/mutation/symbol-granularity.js +35 -4
- package/dist/operations/mutation/symbol-refresh.d.ts +19 -1
- package/dist/operations/mutation/symbol-refresh.d.ts.map +1 -1
- package/dist/operations/mutation/symbol-refresh.js +227 -63
- package/dist/operations/mutation/types.d.ts +57 -1
- package/dist/operations/mutation/types.d.ts.map +1 -1
- 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 +403 -32
- 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 +47 -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 +19 -0
- package/dist/operations/planning/apply-plan.d.ts.map +1 -0
- package/dist/operations/planning/apply-plan.js +1514 -0
- package/dist/operations/planning/compile-intent.d.ts +108 -0
- package/dist/operations/planning/compile-intent.d.ts.map +1 -0
- package/dist/operations/planning/compile-intent.js +618 -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 +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 +52 -28
- package/dist/operations/semantic-advisor/clauses.d.ts.map +1 -1
- package/dist/operations/semantic-advisor/clauses.js +35 -9
- package/dist/operations/semantic-advisor/ingestion-boundary.d.ts.map +1 -1
- package/dist/operations/semantic-advisor/ingestion-boundary.js +7 -3
- package/dist/operations/semantic-advisor/predicate-rules-launcher.d.ts +51 -0
- package/dist/operations/semantic-advisor/predicate-rules-launcher.d.ts.map +1 -0
- package/dist/operations/semantic-advisor/predicate-rules-launcher.js +96 -0
- 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 +13 -5
- package/dist/operations/semantic-advisor/types.d.ts.map +1 -1
- package/dist/prolog/codec.d.ts +13 -1
- package/dist/prolog/codec.d.ts.map +1 -1
- package/dist/prolog/codec.js +269 -153
- 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 +82 -25
- 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/proof/producers/playwright-case-id.d.ts +8 -0
- package/dist/proof/producers/playwright-case-id.d.ts.map +1 -0
- package/dist/proof/producers/playwright-case-id.js +25 -0
- 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/branch-resolver.d.ts +1 -0
- package/dist/public/branch-resolver.d.ts.map +1 -1
- package/dist/public/branch-resolver.js +1 -0
- package/dist/public/check-types.d.ts +2 -2
- package/dist/public/check-types.d.ts.map +1 -1
- package/dist/public/check-types.js +16 -16
- package/dist/public/diagnostic-usage.d.ts.map +1 -1
- package/dist/public/diagnostic-usage.js +74 -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 -9
- package/dist/public/ignore-policy.d.ts.map +1 -1
- package/dist/public/ignore-policy.js +16 -4
- package/dist/public/impact/coverage-depth-quality.d.ts +7 -1
- package/dist/public/impact/coverage-depth-quality.d.ts.map +1 -1
- package/dist/public/impact/coverage-depth-quality.js +22 -4
- 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 +7 -2
- package/dist/public/impact/full-kb-quality.d.ts.map +1 -1
- package/dist/public/impact/full-kb-quality.js +364 -39
- package/dist/public/impact/manifest.d.ts.map +1 -1
- package/dist/public/impact/manifest.js +2 -5
- package/dist/public/operational-artifacts.d.ts.map +1 -1
- package/dist/public/operational-artifacts.js +7 -1
- package/dist/public/operations/catalog.d.ts +900 -34
- package/dist/public/operations/catalog.d.ts.map +1 -1
- package/dist/public/operations/catalog.js +130 -6
- package/dist/public/operations/check-executor.d.ts +2 -2
- package/dist/public/operations/check-executor.d.ts.map +1 -1
- package/dist/public/operations/check-executor.js +68 -13
- package/dist/public/operations/check-format-shared.d.ts +3 -0
- package/dist/public/operations/check-format-shared.d.ts.map +1 -1
- package/dist/public/operations/check-format-shared.js +3 -0
- package/dist/public/operations/check-helpers.d.ts +27 -2
- package/dist/public/operations/check-helpers.d.ts.map +1 -1
- package/dist/public/operations/check-helpers.js +62 -26
- package/dist/public/operations/contracts.d.ts +18 -0
- package/dist/public/operations/contracts.d.ts.map +1 -0
- package/dist/public/operations/contracts.js +334 -0
- 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 +43 -7
- package/dist/public/operations/discovery-executors.d.ts.map +1 -1
- package/dist/public/operations/discovery-executors.js +216 -13
- package/dist/public/operations/index.d.ts +9 -4
- package/dist/public/operations/index.d.ts.map +1 -1
- package/dist/public/operations/index.js +8 -3
- package/dist/public/operations/migration-plan.d.ts +102 -0
- package/dist/public/operations/migration-plan.d.ts.map +1 -0
- package/dist/public/operations/migration-plan.js +539 -0
- package/dist/public/operations/node-ports.d.ts.map +1 -1
- package/dist/public/operations/node-ports.js +71 -11
- package/dist/public/operations/prolog-json.d.ts +14 -0
- package/dist/public/operations/prolog-json.d.ts.map +1 -1
- package/dist/public/operations/prolog-json.js +44 -5
- 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 -18
- package/dist/public/operations/result-envelope.d.ts +14 -0
- package/dist/public/operations/result-envelope.d.ts.map +1 -0
- package/dist/public/operations/result-envelope.js +106 -0
- package/dist/public/operations/runtime-types.d.ts +102 -7
- package/dist/public/operations/runtime-types.d.ts.map +1 -1
- package/dist/public/operations/source-relationship-parity.d.ts +13 -0
- package/dist/public/operations/source-relationship-parity.d.ts.map +1 -0
- package/dist/public/operations/source-relationship-parity.js +162 -0
- package/dist/public/operations/specs/{autopilot.d.ts → bootstrap.d.ts} +9 -9
- package/dist/public/operations/specs/bootstrap.d.ts.map +1 -0
- package/dist/public/operations/specs/{autopilot.js → bootstrap.js} +8 -7
- 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 +9 -4
- package/dist/public/operations/specs/check.d.ts.map +1 -1
- package/dist/public/operations/specs/check.js +10 -21
- package/dist/public/operations/specs/discovery.d.ts +87 -3
- package/dist/public/operations/specs/discovery.d.ts.map +1 -1
- package/dist/public/operations/specs/discovery.js +53 -3
- package/dist/public/operations/specs/modeling.d.ts +3 -3
- package/dist/public/operations/specs/modeling.js +3 -3
- package/dist/public/operations/specs/mutation-schemas.d.ts +251 -14
- package/dist/public/operations/specs/mutation-schemas.d.ts.map +1 -1
- package/dist/public/operations/specs/mutation-schemas.js +16 -6
- package/dist/public/operations/specs/mutation.d.ts +42 -2
- package/dist/public/operations/specs/mutation.d.ts.map +1 -1
- package/dist/public/operations/specs/mutation.js +26 -2
- package/dist/public/operations/specs/planning.d.ts +279 -0
- package/dist/public/operations/specs/planning.d.ts.map +1 -0
- package/dist/public/operations/specs/planning.js +197 -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 +23 -1
- package/dist/public/operations/specs/reporting.d.ts.map +1 -1
- package/dist/public/operations/specs/reporting.js +156 -11
- package/dist/public/operations/specs/upsert.d.ts +265 -14
- package/dist/public/operations/specs/upsert.d.ts.map +1 -1
- package/dist/public/operations/specs/upsert.js +9 -0
- package/dist/public/operations/symbol-repair-plan.d.ts +22 -0
- package/dist/public/operations/symbol-repair-plan.d.ts.map +1 -0
- package/dist/public/operations/symbol-repair-plan.js +238 -0
- package/dist/public/operations/types.d.ts +52 -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 +22 -6
- package/dist/public/skills/kibi-bootstrap/SKILL.md +58 -0
- package/dist/public/skills/kibi-bootstrap/resources/bootstrap.md +11 -0
- package/dist/public/skills/kibi-bootstrap/resources/branch-lifecycle.md +7 -0
- package/dist/public/skills/kibi-bootstrap/resources/operation-access.md +5 -0
- package/dist/public/skills/kibi-bootstrap/resources/source-authoring.md +8 -0
- package/dist/public/skills/kibi-freshness/SKILL.md +39 -9
- package/dist/public/skills/kibi-freshness/resources/branch-lifecycle.md +7 -0
- package/dist/public/skills/kibi-freshness/resources/operation-access.md +6 -0
- package/dist/public/skills/kibi-freshness/resources/source-authoring.md +7 -0
- package/dist/public/skills/kibi-traceability/SKILL.md +47 -47
- package/dist/public/skills/kibi-traceability/resources/branch-lifecycle.md +7 -0
- package/dist/public/skills/kibi-traceability/resources/operation-access.md +5 -0
- package/dist/public/skills/kibi-traceability/resources/source-authoring.md +6 -0
- package/dist/public/skills/kibi-traceability/resources/traceability.md +8 -0
- package/dist/public/skills/kibi-usage/SKILL.md +136 -231
- package/dist/public/skills/kibi-usage/resources/branch-lifecycle.md +31 -0
- package/dist/public/skills/kibi-usage/resources/kb-improvement.md +38 -0
- package/dist/public/skills/kibi-usage/resources/operation-access.md +36 -38
- package/dist/public/skills/kibi-usage/resources/proof.md +105 -0
- package/dist/public/skills/kibi-usage/resources/relationship-directions.md +3 -3
- package/dist/public/skills/kibi-usage/resources/source-authoring.md +31 -0
- package/dist/public/skills/kibi-usage/resources/workflows.md +57 -4
- 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 -46
- package/dist/public/telemetry-acceptance.d.ts +3 -70
- package/dist/public/telemetry-acceptance.d.ts.map +1 -1
- package/dist/public/telemetry-acceptance.js +11 -2
- package/dist/public/telemetry-remediation.js +1 -1
- package/dist/relationships/shards.d.ts +16 -0
- package/dist/relationships/shards.d.ts.map +1 -1
- package/dist/relationships/shards.js +87 -2
- package/dist/report/brand.d.ts +19 -0
- package/dist/report/brand.d.ts.map +1 -0
- package/dist/report/brand.js +112 -0
- package/dist/report/html-report.css +282 -0
- package/dist/report/html-report.d.ts +21 -0
- package/dist/report/html-report.d.ts.map +1 -0
- package/dist/report/html-report.js +700 -0
- package/dist/report/relative-time.d.ts +4 -0
- package/dist/report/relative-time.d.ts.map +1 -0
- package/dist/report/relative-time.js +46 -0
- package/dist/report/report-view.d.ts +17 -0
- package/dist/report/report-view.d.ts.map +1 -0
- package/dist/report/report-view.js +33 -0
- package/dist/report/repository.d.ts +35 -0
- package/dist/report/repository.d.ts.map +1 -0
- package/dist/report/repository.js +151 -0
- 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 +90 -23
- package/dist/schemas/entity.schema.json +1254 -239
- 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 +30 -2
- package/dist/traceability/evidence-model.d.ts.map +1 -1
- package/dist/traceability/evidence-model.js +2 -2
- 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 +156 -37
- package/dist/traceability/markdown-validate.d.ts.map +1 -1
- package/dist/traceability/markdown-validate.js +12 -7
- 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.d.ts +3 -3
- package/dist/traceability/staged-impact-contract.d.ts.map +1 -1
- package/dist/traceability/staged-impact-contract.js +12 -40
- 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 +142 -26
- 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 +14 -2
- package/dist/types/entities.d.ts +5 -0
- package/dist/types/entities.d.ts.map +1 -1
- package/dist/utils/branch-resolver.d.ts +25 -10
- package/dist/utils/branch-resolver.d.ts.map +1 -1
- package/dist/utils/branch-resolver.js +124 -38
- package/dist/utils/branch-store-locator.d.ts +23 -0
- package/dist/utils/branch-store-locator.d.ts.map +1 -0
- package/dist/utils/branch-store-locator.js +90 -0
- package/dist/utils/branch-store.d.ts +21 -0
- package/dist/utils/branch-store.d.ts.map +1 -0
- package/dist/utils/branch-store.js +157 -0
- package/dist/utils/config.d.ts +39 -37
- package/dist/utils/config.d.ts.map +1 -1
- package/dist/utils/config.js +107 -119
- package/dist/utils/kb-manifest.d.ts +35 -0
- package/dist/utils/kb-manifest.d.ts.map +1 -0
- package/dist/utils/kb-manifest.js +154 -0
- package/dist/utils/kb-paths.d.ts +54 -0
- package/dist/utils/kb-paths.d.ts.map +1 -0
- package/dist/utils/kb-paths.js +125 -0
- package/dist/utils/manifest-paths.d.ts +4 -4
- package/dist/utils/manifest-paths.d.ts.map +1 -1
- package/dist/utils/manifest-paths.js +8 -56
- package/dist/utils/rule-registry.d.ts +42 -24
- 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 +52 -148
- package/dist/utils/schema-version.d.ts +5 -5
- package/dist/utils/schema-version.d.ts.map +1 -1
- package/dist/utils/schema-version.js +26 -6
- package/dist/utils/strict-modeling.d.ts +1 -4
- package/dist/utils/strict-modeling.d.ts.map +1 -1
- package/dist/utils/strict-modeling.js +8 -9
- package/package.json +47 -11
- package/schema/config.json +2 -2
- package/schema/manifest.json +26 -0
- package/src/public/branch-resolver.ts +1 -0
- package/src/public/check-types.ts +22 -19
- package/src/public/diagnostic-usage.ts +84 -6
- package/src/public/distribution-parity.ts +17 -9
- package/src/public/ignore-policy.ts +16 -10
- package/src/public/impact/coverage-depth-quality.ts +37 -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 +545 -41
- package/src/public/impact/manifest.ts +2 -4
- package/src/public/operational-artifacts.ts +9 -1
- package/src/public/operations/catalog.ts +153 -10
- package/src/public/operations/check-executor.ts +98 -15
- package/src/public/operations/check-format-shared.ts +6 -0
- package/src/public/operations/check-helpers.ts +74 -35
- package/src/public/operations/contracts.ts +382 -0
- package/src/public/operations/discovery-entities.ts +7 -0
- package/src/public/operations/discovery-executors.ts +315 -25
- package/src/public/operations/index.ts +9 -4
- package/src/public/operations/migration-plan.ts +747 -0
- package/src/public/operations/node-ports.ts +87 -13
- package/src/public/operations/prolog-json.ts +60 -5
- package/src/public/operations/repair-plan.ts +60 -22
- package/src/public/operations/result-envelope.ts +141 -0
- package/src/public/operations/runtime-types.ts +96 -5
- package/src/public/operations/source-relationship-parity.ts +226 -0
- package/src/public/operations/specs/{autopilot.ts → bootstrap.ts} +17 -16
- package/src/public/operations/specs/check-rules.generated.ts +37 -0
- package/src/public/operations/specs/check.ts +14 -22
- package/src/public/operations/specs/discovery.ts +57 -3
- package/src/public/operations/specs/modeling.ts +3 -3
- package/src/public/operations/specs/mutation-schemas.ts +24 -6
- package/src/public/operations/specs/mutation.ts +27 -2
- package/src/public/operations/specs/planning.ts +241 -0
- package/src/public/operations/specs/proof.ts +43 -0
- package/src/public/operations/specs/reporting.ts +193 -12
- package/src/public/operations/specs/upsert.ts +10 -0
- package/src/public/operations/symbol-repair-plan.ts +324 -0
- package/src/public/operations/types.ts +62 -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 +27 -6
- package/src/public/skills/kibi-bootstrap/SKILL.md +58 -0
- package/src/public/skills/kibi-bootstrap/resources/bootstrap.md +11 -0
- package/src/public/skills/kibi-bootstrap/resources/branch-lifecycle.md +7 -0
- package/src/public/skills/kibi-bootstrap/resources/operation-access.md +5 -0
- package/src/public/skills/kibi-bootstrap/resources/source-authoring.md +8 -0
- package/src/public/skills/kibi-freshness/SKILL.md +39 -9
- package/src/public/skills/kibi-freshness/resources/branch-lifecycle.md +7 -0
- package/src/public/skills/kibi-freshness/resources/operation-access.md +6 -0
- package/src/public/skills/kibi-freshness/resources/source-authoring.md +7 -0
- package/src/public/skills/kibi-traceability/SKILL.md +47 -47
- package/src/public/skills/kibi-traceability/resources/branch-lifecycle.md +7 -0
- package/src/public/skills/kibi-traceability/resources/operation-access.md +5 -0
- package/src/public/skills/kibi-traceability/resources/source-authoring.md +6 -0
- package/src/public/skills/kibi-traceability/resources/traceability.md +8 -0
- package/src/public/skills/kibi-usage/SKILL.md +136 -231
- package/src/public/skills/kibi-usage/resources/branch-lifecycle.md +31 -0
- package/src/public/skills/kibi-usage/resources/kb-improvement.md +38 -0
- package/src/public/skills/kibi-usage/resources/operation-access.md +36 -38
- package/src/public/skills/kibi-usage/resources/proof.md +105 -0
- package/src/public/skills/kibi-usage/resources/relationship-directions.md +3 -3
- package/src/public/skills/kibi-usage/resources/source-authoring.md +31 -0
- package/src/public/skills/kibi-usage/resources/workflows.md +57 -4
- package/src/public/symbol-granularity.generated.ts +41 -0
- package/src/public/symbol-granularity.ts +35 -59
- package/src/public/telemetry-acceptance-types.d.ts +98 -0
- package/src/public/telemetry-acceptance.ts +30 -93
- package/src/public/telemetry-remediation.ts +1 -1
- package/src/schemas/entity.schema.json +1254 -239
- package/templates/github/kibi-badge.yml +86 -0
- package/templates/github/kibi-report.yml +84 -0
- package/dist/operations/autopilot/activation.d.ts +0 -4
- package/dist/operations/autopilot/activation.d.ts.map +0 -1
- package/dist/operations/autopilot/candidates.d.ts +0 -4
- package/dist/operations/autopilot/discovery.d.ts.map +0 -1
- package/dist/operations/autopilot/generate.d.ts +0 -8
- package/dist/operations/autopilot/generate.d.ts.map +0 -1
- package/dist/operations/autopilot/generate.js +0 -112
- package/dist/operations/autopilot/guidance.d.ts.map +0 -1
- package/dist/operations/autopilot/presentation.d.ts +0 -13
- package/dist/operations/autopilot/presentation.d.ts.map +0 -1
- package/dist/operations/autopilot/presentation.js +0 -91
- package/dist/operations/autopilot/types.d.ts.map +0 -1
- package/dist/operations/autopilot/types.js +0 -8
- package/dist/public/operations/specs/autopilot.d.ts.map +0 -1
- package/dist/public/skills/init-kibi/SKILL.md +0 -62
- package/dist/public/verification-receipt.d.ts +0 -75
- package/dist/public/verification-receipt.d.ts.map +0 -1
- package/dist/public/verification-receipt.js +0 -129
- package/src/public/skills/init-kibi/SKILL.md +0 -62
- package/src/public/verification-receipt.ts +0 -170
- /package/dist/operations/{autopilot → bootstrap}/candidate-helpers.d.ts +0 -0
- /package/dist/operations/{autopilot → bootstrap}/candidate-helpers.js +0 -0
- /package/dist/operations/{autopilot → bootstrap}/requirement-claims.d.ts +0 -0
- /package/dist/operations/{autopilot → bootstrap}/requirement-claims.js +0 -0
|
@@ -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
|
+
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type LegacyMigrationPlan } from "../legacy-migration-plan.js";
|
|
2
|
+
import { type MigrationPlan } from "../migration-plan.js";
|
|
2
3
|
import { type RepairPlan } from "../repair-plan.js";
|
|
3
4
|
import type { OperationContext } from "../runtime-types.js";
|
|
4
5
|
import type { OperationResult } from "../types.js";
|
|
@@ -20,6 +21,8 @@ export type CoverageInput = {
|
|
|
20
21
|
readonly by?: "req" | "symbol" | "type";
|
|
21
22
|
readonly tags?: readonly string[];
|
|
22
23
|
readonly includePassing?: boolean;
|
|
24
|
+
/** Requirement proof-status filter (req mode). Implies include-passing. */
|
|
25
|
+
readonly statuses?: readonly string[];
|
|
23
26
|
readonly includeTransitive?: boolean;
|
|
24
27
|
readonly limit?: number;
|
|
25
28
|
readonly offset?: number;
|
|
@@ -34,6 +37,8 @@ export type CoveragePayload = {
|
|
|
34
37
|
readonly rows: readonly Readonly<Record<string, unknown>>[];
|
|
35
38
|
readonly repairPlan?: RepairPlan;
|
|
36
39
|
readonly legacyMigrationPlan?: LegacyMigrationPlan;
|
|
40
|
+
readonly symbolRepairPlan?: Readonly<Record<string, unknown>>;
|
|
41
|
+
readonly migrationPlan?: MigrationPlan;
|
|
37
42
|
readonly meta?: Readonly<Record<string, unknown>>;
|
|
38
43
|
};
|
|
39
44
|
export type GraphInput = {
|
|
@@ -98,11 +103,20 @@ export declare const findGapsSpec: {
|
|
|
98
103
|
readonly effects: readonly ["kb-read"];
|
|
99
104
|
readonly execute: typeof executeFindGaps;
|
|
100
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";
|
|
101
115
|
export declare function executeCoverage(input: CoverageInput, context: OperationContext): Promise<OperationResult<CoveragePayload>>;
|
|
102
116
|
export declare const coverageSpec: {
|
|
103
117
|
readonly name: "kb_coverage";
|
|
104
118
|
readonly cliName: "coverage";
|
|
105
|
-
readonly description: "Generate curated structural coverage and conservative end-to-end requirement proof reports for requirements, symbols, or grouped types.
|
|
119
|
+
readonly description: "Generate curated structural coverage and conservative end-to-end requirement proof reports for requirements, symbols, or grouped types. Reports include the compatible repair plan plus typed kibi.migration-plan.v2 actions; semantic and E2E actions remain review/execution work. Paginated plans identify incomplete scope and no mutation occurs.";
|
|
106
120
|
readonly businessInputSchema: {
|
|
107
121
|
readonly type: "object";
|
|
108
122
|
readonly properties: {
|
|
@@ -121,6 +135,14 @@ export declare const coverageSpec: {
|
|
|
121
135
|
readonly type: "boolean";
|
|
122
136
|
readonly default: false;
|
|
123
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
|
+
};
|
|
124
146
|
readonly includeTransitive: {
|
|
125
147
|
readonly type: "boolean";
|
|
126
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":"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"}
|
|
@@ -1,7 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { join } from "node:path";
|
|
2
|
+
import { resolveBoundSymbolScope } from "../../../extractors/manifest.js";
|
|
3
|
+
import { PROOF_RECEIPT_MAX_AGE_SECONDS } from "../../proof-receipt.js";
|
|
4
|
+
import { executeStatus } from "../discovery-executors.js";
|
|
2
5
|
import { buildLegacyMigrationPlanFromContext, } from "../legacy-migration-plan.js";
|
|
6
|
+
import { buildActionsFromCoverage, buildMigrationPlan, mergeMigrationPlans, } from "../migration-plan.js";
|
|
3
7
|
import { runOperationJsonQuery, toPrologAtom, toPrologList, } from "../prolog-json.js";
|
|
4
8
|
import { buildRepairPlan } from "../repair-plan.js";
|
|
9
|
+
import { addCoordinateRepairEvidence, buildSymbolRepairPlan, } from "../symbol-repair-plan.js";
|
|
5
10
|
import { readWorkspaceSnapshot } from "../workspace-snapshot.js";
|
|
6
11
|
const ENTITY_TYPES = [
|
|
7
12
|
"req",
|
|
@@ -25,6 +30,18 @@ function validateEntityType(type) {
|
|
|
25
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.`);
|
|
26
31
|
}
|
|
27
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
|
+
}
|
|
28
45
|
export async function executeFindGaps(input, context) {
|
|
29
46
|
validateEntityType(input.type);
|
|
30
47
|
try {
|
|
@@ -70,6 +87,71 @@ export const findGapsSpec = {
|
|
|
70
87
|
effects: ["kb-read"],
|
|
71
88
|
execute: executeFindGaps,
|
|
72
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
|
+
}
|
|
73
155
|
export async function executeCoverage(input, context) {
|
|
74
156
|
try {
|
|
75
157
|
const snapshotEvidence = await readWorkspaceSnapshot(context);
|
|
@@ -77,27 +159,82 @@ export async function executeCoverage(input, context) {
|
|
|
77
159
|
? snapshotEvidence.snapshot.hash
|
|
78
160
|
: "unknown";
|
|
79
161
|
const checkedAt = context.clock().toISOString();
|
|
80
|
-
const
|
|
81
|
-
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);
|
|
176
|
+
const symbolRepairPlan = input.by === "symbol"
|
|
177
|
+
? await buildSymbolRepairPlan(payload.rows, context)
|
|
178
|
+
: undefined;
|
|
82
179
|
const legacyMigrationPlan = input.includeMigrationPreview === true && repairPlan !== undefined
|
|
83
180
|
? await buildLegacyMigrationPlanFromContext(repairPlan, input, codeSnapshot, context)
|
|
84
181
|
: undefined;
|
|
182
|
+
// Coverage can still report its complete Prolog-backed domain in a
|
|
183
|
+
// synthetic or non-Git workspace where branch status cannot be resolved.
|
|
184
|
+
// Preserve the coverage plan and let status expose its own branch action
|
|
185
|
+
// when an attachment is available.
|
|
186
|
+
let statusPlan;
|
|
187
|
+
try {
|
|
188
|
+
const statusResult = await executeStatus({}, context);
|
|
189
|
+
statusPlan = statusResult.structuredContent?.migrationPlan;
|
|
190
|
+
}
|
|
191
|
+
catch (error) {
|
|
192
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
193
|
+
if (!message.includes("Failed to resolve active branch"))
|
|
194
|
+
throw error;
|
|
195
|
+
}
|
|
196
|
+
const coveragePlan = buildMigrationPlan({
|
|
197
|
+
expected: {
|
|
198
|
+
branch: context.branchAttachment?.gitBranch ?? null,
|
|
199
|
+
kbBranch: context.branchAttachment?.kbBranch ?? null,
|
|
200
|
+
...(typeof payload.meta?.snapshotId === "string"
|
|
201
|
+
? { kbSnapshotId: payload.meta.snapshotId }
|
|
202
|
+
: {}),
|
|
203
|
+
workspaceSnapshot: codeSnapshot,
|
|
204
|
+
},
|
|
205
|
+
evaluatedDomains: ["semantic", "proof", "symbol"],
|
|
206
|
+
incompleteDomains: payload.meta?.scopeComplete === false ? ["coverage"] : [],
|
|
207
|
+
actions: buildActionsFromCoverage({
|
|
208
|
+
...(repairPlan !== undefined
|
|
209
|
+
? {
|
|
210
|
+
repairPlan: repairPlan,
|
|
211
|
+
}
|
|
212
|
+
: {}),
|
|
213
|
+
...(symbolRepairPlan !== undefined ? { symbolRepairPlan } : {}),
|
|
214
|
+
}),
|
|
215
|
+
});
|
|
216
|
+
const migrationPlan = statusPlan
|
|
217
|
+
? mergeMigrationPlans([statusPlan, coveragePlan])
|
|
218
|
+
: coveragePlan;
|
|
85
219
|
const enrichedPayload = {
|
|
86
220
|
...payload,
|
|
221
|
+
rows,
|
|
87
222
|
...(repairPlan !== undefined ? { repairPlan } : {}),
|
|
88
223
|
...(legacyMigrationPlan !== undefined ? { legacyMigrationPlan } : {}),
|
|
224
|
+
...(symbolRepairPlan !== undefined ? { symbolRepairPlan } : {}),
|
|
225
|
+
migrationPlan,
|
|
89
226
|
meta: {
|
|
90
227
|
...(payload.meta ?? {}),
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
228
|
+
proofReceiptMaxAgeSeconds: PROOF_RECEIPT_MAX_AGE_SECONDS,
|
|
229
|
+
proofSnapshot: codeSnapshot,
|
|
230
|
+
proofSnapshotAvailable: snapshotEvidence.available,
|
|
94
231
|
...(snapshotEvidence.available
|
|
95
232
|
? {
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
233
|
+
proofSnapshotDirty: snapshotEvidence.snapshot.dirty,
|
|
234
|
+
proofSnapshotFileCount: snapshotEvidence.snapshot.fileCount,
|
|
235
|
+
proofSnapshotVersion: snapshotEvidence.snapshot.version,
|
|
99
236
|
}
|
|
100
|
-
: {
|
|
237
|
+
: { proofSnapshotError: snapshotEvidence.error }),
|
|
101
238
|
},
|
|
102
239
|
};
|
|
103
240
|
const fullyCovered = Number(enrichedPayload.summary?.fullyCovered ?? 0);
|
|
@@ -121,13 +258,21 @@ export async function executeCoverage(input, context) {
|
|
|
121
258
|
export const coverageSpec = {
|
|
122
259
|
name: "kb_coverage",
|
|
123
260
|
cliName: "coverage",
|
|
124
|
-
description: "Generate curated structural coverage and conservative end-to-end requirement proof reports for requirements, symbols, or grouped types.
|
|
261
|
+
description: "Generate curated structural coverage and conservative end-to-end requirement proof reports for requirements, symbols, or grouped types. Reports include the compatible repair plan plus typed kibi.migration-plan.v2 actions; semantic and E2E actions remain review/execution work. Paginated plans identify incomplete scope and no mutation occurs.",
|
|
125
262
|
businessInputSchema: {
|
|
126
263
|
type: "object",
|
|
127
264
|
properties: {
|
|
128
265
|
by: { type: "string", enum: ["req", "symbol", "type"], default: "req" },
|
|
129
266
|
tags: { type: "array", items: { type: "string" } },
|
|
130
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
|
+
},
|
|
131
276
|
includeTransitive: { type: "boolean", default: true },
|
|
132
277
|
limit: { type: "integer", default: 100 },
|
|
133
278
|
offset: { type: "integer", default: 0 },
|