Stack
Why it matters: Keeps execution frames, undo records, and backtracking state without treating them as leased jobs.
Durable, account-scoped LIFO collection with atomic push, pop, and peek operations.
API endpoints
| Method | Path | Description |
|---|---|---|
POST | /v1/stacks | Create a stack |
POST | /v1/stacks/:id/items | Push an item |
POST | /v1/stacks/:id/pop | Atomically pop the newest item |
GET | /v1/stacks/:id/peek | Read the newest item without removing it |
Examples
Push a backtracking frame
curl -X POST https://cloudharness.ai/v1/stacks/STACK_ID/items \\n -H "Authorization: Bearer ***" \\n -H "Content-Type: application/json" \\n -d '{"value":{"step":"research","attempt":2}}'