@roarkanalytics/sdk 3.21.0 → 4.0.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.
Files changed (50) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/client.d.mts +3 -3
  3. package/client.d.ts +3 -3
  4. package/client.js +3 -3
  5. package/client.mjs +3 -3
  6. package/package.json +1 -1
  7. package/resources/{autoimprove-fix.d.mts → autoimprove-job.d.mts} +105 -105
  8. package/resources/{autoimprove-fix.d.mts.map → autoimprove-job.d.mts.map} +1 -1
  9. package/resources/{autoimprove-fix.d.ts → autoimprove-job.d.ts} +105 -105
  10. package/resources/{autoimprove-fix.d.ts.map → autoimprove-job.d.ts.map} +1 -1
  11. package/resources/{autoimprove-fix.js → autoimprove-job.js} +40 -40
  12. package/resources/{autoimprove-fix.js.map → autoimprove-job.js.map} +1 -1
  13. package/resources/{autoimprove-fix.mjs → autoimprove-job.mjs} +38 -38
  14. package/resources/{autoimprove-fix.mjs.map → autoimprove-job.mjs.map} +1 -1
  15. package/resources/config.d.mts +9 -0
  16. package/resources/config.d.mts.map +1 -1
  17. package/resources/config.d.ts +9 -0
  18. package/resources/config.d.ts.map +1 -1
  19. package/resources/customer-flow.d.mts +104 -19
  20. package/resources/customer-flow.d.mts.map +1 -1
  21. package/resources/customer-flow.d.ts +104 -19
  22. package/resources/customer-flow.d.ts.map +1 -1
  23. package/resources/index.d.mts +1 -1
  24. package/resources/index.d.ts +1 -1
  25. package/resources/index.js +3 -3
  26. package/resources/index.mjs +1 -1
  27. package/resources/simulation-job.d.mts +2 -2
  28. package/resources/simulation-job.d.mts.map +1 -1
  29. package/resources/simulation-job.d.ts +2 -2
  30. package/resources/simulation-job.d.ts.map +1 -1
  31. package/resources/simulation-run-plan-job.d.mts +1 -1
  32. package/resources/simulation-run-plan-job.d.mts.map +1 -1
  33. package/resources/simulation-run-plan-job.d.ts +1 -1
  34. package/resources/simulation-run-plan-job.d.ts.map +1 -1
  35. package/src/client.ts +27 -27
  36. package/src/resources/{autoimprove-fix.ts → autoimprove-job.ts} +127 -127
  37. package/src/resources/config.ts +13 -0
  38. package/src/resources/customer-flow.ts +135 -20
  39. package/src/resources/index.ts +13 -13
  40. package/src/resources/simulation-job.ts +2 -2
  41. package/src/resources/simulation-run-plan-job.ts +1 -1
  42. package/src/version.ts +1 -1
  43. package/version.d.mts +1 -1
  44. package/version.d.mts.map +1 -1
  45. package/version.d.ts +1 -1
  46. package/version.d.ts.map +1 -1
  47. package/version.js +1 -1
  48. package/version.js.map +1 -1
  49. package/version.mjs +1 -1
  50. package/version.mjs.map +1 -1
@@ -1,29 +1,29 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  import { APIResource } from '../core/resource';
4
- import * as AutoimproveFixAPI from './autoimprove-fix';
4
+ import * as AutoimproveJobAPI from './autoimprove-job';
5
5
  import { APIPromise } from '../core/api-promise';
6
6
  import { RequestOptions } from '../internal/request-options';
7
7
  import { path } from '../internal/utils/path';
8
8
 
