Template drafts

Open a test instance of a draft state (a disposable session workspace)

Opens a layered session workspace (purpose template_test) on the draft base whose layer is a copy of the draft state; its own writes never reach the draft. Without state_id the running draft is captured first (the instance’s open depends on that layer_snapshot; origin.checkpoint_id is filled when the cell places it); a suspended draft’s current checkpoint is used instead. The instance ends on close(), idle or draft discard. 202 OpenResponse. 402/403/429 as for open (admitted like a start: a concurrent_workspaces refusal is queued up to 10 s, then 429 quota_exceeded with Retry-After). Supports Idempotency-Key.

post/v1/templates/{slug}/draft/test-instances

Request

  • Base URL: https://api.shardflux.dev
  • URL: https://api.shardflux.dev/v1/templates/{slug}/draft/test-instances
  • Auth: HTTP bearer

Path parameters

slugstring required

Request body

state_idstring uuid

A draft state (GET …/draft/states). Omitted: a fresh capture of the running draft (its current checkpoint when suspended).

keystring

Workspace key (default sf:test:<slug>:<8 hex>); keys starting with sf: are reserved.

agent_labelstring
toolsstring[]
inputsobject

Open-time inputs of the template version: {NAME: string} for its declared text inputs. A new workspace stores each given value, else the declared default; on an existing key inputs replaces them all (omitted = unchanged). Secret inputs are not passed here: they bind the stored secret of the same name. 422 input_unknown (undeclared name, details.names), input_invalid (a secret input, a non-string, or a value over 4096 bytes or with CR, LF or NUL; details.names), input_required (details {names, kind}).

Response

Default Response

cell_endpointstring nullable required

Changes

No recorded changes to this operation across all 1 revision of this API.