@josstei/maestro 1.6.4-rc.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/.agents/plugins/marketplace.json +20 -0
- package/CHANGELOG.md +485 -0
- package/EXAMPLES.md +255 -0
- package/GEMINI.md +231 -0
- package/LICENSE +201 -0
- package/QWEN.md +241 -0
- package/README.md +220 -0
- package/agents/accessibility_specialist.md +20 -0
- package/agents/analytics_engineer.md +22 -0
- package/agents/api_designer.md +19 -0
- package/agents/architect.md +19 -0
- package/agents/cloud_architect.md +19 -0
- package/agents/cobol_engineer.md +22 -0
- package/agents/code_reviewer.md +17 -0
- package/agents/coder.md +22 -0
- package/agents/compliance_reviewer.md +19 -0
- package/agents/content_strategist.md +19 -0
- package/agents/copywriter.md +19 -0
- package/agents/data_engineer.md +22 -0
- package/agents/database_administrator.md +21 -0
- package/agents/db2_dba.md +21 -0
- package/agents/debugger.md +19 -0
- package/agents/design_system_engineer.md +22 -0
- package/agents/devops_engineer.md +23 -0
- package/agents/hlasm_assembler_specialist.md +22 -0
- package/agents/i18n_specialist.md +21 -0
- package/agents/ibm_i_specialist.md +22 -0
- package/agents/integration_engineer.md +23 -0
- package/agents/ml_engineer.md +23 -0
- package/agents/mlops_engineer.md +23 -0
- package/agents/mobile_engineer.md +23 -0
- package/agents/observability_engineer.md +23 -0
- package/agents/performance_engineer.md +21 -0
- package/agents/platform_engineer.md +24 -0
- package/agents/product_manager.md +20 -0
- package/agents/prompt_engineer.md +22 -0
- package/agents/refactor.md +22 -0
- package/agents/release_manager.md +22 -0
- package/agents/security_engineer.md +21 -0
- package/agents/seo_specialist.md +21 -0
- package/agents/site_reliability_engineer.md +21 -0
- package/agents/solutions_architect.md +19 -0
- package/agents/technical_writer.md +21 -0
- package/agents/tester.md +23 -0
- package/agents/ux_designer.md +20 -0
- package/agents/zos_sysprog.md +21 -0
- package/bin/maestro-mcp-server.js +10 -0
- package/claude/.claude-plugin/plugin.json +21 -0
- package/claude/.mcp.json +11 -0
- package/claude/README.md +191 -0
- package/claude/agents/accessibility-specialist.md +36 -0
- package/claude/agents/analytics-engineer.md +38 -0
- package/claude/agents/api-designer.md +33 -0
- package/claude/agents/architect.md +33 -0
- package/claude/agents/cloud-architect.md +33 -0
- package/claude/agents/cobol-engineer.md +38 -0
- package/claude/agents/code-reviewer.md +31 -0
- package/claude/agents/coder.md +38 -0
- package/claude/agents/compliance-reviewer.md +33 -0
- package/claude/agents/content-strategist.md +33 -0
- package/claude/agents/copywriter.md +33 -0
- package/claude/agents/data-engineer.md +37 -0
- package/claude/agents/database-administrator.md +37 -0
- package/claude/agents/db2-dba.md +37 -0
- package/claude/agents/debugger.md +32 -0
- package/claude/agents/design-system-engineer.md +38 -0
- package/claude/agents/devops-engineer.md +39 -0
- package/claude/agents/hlasm-assembler-specialist.md +38 -0
- package/claude/agents/i18n-specialist.md +37 -0
- package/claude/agents/ibm-i-specialist.md +38 -0
- package/claude/agents/integration-engineer.md +39 -0
- package/claude/agents/ml-engineer.md +39 -0
- package/claude/agents/mlops-engineer.md +39 -0
- package/claude/agents/mobile-engineer.md +39 -0
- package/claude/agents/observability-engineer.md +39 -0
- package/claude/agents/performance-engineer.md +34 -0
- package/claude/agents/platform-engineer.md +40 -0
- package/claude/agents/product-manager.md +34 -0
- package/claude/agents/prompt-engineer.md +38 -0
- package/claude/agents/refactor.md +38 -0
- package/claude/agents/release-manager.md +38 -0
- package/claude/agents/security-engineer.md +37 -0
- package/claude/agents/seo-specialist.md +37 -0
- package/claude/agents/site-reliability-engineer.md +37 -0
- package/claude/agents/solutions-architect.md +33 -0
- package/claude/agents/technical-writer.md +37 -0
- package/claude/agents/tester.md +39 -0
- package/claude/agents/ux-designer.md +34 -0
- package/claude/agents/zos-sysprog.md +37 -0
- package/claude/hooks/claude-hooks.json +48 -0
- package/claude/mcp/maestro-server.js +9 -0
- package/claude/mcp-config.example.json +9 -0
- package/claude/scripts/adapters/claude-adapter.js +7 -0
- package/claude/scripts/hook-runner.js +8 -0
- package/claude/scripts/policy-enforcer.js +294 -0
- package/claude/skills/a11y-audit/SKILL.md +26 -0
- package/claude/skills/archive/SKILL.md +24 -0
- package/claude/skills/code-review/SKILL.md +7 -0
- package/claude/skills/compliance-check/SKILL.md +26 -0
- package/claude/skills/debug-workflow/SKILL.md +27 -0
- package/claude/skills/delegation/SKILL.md +7 -0
- package/claude/skills/design-dialogue/SKILL.md +7 -0
- package/claude/skills/execute/SKILL.md +38 -0
- package/claude/skills/execution/SKILL.md +7 -0
- package/claude/skills/implementation-planning/SKILL.md +7 -0
- package/claude/skills/orchestrate/SKILL.md +38 -0
- package/claude/skills/perf-check/SKILL.md +26 -0
- package/claude/skills/resume-session/SKILL.md +38 -0
- package/claude/skills/review-code/SKILL.md +27 -0
- package/claude/skills/security-audit/SKILL.md +28 -0
- package/claude/skills/seo-audit/SKILL.md +26 -0
- package/claude/skills/session-management/SKILL.md +7 -0
- package/claude/skills/status/SKILL.md +22 -0
- package/claude/skills/validation/SKILL.md +7 -0
- package/claude/src/agents/accessibility-specialist.md +163 -0
- package/claude/src/agents/analytics-engineer.md +182 -0
- package/claude/src/agents/api-designer.md +124 -0
- package/claude/src/agents/architect.md +120 -0
- package/claude/src/agents/cloud-architect.md +134 -0
- package/claude/src/agents/cobol-engineer.md +127 -0
- package/claude/src/agents/code-reviewer.md +123 -0
- package/claude/src/agents/coder.md +132 -0
- package/claude/src/agents/compliance-reviewer.md +219 -0
- package/claude/src/agents/content-strategist.md +111 -0
- package/claude/src/agents/copywriter.md +113 -0
- package/claude/src/agents/data-engineer.md +130 -0
- package/claude/src/agents/database-administrator.md +126 -0
- package/claude/src/agents/db2-dba.md +124 -0
- package/claude/src/agents/debugger.md +133 -0
- package/claude/src/agents/design-system-engineer.md +258 -0
- package/claude/src/agents/devops-engineer.md +138 -0
- package/claude/src/agents/hlasm-assembler-specialist.md +134 -0
- package/claude/src/agents/i18n-specialist.md +241 -0
- package/claude/src/agents/ibm-i-specialist.md +132 -0
- package/claude/src/agents/integration-engineer.md +133 -0
- package/claude/src/agents/ml-engineer.md +115 -0
- package/claude/src/agents/mlops-engineer.md +116 -0
- package/claude/src/agents/mobile-engineer.md +115 -0
- package/claude/src/agents/observability-engineer.md +133 -0
- package/claude/src/agents/performance-engineer.md +139 -0
- package/claude/src/agents/platform-engineer.md +129 -0
- package/claude/src/agents/product-manager.md +170 -0
- package/claude/src/agents/prompt-engineer.md +129 -0
- package/claude/src/agents/refactor.md +138 -0
- package/claude/src/agents/release-manager.md +132 -0
- package/claude/src/agents/security-engineer.md +143 -0
- package/claude/src/agents/seo-specialist.md +129 -0
- package/claude/src/agents/site-reliability-engineer.md +131 -0
- package/claude/src/agents/solutions-architect.md +137 -0
- package/claude/src/agents/technical-writer.md +129 -0
- package/claude/src/agents/tester.md +135 -0
- package/claude/src/agents/ux-designer.md +168 -0
- package/claude/src/agents/zos-sysprog.md +134 -0
- package/claude/src/config/setting-resolver.js +32 -0
- package/claude/src/core/agent-registry.js +67 -0
- package/claude/src/core/canonical-source.js +39 -0
- package/claude/src/core/env-file-parser.js +82 -0
- package/claude/src/core/feature-blocks.js +34 -0
- package/claude/src/core/logger.js +12 -0
- package/claude/src/core/markdown-state.js +36 -0
- package/claude/src/core/policy-rules.js +32 -0
- package/claude/src/core/project-root-resolver.js +184 -0
- package/claude/src/core/stdin-reader.js +77 -0
- package/claude/src/core/version.js +50 -0
- package/claude/src/entry-points/core-command-registry.js +37 -0
- package/claude/src/entry-points/preamble-builders.js +54 -0
- package/claude/src/entry-points/registry.js +199 -0
- package/claude/src/entry-points/templates/claude-core-command.md.tmpl +38 -0
- package/claude/src/entry-points/templates/claude-skill.md.tmpl +18 -0
- package/claude/src/entry-points/templates/codex-core-command.md.tmpl +16 -0
- package/claude/src/entry-points/templates/codex-skill.md.tmpl +11 -0
- package/claude/src/entry-points/templates/gemini-command.toml.tmpl +17 -0
- package/claude/src/entry-points/templates/gemini-core-command.toml.tmpl +30 -0
- package/claude/src/generated/agent-registry.json +630 -0
- package/claude/src/generated/hook-registry.json +18 -0
- package/claude/src/generated/resource-registry.json +16 -0
- package/claude/src/hooks/logic/after-agent-logic.js +54 -0
- package/claude/src/hooks/logic/before-agent-logic.js +57 -0
- package/claude/src/hooks/logic/hook-state.js +127 -0
- package/claude/src/hooks/logic/session-end-logic.js +17 -0
- package/claude/src/hooks/logic/session-start-logic.js +25 -0
- package/claude/src/lib/discovery/index.js +172 -0
- package/claude/src/lib/errors/index.js +104 -0
- package/claude/src/lib/framework-detection.js +50 -0
- package/claude/src/lib/frontmatter/index.js +262 -0
- package/claude/src/lib/io/index.js +96 -0
- package/claude/src/lib/naming/index.js +94 -0
- package/claude/src/lib/validation/index.js +124 -0
- package/claude/src/lib/yaml-emit.js +38 -0
- package/claude/src/mcp/content/provider.js +68 -0
- package/claude/src/mcp/content/runtime-content.js +188 -0
- package/claude/src/mcp/contracts/cache-path-rejector.js +39 -0
- package/claude/src/mcp/contracts/downstream-context.js +106 -0
- package/claude/src/mcp/contracts/plan-schema.js +148 -0
- package/claude/src/mcp/contracts/workspace-marker.js +61 -0
- package/claude/src/mcp/core/create-server.js +76 -0
- package/claude/src/mcp/core/line-reader.js +35 -0
- package/claude/src/mcp/core/project-root-cache.js +120 -0
- package/claude/src/mcp/core/protocol-dispatcher.js +274 -0
- package/claude/src/mcp/core/recovery-hints.js +43 -0
- package/claude/src/mcp/core/tool-outcome.js +77 -0
- package/claude/src/mcp/core/tool-registry.js +82 -0
- package/claude/src/mcp/handlers/assess-task-complexity.js +108 -0
- package/claude/src/mcp/handlers/blocker-parser.js +34 -0
- package/claude/src/mcp/handlers/design-gate.js +393 -0
- package/claude/src/mcp/handlers/get-agent.js +54 -0
- package/claude/src/mcp/handlers/get-runtime-context.js +49 -0
- package/claude/src/mcp/handlers/get-skill-content.js +51 -0
- package/claude/src/mcp/handlers/initialize-workspace.js +45 -0
- package/claude/src/mcp/handlers/reconciliation.js +224 -0
- package/claude/src/mcp/handlers/resolve-settings.js +39 -0
- package/claude/src/mcp/handlers/session-state-core.js +108 -0
- package/claude/src/mcp/handlers/session-state-tools.js +562 -0
- package/claude/src/mcp/handlers/validate-plan.js +76 -0
- package/claude/src/mcp/maestro-server.js +122 -0
- package/claude/src/mcp/runtime/runtime-config-map.js +70 -0
- package/claude/src/mcp/tool-packs/content/index.js +80 -0
- package/claude/src/mcp/tool-packs/contracts.js +30 -0
- package/claude/src/mcp/tool-packs/index.js +15 -0
- package/claude/src/mcp/tool-packs/session/index.js +243 -0
- package/claude/src/mcp/tool-packs/workspace/index.js +98 -0
- package/claude/src/mcp/utils/extension-root.js +31 -0
- package/claude/src/mcp/validation/agent-checker.js +81 -0
- package/claude/src/mcp/validation/dag-checker.js +214 -0
- package/claude/src/mcp/validation/file-overlap-checker.js +63 -0
- package/claude/src/mcp/validation/schema-checker.js +108 -0
- package/claude/src/platforms/claude/runtime-config.js +60 -0
- package/claude/src/platforms/shared/adapters/claude-adapter.js +36 -0
- package/claude/src/platforms/shared/adapters/conventions.js +29 -0
- package/claude/src/platforms/shared/adapters/exit-codes.js +6 -0
- package/claude/src/platforms/shared/adapters/factory.js +40 -0
- package/claude/src/platforms/shared/agent-names.js +10 -0
- package/claude/src/platforms/shared/hook-runner.js +52 -0
- package/claude/src/references/architecture.md +139 -0
- package/claude/src/references/orchestration-steps.md +193 -0
- package/claude/src/skills/shared/code-review/SKILL.md +145 -0
- package/claude/src/skills/shared/delegation/SKILL.md +370 -0
- package/claude/src/skills/shared/delegation/protocols/agent-base-protocol.md +145 -0
- package/claude/src/skills/shared/delegation/protocols/filesystem-safety-protocol.md +31 -0
- package/claude/src/skills/shared/design-dialogue/SKILL.md +284 -0
- package/claude/src/skills/shared/execution/SKILL.md +258 -0
- package/claude/src/skills/shared/implementation-planning/SKILL.md +303 -0
- package/claude/src/skills/shared/session-management/SKILL.md +314 -0
- package/claude/src/skills/shared/validation/SKILL.md +204 -0
- package/claude/src/state/session-state.js +113 -0
- package/claude/src/templates/design-document.md +95 -0
- package/claude/src/templates/implementation-plan.md +86 -0
- package/claude/src/templates/session-state.md +68 -0
- package/claude/src/version.json +3 -0
- package/commands/maestro/a11y-audit.toml +22 -0
- package/commands/maestro/archive.toml +23 -0
- package/commands/maestro/compliance-check.toml +22 -0
- package/commands/maestro/debug.toml +23 -0
- package/commands/maestro/execute.toml +30 -0
- package/commands/maestro/orchestrate.toml +30 -0
- package/commands/maestro/perf-check.toml +22 -0
- package/commands/maestro/resume.toml +38 -0
- package/commands/maestro/review.toml +23 -0
- package/commands/maestro/security-audit.toml +24 -0
- package/commands/maestro/seo-audit.toml +22 -0
- package/commands/maestro/status.toml +21 -0
- package/docs/architecture.md +310 -0
- package/docs/cicd.md +647 -0
- package/docs/flow.md +255 -0
- package/docs/maestro-cheatsheet.md +199 -0
- package/docs/overview.md +141 -0
- package/docs/runtime-claude.md +190 -0
- package/docs/runtime-codex.md +197 -0
- package/docs/runtime-gemini.md +170 -0
- package/docs/runtime-qwen.md +147 -0
- package/docs/usage.md +312 -0
- package/gemini-extension.json +55 -0
- package/hooks/adapters/gemini-adapter.js +2 -0
- package/hooks/adapters/qwen-adapter.js +2 -0
- package/hooks/hook-runner.js +3 -0
- package/hooks/hooks.json +56 -0
- package/mcp/maestro-server.js +4 -0
- package/package.json +93 -0
- package/plugins/maestro/.app.json +3 -0
- package/plugins/maestro/.codex-plugin/plugin.json +41 -0
- package/plugins/maestro/.mcp.json +16 -0
- package/plugins/maestro/README.md +57 -0
- package/plugins/maestro/references/runtime-guide.md +125 -0
- package/plugins/maestro/skills/a11y-audit/SKILL.md +16 -0
- package/plugins/maestro/skills/archive/SKILL.md +16 -0
- package/plugins/maestro/skills/code-review/SKILL.md +6 -0
- package/plugins/maestro/skills/compliance-check/SKILL.md +16 -0
- package/plugins/maestro/skills/debug-workflow/SKILL.md +16 -0
- package/plugins/maestro/skills/delegation/SKILL.md +6 -0
- package/plugins/maestro/skills/design-dialogue/SKILL.md +6 -0
- package/plugins/maestro/skills/execute/SKILL.md +16 -0
- package/plugins/maestro/skills/execution/SKILL.md +6 -0
- package/plugins/maestro/skills/implementation-planning/SKILL.md +6 -0
- package/plugins/maestro/skills/orchestrate/SKILL.md +16 -0
- package/plugins/maestro/skills/perf-check/SKILL.md +16 -0
- package/plugins/maestro/skills/resume-session/SKILL.md +16 -0
- package/plugins/maestro/skills/review-code/SKILL.md +16 -0
- package/plugins/maestro/skills/security-audit/SKILL.md +16 -0
- package/plugins/maestro/skills/seo-audit/SKILL.md +16 -0
- package/plugins/maestro/skills/session-management/SKILL.md +6 -0
- package/plugins/maestro/skills/status/SKILL.md +14 -0
- package/plugins/maestro/skills/validation/SKILL.md +6 -0
- package/plugins/maestro/src/agents/accessibility-specialist.md +163 -0
- package/plugins/maestro/src/agents/analytics-engineer.md +182 -0
- package/plugins/maestro/src/agents/api-designer.md +124 -0
- package/plugins/maestro/src/agents/architect.md +120 -0
- package/plugins/maestro/src/agents/cloud-architect.md +134 -0
- package/plugins/maestro/src/agents/cobol-engineer.md +127 -0
- package/plugins/maestro/src/agents/code-reviewer.md +123 -0
- package/plugins/maestro/src/agents/coder.md +132 -0
- package/plugins/maestro/src/agents/compliance-reviewer.md +219 -0
- package/plugins/maestro/src/agents/content-strategist.md +111 -0
- package/plugins/maestro/src/agents/copywriter.md +113 -0
- package/plugins/maestro/src/agents/data-engineer.md +130 -0
- package/plugins/maestro/src/agents/database-administrator.md +126 -0
- package/plugins/maestro/src/agents/db2-dba.md +124 -0
- package/plugins/maestro/src/agents/debugger.md +133 -0
- package/plugins/maestro/src/agents/design-system-engineer.md +258 -0
- package/plugins/maestro/src/agents/devops-engineer.md +138 -0
- package/plugins/maestro/src/agents/hlasm-assembler-specialist.md +134 -0
- package/plugins/maestro/src/agents/i18n-specialist.md +241 -0
- package/plugins/maestro/src/agents/ibm-i-specialist.md +132 -0
- package/plugins/maestro/src/agents/integration-engineer.md +133 -0
- package/plugins/maestro/src/agents/ml-engineer.md +115 -0
- package/plugins/maestro/src/agents/mlops-engineer.md +116 -0
- package/plugins/maestro/src/agents/mobile-engineer.md +115 -0
- package/plugins/maestro/src/agents/observability-engineer.md +133 -0
- package/plugins/maestro/src/agents/performance-engineer.md +139 -0
- package/plugins/maestro/src/agents/platform-engineer.md +129 -0
- package/plugins/maestro/src/agents/product-manager.md +170 -0
- package/plugins/maestro/src/agents/prompt-engineer.md +129 -0
- package/plugins/maestro/src/agents/refactor.md +138 -0
- package/plugins/maestro/src/agents/release-manager.md +132 -0
- package/plugins/maestro/src/agents/security-engineer.md +143 -0
- package/plugins/maestro/src/agents/seo-specialist.md +129 -0
- package/plugins/maestro/src/agents/site-reliability-engineer.md +131 -0
- package/plugins/maestro/src/agents/solutions-architect.md +137 -0
- package/plugins/maestro/src/agents/technical-writer.md +129 -0
- package/plugins/maestro/src/agents/tester.md +135 -0
- package/plugins/maestro/src/agents/ux-designer.md +168 -0
- package/plugins/maestro/src/agents/zos-sysprog.md +134 -0
- package/plugins/maestro/src/config/setting-resolver.js +32 -0
- package/plugins/maestro/src/core/agent-registry.js +67 -0
- package/plugins/maestro/src/core/canonical-source.js +39 -0
- package/plugins/maestro/src/core/env-file-parser.js +82 -0
- package/plugins/maestro/src/core/feature-blocks.js +34 -0
- package/plugins/maestro/src/core/logger.js +12 -0
- package/plugins/maestro/src/core/markdown-state.js +36 -0
- package/plugins/maestro/src/core/policy-rules.js +32 -0
- package/plugins/maestro/src/core/project-root-resolver.js +184 -0
- package/plugins/maestro/src/core/stdin-reader.js +77 -0
- package/plugins/maestro/src/core/version.js +50 -0
- package/plugins/maestro/src/entry-points/core-command-registry.js +37 -0
- package/plugins/maestro/src/entry-points/preamble-builders.js +54 -0
- package/plugins/maestro/src/entry-points/registry.js +199 -0
- package/plugins/maestro/src/entry-points/templates/claude-core-command.md.tmpl +38 -0
- package/plugins/maestro/src/entry-points/templates/claude-skill.md.tmpl +18 -0
- package/plugins/maestro/src/entry-points/templates/codex-core-command.md.tmpl +16 -0
- package/plugins/maestro/src/entry-points/templates/codex-skill.md.tmpl +11 -0
- package/plugins/maestro/src/entry-points/templates/gemini-command.toml.tmpl +17 -0
- package/plugins/maestro/src/entry-points/templates/gemini-core-command.toml.tmpl +30 -0
- package/plugins/maestro/src/generated/agent-registry.json +630 -0
- package/plugins/maestro/src/generated/hook-registry.json +18 -0
- package/plugins/maestro/src/generated/resource-registry.json +16 -0
- package/plugins/maestro/src/hooks/logic/after-agent-logic.js +54 -0
- package/plugins/maestro/src/hooks/logic/before-agent-logic.js +57 -0
- package/plugins/maestro/src/hooks/logic/hook-state.js +127 -0
- package/plugins/maestro/src/hooks/logic/session-end-logic.js +17 -0
- package/plugins/maestro/src/hooks/logic/session-start-logic.js +25 -0
- package/plugins/maestro/src/lib/discovery/index.js +172 -0
- package/plugins/maestro/src/lib/errors/index.js +104 -0
- package/plugins/maestro/src/lib/framework-detection.js +50 -0
- package/plugins/maestro/src/lib/frontmatter/index.js +262 -0
- package/plugins/maestro/src/lib/io/index.js +96 -0
- package/plugins/maestro/src/lib/naming/index.js +94 -0
- package/plugins/maestro/src/lib/validation/index.js +124 -0
- package/plugins/maestro/src/lib/yaml-emit.js +38 -0
- package/plugins/maestro/src/mcp/content/provider.js +68 -0
- package/plugins/maestro/src/mcp/content/runtime-content.js +188 -0
- package/plugins/maestro/src/mcp/contracts/cache-path-rejector.js +39 -0
- package/plugins/maestro/src/mcp/contracts/downstream-context.js +106 -0
- package/plugins/maestro/src/mcp/contracts/plan-schema.js +148 -0
- package/plugins/maestro/src/mcp/contracts/workspace-marker.js +61 -0
- package/plugins/maestro/src/mcp/core/create-server.js +76 -0
- package/plugins/maestro/src/mcp/core/line-reader.js +35 -0
- package/plugins/maestro/src/mcp/core/project-root-cache.js +120 -0
- package/plugins/maestro/src/mcp/core/protocol-dispatcher.js +274 -0
- package/plugins/maestro/src/mcp/core/recovery-hints.js +43 -0
- package/plugins/maestro/src/mcp/core/tool-outcome.js +77 -0
- package/plugins/maestro/src/mcp/core/tool-registry.js +82 -0
- package/plugins/maestro/src/mcp/handlers/assess-task-complexity.js +108 -0
- package/plugins/maestro/src/mcp/handlers/blocker-parser.js +34 -0
- package/plugins/maestro/src/mcp/handlers/design-gate.js +393 -0
- package/plugins/maestro/src/mcp/handlers/get-agent.js +54 -0
- package/plugins/maestro/src/mcp/handlers/get-runtime-context.js +49 -0
- package/plugins/maestro/src/mcp/handlers/get-skill-content.js +51 -0
- package/plugins/maestro/src/mcp/handlers/initialize-workspace.js +45 -0
- package/plugins/maestro/src/mcp/handlers/reconciliation.js +224 -0
- package/plugins/maestro/src/mcp/handlers/resolve-settings.js +39 -0
- package/plugins/maestro/src/mcp/handlers/session-state-core.js +108 -0
- package/plugins/maestro/src/mcp/handlers/session-state-tools.js +562 -0
- package/plugins/maestro/src/mcp/handlers/validate-plan.js +76 -0
- package/plugins/maestro/src/mcp/maestro-server.js +122 -0
- package/plugins/maestro/src/mcp/runtime/runtime-config-map.js +70 -0
- package/plugins/maestro/src/mcp/tool-packs/content/index.js +80 -0
- package/plugins/maestro/src/mcp/tool-packs/contracts.js +30 -0
- package/plugins/maestro/src/mcp/tool-packs/index.js +15 -0
- package/plugins/maestro/src/mcp/tool-packs/session/index.js +243 -0
- package/plugins/maestro/src/mcp/tool-packs/workspace/index.js +98 -0
- package/plugins/maestro/src/mcp/utils/extension-root.js +31 -0
- package/plugins/maestro/src/mcp/validation/agent-checker.js +81 -0
- package/plugins/maestro/src/mcp/validation/dag-checker.js +214 -0
- package/plugins/maestro/src/mcp/validation/file-overlap-checker.js +63 -0
- package/plugins/maestro/src/mcp/validation/schema-checker.js +108 -0
- package/plugins/maestro/src/platforms/codex/runtime-config.js +58 -0
- package/plugins/maestro/src/platforms/shared/adapters/conventions.js +29 -0
- package/plugins/maestro/src/platforms/shared/adapters/exit-codes.js +6 -0
- package/plugins/maestro/src/platforms/shared/adapters/factory.js +40 -0
- package/plugins/maestro/src/platforms/shared/agent-names.js +10 -0
- package/plugins/maestro/src/platforms/shared/hook-runner.js +52 -0
- package/plugins/maestro/src/references/architecture.md +139 -0
- package/plugins/maestro/src/references/orchestration-steps.md +193 -0
- package/plugins/maestro/src/skills/shared/code-review/SKILL.md +145 -0
- package/plugins/maestro/src/skills/shared/delegation/SKILL.md +370 -0
- package/plugins/maestro/src/skills/shared/delegation/protocols/agent-base-protocol.md +145 -0
- package/plugins/maestro/src/skills/shared/delegation/protocols/filesystem-safety-protocol.md +31 -0
- package/plugins/maestro/src/skills/shared/design-dialogue/SKILL.md +284 -0
- package/plugins/maestro/src/skills/shared/execution/SKILL.md +258 -0
- package/plugins/maestro/src/skills/shared/implementation-planning/SKILL.md +303 -0
- package/plugins/maestro/src/skills/shared/session-management/SKILL.md +314 -0
- package/plugins/maestro/src/skills/shared/validation/SKILL.md +204 -0
- package/plugins/maestro/src/state/session-state.js +113 -0
- package/plugins/maestro/src/templates/design-document.md +95 -0
- package/plugins/maestro/src/templates/implementation-plan.md +86 -0
- package/plugins/maestro/src/templates/session-state.md +68 -0
- package/plugins/maestro/src/version.json +3 -0
- package/policies/maestro.toml +44 -0
- package/qwen/agents/accessibility_specialist.md +18 -0
- package/qwen/agents/analytics_engineer.md +20 -0
- package/qwen/agents/api_designer.md +17 -0
- package/qwen/agents/architect.md +17 -0
- package/qwen/agents/cloud_architect.md +17 -0
- package/qwen/agents/cobol_engineer.md +20 -0
- package/qwen/agents/code_reviewer.md +15 -0
- package/qwen/agents/coder.md +20 -0
- package/qwen/agents/compliance_reviewer.md +17 -0
- package/qwen/agents/content_strategist.md +17 -0
- package/qwen/agents/copywriter.md +17 -0
- package/qwen/agents/data_engineer.md +20 -0
- package/qwen/agents/database_administrator.md +19 -0
- package/qwen/agents/db2_dba.md +19 -0
- package/qwen/agents/debugger.md +17 -0
- package/qwen/agents/design_system_engineer.md +20 -0
- package/qwen/agents/devops_engineer.md +21 -0
- package/qwen/agents/hlasm_assembler_specialist.md +20 -0
- package/qwen/agents/i18n_specialist.md +19 -0
- package/qwen/agents/ibm_i_specialist.md +20 -0
- package/qwen/agents/integration_engineer.md +21 -0
- package/qwen/agents/ml_engineer.md +21 -0
- package/qwen/agents/mlops_engineer.md +21 -0
- package/qwen/agents/mobile_engineer.md +21 -0
- package/qwen/agents/observability_engineer.md +21 -0
- package/qwen/agents/performance_engineer.md +19 -0
- package/qwen/agents/platform_engineer.md +22 -0
- package/qwen/agents/product_manager.md +18 -0
- package/qwen/agents/prompt_engineer.md +20 -0
- package/qwen/agents/refactor.md +20 -0
- package/qwen/agents/release_manager.md +20 -0
- package/qwen/agents/security_engineer.md +19 -0
- package/qwen/agents/seo_specialist.md +19 -0
- package/qwen/agents/site_reliability_engineer.md +19 -0
- package/qwen/agents/solutions_architect.md +17 -0
- package/qwen/agents/technical_writer.md +19 -0
- package/qwen/agents/tester.md +21 -0
- package/qwen/agents/ux_designer.md +18 -0
- package/qwen/agents/zos_sysprog.md +19 -0
- package/qwen/hooks.json +56 -0
- package/qwen-extension.json +55 -0
- package/scripts/check-layer-boundaries.js +74 -0
- package/scripts/generate.js +155 -0
- package/scripts/install-codex-plugin.js +167 -0
- package/scripts/install-git-hooks.js +43 -0
- package/scripts/npm-publish-idempotent.js +150 -0
- package/scripts/package-release-artifacts.js +156 -0
- package/scripts/release-artifact-manifest.js +378 -0
- package/scripts/release-version-metadata.js +129 -0
- package/scripts/update-versions.js +33 -0
- package/scripts/verify-npm-pack.js +85 -0
- package/scripts/verify-release-artifacts.js +95 -0
- package/src/agents/accessibility-specialist.md +163 -0
- package/src/agents/analytics-engineer.md +182 -0
- package/src/agents/api-designer.md +124 -0
- package/src/agents/architect.md +120 -0
- package/src/agents/cloud-architect.md +134 -0
- package/src/agents/cobol-engineer.md +127 -0
- package/src/agents/code-reviewer.md +123 -0
- package/src/agents/coder.md +132 -0
- package/src/agents/compliance-reviewer.md +219 -0
- package/src/agents/content-strategist.md +111 -0
- package/src/agents/copywriter.md +113 -0
- package/src/agents/data-engineer.md +130 -0
- package/src/agents/database-administrator.md +126 -0
- package/src/agents/db2-dba.md +124 -0
- package/src/agents/debugger.md +133 -0
- package/src/agents/design-system-engineer.md +258 -0
- package/src/agents/devops-engineer.md +138 -0
- package/src/agents/hlasm-assembler-specialist.md +134 -0
- package/src/agents/i18n-specialist.md +241 -0
- package/src/agents/ibm-i-specialist.md +132 -0
- package/src/agents/integration-engineer.md +133 -0
- package/src/agents/ml-engineer.md +115 -0
- package/src/agents/mlops-engineer.md +116 -0
- package/src/agents/mobile-engineer.md +115 -0
- package/src/agents/observability-engineer.md +133 -0
- package/src/agents/performance-engineer.md +139 -0
- package/src/agents/platform-engineer.md +129 -0
- package/src/agents/product-manager.md +170 -0
- package/src/agents/prompt-engineer.md +129 -0
- package/src/agents/refactor.md +138 -0
- package/src/agents/release-manager.md +132 -0
- package/src/agents/security-engineer.md +143 -0
- package/src/agents/seo-specialist.md +129 -0
- package/src/agents/site-reliability-engineer.md +131 -0
- package/src/agents/solutions-architect.md +137 -0
- package/src/agents/technical-writer.md +129 -0
- package/src/agents/tester.md +135 -0
- package/src/agents/ux-designer.md +168 -0
- package/src/agents/zos-sysprog.md +134 -0
- package/src/config/setting-resolver.js +32 -0
- package/src/core/agent-registry.js +67 -0
- package/src/core/canonical-source.js +39 -0
- package/src/core/env-file-parser.js +82 -0
- package/src/core/feature-blocks.js +34 -0
- package/src/core/logger.js +12 -0
- package/src/core/markdown-state.js +36 -0
- package/src/core/policy-rules.js +32 -0
- package/src/core/project-root-resolver.js +184 -0
- package/src/core/stdin-reader.js +77 -0
- package/src/core/version.js +50 -0
- package/src/entry-points/core-command-registry.js +37 -0
- package/src/entry-points/preamble-builders.js +54 -0
- package/src/entry-points/registry.js +199 -0
- package/src/entry-points/templates/claude-core-command.md.tmpl +38 -0
- package/src/entry-points/templates/claude-skill.md.tmpl +18 -0
- package/src/entry-points/templates/codex-core-command.md.tmpl +16 -0
- package/src/entry-points/templates/codex-skill.md.tmpl +11 -0
- package/src/entry-points/templates/gemini-command.toml.tmpl +17 -0
- package/src/entry-points/templates/gemini-core-command.toml.tmpl +30 -0
- package/src/generated/agent-registry.json +630 -0
- package/src/generated/hook-registry.json +18 -0
- package/src/generated/resource-registry.json +16 -0
- package/src/generator/entry-point-expander.js +182 -0
- package/src/generator/file-writer.js +167 -0
- package/src/generator/generation-session.js +62 -0
- package/src/generator/manifest-curator.js +31 -0
- package/src/generator/manifest-expander.js +256 -0
- package/src/generator/payload-builder.js +217 -0
- package/src/generator/registry-scanner.js +130 -0
- package/src/generator/stale-pruner.js +101 -0
- package/src/hooks/logic/after-agent-logic.js +54 -0
- package/src/hooks/logic/before-agent-logic.js +57 -0
- package/src/hooks/logic/hook-state.js +127 -0
- package/src/hooks/logic/session-end-logic.js +17 -0
- package/src/hooks/logic/session-start-logic.js +25 -0
- package/src/lib/discovery/index.js +172 -0
- package/src/lib/errors/index.js +104 -0
- package/src/lib/framework-detection.js +50 -0
- package/src/lib/frontmatter/index.js +262 -0
- package/src/lib/io/index.js +96 -0
- package/src/lib/naming/index.js +94 -0
- package/src/lib/validation/index.js +124 -0
- package/src/lib/yaml-emit.js +38 -0
- package/src/manifest.js +11 -0
- package/src/mcp/content/provider.js +68 -0
- package/src/mcp/content/runtime-content.js +188 -0
- package/src/mcp/contracts/cache-path-rejector.js +39 -0
- package/src/mcp/contracts/downstream-context.js +106 -0
- package/src/mcp/contracts/plan-schema.js +148 -0
- package/src/mcp/contracts/workspace-marker.js +61 -0
- package/src/mcp/core/create-server.js +76 -0
- package/src/mcp/core/line-reader.js +35 -0
- package/src/mcp/core/project-root-cache.js +120 -0
- package/src/mcp/core/protocol-dispatcher.js +274 -0
- package/src/mcp/core/recovery-hints.js +43 -0
- package/src/mcp/core/tool-outcome.js +77 -0
- package/src/mcp/core/tool-registry.js +82 -0
- package/src/mcp/handlers/assess-task-complexity.js +108 -0
- package/src/mcp/handlers/blocker-parser.js +34 -0
- package/src/mcp/handlers/design-gate.js +393 -0
- package/src/mcp/handlers/get-agent.js +54 -0
- package/src/mcp/handlers/get-runtime-context.js +49 -0
- package/src/mcp/handlers/get-skill-content.js +51 -0
- package/src/mcp/handlers/initialize-workspace.js +45 -0
- package/src/mcp/handlers/reconciliation.js +224 -0
- package/src/mcp/handlers/resolve-settings.js +39 -0
- package/src/mcp/handlers/session-state-core.js +108 -0
- package/src/mcp/handlers/session-state-tools.js +562 -0
- package/src/mcp/handlers/validate-plan.js +76 -0
- package/src/mcp/maestro-server.js +122 -0
- package/src/mcp/runtime/runtime-config-map.js +70 -0
- package/src/mcp/tool-packs/content/index.js +80 -0
- package/src/mcp/tool-packs/contracts.js +30 -0
- package/src/mcp/tool-packs/index.js +15 -0
- package/src/mcp/tool-packs/session/index.js +243 -0
- package/src/mcp/tool-packs/workspace/index.js +98 -0
- package/src/mcp/utils/extension-root.js +31 -0
- package/src/mcp/validation/agent-checker.js +81 -0
- package/src/mcp/validation/dag-checker.js +214 -0
- package/src/mcp/validation/file-overlap-checker.js +63 -0
- package/src/mcp/validation/schema-checker.js +108 -0
- package/src/platforms/claude/metadata.js +96 -0
- package/src/platforms/claude/runtime-config.js +60 -0
- package/src/platforms/codex/metadata.js +107 -0
- package/src/platforms/codex/runtime-config.js +58 -0
- package/src/platforms/gemini/metadata.js +27 -0
- package/src/platforms/gemini/runtime-config.js +62 -0
- package/src/platforms/metadata-shared.js +131 -0
- package/src/platforms/metadata.js +29 -0
- package/src/platforms/qwen/metadata.js +27 -0
- package/src/platforms/qwen/runtime-config.js +62 -0
- package/src/platforms/shared/adapters/claude-adapter.js +36 -0
- package/src/platforms/shared/adapters/conventions.js +29 -0
- package/src/platforms/shared/adapters/exit-codes.js +6 -0
- package/src/platforms/shared/adapters/factory.js +40 -0
- package/src/platforms/shared/adapters/gemini-adapter.js +34 -0
- package/src/platforms/shared/adapters/qwen-adapter.js +93 -0
- package/src/platforms/shared/agent-names.js +10 -0
- package/src/platforms/shared/hook-runner.js +52 -0
- package/src/references/architecture.md +139 -0
- package/src/references/orchestration-steps.md +193 -0
- package/src/scripts/ensure-workspace.js +14 -0
- package/src/scripts/read-active-session.js +26 -0
- package/src/scripts/read-setting.js +18 -0
- package/src/scripts/read-state.js +17 -0
- package/src/scripts/write-state.js +22 -0
- package/src/skills/shared/code-review/SKILL.md +145 -0
- package/src/skills/shared/delegation/SKILL.md +370 -0
- package/src/skills/shared/delegation/protocols/agent-base-protocol.md +145 -0
- package/src/skills/shared/delegation/protocols/filesystem-safety-protocol.md +31 -0
- package/src/skills/shared/design-dialogue/SKILL.md +284 -0
- package/src/skills/shared/execution/SKILL.md +258 -0
- package/src/skills/shared/implementation-planning/SKILL.md +303 -0
- package/src/skills/shared/session-management/SKILL.md +314 -0
- package/src/skills/shared/validation/SKILL.md +204 -0
- package/src/state/session-state.js +113 -0
- package/src/templates/design-document.md +95 -0
- package/src/templates/implementation-plan.md +86 -0
- package/src/templates/session-state.md +68 -0
- package/src/transforms/agent-stub.js +29 -0
- package/src/transforms/extract-examples.js +63 -0
- package/src/transforms/index.js +35 -0
- package/src/transforms/parse-frontmatter.js +23 -0
- package/src/transforms/rebuild-frontmatter.js +147 -0
- package/src/transforms/skill-discovery-stub.js +27 -0
- package/src/transforms/skill-metadata.js +14 -0
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const { log, fatal } = require('../core/logger');
|
|
4
|
+
const { resolveVersion } = require('../core/version');
|
|
5
|
+
const { createServer } = require('./core/create-server');
|
|
6
|
+
const { createLineDispatcher } = require('./core/line-reader');
|
|
7
|
+
const { createProjectRootCache } = require('./core/project-root-cache');
|
|
8
|
+
const {
|
|
9
|
+
DEFAULT_PROTOCOL_VERSION,
|
|
10
|
+
buildInitializeResult,
|
|
11
|
+
createToolErrorResult,
|
|
12
|
+
createToolSuccessResult,
|
|
13
|
+
createProtocolHandlers,
|
|
14
|
+
} = require('./core/protocol-dispatcher');
|
|
15
|
+
const { DEFAULT_TOOL_PACKS } = require('./tool-packs');
|
|
16
|
+
const {
|
|
17
|
+
getDefaultRuntimeConfig,
|
|
18
|
+
normalizeRuntimeConfig,
|
|
19
|
+
} = require('./runtime/runtime-config-map');
|
|
20
|
+
const { resolveCanonicalSrcFromExtensionRoot } = require('./utils/extension-root');
|
|
21
|
+
|
|
22
|
+
const SERVER_INFO = Object.freeze({
|
|
23
|
+
name: 'maestro',
|
|
24
|
+
version: resolveVersion(__dirname),
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
function createInitializeResult(protocolVersion) {
|
|
28
|
+
return buildInitializeResult(protocolVersion, SERVER_INFO);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
function runRuntimeServer(runtimeConfig, options = {}) {
|
|
32
|
+
const resolvedRuntimeConfig = normalizeRuntimeConfig(runtimeConfig);
|
|
33
|
+
const canonicalSrcRoot =
|
|
34
|
+
options.canonicalSrcRoot || resolveCanonicalSrcFromExtensionRoot();
|
|
35
|
+
const toolPacks = Array.isArray(options.toolPacks)
|
|
36
|
+
? options.toolPacks
|
|
37
|
+
: DEFAULT_TOOL_PACKS;
|
|
38
|
+
const stdin = options.stdin || process.stdin;
|
|
39
|
+
const stdout = options.stdout || process.stdout;
|
|
40
|
+
|
|
41
|
+
let requestFromClient;
|
|
42
|
+
const cache = createProjectRootCache({
|
|
43
|
+
runtimeConfig: resolvedRuntimeConfig,
|
|
44
|
+
requestClientRoots: () => requestFromClient('roots/list', {}),
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
const server = createServer({
|
|
48
|
+
runtimeConfig: resolvedRuntimeConfig,
|
|
49
|
+
services: {
|
|
50
|
+
canonicalSrcRoot,
|
|
51
|
+
workspaceSuggestion: () => cache.workspaceSuggestion(),
|
|
52
|
+
},
|
|
53
|
+
toolPacks,
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
const handlers = createProtocolHandlers(server, cache.getProjectRoot, stdout, {
|
|
57
|
+
serverInfo: SERVER_INFO,
|
|
58
|
+
callbacks: {
|
|
59
|
+
onInitialize(params) {
|
|
60
|
+
cache.setClientSupportsRoots(
|
|
61
|
+
Boolean(params && params.capabilities && params.capabilities.roots)
|
|
62
|
+
);
|
|
63
|
+
},
|
|
64
|
+
async onInitialized() {
|
|
65
|
+
await cache.refreshClientRoots();
|
|
66
|
+
},
|
|
67
|
+
onRootsListChanged() {
|
|
68
|
+
cache.invalidateClientRoots();
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
requestFromClient = handlers.requestFromClient;
|
|
74
|
+
|
|
75
|
+
server.onToolCall('initialize_workspace', (result) => {
|
|
76
|
+
if (result && result.success && result.workspace_path) {
|
|
77
|
+
cache.setExplicitWorkspacePath(result.workspace_path);
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
const lineReader = createLineDispatcher(stdin, (message) => {
|
|
82
|
+
Promise.resolve(handlers.respond(message)).catch((error) => {
|
|
83
|
+
log('error', `Failed to handle MCP message: ${error.message}`);
|
|
84
|
+
});
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
log('info', 'MCP server starting');
|
|
88
|
+
log('info', 'MCP server connected');
|
|
89
|
+
|
|
90
|
+
return {
|
|
91
|
+
close() {
|
|
92
|
+
lineReader.close();
|
|
93
|
+
handlers.drain();
|
|
94
|
+
},
|
|
95
|
+
server,
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
function main(runtimeConfig) {
|
|
100
|
+
const resolved =
|
|
101
|
+
runtimeConfig || process.env.MAESTRO_RUNTIME || getDefaultRuntimeConfig();
|
|
102
|
+
runRuntimeServer(resolved);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
if (require.main === module) {
|
|
106
|
+
try {
|
|
107
|
+
main();
|
|
108
|
+
} catch (error) {
|
|
109
|
+
fatal(error && error.message ? error.message : String(error));
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
module.exports = {
|
|
114
|
+
DEFAULT_PROTOCOL_VERSION,
|
|
115
|
+
SERVER_INFO,
|
|
116
|
+
createInitializeResult,
|
|
117
|
+
createToolErrorResult,
|
|
118
|
+
createToolSuccessResult,
|
|
119
|
+
normalizeRuntimeConfig,
|
|
120
|
+
runRuntimeServer,
|
|
121
|
+
main,
|
|
122
|
+
};
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const fs = require('node:fs');
|
|
4
|
+
const path = require('node:path');
|
|
5
|
+
|
|
6
|
+
const PLATFORMS_DIR = path.resolve(__dirname, '..', '..', 'platforms');
|
|
7
|
+
|
|
8
|
+
const RUNTIME_NAMES = fs.readdirSync(PLATFORMS_DIR, { withFileTypes: true })
|
|
9
|
+
.filter((entry) => entry.isDirectory() && entry.name !== 'shared')
|
|
10
|
+
.filter((entry) =>
|
|
11
|
+
fs.existsSync(path.join(PLATFORMS_DIR, entry.name, 'runtime-config.js'))
|
|
12
|
+
)
|
|
13
|
+
.map((entry) => entry.name)
|
|
14
|
+
.sort();
|
|
15
|
+
|
|
16
|
+
const configCache = Object.create(null);
|
|
17
|
+
|
|
18
|
+
function loadRuntimeConfig(name) {
|
|
19
|
+
if (configCache[name]) {
|
|
20
|
+
return configCache[name];
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
const configPath = path.join(PLATFORMS_DIR, name, 'runtime-config.js');
|
|
24
|
+
const config = require(configPath);
|
|
25
|
+
configCache[name] = config;
|
|
26
|
+
return config;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
function getRuntimeConfig(name) {
|
|
30
|
+
if (!RUNTIME_NAMES.includes(name)) {
|
|
31
|
+
throw new Error(`Unknown runtime config: ${name}`);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
return loadRuntimeConfig(name);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
function getDefaultRuntimeConfig() {
|
|
38
|
+
const runtime = process.env.MAESTRO_RUNTIME;
|
|
39
|
+
if (runtime && RUNTIME_NAMES.includes(runtime)) {
|
|
40
|
+
return loadRuntimeConfig(runtime);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
if (RUNTIME_NAMES.length === 0) {
|
|
44
|
+
throw new Error('No runtime configs found in platforms/');
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
return loadRuntimeConfig(RUNTIME_NAMES[0]);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
function normalizeRuntimeConfig(runtimeConfig) {
|
|
51
|
+
if (!runtimeConfig) {
|
|
52
|
+
return getDefaultRuntimeConfig();
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
if (typeof runtimeConfig === 'string') {
|
|
56
|
+
return getRuntimeConfig(runtimeConfig);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
if (typeof runtimeConfig === 'object' && runtimeConfig.name) {
|
|
60
|
+
return runtimeConfig;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
return getDefaultRuntimeConfig();
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
module.exports = {
|
|
67
|
+
getRuntimeConfig,
|
|
68
|
+
getDefaultRuntimeConfig,
|
|
69
|
+
normalizeRuntimeConfig,
|
|
70
|
+
};
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const { defineToolPack } = require('../contracts');
|
|
4
|
+
const { createHandler: createSkillContentHandler } = require('../../handlers/get-skill-content');
|
|
5
|
+
const { createHandler: createAgentHandler } = require('../../handlers/get-agent');
|
|
6
|
+
const { createHandler: createRuntimeContextHandler } = require('../../handlers/get-runtime-context');
|
|
7
|
+
const { getDefaultRuntimeConfig } = require('../../runtime/runtime-config-map');
|
|
8
|
+
|
|
9
|
+
function createToolPack(context = {}) {
|
|
10
|
+
const runtimeConfig = context.runtimeConfig || getDefaultRuntimeConfig();
|
|
11
|
+
const canonicalSrcRoot =
|
|
12
|
+
context.services &&
|
|
13
|
+
typeof context.services.canonicalSrcRoot === 'string' &&
|
|
14
|
+
context.services.canonicalSrcRoot.length > 0
|
|
15
|
+
? context.services.canonicalSrcRoot
|
|
16
|
+
: undefined;
|
|
17
|
+
|
|
18
|
+
return defineToolPack({
|
|
19
|
+
name: 'content',
|
|
20
|
+
tools: [
|
|
21
|
+
{
|
|
22
|
+
name: 'get_skill_content',
|
|
23
|
+
description:
|
|
24
|
+
'Read one or more Maestro skills, protocols, templates, or references from the runtime-configured Maestro content source and apply runtime-specific transforms before returning them.',
|
|
25
|
+
inputSchema: {
|
|
26
|
+
type: 'object',
|
|
27
|
+
properties: {
|
|
28
|
+
resources: {
|
|
29
|
+
type: 'array',
|
|
30
|
+
items: { type: 'string' },
|
|
31
|
+
description:
|
|
32
|
+
'Resource identifiers to read. Skills: "delegation", "execution", "validation", "session-management", "implementation-planning", "code-review", "design-dialogue". Protocols: "agent-base-protocol", "filesystem-safety-protocol". Templates: "design-document", "implementation-plan", "session-state". References: "architecture", "orchestration-steps".',
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
required: ['resources'],
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
name: 'get_agent',
|
|
40
|
+
description:
|
|
41
|
+
'Read one or more Maestro agent methodology definitions. Returns the methodology body, declared tool restrictions, and a runtime-specific tool_name for dispatch.',
|
|
42
|
+
inputSchema: {
|
|
43
|
+
type: 'object',
|
|
44
|
+
properties: {
|
|
45
|
+
agents: {
|
|
46
|
+
type: 'array',
|
|
47
|
+
items: { type: 'string' },
|
|
48
|
+
description:
|
|
49
|
+
'Agent identifiers (kebab-case or snake_case): "coder", "code-reviewer" / "code_reviewer", "ux-designer" / "ux_designer", etc.',
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
required: ['agents'],
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
name: 'get_runtime_context',
|
|
57
|
+
description:
|
|
58
|
+
'Returns tool mappings, agent dispatch syntax, MCP prefixes, and path variables for the current Maestro runtime. Call once at session start (step 0) and carry the returned context through the session.',
|
|
59
|
+
inputSchema: {
|
|
60
|
+
type: 'object',
|
|
61
|
+
properties: {},
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
],
|
|
65
|
+
handlers: {
|
|
66
|
+
get_skill_content: createSkillContentHandler(runtimeConfig, canonicalSrcRoot),
|
|
67
|
+
get_agent: createAgentHandler(runtimeConfig, canonicalSrcRoot),
|
|
68
|
+
get_runtime_context: createRuntimeContextHandler(
|
|
69
|
+
runtimeConfig,
|
|
70
|
+
typeof context.services?.workspaceSuggestion === 'function'
|
|
71
|
+
? context.services.workspaceSuggestion
|
|
72
|
+
: () => null
|
|
73
|
+
),
|
|
74
|
+
},
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
module.exports = {
|
|
79
|
+
createToolPack,
|
|
80
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
function createCompositionContext(options = {}) {
|
|
4
|
+
const runtimeConfig =
|
|
5
|
+
options.runtimeConfig && typeof options.runtimeConfig === 'object'
|
|
6
|
+
? options.runtimeConfig
|
|
7
|
+
: {};
|
|
8
|
+
const services =
|
|
9
|
+
options.services && typeof options.services === 'object'
|
|
10
|
+
? options.services
|
|
11
|
+
: {};
|
|
12
|
+
|
|
13
|
+
return Object.freeze({
|
|
14
|
+
runtimeConfig,
|
|
15
|
+
services,
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function defineToolPack(pack) {
|
|
20
|
+
if (!pack || typeof pack !== 'object' || Array.isArray(pack)) {
|
|
21
|
+
throw new TypeError('Tool pack must be an object.');
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
return pack;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
module.exports = {
|
|
28
|
+
createCompositionContext,
|
|
29
|
+
defineToolPack,
|
|
30
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const { createToolPack: createWorkspaceToolPack } = require('./workspace');
|
|
4
|
+
const { createToolPack: createSessionToolPack } = require('./session');
|
|
5
|
+
const { createToolPack: createContentToolPack } = require('./content');
|
|
6
|
+
|
|
7
|
+
const DEFAULT_TOOL_PACKS = Object.freeze([
|
|
8
|
+
createWorkspaceToolPack,
|
|
9
|
+
createSessionToolPack,
|
|
10
|
+
createContentToolPack,
|
|
11
|
+
]);
|
|
12
|
+
|
|
13
|
+
module.exports = {
|
|
14
|
+
DEFAULT_TOOL_PACKS,
|
|
15
|
+
};
|
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const { defineToolPack } = require('../contracts');
|
|
4
|
+
const { PHASE_ITEM_SCHEMA } = require('../../contracts/plan-schema');
|
|
5
|
+
const {
|
|
6
|
+
handleCreateSession,
|
|
7
|
+
handleGetSessionStatus,
|
|
8
|
+
handleTransitionPhase,
|
|
9
|
+
handleArchiveSession,
|
|
10
|
+
handleUpdateSession,
|
|
11
|
+
} = require('../../handlers/session-state-tools');
|
|
12
|
+
const {
|
|
13
|
+
handleEnterDesignGate,
|
|
14
|
+
handleRecordDesignApproval,
|
|
15
|
+
handleGetDesignGateStatus,
|
|
16
|
+
} = require('../../handlers/design-gate');
|
|
17
|
+
const {
|
|
18
|
+
handleScanPhaseChanges,
|
|
19
|
+
handleReconcilePhase,
|
|
20
|
+
} = require('../../handlers/reconciliation');
|
|
21
|
+
|
|
22
|
+
function createToolPack() {
|
|
23
|
+
return defineToolPack({
|
|
24
|
+
name: 'session',
|
|
25
|
+
tools: [
|
|
26
|
+
{
|
|
27
|
+
name: 'create_session',
|
|
28
|
+
description:
|
|
29
|
+
'Create a new Maestro orchestration session. Supply the implementation plan either by path (implementation_plan) or by inline content (implementation_plan_content + implementation_plan_filename); the two variants are mutually exclusive. The content variant is required when the caller cannot guarantee the plan file is visible to the MCP server under the configured workspace (e.g. Gemini Plan Mode writes to a tmp root).',
|
|
30
|
+
requiresWorkspace: true,
|
|
31
|
+
inputSchema: {
|
|
32
|
+
type: 'object',
|
|
33
|
+
properties: {
|
|
34
|
+
session_id: { type: 'string' },
|
|
35
|
+
task: { type: 'string' },
|
|
36
|
+
design_document: { type: ['string', 'null'] },
|
|
37
|
+
implementation_plan: { type: ['string', 'null'] },
|
|
38
|
+
implementation_plan_content: {
|
|
39
|
+
type: 'string',
|
|
40
|
+
description:
|
|
41
|
+
'Inline implementation-plan Markdown. Requires implementation_plan_filename; mutually exclusive with implementation_plan.',
|
|
42
|
+
},
|
|
43
|
+
implementation_plan_filename: {
|
|
44
|
+
type: 'string',
|
|
45
|
+
description:
|
|
46
|
+
'Basename-only filename (no separators, no \'..\') used when materializing implementation_plan_content into <state_dir>/plans/.',
|
|
47
|
+
},
|
|
48
|
+
phases: {
|
|
49
|
+
type: 'array',
|
|
50
|
+
minItems: 1,
|
|
51
|
+
items: PHASE_ITEM_SCHEMA,
|
|
52
|
+
},
|
|
53
|
+
task_complexity: {
|
|
54
|
+
type: 'string',
|
|
55
|
+
enum: ['simple', 'medium', 'complex'],
|
|
56
|
+
},
|
|
57
|
+
execution_mode: { type: 'string' },
|
|
58
|
+
workflow_mode: {
|
|
59
|
+
type: 'string',
|
|
60
|
+
enum: ['express', 'standard'],
|
|
61
|
+
default: 'standard',
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
required: ['session_id', 'task', 'phases'],
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
name: 'get_session_status',
|
|
69
|
+
description:
|
|
70
|
+
'Read current session status including workflow_mode. Returns { exists: false } if no active session, or { exists: true, ...status } if one exists.',
|
|
71
|
+
requiresWorkspace: true,
|
|
72
|
+
inputSchema: {
|
|
73
|
+
type: 'object',
|
|
74
|
+
properties: {
|
|
75
|
+
session_id: { type: 'string' },
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
name: 'update_session',
|
|
81
|
+
description:
|
|
82
|
+
'Update session metadata fields (execution_mode, current_batch) after session creation. Use after execution-mode gate resolves.',
|
|
83
|
+
requiresWorkspace: true,
|
|
84
|
+
inputSchema: {
|
|
85
|
+
type: 'object',
|
|
86
|
+
properties: {
|
|
87
|
+
session_id: { type: 'string' },
|
|
88
|
+
execution_mode: {
|
|
89
|
+
type: 'string',
|
|
90
|
+
enum: ['parallel', 'sequential'],
|
|
91
|
+
},
|
|
92
|
+
execution_backend: { type: 'string' },
|
|
93
|
+
current_batch: { type: ['string', 'null'] },
|
|
94
|
+
},
|
|
95
|
+
required: ['session_id'],
|
|
96
|
+
},
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
name: 'transition_phase',
|
|
100
|
+
description:
|
|
101
|
+
'Atomically mark a phase completed and start the next phase(s). Supports single or batch transitions.',
|
|
102
|
+
requiresWorkspace: true,
|
|
103
|
+
inputSchema: {
|
|
104
|
+
type: 'object',
|
|
105
|
+
properties: {
|
|
106
|
+
session_id: { type: 'string' },
|
|
107
|
+
completed_phase_id: { type: ['number', 'string'] },
|
|
108
|
+
downstream_context: { type: 'object' },
|
|
109
|
+
files_created: { type: 'array' },
|
|
110
|
+
files_modified: { type: 'array' },
|
|
111
|
+
files_deleted: { type: 'array' },
|
|
112
|
+
next_phase_id: { type: ['number', 'string', 'null'] },
|
|
113
|
+
next_phase_ids: {
|
|
114
|
+
type: 'array',
|
|
115
|
+
items: { type: ['number', 'string'] },
|
|
116
|
+
description:
|
|
117
|
+
'Start multiple phases (parallel batch). Mutually exclusive with next_phase_id.',
|
|
118
|
+
},
|
|
119
|
+
batch_id: {
|
|
120
|
+
type: ['string', 'null'],
|
|
121
|
+
description:
|
|
122
|
+
'Batch identifier for parallel dispatch. Sets current_batch in state.',
|
|
123
|
+
},
|
|
124
|
+
token_usage: { type: 'object' },
|
|
125
|
+
},
|
|
126
|
+
required: ['session_id'],
|
|
127
|
+
},
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
name: 'archive_session',
|
|
131
|
+
description:
|
|
132
|
+
'Move active session to archive. Also moves associated design document and implementation plan to plans/archive/ if they exist.',
|
|
133
|
+
requiresWorkspace: true,
|
|
134
|
+
inputSchema: {
|
|
135
|
+
type: 'object',
|
|
136
|
+
properties: {
|
|
137
|
+
session_id: { type: 'string' },
|
|
138
|
+
},
|
|
139
|
+
required: ['session_id'],
|
|
140
|
+
},
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
name: 'enter_design_gate',
|
|
144
|
+
description:
|
|
145
|
+
'Mark a session as having entered the design phase. Idempotent. Blocks create_session until record_design_approval is called.',
|
|
146
|
+
requiresWorkspace: true,
|
|
147
|
+
inputSchema: {
|
|
148
|
+
type: 'object',
|
|
149
|
+
properties: { session_id: { type: 'string' } },
|
|
150
|
+
required: ['session_id'],
|
|
151
|
+
},
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
name: 'record_design_approval',
|
|
155
|
+
description:
|
|
156
|
+
'Record user approval of the design document, clearing the design gate for session creation. Supply the document either by path (design_document_path) or by inline content (design_document_content + design_document_filename); exactly one variant is required. Use the content variant when the caller cannot guarantee the file is visible to the MCP server under the configured workspace (e.g. Gemini Plan Mode resolves relative paths against ~/.gemini/tmp/<uuid>/).',
|
|
157
|
+
requiresWorkspace: true,
|
|
158
|
+
inputSchema: {
|
|
159
|
+
type: 'object',
|
|
160
|
+
properties: {
|
|
161
|
+
session_id: { type: 'string' },
|
|
162
|
+
design_document_path: {
|
|
163
|
+
type: 'string',
|
|
164
|
+
description:
|
|
165
|
+
'Absolute or workspace-relative path to the approved design document. Mutually exclusive with design_document_content.',
|
|
166
|
+
},
|
|
167
|
+
design_document_content: {
|
|
168
|
+
type: 'string',
|
|
169
|
+
description:
|
|
170
|
+
'Inline design-document Markdown. Requires design_document_filename; mutually exclusive with design_document_path.',
|
|
171
|
+
},
|
|
172
|
+
design_document_filename: {
|
|
173
|
+
type: 'string',
|
|
174
|
+
description:
|
|
175
|
+
'Basename-only filename (no separators, no \'..\') used when materializing design_document_content into <state_dir>/plans/.',
|
|
176
|
+
},
|
|
177
|
+
},
|
|
178
|
+
required: ['session_id'],
|
|
179
|
+
},
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
name: 'get_design_gate_status',
|
|
183
|
+
description:
|
|
184
|
+
'Read the design gate status for a session. Returns entered_at, approved_at, and design_document_path (all nullable).',
|
|
185
|
+
requiresWorkspace: true,
|
|
186
|
+
inputSchema: {
|
|
187
|
+
type: 'object',
|
|
188
|
+
properties: { session_id: { type: 'string' } },
|
|
189
|
+
required: ['session_id'],
|
|
190
|
+
},
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
name: 'scan_phase_changes',
|
|
194
|
+
description:
|
|
195
|
+
'Scan the workspace for files created or modified since the phase started. Does not attribute files — returns candidates for the orchestrator to reconcile.',
|
|
196
|
+
requiresWorkspace: true,
|
|
197
|
+
inputSchema: {
|
|
198
|
+
type: 'object',
|
|
199
|
+
properties: {
|
|
200
|
+
session_id: { type: 'string' },
|
|
201
|
+
phase_id: { type: ['integer', 'string'] },
|
|
202
|
+
},
|
|
203
|
+
required: ['session_id', 'phase_id'],
|
|
204
|
+
},
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
name: 'reconcile_phase',
|
|
208
|
+
description:
|
|
209
|
+
'Record file manifests and downstream context for a phase that could not be handed off cleanly. Requires at least one of files_created/files_modified/files_deleted or a populated downstream_context. Clears requires_reconciliation on success.',
|
|
210
|
+
requiresWorkspace: true,
|
|
211
|
+
inputSchema: {
|
|
212
|
+
type: 'object',
|
|
213
|
+
properties: {
|
|
214
|
+
session_id: { type: 'string' },
|
|
215
|
+
phase_id: { type: ['integer', 'string'] },
|
|
216
|
+
files_created: { type: 'array' },
|
|
217
|
+
files_modified: { type: 'array' },
|
|
218
|
+
files_deleted: { type: 'array' },
|
|
219
|
+
downstream_context: { type: 'object' },
|
|
220
|
+
reason: { type: 'string' },
|
|
221
|
+
},
|
|
222
|
+
required: ['session_id', 'phase_id'],
|
|
223
|
+
},
|
|
224
|
+
},
|
|
225
|
+
],
|
|
226
|
+
handlers: {
|
|
227
|
+
create_session: handleCreateSession,
|
|
228
|
+
get_session_status: handleGetSessionStatus,
|
|
229
|
+
update_session: handleUpdateSession,
|
|
230
|
+
transition_phase: handleTransitionPhase,
|
|
231
|
+
archive_session: handleArchiveSession,
|
|
232
|
+
enter_design_gate: handleEnterDesignGate,
|
|
233
|
+
record_design_approval: handleRecordDesignApproval,
|
|
234
|
+
get_design_gate_status: handleGetDesignGateStatus,
|
|
235
|
+
scan_phase_changes: handleScanPhaseChanges,
|
|
236
|
+
reconcile_phase: handleReconcilePhase,
|
|
237
|
+
},
|
|
238
|
+
});
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
module.exports = {
|
|
242
|
+
createToolPack,
|
|
243
|
+
};
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const { defineToolPack } = require('../contracts');
|
|
4
|
+
const {
|
|
5
|
+
handleInitializeWorkspace,
|
|
6
|
+
} = require('../../handlers/initialize-workspace');
|
|
7
|
+
const {
|
|
8
|
+
handleAssessTaskComplexity,
|
|
9
|
+
} = require('../../handlers/assess-task-complexity');
|
|
10
|
+
const { handleValidatePlan } = require('../../handlers/validate-plan');
|
|
11
|
+
const { handleResolveSettings } = require('../../handlers/resolve-settings');
|
|
12
|
+
|
|
13
|
+
function createToolPack() {
|
|
14
|
+
return defineToolPack({
|
|
15
|
+
name: 'workspace',
|
|
16
|
+
tools: [
|
|
17
|
+
{
|
|
18
|
+
name: 'initialize_workspace',
|
|
19
|
+
description:
|
|
20
|
+
'Initialize Maestro workspace directories (state, plans, archives). Requires explicit workspace_path — no cwd or env fallback. Writes a workspace marker for session persistence.',
|
|
21
|
+
inputSchema: {
|
|
22
|
+
type: 'object',
|
|
23
|
+
properties: {
|
|
24
|
+
workspace_path: {
|
|
25
|
+
type: 'string',
|
|
26
|
+
description:
|
|
27
|
+
'Absolute path to the user workspace. Required. Must not be inside an extension cache directory.',
|
|
28
|
+
},
|
|
29
|
+
state_dir: {
|
|
30
|
+
type: 'string',
|
|
31
|
+
description:
|
|
32
|
+
'State directory relative to workspace_path. Defaults to docs/maestro.',
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
required: ['workspace_path'],
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
name: 'assess_task_complexity',
|
|
40
|
+
description:
|
|
41
|
+
'Analyze repo structure and return factual signals for complexity classification. Does NOT classify — returns signals for the model to interpret.',
|
|
42
|
+
requiresWorkspace: true,
|
|
43
|
+
inputSchema: {
|
|
44
|
+
type: 'object',
|
|
45
|
+
properties: {
|
|
46
|
+
task_description: {
|
|
47
|
+
type: 'string',
|
|
48
|
+
description:
|
|
49
|
+
'The task description (reserved for future keyword analysis).',
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
name: 'validate_plan',
|
|
56
|
+
description:
|
|
57
|
+
'Validate an implementation plan against complexity constraints, file ownership, dependency cycles, and agent registry.',
|
|
58
|
+
inputSchema: {
|
|
59
|
+
type: 'object',
|
|
60
|
+
properties: {
|
|
61
|
+
plan: { type: 'object' },
|
|
62
|
+
task_complexity: {
|
|
63
|
+
type: 'string',
|
|
64
|
+
enum: ['simple', 'medium', 'complex'],
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
required: ['plan', 'task_complexity'],
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
name: 'resolve_settings',
|
|
72
|
+
description:
|
|
73
|
+
'Resolve Maestro settings using script-accurate precedence (env var > workspace .env > extension .env). Returns resolved values for requested or all known settings.',
|
|
74
|
+
inputSchema: {
|
|
75
|
+
type: 'object',
|
|
76
|
+
properties: {
|
|
77
|
+
settings: {
|
|
78
|
+
type: 'array',
|
|
79
|
+
items: { type: 'string' },
|
|
80
|
+
description:
|
|
81
|
+
'Setting names to resolve (e.g., ["MAESTRO_DISABLED_AGENTS"]). If empty or omitted, resolves all known settings.',
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
],
|
|
87
|
+
handlers: {
|
|
88
|
+
initialize_workspace: handleInitializeWorkspace,
|
|
89
|
+
assess_task_complexity: handleAssessTaskComplexity,
|
|
90
|
+
validate_plan: handleValidatePlan,
|
|
91
|
+
resolve_settings: handleResolveSettings,
|
|
92
|
+
},
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
module.exports = {
|
|
97
|
+
createToolPack,
|
|
98
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const path = require('path');
|
|
4
|
+
const { resolveCanonicalProjectRoot, resolveCanonicalSrcRoot } = require('../../core/canonical-source');
|
|
5
|
+
|
|
6
|
+
function resolveExtensionRoot() {
|
|
7
|
+
if (process.env.MAESTRO_EXTENSION_PATH) {
|
|
8
|
+
return process.env.MAESTRO_EXTENSION_PATH;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const serverFile = process.argv[1];
|
|
12
|
+
if (serverFile) {
|
|
13
|
+
return path.resolve(path.dirname(serverFile), '..');
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
return process.cwd();
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function resolveRepoRoot() {
|
|
20
|
+
return resolveCanonicalProjectRoot(resolveExtensionRoot());
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
function resolveCanonicalSrcFromExtensionRoot() {
|
|
24
|
+
return resolveCanonicalSrcRoot(resolveExtensionRoot());
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
module.exports = {
|
|
28
|
+
resolveCanonicalSrcFromExtensionRoot,
|
|
29
|
+
resolveExtensionRoot,
|
|
30
|
+
resolveRepoRoot,
|
|
31
|
+
};
|