claude-flow 2.0.0-alpha.78 → 2.0.0-alpha.79
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/CHANGELOG.md +74 -0
- package/bin/claude-flow +1 -1
- package/bin/claude-flow.js +0 -0
- package/dist/agents/agent-loader.d.ts +90 -0
- package/dist/agents/agent-loader.d.ts.map +1 -0
- package/dist/agents/agent-loader.js +195 -0
- package/dist/agents/agent-loader.js.map +1 -0
- package/dist/agents/agent-manager.d.ts +191 -0
- package/dist/agents/agent-manager.d.ts.map +1 -0
- package/dist/agents/agent-manager.js +1405 -0
- package/dist/agents/agent-manager.js.map +1 -0
- package/dist/api/claude-api-errors.d.ts +115 -0
- package/dist/api/claude-api-errors.d.ts.map +1 -0
- package/dist/api/claude-api-errors.js +198 -0
- package/dist/api/claude-api-errors.js.map +1 -0
- package/dist/api/claude-client.d.ts +197 -0
- package/dist/api/claude-client.d.ts.map +1 -0
- package/dist/api/claude-client.js +525 -0
- package/dist/api/claude-client.js.map +1 -0
- package/dist/cli/cli-core.d.ts +52 -0
- package/dist/cli/cli-core.d.ts.map +1 -0
- package/dist/cli/cli-core.js +264 -0
- package/dist/cli/cli-core.js.map +1 -0
- package/dist/cli/command-registry.d.ts +10 -0
- package/dist/cli/command-registry.d.ts.map +1 -0
- package/dist/cli/command-registry.js +758 -0
- package/dist/cli/command-registry.js.map +1 -0
- package/dist/cli/commands/agent.d.ts +7 -0
- package/dist/cli/commands/agent.d.ts.map +1 -0
- package/dist/cli/commands/agent.js +382 -0
- package/dist/cli/commands/agent.js.map +1 -0
- package/dist/cli/commands/config.d.ts +5 -0
- package/dist/cli/commands/config.d.ts.map +1 -0
- package/dist/cli/commands/config.js +88 -0
- package/dist/cli/commands/config.js.map +1 -0
- package/dist/cli/commands/enterprise.d.ts +3 -0
- package/dist/cli/commands/enterprise.d.ts.map +1 -0
- package/dist/cli/commands/enterprise.js +1506 -0
- package/dist/cli/commands/enterprise.js.map +1 -0
- package/dist/cli/commands/help.d.ts +7 -0
- package/dist/cli/commands/help.d.ts.map +1 -0
- package/dist/cli/commands/help.js +936 -0
- package/dist/cli/commands/help.js.map +1 -0
- package/dist/cli/commands/hive-mind/index.d.ts +19 -0
- package/dist/cli/commands/hive-mind/index.d.ts.map +1 -0
- package/dist/cli/commands/hive-mind/index.js +30 -0
- package/dist/cli/commands/hive-mind/index.js.map +1 -0
- package/dist/cli/commands/hive-mind/init.d.ts +10 -0
- package/dist/cli/commands/hive-mind/init.d.ts.map +1 -0
- package/dist/cli/commands/hive-mind/init.js +68 -0
- package/dist/cli/commands/hive-mind/init.js.map +1 -0
- package/dist/cli/commands/hive-mind/pause.d.ts +9 -0
- package/dist/cli/commands/hive-mind/pause.d.ts.map +1 -0
- package/dist/cli/commands/hive-mind/pause.js +81 -0
- package/dist/cli/commands/hive-mind/pause.js.map +1 -0
- package/dist/cli/commands/hive-mind/ps.d.ts +9 -0
- package/dist/cli/commands/hive-mind/ps.d.ts.map +1 -0
- package/dist/cli/commands/hive-mind/ps.js +120 -0
- package/dist/cli/commands/hive-mind/ps.js.map +1 -0
- package/dist/cli/commands/hive-mind/resume.d.ts +9 -0
- package/dist/cli/commands/hive-mind/resume.d.ts.map +1 -0
- package/dist/cli/commands/hive-mind/resume.js +62 -0
- package/dist/cli/commands/hive-mind/resume.js.map +1 -0
- package/dist/cli/commands/hive-mind/spawn.d.ts +10 -0
- package/dist/cli/commands/hive-mind/spawn.d.ts.map +1 -0
- package/dist/cli/commands/hive-mind/spawn.js +174 -0
- package/dist/cli/commands/hive-mind/spawn.js.map +1 -0
- package/dist/cli/commands/hive-mind/status.d.ts +10 -0
- package/dist/cli/commands/hive-mind/status.d.ts.map +1 -0
- package/dist/cli/commands/hive-mind/status.js +204 -0
- package/dist/cli/commands/hive-mind/status.js.map +1 -0
- package/dist/cli/commands/hive-mind/stop.d.ts +9 -0
- package/dist/cli/commands/hive-mind/stop.d.ts.map +1 -0
- package/dist/cli/commands/hive-mind/stop.js +125 -0
- package/dist/cli/commands/hive-mind/stop.js.map +1 -0
- package/dist/cli/commands/hive-mind/task.d.ts +10 -0
- package/dist/cli/commands/hive-mind/task.d.ts.map +1 -0
- package/dist/cli/commands/hive-mind/task.js +294 -0
- package/dist/cli/commands/hive-mind/task.js.map +1 -0
- package/dist/cli/commands/hive-mind/wizard.d.ts +10 -0
- package/dist/cli/commands/hive-mind/wizard.d.ts.map +1 -0
- package/dist/cli/commands/hive-mind/wizard.js +531 -0
- package/dist/cli/commands/hive-mind/wizard.js.map +1 -0
- package/dist/cli/commands/hive.d.ts +6 -0
- package/dist/cli/commands/hive.d.ts.map +1 -0
- package/dist/cli/commands/hive.js +409 -0
- package/dist/cli/commands/hive.js.map +1 -0
- package/dist/cli/commands/index.d.ts +3 -0
- package/dist/cli/commands/index.d.ts.map +1 -0
- package/dist/cli/commands/index.js +2532 -0
- package/dist/cli/commands/index.js.map +1 -0
- package/dist/cli/commands/mcp.d.ts +5 -0
- package/dist/cli/commands/mcp.d.ts.map +1 -0
- package/dist/cli/commands/mcp.js +169 -0
- package/dist/cli/commands/mcp.js.map +1 -0
- package/dist/cli/commands/memory.d.ts +30 -0
- package/dist/cli/commands/memory.d.ts.map +1 -0
- package/dist/cli/commands/memory.js +225 -0
- package/dist/cli/commands/memory.js.map +1 -0
- package/dist/cli/commands/migrate.d.ts +6 -0
- package/dist/cli/commands/migrate.d.ts.map +1 -0
- package/dist/cli/commands/migrate.js +139 -0
- package/dist/cli/commands/migrate.js.map +1 -0
- package/dist/cli/commands/monitor.d.ts +6 -0
- package/dist/cli/commands/monitor.d.ts.map +1 -0
- package/dist/cli/commands/monitor.js +493 -0
- package/dist/cli/commands/monitor.js.map +1 -0
- package/dist/cli/commands/session.d.ts +6 -0
- package/dist/cli/commands/session.d.ts.map +1 -0
- package/dist/cli/commands/session.js +548 -0
- package/dist/cli/commands/session.js.map +1 -0
- package/dist/cli/commands/sparc.d.ts +3 -0
- package/dist/cli/commands/sparc.d.ts.map +1 -0
- package/dist/cli/commands/sparc.js +472 -0
- package/dist/cli/commands/sparc.js.map +1 -0
- package/dist/cli/commands/start/event-emitter.d.ts +13 -0
- package/dist/cli/commands/start/event-emitter.d.ts.map +1 -0
- package/dist/cli/commands/start/event-emitter.js +35 -0
- package/dist/cli/commands/start/event-emitter.js.map +1 -0
- package/dist/cli/commands/start/index.d.ts +10 -0
- package/dist/cli/commands/start/index.d.ts.map +1 -0
- package/dist/cli/commands/start/index.js +9 -0
- package/dist/cli/commands/start/index.js.map +1 -0
- package/dist/cli/commands/start/process-manager.d.ts +31 -0
- package/dist/cli/commands/start/process-manager.d.ts.map +1 -0
- package/dist/cli/commands/start/process-manager.js +283 -0
- package/dist/cli/commands/start/process-manager.js.map +1 -0
- package/dist/cli/commands/start/process-ui-simple.d.ts +29 -0
- package/dist/cli/commands/start/process-ui-simple.d.ts.map +1 -0
- package/dist/cli/commands/start/process-ui-simple.js +334 -0
- package/dist/cli/commands/start/process-ui-simple.js.map +1 -0
- package/dist/cli/commands/start/process-ui.d.ts +5 -0
- package/dist/cli/commands/start/process-ui.d.ts.map +1 -0
- package/dist/cli/commands/start/process-ui.js +5 -0
- package/dist/cli/commands/start/process-ui.js.map +1 -0
- package/dist/cli/commands/start/start-command.d.ts +2 -0
- package/dist/cli/commands/start/start-command.d.ts.map +1 -0
- package/dist/cli/commands/start/start-command.js +462 -0
- package/dist/cli/commands/start/start-command.js.map +1 -0
- package/dist/cli/commands/start/system-monitor.d.ts +25 -0
- package/dist/cli/commands/start/system-monitor.d.ts.map +1 -0
- package/dist/cli/commands/start/system-monitor.js +265 -0
- package/dist/cli/commands/start/system-monitor.js.map +1 -0
- package/dist/cli/commands/start/types.d.ts +64 -0
- package/dist/cli/commands/start/types.d.ts.map +1 -0
- package/dist/cli/commands/start/types.js +22 -0
- package/dist/cli/commands/start/types.js.map +1 -0
- package/dist/cli/commands/start.d.ts +6 -0
- package/dist/cli/commands/start.d.ts.map +1 -0
- package/dist/cli/commands/start.js +6 -0
- package/dist/cli/commands/start.js.map +1 -0
- package/dist/cli/commands/status.d.ts +6 -0
- package/dist/cli/commands/status.d.ts.map +1 -0
- package/dist/cli/commands/status.js +307 -0
- package/dist/cli/commands/status.js.map +1 -0
- package/dist/cli/commands/swarm.d.ts +6 -0
- package/dist/cli/commands/swarm.d.ts.map +1 -0
- package/dist/cli/commands/swarm.js +465 -0
- package/dist/cli/commands/swarm.js.map +1 -0
- package/dist/cli/commands/task.d.ts +6 -0
- package/dist/cli/commands/task.d.ts.map +1 -0
- package/dist/cli/commands/task.js +75 -0
- package/dist/cli/commands/task.js.map +1 -0
- package/dist/cli/commands/workflow.d.ts +6 -0
- package/dist/cli/commands/workflow.d.ts.map +1 -0
- package/dist/cli/commands/workflow.js +624 -0
- package/dist/cli/commands/workflow.js.map +1 -0
- package/dist/cli/completion.d.ts +19 -0
- package/dist/cli/completion.d.ts.map +1 -0
- package/dist/cli/completion.js +545 -0
- package/dist/cli/completion.js.map +1 -0
- package/dist/cli/formatter.d.ts +69 -0
- package/dist/cli/formatter.d.ts.map +1 -0
- package/dist/cli/formatter.js +277 -0
- package/dist/cli/formatter.js.map +1 -0
- package/dist/cli/help-formatter.d.ts +49 -0
- package/dist/cli/help-formatter.d.ts.map +1 -0
- package/dist/cli/help-formatter.js +108 -0
- package/dist/cli/help-formatter.js.map +1 -0
- package/dist/cli/index-remote.d.ts +7 -0
- package/dist/cli/index-remote.d.ts.map +1 -0
- package/dist/cli/index-remote.js +126 -0
- package/dist/cli/index-remote.js.map +1 -0
- package/dist/cli/index.d.ts +7 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +191 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/node-compat.d.ts +81 -0
- package/dist/cli/node-compat.d.ts.map +1 -0
- package/dist/cli/node-compat.js +229 -0
- package/dist/cli/node-compat.js.map +1 -0
- package/dist/cli/repl.d.ts +5 -0
- package/dist/cli/repl.d.ts.map +1 -0
- package/dist/cli/repl.js +949 -0
- package/dist/cli/repl.js.map +1 -0
- package/dist/cli/runtime-detector.d.ts +128 -0
- package/dist/cli/runtime-detector.d.ts.map +1 -0
- package/dist/cli/runtime-detector.js +267 -0
- package/dist/cli/runtime-detector.js.map +1 -0
- package/dist/cli/simple-cli.d.ts +7 -0
- package/dist/cli/simple-cli.d.ts.map +1 -0
- package/dist/cli/simple-cli.js +3074 -0
- package/dist/cli/simple-cli.js.map +1 -0
- package/dist/cli/simple-commands/agent.d.ts +2 -0
- package/dist/cli/simple-commands/agent.d.ts.map +1 -0
- package/dist/cli/simple-commands/agent.js +175 -0
- package/dist/cli/simple-commands/agent.js.map +1 -0
- package/dist/cli/simple-commands/analysis.d.ts +2 -0
- package/dist/cli/simple-commands/analysis.d.ts.map +1 -0
- package/dist/cli/simple-commands/analysis.js +207 -0
- package/dist/cli/simple-commands/analysis.js.map +1 -0
- package/dist/cli/simple-commands/automation.d.ts +2 -0
- package/dist/cli/simple-commands/automation.d.ts.map +1 -0
- package/dist/cli/simple-commands/automation.js +246 -0
- package/dist/cli/simple-commands/automation.js.map +1 -0
- package/dist/cli/simple-commands/batch-manager.d.ts +2 -0
- package/dist/cli/simple-commands/batch-manager.d.ts.map +1 -0
- package/dist/cli/simple-commands/batch-manager.js +290 -0
- package/dist/cli/simple-commands/batch-manager.js.map +1 -0
- package/dist/cli/simple-commands/config.d.ts +2 -0
- package/dist/cli/simple-commands/config.d.ts.map +1 -0
- package/dist/cli/simple-commands/config.js +278 -0
- package/dist/cli/simple-commands/config.js.map +1 -0
- package/dist/cli/simple-commands/coordination.d.ts +2 -0
- package/dist/cli/simple-commands/coordination.d.ts.map +1 -0
- package/dist/cli/simple-commands/coordination.js +249 -0
- package/dist/cli/simple-commands/coordination.js.map +1 -0
- package/dist/cli/simple-commands/fix-hook-variables.d.ts +16 -0
- package/dist/cli/simple-commands/fix-hook-variables.d.ts.map +1 -0
- package/dist/cli/simple-commands/fix-hook-variables.js +320 -0
- package/dist/cli/simple-commands/fix-hook-variables.js.map +1 -0
- package/dist/cli/simple-commands/github.d.ts +3 -0
- package/dist/cli/simple-commands/github.d.ts.map +1 -0
- package/dist/cli/simple-commands/github.js +343 -0
- package/dist/cli/simple-commands/github.js.map +1 -0
- package/dist/cli/simple-commands/hive-mind/auto-save-middleware.d.ts +68 -0
- package/dist/cli/simple-commands/hive-mind/auto-save-middleware.d.ts.map +1 -0
- package/dist/cli/simple-commands/hive-mind/auto-save-middleware.js +264 -0
- package/dist/cli/simple-commands/hive-mind/auto-save-middleware.js.map +1 -0
- package/dist/cli/simple-commands/hive-mind/communication.d.ts +176 -0
- package/dist/cli/simple-commands/hive-mind/communication.d.ts.map +1 -0
- package/dist/cli/simple-commands/hive-mind/communication.js +611 -0
- package/dist/cli/simple-commands/hive-mind/communication.js.map +1 -0
- package/dist/cli/simple-commands/hive-mind/core.d.ts +306 -0
- package/dist/cli/simple-commands/hive-mind/core.d.ts.map +1 -0
- package/dist/cli/simple-commands/hive-mind/core.js +840 -0
- package/dist/cli/simple-commands/hive-mind/core.js.map +1 -0
- package/dist/cli/simple-commands/hive-mind/db-optimizer.d.ts +32 -0
- package/dist/cli/simple-commands/hive-mind/db-optimizer.d.ts.map +1 -0
- package/dist/cli/simple-commands/hive-mind/db-optimizer.js +702 -0
- package/dist/cli/simple-commands/hive-mind/db-optimizer.js.map +1 -0
- package/dist/cli/simple-commands/hive-mind/mcp-wrapper.d.ts +270 -0
- package/dist/cli/simple-commands/hive-mind/mcp-wrapper.d.ts.map +1 -0
- package/dist/cli/simple-commands/hive-mind/mcp-wrapper.js +1211 -0
- package/dist/cli/simple-commands/hive-mind/mcp-wrapper.js.map +1 -0
- package/dist/cli/simple-commands/hive-mind/memory.d.ts +334 -0
- package/dist/cli/simple-commands/hive-mind/memory.d.ts.map +1 -0
- package/dist/cli/simple-commands/hive-mind/memory.js +1068 -0
- package/dist/cli/simple-commands/hive-mind/memory.js.map +1 -0
- package/dist/cli/simple-commands/hive-mind/performance-optimizer.d.ts +256 -0
- package/dist/cli/simple-commands/hive-mind/performance-optimizer.d.ts.map +1 -0
- package/dist/cli/simple-commands/hive-mind/performance-optimizer.js +520 -0
- package/dist/cli/simple-commands/hive-mind/performance-optimizer.js.map +1 -0
- package/dist/cli/simple-commands/hive-mind/queen.d.ts +235 -0
- package/dist/cli/simple-commands/hive-mind/queen.d.ts.map +1 -0
- package/dist/cli/simple-commands/hive-mind/queen.js +697 -0
- package/dist/cli/simple-commands/hive-mind/queen.js.map +1 -0
- package/dist/cli/simple-commands/hive-mind/session-manager.d.ts +139 -0
- package/dist/cli/simple-commands/hive-mind/session-manager.d.ts.map +1 -0
- package/dist/cli/simple-commands/hive-mind/session-manager.js +835 -0
- package/dist/cli/simple-commands/hive-mind/session-manager.js.map +1 -0
- package/dist/cli/simple-commands/hive-mind-optimize.d.ts +6 -0
- package/dist/cli/simple-commands/hive-mind-optimize.d.ts.map +1 -0
- package/dist/cli/simple-commands/hive-mind-optimize.js +317 -0
- package/dist/cli/simple-commands/hive-mind-optimize.js.map +1 -0
- package/dist/cli/simple-commands/hive-mind.d.ts +18 -0
- package/dist/cli/simple-commands/hive-mind.d.ts.map +1 -0
- package/dist/cli/simple-commands/hive-mind.js +2430 -0
- package/dist/cli/simple-commands/hive-mind.js.map +1 -0
- package/dist/cli/simple-commands/hook-safety.d.ts +177 -0
- package/dist/cli/simple-commands/hook-safety.d.ts.map +1 -0
- package/dist/cli/simple-commands/hook-safety.js +590 -0
- package/dist/cli/simple-commands/hook-safety.js.map +1 -0
- package/dist/cli/simple-commands/hooks.d.ts +3 -0
- package/dist/cli/simple-commands/hooks.d.ts.map +1 -0
- package/dist/cli/simple-commands/hooks.js +1026 -0
- package/dist/cli/simple-commands/hooks.js.map +1 -0
- package/dist/cli/simple-commands/init/agent-copier.d.ts +43 -0
- package/dist/cli/simple-commands/init/agent-copier.d.ts.map +1 -0
- package/dist/cli/simple-commands/init/agent-copier.js +200 -0
- package/dist/cli/simple-commands/init/agent-copier.js.map +1 -0
- package/dist/cli/simple-commands/init/batch-init.d.ts +137 -0
- package/dist/cli/simple-commands/init/batch-init.d.ts.map +1 -0
- package/dist/cli/simple-commands/init/batch-init.js +558 -0
- package/dist/cli/simple-commands/init/batch-init.js.map +1 -0
- package/dist/cli/simple-commands/init/claude-commands/claude-flow-commands.d.ts +2 -0
- package/dist/cli/simple-commands/init/claude-commands/claude-flow-commands.d.ts.map +1 -0
- package/dist/cli/simple-commands/init/claude-commands/claude-flow-commands.js +433 -0
- package/dist/cli/simple-commands/init/claude-commands/claude-flow-commands.js.map +1 -0
- package/dist/cli/simple-commands/init/claude-commands/optimized-claude-flow-commands.d.ts +2 -0
- package/dist/cli/simple-commands/init/claude-commands/optimized-claude-flow-commands.d.ts.map +1 -0
- package/dist/cli/simple-commands/init/claude-commands/optimized-claude-flow-commands.js +871 -0
- package/dist/cli/simple-commands/init/claude-commands/optimized-claude-flow-commands.js.map +1 -0
- package/dist/cli/simple-commands/init/claude-commands/optimized-slash-commands.d.ts +2 -0
- package/dist/cli/simple-commands/init/claude-commands/optimized-slash-commands.d.ts.map +1 -0
- package/dist/cli/simple-commands/init/claude-commands/optimized-slash-commands.js +332 -0
- package/dist/cli/simple-commands/init/claude-commands/optimized-slash-commands.js.map +1 -0
- package/dist/cli/simple-commands/init/claude-commands/optimized-sparc-commands.d.ts +3 -0
- package/dist/cli/simple-commands/init/claude-commands/optimized-sparc-commands.d.ts.map +1 -0
- package/dist/cli/simple-commands/init/claude-commands/optimized-sparc-commands.js +488 -0
- package/dist/cli/simple-commands/init/claude-commands/optimized-sparc-commands.js.map +1 -0
- package/dist/cli/simple-commands/init/claude-commands/slash-commands.d.ts +2 -0
- package/dist/cli/simple-commands/init/claude-commands/slash-commands.d.ts.map +1 -0
- package/dist/cli/simple-commands/init/claude-commands/slash-commands.js +51 -0
- package/dist/cli/simple-commands/init/claude-commands/slash-commands.js.map +1 -0
- package/dist/cli/simple-commands/init/claude-commands/sparc-commands.d.ts +3 -0
- package/dist/cli/simple-commands/init/claude-commands/sparc-commands.d.ts.map +1 -0
- package/dist/cli/simple-commands/init/claude-commands/sparc-commands.js +288 -0
- package/dist/cli/simple-commands/init/claude-commands/sparc-commands.js.map +1 -0
- package/dist/cli/simple-commands/init/copy-revised-templates.d.ts +29 -0
- package/dist/cli/simple-commands/init/copy-revised-templates.d.ts.map +1 -0
- package/dist/cli/simple-commands/init/copy-revised-templates.js +159 -0
- package/dist/cli/simple-commands/init/copy-revised-templates.js.map +1 -0
- package/dist/cli/simple-commands/init/executable-wrapper.d.ts +2 -0
- package/dist/cli/simple-commands/init/executable-wrapper.d.ts.map +1 -0
- package/dist/cli/simple-commands/init/executable-wrapper.js +116 -0
- package/dist/cli/simple-commands/init/executable-wrapper.js.map +1 -0
- package/dist/cli/simple-commands/init/gitignore-updater.d.ts +23 -0
- package/dist/cli/simple-commands/init/gitignore-updater.d.ts.map +1 -0
- package/dist/cli/simple-commands/init/gitignore-updater.js +126 -0
- package/dist/cli/simple-commands/init/gitignore-updater.js.map +1 -0
- package/dist/cli/simple-commands/init/help.d.ts +2 -0
- package/dist/cli/simple-commands/init/help.d.ts.map +1 -0
- package/dist/cli/simple-commands/init/help.js +95 -0
- package/dist/cli/simple-commands/init/help.js.map +1 -0
- package/dist/cli/simple-commands/init/index.d.ts +2 -0
- package/dist/cli/simple-commands/init/index.d.ts.map +1 -0
- package/dist/cli/simple-commands/init/index.js +1178 -0
- package/dist/cli/simple-commands/init/index.js.map +1 -0
- package/dist/cli/simple-commands/init/performance-monitor.d.ts +73 -0
- package/dist/cli/simple-commands/init/performance-monitor.d.ts.map +1 -0
- package/dist/cli/simple-commands/init/performance-monitor.js +277 -0
- package/dist/cli/simple-commands/init/performance-monitor.js.map +1 -0
- package/dist/cli/simple-commands/init/rollback/backup-manager.d.ts +95 -0
- package/dist/cli/simple-commands/init/rollback/backup-manager.d.ts.map +1 -0
- package/dist/cli/simple-commands/init/rollback/backup-manager.js +486 -0
- package/dist/cli/simple-commands/init/rollback/backup-manager.js.map +1 -0
- package/dist/cli/simple-commands/init/rollback/index.d.ts +114 -0
- package/dist/cli/simple-commands/init/rollback/index.d.ts.map +1 -0
- package/dist/cli/simple-commands/init/rollback/index.js +353 -0
- package/dist/cli/simple-commands/init/rollback/index.js.map +1 -0
- package/dist/cli/simple-commands/init/rollback/recovery-manager.d.ts +161 -0
- package/dist/cli/simple-commands/init/rollback/recovery-manager.d.ts.map +1 -0
- package/dist/cli/simple-commands/init/rollback/recovery-manager.js +686 -0
- package/dist/cli/simple-commands/init/rollback/recovery-manager.js.map +1 -0
- package/dist/cli/simple-commands/init/rollback/rollback-executor.d.ts +112 -0
- package/dist/cli/simple-commands/init/rollback/rollback-executor.d.ts.map +1 -0
- package/dist/cli/simple-commands/init/rollback/rollback-executor.js +480 -0
- package/dist/cli/simple-commands/init/rollback/rollback-executor.js.map +1 -0
- package/dist/cli/simple-commands/init/rollback/state-tracker.d.ts +121 -0
- package/dist/cli/simple-commands/init/rollback/state-tracker.d.ts.map +1 -0
- package/dist/cli/simple-commands/init/rollback/state-tracker.js +432 -0
- package/dist/cli/simple-commands/init/rollback/state-tracker.js.map +1 -0
- package/dist/cli/simple-commands/init/sparc/roo-readme.d.ts +2 -0
- package/dist/cli/simple-commands/init/sparc/roo-readme.d.ts.map +1 -0
- package/dist/cli/simple-commands/init/sparc/roo-readme.js +61 -0
- package/dist/cli/simple-commands/init/sparc/roo-readme.js.map +1 -0
- package/dist/cli/simple-commands/init/sparc/roomodes-config.d.ts +2 -0
- package/dist/cli/simple-commands/init/sparc/roomodes-config.d.ts.map +1 -0
- package/dist/cli/simple-commands/init/sparc/roomodes-config.js +80 -0
- package/dist/cli/simple-commands/init/sparc/roomodes-config.js.map +1 -0
- package/dist/cli/simple-commands/init/sparc/workflows.d.ts +2 -0
- package/dist/cli/simple-commands/init/sparc/workflows.d.ts.map +1 -0
- package/dist/cli/simple-commands/init/sparc/workflows.js +36 -0
- package/dist/cli/simple-commands/init/sparc/workflows.js.map +1 -0
- package/dist/cli/simple-commands/init/sparc-structure.d.ts +2 -0
- package/dist/cli/simple-commands/init/sparc-structure.d.ts.map +1 -0
- package/dist/cli/simple-commands/init/sparc-structure.js +63 -0
- package/dist/cli/simple-commands/init/sparc-structure.js.map +1 -0
- package/dist/cli/simple-commands/init/template-copier.d.ts +27 -0
- package/dist/cli/simple-commands/init/template-copier.d.ts.map +1 -0
- package/dist/cli/simple-commands/init/template-copier.js +510 -0
- package/dist/cli/simple-commands/init/template-copier.js.map +1 -0
- package/dist/cli/simple-commands/init/templates/claude-md.d.ts +5 -0
- package/dist/cli/simple-commands/init/templates/claude-md.d.ts.map +1 -0
- package/dist/cli/simple-commands/init/templates/claude-md.js +646 -0
- package/dist/cli/simple-commands/init/templates/claude-md.js.map +1 -0
- package/dist/cli/simple-commands/init/templates/coordination-md.d.ts +4 -0
- package/dist/cli/simple-commands/init/templates/coordination-md.d.ts.map +1 -0
- package/dist/cli/simple-commands/init/templates/coordination-md.js +338 -0
- package/dist/cli/simple-commands/init/templates/coordination-md.js.map +1 -0
- package/dist/cli/simple-commands/init/templates/enhanced-templates.d.ts +18 -0
- package/dist/cli/simple-commands/init/templates/enhanced-templates.d.ts.map +1 -0
- package/dist/cli/simple-commands/init/templates/enhanced-templates.js +1407 -0
- package/dist/cli/simple-commands/init/templates/enhanced-templates.js.map +1 -0
- package/dist/cli/simple-commands/init/templates/memory-bank-md.d.ts +4 -0
- package/dist/cli/simple-commands/init/templates/memory-bank-md.d.ts.map +1 -0
- package/dist/cli/simple-commands/init/templates/memory-bank-md.js +257 -0
- package/dist/cli/simple-commands/init/templates/memory-bank-md.js.map +1 -0
- package/dist/cli/simple-commands/init/templates/readme-files.d.ts +3 -0
- package/dist/cli/simple-commands/init/templates/readme-files.d.ts.map +1 -0
- package/dist/cli/simple-commands/init/templates/readme-files.js +71 -0
- package/dist/cli/simple-commands/init/templates/readme-files.js.map +1 -0
- package/dist/cli/simple-commands/init/templates/sparc-modes.d.ts +30 -0
- package/dist/cli/simple-commands/init/templates/sparc-modes.d.ts.map +1 -0
- package/dist/cli/simple-commands/init/templates/sparc-modes.js +1375 -0
- package/dist/cli/simple-commands/init/templates/sparc-modes.js.map +1 -0
- package/dist/cli/simple-commands/init/validation/config-validator.d.ts +63 -0
- package/dist/cli/simple-commands/init/validation/config-validator.d.ts.map +1 -0
- package/dist/cli/simple-commands/init/validation/config-validator.js +308 -0
- package/dist/cli/simple-commands/init/validation/config-validator.js.map +1 -0
- package/dist/cli/simple-commands/init/validation/health-checker.d.ts +117 -0
- package/dist/cli/simple-commands/init/validation/health-checker.d.ts.map +1 -0
- package/dist/cli/simple-commands/init/validation/health-checker.js +539 -0
- package/dist/cli/simple-commands/init/validation/health-checker.js.map +1 -0
- package/dist/cli/simple-commands/init/validation/index.d.ts +55 -0
- package/dist/cli/simple-commands/init/validation/index.d.ts.map +1 -0
- package/dist/cli/simple-commands/init/validation/index.js +347 -0
- package/dist/cli/simple-commands/init/validation/index.js.map +1 -0
- package/dist/cli/simple-commands/init/validation/mode-validator.d.ts +76 -0
- package/dist/cli/simple-commands/init/validation/mode-validator.d.ts.map +1 -0
- package/dist/cli/simple-commands/init/validation/mode-validator.js +343 -0
- package/dist/cli/simple-commands/init/validation/mode-validator.js.map +1 -0
- package/dist/cli/simple-commands/init/validation/post-init-validator.d.ts +62 -0
- package/dist/cli/simple-commands/init/validation/post-init-validator.d.ts.map +1 -0
- package/dist/cli/simple-commands/init/validation/post-init-validator.js +349 -0
- package/dist/cli/simple-commands/init/validation/post-init-validator.js.map +1 -0
- package/dist/cli/simple-commands/init/validation/pre-init-validator.d.ts +86 -0
- package/dist/cli/simple-commands/init/validation/pre-init-validator.d.ts.map +1 -0
- package/dist/cli/simple-commands/init/validation/pre-init-validator.js +260 -0
- package/dist/cli/simple-commands/init/validation/pre-init-validator.js.map +1 -0
- package/dist/cli/simple-commands/mcp.d.ts +2 -0
- package/dist/cli/simple-commands/mcp.d.ts.map +1 -0
- package/dist/cli/simple-commands/mcp.js +366 -0
- package/dist/cli/simple-commands/mcp.js.map +1 -0
- package/dist/cli/simple-commands/memory.d.ts +2 -0
- package/dist/cli/simple-commands/memory.d.ts.map +1 -0
- package/dist/cli/simple-commands/memory.js +278 -0
- package/dist/cli/simple-commands/memory.js.map +1 -0
- package/dist/cli/simple-commands/migrate-hooks.d.ts +10 -0
- package/dist/cli/simple-commands/migrate-hooks.d.ts.map +1 -0
- package/dist/cli/simple-commands/migrate-hooks.js +57 -0
- package/dist/cli/simple-commands/migrate-hooks.js.map +1 -0
- package/dist/cli/simple-commands/monitor.d.ts +3 -0
- package/dist/cli/simple-commands/monitor.d.ts.map +1 -0
- package/dist/cli/simple-commands/monitor.js +366 -0
- package/dist/cli/simple-commands/monitor.js.map +1 -0
- package/dist/cli/simple-commands/process-ui-enhanced.d.ts +55 -0
- package/dist/cli/simple-commands/process-ui-enhanced.d.ts.map +1 -0
- package/dist/cli/simple-commands/process-ui-enhanced.js +680 -0
- package/dist/cli/simple-commands/process-ui-enhanced.js.map +1 -0
- package/dist/cli/simple-commands/sparc-modes/architect.d.ts +2 -0
- package/dist/cli/simple-commands/sparc-modes/architect.d.ts.map +1 -0
- package/dist/cli/simple-commands/sparc-modes/architect.js +126 -0
- package/dist/cli/simple-commands/sparc-modes/architect.js.map +1 -0
- package/dist/cli/simple-commands/sparc-modes/ask.d.ts +2 -0
- package/dist/cli/simple-commands/sparc-modes/ask.d.ts.map +1 -0
- package/dist/cli/simple-commands/sparc-modes/ask.js +127 -0
- package/dist/cli/simple-commands/sparc-modes/ask.js.map +1 -0
- package/dist/cli/simple-commands/sparc-modes/code.d.ts +2 -0
- package/dist/cli/simple-commands/sparc-modes/code.d.ts.map +1 -0
- package/dist/cli/simple-commands/sparc-modes/code.js +149 -0
- package/dist/cli/simple-commands/sparc-modes/code.js.map +1 -0
- package/dist/cli/simple-commands/sparc-modes/debug.d.ts +2 -0
- package/dist/cli/simple-commands/sparc-modes/debug.d.ts.map +1 -0
- package/dist/cli/simple-commands/sparc-modes/debug.js +113 -0
- package/dist/cli/simple-commands/sparc-modes/debug.js.map +1 -0
- package/dist/cli/simple-commands/sparc-modes/devops.d.ts +2 -0
- package/dist/cli/simple-commands/sparc-modes/devops.d.ts.map +1 -0
- package/dist/cli/simple-commands/sparc-modes/devops.js +138 -0
- package/dist/cli/simple-commands/sparc-modes/devops.js.map +1 -0
- package/dist/cli/simple-commands/sparc-modes/docs-writer.d.ts +2 -0
- package/dist/cli/simple-commands/sparc-modes/docs-writer.d.ts.map +1 -0
- package/dist/cli/simple-commands/sparc-modes/docs-writer.js +39 -0
- package/dist/cli/simple-commands/sparc-modes/docs-writer.js.map +1 -0
- package/dist/cli/simple-commands/sparc-modes/generic.d.ts +2 -0
- package/dist/cli/simple-commands/sparc-modes/generic.d.ts.map +1 -0
- package/dist/cli/simple-commands/sparc-modes/generic.js +35 -0
- package/dist/cli/simple-commands/sparc-modes/generic.js.map +1 -0
- package/dist/cli/simple-commands/sparc-modes/index.d.ts +17 -0
- package/dist/cli/simple-commands/sparc-modes/index.d.ts.map +1 -0
- package/dist/cli/simple-commands/sparc-modes/index.js +196 -0
- package/dist/cli/simple-commands/sparc-modes/index.js.map +1 -0
- package/dist/cli/simple-commands/sparc-modes/integration.d.ts +2 -0
- package/dist/cli/simple-commands/sparc-modes/integration.d.ts.map +1 -0
- package/dist/cli/simple-commands/sparc-modes/integration.js +56 -0
- package/dist/cli/simple-commands/sparc-modes/integration.js.map +1 -0
- package/dist/cli/simple-commands/sparc-modes/mcp.d.ts +2 -0
- package/dist/cli/simple-commands/sparc-modes/mcp.d.ts.map +1 -0
- package/dist/cli/simple-commands/sparc-modes/mcp.js +39 -0
- package/dist/cli/simple-commands/sparc-modes/mcp.js.map +1 -0
- package/dist/cli/simple-commands/sparc-modes/monitoring.d.ts +2 -0
- package/dist/cli/simple-commands/sparc-modes/monitoring.d.ts.map +1 -0
- package/dist/cli/simple-commands/sparc-modes/monitoring.js +39 -0
- package/dist/cli/simple-commands/sparc-modes/monitoring.js.map +1 -0
- package/dist/cli/simple-commands/sparc-modes/optimization.d.ts +2 -0
- package/dist/cli/simple-commands/sparc-modes/optimization.d.ts.map +1 -0
- package/dist/cli/simple-commands/sparc-modes/optimization.js +39 -0
- package/dist/cli/simple-commands/sparc-modes/optimization.js.map +1 -0
- package/dist/cli/simple-commands/sparc-modes/security-review.d.ts +2 -0
- package/dist/cli/simple-commands/sparc-modes/security-review.d.ts.map +1 -0
- package/dist/cli/simple-commands/sparc-modes/security-review.js +131 -0
- package/dist/cli/simple-commands/sparc-modes/security-review.js.map +1 -0
- package/dist/cli/simple-commands/sparc-modes/sparc-orchestrator.d.ts +2 -0
- package/dist/cli/simple-commands/sparc-modes/sparc-orchestrator.d.ts.map +1 -0
- package/dist/cli/simple-commands/sparc-modes/sparc-orchestrator.js +168 -0
- package/dist/cli/simple-commands/sparc-modes/sparc-orchestrator.js.map +1 -0
- package/dist/cli/simple-commands/sparc-modes/spec-pseudocode.d.ts +2 -0
- package/dist/cli/simple-commands/sparc-modes/spec-pseudocode.d.ts.map +1 -0
- package/dist/cli/simple-commands/sparc-modes/spec-pseudocode.js +39 -0
- package/dist/cli/simple-commands/sparc-modes/spec-pseudocode.js.map +1 -0
- package/dist/cli/simple-commands/sparc-modes/supabase-admin.d.ts +2 -0
- package/dist/cli/simple-commands/sparc-modes/supabase-admin.d.ts.map +1 -0
- package/dist/cli/simple-commands/sparc-modes/supabase-admin.js +150 -0
- package/dist/cli/simple-commands/sparc-modes/supabase-admin.js.map +1 -0
- package/dist/cli/simple-commands/sparc-modes/swarm.d.ts +81 -0
- package/dist/cli/simple-commands/sparc-modes/swarm.d.ts.map +1 -0
- package/dist/cli/simple-commands/sparc-modes/swarm.js +428 -0
- package/dist/cli/simple-commands/sparc-modes/swarm.js.map +1 -0
- package/dist/cli/simple-commands/sparc-modes/tdd.d.ts +2 -0
- package/dist/cli/simple-commands/sparc-modes/tdd.d.ts.map +1 -0
- package/dist/cli/simple-commands/sparc-modes/tdd.js +113 -0
- package/dist/cli/simple-commands/sparc-modes/tdd.js.map +1 -0
- package/dist/cli/simple-commands/sparc-modes/tutorial.d.ts +2 -0
- package/dist/cli/simple-commands/sparc-modes/tutorial.d.ts.map +1 -0
- package/dist/cli/simple-commands/sparc-modes/tutorial.js +278 -0
- package/dist/cli/simple-commands/sparc-modes/tutorial.js.map +1 -0
- package/dist/cli/simple-commands/sparc.d.ts +2 -0
- package/dist/cli/simple-commands/sparc.d.ts.map +1 -0
- package/dist/cli/simple-commands/sparc.js +480 -0
- package/dist/cli/simple-commands/sparc.js.map +1 -0
- package/dist/cli/simple-commands/start-ui.d.ts +2 -0
- package/dist/cli/simple-commands/start-ui.d.ts.map +1 -0
- package/dist/cli/simple-commands/start-ui.js +135 -0
- package/dist/cli/simple-commands/start-ui.js.map +1 -0
- package/dist/cli/simple-commands/start-wrapper.d.ts +2 -0
- package/dist/cli/simple-commands/start-wrapper.d.ts.map +1 -0
- package/dist/cli/simple-commands/start-wrapper.js +264 -0
- package/dist/cli/simple-commands/start-wrapper.js.map +1 -0
- package/dist/cli/simple-commands/start.d.ts +2 -0
- package/dist/cli/simple-commands/start.d.ts.map +1 -0
- package/dist/cli/simple-commands/start.js +3 -0
- package/dist/cli/simple-commands/start.js.map +1 -0
- package/dist/cli/simple-commands/status.d.ts +2 -0
- package/dist/cli/simple-commands/status.d.ts.map +1 -0
- package/dist/cli/simple-commands/status.js +274 -0
- package/dist/cli/simple-commands/status.js.map +1 -0
- package/dist/cli/simple-commands/swarm-executor.d.ts +68 -0
- package/dist/cli/simple-commands/swarm-executor.d.ts.map +1 -0
- package/dist/cli/simple-commands/swarm-executor.js +218 -0
- package/dist/cli/simple-commands/swarm-executor.js.map +1 -0
- package/dist/cli/simple-commands/swarm-metrics-integration.d.ts +69 -0
- package/dist/cli/simple-commands/swarm-metrics-integration.d.ts.map +1 -0
- package/dist/cli/simple-commands/swarm-metrics-integration.js +294 -0
- package/dist/cli/simple-commands/swarm-metrics-integration.js.map +1 -0
- package/dist/cli/simple-commands/swarm-webui-integration.d.ts +68 -0
- package/dist/cli/simple-commands/swarm-webui-integration.d.ts.map +1 -0
- package/dist/cli/simple-commands/swarm-webui-integration.js +265 -0
- package/dist/cli/simple-commands/swarm-webui-integration.js.map +1 -0
- package/dist/cli/simple-commands/swarm.d.ts +2 -0
- package/dist/cli/simple-commands/swarm.d.ts.map +1 -0
- package/dist/cli/simple-commands/swarm.js +1964 -0
- package/dist/cli/simple-commands/swarm.js.map +1 -0
- package/dist/cli/simple-commands/task.d.ts +2 -0
- package/dist/cli/simple-commands/task.d.ts.map +1 -0
- package/dist/cli/simple-commands/task.js +190 -0
- package/dist/cli/simple-commands/task.js.map +1 -0
- package/dist/cli/simple-commands/training.d.ts +2 -0
- package/dist/cli/simple-commands/training.d.ts.map +1 -0
- package/dist/cli/simple-commands/training.js +240 -0
- package/dist/cli/simple-commands/training.js.map +1 -0
- package/dist/cli/simple-commands/web-server.d.ts +152 -0
- package/dist/cli/simple-commands/web-server.d.ts.map +1 -0
- package/dist/cli/simple-commands/web-server.js +816 -0
- package/dist/cli/simple-commands/web-server.js.map +1 -0
- package/dist/cli/utils/interactive-detector.d.ts +25 -0
- package/dist/cli/utils/interactive-detector.d.ts.map +1 -0
- package/dist/cli/utils/interactive-detector.js +129 -0
- package/dist/cli/utils/interactive-detector.js.map +1 -0
- package/dist/cli/utils/safe-interactive.d.ts +30 -0
- package/dist/cli/utils/safe-interactive.d.ts.map +1 -0
- package/dist/cli/utils/safe-interactive.js +134 -0
- package/dist/cli/utils/safe-interactive.js.map +1 -0
- package/dist/cli/utils.d.ts +75 -0
- package/dist/cli/utils.d.ts.map +1 -0
- package/dist/cli/utils.js +567 -0
- package/dist/cli/utils.js.map +1 -0
- package/dist/config/config-manager.d.ts +212 -0
- package/dist/config/config-manager.d.ts.map +1 -0
- package/dist/config/config-manager.js +550 -0
- package/dist/config/config-manager.js.map +1 -0
- package/dist/constants/agent-types.d.ts +55 -0
- package/dist/constants/agent-types.d.ts.map +1 -0
- package/dist/constants/agent-types.js +66 -0
- package/dist/constants/agent-types.js.map +1 -0
- package/dist/coordination/advanced-scheduler.d.ts +121 -0
- package/dist/coordination/advanced-scheduler.d.ts.map +1 -0
- package/dist/coordination/advanced-scheduler.js +382 -0
- package/dist/coordination/advanced-scheduler.js.map +1 -0
- package/dist/coordination/background-executor.d.ts +69 -0
- package/dist/coordination/background-executor.d.ts.map +1 -0
- package/dist/coordination/background-executor.js +363 -0
- package/dist/coordination/background-executor.js.map +1 -0
- package/dist/coordination/circuit-breaker.d.ts +124 -0
- package/dist/coordination/circuit-breaker.d.ts.map +1 -0
- package/dist/coordination/circuit-breaker.js +301 -0
- package/dist/coordination/circuit-breaker.js.map +1 -0
- package/dist/coordination/conflict-resolution.d.ts +133 -0
- package/dist/coordination/conflict-resolution.d.ts.map +1 -0
- package/dist/coordination/conflict-resolution.js +360 -0
- package/dist/coordination/conflict-resolution.js.map +1 -0
- package/dist/coordination/dependency-graph.d.ts +78 -0
- package/dist/coordination/dependency-graph.d.ts.map +1 -0
- package/dist/coordination/dependency-graph.js +387 -0
- package/dist/coordination/dependency-graph.js.map +1 -0
- package/dist/coordination/manager.d.ts +66 -0
- package/dist/coordination/manager.d.ts.map +1 -0
- package/dist/coordination/manager.js +354 -0
- package/dist/coordination/manager.js.map +1 -0
- package/dist/coordination/messaging.d.ts +37 -0
- package/dist/coordination/messaging.d.ts.map +1 -0
- package/dist/coordination/messaging.js +219 -0
- package/dist/coordination/messaging.js.map +1 -0
- package/dist/coordination/metrics.d.ts +153 -0
- package/dist/coordination/metrics.d.ts.map +1 -0
- package/dist/coordination/metrics.js +436 -0
- package/dist/coordination/metrics.js.map +1 -0
- package/dist/coordination/resources.d.ts +36 -0
- package/dist/coordination/resources.d.ts.map +1 -0
- package/dist/coordination/resources.js +254 -0
- package/dist/coordination/resources.js.map +1 -0
- package/dist/coordination/scheduler.d.ts +48 -0
- package/dist/coordination/scheduler.d.ts.map +1 -0
- package/dist/coordination/scheduler.js +308 -0
- package/dist/coordination/scheduler.js.map +1 -0
- package/dist/coordination/swarm-coordinator.d.ts +116 -0
- package/dist/coordination/swarm-coordinator.d.ts.map +1 -0
- package/dist/coordination/swarm-coordinator.js +563 -0
- package/dist/coordination/swarm-coordinator.js.map +1 -0
- package/dist/coordination/swarm-monitor.d.ts +101 -0
- package/dist/coordination/swarm-monitor.d.ts.map +1 -0
- package/dist/coordination/swarm-monitor.js +340 -0
- package/dist/coordination/swarm-monitor.js.map +1 -0
- package/dist/coordination/work-stealing.d.ts +44 -0
- package/dist/coordination/work-stealing.d.ts.map +1 -0
- package/dist/coordination/work-stealing.js +158 -0
- package/dist/coordination/work-stealing.js.map +1 -0
- package/dist/core/config.d.ts +243 -0
- package/dist/core/config.d.ts.map +1 -0
- package/dist/core/config.js +1125 -0
- package/dist/core/config.js.map +1 -0
- package/dist/core/event-bus.d.ts +63 -0
- package/dist/core/event-bus.d.ts.map +1 -0
- package/dist/core/event-bus.js +153 -0
- package/dist/core/event-bus.js.map +1 -0
- package/dist/core/json-persistence.d.ts +55 -0
- package/dist/core/json-persistence.d.ts.map +1 -0
- package/dist/core/json-persistence.js +111 -0
- package/dist/core/json-persistence.js.map +1 -0
- package/dist/core/logger.d.ts +62 -0
- package/dist/core/logger.d.ts.map +1 -0
- package/dist/core/logger.js +252 -0
- package/dist/core/logger.js.map +1 -0
- package/dist/core/orchestrator-fixed.d.ts +81 -0
- package/dist/core/orchestrator-fixed.d.ts.map +1 -0
- package/dist/core/orchestrator-fixed.js +213 -0
- package/dist/core/orchestrator-fixed.js.map +1 -0
- package/dist/core/orchestrator.d.ts +123 -0
- package/dist/core/orchestrator.d.ts.map +1 -0
- package/dist/core/orchestrator.js +1058 -0
- package/dist/core/orchestrator.js.map +1 -0
- package/dist/enterprise/analytics-manager.d.ts +489 -0
- package/dist/enterprise/analytics-manager.d.ts.map +1 -0
- package/dist/enterprise/analytics-manager.js +956 -0
- package/dist/enterprise/analytics-manager.js.map +1 -0
- package/dist/enterprise/audit-manager.d.ts +459 -0
- package/dist/enterprise/audit-manager.d.ts.map +1 -0
- package/dist/enterprise/audit-manager.js +1014 -0
- package/dist/enterprise/audit-manager.js.map +1 -0
- package/dist/enterprise/cloud-manager.d.ts +435 -0
- package/dist/enterprise/cloud-manager.d.ts.map +1 -0
- package/dist/enterprise/cloud-manager.js +789 -0
- package/dist/enterprise/cloud-manager.js.map +1 -0
- package/dist/enterprise/deployment-manager.d.ts +328 -0
- package/dist/enterprise/deployment-manager.d.ts.map +1 -0
- package/dist/enterprise/deployment-manager.js +830 -0
- package/dist/enterprise/deployment-manager.js.map +1 -0
- package/dist/enterprise/project-manager.d.ts +228 -0
- package/dist/enterprise/project-manager.d.ts.map +1 -0
- package/dist/enterprise/project-manager.js +537 -0
- package/dist/enterprise/project-manager.js.map +1 -0
- package/dist/enterprise/security-manager.d.ts +422 -0
- package/dist/enterprise/security-manager.d.ts.map +1 -0
- package/dist/enterprise/security-manager.js +910 -0
- package/dist/enterprise/security-manager.js.map +1 -0
- package/dist/hive-mind/core/Agent.d.ts +137 -0
- package/dist/hive-mind/core/Agent.d.ts.map +1 -0
- package/dist/hive-mind/core/Agent.js +567 -0
- package/dist/hive-mind/core/Agent.js.map +1 -0
- package/dist/hive-mind/core/Communication.d.ts +116 -0
- package/dist/hive-mind/core/Communication.d.ts.map +1 -0
- package/dist/hive-mind/core/Communication.js +407 -0
- package/dist/hive-mind/core/Communication.js.map +1 -0
- package/dist/hive-mind/core/DatabaseManager.d.ts +99 -0
- package/dist/hive-mind/core/DatabaseManager.d.ts.map +1 -0
- package/dist/hive-mind/core/DatabaseManager.js +648 -0
- package/dist/hive-mind/core/DatabaseManager.js.map +1 -0
- package/dist/hive-mind/core/HiveMind.d.ts +90 -0
- package/dist/hive-mind/core/HiveMind.d.ts.map +1 -0
- package/dist/hive-mind/core/HiveMind.js +455 -0
- package/dist/hive-mind/core/HiveMind.js.map +1 -0
- package/dist/hive-mind/core/Memory.d.ts +235 -0
- package/dist/hive-mind/core/Memory.d.ts.map +1 -0
- package/dist/hive-mind/core/Memory.js +1192 -0
- package/dist/hive-mind/core/Memory.js.map +1 -0
- package/dist/hive-mind/core/Queen.d.ts +115 -0
- package/dist/hive-mind/core/Queen.d.ts.map +1 -0
- package/dist/hive-mind/core/Queen.js +649 -0
- package/dist/hive-mind/core/Queen.js.map +1 -0
- package/dist/hive-mind/integration/ConsensusEngine.d.ts +117 -0
- package/dist/hive-mind/integration/ConsensusEngine.d.ts.map +1 -0
- package/dist/hive-mind/integration/ConsensusEngine.js +478 -0
- package/dist/hive-mind/integration/ConsensusEngine.js.map +1 -0
- package/dist/hive-mind/integration/MCPToolWrapper.d.ts +172 -0
- package/dist/hive-mind/integration/MCPToolWrapper.d.ts.map +1 -0
- package/dist/hive-mind/integration/MCPToolWrapper.js +217 -0
- package/dist/hive-mind/integration/MCPToolWrapper.js.map +1 -0
- package/dist/hive-mind/integration/SwarmOrchestrator.d.ts +172 -0
- package/dist/hive-mind/integration/SwarmOrchestrator.d.ts.map +1 -0
- package/dist/hive-mind/integration/SwarmOrchestrator.js +748 -0
- package/dist/hive-mind/integration/SwarmOrchestrator.js.map +1 -0
- package/dist/hive-mind/types.d.ts +314 -0
- package/dist/hive-mind/types.d.ts.map +1 -0
- package/dist/hive-mind/types.js +7 -0
- package/dist/hive-mind/types.js.map +1 -0
- package/dist/mcp/auth.d.ts +80 -0
- package/dist/mcp/auth.d.ts.map +1 -0
- package/dist/mcp/auth.js +350 -0
- package/dist/mcp/auth.js.map +1 -0
- package/dist/mcp/claude-flow-tools.d.ts +13 -0
- package/dist/mcp/claude-flow-tools.d.ts.map +1 -0
- package/dist/mcp/claude-flow-tools.js +1176 -0
- package/dist/mcp/claude-flow-tools.js.map +1 -0
- package/dist/mcp/load-balancer.d.ts +88 -0
- package/dist/mcp/load-balancer.d.ts.map +1 -0
- package/dist/mcp/load-balancer.js +393 -0
- package/dist/mcp/load-balancer.js.map +1 -0
- package/dist/mcp/router.d.ts +54 -0
- package/dist/mcp/router.d.ts.map +1 -0
- package/dist/mcp/router.js +204 -0
- package/dist/mcp/router.js.map +1 -0
- package/dist/mcp/ruv-swarm-tools.d.ts +58 -0
- package/dist/mcp/ruv-swarm-tools.d.ts.map +1 -0
- package/dist/mcp/ruv-swarm-tools.js +548 -0
- package/dist/mcp/ruv-swarm-tools.js.map +1 -0
- package/dist/mcp/server.d.ts +75 -0
- package/dist/mcp/server.d.ts.map +1 -0
- package/dist/mcp/server.js +538 -0
- package/dist/mcp/server.js.map +1 -0
- package/dist/mcp/session-manager.d.ts +60 -0
- package/dist/mcp/session-manager.d.ts.map +1 -0
- package/dist/mcp/session-manager.js +323 -0
- package/dist/mcp/session-manager.js.map +1 -0
- package/dist/mcp/swarm-tools.d.ts +87 -0
- package/dist/mcp/swarm-tools.d.ts.map +1 -0
- package/dist/mcp/swarm-tools.js +731 -0
- package/dist/mcp/swarm-tools.js.map +1 -0
- package/dist/mcp/tools.d.ts +145 -0
- package/dist/mcp/tools.d.ts.map +1 -0
- package/dist/mcp/tools.js +434 -0
- package/dist/mcp/tools.js.map +1 -0
- package/dist/mcp/transports/base.d.ts +22 -0
- package/dist/mcp/transports/base.d.ts.map +1 -0
- package/dist/mcp/transports/base.js +5 -0
- package/dist/mcp/transports/base.js.map +1 -0
- package/dist/mcp/transports/http.d.ts +48 -0
- package/dist/mcp/transports/http.d.ts.map +1 -0
- package/dist/mcp/transports/http.js +400 -0
- package/dist/mcp/transports/http.js.map +1 -0
- package/dist/mcp/transports/stdio.d.ts +37 -0
- package/dist/mcp/transports/stdio.d.ts.map +1 -0
- package/dist/mcp/transports/stdio.js +206 -0
- package/dist/mcp/transports/stdio.js.map +1 -0
- package/dist/memory/advanced-serializer.d.ts +159 -0
- package/dist/memory/advanced-serializer.d.ts.map +1 -0
- package/dist/memory/advanced-serializer.js +564 -0
- package/dist/memory/advanced-serializer.js.map +1 -0
- package/dist/memory/backends/base.d.ts +21 -0
- package/dist/memory/backends/base.d.ts.map +1 -0
- package/dist/memory/backends/base.js +5 -0
- package/dist/memory/backends/base.js.map +1 -0
- package/dist/memory/backends/markdown.d.ts +35 -0
- package/dist/memory/backends/markdown.d.ts.map +1 -0
- package/dist/memory/backends/markdown.js +223 -0
- package/dist/memory/backends/markdown.js.map +1 -0
- package/dist/memory/backends/sqlite.d.ts +33 -0
- package/dist/memory/backends/sqlite.d.ts.map +1 -0
- package/dist/memory/backends/sqlite.js +291 -0
- package/dist/memory/backends/sqlite.js.map +1 -0
- package/dist/memory/cache.d.ts +65 -0
- package/dist/memory/cache.d.ts.map +1 -0
- package/dist/memory/cache.js +188 -0
- package/dist/memory/cache.js.map +1 -0
- package/dist/memory/distributed-memory.d.ts +188 -0
- package/dist/memory/distributed-memory.d.ts.map +1 -0
- package/dist/memory/distributed-memory.js +710 -0
- package/dist/memory/distributed-memory.js.map +1 -0
- package/dist/memory/enhanced-session-serializer.d.ts +115 -0
- package/dist/memory/enhanced-session-serializer.d.ts.map +1 -0
- package/dist/memory/enhanced-session-serializer.js +478 -0
- package/dist/memory/enhanced-session-serializer.js.map +1 -0
- package/dist/memory/fallback-store.d.ts +28 -0
- package/dist/memory/fallback-store.d.ts.map +1 -0
- package/dist/memory/fallback-store.js +101 -0
- package/dist/memory/fallback-store.js.map +1 -0
- package/dist/memory/in-memory-store.d.ts +37 -0
- package/dist/memory/in-memory-store.d.ts.map +1 -0
- package/dist/memory/in-memory-store.js +174 -0
- package/dist/memory/in-memory-store.js.map +1 -0
- package/dist/memory/indexer.d.ts +52 -0
- package/dist/memory/indexer.d.ts.map +1 -0
- package/dist/memory/indexer.js +191 -0
- package/dist/memory/indexer.js.map +1 -0
- package/dist/memory/manager.d.ts +58 -0
- package/dist/memory/manager.d.ts.map +1 -0
- package/dist/memory/manager.js +423 -0
- package/dist/memory/manager.js.map +1 -0
- package/dist/memory/sqlite-store.d.ts +34 -0
- package/dist/memory/sqlite-store.d.ts.map +1 -0
- package/dist/memory/sqlite-store.js +267 -0
- package/dist/memory/sqlite-store.js.map +1 -0
- package/dist/memory/sqlite-wrapper.d.ts +38 -0
- package/dist/memory/sqlite-wrapper.d.ts.map +1 -0
- package/dist/memory/sqlite-wrapper.js +152 -0
- package/dist/memory/sqlite-wrapper.js.map +1 -0
- package/dist/memory/swarm-memory.d.ts +91 -0
- package/dist/memory/swarm-memory.d.ts.map +1 -0
- package/dist/memory/swarm-memory.js +454 -0
- package/dist/memory/swarm-memory.js.map +1 -0
- package/dist/migration/logger.d.ts +26 -0
- package/dist/migration/logger.d.ts.map +1 -0
- package/dist/migration/logger.js +145 -0
- package/dist/migration/logger.js.map +1 -0
- package/dist/migration/migration-analyzer.d.ts +18 -0
- package/dist/migration/migration-analyzer.d.ts.map +1 -0
- package/dist/migration/migration-analyzer.js +284 -0
- package/dist/migration/migration-analyzer.js.map +1 -0
- package/dist/migration/migration-runner.d.ts +26 -0
- package/dist/migration/migration-runner.d.ts.map +1 -0
- package/dist/migration/migration-runner.js +505 -0
- package/dist/migration/migration-runner.js.map +1 -0
- package/dist/migration/migration-validator.d.ts +17 -0
- package/dist/migration/migration-validator.d.ts.map +1 -0
- package/dist/migration/migration-validator.js +309 -0
- package/dist/migration/migration-validator.js.map +1 -0
- package/dist/migration/progress-reporter.d.ts +28 -0
- package/dist/migration/progress-reporter.d.ts.map +1 -0
- package/dist/migration/progress-reporter.js +163 -0
- package/dist/migration/progress-reporter.js.map +1 -0
- package/dist/migration/rollback-manager.d.ts +24 -0
- package/dist/migration/rollback-manager.d.ts.map +1 -0
- package/dist/migration/rollback-manager.js +351 -0
- package/dist/migration/rollback-manager.js.map +1 -0
- package/dist/migration/types.d.ts +103 -0
- package/dist/migration/types.d.ts.map +1 -0
- package/dist/migration/types.js +6 -0
- package/dist/migration/types.js.map +1 -0
- package/dist/swarm/types.d.ts +578 -0
- package/dist/swarm/types.d.ts.map +1 -0
- package/dist/swarm/types.js +54 -0
- package/dist/swarm/types.js.map +1 -0
- package/dist/terminal/adapters/base.d.ts +40 -0
- package/dist/terminal/adapters/base.d.ts.map +1 -0
- package/dist/terminal/adapters/base.js +5 -0
- package/dist/terminal/adapters/base.js.map +1 -0
- package/dist/terminal/adapters/native.d.ts +19 -0
- package/dist/terminal/adapters/native.d.ts.map +1 -0
- package/dist/terminal/adapters/native.js +414 -0
- package/dist/terminal/adapters/native.js.map +1 -0
- package/dist/terminal/adapters/vscode.d.ts +23 -0
- package/dist/terminal/adapters/vscode.d.ts.map +1 -0
- package/dist/terminal/adapters/vscode.js +267 -0
- package/dist/terminal/adapters/vscode.js.map +1 -0
- package/dist/terminal/manager.d.ts +59 -0
- package/dist/terminal/manager.d.ts.map +1 -0
- package/dist/terminal/manager.js +235 -0
- package/dist/terminal/manager.js.map +1 -0
- package/dist/terminal/pool.d.ts +32 -0
- package/dist/terminal/pool.d.ts.map +1 -0
- package/dist/terminal/pool.js +208 -0
- package/dist/terminal/pool.js.map +1 -0
- package/dist/terminal/session.d.ts +41 -0
- package/dist/terminal/session.d.ts.map +1 -0
- package/dist/terminal/session.js +210 -0
- package/dist/terminal/session.js.map +1 -0
- package/dist/utils/error-handler.d.ts +14 -0
- package/dist/utils/error-handler.d.ts.map +1 -0
- package/dist/utils/error-handler.js +29 -0
- package/dist/utils/error-handler.js.map +1 -0
- package/dist/utils/errors.d.ts +121 -0
- package/dist/utils/errors.d.ts.map +1 -0
- package/dist/utils/errors.js +194 -0
- package/dist/utils/errors.js.map +1 -0
- package/dist/utils/formatters.d.ts +15 -0
- package/dist/utils/formatters.d.ts.map +1 -0
- package/dist/utils/formatters.js +75 -0
- package/dist/utils/formatters.js.map +1 -0
- package/dist/utils/helpers.d.ts +134 -0
- package/dist/utils/helpers.d.ts.map +1 -0
- package/dist/utils/helpers.js +444 -0
- package/dist/utils/helpers.js.map +1 -0
- package/dist/utils/npx-isolated-cache.d.ts +17 -0
- package/dist/utils/npx-isolated-cache.d.ts.map +1 -0
- package/dist/utils/npx-isolated-cache.js +140 -0
- package/dist/utils/npx-isolated-cache.js.map +1 -0
- package/dist/utils/type-guards.d.ts +117 -0
- package/dist/utils/type-guards.d.ts.map +1 -0
- package/dist/utils/type-guards.js +166 -0
- package/dist/utils/type-guards.js.map +1 -0
- package/dist/utils/types.d.ts +568 -0
- package/dist/utils/types.d.ts.map +1 -0
- package/dist/utils/types.js +37 -0
- package/dist/utils/types.js.map +1 -0
- package/package.json +12 -5
- package/src/agents/agent-manager.ts +432 -0
- package/src/cli/agents/index.ts +15 -1
- package/src/cli/command-registry.js +24 -0
- package/src/cli/commands/hive-mind/spawn.ts +18 -0
- package/src/cli/commands/maestro.ts +317 -0
- package/src/cli/commands/status.ts +1 -1
- package/src/cli/help-text.js +3 -3
- package/src/cli/index-remote.ts +1 -1
- package/src/cli/index.ts +1 -1
- package/src/cli/maestro-cli-bridge.ts +556 -0
- package/src/cli/node-compat.js +4 -23
- package/src/cli/runtime-detector.js +2 -2
- package/src/cli/simple-cli.js +1 -1
- package/src/cli/simple-cli.ts +1 -1
- package/src/cli/simple-commands/batch-manager.js +6 -5
- package/src/cli/simple-commands/github/github-api.js +159 -0
- package/src/cli/simple-commands/hive-mind/session-manager.js +38 -40
- package/src/cli/simple-commands/init/batch-init.js +13 -12
- package/src/cli/simple-commands/init/claude-commands/claude-flow-commands.js +4 -3
- package/src/cli/simple-commands/init/claude-commands/optimized-claude-flow-commands.js +4 -3
- package/src/cli/simple-commands/init/claude-commands/optimized-slash-commands.js +4 -4
- package/src/cli/simple-commands/init/index.js +72 -49
- package/src/cli/simple-commands/init/rollback/backup-manager.js +5 -4
- package/src/cli/simple-commands/init/rollback/rollback-executor.js +23 -22
- package/src/cli/simple-commands/init/rollback/state-tracker.js +3 -2
- package/src/cli/simple-commands/init/sparc-structure.js +9 -7
- package/src/cli/simple-commands/init/template-copier.js +1 -1
- package/src/cli/simple-commands/init/templates/CLAUDE.md +3 -3
- package/src/cli/simple-commands/init/templates/github-safe-enhanced.js +333 -0
- package/src/cli/simple-commands/init/validation/config-validator.js +8 -7
- package/src/cli/simple-commands/init/validation/health-checker.js +6 -5
- package/src/cli/simple-commands/init/validation/mode-validator.js +4 -3
- package/src/cli/simple-commands/init/validation/post-init-validator.js +15 -14
- package/src/cli/simple-commands/init/validation/test-runner.js +10 -10
- package/src/cli/simple-commands/memory.js +8 -7
- package/src/cli/simple-commands/process-ui-enhanced.js +2 -2
- package/src/cli/simple-commands/process-ui.js +2 -2
- package/src/cli/simple-commands/sparc-modes/index.js +1 -1
- package/src/cli/simple-commands/sparc.js +28 -26
- package/src/cli/simple-commands/start-wrapper.js +6 -5
- package/src/cli/simple-commands/status.js +4 -3
- package/src/cli/simple-commands/swarm-executor.js +8 -3
- package/src/cli/simple-commands/swarm.js +270 -24
- package/src/cli/simple-commands/webui-validator.js +4 -3
- package/src/cli/swarm-standalone.js +5 -5
- package/src/cli/utils.js +54 -66
- package/src/hive-mind/core/HiveMind.ts +16 -0
- package/src/hive-mind/types.ts +38 -5
- package/src/hooks/index.ts +192 -0
- package/src/maestro/maestro-swarm-coordinator.ts +602 -0
- package/src/maestro/maestro-types.ts +386 -0
- package/src/maestro/tests/native-hive-mind-integration.test.ts +480 -0
- package/src/memory/advanced-serializer.js +611 -0
- package/src/memory/enhanced-session-serializer.js +523 -0
- package/src/memory/in-memory-store.js +6 -4
- package/src/memory/sqlite-store.js +5 -4
- package/src/swarm/types.ts +10 -3
- package/src/utils/__tests__/github-cli-safety-wrapper.test.js +408 -0
- package/src/utils/github-cli-safe.js +37 -119
- package/src/utils/github-cli-safety-wrapper.js +587 -0
- package/src/utils/types.ts +60 -2
|
@@ -0,0 +1,333 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Enhanced Safe GitHub CLI Helper - Production Ready
|
|
5
|
+
* Uses the comprehensive GitHubCliSafe wrapper for secure command execution
|
|
6
|
+
*
|
|
7
|
+
* Prevents:
|
|
8
|
+
* - Timeout issues with large content
|
|
9
|
+
* - Command injection attacks
|
|
10
|
+
* - Process resource leaks
|
|
11
|
+
* - Rate limiting issues
|
|
12
|
+
* - Input validation bypasses
|
|
13
|
+
*
|
|
14
|
+
* Usage:
|
|
15
|
+
* ./github-safe-enhanced.js issue comment 123 "Message with `backticks` and $(dangerous) content"
|
|
16
|
+
* ./github-safe-enhanced.js pr create --title "Title" --body "Complex body with special chars"
|
|
17
|
+
* ./github-safe-enhanced.js issue create --title "Bug Report" --body "Long description..." --labels "bug,urgent"
|
|
18
|
+
* ./github-safe-enhanced.js release create v1.0.0 --title "Release v1.0.0" --body "Release notes..."
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
// Import the production-ready GitHub CLI safety wrapper
|
|
22
|
+
import { githubCli, GitHubCliError, GitHubCliTimeoutError, GitHubCliValidationError } from '../../../utils/github-cli-safety-wrapper.js';
|
|
23
|
+
|
|
24
|
+
const args = process.argv.slice(2);
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Show help message
|
|
28
|
+
*/
|
|
29
|
+
function showHelp() {
|
|
30
|
+
console.log(`
|
|
31
|
+
🛡️ Enhanced Safe GitHub CLI Helper
|
|
32
|
+
|
|
33
|
+
FEATURES:
|
|
34
|
+
✅ Injection attack prevention
|
|
35
|
+
✅ Timeout handling with cleanup
|
|
36
|
+
✅ Input validation and sanitization
|
|
37
|
+
✅ Rate limiting protection
|
|
38
|
+
✅ Comprehensive error handling
|
|
39
|
+
✅ Process resource management
|
|
40
|
+
|
|
41
|
+
USAGE:
|
|
42
|
+
./github-safe-enhanced.js <command> <subcommand> [arguments] [options]
|
|
43
|
+
|
|
44
|
+
COMMANDS:
|
|
45
|
+
Issue Operations:
|
|
46
|
+
issue create --title "Title" --body "Body" [--labels "label1,label2"] [--assignees "user1,user2"]
|
|
47
|
+
issue comment <number> "Comment body"
|
|
48
|
+
|
|
49
|
+
Pull Request Operations:
|
|
50
|
+
pr create --title "Title" --body "Body" [--base branch] [--head branch] [--draft]
|
|
51
|
+
pr comment <number> "Comment body"
|
|
52
|
+
|
|
53
|
+
Release Operations:
|
|
54
|
+
release create <tag> --title "Title" --body "Body" [--prerelease] [--draft]
|
|
55
|
+
|
|
56
|
+
OPTIONS:
|
|
57
|
+
--timeout <ms> Override default timeout (30000ms)
|
|
58
|
+
--verbose Enable detailed logging
|
|
59
|
+
--dry-run Show what would be executed without running
|
|
60
|
+
--help Show this help message
|
|
61
|
+
|
|
62
|
+
EXAMPLES:
|
|
63
|
+
# Create issue with special characters safely
|
|
64
|
+
./github-safe-enhanced.js issue create \\
|
|
65
|
+
--title "Bug: Login fails with special chars" \\
|
|
66
|
+
--body "Steps: 1. Enter \`user@domain.com\` 2. Use password with \$(special) chars" \\
|
|
67
|
+
--labels "bug,high-priority"
|
|
68
|
+
|
|
69
|
+
# Add comment with code blocks
|
|
70
|
+
./github-safe-enhanced.js issue comment 123 \\
|
|
71
|
+
"Fixed in commit abc123. Test with: \`npm test && npm run build\`"
|
|
72
|
+
|
|
73
|
+
# Create PR with complex body
|
|
74
|
+
./github-safe-enhanced.js pr create \\
|
|
75
|
+
--title "Feature: Add authentication" \\
|
|
76
|
+
--body "## Changes\\n- Added JWT auth\\n- Updated tests\\n\\n\`\`\`js\\nconst token = jwt.sign(payload);\\n\`\`\`" \\
|
|
77
|
+
--base main --head feature/auth
|
|
78
|
+
|
|
79
|
+
# Create release with detailed notes
|
|
80
|
+
./github-safe-enhanced.js release create v2.1.0 \\
|
|
81
|
+
--title "Version 2.1.0 - Security Update" \\
|
|
82
|
+
--body "## Features\\n- Enhanced security\\n- Bug fixes\\n\\n## Breaking Changes\\nNone"
|
|
83
|
+
|
|
84
|
+
SECURITY FEATURES:
|
|
85
|
+
🔒 Blocks dangerous patterns: \$(cmd), \`cmd\`, eval(), exec()
|
|
86
|
+
🔒 Prevents command chaining: &&, ||, ;
|
|
87
|
+
🔒 Validates file sizes and input lengths
|
|
88
|
+
🔒 Uses secure temporary files with restricted permissions
|
|
89
|
+
🔒 Implements proper process cleanup and timeout handling
|
|
90
|
+
`);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Parse command line arguments into structured format
|
|
95
|
+
*/
|
|
96
|
+
function parseArguments(args) {
|
|
97
|
+
if (args.length === 0 || args.includes('--help')) {
|
|
98
|
+
showHelp();
|
|
99
|
+
process.exit(0);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
const [command, subcommand, ...restArgs] = args;
|
|
103
|
+
const options = {};
|
|
104
|
+
const positionalArgs = [];
|
|
105
|
+
|
|
106
|
+
// Parse flags and options
|
|
107
|
+
for (let i = 0; i < restArgs.length; i++) {
|
|
108
|
+
const arg = restArgs[i];
|
|
109
|
+
|
|
110
|
+
if (arg.startsWith('--')) {
|
|
111
|
+
const flagName = arg.substring(2);
|
|
112
|
+
const nextArg = restArgs[i + 1];
|
|
113
|
+
|
|
114
|
+
if (nextArg && !nextArg.startsWith('--')) {
|
|
115
|
+
options[flagName] = nextArg;
|
|
116
|
+
i++; // Skip the next argument
|
|
117
|
+
} else {
|
|
118
|
+
options[flagName] = true;
|
|
119
|
+
}
|
|
120
|
+
} else {
|
|
121
|
+
positionalArgs.push(arg);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
return { command, subcommand, positionalArgs, options };
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* Execute GitHub CLI command safely
|
|
130
|
+
*/
|
|
131
|
+
async function executeCommand(command, subcommand, positionalArgs, options) {
|
|
132
|
+
try {
|
|
133
|
+
// Handle dry-run mode
|
|
134
|
+
if (options['dry-run']) {
|
|
135
|
+
console.log('🔍 DRY RUN MODE - Would execute:');
|
|
136
|
+
console.log(`Command: ${command} ${subcommand}`);
|
|
137
|
+
console.log(`Arguments:`, positionalArgs);
|
|
138
|
+
console.log(`Options:`, options);
|
|
139
|
+
return;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
// Configure GitHub CLI wrapper
|
|
143
|
+
const cliOptions = {
|
|
144
|
+
timeout: parseInt(options.timeout) || 30000,
|
|
145
|
+
enableLogging: options.verbose || false
|
|
146
|
+
};
|
|
147
|
+
|
|
148
|
+
let result;
|
|
149
|
+
|
|
150
|
+
// Route to appropriate method based on command
|
|
151
|
+
if (command === 'issue') {
|
|
152
|
+
result = await handleIssueCommand(subcommand, positionalArgs, options, cliOptions);
|
|
153
|
+
} else if (command === 'pr') {
|
|
154
|
+
result = await handlePRCommand(subcommand, positionalArgs, options, cliOptions);
|
|
155
|
+
} else if (command === 'release') {
|
|
156
|
+
result = await handleReleaseCommand(subcommand, positionalArgs, options, cliOptions);
|
|
157
|
+
} else {
|
|
158
|
+
throw new Error(`Unsupported command: ${command}`);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
// Output result
|
|
162
|
+
console.log('✅ Command executed successfully');
|
|
163
|
+
if (options.verbose && result.stdout) {
|
|
164
|
+
console.log('Output:', result.stdout);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
} catch (error) {
|
|
168
|
+
console.error('❌ Command failed:', error.message);
|
|
169
|
+
|
|
170
|
+
if (error instanceof GitHubCliTimeoutError) {
|
|
171
|
+
console.error('💡 Try increasing timeout with --timeout <ms>');
|
|
172
|
+
} else if (error instanceof GitHubCliValidationError) {
|
|
173
|
+
console.error('💡 Input validation failed. Check for dangerous characters or patterns.');
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
if (options.verbose && error.details) {
|
|
177
|
+
console.error('Details:', error.details);
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
process.exit(1);
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* Handle issue commands
|
|
186
|
+
*/
|
|
187
|
+
async function handleIssueCommand(subcommand, positionalArgs, options, cliOptions) {
|
|
188
|
+
if (subcommand === 'create') {
|
|
189
|
+
if (!options.title || !options.body) {
|
|
190
|
+
throw new Error('Issue creation requires --title and --body options');
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
return await githubCli.createIssue({
|
|
194
|
+
title: options.title,
|
|
195
|
+
body: options.body,
|
|
196
|
+
labels: options.labels ? options.labels.split(',') : [],
|
|
197
|
+
assignees: options.assignees ? options.assignees.split(',') : [],
|
|
198
|
+
...cliOptions
|
|
199
|
+
});
|
|
200
|
+
|
|
201
|
+
} else if (subcommand === 'comment') {
|
|
202
|
+
const [issueNumber] = positionalArgs;
|
|
203
|
+
const body = positionalArgs[1] || options.body;
|
|
204
|
+
|
|
205
|
+
if (!issueNumber || !body) {
|
|
206
|
+
throw new Error('Issue comment requires issue number and body');
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
return await githubCli.addIssueComment(parseInt(issueNumber), body, cliOptions);
|
|
210
|
+
|
|
211
|
+
} else {
|
|
212
|
+
throw new Error(`Unsupported issue subcommand: ${subcommand}`);
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
/**
|
|
217
|
+
* Handle PR commands
|
|
218
|
+
*/
|
|
219
|
+
async function handlePRCommand(subcommand, positionalArgs, options, cliOptions) {
|
|
220
|
+
if (subcommand === 'create') {
|
|
221
|
+
if (!options.title || !options.body) {
|
|
222
|
+
throw new Error('PR creation requires --title and --body options');
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
return await githubCli.createPR({
|
|
226
|
+
title: options.title,
|
|
227
|
+
body: options.body,
|
|
228
|
+
base: options.base || 'main',
|
|
229
|
+
head: options.head,
|
|
230
|
+
draft: options.draft || false,
|
|
231
|
+
...cliOptions
|
|
232
|
+
});
|
|
233
|
+
|
|
234
|
+
} else if (subcommand === 'comment') {
|
|
235
|
+
const [prNumber] = positionalArgs;
|
|
236
|
+
const body = positionalArgs[1] || options.body;
|
|
237
|
+
|
|
238
|
+
if (!prNumber || !body) {
|
|
239
|
+
throw new Error('PR comment requires PR number and body');
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
return await githubCli.addPRComment(parseInt(prNumber), body, cliOptions);
|
|
243
|
+
|
|
244
|
+
} else {
|
|
245
|
+
throw new Error(`Unsupported PR subcommand: ${subcommand}`);
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
/**
|
|
250
|
+
* Handle release commands
|
|
251
|
+
*/
|
|
252
|
+
async function handleReleaseCommand(subcommand, positionalArgs, options, cliOptions) {
|
|
253
|
+
if (subcommand === 'create') {
|
|
254
|
+
const [tag] = positionalArgs;
|
|
255
|
+
|
|
256
|
+
if (!tag || !options.title || !options.body) {
|
|
257
|
+
throw new Error('Release creation requires tag, --title, and --body');
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
return await githubCli.createRelease({
|
|
261
|
+
tag,
|
|
262
|
+
title: options.title,
|
|
263
|
+
body: options.body,
|
|
264
|
+
prerelease: options.prerelease || false,
|
|
265
|
+
draft: options.draft || false,
|
|
266
|
+
...cliOptions
|
|
267
|
+
});
|
|
268
|
+
|
|
269
|
+
} else {
|
|
270
|
+
throw new Error(`Unsupported release subcommand: ${subcommand}`);
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
/**
|
|
275
|
+
* Main execution
|
|
276
|
+
*/
|
|
277
|
+
async function main() {
|
|
278
|
+
try {
|
|
279
|
+
// Parse arguments
|
|
280
|
+
const { command, subcommand, positionalArgs, options } = parseArguments(args);
|
|
281
|
+
|
|
282
|
+
// Check GitHub CLI availability
|
|
283
|
+
const isAvailable = await githubCli.checkGitHubCli();
|
|
284
|
+
if (!isAvailable) {
|
|
285
|
+
console.error('❌ GitHub CLI is not installed or not in PATH');
|
|
286
|
+
console.error('💡 Install from: https://cli.github.com/');
|
|
287
|
+
process.exit(1);
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
// Check authentication (unless dry-run)
|
|
291
|
+
if (!options['dry-run']) {
|
|
292
|
+
const isAuthenticated = await githubCli.checkAuthentication();
|
|
293
|
+
if (!isAuthenticated) {
|
|
294
|
+
console.error('❌ GitHub CLI is not authenticated');
|
|
295
|
+
console.error('💡 Run: gh auth login');
|
|
296
|
+
process.exit(1);
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
// Execute command
|
|
301
|
+
await executeCommand(command, subcommand, positionalArgs, options);
|
|
302
|
+
|
|
303
|
+
} catch (error) {
|
|
304
|
+
console.error('❌ Unexpected error:', error.message);
|
|
305
|
+
if (args.includes('--verbose')) {
|
|
306
|
+
console.error('Stack trace:', error.stack);
|
|
307
|
+
}
|
|
308
|
+
process.exit(1);
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
// Handle process cleanup
|
|
313
|
+
process.on('SIGINT', async () => {
|
|
314
|
+
console.log('\n🛑 Received interrupt signal, cleaning up...');
|
|
315
|
+
await githubCli.cleanup();
|
|
316
|
+
process.exit(0);
|
|
317
|
+
});
|
|
318
|
+
|
|
319
|
+
process.on('SIGTERM', async () => {
|
|
320
|
+
console.log('\n🛑 Received termination signal, cleaning up...');
|
|
321
|
+
await githubCli.cleanup();
|
|
322
|
+
process.exit(0);
|
|
323
|
+
});
|
|
324
|
+
|
|
325
|
+
// Run if called directly
|
|
326
|
+
if (import.meta.main || process.argv[1].endsWith('github-safe-enhanced.js')) {
|
|
327
|
+
main().catch(error => {
|
|
328
|
+
console.error('💥 Fatal error:', error.message);
|
|
329
|
+
process.exit(1);
|
|
330
|
+
});
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
export { executeCommand, handleIssueCommand, handlePRCommand, handleReleaseCommand };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { promises as fs } from 'fs';
|
|
1
2
|
// config-validator.js - Configuration file validation
|
|
2
3
|
|
|
3
4
|
export class ConfigValidator {
|
|
@@ -20,7 +21,7 @@ export class ConfigValidator {
|
|
|
20
21
|
|
|
21
22
|
try {
|
|
22
23
|
// Check if file exists
|
|
23
|
-
const stat = await
|
|
24
|
+
const stat = await fs.stat(roomodesPath);
|
|
24
25
|
if (!stat.isFile) {
|
|
25
26
|
result.success = false;
|
|
26
27
|
result.errors.push('.roomodes exists but is not a file');
|
|
@@ -28,7 +29,7 @@ export class ConfigValidator {
|
|
|
28
29
|
}
|
|
29
30
|
|
|
30
31
|
// Read and parse JSON
|
|
31
|
-
const content = await
|
|
32
|
+
const content = await fs.readFile(roomodesPath, 'utf8');
|
|
32
33
|
|
|
33
34
|
try {
|
|
34
35
|
const config = JSON.parse(content);
|
|
@@ -71,7 +72,7 @@ export class ConfigValidator {
|
|
|
71
72
|
const claudeMdPath = `${this.workingDir}/CLAUDE.md`;
|
|
72
73
|
|
|
73
74
|
try {
|
|
74
|
-
const content = await
|
|
75
|
+
const content = await fs.readFile(claudeMdPath, 'utf8');
|
|
75
76
|
result.content = content;
|
|
76
77
|
|
|
77
78
|
// Check for required sections
|
|
@@ -123,7 +124,7 @@ export class ConfigValidator {
|
|
|
123
124
|
const memoryDataPath = `${this.workingDir}/memory/claude-flow-data.json`;
|
|
124
125
|
|
|
125
126
|
try {
|
|
126
|
-
const content = await
|
|
127
|
+
const content = await fs.readFile(memoryDataPath, 'utf8');
|
|
127
128
|
|
|
128
129
|
try {
|
|
129
130
|
const data = JSON.parse(content);
|
|
@@ -162,7 +163,7 @@ export class ConfigValidator {
|
|
|
162
163
|
const coordinationPath = `${this.workingDir}/coordination.md`;
|
|
163
164
|
|
|
164
165
|
try {
|
|
165
|
-
const content = await
|
|
166
|
+
const content = await fs.readFile(coordinationPath, 'utf8');
|
|
166
167
|
result.content = content;
|
|
167
168
|
|
|
168
169
|
// Check for required sections
|
|
@@ -203,7 +204,7 @@ export class ConfigValidator {
|
|
|
203
204
|
const executablePath = `${this.workingDir}/claude-flow`;
|
|
204
205
|
|
|
205
206
|
try {
|
|
206
|
-
const stat = await
|
|
207
|
+
const stat = await fs.stat(executablePath);
|
|
207
208
|
|
|
208
209
|
if (!stat.isFile) {
|
|
209
210
|
result.success = false;
|
|
@@ -220,7 +221,7 @@ export class ConfigValidator {
|
|
|
220
221
|
}
|
|
221
222
|
|
|
222
223
|
// Read and validate content
|
|
223
|
-
const content = await
|
|
224
|
+
const content = await fs.readFile(executablePath, 'utf8');
|
|
224
225
|
|
|
225
226
|
// Check for required elements
|
|
226
227
|
if (content.includes('#!/usr/bin/env')) {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { promises as fs } from 'fs';
|
|
1
2
|
// health-checker.js - System health checks for SPARC initialization
|
|
2
3
|
|
|
3
4
|
export class HealthChecker {
|
|
@@ -108,7 +109,7 @@ export class HealthChecker {
|
|
|
108
109
|
const templatePath = `${this.workingDir}/${template}`;
|
|
109
110
|
|
|
110
111
|
try {
|
|
111
|
-
const content = await
|
|
112
|
+
const content = await fs.readFile(templatePath, 'utf8');
|
|
112
113
|
if (content.length < 50) {
|
|
113
114
|
result.templates.corrupted.push(template);
|
|
114
115
|
} else {
|
|
@@ -277,7 +278,7 @@ export class HealthChecker {
|
|
|
277
278
|
try {
|
|
278
279
|
// Check if mode exists in .roomodes
|
|
279
280
|
const roomodesPath = `${this.workingDir}/.roomodes`;
|
|
280
|
-
const content = await
|
|
281
|
+
const content = await fs.readFile(roomodesPath, 'utf8');
|
|
281
282
|
const config = JSON.parse(content);
|
|
282
283
|
|
|
283
284
|
return !!(config.modes && config.modes[mode]);
|
|
@@ -326,7 +327,7 @@ export class HealthChecker {
|
|
|
326
327
|
try {
|
|
327
328
|
// Compare .roomodes with slash commands
|
|
328
329
|
const roomodesPath = `${this.workingDir}/.roomodes`;
|
|
329
|
-
const content = await
|
|
330
|
+
const content = await fs.readFile(roomodesPath, 'utf8');
|
|
330
331
|
const config = JSON.parse(content);
|
|
331
332
|
|
|
332
333
|
if (config.modes) {
|
|
@@ -368,7 +369,7 @@ export class HealthChecker {
|
|
|
368
369
|
|
|
369
370
|
try {
|
|
370
371
|
const claudePath = `${this.workingDir}/CLAUDE.md`;
|
|
371
|
-
const content = await
|
|
372
|
+
const content = await fs.readFile(claudePath, 'utf8');
|
|
372
373
|
|
|
373
374
|
// Check if mentioned commands exist
|
|
374
375
|
const mentionedCommands = ['claude-flow sparc', 'npm run build', 'npm run test'];
|
|
@@ -405,7 +406,7 @@ export class HealthChecker {
|
|
|
405
406
|
try {
|
|
406
407
|
// Check if memory structure matches documentation
|
|
407
408
|
const memoryDataPath = `${this.workingDir}/memory/claude-flow-data.json`;
|
|
408
|
-
const data = JSON.parse(await
|
|
409
|
+
const data = JSON.parse(await fs.readFile(memoryDataPath, 'utf8'));
|
|
409
410
|
|
|
410
411
|
// Basic structure validation
|
|
411
412
|
if (!data.agents || !data.tasks) {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { promises as fs } from 'fs';
|
|
1
2
|
// mode-validator.js - SPARC mode functionality testing
|
|
2
3
|
|
|
3
4
|
export class ModeValidator {
|
|
@@ -143,7 +144,7 @@ export class ModeValidator {
|
|
|
143
144
|
try {
|
|
144
145
|
// Try to get modes from .roomodes
|
|
145
146
|
const roomodesPath = `${this.workingDir}/.roomodes`;
|
|
146
|
-
const content = await
|
|
147
|
+
const content = await fs.readFile(roomodesPath, 'utf8');
|
|
147
148
|
const config = JSON.parse(content);
|
|
148
149
|
|
|
149
150
|
if (config.modes && typeof config.modes === 'object') {
|
|
@@ -210,7 +211,7 @@ export class ModeValidator {
|
|
|
210
211
|
try {
|
|
211
212
|
// Read .roomodes and validate mode config
|
|
212
213
|
const roomodesPath = `${this.workingDir}/.roomodes`;
|
|
213
|
-
const content = await
|
|
214
|
+
const content = await fs.readFile(roomodesPath, 'utf8');
|
|
214
215
|
const config = JSON.parse(content);
|
|
215
216
|
|
|
216
217
|
if (!config.modes || !config.modes[modeName]) {
|
|
@@ -355,7 +356,7 @@ export class ModeValidator {
|
|
|
355
356
|
|
|
356
357
|
try {
|
|
357
358
|
const workflowPath = `${this.workingDir}/.roo/workflows/${filename}`;
|
|
358
|
-
const content = await
|
|
359
|
+
const content = await fs.readFile(workflowPath, 'utf8');
|
|
359
360
|
|
|
360
361
|
// Parse JSON
|
|
361
362
|
const workflow = JSON.parse(content);
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { promises as fs } from 'fs';
|
|
1
2
|
// post-init-validator.js - Post-initialization verification checks
|
|
2
3
|
|
|
3
4
|
export class PostInitValidator {
|
|
@@ -30,7 +31,7 @@ export class PostInitValidator {
|
|
|
30
31
|
const filePath = `${this.workingDir}/${file.path}`;
|
|
31
32
|
|
|
32
33
|
try {
|
|
33
|
-
const stat = await
|
|
34
|
+
const stat = await fs.stat(filePath);
|
|
34
35
|
|
|
35
36
|
// Check if it exists and is a file
|
|
36
37
|
if (!stat.isFile) {
|
|
@@ -62,7 +63,7 @@ export class PostInitValidator {
|
|
|
62
63
|
|
|
63
64
|
// Try to read the file
|
|
64
65
|
try {
|
|
65
|
-
await
|
|
66
|
+
await fs.readFile(filePath, 'utf8');
|
|
66
67
|
result.files[file.path] = { status: 'ok', size: stat.size };
|
|
67
68
|
} catch (readError) {
|
|
68
69
|
result.success = false;
|
|
@@ -117,7 +118,7 @@ export class PostInitValidator {
|
|
|
117
118
|
const dirPath = `${this.workingDir}/${dir}`;
|
|
118
119
|
|
|
119
120
|
try {
|
|
120
|
-
const stat = await
|
|
121
|
+
const stat = await fs.stat(dirPath);
|
|
121
122
|
if (!stat.isDirectory) {
|
|
122
123
|
result.success = false;
|
|
123
124
|
result.errors.push(`Expected directory but found file: ${dir}`);
|
|
@@ -135,7 +136,7 @@ export class PostInitValidator {
|
|
|
135
136
|
const dirPath = `${this.workingDir}/${dir}`;
|
|
136
137
|
|
|
137
138
|
try {
|
|
138
|
-
await
|
|
139
|
+
await fs.stat(dirPath);
|
|
139
140
|
} catch {
|
|
140
141
|
if (dir.includes('.roo') || dir.includes('sparc')) {
|
|
141
142
|
result.warnings.push(`Optional SPARC directory missing: ${dir}`);
|
|
@@ -227,7 +228,7 @@ export class PostInitValidator {
|
|
|
227
228
|
const itemPath = `${this.workingDir}/${item.path}`;
|
|
228
229
|
|
|
229
230
|
try {
|
|
230
|
-
const stat = await
|
|
231
|
+
const stat = await fs.stat(itemPath);
|
|
231
232
|
const actualMode = stat.mode & 0o777;
|
|
232
233
|
const expectedMode = item.requiredMode;
|
|
233
234
|
|
|
@@ -265,7 +266,7 @@ export class PostInitValidator {
|
|
|
265
266
|
|
|
266
267
|
for (const dir of expectedDirs) {
|
|
267
268
|
try {
|
|
268
|
-
await
|
|
269
|
+
await fs.stat(`${this.workingDir}/memory/${dir}`);
|
|
269
270
|
structure.dirs.push(dir);
|
|
270
271
|
} catch {
|
|
271
272
|
structure.valid = false;
|
|
@@ -274,7 +275,7 @@ export class PostInitValidator {
|
|
|
274
275
|
|
|
275
276
|
for (const file of expectedFiles) {
|
|
276
277
|
try {
|
|
277
|
-
await
|
|
278
|
+
await fs.stat(`${this.workingDir}/memory/${file}`);
|
|
278
279
|
structure.files.push(file);
|
|
279
280
|
} catch {
|
|
280
281
|
structure.valid = false;
|
|
@@ -294,7 +295,7 @@ export class PostInitValidator {
|
|
|
294
295
|
|
|
295
296
|
for (const dir of expectedDirs) {
|
|
296
297
|
try {
|
|
297
|
-
await
|
|
298
|
+
await fs.stat(`${this.workingDir}/coordination/${dir}`);
|
|
298
299
|
structure.dirs.push(dir);
|
|
299
300
|
} catch {
|
|
300
301
|
structure.valid = false;
|
|
@@ -315,7 +316,7 @@ export class PostInitValidator {
|
|
|
315
316
|
|
|
316
317
|
for (const dir of expectedDirs) {
|
|
317
318
|
try {
|
|
318
|
-
await
|
|
319
|
+
await fs.stat(`${this.workingDir}/.claude/${dir}`);
|
|
319
320
|
structure.dirs.push(dir);
|
|
320
321
|
} catch {
|
|
321
322
|
structure.valid = false;
|
|
@@ -325,7 +326,7 @@ export class PostInitValidator {
|
|
|
325
326
|
// Check if there are any command files
|
|
326
327
|
try {
|
|
327
328
|
const entries = [];
|
|
328
|
-
for await (const entry of
|
|
329
|
+
for await (const entry of fs.readdir(`${this.workingDir}/.claude/commands`)) {
|
|
329
330
|
if (entry.isFile && entry.name.endsWith('.js')) {
|
|
330
331
|
entries.push(entry.name);
|
|
331
332
|
}
|
|
@@ -341,7 +342,7 @@ export class PostInitValidator {
|
|
|
341
342
|
|
|
342
343
|
async checkSparcExists() {
|
|
343
344
|
try {
|
|
344
|
-
await
|
|
345
|
+
await fs.stat(`${this.workingDir}/.roomodes`);
|
|
345
346
|
return true;
|
|
346
347
|
} catch {
|
|
347
348
|
return false;
|
|
@@ -358,7 +359,7 @@ export class PostInitValidator {
|
|
|
358
359
|
|
|
359
360
|
// Check .roomodes file
|
|
360
361
|
try {
|
|
361
|
-
const stat = await
|
|
362
|
+
const stat = await fs.stat(`${this.workingDir}/.roomodes`);
|
|
362
363
|
structure.hasRoomodes = stat.isFile;
|
|
363
364
|
} catch {
|
|
364
365
|
structure.valid = false;
|
|
@@ -366,14 +367,14 @@ export class PostInitValidator {
|
|
|
366
367
|
|
|
367
368
|
// Check .roo directory
|
|
368
369
|
try {
|
|
369
|
-
const stat = await
|
|
370
|
+
const stat = await fs.stat(`${this.workingDir}/.roo`);
|
|
370
371
|
structure.hasRooDir = stat.isDirectory;
|
|
371
372
|
|
|
372
373
|
if (structure.hasRooDir) {
|
|
373
374
|
const expectedDirs = ['templates', 'workflows', 'modes', 'configs'];
|
|
374
375
|
for (const dir of expectedDirs) {
|
|
375
376
|
try {
|
|
376
|
-
await
|
|
377
|
+
await fs.stat(`${this.workingDir}/.roo/${dir}`);
|
|
377
378
|
structure.dirs.push(dir);
|
|
378
379
|
} catch {
|
|
379
380
|
// Optional subdirectories
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// test-runner.js - Test runner for validation and rollback systems
|
|
2
2
|
|
|
3
3
|
import { ValidationSystem } from './index.js';
|
|
4
|
+
import { promises as fs } from 'fs';
|
|
4
5
|
import { RollbackSystem } from '../rollback/index.js';
|
|
5
6
|
import { printSuccess, printError, printWarning } from '../../../utils.js';
|
|
6
7
|
|
|
@@ -410,9 +411,9 @@ export class ValidationTestRunner {
|
|
|
410
411
|
|
|
411
412
|
async createTestFiles() {
|
|
412
413
|
try {
|
|
413
|
-
await
|
|
414
|
-
await
|
|
415
|
-
await
|
|
414
|
+
await fs.mkdir(`${this.workingDir}/test-temp`, { recursive: true });
|
|
415
|
+
await fs.writeFile(`${this.workingDir}/test-temp/CLAUDE.md`, '# Test CLAUDE.md', 'utf8');
|
|
416
|
+
await fs.writeFile(`${this.workingDir}/test-temp/memory-bank.md`, '# Test Memory Bank', 'utf8');
|
|
416
417
|
} catch {
|
|
417
418
|
// Test files creation failed - not critical for testing
|
|
418
419
|
}
|
|
@@ -420,7 +421,7 @@ export class ValidationTestRunner {
|
|
|
420
421
|
|
|
421
422
|
async cleanupTestFiles() {
|
|
422
423
|
try {
|
|
423
|
-
await
|
|
424
|
+
await fs.unlink(`${this.workingDir}/test-temp`, { recursive: true });
|
|
424
425
|
} catch {
|
|
425
426
|
// Cleanup failed - not critical
|
|
426
427
|
}
|
|
@@ -437,9 +438,8 @@ export class ValidationTestRunner {
|
|
|
437
438
|
},
|
|
438
439
|
};
|
|
439
440
|
|
|
440
|
-
await
|
|
441
|
-
`${this.workingDir}/test-roomodes`,
|
|
442
|
-
JSON.stringify(testConfig, null, 2),
|
|
441
|
+
await fs.writeFile(
|
|
442
|
+
`${this.workingDir}/test-roomodes`, JSON.stringify(testConfig, null, 2, 'utf8'),
|
|
443
443
|
);
|
|
444
444
|
} catch {
|
|
445
445
|
// Test config creation failed - not critical
|
|
@@ -448,7 +448,7 @@ export class ValidationTestRunner {
|
|
|
448
448
|
|
|
449
449
|
async cleanupTestConfigs() {
|
|
450
450
|
try {
|
|
451
|
-
await
|
|
451
|
+
await fs.unlink(`${this.workingDir}/test-roomodes`);
|
|
452
452
|
} catch {
|
|
453
453
|
// Cleanup failed - not critical
|
|
454
454
|
}
|
|
@@ -457,7 +457,7 @@ export class ValidationTestRunner {
|
|
|
457
457
|
async createTestSparcConfig() {
|
|
458
458
|
try {
|
|
459
459
|
await this.createTestConfigs();
|
|
460
|
-
await
|
|
460
|
+
await fs.mkdir(`${this.workingDir}/test-roo`, { recursive: true });
|
|
461
461
|
} catch {
|
|
462
462
|
// Test SPARC config creation failed - not critical
|
|
463
463
|
}
|
|
@@ -466,7 +466,7 @@ export class ValidationTestRunner {
|
|
|
466
466
|
async cleanupTestSparcConfig() {
|
|
467
467
|
try {
|
|
468
468
|
await this.cleanupTestConfigs();
|
|
469
|
-
await
|
|
469
|
+
await fs.unlink(`${this.workingDir}/test-roo`, { recursive: true });
|
|
470
470
|
} catch {
|
|
471
471
|
// Cleanup failed - not critical
|
|
472
472
|
}
|