kibi-cli 2.0.0 → 2.2.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-protocol.d.ts.map +1 -1
- package/dist/cli-protocol.js +3 -2
- package/dist/cli-register-proof.d.ts.map +1 -1
- package/dist/cli-register-proof.js +25 -1
- package/dist/cli-register-reporting.d.ts.map +1 -1
- package/dist/cli-register-reporting.js +6 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +2 -0
- package/dist/commands/aggregated-checks.d.ts +7 -0
- package/dist/commands/aggregated-checks.d.ts.map +1 -1
- package/dist/commands/aggregated-checks.js +25 -1
- package/dist/commands/check-generated.d.ts +7 -0
- package/dist/commands/check-generated.d.ts.map +1 -0
- package/dist/commands/check-generated.js +192 -0
- package/dist/commands/check.d.ts.map +1 -1
- package/dist/commands/check.js +24 -15
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +227 -25
- package/dist/commands/engine.d.ts.map +1 -1
- package/dist/commands/engine.js +3 -1
- package/dist/commands/github-init.d.ts +1 -1
- package/dist/commands/github-init.d.ts.map +1 -1
- package/dist/commands/github-init.js +1 -1
- package/dist/commands/init-helpers.d.ts +17 -2
- package/dist/commands/init-helpers.d.ts.map +1 -1
- package/dist/commands/init-helpers.js +136 -30
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +110 -15
- package/dist/commands/proof-explain.d.ts +10 -0
- package/dist/commands/proof-explain.d.ts.map +1 -0
- package/dist/commands/proof-explain.js +45 -0
- package/dist/commands/proof-impact.d.ts +7 -0
- package/dist/commands/proof-impact.d.ts.map +1 -0
- package/dist/commands/proof-impact.js +39 -0
- package/dist/commands/proof-migrate-legacy.js +1 -1
- package/dist/commands/proof-prune.js +1 -1
- package/dist/commands/prove.d.ts.map +1 -1
- package/dist/commands/prove.js +14 -22
- package/dist/commands/report.d.ts.map +1 -1
- package/dist/commands/report.js +17 -2
- package/dist/commands/sync/cache.d.ts +20 -1
- package/dist/commands/sync/cache.d.ts.map +1 -1
- package/dist/commands/sync/cache.js +51 -2
- package/dist/commands/sync/discovery.d.ts.map +1 -1
- package/dist/commands/sync/discovery.js +1 -1
- package/dist/commands/sync/manifest.d.ts +1 -0
- package/dist/commands/sync/manifest.d.ts.map +1 -1
- package/dist/commands/sync/manifest.js +18 -16
- package/dist/commands/sync/persistence.d.ts.map +1 -1
- package/dist/commands/sync/persistence.js +14 -0
- package/dist/commands/sync.d.ts.map +1 -1
- package/dist/commands/sync.js +11 -3
- package/dist/engine.d.ts +29 -1
- package/dist/engine.d.ts.map +1 -1
- package/dist/engine.js +259 -89
- package/dist/env/bootstrap.d.ts +84 -0
- package/dist/env/bootstrap.d.ts.map +1 -0
- package/dist/env/bootstrap.js +310 -0
- package/dist/extractors/manifest.d.ts.map +1 -1
- package/dist/extractors/manifest.js +67 -29
- package/dist/extractors/markdown.d.ts +4 -0
- package/dist/extractors/markdown.d.ts.map +1 -1
- package/dist/extractors/markdown.js +33 -3
- package/dist/extractors/relationships.d.ts.map +1 -1
- package/dist/extractors/relationships.js +1 -0
- package/dist/extractors/symbols-coordinator.d.ts +8 -0
- package/dist/extractors/symbols-coordinator.d.ts.map +1 -1
- package/dist/extractors/symbols-coordinator.js +40 -0
- package/dist/extractors/symbols-ts.d.ts +8 -19
- package/dist/extractors/symbols-ts.d.ts.map +1 -1
- package/dist/extractors/symbols-ts.js +33 -503
- package/dist/intent-search.d.ts.map +1 -1
- package/dist/intent-search.js +68 -30
- package/dist/operations/bootstrap/generate.d.ts.map +1 -1
- package/dist/operations/bootstrap/generate.js +4 -3
- package/dist/operations/modeling/model-requirement.d.ts +1 -1
- package/dist/operations/modeling/model-requirement.d.ts.map +1 -1
- package/dist/operations/modeling/model-requirement.js +179 -9
- package/dist/operations/modeling/predicate-applyplan.d.ts.map +1 -1
- package/dist/operations/modeling/predicate-applyplan.js +14 -2
- package/dist/operations/modeling/predicate-loader.d.ts.map +1 -1
- package/dist/operations/modeling/predicate-loader.js +24 -0
- package/dist/operations/modeling/predicate-types.d.ts +4 -0
- package/dist/operations/modeling/predicate-types.d.ts.map +1 -1
- package/dist/operations/modeling/predicate-vocabulary.d.ts +54 -0
- package/dist/operations/modeling/predicate-vocabulary.d.ts.map +1 -0
- package/dist/operations/modeling/predicate-vocabulary.js +169 -0
- package/dist/operations/modeling/requirement-types.d.ts +5 -0
- package/dist/operations/modeling/requirement-types.d.ts.map +1 -1
- package/dist/operations/modeling/suggest-predicates.d.ts +1 -1
- package/dist/operations/modeling/suggest-predicates.d.ts.map +1 -1
- package/dist/operations/modeling/suggest-predicates.js +30 -3
- package/dist/operations/modeling/vocabulary-alignment.d.ts +60 -0
- package/dist/operations/modeling/vocabulary-alignment.d.ts.map +1 -0
- package/dist/operations/modeling/vocabulary-alignment.js +178 -0
- package/dist/operations/mutation/contradictions.d.ts +3 -0
- package/dist/operations/mutation/contradictions.d.ts.map +1 -1
- package/dist/operations/mutation/contradictions.js +29 -0
- package/dist/operations/mutation/delete.d.ts.map +1 -1
- package/dist/operations/mutation/delete.js +33 -1
- package/dist/operations/mutation/predicate-vocabulary-guard.d.ts +8 -0
- package/dist/operations/mutation/predicate-vocabulary-guard.d.ts.map +1 -0
- package/dist/operations/mutation/predicate-vocabulary-guard.js +64 -0
- package/dist/operations/mutation/relationships.d.ts +1 -1
- package/dist/operations/mutation/relationships.d.ts.map +1 -1
- package/dist/operations/mutation/relationships.js +1 -0
- package/dist/operations/mutation/saga.d.ts +5 -0
- package/dist/operations/mutation/saga.d.ts.map +1 -1
- package/dist/operations/mutation/saga.js +10 -0
- package/dist/operations/mutation/serialization.d.ts.map +1 -1
- package/dist/operations/mutation/serialization.js +2 -0
- package/dist/operations/mutation/source-authoring.d.ts +6 -0
- package/dist/operations/mutation/source-authoring.d.ts.map +1 -1
- package/dist/operations/mutation/source-authoring.js +65 -26
- package/dist/operations/mutation/strict-fact.d.ts.map +1 -1
- package/dist/operations/mutation/strict-fact.js +5 -0
- package/dist/operations/mutation/symbol-granularity.d.ts.map +1 -1
- package/dist/operations/mutation/symbol-granularity.js +9 -87
- package/dist/operations/mutation/types.d.ts +17 -0
- package/dist/operations/mutation/types.d.ts.map +1 -1
- package/dist/operations/mutation/upsert.d.ts +6 -0
- package/dist/operations/mutation/upsert.d.ts.map +1 -1
- package/dist/operations/mutation/upsert.js +72 -4
- package/dist/operations/mutation/validate-upsert.d.ts.map +1 -1
- package/dist/operations/mutation/validate-upsert.js +24 -1
- package/dist/operations/mutation/validation.d.ts.map +1 -1
- package/dist/operations/mutation/validation.js +16 -3
- package/dist/operations/planning/apply-plan.d.ts.map +1 -1
- package/dist/operations/planning/apply-plan.js +61 -17
- package/dist/operations/planning/compile-intent.d.ts +49 -0
- package/dist/operations/planning/compile-intent.d.ts.map +1 -1
- package/dist/operations/planning/compile-intent.js +66 -4
- package/dist/operations/proof/baseline-diff.d.ts +41 -0
- package/dist/operations/proof/baseline-diff.d.ts.map +1 -0
- package/dist/operations/proof/baseline-diff.js +153 -0
- package/dist/operations/proof/code-scope.d.ts +17 -0
- package/dist/operations/proof/code-scope.d.ts.map +1 -0
- package/dist/operations/proof/code-scope.js +60 -0
- package/dist/operations/proof/explain.d.ts +75 -0
- package/dist/operations/proof/explain.d.ts.map +1 -0
- package/dist/operations/proof/explain.js +294 -0
- package/dist/operations/proof/impact.d.ts +45 -0
- package/dist/operations/proof/impact.d.ts.map +1 -0
- package/dist/operations/proof/impact.js +118 -0
- package/dist/operations/proof/ingest-proof.d.ts +4 -2
- package/dist/operations/proof/ingest-proof.d.ts.map +1 -1
- package/dist/operations/proof/ingest-proof.js +251 -77
- package/dist/operations/proof/migrate-legacy-receipts.d.ts.map +1 -1
- package/dist/operations/proof/migrate-legacy-receipts.js +28 -22
- package/dist/operations/proof/prune-receipts.d.ts.map +1 -1
- package/dist/operations/proof/prune-receipts.js +8 -6
- package/dist/operations/proof/receipt-document.js +2 -2
- package/dist/operations/semantic-advisor/analysis-receipt.d.ts.map +1 -1
- package/dist/operations/semantic-advisor/analysis-receipt.js +3 -9
- package/dist/operations/semantic-advisor/analyze-prose.d.ts.map +1 -1
- package/dist/operations/semantic-advisor/analyze-prose.js +18 -67
- package/dist/operations/semantic-advisor/plugin-orchestration.d.ts +63 -0
- package/dist/operations/semantic-advisor/plugin-orchestration.d.ts.map +1 -0
- package/dist/operations/semantic-advisor/plugin-orchestration.js +489 -0
- package/dist/operations/semantic-advisor/predicate-rules-core.d.ts +15 -2
- package/dist/operations/semantic-advisor/predicate-rules-core.d.ts.map +1 -1
- package/dist/operations/semantic-advisor/predicate-rules-core.js +7 -140
- package/dist/operations/semantic-advisor/predicate-rules-launcher.d.ts +11 -12
- package/dist/operations/semantic-advisor/predicate-rules-launcher.d.ts.map +1 -1
- package/dist/operations/semantic-advisor/predicate-rules-launcher.js +6 -94
- package/dist/operations/semantic-advisor/predicate-rules-policy.d.ts +16 -0
- package/dist/operations/semantic-advisor/predicate-rules-policy.d.ts.map +1 -1
- package/dist/operations/semantic-advisor/predicate-rules-policy.js +7 -150
- package/dist/operations/semantic-advisor/predicate-rules-product-tail.d.ts +9 -0
- package/dist/operations/semantic-advisor/predicate-rules-product-tail.d.ts.map +1 -1
- package/dist/operations/semantic-advisor/predicate-rules-product-tail.js +7 -102
- package/dist/operations/semantic-advisor/predicate-rules-product.d.ts +13 -0
- package/dist/operations/semantic-advisor/predicate-rules-product.d.ts.map +1 -1
- package/dist/operations/semantic-advisor/predicate-rules-product.js +7 -133
- package/dist/operations/semantic-advisor/types.d.ts +1 -0
- package/dist/operations/semantic-advisor/types.d.ts.map +1 -1
- package/dist/plugins/compose-ontology-packs.d.ts +51 -0
- package/dist/plugins/compose-ontology-packs.d.ts.map +1 -0
- package/dist/plugins/compose-ontology-packs.js +257 -0
- package/dist/plugins/compose-semantic-classifier.d.ts +47 -0
- package/dist/plugins/compose-semantic-classifier.d.ts.map +1 -0
- package/dist/plugins/compose-semantic-classifier.js +216 -0
- package/dist/plugins/compose-vocabulary-alignment.d.ts +23 -0
- package/dist/plugins/compose-vocabulary-alignment.d.ts.map +1 -0
- package/dist/plugins/compose-vocabulary-alignment.js +141 -0
- package/dist/plugins/external-allowlist.d.ts +17 -0
- package/dist/plugins/external-allowlist.d.ts.map +1 -0
- package/dist/plugins/external-allowlist.js +29 -0
- package/dist/plugins/index.d.ts +11 -0
- package/dist/plugins/index.d.ts.map +1 -0
- package/dist/plugins/index.js +37 -0
- package/dist/plugins/load-plugin.d.ts +19 -0
- package/dist/plugins/load-plugin.d.ts.map +1 -0
- package/dist/plugins/load-plugin.js +59 -0
- package/dist/plugins/project-config.d.ts +28 -0
- package/dist/plugins/project-config.d.ts.map +1 -0
- package/dist/plugins/project-config.js +90 -0
- package/dist/plugins/registry.d.ts +94 -0
- package/dist/plugins/registry.d.ts.map +1 -0
- package/dist/plugins/registry.js +359 -0
- package/dist/plugins/resolve-package.d.ts +47 -0
- package/dist/plugins/resolve-package.d.ts.map +1 -0
- package/dist/plugins/resolve-package.js +262 -0
- package/dist/plugins/source-analysis-service.d.ts +44 -0
- package/dist/plugins/source-analysis-service.d.ts.map +1 -0
- package/dist/plugins/source-analysis-service.js +232 -0
- package/dist/prolog/codec.d.ts.map +1 -1
- package/dist/prolog/codec.js +2 -0
- package/dist/prolog/janitor.d.ts.map +1 -1
- package/dist/prolog/janitor.js +1 -1
- package/dist/prolog/store-lock.d.ts +1 -1
- package/dist/prolog/store-lock.d.ts.map +1 -1
- package/dist/prolog.d.ts +36 -0
- package/dist/prolog.d.ts.map +1 -1
- package/dist/prolog.js +78 -9
- package/dist/proof/inspect.js +1 -1
- package/dist/proof/producers/playwright-case-id.js +2 -2
- package/dist/proof/producers/playwright-reporter.js +4 -4
- package/dist/public/diagnostic-usage.d.ts.map +1 -1
- package/dist/public/diagnostic-usage.js +7 -25
- package/dist/public/extractors/symbols-coordinator.d.ts +1 -1
- package/dist/public/extractors/symbols-coordinator.d.ts.map +1 -1
- package/dist/public/extractors/symbols-coordinator.js +1 -1
- package/dist/public/impact/analyzer.d.ts +1 -1
- package/dist/public/impact/analyzer.d.ts.map +1 -1
- package/dist/public/impact/analyzer.js +6 -4
- package/dist/public/impact/full-kb-quality.d.ts.map +1 -1
- package/dist/public/impact/full-kb-quality.js +4 -12
- package/dist/public/operations/catalog.d.ts +39 -7
- package/dist/public/operations/catalog.d.ts.map +1 -1
- package/dist/public/operations/check-executor.d.ts.map +1 -1
- package/dist/public/operations/check-executor.js +11 -3
- package/dist/public/operations/check-helpers.d.ts +7 -1
- package/dist/public/operations/check-helpers.d.ts.map +1 -1
- package/dist/public/operations/check-helpers.js +22 -2
- package/dist/public/operations/contracts.d.ts.map +1 -1
- package/dist/public/operations/contracts.js +51 -12
- package/dist/public/operations/discovery-entities.d.ts +53 -1
- package/dist/public/operations/discovery-entities.d.ts.map +1 -1
- package/dist/public/operations/discovery-entities.js +219 -12
- package/dist/public/operations/discovery-executors.d.ts +1 -0
- package/dist/public/operations/discovery-executors.d.ts.map +1 -1
- package/dist/public/operations/discovery-executors.js +93 -59
- package/dist/public/operations/migration-plan.d.ts +2 -0
- package/dist/public/operations/migration-plan.d.ts.map +1 -1
- package/dist/public/operations/migration-plan.js +50 -0
- package/dist/public/operations/predicate-schema-conformance.d.ts +41 -0
- package/dist/public/operations/predicate-schema-conformance.d.ts.map +1 -0
- package/dist/public/operations/predicate-schema-conformance.js +242 -0
- package/dist/public/operations/prolog-json.d.ts +1 -1
- package/dist/public/operations/prolog-json.d.ts.map +1 -1
- package/dist/public/operations/prolog-json.js +16 -10
- package/dist/public/operations/result-envelope.d.ts +34 -1
- package/dist/public/operations/result-envelope.d.ts.map +1 -1
- package/dist/public/operations/result-envelope.js +78 -2
- package/dist/public/operations/runtime-types.d.ts +17 -2
- package/dist/public/operations/runtime-types.d.ts.map +1 -1
- package/dist/public/operations/specs/check-rules.generated.d.ts +1 -1
- package/dist/public/operations/specs/check-rules.generated.d.ts.map +1 -1
- package/dist/public/operations/specs/check-rules.generated.js +9 -1
- package/dist/public/operations/specs/check.d.ts +1 -1
- package/dist/public/operations/specs/discovery.d.ts +10 -1
- package/dist/public/operations/specs/discovery.d.ts.map +1 -1
- package/dist/public/operations/specs/discovery.js +10 -1
- package/dist/public/operations/specs/mutation-schemas.d.ts +27 -4
- package/dist/public/operations/specs/mutation-schemas.d.ts.map +1 -1
- package/dist/public/operations/specs/mutation-schemas.js +21 -3
- package/dist/public/operations/specs/proof.js +1 -1
- package/dist/public/operations/specs/reporting.d.ts +9 -0
- package/dist/public/operations/specs/reporting.d.ts.map +1 -1
- package/dist/public/operations/specs/reporting.js +48 -17
- package/dist/public/operations/specs/semantic.d.ts +1 -1
- package/dist/public/operations/specs/semantic.d.ts.map +1 -1
- package/dist/public/operations/specs/semantic.js +54 -4
- package/dist/public/operations/specs/upsert.d.ts +28 -5
- package/dist/public/operations/specs/upsert.d.ts.map +1 -1
- package/dist/public/operations/specs/upsert.js +1 -1
- package/dist/public/operations/symbol-repair-plan.d.ts.map +1 -1
- package/dist/public/operations/symbol-repair-plan.js +11 -4
- package/dist/public/operations/types.d.ts +5 -0
- package/dist/public/operations/types.d.ts.map +1 -1
- package/dist/public/proof-protocol.js +4 -4
- package/dist/public/schemas/entity.d.ts.map +1 -1
- package/dist/public/schemas/entity.js +22 -0
- package/dist/public/schemas/relationship.d.ts.map +1 -1
- package/dist/public/schemas/relationship.js +1 -0
- package/dist/public/skills/kibi-usage/SKILL.md +10 -3
- package/dist/public/skills/kibi-usage/resources/fact-lanes.md +4 -0
- package/dist/public/skills/kibi-usage/resources/proof.md +45 -0
- package/dist/public/skills/kibi-usage/resources/relationship-directions.md +35 -17
- package/dist/public/skills/kibi-usage/resources/source-authoring.md +36 -0
- package/dist/public/skills/kibi-usage/resources/workflows.md +52 -1
- package/dist/public/symbol-granularity.d.ts +1 -1
- package/dist/public/symbol-granularity.d.ts.map +1 -1
- package/dist/public/symbol-granularity.generated.d.ts.map +1 -1
- package/dist/public/symbol-granularity.generated.js +38 -5
- package/dist/public/telemetry-acceptance.d.ts.map +1 -1
- package/dist/public/telemetry-acceptance.js +21 -5
- package/dist/relationships/shards.d.ts +6 -0
- package/dist/relationships/shards.d.ts.map +1 -1
- package/dist/relationships/shards.js +26 -19
- package/dist/report/html-report.css +1239 -281
- package/dist/runtime/cli-runtime.d.ts.map +1 -1
- package/dist/runtime/cli-runtime.js +18 -0
- package/dist/schemas/entity.schema.json +32 -0
- package/dist/traceability/staged-diagnostics.d.ts +1 -1
- package/dist/traceability/staged-diagnostics.d.ts.map +1 -1
- package/dist/traceability/staged-entity-id-style.d.ts +12 -0
- package/dist/traceability/staged-entity-id-style.d.ts.map +1 -0
- package/dist/traceability/staged-entity-id-style.js +68 -0
- package/dist/traceability/symbol-extract.d.ts +24 -7
- package/dist/traceability/symbol-extract.d.ts.map +1 -1
- package/dist/traceability/symbol-extract.js +64 -208
- package/dist/traceability/temp-kb.d.ts.map +1 -1
- package/dist/traceability/temp-kb.js +8 -0
- package/dist/traceability/validate.js +1 -1
- package/dist/types/entities.d.ts +2 -0
- package/dist/types/entities.d.ts.map +1 -1
- package/dist/types/relationships.d.ts +1 -1
- package/dist/types/relationships.d.ts.map +1 -1
- package/dist/utils/entity-id-style.d.ts +27 -0
- package/dist/utils/entity-id-style.d.ts.map +1 -0
- package/dist/utils/entity-id-style.js +81 -0
- package/dist/utils/git-repository-context.d.ts +50 -0
- package/dist/utils/git-repository-context.d.ts.map +1 -0
- package/dist/utils/git-repository-context.js +259 -0
- package/dist/utils/rule-registry.d.ts +5 -0
- package/dist/utils/rule-registry.d.ts.map +1 -1
- package/dist/utils/rule-registry.generated.d.ts +42 -0
- package/dist/utils/rule-registry.generated.d.ts.map +1 -1
- package/dist/utils/rule-registry.generated.js +50 -0
- package/dist/utils/strict-modeling.d.ts +7 -0
- package/dist/utils/strict-modeling.d.ts.map +1 -1
- package/dist/utils/strict-modeling.js +11 -0
- package/package.json +14 -11
- package/schema/entities.pl +60 -1
- package/schema/relationships.pl +17 -4
- package/schema/validation.pl +118 -20
- package/src/public/diagnostic-usage.ts +16 -24
- package/src/public/extractors/symbols-coordinator.ts +1 -0
- package/src/public/impact/analyzer.ts +15 -12
- package/src/public/impact/full-kb-quality.ts +4 -16
- package/src/public/operations/check-executor.ts +13 -2
- package/src/public/operations/check-helpers.ts +29 -3
- package/src/public/operations/contracts.ts +59 -12
- package/src/public/operations/discovery-entities.ts +327 -12
- package/src/public/operations/discovery-executors.ts +110 -61
- package/src/public/operations/migration-plan.ts +57 -0
- package/src/public/operations/predicate-schema-conformance.ts +362 -0
- package/src/public/operations/prolog-json.ts +22 -8
- package/src/public/operations/result-envelope.ts +114 -2
- package/src/public/operations/runtime-types.ts +22 -3
- package/src/public/operations/specs/check-rules.generated.ts +9 -1
- package/src/public/operations/specs/discovery.ts +11 -1
- package/src/public/operations/specs/mutation-schemas.ts +23 -3
- package/src/public/operations/specs/proof.ts +1 -1
- package/src/public/operations/specs/reporting.ts +71 -24
- package/src/public/operations/specs/semantic.ts +79 -17
- package/src/public/operations/specs/upsert.ts +1 -1
- package/src/public/operations/symbol-repair-plan.ts +16 -7
- package/src/public/operations/types.ts +5 -0
- package/src/public/proof-fingerprint.ts +1 -1
- package/src/public/proof-protocol-types.d.ts +1 -1
- package/src/public/proof-protocol.ts +4 -4
- package/src/public/schemas/entity.ts +22 -0
- package/src/public/schemas/relationship.ts +1 -0
- package/src/public/skills/kibi-usage/SKILL.md +10 -3
- package/src/public/skills/kibi-usage/resources/fact-lanes.md +4 -0
- package/src/public/skills/kibi-usage/resources/proof.md +45 -0
- package/src/public/skills/kibi-usage/resources/relationship-directions.md +35 -17
- package/src/public/skills/kibi-usage/resources/source-authoring.md +36 -0
- package/src/public/skills/kibi-usage/resources/workflows.md +52 -1
- package/src/public/symbol-granularity.generated.ts +45 -12
- package/src/public/symbol-granularity.ts +3 -3
- package/src/public/telemetry-acceptance.ts +37 -6
- package/src/schemas/entity.schema.json +32 -0
- package/src/schemas/relationship.schema.json +1 -0
|
@@ -2,7 +2,7 @@ import { mkdir, writeFile } from "node:fs/promises";
|
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import { PROOF_RUN_VERSION, } from "../../public/proof-protocol.js";
|
|
4
4
|
import { normalizePlaywrightSourceFile, playwrightCaseId, } from "./playwright-case-id.js";
|
|
5
|
-
// implements REQ-kibi-
|
|
5
|
+
// implements REQ-kibi-verification-evidence-contract
|
|
6
6
|
export { PROOF_RUN_VERSION };
|
|
7
7
|
function outputPath(options) {
|
|
8
8
|
const configured = options.outputPath ?? process.env.KIBI_PROOF_OUTPUT;
|
|
@@ -53,11 +53,11 @@ export class KibiPlaywrightProducer {
|
|
|
53
53
|
this.options = options;
|
|
54
54
|
this.startedAt = (options.now ?? (() => new Date()))().toISOString();
|
|
55
55
|
}
|
|
56
|
-
// implements REQ-kibi-
|
|
56
|
+
// implements REQ-kibi-verification-evidence-contract
|
|
57
57
|
onBegin() {
|
|
58
58
|
this.startedAt = (this.options.now ?? (() => new Date()))().toISOString();
|
|
59
59
|
}
|
|
60
|
-
// implements REQ-kibi-
|
|
60
|
+
// implements REQ-kibi-verification-evidence-contract
|
|
61
61
|
onTestEnd(test, result) {
|
|
62
62
|
const resultValue = result;
|
|
63
63
|
const titles = titlePath(test);
|
|
@@ -101,7 +101,7 @@ export class KibiPlaywrightProducer {
|
|
|
101
101
|
attempts: { status: "complete", entries: [attempt] },
|
|
102
102
|
});
|
|
103
103
|
}
|
|
104
|
-
// implements REQ-kibi-
|
|
104
|
+
// implements REQ-kibi-verification-evidence-contract
|
|
105
105
|
async onEnd(result) {
|
|
106
106
|
const now = this.options.now ?? (() => new Date());
|
|
107
107
|
const status = result?.status;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"diagnostic-usage.d.ts","sourceRoot":"","sources":["../../src/public/diagnostic-usage.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"diagnostic-usage.d.ts","sourceRoot":"","sources":["../../src/public/diagnostic-usage.ts"],"names":[],"mappings":"AASA,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,YAAY,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IACzD,QAAQ,CAAC,SAAS,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC;IAC7D,QAAQ,CAAC,SAAS,EAAE,IAAI,CAAC;IACzB,QAAQ,CAAC,UAAU,CAAC,EAAE,IAAI,CAAC;IAC3B,QAAQ,CAAC,MAAM,EAAE,SAAS,GAAG,OAAO,CAAC;IACrC,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;CAC3B;AAuBD,wBAAgB,6BAA6B,CAC3C,IAAI,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GACtC,MAAM,CAIR;AAkHD,wBAAgB,2BAA2B,CACzC,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,EACvC,SAAS,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GAAG,IAAI,EACnD,MAAM,EAAE,OAAO,GACd,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAwEzB;AAED,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,oBAAoB,GAAG,IAAI,CAgC1E"}
|
|
@@ -1,21 +1,10 @@
|
|
|
1
1
|
import { createHash, randomUUID } from "node:crypto";
|
|
2
2
|
import { appendFileSync, mkdirSync } from "node:fs";
|
|
3
3
|
import path from "node:path";
|
|
4
|
+
import { appendPayloadCountField, normalizeResultPayload, } from "./operations/result-envelope.js";
|
|
4
5
|
function isRecord(value) {
|
|
5
6
|
return Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
6
7
|
}
|
|
7
|
-
function resultRecord(result) {
|
|
8
|
-
if (!isRecord(result))
|
|
9
|
-
return undefined;
|
|
10
|
-
if (isRecord(result.structuredContent))
|
|
11
|
-
return result.structuredContent;
|
|
12
|
-
// CLI JSON operations return the same versioned KibiResult envelope as MCP
|
|
13
|
-
// structuredContent. Unwrap its data before deriving operation-specific
|
|
14
|
-
// telemetry fields (coverage/proof fields in particular).
|
|
15
|
-
if (result.kibiProtocol === 1 && isRecord(result.data))
|
|
16
|
-
return result.data;
|
|
17
|
-
return result;
|
|
18
|
-
}
|
|
19
8
|
function stringArray(value) {
|
|
20
9
|
return Array.isArray(value)
|
|
21
10
|
? value.filter((item) => typeof item === "string")
|
|
@@ -141,10 +130,7 @@ export function deriveDiagnosticUsageFields(tool, args, telemetry, result) {
|
|
|
141
130
|
fields.actor_id = telemetry.actor_id;
|
|
142
131
|
}
|
|
143
132
|
}
|
|
144
|
-
const structured =
|
|
145
|
-
const envelope = isRecord(structured) && structured.kibiProtocol === 1
|
|
146
|
-
? structured
|
|
147
|
-
: undefined;
|
|
133
|
+
const { envelope, data: structured } = normalizeResultPayload(result);
|
|
148
134
|
if (envelope) {
|
|
149
135
|
fields.protocol_version = envelope.kibiProtocol;
|
|
150
136
|
fields.result_version =
|
|
@@ -162,18 +148,14 @@ export function deriveDiagnosticUsageFields(tool, args, telemetry, result) {
|
|
|
162
148
|
fields.unsafe_original_retry = telemetry?.unsafe_original_retry === true;
|
|
163
149
|
}
|
|
164
150
|
if (tool === "kb_query" || tool === "kb_search") {
|
|
165
|
-
|
|
166
|
-
fields.result_count
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
resultCount === 0 ? "0 results" : `${resultCount} results`;
|
|
151
|
+
appendPayloadCountField(fields, "result_count", "results", structured);
|
|
152
|
+
if (typeof fields.result_count === "number") {
|
|
153
|
+
fields.zero_results = fields.result_count === 0;
|
|
154
|
+
}
|
|
170
155
|
}
|
|
171
156
|
if (tool === "kb_check") {
|
|
172
|
-
|
|
173
|
-
fields.violation_count = count;
|
|
157
|
+
appendPayloadCountField(fields, "violation_count", "violations", structured);
|
|
174
158
|
fields.requested_rules = Array.isArray(args.rules) ? args.rules : [];
|
|
175
|
-
fields.result_summary =
|
|
176
|
-
count === 0 ? "0 violations" : `${count} violations`;
|
|
177
159
|
}
|
|
178
160
|
if (tool === "kb_coverage" && structured) {
|
|
179
161
|
appendCoverageFields(fields, args, structured);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { analyzeSourceText, enrichSymbolCoordinates, type ManifestSymbolEntry, type AnalyzeSourceTextOptions, type SourceAnalysisProvider, type SourceAnalysisResult, type SourceModuleAnalysis, type SourceSymbolAnalysis, type SourceSymbolKind, } from "../../extractors/symbols-coordinator.js";
|
|
1
|
+
export { analyzeSourceText, analyzeSourceTextWithRegistry, enrichSymbolCoordinates, type ManifestSymbolEntry, type AnalyzeSourceTextOptions, type SourceAnalysisProvider, type SourceAnalysisResult, type SourceModuleAnalysis, type SourceSymbolAnalysis, type SourceSymbolKind, } from "../../extractors/symbols-coordinator.js";
|
|
2
2
|
//# sourceMappingURL=symbols-coordinator.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"symbols-coordinator.d.ts","sourceRoot":"","sources":["../../../src/public/extractors/symbols-coordinator.ts"],"names":[],"mappings":"AAkBA,OAAO,EACL,iBAAiB,EACjB,uBAAuB,EACvB,KAAK,mBAAmB,EACxB,KAAK,wBAAwB,EAC7B,KAAK,sBAAsB,EAC3B,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,GACtB,MAAM,yCAAyC,CAAC"}
|
|
1
|
+
{"version":3,"file":"symbols-coordinator.d.ts","sourceRoot":"","sources":["../../../src/public/extractors/symbols-coordinator.ts"],"names":[],"mappings":"AAkBA,OAAO,EACL,iBAAiB,EACjB,6BAA6B,EAC7B,uBAAuB,EACvB,KAAK,mBAAmB,EACxB,KAAK,wBAAwB,EAC7B,KAAK,sBAAsB,EAC3B,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,GACtB,MAAM,yCAAyC,CAAC"}
|
|
@@ -15,4 +15,4 @@
|
|
|
15
15
|
You should have received a copy of the GNU Affero General Public License
|
|
16
16
|
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
17
17
|
*/
|
|
18
|
-
export { analyzeSourceText, enrichSymbolCoordinates, } from "../../extractors/symbols-coordinator.js";
|
|
18
|
+
export { analyzeSourceText, analyzeSourceTextWithRegistry, enrichSymbolCoordinates, } from "../../extractors/symbols-coordinator.js";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { ChangedFileImpactOptions, ChangedFileImpactResult } from "./types.js";
|
|
2
|
-
export declare function analyzeChangedFileImpact(options: ChangedFileImpactOptions): ChangedFileImpactResult
|
|
2
|
+
export declare function analyzeChangedFileImpact(options: ChangedFileImpactOptions): Promise<ChangedFileImpactResult>;
|
|
3
3
|
//# sourceMappingURL=analyzer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"analyzer.d.ts","sourceRoot":"","sources":["../../../src/public/impact/analyzer.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EACV,wBAAwB,EACxB,uBAAuB,EACxB,MAAM,YAAY,CAAC;AAEpB,
|
|
1
|
+
{"version":3,"file":"analyzer.d.ts","sourceRoot":"","sources":["../../../src/public/impact/analyzer.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EACV,wBAAwB,EACxB,uBAAuB,EACxB,MAAM,YAAY,CAAC;AAEpB,wBAAsB,wBAAwB,CAC5C,OAAO,EAAE,wBAAwB,GAChC,OAAO,CAAC,uBAAuB,CAAC,CAmElC"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import * as path from "node:path";
|
|
2
|
-
import {
|
|
2
|
+
import { extractSymbolsFromStagedFileAsync } from "../../traceability/symbol-extract.js";
|
|
3
3
|
import { createSemanticReviewDiagnostics, createSymbolGranularityDiagnostics, } from "./diagnostics.js";
|
|
4
4
|
import { createImpactManifestLookup, readImpactManifestResults, } from "./manifest.js";
|
|
5
5
|
import { collectSourceChanges, uniqueSorted } from "./source-changes.js";
|
|
6
6
|
import { buildNextActions, collectLinkedEntities, formatExtractedSymbols, } from "./summaries.js";
|
|
7
7
|
import { createSymbolQualityDiagnostics } from "./symbol-quality.js";
|
|
8
|
-
export function analyzeChangedFileImpact(options) {
|
|
8
|
+
export async function analyzeChangedFileImpact(options) {
|
|
9
9
|
const workspaceRoot = path.resolve(options.workspaceRoot);
|
|
10
10
|
const sourceChanges = collectSourceChanges({ ...options, workspaceRoot });
|
|
11
11
|
const sourceFiles = uniqueSorted(sourceChanges.map((change) => change.file));
|
|
@@ -15,12 +15,14 @@ export function analyzeChangedFileImpact(options) {
|
|
|
15
15
|
const sourceContentByFile = new Map();
|
|
16
16
|
for (const change of sourceChanges) {
|
|
17
17
|
sourceContentByFile.set(change.file, change.content);
|
|
18
|
-
|
|
18
|
+
// Maintenance path: builtin-only (do not pass registry / workspaceRoot).
|
|
19
|
+
const extracted = await extractSymbolsFromStagedFileAsync({
|
|
19
20
|
path: change.file,
|
|
20
21
|
status: change.status,
|
|
21
22
|
hunkRanges: [...change.hunkRanges],
|
|
22
23
|
content: change.content,
|
|
23
|
-
}, manifestLookup
|
|
24
|
+
}, manifestLookup, {});
|
|
25
|
+
symbolsByFile.set(change.file, extracted.filter((symbol) => symbol.hunkRanges.length > 0));
|
|
24
26
|
}
|
|
25
27
|
const activeSourceFiles = new Set(sourceFiles);
|
|
26
28
|
const activeManifestResults = manifestResults.filter((result) => result.sourceFile !== undefined &&
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"full-kb-quality.d.ts","sourceRoot":"","sources":["../../../src/public/impact/full-kb-quality.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAEV,gBAAgB,EACjB,MAAM,8BAA8B,CAAC;AAatC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAWjE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AASpD,KAAK,+BAA+B,GAAG;IACrC,QAAQ,CAAC,MAAM,EAAE,IAAI,CAAC,UAAU,EAAE,OAAO,GAAG,eAAe,CAAC,CAAC;IAC7D,QAAQ,CAAC,sBAAsB,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IACtD,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC;IACpB,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B,CAAC;AAmgBF,wBAAsB,uBAAuB,CAC3C,MAAM,EAAE,IAAI,CAAC,UAAU,EAAE,OAAO,GAAG,eAAe,CAAC,GAClD,OAAO,CAAC,gBAAgB,EAAE,CAAC,
|
|
1
|
+
{"version":3,"file":"full-kb-quality.d.ts","sourceRoot":"","sources":["../../../src/public/impact/full-kb-quality.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAEV,gBAAgB,EACjB,MAAM,8BAA8B,CAAC;AAatC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAWjE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AASpD,KAAK,+BAA+B,GAAG;IACrC,QAAQ,CAAC,MAAM,EAAE,IAAI,CAAC,UAAU,EAAE,OAAO,GAAG,eAAe,CAAC,CAAC;IAC7D,QAAQ,CAAC,sBAAsB,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IACtD,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC;IACpB,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B,CAAC;AAmgBF,wBAAsB,uBAAuB,CAC3C,MAAM,EAAE,IAAI,CAAC,UAAU,EAAE,OAAO,GAAG,eAAe,CAAC,GAClD,OAAO,CAAC,gBAAgB,EAAE,CAAC,CA8C7B;AAED,wBAAgB,eAAe,CAC7B,UAAU,EAAE,OAAO,GAClB,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GAAG,SAAS,CAM/C;AA2ID,wBAAsB,+BAA+B,CACnD,OAAO,EAAE,+BAA+B,GACvC,OAAO,CAAC,SAAS,iBAAiB,EAAE,CAAC,CAkCvC"}
|
|
@@ -404,18 +404,10 @@ export async function loadKbExtractionResults(prolog) {
|
|
|
404
404
|
entities = await loadIndexedEntityProjection(prolog.queryEntities.bind(prolog));
|
|
405
405
|
}
|
|
406
406
|
else {
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
: [];
|
|
412
|
-
}
|
|
413
|
-
else if (isOutputCapacityError(entityResult.error)) {
|
|
414
|
-
entities = await loadBoundedEntityProjection(prolog);
|
|
415
|
-
}
|
|
416
|
-
else {
|
|
417
|
-
throw new Error(`Full KB entity projection query failed: ${entityResult.error ?? "Unknown error"}`);
|
|
418
|
-
}
|
|
407
|
+
// Never probe with an unbounded all-entities findall: receipt histories
|
|
408
|
+
// make that answer grow without limit, and an overflow terminates the
|
|
409
|
+
// interactive Prolog process that serves every later query.
|
|
410
|
+
entities = await loadBoundedEntityProjection(prolog);
|
|
419
411
|
}
|
|
420
412
|
const relationships = new Map();
|
|
421
413
|
for (const relationshipType of RELATIONSHIP_TYPES) {
|
|
@@ -72,7 +72,7 @@ export declare const OPERATION_CATALOG: readonly [{
|
|
|
72
72
|
};
|
|
73
73
|
readonly id: {
|
|
74
74
|
readonly type: "string";
|
|
75
|
-
readonly description: "Optional exact entity ID. Example: 'REQ-
|
|
75
|
+
readonly description: "Optional exact entity ID. Example: 'REQ-cli-gc'. If omitted, returns matching entities by other filters.";
|
|
76
76
|
};
|
|
77
77
|
readonly tags: {
|
|
78
78
|
readonly type: "array";
|
|
@@ -99,6 +99,7 @@ export declare const OPERATION_CATALOG: readonly [{
|
|
|
99
99
|
};
|
|
100
100
|
readonly requiresProlog: true;
|
|
101
101
|
readonly effects: readonly ["kb-read"];
|
|
102
|
+
readonly agentVisibleStructuredData: true;
|
|
102
103
|
readonly execute: typeof import("./discovery-executors.js").executeQuery;
|
|
103
104
|
}, {
|
|
104
105
|
readonly name: "kb_search";
|
|
@@ -215,10 +216,17 @@ export declare const OPERATION_CATALOG: readonly [{
|
|
|
215
216
|
readonly default: 0.18;
|
|
216
217
|
readonly description: "Intent-v1 acceptance threshold between 0 and 1. Low-confidence queries abstain instead of returning misleading matches.";
|
|
217
218
|
};
|
|
219
|
+
readonly fields: {
|
|
220
|
+
readonly type: "string";
|
|
221
|
+
readonly enum: readonly ["summary", "full"];
|
|
222
|
+
readonly default: "summary";
|
|
223
|
+
readonly description: "Optional result detail. 'summary' returns identifying metadata plus the match snippet for discovery. Use 'full' to include complete entity bodies, or follow up with kb_query for the exact entities you need.";
|
|
224
|
+
};
|
|
218
225
|
};
|
|
219
226
|
};
|
|
220
227
|
readonly requiresProlog: true;
|
|
221
228
|
readonly effects: readonly ["kb-read"];
|
|
229
|
+
readonly agentVisibleStructuredData: true;
|
|
222
230
|
readonly execute: typeof import("./discovery-executors.js").executeSearch;
|
|
223
231
|
}, {
|
|
224
232
|
readonly name: "kb_status";
|
|
@@ -230,6 +238,7 @@ export declare const OPERATION_CATALOG: readonly [{
|
|
|
230
238
|
};
|
|
231
239
|
readonly requiresProlog: false;
|
|
232
240
|
readonly effects: readonly ["kb-read", "workspace-read"];
|
|
241
|
+
readonly agentVisibleStructuredData: true;
|
|
233
242
|
readonly execute: typeof import("./discovery-executors.js").executeStatus;
|
|
234
243
|
}, {
|
|
235
244
|
readonly name: "kb_find_gaps";
|
|
@@ -756,7 +765,7 @@ export declare const OPERATION_CATALOG: readonly [{
|
|
|
756
765
|
};
|
|
757
766
|
readonly id: {
|
|
758
767
|
readonly type: "string";
|
|
759
|
-
readonly description: "Unique entity ID (string). Example: 'REQ-
|
|
768
|
+
readonly description: "Unique entity ID (string). Example: 'REQ-cli-gc'. Name entities by the behavior they govern (<TYPE>-<area>-<behavior>), never by the next free number. Existing ID updates the entity; new ID creates it.";
|
|
760
769
|
};
|
|
761
770
|
readonly properties: {
|
|
762
771
|
readonly type: "object";
|
|
@@ -772,7 +781,7 @@ export declare const OPERATION_CATALOG: readonly [{
|
|
|
772
781
|
};
|
|
773
782
|
readonly source: {
|
|
774
783
|
readonly type: "string";
|
|
775
|
-
readonly description: "Optional provenance string. Example: '
|
|
784
|
+
readonly description: "Optional provenance string. Example: '.kb/requirements/REQ-cli-gc.md'. Defaults to 'mcp://kibi/upsert'.";
|
|
776
785
|
};
|
|
777
786
|
readonly tags: {
|
|
778
787
|
readonly type: "array";
|
|
@@ -798,7 +807,7 @@ export declare const OPERATION_CATALOG: readonly [{
|
|
|
798
807
|
readonly items: {
|
|
799
808
|
readonly type: "string";
|
|
800
809
|
};
|
|
801
|
-
readonly description: "Optional references. Example: ['REQ-
|
|
810
|
+
readonly description: "Optional references. Example: ['REQ-cli-gc','https://example.com/spec'].";
|
|
802
811
|
};
|
|
803
812
|
readonly text_ref: {
|
|
804
813
|
readonly type: "string";
|
|
@@ -1273,6 +1282,29 @@ export declare const OPERATION_CATALOG: readonly [{
|
|
|
1273
1282
|
};
|
|
1274
1283
|
readonly description: "Optional ordered argument explanations.";
|
|
1275
1284
|
};
|
|
1285
|
+
readonly argument_constants: {
|
|
1286
|
+
readonly type: "object";
|
|
1287
|
+
readonly additionalProperties: {
|
|
1288
|
+
readonly type: "array";
|
|
1289
|
+
readonly items: {
|
|
1290
|
+
readonly type: "string";
|
|
1291
|
+
readonly minLength: 1;
|
|
1292
|
+
};
|
|
1293
|
+
readonly minItems: 1;
|
|
1294
|
+
};
|
|
1295
|
+
readonly description: "predicate_schema only: allowed constants keyed by argument name, e.g. {\"severity\": [\"warning\", \"info\"]}. Predicate facts must use a listed constant for those arguments; unlisted arguments stay open.";
|
|
1296
|
+
};
|
|
1297
|
+
readonly argument_aliases: {
|
|
1298
|
+
readonly type: "object";
|
|
1299
|
+
readonly additionalProperties: {
|
|
1300
|
+
readonly type: "object";
|
|
1301
|
+
readonly additionalProperties: {
|
|
1302
|
+
readonly type: "string";
|
|
1303
|
+
readonly minLength: 1;
|
|
1304
|
+
};
|
|
1305
|
+
};
|
|
1306
|
+
readonly description: "predicate_schema only: legacy spellings keyed by argument name, each mapped to a declared constant, e.g. {\"severity\": {\"warn\": \"warning\"}}. kibi migrate rewrites facts that still use an alias.";
|
|
1307
|
+
};
|
|
1276
1308
|
readonly aliases: {
|
|
1277
1309
|
readonly type: "array";
|
|
1278
1310
|
readonly items: {
|
|
@@ -1342,7 +1374,7 @@ export declare const OPERATION_CATALOG: readonly [{
|
|
|
1342
1374
|
readonly properties: {
|
|
1343
1375
|
readonly type: {
|
|
1344
1376
|
readonly type: "string";
|
|
1345
|
-
readonly enum: readonly ["depends_on", "specified_by", "verified_by", "validates", "implements", "covered_by", "executable_for", "constrained_by", "constrains", "requires_property", "requires_predicate", "requires_rule", "guards", "publishes", "consumes", "supersedes", "relates_to"];
|
|
1377
|
+
readonly enum: readonly ["depends_on", "specified_by", "verified_by", "validates", "implements", "covered_by", "executable_for", "constrained_by", "constrains", "requires_property", "requires_predicate", "requires_rule", "guards", "publishes", "consumes", "supersedes", "restates", "relates_to"];
|
|
1346
1378
|
readonly description: "Relationship type enum. Use only supported values. Direction semantics follow KB model (e.g., implements symbol->req, verified_by req/scenario->test, executable_for symbol->test).";
|
|
1347
1379
|
};
|
|
1348
1380
|
readonly from: {
|
|
@@ -1351,7 +1383,7 @@ export declare const OPERATION_CATALOG: readonly [{
|
|
|
1351
1383
|
};
|
|
1352
1384
|
readonly to: {
|
|
1353
1385
|
readonly type: "string";
|
|
1354
|
-
readonly description: "Target entity ID (must exist). Example: 'REQ-
|
|
1386
|
+
readonly description: "Target entity ID (must exist). Example: 'REQ-cli-gc'.";
|
|
1355
1387
|
};
|
|
1356
1388
|
};
|
|
1357
1389
|
};
|
|
@@ -1448,7 +1480,7 @@ export declare const OPERATION_CATALOG: readonly [{
|
|
|
1448
1480
|
readonly type: "string";
|
|
1449
1481
|
readonly enum: readonly string[];
|
|
1450
1482
|
};
|
|
1451
|
-
readonly description: "Optional rule subset. Allowed: must-priority-coverage, symbol-coverage, symbol-traceability, no-dangling-refs, source-relationship-parity, no-cycles, required-fields, deprecated-adr-no-successor, domain-contradictions, logic-coverage, rule-safety, rule-verifiability, query-plan-safety, req-status-vocabulary, strict-fact-shape, strict-req-fact-pairing, predicate-verifiability, strict-readiness, semantic-completeness. If omitted, server runs canonical and advisory rules plus the full-KB qualityDiagnostics audit scan, including usage telemetry acceptance when evidence exists; migration rules run only when explicitly selected. Advisory and migration findings are non-blocking qualityDiagnostics. If supplied, server preserves scoped validation and skips the full-KB advisory scan.";
|
|
1483
|
+
readonly description: "Optional rule subset. Allowed: must-priority-coverage, symbol-coverage, symbol-traceability, no-dangling-refs, source-relationship-parity, no-cycles, required-fields, deprecated-adr-no-successor, domain-contradictions, logic-coverage, rule-safety, rule-verifiability, query-plan-safety, req-status-vocabulary, strict-fact-shape, strict-req-fact-pairing, predicate-verifiability, strict-readiness, semantic-completeness, proof-contract-symbols, entity-id-style, domain-redundancy, domain-implication, subject-key-identity, subject-key-shape, ontology-quality, predicate-schema-conformance. If omitted, server runs canonical and advisory rules plus the full-KB qualityDiagnostics audit scan, including usage telemetry acceptance when evidence exists; migration rules run only when explicitly selected. Advisory and migration findings are non-blocking qualityDiagnostics. If supplied, server preserves scoped validation and skips the full-KB advisory scan.";
|
|
1452
1484
|
};
|
|
1453
1485
|
readonly sourceFiles: {
|
|
1454
1486
|
readonly type: "array";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"catalog.d.ts","sourceRoot":"","sources":["../../../src/public/operations/catalog.ts"],"names":[],"mappings":"AA2BA,OAAO,KAAK,EACV,aAAa,EACb,aAAa,EACb,qBAAqB,EACtB,MAAM,YAAY,CAAC;AAEpB,eAAO,MAAM,iBAAiB
|
|
1
|
+
{"version":3,"file":"catalog.d.ts","sourceRoot":"","sources":["../../../src/public/operations/catalog.ts"],"names":[],"mappings":"AA2BA,OAAO,KAAK,EACV,aAAa,EACb,aAAa,EACb,qBAAqB,EACtB,MAAM,YAAY,CAAC;AAEpB,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsBe,CAAC;AAyF9C,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,aAAa,GAClB,qBAAqB,CA+BvB;AAQD,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,qBAAqB,GAAG,SAAS,EACvC,IAAI,EAAE,aAAa,GAClB,qBAAqB,CAKvB;AAED,wBAAgB,OAAO,CAAC,IAAI,EAAE,aAAa,GAAG,qBAAqB,CAElE;AAGD,wBAAgB,SAAS,IAAI,SAAS,qBAAqB,EAAE,CAE5D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"check-executor.d.ts","sourceRoot":"","sources":["../../../src/public/operations/check-executor.ts"],"names":[],"mappings":"AAoBA,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,sBAAsB,EAC3B,sBAAsB,EACtB,YAAY,EACb,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAGL,iBAAiB,EAGjB,iBAAiB,
|
|
1
|
+
{"version":3,"file":"check-executor.d.ts","sourceRoot":"","sources":["../../../src/public/operations/check-executor.ts"],"names":[],"mappings":"AAoBA,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,sBAAsB,EAC3B,sBAAsB,EACtB,YAAY,EACb,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAGL,iBAAiB,EAGjB,iBAAiB,EAElB,MAAM,oBAAoB,CAAC;AAQ5B,OAAO,KAAK,EAAE,gBAAgB,EAAc,MAAM,oBAAoB,CAAC;AAEvE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAIlD,MAAM,MAAM,UAAU,GAAG;IACvB,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACnC,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,WAAW,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACzC,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,sBAAsB,CAAC,EAAE,OAAO,CAAC;IAC1C,QAAQ,CAAC,wBAAwB,CAAC,EAAE,OAAO,CAAC;IAC5C,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC;CAClC,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG,sBAAsB,CAAC;AAClD,YAAY,EAAE,eAAe,EAAE,sBAAsB,EAAE,CAAC;AACxD,OAAO,EACL,sBAAsB,EACtB,YAAY,EACZ,iBAAiB,EACjB,iBAAiB,GAClB,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG;IAClC,QAAQ,CAAC,6CAA6C,CAAC,EAAE,OAAO,CAAC;CAClE,CAAC;AAqDF,wBAAsB,YAAY,CAChC,IAAI,EAAE,UAAU,EAChB,OAAO,EAAE,gBAAgB,EACzB,OAAO,GAAE,qBAA0B,GAClC,OAAO,CAAC,eAAe,CAAC,YAAY,CAAC,CAAC,CA4JxC"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { runAggregatedChecks } from "../../commands/aggregated-checks.js";
|
|
2
2
|
import { collectFullKbQualityDiagnostics } from "../impact-diagnostics.js";
|
|
3
3
|
import { buildStructuredContent, buildSummary, } from "./check-format-shared.js";
|
|
4
|
-
import { analyzeKbCheckImpact, collectQueryPlanSafetyViolations, getEffectiveRules, partitionCheckFindings, qualityDiagnosticsFromImpact, resolveCheckRules, } from "./check-helpers.js";
|
|
4
|
+
import { analyzeKbCheckImpact, collectQueryPlanSafetyViolations, getEffectiveRules, partitionCheckFindings, qualityDiagnosticsFromImpact, resolveCheckRules, stagedEntityIdStyleDiagnostics, } from "./check-helpers.js";
|
|
5
5
|
import { executeStatus } from "./discovery-executors.js";
|
|
6
6
|
import { buildActionsFromCheck, buildMigrationPlan, mergeMigrationPlans, } from "./migration-plan.js";
|
|
7
|
+
import { collectPredicateSchemaConformanceViolations } from "./predicate-schema-conformance.js";
|
|
7
8
|
import { collectSourceRelationshipParityViolations } from "./source-relationship-parity.js";
|
|
8
9
|
import { readWorkspaceSnapshot } from "./workspace-snapshot.js";
|
|
9
10
|
export { buildStructuredContent, buildSummary, getEffectiveRules, resolveCheckRules, };
|
|
@@ -60,8 +61,11 @@ export async function executeCheck(args, context, options = {}) {
|
|
|
60
61
|
// version. `args.rules` is an invocation-time diagnostic selector only.
|
|
61
62
|
const rulesAllowlist = resolveCheckRules(args);
|
|
62
63
|
const hasExplicitRules = args.rules !== undefined;
|
|
63
|
-
const impactResult = analyzeKbCheckImpact(workspaceRoot, args);
|
|
64
|
-
const impactQualityDiagnostics =
|
|
64
|
+
const impactResult = await analyzeKbCheckImpact(workspaceRoot, args);
|
|
65
|
+
const impactQualityDiagnostics = [
|
|
66
|
+
...qualityDiagnosticsFromImpact(impactResult),
|
|
67
|
+
...stagedEntityIdStyleDiagnostics(workspaceRoot, args),
|
|
68
|
+
];
|
|
65
69
|
const maxDiagnosticsOption = args.maxDiagnostics !== undefined
|
|
66
70
|
? { maxDiagnostics: args.maxDiagnostics }
|
|
67
71
|
: {};
|
|
@@ -109,10 +113,14 @@ export async function executeCheck(args, context, options = {}) {
|
|
|
109
113
|
const sourceRelationshipParityViolations = rulesAllowlist.has("source-relationship-parity")
|
|
110
114
|
? await collectSourceRelationshipParityViolations(workspaceRoot, prolog)
|
|
111
115
|
: [];
|
|
116
|
+
const predicateConformanceFindings = rulesAllowlist.has("predicate-schema-conformance")
|
|
117
|
+
? await collectPredicateSchemaConformanceViolations(prolog)
|
|
118
|
+
: [];
|
|
112
119
|
const partitioned = partitionCheckFindings([
|
|
113
120
|
...aggregatedFindings,
|
|
114
121
|
...queryPlanViolations,
|
|
115
122
|
...sourceRelationshipParityViolations,
|
|
123
|
+
...predicateConformanceFindings,
|
|
116
124
|
]);
|
|
117
125
|
const violations = partitioned.violations;
|
|
118
126
|
const diagnostics = violations.map((v) => ({
|
|
@@ -30,6 +30,12 @@ export declare function resolveCheckRules(args: Pick<CheckInput, "rules">): Set<
|
|
|
30
30
|
*/
|
|
31
31
|
export declare function readLegacyChecksHint(workspaceRoot: string): Promise<string | null>;
|
|
32
32
|
export declare function hasImpactOptions(args: CheckInput): boolean;
|
|
33
|
-
export declare function analyzeKbCheckImpact(workspaceRoot: string, args: CheckInput): ChangedFileImpactResult | undefined
|
|
33
|
+
export declare function analyzeKbCheckImpact(workspaceRoot: string, args: CheckInput): Promise<ChangedFileImpactResult | undefined>;
|
|
34
|
+
/**
|
|
35
|
+
* Advisory naming-style review for entity Markdown staged as new. Runs only
|
|
36
|
+
* for `staged: true`, the creation boundary where a purely numeric ID can
|
|
37
|
+
* still be renamed cheaply; committed legacy entities are never evaluated.
|
|
38
|
+
*/
|
|
39
|
+
export declare function stagedEntityIdStyleDiagnostics(workspaceRoot: string, args: Pick<CheckInput, "staged">): readonly QualityDiagnostic[];
|
|
34
40
|
export declare function qualityDiagnosticsFromImpact(impactResult: ChangedFileImpactResult | undefined): readonly QualityDiagnostic[];
|
|
35
41
|
//# sourceMappingURL=check-helpers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"check-helpers.d.ts","sourceRoot":"","sources":["../../../src/public/operations/check-helpers.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"check-helpers.d.ts","sourceRoot":"","sources":["../../../src/public/operations/check-helpers.ts"],"names":[],"mappings":"AA0BA,OAAO,EACL,UAAU,EACV,KAAK,SAAS,EACd,iBAAiB,EAGlB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,KAAK,uBAAuB,EAC5B,KAAK,iBAAiB,EAEvB,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEtD,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,CAAC;AAEzC;;;;;;;GAOG;AAEH,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,SAAS,SAAS,EAAE,GAAG;IACtE,UAAU,EAAE,SAAS,EAAE,CAAC;IACxB,kBAAkB,EAAE,iBAAiB,EAAE,CAAC;CACzC,CA0BA;AAQD,wBAAgB,gCAAgC,IAAI,SAAS,EAAE,CAU9D;AAED;;;;;;GAMG;AAEH,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,IAAI,CAAC,UAAU,EAAE,OAAO,CAAC,GAC9B,GAAG,CAAC,MAAM,CAAC,CAQb;AAED;;;;GAIG;AAEH,wBAAsB,oBAAoB,CACxC,aAAa,EAAE,MAAM,GACpB,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAQxB;AAGD,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAO1D;AAGD,wBAAsB,oBAAoB,CACxC,aAAa,EAAE,MAAM,EACrB,IAAI,EAAE,UAAU,GACf,OAAO,CAAC,uBAAuB,GAAG,SAAS,CAAC,CAoB9C;AAED;;;;GAIG;AAEH,wBAAgB,8BAA8B,CAC5C,aAAa,EAAE,MAAM,EACrB,IAAI,EAAE,IAAI,CAAC,UAAU,EAAE,QAAQ,CAAC,GAC/B,SAAS,iBAAiB,EAAE,CAY9B;AAGD,wBAAgB,4BAA4B,CAC1C,YAAY,EAAE,uBAAuB,GAAG,SAAS,GAChD,SAAS,iBAAiB,EAAE,CAK9B"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { execSync } from "node:child_process";
|
|
1
2
|
import { readFileSync } from "node:fs";
|
|
2
3
|
import { readFile } from "node:fs/promises";
|
|
3
4
|
import path from "node:path";
|
|
@@ -20,6 +21,8 @@ import path from "node:path";
|
|
|
20
21
|
*/
|
|
21
22
|
import { getKbPlPathOverride } from "../../env.js";
|
|
22
23
|
import { resolveKbPlPath } from "../../prolog.js";
|
|
24
|
+
import { getStagedFiles } from "../../traceability/git-staged.js";
|
|
25
|
+
import { createStagedEntityIdStyleDiagnostics } from "../../traceability/staged-entity-id-style.js";
|
|
23
26
|
import { analyzePrologQueryPlanSafety } from "../../utils/prolog-query-plan-safety.js";
|
|
24
27
|
import { RULE_NAMES, getEffectiveRules, getRuleDefinition, getRuleEnforcementClass, } from "../../utils/rule-registry.js";
|
|
25
28
|
import { analyzeChangedFileImpact, } from "../impact-diagnostics.js";
|
|
@@ -45,7 +48,7 @@ export function partitionCheckFindings(findings) {
|
|
|
45
48
|
const definition = getRuleDefinition(finding.rule);
|
|
46
49
|
qualityDiagnostics.push({
|
|
47
50
|
id: `rule.${finding.rule}`,
|
|
48
|
-
severity: "warning",
|
|
51
|
+
severity: definition?.diagnosticSeverity ?? "warning",
|
|
49
52
|
blocking: false,
|
|
50
53
|
category: definition?.category ?? "integrity",
|
|
51
54
|
...(finding.entityId !== undefined ? { entityId: finding.entityId } : {}),
|
|
@@ -114,7 +117,7 @@ export function hasImpactOptions(args) {
|
|
|
114
117
|
(args.sourceFiles !== undefined && args.sourceFiles.length > 0));
|
|
115
118
|
}
|
|
116
119
|
// implements REQ-mcp-tool-check
|
|
117
|
-
export function analyzeKbCheckImpact(workspaceRoot, args) {
|
|
120
|
+
export async function analyzeKbCheckImpact(workspaceRoot, args) {
|
|
118
121
|
if (!hasImpactOptions(args)) {
|
|
119
122
|
return undefined;
|
|
120
123
|
}
|
|
@@ -135,6 +138,23 @@ export function analyzeKbCheckImpact(workspaceRoot, args) {
|
|
|
135
138
|
: {}),
|
|
136
139
|
});
|
|
137
140
|
}
|
|
141
|
+
/**
|
|
142
|
+
* Advisory naming-style review for entity Markdown staged as new. Runs only
|
|
143
|
+
* for `staged: true`, the creation boundary where a purely numeric ID can
|
|
144
|
+
* still be renamed cheaply; committed legacy entities are never evaluated.
|
|
145
|
+
*/
|
|
146
|
+
// implements REQ-kibi-entity-id-style
|
|
147
|
+
export function stagedEntityIdStyleDiagnostics(workspaceRoot, args) {
|
|
148
|
+
if (args.staged !== true)
|
|
149
|
+
return [];
|
|
150
|
+
try {
|
|
151
|
+
return createStagedEntityIdStyleDiagnostics(getStagedFiles((command, options) => execSync(command, { ...options, cwd: workspaceRoot })));
|
|
152
|
+
}
|
|
153
|
+
catch {
|
|
154
|
+
// Outside a Git work tree there is no staged creation boundary.
|
|
155
|
+
return [];
|
|
156
|
+
}
|
|
157
|
+
}
|
|
138
158
|
// implements REQ-mcp-tool-check
|
|
139
159
|
export function qualityDiagnosticsFromImpact(impactResult) {
|
|
140
160
|
if (impactResult === undefined)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contracts.d.ts","sourceRoot":"","sources":["../../../src/public/operations/contracts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EACf,0BAA0B,EAC1B,aAAa,EACd,MAAM,YAAY,CAAC;AAEpB,oEAAoE;AACpE,MAAM,MAAM,mBAAmB,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"contracts.d.ts","sourceRoot":"","sources":["../../../src/public/operations/contracts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EACf,0BAA0B,EAC1B,aAAa,EACd,MAAM,YAAY,CAAC;AAEpB,oEAAoE;AACpE,MAAM,MAAM,mBAAmB,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;AAwDpE;;uEAEuE;AACvE,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,mBAAmB,GAC1B,mBAAmB,CAMrB;AAED;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAC3C,MAAM,CAAC,aAAa,EAAE,mBAAmB,CAAC,CAyQ3C,CAAC;AAgDF,wBAAgB,uBAAuB,CACrC,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,SAAS;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,EAAE,EAClD,YAAY,EAAE,MAAM,GACnB,IAAI,CAIN;AAED,wBAAgB,eAAe,CAC7B,SAAS,EAAE,aAAa,EACxB,OAAO,EAAE,SAAS,eAAe,EAAE,GAClC,SAAS,0BAA0B,EAAE,CAoBvC"}
|
|
@@ -19,6 +19,21 @@ function objectData(properties, required = []) {
|
|
|
19
19
|
properties,
|
|
20
20
|
};
|
|
21
21
|
}
|
|
22
|
+
/**
|
|
23
|
+
* kibi.job.v1 receipt returned by async-mode operations (kb_check with
|
|
24
|
+
* `async: true`) instead of the synchronous payload. Agents poll
|
|
25
|
+
* kb_job_status with the jobId. Declared as a union member of the operation
|
|
26
|
+
* data contract so hosts validating tool output against the declared schema
|
|
27
|
+
* accept the receipt without weakening the synchronous payload contract.
|
|
28
|
+
*/
|
|
29
|
+
const jobReceiptData = objectData({
|
|
30
|
+
kibiProtocol: { const: 1 },
|
|
31
|
+
jobVersion: { const: "kibi.job.v1" },
|
|
32
|
+
jobId: { type: "string" },
|
|
33
|
+
tool: { type: "string" },
|
|
34
|
+
status: { type: "string" },
|
|
35
|
+
pollWith: { const: "kb_job_status" },
|
|
36
|
+
}, ["kibiProtocol", "jobVersion", "jobId", "tool", "status", "pollWith"]);
|
|
22
37
|
const stringValue = { type: "string" };
|
|
23
38
|
const integerValue = { type: "integer" };
|
|
24
39
|
const numberValue = { type: "number" };
|
|
@@ -112,6 +127,7 @@ export const OPERATION_DATA_SCHEMAS = {
|
|
|
112
127
|
kb_semantic_advisor: objectData({
|
|
113
128
|
receipt: recordValue,
|
|
114
129
|
warnings: stringArray,
|
|
130
|
+
capabilityPlugins: recordValue,
|
|
115
131
|
}),
|
|
116
132
|
kb_model_requirement: objectData({
|
|
117
133
|
statement: stringValue,
|
|
@@ -129,6 +145,21 @@ export const OPERATION_DATA_SCHEMAS = {
|
|
|
129
145
|
warnings: recordArray,
|
|
130
146
|
migrationWarning: { type: ["string", "null"] },
|
|
131
147
|
logic: recordValue,
|
|
148
|
+
vocabularyAlignment: objectData({
|
|
149
|
+
subject: recordValue,
|
|
150
|
+
redundancyCandidates: recordArray,
|
|
151
|
+
reviewPlan: recordArray,
|
|
152
|
+
stamps: recordArray,
|
|
153
|
+
fallbackUsed: booleanValue,
|
|
154
|
+
diagnostics: recordArray,
|
|
155
|
+
}, [
|
|
156
|
+
"subject",
|
|
157
|
+
"redundancyCandidates",
|
|
158
|
+
"reviewPlan",
|
|
159
|
+
"stamps",
|
|
160
|
+
"fallbackUsed",
|
|
161
|
+
"diagnostics",
|
|
162
|
+
]),
|
|
132
163
|
}),
|
|
133
164
|
kb_suggest_predicates: objectData({
|
|
134
165
|
text: stringValue,
|
|
@@ -210,22 +241,29 @@ export const OPERATION_DATA_SCHEMAS = {
|
|
|
210
241
|
sourceWrites: recordArray,
|
|
211
242
|
deletionPlan: recordValue,
|
|
212
243
|
supersessionPlan: recordValue,
|
|
244
|
+
skippedEffects: stringArray,
|
|
213
245
|
status: stringValue,
|
|
214
246
|
effectFailures: recordArray,
|
|
215
247
|
nextActions: recordArray,
|
|
216
248
|
}),
|
|
217
|
-
kb_check:
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
249
|
+
kb_check: {
|
|
250
|
+
description: "Synchronous check payload, or a kibi.job.v1 receipt when async:true detached the check into a background job (poll kb_job_status with the jobId).",
|
|
251
|
+
anyOf: [
|
|
252
|
+
objectData({
|
|
253
|
+
violations: valueArray,
|
|
254
|
+
count: integerValue,
|
|
255
|
+
diagnostics: recordArray,
|
|
256
|
+
qualityDiagnostics: recordArray,
|
|
257
|
+
impactDiagnostics: recordArray,
|
|
258
|
+
sourceFiles: stringArray,
|
|
259
|
+
extractedSymbols: recordArray,
|
|
260
|
+
linkedEntities: recordArray,
|
|
261
|
+
nextActions: valueArray,
|
|
262
|
+
migrationPlan: recordValue,
|
|
263
|
+
}),
|
|
264
|
+
jobReceiptData,
|
|
265
|
+
],
|
|
266
|
+
},
|
|
229
267
|
kb_compile_intent: objectData({
|
|
230
268
|
version: stringValue,
|
|
231
269
|
planHash: stringValue,
|
|
@@ -239,6 +277,7 @@ export const OPERATION_DATA_SCHEMAS = {
|
|
|
239
277
|
steps: valueArray,
|
|
240
278
|
sourceWrites: recordArray,
|
|
241
279
|
diagnostics: stringArray,
|
|
280
|
+
capabilityPlugins: recordValue,
|
|
242
281
|
}),
|
|
243
282
|
kb_apply_plan: objectData({
|
|
244
283
|
version: stringValue,
|