kibi-cli 0.14.0 → 0.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/kibi +3 -1
- package/dist/cli-command.d.ts +5 -0
- package/dist/cli-command.d.ts.map +1 -0
- package/dist/cli-command.js +9 -0
- package/dist/cli-errors.d.ts +13 -0
- package/dist/cli-errors.d.ts.map +1 -0
- package/dist/cli-errors.js +26 -0
- package/dist/cli-input.d.ts +6 -0
- package/dist/cli-input.d.ts.map +1 -0
- package/dist/cli-input.js +54 -0
- package/dist/cli-json-command.d.ts +14 -0
- package/dist/cli-json-command.d.ts.map +1 -0
- package/dist/cli-json-command.js +96 -0
- package/dist/cli-protocol.d.ts +12 -0
- package/dist/cli-protocol.d.ts.map +1 -0
- package/dist/cli-protocol.js +37 -0
- package/dist/cli-register-foundation.d.ts +3 -0
- package/dist/cli-register-foundation.d.ts.map +1 -0
- package/dist/cli-register-foundation.js +90 -0
- package/dist/cli-register-maintenance.d.ts +3 -0
- package/dist/cli-register-maintenance.d.ts.map +1 -0
- package/dist/cli-register-maintenance.js +36 -0
- package/dist/cli-register-reporting.d.ts +3 -0
- package/dist/cli-register-reporting.d.ts.map +1 -0
- package/dist/cli-register-reporting.js +101 -0
- package/dist/cli-register-skills.d.ts +3 -0
- package/dist/cli-register-skills.d.ts.map +1 -0
- package/dist/cli-register-skills.js +71 -0
- package/dist/cli-validate.d.ts +18 -0
- package/dist/cli-validate.d.ts.map +1 -0
- package/dist/cli-validate.js +45 -0
- package/dist/cli.d.ts +4 -4
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +48 -211
- package/dist/commands/aggregated-checks.d.ts +1 -1
- package/dist/commands/aggregated-checks.d.ts.map +1 -1
- package/dist/commands/aggregated-checks.js +28 -34
- package/dist/commands/check.d.ts +1 -1
- package/dist/commands/check.d.ts.map +1 -1
- package/dist/commands/check.js +53 -95
- package/dist/commands/coverage.d.ts.map +1 -1
- package/dist/commands/coverage.js +12 -17
- package/dist/commands/discovery-shared.d.ts +2 -1
- package/dist/commands/discovery-shared.d.ts.map +1 -1
- package/dist/commands/discovery-shared.js +6 -18
- package/dist/commands/gaps.d.ts.map +1 -1
- package/dist/commands/gaps.js +15 -19
- package/dist/commands/graph.d.ts.map +1 -1
- package/dist/commands/graph.js +15 -21
- package/dist/commands/query.d.ts +7 -7
- package/dist/commands/query.d.ts.map +1 -1
- package/dist/commands/query.js +98 -204
- package/dist/commands/search.d.ts +4 -4
- package/dist/commands/search.d.ts.map +1 -1
- package/dist/commands/search.js +14 -27
- package/dist/commands/status.d.ts +1 -1
- package/dist/commands/status.d.ts.map +1 -1
- package/dist/commands/status.js +6 -7
- package/dist/commands/sync/manifest.d.ts +13 -2
- package/dist/commands/sync/manifest.d.ts.map +1 -1
- package/dist/commands/sync/manifest.js +31 -22
- package/dist/commands/sync/persistence.d.ts.map +1 -1
- package/dist/commands/sync/persistence.js +39 -1
- package/dist/extractors/markdown.d.ts +22 -2
- package/dist/extractors/markdown.d.ts.map +1 -1
- package/dist/extractors/markdown.js +50 -1
- package/dist/extractors/symbols-ts.d.ts.map +1 -1
- package/dist/extractors/symbols-ts.js +11 -1
- package/dist/logic/ir.d.ts +112 -0
- package/dist/logic/ir.d.ts.map +1 -0
- package/dist/logic/ir.js +729 -0
- 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/logic-modeling.d.ts +22 -0
- package/dist/operations/modeling/logic-modeling.d.ts.map +1 -0
- package/dist/operations/modeling/logic-modeling.js +111 -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 +164 -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 +117 -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 +163 -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 +94 -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 +62 -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 +64 -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 +61 -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 +142 -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 +88 -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 +132 -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 +120 -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 +693 -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 +31 -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 +19 -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 +195 -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 +20 -3
- package/dist/prolog.d.ts +5 -0
- package/dist/prolog.d.ts.map +1 -1
- package/dist/prolog.js +89 -32
- package/dist/public/impact/diagnostics.d.ts.map +1 -1
- package/dist/public/impact/diagnostics.js +8 -4
- package/dist/public/impact/full-kb-quality.d.ts +1 -1
- package/dist/public/impact/full-kb-quality.d.ts.map +1 -1
- package/dist/public/impact/full-kb-quality.js +34 -1
- package/dist/public/impact/requirement-quality.d.ts.map +1 -1
- package/dist/public/impact/requirement-quality.js +6 -23
- package/dist/public/operations/catalog.d.ts +986 -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 +21 -0
- package/dist/public/operations/index.d.ts.map +1 -0
- package/dist/public/operations/index.js +19 -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 +65 -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 +142 -0
- package/dist/public/operations/specs/modeling.d.ts.map +1 -0
- package/dist/public/operations/specs/modeling.js +133 -0
- package/dist/public/operations/specs/mutation-schemas.d.ts +268 -0
- package/dist/public/operations/specs/mutation-schemas.d.ts.map +1 -0
- package/dist/public/operations/specs/mutation-schemas.js +294 -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 +81 -0
- package/dist/public/operations/specs/semantic.d.ts.map +1 -0
- package/dist/public/operations/specs/semantic.js +137 -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 +291 -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 +317 -0
- package/dist/public/schemas/relationship.d.ts.map +1 -1
- package/dist/public/schemas/relationship.js +1 -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 +145 -99
- package/dist/public/skills/kibi-usage/resources/fact-lanes.md +112 -0
- package/dist/public/skills/kibi-usage/resources/logic-ir.md +43 -0
- package/dist/public/skills/kibi-usage/resources/operation-access.md +44 -0
- package/dist/public/skills/kibi-usage/resources/ui-requirements.md +96 -0
- package/dist/public/skills/kibi-usage/resources/workflows.md +41 -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 +9 -0
- package/dist/public/symbol-granularity.d.ts.map +1 -1
- package/dist/public/symbol-granularity.js +16 -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 +329 -3
- package/dist/traceability/staged-diagnostics.d.ts +2 -2
- package/dist/traceability/staged-diagnostics.d.ts.map +1 -1
- package/dist/traceability/staged-diagnostics.js +17 -10
- 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 +53 -24
- package/dist/traceability/symbol-extract.d.ts.map +1 -1
- package/dist/traceability/symbol-extract.js +17 -1
- package/dist/traceability/temp-kb.d.ts.map +1 -1
- package/dist/traceability/temp-kb.js +47 -1
- package/dist/types/entities.d.ts +3 -0
- package/dist/types/entities.d.ts.map +1 -1
- package/dist/types/relationships.d.ts +1 -1
- package/dist/types/relationships.d.ts.map +1 -1
- package/dist/utils/rule-registry.d.ts.map +1 -1
- package/dist/utils/rule-registry.js +24 -0
- package/dist/utils/schema-version.d.ts +1 -1
- package/dist/utils/schema-version.js +1 -1
- package/package.json +60 -2
- package/src/public/impact/diagnostics.ts +18 -11
- package/src/public/impact/full-kb-quality.ts +30 -3
- package/src/public/impact/requirement-quality.ts +6 -26
- package/src/public/operations/catalog.ts +60 -0
- package/src/public/operations/check-executor.ts +185 -0
- package/src/public/operations/check-format-shared.ts +178 -0
- package/src/public/operations/check-helpers.ts +141 -0
- package/src/public/operations/discovery-entities.ts +122 -0
- package/src/public/operations/discovery-executors.ts +176 -0
- package/src/public/operations/index.ts +20 -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 +75 -0
- package/src/public/operations/specs/discovery.ts +126 -0
- package/src/public/operations/specs/modeling.ts +174 -0
- package/src/public/operations/specs/mutation-schemas.ts +326 -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 +174 -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 +324 -1
- package/src/public/schemas/relationship.ts +1 -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 +145 -99
- package/src/public/skills/kibi-usage/resources/fact-lanes.md +112 -0
- package/src/public/skills/kibi-usage/resources/logic-ir.md +43 -0
- package/src/public/skills/kibi-usage/resources/operation-access.md +44 -0
- package/src/public/skills/kibi-usage/resources/ui-requirements.md +96 -0
- package/src/public/skills/kibi-usage/resources/workflows.md +41 -3
- package/src/public/skills.ts +18 -427
- package/src/public/symbol-granularity.ts +25 -0
- package/src/schemas/entity.schema.json +329 -3
- package/src/schemas/relationship.schema.json +1 -0
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
// implements REQ-mcp-suggest-predicates
|
|
2
|
+
export const PREDICATE_CATALOG_4 = [
|
|
3
|
+
{
|
|
4
|
+
id: "FACT-SCHEMA-FEATURE-GATE",
|
|
5
|
+
predicate_name: "feature_gate",
|
|
6
|
+
title: "Feature gate",
|
|
7
|
+
description: "A subject is controlled by a runtime or configuration gate.",
|
|
8
|
+
argument_names: ["subject", "gate", "expected"],
|
|
9
|
+
argument_types: ["entity", "flag", "boolean"],
|
|
10
|
+
keywords: ["flag", "feature gate", "enabled", "disabled", "kill switch"],
|
|
11
|
+
examples: ["feature_gate(checkout.v2, checkoutV2Enabled, true)"],
|
|
12
|
+
tags: ["flag", "runtime"],
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
id: "FACT-SCHEMA-EVENT-PUBLISH",
|
|
16
|
+
predicate_name: "publishes_event",
|
|
17
|
+
title: "Event publication",
|
|
18
|
+
description: "A subject publishes a domain or system event.",
|
|
19
|
+
argument_names: ["subject", "event"],
|
|
20
|
+
argument_types: ["entity", "event"],
|
|
21
|
+
keywords: ["publish", "publishes", "emit", "emits", "event"],
|
|
22
|
+
examples: ["publishes_event(order.checkout, OrderSubmitted)"],
|
|
23
|
+
tags: ["event", "architecture"],
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
id: "FACT-SCHEMA-ACCEPTANCE-RULE",
|
|
27
|
+
predicate_name: "acceptance_rule",
|
|
28
|
+
title: "Acceptance rule",
|
|
29
|
+
description: "A subject has an observable acceptance outcome.",
|
|
30
|
+
argument_names: ["subject", "outcome"],
|
|
31
|
+
argument_types: ["entity", "outcome"],
|
|
32
|
+
keywords: [
|
|
33
|
+
"acceptance",
|
|
34
|
+
"observable",
|
|
35
|
+
"outcome",
|
|
36
|
+
"must show",
|
|
37
|
+
"must display",
|
|
38
|
+
],
|
|
39
|
+
examples: ["acceptance_rule(search.results, shows_empty_state)"],
|
|
40
|
+
tags: ["acceptance", "quality"],
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
id: "FACT-SCHEMA-PERMISSION-RULE",
|
|
44
|
+
predicate_name: "permission_rule",
|
|
45
|
+
title: "Permission rule",
|
|
46
|
+
description: "An actor is allowed or denied an action against a resource.",
|
|
47
|
+
argument_names: ["actor", "action", "resource", "decision"],
|
|
48
|
+
argument_types: ["actor", "action", "resource", "decision"],
|
|
49
|
+
keywords: [
|
|
50
|
+
"may",
|
|
51
|
+
"can",
|
|
52
|
+
"allowed",
|
|
53
|
+
"denied",
|
|
54
|
+
"forbidden",
|
|
55
|
+
"must not",
|
|
56
|
+
"cannot",
|
|
57
|
+
"can't",
|
|
58
|
+
"export",
|
|
59
|
+
"permission",
|
|
60
|
+
],
|
|
61
|
+
examples: ["permission_rule(guest, export, customer_data, deny)"],
|
|
62
|
+
tags: ["permission", "policy"],
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
id: "FACT-SCHEMA-DEFAULT-VALUE",
|
|
66
|
+
predicate_name: "default_value",
|
|
67
|
+
title: "Default value",
|
|
68
|
+
description: "A subject property defaults to a value.",
|
|
69
|
+
argument_names: ["subject", "property", "value"],
|
|
70
|
+
argument_types: ["entity", "property", "value"],
|
|
71
|
+
keywords: ["default", "defaults", "defaulted", "initial", "mode", "tool"],
|
|
72
|
+
examples: ["default_value(annotation.tool, mode, move)"],
|
|
73
|
+
tags: ["default", "configuration"],
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
id: "FACT-SCHEMA-UNIQUENESS-CONSTRAINT",
|
|
77
|
+
predicate_name: "uniqueness_constraint",
|
|
78
|
+
title: "Uniqueness constraint",
|
|
79
|
+
description: "A subject is unique within one or more scope keys.",
|
|
80
|
+
argument_names: ["subject", "scope"],
|
|
81
|
+
argument_types: ["entity", "scope"],
|
|
82
|
+
keywords: ["unique", "uniqueness", "at most one", "one", "per"],
|
|
83
|
+
examples: ["uniqueness_constraint(annotation, video,timeKey)"],
|
|
84
|
+
tags: ["constraint", "identity"],
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
id: "FACT-SCHEMA-STATE-MEMBERSHIP",
|
|
88
|
+
predicate_name: "state_membership",
|
|
89
|
+
title: "State membership",
|
|
90
|
+
description: "A state-valued subject has a closed set of allowed states.",
|
|
91
|
+
argument_names: ["subject", "states"],
|
|
92
|
+
argument_types: ["entity", "state_list"],
|
|
93
|
+
keywords: ["terminal states", "states are", "one of", "ready", "anonymous"],
|
|
94
|
+
examples: ["state_membership(auth.status, ready,anonymous,profile-error)"],
|
|
95
|
+
tags: ["state", "workflow"],
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
id: "FACT-SCHEMA-TEMPORAL-ORDER",
|
|
99
|
+
predicate_name: "temporal_order",
|
|
100
|
+
title: "Temporal order",
|
|
101
|
+
description: "One event or state must occur before or after another.",
|
|
102
|
+
argument_names: ["subject", "before_event", "after_event"],
|
|
103
|
+
argument_types: ["entity", "event", "event"],
|
|
104
|
+
keywords: ["before", "after", "saved", "completes", "navigation"],
|
|
105
|
+
examples: ["temporal_order(draft.changes, saved, navigation_completes)"],
|
|
106
|
+
tags: ["temporal", "workflow"],
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
id: "FACT-SCHEMA-CONDITIONAL-BEHAVIOR",
|
|
110
|
+
predicate_name: "conditional_behavior",
|
|
111
|
+
title: "Conditional behavior",
|
|
112
|
+
description: "A behavior follows when a condition is true.",
|
|
113
|
+
argument_names: ["subject", "condition", "behavior"],
|
|
114
|
+
argument_types: ["entity", "condition", "behavior"],
|
|
115
|
+
keywords: ["if", "during", "becomes", "condition", "provided that"],
|
|
116
|
+
examples: [
|
|
117
|
+
"conditional_behavior(card, fails_during_session, becomes_tainted)",
|
|
118
|
+
],
|
|
119
|
+
tags: ["conditional", "workflow"],
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
id: "FACT-SCHEMA-STATE-TRANSITION",
|
|
123
|
+
predicate_name: "state_transition",
|
|
124
|
+
title: "State transition",
|
|
125
|
+
description: "A subject moves from one state to another because of a trigger.",
|
|
126
|
+
argument_names: ["subject", "from_state", "to_state", "trigger"],
|
|
127
|
+
argument_types: ["entity", "state", "state", "trigger"],
|
|
128
|
+
keywords: ["transitions from", "transition from", "from draft", "to idle"],
|
|
129
|
+
examples: ["state_transition(editor, draft, idle, navigation_completes)"],
|
|
130
|
+
tags: ["state", "workflow"],
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
id: "FACT-SCHEMA-RATE-LIMIT",
|
|
134
|
+
predicate_name: "rate_limit",
|
|
135
|
+
title: "Rate limit",
|
|
136
|
+
description: "An action is limited to a count within a time window.",
|
|
137
|
+
argument_names: ["subject", "action", "window", "count"],
|
|
138
|
+
argument_types: ["entity", "action", "duration", "number"],
|
|
139
|
+
keywords: [
|
|
140
|
+
"rate limited",
|
|
141
|
+
"rate limit",
|
|
142
|
+
"attempts",
|
|
143
|
+
"per hour",
|
|
144
|
+
"per minute",
|
|
145
|
+
],
|
|
146
|
+
examples: ["rate_limit(password_reset.request, attempts, hour, 5)"],
|
|
147
|
+
tags: ["rate-limit", "security"],
|
|
148
|
+
},
|
|
149
|
+
];
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { PredicateSchemaCandidate, PredicateUsageHints } from "./predicate-types.js";
|
|
2
|
+
export declare const DEFAULT_USAGE_HINTS: PredicateUsageHints;
|
|
3
|
+
export declare const USAGE_HINTS_BY_PREDICATE: Record<string, PredicateUsageHints>;
|
|
4
|
+
export declare const BUILT_IN_PREDICATE_SCHEMAS: PredicateSchemaCandidate[];
|
|
5
|
+
//# sourceMappingURL=predicate-catalog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"predicate-catalog.d.ts","sourceRoot":"","sources":["../../../src/operations/modeling/predicate-catalog.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,wBAAwB,EACxB,mBAAmB,EACpB,MAAM,sBAAsB,CAAC;AAM9B,eAAO,MAAM,mBAAmB,EAAE,mBAOjC,CAAC;AAGF,eAAO,MAAM,wBAAwB,EAAE,MAAM,CAAC,MAAM,EAAE,mBAAmB,CAIxE,CAAC;AAGF,eAAO,MAAM,0BAA0B,EAAE,wBAAwB,EAKhE,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { PREDICATE_CATALOG_1 } from "./predicate-catalog-1.js";
|
|
2
|
+
import { PREDICATE_CATALOG_2 } from "./predicate-catalog-2.js";
|
|
3
|
+
import { PREDICATE_CATALOG_3 } from "./predicate-catalog-3.js";
|
|
4
|
+
import { PREDICATE_CATALOG_4 } from "./predicate-catalog-4.js";
|
|
5
|
+
import { PREDICATE_USAGE_HINTS_1 } from "./predicate-usage-hints-1.js";
|
|
6
|
+
import { PREDICATE_USAGE_HINTS_2 } from "./predicate-usage-hints-2.js";
|
|
7
|
+
import { PREDICATE_USAGE_HINTS_3 } from "./predicate-usage-hints-3.js";
|
|
8
|
+
// implements REQ-mcp-suggest-predicates
|
|
9
|
+
export const DEFAULT_USAGE_HINTS = {
|
|
10
|
+
use_when: [
|
|
11
|
+
"Use when the prose matches this predicate signature and all required arguments can be named explicitly.",
|
|
12
|
+
],
|
|
13
|
+
do_not_use_when: [
|
|
14
|
+
"Do not use when a stricter scalar property, a more specific predicate, or an ontology-gap observation better preserves the claim.",
|
|
15
|
+
],
|
|
16
|
+
};
|
|
17
|
+
// implements REQ-mcp-suggest-predicates
|
|
18
|
+
export const USAGE_HINTS_BY_PREDICATE = {
|
|
19
|
+
...PREDICATE_USAGE_HINTS_1,
|
|
20
|
+
...PREDICATE_USAGE_HINTS_2,
|
|
21
|
+
...PREDICATE_USAGE_HINTS_3,
|
|
22
|
+
};
|
|
23
|
+
// implements REQ-mcp-suggest-predicates
|
|
24
|
+
export const BUILT_IN_PREDICATE_SCHEMAS = [
|
|
25
|
+
...PREDICATE_CATALOG_1,
|
|
26
|
+
...PREDICATE_CATALOG_2,
|
|
27
|
+
...PREDICATE_CATALOG_3,
|
|
28
|
+
...PREDICATE_CATALOG_4,
|
|
29
|
+
];
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare function inferPermissionRuleArgs(text: string): string[];
|
|
2
|
+
export declare function inferGuardArgs(text: string, subject: string): string[];
|
|
3
|
+
export declare function inferExceptionRuleArgs(text: string, subject: string): string[];
|
|
4
|
+
export declare function inferMutualExclusionArgs(text: string): string[];
|
|
5
|
+
export declare function inferDependencyRuleArgs(text: string): string[];
|
|
6
|
+
export declare function inferOwnershipRuleArgs(text: string): string[];
|
|
7
|
+
export declare function inferRetryPolicyArgs(text: string): string[];
|
|
8
|
+
export declare function inferEscalationRuleArgs(text: string): string[];
|
|
9
|
+
export declare function inferAvailabilitySlaArgs(text: string): string[];
|
|
10
|
+
export declare function inferNotificationRouteArgs(text: string): string[];
|
|
11
|
+
export declare function inferIdempotencyRuleArgs(text: string): string[];
|
|
12
|
+
export declare function inferDataResidencyRuleArgs(text: string): string[];
|
|
13
|
+
export declare function inferAuditEventRuleArgs(text: string): string[];
|
|
14
|
+
export declare function inferConsentRuleArgs(text: string): string[];
|
|
15
|
+
export declare function inferLifecycleRuleArgs(text: string): string[];
|
|
16
|
+
//# sourceMappingURL=predicate-inference-1.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"predicate-inference-1.d.ts","sourceRoot":"","sources":["../../../src/operations/modeling/predicate-inference-1.ts"],"names":[],"mappings":"AAQA,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAsB9D;AAGD,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,CAkBtE;AAGD,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,GACd,MAAM,EAAE,CAWV;AAGD,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAQ/D;AAGD,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAS9D;AAGD,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAQ7D;AAGD,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAS3D;AAGD,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAU9D;AAGD,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAY/D;AAGD,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CASjE;AAGD,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAmB/D;AAGD,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAQjE;AAGD,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAQ9D;AAGD,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAS3D;AAGD,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAU7D"}
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
import { normalizePredicateToken, normalizeSubjectKey, singularize, slug, } from "./predicate-utils.js";
|
|
2
|
+
// implements REQ-mcp-suggest-predicates
|
|
3
|
+
export function inferPermissionRuleArgs(text) {
|
|
4
|
+
const prohibition = text.match(/^(?<actor>[a-z][a-z\s_-]*?)\s+(?:must\s+not|cannot|can't|is\s+forbidden\s+to)\s+(?<action>[a-z][a-z_-]*)\s+(?<resource>.+?)\.?$/i);
|
|
5
|
+
if (prohibition?.groups) {
|
|
6
|
+
return [
|
|
7
|
+
singularize(slug(prohibition.groups.actor ?? "actor")),
|
|
8
|
+
normalizePredicateToken(prohibition.groups.action ?? "action"),
|
|
9
|
+
normalizePredicateToken(prohibition.groups.resource ?? "resource"),
|
|
10
|
+
"deny",
|
|
11
|
+
];
|
|
12
|
+
}
|
|
13
|
+
const permission = text.match(/^(?:only\s+)?(?<actor>[a-z][a-z\s_-]*?)\s+(?:may|can|is\s+allowed\s+to)\s+(?<action>[a-z][a-z_-]*)\s+(?<resource>.+?)(?:\s+when\s+.+)?\.?$/i);
|
|
14
|
+
return [
|
|
15
|
+
singularize(slug(permission?.groups?.actor ?? "actor")),
|
|
16
|
+
normalizePredicateToken(permission?.groups?.action ?? "action"),
|
|
17
|
+
normalizePredicateToken(permission?.groups?.resource ?? "resource"),
|
|
18
|
+
"assert",
|
|
19
|
+
];
|
|
20
|
+
}
|
|
21
|
+
// implements REQ-mcp-suggest-predicates
|
|
22
|
+
export function inferGuardArgs(text, subject) {
|
|
23
|
+
const disabledUntil = text.match(/^(?<subject>.+?)\s+(?:must|shall|should)?\s*(?:stay|remain)?\s*disabled\s+until\s+(?<condition>.+?)\.?$/i);
|
|
24
|
+
if (disabledUntil?.groups?.subject && disabledUntil.groups.condition) {
|
|
25
|
+
return [
|
|
26
|
+
slug(disabledUntil.groups.subject),
|
|
27
|
+
normalizePredicateToken(disabledUntil.groups.condition),
|
|
28
|
+
"disabled",
|
|
29
|
+
];
|
|
30
|
+
}
|
|
31
|
+
const lower = text.toLowerCase();
|
|
32
|
+
return [
|
|
33
|
+
subject,
|
|
34
|
+
lower.includes("readonly") ? "isReadOnly" : "condition",
|
|
35
|
+
"true",
|
|
36
|
+
];
|
|
37
|
+
}
|
|
38
|
+
// implements REQ-mcp-suggest-predicates
|
|
39
|
+
export function inferExceptionRuleArgs(text, subject) {
|
|
40
|
+
const exception = text.match(/^(?:the\s+)?(?<subject>[a-z][a-z\s_-]*?)\s+(?:must|shall|should)\s+(?<behavior>.+?)\s+unless\s+(?:the\s+)?(?<exception>.+?)\.?$/i);
|
|
41
|
+
return [
|
|
42
|
+
exception?.groups?.subject
|
|
43
|
+
? normalizeSubjectKey(exception.groups.subject)
|
|
44
|
+
: subject,
|
|
45
|
+
normalizePredicateToken(exception?.groups?.behavior ?? "behavior"),
|
|
46
|
+
normalizePredicateToken(exception?.groups?.exception ?? "exception"),
|
|
47
|
+
];
|
|
48
|
+
}
|
|
49
|
+
// implements REQ-mcp-suggest-predicates
|
|
50
|
+
export function inferMutualExclusionArgs(text) {
|
|
51
|
+
const exclusion = text.match(/^(?<left>.+?)\s+and\s+(?<right>.+?)\s+(?:must|shall|should)\s+be\s+mutually\s+exclusive\.?$/i);
|
|
52
|
+
return [
|
|
53
|
+
slug(exclusion?.groups?.left ?? "left"),
|
|
54
|
+
slug(exclusion?.groups?.right ?? "right"),
|
|
55
|
+
];
|
|
56
|
+
}
|
|
57
|
+
// implements REQ-mcp-suggest-predicates
|
|
58
|
+
export function inferDependencyRuleArgs(text) {
|
|
59
|
+
const dependency = text.match(/^(?<subject>.+?)\s+requires\s+(?<prerequisite>.+?)\s+before\s+(?<dependent>.+?)\.?$/i);
|
|
60
|
+
return [
|
|
61
|
+
slug(dependency?.groups?.subject ?? "subject"),
|
|
62
|
+
normalizePredicateToken(dependency?.groups?.prerequisite ?? "prerequisite"),
|
|
63
|
+
normalizePredicateToken(dependency?.groups?.dependent ?? "dependent"),
|
|
64
|
+
];
|
|
65
|
+
}
|
|
66
|
+
// implements REQ-mcp-suggest-predicates
|
|
67
|
+
export function inferOwnershipRuleArgs(text) {
|
|
68
|
+
const ownership = text.match(/^(?<resource>.+?)\s+(?:is|are)\s+owned\s+by\s+(?:the\s+)?(?<owner>.+?)\.?$/i);
|
|
69
|
+
return [
|
|
70
|
+
slug(ownership?.groups?.resource ?? "resource"),
|
|
71
|
+
slug(ownership?.groups?.owner ?? "owner"),
|
|
72
|
+
];
|
|
73
|
+
}
|
|
74
|
+
// implements REQ-mcp-suggest-predicates
|
|
75
|
+
export function inferRetryPolicyArgs(text) {
|
|
76
|
+
const retry = text.match(/^(?<subject>.+?)\s+(?:must|shall|should)\s+retry\s+up\s+to\s+(?<count>\d+)\s+(?<unit>times|attempts?)\.?$/i);
|
|
77
|
+
return [
|
|
78
|
+
slug(retry?.groups?.subject ?? "subject"),
|
|
79
|
+
retry?.groups?.count ?? "0",
|
|
80
|
+
slug(retry?.groups?.unit ?? "times"),
|
|
81
|
+
];
|
|
82
|
+
}
|
|
83
|
+
// implements REQ-mcp-suggest-predicates
|
|
84
|
+
export function inferEscalationRuleArgs(text) {
|
|
85
|
+
const escalation = text.match(/^(?<subject>.+?)\s+(?:must|shall|should)\s+escalate\s+to\s+(?<target>.+?)\s+after\s+(?<delay>\d+)\s+(?<unit>[a-z]+)\.?$/i);
|
|
86
|
+
return [
|
|
87
|
+
slug(escalation?.groups?.subject ?? "subject"),
|
|
88
|
+
slug(escalation?.groups?.target ?? "target"),
|
|
89
|
+
escalation?.groups?.delay ?? "0",
|
|
90
|
+
slug(escalation?.groups?.unit ?? "unit"),
|
|
91
|
+
];
|
|
92
|
+
}
|
|
93
|
+
// implements REQ-mcp-suggest-predicates
|
|
94
|
+
export function inferAvailabilitySlaArgs(text) {
|
|
95
|
+
const availability = text.match(/^(?<subject>.+?)\s+availability\s+(?:must|shall|should)\s+be\s+at\s+least\s+(?<threshold>\d+(?:\.\d+)?)\s+(?<unit>percent|%)\s+(?<window>[a-z]+)\.?$/i);
|
|
96
|
+
return [
|
|
97
|
+
slug(availability?.groups?.subject ?? "subject"),
|
|
98
|
+
availability?.groups?.threshold ?? "0",
|
|
99
|
+
availability?.groups?.unit === "%"
|
|
100
|
+
? "percent"
|
|
101
|
+
: slug(availability?.groups?.unit ?? "percent"),
|
|
102
|
+
slug(availability?.groups?.window ?? "window"),
|
|
103
|
+
];
|
|
104
|
+
}
|
|
105
|
+
// implements REQ-mcp-suggest-predicates
|
|
106
|
+
export function inferNotificationRouteArgs(text) {
|
|
107
|
+
const notification = text.match(/^(?<subject>.+?)\s+(?:must|shall|should)\s+notify\s+(?<recipient>.+?)\s+by\s+(?<channel>[a-z]+)\.?$/i);
|
|
108
|
+
return [
|
|
109
|
+
slug(notification?.groups?.subject ?? "subject"),
|
|
110
|
+
slug(notification?.groups?.recipient ?? "recipient"),
|
|
111
|
+
slug(notification?.groups?.channel ?? "channel"),
|
|
112
|
+
];
|
|
113
|
+
}
|
|
114
|
+
// implements REQ-mcp-suggest-predicates
|
|
115
|
+
export function inferIdempotencyRuleArgs(text) {
|
|
116
|
+
const idempotency = text.match(/^(?<subject>.+?)\s+(?:must|shall|should)\s+be\s+idempotent\s+by\s+(?<key>.+?)\.?$/i);
|
|
117
|
+
const deduplicated = text.match(/^(?<subject>.+?)\s+(?:must|shall|should)\s+be\s+deduplicated\s+to\s+prevent\s+redundant\s+requests\s+during\s+(?<key>.+?)\.?$/i);
|
|
118
|
+
return [
|
|
119
|
+
slug(idempotency?.groups?.subject ??
|
|
120
|
+
deduplicated?.groups?.subject ??
|
|
121
|
+
"subject"),
|
|
122
|
+
slug(idempotency?.groups?.key ??
|
|
123
|
+
deduplicated?.groups?.key ??
|
|
124
|
+
"idempotency_key"),
|
|
125
|
+
];
|
|
126
|
+
}
|
|
127
|
+
// implements REQ-mcp-suggest-predicates
|
|
128
|
+
export function inferDataResidencyRuleArgs(text) {
|
|
129
|
+
const residency = text.match(/^(?<subject>.+?)\s+(?:must|shall|should)\s+be\s+(?:stored|processed|kept)\s+in\s+(?:the\s+)?(?<region>.+?\b(?:region|jurisdiction|country|zone|area))\.?$/i);
|
|
130
|
+
return [
|
|
131
|
+
slug(residency?.groups?.subject ?? "data"),
|
|
132
|
+
slug(residency?.groups?.region ?? "region"),
|
|
133
|
+
];
|
|
134
|
+
}
|
|
135
|
+
// implements REQ-mcp-suggest-predicates
|
|
136
|
+
export function inferAuditEventRuleArgs(text) {
|
|
137
|
+
const audit = text.match(/^(?<subject>.+?)\s+(?:must|shall|should)\s+be\s+(?:recorded|logged|audited)\s+in\s+(?:the\s+)?(?<log>audit\s+(?:log|trail))\.?$/i);
|
|
138
|
+
return [
|
|
139
|
+
slug(audit?.groups?.subject ?? "subject"),
|
|
140
|
+
slug(audit?.groups?.log ?? "audit_log"),
|
|
141
|
+
];
|
|
142
|
+
}
|
|
143
|
+
// implements REQ-mcp-suggest-predicates
|
|
144
|
+
export function inferConsentRuleArgs(text) {
|
|
145
|
+
const consent = text.match(/^(?<subject>.+?)\s+(?:must|shall|should)\s+require\s+(?<consent>.+?consent)\s+before\s+(?<purpose>.+?)\.?$/i);
|
|
146
|
+
return [
|
|
147
|
+
slug(consent?.groups?.subject ?? "subject"),
|
|
148
|
+
slug(consent?.groups?.consent ?? "consent"),
|
|
149
|
+
normalizePredicateToken(consent?.groups?.purpose ?? "purpose"),
|
|
150
|
+
];
|
|
151
|
+
}
|
|
152
|
+
// implements REQ-mcp-suggest-predicates
|
|
153
|
+
export function inferLifecycleRuleArgs(text) {
|
|
154
|
+
const lifecycle = text.match(/^(?<subject>.+?)\s+(?:must|shall|should)\s+be\s+(?<action>archived|deleted|expired)\s+after\s+(?<duration>\d+)\s+(?<unit>[a-z]+)\.?$/i);
|
|
155
|
+
return [
|
|
156
|
+
slug(lifecycle?.groups?.subject ?? "subject"),
|
|
157
|
+
slug(lifecycle?.groups?.action ?? "action"),
|
|
158
|
+
lifecycle?.groups?.duration ?? "0",
|
|
159
|
+
slug(lifecycle?.groups?.unit ?? "unit"),
|
|
160
|
+
];
|
|
161
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export declare function inferConflictResolutionRuleArgs(text: string): string[];
|
|
2
|
+
export declare function inferFallbackRuleArgs(text: string): string[];
|
|
3
|
+
export declare function inferBatchOperationRuleArgs(text: string): string[];
|
|
4
|
+
export declare function inferConsistencyRuleArgs(text: string): string[];
|
|
5
|
+
export declare function inferBuildConstraintArgs(text: string): string[];
|
|
6
|
+
export declare function inferEnvironmentSafetyRuleArgs(text: string): string[];
|
|
7
|
+
export declare function inferSchemaInvariantRuleArgs(text: string): string[];
|
|
8
|
+
export declare function inferCodingStandardRuleArgs(text: string): string[];
|
|
9
|
+
export declare function inferMigrationBoundaryRuleArgs(text: string): string[];
|
|
10
|
+
export declare function inferAbsenceRequirementArgs(text: string): string[];
|
|
11
|
+
export declare function inferOfflineBehaviorRuleArgs(text: string): string[];
|
|
12
|
+
export declare function inferReleaseGateRuleArgs(text: string): string[];
|
|
13
|
+
export declare function inferPlatformConsistencyRuleArgs(text: string): string[];
|
|
14
|
+
export declare function inferPreservationRuleArgs(text: string): string[];
|
|
15
|
+
export declare function inferAbstractionBoundaryRuleArgs(text: string): string[];
|
|
16
|
+
export declare function inferSecurityConfigurationRuleArgs(text: string): string[];
|
|
17
|
+
export declare function inferOrderedStrategyRuleArgs(text: string): string[];
|
|
18
|
+
export declare function inferRefreshPolicyRuleArgs(text: string): string[];
|
|
19
|
+
//# sourceMappingURL=predicate-inference-2.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"predicate-inference-2.d.ts","sourceRoot":"","sources":["../../../src/operations/modeling/predicate-inference-2.ts"],"names":[],"mappings":"AAGA,wBAAgB,+BAA+B,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAQtE;AAGD,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAS5D;AAGD,wBAAgB,2BAA2B,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CASlE;AAGD,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAQ/D;AAGD,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAS/D;AAGD,wBAAgB,8BAA8B,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CASrE;AAGD,wBAAgB,4BAA4B,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAWnE;AAGD,wBAAgB,2BAA2B,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CASlE;AAGD,wBAAgB,8BAA8B,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CASrE;AAGD,wBAAgB,2BAA2B,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAalE;AAGD,wBAAgB,4BAA4B,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CASnE;AAGD,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAS/D;AAGD,wBAAgB,gCAAgC,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAUvE;AAGD,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAShE;AAGD,wBAAgB,gCAAgC,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CASvE;AAGD,wBAAgB,kCAAkC,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CASzE;AAGD,wBAAgB,4BAA4B,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAcnE;AAGD,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CASjE"}
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
import { normalizePredicateToken, slug } from "./predicate-utils.js";
|
|
2
|
+
// implements REQ-mcp-suggest-predicates
|
|
3
|
+
export function inferConflictResolutionRuleArgs(text) {
|
|
4
|
+
const conflict = text.match(/^when\s+(?<subject>.+?)\s+conflicts?,\s+(?:the\s+)?(?<strategy>.+?)\.?$/i);
|
|
5
|
+
return [
|
|
6
|
+
slug(conflict?.groups?.subject ?? "subject"),
|
|
7
|
+
normalizePredicateToken(conflict?.groups?.strategy ?? "strategy"),
|
|
8
|
+
];
|
|
9
|
+
}
|
|
10
|
+
// implements REQ-mcp-suggest-predicates
|
|
11
|
+
export function inferFallbackRuleArgs(text) {
|
|
12
|
+
const fallback = text.match(/^if\s+(?<condition>.+?),\s+(?<subject>.+?)\s+(?:must|shall|should)\s+fall\s+back\s+to\s+(?<target>.+?)\.?$/i);
|
|
13
|
+
return [
|
|
14
|
+
normalizePredicateToken(fallback?.groups?.condition ?? "condition"),
|
|
15
|
+
slug(fallback?.groups?.subject ?? "subject"),
|
|
16
|
+
normalizePredicateToken(fallback?.groups?.target ?? "fallback"),
|
|
17
|
+
];
|
|
18
|
+
}
|
|
19
|
+
// implements REQ-mcp-suggest-predicates
|
|
20
|
+
export function inferBatchOperationRuleArgs(text) {
|
|
21
|
+
const batch = text.match(/^(?<subject>.+?)\s+(?:must|shall|should)\s+process\s+(?<resource>.+?)\s+in\s+batches\s+of\s+(?<size>\d+)\.?$/i);
|
|
22
|
+
return [
|
|
23
|
+
slug(batch?.groups?.subject ?? "subject"),
|
|
24
|
+
slug(batch?.groups?.resource ?? "resource"),
|
|
25
|
+
batch?.groups?.size ?? "0",
|
|
26
|
+
];
|
|
27
|
+
}
|
|
28
|
+
// implements REQ-mcp-suggest-predicates
|
|
29
|
+
export function inferConsistencyRuleArgs(text) {
|
|
30
|
+
const consistency = text.match(/^(?<subject>.+?)\s+(?:must|shall|should)\s+reference\s+(?<target>an?\s+existing\s+.+?)\.?$/i);
|
|
31
|
+
return [
|
|
32
|
+
slug(consistency?.groups?.subject ?? "subject"),
|
|
33
|
+
normalizePredicateToken(consistency?.groups?.target ?? "target"),
|
|
34
|
+
];
|
|
35
|
+
}
|
|
36
|
+
// implements REQ-mcp-suggest-predicates
|
|
37
|
+
export function inferBuildConstraintArgs(text) {
|
|
38
|
+
const build = text.match(/^(?<subject>.+?)\s+(?:must|shall|should)\s+be\s+(?<property>deterministic)\s+at\s+(?<scope>build\s+time)\.?$/i);
|
|
39
|
+
return [
|
|
40
|
+
slug(build?.groups?.subject ?? "subject"),
|
|
41
|
+
normalizePredicateToken(build?.groups?.property ?? "property"),
|
|
42
|
+
normalizePredicateToken(build?.groups?.scope ?? "build_time"),
|
|
43
|
+
];
|
|
44
|
+
}
|
|
45
|
+
// implements REQ-mcp-suggest-predicates
|
|
46
|
+
export function inferEnvironmentSafetyRuleArgs(text) {
|
|
47
|
+
const safety = text.match(/^(?<action>.+?)\s+(?:must|shall|should)\s+be\s+(?<decision>forbidden|read-only|allowed)\s+in\s+(?<environment>production|staging|development)\.?$/i);
|
|
48
|
+
return [
|
|
49
|
+
slug(safety?.groups?.action ?? "action"),
|
|
50
|
+
normalizePredicateToken(safety?.groups?.decision ?? "decision"),
|
|
51
|
+
slug(safety?.groups?.environment ?? "environment"),
|
|
52
|
+
];
|
|
53
|
+
}
|
|
54
|
+
// implements REQ-mcp-suggest-predicates
|
|
55
|
+
export function inferSchemaInvariantRuleArgs(text) {
|
|
56
|
+
const invariant = text.match(/^(?<field>.+?)\s+(?:must|shall|should)\s+be\s+(?<kind>immutable)\s+after\s+(?<scope>.+?)\.?$/i);
|
|
57
|
+
return [
|
|
58
|
+
slug(invariant?.groups?.field ?? "field"),
|
|
59
|
+
normalizePredicateToken(invariant?.groups?.kind ?? "invariant"),
|
|
60
|
+
normalizePredicateToken(invariant?.groups?.scope ? `after ${invariant.groups.scope}` : "scope"),
|
|
61
|
+
];
|
|
62
|
+
}
|
|
63
|
+
// implements REQ-mcp-suggest-predicates
|
|
64
|
+
export function inferCodingStandardRuleArgs(text) {
|
|
65
|
+
const standard = text.match(/^(?<subject>.+?)\s+(?:must|shall|should)\s+(?<action>use|avoid)\s+(?<target>.+?)\.?$/i);
|
|
66
|
+
return [
|
|
67
|
+
slug(standard?.groups?.subject ?? "subject"),
|
|
68
|
+
normalizePredicateToken(standard?.groups?.action ?? "action"),
|
|
69
|
+
normalizePredicateToken(standard?.groups?.target ?? "target"),
|
|
70
|
+
];
|
|
71
|
+
}
|
|
72
|
+
// implements REQ-mcp-suggest-predicates
|
|
73
|
+
export function inferMigrationBoundaryRuleArgs(text) {
|
|
74
|
+
const migration = text.match(/^(?<subject>.+?)\s+may\s+only\s+be\s+(?<action>read)\s+as\s+(?<scope>migration\s+input)(?:\s+by\s+.+?)?\.?$/i);
|
|
75
|
+
return [
|
|
76
|
+
slug(migration?.groups?.subject ?? "legacy_input"),
|
|
77
|
+
normalizePredicateToken(migration?.groups?.action ?? "action"),
|
|
78
|
+
normalizePredicateToken(migration?.groups?.scope ?? "migration_input"),
|
|
79
|
+
];
|
|
80
|
+
}
|
|
81
|
+
// implements REQ-mcp-suggest-predicates
|
|
82
|
+
export function inferAbsenceRequirementArgs(text) {
|
|
83
|
+
const absence = text.match(/^(?<subject>.+?)\s+(?:must|shall|should)\s+be\s+(?<state>absent|removed)\.?$/i);
|
|
84
|
+
const declarativeAbsence = text.match(/^no\s+(?<subject>.+?)\.?$/i);
|
|
85
|
+
return [
|
|
86
|
+
normalizePredicateToken(absence?.groups?.subject ??
|
|
87
|
+
declarativeAbsence?.groups?.subject ??
|
|
88
|
+
"subject"),
|
|
89
|
+
normalizePredicateToken(absence?.groups?.state ?? "absent"),
|
|
90
|
+
];
|
|
91
|
+
}
|
|
92
|
+
// implements REQ-mcp-suggest-predicates
|
|
93
|
+
export function inferOfflineBehaviorRuleArgs(text) {
|
|
94
|
+
const offline = text.match(/^(?<subject>.+?)\s+(?:must|shall|should)\s+be\s+(?<behavior>non-blocking|resilient)\s+during\s+(?<condition>offline\s+conditions)\.?$/i);
|
|
95
|
+
return [
|
|
96
|
+
slug(offline?.groups?.subject ?? "subject"),
|
|
97
|
+
normalizePredicateToken(offline?.groups?.behavior ?? "behavior"),
|
|
98
|
+
normalizePredicateToken(offline?.groups?.condition ?? "offline_conditions"),
|
|
99
|
+
];
|
|
100
|
+
}
|
|
101
|
+
// implements REQ-mcp-suggest-predicates
|
|
102
|
+
export function inferReleaseGateRuleArgs(text) {
|
|
103
|
+
const release = text.match(/^(?<subject>.+?)\s+(?:must|shall|should)\s+pass\s+(?<gate>.+?)\s+before\s+(?<target>.+?)\.?$/i);
|
|
104
|
+
return [
|
|
105
|
+
slug(release?.groups?.subject ?? "builds"),
|
|
106
|
+
normalizePredicateToken(release?.groups?.gate ?? "gate"),
|
|
107
|
+
slug(release?.groups?.target ?? "target"),
|
|
108
|
+
];
|
|
109
|
+
}
|
|
110
|
+
// implements REQ-mcp-suggest-predicates
|
|
111
|
+
export function inferPlatformConsistencyRuleArgs(text) {
|
|
112
|
+
const platform = text.match(/^(?<subject>.+?)\s+(?:must|shall|should)\s+synchronize\s+across\s+(?<platforms>.+?)\.?$/i);
|
|
113
|
+
const platforms = (platform?.groups?.platforms ?? "platform")
|
|
114
|
+
.split(/,|\band\b/i)
|
|
115
|
+
.map((part) => slug(part.trim()))
|
|
116
|
+
.filter((part) => part.length > 0)
|
|
117
|
+
.join(",");
|
|
118
|
+
return [slug(platform?.groups?.subject ?? "subject"), platforms];
|
|
119
|
+
}
|
|
120
|
+
// implements REQ-mcp-suggest-predicates
|
|
121
|
+
export function inferPreservationRuleArgs(text) {
|
|
122
|
+
const preservation = text.match(/^(?<subject>.+?)\s+(?:must|shall|should)\s+preserve\s+(?<preserved>.+?)\s+when\s+(?:the\s+)?(?<condition>.+?)\.?$/i);
|
|
123
|
+
return [
|
|
124
|
+
slug(preservation?.groups?.subject ?? "subject"),
|
|
125
|
+
slug(preservation?.groups?.preserved ?? "preserved"),
|
|
126
|
+
normalizePredicateToken(preservation?.groups?.condition ?? "condition"),
|
|
127
|
+
];
|
|
128
|
+
}
|
|
129
|
+
// implements REQ-mcp-suggest-predicates
|
|
130
|
+
export function inferAbstractionBoundaryRuleArgs(text) {
|
|
131
|
+
const boundary = text.match(/^(?<subject>.+?)\s+(?:must|shall|should)\s+be\s+persisted\s+as\s+(?<contract>.+?)\.?$/i);
|
|
132
|
+
return [
|
|
133
|
+
slug(boundary?.groups?.subject ?? "subject"),
|
|
134
|
+
"persisted_as",
|
|
135
|
+
normalizePredicateToken(boundary?.groups?.contract ?? "contract"),
|
|
136
|
+
];
|
|
137
|
+
}
|
|
138
|
+
// implements REQ-mcp-suggest-predicates
|
|
139
|
+
export function inferSecurityConfigurationRuleArgs(text) {
|
|
140
|
+
const config = text.match(/^(?<subject>.+?)\s+(?:must|shall|should)\s+have\s+explicit\s+(?<setting>[A-Za-z0-9_.-]+)\s+(?<value>[A-Za-z0-9_.-]+)\.?$/i);
|
|
141
|
+
return [
|
|
142
|
+
slug(config?.groups?.subject ?? "subject"),
|
|
143
|
+
slug(config?.groups?.setting ?? "setting"),
|
|
144
|
+
slug(config?.groups?.value ?? "value"),
|
|
145
|
+
];
|
|
146
|
+
}
|
|
147
|
+
// implements REQ-mcp-suggest-predicates
|
|
148
|
+
export function inferOrderedStrategyRuleArgs(text) {
|
|
149
|
+
const ordered = text.match(/^(?<subject>.+?)\s+(?:must|shall|should)\s+use\s+(?<kind>.+?)\s+in\s+priority\s+order\s+(?<values>.+?)\.?$/i);
|
|
150
|
+
const values = (ordered?.groups?.values ?? "")
|
|
151
|
+
.split(/,|>/)
|
|
152
|
+
.map((value) => normalizePredicateToken(value))
|
|
153
|
+
.filter((value) => value.length > 0)
|
|
154
|
+
.join(",");
|
|
155
|
+
return [
|
|
156
|
+
slug(ordered?.groups?.subject ?? "subject"),
|
|
157
|
+
slug(ordered?.groups?.kind ?? "strategy"),
|
|
158
|
+
values || "ordered_values",
|
|
159
|
+
];
|
|
160
|
+
}
|
|
161
|
+
// implements REQ-mcp-suggest-predicates
|
|
162
|
+
export function inferRefreshPolicyRuleArgs(text) {
|
|
163
|
+
const refresh = text.match(/^(?<subject>.+?)\s+(?:must|shall|should)\s+automatically\s+refresh\s+(?<target>.+?)\s+without\s+requiring\s+manual\s+page\s+reload\.?$/i);
|
|
164
|
+
return [
|
|
165
|
+
slug(refresh?.groups?.subject ?? "subject"),
|
|
166
|
+
slug(refresh?.groups?.target ?? "target"),
|
|
167
|
+
"automatic",
|
|
168
|
+
];
|
|
169
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare function inferScopedAuthorizationRuleArgs(text: string): string[];
|
|
2
|
+
export declare function inferDocumentationStandardRuleArgs(text: string): string[];
|
|
3
|
+
export declare function inferWarmupPolicyRuleArgs(text: string): string[];
|
|
4
|
+
export declare function inferVisualLayoutRuleArgs(text: string): string[];
|
|
5
|
+
export declare function inferEnforcementLocationRuleArgs(text: string): string[];
|
|
6
|
+
export declare function inferReconciliationRuleArgs(text: string): string[];
|
|
7
|
+
export declare function inferThrottlePolicyRuleArgs(text: string): string[];
|
|
8
|
+
export declare function inferDefaultValueArgs(text: string, subject: string): string[];
|
|
9
|
+
export declare function inferUniquenessArgs(text: string): string[];
|
|
10
|
+
export declare function inferStateMembershipArgs(text: string, subject: string): string[];
|
|
11
|
+
export declare function inferTemporalOrderArgs(text: string, subject: string): string[];
|
|
12
|
+
export declare function inferConditionalBehaviorArgs(text: string, subject: string): string[];
|
|
13
|
+
export declare function inferStateTransitionArgs(text: string, subject: string): string[];
|
|
14
|
+
export declare function inferRateLimitArgs(text: string): string[];
|
|
15
|
+
//# sourceMappingURL=predicate-inference-3.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"predicate-inference-3.d.ts","sourceRoot":"","sources":["../../../src/operations/modeling/predicate-inference-3.ts"],"names":[],"mappings":"AASA,wBAAgB,gCAAgC,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CASvE;AAGD,wBAAgB,kCAAkC,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CASzE;AAGD,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAQhE;AAGD,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAShE;AAGD,wBAAgB,gCAAgC,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAQvE;AAGD,wBAAgB,2BAA2B,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAUlE;AAGD,wBAAgB,2BAA2B,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAQlE;AAGD,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,CAW7E;AAGD,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAW1D;AAGD,wBAAgB,wBAAwB,CACtC,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,GACd,MAAM,EAAE,CAgBV;AAGD,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,GACd,MAAM,EAAE,CAsBV;AAGD,wBAAgB,4BAA4B,CAC1C,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,GACd,MAAM,EAAE,CAsBV;AAGD,wBAAgB,wBAAwB,CACtC,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,GACd,MAAM,EAAE,CAYV;AAGD,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAazD"}
|