kibi-cli 0.12.8 → 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 -210
- 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 +2 -1
- package/dist/commands/check.d.ts.map +1 -1
- package/dist/commands/check.js +145 -152
- package/dist/commands/coverage.d.ts.map +1 -1
- package/dist/commands/coverage.js +12 -17
- package/dist/commands/discovery-shared.d.ts +3 -1
- package/dist/commands/discovery-shared.d.ts.map +1 -1
- package/dist/commands/discovery-shared.js +8 -209
- package/dist/commands/discovery-table.d.ts +3 -0
- package/dist/commands/discovery-table.d.ts.map +1 -0
- package/dist/commands/discovery-table.js +204 -0
- 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/discovery.d.ts.map +1 -1
- package/dist/commands/sync/discovery.js +8 -1
- package/dist/commands/sync/extraction.d.ts +6 -1
- package/dist/commands/sync/extraction.d.ts.map +1 -1
- package/dist/commands/sync/extraction.js +7 -3
- 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 +51 -2
- package/dist/extractors/manifest.d.ts.map +1 -1
- package/dist/extractors/manifest.js +18 -0
- package/dist/extractors/markdown.d.ts +20 -2
- package/dist/extractors/markdown.d.ts.map +1 -1
- package/dist/extractors/markdown.js +38 -1
- package/dist/extractors/symbols-coordinator.d.ts +1 -1
- package/dist/extractors/symbols-coordinator.d.ts.map +1 -1
- package/dist/extractors/symbols-ts.d.ts.map +1 -1
- package/dist/extractors/symbols-ts.js +73 -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/analyzer.d.ts +3 -0
- package/dist/public/impact/analyzer.d.ts.map +1 -0
- package/dist/public/impact/analyzer.js +54 -0
- package/dist/public/impact/coverage-depth-quality.d.ts +4 -0
- package/dist/public/impact/coverage-depth-quality.d.ts.map +1 -0
- package/dist/public/impact/coverage-depth-quality.js +179 -0
- package/dist/public/impact/diagnostics.d.ts +7 -0
- package/dist/public/impact/diagnostics.d.ts.map +1 -0
- package/dist/public/impact/diagnostics.js +126 -0
- package/dist/public/impact/diff-meaning.d.ts +2 -0
- package/dist/public/impact/diff-meaning.d.ts.map +1 -0
- package/dist/public/impact/diff-meaning.js +101 -0
- package/dist/public/impact/full-kb-quality.d.ts +10 -0
- package/dist/public/impact/full-kb-quality.d.ts.map +1 -0
- package/dist/public/impact/full-kb-quality.js +191 -0
- package/dist/public/impact/manifest.d.ts +5 -0
- package/dist/public/impact/manifest.d.ts.map +1 -0
- package/dist/public/impact/manifest.js +43 -0
- package/dist/public/impact/requirement-quality.d.ts +4 -0
- package/dist/public/impact/requirement-quality.d.ts.map +1 -0
- package/dist/public/impact/requirement-quality.js +199 -0
- package/dist/public/impact/source-changes.d.ts +5 -0
- package/dist/public/impact/source-changes.d.ts.map +1 -0
- package/dist/public/impact/source-changes.js +129 -0
- package/dist/public/impact/summaries.d.ts +6 -0
- package/dist/public/impact/summaries.d.ts.map +1 -0
- package/dist/public/impact/summaries.js +68 -0
- package/dist/public/impact/symbol-quality-model.d.ts +21 -0
- package/dist/public/impact/symbol-quality-model.d.ts.map +1 -0
- package/dist/public/impact/symbol-quality-model.js +116 -0
- package/dist/public/impact/symbol-quality.d.ts +4 -0
- package/dist/public/impact/symbol-quality.d.ts.map +1 -0
- package/dist/public/impact/symbol-quality.js +159 -0
- package/dist/public/impact/types.d.ts +79 -0
- package/dist/public/impact/types.d.ts.map +1 -0
- package/dist/public/impact/types.js +1 -0
- package/dist/public/impact-diagnostics.d.ts +7 -0
- package/dist/public/impact-diagnostics.d.ts.map +1 -0
- package/dist/public/impact-diagnostics.js +5 -0
- 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 +48 -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 +123 -95
- package/dist/public/skills/kibi-usage/resources/fact-lanes.md +107 -5
- package/dist/public/skills/kibi-usage/resources/operation-access.md +44 -0
- package/dist/public/skills/kibi-usage/resources/relationship-directions.md +30 -0
- package/dist/public/skills/kibi-usage/resources/workflows.md +40 -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/public/symbol-granularity.d.ts +1 -1
- package/dist/public/symbol-granularity.d.ts.map +1 -1
- package/dist/public/symbol-granularity.js +2 -0
- 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/evidence-model.d.ts +1 -1
- package/dist/traceability/evidence-model.d.ts.map +1 -1
- package/dist/traceability/evidence-model.js +1 -1
- package/dist/traceability/staged-diagnostics.d.ts +6 -6
- package/dist/traceability/staged-diagnostics.d.ts.map +1 -1
- package/dist/traceability/staged-diagnostics.js +12 -6
- package/dist/traceability/staged-impact-contract.js +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 +60 -27
- package/dist/traceability/symbol-extract.d.ts.map +1 -1
- package/dist/traceability/symbol-extract.js +58 -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 +8 -1
- package/dist/types/entities.d.ts.map +1 -1
- package/dist/utils/prolog-query-plan-safety.d.ts +8 -0
- package/dist/utils/prolog-query-plan-safety.d.ts.map +1 -0
- package/dist/utils/prolog-query-plan-safety.js +47 -0
- package/dist/utils/rule-registry.d.ts.map +1 -1
- package/dist/utils/rule-registry.js +18 -0
- package/package.json +60 -2
- package/schema/entities.pl +4 -0
- package/src/public/impact/analyzer.ts +90 -0
- package/src/public/impact/coverage-depth-quality.ts +268 -0
- package/src/public/impact/diagnostics.ts +199 -0
- package/src/public/impact/diff-meaning.ts +121 -0
- package/src/public/impact/full-kb-quality.ts +230 -0
- package/src/public/impact/manifest.ts +57 -0
- package/src/public/impact/requirement-quality.ts +262 -0
- package/src/public/impact/source-changes.ts +180 -0
- package/src/public/impact/summaries.ts +100 -0
- package/src/public/impact/symbol-quality-model.ts +171 -0
- package/src/public/impact/symbol-quality.ts +207 -0
- package/src/public/impact/types.ts +99 -0
- package/src/public/impact-diagnostics.ts +22 -0
- 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 +50 -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 +123 -95
- package/src/public/skills/kibi-usage/resources/fact-lanes.md +107 -5
- package/src/public/skills/kibi-usage/resources/operation-access.md +44 -0
- package/src/public/skills/kibi-usage/resources/relationship-directions.md +30 -0
- package/src/public/skills/kibi-usage/resources/workflows.md +40 -3
- package/src/public/skills.ts +18 -427
- package/src/public/symbol-granularity.ts +4 -0
- package/src/schemas/entity.schema.json +23 -0
package/bin/kibi
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli-command.d.ts","sourceRoot":"","sources":["../src/cli-command.ts"],"names":[],"mappings":"AACA,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;CAC5B;AAGD,wBAAgB,YAAY,CAAC,KAAK,SAAS,OAAO,EAAE,EAClD,EAAE,EAAE,CAAC,GAAG,IAAI,EAAE,KAAK,KAAK,OAAO,CAAC,aAAa,GAAG,SAAS,CAAC,GACzD,CAAC,GAAG,IAAI,EAAE,KAAK,KAAK,OAAO,CAAC,IAAI,CAAC,CAOnC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare class InputError extends Error {
|
|
2
|
+
readonly code: string;
|
|
3
|
+
readonly detail: string;
|
|
4
|
+
readonly exitCode = 2;
|
|
5
|
+
constructor(code: string, detail: string);
|
|
6
|
+
}
|
|
7
|
+
export declare class OperationError extends Error {
|
|
8
|
+
readonly code: string;
|
|
9
|
+
readonly detail: string;
|
|
10
|
+
readonly exitCode = 1;
|
|
11
|
+
constructor(code: string, detail: string);
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=cli-errors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli-errors.d.ts","sourceRoot":"","sources":["../src/cli-errors.ts"],"names":[],"mappings":"AACA,qBAAa,UAAW,SAAQ,KAAK;IAKjC,QAAQ,CAAC,IAAI,EAAE,MAAM;IACrB,QAAQ,CAAC,MAAM,EAAE,MAAM;IAJzB,QAAQ,CAAC,QAAQ,KAAK;gBAGX,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM;CAK1B;AAGD,qBAAa,cAAe,SAAQ,KAAK;IAKrC,QAAQ,CAAC,IAAI,EAAE,MAAM;IACrB,QAAQ,CAAC,MAAM,EAAE,MAAM;IAJzB,QAAQ,CAAC,QAAQ,KAAK;gBAGX,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM;CAK1B"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
// implements REQ-kibi-operation-interface-parity
|
|
2
|
+
export class InputError extends Error {
|
|
3
|
+
code;
|
|
4
|
+
detail;
|
|
5
|
+
// implements REQ-kibi-operation-interface-parity
|
|
6
|
+
exitCode = 2;
|
|
7
|
+
constructor(code, detail) {
|
|
8
|
+
super(detail);
|
|
9
|
+
this.code = code;
|
|
10
|
+
this.detail = detail;
|
|
11
|
+
this.name = "InputError";
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
// implements REQ-kibi-operation-interface-parity
|
|
15
|
+
export class OperationError extends Error {
|
|
16
|
+
code;
|
|
17
|
+
detail;
|
|
18
|
+
// implements REQ-kibi-operation-interface-parity
|
|
19
|
+
exitCode = 1;
|
|
20
|
+
constructor(code, detail) {
|
|
21
|
+
super(detail);
|
|
22
|
+
this.code = code;
|
|
23
|
+
this.detail = detail;
|
|
24
|
+
this.name = "OperationError";
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli-input.d.ts","sourceRoot":"","sources":["../src/cli-input.ts"],"names":[],"mappings":"AAKA,MAAM,MAAM,gBAAgB,GAAG;IAC7B,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;CACtB,CAAC;AA2CF,wBAAsB,SAAS,CAAC,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,OAAO,CAAC,CAuB3E"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { readFile } from "node:fs/promises";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
import { InputError } from "./cli-errors.js";
|
|
4
|
+
let stdinConsumed = false;
|
|
5
|
+
async function readStdinOnce() {
|
|
6
|
+
if (stdinConsumed) {
|
|
7
|
+
throw new InputError("STDIN_ALREADY_READ", "Standard input can only be consumed once.");
|
|
8
|
+
}
|
|
9
|
+
stdinConsumed = true;
|
|
10
|
+
const chunks = [];
|
|
11
|
+
for await (const chunk of process.stdin) {
|
|
12
|
+
chunks.push(Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk));
|
|
13
|
+
}
|
|
14
|
+
return Buffer.concat(chunks).toString("utf8");
|
|
15
|
+
}
|
|
16
|
+
async function readInputText(options) {
|
|
17
|
+
if (options.input === undefined) {
|
|
18
|
+
throw new InputError("MISSING_INPUT", "The --input option is required.");
|
|
19
|
+
}
|
|
20
|
+
if (options.input === "-") {
|
|
21
|
+
return readStdinOnce();
|
|
22
|
+
}
|
|
23
|
+
const filePath = path.resolve(options.cwd, options.input);
|
|
24
|
+
try {
|
|
25
|
+
return await readFile(filePath, "utf8");
|
|
26
|
+
}
|
|
27
|
+
catch (error) {
|
|
28
|
+
if (error instanceof Error) {
|
|
29
|
+
throw new InputError("INPUT_READ_FAILED", `Unable to read JSON input '${options.input}': ${error.message}`);
|
|
30
|
+
}
|
|
31
|
+
throw error;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
// implements REQ-kibi-operation-interface-parity
|
|
35
|
+
export async function loadInput(options) {
|
|
36
|
+
const text = await readInputText(options);
|
|
37
|
+
if (text.trim().length === 0) {
|
|
38
|
+
throw new InputError("EMPTY_INPUT", "JSON input is empty.");
|
|
39
|
+
}
|
|
40
|
+
let parsed;
|
|
41
|
+
try {
|
|
42
|
+
parsed = JSON.parse(text);
|
|
43
|
+
}
|
|
44
|
+
catch (error) {
|
|
45
|
+
if (error instanceof SyntaxError) {
|
|
46
|
+
throw new InputError("INVALID_JSON", `Invalid JSON input: ${error.message}`);
|
|
47
|
+
}
|
|
48
|
+
throw error;
|
|
49
|
+
}
|
|
50
|
+
if (parsed === null || typeof parsed !== "object" || Array.isArray(parsed)) {
|
|
51
|
+
throw new InputError("INVALID_INPUT_ROOT", "JSON input must be an object.");
|
|
52
|
+
}
|
|
53
|
+
return parsed;
|
|
54
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Command } from "commander";
|
|
2
|
+
import { type OperationName } from "./public/operations/index.js";
|
|
3
|
+
export type JsonInvocation = {
|
|
4
|
+
readonly operationName: OperationName;
|
|
5
|
+
readonly inputPath: string;
|
|
6
|
+
readonly command: Command;
|
|
7
|
+
readonly positionals?: readonly {
|
|
8
|
+
readonly name: string;
|
|
9
|
+
readonly value: string | undefined;
|
|
10
|
+
}[];
|
|
11
|
+
};
|
|
12
|
+
export declare function runJsonInvocation(invocation: JsonInvocation): Promise<void>;
|
|
13
|
+
export declare function registerJsonOnlyCommands(program: Command): void;
|
|
14
|
+
//# sourceMappingURL=cli-json-command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli-json-command.d.ts","sourceRoot":"","sources":["../src/cli-json-command.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIzC,OAAO,EACL,KAAK,aAAa,EAGnB,MAAM,8BAA8B,CAAC;AAItC,MAAM,MAAM,cAAc,GAAG;IAC3B,QAAQ,CAAC,aAAa,EAAE,aAAa,CAAC;IACtC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,WAAW,CAAC,EAAE,SAAS;QAC9B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;QACtB,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;KACpC,EAAE,CAAC;CACL,CAAC;AAyBF,wBAAsB,iBAAiB,CACrC,UAAU,EAAE,cAAc,GACzB,OAAO,CAAC,IAAI,CAAC,CAiDf;AAaD,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CA0B/D"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { InputError } from "./cli-errors.js";
|
|
2
|
+
import { loadInput } from "./cli-input.js";
|
|
3
|
+
import { executeOperation as executeProtocolOperation } from "./cli-protocol.js";
|
|
4
|
+
import { getSpec, listSpecs, } from "./public/operations/index.js";
|
|
5
|
+
import { createCliRuntime } from "./runtime/cli-runtime.js";
|
|
6
|
+
function writeInputError(error) {
|
|
7
|
+
process.stderr.write(`Error [${error.code}]: ${error.detail}\n`);
|
|
8
|
+
process.exitCode = error.exitCode;
|
|
9
|
+
}
|
|
10
|
+
function findInputConflicts(invocation) {
|
|
11
|
+
const optionConflicts = invocation.command.options.flatMap((option) => {
|
|
12
|
+
const name = option.attributeName();
|
|
13
|
+
if (name === "input" ||
|
|
14
|
+
invocation.command.getOptionValueSource(name) !== "cli") {
|
|
15
|
+
return [];
|
|
16
|
+
}
|
|
17
|
+
return option.long === undefined ? [] : [option.long];
|
|
18
|
+
});
|
|
19
|
+
const positionalConflicts = (invocation.positionals ?? [])
|
|
20
|
+
.filter(({ value }) => value !== undefined)
|
|
21
|
+
.map(({ name }) => name);
|
|
22
|
+
return [...positionalConflicts, ...optionConflicts];
|
|
23
|
+
}
|
|
24
|
+
// implements REQ-kibi-operation-interface-parity
|
|
25
|
+
export async function runJsonInvocation(invocation) {
|
|
26
|
+
const conflicts = findInputConflicts(invocation);
|
|
27
|
+
if (conflicts.length > 0) {
|
|
28
|
+
writeInputError(new InputError("CONFLICTING_INPUT", `--input cannot be combined with: ${conflicts.join(", ")}`));
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
let input;
|
|
32
|
+
try {
|
|
33
|
+
input = await loadInput({
|
|
34
|
+
input: invocation.inputPath,
|
|
35
|
+
cwd: process.cwd(),
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
catch (error) {
|
|
39
|
+
if (error instanceof InputError) {
|
|
40
|
+
writeInputError(error);
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
throw error;
|
|
44
|
+
}
|
|
45
|
+
const workspaceRoot = process.cwd();
|
|
46
|
+
const spec = getSpec(invocation.operationName);
|
|
47
|
+
const runtime = createCliRuntime({ workspaceRoot });
|
|
48
|
+
const context = await runtime.open(spec, { workspaceRoot });
|
|
49
|
+
const result = await executeProtocolOperation(invocation.operationName, input, context);
|
|
50
|
+
if (result.exitCode === 0 && spec.effects.includes("kb-write")) {
|
|
51
|
+
await runtime.afterSuccess(spec, context);
|
|
52
|
+
}
|
|
53
|
+
await runtime.close(context, {
|
|
54
|
+
status: "success",
|
|
55
|
+
result,
|
|
56
|
+
});
|
|
57
|
+
if (result.stdout !== undefined) {
|
|
58
|
+
process.stdout.write(result.stdout);
|
|
59
|
+
}
|
|
60
|
+
if (result.stderr !== undefined) {
|
|
61
|
+
process.stderr.write(result.stderr);
|
|
62
|
+
}
|
|
63
|
+
process.exitCode = result.exitCode;
|
|
64
|
+
}
|
|
65
|
+
const INTEGRATED_OPERATIONS = new Set([
|
|
66
|
+
"kb_query",
|
|
67
|
+
"kb_search",
|
|
68
|
+
"kb_status",
|
|
69
|
+
"kb_find_gaps",
|
|
70
|
+
"kb_coverage",
|
|
71
|
+
"kb_graph",
|
|
72
|
+
"kb_check",
|
|
73
|
+
]);
|
|
74
|
+
// implements REQ-kibi-operation-interface-parity
|
|
75
|
+
export function registerJsonOnlyCommands(program) {
|
|
76
|
+
for (const spec of listSpecs()) {
|
|
77
|
+
if (INTEGRATED_OPERATIONS.has(spec.name)) {
|
|
78
|
+
continue;
|
|
79
|
+
}
|
|
80
|
+
program
|
|
81
|
+
.command(spec.cliName.replaceAll(" ", "-"))
|
|
82
|
+
.description(spec.description)
|
|
83
|
+
.option("--input <path>", "JSON input file (use - for stdin)")
|
|
84
|
+
.action(async (options, command) => {
|
|
85
|
+
if (options.input === undefined) {
|
|
86
|
+
writeInputError(new InputError("MISSING_INPUT", "The --input option is required for this command."));
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
await runJsonInvocation({
|
|
90
|
+
operationName: spec.name,
|
|
91
|
+
inputPath: options.input,
|
|
92
|
+
command,
|
|
93
|
+
});
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type DiagnosticTelemetry } from "./cli-validate.js";
|
|
2
|
+
import type { OperationContext } from "./public/operations/index.js";
|
|
3
|
+
export type CliContext = OperationContext & {
|
|
4
|
+
readonly diagnosticTelemetry?: DiagnosticTelemetry;
|
|
5
|
+
};
|
|
6
|
+
export type CliProtocolResult = {
|
|
7
|
+
readonly exitCode: number;
|
|
8
|
+
readonly stdout?: string;
|
|
9
|
+
readonly stderr?: string;
|
|
10
|
+
};
|
|
11
|
+
export declare function executeOperation(catalogName: string, input: unknown, context: CliContext): Promise<CliProtocolResult>;
|
|
12
|
+
//# sourceMappingURL=cli-protocol.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli-protocol.d.ts","sourceRoot":"","sources":["../src/cli-protocol.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,mBAAmB,EAEzB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAGrE,MAAM,MAAM,UAAU,GAAG,gBAAgB,GAAG;IAC1C,QAAQ,CAAC,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;CACpD,CAAC;AAGF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;CAC1B,CAAC;AAUF,wBAAsB,gBAAgB,CACpC,WAAW,EAAE,MAAM,EACnB,KAAK,EAAE,OAAO,EACd,OAAO,EAAE,UAAU,GAClB,OAAO,CAAC,iBAAiB,CAAC,CAoC5B"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { InputError, OperationError } from "./cli-errors.js";
|
|
2
|
+
import { prepareOperationInput, } from "./cli-validate.js";
|
|
3
|
+
import { listSpecs } from "./public/operations/index.js";
|
|
4
|
+
function errorResult(error) {
|
|
5
|
+
return {
|
|
6
|
+
exitCode: error.exitCode,
|
|
7
|
+
stderr: `Error [${error.code}]: ${error.detail}\n`,
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
// implements REQ-kibi-operation-interface-parity
|
|
11
|
+
export async function executeOperation(catalogName, input, context) {
|
|
12
|
+
const spec = listSpecs().find(({ name }) => name === catalogName);
|
|
13
|
+
if (spec === undefined) {
|
|
14
|
+
return errorResult(new InputError("UNKNOWN_OPERATION", `Unknown operation '${catalogName}'.`));
|
|
15
|
+
}
|
|
16
|
+
const prepared = prepareOperationInput(input, spec.businessInputSchema);
|
|
17
|
+
if (!prepared.valid) {
|
|
18
|
+
return errorResult(new InputError("VALIDATION_FAILED", prepared.errors.join("; ")));
|
|
19
|
+
}
|
|
20
|
+
try {
|
|
21
|
+
const executionContext = prepared.telemetry
|
|
22
|
+
? { ...context, diagnosticTelemetry: prepared.telemetry }
|
|
23
|
+
: context;
|
|
24
|
+
const result = await spec.execute(prepared.businessInput, executionContext);
|
|
25
|
+
const output = result.structuredContent ?? result;
|
|
26
|
+
return { exitCode: 0, stdout: `${JSON.stringify(output)}\n` };
|
|
27
|
+
}
|
|
28
|
+
catch (error) {
|
|
29
|
+
if (error instanceof InputError || error instanceof OperationError) {
|
|
30
|
+
return errorResult(error);
|
|
31
|
+
}
|
|
32
|
+
if (error instanceof Error) {
|
|
33
|
+
return errorResult(new OperationError("OPERATION_FAILED", error.message));
|
|
34
|
+
}
|
|
35
|
+
return errorResult(new OperationError("OPERATION_FAILED", "Operation failed unexpectedly."));
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli-register-foundation.d.ts","sourceRoot":"","sources":["../src/cli-register-foundation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAYzC,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAiHjE"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { withExitCode } from "./cli-command.js";
|
|
2
|
+
import { runJsonInvocation } from "./cli-json-command.js";
|
|
3
|
+
import { initCommand } from "./commands/init.js";
|
|
4
|
+
import { migrateCommand } from "./commands/migrate.js";
|
|
5
|
+
import { queryCommand } from "./commands/query.js";
|
|
6
|
+
import { searchCommand } from "./commands/search.js";
|
|
7
|
+
import { statusCommand } from "./commands/status.js";
|
|
8
|
+
import { syncCommand } from "./commands/sync.js";
|
|
9
|
+
import { getSpec } from "./public/operations/index.js";
|
|
10
|
+
// implements REQ-kibi-operation-interface-parity
|
|
11
|
+
export function registerFoundationCommands(program) {
|
|
12
|
+
program
|
|
13
|
+
.command("init")
|
|
14
|
+
.description("Initialize .kb/ directory")
|
|
15
|
+
.option("--no-hooks", "Do not install git hooks (hooks installed by default)")
|
|
16
|
+
.action(withExitCode(async (options) => initCommand(options)));
|
|
17
|
+
program
|
|
18
|
+
.command("migrate")
|
|
19
|
+
.description("Migrate .kb/config.json to the latest schema version")
|
|
20
|
+
.option("--dry-run", "Preview migration changes without writing files")
|
|
21
|
+
.option("--yes", "Apply migration changes without prompting")
|
|
22
|
+
.action(withExitCode(async (options) => migrateCommand(options)));
|
|
23
|
+
program
|
|
24
|
+
.command("sync")
|
|
25
|
+
.description("Sync entities from documents")
|
|
26
|
+
.option("--validate-only", "Perform validation without mutations")
|
|
27
|
+
.option("--refresh-symbol-coordinates", "Refresh generated symbol coordinates")
|
|
28
|
+
.option("--rebuild", "Rebuild branch snapshot from scratch (discards current KB)")
|
|
29
|
+
.action(withExitCode(async (options) => syncCommand(options)));
|
|
30
|
+
program
|
|
31
|
+
.command("query [type]")
|
|
32
|
+
.alias("kb-query")
|
|
33
|
+
.description(getSpec("kb_query").description)
|
|
34
|
+
.option("--input <path>", "JSON input file (use - for stdin)")
|
|
35
|
+
.option("--id <id>", "Query specific entity by ID")
|
|
36
|
+
.option("--tag <tag>", "Filter by tag")
|
|
37
|
+
.option("--source <path>", "Filter by source file path (substring match)")
|
|
38
|
+
.option("--relationships <id>", "Get relationships from entity")
|
|
39
|
+
.option("--format <format>", "Output format: json|table", "json")
|
|
40
|
+
.option("--limit <n>", "Limit results", "100")
|
|
41
|
+
.option("--offset <n>", "Skip results", "0")
|
|
42
|
+
.action(withExitCode(async (type, options, command) => {
|
|
43
|
+
if (options.input !== undefined) {
|
|
44
|
+
await runJsonInvocation({
|
|
45
|
+
operationName: "kb_query",
|
|
46
|
+
inputPath: options.input,
|
|
47
|
+
command,
|
|
48
|
+
positionals: [{ name: "type", value: type }],
|
|
49
|
+
});
|
|
50
|
+
return undefined;
|
|
51
|
+
}
|
|
52
|
+
return queryCommand(type, options);
|
|
53
|
+
}));
|
|
54
|
+
program
|
|
55
|
+
.command("search [query]")
|
|
56
|
+
.description(getSpec("kb_search").description)
|
|
57
|
+
.option("--input <path>", "JSON input file (use - for stdin)")
|
|
58
|
+
.option("--type <type>", "Filter by entity type")
|
|
59
|
+
.option("--format <format>", "Output format: json|table", "table")
|
|
60
|
+
.option("--limit <n>", "Limit results", "20")
|
|
61
|
+
.option("--offset <n>", "Skip results", "0")
|
|
62
|
+
.action(async (query, options, command) => {
|
|
63
|
+
if (options.input !== undefined) {
|
|
64
|
+
await runJsonInvocation({
|
|
65
|
+
operationName: "kb_search",
|
|
66
|
+
inputPath: options.input,
|
|
67
|
+
command,
|
|
68
|
+
positionals: [{ name: "query", value: query }],
|
|
69
|
+
});
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
await searchCommand(query, options);
|
|
73
|
+
});
|
|
74
|
+
program
|
|
75
|
+
.command("status")
|
|
76
|
+
.description(getSpec("kb_status").description)
|
|
77
|
+
.option("--input <path>", "JSON input file (use - for stdin)")
|
|
78
|
+
.option("--format <format>", "Output format: json|table", "table")
|
|
79
|
+
.action(async (options, command) => {
|
|
80
|
+
if (options.input !== undefined) {
|
|
81
|
+
await runJsonInvocation({
|
|
82
|
+
operationName: "kb_status",
|
|
83
|
+
inputPath: options.input,
|
|
84
|
+
command,
|
|
85
|
+
});
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
await statusCommand(options);
|
|
89
|
+
});
|
|
90
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli-register-maintenance.d.ts","sourceRoot":"","sources":["../src/cli-register-maintenance.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAQzC,wBAAgB,2BAA2B,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAoClE"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { withExitCode } from "./cli-command.js";
|
|
2
|
+
import { branchEnsureCommand } from "./commands/branch.js";
|
|
3
|
+
import { doctorCommand } from "./commands/doctor.js";
|
|
4
|
+
import { gcCommand } from "./commands/gc.js";
|
|
5
|
+
import { usageMetricsCommand } from "./commands/usage-metrics.js";
|
|
6
|
+
// implements REQ-kibi-operation-interface-parity
|
|
7
|
+
export function registerMaintenanceCommands(program) {
|
|
8
|
+
program
|
|
9
|
+
.command("gc")
|
|
10
|
+
.description("Garbage collect stale branch KBs")
|
|
11
|
+
.option("--dry-run", "Preview without deleting (default)", true)
|
|
12
|
+
.option("--force", "Actually delete stale branches")
|
|
13
|
+
.action(async (options) => {
|
|
14
|
+
await gcCommand({ dryRun: !options.force, force: options.force });
|
|
15
|
+
});
|
|
16
|
+
program
|
|
17
|
+
.command("doctor")
|
|
18
|
+
.description("Diagnose KB setup and configuration")
|
|
19
|
+
.action(withExitCode(async () => doctorCommand()));
|
|
20
|
+
program
|
|
21
|
+
.command("usage-metrics")
|
|
22
|
+
.description("Report usage and quality metrics from .kb/usage.log")
|
|
23
|
+
.option("--format <format>", "Output format: json|table", "table")
|
|
24
|
+
.option("--limit <n>", "Limit top zero-result source files", "10")
|
|
25
|
+
.action(withExitCode(async (options) => usageMetricsCommand(options)));
|
|
26
|
+
program
|
|
27
|
+
.command("branch")
|
|
28
|
+
.description("Manage branch KBs")
|
|
29
|
+
.argument("<action>", "Action: ensure")
|
|
30
|
+
.option("--from <branch>", "Source branch to copy KB from")
|
|
31
|
+
.action(async (action, options) => {
|
|
32
|
+
if (action === "ensure") {
|
|
33
|
+
await branchEnsureCommand(options);
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli-register-reporting.d.ts","sourceRoot":"","sources":["../src/cli-register-reporting.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAUzC,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAuHhE"}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { withExitCode } from "./cli-command.js";
|
|
2
|
+
import { runJsonInvocation } from "./cli-json-command.js";
|
|
3
|
+
import { checkCommand } from "./commands/check.js";
|
|
4
|
+
import { coverageCommand } from "./commands/coverage.js";
|
|
5
|
+
import { gapsCommand } from "./commands/gaps.js";
|
|
6
|
+
import { graphCommand } from "./commands/graph.js";
|
|
7
|
+
import { getSpec } from "./public/operations/index.js";
|
|
8
|
+
// implements REQ-kibi-operation-interface-parity
|
|
9
|
+
export function registerReportingCommands(program) {
|
|
10
|
+
program
|
|
11
|
+
.command("find-gaps [type]")
|
|
12
|
+
.alias("gaps")
|
|
13
|
+
.description(getSpec("kb_find_gaps").description)
|
|
14
|
+
.option("--input <path>", "JSON input file (use - for stdin)")
|
|
15
|
+
.option("--missing-rel <rels>", "Comma-separated missing relationship filters")
|
|
16
|
+
.option("--present-rel <rels>", "Comma-separated present relationship filters")
|
|
17
|
+
.option("--tag <tags>", "Comma-separated tag filter")
|
|
18
|
+
.option("--source <path>", "Source file substring filter")
|
|
19
|
+
.option("--limit <n>", "Limit results", "100")
|
|
20
|
+
.option("--offset <n>", "Skip results", "0")
|
|
21
|
+
.option("--format <format>", "Output format: json|table", "table")
|
|
22
|
+
.action(async (type, options, command) => {
|
|
23
|
+
if (options.input !== undefined) {
|
|
24
|
+
await runJsonInvocation({
|
|
25
|
+
operationName: "kb_find_gaps",
|
|
26
|
+
inputPath: options.input,
|
|
27
|
+
command,
|
|
28
|
+
positionals: [{ name: "type", value: type }],
|
|
29
|
+
});
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
await gapsCommand(type, options);
|
|
33
|
+
});
|
|
34
|
+
program
|
|
35
|
+
.command("coverage")
|
|
36
|
+
.description(getSpec("kb_coverage").description)
|
|
37
|
+
.option("--input <path>", "JSON input file (use - for stdin)")
|
|
38
|
+
.option("--by <group>", "Coverage mode: req|symbol|type", "req")
|
|
39
|
+
.option("--tag <tags>", "Comma-separated tag filter")
|
|
40
|
+
.option("--include-passing", "Include passing rows", false)
|
|
41
|
+
.option("--no-include-transitive", "Disable transitive symbol coverage")
|
|
42
|
+
.option("--limit <n>", "Limit results", "100")
|
|
43
|
+
.option("--offset <n>", "Skip results", "0")
|
|
44
|
+
.option("--format <format>", "Output format: json|table", "table")
|
|
45
|
+
.action(async (options, command) => {
|
|
46
|
+
if (options.input !== undefined) {
|
|
47
|
+
await runJsonInvocation({
|
|
48
|
+
operationName: "kb_coverage",
|
|
49
|
+
inputPath: options.input,
|
|
50
|
+
command,
|
|
51
|
+
});
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
await coverageCommand(options);
|
|
55
|
+
});
|
|
56
|
+
program
|
|
57
|
+
.command("graph")
|
|
58
|
+
.description(getSpec("kb_graph").description)
|
|
59
|
+
.option("--input <path>", "JSON input file (use - for stdin)")
|
|
60
|
+
.option("--from <ids>", "Comma-separated seed IDs")
|
|
61
|
+
.option("--relationships <rels>", "Comma-separated relationship filter")
|
|
62
|
+
.option("--direction <direction>", "Direction: outgoing|incoming|both", "outgoing")
|
|
63
|
+
.option("--depth <n>", "Traversal depth", "1")
|
|
64
|
+
.option("--entity-types <types>", "Comma-separated entity type filter")
|
|
65
|
+
.option("--max-nodes <n>", "Maximum node count", "200")
|
|
66
|
+
.option("--max-edges <n>", "Maximum edge count", "500")
|
|
67
|
+
.option("--format <format>", "Output format: json|table", "table")
|
|
68
|
+
.action(async (options, command) => {
|
|
69
|
+
if (options.input !== undefined) {
|
|
70
|
+
await runJsonInvocation({
|
|
71
|
+
operationName: "kb_graph",
|
|
72
|
+
inputPath: options.input,
|
|
73
|
+
command,
|
|
74
|
+
});
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
await graphCommand(options);
|
|
78
|
+
});
|
|
79
|
+
program
|
|
80
|
+
.command("check")
|
|
81
|
+
.description(getSpec("kb_check").description)
|
|
82
|
+
.option("--input <path>", "JSON input file (use - for stdin)")
|
|
83
|
+
.option("--fix", "Suggest fixes for violations")
|
|
84
|
+
.option("--kb-path <dir>", "Path to KB directory (overrides branch resolution)")
|
|
85
|
+
.option("--rules <csv>", "Comma-separated allowlist of rule names to run")
|
|
86
|
+
.option("--staged", "Run check only against staged changes (experimental)")
|
|
87
|
+
.option("--min-links <n>", "Minimum number of links required for symbol coverage", "1")
|
|
88
|
+
.option("--dry-run", "Do not modify files; only print what would happen")
|
|
89
|
+
.option("--format <format>", "Output format: text|json", "text")
|
|
90
|
+
.action(withExitCode(async (options, command) => {
|
|
91
|
+
if (options.input !== undefined) {
|
|
92
|
+
await runJsonInvocation({
|
|
93
|
+
operationName: "kb_check",
|
|
94
|
+
inputPath: options.input,
|
|
95
|
+
command,
|
|
96
|
+
});
|
|
97
|
+
return undefined;
|
|
98
|
+
}
|
|
99
|
+
return checkCommand(options);
|
|
100
|
+
}));
|
|
101
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli-register-skills.d.ts","sourceRoot":"","sources":["../src/cli-register-skills.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAWzC,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAoF7D"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { withExitCode } from "./cli-command.js";
|
|
2
|
+
import { runJsonInvocation } from "./cli-json-command.js";
|
|
3
|
+
import { skillsListCommand, skillsLoadCommand, skillsReadCommand, skillsValidateCommand, } from "./commands/skills.js";
|
|
4
|
+
// implements REQ-kibi-operation-interface-parity
|
|
5
|
+
export function registerSkillsCommands(program) {
|
|
6
|
+
const skillsProgram = program
|
|
7
|
+
.command("skills")
|
|
8
|
+
.description("Manage bundled markdown skills");
|
|
9
|
+
skillsProgram
|
|
10
|
+
.command("list")
|
|
11
|
+
.description("List bundled markdown skills")
|
|
12
|
+
.option("--input <path>", "JSON input file (use - for stdin)")
|
|
13
|
+
.option("--format <format>", "Output format: json|table", "table")
|
|
14
|
+
.action(async (options, command) => {
|
|
15
|
+
if (options.input !== undefined) {
|
|
16
|
+
await runJsonInvocation({
|
|
17
|
+
operationName: "kb_skills_list",
|
|
18
|
+
inputPath: options.input,
|
|
19
|
+
command,
|
|
20
|
+
});
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
await skillsListCommand(options);
|
|
24
|
+
});
|
|
25
|
+
skillsProgram
|
|
26
|
+
.command("load")
|
|
27
|
+
.description("Load a bundled markdown skill")
|
|
28
|
+
.argument("[id]", "Bundled skill ID")
|
|
29
|
+
.option("--input <path>", "JSON input file (use - for stdin)")
|
|
30
|
+
.option("--format <format>", "Output format: json|markdown", "markdown")
|
|
31
|
+
.action(async (id, options, command) => {
|
|
32
|
+
if (options.input !== undefined) {
|
|
33
|
+
await runJsonInvocation({
|
|
34
|
+
operationName: "kb_skills_load",
|
|
35
|
+
inputPath: options.input,
|
|
36
|
+
command,
|
|
37
|
+
positionals: [{ name: "id", value: id }],
|
|
38
|
+
});
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
await skillsLoadCommand(id ?? "", options);
|
|
42
|
+
});
|
|
43
|
+
skillsProgram
|
|
44
|
+
.command("read")
|
|
45
|
+
.description("Read a declared bundled skill resource")
|
|
46
|
+
.argument("[id]", "Bundled skill ID")
|
|
47
|
+
.argument("[resource]", "Declared resource path")
|
|
48
|
+
.option("--input <path>", "JSON input file (use - for stdin)")
|
|
49
|
+
.option("--format <format>", "Output format: text|json", "text")
|
|
50
|
+
.action(async (id, resource, options, command) => {
|
|
51
|
+
if (options.input !== undefined) {
|
|
52
|
+
await runJsonInvocation({
|
|
53
|
+
operationName: "kb_skills_read",
|
|
54
|
+
inputPath: options.input,
|
|
55
|
+
command,
|
|
56
|
+
positionals: [
|
|
57
|
+
{ name: "id", value: id },
|
|
58
|
+
{ name: "resource", value: resource },
|
|
59
|
+
],
|
|
60
|
+
});
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
await skillsReadCommand(id ?? "", resource ?? "", options);
|
|
64
|
+
});
|
|
65
|
+
skillsProgram
|
|
66
|
+
.command("validate")
|
|
67
|
+
.description("Validate a bundled markdown skill path")
|
|
68
|
+
.argument("<path>", "Skill bundle directory or SKILL.md path")
|
|
69
|
+
.option("--format <format>", "Output format: json|table", "table")
|
|
70
|
+
.action(withExitCode(async (pathLike, options) => skillsValidateCommand(pathLike, options)));
|
|
71
|
+
}
|