kibi-cli 2.0.0 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli-protocol.d.ts.map +1 -1
- package/dist/cli-protocol.js +3 -2
- package/dist/cli-register-proof.d.ts.map +1 -1
- package/dist/cli-register-proof.js +25 -1
- package/dist/cli-register-reporting.d.ts.map +1 -1
- package/dist/cli-register-reporting.js +6 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +2 -0
- package/dist/commands/aggregated-checks.d.ts +7 -0
- package/dist/commands/aggregated-checks.d.ts.map +1 -1
- package/dist/commands/aggregated-checks.js +25 -1
- package/dist/commands/check-generated.d.ts +7 -0
- package/dist/commands/check-generated.d.ts.map +1 -0
- package/dist/commands/check-generated.js +192 -0
- package/dist/commands/check.d.ts.map +1 -1
- package/dist/commands/check.js +24 -15
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +227 -25
- package/dist/commands/engine.d.ts.map +1 -1
- package/dist/commands/engine.js +3 -1
- package/dist/commands/github-init.d.ts +1 -1
- package/dist/commands/github-init.d.ts.map +1 -1
- package/dist/commands/github-init.js +1 -1
- package/dist/commands/init-helpers.d.ts +17 -2
- package/dist/commands/init-helpers.d.ts.map +1 -1
- package/dist/commands/init-helpers.js +136 -30
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +110 -15
- package/dist/commands/proof-explain.d.ts +10 -0
- package/dist/commands/proof-explain.d.ts.map +1 -0
- package/dist/commands/proof-explain.js +45 -0
- package/dist/commands/proof-impact.d.ts +7 -0
- package/dist/commands/proof-impact.d.ts.map +1 -0
- package/dist/commands/proof-impact.js +39 -0
- package/dist/commands/proof-migrate-legacy.js +1 -1
- package/dist/commands/proof-prune.js +1 -1
- package/dist/commands/prove.d.ts.map +1 -1
- package/dist/commands/prove.js +14 -22
- package/dist/commands/report.d.ts.map +1 -1
- package/dist/commands/report.js +17 -2
- package/dist/commands/sync/cache.d.ts +20 -1
- package/dist/commands/sync/cache.d.ts.map +1 -1
- package/dist/commands/sync/cache.js +51 -2
- package/dist/commands/sync/discovery.d.ts.map +1 -1
- package/dist/commands/sync/discovery.js +1 -1
- package/dist/commands/sync/manifest.d.ts +1 -0
- package/dist/commands/sync/manifest.d.ts.map +1 -1
- package/dist/commands/sync/manifest.js +18 -16
- package/dist/commands/sync/persistence.d.ts.map +1 -1
- package/dist/commands/sync/persistence.js +14 -0
- package/dist/commands/sync.d.ts.map +1 -1
- package/dist/commands/sync.js +11 -3
- package/dist/engine.d.ts +29 -1
- package/dist/engine.d.ts.map +1 -1
- package/dist/engine.js +259 -89
- package/dist/env/bootstrap.d.ts +84 -0
- package/dist/env/bootstrap.d.ts.map +1 -0
- package/dist/env/bootstrap.js +310 -0
- package/dist/extractors/manifest.d.ts.map +1 -1
- package/dist/extractors/manifest.js +67 -29
- package/dist/extractors/markdown.d.ts +4 -0
- package/dist/extractors/markdown.d.ts.map +1 -1
- package/dist/extractors/markdown.js +33 -3
- package/dist/extractors/relationships.d.ts.map +1 -1
- package/dist/extractors/relationships.js +1 -0
- package/dist/extractors/symbols-coordinator.d.ts +8 -0
- package/dist/extractors/symbols-coordinator.d.ts.map +1 -1
- package/dist/extractors/symbols-coordinator.js +40 -0
- package/dist/extractors/symbols-ts.d.ts +8 -19
- package/dist/extractors/symbols-ts.d.ts.map +1 -1
- package/dist/extractors/symbols-ts.js +33 -503
- package/dist/intent-search.d.ts.map +1 -1
- package/dist/intent-search.js +68 -30
- package/dist/operations/bootstrap/generate.d.ts.map +1 -1
- package/dist/operations/bootstrap/generate.js +4 -3
- package/dist/operations/modeling/model-requirement.d.ts +1 -1
- package/dist/operations/modeling/model-requirement.d.ts.map +1 -1
- package/dist/operations/modeling/model-requirement.js +179 -9
- package/dist/operations/modeling/predicate-applyplan.d.ts.map +1 -1
- package/dist/operations/modeling/predicate-applyplan.js +14 -2
- package/dist/operations/modeling/predicate-loader.d.ts.map +1 -1
- package/dist/operations/modeling/predicate-loader.js +24 -0
- package/dist/operations/modeling/predicate-types.d.ts +4 -0
- package/dist/operations/modeling/predicate-types.d.ts.map +1 -1
- package/dist/operations/modeling/predicate-vocabulary.d.ts +54 -0
- package/dist/operations/modeling/predicate-vocabulary.d.ts.map +1 -0
- package/dist/operations/modeling/predicate-vocabulary.js +169 -0
- package/dist/operations/modeling/requirement-types.d.ts +5 -0
- package/dist/operations/modeling/requirement-types.d.ts.map +1 -1
- package/dist/operations/modeling/suggest-predicates.d.ts +1 -1
- package/dist/operations/modeling/suggest-predicates.d.ts.map +1 -1
- package/dist/operations/modeling/suggest-predicates.js +30 -3
- package/dist/operations/modeling/vocabulary-alignment.d.ts +60 -0
- package/dist/operations/modeling/vocabulary-alignment.d.ts.map +1 -0
- package/dist/operations/modeling/vocabulary-alignment.js +178 -0
- package/dist/operations/mutation/contradictions.d.ts +3 -0
- package/dist/operations/mutation/contradictions.d.ts.map +1 -1
- package/dist/operations/mutation/contradictions.js +29 -0
- package/dist/operations/mutation/delete.d.ts.map +1 -1
- package/dist/operations/mutation/delete.js +33 -1
- package/dist/operations/mutation/predicate-vocabulary-guard.d.ts +8 -0
- package/dist/operations/mutation/predicate-vocabulary-guard.d.ts.map +1 -0
- package/dist/operations/mutation/predicate-vocabulary-guard.js +64 -0
- package/dist/operations/mutation/relationships.d.ts +1 -1
- package/dist/operations/mutation/relationships.d.ts.map +1 -1
- package/dist/operations/mutation/relationships.js +1 -0
- package/dist/operations/mutation/saga.d.ts +5 -0
- package/dist/operations/mutation/saga.d.ts.map +1 -1
- package/dist/operations/mutation/saga.js +10 -0
- package/dist/operations/mutation/serialization.d.ts.map +1 -1
- package/dist/operations/mutation/serialization.js +2 -0
- package/dist/operations/mutation/source-authoring.d.ts +6 -0
- package/dist/operations/mutation/source-authoring.d.ts.map +1 -1
- package/dist/operations/mutation/source-authoring.js +65 -26
- package/dist/operations/mutation/strict-fact.d.ts.map +1 -1
- package/dist/operations/mutation/strict-fact.js +5 -0
- package/dist/operations/mutation/symbol-granularity.d.ts.map +1 -1
- package/dist/operations/mutation/symbol-granularity.js +9 -87
- package/dist/operations/mutation/types.d.ts +17 -0
- package/dist/operations/mutation/types.d.ts.map +1 -1
- package/dist/operations/mutation/upsert.d.ts +6 -0
- package/dist/operations/mutation/upsert.d.ts.map +1 -1
- package/dist/operations/mutation/upsert.js +72 -4
- package/dist/operations/mutation/validate-upsert.d.ts.map +1 -1
- package/dist/operations/mutation/validate-upsert.js +24 -1
- package/dist/operations/mutation/validation.d.ts.map +1 -1
- package/dist/operations/mutation/validation.js +16 -3
- package/dist/operations/planning/apply-plan.d.ts.map +1 -1
- package/dist/operations/planning/apply-plan.js +61 -17
- package/dist/operations/planning/compile-intent.d.ts +49 -0
- package/dist/operations/planning/compile-intent.d.ts.map +1 -1
- package/dist/operations/planning/compile-intent.js +66 -4
- package/dist/operations/proof/baseline-diff.d.ts +41 -0
- package/dist/operations/proof/baseline-diff.d.ts.map +1 -0
- package/dist/operations/proof/baseline-diff.js +153 -0
- package/dist/operations/proof/code-scope.d.ts +17 -0
- package/dist/operations/proof/code-scope.d.ts.map +1 -0
- package/dist/operations/proof/code-scope.js +60 -0
- package/dist/operations/proof/explain.d.ts +75 -0
- package/dist/operations/proof/explain.d.ts.map +1 -0
- package/dist/operations/proof/explain.js +294 -0
- package/dist/operations/proof/impact.d.ts +45 -0
- package/dist/operations/proof/impact.d.ts.map +1 -0
- package/dist/operations/proof/impact.js +118 -0
- package/dist/operations/proof/ingest-proof.d.ts +4 -2
- package/dist/operations/proof/ingest-proof.d.ts.map +1 -1
- package/dist/operations/proof/ingest-proof.js +251 -77
- package/dist/operations/proof/migrate-legacy-receipts.d.ts.map +1 -1
- package/dist/operations/proof/migrate-legacy-receipts.js +28 -22
- package/dist/operations/proof/prune-receipts.d.ts.map +1 -1
- package/dist/operations/proof/prune-receipts.js +8 -6
- package/dist/operations/proof/receipt-document.js +2 -2
- package/dist/operations/semantic-advisor/analysis-receipt.d.ts.map +1 -1
- package/dist/operations/semantic-advisor/analysis-receipt.js +3 -9
- package/dist/operations/semantic-advisor/analyze-prose.d.ts.map +1 -1
- package/dist/operations/semantic-advisor/analyze-prose.js +18 -67
- package/dist/operations/semantic-advisor/plugin-orchestration.d.ts +63 -0
- package/dist/operations/semantic-advisor/plugin-orchestration.d.ts.map +1 -0
- package/dist/operations/semantic-advisor/plugin-orchestration.js +489 -0
- package/dist/operations/semantic-advisor/predicate-rules-core.d.ts +15 -2
- package/dist/operations/semantic-advisor/predicate-rules-core.d.ts.map +1 -1
- package/dist/operations/semantic-advisor/predicate-rules-core.js +7 -140
- package/dist/operations/semantic-advisor/predicate-rules-launcher.d.ts +11 -12
- package/dist/operations/semantic-advisor/predicate-rules-launcher.d.ts.map +1 -1
- package/dist/operations/semantic-advisor/predicate-rules-launcher.js +6 -94
- package/dist/operations/semantic-advisor/predicate-rules-policy.d.ts +16 -0
- package/dist/operations/semantic-advisor/predicate-rules-policy.d.ts.map +1 -1
- package/dist/operations/semantic-advisor/predicate-rules-policy.js +7 -150
- package/dist/operations/semantic-advisor/predicate-rules-product-tail.d.ts +9 -0
- package/dist/operations/semantic-advisor/predicate-rules-product-tail.d.ts.map +1 -1
- package/dist/operations/semantic-advisor/predicate-rules-product-tail.js +7 -102
- package/dist/operations/semantic-advisor/predicate-rules-product.d.ts +13 -0
- package/dist/operations/semantic-advisor/predicate-rules-product.d.ts.map +1 -1
- package/dist/operations/semantic-advisor/predicate-rules-product.js +7 -133
- package/dist/operations/semantic-advisor/types.d.ts +1 -0
- package/dist/operations/semantic-advisor/types.d.ts.map +1 -1
- package/dist/plugins/compose-ontology-packs.d.ts +51 -0
- package/dist/plugins/compose-ontology-packs.d.ts.map +1 -0
- package/dist/plugins/compose-ontology-packs.js +257 -0
- package/dist/plugins/compose-semantic-classifier.d.ts +47 -0
- package/dist/plugins/compose-semantic-classifier.d.ts.map +1 -0
- package/dist/plugins/compose-semantic-classifier.js +216 -0
- package/dist/plugins/compose-vocabulary-alignment.d.ts +23 -0
- package/dist/plugins/compose-vocabulary-alignment.d.ts.map +1 -0
- package/dist/plugins/compose-vocabulary-alignment.js +141 -0
- package/dist/plugins/external-allowlist.d.ts +17 -0
- package/dist/plugins/external-allowlist.d.ts.map +1 -0
- package/dist/plugins/external-allowlist.js +29 -0
- package/dist/plugins/index.d.ts +11 -0
- package/dist/plugins/index.d.ts.map +1 -0
- package/dist/plugins/index.js +37 -0
- package/dist/plugins/load-plugin.d.ts +19 -0
- package/dist/plugins/load-plugin.d.ts.map +1 -0
- package/dist/plugins/load-plugin.js +59 -0
- package/dist/plugins/project-config.d.ts +28 -0
- package/dist/plugins/project-config.d.ts.map +1 -0
- package/dist/plugins/project-config.js +90 -0
- package/dist/plugins/registry.d.ts +94 -0
- package/dist/plugins/registry.d.ts.map +1 -0
- package/dist/plugins/registry.js +359 -0
- package/dist/plugins/resolve-package.d.ts +47 -0
- package/dist/plugins/resolve-package.d.ts.map +1 -0
- package/dist/plugins/resolve-package.js +262 -0
- package/dist/plugins/source-analysis-service.d.ts +44 -0
- package/dist/plugins/source-analysis-service.d.ts.map +1 -0
- package/dist/plugins/source-analysis-service.js +232 -0
- package/dist/prolog/codec.d.ts.map +1 -1
- package/dist/prolog/codec.js +2 -0
- package/dist/prolog/janitor.d.ts.map +1 -1
- package/dist/prolog/janitor.js +1 -1
- package/dist/prolog/store-lock.d.ts +1 -1
- package/dist/prolog/store-lock.d.ts.map +1 -1
- package/dist/prolog.d.ts +36 -0
- package/dist/prolog.d.ts.map +1 -1
- package/dist/prolog.js +78 -9
- package/dist/proof/inspect.js +1 -1
- package/dist/proof/producers/playwright-case-id.js +2 -2
- package/dist/proof/producers/playwright-reporter.js +4 -4
- package/dist/public/diagnostic-usage.d.ts.map +1 -1
- package/dist/public/diagnostic-usage.js +7 -25
- package/dist/public/extractors/symbols-coordinator.d.ts +1 -1
- package/dist/public/extractors/symbols-coordinator.d.ts.map +1 -1
- package/dist/public/extractors/symbols-coordinator.js +1 -1
- package/dist/public/impact/analyzer.d.ts +1 -1
- package/dist/public/impact/analyzer.d.ts.map +1 -1
- package/dist/public/impact/analyzer.js +6 -4
- package/dist/public/impact/full-kb-quality.d.ts.map +1 -1
- package/dist/public/impact/full-kb-quality.js +4 -12
- package/dist/public/operations/catalog.d.ts +39 -7
- package/dist/public/operations/catalog.d.ts.map +1 -1
- package/dist/public/operations/check-executor.d.ts.map +1 -1
- package/dist/public/operations/check-executor.js +11 -3
- package/dist/public/operations/check-helpers.d.ts +7 -1
- package/dist/public/operations/check-helpers.d.ts.map +1 -1
- package/dist/public/operations/check-helpers.js +22 -2
- package/dist/public/operations/contracts.d.ts.map +1 -1
- package/dist/public/operations/contracts.js +51 -12
- package/dist/public/operations/discovery-entities.d.ts +53 -1
- package/dist/public/operations/discovery-entities.d.ts.map +1 -1
- package/dist/public/operations/discovery-entities.js +219 -12
- package/dist/public/operations/discovery-executors.d.ts +1 -0
- package/dist/public/operations/discovery-executors.d.ts.map +1 -1
- package/dist/public/operations/discovery-executors.js +93 -59
- package/dist/public/operations/migration-plan.d.ts +2 -0
- package/dist/public/operations/migration-plan.d.ts.map +1 -1
- package/dist/public/operations/migration-plan.js +50 -0
- package/dist/public/operations/predicate-schema-conformance.d.ts +41 -0
- package/dist/public/operations/predicate-schema-conformance.d.ts.map +1 -0
- package/dist/public/operations/predicate-schema-conformance.js +242 -0
- package/dist/public/operations/prolog-json.d.ts +1 -1
- package/dist/public/operations/prolog-json.d.ts.map +1 -1
- package/dist/public/operations/prolog-json.js +16 -10
- package/dist/public/operations/result-envelope.d.ts +34 -1
- package/dist/public/operations/result-envelope.d.ts.map +1 -1
- package/dist/public/operations/result-envelope.js +78 -2
- package/dist/public/operations/runtime-types.d.ts +17 -2
- package/dist/public/operations/runtime-types.d.ts.map +1 -1
- package/dist/public/operations/specs/check-rules.generated.d.ts +1 -1
- package/dist/public/operations/specs/check-rules.generated.d.ts.map +1 -1
- package/dist/public/operations/specs/check-rules.generated.js +9 -1
- package/dist/public/operations/specs/check.d.ts +1 -1
- package/dist/public/operations/specs/discovery.d.ts +10 -1
- package/dist/public/operations/specs/discovery.d.ts.map +1 -1
- package/dist/public/operations/specs/discovery.js +10 -1
- package/dist/public/operations/specs/mutation-schemas.d.ts +27 -4
- package/dist/public/operations/specs/mutation-schemas.d.ts.map +1 -1
- package/dist/public/operations/specs/mutation-schemas.js +21 -3
- package/dist/public/operations/specs/proof.js +1 -1
- package/dist/public/operations/specs/reporting.d.ts +9 -0
- package/dist/public/operations/specs/reporting.d.ts.map +1 -1
- package/dist/public/operations/specs/reporting.js +48 -17
- package/dist/public/operations/specs/semantic.d.ts +1 -1
- package/dist/public/operations/specs/semantic.d.ts.map +1 -1
- package/dist/public/operations/specs/semantic.js +54 -4
- package/dist/public/operations/specs/upsert.d.ts +28 -5
- package/dist/public/operations/specs/upsert.d.ts.map +1 -1
- package/dist/public/operations/specs/upsert.js +1 -1
- package/dist/public/operations/symbol-repair-plan.d.ts.map +1 -1
- package/dist/public/operations/symbol-repair-plan.js +11 -4
- package/dist/public/operations/types.d.ts +5 -0
- package/dist/public/operations/types.d.ts.map +1 -1
- package/dist/public/proof-protocol.js +4 -4
- package/dist/public/schemas/entity.d.ts.map +1 -1
- package/dist/public/schemas/entity.js +22 -0
- package/dist/public/schemas/relationship.d.ts.map +1 -1
- package/dist/public/schemas/relationship.js +1 -0
- package/dist/public/skills/kibi-usage/SKILL.md +10 -3
- package/dist/public/skills/kibi-usage/resources/fact-lanes.md +4 -0
- package/dist/public/skills/kibi-usage/resources/proof.md +45 -0
- package/dist/public/skills/kibi-usage/resources/relationship-directions.md +35 -17
- package/dist/public/skills/kibi-usage/resources/source-authoring.md +36 -0
- package/dist/public/skills/kibi-usage/resources/workflows.md +52 -1
- package/dist/public/symbol-granularity.d.ts +1 -1
- package/dist/public/symbol-granularity.d.ts.map +1 -1
- package/dist/public/symbol-granularity.generated.d.ts.map +1 -1
- package/dist/public/symbol-granularity.generated.js +38 -5
- package/dist/public/telemetry-acceptance.d.ts.map +1 -1
- package/dist/public/telemetry-acceptance.js +21 -5
- package/dist/relationships/shards.d.ts +6 -0
- package/dist/relationships/shards.d.ts.map +1 -1
- package/dist/relationships/shards.js +26 -19
- package/dist/report/html-report.css +1239 -281
- package/dist/runtime/cli-runtime.d.ts.map +1 -1
- package/dist/runtime/cli-runtime.js +18 -0
- package/dist/schemas/entity.schema.json +32 -0
- package/dist/traceability/staged-diagnostics.d.ts +1 -1
- package/dist/traceability/staged-diagnostics.d.ts.map +1 -1
- package/dist/traceability/staged-entity-id-style.d.ts +12 -0
- package/dist/traceability/staged-entity-id-style.d.ts.map +1 -0
- package/dist/traceability/staged-entity-id-style.js +68 -0
- package/dist/traceability/symbol-extract.d.ts +24 -7
- package/dist/traceability/symbol-extract.d.ts.map +1 -1
- package/dist/traceability/symbol-extract.js +64 -208
- package/dist/traceability/temp-kb.d.ts.map +1 -1
- package/dist/traceability/temp-kb.js +8 -0
- package/dist/traceability/validate.js +1 -1
- package/dist/types/entities.d.ts +2 -0
- package/dist/types/entities.d.ts.map +1 -1
- package/dist/types/relationships.d.ts +1 -1
- package/dist/types/relationships.d.ts.map +1 -1
- package/dist/utils/entity-id-style.d.ts +27 -0
- package/dist/utils/entity-id-style.d.ts.map +1 -0
- package/dist/utils/entity-id-style.js +81 -0
- package/dist/utils/git-repository-context.d.ts +50 -0
- package/dist/utils/git-repository-context.d.ts.map +1 -0
- package/dist/utils/git-repository-context.js +259 -0
- package/dist/utils/rule-registry.d.ts +5 -0
- package/dist/utils/rule-registry.d.ts.map +1 -1
- package/dist/utils/rule-registry.generated.d.ts +42 -0
- package/dist/utils/rule-registry.generated.d.ts.map +1 -1
- package/dist/utils/rule-registry.generated.js +50 -0
- package/dist/utils/strict-modeling.d.ts +7 -0
- package/dist/utils/strict-modeling.d.ts.map +1 -1
- package/dist/utils/strict-modeling.js +11 -0
- package/package.json +14 -11
- package/schema/entities.pl +60 -1
- package/schema/relationships.pl +17 -4
- package/schema/validation.pl +118 -20
- package/src/public/diagnostic-usage.ts +16 -24
- package/src/public/extractors/symbols-coordinator.ts +1 -0
- package/src/public/impact/analyzer.ts +15 -12
- package/src/public/impact/full-kb-quality.ts +4 -16
- package/src/public/operations/check-executor.ts +13 -2
- package/src/public/operations/check-helpers.ts +29 -3
- package/src/public/operations/contracts.ts +59 -12
- package/src/public/operations/discovery-entities.ts +327 -12
- package/src/public/operations/discovery-executors.ts +110 -61
- package/src/public/operations/migration-plan.ts +57 -0
- package/src/public/operations/predicate-schema-conformance.ts +362 -0
- package/src/public/operations/prolog-json.ts +22 -8
- package/src/public/operations/result-envelope.ts +114 -2
- package/src/public/operations/runtime-types.ts +22 -3
- package/src/public/operations/specs/check-rules.generated.ts +9 -1
- package/src/public/operations/specs/discovery.ts +11 -1
- package/src/public/operations/specs/mutation-schemas.ts +23 -3
- package/src/public/operations/specs/proof.ts +1 -1
- package/src/public/operations/specs/reporting.ts +71 -24
- package/src/public/operations/specs/semantic.ts +79 -17
- package/src/public/operations/specs/upsert.ts +1 -1
- package/src/public/operations/symbol-repair-plan.ts +16 -7
- package/src/public/operations/types.ts +5 -0
- package/src/public/proof-fingerprint.ts +1 -1
- package/src/public/proof-protocol-types.d.ts +1 -1
- package/src/public/proof-protocol.ts +4 -4
- package/src/public/schemas/entity.ts +22 -0
- package/src/public/schemas/relationship.ts +1 -0
- package/src/public/skills/kibi-usage/SKILL.md +10 -3
- package/src/public/skills/kibi-usage/resources/fact-lanes.md +4 -0
- package/src/public/skills/kibi-usage/resources/proof.md +45 -0
- package/src/public/skills/kibi-usage/resources/relationship-directions.md +35 -17
- package/src/public/skills/kibi-usage/resources/source-authoring.md +36 -0
- package/src/public/skills/kibi-usage/resources/workflows.md +52 -1
- package/src/public/symbol-granularity.generated.ts +45 -12
- package/src/public/symbol-granularity.ts +3 -3
- package/src/public/telemetry-acceptance.ts +37 -6
- package/src/schemas/entity.schema.json +32 -0
- package/src/schemas/relationship.schema.json +1 -0
|
@@ -197,6 +197,51 @@ function actionDefaults(input) {
|
|
|
197
197
|
export function migrationAction(input) {
|
|
198
198
|
return actionDefaults(input);
|
|
199
199
|
}
|
|
200
|
+
/**
|
|
201
|
+
* A predicate-schema-conformance finding whose repair is mechanical (move to
|
|
202
|
+
* the only matching schema namespace, rewrite declared aliases) becomes an
|
|
203
|
+
* automatic action carrying the exact kb_upsert input, so it is reviewable in
|
|
204
|
+
* the plan and replayable through either surface.
|
|
205
|
+
*/
|
|
206
|
+
// implements REQ-kibi-predicate-vocabulary-migration
|
|
207
|
+
function predicateSchemaAlignmentAction(diagnostic) {
|
|
208
|
+
if (diagnostic.id !== "rule.predicate-schema-conformance")
|
|
209
|
+
return null;
|
|
210
|
+
const evidence = isRecord(diagnostic.evidence) ? diagnostic.evidence : null;
|
|
211
|
+
const repair = evidence !== null && isRecord(evidence.repair) ? evidence.repair : null;
|
|
212
|
+
if (repair === null ||
|
|
213
|
+
repair.type !== "fact" ||
|
|
214
|
+
typeof repair.id !== "string" ||
|
|
215
|
+
!isRecord(repair.properties)) {
|
|
216
|
+
return null;
|
|
217
|
+
}
|
|
218
|
+
return migrationAction({
|
|
219
|
+
id: `predicate-schema-alignment-${repair.id}`,
|
|
220
|
+
code: PREDICATE_SCHEMA_ALIGNMENT_CODE,
|
|
221
|
+
category: "semantic",
|
|
222
|
+
safety: "automatic",
|
|
223
|
+
autoApplicable: true,
|
|
224
|
+
invocation: { kind: "operation", name: "kb_upsert", input: repair },
|
|
225
|
+
affectedEntityIds: [repair.id],
|
|
226
|
+
affectedFiles: typeof diagnostic.source === "string" ? [diagnostic.source] : [],
|
|
227
|
+
postconditions: [
|
|
228
|
+
{
|
|
229
|
+
rule: "predicate-schema-conformance",
|
|
230
|
+
entityId: repair.id,
|
|
231
|
+
findings: 0,
|
|
232
|
+
},
|
|
233
|
+
],
|
|
234
|
+
evidence: {
|
|
235
|
+
issue: evidence?.issue,
|
|
236
|
+
namespace: evidence?.namespace,
|
|
237
|
+
alignment: evidence?.alignment,
|
|
238
|
+
rewrites: evidence?.rewrites,
|
|
239
|
+
},
|
|
240
|
+
});
|
|
241
|
+
}
|
|
242
|
+
/** Migration code for mechanical predicate namespace/alias repairs. */
|
|
243
|
+
export const PREDICATE_SCHEMA_ALIGNMENT_CODE = "predicate_schema_alignment";
|
|
244
|
+
// implements REQ-agent-guided-migration-orchestration, REQ-kibi-predicate-vocabulary-migration
|
|
200
245
|
export function buildActionsFromCheck(input) {
|
|
201
246
|
const actions = [];
|
|
202
247
|
for (const [index, violation] of (input.violations ?? []).entries()) {
|
|
@@ -225,6 +270,11 @@ export function buildActionsFromCheck(input) {
|
|
|
225
270
|
? diagnostic.suggestion
|
|
226
271
|
: "Review this quality diagnostic.";
|
|
227
272
|
const blocking = diagnostic.blocking === true;
|
|
273
|
+
const predicateRepair = predicateSchemaAlignmentAction(diagnostic);
|
|
274
|
+
if (predicateRepair !== null) {
|
|
275
|
+
actions.push(predicateRepair);
|
|
276
|
+
continue;
|
|
277
|
+
}
|
|
228
278
|
actions.push(migrationAction({
|
|
229
279
|
id: `diagnostic-${id}-${entityId || "workspace"}-${index + 1}`,
|
|
230
280
|
code: `quality_${id}`,
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { type ArgumentRewrite, type UndeclaredArgument } from "../../operations/modeling/predicate-vocabulary.js";
|
|
2
|
+
import type { Violation } from "../../utils/rule-registry.js";
|
|
3
|
+
import type { PrologPort } from "./runtime-types.js";
|
|
4
|
+
type Entity = Readonly<Record<string, unknown>>;
|
|
5
|
+
/**
|
|
6
|
+
* Exact kb_upsert input that repairs one predicate fact mechanically: move it
|
|
7
|
+
* to the only namespace whose schema matches, and/or replace alias spellings
|
|
8
|
+
* with their declared constants. Present only when nothing is left for review.
|
|
9
|
+
*/
|
|
10
|
+
export type PredicateFactRepair = Readonly<{
|
|
11
|
+
type: "fact";
|
|
12
|
+
id: string;
|
|
13
|
+
properties: Readonly<Record<string, unknown>>;
|
|
14
|
+
}>;
|
|
15
|
+
export type PredicateConformanceEvidence = Readonly<{
|
|
16
|
+
factId: string;
|
|
17
|
+
predicateName: string;
|
|
18
|
+
namespace: string;
|
|
19
|
+
arity: number;
|
|
20
|
+
issue: "missing_schema" | "undeclared_constant" | "alias_in_use";
|
|
21
|
+
schemaId: string | null;
|
|
22
|
+
alignment: Readonly<{
|
|
23
|
+
namespace: string;
|
|
24
|
+
schemaId: string;
|
|
25
|
+
origin: "project_local" | "built_in";
|
|
26
|
+
}> | null;
|
|
27
|
+
candidateNamespaces: readonly string[];
|
|
28
|
+
rewrites: readonly ArgumentRewrite[];
|
|
29
|
+
undeclared: readonly UndeclaredArgument[];
|
|
30
|
+
repair: PredicateFactRepair | null;
|
|
31
|
+
}>;
|
|
32
|
+
/**
|
|
33
|
+
* Predicate facts must match a schema (project-local, or the built-in catalog
|
|
34
|
+
* in the default namespace) with the same namespace, name, and arity, and
|
|
35
|
+
* must use declared constants where the schema closes an argument.
|
|
36
|
+
*/
|
|
37
|
+
export declare function evaluatePredicateSchemaConformance(facts: readonly Entity[]): Violation[];
|
|
38
|
+
/** Load every fact once and evaluate predicate conformance. */
|
|
39
|
+
export declare function collectPredicateSchemaConformanceViolations(prolog: Pick<PrologPort, "query">): Promise<Violation[]>;
|
|
40
|
+
export {};
|
|
41
|
+
//# sourceMappingURL=predicate-schema-conformance.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"predicate-schema-conformance.d.ts","sourceRoot":"","sources":["../../../src/public/operations/predicate-schema-conformance.ts"],"names":[],"mappings":"AAmBA,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,kBAAkB,EAMxB,MAAM,mDAAmD,CAAC;AAC3D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAG9D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAsBrD,KAAK,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;AAUhD;;;;GAIG;AAEH,MAAM,MAAM,mBAAmB,GAAG,QAAQ,CAAC;IACzC,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;CAC/C,CAAC,CAAC;AAGH,MAAM,MAAM,4BAA4B,GAAG,QAAQ,CAAC;IAClD,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,gBAAgB,GAAG,qBAAqB,GAAG,cAAc,CAAC;IACjE,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,SAAS,EAAE,QAAQ,CAAC;QAClB,SAAS,EAAE,MAAM,CAAC;QAClB,QAAQ,EAAE,MAAM,CAAC;QACjB,MAAM,EAAE,eAAe,GAAG,UAAU,CAAC;KACtC,CAAC,GAAG,IAAI,CAAC;IACV,mBAAmB,EAAE,SAAS,MAAM,EAAE,CAAC;IACvC,QAAQ,EAAE,SAAS,eAAe,EAAE,CAAC;IACrC,UAAU,EAAE,SAAS,kBAAkB,EAAE,CAAC;IAC1C,MAAM,EAAE,mBAAmB,GAAG,IAAI,CAAC;CACpC,CAAC,CAAC;AA+FH;;;;GAIG;AAEH,wBAAgB,kCAAkC,CAChD,KAAK,EAAE,SAAS,MAAM,EAAE,GACvB,SAAS,EAAE,CA+Gb;AAgDD,+DAA+D;AAE/D,wBAAsB,2CAA2C,CAC/D,MAAM,EAAE,IAAI,CAAC,UAAU,EAAE,OAAO,CAAC,GAChC,OAAO,CAAC,SAAS,EAAE,CAAC,CAGtB"}
|
|
@@ -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
|
+
}
|
|
@@ -13,7 +13,7 @@ export declare class OperationJsonDecodeError extends Error {
|
|
|
13
13
|
readonly prefixCodePoints: readonly number[];
|
|
14
14
|
constructor(errorLabel: string, stage: JsonBindingDecodeStage, rawJson: unknown, cause: unknown);
|
|
15
15
|
}
|
|
16
|
-
export declare function runOperationJsonQuery<T>(prolog: PrologPort, fileName: string, goal: string, errorLabel: string): Promise<T>;
|
|
16
|
+
export declare function runOperationJsonQuery<T>(prolog: PrologPort, fileName: string, goal: string, errorLabel: string, signal?: AbortSignal): Promise<T>;
|
|
17
17
|
export declare function toPrologAtom(value?: string): string;
|
|
18
18
|
export declare function toPrologList(values?: readonly string[]): string;
|
|
19
19
|
//# sourceMappingURL=prolog-json.d.ts.map
|
|
@@ -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,
|
|
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"}
|
|
@@ -30,23 +30,29 @@ function resolveCoreModulePath(fileName) {
|
|
|
30
30
|
const genericOverride = getKbPlPathOverride();
|
|
31
31
|
return path.join(path.dirname(genericOverride ?? resolveKbPlPath()), fileName);
|
|
32
32
|
}
|
|
33
|
-
export async function runOperationJsonQuery(prolog, fileName, goal, errorLabel) {
|
|
33
|
+
export async function runOperationJsonQuery(prolog, fileName, goal, errorLabel, signal) {
|
|
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");
|
|
44
50
|
const typedStatusQuery = prolog.queryStatusJson;
|
|
45
51
|
const result = fileName === "status.pl" && typeof typedStatusQuery === "function"
|
|
46
|
-
? await typedStatusQuery.call(prolog)
|
|
52
|
+
? await typedStatusQuery.call(prolog, signal)
|
|
47
53
|
: oneShotMode
|
|
48
|
-
? await prolog.query(`(use_module('${modulePath}'), ${goal})
|
|
49
|
-
: await runInteractiveModuleQuery(prolog, modulePath, goal, errorLabel);
|
|
54
|
+
? await prolog.query(`(use_module('${modulePath}'), ${goal})`, signal)
|
|
55
|
+
: await runInteractiveModuleQuery(prolog, modulePath, goal, errorLabel, signal);
|
|
50
56
|
if (!result.success) {
|
|
51
57
|
throw new Error(`${errorLabel} query failed: ${result.error ?? "Unknown error"}`);
|
|
52
58
|
}
|
|
@@ -74,12 +80,12 @@ export async function runOperationJsonQuery(prolog, fileName, goal, errorLabel)
|
|
|
74
80
|
}
|
|
75
81
|
return parsed;
|
|
76
82
|
}
|
|
77
|
-
async function runInteractiveModuleQuery(prolog, modulePath, goal, errorLabel) {
|
|
78
|
-
const loadResult = await prolog.query(`use_module('${modulePath}')
|
|
83
|
+
async function runInteractiveModuleQuery(prolog, modulePath, goal, errorLabel, signal) {
|
|
84
|
+
const loadResult = await prolog.query(`use_module('${modulePath}')`, signal);
|
|
79
85
|
if (!loadResult.success) {
|
|
80
86
|
throw new Error(`${errorLabel} module load failed: ${loadResult.error ?? "Unknown error"}`);
|
|
81
87
|
}
|
|
82
|
-
return prolog.query(goal);
|
|
88
|
+
return prolog.query(goal, signal);
|
|
83
89
|
}
|
|
84
90
|
export function toPrologAtom(value) {
|
|
85
91
|
return value === undefined || value === ""
|
|
@@ -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
|
+
}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
+
import type { CapabilityRegistry } from "../../plugins/registry.js";
|
|
1
2
|
import type { PrologErrorRecord } from "../../prolog/error-terms.js";
|
|
2
3
|
import type { BranchAttachment } from "../../utils/branch-resolver.js";
|
|
3
4
|
import type { OperationEffect } from "./types.js";
|
|
4
5
|
export type { OperationEffect } from "./types.js";
|
|
6
|
+
export type { CapabilityRegistry } from "../../plugins/registry.js";
|
|
7
|
+
/** Lazy or pre-materialized capability-plugin registry for an operation. */
|
|
8
|
+
export type OperationPlugins = CapabilityRegistry | (() => Promise<CapabilityRegistry>);
|
|
5
9
|
export type PrologQueryResult = {
|
|
6
10
|
readonly success: boolean;
|
|
7
11
|
readonly bindings: Readonly<Record<string, string>>;
|
|
@@ -107,7 +111,7 @@ export interface PrologPort {
|
|
|
107
111
|
/** Present on the journaled engine; used to distinguish a persistent port from one-shot SWI. */
|
|
108
112
|
storageStatus?(): Promise<PrologQueryResult>;
|
|
109
113
|
/** Typed public freshness query; avoids exposing module loading over RPC. */
|
|
110
|
-
queryStatusJson?(): Promise<PrologQueryResult>;
|
|
114
|
+
queryStatusJson?(signal?: AbortSignal): Promise<PrologQueryResult>;
|
|
111
115
|
}
|
|
112
116
|
export type FilesystemStat = {
|
|
113
117
|
readonly isFile: () => boolean;
|
|
@@ -160,6 +164,8 @@ export type RuntimeOptions = {
|
|
|
160
164
|
readonly fs?: FilesystemPort;
|
|
161
165
|
readonly git?: GitPort;
|
|
162
166
|
readonly net?: NetworkPort;
|
|
167
|
+
/** Optional injectable capability registry (or lazy factory). */
|
|
168
|
+
readonly plugins?: OperationPlugins;
|
|
163
169
|
};
|
|
164
170
|
export type OperationContext = {
|
|
165
171
|
readonly workspaceRoot: string;
|
|
@@ -174,16 +180,25 @@ export type OperationContext = {
|
|
|
174
180
|
readonly sourceFirst?: boolean;
|
|
175
181
|
/** Internal apply-plan capability: source bytes were already approved/published. */
|
|
176
182
|
readonly sourcePlanApplication?: boolean;
|
|
177
|
-
/** Internal
|
|
183
|
+
/** Internal operation capability: a parent operation holds the source lock. */
|
|
178
184
|
readonly sourceMutationLockHeld?: boolean;
|
|
179
185
|
readonly git?: GitPort;
|
|
180
186
|
readonly net?: NetworkPort;
|
|
181
187
|
readonly branchAttachment?: BranchAttachment;
|
|
188
|
+
/** Pre-materialized or lazy capability registry supplied by the host runtime. */
|
|
189
|
+
readonly plugins?: OperationPlugins;
|
|
190
|
+
/** Lazily materialize the workspace capability registry. */
|
|
191
|
+
readonly ensurePlugins?: () => Promise<CapabilityRegistry>;
|
|
182
192
|
};
|
|
183
193
|
export interface RuntimeOperationSpec<TInput = unknown, TResult = unknown> {
|
|
184
194
|
readonly name: string;
|
|
185
195
|
readonly effects: readonly OperationEffect[];
|
|
186
196
|
readonly requiresProlog: boolean;
|
|
197
|
+
/**
|
|
198
|
+
* When true, MCP embeds envelope `data` JSON in tool `content` for hosts that
|
|
199
|
+
* hide `structuredContent` (discovery/proof lookup). Default false.
|
|
200
|
+
*/
|
|
201
|
+
readonly agentVisibleStructuredData?: boolean;
|
|
187
202
|
execute(input: TInput, context: OperationContext): Promise<TResult>;
|
|
188
203
|
}
|
|
189
204
|
export type OperationOutcome = {
|