Schema
JobDefinitionResponse
Job definition response.
| Field | Type | Description |
|---|---|---|
idrequired | string (uuid) | β |
permakey | string | null | Stable human-readable key for the batch/fan-out deep-link URL /workstreams/{ws}/cycles/{permakey}/β¦ (#173). Null on legacy rows. |
namerequired | string | β |
description | string | null | β |
domainrequired | string | β |
goal_templaterequired | string | β |
toolsrequired | string[] | β |
deliverablesrequired | object[] | βitem shapeEmpty object. |
max_turnsrequired | integer | β |
max_cost_usdrequired | number | β |
max_duration_minutesrequired | integer | β |
target_selectorrequired | object | βshow nestedEmpty object. |
per_client_overridesrequired | object | βshow nestedEmpty object. |
input_bindingsrequired | object | βshow nestedEmpty object. |
default_contextrequired | object | βshow nestedEmpty object. |
source_tracingrequired | boolean | β |
human_checkpointsrequired | string[] | β |
schedule | string | null | β |
schedule_timezonerequired | string | β |
skip_weekends | boolean | β |
holiday_calendar | string | null | β |
not_ready_policy | string | Fan-out ready-gating policy for a not-ready client at a scheduled fire. |
schedule_overrides | object | Per-client schedule override map (clientId -> override spec).show nestedEmpty object. |
trigger_type | string | Persisted 'How it runs' trigger choice (manual/schedule/webhook/email/api). |
schedule_spec | object | null | Structured ScheduleEditor spec (opaque JSONB round-trip; cron stays the execution shape). |
is_enabledrequired | boolean | β |
next_run_at | any | null | β |
last_run_at | any | null | β |
statusrequired | string | β |
created_byrequired | string | β |
created_by_name | string | null | Display name behind created_by, for the detail header's 'Created <date> by <who>'. Null when the id no longer resolves to a user β render the date alone rather than an id. |
created_atrequired | any | β |
updated_by | string | null | User id of whoever last edited this WorkPlan. Null for edits predating the column. |
updated_by_name | string | null | Display name behind updated_by, for 'Edited <date> by <who>'. |
updated_atrequired | any | β |
current_version | integer | null | The WorkPlan's own latest config version in job_definition_version; null if no history yet. Not a WorkStream version: see workstream_current_version. |
workstream_current_version | integer | null | Highest workstreams.workstream_version.version of the WorkPlan's WorkStream (default_context.source_workstream_id); null when the WorkPlan has no WorkStream or it has no saved version. |
pinned_workstream_version | integer | null | Pinned version of the WorkPlan's WorkStream: workstreams.workstream_version.version for default_context.source_workstream_id; null = follow the latest. |
upstream_update_available | boolean | True when pinned_workstream_version is set AND the WorkPlan's WorkStream has a version row with a higher number (workstream_current_version). |
cost_so_far_gbp | number | null | Sum of customer-facing GBP cost (hourly_rate_gbp x elapsed) across all cycles for this job definition. Null when no cycles exist. |
hourly_rate_gbp | number | This customer's WorkStream hourly rate in GBP (platform.organizations.workstream_hourly_rate_gbp). Their cost, our revenue β never our compute cost. Serialized because the client RENDERS the rate beside the total ('Β£X total Β· Β£Y avg / client Β· Β£Z/hr rate'); without it the frontend had to hardcode 19, which silently disagrees with a total computed at any other rate. |
total_runs | integer | Count of cycles launched from this job definition. When the list was filtered by workstream_id, this count is scoped to that workstream. |
active_runs | integer | Count of cycles currently in flight (see ACTIVE_CYCLE_STATUSES). Same scoping rule as total_runs. Exists so a caller that only needs 'how many are running' does not have to fetch every cycle of every job to count them client-side β the shell rail did exactly that, at one request per job on every authenticated page load. |
last_cycle_at | any | null | Start timestamp of the most recent cycle (scoped to the requested workstream if filtered). |
last_cycle_state | string | null | Status of the most recent cycle (scoped to the requested workstream if filtered). |
latest_cycle_launch_id | string (uuid) | null | The most recent cycle_launch (the product's Cycle - one launch of a plan) for this job_definition, so list consumers (the shell rail 'Running cycles', the @ 'cycle' picker, the TopicLivePage cycle mention) can link the plan's latest cycle directly. Card 'Every link the app emits uses the cycle's own address': emitting the plan's job id in the cycle slot redirected to the WorkPlan, not the cycle. Null when the plan has no cycle_launch yet. |
latest_cycle_launch_permakey | string | null | The permakey of the most recent cycle_launch - the canonical CYCLE address (/workstreams/{ws}/cycles/{permakey}). List consumers link THIS (not the plan's job permakey) for the cycle slot. Card 'Every link the app emits uses the cycle's own address'. |
latest_cycle_launch_workstream_id | string (uuid) | null | The workstream id of the most recent cycle_launch - the parent WorkStream for the nested cycle URL. Null when the launch has none (should not happen; cycle_launch.workstream_id is NOT NULL). |
latest_cycle_launch_workstream_permakey | string | null | The workstream permakey of the most recent cycle_launch - the canonical WorkStream segment for the nested cycle URL, so a list consumer can build /workstreams/{ws_permakey}/cycles/{launch_permakey} without a second fetch. |
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 |
autonomy_config | AutonomyConfig | null | Fine-grained autonomy controls from default_context.autonomy_config, or null if unset. |
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 |