@planu/cli 1.1.1 → 1.2.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/dist/config/license-plans.json +110 -9
- package/dist/config/spec-cookbook.json +341 -0
- package/dist/engine/asana-sync.d.ts +12 -0
- package/dist/engine/asana-sync.d.ts.map +1 -0
- package/dist/engine/asana-sync.js +72 -0
- package/dist/engine/asana-sync.js.map +1 -0
- package/dist/engine/code-impact-analyzer.d.ts +6 -0
- package/dist/engine/code-impact-analyzer.d.ts.map +1 -0
- package/dist/engine/code-impact-analyzer.js +152 -0
- package/dist/engine/code-impact-analyzer.js.map +1 -0
- package/dist/engine/compliance-reporter.d.ts +11 -0
- package/dist/engine/compliance-reporter.d.ts.map +1 -0
- package/dist/engine/compliance-reporter.js +245 -0
- package/dist/engine/compliance-reporter.js.map +1 -0
- package/dist/engine/context-manager.d.ts +7 -0
- package/dist/engine/context-manager.d.ts.map +1 -0
- package/dist/engine/context-manager.js +76 -0
- package/dist/engine/context-manager.js.map +1 -0
- package/dist/engine/cost-budget-manager.d.ts +10 -0
- package/dist/engine/cost-budget-manager.d.ts.map +1 -0
- package/dist/engine/cost-budget-manager.js +165 -0
- package/dist/engine/cost-budget-manager.js.map +1 -0
- package/dist/engine/dependency-impact-analyzer.d.ts +14 -0
- package/dist/engine/dependency-impact-analyzer.d.ts.map +1 -0
- package/dist/engine/dependency-impact-analyzer.js +133 -0
- package/dist/engine/dependency-impact-analyzer.js.map +1 -0
- package/dist/engine/diff-spec-generator.d.ts +6 -0
- package/dist/engine/diff-spec-generator.d.ts.map +1 -0
- package/dist/engine/diff-spec-generator.js +181 -0
- package/dist/engine/diff-spec-generator.js.map +1 -0
- package/dist/engine/drift-monitor.d.ts +5 -0
- package/dist/engine/drift-monitor.d.ts.map +1 -0
- package/dist/engine/drift-monitor.js +92 -0
- package/dist/engine/drift-monitor.js.map +1 -0
- package/dist/engine/global-rules-manager.d.ts +10 -0
- package/dist/engine/global-rules-manager.d.ts.map +1 -0
- package/dist/engine/global-rules-manager.js +214 -0
- package/dist/engine/global-rules-manager.js.map +1 -0
- package/dist/engine/knowledge-base.d.ts +12 -0
- package/dist/engine/knowledge-base.d.ts.map +1 -0
- package/dist/engine/knowledge-base.js +250 -0
- package/dist/engine/knowledge-base.js.map +1 -0
- package/dist/engine/monday-sync.d.ts +10 -0
- package/dist/engine/monday-sync.d.ts.map +1 -0
- package/dist/engine/monday-sync.js +56 -0
- package/dist/engine/monday-sync.js.map +1 -0
- package/dist/engine/notion-sync.d.ts +13 -0
- package/dist/engine/notion-sync.d.ts.map +1 -0
- package/dist/engine/notion-sync.js +87 -0
- package/dist/engine/notion-sync.js.map +1 -0
- package/dist/engine/onboarding-engine.d.ts +11 -0
- package/dist/engine/onboarding-engine.d.ts.map +1 -0
- package/dist/engine/onboarding-engine.js +575 -0
- package/dist/engine/onboarding-engine.js.map +1 -0
- package/dist/engine/parallel-safety-engine.d.ts +8 -0
- package/dist/engine/parallel-safety-engine.d.ts.map +1 -0
- package/dist/engine/parallel-safety-engine.js +106 -0
- package/dist/engine/parallel-safety-engine.js.map +1 -0
- package/dist/engine/schema-generator.d.ts +6 -0
- package/dist/engine/schema-generator.d.ts.map +1 -0
- package/dist/engine/schema-generator.js +321 -0
- package/dist/engine/schema-generator.js.map +1 -0
- package/dist/engine/spec-cookbook.d.ts +12 -0
- package/dist/engine/spec-cookbook.d.ts.map +1 -0
- package/dist/engine/spec-cookbook.js +176 -0
- package/dist/engine/spec-cookbook.js.map +1 -0
- package/dist/engine/spec-diff-engine.d.ts +8 -0
- package/dist/engine/spec-diff-engine.d.ts.map +1 -0
- package/dist/engine/spec-diff-engine.js +321 -0
- package/dist/engine/spec-diff-engine.js.map +1 -0
- package/dist/engine/spec-hooks-engine.d.ts +12 -0
- package/dist/engine/spec-hooks-engine.d.ts.map +1 -0
- package/dist/engine/spec-hooks-engine.js +79 -0
- package/dist/engine/spec-hooks-engine.js.map +1 -0
- package/dist/engine/spec-lint-engine.d.ts +6 -0
- package/dist/engine/spec-lint-engine.d.ts.map +1 -0
- package/dist/engine/spec-lint-engine.js +164 -0
- package/dist/engine/spec-lint-engine.js.map +1 -0
- package/dist/engine/spec-scheduler.d.ts +13 -0
- package/dist/engine/spec-scheduler.d.ts.map +1 -0
- package/dist/engine/spec-scheduler.js +154 -0
- package/dist/engine/spec-scheduler.js.map +1 -0
- package/dist/engine/spec-source-sync.d.ts +14 -0
- package/dist/engine/spec-source-sync.d.ts.map +1 -0
- package/dist/engine/spec-source-sync.js +148 -0
- package/dist/engine/spec-source-sync.js.map +1 -0
- package/dist/engine/tech-debt-manager.d.ts +12 -0
- package/dist/engine/tech-debt-manager.d.ts.map +1 -0
- package/dist/engine/tech-debt-manager.js +152 -0
- package/dist/engine/tech-debt-manager.js.map +1 -0
- package/dist/engine/validation-loop.d.ts +4 -0
- package/dist/engine/validation-loop.d.ts.map +1 -0
- package/dist/engine/validation-loop.js +133 -0
- package/dist/engine/validation-loop.js.map +1 -0
- package/dist/engine/webhook-server.d.ts +19 -0
- package/dist/engine/webhook-server.d.ts.map +1 -0
- package/dist/engine/webhook-server.js +169 -0
- package/dist/engine/webhook-server.js.map +1 -0
- package/dist/engine/workspace-manager.d.ts +8 -0
- package/dist/engine/workspace-manager.d.ts.map +1 -0
- package/dist/engine/workspace-manager.js +255 -0
- package/dist/engine/workspace-manager.js.map +1 -0
- package/dist/index.js +50 -0
- package/dist/index.js.map +1 -1
- package/dist/storage/api-surfaces-store.d.ts +8 -0
- package/dist/storage/api-surfaces-store.d.ts.map +1 -0
- package/dist/storage/api-surfaces-store.js +31 -0
- package/dist/storage/api-surfaces-store.js.map +1 -0
- package/dist/storage/asana-config-store.d.ts +9 -0
- package/dist/storage/asana-config-store.d.ts.map +1 -0
- package/dist/storage/asana-config-store.js +51 -0
- package/dist/storage/asana-config-store.js.map +1 -0
- package/dist/storage/context-config-store.d.ts +4 -0
- package/dist/storage/context-config-store.d.ts.map +1 -0
- package/dist/storage/context-config-store.js +20 -0
- package/dist/storage/context-config-store.js.map +1 -0
- package/dist/storage/cost-budget-store.d.ts +6 -0
- package/dist/storage/cost-budget-store.d.ts.map +1 -0
- package/dist/storage/cost-budget-store.js +42 -0
- package/dist/storage/cost-budget-store.js.map +1 -0
- package/dist/storage/drift-monitor-store.d.ts +9 -0
- package/dist/storage/drift-monitor-store.d.ts.map +1 -0
- package/dist/storage/drift-monitor-store.js +45 -0
- package/dist/storage/drift-monitor-store.js.map +1 -0
- package/dist/storage/monday-config-store.d.ts +9 -0
- package/dist/storage/monday-config-store.d.ts.map +1 -0
- package/dist/storage/monday-config-store.js +51 -0
- package/dist/storage/monday-config-store.js.map +1 -0
- package/dist/storage/notion-config-store.d.ts +9 -0
- package/dist/storage/notion-config-store.d.ts.map +1 -0
- package/dist/storage/notion-config-store.js +51 -0
- package/dist/storage/notion-config-store.js.map +1 -0
- package/dist/storage/onboarding-store.d.ts +4 -0
- package/dist/storage/onboarding-store.d.ts.map +1 -0
- package/dist/storage/onboarding-store.js +14 -0
- package/dist/storage/onboarding-store.js.map +1 -0
- package/dist/storage/retention-policy-store.d.ts +4 -0
- package/dist/storage/retention-policy-store.d.ts.map +1 -0
- package/dist/storage/retention-policy-store.js +20 -0
- package/dist/storage/retention-policy-store.js.map +1 -0
- package/dist/storage/spec-bindings-store.d.ts +8 -0
- package/dist/storage/spec-bindings-store.d.ts.map +1 -0
- package/dist/storage/spec-bindings-store.js +44 -0
- package/dist/storage/spec-bindings-store.js.map +1 -0
- package/dist/storage/spec-hooks-store.d.ts +8 -0
- package/dist/storage/spec-hooks-store.d.ts.map +1 -0
- package/dist/storage/spec-hooks-store.js +56 -0
- package/dist/storage/spec-hooks-store.js.map +1 -0
- package/dist/storage/spec-lint-rules-store.d.ts +5 -0
- package/dist/storage/spec-lint-rules-store.d.ts.map +1 -0
- package/dist/storage/spec-lint-rules-store.js +40 -0
- package/dist/storage/spec-lint-rules-store.js.map +1 -0
- package/dist/storage/tech-debt-store.d.ts +12 -0
- package/dist/storage/tech-debt-store.d.ts.map +1 -0
- package/dist/storage/tech-debt-store.js +51 -0
- package/dist/storage/tech-debt-store.js.map +1 -0
- package/dist/storage/webhook-server-store.d.ts +5 -0
- package/dist/storage/webhook-server-store.d.ts.map +1 -0
- package/dist/storage/webhook-server-store.js +14 -0
- package/dist/storage/webhook-server-store.js.map +1 -0
- package/dist/tools/asana-handler.d.ts +6 -0
- package/dist/tools/asana-handler.d.ts.map +1 -0
- package/dist/tools/asana-handler.js +199 -0
- package/dist/tools/asana-handler.js.map +1 -0
- package/dist/tools/code-impact-handler.d.ts +6 -0
- package/dist/tools/code-impact-handler.d.ts.map +1 -0
- package/dist/tools/code-impact-handler.js +158 -0
- package/dist/tools/code-impact-handler.js.map +1 -0
- package/dist/tools/compliance-audit-handler.d.ts +6 -0
- package/dist/tools/compliance-audit-handler.d.ts.map +1 -0
- package/dist/tools/compliance-audit-handler.js +87 -0
- package/dist/tools/compliance-audit-handler.js.map +1 -0
- package/dist/tools/context-manager-handler.d.ts +8 -0
- package/dist/tools/context-manager-handler.d.ts.map +1 -0
- package/dist/tools/context-manager-handler.js +180 -0
- package/dist/tools/context-manager-handler.js.map +1 -0
- package/dist/tools/cost-budget-handler.d.ts +7 -0
- package/dist/tools/cost-budget-handler.d.ts.map +1 -0
- package/dist/tools/cost-budget-handler.js +242 -0
- package/dist/tools/cost-budget-handler.js.map +1 -0
- package/dist/tools/dependency-impact-handler.d.ts +6 -0
- package/dist/tools/dependency-impact-handler.d.ts.map +1 -0
- package/dist/tools/dependency-impact-handler.js +100 -0
- package/dist/tools/dependency-impact-handler.js.map +1 -0
- package/dist/tools/diff-spec-generator-handler.d.ts +22 -0
- package/dist/tools/diff-spec-generator-handler.d.ts.map +1 -0
- package/dist/tools/diff-spec-generator-handler.js +87 -0
- package/dist/tools/diff-spec-generator-handler.js.map +1 -0
- package/dist/tools/drift-monitor-handler.d.ts +25 -0
- package/dist/tools/drift-monitor-handler.d.ts.map +1 -0
- package/dist/tools/drift-monitor-handler.js +95 -0
- package/dist/tools/drift-monitor-handler.js.map +1 -0
- package/dist/tools/global-rules-handler.d.ts +17 -0
- package/dist/tools/global-rules-handler.d.ts.map +1 -0
- package/dist/tools/global-rules-handler.js +178 -0
- package/dist/tools/global-rules-handler.js.map +1 -0
- package/dist/tools/incoming-webhook-handler.d.ts +6 -0
- package/dist/tools/incoming-webhook-handler.d.ts.map +1 -0
- package/dist/tools/incoming-webhook-handler.js +247 -0
- package/dist/tools/incoming-webhook-handler.js.map +1 -0
- package/dist/tools/knowledge-base-handler.d.ts +7 -0
- package/dist/tools/knowledge-base-handler.d.ts.map +1 -0
- package/dist/tools/knowledge-base-handler.js +137 -0
- package/dist/tools/knowledge-base-handler.js.map +1 -0
- package/dist/tools/monday-handler.d.ts +6 -0
- package/dist/tools/monday-handler.d.ts.map +1 -0
- package/dist/tools/monday-handler.js +190 -0
- package/dist/tools/monday-handler.js.map +1 -0
- package/dist/tools/notion-handler.d.ts +6 -0
- package/dist/tools/notion-handler.d.ts.map +1 -0
- package/dist/tools/notion-handler.js +197 -0
- package/dist/tools/notion-handler.js.map +1 -0
- package/dist/tools/onboarding-handler.d.ts +7 -0
- package/dist/tools/onboarding-handler.d.ts.map +1 -0
- package/dist/tools/onboarding-handler.js +59 -0
- package/dist/tools/onboarding-handler.js.map +1 -0
- package/dist/tools/parallel-safety-handler.d.ts +7 -0
- package/dist/tools/parallel-safety-handler.d.ts.map +1 -0
- package/dist/tools/parallel-safety-handler.js +29 -0
- package/dist/tools/parallel-safety-handler.js.map +1 -0
- package/dist/tools/register-asana-tools.d.ts +3 -0
- package/dist/tools/register-asana-tools.d.ts.map +1 -0
- package/dist/tools/register-asana-tools.js +74 -0
- package/dist/tools/register-asana-tools.js.map +1 -0
- package/dist/tools/register-code-impact-tools.d.ts +3 -0
- package/dist/tools/register-code-impact-tools.d.ts.map +1 -0
- package/dist/tools/register-code-impact-tools.js +58 -0
- package/dist/tools/register-code-impact-tools.js.map +1 -0
- package/dist/tools/register-compliance-audit-tools.d.ts +3 -0
- package/dist/tools/register-compliance-audit-tools.d.ts.map +1 -0
- package/dist/tools/register-compliance-audit-tools.js +106 -0
- package/dist/tools/register-compliance-audit-tools.js.map +1 -0
- package/dist/tools/register-context-manager-tools.d.ts +3 -0
- package/dist/tools/register-context-manager-tools.d.ts.map +1 -0
- package/dist/tools/register-context-manager-tools.js +138 -0
- package/dist/tools/register-context-manager-tools.js.map +1 -0
- package/dist/tools/register-cost-budget-tools.d.ts +3 -0
- package/dist/tools/register-cost-budget-tools.d.ts.map +1 -0
- package/dist/tools/register-cost-budget-tools.js +98 -0
- package/dist/tools/register-cost-budget-tools.js.map +1 -0
- package/dist/tools/register-dependency-impact-tools.d.ts +3 -0
- package/dist/tools/register-dependency-impact-tools.d.ts.map +1 -0
- package/dist/tools/register-dependency-impact-tools.js +63 -0
- package/dist/tools/register-dependency-impact-tools.js.map +1 -0
- package/dist/tools/register-diff-spec-tools.d.ts +3 -0
- package/dist/tools/register-diff-spec-tools.d.ts.map +1 -0
- package/dist/tools/register-diff-spec-tools.js +55 -0
- package/dist/tools/register-diff-spec-tools.js.map +1 -0
- package/dist/tools/register-drift-monitor-tools.d.ts +3 -0
- package/dist/tools/register-drift-monitor-tools.d.ts.map +1 -0
- package/dist/tools/register-drift-monitor-tools.js +64 -0
- package/dist/tools/register-drift-monitor-tools.js.map +1 -0
- package/dist/tools/register-global-rules-tools.d.ts +3 -0
- package/dist/tools/register-global-rules-tools.d.ts.map +1 -0
- package/dist/tools/register-global-rules-tools.js +44 -0
- package/dist/tools/register-global-rules-tools.js.map +1 -0
- package/dist/tools/register-incoming-webhook-tools.d.ts +3 -0
- package/dist/tools/register-incoming-webhook-tools.d.ts.map +1 -0
- package/dist/tools/register-incoming-webhook-tools.js +50 -0
- package/dist/tools/register-incoming-webhook-tools.js.map +1 -0
- package/dist/tools/register-knowledge-base-tools.d.ts +3 -0
- package/dist/tools/register-knowledge-base-tools.d.ts.map +1 -0
- package/dist/tools/register-knowledge-base-tools.js +66 -0
- package/dist/tools/register-knowledge-base-tools.js.map +1 -0
- package/dist/tools/register-monday-tools.d.ts +3 -0
- package/dist/tools/register-monday-tools.d.ts.map +1 -0
- package/dist/tools/register-monday-tools.js +69 -0
- package/dist/tools/register-monday-tools.js.map +1 -0
- package/dist/tools/register-notion-tools.d.ts +3 -0
- package/dist/tools/register-notion-tools.d.ts.map +1 -0
- package/dist/tools/register-notion-tools.js +76 -0
- package/dist/tools/register-notion-tools.js.map +1 -0
- package/dist/tools/register-onboarding-tools.d.ts +3 -0
- package/dist/tools/register-onboarding-tools.d.ts.map +1 -0
- package/dist/tools/register-onboarding-tools.js +70 -0
- package/dist/tools/register-onboarding-tools.js.map +1 -0
- package/dist/tools/register-parallel-safety-tools.d.ts +3 -0
- package/dist/tools/register-parallel-safety-tools.d.ts.map +1 -0
- package/dist/tools/register-parallel-safety-tools.js +18 -0
- package/dist/tools/register-parallel-safety-tools.js.map +1 -0
- package/dist/tools/register-schema-generator-tools.d.ts +3 -0
- package/dist/tools/register-schema-generator-tools.d.ts.map +1 -0
- package/dist/tools/register-schema-generator-tools.js +46 -0
- package/dist/tools/register-schema-generator-tools.js.map +1 -0
- package/dist/tools/register-spec-cookbook-tools.d.ts +3 -0
- package/dist/tools/register-spec-cookbook-tools.d.ts.map +1 -0
- package/dist/tools/register-spec-cookbook-tools.js +90 -0
- package/dist/tools/register-spec-cookbook-tools.js.map +1 -0
- package/dist/tools/register-spec-diff-tools.d.ts +3 -0
- package/dist/tools/register-spec-diff-tools.d.ts.map +1 -0
- package/dist/tools/register-spec-diff-tools.js +67 -0
- package/dist/tools/register-spec-diff-tools.js.map +1 -0
- package/dist/tools/register-spec-hooks-tools.d.ts +3 -0
- package/dist/tools/register-spec-hooks-tools.d.ts.map +1 -0
- package/dist/tools/register-spec-hooks-tools.js +124 -0
- package/dist/tools/register-spec-hooks-tools.js.map +1 -0
- package/dist/tools/register-spec-lint-tools.d.ts +3 -0
- package/dist/tools/register-spec-lint-tools.d.ts.map +1 -0
- package/dist/tools/register-spec-lint-tools.js +79 -0
- package/dist/tools/register-spec-lint-tools.js.map +1 -0
- package/dist/tools/register-spec-scheduler-tools.d.ts +3 -0
- package/dist/tools/register-spec-scheduler-tools.d.ts.map +1 -0
- package/dist/tools/register-spec-scheduler-tools.js +73 -0
- package/dist/tools/register-spec-scheduler-tools.js.map +1 -0
- package/dist/tools/register-spec-source-tools.d.ts +3 -0
- package/dist/tools/register-spec-source-tools.d.ts.map +1 -0
- package/dist/tools/register-spec-source-tools.js +48 -0
- package/dist/tools/register-spec-source-tools.js.map +1 -0
- package/dist/tools/register-tech-debt-tools.d.ts +3 -0
- package/dist/tools/register-tech-debt-tools.d.ts.map +1 -0
- package/dist/tools/register-tech-debt-tools.js +95 -0
- package/dist/tools/register-tech-debt-tools.js.map +1 -0
- package/dist/tools/register-validation-loop-tools.d.ts +3 -0
- package/dist/tools/register-validation-loop-tools.d.ts.map +1 -0
- package/dist/tools/register-validation-loop-tools.js +77 -0
- package/dist/tools/register-validation-loop-tools.js.map +1 -0
- package/dist/tools/register-workspace-dashboard-tools.d.ts +3 -0
- package/dist/tools/register-workspace-dashboard-tools.d.ts.map +1 -0
- package/dist/tools/register-workspace-dashboard-tools.js +98 -0
- package/dist/tools/register-workspace-dashboard-tools.js.map +1 -0
- package/dist/tools/schema-generator-handler.d.ts +4 -0
- package/dist/tools/schema-generator-handler.d.ts.map +1 -0
- package/dist/tools/schema-generator-handler.js +129 -0
- package/dist/tools/schema-generator-handler.js.map +1 -0
- package/dist/tools/spec-cookbook-handler.d.ts +7 -0
- package/dist/tools/spec-cookbook-handler.d.ts.map +1 -0
- package/dist/tools/spec-cookbook-handler.js +83 -0
- package/dist/tools/spec-cookbook-handler.js.map +1 -0
- package/dist/tools/spec-hooks-handler.d.ts +7 -0
- package/dist/tools/spec-hooks-handler.d.ts.map +1 -0
- package/dist/tools/spec-hooks-handler.js +112 -0
- package/dist/tools/spec-hooks-handler.js.map +1 -0
- package/dist/tools/spec-lint-handler.d.ts +6 -0
- package/dist/tools/spec-lint-handler.d.ts.map +1 -0
- package/dist/tools/spec-lint-handler.js +165 -0
- package/dist/tools/spec-lint-handler.js.map +1 -0
- package/dist/tools/spec-scheduler-handler.d.ts +6 -0
- package/dist/tools/spec-scheduler-handler.d.ts.map +1 -0
- package/dist/tools/spec-scheduler-handler.js +108 -0
- package/dist/tools/spec-scheduler-handler.js.map +1 -0
- package/dist/tools/spec-source-handler.d.ts +21 -0
- package/dist/tools/spec-source-handler.d.ts.map +1 -0
- package/dist/tools/spec-source-handler.js +75 -0
- package/dist/tools/spec-source-handler.js.map +1 -0
- package/dist/tools/spec-visual-diff-handler.d.ts +7 -0
- package/dist/tools/spec-visual-diff-handler.d.ts.map +1 -0
- package/dist/tools/spec-visual-diff-handler.js +130 -0
- package/dist/tools/spec-visual-diff-handler.js.map +1 -0
- package/dist/tools/tech-debt-handler.d.ts +8 -0
- package/dist/tools/tech-debt-handler.d.ts.map +1 -0
- package/dist/tools/tech-debt-handler.js +150 -0
- package/dist/tools/tech-debt-handler.js.map +1 -0
- package/dist/tools/validation-loop-handler.d.ts +5 -0
- package/dist/tools/validation-loop-handler.d.ts.map +1 -0
- package/dist/tools/validation-loop-handler.js +59 -0
- package/dist/tools/validation-loop-handler.js.map +1 -0
- package/dist/tools/workspace-dashboard-handler.d.ts +8 -0
- package/dist/tools/workspace-dashboard-handler.d.ts.map +1 -0
- package/dist/tools/workspace-dashboard-handler.js +108 -0
- package/dist/tools/workspace-dashboard-handler.js.map +1 -0
- package/dist/types/code-impact.d.ts +57 -0
- package/dist/types/code-impact.d.ts.map +1 -0
- package/dist/types/code-impact.js +3 -0
- package/dist/types/code-impact.js.map +1 -0
- package/dist/types/compliance-audit.d.ts +55 -0
- package/dist/types/compliance-audit.d.ts.map +1 -0
- package/dist/types/compliance-audit.js +3 -0
- package/dist/types/compliance-audit.js.map +1 -0
- package/dist/types/context-manager.d.ts +57 -0
- package/dist/types/context-manager.d.ts.map +1 -0
- package/dist/types/context-manager.js +3 -0
- package/dist/types/context-manager.js.map +1 -0
- package/dist/types/cost-budget.d.ts +84 -0
- package/dist/types/cost-budget.d.ts.map +1 -0
- package/dist/types/cost-budget.js +3 -0
- package/dist/types/cost-budget.js.map +1 -0
- package/dist/types/dependency-impact.d.ts +45 -0
- package/dist/types/dependency-impact.d.ts.map +1 -0
- package/dist/types/dependency-impact.js +3 -0
- package/dist/types/dependency-impact.js.map +1 -0
- package/dist/types/diff-spec-types.d.ts +39 -0
- package/dist/types/diff-spec-types.d.ts.map +1 -0
- package/dist/types/diff-spec-types.js +3 -0
- package/dist/types/diff-spec-types.js.map +1 -0
- package/dist/types/drift-monitor-types.d.ts +47 -0
- package/dist/types/drift-monitor-types.d.ts.map +1 -0
- package/dist/types/drift-monitor-types.js +3 -0
- package/dist/types/drift-monitor-types.js.map +1 -0
- package/dist/types/global-rules-types.d.ts +31 -0
- package/dist/types/global-rules-types.d.ts.map +1 -0
- package/dist/types/global-rules-types.js +3 -0
- package/dist/types/global-rules-types.js.map +1 -0
- package/dist/types/incoming-webhook.d.ts +40 -0
- package/dist/types/incoming-webhook.d.ts.map +1 -0
- package/dist/types/incoming-webhook.js +3 -0
- package/dist/types/incoming-webhook.js.map +1 -0
- package/dist/types/index.d.ts +23 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +23 -0
- package/dist/types/index.js.map +1 -1
- package/dist/types/knowledge-base.d.ts +57 -0
- package/dist/types/knowledge-base.d.ts.map +1 -0
- package/dist/types/knowledge-base.js +3 -0
- package/dist/types/knowledge-base.js.map +1 -0
- package/dist/types/notion-asana-monday.d.ts +196 -0
- package/dist/types/notion-asana-monday.d.ts.map +1 -0
- package/dist/types/notion-asana-monday.js +3 -0
- package/dist/types/notion-asana-monday.js.map +1 -0
- package/dist/types/onboarding-types.d.ts +69 -0
- package/dist/types/onboarding-types.d.ts.map +1 -0
- package/dist/types/onboarding-types.js +3 -0
- package/dist/types/onboarding-types.js.map +1 -0
- package/dist/types/parallel-safety-types.d.ts +14 -0
- package/dist/types/parallel-safety-types.d.ts.map +1 -0
- package/dist/types/parallel-safety-types.js +3 -0
- package/dist/types/parallel-safety-types.js.map +1 -0
- package/dist/types/schema-generator.d.ts +61 -0
- package/dist/types/schema-generator.d.ts.map +1 -0
- package/dist/types/schema-generator.js +3 -0
- package/dist/types/schema-generator.js.map +1 -0
- package/dist/types/spec-cookbook-types.d.ts +45 -0
- package/dist/types/spec-cookbook-types.d.ts.map +1 -0
- package/dist/types/spec-cookbook-types.js +3 -0
- package/dist/types/spec-cookbook-types.js.map +1 -0
- package/dist/types/spec-diff-visual-types.d.ts +75 -0
- package/dist/types/spec-diff-visual-types.d.ts.map +1 -0
- package/dist/types/spec-diff-visual-types.js +3 -0
- package/dist/types/spec-diff-visual-types.js.map +1 -0
- package/dist/types/spec-hooks.d.ts +62 -0
- package/dist/types/spec-hooks.d.ts.map +1 -0
- package/dist/types/spec-hooks.js +3 -0
- package/dist/types/spec-hooks.js.map +1 -0
- package/dist/types/spec-lint.d.ts +79 -0
- package/dist/types/spec-lint.d.ts.map +1 -0
- package/dist/types/spec-lint.js +3 -0
- package/dist/types/spec-lint.js.map +1 -0
- package/dist/types/spec-scheduler.d.ts +58 -0
- package/dist/types/spec-scheduler.d.ts.map +1 -0
- package/dist/types/spec-scheduler.js +3 -0
- package/dist/types/spec-scheduler.js.map +1 -0
- package/dist/types/spec-source-types.d.ts +37 -0
- package/dist/types/spec-source-types.d.ts.map +1 -0
- package/dist/types/spec-source-types.js +3 -0
- package/dist/types/spec-source-types.js.map +1 -0
- package/dist/types/tech-debt.d.ts +66 -0
- package/dist/types/tech-debt.d.ts.map +1 -0
- package/dist/types/tech-debt.js +3 -0
- package/dist/types/tech-debt.js.map +1 -0
- package/dist/types/validation-loop.d.ts +39 -0
- package/dist/types/validation-loop.d.ts.map +1 -0
- package/dist/types/validation-loop.js +3 -0
- package/dist/types/validation-loop.js.map +1 -0
- package/dist/types/workspace-dashboard-types.d.ts +74 -0
- package/dist/types/workspace-dashboard-types.d.ts.map +1 -0
- package/dist/types/workspace-dashboard-types.js +3 -0
- package/dist/types/workspace-dashboard-types.js.map +1 -0
- package/package.json +2 -1
- package/src/config/license-plans.json +110 -9
- package/src/config/spec-cookbook.json +341 -0
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
// tools/register-validation-loop-tools.ts — SPEC-369: Register Test Automation Loop tools
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { safeLicensed } from './safe-handler.js';
|
|
4
|
+
import { handleSpecHealthCheck, handleHealthCheckAll, handleRunValidationLoop, } from './validation-loop-handler.js';
|
|
5
|
+
export function registerValidationLoopTools(server) {
|
|
6
|
+
server.registerTool('spec_health_check', {
|
|
7
|
+
description: 'Compute a 0-100 health score for a spec by checking: completeness (title + description + criteria), ' +
|
|
8
|
+
'test file existence, last validation result, spec status (done = coverage ok), and drift status. ' +
|
|
9
|
+
'Each dimension is worth 20 points.',
|
|
10
|
+
inputSchema: {
|
|
11
|
+
projectPath: z
|
|
12
|
+
.string()
|
|
13
|
+
.min(1)
|
|
14
|
+
.max(4096)
|
|
15
|
+
.describe('Absolute path to the project root directory'),
|
|
16
|
+
specId: z.string().min(1).max(200).describe('Spec ID to check (e.g. SPEC-001)'),
|
|
17
|
+
},
|
|
18
|
+
annotations: {
|
|
19
|
+
title: 'Spec Health Check',
|
|
20
|
+
readOnlyHint: true,
|
|
21
|
+
},
|
|
22
|
+
}, safeLicensed('spec_health_check', async (args) => handleSpecHealthCheck(args)));
|
|
23
|
+
server.registerTool('health_check_all', {
|
|
24
|
+
description: 'Run spec_health_check on all specs in the project and return them sorted from worst to best score. ' +
|
|
25
|
+
'Use this to identify which specs need the most attention.',
|
|
26
|
+
inputSchema: {
|
|
27
|
+
projectPath: z
|
|
28
|
+
.string()
|
|
29
|
+
.min(1)
|
|
30
|
+
.max(4096)
|
|
31
|
+
.describe('Absolute path to the project root directory'),
|
|
32
|
+
},
|
|
33
|
+
annotations: {
|
|
34
|
+
title: 'Health Check All Specs',
|
|
35
|
+
readOnlyHint: true,
|
|
36
|
+
},
|
|
37
|
+
}, safeLicensed('health_check_all', async (args) => handleHealthCheckAll(args)));
|
|
38
|
+
server.registerTool('run_validation_loop', {
|
|
39
|
+
description: 'Generate a structured validation execution plan for a set of specs. ' +
|
|
40
|
+
'Shows the steps to validate each spec (validate → test → fix → re-validate) ' +
|
|
41
|
+
'with the specified number of iterations. ' +
|
|
42
|
+
'NOTE: Planu cannot run shell commands — this returns the plan for you to execute.',
|
|
43
|
+
inputSchema: {
|
|
44
|
+
projectPath: z
|
|
45
|
+
.string()
|
|
46
|
+
.min(1)
|
|
47
|
+
.max(4096)
|
|
48
|
+
.describe('Absolute path to the project root directory'),
|
|
49
|
+
specIds: z
|
|
50
|
+
.array(z.string().min(1).max(200))
|
|
51
|
+
.min(1)
|
|
52
|
+
.max(50)
|
|
53
|
+
.describe('List of spec IDs to validate (e.g. ["SPEC-001", "SPEC-002"])'),
|
|
54
|
+
maxIterations: z
|
|
55
|
+
.number()
|
|
56
|
+
.int()
|
|
57
|
+
.min(1)
|
|
58
|
+
.max(10)
|
|
59
|
+
.optional()
|
|
60
|
+
.describe('Maximum number of fix-and-retry iterations (default: 3)'),
|
|
61
|
+
testCommand: z
|
|
62
|
+
.string()
|
|
63
|
+
.max(500)
|
|
64
|
+
.optional()
|
|
65
|
+
.describe('Shell command to run tests (default: "pnpm test")'),
|
|
66
|
+
autoFix: z
|
|
67
|
+
.boolean()
|
|
68
|
+
.optional()
|
|
69
|
+
.describe('Whether to include auto-fix steps in the plan (default: false)'),
|
|
70
|
+
},
|
|
71
|
+
annotations: {
|
|
72
|
+
title: 'Run Validation Loop (Plan)',
|
|
73
|
+
readOnlyHint: true,
|
|
74
|
+
},
|
|
75
|
+
}, safeLicensed('run_validation_loop', (args) => Promise.resolve(handleRunValidationLoop(args))));
|
|
76
|
+
}
|
|
77
|
+
//# sourceMappingURL=register-validation-loop-tools.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"register-validation-loop-tools.js","sourceRoot":"","sources":["../../src/tools/register-validation-loop-tools.ts"],"names":[],"mappings":"AAAA,0FAA0F;AAG1F,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EACL,qBAAqB,EACrB,oBAAoB,EACpB,uBAAuB,GACxB,MAAM,8BAA8B,CAAC;AAOtC,MAAM,UAAU,2BAA2B,CAAC,MAAiB;IAC3D,MAAM,CAAC,YAAY,CACjB,mBAAmB,EACnB;QACE,WAAW,EACT,sGAAsG;YACtG,mGAAmG;YACnG,oCAAoC;QACtC,WAAW,EAAE;YACX,WAAW,EAAE,CAAC;iBACX,MAAM,EAAE;iBACR,GAAG,CAAC,CAAC,CAAC;iBACN,GAAG,CAAC,IAAI,CAAC;iBACT,QAAQ,CAAC,6CAA6C,CAAC;YAC1D,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,kCAAkC,CAAC;SAChF;QACD,WAAW,EAAE;YACX,KAAK,EAAE,mBAAmB;YAC1B,YAAY,EAAE,IAAI;SACnB;KACF,EACD,YAAY,CAAC,mBAAmB,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,CAC/C,qBAAqB,CAAC,IAA4B,CAAC,CACpD,CACF,CAAC;IAEF,MAAM,CAAC,YAAY,CACjB,kBAAkB,EAClB;QACE,WAAW,EACT,qGAAqG;YACrG,2DAA2D;QAC7D,WAAW,EAAE;YACX,WAAW,EAAE,CAAC;iBACX,MAAM,EAAE;iBACR,GAAG,CAAC,CAAC,CAAC;iBACN,GAAG,CAAC,IAAI,CAAC;iBACT,QAAQ,CAAC,6CAA6C,CAAC;SAC3D;QACD,WAAW,EAAE;YACX,KAAK,EAAE,wB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AA8B,CAAC,CAAC,CACzE,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"register-workspace-dashboard-tools.d.ts","sourceRoot":"","sources":["../../src/tools/register-workspace-dashboard-tools.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAYzE,wBAAgB,+BAA+B,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CAgIvE"}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { safeLicensed } from './safe-handler.js';
|
|
3
|
+
import { handleWorkspaceOverview, handleWorkspaceHealth, handleBulkProjectOperations, handleWorkspaceReport, handleWorkspaceSearch, handleWorkspaceAlerts, } from './workspace-dashboard-handler.js';
|
|
4
|
+
export function registerWorkspaceDashboardTools(server) {
|
|
5
|
+
// workspace_overview
|
|
6
|
+
server.registerTool('workspace_overview', {
|
|
7
|
+
description: 'Get an overview of all registered projects in the workspace. Shows spec counts, progress, and health scores per project.',
|
|
8
|
+
inputSchema: {
|
|
9
|
+
healthThreshold: z
|
|
10
|
+
.number()
|
|
11
|
+
.int()
|
|
12
|
+
.min(0)
|
|
13
|
+
.max(100)
|
|
14
|
+
.optional()
|
|
15
|
+
.default(50)
|
|
16
|
+
.describe('Health score threshold % for highlighting (default: 50)'),
|
|
17
|
+
},
|
|
18
|
+
annotations: { readOnlyHint: true },
|
|
19
|
+
}, safeLicensed('workspace_overview', async (args) => handleWorkspaceOverview(args)));
|
|
20
|
+
// workspace_health
|
|
21
|
+
server.registerTool('workspace_health', {
|
|
22
|
+
description: 'Get aggregated health metrics across all registered workspace projects. Returns totals for specs, done, in-progress, blocked, and average health score.',
|
|
23
|
+
inputSchema: {
|
|
24
|
+
healthThreshold: z
|
|
25
|
+
.number()
|
|
26
|
+
.int()
|
|
27
|
+
.min(0)
|
|
28
|
+
.max(100)
|
|
29
|
+
.optional()
|
|
30
|
+
.default(50)
|
|
31
|
+
.describe('Health threshold % to classify projects (default: 50)'),
|
|
32
|
+
},
|
|
33
|
+
annotations: { readOnlyHint: true },
|
|
34
|
+
}, safeLicensed('workspace_health', async (args) => handleWorkspaceHealth(args)));
|
|
35
|
+
// bulk_project_operations
|
|
36
|
+
server.registerTool('bulk_project_operations', {
|
|
37
|
+
description: 'Run a bulk operation across multiple workspace projects. Supports validate-all (scan specs) and generate-reports. Use dryRun to preview affected projects.',
|
|
38
|
+
inputSchema: {
|
|
39
|
+
operation: z
|
|
40
|
+
.enum(['validate-all', 'generate-reports'])
|
|
41
|
+
.describe('Operation to run: validate-all or generate-reports'),
|
|
42
|
+
projectPaths: z
|
|
43
|
+
.array(z.string().min(1).max(4096))
|
|
44
|
+
.optional()
|
|
45
|
+
.describe('Specific project paths to target (omit for all registered projects)'),
|
|
46
|
+
dryRun: z
|
|
47
|
+
.boolean()
|
|
48
|
+
.optional()
|
|
49
|
+
.default(false)
|
|
50
|
+
.describe('Preview affected projects without running (default: false)'),
|
|
51
|
+
},
|
|
52
|
+
annotations: { readOnlyHint: false },
|
|
53
|
+
}, safeLicensed('bulk_project_operations', async (args) => handleBulkProjectOperations(args)));
|
|
54
|
+
// workspace_report
|
|
55
|
+
server.registerTool('workspace_report', {
|
|
56
|
+
description: 'Generate an HTML workspace report summarizing all projects, spec counts, health scores, and progress. Suitable for stakeholder sharing.',
|
|
57
|
+
inputSchema: {
|
|
58
|
+
includeCharts: z
|
|
59
|
+
.boolean()
|
|
60
|
+
.optional()
|
|
61
|
+
.default(false)
|
|
62
|
+
.describe('Include visual charts (default: false)'),
|
|
63
|
+
},
|
|
64
|
+
annotations: { readOnlyHint: true },
|
|
65
|
+
}, safeLicensed('workspace_report', async (args) => handleWorkspaceReport(args)));
|
|
66
|
+
// workspace_search
|
|
67
|
+
server.registerTool('workspace_search', {
|
|
68
|
+
description: 'Search for specs by keyword across all registered workspace projects. Searches spec IDs and titles.',
|
|
69
|
+
inputSchema: {
|
|
70
|
+
query: z.string().min(1).max(200).describe('Search keyword'),
|
|
71
|
+
maxResults: z
|
|
72
|
+
.number()
|
|
73
|
+
.int()
|
|
74
|
+
.min(1)
|
|
75
|
+
.max(200)
|
|
76
|
+
.optional()
|
|
77
|
+
.default(50)
|
|
78
|
+
.describe('Max results (default: 50)'),
|
|
79
|
+
},
|
|
80
|
+
annotations: { readOnlyHint: true },
|
|
81
|
+
}, safeLicensed('workspace_search', async (args) => handleWorkspaceSearch(args)));
|
|
82
|
+
// workspace_alerts
|
|
83
|
+
server.registerTool('workspace_alerts', {
|
|
84
|
+
description: 'List stale specs across all workspace projects. Highlights specs in blocked or in-progress status that have not been updated for the configured number of days.',
|
|
85
|
+
inputSchema: {
|
|
86
|
+
staleDaysThreshold: z
|
|
87
|
+
.number()
|
|
88
|
+
.int()
|
|
89
|
+
.min(1)
|
|
90
|
+
.max(365)
|
|
91
|
+
.optional()
|
|
92
|
+
.default(14)
|
|
93
|
+
.describe('Days without update to consider a spec stale (default: 14)'),
|
|
94
|
+
},
|
|
95
|
+
annotations: { readOnlyHint: true },
|
|
96
|
+
}, safeLicensed('workspace_alerts', async (args) => handleWorkspaceAlerts(args)));
|
|
97
|
+
}
|
|
98
|
+
//# sourceMappingURL=register-workspace-dashboard-tools.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"register-workspace-dashboard-tools.js","sourceRoot":"","sources":["../../src/tools/register-workspace-dashboard-tools.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EACL,uBAAuB,EACvB,qBAAqB,EACrB,2BAA2B,EAC3B,qBAAqB,EACrB,qBAAqB,EACrB,qBAAqB,GACtB,MAAM,kCAAkC,CAAC;AAE1C,MAAM,UAAU,+BAA+B,CAAC,MAAiB;IAC/D,qBAAqB;IACrB,MAAM,CAAC,YAAY,CACjB,o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AW,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE;KACpC,EACD,YAAY,CAAC,kBAAkB,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,qBAAqB,CAAC,IAAI,CAAC,CAAC,CAC9E,CAAC;IAEF,mBAAmB;IACnB,MAAM,CAAC,YAAY,CACjB,kBAAkB,EAClB;QACE,WAAW,EACT,iKAAiK;QACnK,WAAW,EAAE;YACX,kBAAkB,EAAE,CAAC;iBAClB,MAAM,EAAE;iBACR,GAAG,EAAE;iBACL,GAAG,CAAC,CAAC,CAAC;iBACN,GAAG,CAAC,GAAG,CAAC;iBACR,QAAQ,EAAE;iBACV,OAAO,CAAC,EAAE,CAAC;iBACX,QAAQ,CAAC,4DAA4D,CAAC;SAC1E;QACD,WAAW,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE;KACpC,EACD,YAAY,CAAC,kBAAkB,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,qBAAqB,CAAC,IAAI,CAAC,CAAC,CAC9E,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ToolResult, GenerateValidationSchemaInput, GenerateApiClientInput } from '../types/index.js';
|
|
2
|
+
export declare function handleGenerateValidationSchema(input: GenerateValidationSchemaInput): Promise<ToolResult>;
|
|
3
|
+
export declare function handleGenerateApiClient(input: GenerateApiClientInput): Promise<ToolResult>;
|
|
4
|
+
//# sourceMappingURL=schema-generator-handler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema-generator-handler.d.ts","sourceRoot":"","sources":["../../src/tools/schema-generator-handler.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,UAAU,EACV,6BAA6B,EAC7B,sBAAsB,EACvB,MAAM,mBAAmB,CAAC;AA6B3B,wBAAsB,8BAA8B,CAClD,KAAK,EAAE,6BAA6B,GACnC,OAAO,CAAC,UAAU,CAAC,CA8DrB;AAED,wBAAsB,uBAAuB,CAAC,KAAK,EAAE,sBAAsB,GAAG,OAAO,CAAC,UAAU,CAAC,CAqDhG"}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
// tools/schema-generator-handler.ts — Handler for Validation Schema Generator (SPEC-365)
|
|
2
|
+
import { readFile, writeFile, mkdir } from 'node:fs/promises';
|
|
3
|
+
import { dirname } from 'node:path';
|
|
4
|
+
import { getSpec } from '../storage/spec-store.js';
|
|
5
|
+
import { hashProjectPath } from '../storage/base-store.js';
|
|
6
|
+
import { generateSchemas, generateApiClient } from '../engine/schema-generator.js';
|
|
7
|
+
async function readSpecText(spec) {
|
|
8
|
+
const parts = [];
|
|
9
|
+
if (spec.description !== undefined) {
|
|
10
|
+
parts.push(spec.description);
|
|
11
|
+
}
|
|
12
|
+
if (spec.specPath !== undefined) {
|
|
13
|
+
try {
|
|
14
|
+
const content = await readFile(spec.specPath, 'utf-8');
|
|
15
|
+
parts.push(content);
|
|
16
|
+
}
|
|
17
|
+
catch {
|
|
18
|
+
// spec file not readable — continue with description only
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
return parts.join('\n\n');
|
|
22
|
+
}
|
|
23
|
+
async function writeOutputFile(outputPath, content) {
|
|
24
|
+
await mkdir(dirname(outputPath), { recursive: true });
|
|
25
|
+
await writeFile(outputPath, content, 'utf-8');
|
|
26
|
+
}
|
|
27
|
+
export async function handleGenerateValidationSchema(input) {
|
|
28
|
+
const { projectPath, specId, library, outputFormat, outputPath } = input;
|
|
29
|
+
try {
|
|
30
|
+
const projectId = hashProjectPath(projectPath);
|
|
31
|
+
const spec = await getSpec(projectId, specId);
|
|
32
|
+
if (spec === null) {
|
|
33
|
+
return {
|
|
34
|
+
content: [{ type: 'text', text: `Spec "${specId}" not found.` }],
|
|
35
|
+
isError: true,
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
const specText = await readSpecText(spec);
|
|
39
|
+
const result = generateSchemas(specId, specText, library, outputFormat, outputPath);
|
|
40
|
+
if (result.entitiesDetected === 0) {
|
|
41
|
+
return {
|
|
42
|
+
content: [
|
|
43
|
+
{
|
|
44
|
+
type: 'text',
|
|
45
|
+
text: `No entities detected in spec "${specId}". ` +
|
|
46
|
+
'Ensure the spec describes entities using keywords like "model", "schema", "interface", or "type".',
|
|
47
|
+
},
|
|
48
|
+
],
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
// Write files if outputPath is provided
|
|
52
|
+
if (outputPath !== undefined) {
|
|
53
|
+
for (const schema of result.schemas) {
|
|
54
|
+
const ext = outputFormat === 'typescript' ? '.ts' : '.js';
|
|
55
|
+
const libSuffix = library === 'all' ? `.${schema.library}` : '';
|
|
56
|
+
const filePath = outputPath.replace(/\.(ts|js)$/, '') + libSuffix + ext;
|
|
57
|
+
await writeOutputFile(filePath, schema.code);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
const codeSection = result.schemas
|
|
61
|
+
.map((s) => `### ${s.library}\n\`\`\`${outputFormat}\n${s.code}\`\`\``)
|
|
62
|
+
.join('\n\n');
|
|
63
|
+
return {
|
|
64
|
+
content: [
|
|
65
|
+
{
|
|
66
|
+
type: 'text',
|
|
67
|
+
text: `Generated ${library} schema(s) for "${specId}". ` +
|
|
68
|
+
`Entities detected: ${String(result.entitiesDetected)}.\n\n${codeSection}` +
|
|
69
|
+
(outputPath !== undefined ? `\n\nWritten to: ${outputPath}` : ''),
|
|
70
|
+
},
|
|
71
|
+
],
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
catch (error) {
|
|
75
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
76
|
+
return {
|
|
77
|
+
content: [{ type: 'text', text: `Failed to generate validation schema: ${message}` }],
|
|
78
|
+
isError: true,
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
export async function handleGenerateApiClient(input) {
|
|
83
|
+
const { projectPath, specId, framework, outputPath } = input;
|
|
84
|
+
try {
|
|
85
|
+
const projectId = hashProjectPath(projectPath);
|
|
86
|
+
const spec = await getSpec(projectId, specId);
|
|
87
|
+
if (spec === null) {
|
|
88
|
+
return {
|
|
89
|
+
content: [{ type: 'text', text: `Spec "${specId}" not found.` }],
|
|
90
|
+
isError: true,
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
const specText = await readSpecText(spec);
|
|
94
|
+
const result = generateApiClient(specId, specText, framework, outputPath);
|
|
95
|
+
if (result.routesDetected === 0) {
|
|
96
|
+
return {
|
|
97
|
+
content: [
|
|
98
|
+
{
|
|
99
|
+
type: 'text',
|
|
100
|
+
text: `No API routes detected in spec "${specId}". ` +
|
|
101
|
+
'Ensure the spec describes routes using patterns like "GET /api/...", "POST /api/...".',
|
|
102
|
+
},
|
|
103
|
+
],
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
if (outputPath !== undefined) {
|
|
107
|
+
await writeOutputFile(outputPath, result.code);
|
|
108
|
+
}
|
|
109
|
+
return {
|
|
110
|
+
content: [
|
|
111
|
+
{
|
|
112
|
+
type: 'text',
|
|
113
|
+
text: `Generated ${framework} client for "${specId}". ` +
|
|
114
|
+
`Routes detected: ${String(result.routesDetected)}.\n\n` +
|
|
115
|
+
`\`\`\`typescript\n${result.code}\`\`\`` +
|
|
116
|
+
(outputPath !== undefined ? `\n\nWritten to: ${outputPath}` : ''),
|
|
117
|
+
},
|
|
118
|
+
],
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
catch (error) {
|
|
122
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
123
|
+
return {
|
|
124
|
+
content: [{ type: 'text', text: `Failed to generate API client: ${message}` }],
|
|
125
|
+
isError: true,
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
//# sourceMappingURL=schema-generator-handler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema-generator-handler.js","sourceRoot":"","sources":["../../src/tools/schema-generator-handler.ts"],"names":[],"mappings":"AAAA,yFAAyF;AAEzF,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
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ToolResult, CookbookListInput, CookbookGetInput, CookbookApplyInput, CookbookContributeInput, CookbookSearchInput } from '../types/index.js';
|
|
2
|
+
export declare function handleCookbookList(args: CookbookListInput): Promise<ToolResult>;
|
|
3
|
+
export declare function handleCookbookGet(args: CookbookGetInput): Promise<ToolResult>;
|
|
4
|
+
export declare function handleCookbookApply(args: CookbookApplyInput): Promise<ToolResult>;
|
|
5
|
+
export declare function handleCookbookContribute(args: CookbookContributeInput): Promise<ToolResult>;
|
|
6
|
+
export declare function handleCookbookSearch(args: CookbookSearchInput): Promise<ToolResult>;
|
|
7
|
+
//# sourceMappingURL=spec-cookbook-handler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spec-cookbook-handler.d.ts","sourceRoot":"","sources":["../../src/tools/spec-cookbook-handler.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,UAAU,EACV,iBAAiB,EACjB,gBAAgB,EAChB,kBAAkB,EAClB,uBAAuB,EACvB,mBAAmB,EACpB,MAAM,mBAAmB,CAAC;AAY3B,wBAAsB,kBAAkB,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,UAAU,CAAC,CAIrF;AAGD,wBAAsB,iBAAiB,CAAC,IAAI,EAAE,gBAAgB,GAAG,OAAO,CAAC,UAAU,CAAC,CAiBnF;AAGD,wBAAsB,mBAAmB,CAAC,IAAI,EAAE,kBAAkB,GAAG,OAAO,CAAC,UAAU,CAAC,CA6BvF;AAGD,wBAAsB,wBAAwB,CAAC,IAAI,EAAE,uBAAuB,GAAG,OAAO,CAAC,UAAU,CAAC,CAuBjG;AAGD,wBAAsB,oBAAoB,CAAC,IAAI,EAAE,mBAAmB,GAAG,OAAO,CAAC,UAAU,CAAC,CAMzF"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
// tools/spec-cookbook-handler.ts — SPEC-361: Spec Cookbook handlers
|
|
2
|
+
import { listEntries, getEntry, searchEntries, applyEntry, contributeEntry, formatEntryMarkdown, formatEntriesListMarkdown, } from '../engine/spec-cookbook.js';
|
|
3
|
+
// eslint-disable-next-line @typescript-eslint/require-await -- sync logic, async signature required by safe() wrapper
|
|
4
|
+
export async function handleCookbookList(args) {
|
|
5
|
+
const entries = listEntries(args.domain, args.featureType, args.limit ?? 50);
|
|
6
|
+
const markdown = formatEntriesListMarkdown(entries);
|
|
7
|
+
return { content: [{ type: 'text', text: markdown }] };
|
|
8
|
+
}
|
|
9
|
+
// eslint-disable-next-line @typescript-eslint/require-await -- sync logic, async signature required by safe() wrapper
|
|
10
|
+
export async function handleCookbookGet(args) {
|
|
11
|
+
const entry = getEntry(args.id);
|
|
12
|
+
if (entry === null) {
|
|
13
|
+
return {
|
|
14
|
+
content: [
|
|
15
|
+
{
|
|
16
|
+
type: 'text',
|
|
17
|
+
text: `No cookbook entry found with ID \`${args.id}\`. Use \`cookbook_list\` to see available entries.`,
|
|
18
|
+
},
|
|
19
|
+
],
|
|
20
|
+
isError: true,
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
const markdown = formatEntryMarkdown(entry);
|
|
24
|
+
return { content: [{ type: 'text', text: markdown }] };
|
|
25
|
+
}
|
|
26
|
+
// eslint-disable-next-line @typescript-eslint/require-await -- sync logic, async signature required by safe() wrapper
|
|
27
|
+
export async function handleCookbookApply(args) {
|
|
28
|
+
const entry = getEntry(args.id);
|
|
29
|
+
if (entry === null) {
|
|
30
|
+
return {
|
|
31
|
+
content: [
|
|
32
|
+
{
|
|
33
|
+
type: 'text',
|
|
34
|
+
text: `No cookbook entry found with ID \`${args.id}\`. Use \`cookbook_list\` to see available entries.`,
|
|
35
|
+
},
|
|
36
|
+
],
|
|
37
|
+
isError: true,
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
const result = applyEntry(entry, args.projectName);
|
|
41
|
+
const output = [
|
|
42
|
+
`# Spec Template: ${result.title}`,
|
|
43
|
+
``,
|
|
44
|
+
`Copy the spec content below and pass it to \`create_spec\` as the description, or save it as a spec file.`,
|
|
45
|
+
`Replace all \`[PLACEHOLDER]\` markers with your project-specific content.`,
|
|
46
|
+
``,
|
|
47
|
+
`---`,
|
|
48
|
+
``,
|
|
49
|
+
result.specContent,
|
|
50
|
+
].join('\n');
|
|
51
|
+
return { content: [{ type: 'text', text: output }] };
|
|
52
|
+
}
|
|
53
|
+
// eslint-disable-next-line @typescript-eslint/require-await -- sync logic, async signature required by safe() wrapper
|
|
54
|
+
export async function handleCookbookContribute(args) {
|
|
55
|
+
const newEntry = contributeEntry({
|
|
56
|
+
domain: args.domain,
|
|
57
|
+
featureType: args.featureType,
|
|
58
|
+
title: args.title,
|
|
59
|
+
description: args.description,
|
|
60
|
+
acceptanceCriteria: args.acceptanceCriteria,
|
|
61
|
+
tags: args.tags,
|
|
62
|
+
});
|
|
63
|
+
const output = [
|
|
64
|
+
`# Contribution Added`,
|
|
65
|
+
``,
|
|
66
|
+
`Your entry has been added to the in-memory cookbook.`,
|
|
67
|
+
``,
|
|
68
|
+
`**ID:** \`${newEntry.id}\``,
|
|
69
|
+
`**Title:** ${newEntry.title}`,
|
|
70
|
+
`**Domain:** ${newEntry.domain}`,
|
|
71
|
+
``,
|
|
72
|
+
`Note: This entry is available for the current session. To permanently add it, submit a PR to the Planu repository.`,
|
|
73
|
+
].join('\n');
|
|
74
|
+
return { content: [{ type: 'text', text: output }] };
|
|
75
|
+
}
|
|
76
|
+
// eslint-disable-next-line @typescript-eslint/require-await -- sync logic, async signature required by safe() wrapper
|
|
77
|
+
export async function handleCookbookSearch(args) {
|
|
78
|
+
const entries = searchEntries(args.query, args.limit ?? 20);
|
|
79
|
+
const markdown = formatEntriesListMarkdown(entries);
|
|
80
|
+
const header = `# Search Results for "${args.query}"\n\n`;
|
|
81
|
+
return { content: [{ type: 'text', text: header + markdown }] };
|
|
82
|
+
}
|
|
83
|
+
//# sourceMappingURL=spec-cookbook-handler.js.map
|
|
@@ -0,0 +1 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AI,CAAC,IAAI,CAAC,CAAC;IAEb,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC;AACvD,CAAC;AAED,sHAAsH;AACtH,MAAM,CAAC,KAAK,UAAU,oBAAoB,CAAC,IAAyB;IAClE,MAAM,OAAO,GAAG,aAAa,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC;IAC5D,MAAM,QAAQ,GAAG,yBAAyB,CAAC,OAAO,CAAC,CAAC;IAEpD,MAAM,MAAM,GAAG,yBAAyB,IAAI,CAAC,KAAK,OAAO,CAAC;IAC1D,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,QAAQ,EAAE,CAAC,EAAE,CAAC;AAClE,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ToolResult, ConfigureSpecHooksInput, ListSpecHooksInput, TestSpecHookInput, DisableSpecHookInput, EnableSpecHookInput } from '../types/index.js';
|
|
2
|
+
export declare function handleConfigureSpecHooks(input: ConfigureSpecHooksInput): Promise<ToolResult>;
|
|
3
|
+
export declare function handleListSpecHooks(input: ListSpecHooksInput): Promise<ToolResult>;
|
|
4
|
+
export declare function handleTestSpecHook(input: TestSpecHookInput): Promise<ToolResult>;
|
|
5
|
+
export declare function handleDisableSpecHook(input: DisableSpecHookInput): Promise<ToolResult>;
|
|
6
|
+
export declare function handleEnableSpecHook(input: EnableSpecHookInput): Promise<ToolResult>;
|
|
7
|
+
//# sourceMappingURL=spec-hooks-handler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spec-hooks-handler.d.ts","sourceRoot":"","sources":["../../src/tools/spec-hooks-handler.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,UAAU,EACV,uBAAuB,EACvB,kBAAkB,EAClB,iBAAiB,EACjB,oBAAoB,EACpB,mBAAmB,EACpB,MAAM,mBAAmB,CAAC;AAS3B,wBAAsB,wBAAwB,CAC5C,KAAK,EAAE,uBAAuB,GAC7B,OAAO,CAAC,UAAU,CAAC,CA4BrB;AAED,wBAAsB,mBAAmB,CAAC,KAAK,EAAE,kBAAkB,GAAG,OAAO,CAAC,UAAU,CAAC,CA0BxF;AAED,wBAAsB,kBAAkB,CAAC,KAAK,EAAE,iBAAiB,GAAG,OAAO,CAAC,UAAU,CAAC,CAwCtF;AAED,wBAAsB,qBAAqB,CAAC,KAAK,EAAE,oBAAoB,GAAG,OAAO,CAAC,UAAU,CAAC,CAW5F;AAED,wBAAsB,oBAAoB,CAAC,KAAK,EAAE,mBAAmB,GAAG,OAAO,CAAC,UAAU,CAAC,CAW1F"}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
// tools/spec-hooks-handler.ts — SPEC-368: Agent Hooks Automáticos
|
|
2
|
+
import { dispatchSpecHooks, describeHookActions } from '../engine/spec-hooks-engine.js';
|
|
3
|
+
import { addSpecHook, loadSpecHooks, getSpecHook, updateSpecHookEnabled, } from '../storage/spec-hooks-store.js';
|
|
4
|
+
export async function handleConfigureSpecHooks(input) {
|
|
5
|
+
const { projectPath, hookName, event, action, filter, enabled = true } = input;
|
|
6
|
+
await addSpecHook(projectPath, {
|
|
7
|
+
name: hookName,
|
|
8
|
+
event,
|
|
9
|
+
action,
|
|
10
|
+
filter,
|
|
11
|
+
enabled,
|
|
12
|
+
runCount: 0,
|
|
13
|
+
failCount: 0,
|
|
14
|
+
createdAt: new Date().toISOString(),
|
|
15
|
+
});
|
|
16
|
+
const filterDesc = filter ? ` (filter: ${JSON.stringify(filter)})` : '';
|
|
17
|
+
return {
|
|
18
|
+
content: [
|
|
19
|
+
{
|
|
20
|
+
type: 'text',
|
|
21
|
+
text: [
|
|
22
|
+
`Hook configured: "${hookName}"`,
|
|
23
|
+
` Event: ${event}`,
|
|
24
|
+
` Action: ${action}${filterDesc}`,
|
|
25
|
+
` Status: ${enabled ? 'enabled' : 'disabled'}`,
|
|
26
|
+
].join('\n'),
|
|
27
|
+
},
|
|
28
|
+
],
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
export async function handleListSpecHooks(input) {
|
|
32
|
+
const config = await loadSpecHooks(input.projectPath);
|
|
33
|
+
if (config.hooks.length === 0) {
|
|
34
|
+
return {
|
|
35
|
+
content: [
|
|
36
|
+
{ type: 'text', text: 'No spec hooks configured. Use configure_spec_hooks to add one.' },
|
|
37
|
+
],
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
const lines = config.hooks.map((h) => {
|
|
41
|
+
const status = h.enabled ? 'enabled' : 'disabled';
|
|
42
|
+
const stats = `runs: ${h.runCount}, fails: ${h.failCount}`;
|
|
43
|
+
const last = h.lastRunAt ? ` last: ${h.lastRunAt}` : '';
|
|
44
|
+
return `• ${h.name} [${status}] — ${h.event} → ${h.action} (${stats}${last})`;
|
|
45
|
+
});
|
|
46
|
+
return {
|
|
47
|
+
content: [
|
|
48
|
+
{
|
|
49
|
+
type: 'text',
|
|
50
|
+
text: `Spec hooks (${config.hooks.length}):\n${lines.join('\n')}`,
|
|
51
|
+
},
|
|
52
|
+
],
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
export async function handleTestSpecHook(input) {
|
|
56
|
+
const { projectPath, hookName, specId } = input;
|
|
57
|
+
const hook = await getSpecHook(projectPath, hookName);
|
|
58
|
+
if (!hook) {
|
|
59
|
+
return {
|
|
60
|
+
content: [{ type: 'text', text: `Hook "${hookName}" not found.` }],
|
|
61
|
+
isError: true,
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
const config = await loadSpecHooks(projectPath);
|
|
65
|
+
const result = dispatchSpecHooks({
|
|
66
|
+
event: hook.event,
|
|
67
|
+
specId,
|
|
68
|
+
projectPath,
|
|
69
|
+
}, config);
|
|
70
|
+
const actionDesc = describeHookActions(hook, specId);
|
|
71
|
+
const lines = [
|
|
72
|
+
`Test simulation for hook "${hookName}" on spec ${specId}:`,
|
|
73
|
+
``,
|
|
74
|
+
`Event: ${hook.event}`,
|
|
75
|
+
`Action: ${hook.action}`,
|
|
76
|
+
`Would trigger: ${result.triggered.includes(hookName) ? 'YES' : 'NO (disabled or filter mismatch)'}`,
|
|
77
|
+
``,
|
|
78
|
+
`If triggered, would execute:`,
|
|
79
|
+
` ${actionDesc}`,
|
|
80
|
+
``,
|
|
81
|
+
`Dispatch summary:`,
|
|
82
|
+
result.description,
|
|
83
|
+
];
|
|
84
|
+
return {
|
|
85
|
+
content: [{ type: 'text', text: lines.join('\n') }],
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
export async function handleDisableSpecHook(input) {
|
|
89
|
+
const updated = await updateSpecHookEnabled(input.projectPath, input.hookName, false);
|
|
90
|
+
if (!updated) {
|
|
91
|
+
return {
|
|
92
|
+
content: [{ type: 'text', text: `Hook "${input.hookName}" not found.` }],
|
|
93
|
+
isError: true,
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
return {
|
|
97
|
+
content: [{ type: 'text', text: `Hook "${input.hookName}" disabled.` }],
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
export async function handleEnableSpecHook(input) {
|
|
101
|
+
const updated = await updateSpecHookEnabled(input.projectPath, input.hookName, true);
|
|
102
|
+
if (!updated) {
|
|
103
|
+
return {
|
|
104
|
+
content: [{ type: 'text', text: `Hook "${input.hookName}" not found.` }],
|
|
105
|
+
isError: true,
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
return {
|
|
109
|
+
content: [{ type: 'text', text: `Hook "${input.hookName}" enabled.` }],
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
//# sourceMappingURL=spec-hooks-handler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spec-hooks-handler.js","sourceRoot":"","sources":["../../src/tools/spec-hooks-handler.ts"],"names":[],"mappings":"AAAA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EAAE,CAAC;KACxE,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,oBAAoB,CAAC,KAA0B;IACnE,MAAM,OAAO,GAAG,MAAM,qBAAqB,CAAC,KAAK,CAAC,WAAW,EAAE,KAAK,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;IACrF,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,OAAO;YACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,KAAK,CAAC,QAAQ,cAAc,EAAE,CAAC;YACxE,OAAO,EAAE,IAAI;SACd,CAAC;IACJ,CAAC;IACD,OAAO;QACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,KAAK,CAAC,QAAQ,YAAY,EAAE,CAAC;KACvE,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ToolResult, DefineLintRuleInput, ListLintRulesInput, RunSpecLintInput, DeleteLintRuleInput } from '../types/index.js';
|
|
2
|
+
export declare function handleDefineLintRule(input: DefineLintRuleInput): Promise<ToolResult>;
|
|
3
|
+
export declare function handleListLintRules(input: ListLintRulesInput): Promise<ToolResult>;
|
|
4
|
+
export declare function handleRunSpecLint(input: RunSpecLintInput): Promise<ToolResult>;
|
|
5
|
+
export declare function handleDeleteLintRule(input: DeleteLintRuleInput): Promise<ToolResult>;
|
|
6
|
+
//# sourceMappingURL=spec-lint-handler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spec-lint-handler.d.ts","sourceRoot":"","sources":["../../src/tools/spec-lint-handler.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,UAAU,EACV,mBAAmB,EACnB,kBAAkB,EAClB,gBAAgB,EAChB,mBAAmB,EAEpB,MAAM,mBAAmB,CAAC;AAM3B,wBAAsB,oBAAoB,CAAC,KAAK,EAAE,mBAAmB,GAAG,OAAO,CAAC,UAAU,CAAC,CAiC1F;AAED,wBAAsB,mBAAmB,CAAC,KAAK,EAAE,kBAAkB,GAAG,OAAO,CAAC,UAAU,CAAC,CAmCxF;AAED,wBAAsB,iBAAiB,CAAC,KAAK,EAAE,gBAAgB,GAAG,OAAO,CAAC,UAAU,CAAC,CAyFpF;AAED,wBAAsB,oBAAoB,CAAC,KAAK,EAAE,mBAAmB,GAAG,OAAO,CAAC,UAAU,CAAC,CAuB1F"}
|