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
package/dist/env.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../src/env.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../src/env.ts"],"names":[],"mappings":"AAeA,wBAAgB,iBAAiB,IAAI,MAAM,GAAG,SAAS,CAMtD;AAED,wBAAgB,mBAAmB,IAAI,MAAM,GAAG,SAAS,CAGxD;AAED,wBAAgB,iBAAiB,IAAI,OAAO,CAG3C;AAED,wBAAgB,iBAAiB,IAAI,OAAO,CAG3C;AAED,wBAAgB,wBAAwB,IAAI,OAAO,CAGlD;AAED,wBAAgB,oBAAoB,IAAI,OAAO,CAG9C"}
|
package/dist/env.js
CHANGED
|
@@ -11,13 +11,12 @@ function getEnvValue(key) {
|
|
|
11
11
|
const value = process.env[key];
|
|
12
12
|
return typeof value === "string" ? value : undefined;
|
|
13
13
|
}
|
|
14
|
-
function getTrimmedEnvValue(key) {
|
|
15
|
-
const value = getEnvValue(key)?.trim();
|
|
16
|
-
return value ? value : undefined;
|
|
17
|
-
}
|
|
18
14
|
export function getBranchOverride() {
|
|
19
|
-
//
|
|
20
|
-
|
|
15
|
+
// Branch identity is exact and must not be normalized. Preserve whitespace
|
|
16
|
+
// so the Git-ref validator rejects an accidental value instead of silently
|
|
17
|
+
// attaching a different branch.
|
|
18
|
+
const value = getEnvValue("KIBI_BRANCH");
|
|
19
|
+
return value === undefined || value.length === 0 ? undefined : value;
|
|
21
20
|
}
|
|
22
21
|
export function getKbPlPathOverride() {
|
|
23
22
|
// implements REQ-003
|
|
@@ -25,7 +25,8 @@ export interface ExtractionResult {
|
|
|
25
25
|
}
|
|
26
26
|
export declare class ManifestError extends Error {
|
|
27
27
|
filePath: string;
|
|
28
|
-
|
|
28
|
+
readonly classification?: "coordinate-artifact" | undefined;
|
|
29
|
+
constructor(message: string, filePath: string, classification?: "coordinate-artifact" | undefined);
|
|
29
30
|
}
|
|
30
31
|
export interface ManifestSymbolRecord {
|
|
31
32
|
id?: string;
|
|
@@ -56,8 +57,19 @@ export interface ManifestSymbolRecord {
|
|
|
56
57
|
coordinatesGeneratedAt?: string;
|
|
57
58
|
[key: string]: unknown;
|
|
58
59
|
}
|
|
60
|
+
/**
|
|
61
|
+
* Convert overlay-merged manifest symbol records into extraction results.
|
|
62
|
+
* Exported so mutation flows can re-extract one canonical entity from the
|
|
63
|
+
* authored manifest plus generated coordinate artifact before committing.
|
|
64
|
+
*/
|
|
65
|
+
export declare function extractManifestSymbolRecords(manifestSymbols: ManifestSymbolRecord[], filePath: string): ExtractionResult[];
|
|
59
66
|
export declare function extractFromManifestString(content: string, filePath: string): ExtractionResult[];
|
|
60
67
|
export declare function extractManifestSymbolRecordsString(content: string, filePath: string): ManifestSymbolRecord[];
|
|
61
68
|
export declare function extractFromManifest(filePath: string): ExtractionResult[];
|
|
62
69
|
export declare function readManifestWithCoordinateOverlay(manifestPath: string, coordinatesPath?: string): ManifestSymbolRecord[];
|
|
70
|
+
export interface ReceiptCodeScopeEntry {
|
|
71
|
+
readonly symbolId: string;
|
|
72
|
+
readonly sourceHash: string;
|
|
73
|
+
}
|
|
74
|
+
export declare function resolveBoundSymbolScope(manifestPath: string, symbolIds: readonly string[]): ReceiptCodeScopeEntry[];
|
|
63
75
|
//# sourceMappingURL=manifest.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../../src/extractors/manifest.ts"],"names":[],"mappings":"AA6BA,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,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,EAAE,MAAM,EAAE,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,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AM,GACf,gBAAgB,EAAE,CAkDpB;AAYD,wBAAgB,yBAAyB,CACvC,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,MAAM,GACf,gBAAgB,EAAE,CAmBpB;AAED,wBAAgB,kCAAkC,CAChD,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,MAAM,GACf,oBAAoB,EAAE,CAmBxB;AAED,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,gBAAgB,EAAE,CAKxE;AA4ED,wBAAgB,iCAAiC,CAC/C,YAAY,EAAE,MAAM,EACpB,eAAe,CAAC,EAAE,MAAM,GACvB,oBAAoB,EAAE,CAaxB;AAED,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B;AAgCD,wBAAgB,uBAAuB,CACrC,YAAY,EAAE,MAAM,EACpB,SAAS,EAAE,SAAS,MAAM,EAAE,GAC3B,qBAAqB,EAAE,CAgBzB"}
|
|
@@ -16,11 +16,11 @@
|
|
|
16
16
|
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
17
17
|
*/
|
|
18
18
|
import { createHash } from "node:crypto";
|
|
19
|
-
import { existsSync, readFileSync } from "node:fs";
|
|
19
|
+
import { existsSync, readFileSync, statSync } from "node:fs";
|
|
20
20
|
import * as path from "node:path";
|
|
21
21
|
import { load as parseYAML } from "js-yaml";
|
|
22
22
|
import { DEFAULT_COORDINATES_PATH } from "../utils/manifest-paths.js";
|
|
23
|
-
import { mergeCoordinatesWithManifest,
|
|
23
|
+
import { mergeCoordinatesWithManifest, parseCoordinateArtifact, } from "./symbol-coordinates.js";
|
|
24
24
|
const VALID_RELATIONSHIP_TYPES = new Set([
|
|
25
25
|
"depends_on",
|
|
26
26
|
"executable_for",
|
|
@@ -109,9 +109,11 @@ function validateRelationshipDirection(type, from, to, filePath) {
|
|
|
109
109
|
}
|
|
110
110
|
export class ManifestError extends Error {
|
|
111
111
|
filePath;
|
|
112
|
-
|
|
112
|
+
classification;
|
|
113
|
+
constructor(message, filePath, classification) {
|
|
113
114
|
super(message);
|
|
114
115
|
this.filePath = filePath;
|
|
116
|
+
this.classification = classification;
|
|
115
117
|
this.name = "ManifestError";
|
|
116
118
|
}
|
|
117
119
|
}
|
|
@@ -165,9 +167,15 @@ function extractRelationships(id, symbol, filePath) {
|
|
|
165
167
|
return relationships;
|
|
166
168
|
}
|
|
167
169
|
function extractFromParsedManifest(manifest, filePath) {
|
|
168
|
-
return
|
|
170
|
+
return extractManifestSymbolRecords(getManifestSymbols(manifest, filePath), filePath);
|
|
169
171
|
}
|
|
170
|
-
|
|
172
|
+
/**
|
|
173
|
+
* Convert overlay-merged manifest symbol records into extraction results.
|
|
174
|
+
* Exported so mutation flows can re-extract one canonical entity from the
|
|
175
|
+
* authored manifest plus generated coordinate artifact before committing.
|
|
176
|
+
*/
|
|
177
|
+
// implements REQ-generated-coordinate-persistence
|
|
178
|
+
export function extractManifestSymbolRecords(manifestSymbols, filePath) {
|
|
171
179
|
return manifestSymbols.map((symbol) => {
|
|
172
180
|
if (!symbol.title) {
|
|
173
181
|
throw new ManifestError("Missing required field: title", filePath);
|
|
@@ -253,7 +261,7 @@ export function extractManifestSymbolRecordsString(content, filePath) {
|
|
|
253
261
|
}
|
|
254
262
|
}
|
|
255
263
|
export function extractFromManifest(filePath) {
|
|
256
|
-
return
|
|
264
|
+
return extractManifestSymbolRecords(readManifestWithCoordinateOverlay(filePath), filePath);
|
|
257
265
|
}
|
|
258
266
|
function resolveCoordinatesPath(manifestPath, coordinatesPath) {
|
|
259
267
|
if (coordinatesPath) {
|
|
@@ -266,21 +274,100 @@ function readCoordinateArtifactFromFile(coordinatesPath) {
|
|
|
266
274
|
return null;
|
|
267
275
|
}
|
|
268
276
|
try {
|
|
269
|
-
|
|
277
|
+
const parsed = parseCoordinateArtifact(readFileSync(coordinatesPath, "utf8"));
|
|
278
|
+
if (parsed.status === "invalid") {
|
|
279
|
+
throw new ManifestError(parsed.reason, coordinatesPath, "coordinate-artifact");
|
|
280
|
+
}
|
|
281
|
+
return parsed;
|
|
270
282
|
}
|
|
271
283
|
catch (error) {
|
|
272
|
-
if (error instanceof Error) {
|
|
273
|
-
throw new ManifestError(`Failed to parse coordinate artifact: ${error.message}`, coordinatesPath);
|
|
284
|
+
if (error instanceof Error && !(error instanceof ManifestError)) {
|
|
285
|
+
throw new ManifestError(`Failed to parse coordinate artifact: ${error.message}`, coordinatesPath, "coordinate-artifact");
|
|
274
286
|
}
|
|
275
287
|
throw error;
|
|
276
288
|
}
|
|
277
289
|
}
|
|
290
|
+
/** Resolve workspace-relative source files used to validate bound coordinates. */
|
|
291
|
+
function sourceTextResolver(manifestPath) {
|
|
292
|
+
const bases = [process.cwd()];
|
|
293
|
+
const grandparent = path.resolve(path.dirname(path.dirname(manifestPath)));
|
|
294
|
+
if (!bases.includes(grandparent))
|
|
295
|
+
bases.push(grandparent);
|
|
296
|
+
return (sourceFile) => {
|
|
297
|
+
let resolved = null;
|
|
298
|
+
for (const base of bases) {
|
|
299
|
+
const absolute = path.isAbsolute(sourceFile)
|
|
300
|
+
? sourceFile
|
|
301
|
+
: path.resolve(base, sourceFile);
|
|
302
|
+
if (!existsSync(absolute))
|
|
303
|
+
continue;
|
|
304
|
+
try {
|
|
305
|
+
const content = readFileSync(absolute, "utf8");
|
|
306
|
+
if (typeof content === "string") {
|
|
307
|
+
resolved = content;
|
|
308
|
+
break;
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
catch {
|
|
312
|
+
// Try the next resolution base.
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
return resolved;
|
|
316
|
+
};
|
|
317
|
+
}
|
|
278
318
|
// implements REQ-core-extractors
|
|
279
319
|
export function readManifestWithCoordinateOverlay(manifestPath, coordinatesPath) {
|
|
280
320
|
const manifestContent = readFileSync(manifestPath, "utf8");
|
|
281
321
|
const manifestRecords = extractManifestSymbolRecordsString(manifestContent, manifestPath);
|
|
282
322
|
const coordinateArtifact = readCoordinateArtifactFromFile(resolveCoordinatesPath(manifestPath, coordinatesPath));
|
|
283
|
-
return mergeCoordinatesWithManifest(manifestRecords, coordinateArtifact
|
|
323
|
+
return mergeCoordinatesWithManifest(manifestRecords, coordinateArtifact, {
|
|
324
|
+
resolveSourceText: sourceTextResolver(manifestPath),
|
|
325
|
+
});
|
|
326
|
+
}
|
|
327
|
+
/**
|
|
328
|
+
* Resolve the code scope of a receipt binding: for each proof-bound symbol,
|
|
329
|
+
* its coordinate-recorded source hash. A receipt's binding covers these, so
|
|
330
|
+
* editing the production code behind a test stales only that test's receipts
|
|
331
|
+
* (per-contract binding mode).
|
|
332
|
+
*/
|
|
333
|
+
// implements REQ-kibi-proof-evidence-protocol
|
|
334
|
+
// Receipt-binding scope reads run once per proof-bearing test; a campaign
|
|
335
|
+
// touches dozens-to-hundreds of tests, so the parsed overlay is memoized per
|
|
336
|
+
// manifest state (path + mtime + size) and invalidated when the file changes.
|
|
337
|
+
const boundSymbolScopeCache = new Map();
|
|
338
|
+
function boundSymbolScopeRecords(manifestPath) {
|
|
339
|
+
let stamp = "";
|
|
340
|
+
try {
|
|
341
|
+
const stats = statSync(manifestPath);
|
|
342
|
+
stamp = `${stats.mtimeMs}:${stats.size}`;
|
|
343
|
+
}
|
|
344
|
+
catch {
|
|
345
|
+
stamp = "missing";
|
|
346
|
+
}
|
|
347
|
+
const hit = boundSymbolScopeCache.get(manifestPath);
|
|
348
|
+
if (hit && hit.stamp === stamp)
|
|
349
|
+
return hit.records;
|
|
350
|
+
const records = readManifestWithCoordinateOverlay(manifestPath);
|
|
351
|
+
boundSymbolScopeCache.set(manifestPath, { stamp, records });
|
|
352
|
+
return records;
|
|
353
|
+
}
|
|
354
|
+
export function resolveBoundSymbolScope(manifestPath, symbolIds) {
|
|
355
|
+
const wanted = new Set(symbolIds);
|
|
356
|
+
if (wanted.size === 0)
|
|
357
|
+
return [];
|
|
358
|
+
const records = boundSymbolScopeRecords(manifestPath);
|
|
359
|
+
const scope = [];
|
|
360
|
+
for (const record of records) {
|
|
361
|
+
const symbolId = typeof record.id === "string" ? record.id : undefined;
|
|
362
|
+
if (symbolId === undefined || !wanted.has(symbolId))
|
|
363
|
+
continue;
|
|
364
|
+
const sourceHash = record.sourceHash;
|
|
365
|
+
if (typeof sourceHash === "string" && sourceHash !== "") {
|
|
366
|
+
scope.push({ symbolId, sourceHash });
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
scope.sort((left, right) => left.symbolId.localeCompare(right.symbolId));
|
|
370
|
+
return scope;
|
|
284
371
|
}
|
|
285
372
|
function generateId(filePath, title) {
|
|
286
373
|
const hash = createHash("sha256");
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type ProofBinding, type ProofContract } from "../public/proof-protocol.js";
|
|
2
|
+
import { type ProofReceipt } from "../public/proof-receipt.js";
|
|
2
3
|
export interface ExtractedEntity {
|
|
3
4
|
id: string;
|
|
4
5
|
type: string;
|
|
@@ -27,7 +28,9 @@ export interface ExtractedEntity {
|
|
|
27
28
|
sourceEndColumn?: number;
|
|
28
29
|
verification_scope?: "unit" | "integration" | "end_to_end";
|
|
29
30
|
verification_perspective?: "internal" | "consumer";
|
|
30
|
-
|
|
31
|
+
proof_contract?: ProofContract;
|
|
32
|
+
proof_bindings?: readonly ProofBinding[];
|
|
33
|
+
proof_receipts?: readonly ProofReceipt[];
|
|
31
34
|
fact_kind?: "subject" | "property_value" | "observation" | "meta" | "predicate_schema" | "predicate" | "rule_schema" | "rule";
|
|
32
35
|
subject_key?: string;
|
|
33
36
|
property_key?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"markdown.d.ts","sourceRoot":"","sources":["../../src/extractors/markdown.ts"],"names":[],"mappings":"AAuBA,OAAO,EACL,KAAK,
|
|
1
|
+
{"version":3,"file":"markdown.d.ts","sourceRoot":"","sources":["../../src/extractors/markdown.ts"],"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,MAAM,EAAE,OAAO,CAAC,EAC7B,UAAU,EAAE,MAAM,GACjB,MAAM,EAAE,CAkDV;AAubD,wBAAgB,yBAAyB,CACvC,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,MAAM,GACf,gBAAgB,CAElB;AAGD,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,gBAAgB,CAatE;AAED,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CASjE;AASD,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAQpE"}
|
|
@@ -20,7 +20,8 @@ import { readFileSync } from "node:fs";
|
|
|
20
20
|
import Ajv from "ajv";
|
|
21
21
|
import { load as yamlLoad } from "js-yaml";
|
|
22
22
|
import { semanticClaimKey } from "../operations/semantic-advisor/clauses.js";
|
|
23
|
-
import {
|
|
23
|
+
import { PROOF_BINDINGS_SCHEMA, PROOF_CONTRACT_SCHEMA, } from "../public/proof-protocol.js";
|
|
24
|
+
import { proofReceiptHistoryErrors, } from "../public/proof-receipt.js";
|
|
24
25
|
import entitySchema from "../schemas/entity.schema.json" with { type: "json" };
|
|
25
26
|
// Typed fact field constants for extraction
|
|
26
27
|
const FACT_STRING_FIELDS = [
|
|
@@ -71,7 +72,9 @@ const FACT_ONLY_FIELDS = [
|
|
|
71
72
|
const TEST_ENUM_FIELDS = [
|
|
72
73
|
"verification_scope",
|
|
73
74
|
"verification_perspective",
|
|
74
|
-
"
|
|
75
|
+
"proof_contract",
|
|
76
|
+
"proof_bindings",
|
|
77
|
+
"proof_receipts",
|
|
75
78
|
];
|
|
76
79
|
const ajv = new Ajv({ strict: false, allErrors: true });
|
|
77
80
|
const validateExtractedEntity = ajv.compile(entitySchema);
|
|
@@ -334,7 +337,7 @@ function extractFromMarkdownContent(content, filePath) {
|
|
|
334
337
|
const entityTypes = embeddedEntities.join(" and ");
|
|
335
338
|
throw new FrontmatterError(`Invalid embedded entity: requirement contains ${entityTypes} fields`, filePath, {
|
|
336
339
|
classification: "Embedded Entity Violation",
|
|
337
|
-
hint: `Move ${entityTypes} to separate entity files and
|
|
340
|
+
hint: `Move ${entityTypes} to separate entity files and declare typed relationship links there; Kibi owns the compiled relationship shards.`,
|
|
338
341
|
});
|
|
339
342
|
}
|
|
340
343
|
const id = data.id || generateId(filePath, data.title);
|
|
@@ -445,14 +448,46 @@ function extractFromMarkdownContent(content, filePath) {
|
|
|
445
448
|
}
|
|
446
449
|
entity.verification_perspective = data.verification_perspective;
|
|
447
450
|
}
|
|
448
|
-
if (data.
|
|
449
|
-
if (!
|
|
450
|
-
throw new FrontmatterError("Invalid
|
|
451
|
-
classification: "Invalid Test
|
|
452
|
-
hint: "Use
|
|
451
|
+
if (data.proof_contract !== undefined) {
|
|
452
|
+
if (!isObjectRecord(data.proof_contract)) {
|
|
453
|
+
throw new FrontmatterError("Invalid proof_contract; expected an object", filePath, {
|
|
454
|
+
classification: "Invalid Test Proof Contract",
|
|
455
|
+
hint: "Use the kibi.proof-contract.v1 object shape.",
|
|
453
456
|
});
|
|
454
457
|
}
|
|
455
|
-
const
|
|
458
|
+
const validateContract = ajv.compile(PROOF_CONTRACT_SCHEMA);
|
|
459
|
+
if (!validateContract(data.proof_contract)) {
|
|
460
|
+
throw new FrontmatterError(`Invalid proof_contract: ${ajv.errorsText(validateContract.errors)}`, filePath, {
|
|
461
|
+
classification: "Invalid Test Proof Contract",
|
|
462
|
+
hint: "Use the kibi.proof-contract.v1 object shape with explicit required_proofs obligations.",
|
|
463
|
+
});
|
|
464
|
+
}
|
|
465
|
+
entity.proof_contract = data.proof_contract;
|
|
466
|
+
}
|
|
467
|
+
if (data.proof_bindings !== undefined) {
|
|
468
|
+
if (!Array.isArray(data.proof_bindings)) {
|
|
469
|
+
throw new FrontmatterError("Invalid proof_bindings; expected an array", filePath, {
|
|
470
|
+
classification: "Invalid Test Proof Bindings",
|
|
471
|
+
hint: "Each binding requires symbol_id and target; native_id, aliases, source_file, and line are optional.",
|
|
472
|
+
});
|
|
473
|
+
}
|
|
474
|
+
const validateBindings = ajv.compile(PROOF_BINDINGS_SCHEMA);
|
|
475
|
+
if (!validateBindings(data.proof_bindings)) {
|
|
476
|
+
throw new FrontmatterError(`Invalid proof_bindings: ${ajv.errorsText(validateBindings.errors)}`, filePath, {
|
|
477
|
+
classification: "Invalid Test Proof Bindings",
|
|
478
|
+
hint: "Each binding requires symbol_id and target; native_id, aliases, source_file, and line are optional.",
|
|
479
|
+
});
|
|
480
|
+
}
|
|
481
|
+
entity.proof_bindings = data.proof_bindings;
|
|
482
|
+
}
|
|
483
|
+
if (data.proof_receipts !== undefined) {
|
|
484
|
+
if (!Array.isArray(data.proof_receipts)) {
|
|
485
|
+
throw new FrontmatterError("Invalid proof_receipts; expected an array", filePath, {
|
|
486
|
+
classification: "Invalid Test Proof Receipts",
|
|
487
|
+
hint: "Use kibi prove to append kibi.proof-receipt.v1 objects; receipts are engine-derived, never hand-authored.",
|
|
488
|
+
});
|
|
489
|
+
}
|
|
490
|
+
const normalizedReceipts = data.proof_receipts.map((value) => {
|
|
456
491
|
if (typeof value !== "object" ||
|
|
457
492
|
value === null ||
|
|
458
493
|
Array.isArray(value)) {
|
|
@@ -468,13 +503,13 @@ function extractFromMarkdownContent(content, filePath) {
|
|
|
468
503
|
: {}),
|
|
469
504
|
};
|
|
470
505
|
});
|
|
471
|
-
entity.
|
|
472
|
-
const errors =
|
|
506
|
+
entity.proof_receipts = normalizedReceipts;
|
|
507
|
+
const errors = proofReceiptHistoryErrors(entity.id, entity.verification_scope, normalizedReceipts.filter((value) => typeof value === "object" &&
|
|
473
508
|
value !== null &&
|
|
474
509
|
!Array.isArray(value)));
|
|
475
510
|
if (errors.length > 0) {
|
|
476
511
|
throw new FrontmatterError(errors.join("; "), filePath, {
|
|
477
|
-
classification: "Invalid Test
|
|
512
|
+
classification: "Invalid Test Proof Receipts",
|
|
478
513
|
hint: "Bind every receipt to this test and its typed verification_scope, with unique IDs and ordered ISO-8601 timestamps.",
|
|
479
514
|
});
|
|
480
515
|
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export type PlaywrightCaseSymbol = Readonly<{
|
|
2
|
+
id: string;
|
|
3
|
+
title: string;
|
|
4
|
+
sourceFile: string;
|
|
5
|
+
sourceLine: number;
|
|
6
|
+
sourceColumn: number;
|
|
7
|
+
sourceEndLine: number;
|
|
8
|
+
sourceEndColumn: number;
|
|
9
|
+
symbol_role: "behavioral";
|
|
10
|
+
tags: readonly ["test-case", "playwright"];
|
|
11
|
+
}>;
|
|
12
|
+
export type PlaywrightCaseDiagnostic = Readonly<{
|
|
13
|
+
code: "dynamic_test_case_unresolved";
|
|
14
|
+
sourceFile: string;
|
|
15
|
+
sourceLine: number;
|
|
16
|
+
detail: string;
|
|
17
|
+
}>;
|
|
18
|
+
export type PlaywrightCaseExtraction = Readonly<{
|
|
19
|
+
symbols: readonly PlaywrightCaseSymbol[];
|
|
20
|
+
diagnostics: readonly PlaywrightCaseDiagnostic[];
|
|
21
|
+
}>;
|
|
22
|
+
/** Extract statically named Playwright tests from a TS/JS source module. */
|
|
23
|
+
export declare function extractPlaywrightCases(sourceFile: string, source: string): PlaywrightCaseExtraction;
|
|
24
|
+
//# sourceMappingURL=playwright-cases.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"playwright-cases.d.ts","sourceRoot":"","sources":["../../src/extractors/playwright-cases.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,oBAAoB,GAAG,QAAQ,CAAC;IAC1C,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,eAAe,EAAE,MAAM,CAAC;IACxB,WAAW,EAAE,YAAY,CAAC;IAC1B,IAAI,EAAE,SAAS,CAAC,WAAW,EAAE,YAAY,CAAC,CAAC;CAC5C,CAAC,CAAC;AAGH,MAAM,MAAM,wBAAwB,GAAG,QAAQ,CAAC;IAC9C,IAAI,EAAE,8BAA8B,CAAC;IACrC,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC,CAAC;AAGH,MAAM,MAAM,wBAAwB,GAAG,QAAQ,CAAC;IAC9C,OAAO,EAAE,SAAS,oBAAoB,EAAE,CAAC;IACzC,WAAW,EAAE,SAAS,wBAAwB,EAAE,CAAC;CAClD,CAAC,CAAC;AA0GH,4EAA4E;AAE5E,wBAAgB,sBAAsB,CACpC,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,MAAM,GACb,wBAAwB,CA0C1B"}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { playwrightCaseId } from "../proof/producers/playwright-case-id.js";
|
|
2
|
+
function lineColumn(source, offset) {
|
|
3
|
+
const prefix = source.slice(0, offset);
|
|
4
|
+
const line = prefix.split("\n").length;
|
|
5
|
+
const lastBreak = prefix.lastIndexOf("\n");
|
|
6
|
+
return [line, offset - lastBreak];
|
|
7
|
+
}
|
|
8
|
+
function braceDepthAt(source, offset) {
|
|
9
|
+
let depth = 0;
|
|
10
|
+
let quote = null;
|
|
11
|
+
let escaped = false;
|
|
12
|
+
for (const character of source.slice(0, offset)) {
|
|
13
|
+
if (quote) {
|
|
14
|
+
if (escaped)
|
|
15
|
+
escaped = false;
|
|
16
|
+
else if (character === "\\")
|
|
17
|
+
escaped = true;
|
|
18
|
+
else if (character === quote)
|
|
19
|
+
quote = null;
|
|
20
|
+
continue;
|
|
21
|
+
}
|
|
22
|
+
if (character === "'" || character === '"' || character === "`") {
|
|
23
|
+
quote = character;
|
|
24
|
+
}
|
|
25
|
+
else if (character === "{")
|
|
26
|
+
depth += 1;
|
|
27
|
+
else if (character === "}")
|
|
28
|
+
depth = Math.max(0, depth - 1);
|
|
29
|
+
}
|
|
30
|
+
return depth;
|
|
31
|
+
}
|
|
32
|
+
function matchingBrace(source, open) {
|
|
33
|
+
let depth = 0;
|
|
34
|
+
for (let index = open; index < source.length; index += 1) {
|
|
35
|
+
if (source[index] === "{")
|
|
36
|
+
depth += 1;
|
|
37
|
+
else if (source[index] === "}") {
|
|
38
|
+
depth -= 1;
|
|
39
|
+
if (depth === 0)
|
|
40
|
+
return index;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
return undefined;
|
|
44
|
+
}
|
|
45
|
+
function events(source) {
|
|
46
|
+
const output = [];
|
|
47
|
+
const importedAliases = [
|
|
48
|
+
"test",
|
|
49
|
+
...[...source.matchAll(/\btest\s+as\s+([A-Za-z_$][\w$]*)/g)].map((match) => match[1]),
|
|
50
|
+
];
|
|
51
|
+
const pattern = new RegExp(`\\b(?:${importedAliases.join("|")})(?:\\.only|\\.skip)?\\s*\\.?(describe)?\\s*\\(`, "g");
|
|
52
|
+
for (const match of source.matchAll(pattern)) {
|
|
53
|
+
const start = match.index ?? 0;
|
|
54
|
+
if (/function\s+$/.test(source.slice(Math.max(0, start - 16), start))) {
|
|
55
|
+
continue;
|
|
56
|
+
}
|
|
57
|
+
const open = start + match[0].lastIndexOf("(") + 1;
|
|
58
|
+
const remainder = source.slice(open);
|
|
59
|
+
const stringMatch = remainder.match(/^\s*(["'`])((?:\\.|(?!\1).)*)\1/s);
|
|
60
|
+
const dynamic = !stringMatch;
|
|
61
|
+
const title = stringMatch?.[2]?.replaceAll(/\\(["'`\\])/g, "$1");
|
|
62
|
+
const end = Math.min(source.length, open + (stringMatch?.[0].length ?? 1));
|
|
63
|
+
const callbackOpen = source.indexOf("{", end);
|
|
64
|
+
const scopeEnd = match[1] === "describe" && callbackOpen >= 0
|
|
65
|
+
? matchingBrace(source, callbackOpen)
|
|
66
|
+
: undefined;
|
|
67
|
+
output.push({
|
|
68
|
+
kind: match[1] === "describe" ? "describe" : "test",
|
|
69
|
+
start,
|
|
70
|
+
end,
|
|
71
|
+
...(title === undefined ? {} : { title }),
|
|
72
|
+
dynamic,
|
|
73
|
+
braceDepth: braceDepthAt(source, start),
|
|
74
|
+
...(scopeEnd === undefined ? {} : { scopeEnd }),
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
return output;
|
|
78
|
+
}
|
|
79
|
+
function qualifiedTitle(event, all) {
|
|
80
|
+
const suites = all
|
|
81
|
+
.filter((candidate) => candidate.kind === "describe" &&
|
|
82
|
+
candidate.start < event.start &&
|
|
83
|
+
(candidate.scopeEnd === undefined ||
|
|
84
|
+
event.start < candidate.scopeEnd) &&
|
|
85
|
+
candidate.braceDepth <= event.braceDepth &&
|
|
86
|
+
candidate.title !== undefined)
|
|
87
|
+
.map((candidate) => candidate.title);
|
|
88
|
+
return [...suites, event.title ?? ""].join(" > ");
|
|
89
|
+
}
|
|
90
|
+
/** Extract statically named Playwright tests from a TS/JS source module. */
|
|
91
|
+
// implements REQ-kibi-verification-evidence-contract
|
|
92
|
+
export function extractPlaywrightCases(sourceFile, source) {
|
|
93
|
+
if (!/from\s+["']@playwright\/test["']|require\(\s*["']@playwright\/test/.test(source)) {
|
|
94
|
+
return { symbols: [], diagnostics: [] };
|
|
95
|
+
}
|
|
96
|
+
const symbols = [];
|
|
97
|
+
const diagnostics = [];
|
|
98
|
+
const all = events(source);
|
|
99
|
+
for (const event of all.filter(({ kind }) => kind === "test")) {
|
|
100
|
+
const [line, column] = lineColumn(source, event.start);
|
|
101
|
+
if (event.dynamic) {
|
|
102
|
+
diagnostics.push({
|
|
103
|
+
code: "dynamic_test_case_unresolved",
|
|
104
|
+
sourceFile,
|
|
105
|
+
sourceLine: line,
|
|
106
|
+
detail: "The Playwright test title is computed at runtime and cannot enter a verification contract.",
|
|
107
|
+
});
|
|
108
|
+
continue;
|
|
109
|
+
}
|
|
110
|
+
const title = qualifiedTitle(event, all);
|
|
111
|
+
const end = source.indexOf("\n", event.end);
|
|
112
|
+
const [endLine, endColumn] = lineColumn(source, end === -1 ? source.length : end);
|
|
113
|
+
symbols.push({
|
|
114
|
+
id: playwrightCaseId(sourceFile, title),
|
|
115
|
+
title,
|
|
116
|
+
sourceFile,
|
|
117
|
+
sourceLine: line,
|
|
118
|
+
sourceColumn: column,
|
|
119
|
+
sourceEndLine: endLine,
|
|
120
|
+
sourceEndColumn: endColumn,
|
|
121
|
+
symbol_role: "behavioral",
|
|
122
|
+
tags: ["test-case", "playwright"],
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
return { symbols, diagnostics };
|
|
126
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type RelationshipRecord } from "../relationships/shards.js";
|
|
1
2
|
export interface ExtractedRelationship {
|
|
2
3
|
type: string;
|
|
3
4
|
from: string;
|
|
@@ -22,6 +23,11 @@ export interface ShardExtractionResult {
|
|
|
22
23
|
export declare function extractFromRelationshipShards(relationshipsDir: string): ShardExtractionResult[];
|
|
23
24
|
/** Parse one changed shard. Callers can hash first and skip unchanged files. */
|
|
24
25
|
export declare function extractRelationshipShard(shardPath: string): ShardExtractionResult;
|
|
26
|
+
/**
|
|
27
|
+
* Converts a RelationshipRecord to an ExtractedRelationship.
|
|
28
|
+
* Returns null if the record is invalid.
|
|
29
|
+
*/
|
|
30
|
+
export declare function convertRecordToRelationship(record: RelationshipRecord): ExtractedRelationship | null;
|
|
25
31
|
/**
|
|
26
32
|
* Gets the path to the relationships directory for a given KB root.
|
|
27
33
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"relationships.d.ts","sourceRoot":"","sources":["../../src/extractors/relationships.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"relationships.d.ts","sourceRoot":"","sources":["../../src/extractors/relationships.ts"],"names":[],"mappings":"AAoBA,OAAO,EAAE,KAAK,kBAAkB,EAAa,MAAM,4BAA4B,CAAC;AAEhF,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,CAAC,EAAE;QACT,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,UAAU,CAAC,EAAE,MAAM,CAAC;KACrB,CAAC;CACH;AAED,MAAM,WAAW,qBAAqB;IACpC,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,qBAAqB,EAAE,CAAC;CACxC;AAyBD;;;;;GAKG;AACH,wBAAgB,6BAA6B,CAC3C,gBAAgB,EAAE,MAAM,GACvB,qBAAqB,EAAE,CAmBzB;AAED,gFAAgF;AAChF,wBAAgB,wBAAwB,CACtC,SAAS,EAAE,MAAM,GAChB,qBAAqB,CAiBvB;AAED;;;GAGG;AACH,wBAAgB,2BAA2B,CACzC,MAAM,EAAE,kBAAkB,GACzB,qBAAqB,GAAG,IAAI,CAyC9B;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAE1D;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,qBAAqB,EAAE,GAC/B,qBAAqB,EAAE,CAEzB;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CACnC,aAAa,EAAE,qBAAqB,EAAE,EACtC,cAAc,EAAE,GAAG,CAAC,MAAM,CAAC,GAC1B,KAAK,CAAC;IACP,YAAY,EAAE,qBAAqB,CAAC;IACpC,KAAK,EAAE,cAAc,GAAG,YAAY,CAAC;CACtC,CAAC,CAgBD"}
|
|
@@ -33,6 +33,7 @@ const VALID_RELATIONSHIP_TYPES = new Set([
|
|
|
33
33
|
"constrains",
|
|
34
34
|
"requires_property",
|
|
35
35
|
"requires_predicate",
|
|
36
|
+
"requires_rule",
|
|
36
37
|
"guards",
|
|
37
38
|
"publishes",
|
|
38
39
|
"consumes",
|
|
@@ -79,7 +80,7 @@ export function extractRelationshipShard(shardPath) {
|
|
|
79
80
|
* Converts a RelationshipRecord to an ExtractedRelationship.
|
|
80
81
|
* Returns null if the record is invalid.
|
|
81
82
|
*/
|
|
82
|
-
function convertRecordToRelationship(record) {
|
|
83
|
+
export function convertRecordToRelationship(record) {
|
|
83
84
|
// Validate type
|
|
84
85
|
if (!VALID_RELATIONSHIP_TYPES.has(record.type)) {
|
|
85
86
|
throw new Error(`Invalid relationship type "${record.type}" in record ${record.id}`);
|