Conversation
Add Fastify route plugin with four agent interaction endpoints: - GET /api/agents/:id/logs?lines=N — capture tmux pane output (default 200) - POST /api/agents/:id/send — send text/keys with raw, literal, or with-enter modes - POST /api/agents/:id/kill — kill agent via core kill logic with manifest update - POST /api/agents/:id/restart — restart agent with optional prompt override Includes input validation, PpgError-to-HTTP status mapping, and 16 tests covering all endpoints with mocked core functions. Closes #69
|
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 ignored due to path filters (1)
📒 Files selected for processing (8)
✨ 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 |
- P1: merge duplicate import from core/agent.js - P2: use crypto.timingSafeEqual for bearer token comparison (OWASP A2) - P2: refresh live agent status via checkAgentStatus in kill route - P2: extract shared restartAgent() into core/agent.ts (DRY with CLI) - P2: remove unused module-level test fixtures, add setupAgentMocks helper - P3: map PROMPT_NOT_FOUND error code to HTTP 400 - P3: map PANE_NOT_FOUND to HTTP 410, catch capturePane failures - P3: add tests for pane-gone, restart idle agent, missing prompt file - P4: cap lines query param at 10,000
Summary
GET /api/agents/:id/logs?lines=N— capture tmux pane output (default 200 lines)POST /api/agents/:id/send— send text/keys to pane (raw,literal,with-entermodes)POST /api/agents/:id/kill— kill agent via core kill logic, update manifestPOST /api/agents/:id/restart— restart with optional prompt override, spawns new agentserveStatePathandservePidPathto path helpersTest plan
Closes #69