refactor(agents): compact CLI output - #220
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (9)
Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review. 📝 WalkthroughWalkthroughThe CLI adds a dedicated presentation layer for local-agent catalogs, receipts, summaries, observations, and failures. Agent commands use compact JSON and text output. Tests and documentation cover sanitized fields, status handling, target filtering, and structured errors. ChangesLocal agent output
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to This PR narrows subagent CLI output to compact public shapes and maps lifecycle states to actionable values; no actionable merge-blocking risk remains beyond normal checks and review. Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 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 |
Greptile SummaryThis PR replaces persisted agent-record output with compact, command-specific CLI projections and translates internal lifecycle states into a smaller public vocabulary.
Confidence Score: 5/5The PR appears safe to merge with no concrete blocking or independently actionable non-blocking issues identified. The compact projections align with the documented command-specific contracts, preserve final responses and structured failures where needed, and update the repository’s bundled consumers and tests consistently.
|
| Filename | Overview |
|---|---|
| src/local-agent-presentation.ts | Introduces compact public projections, lifecycle-status mapping, structured observations, and human-readable formatters without exposing persisted internal fields. |
| src/cli.ts | Applies the new projections across agent commands and emits compact single-line JSON while retaining non-zero exits for immediate failures. |
| src/local-agent-presentation.test.ts | Verifies status translation, output formatting, target filtering, structured failures, and omission of private record data. |
| src/cli.test.ts | Updates CLI integration coverage for compact list output and the revised immediate-error envelope. |
| skills/subagents/SKILL.md | Updates orchestration guidance to consistently request JSON and use the new running, completed, failed, and stopped states. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart LR
A[Internal agent record] --> B{CLI command}
B -->|targets| C[Target catalog]
B -->|run / continue| D[ID and status receipt]
B -->|ls| E[Session summary]
B -->|show| F[Observation]
G[starting / running] --> H[running]
I[idle] --> J[completed]
K[error] --> L[failed]
M[stopped] --> N[stopped]
Reviews (1): Last reviewed commit: "docs(agents): use structured CLI output" | Re-trigger Greptile
Subagent CLI commands currently print persisted agent records directly, so routine orchestration can inject workspace paths, provider session IDs, timestamps, and old responses into the parent model context. This PR gives target discovery, run receipts, session lists, and observations dedicated compact output shapes, while mapping internal lifecycle states to the actionable
running,completed,failed, andstoppedvocabulary.This is stacked on #219. The bundled
subagentsskill now uses--jsonfor every command, and the agent docs describe the smaller public contract.Summary by CodeRabbit
New Features
Bug Fixes
Documentation
Tests