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
|
@@ -11,6 +11,14 @@ const valueArray = {
|
|
|
11
11
|
type: "array",
|
|
12
12
|
items: anyValue,
|
|
13
13
|
};
|
|
14
|
+
const stringValue = { type: "string" };
|
|
15
|
+
const integerValue = { type: "integer" };
|
|
16
|
+
const numberValue = { type: "number" };
|
|
17
|
+
const booleanValue = { type: "boolean" };
|
|
18
|
+
const stringArray = {
|
|
19
|
+
type: "array",
|
|
20
|
+
items: stringValue,
|
|
21
|
+
};
|
|
14
22
|
function objectData(properties, required = []) {
|
|
15
23
|
return {
|
|
16
24
|
type: "object",
|
|
@@ -19,6 +27,284 @@ function objectData(properties, required = []) {
|
|
|
19
27
|
properties,
|
|
20
28
|
};
|
|
21
29
|
}
|
|
30
|
+
const sha256Fingerprint = {
|
|
31
|
+
type: "string",
|
|
32
|
+
pattern: "^sha256:[0-9a-f]{64}$",
|
|
33
|
+
};
|
|
34
|
+
const gitObjectId = {
|
|
35
|
+
type: "string",
|
|
36
|
+
pattern: "^(?:[0-9a-f]{40}|[0-9a-f]{64})$",
|
|
37
|
+
};
|
|
38
|
+
const reviewRange = objectData({ start: integerValue, end: integerValue }, [
|
|
39
|
+
"start",
|
|
40
|
+
"end",
|
|
41
|
+
]);
|
|
42
|
+
const uncoveredReviewRange = objectData({
|
|
43
|
+
startLine: integerValue,
|
|
44
|
+
startColumn: integerValue,
|
|
45
|
+
endLine: integerValue,
|
|
46
|
+
endColumn: integerValue,
|
|
47
|
+
reason: stringValue,
|
|
48
|
+
}, ["startLine", "startColumn", "endLine", "endColumn", "reason"]);
|
|
49
|
+
const reviewAnalysis = objectData({
|
|
50
|
+
contractVersion: { const: "kibi.symbol-extractor.v2" },
|
|
51
|
+
status: { enum: ["ok", "partial", "unsupported", "failed"] },
|
|
52
|
+
language: stringValue,
|
|
53
|
+
sourceFile: stringValue,
|
|
54
|
+
providerId: { type: ["string", "null"] },
|
|
55
|
+
providerStamp: anyValue,
|
|
56
|
+
providerFingerprint: { oneOf: [sha256Fingerprint, { type: "null" }] },
|
|
57
|
+
inputFingerprint: sha256Fingerprint,
|
|
58
|
+
resultFingerprint: sha256Fingerprint,
|
|
59
|
+
diagnosticCodes: stringArray,
|
|
60
|
+
uncoveredRanges: {
|
|
61
|
+
type: "array",
|
|
62
|
+
items: uncoveredReviewRange,
|
|
63
|
+
},
|
|
64
|
+
}, [
|
|
65
|
+
"contractVersion",
|
|
66
|
+
"status",
|
|
67
|
+
"language",
|
|
68
|
+
"sourceFile",
|
|
69
|
+
"providerId",
|
|
70
|
+
"providerStamp",
|
|
71
|
+
"providerFingerprint",
|
|
72
|
+
"inputFingerprint",
|
|
73
|
+
"resultFingerprint",
|
|
74
|
+
"diagnosticCodes",
|
|
75
|
+
"uncoveredRanges",
|
|
76
|
+
]);
|
|
77
|
+
const reviewSideEvidence = objectData({
|
|
78
|
+
mode: { enum: ["100644", "100755", "120000", "160000"] },
|
|
79
|
+
objectId: { oneOf: [gitObjectId, { type: "null" }] },
|
|
80
|
+
byteFingerprint: sha256Fingerprint,
|
|
81
|
+
kind: { enum: ["regular", "symlink", "gitlink"] },
|
|
82
|
+
contentProjection: { const: "proof_receipts_stripped" },
|
|
83
|
+
analysis: { oneOf: [reviewAnalysis, { type: "null" }] },
|
|
84
|
+
}, ["mode", "objectId", "byteFingerprint", "kind", "analysis"]);
|
|
85
|
+
const reviewFileEvidence = {
|
|
86
|
+
...objectData({
|
|
87
|
+
path: stringValue,
|
|
88
|
+
status: { enum: ["A", "M", "R", "C", "T", "D"] },
|
|
89
|
+
oldPath: stringValue,
|
|
90
|
+
copyFromPath: stringValue,
|
|
91
|
+
analysisDepth: { enum: ["symbol", "metadata", "file", "none"] },
|
|
92
|
+
disposition: { enum: ["checked", "advisory", "skipped"] },
|
|
93
|
+
skipReason: {
|
|
94
|
+
enum: ["binary", "unsupported_encoding", "symlink", "submodule"],
|
|
95
|
+
},
|
|
96
|
+
gitMode: stringValue,
|
|
97
|
+
previousMode: stringValue,
|
|
98
|
+
oldHunkRanges: { type: "array", items: reviewRange },
|
|
99
|
+
newHunkRanges: { type: "array", items: reviewRange },
|
|
100
|
+
before: { oneOf: [reviewSideEvidence, { type: "null" }] },
|
|
101
|
+
after: { oneOf: [reviewSideEvidence, { type: "null" }] },
|
|
102
|
+
}, [
|
|
103
|
+
"path",
|
|
104
|
+
"status",
|
|
105
|
+
"analysisDepth",
|
|
106
|
+
"disposition",
|
|
107
|
+
"oldHunkRanges",
|
|
108
|
+
"newHunkRanges",
|
|
109
|
+
"before",
|
|
110
|
+
"after",
|
|
111
|
+
]),
|
|
112
|
+
anyOf: [
|
|
113
|
+
{ properties: { before: reviewSideEvidence } },
|
|
114
|
+
{ properties: { after: reviewSideEvidence } },
|
|
115
|
+
],
|
|
116
|
+
};
|
|
117
|
+
const recordTemplateFile = {
|
|
118
|
+
...objectData({
|
|
119
|
+
...(reviewFileEvidence.properties ?? {}),
|
|
120
|
+
analysisReviews: { type: "null" },
|
|
121
|
+
decision: { type: "null" },
|
|
122
|
+
}, [
|
|
123
|
+
"path",
|
|
124
|
+
"status",
|
|
125
|
+
"analysisDepth",
|
|
126
|
+
"disposition",
|
|
127
|
+
"oldHunkRanges",
|
|
128
|
+
"newHunkRanges",
|
|
129
|
+
"before",
|
|
130
|
+
"after",
|
|
131
|
+
"analysisReviews",
|
|
132
|
+
"decision",
|
|
133
|
+
]),
|
|
134
|
+
anyOf: [
|
|
135
|
+
{ properties: { before: reviewSideEvidence } },
|
|
136
|
+
{ properties: { after: reviewSideEvidence } },
|
|
137
|
+
],
|
|
138
|
+
};
|
|
139
|
+
const impactRecordHeaders = objectData({
|
|
140
|
+
contractVersion: { const: "kibi.impact-review.v1" },
|
|
141
|
+
policy: objectData({
|
|
142
|
+
id: stringValue,
|
|
143
|
+
version: stringValue,
|
|
144
|
+
fingerprint: sha256Fingerprint,
|
|
145
|
+
}, ["id", "version", "fingerprint"]),
|
|
146
|
+
evaluator: objectData({
|
|
147
|
+
contractVersion: { const: "kibi.impact-evaluator.v1" },
|
|
148
|
+
fingerprint: sha256Fingerprint,
|
|
149
|
+
}, ["contractVersion", "fingerprint"]),
|
|
150
|
+
scope: objectData({
|
|
151
|
+
fingerprint: sha256Fingerprint,
|
|
152
|
+
knowledgeFingerprint: sha256Fingerprint,
|
|
153
|
+
providerSetFingerprint: sha256Fingerprint,
|
|
154
|
+
}, ["fingerprint", "knowledgeFingerprint", "providerSetFingerprint"]),
|
|
155
|
+
}, ["contractVersion", "policy", "evaluator", "scope"]);
|
|
156
|
+
const reviewSnapshotIdentity = objectData({
|
|
157
|
+
kind: { enum: ["staged", "diff"] },
|
|
158
|
+
baseCommit: { oneOf: [gitObjectId, { type: "null" }] },
|
|
159
|
+
baseTree: gitObjectId,
|
|
160
|
+
headCommit: { oneOf: [gitObjectId, { type: "null" }] },
|
|
161
|
+
headTree: gitObjectId,
|
|
162
|
+
headTreeSource: { enum: ["index", "commit"] },
|
|
163
|
+
}, [
|
|
164
|
+
"kind",
|
|
165
|
+
"baseCommit",
|
|
166
|
+
"baseTree",
|
|
167
|
+
"headCommit",
|
|
168
|
+
"headTree",
|
|
169
|
+
"headTreeSource",
|
|
170
|
+
]);
|
|
171
|
+
const semanticEdge = objectData({ type: stringValue, from: stringValue, to: stringValue }, ["type", "from", "to"]);
|
|
172
|
+
const relatedRequirementEntity = objectData({
|
|
173
|
+
id: stringValue,
|
|
174
|
+
type: { oneOf: [stringValue, { type: "null" }] },
|
|
175
|
+
entityFingerprint: { oneOf: [sha256Fingerprint, { type: "null" }] },
|
|
176
|
+
artifactPath: { oneOf: [stringValue, { type: "null" }] },
|
|
177
|
+
sourcePath: { oneOf: [stringValue, { type: "null" }] },
|
|
178
|
+
entity: recordValue,
|
|
179
|
+
}, ["id", "type", "entityFingerprint", "artifactPath", "sourcePath", "entity"]);
|
|
180
|
+
const requirementContext = {
|
|
181
|
+
oneOf: [
|
|
182
|
+
objectData({
|
|
183
|
+
id: stringValue,
|
|
184
|
+
state: { const: "absent" },
|
|
185
|
+
entityFingerprint: { type: "null" },
|
|
186
|
+
artifactPath: { type: "null" },
|
|
187
|
+
sourcePath: { type: "null" },
|
|
188
|
+
relationships: { type: "array", items: semanticEdge },
|
|
189
|
+
relatedEntities: { type: "array", items: relatedRequirementEntity },
|
|
190
|
+
}, [
|
|
191
|
+
"id",
|
|
192
|
+
"state",
|
|
193
|
+
"entityFingerprint",
|
|
194
|
+
"artifactPath",
|
|
195
|
+
"sourcePath",
|
|
196
|
+
"relationships",
|
|
197
|
+
"relatedEntities",
|
|
198
|
+
]),
|
|
199
|
+
objectData({
|
|
200
|
+
id: stringValue,
|
|
201
|
+
state: { const: "present" },
|
|
202
|
+
entityFingerprint: sha256Fingerprint,
|
|
203
|
+
artifactPath: stringValue,
|
|
204
|
+
sourcePath: { oneOf: [stringValue, { type: "null" }] },
|
|
205
|
+
entity: recordValue,
|
|
206
|
+
relationships: { type: "array", items: semanticEdge },
|
|
207
|
+
relatedEntities: { type: "array", items: relatedRequirementEntity },
|
|
208
|
+
}, [
|
|
209
|
+
"id",
|
|
210
|
+
"state",
|
|
211
|
+
"entityFingerprint",
|
|
212
|
+
"artifactPath",
|
|
213
|
+
"sourcePath",
|
|
214
|
+
"entity",
|
|
215
|
+
"relationships",
|
|
216
|
+
"relatedEntities",
|
|
217
|
+
]),
|
|
218
|
+
],
|
|
219
|
+
};
|
|
220
|
+
const requirementScope = objectData({
|
|
221
|
+
path: stringValue,
|
|
222
|
+
requirementIds: stringArray,
|
|
223
|
+
before: { type: "array", items: requirementContext },
|
|
224
|
+
after: { type: "array", items: requirementContext },
|
|
225
|
+
}, ["path", "requirementIds", "before", "after"]);
|
|
226
|
+
const residualReviewObligation = {
|
|
227
|
+
oneOf: [
|
|
228
|
+
objectData({
|
|
229
|
+
path: stringValue,
|
|
230
|
+
side: { enum: ["before", "after"] },
|
|
231
|
+
status: { const: "unsupported" },
|
|
232
|
+
diagnosticCodes: stringArray,
|
|
233
|
+
kind: { const: "unsupported_review" },
|
|
234
|
+
wholeFile: { const: true },
|
|
235
|
+
pending: { const: true },
|
|
236
|
+
}, [
|
|
237
|
+
"path",
|
|
238
|
+
"side",
|
|
239
|
+
"status",
|
|
240
|
+
"diagnosticCodes",
|
|
241
|
+
"kind",
|
|
242
|
+
"wholeFile",
|
|
243
|
+
"pending",
|
|
244
|
+
]),
|
|
245
|
+
objectData({
|
|
246
|
+
path: stringValue,
|
|
247
|
+
side: { enum: ["before", "after"] },
|
|
248
|
+
status: { const: "partial" },
|
|
249
|
+
diagnosticCodes: stringArray,
|
|
250
|
+
kind: { const: "partial_review" },
|
|
251
|
+
limitationClass: stringValue,
|
|
252
|
+
ranges: { type: "array", items: uncoveredReviewRange },
|
|
253
|
+
pending: { const: true },
|
|
254
|
+
}, [
|
|
255
|
+
"path",
|
|
256
|
+
"side",
|
|
257
|
+
"status",
|
|
258
|
+
"diagnosticCodes",
|
|
259
|
+
"kind",
|
|
260
|
+
"limitationClass",
|
|
261
|
+
"ranges",
|
|
262
|
+
"pending",
|
|
263
|
+
]),
|
|
264
|
+
],
|
|
265
|
+
};
|
|
266
|
+
const unauthoredRecordTemplate = objectData({
|
|
267
|
+
contractVersion: { const: "kibi.impact-review.v1" },
|
|
268
|
+
policy: impactRecordHeaders.properties.policy,
|
|
269
|
+
evaluator: impactRecordHeaders.properties.evaluator,
|
|
270
|
+
scope: impactRecordHeaders.properties.scope,
|
|
271
|
+
reviewer: objectData({ id: { type: "null" }, source: { const: "self-claimed-local" } }, ["id", "source"]),
|
|
272
|
+
reviewedAt: { type: "null" },
|
|
273
|
+
files: { type: "array", items: recordTemplateFile },
|
|
274
|
+
}, [
|
|
275
|
+
"contractVersion",
|
|
276
|
+
"policy",
|
|
277
|
+
"evaluator",
|
|
278
|
+
"scope",
|
|
279
|
+
"reviewer",
|
|
280
|
+
"reviewedAt",
|
|
281
|
+
"files",
|
|
282
|
+
]);
|
|
283
|
+
const impactReviewAuthorship = objectData({
|
|
284
|
+
templateVersion: { const: "kibi.impact-review-authoring-template.v1" },
|
|
285
|
+
isValidImpactReviewRecord: { const: false },
|
|
286
|
+
instructions: stringValue,
|
|
287
|
+
authoredFields: stringArray,
|
|
288
|
+
recordSchema: recordValue,
|
|
289
|
+
decisionSchema: recordValue,
|
|
290
|
+
analysisReviewSchema: recordValue,
|
|
291
|
+
templateSchema: recordValue,
|
|
292
|
+
recordTemplate: objectData({
|
|
293
|
+
templateVersion: { const: "kibi.impact-review-authoring-template.v1" },
|
|
294
|
+
isValidImpactReviewRecord: { const: false },
|
|
295
|
+
record: unauthoredRecordTemplate,
|
|
296
|
+
}, ["templateVersion", "isValidImpactReviewRecord", "record"]),
|
|
297
|
+
}, [
|
|
298
|
+
"templateVersion",
|
|
299
|
+
"isValidImpactReviewRecord",
|
|
300
|
+
"instructions",
|
|
301
|
+
"authoredFields",
|
|
302
|
+
"recordSchema",
|
|
303
|
+
"decisionSchema",
|
|
304
|
+
"analysisReviewSchema",
|
|
305
|
+
"templateSchema",
|
|
306
|
+
"recordTemplate",
|
|
307
|
+
]);
|
|
22
308
|
/**
|
|
23
309
|
* kibi.job.v1 receipt returned by async-mode operations (kb_check with
|
|
24
310
|
* `async: true`) instead of the synchronous payload. Agents poll
|
|
@@ -34,14 +320,6 @@ const jobReceiptData = objectData({
|
|
|
34
320
|
status: { type: "string" },
|
|
35
321
|
pollWith: { const: "kb_job_status" },
|
|
36
322
|
}, ["kibiProtocol", "jobVersion", "jobId", "tool", "status", "pollWith"]);
|
|
37
|
-
const stringValue = { type: "string" };
|
|
38
|
-
const integerValue = { type: "integer" };
|
|
39
|
-
const numberValue = { type: "number" };
|
|
40
|
-
const booleanValue = { type: "boolean" };
|
|
41
|
-
const stringArray = {
|
|
42
|
-
type: "array",
|
|
43
|
-
items: stringValue,
|
|
44
|
-
};
|
|
45
323
|
/** Preserve JSON Schema's nullable scalar/object representation in every
|
|
46
324
|
* generated consumer contract. Using a `type` union keeps the catalog
|
|
47
325
|
* readable and lets the MCP bridge round-trip the same wire schema. */
|
|
@@ -145,6 +423,21 @@ export const OPERATION_DATA_SCHEMAS = {
|
|
|
145
423
|
warnings: recordArray,
|
|
146
424
|
migrationWarning: { type: ["string", "null"] },
|
|
147
425
|
logic: recordValue,
|
|
426
|
+
vocabularyAlignment: objectData({
|
|
427
|
+
subject: recordValue,
|
|
428
|
+
redundancyCandidates: recordArray,
|
|
429
|
+
reviewPlan: recordArray,
|
|
430
|
+
stamps: recordArray,
|
|
431
|
+
fallbackUsed: booleanValue,
|
|
432
|
+
diagnostics: recordArray,
|
|
433
|
+
}, [
|
|
434
|
+
"subject",
|
|
435
|
+
"redundancyCandidates",
|
|
436
|
+
"reviewPlan",
|
|
437
|
+
"stamps",
|
|
438
|
+
"fallbackUsed",
|
|
439
|
+
"diagnostics",
|
|
440
|
+
]),
|
|
148
441
|
}),
|
|
149
442
|
kb_suggest_predicates: objectData({
|
|
150
443
|
text: stringValue,
|
|
@@ -226,6 +519,7 @@ export const OPERATION_DATA_SCHEMAS = {
|
|
|
226
519
|
sourceWrites: recordArray,
|
|
227
520
|
deletionPlan: recordValue,
|
|
228
521
|
supersessionPlan: recordValue,
|
|
522
|
+
skippedEffects: stringArray,
|
|
229
523
|
status: stringValue,
|
|
230
524
|
effectFailures: recordArray,
|
|
231
525
|
nextActions: recordArray,
|
|
@@ -248,6 +542,28 @@ export const OPERATION_DATA_SCHEMAS = {
|
|
|
248
542
|
jobReceiptData,
|
|
249
543
|
],
|
|
250
544
|
},
|
|
545
|
+
kb_prepare_impact_review: objectData({
|
|
546
|
+
preparationVersion: { const: "kibi.impact-review-preparation.v1" },
|
|
547
|
+
status: { const: "ready_for_authoring" },
|
|
548
|
+
snapshot: reviewSnapshotIdentity,
|
|
549
|
+
recordHeaders: impactRecordHeaders,
|
|
550
|
+
files: { type: "array", items: reviewFileEvidence },
|
|
551
|
+
requirementScopes: { type: "array", items: requirementScope },
|
|
552
|
+
residualReviewObligations: {
|
|
553
|
+
type: "array",
|
|
554
|
+
items: residualReviewObligation,
|
|
555
|
+
},
|
|
556
|
+
authorship: impactReviewAuthorship,
|
|
557
|
+
}, [
|
|
558
|
+
"preparationVersion",
|
|
559
|
+
"status",
|
|
560
|
+
"snapshot",
|
|
561
|
+
"recordHeaders",
|
|
562
|
+
"files",
|
|
563
|
+
"requirementScopes",
|
|
564
|
+
"residualReviewObligations",
|
|
565
|
+
"authorship",
|
|
566
|
+
]),
|
|
251
567
|
kb_compile_intent: objectData({
|
|
252
568
|
version: stringValue,
|
|
253
569
|
planHash: stringValue,
|
|
@@ -321,6 +637,7 @@ const EFFECT_OVERRIDES = {
|
|
|
321
637
|
"workspace-write": { destructive: true, retrySafety: "unsafe" },
|
|
322
638
|
},
|
|
323
639
|
kb_check: {},
|
|
640
|
+
kb_prepare_impact_review: {},
|
|
324
641
|
kb_compile_intent: {},
|
|
325
642
|
kb_apply_plan: {
|
|
326
643
|
"kb-write": { destructive: true, retrySafety: "unsafe" },
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { PrologPort } from "./runtime-types.js";
|
|
1
|
+
import type { PrologEntityQueryInput, PrologEntityQueryResult, PrologPort } from "./runtime-types.js";
|
|
2
2
|
export type EntityQueryInput = {
|
|
3
3
|
readonly type?: string;
|
|
4
4
|
readonly id?: string;
|
|
@@ -7,10 +7,22 @@ export type EntityQueryInput = {
|
|
|
7
7
|
/** Page size for index-backed queries; bounds each query's output. */
|
|
8
8
|
readonly limit?: number;
|
|
9
9
|
readonly offset?: number;
|
|
10
|
+
/**
|
|
11
|
+
* Proof selection only needs the contract. Omit receipt histories so a
|
|
12
|
+
* campaign does not page every full test entity.
|
|
13
|
+
*/
|
|
14
|
+
readonly projection?: "proof_contract";
|
|
10
15
|
};
|
|
11
16
|
export declare const VALID_ENTITY_TYPES: readonly ["req", "scenario", "test", "adr", "flag", "event", "symbol", "fact"];
|
|
12
17
|
export declare function validateEntityType(type?: string): void;
|
|
18
|
+
/**
|
|
19
|
+
* Proof campaign selection must not materialize every contracted test in a
|
|
20
|
+
* single Prolog result. The specialized projection excludes receipt histories
|
|
21
|
+
* and returns one bounded page at a time.
|
|
22
|
+
*/
|
|
23
|
+
export declare const PROOF_CONTRACT_PAGE_SIZE = 100;
|
|
13
24
|
export declare function buildEntityGoal(input: EntityQueryInput): string;
|
|
25
|
+
export declare function loadEntitiesPaged(prolog: Pick<PrologPort, "query">, type: (typeof VALID_ENTITY_TYPES)[number], pageSize?: number): Promise<Record<string, unknown>[]>;
|
|
14
26
|
export declare function loadEntities(prolog: Pick<PrologPort, "query">, input: EntityQueryInput): Promise<Record<string, unknown>[]>;
|
|
15
27
|
export declare function paginateResults<T>(results: readonly T[], limit?: number, offset?: number): T[];
|
|
16
28
|
/**
|
|
@@ -20,10 +32,38 @@ export declare function paginateResults<T>(results: readonly T[], limit?: number
|
|
|
20
32
|
* a byte-size guarantee for arbitrarily large individual entity payloads.
|
|
21
33
|
*/
|
|
22
34
|
export declare const SEARCH_CANDIDATE_PAGE_SIZE = 500;
|
|
23
|
-
export declare function loadSearchCandidates(prolog: Pick<PrologPort, "searchEntities"
|
|
35
|
+
export declare function loadSearchCandidates(prolog: Pick<PrologPort, "searchEntities"> & Partial<Pick<PrologPort, "query">>, input: {
|
|
24
36
|
readonly query: string;
|
|
25
37
|
readonly type?: string;
|
|
26
38
|
readonly maxCandidates?: number;
|
|
27
39
|
}, signal?: AbortSignal): Promise<Record<string, unknown>[]>;
|
|
40
|
+
/**
|
|
41
|
+
* Projected candidate rows for every entity (optionally of one type), in id
|
|
42
|
+
* order, bounded by `maxCandidates`. For semantic discovery that has no
|
|
43
|
+
* lexical token to pre-filter candidates.
|
|
44
|
+
*/
|
|
45
|
+
export declare function listSearchCandidates(prolog: Pick<PrologPort, "query">, input: {
|
|
46
|
+
readonly type?: string;
|
|
47
|
+
readonly maxCandidates: number;
|
|
48
|
+
}, signal?: AbortSignal): Promise<Record<string, unknown>[]>;
|
|
49
|
+
/**
|
|
50
|
+
* Rows per `kb_query_entities` request. Full entities carry receipt
|
|
51
|
+
* histories, so a caller-sized page (up to 100k rows) is split into bounded
|
|
52
|
+
* requests and concatenated; the reported count is the total match count.
|
|
53
|
+
*/
|
|
54
|
+
export declare const ENTITY_QUERY_CHUNK_SIZE = 25;
|
|
55
|
+
export declare function queryEntityChunks(readChunk: (input: PrologEntityQueryInput) => Promise<PrologEntityQueryResult>, input: PrologEntityQueryInput): Promise<PrologEntityQueryResult>;
|
|
56
|
+
/** Bounded `kb_query_entities` paging for ports without the engine method. */
|
|
57
|
+
export declare function queryEntitiesViaQuery(prolog: Pick<PrologPort, "query">, input: PrologEntityQueryInput, signal?: AbortSignal): Promise<PrologEntityQueryResult>;
|
|
58
|
+
/** Every entity id, without materializing entity properties. */
|
|
59
|
+
export declare function loadEntityIds(prolog: Pick<PrologPort, "query">): Promise<string[]>;
|
|
60
|
+
/**
|
|
61
|
+
* Replace projected search candidates with complete entities, one bounded
|
|
62
|
+
* query per entity. Used only for the final result page when a caller asks
|
|
63
|
+
* for full entity bodies.
|
|
64
|
+
*/
|
|
65
|
+
export declare function reloadFullEntities<TMatch extends {
|
|
66
|
+
readonly entity: Record<string, unknown>;
|
|
67
|
+
}>(prolog: Pick<PrologPort, "query">, matches: readonly TMatch[]): Promise<TMatch[]>;
|
|
28
68
|
export declare function dedupeEntities(entities: readonly Record<string, unknown>[]): Record<string, unknown>[];
|
|
29
69
|
//# sourceMappingURL=discovery-entities.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"discovery-entities.d.ts","sourceRoot":"","sources":["../../../src/public/operations/discovery-entities.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"discovery-entities.d.ts","sourceRoot":"","sources":["../../../src/public/operations/discovery-entities.ts"],"names":[],"mappings":"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"}
|