kibi-cli 0.14.0 → 0.16.1
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/bin/kibi +3 -1
- package/dist/cli-command.d.ts +5 -0
- package/dist/cli-command.d.ts.map +1 -0
- package/dist/cli-command.js +9 -0
- package/dist/cli-errors.d.ts +13 -0
- package/dist/cli-errors.d.ts.map +1 -0
- package/dist/cli-errors.js +26 -0
- package/dist/cli-input.d.ts +6 -0
- package/dist/cli-input.d.ts.map +1 -0
- package/dist/cli-input.js +54 -0
- package/dist/cli-json-command.d.ts +14 -0
- package/dist/cli-json-command.d.ts.map +1 -0
- package/dist/cli-json-command.js +96 -0
- package/dist/cli-protocol.d.ts +12 -0
- package/dist/cli-protocol.d.ts.map +1 -0
- package/dist/cli-protocol.js +37 -0
- package/dist/cli-register-foundation.d.ts +3 -0
- package/dist/cli-register-foundation.d.ts.map +1 -0
- package/dist/cli-register-foundation.js +90 -0
- package/dist/cli-register-maintenance.d.ts +3 -0
- package/dist/cli-register-maintenance.d.ts.map +1 -0
- package/dist/cli-register-maintenance.js +36 -0
- package/dist/cli-register-reporting.d.ts +3 -0
- package/dist/cli-register-reporting.d.ts.map +1 -0
- package/dist/cli-register-reporting.js +101 -0
- package/dist/cli-register-skills.d.ts +3 -0
- package/dist/cli-register-skills.d.ts.map +1 -0
- package/dist/cli-register-skills.js +71 -0
- package/dist/cli-validate.d.ts +18 -0
- package/dist/cli-validate.d.ts.map +1 -0
- package/dist/cli-validate.js +45 -0
- package/dist/cli.d.ts +4 -4
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +48 -211
- package/dist/commands/aggregated-checks.d.ts +1 -1
- package/dist/commands/aggregated-checks.d.ts.map +1 -1
- package/dist/commands/aggregated-checks.js +28 -34
- package/dist/commands/check.d.ts +1 -1
- package/dist/commands/check.d.ts.map +1 -1
- package/dist/commands/check.js +52 -94
- package/dist/commands/coverage.d.ts.map +1 -1
- package/dist/commands/coverage.js +12 -17
- package/dist/commands/discovery-shared.d.ts +2 -1
- package/dist/commands/discovery-shared.d.ts.map +1 -1
- package/dist/commands/discovery-shared.js +6 -18
- package/dist/commands/gaps.d.ts.map +1 -1
- package/dist/commands/gaps.js +15 -19
- package/dist/commands/graph.d.ts.map +1 -1
- package/dist/commands/graph.js +15 -21
- package/dist/commands/query.d.ts +7 -7
- package/dist/commands/query.d.ts.map +1 -1
- package/dist/commands/query.js +98 -204
- package/dist/commands/search.d.ts +4 -4
- package/dist/commands/search.d.ts.map +1 -1
- package/dist/commands/search.js +14 -27
- package/dist/commands/status.d.ts +1 -1
- package/dist/commands/status.d.ts.map +1 -1
- package/dist/commands/status.js +6 -7
- package/dist/commands/sync/manifest.d.ts +1 -1
- package/dist/commands/sync/manifest.d.ts.map +1 -1
- package/dist/commands/sync/manifest.js +9 -17
- package/dist/commands/sync/persistence.d.ts.map +1 -1
- package/dist/commands/sync/persistence.js +22 -1
- package/dist/extractors/markdown.d.ts +14 -2
- package/dist/extractors/markdown.d.ts.map +1 -1
- package/dist/extractors/markdown.js +38 -1
- package/dist/extractors/symbols-ts.d.ts.map +1 -1
- package/dist/extractors/symbols-ts.js +11 -1
- package/dist/operations/autopilot/activation.d.ts +4 -0
- package/dist/operations/autopilot/activation.d.ts.map +1 -0
- package/dist/operations/autopilot/activation.js +130 -0
- package/dist/operations/autopilot/candidate-helpers.d.ts +13 -0
- package/dist/operations/autopilot/candidate-helpers.d.ts.map +1 -0
- package/dist/operations/autopilot/candidate-helpers.js +55 -0
- package/dist/operations/autopilot/candidates.d.ts +4 -0
- package/dist/operations/autopilot/candidates.d.ts.map +1 -0
- package/dist/operations/autopilot/candidates.js +114 -0
- package/dist/operations/autopilot/discovery-evidence.d.ts +10 -0
- package/dist/operations/autopilot/discovery-evidence.d.ts.map +1 -0
- package/dist/operations/autopilot/discovery-evidence.js +158 -0
- package/dist/operations/autopilot/discovery.d.ts +4 -0
- package/dist/operations/autopilot/discovery.d.ts.map +1 -0
- package/dist/operations/autopilot/discovery.js +100 -0
- package/dist/operations/autopilot/generate.d.ts +8 -0
- package/dist/operations/autopilot/generate.d.ts.map +1 -0
- package/dist/operations/autopilot/generate.js +112 -0
- package/dist/operations/autopilot/guidance-actions.d.ts +3 -0
- package/dist/operations/autopilot/guidance-actions.d.ts.map +1 -0
- package/dist/operations/autopilot/guidance-actions.js +79 -0
- package/dist/operations/autopilot/guidance.d.ts +14 -0
- package/dist/operations/autopilot/guidance.d.ts.map +1 -0
- package/dist/operations/autopilot/guidance.js +124 -0
- package/dist/operations/autopilot/markdown-candidates.d.ts +7 -0
- package/dist/operations/autopilot/markdown-candidates.d.ts.map +1 -0
- package/dist/operations/autopilot/markdown-candidates.js +134 -0
- package/dist/operations/autopilot/presentation.d.ts +13 -0
- package/dist/operations/autopilot/presentation.d.ts.map +1 -0
- package/dist/operations/autopilot/presentation.js +91 -0
- package/dist/operations/autopilot/requirement-claims.d.ts +3 -0
- package/dist/operations/autopilot/requirement-claims.d.ts.map +1 -0
- package/dist/operations/autopilot/requirement-claims.js +48 -0
- package/dist/operations/autopilot/types.d.ts +117 -0
- package/dist/operations/autopilot/types.d.ts.map +1 -0
- package/dist/operations/autopilot/types.js +8 -0
- package/dist/operations/modeling/model-requirement.d.ts +10 -0
- package/dist/operations/modeling/model-requirement.d.ts.map +1 -0
- package/dist/operations/modeling/model-requirement.js +108 -0
- package/dist/operations/modeling/predicate-applyplan.d.ts +6 -0
- package/dist/operations/modeling/predicate-applyplan.d.ts.map +1 -0
- package/dist/operations/modeling/predicate-applyplan.js +104 -0
- package/dist/operations/modeling/predicate-catalog-1.d.ts +3 -0
- package/dist/operations/modeling/predicate-catalog-1.d.ts.map +1 -0
- package/dist/operations/modeling/predicate-catalog-1.js +200 -0
- package/dist/operations/modeling/predicate-catalog-2.d.ts +3 -0
- package/dist/operations/modeling/predicate-catalog-2.d.ts.map +1 -0
- package/dist/operations/modeling/predicate-catalog-2.js +197 -0
- package/dist/operations/modeling/predicate-catalog-3.d.ts +3 -0
- package/dist/operations/modeling/predicate-catalog-3.d.ts.map +1 -0
- package/dist/operations/modeling/predicate-catalog-3.js +193 -0
- package/dist/operations/modeling/predicate-catalog-4.d.ts +3 -0
- package/dist/operations/modeling/predicate-catalog-4.d.ts.map +1 -0
- package/dist/operations/modeling/predicate-catalog-4.js +149 -0
- package/dist/operations/modeling/predicate-catalog.d.ts +5 -0
- package/dist/operations/modeling/predicate-catalog.d.ts.map +1 -0
- package/dist/operations/modeling/predicate-catalog.js +29 -0
- package/dist/operations/modeling/predicate-inference-1.d.ts +16 -0
- package/dist/operations/modeling/predicate-inference-1.d.ts.map +1 -0
- package/dist/operations/modeling/predicate-inference-1.js +161 -0
- package/dist/operations/modeling/predicate-inference-2.d.ts +19 -0
- package/dist/operations/modeling/predicate-inference-2.d.ts.map +1 -0
- package/dist/operations/modeling/predicate-inference-2.js +169 -0
- package/dist/operations/modeling/predicate-inference-3.d.ts +15 -0
- package/dist/operations/modeling/predicate-inference-3.d.ts.map +1 -0
- package/dist/operations/modeling/predicate-inference-3.js +163 -0
- package/dist/operations/modeling/predicate-inference.d.ts +5 -0
- package/dist/operations/modeling/predicate-inference.d.ts.map +1 -0
- package/dist/operations/modeling/predicate-inference.js +148 -0
- package/dist/operations/modeling/predicate-loader.d.ts +10 -0
- package/dist/operations/modeling/predicate-loader.d.ts.map +1 -0
- package/dist/operations/modeling/predicate-loader.js +88 -0
- package/dist/operations/modeling/predicate-ranker.d.ts +3 -0
- package/dist/operations/modeling/predicate-ranker.d.ts.map +1 -0
- package/dist/operations/modeling/predicate-ranker.js +24 -0
- package/dist/operations/modeling/predicate-score-1.d.ts +3 -0
- package/dist/operations/modeling/predicate-score-1.d.ts.map +1 -0
- package/dist/operations/modeling/predicate-score-1.js +121 -0
- package/dist/operations/modeling/predicate-score-2.d.ts +3 -0
- package/dist/operations/modeling/predicate-score-2.d.ts.map +1 -0
- package/dist/operations/modeling/predicate-score-2.js +122 -0
- package/dist/operations/modeling/predicate-score-3.d.ts +3 -0
- package/dist/operations/modeling/predicate-score-3.d.ts.map +1 -0
- package/dist/operations/modeling/predicate-score-3.js +54 -0
- package/dist/operations/modeling/predicate-types.d.ts +61 -0
- package/dist/operations/modeling/predicate-types.d.ts.map +1 -0
- package/dist/operations/modeling/predicate-types.js +1 -0
- package/dist/operations/modeling/predicate-usage-hints-1.d.ts +3 -0
- package/dist/operations/modeling/predicate-usage-hints-1.d.ts.map +1 -0
- package/dist/operations/modeling/predicate-usage-hints-1.js +211 -0
- package/dist/operations/modeling/predicate-usage-hints-2.d.ts +3 -0
- package/dist/operations/modeling/predicate-usage-hints-2.d.ts.map +1 -0
- package/dist/operations/modeling/predicate-usage-hints-2.js +209 -0
- package/dist/operations/modeling/predicate-usage-hints-3.d.ts +3 -0
- package/dist/operations/modeling/predicate-usage-hints-3.d.ts.map +1 -0
- package/dist/operations/modeling/predicate-usage-hints-3.js +45 -0
- package/dist/operations/modeling/predicate-utils.d.ts +23 -0
- package/dist/operations/modeling/predicate-utils.d.ts.map +1 -0
- package/dist/operations/modeling/predicate-utils.js +187 -0
- package/dist/operations/modeling/requirement-applyplan.d.ts +4 -0
- package/dist/operations/modeling/requirement-applyplan.d.ts.map +1 -0
- package/dist/operations/modeling/requirement-applyplan.js +44 -0
- package/dist/operations/modeling/requirement-heuristics.d.ts +4 -0
- package/dist/operations/modeling/requirement-heuristics.d.ts.map +1 -0
- package/dist/operations/modeling/requirement-heuristics.js +114 -0
- package/dist/operations/modeling/requirement-modeler.d.ts +8 -0
- package/dist/operations/modeling/requirement-modeler.d.ts.map +1 -0
- package/dist/operations/modeling/requirement-modeler.js +70 -0
- package/dist/operations/modeling/requirement-types.d.ts +49 -0
- package/dist/operations/modeling/requirement-types.d.ts.map +1 -0
- package/dist/operations/modeling/requirement-types.js +1 -0
- package/dist/operations/modeling/requirement-utils.d.ts +10 -0
- package/dist/operations/modeling/requirement-utils.d.ts.map +1 -0
- package/dist/operations/modeling/requirement-utils.js +65 -0
- package/dist/operations/modeling/suggest-predicates.d.ts +6 -0
- package/dist/operations/modeling/suggest-predicates.d.ts.map +1 -0
- package/dist/operations/modeling/suggest-predicates.js +64 -0
- package/dist/operations/mutation/audit.d.ts +6 -0
- package/dist/operations/mutation/audit.d.ts.map +1 -0
- package/dist/operations/mutation/audit.js +22 -0
- package/dist/operations/mutation/contradictions.d.ts +10 -0
- package/dist/operations/mutation/contradictions.d.ts.map +1 -0
- package/dist/operations/mutation/contradictions.js +40 -0
- package/dist/operations/mutation/delete.d.ts +5 -0
- package/dist/operations/mutation/delete.d.ts.map +1 -0
- package/dist/operations/mutation/delete.js +67 -0
- package/dist/operations/mutation/relationships.d.ts +17 -0
- package/dist/operations/mutation/relationships.d.ts.map +1 -0
- package/dist/operations/mutation/relationships.js +134 -0
- package/dist/operations/mutation/save.d.ts +4 -0
- package/dist/operations/mutation/save.d.ts.map +1 -0
- package/dist/operations/mutation/save.js +14 -0
- package/dist/operations/mutation/serialization.d.ts +5 -0
- package/dist/operations/mutation/serialization.d.ts.map +1 -0
- package/dist/operations/mutation/serialization.js +85 -0
- package/dist/operations/mutation/strict-fact.d.ts +4 -0
- package/dist/operations/mutation/strict-fact.d.ts.map +1 -0
- package/dist/operations/mutation/strict-fact.js +67 -0
- package/dist/operations/mutation/symbol-granularity.d.ts +4 -0
- package/dist/operations/mutation/symbol-granularity.d.ts.map +1 -0
- package/dist/operations/mutation/symbol-granularity.js +109 -0
- package/dist/operations/mutation/symbol-refresh.d.ts +10 -0
- package/dist/operations/mutation/symbol-refresh.d.ts.map +1 -0
- package/dist/operations/mutation/symbol-refresh.js +105 -0
- package/dist/operations/mutation/types.d.ts +43 -0
- package/dist/operations/mutation/types.d.ts.map +1 -0
- package/dist/operations/mutation/types.js +1 -0
- package/dist/operations/mutation/upsert.d.ts +5 -0
- package/dist/operations/mutation/upsert.d.ts.map +1 -0
- package/dist/operations/mutation/upsert.js +103 -0
- package/dist/operations/mutation/validate-upsert.d.ts +5 -0
- package/dist/operations/mutation/validate-upsert.d.ts.map +1 -0
- package/dist/operations/mutation/validate-upsert.js +50 -0
- package/dist/operations/mutation/validation.d.ts +5 -0
- package/dist/operations/mutation/validation.d.ts.map +1 -0
- package/dist/operations/mutation/validation.js +107 -0
- package/dist/operations/mutation/warnings.d.ts +4 -0
- package/dist/operations/mutation/warnings.d.ts.map +1 -0
- package/dist/operations/mutation/warnings.js +17 -0
- package/dist/operations/semantic-advisor/analysis-receipt.d.ts +5 -0
- package/dist/operations/semantic-advisor/analysis-receipt.d.ts.map +1 -0
- package/dist/operations/semantic-advisor/analysis-receipt.js +112 -0
- package/dist/operations/semantic-advisor/analyze-prose.d.ts +5 -0
- package/dist/operations/semantic-advisor/analyze-prose.d.ts.map +1 -0
- package/dist/operations/semantic-advisor/analyze-prose.js +271 -0
- package/dist/operations/semantic-advisor/clauses.d.ts +10 -0
- package/dist/operations/semantic-advisor/clauses.d.ts.map +1 -0
- package/dist/operations/semantic-advisor/clauses.js +43 -0
- package/dist/operations/semantic-advisor/observation-plan.d.ts +3 -0
- package/dist/operations/semantic-advisor/observation-plan.d.ts.map +1 -0
- package/dist/operations/semantic-advisor/observation-plan.js +19 -0
- package/dist/operations/semantic-advisor/predicate-rule.d.ts +14 -0
- package/dist/operations/semantic-advisor/predicate-rule.d.ts.map +1 -0
- package/dist/operations/semantic-advisor/predicate-rule.js +22 -0
- package/dist/operations/semantic-advisor/predicate-rules-core.d.ts +79 -0
- package/dist/operations/semantic-advisor/predicate-rules-core.d.ts.map +1 -0
- package/dist/operations/semantic-advisor/predicate-rules-core.js +140 -0
- package/dist/operations/semantic-advisor/predicate-rules-policy.d.ts +83 -0
- package/dist/operations/semantic-advisor/predicate-rules-policy.d.ts.map +1 -0
- package/dist/operations/semantic-advisor/predicate-rules-policy.js +150 -0
- package/dist/operations/semantic-advisor/predicate-rules-product-tail.d.ts +48 -0
- package/dist/operations/semantic-advisor/predicate-rules-product-tail.d.ts.map +1 -0
- package/dist/operations/semantic-advisor/predicate-rules-product-tail.js +102 -0
- package/dist/operations/semantic-advisor/predicate-rules-product.d.ts +71 -0
- package/dist/operations/semantic-advisor/predicate-rules-product.d.ts.map +1 -0
- package/dist/operations/semantic-advisor/predicate-rules-product.js +133 -0
- package/dist/operations/semantic-advisor/prose-coverage-evaluator.d.ts +29 -0
- package/dist/operations/semantic-advisor/prose-coverage-evaluator.d.ts.map +1 -0
- package/dist/operations/semantic-advisor/prose-coverage-evaluator.js +54 -0
- package/dist/operations/semantic-advisor/shared.d.ts +18 -0
- package/dist/operations/semantic-advisor/shared.d.ts.map +1 -0
- package/dist/operations/semantic-advisor/shared.js +209 -0
- package/dist/operations/semantic-advisor/strict-count-rules.d.ts +4 -0
- package/dist/operations/semantic-advisor/strict-count-rules.d.ts.map +1 -0
- package/dist/operations/semantic-advisor/strict-count-rules.js +62 -0
- package/dist/operations/semantic-advisor/strict-rules.d.ts +4 -0
- package/dist/operations/semantic-advisor/strict-rules.d.ts.map +1 -0
- package/dist/operations/semantic-advisor/strict-rules.js +106 -0
- package/dist/operations/semantic-advisor/types.d.ts +135 -0
- package/dist/operations/semantic-advisor/types.d.ts.map +1 -0
- package/dist/operations/semantic-advisor/types.js +1 -0
- package/dist/prolog/codec.d.ts.map +1 -1
- package/dist/prolog/codec.js +9 -2
- package/dist/prolog.d.ts +5 -0
- package/dist/prolog.d.ts.map +1 -1
- package/dist/prolog.js +82 -30
- package/dist/public/impact/diagnostics.d.ts.map +1 -1
- package/dist/public/impact/diagnostics.js +8 -4
- package/dist/public/impact/full-kb-quality.d.ts +1 -1
- package/dist/public/impact/full-kb-quality.d.ts.map +1 -1
- package/dist/public/impact/full-kb-quality.js +34 -1
- package/dist/public/impact/requirement-quality.d.ts.map +1 -1
- package/dist/public/impact/requirement-quality.js +6 -23
- package/dist/public/operations/catalog.d.ts +907 -0
- package/dist/public/operations/catalog.d.ts.map +1 -0
- package/dist/public/operations/catalog.js +42 -0
- package/dist/public/operations/check-executor.d.ts +21 -0
- package/dist/public/operations/check-executor.d.ts.map +1 -0
- package/dist/public/operations/check-executor.js +111 -0
- package/dist/public/operations/check-format-shared.d.ts +36 -0
- package/dist/public/operations/check-format-shared.d.ts.map +1 -0
- package/dist/public/operations/check-format-shared.js +107 -0
- package/dist/public/operations/check-helpers.d.ts +10 -0
- package/dist/public/operations/check-helpers.d.ts.map +1 -0
- package/dist/public/operations/check-helpers.js +107 -0
- package/dist/public/operations/discovery-entities.d.ts +14 -0
- package/dist/public/operations/discovery-entities.d.ts.map +1 -0
- package/dist/public/operations/discovery-entities.js +91 -0
- package/dist/public/operations/discovery-executors.d.ts +39 -0
- package/dist/public/operations/discovery-executors.d.ts.map +1 -0
- package/dist/public/operations/discovery-executors.js +101 -0
- package/dist/public/operations/index.d.ts +20 -0
- package/dist/public/operations/index.d.ts.map +1 -0
- package/dist/public/operations/index.js +18 -0
- package/dist/public/operations/node-ports.d.ts +15 -0
- package/dist/public/operations/node-ports.d.ts.map +1 -0
- package/dist/public/operations/node-ports.js +57 -0
- package/dist/public/operations/prolog-json.d.ts +5 -0
- package/dist/public/operations/prolog-json.d.ts.map +1 -0
- package/dist/public/operations/prolog-json.js +44 -0
- package/dist/public/operations/runtime-types.d.ts +69 -0
- package/dist/public/operations/runtime-types.d.ts.map +1 -0
- package/dist/public/operations/runtime-types.js +17 -0
- package/dist/public/operations/specs/autopilot.d.ts +82 -0
- package/dist/public/operations/specs/autopilot.d.ts.map +1 -0
- package/dist/public/operations/specs/autopilot.js +72 -0
- package/dist/public/operations/specs/check.d.ts +51 -0
- package/dist/public/operations/specs/check.d.ts.map +1 -0
- package/dist/public/operations/specs/check.js +62 -0
- package/dist/public/operations/specs/discovery.d.ts +94 -0
- package/dist/public/operations/specs/discovery.d.ts.map +1 -0
- package/dist/public/operations/specs/discovery.js +98 -0
- package/dist/public/operations/specs/modeling.d.ts +126 -0
- package/dist/public/operations/specs/modeling.d.ts.map +1 -0
- package/dist/public/operations/specs/modeling.js +117 -0
- package/dist/public/operations/specs/mutation-schemas.d.ts +233 -0
- package/dist/public/operations/specs/mutation-schemas.d.ts.map +1 -0
- package/dist/public/operations/specs/mutation-schemas.js +267 -0
- package/dist/public/operations/specs/mutation.d.ts +56 -0
- package/dist/public/operations/specs/mutation.d.ts.map +1 -0
- package/dist/public/operations/specs/mutation.js +44 -0
- package/dist/public/operations/specs/reporting.d.ts +185 -0
- package/dist/public/operations/specs/reporting.d.ts.map +1 -0
- package/dist/public/operations/specs/reporting.js +158 -0
- package/dist/public/operations/specs/semantic.d.ts +53 -0
- package/dist/public/operations/specs/semantic.d.ts.map +1 -0
- package/dist/public/operations/specs/semantic.js +105 -0
- package/dist/public/operations/specs/skills.d.ts +70 -0
- package/dist/public/operations/specs/skills.d.ts.map +1 -0
- package/dist/public/operations/specs/skills.js +107 -0
- package/dist/public/operations/specs/sparql.d.ts +39 -0
- package/dist/public/operations/specs/sparql.d.ts.map +1 -0
- package/dist/public/operations/specs/sparql.js +121 -0
- package/dist/public/operations/specs/upsert.d.ts +256 -0
- package/dist/public/operations/specs/upsert.d.ts.map +1 -0
- package/dist/public/operations/specs/upsert.js +27 -0
- package/dist/public/operations/types.d.ts +24 -0
- package/dist/public/operations/types.d.ts.map +1 -0
- package/dist/public/operations/types.js +1 -0
- package/dist/public/schemas/entity.d.ts.map +1 -1
- package/dist/public/schemas/entity.js +27 -0
- package/dist/public/skill-system/errors.d.ts +19 -0
- package/dist/public/skill-system/errors.d.ts.map +1 -0
- package/dist/public/skill-system/errors.js +36 -0
- package/dist/public/skill-system/loader.d.ts +9 -0
- package/dist/public/skill-system/loader.d.ts.map +1 -0
- package/dist/public/skill-system/loader.js +76 -0
- package/dist/public/skill-system/paths.d.ts +6 -0
- package/dist/public/skill-system/paths.d.ts.map +1 -0
- package/dist/public/skill-system/paths.js +25 -0
- package/dist/public/skill-system/types.d.ts +15 -0
- package/dist/public/skill-system/types.d.ts.map +1 -0
- package/dist/public/skill-system/types.js +1 -0
- package/dist/public/skill-system/validation.d.ts +10 -0
- package/dist/public/skill-system/validation.d.ts.map +1 -0
- package/dist/public/skill-system/validation.js +119 -0
- package/dist/public/skills/init-kibi/SKILL.md +62 -0
- package/dist/public/skills/kibi-freshness/SKILL.md +44 -0
- package/dist/public/skills/kibi-traceability/SKILL.md +54 -0
- package/dist/public/skills/kibi-usage/SKILL.md +119 -99
- package/dist/public/skills/kibi-usage/resources/fact-lanes.md +102 -0
- package/dist/public/skills/kibi-usage/resources/operation-access.md +44 -0
- package/dist/public/skills/kibi-usage/resources/workflows.md +26 -3
- package/dist/public/skills.d.ts +4 -41
- package/dist/public/skills.d.ts.map +1 -1
- package/dist/public/skills.js +3 -270
- package/dist/runtime/cli-runtime.d.ts +3 -0
- package/dist/runtime/cli-runtime.d.ts.map +1 -0
- package/dist/runtime/cli-runtime.js +96 -0
- package/dist/schemas/entity.schema.json +23 -0
- package/dist/traceability/staged-diagnostics.d.ts +1 -1
- package/dist/traceability/staged-diagnostics.d.ts.map +1 -1
- package/dist/traceability/staged-symbols-manifest.d.ts +1 -0
- package/dist/traceability/staged-symbols-manifest.d.ts.map +1 -1
- package/dist/traceability/staged-symbols-manifest.js +38 -27
- package/dist/traceability/symbol-extract.d.ts.map +1 -1
- package/dist/traceability/symbol-extract.js +17 -1
- package/dist/traceability/temp-kb.d.ts.map +1 -1
- package/dist/traceability/temp-kb.js +34 -1
- package/dist/types/entities.d.ts +3 -0
- package/dist/types/entities.d.ts.map +1 -1
- package/dist/utils/rule-registry.d.ts.map +1 -1
- package/dist/utils/rule-registry.js +6 -0
- package/package.json +56 -2
- package/src/public/impact/diagnostics.ts +18 -11
- package/src/public/impact/full-kb-quality.ts +30 -3
- package/src/public/impact/requirement-quality.ts +6 -26
- package/src/public/operations/catalog.ts +60 -0
- package/src/public/operations/check-executor.ts +185 -0
- package/src/public/operations/check-format-shared.ts +178 -0
- package/src/public/operations/check-helpers.ts +141 -0
- package/src/public/operations/discovery-entities.ts +122 -0
- package/src/public/operations/discovery-executors.ts +176 -0
- package/src/public/operations/index.ts +19 -0
- package/src/public/operations/node-ports.ts +78 -0
- package/src/public/operations/prolog-json.ts +71 -0
- package/src/public/operations/runtime-types.ts +106 -0
- package/src/public/operations/specs/autopilot.ts +98 -0
- package/src/public/operations/specs/check.ts +72 -0
- package/src/public/operations/specs/discovery.ts +126 -0
- package/src/public/operations/specs/modeling.ts +154 -0
- package/src/public/operations/specs/mutation-schemas.ts +296 -0
- package/src/public/operations/specs/mutation.ts +58 -0
- package/src/public/operations/specs/reporting.ts +249 -0
- package/src/public/operations/specs/semantic.ts +135 -0
- package/src/public/operations/specs/skills.ts +142 -0
- package/src/public/operations/specs/sparql.ts +149 -0
- package/src/public/operations/specs/upsert.ts +40 -0
- package/src/public/operations/types.ts +57 -0
- package/src/public/schemas/entity.ts +27 -0
- package/src/public/skill-system/errors.ts +38 -0
- package/src/public/skill-system/loader.ts +108 -0
- package/src/public/skill-system/paths.ts +27 -0
- package/src/public/skill-system/types.ts +14 -0
- package/src/public/skill-system/validation.ts +175 -0
- package/src/public/skills/init-kibi/SKILL.md +62 -0
- package/src/public/skills/kibi-freshness/SKILL.md +44 -0
- package/src/public/skills/kibi-traceability/SKILL.md +54 -0
- package/src/public/skills/kibi-usage/SKILL.md +119 -99
- package/src/public/skills/kibi-usage/resources/fact-lanes.md +102 -0
- package/src/public/skills/kibi-usage/resources/operation-access.md +44 -0
- package/src/public/skills/kibi-usage/resources/workflows.md +26 -3
- package/src/public/skills.ts +18 -427
- package/src/schemas/entity.schema.json +23 -0
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { RelationshipInput } from "./types.js";
|
|
2
|
+
export declare function buildPropertyList(entity: Readonly<Record<string, unknown>>): string;
|
|
3
|
+
export declare function buildRelationshipMetadata(rel: RelationshipInput): string;
|
|
4
|
+
export declare function parsePrologList(list: string): string[];
|
|
5
|
+
//# sourceMappingURL=serialization.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"serialization.d.ts","sourceRoot":"","sources":["../../../src/operations/mutation/serialization.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AA0CpD,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GACxC,MAAM,CAMR;AAGD,wBAAgB,yBAAyB,CAAC,GAAG,EAAE,iBAAiB,GAAG,MAAM,CAOxE;AAGD,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAkBtD"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { toPrologAtom, toPrologString } from "../../prolog/codec.js";
|
|
2
|
+
const ATOM_FIELDS = [
|
|
3
|
+
"status",
|
|
4
|
+
"owner",
|
|
5
|
+
"priority",
|
|
6
|
+
"severity",
|
|
7
|
+
"symbol_role",
|
|
8
|
+
"granularity_reason",
|
|
9
|
+
"verification_scope",
|
|
10
|
+
"verification_perspective",
|
|
11
|
+
"fact_kind",
|
|
12
|
+
"operator",
|
|
13
|
+
"value_type",
|
|
14
|
+
"polarity",
|
|
15
|
+
];
|
|
16
|
+
const STRING_FIELDS = [
|
|
17
|
+
"id",
|
|
18
|
+
"title",
|
|
19
|
+
"created_at",
|
|
20
|
+
"updated_at",
|
|
21
|
+
"source",
|
|
22
|
+
"text_ref",
|
|
23
|
+
];
|
|
24
|
+
function serializeValue(key, value) {
|
|
25
|
+
if (key === "id" && typeof value === "string") {
|
|
26
|
+
return `'${value.replaceAll("'", "''")}'`;
|
|
27
|
+
}
|
|
28
|
+
if (Array.isArray(value))
|
|
29
|
+
return JSON.stringify(value);
|
|
30
|
+
if (typeof value === "string") {
|
|
31
|
+
return ATOM_FIELDS.includes(key)
|
|
32
|
+
? toPrologAtom(value)
|
|
33
|
+
: toPrologString(value);
|
|
34
|
+
}
|
|
35
|
+
if (typeof value === "number")
|
|
36
|
+
return String(value);
|
|
37
|
+
if (typeof value === "boolean")
|
|
38
|
+
return value ? "true" : "false";
|
|
39
|
+
return toPrologString(String(value));
|
|
40
|
+
}
|
|
41
|
+
// implements REQ-kibi-operation-interface-parity
|
|
42
|
+
export function buildPropertyList(entity) {
|
|
43
|
+
const pairs = Object.entries(entity).flatMap(([key, value]) => {
|
|
44
|
+
if (key === "type" || value === undefined || value === null)
|
|
45
|
+
return [];
|
|
46
|
+
return [`${key}=${serializeValue(key, value)}`];
|
|
47
|
+
});
|
|
48
|
+
return `[${pairs.join(", ")}]`;
|
|
49
|
+
}
|
|
50
|
+
// implements REQ-kibi-operation-interface-parity
|
|
51
|
+
export function buildRelationshipMetadata(rel) {
|
|
52
|
+
const pairs = Object.entries(rel).flatMap(([key, value]) => {
|
|
53
|
+
if (key === "type" || key === "from" || key === "to")
|
|
54
|
+
return [];
|
|
55
|
+
if (typeof value === "number")
|
|
56
|
+
return [`${key}=${String(value)}`];
|
|
57
|
+
return [`${key}=${toPrologString(String(value))}`];
|
|
58
|
+
});
|
|
59
|
+
return `[${pairs.join(", ")}]`;
|
|
60
|
+
}
|
|
61
|
+
// implements REQ-kibi-operation-interface-parity
|
|
62
|
+
export function parsePrologList(list) {
|
|
63
|
+
const match = list.trim().match(/^\[(.*)\]$/s);
|
|
64
|
+
if (!match?.[1])
|
|
65
|
+
return [];
|
|
66
|
+
const items = [];
|
|
67
|
+
let depth = 0;
|
|
68
|
+
let current = "";
|
|
69
|
+
for (const char of match[1]) {
|
|
70
|
+
if (char === "[")
|
|
71
|
+
depth += 1;
|
|
72
|
+
if (char === "]")
|
|
73
|
+
depth -= 1;
|
|
74
|
+
if (char === "," && depth === 0) {
|
|
75
|
+
items.push(current.trim().replace(/^'|'$/g, ""));
|
|
76
|
+
current = "";
|
|
77
|
+
}
|
|
78
|
+
else {
|
|
79
|
+
current += char;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
if (current.trim())
|
|
83
|
+
items.push(current.trim().replace(/^'|'$/g, ""));
|
|
84
|
+
return items;
|
|
85
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare function valueFieldHint(value: unknown): string;
|
|
2
|
+
export declare function factKindShapeHints(entity: Readonly<Record<string, unknown>>): string[];
|
|
3
|
+
export declare function validateFactModelingShape(entity: Readonly<Record<string, unknown>>): void;
|
|
4
|
+
//# sourceMappingURL=strict-fact.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"strict-fact.d.ts","sourceRoot":"","sources":["../../../src/operations/mutation/strict-fact.ts"],"names":[],"mappings":"AAQA,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAarD;AAGD,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GACxC,MAAM,EAAE,CAyCV;AAGD,wBAAgB,yBAAyB,CACvC,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GACxC,IAAI,CAKN"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
const PROPERTY_VALUE_FIELDS = [
|
|
2
|
+
"value_string",
|
|
3
|
+
"value_int",
|
|
4
|
+
"value_number",
|
|
5
|
+
"value_bool",
|
|
6
|
+
];
|
|
7
|
+
// implements REQ-kibi-operation-interface-parity
|
|
8
|
+
export function valueFieldHint(value) {
|
|
9
|
+
if (typeof value === "boolean") {
|
|
10
|
+
return `Use value_type: "bool" plus value_bool: ${String(value)}.`;
|
|
11
|
+
}
|
|
12
|
+
if (typeof value === "number") {
|
|
13
|
+
return Number.isInteger(value)
|
|
14
|
+
? `Use value_type: "int" plus value_int: ${String(value)}.`
|
|
15
|
+
: `Use value_type: "number" plus value_number: ${String(value)}.`;
|
|
16
|
+
}
|
|
17
|
+
if (typeof value === "string") {
|
|
18
|
+
return `Use value_type: "string" plus value_string: ${JSON.stringify(value)}.`;
|
|
19
|
+
}
|
|
20
|
+
return "Use value_type plus exactly one of value_string, value_int, value_number, or value_bool.";
|
|
21
|
+
}
|
|
22
|
+
// implements REQ-kibi-operation-interface-parity
|
|
23
|
+
export function factKindShapeHints(entity) {
|
|
24
|
+
if (entity.type !== "fact")
|
|
25
|
+
return [];
|
|
26
|
+
if (entity.fact_kind === "property_value") {
|
|
27
|
+
const missing = [
|
|
28
|
+
"subject_key",
|
|
29
|
+
"property_key",
|
|
30
|
+
"operator",
|
|
31
|
+
"value_type",
|
|
32
|
+
].filter((field) => entity[field] === undefined);
|
|
33
|
+
const present = PROPERTY_VALUE_FIELDS.filter((field) => entity[field] !== undefined);
|
|
34
|
+
const hints = [];
|
|
35
|
+
if (missing.length > 0) {
|
|
36
|
+
hints.push(`fact_kind 'property_value' requires ${missing.join(", ")}.`);
|
|
37
|
+
}
|
|
38
|
+
if (present.length !== 1) {
|
|
39
|
+
hints.push("fact_kind 'property_value' requires exactly one typed value field: value_string, value_int, value_number, or value_bool.");
|
|
40
|
+
}
|
|
41
|
+
if (hints.length > 0) {
|
|
42
|
+
hints.push("Next action: use kb_model_requirement for prose claims, or provide subject_key, property_key, operator, value_type, and one value_* field in kb_upsert.properties.");
|
|
43
|
+
}
|
|
44
|
+
return hints;
|
|
45
|
+
}
|
|
46
|
+
if (entity.fact_kind !== "predicate")
|
|
47
|
+
return [];
|
|
48
|
+
const args = entity.predicate_args;
|
|
49
|
+
const missing = [
|
|
50
|
+
...(entity.predicate_name === undefined ? ["predicate_name"] : []),
|
|
51
|
+
...(!Array.isArray(args) || args.length === 0 ? ["predicate_args"] : []),
|
|
52
|
+
...(entity.canonical_key === undefined ? ["canonical_key"] : []),
|
|
53
|
+
];
|
|
54
|
+
return missing.length === 0
|
|
55
|
+
? []
|
|
56
|
+
: [
|
|
57
|
+
`fact_kind 'predicate' requires ${missing.join(", ")}.`,
|
|
58
|
+
"Next action: call kb_suggest_predicates before hand-writing ontology predicate facts.",
|
|
59
|
+
];
|
|
60
|
+
}
|
|
61
|
+
// implements REQ-kibi-operation-interface-parity
|
|
62
|
+
export function validateFactModelingShape(entity) {
|
|
63
|
+
const hints = factKindShapeHints(entity);
|
|
64
|
+
if (hints.length > 0) {
|
|
65
|
+
throw new Error(`Entity validation failed: ${hints.join("; ")}`);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { OperationContext } from "../../public/operations/runtime-types.js";
|
|
2
|
+
import type { RelationshipInput } from "./types.js";
|
|
3
|
+
export declare function validateSymbolGranularity(entity: Readonly<Record<string, unknown>>, relationships: readonly RelationshipInput[], context: OperationContext): Promise<void>;
|
|
4
|
+
//# sourceMappingURL=symbol-granularity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"symbol-granularity.d.ts","sourceRoot":"","sources":["../../../src/operations/mutation/symbol-granularity.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0CAA0C,CAAC;AAUjF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAiEpD,wBAAsB,yBAAyB,CAC7C,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,EACzC,aAAa,EAAE,SAAS,iBAAiB,EAAE,EAC3C,OAAO,EAAE,gBAAgB,GACxB,OAAO,CAAC,IAAI,CAAC,CAqCf"}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import path from "node:path";
|
|
2
|
+
import { Project, ScriptKind } from "ts-morph";
|
|
3
|
+
import { getBehavioralSymbolNames, getNonBehavioralSymbolNames, inferSymbolRole, isAllowedGranularityReason, isTraceabilityRelationshipType, } from "../../public/symbol-granularity.js";
|
|
4
|
+
function scriptKind(filePath) {
|
|
5
|
+
const extension = path.extname(filePath).toLowerCase();
|
|
6
|
+
if (extension === ".tsx")
|
|
7
|
+
return ScriptKind.TSX;
|
|
8
|
+
if ([".ts", ".mts", ".cts"].includes(extension))
|
|
9
|
+
return ScriptKind.TS;
|
|
10
|
+
if (extension === ".jsx")
|
|
11
|
+
return ScriptKind.JSX;
|
|
12
|
+
return ScriptKind.JS;
|
|
13
|
+
}
|
|
14
|
+
function candidate(name, kind) {
|
|
15
|
+
return { name, kind, role: inferSymbolRole(kind) };
|
|
16
|
+
}
|
|
17
|
+
function candidates(filePath, content) {
|
|
18
|
+
const source = new Project({
|
|
19
|
+
skipAddingFilesFromTsConfig: true,
|
|
20
|
+
}).createSourceFile(`${filePath}::granularity`, content, {
|
|
21
|
+
overwrite: true,
|
|
22
|
+
scriptKind: scriptKind(filePath),
|
|
23
|
+
});
|
|
24
|
+
const found = [];
|
|
25
|
+
const methodCounts = new Map();
|
|
26
|
+
const bareMethods = new Map();
|
|
27
|
+
for (const fn of source.getFunctions()) {
|
|
28
|
+
const name = fn.getName();
|
|
29
|
+
if (fn.isExported() && name)
|
|
30
|
+
found.push(candidate(name, "function"));
|
|
31
|
+
}
|
|
32
|
+
for (const cls of source.getClasses()) {
|
|
33
|
+
if (!cls.isExported())
|
|
34
|
+
continue;
|
|
35
|
+
const className = cls.getName();
|
|
36
|
+
if (className)
|
|
37
|
+
found.push(candidate(className, "class"));
|
|
38
|
+
for (const method of cls.getMethods()) {
|
|
39
|
+
const name = method.getName();
|
|
40
|
+
if (className)
|
|
41
|
+
found.push(candidate(`${className}.${name}`, "method"));
|
|
42
|
+
bareMethods.set(name, candidate(name, "method"));
|
|
43
|
+
methodCounts.set(name, (methodCounts.get(name) ?? 0) + 1);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
for (const [name, count] of methodCounts) {
|
|
47
|
+
const method = bareMethods.get(name);
|
|
48
|
+
if (count === 1 && method)
|
|
49
|
+
found.push(method);
|
|
50
|
+
}
|
|
51
|
+
for (const item of source.getInterfaces()) {
|
|
52
|
+
if (item.isExported())
|
|
53
|
+
found.push(candidate(item.getName(), "interface"));
|
|
54
|
+
}
|
|
55
|
+
for (const item of source.getTypeAliases()) {
|
|
56
|
+
if (item.isExported())
|
|
57
|
+
found.push(candidate(item.getName(), "type"));
|
|
58
|
+
}
|
|
59
|
+
for (const item of source.getEnums()) {
|
|
60
|
+
if (item.isExported())
|
|
61
|
+
found.push(candidate(item.getName(), "enum"));
|
|
62
|
+
}
|
|
63
|
+
return found.sort((left, right) => left.name.localeCompare(right.name));
|
|
64
|
+
}
|
|
65
|
+
function summarized(names) {
|
|
66
|
+
const shown = names.slice(0, 10);
|
|
67
|
+
const hidden = names.length - shown.length;
|
|
68
|
+
return `${shown.join(", ")}${hidden > 0 ? `, and ${hidden} more` : ""}`;
|
|
69
|
+
}
|
|
70
|
+
// implements REQ-kibi-operation-interface-parity
|
|
71
|
+
export async function validateSymbolGranularity(entity, relationships, context) {
|
|
72
|
+
if (entity.type !== "symbol")
|
|
73
|
+
return;
|
|
74
|
+
if (!relationships.some((relationship) => isTraceabilityRelationshipType(relationship.type)))
|
|
75
|
+
return;
|
|
76
|
+
if (isAllowedGranularityReason(entity.granularity_reason))
|
|
77
|
+
return;
|
|
78
|
+
if (typeof entity.sourceFile !== "string" || typeof entity.title !== "string")
|
|
79
|
+
return;
|
|
80
|
+
const fs = context.fs;
|
|
81
|
+
if (fs === undefined)
|
|
82
|
+
return;
|
|
83
|
+
const sourcePath = path.isAbsolute(entity.sourceFile)
|
|
84
|
+
? entity.sourceFile
|
|
85
|
+
: path.resolve(context.workspaceRoot, entity.sourceFile);
|
|
86
|
+
let content;
|
|
87
|
+
try {
|
|
88
|
+
const stat = await fs.stat(sourcePath);
|
|
89
|
+
if (!stat.isFile())
|
|
90
|
+
return;
|
|
91
|
+
content = await fs.readFile(sourcePath);
|
|
92
|
+
}
|
|
93
|
+
catch (error) {
|
|
94
|
+
if (error instanceof Error)
|
|
95
|
+
return;
|
|
96
|
+
throw error;
|
|
97
|
+
}
|
|
98
|
+
const available = candidates(entity.sourceFile, content);
|
|
99
|
+
if (available.some(({ name }) => name === entity.title))
|
|
100
|
+
return;
|
|
101
|
+
const behavioral = getBehavioralSymbolNames(available);
|
|
102
|
+
if (behavioral.length === 0)
|
|
103
|
+
return;
|
|
104
|
+
const nonBehavioral = getNonBehavioralSymbolNames(available);
|
|
105
|
+
const ignored = nonBehavioral.length > 0
|
|
106
|
+
? ` Non-behavioral symbols in the file were ignored for this decision: ${summarized(nonBehavioral)}.`
|
|
107
|
+
: "";
|
|
108
|
+
throw new Error(`Symbol ${String(entity.id)} links ${entity.sourceFile} coarsely while granular symbols are available (behavioral only): ${summarized(behavioral)}. Move relationships to a behavioral symbol, add a manifest behavioral anchor, or set granularity_reason to config-artifact, module-level-behavior, extractor-miss, or legacy-link.${ignored}`);
|
|
109
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { OperationContext } from "../../public/operations/runtime-types.js";
|
|
2
|
+
type RefreshResult = {
|
|
3
|
+
readonly refreshed: boolean;
|
|
4
|
+
readonly found: boolean;
|
|
5
|
+
};
|
|
6
|
+
type RefreshImplementation = (symbolId: string, context: OperationContext) => Promise<RefreshResult>;
|
|
7
|
+
export declare function refreshSymbolCoordinates(symbolId: string, context: OperationContext): Promise<RefreshResult>;
|
|
8
|
+
export declare function setSymbolRefreshForTests(refresh: RefreshImplementation | undefined): void;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=symbol-refresh.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"symbol-refresh.d.ts","sourceRoot":"","sources":["../../../src/operations/mutation/symbol-refresh.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0CAA0C,CAAC;AAUjF,KAAK,aAAa,GAAG;IAAE,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAA;CAAE,CAAC;AAC9E,KAAK,qBAAqB,GAAG,CAC3B,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,gBAAgB,KACtB,OAAO,CAAC,aAAa,CAAC,CAAC;AAsH5B,wBAAsB,wBAAwB,CAC5C,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,gBAAgB,GACxB,OAAO,CAAC,aAAa,CAAC,CAExB;AAGD,wBAAgB,wBAAwB,CACtC,OAAO,EAAE,qBAAqB,GAAG,SAAS,GACzC,IAAI,CAEN"}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import path from "node:path";
|
|
2
|
+
import { dump as dumpYaml, load as parseYaml } from "js-yaml";
|
|
3
|
+
import { enrichSymbolCoordinates } from "../../public/extractors/symbols-coordinator.js";
|
|
4
|
+
function record(value) {
|
|
5
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
6
|
+
}
|
|
7
|
+
function coordinate(value) {
|
|
8
|
+
if (!record(value))
|
|
9
|
+
return null;
|
|
10
|
+
const { sourceFile, sourceLine, sourceColumn, sourceEndLine, sourceEndColumn, } = value;
|
|
11
|
+
return typeof sourceFile === "string" &&
|
|
12
|
+
typeof sourceLine === "number" &&
|
|
13
|
+
typeof sourceColumn === "number" &&
|
|
14
|
+
typeof sourceEndLine === "number" &&
|
|
15
|
+
typeof sourceEndColumn === "number"
|
|
16
|
+
? { sourceFile, sourceLine, sourceColumn, sourceEndLine, sourceEndColumn }
|
|
17
|
+
: null;
|
|
18
|
+
}
|
|
19
|
+
async function exists(context, filePath) {
|
|
20
|
+
try {
|
|
21
|
+
return context.fs?.stat(filePath).then((stat) => stat.isFile()) ?? false;
|
|
22
|
+
}
|
|
23
|
+
catch (error) {
|
|
24
|
+
if (error instanceof Error)
|
|
25
|
+
return false;
|
|
26
|
+
throw error;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
async function manifestPath(context) {
|
|
30
|
+
const fs = context.fs;
|
|
31
|
+
if (fs === undefined)
|
|
32
|
+
return path.join(context.workspaceRoot, "symbols.yaml");
|
|
33
|
+
const configPath = path.join(context.workspaceRoot, ".kb", "config.json");
|
|
34
|
+
try {
|
|
35
|
+
const config = JSON.parse(await fs.readFile(configPath));
|
|
36
|
+
if (record(config)) {
|
|
37
|
+
const paths = config.paths;
|
|
38
|
+
const configured = record(paths) && typeof paths.symbols === "string"
|
|
39
|
+
? paths.symbols
|
|
40
|
+
: typeof config.symbolsManifest === "string"
|
|
41
|
+
? config.symbolsManifest
|
|
42
|
+
: null;
|
|
43
|
+
if (configured)
|
|
44
|
+
return path.resolve(context.workspaceRoot, configured);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
catch (error) {
|
|
48
|
+
if (!(error instanceof Error))
|
|
49
|
+
throw error;
|
|
50
|
+
}
|
|
51
|
+
for (const name of ["symbols.yaml", "symbols.yml"]) {
|
|
52
|
+
const candidate = path.join(context.workspaceRoot, name);
|
|
53
|
+
if (await exists(context, candidate))
|
|
54
|
+
return candidate;
|
|
55
|
+
}
|
|
56
|
+
return path.join(context.workspaceRoot, "symbols.yaml");
|
|
57
|
+
}
|
|
58
|
+
async function defaultRefresh(symbolId, context) {
|
|
59
|
+
const fs = context.fs;
|
|
60
|
+
if (fs === undefined)
|
|
61
|
+
return { refreshed: false, found: false };
|
|
62
|
+
const manifest = await manifestPath(context);
|
|
63
|
+
const parsed = parseYaml(await fs.readFile(manifest));
|
|
64
|
+
if (!record(parsed) || !Array.isArray(parsed.symbols)) {
|
|
65
|
+
return { refreshed: false, found: false };
|
|
66
|
+
}
|
|
67
|
+
const entry = parsed.symbols.find((value) => record(value) && value.id === symbolId);
|
|
68
|
+
if (!record(entry))
|
|
69
|
+
return { refreshed: false, found: false };
|
|
70
|
+
const sourceFile = typeof entry.sourceFile === "string" ? entry.sourceFile : "";
|
|
71
|
+
const title = typeof entry.title === "string" ? entry.title : "";
|
|
72
|
+
const [enriched] = await enrichSymbolCoordinates([{ ...entry, id: symbolId, title, sourceFile }], context.workspaceRoot);
|
|
73
|
+
const next = coordinate(enriched);
|
|
74
|
+
if (next === null)
|
|
75
|
+
return { refreshed: false, found: true };
|
|
76
|
+
const artifactPath = path.join(path.dirname(manifest), "symbol-coordinates.yaml");
|
|
77
|
+
let coordinates = {};
|
|
78
|
+
try {
|
|
79
|
+
const artifact = parseYaml(await fs.readFile(artifactPath));
|
|
80
|
+
if (record(artifact) && record(artifact.coordinates)) {
|
|
81
|
+
coordinates = Object.fromEntries(Object.entries(artifact.coordinates).flatMap(([id, value]) => {
|
|
82
|
+
const normalized = coordinate(value);
|
|
83
|
+
return normalized === null ? [] : [[id, normalized]];
|
|
84
|
+
}));
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
catch (error) {
|
|
88
|
+
if (!(error instanceof Error))
|
|
89
|
+
throw error;
|
|
90
|
+
}
|
|
91
|
+
coordinates[symbolId] = next;
|
|
92
|
+
const sorted = Object.fromEntries(Object.entries(coordinates).sort(([left], [right]) => left.localeCompare(right)));
|
|
93
|
+
const content = `# symbol-coordinates.yaml\n# GENERATED coordinate artifact — do not edit manually.\n# Run \`kibi sync --refresh-symbol-coordinates\` to refresh.\n${dumpYaml({ coordinates: sorted }, { lineWidth: -1, noRefs: true, sortKeys: true })}`;
|
|
94
|
+
await fs.writeFile(artifactPath, content);
|
|
95
|
+
return { refreshed: true, found: true };
|
|
96
|
+
}
|
|
97
|
+
let implementation = defaultRefresh;
|
|
98
|
+
// implements REQ-kibi-operation-interface-parity
|
|
99
|
+
export async function refreshSymbolCoordinates(symbolId, context) {
|
|
100
|
+
return implementation(symbolId, context);
|
|
101
|
+
}
|
|
102
|
+
// implements REQ-kibi-operation-interface-parity
|
|
103
|
+
export function setSymbolRefreshForTests(refresh) {
|
|
104
|
+
implementation = refresh ?? defaultRefresh;
|
|
105
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { SemanticAdvisorReceipt } from "../semantic-advisor/types.js";
|
|
2
|
+
export type RelationshipInput = Readonly<Record<string, unknown>>;
|
|
3
|
+
export type UpsertInput = {
|
|
4
|
+
readonly type: string;
|
|
5
|
+
readonly id: string;
|
|
6
|
+
readonly properties: Readonly<Record<string, unknown>>;
|
|
7
|
+
readonly relationships?: readonly RelationshipInput[];
|
|
8
|
+
readonly _skipContradictionCheck?: boolean;
|
|
9
|
+
readonly _requestId?: string;
|
|
10
|
+
};
|
|
11
|
+
export type ValidatedUpsert = {
|
|
12
|
+
readonly entity: Record<string, unknown>;
|
|
13
|
+
readonly relationships: readonly RelationshipInput[];
|
|
14
|
+
};
|
|
15
|
+
export type UpsertPayload = {
|
|
16
|
+
readonly created: number;
|
|
17
|
+
readonly updated: number;
|
|
18
|
+
readonly relationships_created: number;
|
|
19
|
+
readonly warnings: readonly string[];
|
|
20
|
+
readonly semanticAdvisor: SemanticAdvisorReceipt;
|
|
21
|
+
readonly contradictionCheck?: {
|
|
22
|
+
readonly outcome: "no-conflict" | "skipped";
|
|
23
|
+
readonly checked_req_id: string;
|
|
24
|
+
readonly strict_readiness: string;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
export type ValidateUpsertPayload = {
|
|
28
|
+
readonly valid: boolean;
|
|
29
|
+
readonly errors: readonly string[];
|
|
30
|
+
readonly warnings: readonly string[];
|
|
31
|
+
readonly semanticAdvisor: SemanticAdvisorReceipt | null;
|
|
32
|
+
readonly normalizedPreview: Readonly<Record<string, unknown>> | null;
|
|
33
|
+
};
|
|
34
|
+
export type DeleteInput = {
|
|
35
|
+
readonly ids: readonly string[];
|
|
36
|
+
readonly _requestId?: string;
|
|
37
|
+
};
|
|
38
|
+
export type DeletePayload = {
|
|
39
|
+
readonly deleted: number;
|
|
40
|
+
readonly skipped: number;
|
|
41
|
+
readonly errors: readonly string[];
|
|
42
|
+
};
|
|
43
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/operations/mutation/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AAG3E,MAAM,MAAM,iBAAiB,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;AAGlE,MAAM,MAAM,WAAW,GAAG;IACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,UAAU,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IACvD,QAAQ,CAAC,aAAa,CAAC,EAAE,SAAS,iBAAiB,EAAE,CAAC;IACtD,QAAQ,CAAC,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAC3C,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;CAC9B,CAAC;AAGF,MAAM,MAAM,eAAe,GAAG;IAC5B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACzC,QAAQ,CAAC,aAAa,EAAE,SAAS,iBAAiB,EAAE,CAAC;CACtD,CAAC;AAGF,MAAM,MAAM,aAAa,GAAG;IAC1B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,qBAAqB,EAAE,MAAM,CAAC;IACvC,QAAQ,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;IACrC,QAAQ,CAAC,eAAe,EAAE,sBAAsB,CAAC;IACjD,QAAQ,CAAC,kBAAkB,CAAC,EAAE;QAC5B,QAAQ,CAAC,OAAO,EAAE,aAAa,GAAG,SAAS,CAAC;QAC5C,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;QAChC,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;KACnC,CAAC;CACH,CAAC;AAGF,MAAM,MAAM,qBAAqB,GAAG;IAClC,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC;IACnC,QAAQ,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;IACrC,QAAQ,CAAC,eAAe,EAAE,sBAAsB,GAAG,IAAI,CAAC;IACxD,QAAQ,CAAC,iBAAiB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC;CACtE,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,QAAQ,CAAC,GAAG,EAAE,SAAS,MAAM,EAAE,CAAC;IAChC,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;CAC9B,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC;CACpC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { OperationContext } from "../../public/operations/runtime-types.js";
|
|
2
|
+
import type { OperationResult } from "../../public/operations/types.js";
|
|
3
|
+
import type { UpsertInput, UpsertPayload } from "./types.js";
|
|
4
|
+
export declare function executeUpsert(input: UpsertInput, context: OperationContext): Promise<OperationResult<UpsertPayload>>;
|
|
5
|
+
//# sourceMappingURL=upsert.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"upsert.d.ts","sourceRoot":"","sources":["../../../src/operations/mutation/upsert.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0CAA0C,CAAC;AACjF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAaxE,OAAO,KAAK,EAAqB,WAAW,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAkChF,wBAAsB,aAAa,CACjC,KAAK,EAAE,WAAW,EAClB,OAAO,EAAE,gBAAgB,GACxB,OAAO,CAAC,eAAe,CAAC,aAAa,CAAC,CAAC,CA0FzC"}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { escapeAtom } from "../../prolog/codec.js";
|
|
2
|
+
import { analyzeSemanticAdvisorInput } from "../semantic-advisor/analyze-prose.js";
|
|
3
|
+
import { recordEntityAudit, recordRelationshipAudits } from "./audit.js";
|
|
4
|
+
import { buildUpsertTransaction, formatUpsertError } from "./contradictions.js";
|
|
5
|
+
import { existingRelationships, validateLiveRelationshipTargets, validateRelationshipSources, validateStrictLanePairing, } from "./relationships.js";
|
|
6
|
+
import { saveMutation } from "./save.js";
|
|
7
|
+
import { validateSymbolGranularity } from "./symbol-granularity.js";
|
|
8
|
+
import { refreshSymbolCoordinates } from "./symbol-refresh.js";
|
|
9
|
+
import { validateUpsertInput } from "./validation.js";
|
|
10
|
+
import { scenarioCoverageWarnings } from "./warnings.js";
|
|
11
|
+
function requireProlog(context) {
|
|
12
|
+
if (context.prolog === undefined) {
|
|
13
|
+
throw new Error("Upsert operation requires a Prolog runtime");
|
|
14
|
+
}
|
|
15
|
+
return context.prolog;
|
|
16
|
+
}
|
|
17
|
+
async function effectiveRelationships(input, entity, relationships, context) {
|
|
18
|
+
if (input.relationships !== undefined && input.relationships.length > 0) {
|
|
19
|
+
return relationships;
|
|
20
|
+
}
|
|
21
|
+
const prolog = requireProlog(context);
|
|
22
|
+
const exists = await prolog.query(`once(kb_entity('${escapeAtom(input.id)}', _, _))`);
|
|
23
|
+
if (!exists.success)
|
|
24
|
+
return relationships;
|
|
25
|
+
try {
|
|
26
|
+
const current = await existingRelationships(prolog, String(entity.id));
|
|
27
|
+
return current.length > 0 ? current : relationships;
|
|
28
|
+
}
|
|
29
|
+
catch (error) {
|
|
30
|
+
if (error instanceof Error)
|
|
31
|
+
return relationships;
|
|
32
|
+
throw error;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
export async function executeUpsert(input, context) {
|
|
36
|
+
const prolog = requireProlog(context);
|
|
37
|
+
try {
|
|
38
|
+
const validated = validateUpsertInput(input, context.clock());
|
|
39
|
+
validateRelationshipSources(input.id, validated.relationships);
|
|
40
|
+
await validateSymbolGranularity(validated.entity, validated.relationships, context);
|
|
41
|
+
const relationships = await effectiveRelationships(input, validated.entity, validated.relationships, context);
|
|
42
|
+
await validateStrictLanePairing(prolog, relationships);
|
|
43
|
+
await validateLiveRelationshipTargets(prolog, validated.entity, relationships);
|
|
44
|
+
const exists = await prolog.query(`once(kb_entity('${escapeAtom(input.id)}', _, _))`);
|
|
45
|
+
const transaction = buildUpsertTransaction({
|
|
46
|
+
entity: validated.entity,
|
|
47
|
+
relationships,
|
|
48
|
+
skipContradictionCheck: input._skipContradictionCheck === true,
|
|
49
|
+
});
|
|
50
|
+
const written = await prolog.query(transaction);
|
|
51
|
+
if (!written.success) {
|
|
52
|
+
throw new Error(formatUpsertError(input.id, written.error));
|
|
53
|
+
}
|
|
54
|
+
await recordEntityAudit(prolog, exists.success ? "updated" : "created", validated.entity);
|
|
55
|
+
await recordRelationshipAudits(prolog, relationships);
|
|
56
|
+
await saveMutation(prolog);
|
|
57
|
+
if (input.type === "symbol") {
|
|
58
|
+
try {
|
|
59
|
+
await refreshSymbolCoordinates(input.id, context);
|
|
60
|
+
}
|
|
61
|
+
catch (error) {
|
|
62
|
+
if (!(error instanceof Error))
|
|
63
|
+
throw error;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
const semantic = analyzeSemanticAdvisorInput({ payload: { ...input } });
|
|
67
|
+
const coverage = await scenarioCoverageWarnings(prolog, validated.relationships, input.type, input.id);
|
|
68
|
+
const created = exists.success ? 0 : 1;
|
|
69
|
+
const payload = {
|
|
70
|
+
created,
|
|
71
|
+
updated: exists.success ? 1 : 0,
|
|
72
|
+
relationships_created: relationships.length,
|
|
73
|
+
warnings: [...semantic.warnings, ...coverage],
|
|
74
|
+
semanticAdvisor: semantic.receipt,
|
|
75
|
+
...(input.type === "req"
|
|
76
|
+
? {
|
|
77
|
+
contradictionCheck: {
|
|
78
|
+
outcome: input._skipContradictionCheck
|
|
79
|
+
? "skipped"
|
|
80
|
+
: "no-conflict",
|
|
81
|
+
checked_req_id: input.id,
|
|
82
|
+
strict_readiness: semantic.receipt.logic_readiness === "modeled"
|
|
83
|
+
? "modeled"
|
|
84
|
+
: semantic.receipt.candidate_lane,
|
|
85
|
+
},
|
|
86
|
+
}
|
|
87
|
+
: {}),
|
|
88
|
+
};
|
|
89
|
+
return {
|
|
90
|
+
content: [
|
|
91
|
+
{
|
|
92
|
+
type: "text",
|
|
93
|
+
text: `Upserted ${input.id} (${created > 0 ? "created" : "updated"}) with ${relationships.length} relationship(s).`,
|
|
94
|
+
},
|
|
95
|
+
],
|
|
96
|
+
structuredContent: payload,
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
catch (error) {
|
|
100
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
101
|
+
throw new Error(`Upsert execution failed: ${message}`);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { OperationContext } from "../../public/operations/runtime-types.js";
|
|
2
|
+
import type { OperationResult } from "../../public/operations/types.js";
|
|
3
|
+
import type { UpsertInput, ValidateUpsertPayload } from "./types.js";
|
|
4
|
+
export declare function executeValidateUpsert(input: UpsertInput, context: OperationContext): Promise<OperationResult<ValidateUpsertPayload>>;
|
|
5
|
+
//# sourceMappingURL=validate-upsert.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validate-upsert.d.ts","sourceRoot":"","sources":["../../../src/operations/mutation/validate-upsert.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0CAA0C,CAAC;AACjF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAOxE,OAAO,KAAK,EAAE,WAAW,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAGrE,wBAAsB,qBAAqB,CACzC,KAAK,EAAE,WAAW,EAClB,OAAO,EAAE,gBAAgB,GACxB,OAAO,CAAC,eAAe,CAAC,qBAAqB,CAAC,CAAC,CAoDjD"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { analyzeSemanticAdvisorInput } from "../semantic-advisor/analyze-prose.js";
|
|
2
|
+
import { validateLiveRelationshipTargets, validateRelationshipSources, } from "./relationships.js";
|
|
3
|
+
import { validateSymbolGranularity } from "./symbol-granularity.js";
|
|
4
|
+
import { validateUpsertInput } from "./validation.js";
|
|
5
|
+
export async function executeValidateUpsert(input, context) {
|
|
6
|
+
try {
|
|
7
|
+
const validated = validateUpsertInput(input, context.clock());
|
|
8
|
+
validateRelationshipSources(input.id, validated.relationships);
|
|
9
|
+
await validateSymbolGranularity(validated.entity, validated.relationships, context);
|
|
10
|
+
if (context.prolog !== undefined) {
|
|
11
|
+
await validateLiveRelationshipTargets(context.prolog, validated.entity, validated.relationships);
|
|
12
|
+
}
|
|
13
|
+
const semantic = analyzeSemanticAdvisorInput({ payload: { ...input } });
|
|
14
|
+
const payload = {
|
|
15
|
+
valid: true,
|
|
16
|
+
errors: [],
|
|
17
|
+
warnings: semantic.warnings,
|
|
18
|
+
semanticAdvisor: semantic.receipt,
|
|
19
|
+
normalizedPreview: validated.entity,
|
|
20
|
+
};
|
|
21
|
+
return {
|
|
22
|
+
content: [
|
|
23
|
+
{
|
|
24
|
+
type: "text",
|
|
25
|
+
text: "kb_validate_upsert: payload is valid for kb_upsert preflight checks. No mutation was performed.",
|
|
26
|
+
},
|
|
27
|
+
],
|
|
28
|
+
structuredContent: payload,
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
catch (error) {
|
|
32
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
33
|
+
const payload = {
|
|
34
|
+
valid: false,
|
|
35
|
+
errors: [message],
|
|
36
|
+
warnings: [],
|
|
37
|
+
semanticAdvisor: null,
|
|
38
|
+
normalizedPreview: null,
|
|
39
|
+
};
|
|
40
|
+
return {
|
|
41
|
+
content: [
|
|
42
|
+
{
|
|
43
|
+
type: "text",
|
|
44
|
+
text: `kb_validate_upsert: payload is invalid. ${message}`,
|
|
45
|
+
},
|
|
46
|
+
],
|
|
47
|
+
structuredContent: payload,
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { isAllowedGranularityReason } from "../../public/symbol-granularity.js";
|
|
2
|
+
import type { UpsertInput, ValidatedUpsert } from "./types.js";
|
|
3
|
+
export declare function validateUpsertInput(input: UpsertInput, now: Date): ValidatedUpsert;
|
|
4
|
+
export { isAllowedGranularityReason };
|
|
5
|
+
//# sourceMappingURL=validation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../../src/operations/mutation/validation.ts"],"names":[],"mappings":"AAIA,OAAO,EAEL,0BAA0B,EAC3B,MAAM,oCAAoC,CAAC;AAO5C,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAiF/D,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,WAAW,EAClB,GAAG,EAAE,IAAI,GACR,eAAe,CA0CjB;AAED,OAAO,EAAE,0BAA0B,EAAE,CAAC"}
|