Schema
Workplan
Workplan response model. OpenAPI title is ``Workplan``; the Python class name stays ``BlueprintResponse``. ``workplan_type`` discriminates the two backing stores: - ``"blueprint"`` — legacy single-client plan (workstreams.blueprint) - ``"job_definition"`` — Model A multi-client plan (workstreams.job_definition)
| Field | Type | Description |
|---|---|---|
idrequired | string (uuid) | Workplan UUID |
workplan_type | string | Backing store type: 'blueprint' (legacy single-client, has template_id/client_id) or 'job_definition' (Model A multi-client, has target_selector; client_id is null). |
permakey | string | null | Stable short key for URL construction |
ws_permakey | string | null | Parent WorkStream permakey for /workstreams/<ws>/workplan/<wp> URL. Populated via the most-recent cycle's parent workstream for both blueprint and job_definition rows; null only when no cycle has run yet. |
template_id | string (uuid) | null | Source template UUID (workstream_id in DB); null for job_definition-backed workplans |
target_selector | object | null | Multi-client target binding for job_definition workplans (e.g. {type: 'explicit', client_ids: [...]}). Null for blueprint workplans. |
namerequired | string | Workplan name |
client_id | string (uuid) | null | Client UUID (optional) |
client_name | string | null | Client name |
run_mode | WorkplanRunMode | The WorkPlan's effective run posture (S2-READ §1a).
``effective`` resolves: plan-level ``configuration.run_mode`` → the
workstream default → ``propose``. ``source`` tells the FE whether the value
was set on this plan or inherited. ``locked`` is the firm-lock governance
flag — always ``False`` in S2.show nested |
cohort | WorkplanCohort | Structural facts about the WorkPlan's bound client set (S2-READ §1b).
Live exception/ready counts live on the roster's ``summary`` (one
authoritative source); this object carries only the cohort's size + shape.
With no multi-client cohort writer yet, ``total_clients`` resolves to 0/1
and ``selector_kind`` to ``single`` — the shape is frozen, the populating
data is S2-write BE work behind it.show nested |
config_overrides | object | Configuration (from DB)show nestedEmpty object. |
effective_config | object | Merged effective configshow nestedEmpty object. |
schedule | string | null | Cron schedule expression (from configuration; null = unscheduled) |
schedule_timezone | string | IANA timezone for the schedule (from configuration; defaults UTC) |
max_duration_minutes | integer | null | Per-instance duration guardrail in minutes (from configuration; null = unset) |
human_checkpoints | any[] | Sign-off gate checkpoints (from configuration). Non-empty means a partner sign-off gate is on. |
input_bindings | InputBindingDef[] | null | Cross-WorkPlan input bindings parsed from config. |
schedule_overrides | object | null | Per-client schedule override map (from job_definition DB; clientId -> {cron_expr, timezone, skip_weekends, holiday_calendar}). Null for blueprint-backed plans. |
per_client_overrides | object | null | Per-client input and context overrides map. Null for blueprint-backed plans. |
statusrequired | "draft" | "active" | "paused" | "archived" | Status for workstream entities.draftactivepausedarchived |
enabled | boolean | null | Scheduler gate of a job-backed WorkPlan (false = paused, no scheduled fires). Null for blueprint-backed plans. |
last_run_at | string (date-time) | null | Most recent cycle start for this WorkPlan (null if never run). On the single-plan read it is the newest of each cycle's start or creation time and is not last_cycle_at. On the list and on GET /jobs it is the plan's stored last-run time. |
next_run_at | string (date-time) | null | Next scheduled execution — computed; see GET /workplans/{id}/next-run (P1) |
created_by | string (uuid) | null | Creator user ID (owner_id in DB) |
created_atrequired | string (date-time) | Creation timestamp |
updated_atrequired | string (date-time) | Last update timestamp |
description | string | null | What the job-backed WorkPlan is for. Present on the list and single-plan read. A plan created as a job returns the value on both the list and the single-plan read; an old-style blueprint returns null. |
domain | string | null | Domain the job-backed WorkPlan was created from. Present on the list and single-plan read. A plan created as a job returns the value on both the list and the single-plan read; an old-style blueprint returns null. |
goal_template | string | null | Goal the job-backed WorkPlan works towards. Returned by GET /workplans/{id}; null in the list. |
tools | string[] | null | Tools the job-backed WorkPlan may use. Returned by GET /workplans/{id}; null in the list. |
deliverables | object[] | null | Deliverables the job-backed WorkPlan produces. Returned by GET /workplans/{id}; null in the list. |
max_turns | integer | null | Turn limit of one run of the job-backed WorkPlan. Returned by GET /workplans/{id}; null in the list. |
max_cost_usd | number | null | Cost limit in USD of one run of the job-backed WorkPlan. Present on the list and single-plan read. A plan created as a job returns the value on both the list and the single-plan read; an old-style blueprint returns null. |
source_tracing | boolean | null | Whether runs of the job-backed WorkPlan trace their sources. Returned by GET /workplans/{id}; null in the list. |
default_context | object | null | Run context the job-backed WorkPlan starts every run with. A plan created as a job returns the value on both the list and the single-plan read; an old-style blueprint returns null. |
input_source_map | object | null | The create-time map of where each declared input comes from; this is what POST /workplans calls input_bindings. The input_bindings field on this model is the separate hand-authored list. Returned by GET /workplans/{id}; null in the list. |
autonomy_config | AutonomyConfig | null | Fine-grained autonomy controls of the job-backed WorkPlan. Returned by GET /workplans/{id}; null in the list. |
is_enabled | boolean | null | This is an alias of enabled, for migration from GET /jobs/{id}; enabled is the canonical name. Present on the list and single-plan read. A plan created as a job returns the value on both the list and the single-plan read; an old-style blueprint returns null. |
not_ready_policy | string | null | What a run does when an input is not ready. Returned by GET /workplans/{id}; null in the list. |
skip_weekends | boolean | null | Whether scheduled fires move off weekends. Present on the list and single-plan read. A plan created as a job returns the value on both the list and the single-plan read; an old-style blueprint returns null. |
holiday_calendar | string | null | Holiday calendar that scheduled fires avoid. Returned by GET /workplans/{id}; null in the list. |
trigger_type | string | null | What starts a run: manual, schedule, webhook, email or api. Present on the list and single-plan read. A plan created as a job returns the value on both the list and the single-plan read; an old-style blueprint returns null. |
schedule_spec | object | null | Structured schedule of the WorkPlan. Returned by GET /workplans/{id}; null in the list. |
updated_by | string | null | Who last edited the WorkPlan. Returned by GET /workplans/{id}; null in the list. |
created_by_name | string | null | Display name of who created the WorkPlan. Returned by GET /workplans/{id}; null in the list. |
updated_by_name | string | null | Display name of who last edited the WorkPlan. Returned by GET /workplans/{id}; null in the list. |
current_version | integer | null | Highest saved version of the WorkPlan. Returned by GET /workplans/{id}; null in the list. |
workstream_current_version | integer | null | Highest version of the WorkPlan's WorkStream. Returned by GET /workplans/{id}; null in the list. |
pinned_workstream_version | integer | null | WorkStream version the WorkPlan is pinned to. Returned by GET /workplans/{id}; null in the list. |
upstream_update_available | boolean | null | Whether the WorkStream has a version newer than the pin. Returned by GET /workplans/{id}; null in the list. |
cost_so_far_gbp | number | null | Cost of all cycles so far in GBP, null when none has started. Returned by GET /workplans/{id}; null in the list. |
hourly_rate_gbp | number | null | Hourly rate in GBP that cost_so_far_gbp was billed at. Returned by GET /workplans/{id}; null in the list. |
total_runs | integer | null | Number of cycles the WorkPlan has had; counts every cycle. Returned by GET /workplans/{id}; null in the list. |
active_runs | integer | null | Number of cycles still in flight; counts every cycle of the WorkPlan. Returned by GET /workplans/{id}; null in the list. |
last_cycle_at | any | null | The start time of the newest cycle of the WorkPlan; this is not last_run_at. Returned by GET /workplans/{id}; null in the list. |
last_cycle_state | string | null | Status of the newest cycle, read from every cycle of the WorkPlan. Returned by GET /workplans/{id}; null in the list. |
latest_cycle_launch_id | string (uuid) | null | Id of the newest cycle launch of the WorkPlan. Returned by GET /workplans/{id}; null in the list. |
latest_cycle_launch_permakey | string | null | Permakey of the newest cycle launch of the WorkPlan. Returned by GET /workplans/{id}; null in the list. |
latest_cycle_launch_workstream_id | string (uuid) | null | Id of the WorkStream of the newest cycle launch. Returned by GET /workplans/{id}; null in the list. |
latest_cycle_launch_workstream_permakey | string | null | Permakey of the WorkStream of the newest cycle launch. Returned by GET /workplans/{id}; null in the list. |