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,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { execFileSync } from "node:child_process";
|
|
2
2
|
import * as path from "node:path";
|
|
3
3
|
import { extractManifestSymbolRecordsString, } from "../extractors/manifest.js";
|
|
4
|
-
import { mergeCoordinatesWithManifest,
|
|
4
|
+
import { mergeCoordinatesWithManifest, parseCoordinateArtifact as parseStrict, } from "../extractors/symbol-coordinates.js";
|
|
5
5
|
import { analyzeSourceText } from "../extractors/symbols-coordinator.js";
|
|
6
6
|
import { isCoarseGranularityReason } from "../public/symbol-granularity.js";
|
|
7
7
|
import { resolveSymbolsManifestPaths } from "../utils/manifest-paths.js";
|
|
@@ -38,14 +38,27 @@ function resolveRelativeManifestPaths(symbolsManifestPath) {
|
|
|
38
38
|
coordinatesPath: toRepoRelativePath(coordinatesPath),
|
|
39
39
|
};
|
|
40
40
|
}
|
|
41
|
-
function readHeadFileContent(filePath) {
|
|
41
|
+
function readHeadFileContent(filePath, cache) {
|
|
42
|
+
const normalizedPath = filePath.replace(/\\/g, "/");
|
|
43
|
+
const cacheKey = `${process.cwd()}\u0000${normalizedPath}`;
|
|
44
|
+
if (cache?.has(cacheKey)) {
|
|
45
|
+
return cache.get(cacheKey) ?? null;
|
|
46
|
+
}
|
|
42
47
|
try {
|
|
43
|
-
|
|
48
|
+
// Use argv-based git invocation so a source path cannot alter the command.
|
|
49
|
+
// The manifest can exceed a shell helper's small default maxBuffer; without
|
|
50
|
+
// the raised limit the read fails with ENOBUFS and is silently treated as
|
|
51
|
+
// missing, which permanently reports the coordinates manifest as stale.
|
|
52
|
+
const content = execFileSync("git", ["show", `HEAD:${normalizedPath}`], {
|
|
44
53
|
encoding: "utf8",
|
|
45
54
|
stdio: ["pipe", "pipe", "pipe"],
|
|
55
|
+
maxBuffer: 64 * 1024 * 1024,
|
|
46
56
|
});
|
|
57
|
+
cache?.set(cacheKey, content);
|
|
58
|
+
return content;
|
|
47
59
|
}
|
|
48
60
|
catch {
|
|
61
|
+
cache?.set(cacheKey, null);
|
|
49
62
|
return null;
|
|
50
63
|
}
|
|
51
64
|
}
|
|
@@ -60,17 +73,32 @@ function parseManifestRecords(content, filePath) {
|
|
|
60
73
|
return null;
|
|
61
74
|
}
|
|
62
75
|
}
|
|
63
|
-
function
|
|
64
|
-
if (content === null || content === undefined) {
|
|
65
|
-
return { coordinates: {} };
|
|
66
|
-
}
|
|
76
|
+
export function parsedCoordinateOrNull(parse) {
|
|
67
77
|
try {
|
|
68
|
-
|
|
78
|
+
const parsed = parse();
|
|
79
|
+
return parsed.status === "invalid" ? null : parsed;
|
|
69
80
|
}
|
|
70
81
|
catch {
|
|
71
82
|
return null;
|
|
72
83
|
}
|
|
73
84
|
}
|
|
85
|
+
export function manifestRecordSourcePath(record) {
|
|
86
|
+
return typeof record.sourceFile === "string"
|
|
87
|
+
? record.sourceFile
|
|
88
|
+
: typeof record.source === "string"
|
|
89
|
+
? record.source
|
|
90
|
+
: null;
|
|
91
|
+
}
|
|
92
|
+
function parseCoordinateArtifact(content) {
|
|
93
|
+
// An absent artifact must not masquerade as an empty authoritative one:
|
|
94
|
+
// inline authored coordinates stay comparable until the artifact exists.
|
|
95
|
+
// The strict parser preserves identity bindings so versioned artifacts
|
|
96
|
+
// overlay without falling back to source-text heuristics.
|
|
97
|
+
if (content === null || content === undefined) {
|
|
98
|
+
return null;
|
|
99
|
+
}
|
|
100
|
+
return parsedCoordinateOrNull(() => parseStrict(content));
|
|
101
|
+
}
|
|
74
102
|
function normalizeNumber(value) {
|
|
75
103
|
return typeof value === "number" ? value : null;
|
|
76
104
|
}
|
|
@@ -109,7 +137,7 @@ function normalizeRelationships(relationships) {
|
|
|
109
137
|
.sort((left, right) => JSON.stringify(left).localeCompare(JSON.stringify(right)));
|
|
110
138
|
}
|
|
111
139
|
function normalizeManifestSymbolsForSourceFile(records, sourceFile) {
|
|
112
|
-
|
|
140
|
+
const symbols = records
|
|
113
141
|
.filter((record) => {
|
|
114
142
|
if (isDocumentedCoarseRecord(record)) {
|
|
115
143
|
return false;
|
|
@@ -130,6 +158,11 @@ function normalizeManifestSymbolsForSourceFile(records, sourceFile) {
|
|
|
130
158
|
sourceEndColumn: normalizeNumber(record.sourceEndColumn),
|
|
131
159
|
}))
|
|
132
160
|
.sort(compareNormalizedSymbols);
|
|
161
|
+
// Several logical records may own the same declaration. Only identical
|
|
162
|
+
// validated spans collapse; a stale duplicate still carries null coordinates
|
|
163
|
+
// and must remain visible to the equality check.
|
|
164
|
+
return symbols.filter((symbol, index) => index === 0 ||
|
|
165
|
+
JSON.stringify(symbol) !== JSON.stringify(symbols[index - 1]));
|
|
133
166
|
}
|
|
134
167
|
function normalizeAuthoredManifestSymbolsForSourceFile(records, sourceFile) {
|
|
135
168
|
return records
|
|
@@ -204,8 +237,8 @@ function signaturesEqual(left, right) {
|
|
|
204
237
|
function uniqueSorted(paths) {
|
|
205
238
|
return Array.from(new Set(paths)).sort();
|
|
206
239
|
}
|
|
207
|
-
function mergeManifestRecordsWithCoordinates(manifestRecords, coordinateArtifact) {
|
|
208
|
-
return mergeCoordinatesWithManifest(manifestRecords ?? [], coordinateArtifact);
|
|
240
|
+
function mergeManifestRecordsWithCoordinates(manifestRecords, coordinateArtifact, options = {}) {
|
|
241
|
+
return mergeCoordinatesWithManifest(manifestRecords ?? [], coordinateArtifact, options);
|
|
209
242
|
}
|
|
210
243
|
function getEffectiveManifestRecords(options) {
|
|
211
244
|
const { headCoordinateArtifact, headManifestRecords, paths, stagedFiles } = options;
|
|
@@ -224,28 +257,69 @@ function getEffectiveManifestRecords(options) {
|
|
|
224
257
|
stagedCoordinateArtifact,
|
|
225
258
|
};
|
|
226
259
|
}
|
|
260
|
+
/** Max missing/extra symbol titles surfaced per file before "+N more". */
|
|
261
|
+
const MAX_DETAIL_ITEMS = 6;
|
|
262
|
+
function diffSymbolEvidence(sourcePath, expectedSymbols, stagedSymbols) {
|
|
263
|
+
const stagedTitles = new Set(stagedSymbols.map((symbol) => symbol.title));
|
|
264
|
+
const expectedTitles = new Set(expectedSymbols.map((symbol) => symbol.title));
|
|
265
|
+
const missing = expectedSymbols
|
|
266
|
+
.filter((symbol) => !stagedTitles.has(symbol.title))
|
|
267
|
+
.map((symbol) => ({ title: symbol.title, line: symbol.sourceLine ?? 0 }))
|
|
268
|
+
.sort((left, right) => left.title.localeCompare(right.title));
|
|
269
|
+
const extra = stagedSymbols
|
|
270
|
+
.filter((symbol) => !expectedTitles.has(symbol.title))
|
|
271
|
+
.map((symbol) => symbol.title)
|
|
272
|
+
.sort();
|
|
273
|
+
// Pure coordinate drift (titles unchanged) has no symbol-level remedy to
|
|
274
|
+
// name; leave the detail out so the diagnostic stays verdict + refresh.
|
|
275
|
+
if (missing.length === 0 && extra.length === 0) {
|
|
276
|
+
return null;
|
|
277
|
+
}
|
|
278
|
+
return {
|
|
279
|
+
path: sourcePath,
|
|
280
|
+
expectedCount: expectedSymbols.length,
|
|
281
|
+
coveredCount: stagedSymbols.length,
|
|
282
|
+
missing: missing.slice(0, MAX_DETAIL_ITEMS),
|
|
283
|
+
extra: extra.slice(0, MAX_DETAIL_ITEMS),
|
|
284
|
+
};
|
|
285
|
+
}
|
|
227
286
|
export function assessStagedSymbolsManifest(options) {
|
|
228
287
|
const { sourceFiles, stagedFiles, symbolsManifestPath } = options;
|
|
229
288
|
const paths = resolveRelativeManifestPaths(symbolsManifestPath);
|
|
230
|
-
|
|
231
|
-
|
|
289
|
+
// Scope HEAD memoization to one assessment. A long-lived CLI process may
|
|
290
|
+
// assess several commits in the same checkout; a process-global cache would
|
|
291
|
+
// otherwise reuse content from the previous HEAD.
|
|
292
|
+
const headFileContentCache = new Map();
|
|
293
|
+
const readAssessmentHeadFileContent = (filePath) => readHeadFileContent(filePath, headFileContentCache);
|
|
294
|
+
const headManifestRecords = parseManifestRecords(readAssessmentHeadFileContent(paths.symbolsPath), paths.symbolsPath);
|
|
295
|
+
const headCoordinateArtifact = parseCoordinateArtifact(readAssessmentHeadFileContent(paths.coordinatesPath));
|
|
232
296
|
const { stagedCoordinatesFile, stagedCoordinateArtifact, stagedManifestRecords, } = getEffectiveManifestRecords({
|
|
233
297
|
stagedFiles,
|
|
234
298
|
paths,
|
|
235
299
|
headManifestRecords,
|
|
236
300
|
headCoordinateArtifact,
|
|
237
301
|
});
|
|
238
|
-
const
|
|
239
|
-
|
|
302
|
+
const stagedSourceText = new Map(stagedFiles.map((stagedFile) => [
|
|
303
|
+
stagedFile.path.replace(/\\/g, "/"),
|
|
304
|
+
typeof stagedFile.content === "string" ? stagedFile.content : null,
|
|
305
|
+
]));
|
|
306
|
+
const resolveStagedSourceText = (sourceFile) => {
|
|
307
|
+
const normalizedSourceFile = sourceFile.replace(/\\/g, "/");
|
|
308
|
+
return stagedSourceText.has(normalizedSourceFile)
|
|
309
|
+
? (stagedSourceText.get(normalizedSourceFile) ?? null)
|
|
310
|
+
: readAssessmentHeadFileContent(sourceFile);
|
|
311
|
+
};
|
|
312
|
+
const baselineMergedRecords = mergeManifestRecordsWithCoordinates(headManifestRecords, headCoordinateArtifact,
|
|
313
|
+
// Existing bindings must also be valid for the proposed source. Comparing
|
|
314
|
+
// them against HEAD would miss body edits that leave spans unchanged.
|
|
315
|
+
{ resolveSourceText: resolveStagedSourceText });
|
|
316
|
+
const stagedMergedRecords = mergeManifestRecordsWithCoordinates(stagedManifestRecords, stagedCoordinateArtifact, { resolveSourceText: resolveStagedSourceText });
|
|
240
317
|
const requiredRefreshPaths = [];
|
|
241
318
|
const freshPaths = new Set();
|
|
319
|
+
const symbolDetails = [];
|
|
242
320
|
for (const sourceFile of sourceFiles) {
|
|
243
321
|
const manifestRecordsForFile = (stagedManifestRecords ?? []).filter((record) => {
|
|
244
|
-
const recordSource =
|
|
245
|
-
? record.sourceFile
|
|
246
|
-
: typeof record.source === "string"
|
|
247
|
-
? record.source
|
|
248
|
-
: null;
|
|
322
|
+
const recordSource = manifestRecordSourcePath(record);
|
|
249
323
|
return recordSource === sourceFile.path;
|
|
250
324
|
});
|
|
251
325
|
const coarseCovered = manifestRecordsForFile.length > 0 &&
|
|
@@ -253,16 +327,39 @@ export function assessStagedSymbolsManifest(options) {
|
|
|
253
327
|
if (coarseCovered) {
|
|
254
328
|
continue;
|
|
255
329
|
}
|
|
256
|
-
const
|
|
330
|
+
const recordsByTitle = new Map();
|
|
331
|
+
for (const record of manifestRecordsForFile) {
|
|
332
|
+
if (typeof record.title !== "string")
|
|
333
|
+
continue;
|
|
334
|
+
const records = recordsByTitle.get(record.title) ?? [];
|
|
335
|
+
records.push(record);
|
|
336
|
+
recordsByTitle.set(record.title, records);
|
|
337
|
+
}
|
|
338
|
+
// A coarse anchor is allowed to stand in for its extracted declaration
|
|
339
|
+
// only when every authored record with that title is explicitly coarse.
|
|
340
|
+
// If a granular record shares the title, keep the declaration in the
|
|
341
|
+
// equality check so a duplicate anchor cannot hide stale coordinates.
|
|
342
|
+
const coarseTitles = new Set([...recordsByTitle.entries()]
|
|
343
|
+
.filter(([, records]) => records.every(isDocumentedCoarseRecord))
|
|
344
|
+
.map(([title]) => title));
|
|
345
|
+
const expectedSymbols = normalizeExpectedSymbolsForStagedFile(sourceFile).filter((symbol) => !coarseTitles.has(symbol.title));
|
|
257
346
|
const baselineSymbols = normalizeManifestSymbolsForSourceFile(baselineMergedRecords, sourceFile.path);
|
|
258
347
|
if (signaturesEqual(expectedSymbols, baselineSymbols)) {
|
|
259
348
|
continue;
|
|
260
349
|
}
|
|
261
350
|
requiredRefreshPaths.push(sourceFile.path);
|
|
262
|
-
|
|
351
|
+
// Without a usable staged coordinate artifact there is nothing to diff
|
|
352
|
+
// against: every extracted symbol counts as uncovered evidence.
|
|
353
|
+
const stagedSymbols = stagedCoordinateArtifact === null
|
|
354
|
+
? []
|
|
355
|
+
: normalizeManifestSymbolsForSourceFile(stagedMergedRecords, sourceFile.path);
|
|
356
|
+
const detail = diffSymbolEvidence(sourceFile.path, expectedSymbols, stagedSymbols);
|
|
357
|
+
if (detail !== null) {
|
|
358
|
+
symbolDetails.push(detail);
|
|
359
|
+
}
|
|
360
|
+
if (!stagedCoordinatesFile) {
|
|
263
361
|
continue;
|
|
264
362
|
}
|
|
265
|
-
const stagedSymbols = normalizeManifestSymbolsForSourceFile(stagedMergedRecords, sourceFile.path);
|
|
266
363
|
if (signaturesEqual(expectedSymbols, stagedSymbols)) {
|
|
267
364
|
freshPaths.add(sourceFile.path);
|
|
268
365
|
}
|
|
@@ -278,10 +375,29 @@ export function assessStagedSymbolsManifest(options) {
|
|
|
278
375
|
if (sourcePaths.every((sourcePath) => freshPaths.has(sourcePath))) {
|
|
279
376
|
return { state: "fresh", sourcePaths, path: paths.coordinatesPath };
|
|
280
377
|
}
|
|
378
|
+
// Details are only meaningful for the states whose diagnostics fire; a
|
|
379
|
+
// fresh refresh carries no uncovered symbols by definition, and the stale
|
|
380
|
+
// state cites only the non-fresh paths, so details follow that filter.
|
|
381
|
+
const nonFreshDetails = symbolDetails.filter((detail) => !freshPaths.has(detail.path));
|
|
382
|
+
const detailSpread = nonFreshDetails.length > 0
|
|
383
|
+
? {
|
|
384
|
+
fileDetails: nonFreshDetails.sort((left, right) => left.path.localeCompare(right.path)),
|
|
385
|
+
}
|
|
386
|
+
: {};
|
|
281
387
|
if (!stagedCoordinatesFile) {
|
|
282
|
-
return {
|
|
388
|
+
return {
|
|
389
|
+
state: "missing",
|
|
390
|
+
sourcePaths,
|
|
391
|
+
path: paths.coordinatesPath,
|
|
392
|
+
...detailSpread,
|
|
393
|
+
};
|
|
283
394
|
}
|
|
284
|
-
return {
|
|
395
|
+
return {
|
|
396
|
+
state: "stale",
|
|
397
|
+
sourcePaths: sourcePaths.filter((sourcePath) => !freshPaths.has(sourcePath)),
|
|
398
|
+
path: paths.coordinatesPath,
|
|
399
|
+
...detailSpread,
|
|
400
|
+
};
|
|
285
401
|
}
|
|
286
402
|
export function collectStagedAuthoredSymbolsManifestEvidence(options) {
|
|
287
403
|
const { sourceFiles, stagedFiles } = options;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Scope } from "ts-morph";
|
|
1
2
|
import { type SymbolKind, type SymbolRole } from "../public/symbol-granularity.js";
|
|
2
3
|
import type { HunkRange, StagedFile } from "./git-staged.js";
|
|
3
4
|
type TraceabilityRelationship = {
|
|
@@ -25,5 +26,9 @@ export interface ManifestLookupEntry {
|
|
|
25
26
|
export type ManifestLookup = Map<string, ManifestLookupEntry>;
|
|
26
27
|
export declare function createManifestLookupSentinelKey(manifestPath: string): string;
|
|
27
28
|
export declare function extractSymbolsFromStagedFile(stagedFile: StagedFile, manifestLookup?: ManifestLookup): ExtractedSymbol[];
|
|
29
|
+
export declare function isPrivateClassMember(member: {
|
|
30
|
+
getName?: () => string;
|
|
31
|
+
getScope?: () => Scope;
|
|
32
|
+
}): boolean;
|
|
28
33
|
export {};
|
|
29
34
|
//# sourceMappingURL=symbol-extract.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"symbol-extract.d.ts","sourceRoot":"","sources":["../../src/traceability/symbol-extract.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"symbol-extract.d.ts","sourceRoot":"","sources":["../../src/traceability/symbol-extract.ts"],"names":[],"mappings":"AACA,OAAO,EAAW,KAAK,EAA+B,MAAM,UAAU,CAAC;AAEvE,OAAO,EACL,KAAK,UAAU,EACf,KAAK,UAAU,EAEhB,MAAM,iCAAiC,CAAC;AACzC,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7D,KAAK,wBAAwB,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,MAAM,CAAA;CAAE,CAAC;AAU7D,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,UAAU,CAAC;IACjB,IAAI,EAAE,UAAU,CAAC;IACjB,QAAQ,EAAE;QACR,IAAI,EAAE,MAAM,CAAC;QACb,SAAS,EAAE,MAAM,CAAC;QAClB,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC;IACF,UAAU,EAAE,SAAS,EAAE,CAAC;IACxB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,aAAa,CAAC,EAAE,wBAAwB,EAAE,CAAC;CAC5C;AAED,MAAM,WAAW,mBAAmB;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,aAAa,CAAC,EAAE,wBAAwB,EAAE,CAAC;CAC5C;AAED,MAAM,MAAM,cAAc,GAAG,GAAG,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAAC;AAE9D,wBAAgB,+BAA+B,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,CAG5E;AAmOD,wBAAgB,4BAA4B,CAE1C,UAAU,EAAE,UAAU,EACtB,cAAc,CAAC,EAAE,cAAc,GAC9B,eAAe,EAAE,CA2SnB;AAED,wBAAgB,oBAAoB,CAAC,MAAM,EAAE;IAC3C,OAAO,CAAC,EAAE,MAAM,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,KAAK,CAAC;CACxB,GAAG,OAAO,CASV"}
|
|
@@ -379,7 +379,7 @@ stagedFile, manifestLookup) {
|
|
|
379
379
|
}
|
|
380
380
|
return results;
|
|
381
381
|
}
|
|
382
|
-
function isPrivateClassMember(member) {
|
|
382
|
+
export function isPrivateClassMember(member) {
|
|
383
383
|
const name = typeof member.getName === "function" ? member.getName() : "";
|
|
384
384
|
if (name.startsWith("#")) {
|
|
385
385
|
return true;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export declare function skipNonIntegerFactNumber(field: string, value: number): boolean;
|
|
1
2
|
import type { ExtractionResult } from "../extractors/markdown.js";
|
|
2
3
|
import { PrologProcess } from "../prolog.js";
|
|
3
4
|
import type { ExtractedSymbol } from "./symbol-extract";
|
|
@@ -18,6 +19,7 @@ export declare function resetModuleState(): void;
|
|
|
18
19
|
*/
|
|
19
20
|
export declare function _setPrologFactory(factory: (opts: {
|
|
20
21
|
timeout: number;
|
|
22
|
+
oneShot: false;
|
|
21
23
|
}) => PrologProcess): void;
|
|
22
24
|
declare function consultOverlay(ctx: TempKbContext): Promise<void>;
|
|
23
25
|
export { consultOverlay };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"temp-kb.d.ts","sourceRoot":"","sources":["../../src/traceability/temp-kb.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"temp-kb.d.ts","sourceRoot":"","sources":["../../src/traceability/temp-kb.ts"],"names":[],"mappings":"AAMA,wBAAgB,wBAAwB,CACtC,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,MAAM,GACZ,OAAO,CAET;AACD,OAAO,KAAK,EAGV,gBAAgB,EACjB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE7C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAExD,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,aAAa,CAAC;CACvB;AAMD;;;GAGG;AACH,wBAAgB,gBAAgB,IAAI,IAAI,CASvC;AAQD;;;GAGG;AACH,wBAAgB,iBAAiB,CAE/B,OAAO,EAAE,CAAC,IAAI,EAAE;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,KAAK,CAAA;CAAE,KAAK,aAAa,GACpE,IAAI,CAEN;AAmQD,iBAAe,cAAc,CAAC,GAAG,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CAgB/D;AAED,OAAO,EAAE,cAAc,EAAE,CAAC;AAG1B,wBAAsB,qBAAqB,CACzC,MAAM,EAAE,aAAa,EACrB,OAAO,EAAE,gBAAgB,EAAE,GAC1B,OAAO,CAAC,IAAI,CAAC,CA2Bf;AAED,wBAAsB,YAAY,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC,CA6C7E;AAGD,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,eAAe,EAAE,GAAG,MAAM,CAkBrE;AAED,wBAAsB,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CA2BlE"}
|
|
@@ -3,6 +3,9 @@ import { cp, mkdir, rm, writeFile } from "node:fs/promises";
|
|
|
3
3
|
import { tmpdir } from "node:os";
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
import { isCliTraceOrDebugEnabled } from "../env.js";
|
|
6
|
+
export function skipNonIntegerFactNumber(field, value) {
|
|
7
|
+
return field === "value_int" && !Number.isInteger(value);
|
|
8
|
+
}
|
|
6
9
|
import { PrologProcess } from "../prolog.js";
|
|
7
10
|
import { toPrologAtom, toPrologString } from "../prolog/codec.js";
|
|
8
11
|
const prologByTempDir = new Map();
|
|
@@ -113,7 +116,7 @@ function serializeTypedFactFields(entity) {
|
|
|
113
116
|
for (const field of FACT_NUMBER_FIELDS) {
|
|
114
117
|
const value = getEntityField(entity, field);
|
|
115
118
|
if (value !== undefined && value !== null && typeof value === "number") {
|
|
116
|
-
if (field
|
|
119
|
+
if (skipNonIntegerFactNumber(field, value)) {
|
|
117
120
|
continue;
|
|
118
121
|
}
|
|
119
122
|
fields.push(`${field}=${value}`);
|
|
@@ -202,6 +205,15 @@ function buildEntityAssertionGoal(entity, sourceFile) {
|
|
|
202
205
|
if (entity.verification_perspective !== undefined) {
|
|
203
206
|
props.push(`verification_perspective=${toPrologAtom(entity.verification_perspective)}`);
|
|
204
207
|
}
|
|
208
|
+
if (entity.proof_contract !== undefined) {
|
|
209
|
+
props.push(`proof_contract=${toPrologString(JSON.stringify(entity.proof_contract))}`);
|
|
210
|
+
}
|
|
211
|
+
if (entity.proof_bindings !== undefined) {
|
|
212
|
+
props.push(`proof_bindings=${toPrologString(JSON.stringify(entity.proof_bindings))}`);
|
|
213
|
+
}
|
|
214
|
+
if (entity.proof_receipts !== undefined) {
|
|
215
|
+
props.push(`proof_receipts=${toPrologString(JSON.stringify(entity.proof_receipts))}`);
|
|
216
|
+
}
|
|
205
217
|
}
|
|
206
218
|
return `kb_assert_entity_no_audit(${entity.type}, [${props.join(", ")}])`;
|
|
207
219
|
}
|
|
@@ -280,7 +292,7 @@ export async function createTempKb(baseKbPath) {
|
|
|
280
292
|
trace(`copying base KB ${baseKbPath} -> ${kbPath}`);
|
|
281
293
|
await cp(baseKbPath, kbPath, { recursive: true });
|
|
282
294
|
await writeFile(overlayPath, "", "utf8");
|
|
283
|
-
const prolog = _createProlog({ timeout: 120000 });
|
|
295
|
+
const prolog = _createProlog({ timeout: 120000, oneShot: false });
|
|
284
296
|
await prolog.start();
|
|
285
297
|
prologByTempDir.set(tempDir, prolog);
|
|
286
298
|
// ctx includes prolog so callers can use it directly
|
package/dist/types/entities.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { ProofBinding, ProofContract } from "../public/proof-protocol.js";
|
|
2
|
+
import type { ProofReceipt } from "../public/proof-receipt.js";
|
|
1
3
|
export interface BaseEntity {
|
|
2
4
|
id: string;
|
|
3
5
|
title: string;
|
|
@@ -44,6 +46,9 @@ export interface FactFields {
|
|
|
44
46
|
export interface TestVerificationFields {
|
|
45
47
|
verification_scope?: "unit" | "integration" | "end_to_end";
|
|
46
48
|
verification_perspective?: "internal" | "consumer";
|
|
49
|
+
proof_contract?: ProofContract;
|
|
50
|
+
proof_bindings?: readonly ProofBinding[];
|
|
51
|
+
proof_receipts?: readonly ProofReceipt[];
|
|
47
52
|
}
|
|
48
53
|
export type Requirement = BaseEntity & {
|
|
49
54
|
type: "req";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entities.d.ts","sourceRoot":"","sources":["../../src/types/entities.ts"],"names":[],"mappings":"AAkBA,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,CAAC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AC,EAAE,SAAS,YAAY,EAAE,CAAC;IACzC,cAAc,CAAC,EAAE,SAAS,YAAY,EAAE,CAAC;CAC1C;AAED,MAAM,MAAM,WAAW,GAAG,UAAU,GAAG;IACrC,IAAI,EAAE,KAAK,CAAC;IACZ,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;CACzB,CAAC;AACF,MAAM,MAAM,QAAQ,GAAG,UAAU,GAAG;IAAE,IAAI,EAAE,UAAU,CAAA;CAAE,CAAC;AACzD,MAAM,MAAM,UAAU,GAAG,UAAU,GAAG,sBAAsB,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAChF,MAAM,MAAM,GAAG,GAAG,UAAU,GAAG;IAAE,IAAI,EAAE,KAAK,CAAA;CAAE,CAAC;AAC/C,MAAM,MAAM,IAAI,GAAG,UAAU,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AACjD,MAAM,MAAM,KAAK,GAAG,UAAU,GAAG;IAAE,IAAI,EAAE,OAAO,CAAA;CAAE,CAAC;AACnD,MAAM,MAAM,MAAM,GAAG,UAAU,GAAG;IAAE,IAAI,EAAE,QAAQ,CAAA;CAAE,CAAC;AACrD,MAAM,MAAM,IAAI,GAAG,UAAU,GAAG,UAAU,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAE9D,MAAM,MAAM,MAAM,GACd,WAAW,GACX,QAAQ,GACR,UAAU,GACV,GAAG,GACH,IAAI,GACJ,KAAK,GACL,MAAM,GACN,IAAI,CAAC"}
|
|
@@ -6,9 +6,19 @@ export type BranchResolutionError = {
|
|
|
6
6
|
code: BranchErrorCode;
|
|
7
7
|
};
|
|
8
8
|
export type BranchResolutionResult = BranchResolutionSuccess | BranchResolutionError;
|
|
9
|
-
export
|
|
9
|
+
export declare function unreadableMigrationJournalError(journalName: string): BranchResolutionError;
|
|
10
|
+
export type BranchAttachment = {
|
|
11
|
+
gitBranch: string;
|
|
12
|
+
kbBranch: string;
|
|
13
|
+
/** The resolved compiled-store path. Never derive this path at call sites. */
|
|
14
|
+
storePath: string;
|
|
15
|
+
kind: "exact" | "explicit_override" | "legacy_compat";
|
|
16
|
+
migrationRequired: boolean;
|
|
17
|
+
};
|
|
18
|
+
export type BranchErrorCode = "ENV_OVERRIDE" | "DETACHED_HEAD" | "UNBORN_BRANCH" | "GIT_NOT_AVAILABLE" | "NOT_A_GIT_REPO" | "AMBIGUOUS_ATTACHMENT" | "MIGRATION_RECOVERY_REQUIRED" | "UNKNOWN_ERROR";
|
|
10
19
|
export interface BranchResolverDeps {
|
|
11
20
|
execSync: typeof import("node:child_process").execSync;
|
|
21
|
+
execFileSync: typeof import("node:child_process").execFileSync;
|
|
12
22
|
}
|
|
13
23
|
export declare function _setBranchResolverDepsForTests(deps: Partial<BranchResolverDeps>): void;
|
|
14
24
|
/**
|
|
@@ -21,6 +31,12 @@ export declare function _setBranchResolverDepsForTests(deps: Partial<BranchResol
|
|
|
21
31
|
* @returns BranchResolutionResult with either the branch name or an error
|
|
22
32
|
*/
|
|
23
33
|
export declare function resolveActiveBranch(workspaceRoot?: string): BranchResolutionResult;
|
|
34
|
+
/**
|
|
35
|
+
* Resolve the storage namespace without treating any branch as canonical.
|
|
36
|
+
* Literal branch-named stores are read-compatible legacy storage only. The
|
|
37
|
+
* active Git identity always remains the exact branch name.
|
|
38
|
+
*/
|
|
39
|
+
export declare function resolveBranchAttachment(workspaceRoot?: string): BranchAttachment | BranchResolutionError;
|
|
24
40
|
/**
|
|
25
41
|
* Check if the repository is in detached HEAD state.
|
|
26
42
|
*
|
|
@@ -60,23 +76,22 @@ export declare function copyCleanSnapshot(sourcePath: string, targetPath: string
|
|
|
60
76
|
*/
|
|
61
77
|
export declare function getVolatileArtifactPatterns(): string[];
|
|
62
78
|
/**
|
|
63
|
-
* @deprecated
|
|
64
|
-
*
|
|
65
|
-
*
|
|
79
|
+
* @deprecated Branch lifecycle follows Git naturally. This helper remains for
|
|
80
|
+
* callers that need informational remote-default discovery, but it never
|
|
81
|
+
* invents a `main` branch.
|
|
66
82
|
*
|
|
67
|
-
* Resolve
|
|
68
|
-
*
|
|
69
|
-
*
|
|
70
|
-
* 3. Fallback to "main"
|
|
83
|
+
* Resolve a remote default branch for informational display only. It must not
|
|
84
|
+
* be used to attach a KB or initialize a branch. Legacy migration callers must
|
|
85
|
+
* supply explicit old and new identities.
|
|
71
86
|
*
|
|
72
87
|
* Unlike resolveActiveBranch, this does NOT normalize branch names.
|
|
73
88
|
* Configured names are returned verbatim.
|
|
74
89
|
*
|
|
75
90
|
* @param cwd - The working directory to resolve the default branch
|
|
76
|
-
* @param
|
|
91
|
+
* @param _config - Retained for source compatibility; ignored.
|
|
77
92
|
* @returns BranchResolutionResult with either the branch name or an error
|
|
78
93
|
*/
|
|
79
|
-
export declare function resolveDefaultBranch(cwd?: string,
|
|
94
|
+
export declare function resolveDefaultBranch(cwd?: string, _config?: {
|
|
80
95
|
defaultBranch?: string;
|
|
81
96
|
}): {
|
|
82
97
|
branch: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"branch-resolver.d.ts","sourceRoot":"","sources":["../../src/utils/branch-resolver.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"branch-resolver.d.ts","sourceRoot":"","sources":["../../src/utils/branch-resolver.ts"],"names":[],"mappings":"AAsCA,MAAM,MAAM,uBAAuB,GAAG;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AACzD,MAAM,MAAM,qBAAqB,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,eAAe,CAAA;CAAE,CAAC;AAC7E,MAAM,MAAM,sBAAsB,GAC9B,uBAAuB,GACvB,qBAAqB,CAAC;AAE1B,wBAAgB,+BAA+B,CAC7C,WAAW,EAAE,MAAM,GAClB,qBAAqB,CAKvB;AAED,MAAM,MAAM,gBAAgB,GAAG;IAC7B,SAAS,EAAE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