kibi-cli 2.1.0 → 2.3.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-operation-loader.d.ts.map +1 -1
- package/dist/cli-operation-loader.js +3 -0
- package/dist/cli-operation-metadata.d.ts +4 -0
- package/dist/cli-operation-metadata.d.ts.map +1 -1
- package/dist/cli-operation-metadata.js +5 -0
- package/dist/cli-protocol.d.ts.map +1 -1
- package/dist/cli-protocol.js +3 -2
- package/dist/cli-register-reporting.d.ts.map +1 -1
- package/dist/cli-register-reporting.js +4 -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-diff.d.ts +5 -0
- package/dist/commands/check-diff.d.ts.map +1 -0
- package/dist/commands/check-diff.js +62 -0
- package/dist/commands/check-generated.d.ts.map +1 -1
- package/dist/commands/check-generated.js +41 -18
- package/dist/commands/check.d.ts.map +1 -1
- package/dist/commands/check.js +231 -86
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +168 -53
- 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 +10 -3
- 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 +123 -23
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +110 -15
- package/dist/commands/prove.d.ts.map +1 -1
- package/dist/commands/prove.js +10 -18
- 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.map +1 -1
- package/dist/commands/sync/manifest.js +3 -1
- package/dist/commands/sync/persistence.d.ts.map +1 -1
- package/dist/commands/sync/persistence.js +8 -0
- package/dist/commands/sync.d.ts.map +1 -1
- package/dist/commands/sync.js +11 -3
- package/dist/engine.d.ts +41 -1
- package/dist/engine.d.ts.map +1 -1
- package/dist/engine.js +377 -80
- package/dist/extractors/manifest.d.ts.map +1 -1
- package/dist/extractors/manifest.js +66 -28
- package/dist/extractors/markdown.d.ts +2 -0
- package/dist/extractors/markdown.d.ts.map +1 -1
- package/dist/extractors/markdown.js +14 -3
- package/dist/extractors/relationships.d.ts.map +1 -1
- package/dist/extractors/relationships.js +1 -0
- package/dist/extractors/symbols-coordinator.d.ts +7 -0
- package/dist/extractors/symbols-coordinator.d.ts.map +1 -1
- package/dist/extractors/symbols-coordinator.js +75 -39
- package/dist/intent-search.d.ts.map +1 -1
- package/dist/intent-search.js +68 -29
- 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 +176 -10
- 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-inference-1.js +1 -1
- 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/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 +213 -52
- package/dist/operations/mutation/strict-fact.d.ts.map +1 -1
- package/dist/operations/mutation/strict-fact.js +5 -0
- 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 +77 -11
- 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 +66 -26
- package/dist/operations/planning/compile-intent.d.ts.map +1 -1
- package/dist/operations/planning/compile-intent.js +3 -1
- 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/ingest-proof.d.ts +4 -2
- package/dist/operations/proof/ingest-proof.d.ts.map +1 -1
- package/dist/operations/proof/ingest-proof.js +208 -74
- package/dist/operations/proof/migrate-legacy-receipts.d.ts.map +1 -1
- package/dist/operations/proof/migrate-legacy-receipts.js +7 -5
- package/dist/operations/proof/prune-receipts.d.ts.map +1 -1
- package/dist/operations/proof/prune-receipts.js +7 -5
- package/dist/operations/semantic-advisor/analysis-receipt.d.ts.map +1 -1
- package/dist/operations/semantic-advisor/analysis-receipt.js +7 -1
- package/dist/operations/semantic-advisor/analyze-prose.d.ts.map +1 -1
- package/dist/operations/semantic-advisor/analyze-prose.js +26 -4
- package/dist/operations/semantic-advisor/clauses.d.ts +1 -0
- package/dist/operations/semantic-advisor/clauses.d.ts.map +1 -1
- package/dist/operations/semantic-advisor/clauses.js +7 -1
- package/dist/performance-trace.d.ts +17 -0
- package/dist/performance-trace.d.ts.map +1 -0
- package/dist/performance-trace.js +134 -0
- package/dist/plugins/approved-source-analyzers.d.ts +13 -0
- package/dist/plugins/approved-source-analyzers.d.ts.map +1 -0
- package/dist/plugins/approved-source-analyzers.generated.d.ts +71 -0
- package/dist/plugins/approved-source-analyzers.generated.d.ts.map +1 -0
- package/dist/plugins/approved-source-analyzers.generated.js +77 -0
- package/dist/plugins/approved-source-analyzers.js +3 -0
- package/dist/plugins/compose-semantic-classifier.d.ts +6 -1
- package/dist/plugins/compose-semantic-classifier.d.ts.map +1 -1
- package/dist/plugins/compose-semantic-classifier.js +8 -3
- 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 +7 -0
- package/dist/plugins/external-allowlist.d.ts.map +1 -1
- package/dist/plugins/external-allowlist.js +13 -0
- package/dist/plugins/index.d.ts +2 -0
- package/dist/plugins/index.d.ts.map +1 -1
- package/dist/plugins/index.js +4 -0
- package/dist/plugins/maintenance-source-analysis.d.ts +14 -0
- package/dist/plugins/maintenance-source-analysis.d.ts.map +1 -0
- package/dist/plugins/maintenance-source-analysis.js +191 -0
- package/dist/plugins/registry.d.ts +3 -1
- package/dist/plugins/registry.d.ts.map +1 -1
- package/dist/plugins/registry.js +27 -1
- package/dist/plugins/source-analysis-service.d.ts +36 -1
- package/dist/plugins/source-analysis-service.d.ts.map +1 -1
- package/dist/plugins/source-analysis-service.js +184 -27
- package/dist/plugins/source-change-analysis.d.ts +15 -0
- package/dist/plugins/source-change-analysis.d.ts.map +1 -0
- package/dist/plugins/source-change-analysis.js +54 -0
- package/dist/plugins/source-classification.d.ts +41 -0
- package/dist/plugins/source-classification.d.ts.map +1 -0
- package/dist/plugins/source-classification.js +490 -0
- package/dist/prolog/codec.d.ts.map +1 -1
- package/dist/prolog/codec.js +2 -0
- package/dist/prolog/swipl-resolver.d.ts +88 -0
- package/dist/prolog/swipl-resolver.d.ts.map +1 -0
- package/dist/prolog/swipl-resolver.js +446 -0
- package/dist/prolog.d.ts +51 -1
- package/dist/prolog.d.ts.map +1 -1
- package/dist/prolog.js +145 -15
- package/dist/public/diagnostic-usage.d.ts.map +1 -1
- package/dist/public/diagnostic-usage.js +7 -25
- package/dist/public/impact/analyzer.d.ts.map +1 -1
- package/dist/public/impact/analyzer.js +56 -5
- package/dist/public/impact/diagnostics.d.ts.map +1 -1
- package/dist/public/impact/diagnostics.js +3 -1
- 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/impact/manifest.d.ts.map +1 -1
- package/dist/public/impact/manifest.js +15 -1
- package/dist/public/impact/source-changes.d.ts.map +1 -1
- package/dist/public/impact/source-changes.js +35 -27
- package/dist/public/impact/types.d.ts +2 -0
- package/dist/public/impact/types.d.ts.map +1 -1
- package/dist/public/operations/catalog.d.ts +80 -7
- package/dist/public/operations/catalog.d.ts.map +1 -1
- package/dist/public/operations/catalog.js +2 -0
- package/dist/public/operations/check-executor.d.ts.map +1 -1
- package/dist/public/operations/check-executor.js +10 -2
- package/dist/public/operations/check-helpers.d.ts +6 -0
- package/dist/public/operations/check-helpers.d.ts.map +1 -1
- package/dist/public/operations/check-helpers.js +21 -1
- package/dist/public/operations/contracts.d.ts.map +1 -1
- package/dist/public/operations/contracts.js +325 -8
- package/dist/public/operations/discovery-entities.d.ts +42 -2
- package/dist/public/operations/discovery-entities.d.ts.map +1 -1
- package/dist/public/operations/discovery-entities.js +195 -22
- 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 +75 -46
- package/dist/public/operations/impact-review-preparation.d.ts +14 -0
- package/dist/public/operations/impact-review-preparation.d.ts.map +1 -0
- package/dist/public/operations/impact-review-preparation.js +379 -0
- package/dist/public/operations/index.d.ts +2 -0
- package/dist/public/operations/index.d.ts.map +1 -1
- package/dist/public/operations/index.js +2 -0
- 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/node-ports.d.ts.map +1 -1
- package/dist/public/operations/node-ports.js +1 -35
- 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.map +1 -1
- package/dist/public/operations/prolog-json.js +9 -3
- package/dist/public/operations/proof-receipt-projection.d.ts +5 -0
- package/dist/public/operations/proof-receipt-projection.d.ts.map +1 -0
- package/dist/public/operations/proof-receipt-projection.js +36 -0
- 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 +1 -1
- 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 +8 -1
- package/dist/public/operations/specs/check.d.ts +1 -1
- package/dist/public/operations/specs/discovery.d.ts +7 -1
- package/dist/public/operations/specs/discovery.d.ts.map +1 -1
- package/dist/public/operations/specs/discovery.js +7 -1
- package/dist/public/operations/specs/impact-review-preparation.d.ts +47 -0
- package/dist/public/operations/specs/impact-review-preparation.d.ts.map +1 -0
- package/dist/public/operations/specs/impact-review-preparation.js +43 -0
- 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/reporting.d.ts +8 -0
- package/dist/public/operations/specs/reporting.d.ts.map +1 -1
- package/dist/public/operations/specs/reporting.js +46 -15
- 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 +8 -3
- package/dist/public/operations/types.d.ts +1 -1
- package/dist/public/operations/types.d.ts.map +1 -1
- 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 +7 -3
- package/dist/public/skills/kibi-usage/resources/fact-lanes.md +4 -0
- package/dist/public/skills/kibi-usage/resources/operation-access.md +1 -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/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/schemas/entity.schema.json +32 -0
- package/dist/traceability/analysis-gate.d.ts +39 -0
- package/dist/traceability/analysis-gate.d.ts.map +1 -0
- package/dist/traceability/analysis-gate.js +51 -0
- package/dist/traceability/git-change-snapshot.d.ts +27 -0
- package/dist/traceability/git-change-snapshot.d.ts.map +1 -0
- package/dist/traceability/git-change-snapshot.js +411 -0
- package/dist/traceability/git-staged.d.ts +5 -1
- package/dist/traceability/git-staged.d.ts.map +1 -1
- package/dist/traceability/git-staged.js +16 -11
- package/dist/traceability/impact-evaluator.d.ts +54 -0
- package/dist/traceability/impact-evaluator.d.ts.map +1 -0
- package/dist/traceability/impact-evaluator.js +270 -0
- package/dist/traceability/impact-git-tree.d.ts +12 -0
- package/dist/traceability/impact-git-tree.d.ts.map +1 -0
- package/dist/traceability/impact-git-tree.js +46 -0
- package/dist/traceability/impact-knowledge.d.ts +16 -0
- package/dist/traceability/impact-knowledge.d.ts.map +1 -0
- package/dist/traceability/impact-knowledge.js +165 -0
- package/dist/traceability/impact-policy.d.ts +15 -0
- package/dist/traceability/impact-policy.d.ts.map +1 -0
- package/dist/traceability/impact-policy.js +48 -0
- package/dist/traceability/impact-policy.v1.schema.json +48 -0
- package/dist/traceability/impact-pr-diff.d.ts +5 -0
- package/dist/traceability/impact-pr-diff.d.ts.map +1 -0
- package/dist/traceability/impact-pr-diff.js +83 -0
- package/dist/traceability/impact-record-validation.d.ts +9 -0
- package/dist/traceability/impact-record-validation.d.ts.map +1 -0
- package/dist/traceability/impact-record-validation.js +113 -0
- package/dist/traceability/impact-review.d.ts +148 -0
- package/dist/traceability/impact-review.d.ts.map +1 -0
- package/dist/traceability/impact-review.js +494 -0
- package/dist/traceability/impact-review.schema.json +365 -0
- package/dist/traceability/impact-side-evidence.d.ts +13 -0
- package/dist/traceability/impact-side-evidence.d.ts.map +1 -0
- package/dist/traceability/impact-side-evidence.js +240 -0
- package/dist/traceability/reviewed-coordinate-refresh.d.ts +10 -0
- package/dist/traceability/reviewed-coordinate-refresh.d.ts.map +1 -0
- package/dist/traceability/reviewed-coordinate-refresh.js +49 -0
- package/dist/traceability/snapshot-knowledge.d.ts +4 -0
- package/dist/traceability/snapshot-knowledge.d.ts.map +1 -0
- package/dist/traceability/snapshot-knowledge.js +98 -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/staged-file-coverage.d.ts +23 -0
- package/dist/traceability/staged-file-coverage.d.ts.map +1 -1
- package/dist/traceability/staged-impact-contract.d.ts.map +1 -1
- package/dist/traceability/staged-impact-contract.js +2 -16
- package/dist/traceability/staged-symbols-manifest.d.ts +4 -0
- package/dist/traceability/staged-symbols-manifest.d.ts.map +1 -1
- package/dist/traceability/staged-symbols-manifest.js +17 -6
- package/dist/traceability/symbol-extract.d.ts +3 -5
- package/dist/traceability/symbol-extract.d.ts.map +1 -1
- package/dist/traceability/symbol-extract.js +49 -34
- package/dist/traceability/temp-kb.d.ts +1 -1
- package/dist/traceability/temp-kb.d.ts.map +1 -1
- package/dist/traceability/temp-kb.js +57 -13
- package/dist/traceability/trusted-pr-event.d.ts +13 -0
- package/dist/traceability/trusted-pr-event.d.ts.map +1 -0
- package/dist/traceability/trusted-pr-event.js +105 -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/canonical-path.d.ts +3 -0
- package/dist/utils/canonical-path.d.ts.map +1 -0
- package/dist/utils/canonical-path.js +33 -0
- 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 +37 -0
- package/dist/utils/rule-registry.generated.d.ts.map +1 -1
- package/dist/utils/rule-registry.generated.js +44 -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 -5
- 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/impact/analyzer.ts +88 -5
- package/src/public/impact/diagnostics.ts +7 -5
- package/src/public/impact/full-kb-quality.ts +4 -16
- package/src/public/impact/manifest.ts +14 -1
- package/src/public/impact/source-changes.ts +39 -34
- package/src/public/impact/types.ts +5 -0
- package/src/public/operations/catalog.ts +2 -0
- package/src/public/operations/check-executor.ts +12 -1
- package/src/public/operations/check-helpers.ts +27 -1
- package/src/public/operations/contracts.ts +404 -9
- package/src/public/operations/discovery-entities.ts +292 -23
- package/src/public/operations/discovery-executors.ts +91 -55
- package/src/public/operations/impact-review-preparation.ts +548 -0
- package/src/public/operations/index.ts +2 -0
- package/src/public/operations/migration-plan.ts +57 -0
- package/src/public/operations/node-ports.ts +1 -39
- package/src/public/operations/predicate-schema-conformance.ts +362 -0
- package/src/public/operations/prolog-json.ts +9 -3
- package/src/public/operations/proof-receipt-projection.ts +39 -0
- package/src/public/operations/result-envelope.ts +114 -2
- package/src/public/operations/runtime-types.ts +1 -1
- package/src/public/operations/specs/check-rules.generated.ts +8 -1
- package/src/public/operations/specs/discovery.ts +8 -1
- package/src/public/operations/specs/impact-review-preparation.ts +46 -0
- package/src/public/operations/specs/mutation-schemas.ts +23 -3
- package/src/public/operations/specs/reporting.ts +69 -22
- package/src/public/operations/specs/upsert.ts +1 -1
- package/src/public/operations/symbol-repair-plan.ts +13 -3
- package/src/public/operations/types.ts +1 -0
- package/src/public/schemas/entity.ts +22 -0
- package/src/public/schemas/relationship.ts +1 -0
- package/src/public/skills/kibi-usage/SKILL.md +7 -3
- package/src/public/skills/kibi-usage/resources/fact-lanes.md +4 -0
- package/src/public/skills/kibi-usage/resources/operation-access.md +1 -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/telemetry-acceptance.ts +37 -6
- package/src/schemas/entity.schema.json +32 -0
- package/src/schemas/relationship.schema.json +1 -0
- package/src/traceability/impact-policy.v1.schema.json +48 -0
- package/src/traceability/impact-review.schema.json +365 -0
- package/templates/github/kibi-badge.yml +0 -4
- package/templates/github/kibi-report.yml +0 -4
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Kibi — repo-local, per-branch, queryable long-term memory for software projects
|
|
3
|
+
Copyright (C) 2026 Piotr Franczyk
|
|
4
|
+
|
|
5
|
+
This program is free software: you can redistribute it and/or modify
|
|
6
|
+
it under the terms of the GNU Affero General Public License as published by
|
|
7
|
+
the Free Software Foundation, either version 3 of the License, or
|
|
8
|
+
(at your option) any later version.
|
|
9
|
+
|
|
10
|
+
This program is distributed in the hope that it will be useful,
|
|
11
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
GNU Affero General Public License for more details.
|
|
14
|
+
|
|
15
|
+
You should have received a copy of the GNU Affero General Public License
|
|
16
|
+
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
17
|
+
*/
|
|
18
|
+
import { BUILT_IN_PREDICATE_SCHEMAS } from "../../operations/modeling/predicate-catalog.js";
|
|
19
|
+
import { applyArgumentRewrites, predicateArgumentConformance, predicateCanonicalKey, predicateVocabularyErrors, predicateVocabularyFromEntity, } from "../../operations/modeling/predicate-vocabulary.js";
|
|
20
|
+
import entitySchema from "../schemas/entity.js";
|
|
21
|
+
import { loadEntitiesPaged } from "./discovery-entities.js";
|
|
22
|
+
const RULE = "predicate-schema-conformance";
|
|
23
|
+
/** Every property the public entity schema accepts. */
|
|
24
|
+
const AUTHORED_FIELDS = new Set(Object.keys(entitySchema.properties));
|
|
25
|
+
const DEFAULT_NAMESPACE = "default";
|
|
26
|
+
/** Fields that belong to the compiled entity, not to an authored upsert. */
|
|
27
|
+
const NON_AUTHORED_FIELDS = new Set([
|
|
28
|
+
"id",
|
|
29
|
+
"type",
|
|
30
|
+
"source",
|
|
31
|
+
"sourceFile",
|
|
32
|
+
"created_at",
|
|
33
|
+
"updated_at",
|
|
34
|
+
"links",
|
|
35
|
+
"relationships",
|
|
36
|
+
]);
|
|
37
|
+
function text(value) {
|
|
38
|
+
return typeof value === "string" && value.trim() !== ""
|
|
39
|
+
? value.trim()
|
|
40
|
+
: undefined;
|
|
41
|
+
}
|
|
42
|
+
function strings(value) {
|
|
43
|
+
return Array.isArray(value)
|
|
44
|
+
? value.filter((item) => typeof item === "string")
|
|
45
|
+
: [];
|
|
46
|
+
}
|
|
47
|
+
function sourceField(entity) {
|
|
48
|
+
const source = text(entity.source);
|
|
49
|
+
return source !== undefined ? { source } : {};
|
|
50
|
+
}
|
|
51
|
+
function namespaceOf(entity) {
|
|
52
|
+
return text(entity.predicate_namespace) ?? DEFAULT_NAMESPACE;
|
|
53
|
+
}
|
|
54
|
+
function signature(namespace, name, arity) {
|
|
55
|
+
return `${namespace}:${name}/${arity}`;
|
|
56
|
+
}
|
|
57
|
+
function schemaRefs(facts) {
|
|
58
|
+
const byName = new Map();
|
|
59
|
+
const add = (name, ref) => {
|
|
60
|
+
byName.set(name, [...(byName.get(name) ?? []), ref]);
|
|
61
|
+
};
|
|
62
|
+
for (const entity of facts) {
|
|
63
|
+
if (entity.fact_kind !== "predicate_schema")
|
|
64
|
+
continue;
|
|
65
|
+
const name = text(entity.predicate_name);
|
|
66
|
+
if (name === undefined)
|
|
67
|
+
continue;
|
|
68
|
+
add(name, {
|
|
69
|
+
schemaId: String(entity.id),
|
|
70
|
+
namespace: namespaceOf(entity),
|
|
71
|
+
origin: "project_local",
|
|
72
|
+
argumentNames: strings(entity.argument_names),
|
|
73
|
+
entity,
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
// Built-in catalog schemas carry no namespace: facts that use them live in
|
|
77
|
+
// the default namespace. A project-local schema with the same signature wins.
|
|
78
|
+
for (const schema of BUILT_IN_PREDICATE_SCHEMAS) {
|
|
79
|
+
add(schema.predicate_name, {
|
|
80
|
+
schemaId: schema.id,
|
|
81
|
+
namespace: DEFAULT_NAMESPACE,
|
|
82
|
+
origin: "built_in",
|
|
83
|
+
argumentNames: schema.argument_names,
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
return byName;
|
|
87
|
+
}
|
|
88
|
+
function authoredProperties(entity) {
|
|
89
|
+
// Keep only fields an upsert accepts. Query rows also carry relationship
|
|
90
|
+
// projections (relates_to, validates, ...) as strings or lists, which must
|
|
91
|
+
// never be replayed as entity properties.
|
|
92
|
+
return Object.fromEntries(Object.entries(entity).filter(([key, value]) => AUTHORED_FIELDS.has(key) &&
|
|
93
|
+
!NON_AUTHORED_FIELDS.has(key) &&
|
|
94
|
+
value !== null &&
|
|
95
|
+
value !== undefined));
|
|
96
|
+
}
|
|
97
|
+
function repairFor(fact, name, args, targetNamespace, rewrites) {
|
|
98
|
+
const nextArgs = applyArgumentRewrites(args, rewrites);
|
|
99
|
+
const properties = authoredProperties(fact);
|
|
100
|
+
const previousKey = predicateCanonicalKey(name, args);
|
|
101
|
+
const nextKey = predicateCanonicalKey(name, nextArgs);
|
|
102
|
+
if (targetNamespace !== null)
|
|
103
|
+
properties.predicate_namespace = targetNamespace;
|
|
104
|
+
if (rewrites.length > 0) {
|
|
105
|
+
properties.predicate_args = nextArgs;
|
|
106
|
+
properties.canonical_key = nextKey;
|
|
107
|
+
if (properties.title === `Predicate: ${previousKey}`) {
|
|
108
|
+
properties.title = `Predicate: ${nextKey}`;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
return { type: "fact", id: String(fact.id), properties };
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Predicate facts must match a schema (project-local, or the built-in catalog
|
|
115
|
+
* in the default namespace) with the same namespace, name, and arity, and
|
|
116
|
+
* must use declared constants where the schema closes an argument.
|
|
117
|
+
*/
|
|
118
|
+
// implements REQ-kibi-predicate-schema-conformance
|
|
119
|
+
export function evaluatePredicateSchemaConformance(facts) {
|
|
120
|
+
const schemasByName = schemaRefs(facts);
|
|
121
|
+
const violations = [];
|
|
122
|
+
for (const schema of facts) {
|
|
123
|
+
if (schema.fact_kind !== "predicate_schema")
|
|
124
|
+
continue;
|
|
125
|
+
const errors = predicateVocabularyErrors(schema);
|
|
126
|
+
if (errors.length === 0)
|
|
127
|
+
continue;
|
|
128
|
+
violations.push({
|
|
129
|
+
rule: RULE,
|
|
130
|
+
entityId: String(schema.id),
|
|
131
|
+
description: `Predicate schema ${String(schema.id)} declares an invalid argument vocabulary: ${errors.join("; ")}`,
|
|
132
|
+
suggestion: "Key argument_constants and argument_aliases by argument_names, and map every alias to a declared constant.",
|
|
133
|
+
...sourceField(schema),
|
|
134
|
+
evidence: { schemaId: String(schema.id), errors },
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
for (const fact of facts) {
|
|
138
|
+
if (fact.fact_kind !== "predicate")
|
|
139
|
+
continue;
|
|
140
|
+
const name = text(fact.predicate_name);
|
|
141
|
+
const args = strings(fact.predicate_args);
|
|
142
|
+
if (name === undefined || args.length === 0)
|
|
143
|
+
continue;
|
|
144
|
+
const namespace = namespaceOf(fact);
|
|
145
|
+
const arity = args.length;
|
|
146
|
+
const sameShape = (schemasByName.get(name) ?? []).filter((ref) => ref.argumentNames.length === arity);
|
|
147
|
+
const exact = sameShape.find((ref) => ref.namespace === namespace && ref.origin === "project_local") ??
|
|
148
|
+
sameShape.find((ref) => ref.namespace === namespace && ref.origin === "built_in");
|
|
149
|
+
const candidates = [
|
|
150
|
+
...new Map(sameShape
|
|
151
|
+
.filter((ref) => ref.namespace !== namespace)
|
|
152
|
+
.map((ref) => [ref.namespace, ref])).values(),
|
|
153
|
+
];
|
|
154
|
+
const alignment = exact === undefined && candidates.length === 1
|
|
155
|
+
? candidates[0]
|
|
156
|
+
: undefined;
|
|
157
|
+
const schema = exact ?? alignment;
|
|
158
|
+
const conformance = schema?.entity !== undefined
|
|
159
|
+
? predicateArgumentConformance(schema.argumentNames, args, predicateVocabularyFromEntity(schema.entity))
|
|
160
|
+
: { rewrites: [], undeclared: [] };
|
|
161
|
+
if (exact !== undefined &&
|
|
162
|
+
conformance.rewrites.length === 0 &&
|
|
163
|
+
conformance.undeclared.length === 0) {
|
|
164
|
+
continue;
|
|
165
|
+
}
|
|
166
|
+
const issue = exact === undefined
|
|
167
|
+
? "missing_schema"
|
|
168
|
+
: conformance.undeclared.length > 0
|
|
169
|
+
? "undeclared_constant"
|
|
170
|
+
: "alias_in_use";
|
|
171
|
+
const mechanical = schema !== undefined && conformance.undeclared.length === 0;
|
|
172
|
+
const evidence = {
|
|
173
|
+
factId: String(fact.id),
|
|
174
|
+
predicateName: name,
|
|
175
|
+
namespace,
|
|
176
|
+
arity,
|
|
177
|
+
issue,
|
|
178
|
+
schemaId: exact?.schemaId ?? null,
|
|
179
|
+
alignment: alignment !== undefined
|
|
180
|
+
? {
|
|
181
|
+
namespace: alignment.namespace,
|
|
182
|
+
schemaId: alignment.schemaId,
|
|
183
|
+
origin: alignment.origin,
|
|
184
|
+
}
|
|
185
|
+
: null,
|
|
186
|
+
candidateNamespaces: candidates.map((ref) => ref.namespace).sort(),
|
|
187
|
+
rewrites: conformance.rewrites,
|
|
188
|
+
undeclared: conformance.undeclared,
|
|
189
|
+
repair: mechanical
|
|
190
|
+
? repairFor(fact, name, args, alignment?.namespace ?? null, conformance.rewrites)
|
|
191
|
+
: null,
|
|
192
|
+
};
|
|
193
|
+
violations.push({
|
|
194
|
+
rule: RULE,
|
|
195
|
+
entityId: String(fact.id),
|
|
196
|
+
description: conformanceDescription(evidence),
|
|
197
|
+
suggestion: conformanceSuggestion(evidence),
|
|
198
|
+
...sourceField(fact),
|
|
199
|
+
evidence,
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
return violations;
|
|
203
|
+
}
|
|
204
|
+
function conformanceDescription(evidence) {
|
|
205
|
+
const where = signature(evidence.namespace, evidence.predicateName, evidence.arity);
|
|
206
|
+
const parts = [];
|
|
207
|
+
if (evidence.issue === "missing_schema") {
|
|
208
|
+
parts.push(evidence.alignment !== null
|
|
209
|
+
? `Predicate fact ${evidence.factId} uses ${where}, but its schema ${evidence.alignment.schemaId} is in namespace ${evidence.alignment.namespace}`
|
|
210
|
+
: evidence.candidateNamespaces.length > 1
|
|
211
|
+
? `Predicate fact ${evidence.factId} uses ${where}; schemas with this signature exist in several namespaces (${evidence.candidateNamespaces.join(", ")})`
|
|
212
|
+
: `Predicate fact ${evidence.factId} uses ${where}, which has no predicate_schema`);
|
|
213
|
+
}
|
|
214
|
+
else {
|
|
215
|
+
parts.push(`Predicate fact ${evidence.factId} (${where})`);
|
|
216
|
+
}
|
|
217
|
+
for (const rewrite of evidence.rewrites) {
|
|
218
|
+
parts.push(`argument ${rewrite.argumentName} uses alias ${rewrite.from} for ${rewrite.to}`);
|
|
219
|
+
}
|
|
220
|
+
for (const value of evidence.undeclared) {
|
|
221
|
+
parts.push(`argument ${value.argumentName} value ${value.value} is not a declared constant (${value.allowed.join(", ")})`);
|
|
222
|
+
}
|
|
223
|
+
return parts.join("; ");
|
|
224
|
+
}
|
|
225
|
+
function conformanceSuggestion(evidence) {
|
|
226
|
+
if (evidence.repair !== null) {
|
|
227
|
+
return "Mechanical repair available: review and apply it with kibi migrate --apply-safe (or replay the kb_upsert in the migration action).";
|
|
228
|
+
}
|
|
229
|
+
if (evidence.undeclared.length > 0) {
|
|
230
|
+
return "Use a declared constant, add the value to argument_constants, or map it with argument_aliases so kibi migrate can rewrite it.";
|
|
231
|
+
}
|
|
232
|
+
if (evidence.candidateNamespaces.length > 1) {
|
|
233
|
+
return "Set predicate_namespace to the schema this claim belongs to.";
|
|
234
|
+
}
|
|
235
|
+
return "Declare a predicate_schema for this signature (kb_suggest_predicates helps pick an existing one) or move the claim to a schema that already exists.";
|
|
236
|
+
}
|
|
237
|
+
/** Load every fact once and evaluate predicate conformance. */
|
|
238
|
+
// implements REQ-kibi-predicate-schema-conformance
|
|
239
|
+
export async function collectPredicateSchemaConformanceViolations(prolog) {
|
|
240
|
+
const facts = await loadEntitiesPaged(prolog, "fact");
|
|
241
|
+
return evaluatePredicateSchemaConformance(facts);
|
|
242
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prolog-json.d.ts","sourceRoot":"","sources":["../../../src/public/operations/prolog-json.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAErD,MAAM,MAAM,sBAAsB,GAAG,OAAO,GAAG,OAAO,CAAC;AAEvD;;;;;GAKG;AACH,qBAAa,wBAAyB,SAAQ,KAAK;IACjD,QAAQ,CAAC,IAAI,gCAAgC;IAC7C,QAAQ,CAAC,KAAK,EAAE,sBAAsB,CAAC;IACvC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,gBAAgB,EAAE,SAAS,MAAM,EAAE,CAAC;gBAG3C,UAAU,EAAE,MAAM,EAClB,KAAK,EAAE,sBAAsB,EAC7B,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,OAAO;CAiBjB;AAUD,wBAAsB,qBAAqB,CAAC,CAAC,EAC3C,MAAM,EAAE,UAAU,EAClB,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,MAAM,EACZ,UAAU,EAAE,MAAM,EAClB,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"prolog-json.d.ts","sourceRoot":"","sources":["../../../src/public/operations/prolog-json.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAErD,MAAM,MAAM,sBAAsB,GAAG,OAAO,GAAG,OAAO,CAAC;AAEvD;;;;;GAKG;AACH,qBAAa,wBAAyB,SAAQ,KAAK;IACjD,QAAQ,CAAC,IAAI,gCAAgC;IAC7C,QAAQ,CAAC,KAAK,EAAE,sBAAsB,CAAC;IACvC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,gBAAgB,EAAE,SAAS,MAAM,EAAE,CAAC;gBAG3C,UAAU,EAAE,MAAM,EAClB,KAAK,EAAE,sBAAsB,EAC7B,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,OAAO;CAiBjB;AAUD,wBAAsB,qBAAqB,CAAC,CAAC,EAC3C,MAAM,EAAE,UAAU,EAClB,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,MAAM,EACZ,UAAU,EAAE,MAAM,EAClB,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,CAAC,CAAC,CAiEZ;AAkBD,wBAAgB,YAAY,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAInD;AAED,wBAAgB,YAAY,CAAC,MAAM,CAAC,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,CAI/D"}
|
|
@@ -34,10 +34,16 @@ export async function runOperationJsonQuery(prolog, fileName, goal, errorLabel,
|
|
|
34
34
|
const modulePath = escapeAtom(resolveCoreModulePath(fileName).replaceAll("\\", "/"));
|
|
35
35
|
// Loading a module and invoking its predicate in one interactive goal makes
|
|
36
36
|
// SWI reject `use_module/1` under the engine's guarded `once/1` wrapper, so
|
|
37
|
-
//
|
|
38
|
-
//
|
|
37
|
+
// an interactive port gets two serialized requests. That split is only
|
|
38
|
+
// sound when both requests reach the same live session: the engine daemon
|
|
39
|
+
// guarantees it by recycling a lost session with every loaded module
|
|
40
|
+
// restored, and a started PrologProcess fails loudly once its session is
|
|
41
|
+
// lost. Any port whose queries run in isolated processes (an unstarted or
|
|
42
|
+
// one-shot PrologProcess reports `oneShotMode`) must receive the combined
|
|
43
|
+
// goal, or the module load and the predicate call land in different SWI
|
|
44
|
+
// processes and the call fails with an existence error.
|
|
39
45
|
const longLivedEngine = typeof prolog.storageStatus === "function";
|
|
40
|
-
const oneShotMode = prolog.oneShotMode
|
|
46
|
+
const oneShotMode = prolog.oneShotMode ??
|
|
41
47
|
(!longLivedEngine &&
|
|
42
48
|
process.env.NODE_ENV === "test" &&
|
|
43
49
|
typeof globalThis.Bun !== "undefined");
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/** Remove only the top-level proof-receipt frontmatter block, byte-for-byte otherwise. */
|
|
2
|
+
export declare function withoutProofReceiptFrontmatter(content: string): string;
|
|
3
|
+
/** Match the workspace proof snapshot's markdown receipt projection exactly. */
|
|
4
|
+
export declare function snapshotFileContent(relativePath: string, content: Buffer): Buffer;
|
|
5
|
+
//# sourceMappingURL=proof-receipt-projection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"proof-receipt-projection.d.ts","sourceRoot":"","sources":["../../../src/public/operations/proof-receipt-projection.ts"],"names":[],"mappings":"AAAA,0FAA0F;AAC1F,wBAAgB,8BAA8B,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CA4BtE;AAED,gFAAgF;AAChF,wBAAgB,mBAAmB,CACjC,YAAY,EAAE,MAAM,EACpB,OAAO,EAAE,MAAM,GACd,MAAM,CAGR"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/** Remove only the top-level proof-receipt frontmatter block, byte-for-byte otherwise. */
|
|
2
|
+
export function withoutProofReceiptFrontmatter(content) {
|
|
3
|
+
const lines = content.match(/[^\n]*\n|[^\n]+$/g) ?? [];
|
|
4
|
+
if (lines[0]?.trim() !== "---")
|
|
5
|
+
return content;
|
|
6
|
+
let inFrontmatter = true;
|
|
7
|
+
let skippingReceipts = false;
|
|
8
|
+
const retained = [];
|
|
9
|
+
for (const [index, line] of lines.entries()) {
|
|
10
|
+
const trimmed = line.trim();
|
|
11
|
+
if (index > 0 && inFrontmatter && trimmed === "---") {
|
|
12
|
+
inFrontmatter = false;
|
|
13
|
+
skippingReceipts = false;
|
|
14
|
+
retained.push(line);
|
|
15
|
+
continue;
|
|
16
|
+
}
|
|
17
|
+
if (inFrontmatter && /^proof_receipts\s*:/.test(line)) {
|
|
18
|
+
skippingReceipts = true;
|
|
19
|
+
continue;
|
|
20
|
+
}
|
|
21
|
+
if (inFrontmatter &&
|
|
22
|
+
skippingReceipts &&
|
|
23
|
+
/^[A-Za-z_][A-Za-z0-9_-]*\s*:/.test(line)) {
|
|
24
|
+
skippingReceipts = false;
|
|
25
|
+
}
|
|
26
|
+
if (!skippingReceipts)
|
|
27
|
+
retained.push(line);
|
|
28
|
+
}
|
|
29
|
+
return retained.join("");
|
|
30
|
+
}
|
|
31
|
+
/** Match the workspace proof snapshot's markdown receipt projection exactly. */
|
|
32
|
+
export function snapshotFileContent(relativePath, content) {
|
|
33
|
+
if (!relativePath.endsWith(".md"))
|
|
34
|
+
return content;
|
|
35
|
+
return Buffer.from(withoutProofReceiptFrontmatter(content.toString("utf8")));
|
|
36
|
+
}
|
|
@@ -9,6 +9,39 @@ export declare function toKibiResult<T>(spec: {
|
|
|
9
9
|
readonly name: OperationName | string;
|
|
10
10
|
readonly effects: readonly OperationEffect[];
|
|
11
11
|
readonly resultVersion?: string;
|
|
12
|
-
}, data: T, options?: Partial<Pick<KibiResult<T>, "status" | "diagnostics" | "nextActions" | "error">>
|
|
12
|
+
}, data: T, options?: Partial<Pick<KibiResult<T>, "status" | "diagnostics" | "nextActions" | "error">> & {
|
|
13
|
+
/**
|
|
14
|
+
* False when the operation was rejected before it ran (invalid input),
|
|
15
|
+
* so an error envelope reports its effects as not applicable rather than
|
|
16
|
+
* failed.
|
|
17
|
+
*/
|
|
18
|
+
readonly attempted?: boolean;
|
|
19
|
+
}): KibiResult<T>;
|
|
13
20
|
export declare function operationData(value: unknown): unknown;
|
|
21
|
+
export interface NormalizedResultPayload {
|
|
22
|
+
/** The versioned KibiResult envelope, when the result carries one. */
|
|
23
|
+
readonly envelope?: Record<string, unknown>;
|
|
24
|
+
/** The operation payload that operation-specific telemetry fields read. */
|
|
25
|
+
readonly data?: Record<string, unknown>;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Resolve a tool result into its envelope and its operation payload.
|
|
29
|
+
*
|
|
30
|
+
* Callers hand results over in two shapes: MCP tool handlers pass the bare
|
|
31
|
+
* `toKibiResult` envelope, while some CLI and SDK routes wrap it as
|
|
32
|
+
* `{ structuredContent }`. Deriving telemetry from the wrong shape silently
|
|
33
|
+
* yields an absent payload, so both shapes resolve here instead of at each
|
|
34
|
+
* call site. An unresolvable payload stays `undefined` so callers can record
|
|
35
|
+
* the count as unknown rather than as zero.
|
|
36
|
+
*/
|
|
37
|
+
export declare function normalizeResultPayload(result: unknown): NormalizedResultPayload;
|
|
38
|
+
/**
|
|
39
|
+
* Record a count that could not be read as unknown rather than as zero.
|
|
40
|
+
*
|
|
41
|
+
* A missing payload and an empty result are different facts, and collapsing
|
|
42
|
+
* them hides retrieval failures behind a plausible "0 results" row. Both the
|
|
43
|
+
* MCP and CLI diagnostic loggers derive counts here so the two surfaces stay
|
|
44
|
+
* at parity.
|
|
45
|
+
*/
|
|
46
|
+
export declare function appendPayloadCountField(fields: Record<string, unknown>, countKey: string, noun: string, payload: Record<string, unknown> | undefined): void;
|
|
14
47
|
//# sourceMappingURL=result-envelope.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"result-envelope.d.ts","sourceRoot":"","sources":["../../../src/public/operations/result-envelope.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAE7E,eAAO,MAAM,qBAAqB,EAAG,CAAU,CAAC;AAoChD,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,eAAe,EACvB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC/B,UAAU,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,CAS/B;
|
|
1
|
+
{"version":3,"file":"result-envelope.d.ts","sourceRoot":"","sources":["../../../src/public/operations/result-envelope.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAE7E,eAAO,MAAM,qBAAqB,EAAG,CAAU,CAAC;AAoChD,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,eAAe,EACvB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC/B,UAAU,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,CAS/B;AAoFD,wBAAgB,aAAa,CAAC,IAAI,EAAE;IAClC,QAAQ,CAAC,IAAI,EAAE,aAAa,GAAG,MAAM,CAAC;IACtC,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;CACjC,GAAG,MAAM,CAET;AAED,wBAAgB,YAAY,CAAC,CAAC,EAC5B,IAAI,EAAE;IACJ,QAAQ,CAAC,IAAI,EAAE,aAAa,GAAG,MAAM,CAAC;IACtC,QAAQ,CAAC,OAAO,EAAE,SAAS,eAAe,EAAE,CAAC;IAC7C,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;CACjC,EACD,IAAI,EAAE,CAAC,EACP,OAAO,GAAE,OAAO,CACd,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,QAAQ,GAAG,aAAa,GAAG,aAAa,GAAG,OAAO,CAAC,CACxE,GAAG;IACF;;;;OAIG;IACH,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC;CACzB,GACL,UAAU,CAAC,CAAC,CAAC,CAsBf;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAKrD;AAGD,MAAM,WAAW,uBAAuB;IACtC,sEAAsE;IACtE,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC5C,2EAA2E;IAC3E,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACzC;AAED;;;;;;;;;GASG;AACH,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,OAAO,GACd,uBAAuB,CAYzB;AAaD;;;;;;;GAOG;AACH,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/B,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,GAC3C,IAAI,CAKN"}
|
|
@@ -41,13 +41,39 @@ export function failedEffectStatus(effect, failure) {
|
|
|
41
41
|
: {}),
|
|
42
42
|
};
|
|
43
43
|
}
|
|
44
|
-
function
|
|
44
|
+
function effectOutcome(status, options) {
|
|
45
|
+
if (status !== "error")
|
|
46
|
+
return { kind: "completed" };
|
|
47
|
+
if (options.attempted === false)
|
|
48
|
+
return { kind: "not_attempted" };
|
|
49
|
+
return options.error
|
|
50
|
+
? { kind: "failed", errorCode: options.error.code }
|
|
51
|
+
: { kind: "failed" };
|
|
52
|
+
}
|
|
53
|
+
function effectStatus(effect, data, outcome) {
|
|
45
54
|
const failures = data?.effectFailures;
|
|
46
55
|
if (Array.isArray(failures)) {
|
|
47
56
|
const failure = failures.find((entry) => record(entry) && entry.kind === effect);
|
|
48
57
|
if (record(failure))
|
|
49
58
|
return failedEffectStatus(effect, failure);
|
|
50
59
|
}
|
|
60
|
+
// A plan-only result declares the effects it left to a later call.
|
|
61
|
+
if (Array.isArray(data?.skippedEffects) &&
|
|
62
|
+
data.skippedEffects.includes(effect)) {
|
|
63
|
+
return { kind: effect, status: "not_applicable" };
|
|
64
|
+
}
|
|
65
|
+
// An error envelope must never claim a declared effect completed: the
|
|
66
|
+
// operation either never ran or stopped before reporting its effects.
|
|
67
|
+
if (outcome.kind === "not_attempted") {
|
|
68
|
+
return { kind: effect, status: "not_applicable" };
|
|
69
|
+
}
|
|
70
|
+
if (outcome.kind === "failed") {
|
|
71
|
+
return {
|
|
72
|
+
kind: effect,
|
|
73
|
+
status: "failed",
|
|
74
|
+
...(outcome.errorCode ? { errorCode: outcome.errorCode } : {}),
|
|
75
|
+
};
|
|
76
|
+
}
|
|
51
77
|
return { kind: effect, status: "completed" };
|
|
52
78
|
}
|
|
53
79
|
function extraFailedEffects(declared, data) {
|
|
@@ -83,6 +109,7 @@ export function toKibiResult(spec, data, options = {}) {
|
|
|
83
109
|
(row?.status === "committed_with_repairs"
|
|
84
110
|
? "committed_with_repairs"
|
|
85
111
|
: "success");
|
|
112
|
+
const outcome = effectOutcome(status, options);
|
|
86
113
|
return {
|
|
87
114
|
kibiProtocol: KIBI_PROTOCOL_VERSION,
|
|
88
115
|
operation: spec.name,
|
|
@@ -90,7 +117,7 @@ export function toKibiResult(spec, data, options = {}) {
|
|
|
90
117
|
status,
|
|
91
118
|
data,
|
|
92
119
|
effects: [
|
|
93
|
-
...spec.effects.map((effect) => effectStatus(effect, row)),
|
|
120
|
+
...spec.effects.map((effect) => effectStatus(effect, row, outcome)),
|
|
94
121
|
...extraFailedEffects(spec.effects, row),
|
|
95
122
|
],
|
|
96
123
|
diagnostics: options.diagnostics ?? diagnostics(row?.diagnostics),
|
|
@@ -104,3 +131,52 @@ export function operationData(value) {
|
|
|
104
131
|
}
|
|
105
132
|
return value;
|
|
106
133
|
}
|
|
134
|
+
/**
|
|
135
|
+
* Resolve a tool result into its envelope and its operation payload.
|
|
136
|
+
*
|
|
137
|
+
* Callers hand results over in two shapes: MCP tool handlers pass the bare
|
|
138
|
+
* `toKibiResult` envelope, while some CLI and SDK routes wrap it as
|
|
139
|
+
* `{ structuredContent }`. Deriving telemetry from the wrong shape silently
|
|
140
|
+
* yields an absent payload, so both shapes resolve here instead of at each
|
|
141
|
+
* call site. An unresolvable payload stays `undefined` so callers can record
|
|
142
|
+
* the count as unknown rather than as zero.
|
|
143
|
+
*/
|
|
144
|
+
export function normalizeResultPayload(result) {
|
|
145
|
+
if (!record(result))
|
|
146
|
+
return {};
|
|
147
|
+
const candidate = record(result.structuredContent)
|
|
148
|
+
? result.structuredContent
|
|
149
|
+
: result;
|
|
150
|
+
if (candidate.kibiProtocol !== KIBI_PROTOCOL_VERSION) {
|
|
151
|
+
return { data: candidate };
|
|
152
|
+
}
|
|
153
|
+
return {
|
|
154
|
+
envelope: candidate,
|
|
155
|
+
...(record(candidate.data) ? { data: candidate.data } : {}),
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
function readPayloadCount(raw) {
|
|
159
|
+
if (typeof raw === "number")
|
|
160
|
+
return Number.isFinite(raw) ? raw : null;
|
|
161
|
+
// Some transports serialize counts as strings; an absent or unparseable
|
|
162
|
+
// value stays null so it is never coerced to a plausible zero.
|
|
163
|
+
if (typeof raw === "string" && raw.trim() !== "") {
|
|
164
|
+
const parsed = Number(raw);
|
|
165
|
+
return Number.isFinite(parsed) ? parsed : null;
|
|
166
|
+
}
|
|
167
|
+
return null;
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* Record a count that could not be read as unknown rather than as zero.
|
|
171
|
+
*
|
|
172
|
+
* A missing payload and an empty result are different facts, and collapsing
|
|
173
|
+
* them hides retrieval failures behind a plausible "0 results" row. Both the
|
|
174
|
+
* MCP and CLI diagnostic loggers derive counts here so the two surfaces stay
|
|
175
|
+
* at parity.
|
|
176
|
+
*/
|
|
177
|
+
export function appendPayloadCountField(fields, countKey, noun, payload) {
|
|
178
|
+
const count = readPayloadCount(payload?.count);
|
|
179
|
+
fields[countKey] = count;
|
|
180
|
+
fields.result_summary =
|
|
181
|
+
count === null ? `${noun} count unavailable` : `${count} ${noun}`;
|
|
182
|
+
}
|
|
@@ -180,7 +180,7 @@ export type OperationContext = {
|
|
|
180
180
|
readonly sourceFirst?: boolean;
|
|
181
181
|
/** Internal apply-plan capability: source bytes were already approved/published. */
|
|
182
182
|
readonly sourcePlanApplication?: boolean;
|
|
183
|
-
/** Internal
|
|
183
|
+
/** Internal operation capability: a parent operation holds the source lock. */
|
|
184
184
|
readonly sourceMutationLockHeld?: boolean;
|
|
185
185
|
readonly git?: GitPort;
|
|
186
186
|
readonly net?: NetworkPort;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime-types.d.ts","sourceRoot":"","sources":["../../../src/public/operations/runtime-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AACvE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAElD,YAAY,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAElD,YAAY,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAEpE,4EAA4E;AAE5E,MAAM,MAAM,gBAAgB,GACxB,kBAAkB,GAClB,CAAC,MAAM,OAAO,CAAC,kBAAkB,CAAC,CAAC,CAAC;AAExC,MAAM,MAAM,iBAAiB,GAAG;IAC9B,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IACpD,QAAQ,CAAC,KAAK,CAAC,EA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gBAAgB,GACxB;IAAE,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAA;CAAE,GACxD;IAAE,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAA;CAAE,CAAC;AAG1D,MAAM,WAAW,gBAAgB;IAC/B,IAAI,CACF,IAAI,EAAE,oBAAoB,CAAC,OAAO,EAAE,OAAO,CAAC,EAC5C,IAAI,CAAC,EAAE,cAAc,GACpB,OAAO,CAAC,gBAAgB,CAAC,CAAC;IAC7B,YAAY,CACV,IAAI,EAAE,oBAAoB,CAAC,OAAO,EAAE,OAAO,CAAC,EAC5C,OAAO,EAAE,gBAAgB,GACxB,OAAO,CAAC,IAAI,CAAC,CAAC;IACjB,KAAK,CAAC,OAAO,EAAE,gBAAgB,EAAE,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC5E;AAGD,wBAAsB,gBAAgB,CAAC,MAAM,EAAE,OAAO,EACpD,OAAO,EAAE,gBAAgB,EACzB,IAAI,EAAE,oBAAoB,CAAC,MAAM,EAAE,OAAO,CAAC,EAC3C,KAAK,EAAE,MAAM,EACb,IAAI,CAAC,EAAE,cAAc,GACpB,OAAO,CAAC,OAAO,CAAC,CAclB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** Every selectable kb_check rule name, registry order. */
|
|
2
2
|
export declare const SELECTABLE_RULE_NAMES: readonly string[];
|
|
3
3
|
/** Comma-separated "Allowed:" fragment for the kb_check rules description. */
|
|
4
|
-
export declare const SELECTABLE_RULES_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";
|
|
4
|
+
export declare const SELECTABLE_RULES_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";
|
|
5
5
|
//# sourceMappingURL=check-rules.generated.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"check-rules.generated.d.ts","sourceRoot":"","sources":["../../../../src/public/operations/specs/check-rules.generated.ts"],"names":[],"mappings":"AAUA,2DAA2D;AAC3D,eAAO,MAAM,qBAAqB,EAAE,SAAS,MAAM,
|
|
1
|
+
{"version":3,"file":"check-rules.generated.d.ts","sourceRoot":"","sources":["../../../../src/public/operations/specs/check-rules.generated.ts"],"names":[],"mappings":"AAUA,2DAA2D;AAC3D,eAAO,MAAM,qBAAqB,EAAE,SAAS,MAAM,EA4BlD,CAAC;AAGF,8EAA8E;AAC9E,eAAO,MAAM,wBAAwB,ijBAC2gB,CAAC"}
|
|
@@ -29,7 +29,14 @@ export const SELECTABLE_RULE_NAMES = [
|
|
|
29
29
|
"strict-readiness",
|
|
30
30
|
"semantic-completeness",
|
|
31
31
|
"proof-contract-symbols",
|
|
32
|
+
"entity-id-style",
|
|
33
|
+
"domain-redundancy",
|
|
34
|
+
"domain-implication",
|
|
35
|
+
"subject-key-identity",
|
|
36
|
+
"subject-key-shape",
|
|
37
|
+
"ontology-quality",
|
|
38
|
+
"predicate-schema-conformance",
|
|
32
39
|
];
|
|
33
40
|
// implements REQ-006
|
|
34
41
|
/** Comma-separated "Allowed:" fragment for the kb_check rules description. */
|
|
35
|
-
export const SELECTABLE_RULES_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";
|
|
42
|
+
export const SELECTABLE_RULES_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";
|
|
@@ -12,7 +12,7 @@ export declare const checkSpec: {
|
|
|
12
12
|
readonly type: "string";
|
|
13
13
|
readonly enum: readonly string[];
|
|
14
14
|
};
|
|
15
|
-
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. 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.";
|
|
15
|
+
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.";
|
|
16
16
|
};
|
|
17
17
|
readonly sourceFiles: {
|
|
18
18
|
readonly type: "array";
|
|
@@ -13,7 +13,7 @@ export declare const querySpec: {
|
|
|
13
13
|
};
|
|
14
14
|
readonly id: {
|
|
15
15
|
readonly type: "string";
|
|
16
|
-
readonly description: "Optional exact entity ID. Example: 'REQ-
|
|
16
|
+
readonly description: "Optional exact entity ID. Example: 'REQ-cli-gc'. If omitted, returns matching entities by other filters.";
|
|
17
17
|
};
|
|
18
18
|
readonly tags: {
|
|
19
19
|
readonly type: "array";
|
|
@@ -158,6 +158,12 @@ export declare const searchSpec: {
|
|
|
158
158
|
readonly default: 0.18;
|
|
159
159
|
readonly description: "Intent-v1 acceptance threshold between 0 and 1. Low-confidence queries abstain instead of returning misleading matches.";
|
|
160
160
|
};
|
|
161
|
+
readonly fields: {
|
|
162
|
+
readonly type: "string";
|
|
163
|
+
readonly enum: readonly ["summary", "full"];
|
|
164
|
+
readonly default: "summary";
|
|
165
|
+
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.";
|
|
166
|
+
};
|
|
161
167
|
};
|
|
162
168
|
};
|
|
163
169
|
readonly requiresProlog: true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"discovery.d.ts","sourceRoot":"","sources":["../../../../src/public/operations/specs/discovery.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,aAAa,EACb,aAAa,EACd,MAAM,2BAA2B,CAAC;AAsBnC,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgDsC,CAAC;AAE7D,eAAO,MAAM,UAAU
|
|
1
|
+
{"version":3,"file":"discovery.d.ts","sourceRoot":"","sources":["../../../../src/public/operations/specs/discovery.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,aAAa,EACb,aAAa,EACd,MAAM,2BAA2B,CAAC;AAsBnC,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgDsC,CAAC;AAE7D,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoGuC,CAAC;AAE/D,eAAO,MAAM,UAAU;;;;;;;;;;;;CAWuC,CAAC"}
|
|
@@ -23,7 +23,7 @@ export const querySpec = {
|
|
|
23
23
|
},
|
|
24
24
|
id: {
|
|
25
25
|
type: "string",
|
|
26
|
-
description: "Optional exact entity ID. Example: 'REQ-
|
|
26
|
+
description: "Optional exact entity ID. Example: 'REQ-cli-gc'. If omitted, returns matching entities by other filters.",
|
|
27
27
|
},
|
|
28
28
|
tags: {
|
|
29
29
|
type: "array",
|
|
@@ -131,6 +131,12 @@ export const searchSpec = {
|
|
|
131
131
|
default: 0.18,
|
|
132
132
|
description: "Intent-v1 acceptance threshold between 0 and 1. Low-confidence queries abstain instead of returning misleading matches.",
|
|
133
133
|
},
|
|
134
|
+
fields: {
|
|
135
|
+
type: "string",
|
|
136
|
+
enum: ["summary", "full"],
|
|
137
|
+
default: "summary",
|
|
138
|
+
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.",
|
|
139
|
+
},
|
|
134
140
|
},
|
|
135
141
|
},
|
|
136
142
|
requiresProlog: true,
|