9
- export class AutoimproveFix extends APIResource {
9
+ export class AutoimproveJob extends APIResource {
10
10
  /**
11
11
  * Commission Roark on an objective. It clones the agent into a staging shadow (or
12
12
  * uses your designated staging agent), authors a validation suite of simulated
13
13
  * callers, measures a baseline, changes the staging configuration, and re-tests
14
14
  * until the objective metric passes its target. Production is never touched by the
15
- * loop; a verified fix waits for promotion.
15
+ * loop; verified changes wait for promotion.
16
16
  *
17
17
  * Requires an active provider integration (Vapi or Retell) with agent config
18
- * writes enabled. One live fix per agent: starting a second returns a conflict.
18
+ * writes enabled. One live job per agent: starting a second returns a conflict.
19
19
  *
20
- * The fix runs asynchronously; poll GET /v1/autoimprove/fix/{fixId} or watch it in
20
+ * The job runs asynchronously; poll GET /v1/autoimprove/job/{jobId} or watch it in
21
21
  * the dashboard. When its status is NEEDS_INPUT, answer via the answer endpoint;
22
22
  * when AWAITING_PROMOTE, promote or dismiss.
23
23
  *
24
24
  * @example
25
25
  * ```ts
26
- * const autoimproveFix = await client.autoimproveFix.create({
26
+ * const autoimproveJob = await client.autoimproveJob.create({
27
27
  * agentId: 'b3b0c8e2-4c1d-4f6a-9e2b-1a2b3c4d5e6f',
28
28
  * objectiveLabel: 'Consent collection should pass',
29
29
  * objectiveMetricDefinitionId:
@@ -32,36 +32,36 @@ export class AutoimproveFix extends APIResource {
32
32
  * ```
33
33
  */
34
34
  create(
35
- body: AutoimproveFixCreateParams,
35
+ body: AutoimproveJobCreateParams,
36
36
  options?: RequestOptions,
37
- ): APIPromise<AutoimproveFixCreateResponse> {
38
- return this._client.post('/v1/autoimprove/fix', { body, ...options });
37
+ ): APIPromise<AutoimproveJobCreateResponse> {
38
+ return this._client.post('/v1/autoimprove/job', { body, ...options });
39
39
  }
40
40
 
41
41
  /**
42
- * List the Autoimprove fixes in this project, most recent first, capped at 100.
42
+ * List the Autoimprove jobs in this project, most recent first, capped at 100.
43
43
  *
44
- * A fix is one autonomous engagement: Roark improving one agent toward one
44
+ * A job is one autonomous engagement: Roark improving one agent toward one
45
45
  * objective metric on a staging copy, with a human-gated promote to production at
46
46
  * the end.
47
47
  *
48
48
  * @example
49
49
  * ```ts
50
- * const autoimproveFixes = await client.autoimproveFix.list();
50
+ * const autoimproveJobs = await client.autoimproveJob.list();
51
51
  * ```
52
52
  */
53
- list(options?: RequestOptions): APIPromise<AutoimproveFixListResponse> {
54
- return this._client.get('/v1/autoimprove/fix', options);
53
+ list(options?: RequestOptions): APIPromise<AutoimproveJobListResponse> {
54
+ return this._client.get('/v1/autoimprove/job', options);
55
55
  }
56
56
 
57
57
  /**
58
- * Answer the question a fix is blocked on. Only meaningful while the fix status is
58
+ * Answer the question a job is blocked on. Only meaningful while the job status is
59
59
  * NEEDS_INPUT (the open QUESTION entry carries the offered options; free text is
60
60
  * also accepted). Otherwise returns a conflict.
61
61
  *
62
62
  * @example
63
63
  * ```ts
64
- * const response = await client.autoimproveFix.answerQuestion(
64
+ * const response = await client.autoimproveJob.answerQuestion(
65
65
  * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
66
66
  * {
67
67
  * text: 'Keep the current voice; focus on the closing confirmation.',
@@ -70,63 +70,63 @@ export class AutoimproveFix extends APIResource {
70
70
  * ```
71
71
  */
72
72
  answerQuestion(
73
- fixID: string,
74
- body: AutoimproveFixAnswerQuestionParams,
73
+ jobID: string,
74
+ body: AutoimproveJobAnswerQuestionParams,
75
75
  options?: RequestOptions,
76
- ): APIPromise<AutoimproveFixAnswerQuestionResponse> {
77
- return this._client.post(path`/v1/autoimprove/fix/${fixID}/answer`, { body, ...options });
76
+ ): APIPromise<AutoimproveJobAnswerQuestionResponse> {
77
+ return this._client.post(path`/v1/autoimprove/job/${jobID}/answer`, { body, ...options });
78
78
  }
79
79
 
80
80
  /**
81
- * Stop a live fix. Production is never changed by a cancel; everything the fix set
81
+ * Stop a live job. Production is never changed by a cancel; everything the job set
82
82
  * up (the shadow agent, its phone number, authored test flows and run plan) is
83
83
  * cleaned up automatically.
84
84
  *
85
85
  * @example
86
86
  * ```ts
87
- * const response = await client.autoimproveFix.cancel(
87
+ * const response = await client.autoimproveJob.cancel(
88
88
  * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
89
89
  * );
90
90
  * ```
91
91
  */
92
- cancel(fixID: string, options?: RequestOptions): APIPromise<AutoimproveFixCancelResponse> {
93
- return this._client.post(path`/v1/autoimprove/fix/${fixID}/cancel`, options);
92
+ cancel(jobID: string, options?: RequestOptions): APIPromise<AutoimproveJobCancelResponse> {
93
+ return this._client.post(path`/v1/autoimprove/job/${jobID}/cancel`, options);
94
94
  }
95
95
 
96
96
  /**
97
- * Discard a verified fix without promoting: production stays untouched and the
98
- * staging resources are cleaned up. Only a fix in AWAITING_PROMOTE can be
97
+ * Discard a verified job without promoting: production stays untouched and the
98
+ * staging resources are cleaned up. Only a job in AWAITING_PROMOTE can be
99
99
  * dismissed.
100
100
  *
101
101
  * @example
102
102
  * ```ts
103
- * const response = await client.autoimproveFix.dismiss(
103
+ * const response = await client.autoimproveJob.dismiss(
104
104
  * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
105
105
  * );
106
106
  * ```
107
107
  */
108
- dismiss(fixID: string, options?: RequestOptions): APIPromise<AutoimproveFixDismissResponse> {
109
- return this._client.post(path`/v1/autoimprove/fix/${fixID}/dismiss`, options);
108
+ dismiss(jobID: string, options?: RequestOptions): APIPromise<AutoimproveJobDismissResponse> {
109
+ return this._client.post(path`/v1/autoimprove/job/${jobID}/dismiss`, options);
110
110
  }
111
111
 
112
112
  /**
113
- * Fetch one fix with its full worklog: every step Roark took, the validation
113
+ * Fetch one job with its full worklog: every step Roark took, the validation
114
114
  * batches with their pass-rate movement, any question it is waiting on, and its
115
115
  * final report once concluded.
116
116
  *
117
117
  * @example
118
118
  * ```ts
119
- * const response = await client.autoimproveFix.getByID(
119
+ * const response = await client.autoimproveJob.getByID(
120
120
  * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
121
121
  * );
122
122
  * ```
123
123
  */
124
- getByID(fixID: string, options?: RequestOptions): APIPromise<AutoimproveFixGetByIDResponse> {
125
- return this._client.get(path`/v1/autoimprove/fix/${fixID}`, options);
124
+ getByID(jobID: string, options?: RequestOptions): APIPromise<AutoimproveJobGetByIDResponse> {
125
+ return this._client.get(path`/v1/autoimprove/job/${jobID}`, options);
126
126
  }
127
127
 
128
128
  /**
129
- * Apply the verified staging changes to the PRODUCTION agent. Only a fix in
129
+ * Apply the verified staging changes to the PRODUCTION agent. Only a job in
130
130
  * AWAITING_PROMOTE can be promoted.
131
131
  *
132
132
  * A snapshot of the production configuration is taken immediately before the
@@ -135,23 +135,23 @@ export class AutoimproveFix extends APIResource {
135
135
  *
136
136
  * @example
137
137
  * ```ts
138
- * const response = await client.autoimproveFix.promote(
138
+ * const response = await client.autoimproveJob.promote(
139
139
  * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
140
140
  * );
141
141
  * ```
142
142
  */
143
- promote(fixID: string, options?: RequestOptions): APIPromise<AutoimproveFixPromoteResponse> {
144
- return this._client.post(path`/v1/autoimprove/fix/${fixID}/promote`, options);
143
+ promote(jobID: string, options?: RequestOptions): APIPromise<AutoimproveJobPromoteResponse> {
144
+ return this._client.post(path`/v1/autoimprove/job/${jobID}/promote`, options);
145
145
  }
146
146
 
147
147
  /**
148
- * Steer Roark mid-fix. The message is folded into its next decision and is
149
- * binding. Accepted while the fix is live (RUNNING, NEEDS_INPUT, or PAUSED); a
150
- * concluded fix returns a conflict.
148
+ * Steer Roark mid-job. The message is folded into its next decision and is
149
+ * binding. Accepted while the job is live (RUNNING, NEEDS_INPUT, or PAUSED); a
150
+ * concluded job returns a conflict.
151
151
  *
152
152
  * @example
153
153
  * ```ts
154
- * const response = await client.autoimproveFix.sendGuidance(
154
+ * const response = await client.autoimproveJob.sendGuidance(
155
155
  * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
156
156
  * {
157
157
  * text: 'Keep the current voice; focus on the closing confirmation.',
@@ -160,16 +160,16 @@ export class AutoimproveFix extends APIResource {
160
160
  * ```
161
161
  */
162
162
  sendGuidance(
163
- fixID: string,
164
- body: AutoimproveFixSendGuidanceParams,
163
+ jobID: string,
164
+ body: AutoimproveJobSendGuidanceParams,
165
165
  options?: RequestOptions,
166
- ): APIPromise<AutoimproveFixSendGuidanceResponse> {
167
- return this._client.post(path`/v1/autoimprove/fix/${fixID}/guidance`, { body, ...options });
166
+ ): APIPromise<AutoimproveJobSendGuidanceResponse> {
167
+ return this._client.post(path`/v1/autoimprove/job/${jobID}/guidance`, { body, ...options });
168
168
  }
169
169
  }
170
170
 
171
171
  /**
172
- * One entry in the fix's worklog: what Roark did or observed at that step.
172
+ * One entry in the job's worklog: what Roark did or observed at that step.
173
173
  * VALIDATION entries carry the batch's trial count and pass-rate movement;
174
174
  * QUESTION entries carry the quick-reply options Roark is waiting on.
175
175
  */
@@ -211,20 +211,20 @@ export interface AutoimproveLogEntry {
211
211
  trialCount: number | null;
212
212
  }
213
213
 
214
- export interface AutoimproveFixCreateResponse {
214
+ export interface AutoimproveJobCreateResponse {
215
215
  /**
216
- * One Autoimprove engagement: Roark autonomously improving one agent toward one
217
- * objective metric. Roark only ever changes the staging agent (a shadow clone by
218
- * default); production changes exactly once, when a verified fix is promoted.
216
+ * One Autoimprove job: Roark autonomously improving one agent toward one objective
217
+ * metric. Roark only ever changes the staging agent (a shadow clone by default);
218
+ * production changes exactly once, when verified changes are promoted.
219
219
  */
220
- data: AutoimproveFixCreateResponse.Data;
220
+ data: AutoimproveJobCreateResponse.Data;
221
221
  }
222
222
 
223
- export namespace AutoimproveFixCreateResponse {
223
+ export namespace AutoimproveJobCreateResponse {
224
224
  /**
225
- * One Autoimprove engagement: Roark autonomously improving one agent toward one
226
- * objective metric. Roark only ever changes the staging agent (a shadow clone by
227
- * default); production changes exactly once, when a verified fix is promoted.
225
+ * One Autoimprove job: Roark autonomously improving one agent toward one objective
226
+ * metric. Roark only ever changes the staging agent (a shadow clone by default);
227
+ * production changes exactly once, when verified changes are promoted.
228
228
  */
229
229
  export interface Data {
230
230
  id: string;
@@ -234,12 +234,12 @@ export namespace AutoimproveFixCreateResponse {
234
234
  baselineValue: number | null;
235
235
 
236
236
  /**
237
- * When the fix reached a terminal status (ISO 8601).
237
+ * When the job reached a terminal status (ISO 8601).
238
238
  */
239
239
  concludedAt: string | null;
240
240
 
241
241
  /**
242
- * When the fix was created (ISO 8601).
242
+ * When the job was created (ISO 8601).
243
243
  */
244
244
  createdAt: string;
245
245
 
@@ -290,7 +290,7 @@ export namespace AutoimproveFixCreateResponse {
290
290
  trigger: 'ISSUE' | 'RUN_THRESHOLD_FAILED' | 'USER' | 'DEGRADATION';
291
291
 
292
292
  /**
293
- * When the fix last changed (ISO 8601).
293
+ * When the job last changed (ISO 8601).
294
294
  */
295
295
  updatedAt: string;
296
296
 
@@ -300,15 +300,15 @@ export namespace AutoimproveFixCreateResponse {
300
300
  }
301
301
  }
302
302
 
303
- export interface AutoimproveFixListResponse {
304
- data: Array<AutoimproveFixListResponse.Data>;
303
+ export interface AutoimproveJobListResponse {
304
+ data: Array<AutoimproveJobListResponse.Data>;
305
305
  }
306
306
 
307
- export namespace AutoimproveFixListResponse {
307
+ export namespace AutoimproveJobListResponse {
308
308
  /**
309
- * One Autoimprove engagement: Roark autonomously improving one agent toward one
310
- * objective metric. Roark only ever changes the staging agent (a shadow clone by
311
- * default); production changes exactly once, when a verified fix is promoted.
309
+ * One Autoimprove job: Roark autonomously improving one agent toward one objective
310
+ * metric. Roark only ever changes the staging agent (a shadow clone by default);
311
+ * production changes exactly once, when verified changes are promoted.
312
312
  */
313
313
  export interface Data {
314
314
  id: string;
@@ -318,12 +318,12 @@ export namespace AutoimproveFixListResponse {
318
318
  baselineValue: number | null;
319
319
 
320
320
  /**
321
- * When the fix reached a terminal status (ISO 8601).
321
+ * When the job reached a terminal status (ISO 8601).
322
322
  */
323
323
  concludedAt: string | null;
324
324
 
325
325
  /**
326
- * When the fix was created (ISO 8601).
326
+ * When the job was created (ISO 8601).
327
327
  */
328
328
  createdAt: string;
329
329
 
@@ -374,7 +374,7 @@ export namespace AutoimproveFixListResponse {
374
374
  trigger: 'ISSUE' | 'RUN_THRESHOLD_FAILED' | 'USER' | 'DEGRADATION';
375
375
 
376
376
  /**
377
- * When the fix last changed (ISO 8601).
377
+ * When the job last changed (ISO 8601).
378
378
  */
379
379
  updatedAt: string;
380
380
 
@@ -384,40 +384,40 @@ export namespace AutoimproveFixListResponse {
384
384
  }
385
385
  }
386
386
 
387
- export interface AutoimproveFixAnswerQuestionResponse {
388
- data: AutoimproveFixAnswerQuestionResponse.Data;
387
+ export interface AutoimproveJobAnswerQuestionResponse {
388
+ data: AutoimproveJobAnswerQuestionResponse.Data;
389
389
  }
390
390
 
391
- export namespace AutoimproveFixAnswerQuestionResponse {
391
+ export namespace AutoimproveJobAnswerQuestionResponse {
392
392
  export interface Data {
393
393
  accepted: true;
394
394
  }
395
395
  }
396
396
 
397
- export interface AutoimproveFixCancelResponse {
398
- data: AutoimproveFixCancelResponse.Data;
397
+ export interface AutoimproveJobCancelResponse {
398
+ data: AutoimproveJobCancelResponse.Data;
399
399
  }
400
400
 
401
- export namespace AutoimproveFixCancelResponse {
401
+ export namespace AutoimproveJobCancelResponse {
402
402
  export interface Data {
403
403
  accepted: true;
404
404
  }
405
405
  }
406
406
 
407
- export interface AutoimproveFixDismissResponse {
407
+ export interface AutoimproveJobDismissResponse {
408
408
  /**
409
- * One Autoimprove engagement: Roark autonomously improving one agent toward one
410
- * objective metric. Roark only ever changes the staging agent (a shadow clone by
411
- * default); production changes exactly once, when a verified fix is promoted.
409
+ * One Autoimprove job: Roark autonomously improving one agent toward one objective
410
+ * metric. Roark only ever changes the staging agent (a shadow clone by default);
411
+ * production changes exactly once, when verified changes are promoted.
412
412
  */
413
- data: AutoimproveFixDismissResponse.Data;
413
+ data: AutoimproveJobDismissResponse.Data;
414
414
  }
415
415
 
416
- export namespace AutoimproveFixDismissResponse {
416
+ export namespace AutoimproveJobDismissResponse {
417
417
  /**
418
- * One Autoimprove engagement: Roark autonomously improving one agent toward one
419
- * objective metric. Roark only ever changes the staging agent (a shadow clone by
420
- * default); production changes exactly once, when a verified fix is promoted.
418
+ * One Autoimprove job: Roark autonomously improving one agent toward one objective
419
+ * metric. Roark only ever changes the staging agent (a shadow clone by default);
420
+ * production changes exactly once, when verified changes are promoted.
421
421
  */
422
422
  export interface Data {
423
423
  id: string;
@@ -427,12 +427,12 @@ export namespace AutoimproveFixDismissResponse {
427
427
  baselineValue: number | null;
428
428
 
429
429
  /**
430
- * When the fix reached a terminal status (ISO 8601).
430
+ * When the job reached a terminal status (ISO 8601).
431
431
  */
432
432
  concludedAt: string | null;
433
433
 
434
434
  /**
435
- * When the fix was created (ISO 8601).
435
+ * When the job was created (ISO 8601).
436
436
  */
437
437
  createdAt: string;
438
438
 
@@ -483,7 +483,7 @@ export namespace AutoimproveFixDismissResponse {
483
483
  trigger: 'ISSUE' | 'RUN_THRESHOLD_FAILED' | 'USER' | 'DEGRADATION';
484
484
 
485
485
  /**
486
- * When the fix last changed (ISO 8601).
486
+ * When the job last changed (ISO 8601).
487
487
  */
488
488
  updatedAt: string;
489
489
 
@@ -493,15 +493,15 @@ export namespace AutoimproveFixDismissResponse {
493
493
  }
494
494
  }
495
495
 
496
- export interface AutoimproveFixGetByIDResponse {
497
- data: AutoimproveFixGetByIDResponse.Data;
496
+ export interface AutoimproveJobGetByIDResponse {
497
+ data: AutoimproveJobGetByIDResponse.Data;
498
498
  }
499
499
 
500
- export namespace AutoimproveFixGetByIDResponse {
500
+ export namespace AutoimproveJobGetByIDResponse {
501
501
  /**
502
- * One Autoimprove engagement: Roark autonomously improving one agent toward one
503
- * objective metric. Roark only ever changes the staging agent (a shadow clone by
504
- * default); production changes exactly once, when a verified fix is promoted.
502
+ * One Autoimprove job: Roark autonomously improving one agent toward one objective
503
+ * metric. Roark only ever changes the staging agent (a shadow clone by default);
504
+ * production changes exactly once, when verified changes are promoted.
505
505
  */
506
506
  export interface Data {
507
507
  id: string;
@@ -511,12 +511,12 @@ export namespace AutoimproveFixGetByIDResponse {
511
511
  baselineValue: number | null;
512
512
 
513
513
  /**
514
- * When the fix reached a terminal status (ISO 8601).
514
+ * When the job reached a terminal status (ISO 8601).
515
515
  */
516
516
  concludedAt: string | null;
517
517
 
518
518
  /**
519
- * When the fix was created (ISO 8601).
519
+ * When the job was created (ISO 8601).
520
520
  */
521
521
  createdAt: string;
522
522
 
@@ -535,7 +535,7 @@ export namespace AutoimproveFixGetByIDResponse {
535
535
  /**
536
536
  * The full worklog, oldest first.
537
537
  */
538
- logEntries: Array<AutoimproveFixAPI.AutoimproveLogEntry>;
538
+ logEntries: Array<AutoimproveJobAPI.AutoimproveLogEntry>;
539
539
 
540
540
  maxIterations: number;
541
541
 
@@ -572,7 +572,7 @@ export namespace AutoimproveFixGetByIDResponse {
572
572
  trigger: 'ISSUE' | 'RUN_THRESHOLD_FAILED' | 'USER' | 'DEGRADATION';
573
573
 
574
574
  /**
575
- * When the fix last changed (ISO 8601).
575
+ * When the job last changed (ISO 8601).
576
576
  */
577
577
  updatedAt: string;
578
578
 
@@ -582,20 +582,20 @@ export namespace AutoimproveFixGetByIDResponse {
582
582
  }
583
583
  }
584
584
 
585
- export interface AutoimproveFixPromoteResponse {
585
+ export interface AutoimproveJobPromoteResponse {
586
586
  /**
587
- * One Autoimprove engagement: Roark autonomously improving one agent toward one
588
- * objective metric. Roark only ever changes the staging agent (a shadow clone by
589
- * default); production changes exactly once, when a verified fix is promoted.
587
+ * One Autoimprove job: Roark autonomously improving one agent toward one objective
588
+ * metric. Roark only ever changes the staging agent (a shadow clone by default);
589
+ * production changes exactly once, when verified changes are promoted.
590
590
  */
591
- data: AutoimproveFixPromoteResponse.Data;
591
+ data: AutoimproveJobPromoteResponse.Data;
592
592
  }
593
593
 
594
- export namespace AutoimproveFixPromoteResponse {
594
+ export namespace AutoimproveJobPromoteResponse {
595
595
  /**
596
- * One Autoimprove engagement: Roark autonomously improving one agent toward one
597
- * objective metric. Roark only ever changes the staging agent (a shadow clone by
598
- * default); production changes exactly once, when a verified fix is promoted.
596
+ * One Autoimprove job: Roark autonomously improving one agent toward one objective
597
+ * metric. Roark only ever changes the staging agent (a shadow clone by default);
598
+ * production changes exactly once, when verified changes are promoted.
599
599
  */
600
600
  export interface Data {
601
601
  id: string;
@@ -605,12 +605,12 @@ export namespace AutoimproveFixPromoteResponse {
605
605
  baselineValue: number | null;
606
606
 
607
607
  /**
608
- * When the fix reached a terminal status (ISO 8601).
608
+ * When the job reached a terminal status (ISO 8601).
609
609
  */
610
610
  concludedAt: string | null;
611
611
 
612
612
  /**
613
- * When the fix was created (ISO 8601).
613
+ * When the job was created (ISO 8601).
614
614
  */
615
615
  createdAt: string;
616
616
 
@@ -661,7 +661,7 @@ export namespace AutoimproveFixPromoteResponse {
661
661
  trigger: 'ISSUE' | 'RUN_THRESHOLD_FAILED' | 'USER' | 'DEGRADATION';
662
662
 
663
663
  /**
664
- * When the fix last changed (ISO 8601).
664
+ * When the job last changed (ISO 8601).
665
665
  */
666
666
  updatedAt: string;
667
667
 
@@ -671,24 +671,24 @@ export namespace AutoimproveFixPromoteResponse {
671
671
  }
672
672
  }
673
673
 
674
- export interface AutoimproveFixSendGuidanceResponse {
675
- data: AutoimproveFixSendGuidanceResponse.Data;
674
+ export interface AutoimproveJobSendGuidanceResponse {
675
+ data: AutoimproveJobSendGuidanceResponse.Data;
676
676
  }
677
677
 
678
- export namespace AutoimproveFixSendGuidanceResponse {
678
+ export namespace AutoimproveJobSendGuidanceResponse {
679
679
  export interface Data {
680
680
  accepted: true;
681
681
  }
682
682
  }
683
683
 
684
- export interface AutoimproveFixCreateParams {
684
+ export interface AutoimproveJobCreateParams {
685
685
  /**
686
686
  * The production agent to improve. It is never modified until you promote.
687
687
  */
688
688
  agentId: string;
689
689
 
690
690
  /**
691
- * Human-readable label for the objective, shown everywhere the fix appears.
691
+ * Human-readable label for the objective, shown everywhere the job appears.
692
692
  */
693
693
  objectiveLabel: string;
694
694
 
@@ -707,7 +707,7 @@ export interface AutoimproveFixCreateParams {
707
707
  customerIntegrationId?: string;
708
708
 
709
709
  /**
710
- * Cap on decision turns. Defaults to 10.
710
+ * Cap on decision turns. Defaults to 50.
711
711
  */
712
712
  maxIterations?: number;
713
713
 
@@ -734,33 +734,33 @@ export interface AutoimproveFixCreateParams {
734
734
  validationRunPlanId?: string;
735
735
  }
736
736
 
737
- export interface AutoimproveFixAnswerQuestionParams {
737
+ export interface AutoimproveJobAnswerQuestionParams {
738
738
  /**
739
739
  * The message for Roark.
740
740
  */
741
741
  text: string;
742
742
  }
743
743
 
744
- export interface AutoimproveFixSendGuidanceParams {
744
+ export interface AutoimproveJobSendGuidanceParams {
745
745
  /**
746
746
  * The message for Roark.
747
747
  */
748
748
  text: string;
749
749
  }
750
750
 
751
- export declare namespace AutoimproveFix {
751
+ export declare namespace AutoimproveJob {
752
752
  export {
753
753
  type AutoimproveLogEntry as AutoimproveLogEntry,
754
- type AutoimproveFixCreateResponse as AutoimproveFixCreateResponse,
755
- type AutoimproveFixListResponse as AutoimproveFixListResponse,
756
- type AutoimproveFixAnswerQuestionResponse as AutoimproveFixAnswerQuestionResponse,
757
- type AutoimproveFixCancelResponse as AutoimproveFixCancelResponse,
758
- type AutoimproveFixDismissResponse as AutoimproveFixDismissResponse,
759
- type AutoimproveFixGetByIDResponse as AutoimproveFixGetByIDResponse,
760
- type AutoimproveFixPromoteResponse as AutoimproveFixPromoteResponse,
761
- type AutoimproveFixSendGuidanceResponse as AutoimproveFixSendGuidanceResponse,
762
- type AutoimproveFixCreateParams as AutoimproveFixCreateParams,
763
- type AutoimproveFixAnswerQuestionParams as AutoimproveFixAnswerQuestionParams,
764
- type AutoimproveFixSendGuidanceParams as AutoimproveFixSendGuidanceParams,
754
+ type AutoimproveJobCreateResponse as AutoimproveJobCreateResponse,
755
+ type AutoimproveJobListResponse as AutoimproveJobListResponse,
756
+ type AutoimproveJobAnswerQuestionResponse as AutoimproveJobAnswerQuestionResponse,
757
+ type AutoimproveJobCancelResponse as AutoimproveJobCancelResponse,
758
+ type AutoimproveJobDismissResponse as AutoimproveJobDismissResponse,
759
+ type AutoimproveJobGetByIDResponse as AutoimproveJobGetByIDResponse,
760
+ type AutoimproveJobPromoteResponse as AutoimproveJobPromoteResponse,
761
+ type AutoimproveJobSendGuidanceResponse as AutoimproveJobSendGuidanceResponse,
762
+ type AutoimproveJobCreateParams as AutoimproveJobCreateParams,
763
+ type AutoimproveJobAnswerQuestionParams as AutoimproveJobAnswerQuestionParams,
764
+ type AutoimproveJobSendGuidanceParams as AutoimproveJobSendGuidanceParams,
765
765
  };
766
766
  }
@@ -603,10 +603,15 @@ export interface ConfigFlowStep {
603
603
 
604
604
  ref?: string;
605
605
 
606
+ /**
607
+ * Removed. Use `stage` with `required: true`.
608
+ */
606
609
  requiredForValidRun?: boolean;
607
610
 
608
611
  silenceDurationSeconds?: number;
609
612
 
613
+ stage?: string | ConfigFlowStep.UnionMember1;
614
+
610
615
  steps?: Array<ConfigAPI.ConfigFlowStep>;
611
616
  }
612
617
 
@@ -622,6 +627,14 @@ export namespace ConfigFlowStep {
622
627
 
623
628
  waitSeconds?: number;
624
629
  }
630
+
631
+ export interface UnionMember1 {
632
+ name: string;
633
+
634
+ analyze?: boolean;
635
+
636
+ required?: boolean;
637
+ }
625
638
  }
626
639
 
627
640
  export interface ConfigApplyResponse {