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
|
@@ -1,5 +1,22 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Kibi — repo-local, per-branch, queryable long-term memory for software projects
|
|
3
|
+
* Copyright (C) 2026 Piotr Franczyk
|
|
4
|
+
*
|
|
5
|
+
* This program is free software: you can redistribute it and/or modify
|
|
6
|
+
* it under the terms of the GNU Affero General Public License as published by
|
|
7
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
8
|
+
* (at your option) any later version.
|
|
9
|
+
*
|
|
10
|
+
* This program is distributed in the hope that it will be useful,
|
|
11
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
* GNU Affero General Public License for more details.
|
|
14
|
+
*
|
|
15
|
+
* You should have received a copy of the GNU Affero General Public License
|
|
16
|
+
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
17
|
+
*/
|
|
1
18
|
// implements REQ-003
|
|
2
|
-
export const LATEST_KB_SCHEMA_VERSION =
|
|
19
|
+
export const LATEST_KB_SCHEMA_VERSION = 5;
|
|
3
20
|
// implements REQ-003
|
|
4
21
|
export function normalizeSchemaVersion(schemaVersion) {
|
|
5
22
|
if (schemaVersion === undefined || schemaVersion === null) {
|
|
@@ -18,7 +35,10 @@ export function normalizeSchemaVersion(schemaVersion) {
|
|
|
18
35
|
// implements REQ-003
|
|
19
36
|
export function getSchemaVersionStatus(config) {
|
|
20
37
|
const latestVersion = LATEST_KB_SCHEMA_VERSION;
|
|
21
|
-
const hasSchemaVersion = config !== null &&
|
|
38
|
+
const hasSchemaVersion = config !== null &&
|
|
39
|
+
config !== undefined &&
|
|
40
|
+
"schemaVersion" in config &&
|
|
41
|
+
config.schemaVersion !== undefined;
|
|
22
42
|
const currentVersion = normalizeSchemaVersion(config?.schemaVersion);
|
|
23
43
|
if (currentVersion === null) {
|
|
24
44
|
return {
|
|
@@ -27,8 +47,8 @@ export function getSchemaVersionStatus(config) {
|
|
|
27
47
|
latestVersion,
|
|
28
48
|
needsMigration: true,
|
|
29
49
|
warning: hasSchemaVersion
|
|
30
|
-
? "KB
|
|
31
|
-
: "KB
|
|
50
|
+
? "KB schemaVersion is invalid and should be migrated."
|
|
51
|
+
: "KB schemaVersion is missing; the repository should be initialized or migrated.",
|
|
32
52
|
};
|
|
33
53
|
}
|
|
34
54
|
if (currentVersion > latestVersion) {
|
|
@@ -37,7 +57,7 @@ export function getSchemaVersionStatus(config) {
|
|
|
37
57
|
currentVersion,
|
|
38
58
|
latestVersion,
|
|
39
59
|
needsMigration: false,
|
|
40
|
-
warning: `KB
|
|
60
|
+
warning: `KB schemaVersion ${currentVersion} is newer than the latest supported version ${latestVersion}.`,
|
|
41
61
|
};
|
|
42
62
|
}
|
|
43
63
|
if (currentVersion < latestVersion) {
|
|
@@ -46,7 +66,7 @@ export function getSchemaVersionStatus(config) {
|
|
|
46
66
|
currentVersion,
|
|
47
67
|
latestVersion,
|
|
48
68
|
needsMigration: true,
|
|
49
|
-
warning: `KB
|
|
69
|
+
warning: `KB schemaVersion ${currentVersion} is older than the latest version ${latestVersion} and should be migrated.`,
|
|
50
70
|
};
|
|
51
71
|
}
|
|
52
72
|
return {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { BaseEntity, FactFields } from "../types/entities.js";
|
|
2
2
|
import type { BaseRelationship } from "../types/relationships.js";
|
|
3
|
-
import { type KbConfigPaths } from "./config.js";
|
|
4
3
|
export interface SemanticClaim {
|
|
5
4
|
source: string;
|
|
6
5
|
subjectKey: string;
|
|
@@ -13,9 +12,6 @@ export interface SemanticClaim {
|
|
|
13
12
|
export interface StrictModelInput {
|
|
14
13
|
claim: SemanticClaim;
|
|
15
14
|
statement: string;
|
|
16
|
-
config?: Pick<{
|
|
17
|
-
paths: KbConfigPaths;
|
|
18
|
-
}, "paths">;
|
|
19
15
|
}
|
|
20
16
|
type EntityProperties = Partial<Omit<BaseEntity, "created_at" | "updated_at"> & FactFields> & {
|
|
21
17
|
id: string;
|
|
@@ -60,5 +56,6 @@ export declare function normalizePropertyKey(value: string): string;
|
|
|
60
56
|
export declare function buildStableRequirementIds(claim: SemanticClaim): StableRequirementIds;
|
|
61
57
|
export declare function buildStrictWriteSet(input: StrictModelInput): StrictWriteSet;
|
|
62
58
|
export declare function modelRequirementClaims(inputs: ReadonlyArray<StrictModelInput>): StrictWriteSet[];
|
|
59
|
+
export declare function normalizeTextRef(provenance: string | undefined, source: string): string;
|
|
63
60
|
export {};
|
|
64
61
|
//# sourceMappingURL=strict-modeling.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"strict-modeling.d.ts","sourceRoot":"","sources":["../../src/utils/strict-modeling.ts"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACnE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"strict-modeling.d.ts","sourceRoot":"","sources":["../../src/utils/strict-modeling.ts"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACnE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAKlE,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,IAAI,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,MAAM,GAAG,UAAU,CAAC;IAC7D,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;IACjC,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,aAAa,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,KAAK,gBAAgB,GAAG,OAAO,CAC7B,IAAI,CAAC,UAAU,EAAE,YAAY,GAAG,YAAY,CAAC,GAAG,UAAU,CAC3D,GAAG;IACF,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,WAAW,UAAU,CACzB,KAAK,SAAS,KAAK,GAAG,MAAM,GAAG,KAAK,GAAG,MAAM,EAC7C,WAAW,SAAS,gBAAgB,GAAG,gBAAgB;IAEvD,IAAI,EAAE,KAAK,CAAC;IACZ,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,WAAW,CAAC;CACzB;AAED,MAAM,MAAM,gBAAgB,GAAG,IAAI,CACjC,gBAAgB,EAChB,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,QAAQ,GAAG,YAAY,CACjD,CAAC;AAEF,MAAM,WAAW,oBAAoB;IACnC,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,EAAE,MAAM,CAAC;IACtB,cAAc,EAAE,MAAM,CAAC;IACvB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,gBAAgB,EAAE,MAAM,CAAC;IACzB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,qBAAqB,EAAE,MAAM,CAAC;IAC9B,eAAe,EAAE,MAAM,CAAC;CACzB;AAED,UAAU,yBAAyB;IACjC,GAAG,EAAE,UAAU,CAAC,KAAK,CAAC,CAAC;IACvB,WAAW,EAAE,UAAU,CAAC,MAAM,CAAC,CAAC;IAChC,YAAY,EAAE,UAAU,CAAC,MAAM,CAAC,CAAC;IACjC,aAAa,EAAE,gBAAgB,EAAE,CAAC;IAClC,QAAQ,EAAE,IAAI,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,UAAU,mBAAmB;IAC3B,eAAe,EAAE,UAAU,CAAC,MAAM,CAAC,CAAC;IACpC,aAAa,EAAE,gBAAgB,EAAE,CAAC;IAClC,QAAQ,EAAE,KAAK,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,MAAM,cAAc,GAAG,yBAAyB,GAAG,mBAAmB,CAAC;AAE7E,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAiBzD;AAED,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAe1D;AAED,wBAAgB,yBAAyB,CACvC,KAAK,EAAE,aAAa,GACnB,oBAAoB,CAwBtB;AAED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,gBAAgB,GAAG,cAAc,CAsH3E;AAED,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,aAAa,CAAC,gBAAgB,CAAC,GACtC,cAAc,EAAE,CAkBlB;AAiDD,wBAAgB,gBAAgB,CAC9B,UAAU,EAAE,MAAM,GAAG,SAAS,EAC9B,MAAM,EAAE,MAAM,GACb,MAAM,CAMR"}
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
*/
|
|
18
18
|
import { createHash } from "node:crypto";
|
|
19
19
|
import * as path from "node:path";
|
|
20
|
-
import {
|
|
20
|
+
import { CANONICAL_ENTITY_PATHS } from "./kb-paths.js";
|
|
21
21
|
const STRICT_CONFIDENCE_THRESHOLD = 0.7;
|
|
22
22
|
export function normalizeSubjectKey(value) {
|
|
23
23
|
const normalized = value
|
|
@@ -78,7 +78,7 @@ export function buildStrictWriteSet(input) {
|
|
|
78
78
|
confidence,
|
|
79
79
|
provenance: textRef,
|
|
80
80
|
});
|
|
81
|
-
const sourcePaths = resolveEntitySourcePaths(
|
|
81
|
+
const sourcePaths = resolveEntitySourcePaths();
|
|
82
82
|
if (confidence < STRICT_CONFIDENCE_THRESHOLD) {
|
|
83
83
|
return {
|
|
84
84
|
observationFact: {
|
|
@@ -232,7 +232,7 @@ function normalizeStatement(statement) {
|
|
|
232
232
|
}
|
|
233
233
|
return normalized;
|
|
234
234
|
}
|
|
235
|
-
function normalizeTextRef(provenance, source) {
|
|
235
|
+
export function normalizeTextRef(provenance, source) {
|
|
236
236
|
const value = provenance?.trim() || source.trim();
|
|
237
237
|
if (!value) {
|
|
238
238
|
throw new Error("Strict modeling requires claim provenance or source");
|
|
@@ -366,15 +366,14 @@ function dedupeRelationships(relationships) {
|
|
|
366
366
|
}
|
|
367
367
|
return deduped;
|
|
368
368
|
}
|
|
369
|
-
function resolveEntitySourcePaths(
|
|
369
|
+
function resolveEntitySourcePaths() {
|
|
370
370
|
return {
|
|
371
|
-
requirements: normalizeEntityDirectory(
|
|
372
|
-
facts: normalizeEntityDirectory(
|
|
371
|
+
requirements: normalizeEntityDirectory(CANONICAL_ENTITY_PATHS.requirements),
|
|
372
|
+
facts: normalizeEntityDirectory(CANONICAL_ENTITY_PATHS.facts),
|
|
373
373
|
};
|
|
374
374
|
}
|
|
375
|
-
function normalizeEntityDirectory(directory
|
|
376
|
-
|
|
377
|
-
return selected.split(path.sep).join("/").replace(/\/+$/g, "");
|
|
375
|
+
function normalizeEntityDirectory(directory) {
|
|
376
|
+
return directory.split(path.sep).join("/").replace(/\/+$/g, "");
|
|
378
377
|
}
|
|
379
378
|
function buildEntitySourcePath(directory, entityId) {
|
|
380
379
|
return `${directory}/${entityId}.md`;
|
package/package.json
CHANGED
|
@@ -1,21 +1,30 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kibi-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Kibi CLI for knowledge base management",
|
|
6
6
|
"engines": {
|
|
7
|
-
"node": ">=
|
|
7
|
+
"node": ">=22"
|
|
8
8
|
},
|
|
9
9
|
"main": "./dist/cli.js",
|
|
10
10
|
"bin": {
|
|
11
11
|
"kibi": "bin/kibi"
|
|
12
12
|
},
|
|
13
|
-
"files": [
|
|
13
|
+
"files": [
|
|
14
|
+
"dist",
|
|
15
|
+
"bin",
|
|
16
|
+
"schema",
|
|
17
|
+
"src/schemas",
|
|
18
|
+
"src/public",
|
|
19
|
+
"templates"
|
|
20
|
+
],
|
|
14
21
|
"scripts": {
|
|
15
|
-
"build": "tsc -p tsconfig.json && mkdir -p dist/public/skills && cp -r src/public/skills/. dist/public/skills/",
|
|
22
|
+
"build": "tsc -p tsconfig.json && rm -rf dist/public/skills && mkdir -p dist/public/skills dist/report && cp -r src/public/skills/. dist/public/skills/ && cp src/report/html-report.css dist/report/html-report.css && node ../../scripts/generate-entity-schema.mjs --check",
|
|
16
23
|
"test": "node ../../scripts/run-owned-engine-tests.mjs -- bun test --timeout 15000 .",
|
|
17
24
|
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
18
|
-
"
|
|
25
|
+
"schema:generate": "tsc -p tsconfig.json && node ../../scripts/generate-entity-schema.mjs",
|
|
26
|
+
"schema:check": "tsc -p tsconfig.json && node ../../scripts/generate-entity-schema.mjs --check",
|
|
27
|
+
"prepack": "npm run build && node ../../scripts/verify-package-contract.mjs kibi-cli"
|
|
19
28
|
},
|
|
20
29
|
"exports": {
|
|
21
30
|
".": {
|
|
@@ -38,14 +47,18 @@
|
|
|
38
47
|
"types": "./dist/public/operations/runtime-types.d.ts",
|
|
39
48
|
"default": "./dist/public/operations/runtime-types.js"
|
|
40
49
|
},
|
|
50
|
+
"./operations/result-envelope": {
|
|
51
|
+
"types": "./dist/public/operations/result-envelope.d.ts",
|
|
52
|
+
"default": "./dist/public/operations/result-envelope.js"
|
|
53
|
+
},
|
|
54
|
+
"./runtime/cli-runtime": {
|
|
55
|
+
"types": "./dist/runtime/cli-runtime.d.ts",
|
|
56
|
+
"default": "./dist/runtime/cli-runtime.js"
|
|
57
|
+
},
|
|
41
58
|
"./operations/node-ports": {
|
|
42
59
|
"types": "./dist/public/operations/node-ports.d.ts",
|
|
43
60
|
"default": "./dist/public/operations/node-ports.js"
|
|
44
61
|
},
|
|
45
|
-
"./verification-receipt": {
|
|
46
|
-
"types": "./dist/public/verification-receipt.d.ts",
|
|
47
|
-
"default": "./dist/public/verification-receipt.js"
|
|
48
|
-
},
|
|
49
62
|
"./operations/semantic-advisor/analyze-prose": {
|
|
50
63
|
"types": "./dist/operations/semantic-advisor/analyze-prose.d.ts",
|
|
51
64
|
"default": "./dist/operations/semantic-advisor/analyze-prose.js"
|
|
@@ -62,6 +75,10 @@
|
|
|
62
75
|
"types": "./dist/public/extractors/symbols-coordinator.d.ts",
|
|
63
76
|
"default": "./dist/public/extractors/symbols-coordinator.js"
|
|
64
77
|
},
|
|
78
|
+
"./extractors/symbol-coordinates": {
|
|
79
|
+
"types": "./dist/extractors/symbol-coordinates.d.ts",
|
|
80
|
+
"default": "./dist/extractors/symbol-coordinates.js"
|
|
81
|
+
},
|
|
65
82
|
"./extractors/manifest": {
|
|
66
83
|
"types": "./dist/public/extractors/manifest.d.ts",
|
|
67
84
|
"default": "./dist/public/extractors/manifest.js"
|
|
@@ -94,6 +111,18 @@
|
|
|
94
111
|
"types": "./dist/search-ranking.d.ts",
|
|
95
112
|
"default": "./dist/search-ranking.js"
|
|
96
113
|
},
|
|
114
|
+
"./intent-search": {
|
|
115
|
+
"types": "./dist/intent-search.d.ts",
|
|
116
|
+
"default": "./dist/intent-search.js"
|
|
117
|
+
},
|
|
118
|
+
"./playwright-reporter": {
|
|
119
|
+
"types": "./dist/proof/producers/playwright-reporter.d.ts",
|
|
120
|
+
"default": "./dist/proof/producers/playwright-reporter.js"
|
|
121
|
+
},
|
|
122
|
+
"./playwright-case-id": {
|
|
123
|
+
"types": "./dist/proof/producers/playwright-case-id.d.ts",
|
|
124
|
+
"default": "./dist/proof/producers/playwright-case-id.js"
|
|
125
|
+
},
|
|
97
126
|
"./public/check-types": {
|
|
98
127
|
"types": "./dist/public/check-types.d.ts",
|
|
99
128
|
"default": "./dist/public/check-types.js"
|
|
@@ -151,6 +180,10 @@
|
|
|
151
180
|
"types": "./dist/operations/mutation/symbol-refresh.d.ts",
|
|
152
181
|
"default": "./dist/operations/mutation/symbol-refresh.js"
|
|
153
182
|
},
|
|
183
|
+
"./operations/mutation/symbol-compiler-lock": {
|
|
184
|
+
"types": "./dist/operations/mutation/symbol-compiler-lock.d.ts",
|
|
185
|
+
"default": "./dist/operations/mutation/symbol-compiler-lock.js"
|
|
186
|
+
},
|
|
154
187
|
"./operations/mutation/types": {
|
|
155
188
|
"types": "./dist/operations/mutation/types.d.ts",
|
|
156
189
|
"default": "./dist/operations/mutation/types.js"
|
|
@@ -193,12 +226,15 @@
|
|
|
193
226
|
"fast-glob": "^3.2.12",
|
|
194
227
|
"gray-matter": "^4.0.3",
|
|
195
228
|
"js-yaml": "^4.1.0",
|
|
196
|
-
"kibi-core": "^0.
|
|
229
|
+
"kibi-core": "^0.12.0",
|
|
230
|
+
"saxes": "^6.0.0",
|
|
197
231
|
"ts-morph": "^23.0.0",
|
|
198
|
-
"ignore": "^5.3.0"
|
|
232
|
+
"ignore": "^5.3.0",
|
|
233
|
+
"yaml": "^2.9.0"
|
|
199
234
|
},
|
|
200
235
|
"devDependencies": {
|
|
201
236
|
"@types/node": "latest",
|
|
237
|
+
"semver": "^7.7.4",
|
|
202
238
|
"typescript": "^5.7.0"
|
|
203
239
|
},
|
|
204
240
|
"license": "AGPL-3.0-or-later",
|
package/schema/config.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
3
|
"$id": "https://raw.githubusercontent.com/Looted/kibi/master/packages/cli/schema/config.json",
|
|
4
|
-
"title": "Kibi Configuration",
|
|
5
|
-
"description": "
|
|
4
|
+
"title": "Kibi Legacy Configuration (deprecated)",
|
|
5
|
+
"description": "Deprecated leftover .kb/config.json schema kept only so migration tooling can recognize old files. Entity paths and check policy in this document are ignored at runtime. Canonical lifecycle metadata lives in .kb/manifest.json.",
|
|
6
6
|
"type": "object",
|
|
7
7
|
"properties": {
|
|
8
8
|
"$schema": {
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://raw.githubusercontent.com/Looted/kibi/master/packages/cli/schema/manifest.json",
|
|
4
|
+
"title": "Kibi Lifecycle Manifest",
|
|
5
|
+
"description": "Kibi-owned lifecycle metadata written to .kb/manifest.json. This is not a user configuration file: entity paths and check enforcement are canonical and cannot be overridden here.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": true,
|
|
8
|
+
"required": ["manifestVersion", "schemaVersion"],
|
|
9
|
+
"properties": {
|
|
10
|
+
"manifestVersion": {
|
|
11
|
+
"type": "integer",
|
|
12
|
+
"minimum": 1,
|
|
13
|
+
"description": "Payload schema for this lifecycle manifest"
|
|
14
|
+
},
|
|
15
|
+
"schemaVersion": {
|
|
16
|
+
"type": "integer",
|
|
17
|
+
"minimum": 1,
|
|
18
|
+
"description": "KB entity/relationship schema generation"
|
|
19
|
+
},
|
|
20
|
+
"semanticAdvisorBackfill": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"enum": ["pending", "completed", "not_applicable"],
|
|
23
|
+
"description": "Retroactive semantic-advisor backfill review state"
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Kibi — repo-local, per-branch, queryable long-term memory for software projects
|
|
3
|
-
Copyright (C) 2026 Piotr Franczyk
|
|
4
|
-
|
|
5
|
-
This program is free software: you can redistribute it and/or modify
|
|
6
|
-
it under the terms of the GNU Affero General Public License as published by
|
|
7
|
-
the Free Software Foundation, either version 3 of the License, or
|
|
8
|
-
(at your option) any later version.
|
|
9
|
-
|
|
10
|
-
This program is distributed in the hope that it will be useful,
|
|
11
|
-
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
-
GNU Affero General Public License for more details.
|
|
14
|
-
|
|
15
|
-
You should have received a copy of the GNU Affero General Public License
|
|
16
|
-
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
2
|
+
* Kibi — repo-local, per-branch, queryable long-term memory for software projects
|
|
3
|
+
* Copyright (C) 2026 Piotr Franczyk
|
|
4
|
+
*
|
|
5
|
+
* This program is free software: you can redistribute it and/or modify
|
|
6
|
+
* it under the terms of the GNU Affero General Public License as published by
|
|
7
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
8
|
+
* (at your option) any later version.
|
|
9
|
+
*
|
|
10
|
+
* This program is distributed in the hope that it will be useful,
|
|
11
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
* GNU Affero General Public License for more details.
|
|
14
|
+
*
|
|
15
|
+
* You should have received a copy of the GNU Affero General Public License
|
|
16
|
+
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
19
|
/**
|
|
@@ -21,9 +21,8 @@
|
|
|
21
21
|
* Import from "kibi-cli/public/check-types" in MCP or external consumers.
|
|
22
22
|
*/
|
|
23
23
|
export type {
|
|
24
|
-
ChecksConfig,
|
|
25
24
|
RuleDefinition,
|
|
26
|
-
|
|
25
|
+
RuleEnforcementClass,
|
|
27
26
|
Violation,
|
|
28
27
|
} from "../utils/rule-registry.js";
|
|
29
28
|
export type {
|
|
@@ -34,11 +33,15 @@ export type {
|
|
|
34
33
|
} from "../utils/strict-modeling.js";
|
|
35
34
|
|
|
36
35
|
export {
|
|
37
|
-
DEFAULT_CHECKS_CONFIG,
|
|
38
36
|
RULE_NAMES,
|
|
39
37
|
RULES,
|
|
38
|
+
getCanonicalRules,
|
|
39
|
+
getDefaultRules,
|
|
40
40
|
getEffectiveRules,
|
|
41
|
-
|
|
41
|
+
getRuleDefinition,
|
|
42
|
+
getRuleEnforcementClass,
|
|
43
|
+
isCanonicalRule,
|
|
44
|
+
ruleRunsByDefault,
|
|
42
45
|
validateRuleName,
|
|
43
46
|
} from "../utils/rule-registry.js";
|
|
44
47
|
|
|
@@ -22,7 +22,12 @@ function isRecord(value: unknown): value is Record<string, unknown> {
|
|
|
22
22
|
|
|
23
23
|
function resultRecord(result: unknown): Record<string, unknown> | undefined {
|
|
24
24
|
if (!isRecord(result)) return undefined;
|
|
25
|
-
|
|
25
|
+
if (isRecord(result.structuredContent)) return result.structuredContent;
|
|
26
|
+
// CLI JSON operations return the same versioned KibiResult envelope as MCP
|
|
27
|
+
// structuredContent. Unwrap its data before deriving operation-specific
|
|
28
|
+
// telemetry fields (coverage/proof fields in particular).
|
|
29
|
+
if (result.kibiProtocol === 1 && isRecord(result.data)) return result.data;
|
|
30
|
+
return result;
|
|
26
31
|
}
|
|
27
32
|
|
|
28
33
|
function stringArray(value: unknown): string[] {
|
|
@@ -80,13 +85,58 @@ function appendSemanticFields(
|
|
|
80
85
|
}
|
|
81
86
|
|
|
82
87
|
const RECEIPT_GAP_CODES = new Set([
|
|
83
|
-
"
|
|
84
|
-
"
|
|
85
|
-
"
|
|
86
|
-
"
|
|
87
|
-
"
|
|
88
|
+
"missing_proof_receipt",
|
|
89
|
+
"stale_proof_receipt",
|
|
90
|
+
"failed_proof_receipt",
|
|
91
|
+
"invalid_proof_receipt",
|
|
92
|
+
"proof_contract_mismatch",
|
|
93
|
+
"proof_snapshot_unavailable",
|
|
88
94
|
]);
|
|
89
95
|
|
|
96
|
+
const MAX_COVERAGE_RECEIPT_GAPS = 50;
|
|
97
|
+
|
|
98
|
+
function coverageReceiptGapDetails(rows: readonly Record<string, unknown>[]): {
|
|
99
|
+
readonly details: readonly Record<string, unknown>[];
|
|
100
|
+
readonly total: number;
|
|
101
|
+
readonly truncated: boolean;
|
|
102
|
+
} {
|
|
103
|
+
const details = rows
|
|
104
|
+
.flatMap((row) => {
|
|
105
|
+
const codes = [...new Set(stringArray(row.proofGaps))]
|
|
106
|
+
.filter((code) => RECEIPT_GAP_CODES.has(code))
|
|
107
|
+
.sort();
|
|
108
|
+
if (codes.length === 0) return [];
|
|
109
|
+
const stages = isRecord(row.proofStages) ? row.proofStages : undefined;
|
|
110
|
+
const passingE2e = isRecord(stages?.passingE2e)
|
|
111
|
+
? stages.passingE2e
|
|
112
|
+
: undefined;
|
|
113
|
+
const testIds = [
|
|
114
|
+
"missingReceiptTests",
|
|
115
|
+
"staleReceiptTests",
|
|
116
|
+
"failedReceiptTests",
|
|
117
|
+
"invalidReceiptTests",
|
|
118
|
+
"contractMismatchReceiptTests",
|
|
119
|
+
"snapshotUnavailableTests",
|
|
120
|
+
].flatMap((key) => stringArray(passingE2e?.[key]));
|
|
121
|
+
const requirementId = typeof row.id === "string" ? row.id : "unknown";
|
|
122
|
+
return [
|
|
123
|
+
{
|
|
124
|
+
requirementId,
|
|
125
|
+
testIds: [...new Set(testIds)].sort(),
|
|
126
|
+
codes,
|
|
127
|
+
},
|
|
128
|
+
];
|
|
129
|
+
})
|
|
130
|
+
.sort((left, right) =>
|
|
131
|
+
left.requirementId.localeCompare(right.requirementId),
|
|
132
|
+
);
|
|
133
|
+
return {
|
|
134
|
+
details: details.slice(0, MAX_COVERAGE_RECEIPT_GAPS),
|
|
135
|
+
total: details.length,
|
|
136
|
+
truncated: details.length > MAX_COVERAGE_RECEIPT_GAPS,
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
|
|
90
140
|
function appendCoverageFields(
|
|
91
141
|
fields: Record<string, unknown>,
|
|
92
142
|
args: Readonly<Record<string, unknown>>,
|
|
@@ -108,6 +158,10 @@ function appendCoverageFields(
|
|
|
108
158
|
fields.coverage_receipt_gap_count = gapCodes.filter((code) =>
|
|
109
159
|
RECEIPT_GAP_CODES.has(code),
|
|
110
160
|
).length;
|
|
161
|
+
const receiptGaps = coverageReceiptGapDetails(rows);
|
|
162
|
+
fields.coverage_receipt_gaps = receiptGaps.details;
|
|
163
|
+
fields.coverage_receipt_gap_total = receiptGaps.total;
|
|
164
|
+
fields.coverage_receipt_gaps_truncated = receiptGaps.truncated;
|
|
111
165
|
if (typeof scope?.complete === "boolean") {
|
|
112
166
|
fields.coverage_scope_complete = scope.complete;
|
|
113
167
|
}
|
|
@@ -135,6 +189,30 @@ export function deriveDiagnosticUsageFields(
|
|
|
135
189
|
}
|
|
136
190
|
|
|
137
191
|
const structured = resultRecord(result);
|
|
192
|
+
const envelope =
|
|
193
|
+
isRecord(structured) && structured.kibiProtocol === 1
|
|
194
|
+
? structured
|
|
195
|
+
: undefined;
|
|
196
|
+
if (envelope) {
|
|
197
|
+
fields.protocol_version = envelope.kibiProtocol;
|
|
198
|
+
fields.result_version =
|
|
199
|
+
typeof envelope.resultVersion === "string"
|
|
200
|
+
? envelope.resultVersion
|
|
201
|
+
: null;
|
|
202
|
+
fields.result_status =
|
|
203
|
+
typeof envelope.status === "string" ? envelope.status : null;
|
|
204
|
+
fields.effect_failures = Array.isArray(envelope.effects)
|
|
205
|
+
? envelope.effects.filter(
|
|
206
|
+
(effect) => isRecord(effect) && effect.status === "failed",
|
|
207
|
+
)
|
|
208
|
+
: [];
|
|
209
|
+
fields.followed_next_actions = Array.isArray(
|
|
210
|
+
telemetry?.followed_next_actions,
|
|
211
|
+
)
|
|
212
|
+
? telemetry.followed_next_actions
|
|
213
|
+
: [];
|
|
214
|
+
fields.unsafe_original_retry = telemetry?.unsafe_original_retry === true;
|
|
215
|
+
}
|
|
138
216
|
if (tool === "kb_query" || tool === "kb_search") {
|
|
139
217
|
const resultCount = Number(structured?.count ?? 0);
|
|
140
218
|
fields.result_count = resultCount;
|
|
@@ -19,7 +19,8 @@ export const REQUIREMENT_COMPILER_CAPABILITIES = [
|
|
|
19
19
|
"contradiction_witnesses",
|
|
20
20
|
"conservative_proof",
|
|
21
21
|
"repair_plan",
|
|
22
|
-
"
|
|
22
|
+
"proof_receipts",
|
|
23
|
+
"proof_contract",
|
|
23
24
|
"telemetry_acceptance",
|
|
24
25
|
] as const;
|
|
25
26
|
|
|
@@ -169,7 +170,10 @@ const DEFAULT_VOLATILE_KEYS = new Set([
|
|
|
169
170
|
"updated_at",
|
|
170
171
|
"updatedAt",
|
|
171
172
|
"usageLogLineNumber",
|
|
172
|
-
"
|
|
173
|
+
"proofSnapshot",
|
|
174
|
+
// Per-workspace filesystem identity; CLI and MCP parity runs use two temp trees.
|
|
175
|
+
"attachedIno",
|
|
176
|
+
"attachedDev",
|
|
173
177
|
]);
|
|
174
178
|
|
|
175
179
|
type PackageManifest = {
|
|
@@ -177,12 +181,17 @@ type PackageManifest = {
|
|
|
177
181
|
readonly version?: string;
|
|
178
182
|
};
|
|
179
183
|
|
|
180
|
-
function
|
|
184
|
+
export function nextAncestorDirectory(current: string): string | undefined {
|
|
185
|
+
const parent = path.dirname(current);
|
|
186
|
+
return parent === current ? undefined : parent;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
export function nearestPackageInfo(entrypoint: string): {
|
|
181
190
|
readonly packageRoot?: string;
|
|
182
191
|
readonly version?: string;
|
|
183
192
|
} {
|
|
184
|
-
let current = path.dirname(entrypoint);
|
|
185
|
-
while (
|
|
193
|
+
let current: string | undefined = path.dirname(entrypoint);
|
|
194
|
+
while (current !== undefined) {
|
|
186
195
|
const manifestPath = path.join(current, "package.json");
|
|
187
196
|
if (existsSync(manifestPath)) {
|
|
188
197
|
try {
|
|
@@ -199,10 +208,9 @@ function nearestPackageInfo(entrypoint: string): {
|
|
|
199
208
|
return { packageRoot: current };
|
|
200
209
|
}
|
|
201
210
|
}
|
|
202
|
-
|
|
203
|
-
if (parent === current) return {};
|
|
204
|
-
current = parent;
|
|
211
|
+
current = nextAncestorDirectory(current);
|
|
205
212
|
}
|
|
213
|
+
return {};
|
|
206
214
|
}
|
|
207
215
|
|
|
208
216
|
function declaredEntrypoint(contents: string): string | undefined {
|
|
@@ -304,7 +312,7 @@ function semanticFingerprint(value: unknown): string {
|
|
|
304
312
|
return JSON.stringify(value);
|
|
305
313
|
}
|
|
306
314
|
|
|
307
|
-
function sortedUnique(values: readonly string[] | undefined): string[] {
|
|
315
|
+
export function sortedUnique(values: readonly string[] | undefined): string[] {
|
|
308
316
|
return [...new Set(values ?? [])].sort((left, right) =>
|
|
309
317
|
left.localeCompare(right),
|
|
310
318
|
);
|
|
@@ -1,15 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
type Dirent,
|
|
3
|
-
existsSync,
|
|
4
|
-
readFileSync,
|
|
5
|
-
readdirSync,
|
|
6
|
-
statSync,
|
|
7
|
-
} from "node:fs";
|
|
1
|
+
import { type Dirent, existsSync, readFileSync, readdirSync } from "node:fs";
|
|
8
2
|
import * as path from "node:path";
|
|
9
3
|
import ignore from "ignore";
|
|
4
|
+
import { DERIVED_KB_PREFIXES } from "../utils/kb-paths.js";
|
|
10
5
|
|
|
11
6
|
const HARD_DENYLIST = [
|
|
12
|
-
".kb",
|
|
13
7
|
".git",
|
|
14
8
|
"node_modules",
|
|
15
9
|
"vendor",
|
|
@@ -18,6 +12,9 @@ const HARD_DENYLIST = [
|
|
|
18
12
|
".opencode",
|
|
19
13
|
];
|
|
20
14
|
|
|
15
|
+
/** Derived .kb/ runtime trees. Authored knowledge lanes stay visible. */
|
|
16
|
+
const HARD_DENY_KB_PREFIXES = DERIVED_KB_PREFIXES;
|
|
17
|
+
|
|
21
18
|
export interface IgnorePolicy {
|
|
22
19
|
isIgnored(inputPath: string): boolean;
|
|
23
20
|
getFastGlobIgnoreGlobs(): string[];
|
|
@@ -41,7 +38,7 @@ function toPosix(p: string): string {
|
|
|
41
38
|
return p.split(path.sep).join("/");
|
|
42
39
|
}
|
|
43
40
|
|
|
44
|
-
// implements REQ-
|
|
41
|
+
// implements REQ-cli-canonical-runtime
|
|
45
42
|
export function createRepoIgnorePolicy(workspaceRoot: string): IgnorePolicy {
|
|
46
43
|
const root = path.resolve(workspaceRoot);
|
|
47
44
|
|
|
@@ -69,7 +66,7 @@ export function createRepoIgnorePolicy(workspaceRoot: string): IgnorePolicy {
|
|
|
69
66
|
if (ent.isDirectory()) {
|
|
70
67
|
// avoid descending into common heavy or control directories
|
|
71
68
|
if (HARD_DENYLIST.includes(name)) continue;
|
|
72
|
-
|
|
69
|
+
if (name === ".kb") continue;
|
|
73
70
|
if (name === ".git") continue;
|
|
74
71
|
walk(abs);
|
|
75
72
|
} else if (ent.isFile()) {
|
|
@@ -113,6 +110,11 @@ export function createRepoIgnorePolicy(workspaceRoot: string): IgnorePolicy {
|
|
|
113
110
|
|
|
114
111
|
function matchesHardDeny(relPosix: string): boolean {
|
|
115
112
|
const segments = relPosix.split("/").filter(Boolean);
|
|
113
|
+
for (const prefix of HARD_DENY_KB_PREFIXES) {
|
|
114
|
+
if (relPosix === prefix || relPosix.startsWith(`${prefix}/`)) {
|
|
115
|
+
return true;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
116
118
|
for (const deny of HARD_DENYLIST) {
|
|
117
119
|
if (segments.includes(deny)) return true;
|
|
118
120
|
}
|
|
@@ -186,6 +188,10 @@ export function createRepoIgnorePolicy(workspaceRoot: string): IgnorePolicy {
|
|
|
186
188
|
globs.push(`**/${d}/**`);
|
|
187
189
|
globs.push(`**/${d}`);
|
|
188
190
|
}
|
|
191
|
+
for (const prefix of HARD_DENY_KB_PREFIXES) {
|
|
192
|
+
globs.push(`**/${prefix}/**`);
|
|
193
|
+
globs.push(`**/${prefix}`);
|
|
194
|
+
}
|
|
189
195
|
|
|
190
196
|
// Root .gitignore patterns (convert to simple globs)
|
|
191
197
|
for (const p of rootGitPatterns) {
|