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
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
import path from "node:path";
|
|
2
|
-
import Table from "cli-table3";
|
|
3
2
|
import { getBranchOverride } from "../env.js";
|
|
4
3
|
import { PrologProcess, resolveKbPlPath } from "../prolog.js";
|
|
5
4
|
import { escapeAtom } from "../prolog/codec.js";
|
|
5
|
+
import { executeOperation, } from "../public/operations/index.js";
|
|
6
|
+
import { createCliRuntime } from "../runtime/cli-runtime.js";
|
|
6
7
|
import { safeCleanupProlog } from "../utils/prolog-cleanup.js";
|
|
8
|
+
import { renderDiscoveryTable } from "./discovery-table.js";
|
|
7
9
|
import { getCurrentBranch } from "./init-helpers.js";
|
|
10
|
+
export { renderCoverageTable } from "./discovery-table.js";
|
|
11
|
+
// implements REQ-kibi-operation-interface-parity
|
|
12
|
+
export async function executeReportingSpec(spec, input, options = {}) {
|
|
13
|
+
return executeOperation(createCliRuntime(options), spec, input, options);
|
|
14
|
+
}
|
|
8
15
|
// implements REQ-003
|
|
9
16
|
export async function withAttachedBranchProlog(callback, deps) {
|
|
10
17
|
const createProlog = deps?.createProlog ?? ((opts) => new PrologProcess(opts));
|
|
@@ -34,24 +41,6 @@ export async function withAttachedBranchProlog(callback, deps) {
|
|
|
34
41
|
}
|
|
35
42
|
}
|
|
36
43
|
// implements REQ-003
|
|
37
|
-
export async function withPrologProcess(callback, deps) {
|
|
38
|
-
const createProlog = deps?.createProlog ?? ((opts) => new PrologProcess(opts));
|
|
39
|
-
const prolog = createProlog({ timeout: 120000 });
|
|
40
|
-
try {
|
|
41
|
-
await prolog.start();
|
|
42
|
-
// NOTE: useOneShotMode is an internal optimization flag on PrologProcess that
|
|
43
|
-
// forces single-query mode (start → query → terminate per call) instead of the
|
|
44
|
-
// default interactive session. It is not exposed in the public PrologProcess
|
|
45
|
-
// type because callers should not set it directly — only internal discovery
|
|
46
|
-
// helpers use it for lightweight one-shot queries that don't need session state.
|
|
47
|
-
prolog.useOneShotMode = true;
|
|
48
|
-
await prolog.query("set_prolog_flag(answer_write_options, [max_depth(0), spacing(next_argument)])");
|
|
49
|
-
return await callback(prolog);
|
|
50
|
-
}
|
|
51
|
-
finally {
|
|
52
|
-
await safeCleanupProlog(prolog);
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
44
|
// implements REQ-003
|
|
56
45
|
export async function resolveCurrentKbPath() {
|
|
57
46
|
let branch;
|
|
@@ -97,193 +86,3 @@ export function printDiscoveryResult(format, structured, fallbackText) {
|
|
|
97
86
|
const rendered = renderDiscoveryTable(structured);
|
|
98
87
|
console.log(rendered || fallbackText);
|
|
99
88
|
}
|
|
100
|
-
function renderDiscoveryTable(structured) {
|
|
101
|
-
if (!structured || typeof structured !== "object") {
|
|
102
|
-
return null;
|
|
103
|
-
}
|
|
104
|
-
const payload = structured;
|
|
105
|
-
if (Array.isArray(payload.results)) {
|
|
106
|
-
return renderSearchTable(payload);
|
|
107
|
-
}
|
|
108
|
-
if (typeof payload.branch === "string" &&
|
|
109
|
-
typeof payload.syncState === "string") {
|
|
110
|
-
return renderStatusTable(payload);
|
|
111
|
-
}
|
|
112
|
-
if (Array.isArray(payload.nodes) && Array.isArray(payload.edges)) {
|
|
113
|
-
return renderGraphTable(payload);
|
|
114
|
-
}
|
|
115
|
-
if (Array.isArray(payload.rows) &&
|
|
116
|
-
payload.summary &&
|
|
117
|
-
typeof payload.summary === "object") {
|
|
118
|
-
return renderCoverageTable(payload);
|
|
119
|
-
}
|
|
120
|
-
if (Array.isArray(payload.rows)) {
|
|
121
|
-
return renderGapsTable(payload);
|
|
122
|
-
}
|
|
123
|
-
return null;
|
|
124
|
-
}
|
|
125
|
-
function renderSearchTable(payload) {
|
|
126
|
-
const rows = Array.isArray(payload.results) ? payload.results : [];
|
|
127
|
-
const table = new Table({
|
|
128
|
-
head: ["ID", "Type", "Title", "Score", "Reasons", "Snippet"],
|
|
129
|
-
wordWrap: true,
|
|
130
|
-
colWidths: [20, 10, 32, 8, 28, 44],
|
|
131
|
-
});
|
|
132
|
-
for (const row of rows) {
|
|
133
|
-
const match = row;
|
|
134
|
-
const entity = (match.entity ?? {});
|
|
135
|
-
const reasons = Array.isArray(match.reasons)
|
|
136
|
-
? match.reasons.join(", ")
|
|
137
|
-
: "";
|
|
138
|
-
table.push([
|
|
139
|
-
stringifyCell(entity.id),
|
|
140
|
-
stringifyCell(entity.type),
|
|
141
|
-
stringifyCell(entity.title),
|
|
142
|
-
stringifyCell(match.score),
|
|
143
|
-
reasons,
|
|
144
|
-
stringifyCell(match.snippet),
|
|
145
|
-
]);
|
|
146
|
-
}
|
|
147
|
-
return [
|
|
148
|
-
`Search results: ${stringifyCell(payload.count)} total`,
|
|
149
|
-
table.toString(),
|
|
150
|
-
].join("\n");
|
|
151
|
-
}
|
|
152
|
-
function renderStatusTable(payload) {
|
|
153
|
-
const table = new Table({
|
|
154
|
-
head: ["Field", "Value"],
|
|
155
|
-
colWidths: [18, 72],
|
|
156
|
-
wordWrap: true,
|
|
157
|
-
});
|
|
158
|
-
table.push(["Branch", stringifyCell(payload.branch)], ["Sync State", stringifyCell(payload.syncState)], ["Dirty", stringifyCell(payload.dirty)], ["Snapshot", stringifyCell(payload.snapshotId)], ["Synced At", stringifyCell(payload.syncedAt)], ["KB Path", stringifyCell(payload.kbPath)]);
|
|
159
|
-
return table.toString();
|
|
160
|
-
}
|
|
161
|
-
function renderGapsTable(payload) {
|
|
162
|
-
const rows = Array.isArray(payload.rows) ? payload.rows : [];
|
|
163
|
-
const table = new Table({
|
|
164
|
-
head: ["ID", "Type", "Status", "Missing", "Present", "Source"],
|
|
165
|
-
colWidths: [20, 10, 12, 24, 24, 40],
|
|
166
|
-
wordWrap: true,
|
|
167
|
-
});
|
|
168
|
-
for (const row of rows) {
|
|
169
|
-
const item = row;
|
|
170
|
-
table.push([
|
|
171
|
-
stringifyCell(item.id),
|
|
172
|
-
stringifyCell(item.type),
|
|
173
|
-
stringifyCell(item.status),
|
|
174
|
-
joinCells(item.missingRelationships),
|
|
175
|
-
joinCells(item.presentRelationships),
|
|
176
|
-
stringifyCell(item.source),
|
|
177
|
-
]);
|
|
178
|
-
}
|
|
179
|
-
return [`Gap rows: ${stringifyCell(payload.count)}`, table.toString()].join("\n");
|
|
180
|
-
}
|
|
181
|
-
function renderCoverageTable(payload) {
|
|
182
|
-
const summary = (payload.summary ?? {});
|
|
183
|
-
const rows = Array.isArray(payload.rows) ? payload.rows : [];
|
|
184
|
-
const summaryTable = new Table({
|
|
185
|
-
head: ["Metric", "Value"],
|
|
186
|
-
colWidths: [24, 16],
|
|
187
|
-
});
|
|
188
|
-
for (const [key, value] of Object.entries(summary)) {
|
|
189
|
-
summaryTable.push([key, stringifyCell(value)]);
|
|
190
|
-
}
|
|
191
|
-
const firstRow = rows[0];
|
|
192
|
-
const isRequirementCoverage = firstRow && Object.hasOwn(firstRow, "scenarioCount");
|
|
193
|
-
const table = isRequirementCoverage
|
|
194
|
-
? new Table({
|
|
195
|
-
head: [
|
|
196
|
-
"ID",
|
|
197
|
-
"Status",
|
|
198
|
-
"Priority",
|
|
199
|
-
"Coverage",
|
|
200
|
-
"Scen",
|
|
201
|
-
"Tests",
|
|
202
|
-
"Symbols",
|
|
203
|
-
"Gaps",
|
|
204
|
-
],
|
|
205
|
-
colWidths: [20, 12, 12, 18, 8, 8, 10, 28],
|
|
206
|
-
wordWrap: true,
|
|
207
|
-
})
|
|
208
|
-
: new Table({
|
|
209
|
-
head: ["ID", "Type", "Coverage", "Details", "Gaps"],
|
|
210
|
-
colWidths: [20, 10, 18, 28, 28],
|
|
211
|
-
wordWrap: true,
|
|
212
|
-
});
|
|
213
|
-
for (const row of rows) {
|
|
214
|
-
const item = row;
|
|
215
|
-
if (isRequirementCoverage) {
|
|
216
|
-
table.push([
|
|
217
|
-
stringifyCell(item.id),
|
|
218
|
-
stringifyCell(item.status),
|
|
219
|
-
stringifyCell(item.priority),
|
|
220
|
-
stringifyCell(item.coverageStatus),
|
|
221
|
-
stringifyCell(item.scenarioCount),
|
|
222
|
-
stringifyCell(item.testCount),
|
|
223
|
-
stringifyCell(item.transitiveSymbolCount),
|
|
224
|
-
joinCells(item.gaps),
|
|
225
|
-
]);
|
|
226
|
-
}
|
|
227
|
-
else {
|
|
228
|
-
table.push([
|
|
229
|
-
stringifyCell(item.id),
|
|
230
|
-
stringifyCell(item.type),
|
|
231
|
-
stringifyCell(item.coverageStatus),
|
|
232
|
-
`req=${stringifyCell(item.directRequirementCount)} test=${stringifyCell(item.testCount)} count=${stringifyCell(item.count)}`,
|
|
233
|
-
joinCells(item.gaps),
|
|
234
|
-
]);
|
|
235
|
-
}
|
|
236
|
-
}
|
|
237
|
-
return [summaryTable.toString(), table.toString()].join("\n\n");
|
|
238
|
-
}
|
|
239
|
-
function renderGraphTable(payload) {
|
|
240
|
-
const nodes = Array.isArray(payload.nodes) ? payload.nodes : [];
|
|
241
|
-
const edges = Array.isArray(payload.edges) ? payload.edges : [];
|
|
242
|
-
const nodeTable = new Table({
|
|
243
|
-
head: ["Node ID", "Type", "Title", "Status"],
|
|
244
|
-
colWidths: [22, 10, 36, 12],
|
|
245
|
-
wordWrap: true,
|
|
246
|
-
});
|
|
247
|
-
for (const row of nodes) {
|
|
248
|
-
const item = row;
|
|
249
|
-
nodeTable.push([
|
|
250
|
-
stringifyCell(item.id),
|
|
251
|
-
stringifyCell(item.type),
|
|
252
|
-
stringifyCell(item.title),
|
|
253
|
-
stringifyCell(item.status),
|
|
254
|
-
]);
|
|
255
|
-
}
|
|
256
|
-
const edgeTable = new Table({
|
|
257
|
-
head: ["Relationship", "From", "To"],
|
|
258
|
-
colWidths: [18, 22, 22],
|
|
259
|
-
wordWrap: true,
|
|
260
|
-
});
|
|
261
|
-
for (const row of edges) {
|
|
262
|
-
const item = row;
|
|
263
|
-
edgeTable.push([
|
|
264
|
-
stringifyCell(item.type),
|
|
265
|
-
stringifyCell(item.from),
|
|
266
|
-
stringifyCell(item.to),
|
|
267
|
-
]);
|
|
268
|
-
}
|
|
269
|
-
return [
|
|
270
|
-
`Nodes: ${nodes.length} Edges: ${edges.length} Truncated: ${stringifyCell(payload.truncated)}`,
|
|
271
|
-
nodeTable.toString(),
|
|
272
|
-
edgeTable.toString(),
|
|
273
|
-
].join("\n\n");
|
|
274
|
-
}
|
|
275
|
-
function stringifyCell(value) {
|
|
276
|
-
if (value === null || value === undefined || value === "") {
|
|
277
|
-
return "-";
|
|
278
|
-
}
|
|
279
|
-
if (typeof value === "string") {
|
|
280
|
-
return value;
|
|
281
|
-
}
|
|
282
|
-
return String(value);
|
|
283
|
-
}
|
|
284
|
-
function joinCells(value) {
|
|
285
|
-
if (!Array.isArray(value) || value.length === 0) {
|
|
286
|
-
return "-";
|
|
287
|
-
}
|
|
288
|
-
return value.map((item) => stringifyCell(item)).join(", ");
|
|
289
|
-
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"discovery-table.d.ts","sourceRoot":"","sources":["../../src/commands/discovery-table.ts"],"names":[],"mappings":"AAIA,wBAAgB,oBAAoB,CAAC,UAAU,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,CAmCvE;AA4ED,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GACzC,MAAM,CA+DR"}
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
import Table from "cli-table3";
|
|
2
|
+
const EMPTY_FIELDS = Object.freeze({});
|
|
3
|
+
export function renderDiscoveryTable(structured) {
|
|
4
|
+
if (!isFields(structured)) {
|
|
5
|
+
return null;
|
|
6
|
+
}
|
|
7
|
+
const payload = structured;
|
|
8
|
+
if (Array.isArray(payload.results)) {
|
|
9
|
+
return renderSearchTable(payload);
|
|
10
|
+
}
|
|
11
|
+
if (typeof payload.branch === "string" &&
|
|
12
|
+
typeof payload.syncState === "string") {
|
|
13
|
+
return renderStatusTable(payload);
|
|
14
|
+
}
|
|
15
|
+
if (Array.isArray(payload.nodes) && Array.isArray(payload.edges)) {
|
|
16
|
+
return renderGraphTable(payload);
|
|
17
|
+
}
|
|
18
|
+
if (Array.isArray(payload.rows) &&
|
|
19
|
+
payload.summary &&
|
|
20
|
+
typeof payload.summary === "object") {
|
|
21
|
+
return renderCoverageTable(payload);
|
|
22
|
+
}
|
|
23
|
+
if (Array.isArray(payload.rows)) {
|
|
24
|
+
return renderGapsTable(payload);
|
|
25
|
+
}
|
|
26
|
+
return null;
|
|
27
|
+
}
|
|
28
|
+
function renderSearchTable(payload) {
|
|
29
|
+
const rows = Array.isArray(payload.results) ? payload.results : [];
|
|
30
|
+
const table = new Table({
|
|
31
|
+
head: ["ID", "Type", "Title", "Score", "Reasons", "Snippet"],
|
|
32
|
+
wordWrap: true,
|
|
33
|
+
colWidths: [20, 10, 32, 8, 28, 44],
|
|
34
|
+
});
|
|
35
|
+
for (const row of rows) {
|
|
36
|
+
const match = fieldsFrom(row);
|
|
37
|
+
const entity = fieldsFrom(match.entity);
|
|
38
|
+
const reasons = Array.isArray(match.reasons)
|
|
39
|
+
? match.reasons.join(", ")
|
|
40
|
+
: "";
|
|
41
|
+
table.push([
|
|
42
|
+
stringifyCell(entity.id),
|
|
43
|
+
stringifyCell(entity.type),
|
|
44
|
+
stringifyCell(entity.title),
|
|
45
|
+
stringifyCell(match.score),
|
|
46
|
+
reasons,
|
|
47
|
+
stringifyCell(match.snippet),
|
|
48
|
+
]);
|
|
49
|
+
}
|
|
50
|
+
return [
|
|
51
|
+
`Search results: ${stringifyCell(payload.count)} total`,
|
|
52
|
+
table.toString(),
|
|
53
|
+
].join("\n");
|
|
54
|
+
}
|
|
55
|
+
function renderStatusTable(payload) {
|
|
56
|
+
const table = new Table({
|
|
57
|
+
head: ["Field", "Value"],
|
|
58
|
+
colWidths: [18, 72],
|
|
59
|
+
wordWrap: true,
|
|
60
|
+
});
|
|
61
|
+
table.push(["Branch", stringifyCell(payload.branch)], ["Sync State", stringifyCell(payload.syncState)], ["Dirty", stringifyCell(payload.dirty)], ["Snapshot", stringifyCell(payload.snapshotId)], ["Synced At", stringifyCell(payload.syncedAt)], ["KB Path", stringifyCell(payload.kbPath)]);
|
|
62
|
+
return table.toString();
|
|
63
|
+
}
|
|
64
|
+
function renderGapsTable(payload) {
|
|
65
|
+
const rows = Array.isArray(payload.rows) ? payload.rows : [];
|
|
66
|
+
const table = new Table({
|
|
67
|
+
head: ["ID", "Type", "Status", "Missing", "Present", "Source"],
|
|
68
|
+
colWidths: [20, 10, 12, 24, 24, 40],
|
|
69
|
+
wordWrap: true,
|
|
70
|
+
});
|
|
71
|
+
for (const row of rows) {
|
|
72
|
+
const item = fieldsFrom(row);
|
|
73
|
+
table.push([
|
|
74
|
+
stringifyCell(item.id),
|
|
75
|
+
stringifyCell(item.type),
|
|
76
|
+
stringifyCell(item.status),
|
|
77
|
+
joinCells(item.missingRelationships),
|
|
78
|
+
joinCells(item.presentRelationships),
|
|
79
|
+
stringifyCell(item.source),
|
|
80
|
+
]);
|
|
81
|
+
}
|
|
82
|
+
return [`Gap rows: ${stringifyCell(payload.count)}`, table.toString()].join("\n");
|
|
83
|
+
}
|
|
84
|
+
export function renderCoverageTable(payload) {
|
|
85
|
+
const summary = fieldsFrom(payload.summary);
|
|
86
|
+
const rows = Array.isArray(payload.rows) ? payload.rows : [];
|
|
87
|
+
const summaryTable = new Table({
|
|
88
|
+
head: ["Metric", "Value"],
|
|
89
|
+
colWidths: [24, 16],
|
|
90
|
+
});
|
|
91
|
+
for (const [key, value] of Object.entries(summary)) {
|
|
92
|
+
summaryTable.push([key, stringifyCell(value)]);
|
|
93
|
+
}
|
|
94
|
+
const firstRow = firstFields(rows);
|
|
95
|
+
const isRequirementCoverage = firstRow !== undefined && Object.hasOwn(firstRow, "scenarioCount");
|
|
96
|
+
const table = isRequirementCoverage
|
|
97
|
+
? new Table({
|
|
98
|
+
head: [
|
|
99
|
+
"ID",
|
|
100
|
+
"Status",
|
|
101
|
+
"Priority",
|
|
102
|
+
"Coverage",
|
|
103
|
+
"Depth",
|
|
104
|
+
"Scen",
|
|
105
|
+
"Tests",
|
|
106
|
+
"Symbols",
|
|
107
|
+
"Gaps",
|
|
108
|
+
],
|
|
109
|
+
colWidths: [20, 12, 12, 18, 32, 8, 8, 10, 28],
|
|
110
|
+
wordWrap: true,
|
|
111
|
+
})
|
|
112
|
+
: new Table({
|
|
113
|
+
head: ["ID", "Type", "Coverage", "Details", "Gaps"],
|
|
114
|
+
colWidths: [20, 10, 18, 28, 28],
|
|
115
|
+
wordWrap: true,
|
|
116
|
+
});
|
|
117
|
+
for (const row of rows) {
|
|
118
|
+
const item = fieldsFrom(row);
|
|
119
|
+
if (isRequirementCoverage) {
|
|
120
|
+
table.push([
|
|
121
|
+
stringifyCell(item.id),
|
|
122
|
+
stringifyCell(item.status),
|
|
123
|
+
stringifyCell(item.priority),
|
|
124
|
+
stringifyCell(item.coverageStatus),
|
|
125
|
+
stringifyCell(item.coverageDepth),
|
|
126
|
+
stringifyCell(item.scenarioCount),
|
|
127
|
+
stringifyCell(item.testCount),
|
|
128
|
+
stringifyCell(item.transitiveSymbolCount),
|
|
129
|
+
joinCells(item.gaps),
|
|
130
|
+
]);
|
|
131
|
+
}
|
|
132
|
+
else {
|
|
133
|
+
table.push([
|
|
134
|
+
stringifyCell(item.id),
|
|
135
|
+
stringifyCell(item.type),
|
|
136
|
+
stringifyCell(item.coverageStatus),
|
|
137
|
+
`req=${stringifyCell(item.directRequirementCount)} test=${stringifyCell(item.testCount)} count=${stringifyCell(item.count)}`,
|
|
138
|
+
joinCells(item.gaps),
|
|
139
|
+
]);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
return [summaryTable.toString(), table.toString()].join("\n\n");
|
|
143
|
+
}
|
|
144
|
+
function renderGraphTable(payload) {
|
|
145
|
+
const nodes = Array.isArray(payload.nodes) ? payload.nodes : [];
|
|
146
|
+
const edges = Array.isArray(payload.edges) ? payload.edges : [];
|
|
147
|
+
const nodeTable = new Table({
|
|
148
|
+
head: ["Node ID", "Type", "Title", "Status"],
|
|
149
|
+
colWidths: [22, 10, 36, 12],
|
|
150
|
+
wordWrap: true,
|
|
151
|
+
});
|
|
152
|
+
for (const row of nodes) {
|
|
153
|
+
const item = fieldsFrom(row);
|
|
154
|
+
nodeTable.push([
|
|
155
|
+
stringifyCell(item.id),
|
|
156
|
+
stringifyCell(item.type),
|
|
157
|
+
stringifyCell(item.title),
|
|
158
|
+
stringifyCell(item.status),
|
|
159
|
+
]);
|
|
160
|
+
}
|
|
161
|
+
const edgeTable = new Table({
|
|
162
|
+
head: ["Relationship", "From", "To"],
|
|
163
|
+
colWidths: [18, 22, 22],
|
|
164
|
+
wordWrap: true,
|
|
165
|
+
});
|
|
166
|
+
for (const row of edges) {
|
|
167
|
+
const item = fieldsFrom(row);
|
|
168
|
+
edgeTable.push([
|
|
169
|
+
stringifyCell(item.type),
|
|
170
|
+
stringifyCell(item.from),
|
|
171
|
+
stringifyCell(item.to),
|
|
172
|
+
]);
|
|
173
|
+
}
|
|
174
|
+
return [
|
|
175
|
+
`Nodes: ${nodes.length} Edges: ${edges.length} Truncated: ${stringifyCell(payload.truncated)}`,
|
|
176
|
+
nodeTable.toString(),
|
|
177
|
+
edgeTable.toString(),
|
|
178
|
+
].join("\n\n");
|
|
179
|
+
}
|
|
180
|
+
function isFields(value) {
|
|
181
|
+
return value !== null && typeof value === "object";
|
|
182
|
+
}
|
|
183
|
+
function fieldsFrom(value) {
|
|
184
|
+
return isFields(value) ? value : EMPTY_FIELDS;
|
|
185
|
+
}
|
|
186
|
+
function firstFields(values) {
|
|
187
|
+
const first = values[0];
|
|
188
|
+
return isFields(first) ? first : undefined;
|
|
189
|
+
}
|
|
190
|
+
function stringifyCell(value) {
|
|
191
|
+
if (value === null || value === undefined || value === "") {
|
|
192
|
+
return "-";
|
|
193
|
+
}
|
|
194
|
+
if (typeof value === "string") {
|
|
195
|
+
return value;
|
|
196
|
+
}
|
|
197
|
+
return String(value);
|
|
198
|
+
}
|
|
199
|
+
function joinCells(value) {
|
|
200
|
+
if (!Array.isArray(value) || value.length === 0) {
|
|
201
|
+
return "-";
|
|
202
|
+
}
|
|
203
|
+
return value.map((item) => stringifyCell(item)).join(", ");
|
|
204
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gaps.d.ts","sourceRoot":"","sources":["../../src/commands/gaps.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"gaps.d.ts","sourceRoot":"","sources":["../../src/commands/gaps.ts"],"names":[],"mappings":"AAMA,UAAU,WAAW;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;CAC3B;AAGD,wBAAsB,WAAW,CAC/B,IAAI,EAAE,MAAM,GAAG,SAAS,EACxB,OAAO,EAAE,WAAW,GACnB,OAAO,CAAC,IAAI,CAAC,CAef"}
|
package/dist/commands/gaps.js
CHANGED
|
@@ -1,28 +1,24 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { findGapsSpec } from "../public/operations/index.js";
|
|
2
|
+
import { executeReportingSpec, printDiscoveryResult, } from "./discovery-shared.js";
|
|
3
3
|
// implements REQ-002, REQ-003
|
|
4
4
|
export async function gapsCommand(type, options) {
|
|
5
|
-
await
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
const typeArg = type ? `'${escapeAtom(type)}'` : "none";
|
|
14
|
-
const result = await runJsonModuleQuery(prolog, "discovery.pl", `discovery:find_gaps_json(${typeArg}, ${missing}, ${present}, ${tags}, ${source}, ${limit}, ${offset}, JsonString)`, "gaps query failed", kbPath);
|
|
15
|
-
printDiscoveryResult(options.format, result, `Found ${result.count ?? 0} gap rows.`);
|
|
5
|
+
const result = await executeReportingSpec(findGapsSpec, {
|
|
6
|
+
...(type === undefined ? {} : { type }),
|
|
7
|
+
missingRelationships: csvValues(options.missingRel),
|
|
8
|
+
presentRelationships: csvValues(options.presentRel),
|
|
9
|
+
tags: csvValues(options.tag),
|
|
10
|
+
...(options.source === undefined ? {} : { sourceFile: options.source }),
|
|
11
|
+
limit: Number.parseInt(options.limit || "100", 10),
|
|
12
|
+
offset: Number.parseInt(options.offset || "0", 10),
|
|
16
13
|
});
|
|
14
|
+
printDiscoveryResult(options.format, result.structuredContent, result.content[0]?.text ?? "No matching gaps found.");
|
|
17
15
|
}
|
|
18
|
-
function
|
|
16
|
+
function csvValues(value) {
|
|
19
17
|
if (!value?.trim()) {
|
|
20
|
-
return
|
|
18
|
+
return [];
|
|
21
19
|
}
|
|
22
|
-
return
|
|
20
|
+
return value
|
|
23
21
|
.split(",")
|
|
24
22
|
.map((item) => item.trim())
|
|
25
|
-
.filter(Boolean)
|
|
26
|
-
.map((item) => `'${escapeAtom(item)}'`)
|
|
27
|
-
.join(",")}]`;
|
|
23
|
+
.filter(Boolean);
|
|
28
24
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graph.d.ts","sourceRoot":"","sources":["../../src/commands/graph.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"graph.d.ts","sourceRoot":"","sources":["../../src/commands/graph.ts"],"names":[],"mappings":"AAMA,UAAU,YAAY;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,UAAU,GAAG,UAAU,GAAG,MAAM,CAAC;IAC7C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;CAC3B;AAGD,wBAAsB,YAAY,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAqBvE"}
|
package/dist/commands/graph.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { graphSpec } from "../public/operations/index.js";
|
|
2
|
+
import { executeReportingSpec, printDiscoveryResult, } from "./discovery-shared.js";
|
|
3
3
|
// implements REQ-002, REQ-003
|
|
4
4
|
export async function graphCommand(options) {
|
|
5
5
|
if (!options.from?.trim()) {
|
|
@@ -7,29 +7,23 @@ export async function graphCommand(options) {
|
|
|
7
7
|
process.exitCode = 1;
|
|
8
8
|
return;
|
|
9
9
|
}
|
|
10
|
-
await
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
const maxEdges = Number.parseInt(options.maxEdges || "500", 10);
|
|
19
|
-
const result = await runJsonModuleQuery(prolog, "discovery.pl", `discovery:graph_expand_json(${seedIds}, ${relationships}, '${direction}', ${depth}, ${entityTypes}, ${maxNodes}, ${maxEdges}, JsonString)`, "graph query failed", kbPath);
|
|
20
|
-
const nodes = Array.isArray(result.nodes) ? result.nodes.length : 0;
|
|
21
|
-
const edges = Array.isArray(result.edges) ? result.edges.length : 0;
|
|
22
|
-
printDiscoveryResult(options.format, result, `Graph traversal returned ${nodes} nodes and ${edges} edges.`);
|
|
10
|
+
const result = await executeReportingSpec(graphSpec, {
|
|
11
|
+
seedIds: csvValues(options.from),
|
|
12
|
+
relationships: csvValues(options.relationships),
|
|
13
|
+
direction: options.direction ?? "outgoing",
|
|
14
|
+
depth: Number.parseInt(options.depth || "1", 10),
|
|
15
|
+
entityTypes: csvValues(options.entityTypes),
|
|
16
|
+
maxNodes: Number.parseInt(options.maxNodes || "200", 10),
|
|
17
|
+
maxEdges: Number.parseInt(options.maxEdges || "500", 10),
|
|
23
18
|
});
|
|
19
|
+
printDiscoveryResult(options.format, result.structuredContent, result.content[0]?.text ?? "Graph traversal returned no nodes.");
|
|
24
20
|
}
|
|
25
|
-
function
|
|
21
|
+
function csvValues(value) {
|
|
26
22
|
if (!value?.trim()) {
|
|
27
|
-
return
|
|
23
|
+
return [];
|
|
28
24
|
}
|
|
29
|
-
return
|
|
25
|
+
return value
|
|
30
26
|
.split(",")
|
|
31
27
|
.map((item) => item.trim())
|
|
32
|
-
.filter(Boolean)
|
|
33
|
-
.map((item) => `'${escapeAtom(item)}'`)
|
|
34
|
-
.join(",")}]`;
|
|
28
|
+
.filter(Boolean);
|
|
35
29
|
}
|
package/dist/commands/query.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
interface QueryOptions {
|
|
2
|
-
id?: string;
|
|
3
|
-
tag?: string;
|
|
4
|
-
source?: string;
|
|
5
|
-
relationships?: string;
|
|
6
|
-
format?: "json" | "table";
|
|
7
|
-
limit?: string;
|
|
8
|
-
offset?: string;
|
|
2
|
+
readonly id?: string;
|
|
3
|
+
readonly tag?: string;
|
|
4
|
+
readonly source?: string;
|
|
5
|
+
readonly relationships?: string;
|
|
6
|
+
readonly format?: "json" | "table";
|
|
7
|
+
readonly limit?: string;
|
|
8
|
+
readonly offset?: string;
|
|
9
9
|
}
|
|
10
10
|
export declare function queryCommand(type: string | undefined, options: QueryOptions): Promise<{
|
|
11
11
|
exitCode: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"query.d.ts","sourceRoot":"","sources":["../../src/commands/query.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"query.d.ts","sourceRoot":"","sources":["../../src/commands/query.ts"],"names":[],"mappings":"AAqBA,UAAU,YAAY;IACpB,QAAQ,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IACnC,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,wBAAsB,YAAY,CAChC,IAAI,EAAE,MAAM,GAAG,SAAS,EACxB,OAAO,EAAE,YAAY,GACpB,OAAO,CAAC;IAAE,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAC,CA+C/B"}
|