Commit 8d5d097
feat(cli): add destroy command for tearing down deployed agents (#107)
* feat(cli): add destroy command for tearing down deployed agents
Closes the workforce half of the M3 destroy LOUD HOLE. The cloud-side
endpoint lives in AgentWorkforce/cloud#578 (DELETE
/api/v1/workspaces/:workspaceId/deployments/:agentId); this commit adds
the matching `agentworkforce destroy <persona-or-agent-id>` command.
Accepts either:
* a persona JSON path -> reads slug/id and resolves the agent UUID via
GET /api/v1/workspaces/:workspaceId/agents?persona_slug=<slug>
* a literal agent UUID -> destroyed directly
Exit codes:
0 destroyed
2 not found / already destroyed (idempotent script-friendly signal)
1 any other error
7 new node:test cases (parse + fetch-mocked happy path / 401 / 404 / 500 /
missing workspace / persona-path resolution / no-deployed-agent).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* fix(cli): ignore directories as destroy persona paths
---------
Co-authored-by: Ricky Schema Cascade <ricky@agent-relay.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 525334b commit 8d5d097
4 files changed
Lines changed: 774 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| |||
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
32 | 38 | | |
33 | 39 | | |
34 | 40 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| 62 | + | |
62 | 63 | | |
63 | 64 | | |
64 | 65 | | |
| |||
202 | 203 | | |
203 | 204 | | |
204 | 205 | | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
205 | 219 | | |
206 | 220 | | |
207 | 221 | | |
| |||
234 | 248 | | |
235 | 249 | | |
236 | 250 | | |
| 251 | + | |
| 252 | + | |
237 | 253 | | |
238 | 254 | | |
239 | 255 | | |
| |||
3773 | 3789 | | |
3774 | 3790 | | |
3775 | 3791 | | |
| 3792 | + | |
| 3793 | + | |
| 3794 | + | |
| 3795 | + | |
| 3796 | + | |
3776 | 3797 | | |
3777 | 3798 | | |
3778 | 3799 | | |
| |||
0 commit comments