Skip to content

Add agents runs list/show/approve/discard - #5

Merged
fatwang2 merged 1 commit into
mainfrom
claude/project-thread-9tugpc
Oct 15, 2026
Merged

fatwang2 merged 1 commit into
mainfrom
claude/project-thread-9tugpc

Conversation

@fatwang2

Copy link
Copy Markdown
Member

Requested by fatwang2 · project thread

Before: the CLI could only configure hosted agents (agents list/show/create/update). Seeing what an agent evaluated, or approving the reply it drafted, needed the web console or MCP.

After: mailly agents runs lists agent runs (filter by agent, thread, email, status, approval status, limit), runs show prints one run with its summary and draft, runs approve <run-id> --text-file <path> --yes sends the reviewed reply, and runs discard drops the draft. This matches the MCP tools mailly_list_agent_runs and mailly_review_agent_draft.

How: four commands under agents runs call the existing server endpoints GET /agents/runs, GET /agents/runs/{id}, POST /agents/runs/{id}/approve and POST /agents/runs/{id}/discard. Like MCP, approve always sends explicit reviewed text (file or stdin) instead of whatever the draft currently says, and it requires --yes. The skill reference, the Chinese command doc and the README table are updated, and new tests in tests/agents.test.mjs cover them. npm test passes 50/50 and npm pack --dry-run is clean.

No server change is needed because the endpoints are already live. This touches src/commands/agents.ts and src/client.ts, which #4 (summary prompt) also edits, so the two PRs may conflict a little.

🤖 Generated with Claude Code

https://claude.ai/code/session_01FAznJLAQsuDssMvrQcAggq


Generated by Claude Code

Lets the CLI review what hosted agents evaluated and drafted, matching the
MCP mailly_list_agent_runs and mailly_review_agent_draft tools. approve sends
only the reviewed text from --text-file and requires --yes.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FAznJLAQsuDssMvrQcAggq
@fatwang2 fatwang2 self-assigned this Oct 15, 2026
@fatwang2
fatwang2 marked this pull request as ready for review October 15, 2026 15:56
@fatwang2
fatwang2 merged commit 9b132e2 into main Oct 15, 2026
3 checks passed
@fatwang2 fatwang2 mentioned this pull request Oct 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants