Conversation
Add POST /api/spawn endpoint as a Fastify plugin that creates worktrees and launches agents. Includes JSON Schema validation for request body (name required, agent type, prompt/template, base branch, count 1-20, template vars), template variable rendering, and full test coverage with mocked core modules. Closes #70
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (5)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Address code review findings: - Extract spawnNewWorktree and spawnAgentBatch into core/spawn.ts, eliminating duplicated orchestration between CLI command and route - Route accepts projectRoot via plugin options instead of calling getRepoRoot() per-request - Add validateVars() to reject shell metacharacters in var keys/values before they reach tmux send-keys - Add error-path tests: unknown agent type, template not found, tmux not available, prompt/template precedence - Fix pre-existing typecheck error in commands/spawn.test.ts - Route is now a thin adapter: validate, call core, format response
Summary
POST /api/spawnFastify route plugin for creating worktrees and launching agents{{VAR}}substitution (WORKTREE_PATH, BRANCH, AGENT_ID, PROJECT_ROOT, TASK_NAME, PROMPT, plus user vars)Test plan
Closes #70