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/src/public/skills.ts
CHANGED
|
@@ -1,427 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
} from "
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
const SKILL_MARKDOWN_MAX_BYTES = 256 * 1024;
|
|
20
|
-
const RESOURCE_MAX_BYTES = 128 * 1024;
|
|
21
|
-
const SKILL_FILE_NAME = "SKILL.md";
|
|
22
|
-
|
|
23
|
-
const moduleDir = dirname(fileURLToPath(import.meta.url));
|
|
24
|
-
let bundledSkillsDir = resolve(moduleDir, "skills");
|
|
25
|
-
const defaultBundledSkillsDir = bundledSkillsDir;
|
|
26
|
-
|
|
27
|
-
export function setBundledSkillsDir(dir: string): void {
|
|
28
|
-
bundledSkillsDir = dir;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export function resetBundledSkillsDir(): void {
|
|
32
|
-
bundledSkillsDir = defaultBundledSkillsDir;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
export interface SkillManifest {
|
|
36
|
-
id: string;
|
|
37
|
-
name: string;
|
|
38
|
-
description: string;
|
|
39
|
-
version: string;
|
|
40
|
-
kibiCompatibility: string;
|
|
41
|
-
tags?: string[];
|
|
42
|
-
resources?: string[];
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
export interface SkillBundle {
|
|
46
|
-
manifest: SkillManifest;
|
|
47
|
-
body: string;
|
|
48
|
-
rootDir: string;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
export class SkillNotFoundError extends Error {
|
|
52
|
-
constructor(id: string) {
|
|
53
|
-
super(`Skill not found: ${id}`);
|
|
54
|
-
this.name = "SkillNotFoundError";
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
export class SkillResourceNotFoundError extends Error {
|
|
59
|
-
constructor(id: string, resourcePath: string) {
|
|
60
|
-
super(`Skill resource not found: ${id}/${resourcePath}`);
|
|
61
|
-
this.name = "SkillResourceNotFoundError";
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
export class SkillResourceOutOfBoundsError extends Error {
|
|
66
|
-
constructor(id: string, resourcePath: string) {
|
|
67
|
-
super(`Skill resource escapes bundle root: ${id}/${resourcePath}`);
|
|
68
|
-
this.name = "SkillResourceOutOfBoundsError";
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
export class SkillValidationError extends Error {
|
|
73
|
-
readonly field: string;
|
|
74
|
-
|
|
75
|
-
constructor(field: string, message: string) {
|
|
76
|
-
super(message);
|
|
77
|
-
this.name = "SkillValidationError";
|
|
78
|
-
this.field = field;
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
export class SkillOversizeError extends Error {
|
|
83
|
-
readonly maxBytes: number;
|
|
84
|
-
readonly actualBytes: number;
|
|
85
|
-
|
|
86
|
-
constructor(pathLike: string, maxBytes: number, actualBytes: number) {
|
|
87
|
-
super(
|
|
88
|
-
`Skill file exceeds ${maxBytes} bytes: ${pathLike} (${actualBytes} bytes)`,
|
|
89
|
-
);
|
|
90
|
-
this.name = "SkillOversizeError";
|
|
91
|
-
this.maxBytes = maxBytes;
|
|
92
|
-
this.actualBytes = actualBytes;
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
export function listBundledSkills(): SkillManifest[] {
|
|
97
|
-
// implements REQ-001
|
|
98
|
-
if (!existsSync(bundledSkillsDir)) {
|
|
99
|
-
return [];
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
return readdirSync(bundledSkillsDir, { withFileTypes: true })
|
|
103
|
-
.filter((entry) => entry.isDirectory())
|
|
104
|
-
.map((entry) => join(bundledSkillsDir, entry.name))
|
|
105
|
-
.filter((rootDir) => existsSync(join(rootDir, SKILL_FILE_NAME)))
|
|
106
|
-
.map((rootDir) => parseSkillBundle(rootDir).manifest)
|
|
107
|
-
.sort((left, right) => left.id.localeCompare(right.id));
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
export function loadBundledSkill(id: string): SkillBundle {
|
|
111
|
-
// implements REQ-001
|
|
112
|
-
const rootDir = findBundledSkillRoot(id);
|
|
113
|
-
if (!rootDir) {
|
|
114
|
-
throw new SkillNotFoundError(id);
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
return parseSkillBundle(rootDir);
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
export function readBundledSkillResource(
|
|
121
|
-
id: string,
|
|
122
|
-
resourcePath: string,
|
|
123
|
-
): string {
|
|
124
|
-
// implements REQ-001
|
|
125
|
-
const bundle = loadBundledSkill(id);
|
|
126
|
-
const declaredResource = normalizeResourcePath(resourcePath);
|
|
127
|
-
|
|
128
|
-
if (!declaredResource || isPathOutOfBounds(resourcePath)) {
|
|
129
|
-
throw new SkillResourceOutOfBoundsError(id, resourcePath);
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
if (!isDeclaredResource(bundle.manifest, declaredResource)) {
|
|
133
|
-
throw new SkillResourceNotFoundError(id, resourcePath);
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
const candidatePath = resolve(bundle.rootDir, declaredResource);
|
|
137
|
-
let realResourcePath: string;
|
|
138
|
-
let realRootDir: string;
|
|
139
|
-
try {
|
|
140
|
-
realResourcePath = realpathSync(candidatePath);
|
|
141
|
-
realRootDir = realpathSync(bundle.rootDir);
|
|
142
|
-
} catch {
|
|
143
|
-
throw new SkillResourceNotFoundError(id, resourcePath);
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
if (!isWithinRoot(realRootDir, realResourcePath)) {
|
|
147
|
-
throw new SkillResourceOutOfBoundsError(id, resourcePath);
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
assertMaxBytes(candidatePath, RESOURCE_MAX_BYTES);
|
|
151
|
-
return readFileSync(candidatePath, "utf8");
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
export function validateSkillBundle(pathLike: string): {
|
|
155
|
-
valid: boolean;
|
|
156
|
-
errors: SkillValidationError[];
|
|
157
|
-
} {
|
|
158
|
-
// implements REQ-001
|
|
159
|
-
const skillFilePath = resolveSkillFilePath(pathLike);
|
|
160
|
-
const errors: SkillValidationError[] = [];
|
|
161
|
-
|
|
162
|
-
if (!existsSync(skillFilePath)) {
|
|
163
|
-
errors.push(
|
|
164
|
-
new SkillValidationError("SKILL.md", `Missing ${SKILL_FILE_NAME}`),
|
|
165
|
-
);
|
|
166
|
-
return { valid: false, errors };
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
const parsed = matter(readFileSync(skillFilePath, "utf8"));
|
|
170
|
-
errors.push(...validateManifestData(parsed.data));
|
|
171
|
-
|
|
172
|
-
if (errors.length === 0) {
|
|
173
|
-
validateBundleContents(skillFilePath, coerceManifest(parsed.data), errors);
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
return { valid: errors.length === 0, errors };
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
function validateBundleContents(
|
|
180
|
-
skillFilePath: string,
|
|
181
|
-
manifest: SkillManifest,
|
|
182
|
-
errors: SkillValidationError[],
|
|
183
|
-
): void {
|
|
184
|
-
try {
|
|
185
|
-
assertMaxBytes(skillFilePath, SKILL_MARKDOWN_MAX_BYTES);
|
|
186
|
-
} catch (error) {
|
|
187
|
-
errors.push(
|
|
188
|
-
new SkillValidationError(
|
|
189
|
-
"SKILL.md",
|
|
190
|
-
error instanceof Error ? error.message : String(error),
|
|
191
|
-
),
|
|
192
|
-
);
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
const rootDir = dirname(skillFilePath);
|
|
196
|
-
let realRootDir: string;
|
|
197
|
-
try {
|
|
198
|
-
realRootDir = realpathSync(rootDir);
|
|
199
|
-
} catch (error) {
|
|
200
|
-
errors.push(
|
|
201
|
-
new SkillValidationError(
|
|
202
|
-
"SKILL.md",
|
|
203
|
-
error instanceof Error ? error.message : String(error),
|
|
204
|
-
),
|
|
205
|
-
);
|
|
206
|
-
return;
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
for (const resource of manifest.resources ?? []) {
|
|
210
|
-
const resourcePath = resolve(rootDir, resource);
|
|
211
|
-
try {
|
|
212
|
-
if (!existsSync(resourcePath)) {
|
|
213
|
-
errors.push(
|
|
214
|
-
new SkillValidationError(
|
|
215
|
-
"resources",
|
|
216
|
-
`Missing skill resource: ${resource}`,
|
|
217
|
-
),
|
|
218
|
-
);
|
|
219
|
-
continue;
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
const realResourcePath = realpathSync(resourcePath);
|
|
223
|
-
if (!isWithinRoot(realRootDir, realResourcePath)) {
|
|
224
|
-
errors.push(
|
|
225
|
-
new SkillValidationError(
|
|
226
|
-
"resources",
|
|
227
|
-
`Skill resource escapes bundle root: ${resource}`,
|
|
228
|
-
),
|
|
229
|
-
);
|
|
230
|
-
continue;
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
assertMaxBytes(resourcePath, RESOURCE_MAX_BYTES);
|
|
234
|
-
} catch (error) {
|
|
235
|
-
errors.push(
|
|
236
|
-
new SkillValidationError(
|
|
237
|
-
"resources",
|
|
238
|
-
error instanceof Error ? error.message : String(error),
|
|
239
|
-
),
|
|
240
|
-
);
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
function findBundledSkillRoot(id: string): string | undefined {
|
|
246
|
-
if (!existsSync(bundledSkillsDir)) {
|
|
247
|
-
return undefined;
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
for (const entry of readdirSync(bundledSkillsDir, { withFileTypes: true })) {
|
|
251
|
-
if (!entry.isDirectory()) {
|
|
252
|
-
continue;
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
const rootDir = join(bundledSkillsDir, entry.name);
|
|
256
|
-
const skillFilePath = join(rootDir, SKILL_FILE_NAME);
|
|
257
|
-
if (!existsSync(skillFilePath)) {
|
|
258
|
-
continue;
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
const manifest = parseSkillBundle(rootDir).manifest;
|
|
262
|
-
if (manifest.id === id) {
|
|
263
|
-
return rootDir;
|
|
264
|
-
}
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
return undefined;
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
function parseSkillBundle(rootDir: string): SkillBundle {
|
|
271
|
-
const skillFilePath = join(rootDir, SKILL_FILE_NAME);
|
|
272
|
-
assertMaxBytes(skillFilePath, SKILL_MARKDOWN_MAX_BYTES);
|
|
273
|
-
|
|
274
|
-
const parsed = matter(readFileSync(skillFilePath, "utf8"));
|
|
275
|
-
const errors = validateManifestData(parsed.data);
|
|
276
|
-
if (errors.length > 0) {
|
|
277
|
-
throw errors[0] as SkillValidationError;
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
return {
|
|
281
|
-
manifest: coerceManifest(parsed.data),
|
|
282
|
-
body: parsed.content,
|
|
283
|
-
rootDir: resolve(rootDir),
|
|
284
|
-
};
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
function validateManifestData(
|
|
288
|
-
data: Record<string, unknown>,
|
|
289
|
-
): SkillValidationError[] {
|
|
290
|
-
const errors: SkillValidationError[] = [];
|
|
291
|
-
const requiredFields = [
|
|
292
|
-
"id",
|
|
293
|
-
"name",
|
|
294
|
-
"description",
|
|
295
|
-
"version",
|
|
296
|
-
"kibiCompatibility",
|
|
297
|
-
] as const;
|
|
298
|
-
|
|
299
|
-
for (const field of requiredFields) {
|
|
300
|
-
if (typeof data[field] !== "string" || data[field].trim() === "") {
|
|
301
|
-
errors.push(
|
|
302
|
-
new SkillValidationError(
|
|
303
|
-
field,
|
|
304
|
-
`Missing required skill field: ${field}`,
|
|
305
|
-
),
|
|
306
|
-
);
|
|
307
|
-
}
|
|
308
|
-
}
|
|
309
|
-
|
|
310
|
-
if (
|
|
311
|
-
typeof data.version === "string" &&
|
|
312
|
-
!/^\d+\.\d+\.\d+(?:[-+][0-9A-Za-z.-]+)?$/.test(data.version)
|
|
313
|
-
) {
|
|
314
|
-
errors.push(
|
|
315
|
-
new SkillValidationError(
|
|
316
|
-
"version",
|
|
317
|
-
`Invalid skill version: ${data.version}`,
|
|
318
|
-
),
|
|
319
|
-
);
|
|
320
|
-
}
|
|
321
|
-
|
|
322
|
-
if (data.tags !== undefined && !isStringArray(data.tags)) {
|
|
323
|
-
errors.push(new SkillValidationError("tags", "Skill tags must be strings"));
|
|
324
|
-
}
|
|
325
|
-
|
|
326
|
-
if (data.resources !== undefined) {
|
|
327
|
-
if (!isStringArray(data.resources)) {
|
|
328
|
-
errors.push(
|
|
329
|
-
new SkillValidationError(
|
|
330
|
-
"resources",
|
|
331
|
-
"Skill resources must be strings",
|
|
332
|
-
),
|
|
333
|
-
);
|
|
334
|
-
} else {
|
|
335
|
-
for (const resource of data.resources) {
|
|
336
|
-
const normalized = normalizeResourcePath(resource);
|
|
337
|
-
if (!normalized || isPathOutOfBounds(resource)) {
|
|
338
|
-
errors.push(
|
|
339
|
-
new SkillValidationError(
|
|
340
|
-
"resources",
|
|
341
|
-
`Invalid skill resource: ${resource}`,
|
|
342
|
-
),
|
|
343
|
-
);
|
|
344
|
-
}
|
|
345
|
-
}
|
|
346
|
-
}
|
|
347
|
-
}
|
|
348
|
-
|
|
349
|
-
return errors;
|
|
350
|
-
}
|
|
351
|
-
|
|
352
|
-
function coerceManifest(data: Record<string, unknown>): SkillManifest {
|
|
353
|
-
const manifest: SkillManifest = {
|
|
354
|
-
id: String(data.id),
|
|
355
|
-
name: String(data.name),
|
|
356
|
-
description: String(data.description),
|
|
357
|
-
version: String(data.version),
|
|
358
|
-
kibiCompatibility: String(data.kibiCompatibility),
|
|
359
|
-
};
|
|
360
|
-
|
|
361
|
-
if (isStringArray(data.tags)) {
|
|
362
|
-
manifest.tags = data.tags;
|
|
363
|
-
}
|
|
364
|
-
|
|
365
|
-
if (isStringArray(data.resources)) {
|
|
366
|
-
manifest.resources = data.resources.map((resource) =>
|
|
367
|
-
normalizeResourcePath(resource),
|
|
368
|
-
);
|
|
369
|
-
}
|
|
370
|
-
|
|
371
|
-
return manifest;
|
|
372
|
-
}
|
|
373
|
-
|
|
374
|
-
function isStringArray(value: unknown): value is string[] {
|
|
375
|
-
return (
|
|
376
|
-
Array.isArray(value) && value.every((item) => typeof item === "string")
|
|
377
|
-
);
|
|
378
|
-
}
|
|
379
|
-
|
|
380
|
-
function normalizeResourcePath(pathLike: string): string {
|
|
381
|
-
return normalize(pathLike).replaceAll("\\", "/");
|
|
382
|
-
}
|
|
383
|
-
|
|
384
|
-
function isPathOutOfBounds(pathLike: string): boolean {
|
|
385
|
-
const normalized = normalizeResourcePath(pathLike);
|
|
386
|
-
return (
|
|
387
|
-
isAbsolute(pathLike) ||
|
|
388
|
-
normalized === ".." ||
|
|
389
|
-
normalized.startsWith("../") ||
|
|
390
|
-
normalized.includes("/../")
|
|
391
|
-
);
|
|
392
|
-
}
|
|
393
|
-
|
|
394
|
-
function isDeclaredResource(
|
|
395
|
-
manifest: SkillManifest,
|
|
396
|
-
resourcePath: string,
|
|
397
|
-
): boolean {
|
|
398
|
-
return (manifest.resources ?? []).some(
|
|
399
|
-
(declared) => normalizeResourcePath(declared) === resourcePath,
|
|
400
|
-
);
|
|
401
|
-
}
|
|
402
|
-
|
|
403
|
-
function isWithinRoot(rootDir: string, candidatePath: string): boolean {
|
|
404
|
-
const relativePath = relative(rootDir, candidatePath);
|
|
405
|
-
return (
|
|
406
|
-
relativePath === "" ||
|
|
407
|
-
(!relativePath.startsWith("..") && !isAbsolute(relativePath))
|
|
408
|
-
);
|
|
409
|
-
}
|
|
410
|
-
|
|
411
|
-
function assertMaxBytes(pathLike: string, maxBytes: number): void {
|
|
412
|
-
const size = statSync(pathLike).size;
|
|
413
|
-
if (size > maxBytes) {
|
|
414
|
-
throw new SkillOversizeError(pathLike, maxBytes, size);
|
|
415
|
-
}
|
|
416
|
-
}
|
|
417
|
-
|
|
418
|
-
function resolveSkillFilePath(pathLike: string): string {
|
|
419
|
-
const resolved = resolve(pathLike);
|
|
420
|
-
if (existsSync(resolved) && statSync(resolved).isDirectory()) {
|
|
421
|
-
return join(resolved, SKILL_FILE_NAME);
|
|
422
|
-
}
|
|
423
|
-
|
|
424
|
-
return resolved.endsWith(SKILL_FILE_NAME)
|
|
425
|
-
? resolved
|
|
426
|
-
: join(resolved, SKILL_FILE_NAME);
|
|
427
|
-
}
|
|
1
|
+
export {
|
|
2
|
+
SkillNotFoundError,
|
|
3
|
+
SkillOversizeError,
|
|
4
|
+
SkillResourceNotFoundError,
|
|
5
|
+
SkillResourceOutOfBoundsError,
|
|
6
|
+
SkillValidationError,
|
|
7
|
+
} from "./skill-system/errors.js";
|
|
8
|
+
export {
|
|
9
|
+
listBundledSkills,
|
|
10
|
+
loadBundledSkill,
|
|
11
|
+
loadBundledSkillFrom,
|
|
12
|
+
readBundledSkillResource,
|
|
13
|
+
readBundledSkillResourceFrom,
|
|
14
|
+
resetBundledSkillsDir,
|
|
15
|
+
setBundledSkillsDir,
|
|
16
|
+
} from "./skill-system/loader.js";
|
|
17
|
+
export type { SkillBundle, SkillManifest } from "./skill-system/types.js";
|
|
18
|
+
export { validateSkillBundle } from "./skill-system/validation.js";
|
|
@@ -31,6 +31,8 @@ export type SymbolKind =
|
|
|
31
31
|
| "function"
|
|
32
32
|
| "class"
|
|
33
33
|
| "method"
|
|
34
|
+
| "property"
|
|
35
|
+
| "accessor"
|
|
34
36
|
| "interface"
|
|
35
37
|
| "type"
|
|
36
38
|
| "variable"
|
|
@@ -57,6 +59,8 @@ export function inferSymbolRole(kind: SymbolKind): SymbolRole {
|
|
|
57
59
|
case "function":
|
|
58
60
|
case "class":
|
|
59
61
|
case "method":
|
|
62
|
+
case "property":
|
|
63
|
+
case "accessor":
|
|
60
64
|
return "behavioral";
|
|
61
65
|
case "interface":
|
|
62
66
|
case "type":
|
|
@@ -38,6 +38,12 @@
|
|
|
38
38
|
"severity": { "type": "string" },
|
|
39
39
|
"links": { "type": "array", "items": { "type": "string" } },
|
|
40
40
|
"text_ref": { "type": "string" },
|
|
41
|
+
"logic_claims": {
|
|
42
|
+
"type": "array",
|
|
43
|
+
"minItems": 1,
|
|
44
|
+
"uniqueItems": true,
|
|
45
|
+
"items": { "type": "string", "pattern": "^CLAIM-[A-F0-9]{16}$" }
|
|
46
|
+
},
|
|
41
47
|
"sourceFile": { "type": "string" },
|
|
42
48
|
"granularity_reason": {
|
|
43
49
|
"type": "string",
|
|
@@ -115,6 +121,8 @@
|
|
|
115
121
|
"valid_from": { "type": "string" },
|
|
116
122
|
"valid_to": { "type": "string" },
|
|
117
123
|
"canonical_key": { "type": "string" },
|
|
124
|
+
"claim_key": { "type": "string", "pattern": "^CLAIM-[A-F0-9]{16}$" },
|
|
125
|
+
"claim_text": { "type": "string" },
|
|
118
126
|
"predicate_name": { "type": "string" },
|
|
119
127
|
"predicate_namespace": { "type": "string" },
|
|
120
128
|
"predicate_arity": { "type": "integer", "minimum": 1 },
|
|
@@ -138,6 +146,19 @@
|
|
|
138
146
|
"type"
|
|
139
147
|
],
|
|
140
148
|
"allOf": [
|
|
149
|
+
{
|
|
150
|
+
"if": {
|
|
151
|
+
"properties": { "type": { "const": "req" } }
|
|
152
|
+
},
|
|
153
|
+
"then": {},
|
|
154
|
+
"else": { "not": { "required": ["logic_claims"] } }
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
"if": {
|
|
158
|
+
"anyOf": [{ "required": ["claim_key"] }, { "required": ["claim_text"] }]
|
|
159
|
+
},
|
|
160
|
+
"then": { "required": ["claim_key", "claim_text"] }
|
|
161
|
+
},
|
|
141
162
|
{
|
|
142
163
|
"if": {
|
|
143
164
|
"properties": { "type": { "const": "test" } }
|
|
@@ -176,6 +197,8 @@
|
|
|
176
197
|
{ "required": ["valid_from"] },
|
|
177
198
|
{ "required": ["valid_to"] },
|
|
178
199
|
{ "required": ["canonical_key"] },
|
|
200
|
+
{ "required": ["claim_key"] },
|
|
201
|
+
{ "required": ["claim_text"] },
|
|
179
202
|
{ "required": ["predicate_name"] },
|
|
180
203
|
{ "required": ["predicate_namespace"] },
|
|
181
204
|
{ "required": ["predicate_arity"] },
|