@shrkcrft/mcp-server 0.1.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +15 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +6 -0
- package/dist/main.d.ts +3 -0
- package/dist/main.d.ts.map +1 -0
- package/dist/main.js +43 -0
- package/dist/resources/build-resource-list.d.ts +14 -0
- package/dist/resources/build-resource-list.d.ts.map +1 -0
- package/dist/resources/build-resource-list.js +56 -0
- package/dist/resources/index.d.ts +4 -0
- package/dist/resources/index.d.ts.map +1 -0
- package/dist/resources/index.js +3 -0
- package/dist/resources/read-resource.d.ts +16 -0
- package/dist/resources/read-resource.d.ts.map +1 -0
- package/dist/resources/read-resource.js +97 -0
- package/dist/resources/resource-uris.d.ts +14 -0
- package/dist/resources/resource-uris.d.ts.map +1 -0
- package/dist/resources/resource-uris.js +38 -0
- package/dist/server/create-mcp-server.d.ts +55 -0
- package/dist/server/create-mcp-server.d.ts.map +1 -0
- package/dist/server/create-mcp-server.js +209 -0
- package/dist/server/http-transport.d.ts +29 -0
- package/dist/server/http-transport.d.ts.map +1 -0
- package/dist/server/http-transport.js +75 -0
- package/dist/server/mcp-server-config.d.ts +10 -0
- package/dist/server/mcp-server-config.d.ts.map +1 -0
- package/dist/server/mcp-server-config.js +3 -0
- package/dist/server/sharkcraft-watcher.d.ts +18 -0
- package/dist/server/sharkcraft-watcher.d.ts.map +1 -0
- package/dist/server/sharkcraft-watcher.js +60 -0
- package/dist/server/tool-definition.d.ts +56 -0
- package/dist/server/tool-definition.d.ts.map +1 -0
- package/dist/server/tool-definition.js +1 -0
- package/dist/server/tool-input-validators.d.ts +18 -0
- package/dist/server/tool-input-validators.d.ts.map +1 -0
- package/dist/server/tool-input-validators.js +115 -0
- package/dist/tools/acceptance-replay.tool.d.ts +3 -0
- package/dist/tools/acceptance-replay.tool.d.ts.map +1 -0
- package/dist/tools/acceptance-replay.tool.js +53 -0
- package/dist/tools/adoption-checkpoint.tool.d.ts +3 -0
- package/dist/tools/adoption-checkpoint.tool.d.ts.map +1 -0
- package/dist/tools/adoption-checkpoint.tool.js +49 -0
- package/dist/tools/agent-brief-chunks.tool.d.ts +6 -0
- package/dist/tools/agent-brief-chunks.tool.d.ts.map +1 -0
- package/dist/tools/agent-brief-chunks.tool.js +326 -0
- package/dist/tools/agent-brief.tool.d.ts +3 -0
- package/dist/tools/agent-brief.tool.d.ts.map +1 -0
- package/dist/tools/agent-brief.tool.js +44 -0
- package/dist/tools/all-tools.d.ts +3 -0
- package/dist/tools/all-tools.d.ts.map +1 -0
- package/dist/tools/all-tools.js +403 -0
- package/dist/tools/architecture-map.tool.d.ts +3 -0
- package/dist/tools/architecture-map.tool.d.ts.map +1 -0
- package/dist/tools/architecture-map.tool.js +22 -0
- package/dist/tools/area-explore.tool.d.ts +3 -0
- package/dist/tools/area-explore.tool.d.ts.map +1 -0
- package/dist/tools/area-explore.tool.js +32 -0
- package/dist/tools/area-map.tool.d.ts +3 -0
- package/dist/tools/area-map.tool.d.ts.map +1 -0
- package/dist/tools/area-map.tool.js +9 -0
- package/dist/tools/bundle-diff.tool.d.ts +3 -0
- package/dist/tools/bundle-diff.tool.d.ts.map +1 -0
- package/dist/tools/bundle-diff.tool.js +37 -0
- package/dist/tools/bundle-replay.tool.d.ts +3 -0
- package/dist/tools/bundle-replay.tool.d.ts.map +1 -0
- package/dist/tools/bundle-replay.tool.js +19 -0
- package/dist/tools/change-intent.tool.d.ts +3 -0
- package/dist/tools/change-intent.tool.d.ts.map +1 -0
- package/dist/tools/change-intent.tool.js +18 -0
- package/dist/tools/check-boundaries.tool.d.ts +3 -0
- package/dist/tools/check-boundaries.tool.d.ts.map +1 -0
- package/dist/tools/check-boundaries.tool.js +37 -0
- package/dist/tools/ci-permissions-fix.tool.d.ts +3 -0
- package/dist/tools/ci-permissions-fix.tool.d.ts.map +1 -0
- package/dist/tools/ci-permissions-fix.tool.js +32 -0
- package/dist/tools/ci-permissions.tool.d.ts +3 -0
- package/dist/tools/ci-permissions.tool.d.ts.map +1 -0
- package/dist/tools/ci-permissions.tool.js +26 -0
- package/dist/tools/ci-scaffold-preview.tool.d.ts +3 -0
- package/dist/tools/ci-scaffold-preview.tool.d.ts.map +1 -0
- package/dist/tools/ci-scaffold-preview.tool.js +63 -0
- package/dist/tools/command-catalog.tool.d.ts +27 -0
- package/dist/tools/command-catalog.tool.d.ts.map +1 -0
- package/dist/tools/command-catalog.tool.js +147 -0
- package/dist/tools/construct-adoption-diff.tool.d.ts +3 -0
- package/dist/tools/construct-adoption-diff.tool.d.ts.map +1 -0
- package/dist/tools/construct-adoption-diff.tool.js +26 -0
- package/dist/tools/construct-adoption.tool.d.ts +4 -0
- package/dist/tools/construct-adoption.tool.d.ts.map +1 -0
- package/dist/tools/construct-adoption.tool.js +37 -0
- package/dist/tools/construct-inference.tool.d.ts +3 -0
- package/dist/tools/construct-inference.tool.d.ts.map +1 -0
- package/dist/tools/construct-inference.tool.js +26 -0
- package/dist/tools/constructs.tool.d.ts +7 -0
- package/dist/tools/constructs.tool.d.ts.map +1 -0
- package/dist/tools/constructs.tool.js +79 -0
- package/dist/tools/create-generation-plan.tool.d.ts +3 -0
- package/dist/tools/create-generation-plan.tool.d.ts.map +1 -0
- package/dist/tools/create-generation-plan.tool.js +48 -0
- package/dist/tools/create-pipeline-plan.tool.d.ts +3 -0
- package/dist/tools/create-pipeline-plan.tool.d.ts.map +1 -0
- package/dist/tools/create-pipeline-plan.tool.js +41 -0
- package/dist/tools/dashboard-summary.tool.d.ts +3 -0
- package/dist/tools/dashboard-summary.tool.d.ts.map +1 -0
- package/dist/tools/dashboard-summary.tool.js +182 -0
- package/dist/tools/dev-session.tool.d.ts +14 -0
- package/dist/tools/dev-session.tool.d.ts.map +1 -0
- package/dist/tools/dev-session.tool.js +167 -0
- package/dist/tools/diagnostics.tool.d.ts +4 -0
- package/dist/tools/diagnostics.tool.d.ts.map +1 -0
- package/dist/tools/diagnostics.tool.js +40 -0
- package/dist/tools/docs-check.tool.d.ts +4 -0
- package/dist/tools/docs-check.tool.d.ts.map +1 -0
- package/dist/tools/docs-check.tool.js +17 -0
- package/dist/tools/doctor-packs.tool.d.ts +3 -0
- package/dist/tools/doctor-packs.tool.d.ts.map +1 -0
- package/dist/tools/doctor-packs.tool.js +30 -0
- package/dist/tools/explain-generation-target.tool.d.ts +3 -0
- package/dist/tools/explain-generation-target.tool.d.ts.map +1 -0
- package/dist/tools/explain-generation-target.tool.js +49 -0
- package/dist/tools/feature-bundle.tool.d.ts +4 -0
- package/dist/tools/feature-bundle.tool.d.ts.map +1 -0
- package/dist/tools/feature-bundle.tool.js +36 -0
- package/dist/tools/get-action-hints.tool.d.ts +3 -0
- package/dist/tools/get-action-hints.tool.d.ts.map +1 -0
- package/dist/tools/get-action-hints.tool.js +43 -0
- package/dist/tools/get-agent-instructions.tool.d.ts +3 -0
- package/dist/tools/get-agent-instructions.tool.d.ts.map +1 -0
- package/dist/tools/get-agent-instructions.tool.js +9 -0
- package/dist/tools/get-ai-readiness-report.tool.d.ts +3 -0
- package/dist/tools/get-ai-readiness-report.tool.d.ts.map +1 -0
- package/dist/tools/get-ai-readiness-report.tool.js +10 -0
- package/dist/tools/get-architecture-constraints.tool.d.ts +3 -0
- package/dist/tools/get-architecture-constraints.tool.d.ts.map +1 -0
- package/dist/tools/get-architecture-constraints.tool.js +20 -0
- package/dist/tools/get-boundary-rule.tool.d.ts +3 -0
- package/dist/tools/get-boundary-rule.tool.d.ts.map +1 -0
- package/dist/tools/get-boundary-rule.tool.js +22 -0
- package/dist/tools/get-coverage-report.tool.d.ts +3 -0
- package/dist/tools/get-coverage-report.tool.d.ts.map +1 -0
- package/dist/tools/get-coverage-report.tool.js +9 -0
- package/dist/tools/get-current-tasks.tool.d.ts +3 -0
- package/dist/tools/get-current-tasks.tool.d.ts.map +1 -0
- package/dist/tools/get-current-tasks.tool.js +19 -0
- package/dist/tools/get-drift-report.tool.d.ts +3 -0
- package/dist/tools/get-drift-report.tool.d.ts.map +1 -0
- package/dist/tools/get-drift-report.tool.js +16 -0
- package/dist/tools/get-graph-node.tool.d.ts +3 -0
- package/dist/tools/get-graph-node.tool.d.ts.map +1 -0
- package/dist/tools/get-graph-node.tool.js +23 -0
- package/dist/tools/get-import-graph-summary.tool.d.ts +3 -0
- package/dist/tools/get-import-graph-summary.tool.d.ts.map +1 -0
- package/dist/tools/get-import-graph-summary.tool.js +10 -0
- package/dist/tools/get-knowledge-graph.tool.d.ts +3 -0
- package/dist/tools/get-knowledge-graph.tool.d.ts.map +1 -0
- package/dist/tools/get-knowledge-graph.tool.js +10 -0
- package/dist/tools/get-knowledge.tool.d.ts +3 -0
- package/dist/tools/get-knowledge.tool.d.ts.map +1 -0
- package/dist/tools/get-knowledge.tool.js +18 -0
- package/dist/tools/get-pack.tool.d.ts +3 -0
- package/dist/tools/get-pack.tool.d.ts.map +1 -0
- package/dist/tools/get-pack.tool.js +33 -0
- package/dist/tools/get-path-convention.tool.d.ts +3 -0
- package/dist/tools/get-path-convention.tool.d.ts.map +1 -0
- package/dist/tools/get-path-convention.tool.js +17 -0
- package/dist/tools/get-pipeline-context.tool.d.ts +3 -0
- package/dist/tools/get-pipeline-context.tool.d.ts.map +1 -0
- package/dist/tools/get-pipeline-context.tool.js +48 -0
- package/dist/tools/get-pipeline.tool.d.ts +3 -0
- package/dist/tools/get-pipeline.tool.d.ts.map +1 -0
- package/dist/tools/get-pipeline.tool.js +17 -0
- package/dist/tools/get-preset.tool.d.ts +3 -0
- package/dist/tools/get-preset.tool.d.ts.map +1 -0
- package/dist/tools/get-preset.tool.js +22 -0
- package/dist/tools/get-project-overview.tool.d.ts +3 -0
- package/dist/tools/get-project-overview.tool.d.ts.map +1 -0
- package/dist/tools/get-project-overview.tool.js +10 -0
- package/dist/tools/get-relevant-context.tool.d.ts +3 -0
- package/dist/tools/get-relevant-context.tool.d.ts.map +1 -0
- package/dist/tools/get-relevant-context.tool.js +55 -0
- package/dist/tools/get-relevant-rules.tool.d.ts +3 -0
- package/dist/tools/get-relevant-rules.tool.d.ts.map +1 -0
- package/dist/tools/get-relevant-rules.tool.js +37 -0
- package/dist/tools/get-repository-commands.tool.d.ts +3 -0
- package/dist/tools/get-repository-commands.tool.d.ts.map +1 -0
- package/dist/tools/get-repository-commands.tool.js +22 -0
- package/dist/tools/get-review-packet.tool.d.ts +3 -0
- package/dist/tools/get-review-packet.tool.d.ts.map +1 -0
- package/dist/tools/get-review-packet.tool.js +26 -0
- package/dist/tools/get-rule.tool.d.ts +3 -0
- package/dist/tools/get-rule.tool.d.ts.map +1 -0
- package/dist/tools/get-rule.tool.js +18 -0
- package/dist/tools/get-security-guidelines.tool.d.ts +3 -0
- package/dist/tools/get-security-guidelines.tool.d.ts.map +1 -0
- package/dist/tools/get-security-guidelines.tool.js +23 -0
- package/dist/tools/get-sessions.tool.d.ts +4 -0
- package/dist/tools/get-sessions.tool.d.ts.map +1 -0
- package/dist/tools/get-sessions.tool.js +41 -0
- package/dist/tools/get-task-packet.tool.d.ts +3 -0
- package/dist/tools/get-task-packet.tool.d.ts.map +1 -0
- package/dist/tools/get-task-packet.tool.js +48 -0
- package/dist/tools/get-template.tool.d.ts +3 -0
- package/dist/tools/get-template.tool.d.ts.map +1 -0
- package/dist/tools/get-template.tool.js +29 -0
- package/dist/tools/get-testing-guidelines.tool.d.ts +3 -0
- package/dist/tools/get-testing-guidelines.tool.d.ts.map +1 -0
- package/dist/tools/get-testing-guidelines.tool.js +22 -0
- package/dist/tools/graph-why.tool.d.ts +3 -0
- package/dist/tools/graph-why.tool.d.ts.map +1 -0
- package/dist/tools/graph-why.tool.js +25 -0
- package/dist/tools/impact-analysis.tool.d.ts +3 -0
- package/dist/tools/impact-analysis.tool.d.ts.map +1 -0
- package/dist/tools/impact-analysis.tool.js +43 -0
- package/dist/tools/import-graph-analysis.tool.d.ts +3 -0
- package/dist/tools/import-graph-analysis.tool.d.ts.map +1 -0
- package/dist/tools/import-graph-analysis.tool.js +9 -0
- package/dist/tools/index.d.ts +10 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +9 -0
- package/dist/tools/inspect-packs.tool.d.ts +3 -0
- package/dist/tools/inspect-packs.tool.d.ts.map +1 -0
- package/dist/tools/inspect-packs.tool.js +31 -0
- package/dist/tools/inspect-sharkcraft-setup.tool.d.ts +3 -0
- package/dist/tools/inspect-sharkcraft-setup.tool.d.ts.map +1 -0
- package/dist/tools/inspect-sharkcraft-setup.tool.js +10 -0
- package/dist/tools/inspect-workspace.tool.d.ts +3 -0
- package/dist/tools/inspect-workspace.tool.d.ts.map +1 -0
- package/dist/tools/inspect-workspace.tool.js +23 -0
- package/dist/tools/install-smoke.tool.d.ts +3 -0
- package/dist/tools/install-smoke.tool.d.ts.map +1 -0
- package/dist/tools/install-smoke.tool.js +15 -0
- package/dist/tools/list-boundary-rules.tool.d.ts +3 -0
- package/dist/tools/list-boundary-rules.tool.d.ts.map +1 -0
- package/dist/tools/list-boundary-rules.tool.js +20 -0
- package/dist/tools/list-knowledge.tool.d.ts +3 -0
- package/dist/tools/list-knowledge.tool.d.ts.map +1 -0
- package/dist/tools/list-knowledge.tool.js +46 -0
- package/dist/tools/list-packs.tool.d.ts +3 -0
- package/dist/tools/list-packs.tool.d.ts.map +1 -0
- package/dist/tools/list-packs.tool.js +19 -0
- package/dist/tools/list-path-conventions.tool.d.ts +3 -0
- package/dist/tools/list-path-conventions.tool.d.ts.map +1 -0
- package/dist/tools/list-path-conventions.tool.js +20 -0
- package/dist/tools/list-pipelines.tool.d.ts +3 -0
- package/dist/tools/list-pipelines.tool.d.ts.map +1 -0
- package/dist/tools/list-pipelines.tool.js +19 -0
- package/dist/tools/list-presets.tool.d.ts +3 -0
- package/dist/tools/list-presets.tool.d.ts.map +1 -0
- package/dist/tools/list-presets.tool.js +26 -0
- package/dist/tools/list-rules.tool.d.ts +3 -0
- package/dist/tools/list-rules.tool.d.ts.map +1 -0
- package/dist/tools/list-rules.tool.js +19 -0
- package/dist/tools/list-templates.tool.d.ts +3 -0
- package/dist/tools/list-templates.tool.d.ts.map +1 -0
- package/dist/tools/list-templates.tool.js +19 -0
- package/dist/tools/onboard-adoption-diff.tool.d.ts +3 -0
- package/dist/tools/onboard-adoption-diff.tool.d.ts.map +1 -0
- package/dist/tools/onboard-adoption-diff.tool.js +29 -0
- package/dist/tools/onboarding.tool.d.ts +7 -0
- package/dist/tools/onboarding.tool.d.ts.map +1 -0
- package/dist/tools/onboarding.tool.js +253 -0
- package/dist/tools/orchestration.tool.d.ts +4 -0
- package/dist/tools/orchestration.tool.d.ts.map +1 -0
- package/dist/tools/orchestration.tool.js +57 -0
- package/dist/tools/ownership.tool.d.ts +4 -0
- package/dist/tools/ownership.tool.d.ts.map +1 -0
- package/dist/tools/ownership.tool.js +31 -0
- package/dist/tools/pack-compat.tool.d.ts +3 -0
- package/dist/tools/pack-compat.tool.d.ts.map +1 -0
- package/dist/tools/pack-compat.tool.js +27 -0
- package/dist/tools/pack-doctor-release.tool.d.ts +3 -0
- package/dist/tools/pack-doctor-release.tool.d.ts.map +1 -0
- package/dist/tools/pack-doctor-release.tool.js +21 -0
- package/dist/tools/pack-release-check.tool.d.ts +3 -0
- package/dist/tools/pack-release-check.tool.d.ts.map +1 -0
- package/dist/tools/pack-release-check.tool.js +17 -0
- package/dist/tools/playbook-script.tool.d.ts +3 -0
- package/dist/tools/playbook-script.tool.d.ts.map +1 -0
- package/dist/tools/playbook-script.tool.js +25 -0
- package/dist/tools/playbooks.tool.d.ts +5 -0
- package/dist/tools/playbooks.tool.d.ts.map +1 -0
- package/dist/tools/playbooks.tool.js +43 -0
- package/dist/tools/policy-report.tool.d.ts +3 -0
- package/dist/tools/policy-report.tool.d.ts.map +1 -0
- package/dist/tools/policy-report.tool.js +10 -0
- package/dist/tools/preview-knowledge-propose.tool.d.ts +3 -0
- package/dist/tools/preview-knowledge-propose.tool.d.ts.map +1 -0
- package/dist/tools/preview-knowledge-propose.tool.js +44 -0
- package/dist/tools/preview-preset-application.tool.d.ts +3 -0
- package/dist/tools/preview-preset-application.tool.d.ts.map +1 -0
- package/dist/tools/preview-preset-application.tool.js +64 -0
- package/dist/tools/quality-baseline-diff.tool.d.ts +3 -0
- package/dist/tools/quality-baseline-diff.tool.d.ts.map +1 -0
- package/dist/tools/quality-baseline-diff.tool.js +18 -0
- package/dist/tools/quality-baseline.tool.d.ts +3 -0
- package/dist/tools/quality-baseline.tool.d.ts.map +1 -0
- package/dist/tools/quality-baseline.tool.js +22 -0
- package/dist/tools/quality-report.tool.d.ts +3 -0
- package/dist/tools/quality-report.tool.d.ts.map +1 -0
- package/dist/tools/quality-report.tool.js +62 -0
- package/dist/tools/r18-extras.tool.d.ts +15 -0
- package/dist/tools/r18-extras.tool.d.ts.map +1 -0
- package/dist/tools/r18-extras.tool.js +209 -0
- package/dist/tools/r19-extras.tool.d.ts +10 -0
- package/dist/tools/r19-extras.tool.d.ts.map +1 -0
- package/dist/tools/r19-extras.tool.js +117 -0
- package/dist/tools/r20-extras.tool.d.ts +4 -0
- package/dist/tools/r20-extras.tool.d.ts.map +1 -0
- package/dist/tools/r20-extras.tool.js +65 -0
- package/dist/tools/r22-extras.tool.d.ts +4 -0
- package/dist/tools/r22-extras.tool.d.ts.map +1 -0
- package/dist/tools/r22-extras.tool.js +42 -0
- package/dist/tools/r23-extras.tool.d.ts +10 -0
- package/dist/tools/r23-extras.tool.d.ts.map +1 -0
- package/dist/tools/r23-extras.tool.js +239 -0
- package/dist/tools/r24-extras.tool.d.ts +9 -0
- package/dist/tools/r24-extras.tool.d.ts.map +1 -0
- package/dist/tools/r24-extras.tool.js +144 -0
- package/dist/tools/r25-extras.tool.d.ts +11 -0
- package/dist/tools/r25-extras.tool.d.ts.map +1 -0
- package/dist/tools/r25-extras.tool.js +186 -0
- package/dist/tools/r26-ingest.tool.d.ts +10 -0
- package/dist/tools/r26-ingest.tool.d.ts.map +1 -0
- package/dist/tools/r26-ingest.tool.js +174 -0
- package/dist/tools/r26-task-context.tool.d.ts +5 -0
- package/dist/tools/r26-task-context.tool.d.ts.map +1 -0
- package/dist/tools/r26-task-context.tool.js +121 -0
- package/dist/tools/r27-polyglot.tool.d.ts +7 -0
- package/dist/tools/r27-polyglot.tool.d.ts.map +1 -0
- package/dist/tools/r27-polyglot.tool.js +139 -0
- package/dist/tools/r28-changed-boundary.tool.d.ts +3 -0
- package/dist/tools/r28-changed-boundary.tool.d.ts.map +1 -0
- package/dist/tools/r28-changed-boundary.tool.js +77 -0
- package/dist/tools/r28-helpers.tool.d.ts +5 -0
- package/dist/tools/r28-helpers.tool.d.ts.map +1 -0
- package/dist/tools/r28-helpers.tool.js +72 -0
- package/dist/tools/r28-pack-author.tool.d.ts +4 -0
- package/dist/tools/r28-pack-author.tool.d.ts.map +1 -0
- package/dist/tools/r28-pack-author.tool.js +67 -0
- package/dist/tools/r28-plugin-lifecycle.tool.d.ts +4 -0
- package/dist/tools/r28-plugin-lifecycle.tool.d.ts.map +1 -0
- package/dist/tools/r28-plugin-lifecycle.tool.js +94 -0
- package/dist/tools/r28-registry-lifecycle.tool.d.ts +3 -0
- package/dist/tools/r28-registry-lifecycle.tool.d.ts.map +1 -0
- package/dist/tools/r28-registry-lifecycle.tool.js +29 -0
- package/dist/tools/r28-runner-policy.tool.d.ts +3 -0
- package/dist/tools/r28-runner-policy.tool.d.ts.map +1 -0
- package/dist/tools/r28-runner-policy.tool.js +16 -0
- package/dist/tools/r29-doctor-suppressions.tool.d.ts +4 -0
- package/dist/tools/r29-doctor-suppressions.tool.d.ts.map +1 -0
- package/dist/tools/r29-doctor-suppressions.tool.js +66 -0
- package/dist/tools/r29-feedback.tool.d.ts +3 -0
- package/dist/tools/r29-feedback.tool.d.ts.map +1 -0
- package/dist/tools/r29-feedback.tool.js +26 -0
- package/dist/tools/r29-knowledge-rename.tool.d.ts +3 -0
- package/dist/tools/r29-knowledge-rename.tool.d.ts.map +1 -0
- package/dist/tools/r29-knowledge-rename.tool.js +51 -0
- package/dist/tools/r29-knowledge-stale.tool.d.ts +4 -0
- package/dist/tools/r29-knowledge-stale.tool.d.ts.map +1 -0
- package/dist/tools/r29-knowledge-stale.tool.js +68 -0
- package/dist/tools/r29-query-resolver.tool.d.ts +4 -0
- package/dist/tools/r29-query-resolver.tool.d.ts.map +1 -0
- package/dist/tools/r29-query-resolver.tool.js +38 -0
- package/dist/tools/r29-template-drift.tool.d.ts +3 -0
- package/dist/tools/r29-template-drift.tool.d.ts.map +1 -0
- package/dist/tools/r29-template-drift.tool.js +29 -0
- package/dist/tools/r30-feedback-rules.tool.d.ts +4 -0
- package/dist/tools/r30-feedback-rules.tool.d.ts.map +1 -0
- package/dist/tools/r30-feedback-rules.tool.js +47 -0
- package/dist/tools/r30-fuzzy-impact.tool.d.ts +3 -0
- package/dist/tools/r30-fuzzy-impact.tool.d.ts.map +1 -0
- package/dist/tools/r30-fuzzy-impact.tool.js +44 -0
- package/dist/tools/r31-changes-pr-ci.tool.d.ts +5 -0
- package/dist/tools/r31-changes-pr-ci.tool.d.ts.map +1 -0
- package/dist/tools/r31-changes-pr-ci.tool.js +82 -0
- package/dist/tools/r31-command-discovery.tool.d.ts +5 -0
- package/dist/tools/r31-command-discovery.tool.d.ts.map +1 -0
- package/dist/tools/r31-command-discovery.tool.js +126 -0
- package/dist/tools/r31-fix-preview.tool.d.ts +4 -0
- package/dist/tools/r31-fix-preview.tool.d.ts.map +1 -0
- package/dist/tools/r31-fix-preview.tool.js +58 -0
- package/dist/tools/r31-ranker-explain.tool.d.ts +4 -0
- package/dist/tools/r31-ranker-explain.tool.d.ts.map +1 -0
- package/dist/tools/r31-ranker-explain.tool.js +69 -0
- package/dist/tools/r31-scaffold-coverage.tool.d.ts +3 -0
- package/dist/tools/r31-scaffold-coverage.tool.d.ts.map +1 -0
- package/dist/tools/r31-scaffold-coverage.tool.js +31 -0
- package/dist/tools/r32-profiles.tool.d.ts +8 -0
- package/dist/tools/r32-profiles.tool.d.ts.map +1 -0
- package/dist/tools/r32-profiles.tool.js +107 -0
- package/dist/tools/r32-project-coupling.tool.d.ts +3 -0
- package/dist/tools/r32-project-coupling.tool.d.ts.map +1 -0
- package/dist/tools/r32-project-coupling.tool.js +38 -0
- package/dist/tools/r33-agent-task-prep.tool.d.ts +3 -0
- package/dist/tools/r33-agent-task-prep.tool.d.ts.map +1 -0
- package/dist/tools/r33-agent-task-prep.tool.js +34 -0
- package/dist/tools/r33-conventions.tool.d.ts +5 -0
- package/dist/tools/r33-conventions.tool.d.ts.map +1 -0
- package/dist/tools/r33-conventions.tool.js +48 -0
- package/dist/tools/r33-dev-cycle-ci-predict.tool.d.ts +4 -0
- package/dist/tools/r33-dev-cycle-ci-predict.tool.d.ts.map +1 -0
- package/dist/tools/r33-dev-cycle-ci-predict.tool.js +44 -0
- package/dist/tools/r33-pack-contributions.tool.d.ts +4 -0
- package/dist/tools/r33-pack-contributions.tool.d.ts.map +1 -0
- package/dist/tools/r33-pack-contributions.tool.js +42 -0
- package/dist/tools/r33-pack-signature.tool.d.ts +3 -0
- package/dist/tools/r33-pack-signature.tool.d.ts.map +1 -0
- package/dist/tools/r33-pack-signature.tool.js +12 -0
- package/dist/tools/r33-routing-helpers.tool.d.ts +6 -0
- package/dist/tools/r33-routing-helpers.tool.d.ts.map +1 -0
- package/dist/tools/r33-routing-helpers.tool.js +63 -0
- package/dist/tools/r33-self-config.tool.d.ts +4 -0
- package/dist/tools/r33-self-config.tool.d.ts.map +1 -0
- package/dist/tools/r33-self-config.tool.js +20 -0
- package/dist/tools/r34-search-unified.tool.d.ts +3 -0
- package/dist/tools/r34-search-unified.tool.d.ts.map +1 -0
- package/dist/tools/r34-search-unified.tool.js +38 -0
- package/dist/tools/r35-registration-hints.tool.d.ts +5 -0
- package/dist/tools/r35-registration-hints.tool.d.ts.map +1 -0
- package/dist/tools/r35-registration-hints.tool.js +69 -0
- package/dist/tools/r57-specs.tool.d.ts +12 -0
- package/dist/tools/r57-specs.tool.d.ts.map +1 -0
- package/dist/tools/r57-specs.tool.js +115 -0
- package/dist/tools/r58-grounding.tool.d.ts +14 -0
- package/dist/tools/r58-grounding.tool.d.ts.map +1 -0
- package/dist/tools/r58-grounding.tool.js +135 -0
- package/dist/tools/recommend-presets.tool.d.ts +3 -0
- package/dist/tools/recommend-presets.tool.d.ts.map +1 -0
- package/dist/tools/recommend-presets.tool.js +31 -0
- package/dist/tools/release-readiness.tool.d.ts +3 -0
- package/dist/tools/release-readiness.tool.d.ts.map +1 -0
- package/dist/tools/release-readiness.tool.js +28 -0
- package/dist/tools/release-smoke.tool.d.ts +3 -0
- package/dist/tools/release-smoke.tool.d.ts.map +1 -0
- package/dist/tools/release-smoke.tool.js +22 -0
- package/dist/tools/render-template-preview.tool.d.ts +3 -0
- package/dist/tools/render-template-preview.tool.d.ts.map +1 -0
- package/dist/tools/render-template-preview.tool.js +40 -0
- package/dist/tools/report-site-preview.tool.d.ts +3 -0
- package/dist/tools/report-site-preview.tool.d.ts.map +1 -0
- package/dist/tools/report-site-preview.tool.js +28 -0
- package/dist/tools/repository-map.tool.d.ts +3 -0
- package/dist/tools/repository-map.tool.d.ts.map +1 -0
- package/dist/tools/repository-map.tool.js +17 -0
- package/dist/tools/repository-stats.tool.d.ts +3 -0
- package/dist/tools/repository-stats.tool.d.ts.map +1 -0
- package/dist/tools/repository-stats.tool.js +28 -0
- package/dist/tools/review-generation-plan.tool.d.ts +3 -0
- package/dist/tools/review-generation-plan.tool.d.ts.map +1 -0
- package/dist/tools/review-generation-plan.tool.js +24 -0
- package/dist/tools/review-packet-v2.tool.d.ts +3 -0
- package/dist/tools/review-packet-v2.tool.d.ts.map +1 -0
- package/dist/tools/review-packet-v2.tool.js +27 -0
- package/dist/tools/run-agent-test.tool.d.ts +4 -0
- package/dist/tools/run-agent-test.tool.d.ts.map +1 -0
- package/dist/tools/run-agent-test.tool.js +28 -0
- package/dist/tools/run-context-test.tool.d.ts +4 -0
- package/dist/tools/run-context-test.tool.d.ts.map +1 -0
- package/dist/tools/run-context-test.tool.js +28 -0
- package/dist/tools/runtime-reports.tool.d.ts +9 -0
- package/dist/tools/runtime-reports.tool.d.ts.map +1 -0
- package/dist/tools/runtime-reports.tool.js +175 -0
- package/dist/tools/safety-audit.tool.d.ts +3 -0
- package/dist/tools/safety-audit.tool.d.ts.map +1 -0
- package/dist/tools/safety-audit.tool.js +42 -0
- package/dist/tools/scaffold-patterns.tool.d.ts +5 -0
- package/dist/tools/scaffold-patterns.tool.d.ts.map +1 -0
- package/dist/tools/scaffold-patterns.tool.js +59 -0
- package/dist/tools/schema-inventory.tool.d.ts +3 -0
- package/dist/tools/schema-inventory.tool.d.ts.map +1 -0
- package/dist/tools/schema-inventory.tool.js +23 -0
- package/dist/tools/search-knowledge.tool.d.ts +3 -0
- package/dist/tools/search-knowledge.tool.d.ts.map +1 -0
- package/dist/tools/search-knowledge.tool.js +42 -0
- package/dist/tools/search-path-conventions.tool.d.ts +3 -0
- package/dist/tools/search-path-conventions.tool.d.ts.map +1 -0
- package/dist/tools/search-path-conventions.tool.js +30 -0
- package/dist/tools/search-templates.tool.d.ts +3 -0
- package/dist/tools/search-templates.tool.d.ts.map +1 -0
- package/dist/tools/search-templates.tool.js +21 -0
- package/dist/tools/search-tuning-explain.tool.d.ts +3 -0
- package/dist/tools/search-tuning-explain.tool.d.ts.map +1 -0
- package/dist/tools/search-tuning-explain.tool.js +17 -0
- package/dist/tools/search-tuning.tool.d.ts +3 -0
- package/dist/tools/search-tuning.tool.d.ts.map +1 -0
- package/dist/tools/search-tuning.tool.js +10 -0
- package/dist/tools/search.tool.d.ts +3 -0
- package/dist/tools/search.tool.d.ts.map +1 -0
- package/dist/tools/search.tool.js +45 -0
- package/dist/tools/self-audit.tool.d.ts +3 -0
- package/dist/tools/self-audit.tool.d.ts.map +1 -0
- package/dist/tools/self-audit.tool.js +28 -0
- package/dist/tools/start-here.tool.d.ts +4 -0
- package/dist/tools/start-here.tool.d.ts.map +1 -0
- package/dist/tools/start-here.tool.js +27 -0
- package/dist/tools/test-impact.tool.d.ts +3 -0
- package/dist/tools/test-impact.tool.d.ts.map +1 -0
- package/dist/tools/test-impact.tool.js +23 -0
- package/package.json +66 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import * as nodePath from 'node:path';
|
|
2
|
+
import { auditCiWorkflow, buildCiPermissionsFixPreview } from '@shrkcrft/inspector';
|
|
3
|
+
export const getCiPermissionsFixPreviewTool = {
|
|
4
|
+
name: 'get_ci_permissions_fix_preview',
|
|
5
|
+
description: 'Suggest a least-privilege fix for a CI workflow. Read-only — never writes.',
|
|
6
|
+
inputSchema: {
|
|
7
|
+
type: 'object',
|
|
8
|
+
required: ['file'],
|
|
9
|
+
properties: {
|
|
10
|
+
file: { type: 'string' },
|
|
11
|
+
provider: {
|
|
12
|
+
type: 'string',
|
|
13
|
+
enum: ['github-actions', 'gitlab', 'bitbucket', 'azure', 'jenkins'],
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
additionalProperties: false,
|
|
17
|
+
},
|
|
18
|
+
handler(input, ctx) {
|
|
19
|
+
const fileRaw = typeof input['file'] === 'string' ? input['file'] : '';
|
|
20
|
+
if (!fileRaw) {
|
|
21
|
+
return {
|
|
22
|
+
isError: true,
|
|
23
|
+
error: { code: 'invalid-input', message: 'Missing `file`.' },
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
const file = nodePath.isAbsolute(fileRaw) ? fileRaw : nodePath.resolve(ctx.cwd, fileRaw);
|
|
27
|
+
const providerRaw = typeof input['provider'] === 'string' ? input['provider'] : null;
|
|
28
|
+
const audit = auditCiWorkflow({ file, provider: providerRaw });
|
|
29
|
+
const preview = buildCiPermissionsFixPreview(audit);
|
|
30
|
+
return { data: preview };
|
|
31
|
+
},
|
|
32
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ci-permissions.tool.d.ts","sourceRoot":"","sources":["../../src/tools/ci-permissions.tool.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAIpE,eAAO,MAAM,yBAAyB,EAAE,eAuBvC,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import * as nodePath from 'node:path';
|
|
2
|
+
import { auditCiWorkflow } from '@shrkcrft/inspector';
|
|
3
|
+
const VALID = new Set(['github-actions', 'gitlab', 'bitbucket', 'azure', 'jenkins']);
|
|
4
|
+
export const getCiPermissionsAuditTool = {
|
|
5
|
+
name: 'get_ci_permissions_audit',
|
|
6
|
+
description: 'Audit a CI workflow YAML for write permissions, comment posting, tokens, external actions. Read-only.',
|
|
7
|
+
inputSchema: {
|
|
8
|
+
type: 'object',
|
|
9
|
+
required: ['file'],
|
|
10
|
+
properties: {
|
|
11
|
+
file: { type: 'string' },
|
|
12
|
+
provider: { type: 'string', enum: ['github-actions', 'gitlab', 'bitbucket', 'azure', 'jenkins'] },
|
|
13
|
+
},
|
|
14
|
+
additionalProperties: false,
|
|
15
|
+
},
|
|
16
|
+
handler(input, ctx) {
|
|
17
|
+
const fileRaw = typeof input['file'] === 'string' ? input['file'] : '';
|
|
18
|
+
const providerRaw = typeof input['provider'] === 'string' ? input['provider'] : null;
|
|
19
|
+
const abs = nodePath.isAbsolute(fileRaw) ? fileRaw : nodePath.resolve(ctx.cwd, fileRaw);
|
|
20
|
+
const audit = auditCiWorkflow({
|
|
21
|
+
file: abs,
|
|
22
|
+
provider: providerRaw && VALID.has(providerRaw) ? providerRaw : null,
|
|
23
|
+
});
|
|
24
|
+
return { data: audit };
|
|
25
|
+
},
|
|
26
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ci-scaffold-preview.tool.d.ts","sourceRoot":"","sources":["../../src/tools/ci-scaffold-preview.tool.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAIpE,eAAO,MAAM,wBAAwB,EAAE,eA2DtC,CAAC"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { defaultCiOutputPath, renderBitbucketCiWorkflow, renderBundleReplayWorkflow, renderGitlabCiWorkflow, renderQualityCiWorkflow, } from '@shrkcrft/inspector';
|
|
2
|
+
const VALID_PROVIDERS = new Set(['github-actions', 'gitlab', 'bitbucket']);
|
|
3
|
+
export const getCiScaffoldPreviewTool = {
|
|
4
|
+
name: 'get_ci_scaffold_preview',
|
|
5
|
+
description: 'Render the CI workflow YAML for the SharkCraft CI scaffold without writing anything. Supports GitHub Actions, GitLab, and Bitbucket. Read-only.',
|
|
6
|
+
inputSchema: {
|
|
7
|
+
type: 'object',
|
|
8
|
+
properties: {
|
|
9
|
+
target: { type: 'string', enum: ['quality', 'bundle-replay'] },
|
|
10
|
+
provider: { type: 'string', enum: ['github-actions', 'gitlab', 'bitbucket'] },
|
|
11
|
+
withQuality: { type: 'boolean' },
|
|
12
|
+
withPolicy: { type: 'boolean' },
|
|
13
|
+
withPolicySnapshotGate: { type: 'boolean' },
|
|
14
|
+
withImpact: { type: 'boolean' },
|
|
15
|
+
withReview: { type: 'boolean' },
|
|
16
|
+
withReportSite: { type: 'boolean' },
|
|
17
|
+
withBundleReplay: { type: 'boolean' },
|
|
18
|
+
withNodeCompat: { type: 'boolean' },
|
|
19
|
+
schedule: { type: 'string', enum: ['weekly', 'daily', 'manual'] },
|
|
20
|
+
},
|
|
21
|
+
additionalProperties: false,
|
|
22
|
+
},
|
|
23
|
+
handler(input) {
|
|
24
|
+
const target = typeof input['target'] === 'string' ? input['target'] : 'quality';
|
|
25
|
+
if (target === 'bundle-replay') {
|
|
26
|
+
const schedule = typeof input['schedule'] === 'string' && ['weekly', 'daily', 'manual'].includes(input['schedule'])
|
|
27
|
+
? input['schedule']
|
|
28
|
+
: 'weekly';
|
|
29
|
+
const body = renderBundleReplayWorkflow({
|
|
30
|
+
schedule,
|
|
31
|
+
...(input['withReportSite'] ? { withReportSite: true } : {}),
|
|
32
|
+
});
|
|
33
|
+
return { data: { target: 'bundle-replay', body } };
|
|
34
|
+
}
|
|
35
|
+
const providerRaw = (typeof input['provider'] === 'string' ? input['provider'] : 'github-actions');
|
|
36
|
+
const provider = VALID_PROVIDERS.has(providerRaw) ? providerRaw : 'github-actions';
|
|
37
|
+
const opts = {
|
|
38
|
+
...(input['withQuality'] ? { withQuality: true } : {}),
|
|
39
|
+
...(input['withPolicy'] ? { withPolicy: true } : {}),
|
|
40
|
+
...(input['withPolicySnapshotGate'] ? { withPolicySnapshotGate: true } : {}),
|
|
41
|
+
...(input['withImpact'] ? { withImpact: true } : {}),
|
|
42
|
+
...(input['withReview'] ? { withReview: true } : {}),
|
|
43
|
+
...(input['withReportSite'] ? { withReportSite: true } : {}),
|
|
44
|
+
...(input['withBundleReplay'] ? { withBundleReplay: true } : {}),
|
|
45
|
+
...(input['withNodeCompat'] ? { withNodeCompat: true } : {}),
|
|
46
|
+
};
|
|
47
|
+
let body;
|
|
48
|
+
if (provider === 'gitlab')
|
|
49
|
+
body = renderGitlabCiWorkflow(opts);
|
|
50
|
+
else if (provider === 'bitbucket')
|
|
51
|
+
body = renderBitbucketCiWorkflow(opts);
|
|
52
|
+
else
|
|
53
|
+
body = renderQualityCiWorkflow(opts);
|
|
54
|
+
return {
|
|
55
|
+
data: {
|
|
56
|
+
target: 'quality',
|
|
57
|
+
provider,
|
|
58
|
+
defaultOutputPath: defaultCiOutputPath(provider),
|
|
59
|
+
body,
|
|
60
|
+
},
|
|
61
|
+
};
|
|
62
|
+
},
|
|
63
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { IToolDefinition } from '../server/tool-definition.js';
|
|
2
|
+
interface ICatalogEntry {
|
|
3
|
+
command: string;
|
|
4
|
+
description: string;
|
|
5
|
+
category: string;
|
|
6
|
+
safetyLevel: string;
|
|
7
|
+
writesFiles: boolean;
|
|
8
|
+
writesSource: boolean;
|
|
9
|
+
runsShell: boolean;
|
|
10
|
+
requiresReview: boolean;
|
|
11
|
+
mcpAvailable: boolean;
|
|
12
|
+
aliases: readonly string[];
|
|
13
|
+
/**
|
|
14
|
+
* Coarse tier classification. The MCP catalog snapshot lacks
|
|
15
|
+
* the spine pipelines + project surface config available to the
|
|
16
|
+
* CLI's tier resolver, so this is a static fallback:
|
|
17
|
+
* - `core` for bootstrap commands (doctor, init, recommend, etc.)
|
|
18
|
+
* - `extended` for everything else.
|
|
19
|
+
* Agents querying through MCP that need the precise tier should
|
|
20
|
+
* call `shrk surface list --json` via the host's shell instead.
|
|
21
|
+
*/
|
|
22
|
+
tier?: 'core' | 'extended' | 'experimental';
|
|
23
|
+
}
|
|
24
|
+
export declare const COMMAND_CATALOG_EXPORT: readonly ICatalogEntry[];
|
|
25
|
+
export declare const getCommandCatalogTool: IToolDefinition;
|
|
26
|
+
export {};
|
|
27
|
+
//# sourceMappingURL=command-catalog.tool.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"command-catalog.tool.d.ts","sourceRoot":"","sources":["../../src/tools/command-catalog.tool.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAiBpE,UAAU,aAAa;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,OAAO,CAAC;IACrB,YAAY,EAAE,OAAO,CAAC;IACtB,SAAS,EAAE,OAAO,CAAC;IACnB,cAAc,EAAE,OAAO,CAAC;IACxB,YAAY,EAAE,OAAO,CAAC;IACtB,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;IAC3B;;;;;;;;OAQG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,UAAU,GAAG,cAAc,CAAC;CAC7C;AAwBD,eAAO,MAAM,sBAAsB,EAAE,SAAS,aAAa,EAgFzD,CAAC;AA+BH,eAAO,MAAM,qBAAqB,EAAE,eA4BnC,CAAC"}
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
const MCP_BOOTSTRAP_CORE = new Set([
|
|
2
|
+
'doctor',
|
|
3
|
+
'init',
|
|
4
|
+
'recommend',
|
|
5
|
+
'surface',
|
|
6
|
+
'commands',
|
|
7
|
+
'start-here',
|
|
8
|
+
'help',
|
|
9
|
+
'version',
|
|
10
|
+
// Spine commands the CLI resolver promotes to core. Mirrored here so
|
|
11
|
+
// the MCP catalog matches the CLI's --json output for the most
|
|
12
|
+
// load-bearing entries.
|
|
13
|
+
'context',
|
|
14
|
+
'apply',
|
|
15
|
+
'gen',
|
|
16
|
+
'plan review',
|
|
17
|
+
'check boundaries',
|
|
18
|
+
]);
|
|
19
|
+
// Mirror of the CLI catalog. We re-state it here rather than import the CLI
|
|
20
|
+
// to keep the MCP server independent of the CLI build. Tests assert the
|
|
21
|
+
// invariant that both lists contain the same `command` keys.
|
|
22
|
+
export const COMMAND_CATALOG_EXPORT = Object.freeze([
|
|
23
|
+
entry('doctor', 'Workspace doctor: config + entry validation.', 'core', 'read-only', { mcpAvailable: true }),
|
|
24
|
+
entry('context', 'Focused context for a task.', 'core', 'read-only', { mcpAvailable: true }),
|
|
25
|
+
entry('task', 'Full task packet for a task.', 'core', 'read-only', { mcpAvailable: true }),
|
|
26
|
+
entry('inspect', 'Aggregate inspection of registries + packs.', 'core', 'read-only', { mcpAvailable: true }),
|
|
27
|
+
entry('coverage', 'Coverage report across knowledge axes.', 'core', 'read-only', { mcpAvailable: true }),
|
|
28
|
+
entry('drift', 'Stale-entry drift report.', 'core', 'read-only', { mcpAvailable: true }),
|
|
29
|
+
entry('graph', 'Knowledge graph — nodes, edges, paths, exports.', 'core', 'read-only', { mcpAvailable: true }),
|
|
30
|
+
entry('check boundaries', 'Boundary enforcement check.', 'core', 'read-only', { mcpAvailable: true }),
|
|
31
|
+
entry('review', 'PR-review packet.', 'review', 'read-only', { mcpAvailable: true }),
|
|
32
|
+
entry('review render-comment', 'Render PR-comment markdown (CLI-only writes).', 'review', 'writes-drafts', {
|
|
33
|
+
writesFiles: true,
|
|
34
|
+
}),
|
|
35
|
+
entry('init', 'Create sharkcraft/ scaffold.', 'core', 'writes-source', { writesFiles: true, writesSource: true }),
|
|
36
|
+
entry('gen', 'Generate from template (CLI write only).', 'core', 'writes-source', {
|
|
37
|
+
writesFiles: true,
|
|
38
|
+
writesSource: true,
|
|
39
|
+
requiresReview: true,
|
|
40
|
+
}),
|
|
41
|
+
entry('apply', 'Apply a saved plan — CLI only.', 'core', 'writes-source', {
|
|
42
|
+
writesFiles: true,
|
|
43
|
+
writesSource: true,
|
|
44
|
+
requiresReview: true,
|
|
45
|
+
}),
|
|
46
|
+
entry('dev start', 'Start a dev session.', 'dev', 'writes-session', { writesFiles: true }),
|
|
47
|
+
entry('dev plan', 'Generate session plans.', 'dev', 'writes-session', { writesFiles: true }),
|
|
48
|
+
entry('dev validate', 'Run validation in a session.', 'dev', 'runs-shell', {
|
|
49
|
+
runsShell: true,
|
|
50
|
+
writesFiles: true,
|
|
51
|
+
}),
|
|
52
|
+
entry('dev report', 'Audit-trail report.', 'dev', 'writes-session', { writesFiles: true }),
|
|
53
|
+
entry('dev mark-applied', 'Metadata-only mark applied.', 'dev', 'writes-session', { writesFiles: true }),
|
|
54
|
+
entry('dev mark-validated', 'Metadata-only mark validated.', 'dev', 'writes-session', { writesFiles: true }),
|
|
55
|
+
entry('dev diff', 'Diff two dev sessions.', 'dev', 'read-only', {}),
|
|
56
|
+
entry('dev list', 'List dev sessions.', 'dev', 'read-only', {}),
|
|
57
|
+
entry('dev archive', 'Archive a session.', 'dev', 'writes-session', { writesFiles: true }),
|
|
58
|
+
entry('dev clean', 'Clean old sessions (dry-run by default).', 'dev', 'writes-session', {
|
|
59
|
+
writesFiles: true,
|
|
60
|
+
requiresReview: true,
|
|
61
|
+
}),
|
|
62
|
+
entry('onboard', 'Onboard an existing repo.', 'onboarding', 'read-only', { mcpAvailable: true }),
|
|
63
|
+
entry('onboard --write-drafts', 'Write onboarding drafts.', 'onboarding', 'writes-drafts', {
|
|
64
|
+
writesFiles: true,
|
|
65
|
+
requiresReview: true,
|
|
66
|
+
}),
|
|
67
|
+
entry('onboard adopt', 'Adoption classification.', 'onboarding', 'read-only', { mcpAvailable: true }),
|
|
68
|
+
entry('onboard adopt --write-patch', 'Write adoption pseudo-patch.', 'onboarding', 'writes-drafts', {
|
|
69
|
+
writesFiles: true,
|
|
70
|
+
requiresReview: true,
|
|
71
|
+
}),
|
|
72
|
+
entry('packs list', 'List packs.', 'packs', 'read-only', { mcpAvailable: true }),
|
|
73
|
+
entry('packs doctor', 'Validate pack discovery.', 'packs', 'read-only', { mcpAvailable: true }),
|
|
74
|
+
entry('packs sign', 'Sign pack manifest.', 'packs', 'writes-source', {
|
|
75
|
+
writesFiles: true,
|
|
76
|
+
requiresReview: true,
|
|
77
|
+
}),
|
|
78
|
+
entry('packs verify', 'Verify pack signatures.', 'packs', 'read-only', {}),
|
|
79
|
+
entry('packs new', 'Scaffold a new pack (CLI dry-run by default).', 'packs', 'writes-source', {
|
|
80
|
+
writesFiles: true,
|
|
81
|
+
requiresReview: true,
|
|
82
|
+
}),
|
|
83
|
+
entry('packs test', 'Validate a pack at the given path.', 'packs', 'read-only', {}),
|
|
84
|
+
entry('quality', 'Quality gate orchestrator.', 'gates', 'runs-shell', {}),
|
|
85
|
+
entry('ci scaffold github-actions', 'Scaffold GitHub Actions workflow.', 'gates', 'writes-source', {
|
|
86
|
+
writesFiles: true,
|
|
87
|
+
}),
|
|
88
|
+
entry('boundaries list', 'List boundary rules.', 'boundaries', 'read-only', { mcpAvailable: true }),
|
|
89
|
+
entry('boundaries infer', 'Infer boundary candidates.', 'boundaries', 'read-only', {}),
|
|
90
|
+
entry('boundaries explain', 'Explain a boundary rule.', 'boundaries', 'read-only', { mcpAvailable: true }),
|
|
91
|
+
entry('test context', 'Run context retrieval tests.', 'tests', 'read-only', { mcpAvailable: true }),
|
|
92
|
+
entry('test agent', 'Run agent contract tests.', 'tests', 'read-only', { mcpAvailable: true }),
|
|
93
|
+
entry('test generate context', 'Generate a context-test draft.', 'tests', 'writes-drafts', {
|
|
94
|
+
writesFiles: true,
|
|
95
|
+
}),
|
|
96
|
+
entry('test generate agent', 'Generate an agent-test draft.', 'tests', 'writes-drafts', {
|
|
97
|
+
writesFiles: true,
|
|
98
|
+
}),
|
|
99
|
+
entry('commands', 'List all CLI commands with safety labels.', 'meta', 'read-only', { mcpAvailable: true }),
|
|
100
|
+
entry('mcp', 'Start the read-only MCP server.', 'meta', 'read-only', {}),
|
|
101
|
+
entry('version', 'Print CLI version.', 'meta', 'read-only', {}),
|
|
102
|
+
]);
|
|
103
|
+
function entry(command, description, category, safetyLevel, opts) {
|
|
104
|
+
return {
|
|
105
|
+
command,
|
|
106
|
+
description,
|
|
107
|
+
category,
|
|
108
|
+
safetyLevel,
|
|
109
|
+
writesFiles: opts.writesFiles ?? false,
|
|
110
|
+
writesSource: opts.writesSource ?? false,
|
|
111
|
+
runsShell: opts.runsShell ?? false,
|
|
112
|
+
requiresReview: opts.requiresReview ?? false,
|
|
113
|
+
mcpAvailable: opts.mcpAvailable ?? false,
|
|
114
|
+
aliases: opts.aliases ?? [],
|
|
115
|
+
tier: MCP_BOOTSTRAP_CORE.has(command) ? 'core' : 'extended',
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
export const getCommandCatalogTool = {
|
|
119
|
+
name: 'get_command_catalog',
|
|
120
|
+
description: 'List every `shrk` command with its safety level, side effects, and MCP availability. Read-only. Useful when an agent needs to choose a CLI command for the user without scanning the source tree.',
|
|
121
|
+
inputSchema: {
|
|
122
|
+
type: 'object',
|
|
123
|
+
properties: {
|
|
124
|
+
safetyLevel: { type: 'string', description: 'Filter by safety level (read-only, writes-session, writes-drafts, writes-source, runs-shell, requires-review).' },
|
|
125
|
+
category: { type: 'string', description: 'Filter by category.' },
|
|
126
|
+
},
|
|
127
|
+
additionalProperties: false,
|
|
128
|
+
},
|
|
129
|
+
async handler(input) {
|
|
130
|
+
const safety = input.safetyLevel;
|
|
131
|
+
const category = input.category;
|
|
132
|
+
let entries = COMMAND_CATALOG_EXPORT;
|
|
133
|
+
if (typeof safety === 'string')
|
|
134
|
+
entries = entries.filter((e) => e.safetyLevel === safety);
|
|
135
|
+
if (typeof category === 'string')
|
|
136
|
+
entries = entries.filter((e) => e.category === category);
|
|
137
|
+
return {
|
|
138
|
+
data: {
|
|
139
|
+
entries,
|
|
140
|
+
totals: {
|
|
141
|
+
total: COMMAND_CATALOG_EXPORT.length,
|
|
142
|
+
returned: entries.length,
|
|
143
|
+
},
|
|
144
|
+
},
|
|
145
|
+
};
|
|
146
|
+
},
|
|
147
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"construct-adoption-diff.tool.d.ts","sourceRoot":"","sources":["../../src/tools/construct-adoption-diff.tool.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAIpE,eAAO,MAAM,4BAA4B,EAAE,eAwB1C,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { buildConstructAdoptionDiff, loadConstructs, renderConstructAdoptionDiff, } from '@shrkcrft/inspector';
|
|
2
|
+
const VALID_FORMATS = new Set(['text', 'markdown', 'html', 'json']);
|
|
3
|
+
export const getConstructAdoptionDiffTool = {
|
|
4
|
+
name: 'get_construct_adoption_diff',
|
|
5
|
+
description: 'Render a line-level diff of the proposed construct adoption against the live constructs registry. Read-only; never writes.',
|
|
6
|
+
inputSchema: {
|
|
7
|
+
type: 'object',
|
|
8
|
+
properties: {
|
|
9
|
+
format: { type: 'string', enum: ['text', 'markdown', 'html', 'json'] },
|
|
10
|
+
},
|
|
11
|
+
additionalProperties: false,
|
|
12
|
+
},
|
|
13
|
+
async handler(input, ctx) {
|
|
14
|
+
await loadConstructs(ctx.inspection);
|
|
15
|
+
const formatRaw = typeof input['format'] === 'string' ? input['format'] : 'json';
|
|
16
|
+
const format = VALID_FORMATS.has(formatRaw) ? formatRaw : 'json';
|
|
17
|
+
const diff = await buildConstructAdoptionDiff(ctx.inspection);
|
|
18
|
+
return {
|
|
19
|
+
data: {
|
|
20
|
+
diff,
|
|
21
|
+
rendered: renderConstructAdoptionDiff(diff, format),
|
|
22
|
+
format,
|
|
23
|
+
},
|
|
24
|
+
};
|
|
25
|
+
},
|
|
26
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"construct-adoption.tool.d.ts","sourceRoot":"","sources":["../../src/tools/construct-adoption.tool.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAEpE,eAAO,MAAM,+BAA+B,EAAE,eA6B7C,CAAC;AAEF,eAAO,MAAM,8BAA8B,EAAE,eAS5C,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { buildConstructAdoptionPlan, loadConstructs, readConstructAdoptionStatus, } from '@shrkcrft/inspector';
|
|
2
|
+
export const createConstructAdoptionPlanTool = {
|
|
3
|
+
name: 'create_construct_adoption_plan',
|
|
4
|
+
description: 'Build a construct-adoption plan classifying inferred construct drafts. Read-only; never writes patches.',
|
|
5
|
+
inputSchema: {
|
|
6
|
+
type: 'object',
|
|
7
|
+
properties: {
|
|
8
|
+
minConfidence: { type: 'string', enum: ['high', 'medium', 'low'] },
|
|
9
|
+
include: { type: 'array', items: { type: 'string' } },
|
|
10
|
+
},
|
|
11
|
+
additionalProperties: false,
|
|
12
|
+
},
|
|
13
|
+
async handler(input, ctx) {
|
|
14
|
+
await loadConstructs(ctx.inspection);
|
|
15
|
+
const min = typeof input['minConfidence'] === 'string'
|
|
16
|
+
? input['minConfidence']
|
|
17
|
+
: undefined;
|
|
18
|
+
const include = Array.isArray(input['include'])
|
|
19
|
+
? input['include'].filter((x) => ['facets', 'publicApi', 'events', 'tokens'].includes(x))
|
|
20
|
+
: undefined;
|
|
21
|
+
const plan = await buildConstructAdoptionPlan(ctx.inspection, {
|
|
22
|
+
...(min ? { minConfidence: min } : {}),
|
|
23
|
+
...(include ? { include } : {}),
|
|
24
|
+
});
|
|
25
|
+
return { data: plan };
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
export const getConstructAdoptionReviewTool = {
|
|
29
|
+
name: 'get_construct_adoption_review',
|
|
30
|
+
description: 'Return the current construct-adoption status (paths + summary). Read-only.',
|
|
31
|
+
inputSchema: { type: 'object', properties: {} },
|
|
32
|
+
async handler(_input, ctx) {
|
|
33
|
+
await loadConstructs(ctx.inspection);
|
|
34
|
+
const status = readConstructAdoptionStatus(ctx.inspection);
|
|
35
|
+
return { data: status };
|
|
36
|
+
},
|
|
37
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"construct-inference.tool.d.ts","sourceRoot":"","sources":["../../src/tools/construct-inference.tool.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAEpE,eAAO,MAAM,0BAA0B,EAAE,eA0BxC,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { inferConstructs, loadConstructs, } from '@shrkcrft/inspector';
|
|
2
|
+
export const inferConstructsPreviewTool = {
|
|
3
|
+
name: 'infer_constructs_preview',
|
|
4
|
+
description: 'Infer construct candidates from files, conventions, and the import graph. Read-only — no drafts are written. Use `shrk constructs infer --write-drafts` to materialise them.',
|
|
5
|
+
inputSchema: {
|
|
6
|
+
type: 'object',
|
|
7
|
+
properties: {
|
|
8
|
+
type: { type: 'string' },
|
|
9
|
+
minConfidence: { type: 'string', enum: ['high', 'medium', 'low'] },
|
|
10
|
+
limit: { type: 'number' },
|
|
11
|
+
},
|
|
12
|
+
additionalProperties: false,
|
|
13
|
+
},
|
|
14
|
+
async handler(input, ctx) {
|
|
15
|
+
const minConf = typeof input['minConfidence'] === 'string'
|
|
16
|
+
? input['minConfidence']
|
|
17
|
+
: undefined;
|
|
18
|
+
await loadConstructs(ctx.inspection);
|
|
19
|
+
const result = await inferConstructs(ctx.inspection, {
|
|
20
|
+
...(typeof input['type'] === 'string' ? { type: input['type'] } : {}),
|
|
21
|
+
...(minConf ? { minConfidence: minConf } : {}),
|
|
22
|
+
...(typeof input['limit'] === 'number' ? { limit: input['limit'] } : {}),
|
|
23
|
+
});
|
|
24
|
+
return { data: result };
|
|
25
|
+
},
|
|
26
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { IToolDefinition } from '../server/tool-definition.js';
|
|
2
|
+
export declare const listConstructsTool: IToolDefinition;
|
|
3
|
+
export declare const getConstructTool: IToolDefinition;
|
|
4
|
+
export declare const traceConstructTool: IToolDefinition;
|
|
5
|
+
export declare const getConstructApiTool: IToolDefinition;
|
|
6
|
+
export declare const listConstructFacetsTool: IToolDefinition;
|
|
7
|
+
//# sourceMappingURL=constructs.tool.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constructs.tool.d.ts","sourceRoot":"","sources":["../../src/tools/constructs.tool.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAEpE,eAAO,MAAM,kBAAkB,EAAE,eAShC,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,eAe9B,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,eAehC,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,eAejC,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,eAerC,CAAC"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { loadConstructs, traceConstruct } from '@shrkcrft/inspector';
|
|
2
|
+
export const listConstructsTool = {
|
|
3
|
+
name: 'list_constructs',
|
|
4
|
+
description: 'List registered constructs. Read-only.',
|
|
5
|
+
inputSchema: { type: 'object', properties: { type: { type: 'string' } } },
|
|
6
|
+
async handler(input, ctx) {
|
|
7
|
+
const type = typeof input['type'] === 'string' ? input['type'] : undefined;
|
|
8
|
+
const list = await loadConstructs(ctx.inspection);
|
|
9
|
+
return { data: type ? list.filter((c) => c.type === type) : list };
|
|
10
|
+
},
|
|
11
|
+
};
|
|
12
|
+
export const getConstructTool = {
|
|
13
|
+
name: 'get_construct',
|
|
14
|
+
description: 'Show details for a single construct. Read-only.',
|
|
15
|
+
inputSchema: {
|
|
16
|
+
type: 'object',
|
|
17
|
+
required: ['id'],
|
|
18
|
+
properties: { id: { type: 'string' } },
|
|
19
|
+
},
|
|
20
|
+
async handler(input, ctx) {
|
|
21
|
+
const id = String(input['id'] ?? '');
|
|
22
|
+
const list = await loadConstructs(ctx.inspection);
|
|
23
|
+
const c = list.find((x) => x.id === id);
|
|
24
|
+
if (!c)
|
|
25
|
+
return { error: { code: 'not-found', message: `No construct "${id}"` } };
|
|
26
|
+
return { data: c };
|
|
27
|
+
},
|
|
28
|
+
};
|
|
29
|
+
export const traceConstructTool = {
|
|
30
|
+
name: 'trace_construct',
|
|
31
|
+
description: 'Trace files / publicApi / events / tokens of a construct. Read-only.',
|
|
32
|
+
inputSchema: {
|
|
33
|
+
type: 'object',
|
|
34
|
+
required: ['id'],
|
|
35
|
+
properties: { id: { type: 'string' } },
|
|
36
|
+
},
|
|
37
|
+
async handler(input, ctx) {
|
|
38
|
+
const id = String(input['id'] ?? '');
|
|
39
|
+
const list = await loadConstructs(ctx.inspection);
|
|
40
|
+
const c = list.find((x) => x.id === id);
|
|
41
|
+
if (!c)
|
|
42
|
+
return { error: { code: 'not-found', message: `No construct "${id}"` } };
|
|
43
|
+
return { data: traceConstruct(c) };
|
|
44
|
+
},
|
|
45
|
+
};
|
|
46
|
+
export const getConstructApiTool = {
|
|
47
|
+
name: 'get_construct_api',
|
|
48
|
+
description: 'Return the publicApi entries for a construct. Read-only.',
|
|
49
|
+
inputSchema: {
|
|
50
|
+
type: 'object',
|
|
51
|
+
required: ['id'],
|
|
52
|
+
properties: { id: { type: 'string' } },
|
|
53
|
+
},
|
|
54
|
+
async handler(input, ctx) {
|
|
55
|
+
const id = String(input['id'] ?? '');
|
|
56
|
+
const list = await loadConstructs(ctx.inspection);
|
|
57
|
+
const c = list.find((x) => x.id === id);
|
|
58
|
+
if (!c)
|
|
59
|
+
return { error: { code: 'not-found', message: `No construct "${id}"` } };
|
|
60
|
+
return { data: { id, publicApi: c.publicApi ?? [] } };
|
|
61
|
+
},
|
|
62
|
+
};
|
|
63
|
+
export const listConstructFacetsTool = {
|
|
64
|
+
name: 'list_construct_facets',
|
|
65
|
+
description: 'List facets of a construct. Read-only.',
|
|
66
|
+
inputSchema: {
|
|
67
|
+
type: 'object',
|
|
68
|
+
required: ['id'],
|
|
69
|
+
properties: { id: { type: 'string' } },
|
|
70
|
+
},
|
|
71
|
+
async handler(input, ctx) {
|
|
72
|
+
const id = String(input['id'] ?? '');
|
|
73
|
+
const list = await loadConstructs(ctx.inspection);
|
|
74
|
+
const c = list.find((x) => x.id === id);
|
|
75
|
+
if (!c)
|
|
76
|
+
return { error: { code: 'not-found', message: `No construct "${id}"` } };
|
|
77
|
+
return { data: { id, facets: c.facets ?? {} } };
|
|
78
|
+
},
|
|
79
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-generation-plan.tool.d.ts","sourceRoot":"","sources":["../../src/tools/create-generation-plan.tool.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAGpE,eAAO,MAAM,wBAAwB,EAAE,eA8CtC,CAAC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { generate } from '@shrkcrft/generator';
|
|
2
|
+
export const createGenerationPlanTool = {
|
|
3
|
+
name: 'create_generation_plan',
|
|
4
|
+
description: 'Create a generation plan (dry-run). Never writes files. Use to preview a template before applying.',
|
|
5
|
+
inputSchema: {
|
|
6
|
+
type: 'object',
|
|
7
|
+
properties: {
|
|
8
|
+
templateId: { type: 'string' },
|
|
9
|
+
name: { type: 'string' },
|
|
10
|
+
variables: { type: 'object', additionalProperties: { type: 'string' } },
|
|
11
|
+
},
|
|
12
|
+
required: ['templateId'],
|
|
13
|
+
additionalProperties: false,
|
|
14
|
+
},
|
|
15
|
+
async handler(input, ctx) {
|
|
16
|
+
const templateId = String(input.templateId);
|
|
17
|
+
const template = ctx.inspection.templateRegistry.get(templateId);
|
|
18
|
+
if (!template)
|
|
19
|
+
return { isError: true, text: `No template with id "${templateId}"` };
|
|
20
|
+
const variables = input.variables ?? {};
|
|
21
|
+
const result = generate(template, {
|
|
22
|
+
templateId,
|
|
23
|
+
name: typeof input.name === 'string' ? input.name : undefined,
|
|
24
|
+
variables,
|
|
25
|
+
projectRoot: ctx.inspection.projectRoot,
|
|
26
|
+
write: false,
|
|
27
|
+
});
|
|
28
|
+
if (!result.ok)
|
|
29
|
+
return { isError: true, text: result.error.message };
|
|
30
|
+
const { plan } = result.value;
|
|
31
|
+
return {
|
|
32
|
+
data: {
|
|
33
|
+
templateId: plan.templateId,
|
|
34
|
+
templateName: plan.templateName,
|
|
35
|
+
totalFiles: plan.totalFiles,
|
|
36
|
+
hasConflicts: plan.hasConflicts,
|
|
37
|
+
warnings: plan.warnings,
|
|
38
|
+
postGenerationNotes: plan.postGenerationNotes,
|
|
39
|
+
changes: plan.changes.map((c) => ({
|
|
40
|
+
type: c.type,
|
|
41
|
+
relativePath: c.relativePath,
|
|
42
|
+
sizeBytes: c.sizeBytes,
|
|
43
|
+
reason: c.reason,
|
|
44
|
+
})),
|
|
45
|
+
},
|
|
46
|
+
};
|
|
47
|
+
},
|
|
48
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-pipeline-plan.tool.d.ts","sourceRoot":"","sources":["../../src/tools/create-pipeline-plan.tool.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAGpE,eAAO,MAAM,sBAAsB,EAAE,eAwCpC,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { interpolatePipeline, renderPipelineScript } from '@shrkcrft/pipelines';
|
|
2
|
+
export const createPipelinePlanTool = {
|
|
3
|
+
name: 'create_pipeline_plan',
|
|
4
|
+
description: 'Resolve a pipeline against a task + named inputs and return the interpolated step list. Optionally include a copy-pasteable shell script (apply/write steps include a manual-confirm prompt). Never executes anything.',
|
|
5
|
+
inputSchema: {
|
|
6
|
+
type: 'object',
|
|
7
|
+
properties: {
|
|
8
|
+
id: { type: 'string' },
|
|
9
|
+
task: { type: 'string' },
|
|
10
|
+
inputs: { type: 'object', additionalProperties: { type: 'string' } },
|
|
11
|
+
includeOptional: { type: 'array', items: { type: 'string' } },
|
|
12
|
+
includeScript: { type: 'boolean' },
|
|
13
|
+
},
|
|
14
|
+
required: ['id', 'task'],
|
|
15
|
+
additionalProperties: false,
|
|
16
|
+
},
|
|
17
|
+
async handler(input, ctx) {
|
|
18
|
+
const id = String(input.id ?? '');
|
|
19
|
+
const pipeline = ctx.inspection.pipelineRegistry.get(id);
|
|
20
|
+
if (!pipeline)
|
|
21
|
+
return { isError: true, text: `No pipeline with id "${id}".` };
|
|
22
|
+
const interp = interpolatePipeline(pipeline, {
|
|
23
|
+
task: String(input.task),
|
|
24
|
+
projectRoot: ctx.inspection.projectRoot,
|
|
25
|
+
inputs: input.inputs ?? {},
|
|
26
|
+
includeOptional: input.includeOptional ?? [],
|
|
27
|
+
});
|
|
28
|
+
const data = {
|
|
29
|
+
pipelineId: pipeline.id,
|
|
30
|
+
title: pipeline.title,
|
|
31
|
+
description: pipeline.description,
|
|
32
|
+
task: interp.task,
|
|
33
|
+
inputs: interp.inputs,
|
|
34
|
+
steps: interp.steps,
|
|
35
|
+
};
|
|
36
|
+
if (input.includeScript === true) {
|
|
37
|
+
data.script = renderPipelineScript(interp);
|
|
38
|
+
}
|
|
39
|
+
return { data };
|
|
40
|
+
},
|
|
41
|
+
};
|