feat: Extend AgentInfo with exitCode + add getAgentInputFiles/getAgentPrompt tRPC procedures
Adds exitCode to AgentInfo type and propagates it through all toAgentInfo() implementations. Enhances getAgent to also return taskName and initiativeName from their respective repositories. Adds two new filesystem-reading tRPC procedures for the Agent Details tab: getAgentInputFiles (reads .cw/input/ files with binary detection, 500 KB cap, sorted) and getAgentPrompt (reads .cw/agent-logs/<name>/PROMPT.md with 1 MB cap and structured ENOENT handling). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -59,10 +59,12 @@ Each procedure uses `require*Repository(ctx)` helpers that throw `TRPCError(INTE
|
||||
| dismissAgent | mutation | Dismiss agent (set userDismissedAt) |
|
||||
| resumeAgent | mutation | Resume with answers |
|
||||
| listAgents | query | All agents |
|
||||
| getAgent | query | Single agent by name or ID |
|
||||
| getAgent | query | Single agent by name or ID; also returns `taskName`, `initiativeName`, `exitCode` |
|
||||
| getAgentResult | query | Execution result |
|
||||
| getAgentQuestions | query | Pending questions |
|
||||
| getAgentOutput | query | Full output from DB log chunks |
|
||||
| getAgentInputFiles | query | Files written to agent's `.cw/input/` dir (text only, sorted, 500 KB cap) |
|
||||
| getAgentPrompt | query | Content of `.cw/agent-logs/<name>/PROMPT.md` (1 MB cap) |
|
||||
| getActiveRefineAgent | query | Active refine agent for initiative |
|
||||
| listWaitingAgents | query | Agents waiting for input |
|
||||
| onAgentOutput | subscription | Live raw JSONL output stream via EventBus |
|
||||
|
||||
Reference in New Issue
Block a user