@ellipsis-dev/sdk 0.18.0 → 0.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  interface paths {
2
- '/v1/agents/configs': {
2
+ '/v1/alerts': {
3
3
  parameters: {
4
4
  query?: never;
5
5
  header?: never;
@@ -7,90 +7,46 @@ interface paths {
7
7
  cookie?: never;
8
8
  };
9
9
  /**
10
- * List Agent Configs
11
- * @description List saved agent configs.
12
- */
13
- get: operations['list_agent_configs'];
14
- put?: never;
15
- /**
16
- * Create Agent Config
17
- * @description Create an agent config, managed through the API: no file, live
18
- * immediately. To put its definition in a repository instead, create
19
- * it here and then POST /v1/agents/configs/{config_id}/link.
10
+ * List Alerts
11
+ * @description List budget alerts for the organization, newest first.
20
12
  *
21
- * 409 when another live agent already holds the name.
22
- */
23
- post: operations['create_agent_config'];
24
- delete?: never;
25
- options?: never;
26
- head?: never;
27
- patch?: never;
28
- trace?: never;
29
- };
30
- '/v1/agents/configs/{config_id}': {
31
- parameters: {
32
- query?: never;
33
- header?: never;
34
- path?: never;
35
- cookie?: never;
36
- };
37
- /**
38
- * Get Agent Config
39
- * @description Return one saved agent config, by id or by the agent's name.
40
- */
41
- get: operations['get_agent_config'];
42
- /**
43
- * Update Agent Config
44
- * @description Replace an agent's definition, by id or by the agent's name.
13
+ * Optionally filtered by status and source.
45
14
  *
46
- * The whole definition is replaced, and the change is live at
47
- * once. Only for agents managed through this API: one defined by a
48
- * repository file is a 409, since the next push to that file would
49
- * revert the change — unlink it first to take ownership.
15
+ * Available to all credential types, so an agent can check "is
16
+ * this org near budget?" mid-task.
50
17
  */
51
- put: operations['update_agent_config'];
18
+ get: operations['list_alerts'];
19
+ put?: never;
52
20
  post?: never;
53
- /**
54
- * Delete Agent Config
55
- * @description Delete an agent, by id or by the agent's name.
56
- *
57
- * The agent stops running and its name is freed immediately; its
58
- * past sessions remain readable. Only for agents managed through
59
- * this API — delete the file to remove one defined by a
60
- * repository.
61
- */
62
- delete: operations['delete_agent_config'];
21
+ delete?: never;
63
22
  options?: never;
64
23
  head?: never;
65
24
  patch?: never;
66
25
  trace?: never;
67
26
  };
68
- '/v1/agents/configs/{config_id}/link': {
27
+ '/v1/alerts/{alert_id}': {
69
28
  parameters: {
70
29
  query?: never;
71
30
  header?: never;
72
31
  path?: never;
73
32
  cookie?: never;
74
33
  };
75
- get?: never;
76
- put?: never;
77
34
  /**
78
- * Link Agent Config
79
- * @description Move an agent into a repository, by id or by the agent's name.
35
+ * Get Alert
36
+ * @description Return one alert by id.
80
37
  *
81
- * Opens a pull request adding the agent's config file. The agent
82
- * keeps running unchanged meanwhile; merging hands it over to the
83
- * file, after which the file is what changes it. Nothing happens
84
- * if the pull request is never merged.
38
+ * 404 if it doesn't exist or belongs to another organization.
85
39
  */
86
- post: operations['link_agent_config'];
40
+ get: operations['get_alert'];
41
+ put?: never;
42
+ post?: never;
87
43
  delete?: never;
88
44
  options?: never;
89
45
  head?: never;
90
46
  patch?: never;
91
47
  trace?: never;
92
48
  };
93
- '/v1/agents/configs/{config_id}/unlink': {
49
+ '/v1/alerts/{alert_id}/dismiss': {
94
50
  parameters: {
95
51
  query?: never;
96
52
  header?: never;
@@ -100,21 +56,19 @@ interface paths {
100
56
  get?: never;
101
57
  put?: never;
102
58
  /**
103
- * Unlink Agent Config
104
- * @description Take over an agent from its file, by id or by the agent's name.
59
+ * Dismiss Alert
60
+ * @description Dismiss an open alert and return it.
105
61
  *
106
- * The file stops governing the agent immediately and further
107
- * changes go through this API. The file is left in place, inert —
108
- * delete it whenever you like.
62
+ * 409 when the alert is not open; 404 when it doesn't exist.
109
63
  */
110
- post: operations['unlink_agent_config'];
64
+ post: operations['dismiss_alert'];
111
65
  delete?: never;
112
66
  options?: never;
113
67
  head?: never;
114
68
  patch?: never;
115
69
  trace?: never;
116
70
  };
117
- '/v1/agents/templates': {
71
+ '/v1/analytics/metrics': {
118
72
  parameters: {
119
73
  query?: never;
120
74
  header?: never;
@@ -122,13 +76,18 @@ interface paths {
122
76
  cookie?: never;
123
77
  };
124
78
  /**
125
- * List Agent Templates
126
- * @description List the built-in starter agent templates.
79
+ * Get Analytics Metrics
80
+ * @description Return PR and review analytics metrics.
127
81
  *
128
- * Behind auth but not account-scoped — the data is static
129
- * product content shared by the dashboard, landing site, and CLI.
82
+ * The same data as the analytics dashboard.
83
+ *
84
+ * Windowing: pass explicit start/end, or days (default: the last
85
+ * 30 days). account_type in all|user|bot scopes the authors (bot =
86
+ * the apps/agents). Available to all credential types: the
87
+ * responses expose the organization's own GitHub PR/review activity,
88
+ * no secrets.
130
89
  */
131
- get: operations['list_agent_templates'];
90
+ get: operations['get_analytics_metrics'];
132
91
  put?: never;
133
92
  post?: never;
134
93
  delete?: never;
@@ -137,7 +96,7 @@ interface paths {
137
96
  patch?: never;
138
97
  trace?: never;
139
98
  };
140
- '/v1/agents/templates/{template_id}': {
99
+ '/v1/analytics/pull-requests': {
141
100
  parameters: {
142
101
  query?: never;
143
102
  header?: never;
@@ -145,10 +104,13 @@ interface paths {
145
104
  cookie?: never;
146
105
  };
147
106
  /**
148
- * Get Agent Template
149
- * @description Return one built-in agent template by slug.
107
+ * Get Analytics Pull Requests
108
+ * @description Return pull-request analytics.
109
+ *
110
+ * Windowing: pass explicit start/end, or days (default: the last
111
+ * 30 days). account_type in all|user|bot scopes the authors.
150
112
  */
151
- get: operations['get_agent_template'];
113
+ get: operations['get_analytics_pull_requests'];
152
114
  put?: never;
153
115
  post?: never;
154
116
  delete?: never;
@@ -157,7 +119,7 @@ interface paths {
157
119
  patch?: never;
158
120
  trace?: never;
159
121
  };
160
- '/v1/alerts': {
122
+ '/v1/analytics/reviews': {
161
123
  parameters: {
162
124
  query?: never;
163
125
  header?: never;
@@ -165,15 +127,15 @@ interface paths {
165
127
  cookie?: never;
166
128
  };
167
129
  /**
168
- * List Alerts
169
- * @description List budget alerts for the organization, newest first.
170
- *
171
- * Optionally filtered by status and source.
130
+ * Get Analytics Reviews
131
+ * @description Return code-review analytics.
172
132
  *
173
- * Available to all credential types, so an agent can check "is
174
- * this org near budget?" mid-task.
133
+ * account_type scopes reviewers (bot|user|all) — e.g. "what apps
134
+ * review the most PRs?" is the reviewer facets here with
135
+ * account_type=bot. Windowing: pass explicit start/end, or days
136
+ * (default: the last 30 days).
175
137
  */
176
- get: operations['list_alerts'];
138
+ get: operations['get_analytics_reviews'];
177
139
  put?: never;
178
140
  post?: never;
179
141
  delete?: never;
@@ -182,29 +144,29 @@ interface paths {
182
144
  patch?: never;
183
145
  trace?: never;
184
146
  };
185
- '/v1/alerts/{alert_id}': {
147
+ '/v1/auth/cli/poll': {
186
148
  parameters: {
187
149
  query?: never;
188
150
  header?: never;
189
151
  path?: never;
190
152
  cookie?: never;
191
153
  };
154
+ get?: never;
155
+ put?: never;
192
156
  /**
193
- * Get Alert
194
- * @description Return one alert by id.
157
+ * Cli Auth Poll
158
+ * @description Poll a device-code auth flow for its token.
195
159
  *
196
- * 404 if it doesn't exist or belongs to another organization.
160
+ * Unauthenticated; the device code identifies the flow.
197
161
  */
198
- get: operations['get_alert'];
199
- put?: never;
200
- post?: never;
162
+ post: operations['cli_auth_poll'];
201
163
  delete?: never;
202
164
  options?: never;
203
165
  head?: never;
204
166
  patch?: never;
205
167
  trace?: never;
206
168
  };
207
- '/v1/alerts/{alert_id}/dismiss': {
169
+ '/v1/auth/cli/start': {
208
170
  parameters: {
209
171
  query?: never;
210
172
  header?: never;
@@ -214,19 +176,21 @@ interface paths {
214
176
  get?: never;
215
177
  put?: never;
216
178
  /**
217
- * Dismiss Alert
218
- * @description Dismiss an open alert and return it.
179
+ * Cli Auth Start
180
+ * @description Start a device-code auth flow for the CLI.
219
181
  *
220
- * 409 when the alert is not open; 404 when it doesn't exist.
182
+ * Unauthenticated: the CLI has no credential yet — that's what
183
+ * it's obtaining. The human authorizes out-of-band in the
184
+ * dashboard.
221
185
  */
222
- post: operations['dismiss_alert'];
186
+ post: operations['cli_auth_start'];
223
187
  delete?: never;
224
188
  options?: never;
225
189
  head?: never;
226
190
  patch?: never;
227
191
  trace?: never;
228
192
  };
229
- '/v1/analytics/metrics': {
193
+ '/v1/automations': {
230
194
  parameters: {
231
195
  query?: never;
232
196
  header?: never;
@@ -234,27 +198,27 @@ interface paths {
234
198
  cookie?: never;
235
199
  };
236
200
  /**
237
- * Get Analytics Metrics
238
- * @description Return PR and review analytics metrics.
239
- *
240
- * The same data as the analytics dashboard.
241
- *
242
- * Windowing: pass explicit start/end, or days (default: the last
243
- * 30 days). account_type in all|user|bot scopes the authors (bot =
244
- * the apps/agents). Available to all credential types: the
245
- * responses expose the organization's own GitHub PR/review activity,
246
- * no secrets.
201
+ * List Automations
202
+ * @description List automations.
247
203
  */
248
- get: operations['get_analytics_metrics'];
204
+ get: operations['list_automations'];
249
205
  put?: never;
250
- post?: never;
206
+ /**
207
+ * Create Automation
208
+ * @description Create an automation, managed through the API: no file, live
209
+ * immediately. To put its definition in a repository instead, create
210
+ * it here and then POST /v1/automations/{automation_id}/link.
211
+ *
212
+ * 409 when another live automation already holds the name.
213
+ */
214
+ post: operations['create_automation'];
251
215
  delete?: never;
252
216
  options?: never;
253
217
  head?: never;
254
218
  patch?: never;
255
219
  trace?: never;
256
220
  };
257
- '/v1/analytics/pull-requests': {
221
+ '/v1/automations/{automation_id}': {
258
222
  parameters: {
259
223
  query?: never;
260
224
  header?: never;
@@ -262,47 +226,61 @@ interface paths {
262
226
  cookie?: never;
263
227
  };
264
228
  /**
265
- * Get Analytics Pull Requests
266
- * @description Return pull-request analytics.
229
+ * Get Automation
230
+ * @description Return one automation, by id or by name.
231
+ */
232
+ get: operations['get_automation'];
233
+ /**
234
+ * Update Automation
235
+ * @description Replace an automation's definition, by id or by name.
267
236
  *
268
- * Windowing: pass explicit start/end, or days (default: the last
269
- * 30 days).
237
+ * The whole definition is replaced, and the change is live at
238
+ * once. Only for automations managed through this API: one defined
239
+ * by a repository file is a 409, since the next push to that file
240
+ * would revert the change — unlink it first to take ownership.
270
241
  */
271
- get: operations['get_analytics_pull_requests'];
272
- put?: never;
242
+ put: operations['update_automation'];
273
243
  post?: never;
274
- delete?: never;
244
+ /**
245
+ * Delete Automation
246
+ * @description Delete an automation, by id or by name.
247
+ *
248
+ * It stops running and its name is freed immediately; its past
249
+ * sessions remain readable. Only for automations managed through
250
+ * this API — delete the file to remove one defined by a repository.
251
+ */
252
+ delete: operations['delete_automation'];
275
253
  options?: never;
276
254
  head?: never;
277
255
  patch?: never;
278
256
  trace?: never;
279
257
  };
280
- '/v1/analytics/reviews': {
258
+ '/v1/automations/{automation_id}/link': {
281
259
  parameters: {
282
260
  query?: never;
283
261
  header?: never;
284
262
  path?: never;
285
263
  cookie?: never;
286
264
  };
265
+ get?: never;
266
+ put?: never;
287
267
  /**
288
- * Get Analytics Reviews
289
- * @description Return code-review analytics.
268
+ * Link Automation
269
+ * @description Move an automation into a repository, by id or by name.
290
270
  *
291
- * account_type scopes reviewers (bot|user|all) — e.g. "what apps
292
- * review the most PRs?" is the reviewer facets here with
293
- * account_type=bot. Windowing: pass explicit start/end, or days
294
- * (default: the last 30 days).
271
+ * Opens a pull request adding its definition file. The automation
272
+ * keeps running unchanged meanwhile; merging hands it over to the
273
+ * file, after which the file is what changes it. Nothing happens
274
+ * if the pull request is never merged.
295
275
  */
296
- get: operations['get_analytics_reviews'];
297
- put?: never;
298
- post?: never;
276
+ post: operations['link_automation'];
299
277
  delete?: never;
300
278
  options?: never;
301
279
  head?: never;
302
280
  patch?: never;
303
281
  trace?: never;
304
282
  };
305
- '/v1/auth/cli/poll': {
283
+ '/v1/automations/{automation_id}/sessions': {
306
284
  parameters: {
307
285
  query?: never;
308
286
  header?: never;
@@ -312,19 +290,24 @@ interface paths {
312
290
  get?: never;
313
291
  put?: never;
314
292
  /**
315
- * Cli Auth Poll
316
- * @description Poll a device-code auth flow for its token.
293
+ * Start Automation Session
294
+ * @description Invoke an automation.
317
295
  *
318
- * Unauthenticated; the device code identifies the flow.
319
- */
320
- post: operations['cli_auth_poll'];
296
+ * Runs the automation exactly as defined — its persona, model,
297
+ * environment, permissions, skills, and budget bind — and returns
298
+ * the session it started. The body carries only what a caller may
299
+ * supply: the typed `input` its schema demands, an optional tighter
300
+ * `budget`, and `metadata`. For a different persona or environment,
301
+ * start a raw session with POST /v1/sessions instead.
302
+ */
303
+ post: operations['start_automation_session'];
321
304
  delete?: never;
322
305
  options?: never;
323
306
  head?: never;
324
307
  patch?: never;
325
308
  trace?: never;
326
309
  };
327
- '/v1/auth/cli/start': {
310
+ '/v1/automations/{automation_id}/unlink': {
328
311
  parameters: {
329
312
  query?: never;
330
313
  header?: never;
@@ -334,14 +317,14 @@ interface paths {
334
317
  get?: never;
335
318
  put?: never;
336
319
  /**
337
- * Cli Auth Start
338
- * @description Start a device-code auth flow for the CLI.
320
+ * Unlink Automation
321
+ * @description Take over an automation from its file, by id or by name.
339
322
  *
340
- * Unauthenticated: the CLI has no credential yet — that's what
341
- * it's obtaining. The human authorizes out-of-band in the
342
- * dashboard.
323
+ * The file stops governing it immediately and further changes go
324
+ * through this API. The file is left in place, inert — delete it
325
+ * whenever you like.
343
326
  */
344
- post: operations['cli_auth_start'];
327
+ post: operations['unlink_automation'];
345
328
  delete?: never;
346
329
  options?: never;
347
330
  head?: never;
@@ -519,7 +502,7 @@ interface paths {
519
502
  *
520
503
  * A read-only view, so an agent authoring another agent's
521
504
  * config can learn which repositories, channels, teams, and
522
- * organizations it may name before POST /agents/configs.
505
+ * organizations it may name before POST /automations.
523
506
  *
524
507
  * Available to all credential types including sandbox tokens: the
525
508
  * responses never include OAuth tokens or any other secret.
@@ -918,7 +901,7 @@ interface paths {
918
901
  * List Agent Sessions
919
902
  * @description List cloud agent sessions, newest first.
920
903
  *
921
- * Optionally filtered by config (id or `ellipsis.name`), source, time
904
+ * Optionally filtered by automation (id or name), source, time
922
905
  * window, attributed author, repository, and whether the session is
923
906
  * still going.
924
907
  */
@@ -928,14 +911,15 @@ interface paths {
928
911
  * Start Agent Session
929
912
  * @description Start a cloud agent session.
930
913
  *
931
- * The base is `from_config_id` (an id or an agent name) or, omitted,
932
- * the bare ad-hoc config; every AgentConfig key on the request
933
- * deep-merges on top, so the body is both the pointer and the
934
- * per-session override. `prompt` is the first message; omit it and
935
- * the session starts idle, waiting for one. 400 when
936
- * ellipsis.interactive=false and there is no prompt or input. 422
937
- * when the agent declares an input schema and the request's input
938
- * is absent or invalid.
914
+ * The daily driver: a prompt, optionally where to run it
915
+ * (`environment`) and the run's own settings, in the AgentConfig
916
+ * vocabulary. Anything omitted comes from the organization's
917
+ * settings — default model, default environment, budget — so
918
+ * `{"prompt": "..."}` alone is a complete request. `prompt` is the
919
+ * first message; omit it and the session starts idle, waiting for
920
+ * one. 400 when `interactive` is false and there is no prompt, or
921
+ * when `budget` exceeds the organization's per-session ceiling. To
922
+ * run a saved automation, use POST /v1/automations/{automation_id}/sessions.
939
923
  */
940
924
  post: operations['start_agent_session'];
941
925
  delete?: never;
@@ -1180,7 +1164,7 @@ interface paths {
1180
1164
  patch?: never;
1181
1165
  trace?: never;
1182
1166
  };
1183
- '/v1/settings/sessions/defaults': {
1167
+ '/v1/settings/organization': {
1184
1168
  parameters: {
1185
1169
  query?: never;
1186
1170
  header?: never;
@@ -1188,23 +1172,69 @@ interface paths {
1188
1172
  cookie?: never;
1189
1173
  };
1190
1174
  /**
1191
- * Get Session Defaults
1192
- * @description Get the account-wide session defaults.
1175
+ * Get Organization Settings
1176
+ * @description Get the organization settings.
1193
1177
  *
1194
- * Today one setting: the default model every session falls back to
1195
- * when neither its request nor its agent config names one.
1178
+ * The default model and default environment every session falls
1179
+ * back to when neither its request nor its automation names one,
1180
+ * and the per-session budget ceiling no session may exceed.
1196
1181
  */
1197
- get: operations['get_session_defaults'];
1182
+ get: operations['get_organization_settings'];
1198
1183
  /**
1199
- * Set Session Defaults
1200
- * @description Set the account-wide session defaults.
1184
+ * Set Organization Settings
1185
+ * @description Set the organization settings.
1201
1186
  *
1202
- * `model` accepts an alias or canonical id and is stored canonical;
1203
- * null clears it (sessions then fall back to the platform default).
1187
+ * Replaces all three: `default_model` accepts an alias or canonical
1188
+ * id and is stored canonical; `default_environment` accepts a name
1189
+ * or `env_` id and is stored as the id; `budget_ceiling.session` is
1190
+ * in US dollars, at most the platform ceiling. Null clears each.
1204
1191
  * Refused for sandbox tokens (potentially prompt-injected code must
1205
- * not repoint the account's default model).
1192
+ * not repoint the organization's defaults).
1193
+ */
1194
+ put: operations['put_organization_settings'];
1195
+ post?: never;
1196
+ delete?: never;
1197
+ options?: never;
1198
+ head?: never;
1199
+ patch?: never;
1200
+ trace?: never;
1201
+ };
1202
+ '/v1/templates': {
1203
+ parameters: {
1204
+ query?: never;
1205
+ header?: never;
1206
+ path?: never;
1207
+ cookie?: never;
1208
+ };
1209
+ /**
1210
+ * List Agent Templates
1211
+ * @description List the built-in starter agent templates.
1212
+ *
1213
+ * Behind auth but not account-scoped — the data is static
1214
+ * product content shared by the dashboard, landing site, and CLI.
1215
+ */
1216
+ get: operations['list_agent_templates'];
1217
+ put?: never;
1218
+ post?: never;
1219
+ delete?: never;
1220
+ options?: never;
1221
+ head?: never;
1222
+ patch?: never;
1223
+ trace?: never;
1224
+ };
1225
+ '/v1/templates/{template_id}': {
1226
+ parameters: {
1227
+ query?: never;
1228
+ header?: never;
1229
+ path?: never;
1230
+ cookie?: never;
1231
+ };
1232
+ /**
1233
+ * Get Agent Template
1234
+ * @description Return one built-in agent template by slug.
1206
1235
  */
1207
- put: operations['put_session_defaults'];
1236
+ get: operations['get_agent_template'];
1237
+ put?: never;
1208
1238
  post?: never;
1209
1239
  delete?: never;
1210
1240
  options?: never;
@@ -1768,14 +1798,6 @@ interface components {
1768
1798
  /** Ref */
1769
1799
  ref?: string | null;
1770
1800
  };
1771
- /**
1772
- * AgentConfigResponse
1773
- * @description One saved agent config.
1774
- */
1775
- AgentConfigResponse: {
1776
- /** @description The saved agent config. */
1777
- config: components['schemas']['Config'];
1778
- };
1779
1801
  /**
1780
1802
  * AgentConfigSettingsRef
1781
1803
  * @description A config-declared Claude Code settings.json, resolved at run start and
@@ -1838,17 +1860,6 @@ interface components {
1838
1860
  file: string;
1839
1861
  repository?: components['schemas']['AgentConfigRepository'] | null;
1840
1862
  };
1841
- /**
1842
- * AgentConfigsListResponse
1843
- * @description The caller's saved agent configs.
1844
- */
1845
- AgentConfigsListResponse: {
1846
- /**
1847
- * Configs
1848
- * @description Saved agent configs.
1849
- */
1850
- configs: components['schemas']['Config'][];
1851
- };
1852
1863
  /**
1853
1864
  * AgentTemplate
1854
1865
  * @description A built-in agent template: a ready-to-use agent config plus the
@@ -2243,35 +2254,137 @@ interface components {
2243
2254
  prs: number;
2244
2255
  };
2245
2256
  /**
2246
- * BudgetSource
2247
- * @description Which layer actually determined the enforced budget.
2248
- *
2249
- * Not derivable from the run row alone (the run does not store the config
2250
- * cents or the account default), so we persist it for the UI / audit.
2251
- * @enum {string}
2252
- */
2253
- BudgetSource: 'system' | 'account' | 'config' | 'run';
2254
- /**
2255
- * BudgetSummary
2256
- * @description The account's budget and spend for the current period, in one call —
2257
- * no client-side arithmetic needed.
2257
+ * Automation
2258
+ * @description An automation: a saved agent definition that runs on its trigger or
2259
+ * when invoked, plus where it syncs from and the state of that sync.
2258
2260
  */
2259
- BudgetSummary: {
2261
+ Automation: {
2262
+ /** @description The agent definition itself, in the same schema as a YAML file under agents/. */
2263
+ agent_config: components['schemas']['AgentConfig'];
2264
+ /** @description The repository, path, and branch the automation syncs from. Null only transiently, before the creating pull request's file lands on the branch. */
2265
+ agent_config_source_details?: components['schemas']['AgentConfigSourceGithub'] | null;
2260
2266
  /**
2261
- * Budget Usd
2262
- * @description The budget for the period, in US dollars.
2267
+ * Created At
2268
+ * Format: date-time
2269
+ * @description When the automation was created.
2263
2270
  */
2264
- budget_usd: number;
2271
+ created_at: string;
2265
2272
  /**
2266
- * Fraction Used
2267
- * @description The fraction of the budget spent, from 0 to 1 (and above 1 when over budget).
2273
+ * Display Name
2274
+ * @description The raw ellipsis.name display text from the config file.
2268
2275
  */
2269
- fraction_used: number;
2276
+ display_name?: string | null;
2277
+ /** @description The GitHub account that last edited the automation, when the edit came from a known user. */
2278
+ edited_by?: components['schemas']['GithubAccountSnippet'] | null;
2270
2279
  /**
2271
- * Pause At Limit
2272
- * @description Whether new work is paused once the budget is exhausted.
2280
+ * Id
2281
+ * @description Unique identifier of the automation.
2273
2282
  */
2274
- pause_at_limit: boolean;
2283
+ id: string;
2284
+ /**
2285
+ * Last Session Created At
2286
+ * @description When that most recent session was created.
2287
+ */
2288
+ last_session_created_at?: string | null;
2289
+ /**
2290
+ * Last Session Id
2291
+ * @description The most recent session this automation started, or null if it has never run.
2292
+ */
2293
+ last_session_id?: string | null;
2294
+ /**
2295
+ * Last Sync Error
2296
+ * @description The parse or validation error from the most recent sync attempt, or null when it succeeded. A non-null value means the automation is not running the YAML currently on the branch.
2297
+ */
2298
+ last_sync_error?: string | null;
2299
+ /**
2300
+ * Last Synced Commit Sha
2301
+ * @description The last commit the automation was synced from.
2302
+ */
2303
+ last_synced_commit_sha?: string | null;
2304
+ /** @description Which writer owns this automation. "github" automations are defined by a file in a repository and are changed by editing that file; "api" automations have no file and are changed through this API. */
2305
+ managed_by: components['schemas']['ConfigManagedBy'];
2306
+ /**
2307
+ * Name
2308
+ * @description The automation's account-unique addressable name (a slug of its display name); usable anywhere an automation is referenced, interchangeably with the id.
2309
+ */
2310
+ name?: string | null;
2311
+ /**
2312
+ * Pending Pull Request Url
2313
+ * @description The open pull request that adds this automation's file. Non-null means the automation is not live yet: it starts running once the pull request merges and syncs.
2314
+ */
2315
+ pending_pull_request_url?: string | null;
2316
+ /**
2317
+ * Sha
2318
+ * @description The definition's content identity: the version fingerprint frozen onto each session that runs it.
2319
+ */
2320
+ sha: string;
2321
+ /**
2322
+ * Updated At
2323
+ * Format: date-time
2324
+ * @description When the automation was last updated.
2325
+ */
2326
+ updated_at: string;
2327
+ };
2328
+ /**
2329
+ * AutomationResponse
2330
+ * @description One automation.
2331
+ */
2332
+ AutomationResponse: {
2333
+ /** @description The automation. */
2334
+ automation: components['schemas']['Automation'];
2335
+ };
2336
+ /**
2337
+ * AutomationsListResponse
2338
+ * @description The caller's automations.
2339
+ */
2340
+ AutomationsListResponse: {
2341
+ /**
2342
+ * Automations
2343
+ * @description Automations.
2344
+ */
2345
+ automations: components['schemas']['Automation'][];
2346
+ };
2347
+ /**
2348
+ * BudgetCeiling
2349
+ * @description The organization's spend ceilings, in US dollars.
2350
+ */
2351
+ BudgetCeiling: {
2352
+ /**
2353
+ * Session
2354
+ * @description The most a single session may be budgeted, in US dollars. A session request or automation asking for more is refused with 400. Null means the platform ceiling applies.
2355
+ */
2356
+ session?: number | null;
2357
+ };
2358
+ /**
2359
+ * BudgetSource
2360
+ * @description Which layer actually determined the enforced budget.
2361
+ *
2362
+ * Not derivable from the run row alone (the run does not store the config
2363
+ * cents or the account default), so we persist it for the UI / audit.
2364
+ * @enum {string}
2365
+ */
2366
+ BudgetSource: 'system' | 'account' | 'config' | 'run';
2367
+ /**
2368
+ * BudgetSummary
2369
+ * @description The account's budget and spend for the current period, in one call —
2370
+ * no client-side arithmetic needed.
2371
+ */
2372
+ BudgetSummary: {
2373
+ /**
2374
+ * Budget Usd
2375
+ * @description The budget for the period, in US dollars.
2376
+ */
2377
+ budget_usd: number;
2378
+ /**
2379
+ * Fraction Used
2380
+ * @description The fraction of the budget spent, from 0 to 1 (and above 1 when over budget).
2381
+ */
2382
+ fraction_used: number;
2383
+ /**
2384
+ * Pause At Limit
2385
+ * @description Whether new work is paused once the budget is exhausted.
2386
+ */
2387
+ pause_at_limit: boolean;
2275
2388
  /**
2276
2389
  * Period
2277
2390
  * @description The budget period (e.g. "monthly").
@@ -2794,78 +2907,6 @@ interface components {
2794
2907
  } & {
2795
2908
  [key: string]: unknown;
2796
2909
  };
2797
- /**
2798
- * Config
2799
- * @description A saved agent config: the stored row for one agent, plus where it syncs
2800
- * from and the state of that sync.
2801
- */
2802
- Config: {
2803
- /** @description The agent definition itself, as parsed from its YAML file. */
2804
- agent_config: components['schemas']['AgentConfig'];
2805
- /** @description The repository, path, and branch the config syncs from. Null only transiently, before the creating pull request's file lands on the branch. */
2806
- agent_config_source_details?: components['schemas']['AgentConfigSourceGithub'] | null;
2807
- /**
2808
- * Created At
2809
- * Format: date-time
2810
- * @description When the config was created.
2811
- */
2812
- created_at: string;
2813
- /**
2814
- * Display Name
2815
- * @description The raw ellipsis.name display text from the config file.
2816
- */
2817
- display_name?: string | null;
2818
- /** @description The GitHub account that last edited the config, when the edit came from a known user. */
2819
- edited_by?: components['schemas']['GithubAccountSnippet'] | null;
2820
- /**
2821
- * Id
2822
- * @description Unique identifier of the config.
2823
- */
2824
- id: string;
2825
- /**
2826
- * Last Session Created At
2827
- * @description When that most recent session was created.
2828
- */
2829
- last_session_created_at?: string | null;
2830
- /**
2831
- * Last Session Id
2832
- * @description The most recent session started from this config, or null if it has never run.
2833
- */
2834
- last_session_id?: string | null;
2835
- /**
2836
- * Last Sync Error
2837
- * @description The parse or validation error from the most recent sync attempt, or null when it succeeded. A non-null value means the agent is not running the YAML currently on the branch.
2838
- */
2839
- last_sync_error?: string | null;
2840
- /**
2841
- * Last Synced Commit Sha
2842
- * @description The last commit the config was synced from.
2843
- */
2844
- last_synced_commit_sha?: string | null;
2845
- /** @description Which writer owns this agent. "github" agents are defined by a file in a repository and are changed by editing that file; "api" agents have no file and are changed through this API. */
2846
- managed_by: components['schemas']['ConfigManagedBy'];
2847
- /**
2848
- * Name
2849
- * @description The agent's customer-unique addressable name (a slug of its display name); usable anywhere an agent is referenced, interchangeably with the id.
2850
- */
2851
- name?: string | null;
2852
- /**
2853
- * Pending Pull Request Url
2854
- * @description The open pull request that adds this config's file. Non-null means the agent is not live yet: it starts running once the pull request merges and syncs.
2855
- */
2856
- pending_pull_request_url?: string | null;
2857
- /**
2858
- * Sha
2859
- * @description The config's content identity: the version fingerprint frozen onto each session that runs it.
2860
- */
2861
- sha: string;
2862
- /**
2863
- * Updated At
2864
- * Format: date-time
2865
- * @description When the config was last updated.
2866
- */
2867
- updated_at: string;
2868
- };
2869
2910
  /**
2870
2911
  * ConfigManagedBy
2871
2912
  * @description Which writer owns an agent: the repository file it is defined in, or
@@ -2918,12 +2959,12 @@ interface components {
2918
2959
  reviews: number;
2919
2960
  };
2920
2961
  /**
2921
- * CreateAgentConfigRequest
2922
- * @description Parameters for creating an agent config.
2962
+ * CreateAutomationRequest
2963
+ * @description Parameters for creating an automation.
2923
2964
  */
2924
- CreateAgentConfigRequest: {
2925
- /** @description The agent's definition. */
2926
- config: components['schemas']['AgentConfig'];
2965
+ CreateAutomationRequest: {
2966
+ /** @description The automation's definition, in the same schema as a YAML file under agents/. */
2967
+ automation: components['schemas']['AgentConfig'];
2927
2968
  };
2928
2969
  /**
2929
2970
  * CreateEnvironmentRequest
@@ -3242,7 +3283,7 @@ interface components {
3242
3283
  ErrorInfo: {
3243
3284
  /**
3244
3285
  * Code
3245
- * @description Stable machine-readable error code. Open vocabulary — handle unknown codes by HTTP status. Known values: account_blocked, conflict, contact_email_required, failed_dependency, file_quota_exceeded, forbidden, internal_error, invalid_request, not_found, rate_limit_exceeded, rate_limited, review_in_flight, session_closed, session_ephemeral_trigger, session_finished, session_harness_single_turn, session_mention_surface, session_non_interactive, unauthorized, unavailable.
3286
+ * @description Stable machine-readable error code. Open vocabulary — handle unknown codes by HTTP status. Known values: account_blocked, budget_exceeds_ceiling, conflict, contact_email_required, failed_dependency, file_quota_exceeded, forbidden, internal_error, invalid_request, not_found, rate_limit_exceeded, rate_limited, review_in_flight, session_closed, session_ephemeral_trigger, session_finished, session_harness_single_turn, session_mention_surface, session_non_interactive, session_not_spawner, unauthorized, unavailable.
3246
3287
  */
3247
3288
  code: string;
3248
3289
  /**
@@ -4027,13 +4068,13 @@ interface components {
4027
4068
  teams: components['schemas']['LinearTeam'][];
4028
4069
  };
4029
4070
  /**
4030
- * LinkAgentConfigRequest
4031
- * @description Where to put the config file of an agent being moved into a repository.
4071
+ * LinkAutomationRequest
4072
+ * @description Where to put the file of an automation being moved into a repository.
4032
4073
  */
4033
- LinkAgentConfigRequest: {
4074
+ LinkAutomationRequest: {
4034
4075
  /**
4035
4076
  * Path
4036
- * @description File path within the repo. Omit for the default agents/<slug>.yaml; if set it must be a location the config sync scans (a .yaml/.yml file under agents/, .agents/, ellipsis/, or .ellipsis/ at any depth).
4077
+ * @description File path within the repo. Omit for the default agents/<slug>.yaml; if set it must be a location the sync scans (a .yaml/.yml file under agents/, .agents/, ellipsis/, or .ellipsis/ at any depth).
4037
4078
  */
4038
4079
  path?: string | null;
4039
4080
  /**
@@ -4043,20 +4084,20 @@ interface components {
4043
4084
  repository: string;
4044
4085
  };
4045
4086
  /**
4046
- * LinkAgentConfigResponse
4047
- * @description The agent and the pull request that would put it in a repository.
4087
+ * LinkAutomationResponse
4088
+ * @description The automation and the pull request that would put it in a repository.
4048
4089
  */
4049
- LinkAgentConfigResponse: {
4050
- /** @description The agent, still managed through the API until the pull request merges. */
4051
- config: components['schemas']['Config'];
4090
+ LinkAutomationResponse: {
4091
+ /** @description The automation, still managed through the API until the pull request merges. */
4092
+ automation: components['schemas']['Automation'];
4052
4093
  /**
4053
4094
  * Path
4054
- * @description The file path the config will be written to.
4095
+ * @description The file path the definition will be written to.
4055
4096
  */
4056
4097
  path: string;
4057
4098
  /**
4058
4099
  * Pull Request Url
4059
- * @description The pull request that adds the config file. The agent becomes managed by that file once it merges.
4100
+ * @description The pull request that adds the file. The automation becomes managed by that file once it merges.
4060
4101
  */
4061
4102
  pull_request_url: string;
4062
4103
  };
@@ -4319,6 +4360,25 @@ interface components {
4319
4360
  * @enum {string}
4320
4361
  */
4321
4362
  OrganizationRole: 'admin' | 'member';
4363
+ /**
4364
+ * OrganizationSettings
4365
+ * @description The organization-wide session settings: the defaults and ceilings every
4366
+ * session in the account resolves against.
4367
+ */
4368
+ OrganizationSettings: {
4369
+ /** @description The organization's spend ceilings. */
4370
+ budget_ceiling?: components['schemas']['BudgetCeiling'];
4371
+ /**
4372
+ * Default Environment
4373
+ * @description The saved environment sessions run in when neither their request nor their automation names one: an `env_...` id or the environment's name on write, always the id on read. Null means the built-in basic sandbox.
4374
+ */
4375
+ default_environment?: string | null;
4376
+ /**
4377
+ * Default Model
4378
+ * @description Canonical model id every session falls back to when neither its request nor its automation names one, or null when unset (sessions then run the platform default).
4379
+ */
4380
+ default_model?: string | null;
4381
+ };
4322
4382
  /**
4323
4383
  * ParentKind
4324
4384
  * @description How a session relates to its predecessor (parent_agent_session_id) —
@@ -5088,10 +5148,10 @@ interface components {
5088
5148
  */
5089
5149
  pr_title: string;
5090
5150
  /**
5091
- * Repo Name
5092
- * @description The repository name, without the owner.
5151
+ * Repo Full Name
5152
+ * @description The repository's full "owner/name" identifier.
5093
5153
  */
5094
- repo_name: string;
5154
+ repo_full_name: string;
5095
5155
  /**
5096
5156
  * Thumbs Down
5097
5157
  * @description Thumbs-down reactions on the comment.
@@ -5344,10 +5404,10 @@ interface components {
5344
5404
  */
5345
5405
  pr_title: string;
5346
5406
  /**
5347
- * Repo Name
5348
- * @description The repository name, without the owner.
5407
+ * Repo Full Name
5408
+ * @description The repository's full "owner/name" identifier.
5349
5409
  */
5350
- repo_name: string;
5410
+ repo_full_name: string;
5351
5411
  /** @description Who submitted the review. */
5352
5412
  reviewer: components['schemas']['ReviewActor'];
5353
5413
  /**
@@ -5385,7 +5445,7 @@ interface components {
5385
5445
  ReviewRepoFacet: {
5386
5446
  /**
5387
5447
  * Repository Name
5388
- * @description The repository name, without the owner.
5448
+ * @description The repository's full "owner/name" identifier.
5389
5449
  */
5390
5450
  repository_name: string;
5391
5451
  /**
@@ -6153,23 +6213,23 @@ interface components {
6153
6213
  };
6154
6214
  /**
6155
6215
  * SessionAgent
6156
- * @description The agent this session ran: the config it actually executed, where that
6157
- * config came from, and the diff that was merged in — the same
6216
+ * @description The agent this session ran: the definition it actually executed, where
6217
+ * that definition came from, and the diff that was merged in — the same
6158
6218
  * effective-value-plus-provenance shape `SessionBudget` uses.
6159
6219
  *
6160
- * `config` is the snapshot frozen when the session was created; `config_id`
6161
- * points at the saved config as it exists NOW. They diverge legitimately: a
6162
- * YAML edit after the session started, or any `override`, leaves the pointer
6163
- * describing something the session never ran.
6220
+ * `config` is the snapshot frozen when the session was created;
6221
+ * `automation_id` points at the automation as it exists NOW. They diverge
6222
+ * legitimately: a YAML edit after the session started, or any `override`,
6223
+ * leaves the pointer describing something the session never ran.
6164
6224
  */
6165
6225
  SessionAgent: {
6166
- /** @description The agent config the session actually ran, frozen when the session was created. */
6167
- config: components['schemas']['AgentConfig'];
6168
6226
  /**
6169
- * Config Id
6170
- * @description Identifier of the saved config this session's snapshot was taken from. Null for inline, platform-default, and built-in configs. Points at the config as it exists now, which may have changed since.
6227
+ * Automation Id
6228
+ * @description Identifier of the automation this session's snapshot was taken from. Null for raw sessions (nothing saved behind them), templates, and built-in agents. Points at the automation as it exists now, which may have changed since.
6171
6229
  */
6172
- config_id?: string | null;
6230
+ automation_id?: string | null;
6231
+ /** @description The agent definition the session actually ran, frozen when the session was created. */
6232
+ config: components['schemas']['AgentConfig'];
6173
6233
  /**
6174
6234
  * Override
6175
6235
  * @description The partial-config override merged into `config` for this session, or null when the config ran unmodified. `config` is the merged result; this is the diff.
@@ -6254,17 +6314,6 @@ interface components {
6254
6314
  */
6255
6315
  total: number;
6256
6316
  };
6257
- /**
6258
- * SessionDefaults
6259
- * @description The account-wide session defaults.
6260
- */
6261
- SessionDefaults: {
6262
- /**
6263
- * Model
6264
- * @description Canonical model id every session falls back to when neither the request nor its agent config names one, or null when unset (sessions then run the platform default).
6265
- */
6266
- model?: string | null;
6267
- };
6268
6317
  /**
6269
6318
  * SessionEnvironment
6270
6319
  * @description The environment this session resolved: which saved environment (as it
@@ -6381,6 +6430,26 @@ interface components {
6381
6430
  */
6382
6431
  repos: components['schemas']['SessionGitRepo'][];
6383
6432
  };
6433
+ /**
6434
+ * SessionGitCommit
6435
+ * @description One commit the session created in this repo (everything past the
6436
+ * provisioning checkout's sha), captured from the sandbox rather than the
6437
+ * transcript so it stays correct through amends, rebases, and commits made by
6438
+ * scripts. The repo is the parent object, so it is not repeated here.
6439
+ */
6440
+ SessionGitCommit: {
6441
+ /**
6442
+ * Committed At
6443
+ * Format: date-time
6444
+ */
6445
+ committed_at: string;
6446
+ /** Pushed */
6447
+ pushed: boolean;
6448
+ /** Sha */
6449
+ sha: string;
6450
+ /** Subject */
6451
+ subject: string;
6452
+ };
6384
6453
  /**
6385
6454
  * SessionGitFile
6386
6455
  * @description One file's uncommitted change, as `git diff HEAD --numstat` reports it
@@ -6398,10 +6467,11 @@ interface components {
6398
6467
  };
6399
6468
  /**
6400
6469
  * SessionGitPr
6401
- * @description A pull request the session opened in this repo, denormalized at capture
6402
- * time so a surface renders a labeled link without joining gh_prs. Live PR
6403
- * state (open/merged/closed) is not stored — read gh_prs where a view needs
6404
- * it. The repo is the parent object, so it is not repeated here.
6470
+ * @description A pull request the session opened in this repo, written the moment the
6471
+ * creating tool call's result lands (see extract_session_prs.PrCreateWatcher).
6472
+ * Live PR state (open/merged/closed) is not stored — it lives on gh_prs,
6473
+ * joined via `gh_pr_id` (GET /frontend/agents/sessions/{id}/git). The repo is
6474
+ * the parent object, so it is not repeated here.
6405
6475
  */
6406
6476
  SessionGitPr: {
6407
6477
  /** Gh Pr Id */
@@ -6419,6 +6489,16 @@ interface components {
6419
6489
  * it, split by whether it survived the sandbox.
6420
6490
  */
6421
6491
  SessionGitRepo: {
6492
+ /**
6493
+ * Commits
6494
+ * @default []
6495
+ */
6496
+ commits: components['schemas']['SessionGitCommit'][];
6497
+ /**
6498
+ * Commits Total
6499
+ * @default 0
6500
+ */
6501
+ commits_total: number;
6422
6502
  /** Full Name */
6423
6503
  full_name: string;
6424
6504
  /** Local Commit */
@@ -6951,35 +7031,51 @@ interface components {
6951
7031
  };
6952
7032
  /**
6953
7033
  * StartAgentSessionRequest
6954
- * @description Parameters for starting a new agent session: an optional base config
6955
- * pointer, the message fields, and any AgentConfig keys to patch on top.
7034
+ * @description Parameters for starting a raw session: where it runs, its first
7035
+ * message, and the run's own settings. Flat, in the AgentConfig vocabulary
7036
+ * — a `claude:` or `permissions:` block copied from an agents/ YAML file
7037
+ * pastes in verbatim. There is no automation behind a raw session; to run a
7038
+ * saved automation, invoke it with POST /v1/automations/{automation_id}/sessions.
7039
+ *
7040
+ * Extra keys are a 422, not silently dropped — a retired field
7041
+ * (`from_config_id`, `input`, `ellipsis`, `config_id`) must fail loudly on
7042
+ * an old client, never no-op.
6956
7043
  */
6957
7044
  StartAgentSessionRequest: {
6958
- /** @description The session's spend limits, e.g. {"session": 5.0}. */
6959
- budget?: components['schemas']['AgentConfigBudget'] | null;
6960
- /** @description The Claude-harness block: `{"model": ...}` to pick this session's model, plus system/effort/fallback_model/max_turns/settings. */
7045
+ /**
7046
+ * Budget
7047
+ * @description The most this session may spend, in US dollars. Omitted, the organization's default applies. Above the organization's per-session ceiling is a 400.
7048
+ */
7049
+ budget?: number | null;
7050
+ /** @description The Claude-harness block: `{"model": ...}` to pick this session's model, plus system/effort/fallback_model/max_turns/settings. Omit the model to run the organization's default. */
6961
7051
  claude?: components['schemas']['AgentConfigClaude'] | null;
6962
- /** @description The Codex-harness block. Its presence on the EFFECTIVE config selects the Codex harness, exactly as in a saved config. */
7052
+ /** @description The Codex-harness block. Its presence selects the Codex harness, exactly as in a saved automation; a request may not carry both `claude` and `codex`. */
6963
7053
  codex?: components['schemas']['AgentConfigCodex'] | null;
6964
- /** @description Platform housekeeping: metadata, interactive, force_rebuild. */
6965
- ellipsis?: components['schemas']['StartSessionEllipsis'];
6966
7054
  /**
6967
7055
  * Environment
6968
- * @description Where the session runs. A STRING (a saved environment's `env_...` id or name) re-picks that environment wholesale — it beats the base config's own reference. An OBJECT deep-merges onto the resolved environment (repositories merge by identity, see above).
7056
+ * @description Where the session runs. A STRING is a saved environment's name or `env_...` id. An OBJECT is an inline environment for this session only. Omitted, the session runs in the organization's default environment, else the built-in basic sandbox.
6969
7057
  */
6970
7058
  environment?: string | components['schemas']['AgentConfigEnvironment'] | null;
6971
7059
  /**
6972
- * From Config Id
6973
- * @description The saved agent config to use as this session's base: its id, or the agent's customer-unique `ellipsis.name`. Omitted, the base is the bare ad-hoc config — an empty system prompt on the account's default model in the basic sandbox — so the request's own keys and prompt fully describe the run.
7060
+ * Force Rebuild
7061
+ * @description Skip the image cache for this session's initial provision: a fresh full build whose snapshot then refreshes the cache for later runs. The CLI's `--rebuild`.
7062
+ * @default false
6974
7063
  */
6975
- from_config_id?: string | null;
7064
+ force_rebuild: boolean;
6976
7065
  /**
6977
- * Input
6978
- * @description The typed payload for an agent that declares input.json_schema: validated against the effective config's schema (422 on mismatch), rendered into the session's initial message (the agent's input.message template, or a JSON block). Required when the agent declares a schema; rejected when it does not.
7066
+ * Interactive
7067
+ * @description Whether the session stays open for messages after its first turn. Set false for a one-shot run that does its job and closes without holding a warm sandbox; a one-shot run must carry a prompt, since nothing can ever be sent to it later. Sessions on the Codex harness are one-shot regardless.
7068
+ * @default true
6979
7069
  */
6980
- input?: {
6981
- [key: string]: unknown;
6982
- } | null;
7070
+ interactive: boolean;
7071
+ /**
7072
+ * Metadata
7073
+ * @description Arbitrary string key/value metadata stored on the session.
7074
+ * @default {}
7075
+ */
7076
+ metadata: {
7077
+ [key: string]: string;
7078
+ };
6983
7079
  /** @description The structured-output exit contract for this session. */
6984
7080
  output?: components['schemas']['AgentConfigOutput'] | null;
6985
7081
  /** @description What the session may touch, per minted credential. */
@@ -6991,10 +7087,40 @@ interface components {
6991
7087
  prompt?: string | null;
6992
7088
  /**
6993
7089
  * Skills
6994
- * @description Config-declared skills; replaces the base config's list.
7090
+ * @description Skills installed for this session.
6995
7091
  */
6996
7092
  skills?: components['schemas']['AgentConfigSkill'][] | null;
6997
7093
  };
7094
+ /**
7095
+ * StartAutomationSessionRequest
7096
+ * @description Parameters for invoking an automation. Deliberately tiny: the
7097
+ * automation's definition binds (persona, model, environment, permissions,
7098
+ * skills, budget); a caller supplies only its typed input, an optional
7099
+ * tighter budget, and metadata. Anything else is a 422 — to run with a
7100
+ * different persona or environment, start a raw session instead.
7101
+ */
7102
+ StartAutomationSessionRequest: {
7103
+ /**
7104
+ * Budget
7105
+ * @description Tighten this run's spend cap, in US dollars. May only lower the automation's own session budget; a higher number, or one above the organization's ceiling, is a 400.
7106
+ */
7107
+ budget?: number | null;
7108
+ /**
7109
+ * Input
7110
+ * @description The typed payload for an automation that declares input.json_schema: validated against it (422 on mismatch) and rendered into the session's first message through the automation's input.message template. Required when the automation declares a schema; a 422 when it does not.
7111
+ */
7112
+ input?: {
7113
+ [key: string]: unknown;
7114
+ } | null;
7115
+ /**
7116
+ * Metadata
7117
+ * @description Arbitrary string key/value metadata stored on the session.
7118
+ * @default {}
7119
+ */
7120
+ metadata: {
7121
+ [key: string]: string;
7122
+ };
7123
+ };
6998
7124
  /**
6999
7125
  * StartCliAuthResponse
7000
7126
  * @description A freshly minted device-code flow: show the user code (or open the
@@ -7032,35 +7158,6 @@ interface components {
7032
7158
  */
7033
7159
  verification_uri_complete: string;
7034
7160
  };
7035
- /**
7036
- * StartSessionEllipsis
7037
- * @description Platform housekeeping for the session — the request-side `ellipsis`
7038
- * block. Session-scoped: unlike a config file's `ellipsis` block it carries
7039
- * no `name`/`enabled` (those describe a saved agent, not a run) — and
7040
- * sending them here is a 422, not a silent drop.
7041
- */
7042
- StartSessionEllipsis: {
7043
- /**
7044
- * Force Rebuild
7045
- * @description Skip the image cache for this session's initial provision: a fresh full build whose snapshot then refreshes the cache for later runs. A wake of a durable session provisions through the cache as usual. The CLI's `--rebuild`.
7046
- * @default false
7047
- */
7048
- force_rebuild: boolean;
7049
- /**
7050
- * Interactive
7051
- * @description Whether the session stays open for messages after its first turn. Set false for a one-shot run that does its job and closes without holding a warm sandbox; a one-shot run must carry a prompt (or input), since nothing can ever be sent to it later. Agents on the Codex harness are one-shot regardless.
7052
- * @default true
7053
- */
7054
- interactive: boolean;
7055
- /**
7056
- * Metadata
7057
- * @description Arbitrary string key/value metadata stored on the session.
7058
- * @default {}
7059
- */
7060
- metadata: {
7061
- [key: string]: string;
7062
- };
7063
- };
7064
7161
  /**
7065
7162
  * TokensInfo
7066
7163
  * @description Token/cost usage, per record (one API call's counts, aggregate fields at
@@ -7118,12 +7215,12 @@ interface components {
7118
7215
  skipped: number;
7119
7216
  };
7120
7217
  /**
7121
- * UpdateAgentConfigRequest
7122
- * @description A replacement definition for an agent managed through the API.
7218
+ * UpdateAutomationRequest
7219
+ * @description A replacement definition for an automation managed through the API.
7123
7220
  */
7124
- UpdateAgentConfigRequest: {
7125
- /** @description The agent's new definition. Replaces the previous one wholesale — this is not a partial update. */
7126
- config: components['schemas']['AgentConfig'];
7221
+ UpdateAutomationRequest: {
7222
+ /** @description The automation's new definition. Replaces the previous one wholesale — this is not a partial update. */
7223
+ automation: components['schemas']['AgentConfig'];
7127
7224
  };
7128
7225
  /**
7129
7226
  * UpdateEnvironmentRequest
@@ -7255,9 +7352,14 @@ interface components {
7255
7352
  pathItems: never;
7256
7353
  }
7257
7354
  interface operations {
7258
- list_agent_configs: {
7355
+ list_alerts: {
7259
7356
  parameters: {
7260
- query?: never;
7357
+ query?: {
7358
+ status?: components['schemas']['AlertStatus'] | null;
7359
+ source?: components['schemas']['AlertSource'] | null;
7360
+ limit?: number;
7361
+ cursor?: string | null;
7362
+ };
7261
7363
  header?: {
7262
7364
  'user-agent'?: string | null;
7263
7365
  };
@@ -7272,7 +7374,7 @@ interface operations {
7272
7374
  [name: string]: unknown;
7273
7375
  };
7274
7376
  content: {
7275
- 'application/json': components['schemas']['AgentConfigsListResponse'];
7377
+ 'application/json': components['schemas']['AlertsListResponse'];
7276
7378
  };
7277
7379
  };
7278
7380
  /** @description The bearer token is missing, invalid, or revoked. */
@@ -7304,37 +7406,26 @@ interface operations {
7304
7406
  };
7305
7407
  };
7306
7408
  };
7307
- create_agent_config: {
7409
+ get_alert: {
7308
7410
  parameters: {
7309
7411
  query?: never;
7310
7412
  header?: {
7311
7413
  'user-agent'?: string | null;
7312
7414
  };
7313
- path?: never;
7415
+ path: {
7416
+ alert_id: string;
7417
+ };
7314
7418
  cookie?: never;
7315
7419
  };
7316
- requestBody: {
7317
- content: {
7318
- 'application/json': components['schemas']['CreateAgentConfigRequest'];
7319
- };
7320
- };
7420
+ requestBody?: never;
7321
7421
  responses: {
7322
7422
  /** @description Successful Response */
7323
- 201: {
7324
- headers: {
7325
- [name: string]: unknown;
7326
- };
7327
- content: {
7328
- 'application/json': components['schemas']['AgentConfigResponse'];
7329
- };
7330
- };
7331
- /** @description The config is invalid. */
7332
- 400: {
7423
+ 200: {
7333
7424
  headers: {
7334
7425
  [name: string]: unknown;
7335
7426
  };
7336
7427
  content: {
7337
- 'application/json': components['schemas']['ErrorResponse'];
7428
+ 'application/json': components['schemas']['AlertResponse'];
7338
7429
  };
7339
7430
  };
7340
7431
  /** @description The bearer token is missing, invalid, or revoked. */
@@ -7355,8 +7446,8 @@ interface operations {
7355
7446
  'application/json': components['schemas']['ErrorResponse'];
7356
7447
  };
7357
7448
  };
7358
- /** @description An agent with that name already exists. */
7359
- 409: {
7449
+ /** @description No such alert in your account. */
7450
+ 404: {
7360
7451
  headers: {
7361
7452
  [name: string]: unknown;
7362
7453
  };
@@ -7364,25 +7455,25 @@ interface operations {
7364
7455
  'application/json': components['schemas']['ErrorResponse'];
7365
7456
  };
7366
7457
  };
7367
- /** @description The agent's name contains no usable characters, or a file reference names no repository. */
7458
+ /** @description Validation Error */
7368
7459
  422: {
7369
7460
  headers: {
7370
7461
  [name: string]: unknown;
7371
7462
  };
7372
7463
  content: {
7373
- 'application/json': components['schemas']['ErrorResponse'];
7464
+ 'application/json': components['schemas']['HTTPValidationError'];
7374
7465
  };
7375
7466
  };
7376
7467
  };
7377
7468
  };
7378
- get_agent_config: {
7469
+ dismiss_alert: {
7379
7470
  parameters: {
7380
7471
  query?: never;
7381
7472
  header?: {
7382
7473
  'user-agent'?: string | null;
7383
7474
  };
7384
7475
  path: {
7385
- config_id: string;
7476
+ alert_id: string;
7386
7477
  };
7387
7478
  cookie?: never;
7388
7479
  };
@@ -7394,7 +7485,7 @@ interface operations {
7394
7485
  [name: string]: unknown;
7395
7486
  };
7396
7487
  content: {
7397
- 'application/json': components['schemas']['AgentConfigResponse'];
7488
+ 'application/json': components['schemas']['AlertResponse'];
7398
7489
  };
7399
7490
  };
7400
7491
  /** @description The bearer token is missing, invalid, or revoked. */
@@ -7415,7 +7506,7 @@ interface operations {
7415
7506
  'application/json': components['schemas']['ErrorResponse'];
7416
7507
  };
7417
7508
  };
7418
- /** @description No such config in your account. */
7509
+ /** @description No such alert in your account. */
7419
7510
  404: {
7420
7511
  headers: {
7421
7512
  [name: string]: unknown;
@@ -7424,6 +7515,15 @@ interface operations {
7424
7515
  'application/json': components['schemas']['ErrorResponse'];
7425
7516
  };
7426
7517
  };
7518
+ /** @description The alert is not open. */
7519
+ 409: {
7520
+ headers: {
7521
+ [name: string]: unknown;
7522
+ };
7523
+ content: {
7524
+ 'application/json': components['schemas']['ErrorResponse'];
7525
+ };
7526
+ };
7427
7527
  /** @description Validation Error */
7428
7528
  422: {
7429
7529
  headers: {
@@ -7435,22 +7535,27 @@ interface operations {
7435
7535
  };
7436
7536
  };
7437
7537
  };
7438
- update_agent_config: {
7538
+ get_analytics_metrics: {
7439
7539
  parameters: {
7440
- query?: never;
7540
+ query?: {
7541
+ days?: number | null;
7542
+ start?: string | null;
7543
+ end?: string | null;
7544
+ /** @description Filter to repositories by "owner/name". */
7545
+ repo?: string[] | null;
7546
+ /** @description Filter by PR-author login(s). */
7547
+ author?: string[] | null;
7548
+ account_type?: string;
7549
+ /** @description Filter by parent-PR status (open|draft|merged|closed). */
7550
+ status?: string[] | null;
7551
+ };
7441
7552
  header?: {
7442
7553
  'user-agent'?: string | null;
7443
7554
  };
7444
- path: {
7445
- config_id: string;
7446
- };
7555
+ path?: never;
7447
7556
  cookie?: never;
7448
7557
  };
7449
- requestBody: {
7450
- content: {
7451
- 'application/json': components['schemas']['UpdateAgentConfigRequest'];
7452
- };
7453
- };
7558
+ requestBody?: never;
7454
7559
  responses: {
7455
7560
  /** @description Successful Response */
7456
7561
  200: {
@@ -7458,10 +7563,10 @@ interface operations {
7458
7563
  [name: string]: unknown;
7459
7564
  };
7460
7565
  content: {
7461
- 'application/json': components['schemas']['AgentConfigResponse'];
7566
+ 'application/json': components['schemas']['GetAnalyticsMetricsResponse'];
7462
7567
  };
7463
7568
  };
7464
- /** @description The config is invalid (for example an unschedulable cron expression). */
7569
+ /** @description The time window is invalid: days combined with start, a non-positive days, or end not after start. */
7465
7570
  400: {
7466
7571
  headers: {
7467
7572
  [name: string]: unknown;
@@ -7488,66 +7593,49 @@ interface operations {
7488
7593
  'application/json': components['schemas']['ErrorResponse'];
7489
7594
  };
7490
7595
  };
7491
- /** @description No such config in your account. */
7492
- 404: {
7493
- headers: {
7494
- [name: string]: unknown;
7495
- };
7496
- content: {
7497
- 'application/json': components['schemas']['ErrorResponse'];
7498
- };
7499
- };
7500
- /** @description The agent is defined by a file in a repository, or another live agent already holds the new name. */
7501
- 409: {
7502
- headers: {
7503
- [name: string]: unknown;
7504
- };
7505
- content: {
7506
- 'application/json': components['schemas']['ErrorResponse'];
7507
- };
7508
- };
7509
- /** @description The agent's name is missing or malformed, or a file reference names no repository. */
7596
+ /** @description Validation Error */
7510
7597
  422: {
7511
7598
  headers: {
7512
7599
  [name: string]: unknown;
7513
7600
  };
7514
7601
  content: {
7515
- 'application/json': components['schemas']['ErrorResponse'];
7602
+ 'application/json': components['schemas']['HTTPValidationError'];
7516
7603
  };
7517
7604
  };
7518
7605
  };
7519
7606
  };
7520
- delete_agent_config: {
7607
+ get_analytics_pull_requests: {
7521
7608
  parameters: {
7522
- query?: never;
7609
+ query?: {
7610
+ days?: number | null;
7611
+ start?: string | null;
7612
+ end?: string | null;
7613
+ /** @description Filter to repositories by "owner/name". */
7614
+ repo?: string[] | null;
7615
+ /** @description Filter by PR-author login(s). */
7616
+ author?: string[] | null;
7617
+ account_type?: string;
7618
+ status?: string[] | null;
7619
+ };
7523
7620
  header?: {
7524
7621
  'user-agent'?: string | null;
7525
7622
  };
7526
- path: {
7527
- config_id: string;
7528
- };
7623
+ path?: never;
7529
7624
  cookie?: never;
7530
7625
  };
7531
7626
  requestBody?: never;
7532
7627
  responses: {
7533
7628
  /** @description Successful Response */
7534
- 204: {
7535
- headers: {
7536
- [name: string]: unknown;
7537
- };
7538
- content?: never;
7539
- };
7540
- /** @description The bearer token is missing, invalid, or revoked. */
7541
- 401: {
7629
+ 200: {
7542
7630
  headers: {
7543
7631
  [name: string]: unknown;
7544
7632
  };
7545
7633
  content: {
7546
- 'application/json': components['schemas']['ErrorResponse'];
7634
+ 'application/json': components['schemas']['GetAnalyticsPullRequestsResponse'];
7547
7635
  };
7548
7636
  };
7549
- /** @description The credential may not perform this action, or the account is blocked. */
7550
- 403: {
7637
+ /** @description The time window is invalid: days combined with start, a non-positive days, or end not after start. */
7638
+ 400: {
7551
7639
  headers: {
7552
7640
  [name: string]: unknown;
7553
7641
  };
@@ -7555,8 +7643,8 @@ interface operations {
7555
7643
  'application/json': components['schemas']['ErrorResponse'];
7556
7644
  };
7557
7645
  };
7558
- /** @description No such config in your account. */
7559
- 404: {
7646
+ /** @description The bearer token is missing, invalid, or revoked. */
7647
+ 401: {
7560
7648
  headers: {
7561
7649
  [name: string]: unknown;
7562
7650
  };
@@ -7564,8 +7652,8 @@ interface operations {
7564
7652
  'application/json': components['schemas']['ErrorResponse'];
7565
7653
  };
7566
7654
  };
7567
- /** @description The agent is defined by a file in a repository; delete that file instead. */
7568
- 409: {
7655
+ /** @description The credential may not perform this action, or the account is blocked. */
7656
+ 403: {
7569
7657
  headers: {
7570
7658
  [name: string]: unknown;
7571
7659
  };
@@ -7584,22 +7672,25 @@ interface operations {
7584
7672
  };
7585
7673
  };
7586
7674
  };
7587
- link_agent_config: {
7675
+ get_analytics_reviews: {
7588
7676
  parameters: {
7589
- query?: never;
7677
+ query?: {
7678
+ days?: number | null;
7679
+ start?: string | null;
7680
+ end?: string | null;
7681
+ repo?: string[] | null;
7682
+ /** @description Filter by reviewer login(s). */
7683
+ author?: string[] | null;
7684
+ account_type?: string;
7685
+ review_state?: string[] | null;
7686
+ };
7590
7687
  header?: {
7591
7688
  'user-agent'?: string | null;
7592
7689
  };
7593
- path: {
7594
- config_id: string;
7595
- };
7690
+ path?: never;
7596
7691
  cookie?: never;
7597
7692
  };
7598
- requestBody: {
7599
- content: {
7600
- 'application/json': components['schemas']['LinkAgentConfigRequest'];
7601
- };
7602
- };
7693
+ requestBody?: never;
7603
7694
  responses: {
7604
7695
  /** @description Successful Response */
7605
7696
  200: {
@@ -7607,10 +7698,10 @@ interface operations {
7607
7698
  [name: string]: unknown;
7608
7699
  };
7609
7700
  content: {
7610
- 'application/json': components['schemas']['LinkAgentConfigResponse'];
7701
+ 'application/json': components['schemas']['GetAnalyticsReviewsResponse'];
7611
7702
  };
7612
7703
  };
7613
- /** @description The path is not a synced config location, or the repository has no commits. */
7704
+ /** @description The time window is invalid: days combined with start, a non-positive days, or end not after start. */
7614
7705
  400: {
7615
7706
  headers: {
7616
7707
  [name: string]: unknown;
@@ -7637,47 +7728,29 @@ interface operations {
7637
7728
  'application/json': components['schemas']['ErrorResponse'];
7638
7729
  };
7639
7730
  };
7640
- /** @description The config or repository was not found in your account. */
7641
- 404: {
7642
- headers: {
7643
- [name: string]: unknown;
7644
- };
7645
- content: {
7646
- 'application/json': components['schemas']['ErrorResponse'];
7647
- };
7648
- };
7649
- /** @description The agent is already defined by a file, a link is already open for it, a file already exists at that path, or another agent syncs from it. */
7650
- 409: {
7651
- headers: {
7652
- [name: string]: unknown;
7653
- };
7654
- content: {
7655
- 'application/json': components['schemas']['ErrorResponse'];
7656
- };
7657
- };
7658
- /** @description GitHub rejected the pull request. */
7731
+ /** @description Validation Error */
7659
7732
  422: {
7660
7733
  headers: {
7661
7734
  [name: string]: unknown;
7662
7735
  };
7663
7736
  content: {
7664
- 'application/json': components['schemas']['ErrorResponse'];
7737
+ 'application/json': components['schemas']['HTTPValidationError'];
7665
7738
  };
7666
7739
  };
7667
7740
  };
7668
7741
  };
7669
- unlink_agent_config: {
7742
+ cli_auth_poll: {
7670
7743
  parameters: {
7671
7744
  query?: never;
7672
- header?: {
7673
- 'user-agent'?: string | null;
7674
- };
7675
- path: {
7676
- config_id: string;
7677
- };
7745
+ header?: never;
7746
+ path?: never;
7678
7747
  cookie?: never;
7679
7748
  };
7680
- requestBody?: never;
7749
+ requestBody: {
7750
+ content: {
7751
+ 'application/json': components['schemas']['CliAuthPollRequest'];
7752
+ };
7753
+ };
7681
7754
  responses: {
7682
7755
  /** @description Successful Response */
7683
7756
  200: {
@@ -7685,7 +7758,7 @@ interface operations {
7685
7758
  [name: string]: unknown;
7686
7759
  };
7687
7760
  content: {
7688
- 'application/json': components['schemas']['AgentConfigResponse'];
7761
+ 'application/json': components['schemas']['PollCliAuthResponse'];
7689
7762
  };
7690
7763
  };
7691
7764
  /** @description The bearer token is missing, invalid, or revoked. */
@@ -7706,7 +7779,7 @@ interface operations {
7706
7779
  'application/json': components['schemas']['ErrorResponse'];
7707
7780
  };
7708
7781
  };
7709
- /** @description No such config in your account. */
7782
+ /** @description Unknown device code. */
7710
7783
  404: {
7711
7784
  headers: {
7712
7785
  [name: string]: unknown;
@@ -7715,44 +7788,33 @@ interface operations {
7715
7788
  'application/json': components['schemas']['ErrorResponse'];
7716
7789
  };
7717
7790
  };
7718
- /** @description The agent is already managed through the API. */
7719
- 409: {
7720
- headers: {
7721
- [name: string]: unknown;
7722
- };
7723
- content: {
7724
- 'application/json': components['schemas']['ErrorResponse'];
7725
- };
7726
- };
7727
- /** @description The config has a file reference that names no repository, so it cannot resolve without its source repository. */
7791
+ /** @description Validation Error */
7728
7792
  422: {
7729
7793
  headers: {
7730
7794
  [name: string]: unknown;
7731
7795
  };
7732
7796
  content: {
7733
- 'application/json': components['schemas']['ErrorResponse'];
7797
+ 'application/json': components['schemas']['HTTPValidationError'];
7734
7798
  };
7735
7799
  };
7736
7800
  };
7737
7801
  };
7738
- list_agent_templates: {
7802
+ cli_auth_start: {
7739
7803
  parameters: {
7740
7804
  query?: never;
7741
- header?: {
7742
- 'user-agent'?: string | null;
7743
- };
7805
+ header?: never;
7744
7806
  path?: never;
7745
7807
  cookie?: never;
7746
7808
  };
7747
7809
  requestBody?: never;
7748
7810
  responses: {
7749
7811
  /** @description Successful Response */
7750
- 200: {
7812
+ 201: {
7751
7813
  headers: {
7752
7814
  [name: string]: unknown;
7753
7815
  };
7754
7816
  content: {
7755
- 'application/json': components['schemas']['AgentTemplatesListResponse'];
7817
+ 'application/json': components['schemas']['StartCliAuthResponse'];
7756
7818
  };
7757
7819
  };
7758
7820
  /** @description The bearer token is missing, invalid, or revoked. */
@@ -7773,26 +7835,15 @@ interface operations {
7773
7835
  'application/json': components['schemas']['ErrorResponse'];
7774
7836
  };
7775
7837
  };
7776
- /** @description Validation Error */
7777
- 422: {
7778
- headers: {
7779
- [name: string]: unknown;
7780
- };
7781
- content: {
7782
- 'application/json': components['schemas']['HTTPValidationError'];
7783
- };
7784
- };
7785
7838
  };
7786
7839
  };
7787
- get_agent_template: {
7840
+ list_automations: {
7788
7841
  parameters: {
7789
7842
  query?: never;
7790
7843
  header?: {
7791
7844
  'user-agent'?: string | null;
7792
7845
  };
7793
- path: {
7794
- template_id: string;
7795
- };
7846
+ path?: never;
7796
7847
  cookie?: never;
7797
7848
  };
7798
7849
  requestBody?: never;
@@ -7803,7 +7854,7 @@ interface operations {
7803
7854
  [name: string]: unknown;
7804
7855
  };
7805
7856
  content: {
7806
- 'application/json': components['schemas']['AgentTemplate'];
7857
+ 'application/json': components['schemas']['AutomationsListResponse'];
7807
7858
  };
7808
7859
  };
7809
7860
  /** @description The bearer token is missing, invalid, or revoked. */
@@ -7824,15 +7875,6 @@ interface operations {
7824
7875
  'application/json': components['schemas']['ErrorResponse'];
7825
7876
  };
7826
7877
  };
7827
- /** @description No such template. */
7828
- 404: {
7829
- headers: {
7830
- [name: string]: unknown;
7831
- };
7832
- content: {
7833
- 'application/json': components['schemas']['ErrorResponse'];
7834
- };
7835
- };
7836
7878
  /** @description Validation Error */
7837
7879
  422: {
7838
7880
  headers: {
@@ -7844,29 +7886,37 @@ interface operations {
7844
7886
  };
7845
7887
  };
7846
7888
  };
7847
- list_alerts: {
7889
+ create_automation: {
7848
7890
  parameters: {
7849
- query?: {
7850
- status?: components['schemas']['AlertStatus'] | null;
7851
- source?: components['schemas']['AlertSource'] | null;
7852
- limit?: number;
7853
- cursor?: string | null;
7854
- };
7891
+ query?: never;
7855
7892
  header?: {
7856
7893
  'user-agent'?: string | null;
7857
7894
  };
7858
7895
  path?: never;
7859
7896
  cookie?: never;
7860
7897
  };
7861
- requestBody?: never;
7898
+ requestBody: {
7899
+ content: {
7900
+ 'application/json': components['schemas']['CreateAutomationRequest'];
7901
+ };
7902
+ };
7862
7903
  responses: {
7863
7904
  /** @description Successful Response */
7864
- 200: {
7905
+ 201: {
7865
7906
  headers: {
7866
7907
  [name: string]: unknown;
7867
7908
  };
7868
7909
  content: {
7869
- 'application/json': components['schemas']['AlertsListResponse'];
7910
+ 'application/json': components['schemas']['AutomationResponse'];
7911
+ };
7912
+ };
7913
+ /** @description The definition is invalid. */
7914
+ 400: {
7915
+ headers: {
7916
+ [name: string]: unknown;
7917
+ };
7918
+ content: {
7919
+ 'application/json': components['schemas']['ErrorResponse'];
7870
7920
  };
7871
7921
  };
7872
7922
  /** @description The bearer token is missing, invalid, or revoked. */
@@ -7887,25 +7937,34 @@ interface operations {
7887
7937
  'application/json': components['schemas']['ErrorResponse'];
7888
7938
  };
7889
7939
  };
7890
- /** @description Validation Error */
7940
+ /** @description An automation with that name already exists. */
7941
+ 409: {
7942
+ headers: {
7943
+ [name: string]: unknown;
7944
+ };
7945
+ content: {
7946
+ 'application/json': components['schemas']['ErrorResponse'];
7947
+ };
7948
+ };
7949
+ /** @description The automation's name contains no usable characters, or a file reference names no repository. */
7891
7950
  422: {
7892
7951
  headers: {
7893
7952
  [name: string]: unknown;
7894
7953
  };
7895
7954
  content: {
7896
- 'application/json': components['schemas']['HTTPValidationError'];
7955
+ 'application/json': components['schemas']['ErrorResponse'];
7897
7956
  };
7898
7957
  };
7899
7958
  };
7900
7959
  };
7901
- get_alert: {
7960
+ get_automation: {
7902
7961
  parameters: {
7903
7962
  query?: never;
7904
7963
  header?: {
7905
7964
  'user-agent'?: string | null;
7906
7965
  };
7907
7966
  path: {
7908
- alert_id: string;
7967
+ automation_id: string;
7909
7968
  };
7910
7969
  cookie?: never;
7911
7970
  };
@@ -7917,7 +7976,7 @@ interface operations {
7917
7976
  [name: string]: unknown;
7918
7977
  };
7919
7978
  content: {
7920
- 'application/json': components['schemas']['AlertResponse'];
7979
+ 'application/json': components['schemas']['AutomationResponse'];
7921
7980
  };
7922
7981
  };
7923
7982
  /** @description The bearer token is missing, invalid, or revoked. */
@@ -7938,7 +7997,7 @@ interface operations {
7938
7997
  'application/json': components['schemas']['ErrorResponse'];
7939
7998
  };
7940
7999
  };
7941
- /** @description No such alert in your account. */
8000
+ /** @description No such automation in your account. */
7942
8001
  404: {
7943
8002
  headers: {
7944
8003
  [name: string]: unknown;
@@ -7958,18 +8017,22 @@ interface operations {
7958
8017
  };
7959
8018
  };
7960
8019
  };
7961
- dismiss_alert: {
8020
+ update_automation: {
7962
8021
  parameters: {
7963
8022
  query?: never;
7964
8023
  header?: {
7965
8024
  'user-agent'?: string | null;
7966
8025
  };
7967
8026
  path: {
7968
- alert_id: string;
8027
+ automation_id: string;
7969
8028
  };
7970
8029
  cookie?: never;
7971
8030
  };
7972
- requestBody?: never;
8031
+ requestBody: {
8032
+ content: {
8033
+ 'application/json': components['schemas']['UpdateAutomationRequest'];
8034
+ };
8035
+ };
7973
8036
  responses: {
7974
8037
  /** @description Successful Response */
7975
8038
  200: {
@@ -7977,7 +8040,16 @@ interface operations {
7977
8040
  [name: string]: unknown;
7978
8041
  };
7979
8042
  content: {
7980
- 'application/json': components['schemas']['AlertResponse'];
8043
+ 'application/json': components['schemas']['AutomationResponse'];
8044
+ };
8045
+ };
8046
+ /** @description The definition is invalid (for example an unschedulable cron expression). */
8047
+ 400: {
8048
+ headers: {
8049
+ [name: string]: unknown;
8050
+ };
8051
+ content: {
8052
+ 'application/json': components['schemas']['ErrorResponse'];
7981
8053
  };
7982
8054
  };
7983
8055
  /** @description The bearer token is missing, invalid, or revoked. */
@@ -7998,7 +8070,7 @@ interface operations {
7998
8070
  'application/json': components['schemas']['ErrorResponse'];
7999
8071
  };
8000
8072
  };
8001
- /** @description No such alert in your account. */
8073
+ /** @description No such automation in your account. */
8002
8074
  404: {
8003
8075
  headers: {
8004
8076
  [name: string]: unknown;
@@ -8007,7 +8079,7 @@ interface operations {
8007
8079
  'application/json': components['schemas']['ErrorResponse'];
8008
8080
  };
8009
8081
  };
8010
- /** @description The alert is not open. */
8082
+ /** @description The automation is defined by a file in a repository, or another live automation already holds the new name. */
8011
8083
  409: {
8012
8084
  headers: {
8013
8085
  [name: string]: unknown;
@@ -8016,50 +8088,48 @@ interface operations {
8016
8088
  'application/json': components['schemas']['ErrorResponse'];
8017
8089
  };
8018
8090
  };
8019
- /** @description Validation Error */
8091
+ /** @description The automation's name is missing or malformed, or a file reference names no repository. */
8020
8092
  422: {
8021
8093
  headers: {
8022
8094
  [name: string]: unknown;
8023
8095
  };
8024
8096
  content: {
8025
- 'application/json': components['schemas']['HTTPValidationError'];
8097
+ 'application/json': components['schemas']['ErrorResponse'];
8026
8098
  };
8027
8099
  };
8028
8100
  };
8029
8101
  };
8030
- get_analytics_metrics: {
8102
+ delete_automation: {
8031
8103
  parameters: {
8032
- query?: {
8033
- days?: number | null;
8034
- start?: string | null;
8035
- end?: string | null;
8036
- /** @description Filter to repositories by "owner/name". */
8037
- repo?: string[] | null;
8038
- /** @description Filter by PR-author login(s). */
8039
- author?: string[] | null;
8040
- account_type?: string;
8041
- /** @description Filter by parent-PR status (open|draft|merged|closed). */
8042
- status?: string[] | null;
8043
- };
8104
+ query?: never;
8044
8105
  header?: {
8045
8106
  'user-agent'?: string | null;
8046
8107
  };
8047
- path?: never;
8108
+ path: {
8109
+ automation_id: string;
8110
+ };
8048
8111
  cookie?: never;
8049
8112
  };
8050
8113
  requestBody?: never;
8051
8114
  responses: {
8052
8115
  /** @description Successful Response */
8053
- 200: {
8116
+ 204: {
8117
+ headers: {
8118
+ [name: string]: unknown;
8119
+ };
8120
+ content?: never;
8121
+ };
8122
+ /** @description The bearer token is missing, invalid, or revoked. */
8123
+ 401: {
8054
8124
  headers: {
8055
8125
  [name: string]: unknown;
8056
8126
  };
8057
8127
  content: {
8058
- 'application/json': components['schemas']['GetAnalyticsMetricsResponse'];
8128
+ 'application/json': components['schemas']['ErrorResponse'];
8059
8129
  };
8060
8130
  };
8061
- /** @description The time window is invalid: days combined with start, a non-positive days, or end not after start. */
8062
- 400: {
8131
+ /** @description The credential may not perform this action, or the account is blocked. */
8132
+ 403: {
8063
8133
  headers: {
8064
8134
  [name: string]: unknown;
8065
8135
  };
@@ -8067,8 +8137,8 @@ interface operations {
8067
8137
  'application/json': components['schemas']['ErrorResponse'];
8068
8138
  };
8069
8139
  };
8070
- /** @description The bearer token is missing, invalid, or revoked. */
8071
- 401: {
8140
+ /** @description No such automation in your account. */
8141
+ 404: {
8072
8142
  headers: {
8073
8143
  [name: string]: unknown;
8074
8144
  };
@@ -8076,8 +8146,8 @@ interface operations {
8076
8146
  'application/json': components['schemas']['ErrorResponse'];
8077
8147
  };
8078
8148
  };
8079
- /** @description The credential may not perform this action, or the account is blocked. */
8080
- 403: {
8149
+ /** @description The automation is defined by a file in a repository; delete that file instead. */
8150
+ 409: {
8081
8151
  headers: {
8082
8152
  [name: string]: unknown;
8083
8153
  };
@@ -8096,24 +8166,22 @@ interface operations {
8096
8166
  };
8097
8167
  };
8098
8168
  };
8099
- get_analytics_pull_requests: {
8169
+ link_automation: {
8100
8170
  parameters: {
8101
- query?: {
8102
- days?: number | null;
8103
- start?: string | null;
8104
- end?: string | null;
8105
- account_type?: string[] | null;
8106
- repository_id?: number[] | null;
8107
- author_id?: number[] | null;
8108
- status?: string[] | null;
8109
- };
8171
+ query?: never;
8110
8172
  header?: {
8111
8173
  'user-agent'?: string | null;
8112
8174
  };
8113
- path?: never;
8175
+ path: {
8176
+ automation_id: string;
8177
+ };
8114
8178
  cookie?: never;
8115
8179
  };
8116
- requestBody?: never;
8180
+ requestBody: {
8181
+ content: {
8182
+ 'application/json': components['schemas']['LinkAutomationRequest'];
8183
+ };
8184
+ };
8117
8185
  responses: {
8118
8186
  /** @description Successful Response */
8119
8187
  200: {
@@ -8121,10 +8189,10 @@ interface operations {
8121
8189
  [name: string]: unknown;
8122
8190
  };
8123
8191
  content: {
8124
- 'application/json': components['schemas']['GetAnalyticsPullRequestsResponse'];
8192
+ 'application/json': components['schemas']['LinkAutomationResponse'];
8125
8193
  };
8126
8194
  };
8127
- /** @description The time window is invalid: days combined with start, a non-positive days, or end not after start. */
8195
+ /** @description The path is not a synced location, or the repository has no commits. */
8128
8196
  400: {
8129
8197
  headers: {
8130
8198
  [name: string]: unknown;
@@ -8151,47 +8219,62 @@ interface operations {
8151
8219
  'application/json': components['schemas']['ErrorResponse'];
8152
8220
  };
8153
8221
  };
8154
- /** @description Validation Error */
8222
+ /** @description The automation or repository was not found in your account. */
8223
+ 404: {
8224
+ headers: {
8225
+ [name: string]: unknown;
8226
+ };
8227
+ content: {
8228
+ 'application/json': components['schemas']['ErrorResponse'];
8229
+ };
8230
+ };
8231
+ /** @description The automation is already defined by a file, a link is already open for it, a file already exists at that path, or another automation syncs from it. */
8232
+ 409: {
8233
+ headers: {
8234
+ [name: string]: unknown;
8235
+ };
8236
+ content: {
8237
+ 'application/json': components['schemas']['ErrorResponse'];
8238
+ };
8239
+ };
8240
+ /** @description GitHub rejected the pull request. */
8155
8241
  422: {
8156
8242
  headers: {
8157
8243
  [name: string]: unknown;
8158
8244
  };
8159
8245
  content: {
8160
- 'application/json': components['schemas']['HTTPValidationError'];
8246
+ 'application/json': components['schemas']['ErrorResponse'];
8161
8247
  };
8162
8248
  };
8163
8249
  };
8164
8250
  };
8165
- get_analytics_reviews: {
8251
+ start_automation_session: {
8166
8252
  parameters: {
8167
- query?: {
8168
- days?: number | null;
8169
- start?: string | null;
8170
- end?: string | null;
8171
- repo?: string[] | null;
8172
- /** @description Filter by reviewer login(s). */
8173
- author?: string[] | null;
8174
- account_type?: string;
8175
- review_state?: string[] | null;
8176
- };
8253
+ query?: never;
8177
8254
  header?: {
8178
8255
  'user-agent'?: string | null;
8179
8256
  };
8180
- path?: never;
8257
+ path: {
8258
+ automation_id: string;
8259
+ };
8181
8260
  cookie?: never;
8182
8261
  };
8183
- requestBody?: never;
8262
+ requestBody: {
8263
+ content: {
8264
+ 'application/json': components['schemas']['StartAutomationSessionRequest'];
8265
+ };
8266
+ };
8184
8267
  responses: {
8185
8268
  /** @description Successful Response */
8186
- 200: {
8269
+ 201: {
8187
8270
  headers: {
8188
8271
  [name: string]: unknown;
8189
8272
  };
8190
8273
  content: {
8191
- 'application/json': components['schemas']['GetAnalyticsReviewsResponse'];
8274
+ 'application/json': components['schemas']['SessionResponse'];
8192
8275
  };
8193
8276
  };
8194
- /** @description The time window is invalid: days combined with start, a non-positive days, or end not after start. */
8277
+ /** @description `budget` is above the automation's own session budget or the organization's ceiling, or a one-shot automation was invoked with nothing to say. */
8195
8278
  400: {
8196
8279
  headers: {
8197
8280
  [name: string]: unknown;
@@ -8218,29 +8301,38 @@ interface operations {
8218
8301
  'application/json': components['schemas']['ErrorResponse'];
8219
8302
  };
8220
8303
  };
8221
- /** @description Validation Error */
8304
+ /** @description No such automation in your account, or its environment no longer exists. */
8305
+ 404: {
8306
+ headers: {
8307
+ [name: string]: unknown;
8308
+ };
8309
+ content: {
8310
+ 'application/json': components['schemas']['ErrorResponse'];
8311
+ };
8312
+ };
8313
+ /** @description The automation requires `input` matching its input schema (missing or failed validation), declares no input schema and `input` was sent, or the body carries a key this route does not accept. */
8222
8314
  422: {
8223
8315
  headers: {
8224
8316
  [name: string]: unknown;
8225
8317
  };
8226
8318
  content: {
8227
- 'application/json': components['schemas']['HTTPValidationError'];
8319
+ 'application/json': components['schemas']['ErrorResponse'];
8228
8320
  };
8229
8321
  };
8230
8322
  };
8231
8323
  };
8232
- cli_auth_poll: {
8324
+ unlink_automation: {
8233
8325
  parameters: {
8234
8326
  query?: never;
8235
- header?: never;
8236
- path?: never;
8237
- cookie?: never;
8238
- };
8239
- requestBody: {
8240
- content: {
8241
- 'application/json': components['schemas']['CliAuthPollRequest'];
8327
+ header?: {
8328
+ 'user-agent'?: string | null;
8329
+ };
8330
+ path: {
8331
+ automation_id: string;
8242
8332
  };
8333
+ cookie?: never;
8243
8334
  };
8335
+ requestBody?: never;
8244
8336
  responses: {
8245
8337
  /** @description Successful Response */
8246
8338
  200: {
@@ -8248,7 +8340,7 @@ interface operations {
8248
8340
  [name: string]: unknown;
8249
8341
  };
8250
8342
  content: {
8251
- 'application/json': components['schemas']['PollCliAuthResponse'];
8343
+ 'application/json': components['schemas']['AutomationResponse'];
8252
8344
  };
8253
8345
  };
8254
8346
  /** @description The bearer token is missing, invalid, or revoked. */
@@ -8269,7 +8361,7 @@ interface operations {
8269
8361
  'application/json': components['schemas']['ErrorResponse'];
8270
8362
  };
8271
8363
  };
8272
- /** @description Unknown device code. */
8364
+ /** @description No such automation in your account. */
8273
8365
  404: {
8274
8366
  headers: {
8275
8367
  [name: string]: unknown;
@@ -8278,37 +8370,8 @@ interface operations {
8278
8370
  'application/json': components['schemas']['ErrorResponse'];
8279
8371
  };
8280
8372
  };
8281
- /** @description Validation Error */
8282
- 422: {
8283
- headers: {
8284
- [name: string]: unknown;
8285
- };
8286
- content: {
8287
- 'application/json': components['schemas']['HTTPValidationError'];
8288
- };
8289
- };
8290
- };
8291
- };
8292
- cli_auth_start: {
8293
- parameters: {
8294
- query?: never;
8295
- header?: never;
8296
- path?: never;
8297
- cookie?: never;
8298
- };
8299
- requestBody?: never;
8300
- responses: {
8301
- /** @description Successful Response */
8302
- 201: {
8303
- headers: {
8304
- [name: string]: unknown;
8305
- };
8306
- content: {
8307
- 'application/json': components['schemas']['StartCliAuthResponse'];
8308
- };
8309
- };
8310
- /** @description The bearer token is missing, invalid, or revoked. */
8311
- 401: {
8373
+ /** @description The automation is already managed through the API. */
8374
+ 409: {
8312
8375
  headers: {
8313
8376
  [name: string]: unknown;
8314
8377
  };
@@ -8316,8 +8379,8 @@ interface operations {
8316
8379
  'application/json': components['schemas']['ErrorResponse'];
8317
8380
  };
8318
8381
  };
8319
- /** @description The credential may not perform this action, or the account is blocked. */
8320
- 403: {
8382
+ /** @description The definition has a file reference that names no repository, so it cannot resolve without its source repository. */
8383
+ 422: {
8321
8384
  headers: {
8322
8385
  [name: string]: unknown;
8323
8386
  };
@@ -10109,8 +10172,8 @@ interface operations {
10109
10172
  list_agent_sessions: {
10110
10173
  parameters: {
10111
10174
  query?: {
10112
- /** @description A saved config id, or the agent's `ellipsis.name`. */
10113
- config_id?: string | null;
10175
+ /** @description An automation id, or its name: only sessions that automation started. */
10176
+ automation?: string | null;
10114
10177
  source?: components['schemas']['SessionSource'][] | null;
10115
10178
  days?: number | null;
10116
10179
  start?: string | null;
@@ -10194,7 +10257,7 @@ interface operations {
10194
10257
  'application/json': components['schemas']['SessionResponse'];
10195
10258
  };
10196
10259
  };
10197
- /** @description The request is incompatible with itself (a one-shot run with no prompt or input) or its config keys produce an invalid config. */
10260
+ /** @description The request is incompatible with itself (a one-shot run with no prompt, or both `claude` and `codex`), its keys produce an invalid config, or `budget` exceeds the organization's per-session ceiling. */
10198
10261
  400: {
10199
10262
  headers: {
10200
10263
  [name: string]: unknown;
@@ -10221,7 +10284,7 @@ interface operations {
10221
10284
  'application/json': components['schemas']['ErrorResponse'];
10222
10285
  };
10223
10286
  };
10224
- /** @description The named agent or environment does not exist in your account. */
10287
+ /** @description The named environment does not exist in your account. */
10225
10288
  404: {
10226
10289
  headers: {
10227
10290
  [name: string]: unknown;
@@ -10230,7 +10293,7 @@ interface operations {
10230
10293
  'application/json': components['schemas']['ErrorResponse'];
10231
10294
  };
10232
10295
  };
10233
- /** @description The agent requires 'input' matching its input schema (missing or failed validation), or declares no input schema and 'input' was sent. */
10296
+ /** @description A field is malformed, or the body carries a key this route does not accept. */
10234
10297
  422: {
10235
10298
  headers: {
10236
10299
  [name: string]: unknown;
@@ -10841,7 +10904,7 @@ interface operations {
10841
10904
  };
10842
10905
  };
10843
10906
  };
10844
- get_session_defaults: {
10907
+ get_organization_settings: {
10845
10908
  parameters: {
10846
10909
  query?: never;
10847
10910
  header?: {
@@ -10858,7 +10921,7 @@ interface operations {
10858
10921
  [name: string]: unknown;
10859
10922
  };
10860
10923
  content: {
10861
- 'application/json': components['schemas']['SessionDefaults'];
10924
+ 'application/json': components['schemas']['OrganizationSettings'];
10862
10925
  };
10863
10926
  };
10864
10927
  /** @description The bearer token is missing, invalid, or revoked. */
@@ -10890,7 +10953,7 @@ interface operations {
10890
10953
  };
10891
10954
  };
10892
10955
  };
10893
- put_session_defaults: {
10956
+ put_organization_settings: {
10894
10957
  parameters: {
10895
10958
  query?: never;
10896
10959
  header?: {
@@ -10901,7 +10964,7 @@ interface operations {
10901
10964
  };
10902
10965
  requestBody: {
10903
10966
  content: {
10904
- 'application/json': components['schemas']['SessionDefaults'];
10967
+ 'application/json': components['schemas']['OrganizationSettings'];
10905
10968
  };
10906
10969
  };
10907
10970
  responses: {
@@ -10911,10 +10974,10 @@ interface operations {
10911
10974
  [name: string]: unknown;
10912
10975
  };
10913
10976
  content: {
10914
- 'application/json': components['schemas']['SessionDefaults'];
10977
+ 'application/json': components['schemas']['OrganizationSettings'];
10915
10978
  };
10916
10979
  };
10917
- /** @description The model id is unknown, internal-only, or not runnable on the Claude Code harness. */
10980
+ /** @description The model id is unknown, internal-only, or not runnable on the Claude Code harness; or the budget ceiling is not positive or exceeds the platform's. */
10918
10981
  400: {
10919
10982
  headers: {
10920
10983
  [name: string]: unknown;
@@ -10941,6 +11004,124 @@ interface operations {
10941
11004
  'application/json': components['schemas']['ErrorResponse'];
10942
11005
  };
10943
11006
  };
11007
+ /** @description The default environment does not exist in your account. */
11008
+ 404: {
11009
+ headers: {
11010
+ [name: string]: unknown;
11011
+ };
11012
+ content: {
11013
+ 'application/json': components['schemas']['ErrorResponse'];
11014
+ };
11015
+ };
11016
+ /** @description Validation Error */
11017
+ 422: {
11018
+ headers: {
11019
+ [name: string]: unknown;
11020
+ };
11021
+ content: {
11022
+ 'application/json': components['schemas']['HTTPValidationError'];
11023
+ };
11024
+ };
11025
+ };
11026
+ };
11027
+ list_agent_templates: {
11028
+ parameters: {
11029
+ query?: never;
11030
+ header?: {
11031
+ 'user-agent'?: string | null;
11032
+ };
11033
+ path?: never;
11034
+ cookie?: never;
11035
+ };
11036
+ requestBody?: never;
11037
+ responses: {
11038
+ /** @description Successful Response */
11039
+ 200: {
11040
+ headers: {
11041
+ [name: string]: unknown;
11042
+ };
11043
+ content: {
11044
+ 'application/json': components['schemas']['AgentTemplatesListResponse'];
11045
+ };
11046
+ };
11047
+ /** @description The bearer token is missing, invalid, or revoked. */
11048
+ 401: {
11049
+ headers: {
11050
+ [name: string]: unknown;
11051
+ };
11052
+ content: {
11053
+ 'application/json': components['schemas']['ErrorResponse'];
11054
+ };
11055
+ };
11056
+ /** @description The credential may not perform this action, or the account is blocked. */
11057
+ 403: {
11058
+ headers: {
11059
+ [name: string]: unknown;
11060
+ };
11061
+ content: {
11062
+ 'application/json': components['schemas']['ErrorResponse'];
11063
+ };
11064
+ };
11065
+ /** @description Validation Error */
11066
+ 422: {
11067
+ headers: {
11068
+ [name: string]: unknown;
11069
+ };
11070
+ content: {
11071
+ 'application/json': components['schemas']['HTTPValidationError'];
11072
+ };
11073
+ };
11074
+ };
11075
+ };
11076
+ get_agent_template: {
11077
+ parameters: {
11078
+ query?: never;
11079
+ header?: {
11080
+ 'user-agent'?: string | null;
11081
+ };
11082
+ path: {
11083
+ template_id: string;
11084
+ };
11085
+ cookie?: never;
11086
+ };
11087
+ requestBody?: never;
11088
+ responses: {
11089
+ /** @description Successful Response */
11090
+ 200: {
11091
+ headers: {
11092
+ [name: string]: unknown;
11093
+ };
11094
+ content: {
11095
+ 'application/json': components['schemas']['AgentTemplate'];
11096
+ };
11097
+ };
11098
+ /** @description The bearer token is missing, invalid, or revoked. */
11099
+ 401: {
11100
+ headers: {
11101
+ [name: string]: unknown;
11102
+ };
11103
+ content: {
11104
+ 'application/json': components['schemas']['ErrorResponse'];
11105
+ };
11106
+ };
11107
+ /** @description The credential may not perform this action, or the account is blocked. */
11108
+ 403: {
11109
+ headers: {
11110
+ [name: string]: unknown;
11111
+ };
11112
+ content: {
11113
+ 'application/json': components['schemas']['ErrorResponse'];
11114
+ };
11115
+ };
11116
+ /** @description No such template. */
11117
+ 404: {
11118
+ headers: {
11119
+ [name: string]: unknown;
11120
+ };
11121
+ content: {
11122
+ 'application/json': components['schemas']['ErrorResponse'];
11123
+ };
11124
+ };
10944
11125
  /** @description Validation Error */
10945
11126
  422: {
10946
11127
  headers: {
@@ -11256,11 +11437,11 @@ interface Session {
11256
11437
  * The agent that ran: the config the session executed, where that config came from, and any override merged into it.
11257
11438
  */
11258
11439
  interface SessionAgent {
11259
- config: AgentConfig;
11260
11440
  /**
11261
- * Identifier of the saved config this session's snapshot was taken from. Null for inline, platform-default, and built-in configs. Points at the config as it exists now, which may have changed since.
11441
+ * Identifier of the automation this session's snapshot was taken from. Null for raw sessions (nothing saved behind them), templates, and built-in agents. Points at the automation as it exists now, which may have changed since.
11262
11442
  */
11263
- config_id: string | null;
11443
+ automation_id: string | null;
11444
+ config: AgentConfig;
11264
11445
  /**
11265
11446
  * The partial-config override merged into `config` for this session, or null when the config ran unmodified. `config` is the merged result; this is the diff.
11266
11447
  */
@@ -11270,7 +11451,7 @@ interface SessionAgent {
11270
11451
  source: AgentConfigSource;
11271
11452
  }
11272
11453
  /**
11273
- * The agent config the session actually ran, frozen when the session was created.
11454
+ * The agent definition the session actually ran, frozen when the session was created.
11274
11455
  */
11275
11456
  interface AgentConfig {
11276
11457
  budget: AgentConfigBudget;
@@ -11783,6 +11964,8 @@ interface SessionGit {
11783
11964
  * it, split by whether it survived the sandbox.
11784
11965
  */
11785
11966
  interface SessionGitRepo {
11967
+ commits: SessionGitCommit[];
11968
+ commits_total: number;
11786
11969
  full_name: string;
11787
11970
  local_commit: string | null;
11788
11971
  local_uncommitted_files: SessionGitFile[];
@@ -11790,6 +11973,18 @@ interface SessionGitRepo {
11790
11973
  remote_branch: string | null;
11791
11974
  remote_commit: string | null;
11792
11975
  }
11976
+ /**
11977
+ * One commit the session created in this repo (everything past the
11978
+ * provisioning checkout's sha), captured from the sandbox rather than the
11979
+ * transcript so it stays correct through amends, rebases, and commits made by
11980
+ * scripts. The repo is the parent object, so it is not repeated here.
11981
+ */
11982
+ interface SessionGitCommit {
11983
+ committed_at: string;
11984
+ pushed: boolean;
11985
+ sha: string;
11986
+ subject: string;
11987
+ }
11793
11988
  /**
11794
11989
  * One file's uncommitted change, as `git diff HEAD --numstat` reports it
11795
11990
  * (with intent-to-add, so a brand-new file still counts).
@@ -11801,10 +11996,11 @@ interface SessionGitFile {
11801
11996
  status: string;
11802
11997
  }
11803
11998
  /**
11804
- * A pull request the session opened in this repo, denormalized at capture
11805
- * time so a surface renders a labeled link without joining gh_prs. Live PR
11806
- * state (open/merged/closed) is not stored — read gh_prs where a view needs
11807
- * it. The repo is the parent object, so it is not repeated here.
11999
+ * A pull request the session opened in this repo, written the moment the
12000
+ * creating tool call's result lands (see extract_session_prs.PrCreateWatcher).
12001
+ * Live PR state (open/merged/closed) is not stored — it lives on gh_prs,
12002
+ * joined via `gh_pr_id` (GET /frontend/agents/sessions/{id}/git). The repo is
12003
+ * the parent object, so it is not repeated here.
11808
12004
  */
11809
12005
  interface SessionGitPr {
11810
12006
  gh_pr_id: number | null;