@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,19 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: technical_writer
|
|
3
|
+
kind: local
|
|
4
|
+
description: "Technical writing specialist for documentation, API references, and architectural diagrams. Use when the task requires writing README files, API documentation, architecture decision records, or inline documentation. For example: writing an OpenAPI description, creating a getting-started guide, or documenting module interfaces."
|
|
5
|
+
max_turns: 15
|
|
6
|
+
tools:
|
|
7
|
+
- read_file
|
|
8
|
+
- list_directory
|
|
9
|
+
- glob
|
|
10
|
+
- grep_search
|
|
11
|
+
- write_file
|
|
12
|
+
- edit
|
|
13
|
+
- read_many_files
|
|
14
|
+
- web_search
|
|
15
|
+
- ask_user_question
|
|
16
|
+
- todo_write
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
Agent methodology loaded via MCP tool `get_agent`. Call `get_agent(agents: ["technical-writer"])` to read the full methodology at delegation time.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: tester
|
|
3
|
+
kind: local
|
|
4
|
+
description: "Testing specialist for unit tests, integration tests, test coverage analysis, and TDD workflows. Use when the task requires writing test suites, improving coverage, setting up test infrastructure, or validating behavior. For example: writing unit tests for a service class, setting up integration test fixtures, or creating end-to-end test scenarios."
|
|
5
|
+
max_turns: 25
|
|
6
|
+
tools:
|
|
7
|
+
- read_file
|
|
8
|
+
- list_directory
|
|
9
|
+
- glob
|
|
10
|
+
- grep_search
|
|
11
|
+
- write_file
|
|
12
|
+
- edit
|
|
13
|
+
- run_shell_command
|
|
14
|
+
- todo_write
|
|
15
|
+
- skill
|
|
16
|
+
- read_many_files
|
|
17
|
+
- ask_user_question
|
|
18
|
+
- web_search
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
Agent methodology loaded via MCP tool `get_agent`. Call `get_agent(agents: ["tester"])` to read the full methodology at delegation time.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ux_designer
|
|
3
|
+
kind: local
|
|
4
|
+
description: "UX designer for user flow design, interaction patterns, wireframe descriptions, and usability evaluation. Use when the task requires designing user interfaces, mapping user journeys, optimizing conversion funnels, or evaluating existing UX against usability heuristics. For example: designing an onboarding flow, wireframing a dashboard layout, or auditing checkout abandonment."
|
|
5
|
+
max_turns: 20
|
|
6
|
+
tools:
|
|
7
|
+
- read_file
|
|
8
|
+
- list_directory
|
|
9
|
+
- glob
|
|
10
|
+
- grep_search
|
|
11
|
+
- write_file
|
|
12
|
+
- edit
|
|
13
|
+
- web_search
|
|
14
|
+
- read_many_files
|
|
15
|
+
- ask_user_question
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
Agent methodology loaded via MCP tool `get_agent`. Call `get_agent(agents: ["ux-designer"])` to read the full methodology at delegation time.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: zos_sysprog
|
|
3
|
+
kind: local
|
|
4
|
+
description: "z/OS systems programming specialist for JCL, USS, SMP/E, RACF, subsystem diagnostics, and batch scheduling. Use when the task requires JCL authoring or review, z/OS Unix System Services setup, SMP/E maintenance, RACF profile review, or diagnosing SYSLOG/OPERLOG issues. For example: writing a JCL restart procedure, planning an SMP/E PTF install, or reviewing RACF dataset profiles for least privilege."
|
|
5
|
+
max_turns: 20
|
|
6
|
+
tools:
|
|
7
|
+
- read_file
|
|
8
|
+
- list_directory
|
|
9
|
+
- glob
|
|
10
|
+
- grep_search
|
|
11
|
+
- run_shell_command
|
|
12
|
+
- web_search
|
|
13
|
+
- read_many_files
|
|
14
|
+
- todo_write
|
|
15
|
+
- ask_user_question
|
|
16
|
+
- web_fetch
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
Agent methodology loaded via MCP tool `get_agent`. Call `get_agent(agents: ["zos-sysprog"])` to read the full methodology at delegation time.
|
package/qwen/hooks.json
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
{
|
|
2
|
+
"hooks": {
|
|
3
|
+
"SessionStart": [
|
|
4
|
+
{
|
|
5
|
+
"hooks": [
|
|
6
|
+
{
|
|
7
|
+
"type": "command",
|
|
8
|
+
"command": "node ${extensionPath}/hooks/hook-runner.js qwen session-start",
|
|
9
|
+
"name": "maestro-session-start-qwen",
|
|
10
|
+
"description": "Initialize hook state and prune stale sessions (Qwen Code)",
|
|
11
|
+
"timeout": 10000
|
|
12
|
+
}
|
|
13
|
+
]
|
|
14
|
+
}
|
|
15
|
+
],
|
|
16
|
+
"SubagentStart": [
|
|
17
|
+
{
|
|
18
|
+
"hooks": [
|
|
19
|
+
{
|
|
20
|
+
"type": "command",
|
|
21
|
+
"command": "node ${extensionPath}/hooks/hook-runner.js qwen before-agent",
|
|
22
|
+
"name": "maestro-before-agent-qwen",
|
|
23
|
+
"description": "Inject session context into agent turns (Qwen Code)",
|
|
24
|
+
"timeout": 10000
|
|
25
|
+
}
|
|
26
|
+
]
|
|
27
|
+
}
|
|
28
|
+
],
|
|
29
|
+
"SubagentStop": [
|
|
30
|
+
{
|
|
31
|
+
"hooks": [
|
|
32
|
+
{
|
|
33
|
+
"type": "command",
|
|
34
|
+
"command": "node ${extensionPath}/hooks/hook-runner.js qwen after-agent",
|
|
35
|
+
"name": "maestro-after-agent-qwen",
|
|
36
|
+
"description": "Validate handoff report format with retry on malformed output (Qwen Code)",
|
|
37
|
+
"timeout": 10000
|
|
38
|
+
}
|
|
39
|
+
]
|
|
40
|
+
}
|
|
41
|
+
],
|
|
42
|
+
"SessionEnd": [
|
|
43
|
+
{
|
|
44
|
+
"hooks": [
|
|
45
|
+
{
|
|
46
|
+
"type": "command",
|
|
47
|
+
"command": "node ${extensionPath}/hooks/hook-runner.js qwen session-end",
|
|
48
|
+
"name": "maestro-session-end-qwen",
|
|
49
|
+
"description": "Clean up hook state for ended session (Qwen Code)",
|
|
50
|
+
"timeout": 10000
|
|
51
|
+
}
|
|
52
|
+
]
|
|
53
|
+
}
|
|
54
|
+
]
|
|
55
|
+
}
|
|
56
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "maestro",
|
|
3
|
+
"version": "1.6.4-rc.1",
|
|
4
|
+
"description": "Multi-agent development orchestration platform — 39 specialists, 4-phase orchestration, native parallel subagents, persistent sessions, and standalone review/debug/security/perf/seo/a11y/compliance commands",
|
|
5
|
+
"contextFileName": "QWEN.md",
|
|
6
|
+
"settings": [
|
|
7
|
+
{
|
|
8
|
+
"name": "Disabled Agents",
|
|
9
|
+
"description": "Comma-separated list of agent names to exclude from implementation planning.",
|
|
10
|
+
"envVar": "MAESTRO_DISABLED_AGENTS"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"name": "Max Retries",
|
|
14
|
+
"description": "Maximum retry attempts per phase before escalating to user.",
|
|
15
|
+
"envVar": "MAESTRO_MAX_RETRIES"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"name": "Auto Archive",
|
|
19
|
+
"description": "Automatically archive session state on successful completion (true/false).",
|
|
20
|
+
"envVar": "MAESTRO_AUTO_ARCHIVE"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"name": "Validation",
|
|
24
|
+
"description": "Post-phase validation strictness level (strict/normal/lenient).",
|
|
25
|
+
"envVar": "MAESTRO_VALIDATION_STRICTNESS"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"name": "State Directory",
|
|
29
|
+
"description": "Base directory for session state and plans (default: docs/maestro).",
|
|
30
|
+
"envVar": "MAESTRO_STATE_DIR"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"name": "Max Concurrent",
|
|
34
|
+
"description": "Maximum subagents emitted in one native parallel batch turn (0 = dispatch the entire ready batch).",
|
|
35
|
+
"envVar": "MAESTRO_MAX_CONCURRENT"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"name": "Execution Mode",
|
|
39
|
+
"description": "Phase 3 execution mode: 'parallel' (native concurrent subagents), 'sequential' (one at a time), or 'ask' (prompt each time). Default: ask.",
|
|
40
|
+
"envVar": "MAESTRO_EXECUTION_MODE"
|
|
41
|
+
}
|
|
42
|
+
],
|
|
43
|
+
"mcpServers": {
|
|
44
|
+
"maestro": {
|
|
45
|
+
"command": "node",
|
|
46
|
+
"args": [
|
|
47
|
+
"${extensionPath}/mcp/maestro-server.js"
|
|
48
|
+
],
|
|
49
|
+
"cwd": "${extensionPath}",
|
|
50
|
+
"env": {
|
|
51
|
+
"MAESTRO_WORKSPACE_PATH": "${workspacePath}"
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
const fs = require('node:fs');
|
|
5
|
+
const path = require('node:path');
|
|
6
|
+
|
|
7
|
+
const LIB_DIR = path.resolve(__dirname, '..', 'src', 'lib');
|
|
8
|
+
|
|
9
|
+
function collectJsFiles(dir) {
|
|
10
|
+
const results = [];
|
|
11
|
+
const entries = fs.readdirSync(dir, { withFileTypes: true });
|
|
12
|
+
for (const entry of entries) {
|
|
13
|
+
const fullPath = path.join(dir, entry.name);
|
|
14
|
+
if (entry.isDirectory()) {
|
|
15
|
+
results.push(...collectJsFiles(fullPath));
|
|
16
|
+
} else if (entry.isFile() && entry.name.endsWith('.js')) {
|
|
17
|
+
results.push(fullPath);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
return results;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
function scanFile(filepath) {
|
|
24
|
+
const content = fs.readFileSync(filepath, 'utf8');
|
|
25
|
+
const requirePattern = /require\(['"]([^'"]+)['"]\)/g;
|
|
26
|
+
const violations = [];
|
|
27
|
+
let match;
|
|
28
|
+
|
|
29
|
+
while ((match = requirePattern.exec(content)) !== null) {
|
|
30
|
+
const modPath = match[1];
|
|
31
|
+
|
|
32
|
+
if (modPath.startsWith('node:')) {
|
|
33
|
+
continue;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
if (modPath.startsWith('.')) {
|
|
37
|
+
const resolved = path.resolve(path.dirname(filepath), modPath);
|
|
38
|
+
if (!resolved.startsWith(LIB_DIR)) {
|
|
39
|
+
violations.push({
|
|
40
|
+
file: path.relative(process.cwd(), filepath),
|
|
41
|
+
import: modPath,
|
|
42
|
+
resolved: path.relative(process.cwd(), resolved),
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
continue;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
violations.push({
|
|
49
|
+
file: path.relative(process.cwd(), filepath),
|
|
50
|
+
import: modPath,
|
|
51
|
+
reason: 'non-relative, non-node import',
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
return violations;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
const files = collectJsFiles(LIB_DIR);
|
|
59
|
+
const allViolations = [];
|
|
60
|
+
|
|
61
|
+
for (const file of files) {
|
|
62
|
+
allViolations.push(...scanFile(file));
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
if (allViolations.length > 0) {
|
|
66
|
+
console.error('Layer boundary violations in src/lib/:');
|
|
67
|
+
for (const v of allViolations) {
|
|
68
|
+
const detail = v.reason || `resolves to ${v.resolved}`;
|
|
69
|
+
console.error(` ${v.file}: require('${v.import}') — ${detail}`);
|
|
70
|
+
}
|
|
71
|
+
process.exit(1);
|
|
72
|
+
} else {
|
|
73
|
+
console.log(`Layer boundaries clean: ${files.length} files scanned, 0 violations.`);
|
|
74
|
+
}
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
const path = require('node:path');
|
|
5
|
+
const fs = require('node:fs');
|
|
6
|
+
const { resolve: resolveTransform } = require('../src/transforms');
|
|
7
|
+
const { createGenerationSession } = require('../src/generator/generation-session');
|
|
8
|
+
const { expandManifest, assertNoMirroredSharedOutputs, buildRuntimeOutputPath } = require('../src/generator/manifest-expander');
|
|
9
|
+
const { pruneStaleFiles } = require('../src/generator/stale-pruner');
|
|
10
|
+
const { buildDetachedPayload, stampVersion, buildPayloadAllowlist, shouldIncludeInPayload, shouldDescendInto } = require('../src/generator/payload-builder');
|
|
11
|
+
const { collectRegistryOutputs } = require('../src/generator/registry-scanner');
|
|
12
|
+
const { expandEntryPoints, expandCoreCommands } = require('../src/generator/entry-point-expander');
|
|
13
|
+
const { collectManifestPaths } = require('../src/generator/manifest-curator');
|
|
14
|
+
const { buildPlatformMetadataOutputs } = require('../src/platforms/metadata');
|
|
15
|
+
|
|
16
|
+
const ROOT = path.resolve(__dirname, '..');
|
|
17
|
+
const SRC = path.join(ROOT, 'src');
|
|
18
|
+
const OWNED_DIRS = ['agents', 'claude/agents', 'claude/skills', 'plugins/maestro/skills', 'commands'];
|
|
19
|
+
const ENTRY_POINT_EXPANDERS = [expandEntryPoints, expandCoreCommands];
|
|
20
|
+
|
|
21
|
+
const args = process.argv.slice(2);
|
|
22
|
+
const dryRun = args.includes('--dry-run');
|
|
23
|
+
const diffMode = args.includes('--diff');
|
|
24
|
+
const cleanMode = args.includes('--clean');
|
|
25
|
+
|
|
26
|
+
function loadRuntimes() {
|
|
27
|
+
const runtimes = {};
|
|
28
|
+
const configs = fs.readdirSync(path.join(SRC, 'platforms'), { withFileTypes: true })
|
|
29
|
+
.filter((e) => e.isDirectory() && e.name !== 'shared')
|
|
30
|
+
.map((e) => path.join(e.name, 'runtime-config.js'))
|
|
31
|
+
.filter((rel) => fs.existsSync(path.join(SRC, 'platforms', rel)));
|
|
32
|
+
for (const file of configs) {
|
|
33
|
+
const config = require(path.join(SRC, 'platforms', file));
|
|
34
|
+
runtimes[config.name] = config;
|
|
35
|
+
}
|
|
36
|
+
return runtimes;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
function processManifestEntry(entry, runtimes, session) {
|
|
40
|
+
const srcPath = path.join(SRC, entry.src);
|
|
41
|
+
if (!fs.existsSync(srcPath)) {
|
|
42
|
+
session.reportError(`Source not found: ${entry.src}`);
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
const sourceContent = fs.readFileSync(srcPath, 'utf8');
|
|
47
|
+
for (const [runtimeName, outputPath] of Object.entries(entry.outputs)) {
|
|
48
|
+
const runtime = runtimes[runtimeName];
|
|
49
|
+
if (!runtime) {
|
|
50
|
+
session.reportError(`Unknown runtime "${runtimeName}" for ${entry.src}`);
|
|
51
|
+
continue;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
try {
|
|
55
|
+
let content = sourceContent;
|
|
56
|
+
const state = {};
|
|
57
|
+
for (const transformName of entry.transforms) {
|
|
58
|
+
const { fn, param } = resolveTransform(transformName);
|
|
59
|
+
content = fn(content, runtime, { src: entry.src, param, outputPath, state });
|
|
60
|
+
}
|
|
61
|
+
session.write(outputPath, content);
|
|
62
|
+
} catch (err) {
|
|
63
|
+
session.reportError(`processing ${entry.src} -> ${outputPath}`, err);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
function processEntryPoints(runtimes, session) {
|
|
69
|
+
for (const fn of ENTRY_POINT_EXPANDERS) {
|
|
70
|
+
for (const runtimeName of Object.keys(runtimes)) {
|
|
71
|
+
for (const { outputPath, content } of fn(runtimeName, SRC)) {
|
|
72
|
+
session.write(outputPath, content);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
function readPackageMetadata() {
|
|
79
|
+
return JSON.parse(fs.readFileSync(path.join(ROOT, 'package.json'), 'utf8'));
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
async function main() {
|
|
83
|
+
const runtimes = loadRuntimes();
|
|
84
|
+
const packageMetadata = readPackageMetadata();
|
|
85
|
+
const manifestRules = require(path.join(SRC, 'manifest'));
|
|
86
|
+
const manifest = expandManifest(manifestRules, runtimes, SRC);
|
|
87
|
+
assertNoMirroredSharedOutputs(manifest);
|
|
88
|
+
|
|
89
|
+
const session = createGenerationSession({ rootDir: ROOT, dryRun, diffMode });
|
|
90
|
+
session.writeAll(collectRegistryOutputs(SRC, ROOT));
|
|
91
|
+
|
|
92
|
+
if (cleanMode) {
|
|
93
|
+
session.clean(manifest.flatMap((entry) => Object.values(entry.outputs)));
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
if (cleanMode && !session.isReadOnlyMode()) {
|
|
97
|
+
console.log('Cleaned all generator-owned files.');
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
for (const entry of manifest) {
|
|
101
|
+
processManifestEntry(entry, runtimes, session);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
processEntryPoints(runtimes, session);
|
|
105
|
+
session.writeAll(buildPlatformMetadataOutputs(runtimes, packageMetadata));
|
|
106
|
+
|
|
107
|
+
const stats = session.getStats();
|
|
108
|
+
|
|
109
|
+
if (dryRun) {
|
|
110
|
+
console.log('\n(dry-run — no files written)');
|
|
111
|
+
} else if (!diffMode) {
|
|
112
|
+
console.log(`\nGeneration complete: ${stats.written} written, ${stats.unchanged} unchanged, ${stats.errors} errors`);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
if (!session.isReadOnlyMode()) {
|
|
116
|
+
const manifestPaths = collectManifestPaths(manifest, runtimes, SRC, ENTRY_POINT_EXPANDERS);
|
|
117
|
+
const { pruned } = pruneStaleFiles({ rootDir: ROOT, manifestPaths, ownedDirs: OWNED_DIRS });
|
|
118
|
+
if (pruned.length > 0) {
|
|
119
|
+
console.log('\nPruning stale files (not in manifest):');
|
|
120
|
+
for (const f of pruned) console.log(` PRUNED: ${f}`);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
const claudePayloadDir = path.join(ROOT, 'claude', 'src');
|
|
124
|
+
const codexPayloadDir = path.join(ROOT, 'plugins', 'maestro', 'src');
|
|
125
|
+
const claudeStats = buildDetachedPayload(SRC, claudePayloadDir, 'claude');
|
|
126
|
+
const codexStats = buildDetachedPayload(SRC, codexPayloadDir, 'codex');
|
|
127
|
+
stampVersion([claudePayloadDir, codexPayloadDir], packageMetadata.version);
|
|
128
|
+
console.log(
|
|
129
|
+
`\nDetached payloads: claude/src (${claudeStats.copied} updated, ${claudeStats.removed} removed), ` +
|
|
130
|
+
`plugins/maestro/src (${codexStats.copied} updated, ${codexStats.removed} removed)`
|
|
131
|
+
);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
if (stats.errors > 0) process.exit(1);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
if (require.main === module) {
|
|
138
|
+
main().catch((err) => {
|
|
139
|
+
console.error('Generator failed:', err.message);
|
|
140
|
+
process.exit(1);
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
module.exports = {
|
|
145
|
+
assertNoMirroredSharedOutputs,
|
|
146
|
+
buildPayloadAllowlist,
|
|
147
|
+
buildRuntimeOutputPath,
|
|
148
|
+
buildDetachedPayload,
|
|
149
|
+
expandCoreCommands,
|
|
150
|
+
buildPlatformMetadataOutputs,
|
|
151
|
+
expandManifest,
|
|
152
|
+
expandEntryPoints,
|
|
153
|
+
shouldDescendInto,
|
|
154
|
+
shouldIncludeInPayload,
|
|
155
|
+
};
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
const fs = require('node:fs');
|
|
5
|
+
const os = require('node:os');
|
|
6
|
+
const path = require('node:path');
|
|
7
|
+
|
|
8
|
+
const ROOT = path.resolve(__dirname, '..');
|
|
9
|
+
const SOURCE_PLUGIN_DIR = path.join(ROOT, 'plugins', 'maestro');
|
|
10
|
+
const TARGET_PLUGIN_DIR = path.join(os.homedir(), '.codex', 'plugins', 'maestro');
|
|
11
|
+
const MARKETPLACE_FILE = path.join(os.homedir(), '.agents', 'plugins', 'marketplace.json');
|
|
12
|
+
|
|
13
|
+
const DEFAULT_MARKETPLACE = {
|
|
14
|
+
name: 'maestro-orchestrator',
|
|
15
|
+
interface: {
|
|
16
|
+
displayName: 'Maestro Orchestrator',
|
|
17
|
+
},
|
|
18
|
+
plugins: [],
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
const PLUGIN_ENTRY = {
|
|
22
|
+
name: 'maestro',
|
|
23
|
+
source: {
|
|
24
|
+
source: 'local',
|
|
25
|
+
path: './.codex/plugins/maestro',
|
|
26
|
+
},
|
|
27
|
+
policy: {
|
|
28
|
+
installation: 'AVAILABLE',
|
|
29
|
+
authentication: 'ON_INSTALL',
|
|
30
|
+
},
|
|
31
|
+
category: 'Coding',
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
function printHelp() {
|
|
35
|
+
console.log(`Install Maestro into Codex's personal plugin marketplace.
|
|
36
|
+
|
|
37
|
+
Usage:
|
|
38
|
+
node scripts/install-codex-plugin.js [--dry-run]
|
|
39
|
+
|
|
40
|
+
Options:
|
|
41
|
+
--dry-run Show planned changes without writing files
|
|
42
|
+
--help Show this help text
|
|
43
|
+
`);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
function parseArgs(argv) {
|
|
47
|
+
const args = new Set(argv);
|
|
48
|
+
|
|
49
|
+
if (args.has('--help') || args.has('-h')) {
|
|
50
|
+
printHelp();
|
|
51
|
+
process.exit(0);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
for (const arg of args) {
|
|
55
|
+
if (!['--dry-run', '--help', '-h'].includes(arg)) {
|
|
56
|
+
throw new Error(`Unknown argument: ${arg}`);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
return {
|
|
61
|
+
dryRun: args.has('--dry-run'),
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
function assertSourcePlugin() {
|
|
66
|
+
const manifestPath = path.join(SOURCE_PLUGIN_DIR, '.codex-plugin', 'plugin.json');
|
|
67
|
+
if (!fs.existsSync(manifestPath)) {
|
|
68
|
+
throw new Error(`Source plugin manifest not found: ${manifestPath}`);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
function readMarketplace() {
|
|
73
|
+
if (!fs.existsSync(MARKETPLACE_FILE)) {
|
|
74
|
+
return {
|
|
75
|
+
marketplace: JSON.parse(JSON.stringify(DEFAULT_MARKETPLACE)),
|
|
76
|
+
existed: false,
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
const raw = fs.readFileSync(MARKETPLACE_FILE, 'utf8');
|
|
81
|
+
let marketplace;
|
|
82
|
+
try {
|
|
83
|
+
marketplace = JSON.parse(raw);
|
|
84
|
+
} catch (error) {
|
|
85
|
+
throw new Error(`Failed to parse ${MARKETPLACE_FILE}: ${error.message}`);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
if (!marketplace || typeof marketplace !== 'object' || Array.isArray(marketplace)) {
|
|
89
|
+
throw new Error(`Expected ${MARKETPLACE_FILE} to contain a JSON object`);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
if (!Array.isArray(marketplace.plugins)) {
|
|
93
|
+
throw new Error(`Expected ${MARKETPLACE_FILE} to contain a plugins array`);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
if (!marketplace.name) {
|
|
97
|
+
marketplace.name = DEFAULT_MARKETPLACE.name;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
if (!marketplace.interface || typeof marketplace.interface !== 'object') {
|
|
101
|
+
marketplace.interface = { ...DEFAULT_MARKETPLACE.interface };
|
|
102
|
+
} else if (!marketplace.interface.displayName) {
|
|
103
|
+
marketplace.interface.displayName = DEFAULT_MARKETPLACE.interface.displayName;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
return {
|
|
107
|
+
marketplace,
|
|
108
|
+
existed: true,
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
function upsertPluginEntry(marketplace) {
|
|
113
|
+
const nextEntry = JSON.parse(JSON.stringify(PLUGIN_ENTRY));
|
|
114
|
+
const existingIndex = marketplace.plugins.findIndex((plugin) => plugin && plugin.name === 'maestro');
|
|
115
|
+
|
|
116
|
+
if (existingIndex >= 0) {
|
|
117
|
+
marketplace.plugins[existingIndex] = nextEntry;
|
|
118
|
+
} else {
|
|
119
|
+
marketplace.plugins.push(nextEntry);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
return existingIndex >= 0 ? 'updated' : 'added';
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
function writeMarketplace(marketplace) {
|
|
126
|
+
fs.mkdirSync(path.dirname(MARKETPLACE_FILE), { recursive: true });
|
|
127
|
+
fs.writeFileSync(MARKETPLACE_FILE, `${JSON.stringify(marketplace, null, 2)}\n`);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
function installPluginCopy() {
|
|
131
|
+
fs.mkdirSync(path.dirname(TARGET_PLUGIN_DIR), { recursive: true });
|
|
132
|
+
fs.rmSync(TARGET_PLUGIN_DIR, { recursive: true, force: true });
|
|
133
|
+
fs.cpSync(SOURCE_PLUGIN_DIR, TARGET_PLUGIN_DIR, { recursive: true });
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
function printSummary({ dryRun, marketplaceExisted, pluginAction }) {
|
|
137
|
+
const mode = dryRun ? 'Dry run complete.' : 'Maestro installed for Codex.';
|
|
138
|
+
const marketplaceStatus = marketplaceExisted ? 'updated' : 'created';
|
|
139
|
+
|
|
140
|
+
console.log(mode);
|
|
141
|
+
console.log(`Plugin source: ${SOURCE_PLUGIN_DIR}`);
|
|
142
|
+
console.log(`Plugin target: ${TARGET_PLUGIN_DIR}`);
|
|
143
|
+
console.log(`Marketplace: ${MARKETPLACE_FILE} (${marketplaceStatus}, plugin ${pluginAction})`);
|
|
144
|
+
console.log('');
|
|
145
|
+
console.log('Next steps:');
|
|
146
|
+
console.log('1. Start Codex or restart it if already open.');
|
|
147
|
+
console.log('2. Run `/plugins`.');
|
|
148
|
+
console.log('3. Search for `Maestro` and select `Install plugin`.');
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
function main() {
|
|
152
|
+
const { dryRun } = parseArgs(process.argv.slice(2));
|
|
153
|
+
|
|
154
|
+
assertSourcePlugin();
|
|
155
|
+
|
|
156
|
+
const { marketplace, existed: marketplaceExisted } = readMarketplace();
|
|
157
|
+
const pluginAction = upsertPluginEntry(marketplace);
|
|
158
|
+
|
|
159
|
+
if (!dryRun) {
|
|
160
|
+
installPluginCopy();
|
|
161
|
+
writeMarketplace(marketplace);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
printSummary({ dryRun, marketplaceExisted, pluginAction });
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
main();
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Postinstall step that activates the repo-local git hooks under .githooks/.
|
|
6
|
+
*
|
|
7
|
+
* Activation conditions (all must hold):
|
|
8
|
+
* 1. Current directory contains .githooks/ — i.e. we are in the maestro
|
|
9
|
+
* source tree, not a downstream npm consumer's node_modules entry
|
|
10
|
+
* (.githooks is intentionally excluded from the published `files:` list).
|
|
11
|
+
* 2. `git rev-parse --show-toplevel` resolves to the current directory —
|
|
12
|
+
* this is true in the main checkout AND in any git worktree pointing
|
|
13
|
+
* at it. False outside a git checkout entirely.
|
|
14
|
+
*
|
|
15
|
+
* If either condition fails, the script exits 0 with no side effect.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
const fs = require('node:fs');
|
|
19
|
+
const path = require('node:path');
|
|
20
|
+
const { execSync } = require('node:child_process');
|
|
21
|
+
|
|
22
|
+
const HOOKS_DIR = '.githooks';
|
|
23
|
+
|
|
24
|
+
if (!fs.existsSync(HOOKS_DIR)) {
|
|
25
|
+
process.exit(0);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
let topLevel;
|
|
29
|
+
try {
|
|
30
|
+
topLevel = execSync('git rev-parse --show-toplevel', {
|
|
31
|
+
encoding: 'utf8',
|
|
32
|
+
stdio: ['ignore', 'pipe', 'ignore'],
|
|
33
|
+
}).trim();
|
|
34
|
+
} catch {
|
|
35
|
+
process.exit(0);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
if (path.resolve(topLevel) !== path.resolve('.')) {
|
|
39
|
+
process.exit(0);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
execSync(`git config core.hooksPath ${HOOKS_DIR}`, { stdio: 'inherit' });
|
|
43
|
+
console.log(`postinstall: git hooks activated (${HOOKS_DIR}/)`);
|