Agent Plans — /api/agent/:zid/plans*
A plan is the contract between SKILL (Workbench Step 5) and BUILD (Step 7). The planning agent and the user collaborate on a spec + plan plus five typed arrays — files, queries, apis, engines, pages. Locking promotes the working draft to a new immutable version and advances the agent's protocol state.
Concept: Pulse Workbench · Agents.
Source: shared/api-core/src/routes/agentPlans.ts.
Endpoints
| Method | Path | Auth | Notes |
|---|---|---|---|
GET | /api/agent/:zid/plans/current | ZID-bound | Latest locked plan. |
GET | /api/agent/:zid/plans/draft | ZID-bound | The single working draft. |
GET | /api/agent/:zid/plans/history | ZID-bound | Version list. |
GET | /api/agent/:zid/plans/:planId | ZID-bound | One specific version. |
POST | /api/agent/:zid/plans/draft | ZID-bound | Write / update the draft. |
POST | /api/agent/:zid/plans/lock | ZID-bound | Promote the draft to a new locked version. |
ZID-bound = authenticated via authenticateZeqAuth; the caller must be the agent's own ZID or the owner of the machine whose agent it is.