@roarkanalytics/sdk 8.0.1 → 9.1.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 (118) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/client.d.mts +7 -7
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +7 -7
  5. package/client.d.ts.map +1 -1
  6. package/client.js +3 -3
  7. package/client.js.map +1 -1
  8. package/client.mjs +4 -4
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/agent-connection.d.mts +0 -88
  12. package/resources/agent-connection.d.mts.map +1 -1
  13. package/resources/agent-connection.d.ts +0 -88
  14. package/resources/agent-connection.d.ts.map +1 -1
  15. package/resources/agent.d.mts +2 -200
  16. package/resources/agent.d.mts.map +1 -1
  17. package/resources/agent.d.ts +2 -200
  18. package/resources/agent.d.ts.map +1 -1
  19. package/resources/config.d.mts +6 -6
  20. package/resources/config.d.mts.map +1 -1
  21. package/resources/config.d.ts +6 -6
  22. package/resources/config.d.ts.map +1 -1
  23. package/resources/conversation.d.mts +6 -95
  24. package/resources/conversation.d.mts.map +1 -1
  25. package/resources/conversation.d.ts +6 -95
  26. package/resources/conversation.d.ts.map +1 -1
  27. package/resources/conversation.js +5 -17
  28. package/resources/conversation.js.map +1 -1
  29. package/resources/conversation.mjs +5 -17
  30. package/resources/conversation.mjs.map +1 -1
  31. package/resources/customer-flow-folder.d.mts +157 -0
  32. package/resources/customer-flow-folder.d.mts.map +1 -0
  33. package/resources/customer-flow-folder.d.ts +157 -0
  34. package/resources/customer-flow-folder.d.ts.map +1 -0
  35. package/resources/customer-flow-folder.js +54 -0
  36. package/resources/customer-flow-folder.js.map +1 -0
  37. package/resources/customer-flow-folder.mjs +50 -0
  38. package/resources/customer-flow-folder.mjs.map +1 -0
  39. package/resources/customer-flow.d.mts +558 -2
  40. package/resources/customer-flow.d.mts.map +1 -1
  41. package/resources/customer-flow.d.ts +558 -2
  42. package/resources/customer-flow.d.ts.map +1 -1
  43. package/resources/customer-flow.js +2 -2
  44. package/resources/customer-flow.mjs +2 -2
  45. package/resources/dashboard.d.mts +3 -3
  46. package/resources/dashboard.d.ts +3 -3
  47. package/resources/dashboard.js +3 -3
  48. package/resources/dashboard.mjs +3 -3
  49. package/resources/index.d.mts +3 -3
  50. package/resources/index.d.mts.map +1 -1
  51. package/resources/index.d.ts +3 -3
  52. package/resources/index.d.ts.map +1 -1
  53. package/resources/index.js +3 -3
  54. package/resources/index.js.map +1 -1
  55. package/resources/index.mjs +2 -2
  56. package/resources/index.mjs.map +1 -1
  57. package/resources/live-report.d.mts +10 -10
  58. package/resources/live-report.d.ts +10 -10
  59. package/resources/me.d.mts +20 -19
  60. package/resources/me.d.mts.map +1 -1
  61. package/resources/me.d.ts +20 -19
  62. package/resources/me.d.ts.map +1 -1
  63. package/resources/me.js +14 -13
  64. package/resources/me.js.map +1 -1
  65. package/resources/me.mjs +14 -13
  66. package/resources/me.mjs.map +1 -1
  67. package/resources/metric.d.mts +60 -60
  68. package/resources/metric.d.ts +60 -60
  69. package/resources/simulation-group.d.mts +13 -13
  70. package/resources/simulation-group.d.ts +13 -13
  71. package/resources/simulation-group.js +5 -5
  72. package/resources/simulation-group.mjs +5 -5
  73. package/resources/simulation-run-group.d.mts +2 -2
  74. package/resources/simulation-run-group.d.ts +2 -2
  75. package/resources/simulation-run-group.js +2 -2
  76. package/resources/simulation-run-group.mjs +2 -2
  77. package/resources/simulation.d.mts +1086 -4
  78. package/resources/simulation.d.mts.map +1 -1
  79. package/resources/simulation.d.ts +1086 -4
  80. package/resources/simulation.d.ts.map +1 -1
  81. package/resources/simulation.js +106 -0
  82. package/resources/simulation.js.map +1 -1
  83. package/resources/simulation.mjs +106 -0
  84. package/resources/simulation.mjs.map +1 -1
  85. package/resources/webhook.d.mts +4 -4
  86. package/resources/webhook.d.mts.map +1 -1
  87. package/resources/webhook.d.ts +4 -4
  88. package/resources/webhook.d.ts.map +1 -1
  89. package/src/client.ts +39 -43
  90. package/src/resources/agent-connection.ts +0 -103
  91. package/src/resources/agent.ts +2 -317
  92. package/src/resources/config.ts +12 -12
  93. package/src/resources/conversation.ts +6 -126
  94. package/src/resources/customer-flow-folder.ts +235 -0
  95. package/src/resources/customer-flow.ts +862 -2
  96. package/src/resources/dashboard.ts +3 -3
  97. package/src/resources/index.ts +18 -20
  98. package/src/resources/live-report.ts +10 -10
  99. package/src/resources/me.ts +20 -19
  100. package/src/resources/metric.ts +60 -60
  101. package/src/resources/simulation-group.ts +13 -13
  102. package/src/resources/simulation-run-group.ts +2 -2
  103. package/src/resources/simulation.ts +1759 -52
  104. package/src/resources/webhook.ts +8 -8
  105. package/src/version.ts +1 -1
  106. package/version.d.mts +1 -1
  107. package/version.d.ts +1 -1
  108. package/version.js +1 -1
  109. package/version.mjs +1 -1
  110. package/resources/agent-setup.d.mts +0 -1057
  111. package/resources/agent-setup.d.mts.map +0 -1
  112. package/resources/agent-setup.d.ts +0 -1057
  113. package/resources/agent-setup.d.ts.map +0 -1
  114. package/resources/agent-setup.js +0 -113
  115. package/resources/agent-setup.js.map +0 -1
  116. package/resources/agent-setup.mjs +0 -109
  117. package/resources/agent-setup.mjs.map +0 -1
  118. package/src/resources/agent-setup.ts +0 -1685
@@ -2,6 +2,93 @@ import { APIResource } from "../core/resource.mjs";
2
2
  import { APIPromise } from "../core/api-promise.mjs";
3
3
  import { RequestOptions } from "../internal/request-options.mjs";
4
4
  export declare class Simulation extends APIResource {
5
+ /**
6
+ * Answers the question a simulation resource generation is waiting on (status
7
+ * NEEDS_INPUT). If nobody answers within 15 minutes, it goes ahead with its
8
+ * default.
9
+ *
10
+ * @example
11
+ * ```ts
12
+ * const response =
13
+ * await client.simulation.answerResourceGeneration(
14
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
15
+ * { text: 'x' },
16
+ * );
17
+ * ```
18
+ */
19
+ answerResourceGeneration(generationID: string, body: SimulationAnswerResourceGenerationParams, options?: RequestOptions): APIPromise<SimulationAnswerResourceGenerationResponse>;
20
+ /**
21
+ * Stops a running simulation resource generation. Flows and metrics it already
22
+ * created are kept; no run plan is made. Refused once the generation has finished.
23
+ *
24
+ * @example
25
+ * ```ts
26
+ * const response =
27
+ * await client.simulation.cancelResourceGeneration(
28
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
29
+ * );
30
+ * ```
31
+ */
32
+ cancelResourceGeneration(generationID: string, options?: RequestOptions): APIPromise<SimulationCancelResourceGenerationResponse>;
33
+ /**
34
+ * Works out what to test for an existing agent, then creates the customer flows,
35
+ * metrics and checks to simulate it, and a run plan that runs them. It does not
36
+ * create or change the agent. Runs in the background: watch the
37
+ * `simulation.resource_generation.completed` webhook, or poll
38
+ * `GET /v1/simulation/generations/resources/{generationId}`. Takes one agent for
39
+ * now. Refused while another generation for the agent is running. Needs the
40
+ * 'simulation:create' and 'metric:create' permissions. Exploration also needs
41
+ * 'simulation:run', and is turned off for keys without it unless explore.enabled
42
+ * is set.
43
+ *
44
+ * @example
45
+ * ```ts
46
+ * const response = await client.simulation.generateResources({
47
+ * agentIds: ['182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e'],
48
+ * });
49
+ * ```
50
+ */
51
+ generateResources(body: SimulationGenerateResourcesParams, options?: RequestOptions): APIPromise<SimulationGenerateResourcesResponse>;
52
+ /**
53
+ * Returns one simulation resource generation, for example the one a webhook named.
54
+ *
55
+ * @example
56
+ * ```ts
57
+ * const response =
58
+ * await client.simulation.getResourceGeneration(
59
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
60
+ * );
61
+ * ```
62
+ */
63
+ getResourceGeneration(generationID: string, options?: RequestOptions): APIPromise<SimulationGetResourceGenerationResponse>;
64
+ /**
65
+ * Tells a running simulation resource generation what to focus on or avoid, in
66
+ * your own words. It reads it on its next turn and it outranks its own plan.
67
+ * Refused once the generation has finished.
68
+ *
69
+ * @example
70
+ * ```ts
71
+ * const response =
72
+ * await client.simulation.guideResourceGeneration(
73
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
74
+ * { text: 'x' },
75
+ * );
76
+ * ```
77
+ */
78
+ guideResourceGeneration(generationID: string, body: SimulationGuideResourceGenerationParams, options?: RequestOptions): APIPromise<SimulationGuideResourceGenerationResponse>;
79
+ /**
80
+ * Returns the project's simulation resource generations, newest first, optionally
81
+ * only for some agents: each one's progress, the run plan it created, and every
82
+ * flow, metric and check it added or left out, with the reason and the source it
83
+ * came from.
84
+ *
85
+ * @example
86
+ * ```ts
87
+ * const response =
88
+ * await client.simulation.listResourceGenerations();
89
+ * ```
90
+ */
91
+ listResourceGenerations(query?: SimulationListResourceGenerationsParams | null | undefined, options?: RequestOptions): APIPromise<SimulationListResourceGenerationsResponse>;
5
92
  /**
6
93
  * The server half of the tool guard for code-first agents. When a guarded tool
7
94
  * fires during a Roark test call, send the invocation here instead of executing
@@ -58,6 +145,926 @@ export declare class Simulation extends APIResource {
58
145
  */
59
146
  run(body: SimulationRunParams, options?: RequestOptions): APIPromise<SimulationRunResponse>;
60
147
  }
148
+ export interface SimulationAnswerResourceGenerationResponse {
149
+ /**
150
+ * The simulation resources Roark generated for agents: the flows, metrics, checks
151
+ * and run plan, and why
152
+ */
153
+ data: SimulationAnswerResourceGenerationResponse.Data;
154
+ }
155
+ export declare namespace SimulationAnswerResourceGenerationResponse {
156
+ /**
157
+ * The simulation resources Roark generated for agents: the flows, metrics, checks
158
+ * and run plan, and why
159
+ */
160
+ interface Data {
161
+ /**
162
+ * Simulation resource generation ID
163
+ */
164
+ id: string;
165
+ /**
166
+ * What the generation did and said, in order
167
+ */
168
+ activity: Array<Data.Activity>;
169
+ /**
170
+ * The agents the inputs were generated for
171
+ */
172
+ agentIds: Array<string>;
173
+ capabilities: Array<'APPOINTMENT_BOOKING' | 'FAQ' | 'IDENTITY_VERIFICATION' | 'ACCOUNT_MANAGEMENT' | 'BILLING_AND_PAYMENTS' | 'ORDER_MANAGEMENT' | 'TROUBLESHOOTING' | 'CALL_ROUTING' | 'LEAD_QUALIFICATION' | 'COLLECTIONS' | 'OUTBOUND_CALLING'>;
174
+ completedAt: string | null;
175
+ createdAt: string;
176
+ errorMessage: string | null;
177
+ explore: Data.Explore;
178
+ industry: 'HEALTHCARE' | 'FINANCIAL_SERVICES' | 'INSURANCE' | 'DEBT_COLLECTION' | 'RETAIL' | 'TRAVEL_AND_HOSPITALITY' | 'TELECOMMUNICATIONS' | 'TECHNOLOGY' | 'PUBLIC_SECTOR' | 'UTILITIES' | 'LOGISTICS' | 'AUTOMOTIVE' | 'HOME_SERVICES' | 'RESTAURANTS' | 'EDUCATION' | 'OTHER' | null;
179
+ items: Array<Data.Item>;
180
+ /**
181
+ * The checklist the generation works through
182
+ */
183
+ layers: Array<Data.Layer>;
184
+ /**
185
+ * The question the generation is waiting on, while NEEDS_INPUT
186
+ */
187
+ question: Data.Question | null;
188
+ /**
189
+ * The run plan to start once the generation completes
190
+ */
191
+ runPlanId: string | null;
192
+ /**
193
+ * PENDING, RUNNING, NEEDS_INPUT (waiting on a question; it goes ahead with the
194
+ * default if nobody answers), COMPLETED, FAILED or CANCELLED
195
+ */
196
+ status: 'PENDING' | 'RUNNING' | 'NEEDS_INPUT' | 'COMPLETED' | 'FAILED' | 'CANCELLED';
197
+ /**
198
+ * Test data the agent asked for that Roark did not have
199
+ */
200
+ testDataNeeded: Array<Data.TestDataNeeded>;
201
+ }
202
+ namespace Data {
203
+ /**
204
+ * One thing the generation did or said, in order
205
+ */
206
+ interface Activity {
207
+ createdAt: string;
208
+ /**
209
+ * STATUS, REASONING, ACTION, GUIDANCE, QUESTION, ANSWER, EXPLORATION or ERROR
210
+ */
211
+ kind: 'STATUS' | 'REASONING' | 'ACTION' | 'GUIDANCE' | 'QUESTION' | 'ANSWER' | 'EXPLORATION' | 'ERROR';
212
+ text: string;
213
+ }
214
+ interface Explore {
215
+ conversationsUsed: number;
216
+ enabled: boolean;
217
+ maxConversationMinutes: number;
218
+ maxConversations: number;
219
+ }
220
+ /**
221
+ * Something the generation created or chose to leave out, and why
222
+ */
223
+ interface Item {
224
+ id: string;
225
+ /**
226
+ * CREATED, or SKIPPED with the reason
227
+ */
228
+ action: 'CREATED' | 'SKIPPED';
229
+ capability: 'APPOINTMENT_BOOKING' | 'FAQ' | 'IDENTITY_VERIFICATION' | 'ACCOUNT_MANAGEMENT' | 'BILLING_AND_PAYMENTS' | 'ORDER_MANAGEMENT' | 'TROUBLESHOOTING' | 'CALL_ROUTING' | 'LEAD_QUALIFICATION' | 'COLLECTIONS' | 'OUTBOUND_CALLING' | null;
230
+ /**
231
+ * A flow, a metric, or a pass or fail check
232
+ */
233
+ kind: 'FLOW' | 'METRIC' | 'CHECK' | 'LAYER';
234
+ label: string;
235
+ /**
236
+ * Why it exists: CORE (every agent), INDUSTRY, CAPABILITY, AGENT_CONTEXT (your
237
+ * prompt or website), EXPLORATION or CUSTOMER_INSTRUCTIONS
238
+ */
239
+ layer: 'CORE' | 'INDUSTRY' | 'CAPABILITY' | 'AGENT_CONTEXT' | 'EXPLORATION' | 'CUSTOMER_INSTRUCTIONS';
240
+ /**
241
+ * Exploration only: DISCOVERED on a call, or INFERRED from a path the agent
242
+ * offered
243
+ */
244
+ origin: 'DISCOVERED' | 'INFERRED' | null;
245
+ reason: string;
246
+ /**
247
+ * The flow or metric it created
248
+ */
249
+ resourceId: string | null;
250
+ source: Item.Source;
251
+ }
252
+ namespace Item {
253
+ interface Source {
254
+ /**
255
+ * The exploration call it came from
256
+ */
257
+ callId: string | null;
258
+ /**
259
+ * Where in the call
260
+ */
261
+ offsetMs: number | null;
262
+ /**
263
+ * The words in the source that led to it
264
+ */
265
+ quote: string | null;
266
+ type: 'CATALOGUE' | 'PROMPT' | 'DESCRIPTION' | 'WEBSITE' | 'EXPLORATION_CALL' | 'INSTRUCTIONS';
267
+ /**
268
+ * The page it came from, for website sources
269
+ */
270
+ url: string | null;
271
+ }
272
+ }
273
+ /**
274
+ * Where one part of testing the agent stands
275
+ */
276
+ interface Layer {
277
+ layer: 'CORE' | 'INDUSTRY' | 'CAPABILITY' | 'AGENT_CONTEXT' | 'EXPLORATION' | 'CUSTOMER_INSTRUCTIONS';
278
+ /**
279
+ * COVERED: tests exist for it, or are added when the generation finishes. SKIPPED:
280
+ * the generation could not test it and said why. OPEN: not covered yet; the
281
+ * generation does not finish while a layer is open. NOT_APPLICABLE: nothing to
282
+ * test it from.
283
+ */
284
+ status: 'COVERED' | 'SKIPPED' | 'OPEN' | 'NOT_APPLICABLE';
285
+ summary: string;
286
+ }
287
+ /**
288
+ * The question the generation is waiting on, while NEEDS_INPUT
289
+ */
290
+ interface Question {
291
+ defaultOption: string;
292
+ options: Array<string>;
293
+ question: string;
294
+ }
295
+ interface TestDataNeeded {
296
+ callId: string | null;
297
+ label: string;
298
+ reason: string;
299
+ }
300
+ }
301
+ }
302
+ export interface SimulationCancelResourceGenerationResponse {
303
+ /**
304
+ * The simulation resources Roark generated for agents: the flows, metrics, checks
305
+ * and run plan, and why
306
+ */
307
+ data: SimulationCancelResourceGenerationResponse.Data;
308
+ }
309
+ export declare namespace SimulationCancelResourceGenerationResponse {
310
+ /**
311
+ * The simulation resources Roark generated for agents: the flows, metrics, checks
312
+ * and run plan, and why
313
+ */
314
+ interface Data {
315
+ /**
316
+ * Simulation resource generation ID
317
+ */
318
+ id: string;
319
+ /**
320
+ * What the generation did and said, in order
321
+ */
322
+ activity: Array<Data.Activity>;
323
+ /**
324
+ * The agents the inputs were generated for
325
+ */
326
+ agentIds: Array<string>;
327
+ capabilities: Array<'APPOINTMENT_BOOKING' | 'FAQ' | 'IDENTITY_VERIFICATION' | 'ACCOUNT_MANAGEMENT' | 'BILLING_AND_PAYMENTS' | 'ORDER_MANAGEMENT' | 'TROUBLESHOOTING' | 'CALL_ROUTING' | 'LEAD_QUALIFICATION' | 'COLLECTIONS' | 'OUTBOUND_CALLING'>;
328
+ completedAt: string | null;
329
+ createdAt: string;
330
+ errorMessage: string | null;
331
+ explore: Data.Explore;
332
+ industry: 'HEALTHCARE' | 'FINANCIAL_SERVICES' | 'INSURANCE' | 'DEBT_COLLECTION' | 'RETAIL' | 'TRAVEL_AND_HOSPITALITY' | 'TELECOMMUNICATIONS' | 'TECHNOLOGY' | 'PUBLIC_SECTOR' | 'UTILITIES' | 'LOGISTICS' | 'AUTOMOTIVE' | 'HOME_SERVICES' | 'RESTAURANTS' | 'EDUCATION' | 'OTHER' | null;
333
+ items: Array<Data.Item>;
334
+ /**
335
+ * The checklist the generation works through
336
+ */
337
+ layers: Array<Data.Layer>;
338
+ /**
339
+ * The question the generation is waiting on, while NEEDS_INPUT
340
+ */
341
+ question: Data.Question | null;
342
+ /**
343
+ * The run plan to start once the generation completes
344
+ */
345
+ runPlanId: string | null;
346
+ /**
347
+ * PENDING, RUNNING, NEEDS_INPUT (waiting on a question; it goes ahead with the
348
+ * default if nobody answers), COMPLETED, FAILED or CANCELLED
349
+ */
350
+ status: 'PENDING' | 'RUNNING' | 'NEEDS_INPUT' | 'COMPLETED' | 'FAILED' | 'CANCELLED';
351
+ /**
352
+ * Test data the agent asked for that Roark did not have
353
+ */
354
+ testDataNeeded: Array<Data.TestDataNeeded>;
355
+ }
356
+ namespace Data {
357
+ /**
358
+ * One thing the generation did or said, in order
359
+ */
360
+ interface Activity {
361
+ createdAt: string;
362
+ /**
363
+ * STATUS, REASONING, ACTION, GUIDANCE, QUESTION, ANSWER, EXPLORATION or ERROR
364
+ */
365
+ kind: 'STATUS' | 'REASONING' | 'ACTION' | 'GUIDANCE' | 'QUESTION' | 'ANSWER' | 'EXPLORATION' | 'ERROR';
366
+ text: string;
367
+ }
368
+ interface Explore {
369
+ conversationsUsed: number;
370
+ enabled: boolean;
371
+ maxConversationMinutes: number;
372
+ maxConversations: number;
373
+ }
374
+ /**
375
+ * Something the generation created or chose to leave out, and why
376
+ */
377
+ interface Item {
378
+ id: string;
379
+ /**
380
+ * CREATED, or SKIPPED with the reason
381
+ */
382
+ action: 'CREATED' | 'SKIPPED';
383
+ capability: 'APPOINTMENT_BOOKING' | 'FAQ' | 'IDENTITY_VERIFICATION' | 'ACCOUNT_MANAGEMENT' | 'BILLING_AND_PAYMENTS' | 'ORDER_MANAGEMENT' | 'TROUBLESHOOTING' | 'CALL_ROUTING' | 'LEAD_QUALIFICATION' | 'COLLECTIONS' | 'OUTBOUND_CALLING' | null;
384
+ /**
385
+ * A flow, a metric, or a pass or fail check
386
+ */
387
+ kind: 'FLOW' | 'METRIC' | 'CHECK' | 'LAYER';
388
+ label: string;
389
+ /**
390
+ * Why it exists: CORE (every agent), INDUSTRY, CAPABILITY, AGENT_CONTEXT (your
391
+ * prompt or website), EXPLORATION or CUSTOMER_INSTRUCTIONS
392
+ */
393
+ layer: 'CORE' | 'INDUSTRY' | 'CAPABILITY' | 'AGENT_CONTEXT' | 'EXPLORATION' | 'CUSTOMER_INSTRUCTIONS';
394
+ /**
395
+ * Exploration only: DISCOVERED on a call, or INFERRED from a path the agent
396
+ * offered
397
+ */
398
+ origin: 'DISCOVERED' | 'INFERRED' | null;
399
+ reason: string;
400
+ /**
401
+ * The flow or metric it created
402
+ */
403
+ resourceId: string | null;
404
+ source: Item.Source;
405
+ }
406
+ namespace Item {
407
+ interface Source {
408
+ /**
409
+ * The exploration call it came from
410
+ */
411
+ callId: string | null;
412
+ /**
413
+ * Where in the call
414
+ */
415
+ offsetMs: number | null;
416
+ /**
417
+ * The words in the source that led to it
418
+ */
419
+ quote: string | null;
420
+ type: 'CATALOGUE' | 'PROMPT' | 'DESCRIPTION' | 'WEBSITE' | 'EXPLORATION_CALL' | 'INSTRUCTIONS';
421
+ /**
422
+ * The page it came from, for website sources
423
+ */
424
+ url: string | null;
425
+ }
426
+ }
427
+ /**
428
+ * Where one part of testing the agent stands
429
+ */
430
+ interface Layer {
431
+ layer: 'CORE' | 'INDUSTRY' | 'CAPABILITY' | 'AGENT_CONTEXT' | 'EXPLORATION' | 'CUSTOMER_INSTRUCTIONS';
432
+ /**
433
+ * COVERED: tests exist for it, or are added when the generation finishes. SKIPPED:
434
+ * the generation could not test it and said why. OPEN: not covered yet; the
435
+ * generation does not finish while a layer is open. NOT_APPLICABLE: nothing to
436
+ * test it from.
437
+ */
438
+ status: 'COVERED' | 'SKIPPED' | 'OPEN' | 'NOT_APPLICABLE';
439
+ summary: string;
440
+ }
441
+ /**
442
+ * The question the generation is waiting on, while NEEDS_INPUT
443
+ */
444
+ interface Question {
445
+ defaultOption: string;
446
+ options: Array<string>;
447
+ question: string;
448
+ }
449
+ interface TestDataNeeded {
450
+ callId: string | null;
451
+ label: string;
452
+ reason: string;
453
+ }
454
+ }
455
+ }
456
+ export interface SimulationGenerateResourcesResponse {
457
+ /**
458
+ * The simulation resources Roark generated for agents: the flows, metrics, checks
459
+ * and run plan, and why
460
+ */
461
+ data: SimulationGenerateResourcesResponse.Data;
462
+ }
463
+ export declare namespace SimulationGenerateResourcesResponse {
464
+ /**
465
+ * The simulation resources Roark generated for agents: the flows, metrics, checks
466
+ * and run plan, and why
467
+ */
468
+ interface Data {
469
+ /**
470
+ * Simulation resource generation ID
471
+ */
472
+ id: string;
473
+ /**
474
+ * What the generation did and said, in order
475
+ */
476
+ activity: Array<Data.Activity>;
477
+ /**
478
+ * The agents the inputs were generated for
479
+ */
480
+ agentIds: Array<string>;
481
+ capabilities: Array<'APPOINTMENT_BOOKING' | 'FAQ' | 'IDENTITY_VERIFICATION' | 'ACCOUNT_MANAGEMENT' | 'BILLING_AND_PAYMENTS' | 'ORDER_MANAGEMENT' | 'TROUBLESHOOTING' | 'CALL_ROUTING' | 'LEAD_QUALIFICATION' | 'COLLECTIONS' | 'OUTBOUND_CALLING'>;
482
+ completedAt: string | null;
483
+ createdAt: string;
484
+ errorMessage: string | null;
485
+ explore: Data.Explore;
486
+ industry: 'HEALTHCARE' | 'FINANCIAL_SERVICES' | 'INSURANCE' | 'DEBT_COLLECTION' | 'RETAIL' | 'TRAVEL_AND_HOSPITALITY' | 'TELECOMMUNICATIONS' | 'TECHNOLOGY' | 'PUBLIC_SECTOR' | 'UTILITIES' | 'LOGISTICS' | 'AUTOMOTIVE' | 'HOME_SERVICES' | 'RESTAURANTS' | 'EDUCATION' | 'OTHER' | null;
487
+ items: Array<Data.Item>;
488
+ /**
489
+ * The checklist the generation works through
490
+ */
491
+ layers: Array<Data.Layer>;
492
+ /**
493
+ * The question the generation is waiting on, while NEEDS_INPUT
494
+ */
495
+ question: Data.Question | null;
496
+ /**
497
+ * The run plan to start once the generation completes
498
+ */
499
+ runPlanId: string | null;
500
+ /**
501
+ * PENDING, RUNNING, NEEDS_INPUT (waiting on a question; it goes ahead with the
502
+ * default if nobody answers), COMPLETED, FAILED or CANCELLED
503
+ */
504
+ status: 'PENDING' | 'RUNNING' | 'NEEDS_INPUT' | 'COMPLETED' | 'FAILED' | 'CANCELLED';
505
+ /**
506
+ * Test data the agent asked for that Roark did not have
507
+ */
508
+ testDataNeeded: Array<Data.TestDataNeeded>;
509
+ }
510
+ namespace Data {
511
+ /**
512
+ * One thing the generation did or said, in order
513
+ */
514
+ interface Activity {
515
+ createdAt: string;
516
+ /**
517
+ * STATUS, REASONING, ACTION, GUIDANCE, QUESTION, ANSWER, EXPLORATION or ERROR
518
+ */
519
+ kind: 'STATUS' | 'REASONING' | 'ACTION' | 'GUIDANCE' | 'QUESTION' | 'ANSWER' | 'EXPLORATION' | 'ERROR';
520
+ text: string;
521
+ }
522
+ interface Explore {
523
+ conversationsUsed: number;
524
+ enabled: boolean;
525
+ maxConversationMinutes: number;
526
+ maxConversations: number;
527
+ }
528
+ /**
529
+ * Something the generation created or chose to leave out, and why
530
+ */
531
+ interface Item {
532
+ id: string;
533
+ /**
534
+ * CREATED, or SKIPPED with the reason
535
+ */
536
+ action: 'CREATED' | 'SKIPPED';
537
+ capability: 'APPOINTMENT_BOOKING' | 'FAQ' | 'IDENTITY_VERIFICATION' | 'ACCOUNT_MANAGEMENT' | 'BILLING_AND_PAYMENTS' | 'ORDER_MANAGEMENT' | 'TROUBLESHOOTING' | 'CALL_ROUTING' | 'LEAD_QUALIFICATION' | 'COLLECTIONS' | 'OUTBOUND_CALLING' | null;
538
+ /**
539
+ * A flow, a metric, or a pass or fail check
540
+ */
541
+ kind: 'FLOW' | 'METRIC' | 'CHECK' | 'LAYER';
542
+ label: string;
543
+ /**
544
+ * Why it exists: CORE (every agent), INDUSTRY, CAPABILITY, AGENT_CONTEXT (your
545
+ * prompt or website), EXPLORATION or CUSTOMER_INSTRUCTIONS
546
+ */
547
+ layer: 'CORE' | 'INDUSTRY' | 'CAPABILITY' | 'AGENT_CONTEXT' | 'EXPLORATION' | 'CUSTOMER_INSTRUCTIONS';
548
+ /**
549
+ * Exploration only: DISCOVERED on a call, or INFERRED from a path the agent
550
+ * offered
551
+ */
552
+ origin: 'DISCOVERED' | 'INFERRED' | null;
553
+ reason: string;
554
+ /**
555
+ * The flow or metric it created
556
+ */
557
+ resourceId: string | null;
558
+ source: Item.Source;
559
+ }
560
+ namespace Item {
561
+ interface Source {
562
+ /**
563
+ * The exploration call it came from
564
+ */
565
+ callId: string | null;
566
+ /**
567
+ * Where in the call
568
+ */
569
+ offsetMs: number | null;
570
+ /**
571
+ * The words in the source that led to it
572
+ */
573
+ quote: string | null;
574
+ type: 'CATALOGUE' | 'PROMPT' | 'DESCRIPTION' | 'WEBSITE' | 'EXPLORATION_CALL' | 'INSTRUCTIONS';
575
+ /**
576
+ * The page it came from, for website sources
577
+ */
578
+ url: string | null;
579
+ }
580
+ }
581
+ /**
582
+ * Where one part of testing the agent stands
583
+ */
584
+ interface Layer {
585
+ layer: 'CORE' | 'INDUSTRY' | 'CAPABILITY' | 'AGENT_CONTEXT' | 'EXPLORATION' | 'CUSTOMER_INSTRUCTIONS';
586
+ /**
587
+ * COVERED: tests exist for it, or are added when the generation finishes. SKIPPED:
588
+ * the generation could not test it and said why. OPEN: not covered yet; the
589
+ * generation does not finish while a layer is open. NOT_APPLICABLE: nothing to
590
+ * test it from.
591
+ */
592
+ status: 'COVERED' | 'SKIPPED' | 'OPEN' | 'NOT_APPLICABLE';
593
+ summary: string;
594
+ }
595
+ /**
596
+ * The question the generation is waiting on, while NEEDS_INPUT
597
+ */
598
+ interface Question {
599
+ defaultOption: string;
600
+ options: Array<string>;
601
+ question: string;
602
+ }
603
+ interface TestDataNeeded {
604
+ callId: string | null;
605
+ label: string;
606
+ reason: string;
607
+ }
608
+ }
609
+ }
610
+ export interface SimulationGetResourceGenerationResponse {
611
+ /**
612
+ * The simulation resources Roark generated for agents: the flows, metrics, checks
613
+ * and run plan, and why
614
+ */
615
+ data: SimulationGetResourceGenerationResponse.Data;
616
+ }
617
+ export declare namespace SimulationGetResourceGenerationResponse {
618
+ /**
619
+ * The simulation resources Roark generated for agents: the flows, metrics, checks
620
+ * and run plan, and why
621
+ */
622
+ interface Data {
623
+ /**
624
+ * Simulation resource generation ID
625
+ */
626
+ id: string;
627
+ /**
628
+ * What the generation did and said, in order
629
+ */
630
+ activity: Array<Data.Activity>;
631
+ /**
632
+ * The agents the inputs were generated for
633
+ */
634
+ agentIds: Array<string>;
635
+ capabilities: Array<'APPOINTMENT_BOOKING' | 'FAQ' | 'IDENTITY_VERIFICATION' | 'ACCOUNT_MANAGEMENT' | 'BILLING_AND_PAYMENTS' | 'ORDER_MANAGEMENT' | 'TROUBLESHOOTING' | 'CALL_ROUTING' | 'LEAD_QUALIFICATION' | 'COLLECTIONS' | 'OUTBOUND_CALLING'>;
636
+ completedAt: string | null;
637
+ createdAt: string;
638
+ errorMessage: string | null;
639
+ explore: Data.Explore;
640
+ industry: 'HEALTHCARE' | 'FINANCIAL_SERVICES' | 'INSURANCE' | 'DEBT_COLLECTION' | 'RETAIL' | 'TRAVEL_AND_HOSPITALITY' | 'TELECOMMUNICATIONS' | 'TECHNOLOGY' | 'PUBLIC_SECTOR' | 'UTILITIES' | 'LOGISTICS' | 'AUTOMOTIVE' | 'HOME_SERVICES' | 'RESTAURANTS' | 'EDUCATION' | 'OTHER' | null;
641
+ items: Array<Data.Item>;
642
+ /**
643
+ * The checklist the generation works through
644
+ */
645
+ layers: Array<Data.Layer>;
646
+ /**
647
+ * The question the generation is waiting on, while NEEDS_INPUT
648
+ */
649
+ question: Data.Question | null;
650
+ /**
651
+ * The run plan to start once the generation completes
652
+ */
653
+ runPlanId: string | null;
654
+ /**
655
+ * PENDING, RUNNING, NEEDS_INPUT (waiting on a question; it goes ahead with the
656
+ * default if nobody answers), COMPLETED, FAILED or CANCELLED
657
+ */
658
+ status: 'PENDING' | 'RUNNING' | 'NEEDS_INPUT' | 'COMPLETED' | 'FAILED' | 'CANCELLED';
659
+ /**
660
+ * Test data the agent asked for that Roark did not have
661
+ */
662
+ testDataNeeded: Array<Data.TestDataNeeded>;
663
+ }
664
+ namespace Data {
665
+ /**
666
+ * One thing the generation did or said, in order
667
+ */
668
+ interface Activity {
669
+ createdAt: string;
670
+ /**
671
+ * STATUS, REASONING, ACTION, GUIDANCE, QUESTION, ANSWER, EXPLORATION or ERROR
672
+ */
673
+ kind: 'STATUS' | 'REASONING' | 'ACTION' | 'GUIDANCE' | 'QUESTION' | 'ANSWER' | 'EXPLORATION' | 'ERROR';
674
+ text: string;
675
+ }
676
+ interface Explore {
677
+ conversationsUsed: number;
678
+ enabled: boolean;
679
+ maxConversationMinutes: number;
680
+ maxConversations: number;
681
+ }
682
+ /**
683
+ * Something the generation created or chose to leave out, and why
684
+ */
685
+ interface Item {
686
+ id: string;
687
+ /**
688
+ * CREATED, or SKIPPED with the reason
689
+ */
690
+ action: 'CREATED' | 'SKIPPED';
691
+ capability: 'APPOINTMENT_BOOKING' | 'FAQ' | 'IDENTITY_VERIFICATION' | 'ACCOUNT_MANAGEMENT' | 'BILLING_AND_PAYMENTS' | 'ORDER_MANAGEMENT' | 'TROUBLESHOOTING' | 'CALL_ROUTING' | 'LEAD_QUALIFICATION' | 'COLLECTIONS' | 'OUTBOUND_CALLING' | null;
692
+ /**
693
+ * A flow, a metric, or a pass or fail check
694
+ */
695
+ kind: 'FLOW' | 'METRIC' | 'CHECK' | 'LAYER';
696
+ label: string;
697
+ /**
698
+ * Why it exists: CORE (every agent), INDUSTRY, CAPABILITY, AGENT_CONTEXT (your
699
+ * prompt or website), EXPLORATION or CUSTOMER_INSTRUCTIONS
700
+ */
701
+ layer: 'CORE' | 'INDUSTRY' | 'CAPABILITY' | 'AGENT_CONTEXT' | 'EXPLORATION' | 'CUSTOMER_INSTRUCTIONS';
702
+ /**
703
+ * Exploration only: DISCOVERED on a call, or INFERRED from a path the agent
704
+ * offered
705
+ */
706
+ origin: 'DISCOVERED' | 'INFERRED' | null;
707
+ reason: string;
708
+ /**
709
+ * The flow or metric it created
710
+ */
711
+ resourceId: string | null;
712
+ source: Item.Source;
713
+ }
714
+ namespace Item {
715
+ interface Source {
716
+ /**
717
+ * The exploration call it came from
718
+ */
719
+ callId: string | null;
720
+ /**
721
+ * Where in the call
722
+ */
723
+ offsetMs: number | null;
724
+ /**
725
+ * The words in the source that led to it
726
+ */
727
+ quote: string | null;
728
+ type: 'CATALOGUE' | 'PROMPT' | 'DESCRIPTION' | 'WEBSITE' | 'EXPLORATION_CALL' | 'INSTRUCTIONS';
729
+ /**
730
+ * The page it came from, for website sources
731
+ */
732
+ url: string | null;
733
+ }
734
+ }
735
+ /**
736
+ * Where one part of testing the agent stands
737
+ */
738
+ interface Layer {
739
+ layer: 'CORE' | 'INDUSTRY' | 'CAPABILITY' | 'AGENT_CONTEXT' | 'EXPLORATION' | 'CUSTOMER_INSTRUCTIONS';
740
+ /**
741
+ * COVERED: tests exist for it, or are added when the generation finishes. SKIPPED:
742
+ * the generation could not test it and said why. OPEN: not covered yet; the
743
+ * generation does not finish while a layer is open. NOT_APPLICABLE: nothing to
744
+ * test it from.
745
+ */
746
+ status: 'COVERED' | 'SKIPPED' | 'OPEN' | 'NOT_APPLICABLE';
747
+ summary: string;
748
+ }
749
+ /**
750
+ * The question the generation is waiting on, while NEEDS_INPUT
751
+ */
752
+ interface Question {
753
+ defaultOption: string;
754
+ options: Array<string>;
755
+ question: string;
756
+ }
757
+ interface TestDataNeeded {
758
+ callId: string | null;
759
+ label: string;
760
+ reason: string;
761
+ }
762
+ }
763
+ }
764
+ export interface SimulationGuideResourceGenerationResponse {
765
+ /**
766
+ * The simulation resources Roark generated for agents: the flows, metrics, checks
767
+ * and run plan, and why
768
+ */
769
+ data: SimulationGuideResourceGenerationResponse.Data;
770
+ }
771
+ export declare namespace SimulationGuideResourceGenerationResponse {
772
+ /**
773
+ * The simulation resources Roark generated for agents: the flows, metrics, checks
774
+ * and run plan, and why
775
+ */
776
+ interface Data {
777
+ /**
778
+ * Simulation resource generation ID
779
+ */
780
+ id: string;
781
+ /**
782
+ * What the generation did and said, in order
783
+ */
784
+ activity: Array<Data.Activity>;
785
+ /**
786
+ * The agents the inputs were generated for
787
+ */
788
+ agentIds: Array<string>;
789
+ capabilities: Array<'APPOINTMENT_BOOKING' | 'FAQ' | 'IDENTITY_VERIFICATION' | 'ACCOUNT_MANAGEMENT' | 'BILLING_AND_PAYMENTS' | 'ORDER_MANAGEMENT' | 'TROUBLESHOOTING' | 'CALL_ROUTING' | 'LEAD_QUALIFICATION' | 'COLLECTIONS' | 'OUTBOUND_CALLING'>;
790
+ completedAt: string | null;
791
+ createdAt: string;
792
+ errorMessage: string | null;
793
+ explore: Data.Explore;
794
+ industry: 'HEALTHCARE' | 'FINANCIAL_SERVICES' | 'INSURANCE' | 'DEBT_COLLECTION' | 'RETAIL' | 'TRAVEL_AND_HOSPITALITY' | 'TELECOMMUNICATIONS' | 'TECHNOLOGY' | 'PUBLIC_SECTOR' | 'UTILITIES' | 'LOGISTICS' | 'AUTOMOTIVE' | 'HOME_SERVICES' | 'RESTAURANTS' | 'EDUCATION' | 'OTHER' | null;
795
+ items: Array<Data.Item>;
796
+ /**
797
+ * The checklist the generation works through
798
+ */
799
+ layers: Array<Data.Layer>;
800
+ /**
801
+ * The question the generation is waiting on, while NEEDS_INPUT
802
+ */
803
+ question: Data.Question | null;
804
+ /**
805
+ * The run plan to start once the generation completes
806
+ */
807
+ runPlanId: string | null;
808
+ /**
809
+ * PENDING, RUNNING, NEEDS_INPUT (waiting on a question; it goes ahead with the
810
+ * default if nobody answers), COMPLETED, FAILED or CANCELLED
811
+ */
812
+ status: 'PENDING' | 'RUNNING' | 'NEEDS_INPUT' | 'COMPLETED' | 'FAILED' | 'CANCELLED';
813
+ /**
814
+ * Test data the agent asked for that Roark did not have
815
+ */
816
+ testDataNeeded: Array<Data.TestDataNeeded>;
817
+ }
818
+ namespace Data {
819
+ /**
820
+ * One thing the generation did or said, in order
821
+ */
822
+ interface Activity {
823
+ createdAt: string;
824
+ /**
825
+ * STATUS, REASONING, ACTION, GUIDANCE, QUESTION, ANSWER, EXPLORATION or ERROR
826
+ */
827
+ kind: 'STATUS' | 'REASONING' | 'ACTION' | 'GUIDANCE' | 'QUESTION' | 'ANSWER' | 'EXPLORATION' | 'ERROR';
828
+ text: string;
829
+ }
830
+ interface Explore {
831
+ conversationsUsed: number;
832
+ enabled: boolean;
833
+ maxConversationMinutes: number;
834
+ maxConversations: number;
835
+ }
836
+ /**
837
+ * Something the generation created or chose to leave out, and why
838
+ */
839
+ interface Item {
840
+ id: string;
841
+ /**
842
+ * CREATED, or SKIPPED with the reason
843
+ */
844
+ action: 'CREATED' | 'SKIPPED';
845
+ capability: 'APPOINTMENT_BOOKING' | 'FAQ' | 'IDENTITY_VERIFICATION' | 'ACCOUNT_MANAGEMENT' | 'BILLING_AND_PAYMENTS' | 'ORDER_MANAGEMENT' | 'TROUBLESHOOTING' | 'CALL_ROUTING' | 'LEAD_QUALIFICATION' | 'COLLECTIONS' | 'OUTBOUND_CALLING' | null;
846
+ /**
847
+ * A flow, a metric, or a pass or fail check
848
+ */
849
+ kind: 'FLOW' | 'METRIC' | 'CHECK' | 'LAYER';
850
+ label: string;
851
+ /**
852
+ * Why it exists: CORE (every agent), INDUSTRY, CAPABILITY, AGENT_CONTEXT (your
853
+ * prompt or website), EXPLORATION or CUSTOMER_INSTRUCTIONS
854
+ */
855
+ layer: 'CORE' | 'INDUSTRY' | 'CAPABILITY' | 'AGENT_CONTEXT' | 'EXPLORATION' | 'CUSTOMER_INSTRUCTIONS';
856
+ /**
857
+ * Exploration only: DISCOVERED on a call, or INFERRED from a path the agent
858
+ * offered
859
+ */
860
+ origin: 'DISCOVERED' | 'INFERRED' | null;
861
+ reason: string;
862
+ /**
863
+ * The flow or metric it created
864
+ */
865
+ resourceId: string | null;
866
+ source: Item.Source;
867
+ }
868
+ namespace Item {
869
+ interface Source {
870
+ /**
871
+ * The exploration call it came from
872
+ */
873
+ callId: string | null;
874
+ /**
875
+ * Where in the call
876
+ */
877
+ offsetMs: number | null;
878
+ /**
879
+ * The words in the source that led to it
880
+ */
881
+ quote: string | null;
882
+ type: 'CATALOGUE' | 'PROMPT' | 'DESCRIPTION' | 'WEBSITE' | 'EXPLORATION_CALL' | 'INSTRUCTIONS';
883
+ /**
884
+ * The page it came from, for website sources
885
+ */
886
+ url: string | null;
887
+ }
888
+ }
889
+ /**
890
+ * Where one part of testing the agent stands
891
+ */
892
+ interface Layer {
893
+ layer: 'CORE' | 'INDUSTRY' | 'CAPABILITY' | 'AGENT_CONTEXT' | 'EXPLORATION' | 'CUSTOMER_INSTRUCTIONS';
894
+ /**
895
+ * COVERED: tests exist for it, or are added when the generation finishes. SKIPPED:
896
+ * the generation could not test it and said why. OPEN: not covered yet; the
897
+ * generation does not finish while a layer is open. NOT_APPLICABLE: nothing to
898
+ * test it from.
899
+ */
900
+ status: 'COVERED' | 'SKIPPED' | 'OPEN' | 'NOT_APPLICABLE';
901
+ summary: string;
902
+ }
903
+ /**
904
+ * The question the generation is waiting on, while NEEDS_INPUT
905
+ */
906
+ interface Question {
907
+ defaultOption: string;
908
+ options: Array<string>;
909
+ question: string;
910
+ }
911
+ interface TestDataNeeded {
912
+ callId: string | null;
913
+ label: string;
914
+ reason: string;
915
+ }
916
+ }
917
+ }
918
+ export interface SimulationListResourceGenerationsResponse {
919
+ data: Array<SimulationListResourceGenerationsResponse.Data>;
920
+ }
921
+ export declare namespace SimulationListResourceGenerationsResponse {
922
+ /**
923
+ * The simulation resources Roark generated for agents: the flows, metrics, checks
924
+ * and run plan, and why
925
+ */
926
+ interface Data {
927
+ /**
928
+ * Simulation resource generation ID
929
+ */
930
+ id: string;
931
+ /**
932
+ * What the generation did and said, in order
933
+ */
934
+ activity: Array<Data.Activity>;
935
+ /**
936
+ * The agents the inputs were generated for
937
+ */
938
+ agentIds: Array<string>;
939
+ capabilities: Array<'APPOINTMENT_BOOKING' | 'FAQ' | 'IDENTITY_VERIFICATION' | 'ACCOUNT_MANAGEMENT' | 'BILLING_AND_PAYMENTS' | 'ORDER_MANAGEMENT' | 'TROUBLESHOOTING' | 'CALL_ROUTING' | 'LEAD_QUALIFICATION' | 'COLLECTIONS' | 'OUTBOUND_CALLING'>;
940
+ completedAt: string | null;
941
+ createdAt: string;
942
+ errorMessage: string | null;
943
+ explore: Data.Explore;
944
+ industry: 'HEALTHCARE' | 'FINANCIAL_SERVICES' | 'INSURANCE' | 'DEBT_COLLECTION' | 'RETAIL' | 'TRAVEL_AND_HOSPITALITY' | 'TELECOMMUNICATIONS' | 'TECHNOLOGY' | 'PUBLIC_SECTOR' | 'UTILITIES' | 'LOGISTICS' | 'AUTOMOTIVE' | 'HOME_SERVICES' | 'RESTAURANTS' | 'EDUCATION' | 'OTHER' | null;
945
+ items: Array<Data.Item>;
946
+ /**
947
+ * The checklist the generation works through
948
+ */
949
+ layers: Array<Data.Layer>;
950
+ /**
951
+ * The question the generation is waiting on, while NEEDS_INPUT
952
+ */
953
+ question: Data.Question | null;
954
+ /**
955
+ * The run plan to start once the generation completes
956
+ */
957
+ runPlanId: string | null;
958
+ /**
959
+ * PENDING, RUNNING, NEEDS_INPUT (waiting on a question; it goes ahead with the
960
+ * default if nobody answers), COMPLETED, FAILED or CANCELLED
961
+ */
962
+ status: 'PENDING' | 'RUNNING' | 'NEEDS_INPUT' | 'COMPLETED' | 'FAILED' | 'CANCELLED';
963
+ /**
964
+ * Test data the agent asked for that Roark did not have
965
+ */
966
+ testDataNeeded: Array<Data.TestDataNeeded>;
967
+ }
968
+ namespace Data {
969
+ /**
970
+ * One thing the generation did or said, in order
971
+ */
972
+ interface Activity {
973
+ createdAt: string;
974
+ /**
975
+ * STATUS, REASONING, ACTION, GUIDANCE, QUESTION, ANSWER, EXPLORATION or ERROR
976
+ */
977
+ kind: 'STATUS' | 'REASONING' | 'ACTION' | 'GUIDANCE' | 'QUESTION' | 'ANSWER' | 'EXPLORATION' | 'ERROR';
978
+ text: string;
979
+ }
980
+ interface Explore {
981
+ conversationsUsed: number;
982
+ enabled: boolean;
983
+ maxConversationMinutes: number;
984
+ maxConversations: number;
985
+ }
986
+ /**
987
+ * Something the generation created or chose to leave out, and why
988
+ */
989
+ interface Item {
990
+ id: string;
991
+ /**
992
+ * CREATED, or SKIPPED with the reason
993
+ */
994
+ action: 'CREATED' | 'SKIPPED';
995
+ capability: 'APPOINTMENT_BOOKING' | 'FAQ' | 'IDENTITY_VERIFICATION' | 'ACCOUNT_MANAGEMENT' | 'BILLING_AND_PAYMENTS' | 'ORDER_MANAGEMENT' | 'TROUBLESHOOTING' | 'CALL_ROUTING' | 'LEAD_QUALIFICATION' | 'COLLECTIONS' | 'OUTBOUND_CALLING' | null;
996
+ /**
997
+ * A flow, a metric, or a pass or fail check
998
+ */
999
+ kind: 'FLOW' | 'METRIC' | 'CHECK' | 'LAYER';
1000
+ label: string;
1001
+ /**
1002
+ * Why it exists: CORE (every agent), INDUSTRY, CAPABILITY, AGENT_CONTEXT (your
1003
+ * prompt or website), EXPLORATION or CUSTOMER_INSTRUCTIONS
1004
+ */
1005
+ layer: 'CORE' | 'INDUSTRY' | 'CAPABILITY' | 'AGENT_CONTEXT' | 'EXPLORATION' | 'CUSTOMER_INSTRUCTIONS';
1006
+ /**
1007
+ * Exploration only: DISCOVERED on a call, or INFERRED from a path the agent
1008
+ * offered
1009
+ */
1010
+ origin: 'DISCOVERED' | 'INFERRED' | null;
1011
+ reason: string;
1012
+ /**
1013
+ * The flow or metric it created
1014
+ */
1015
+ resourceId: string | null;
1016
+ source: Item.Source;
1017
+ }
1018
+ namespace Item {
1019
+ interface Source {
1020
+ /**
1021
+ * The exploration call it came from
1022
+ */
1023
+ callId: string | null;
1024
+ /**
1025
+ * Where in the call
1026
+ */
1027
+ offsetMs: number | null;
1028
+ /**
1029
+ * The words in the source that led to it
1030
+ */
1031
+ quote: string | null;
1032
+ type: 'CATALOGUE' | 'PROMPT' | 'DESCRIPTION' | 'WEBSITE' | 'EXPLORATION_CALL' | 'INSTRUCTIONS';
1033
+ /**
1034
+ * The page it came from, for website sources
1035
+ */
1036
+ url: string | null;
1037
+ }
1038
+ }
1039
+ /**
1040
+ * Where one part of testing the agent stands
1041
+ */
1042
+ interface Layer {
1043
+ layer: 'CORE' | 'INDUSTRY' | 'CAPABILITY' | 'AGENT_CONTEXT' | 'EXPLORATION' | 'CUSTOMER_INSTRUCTIONS';
1044
+ /**
1045
+ * COVERED: tests exist for it, or are added when the generation finishes. SKIPPED:
1046
+ * the generation could not test it and said why. OPEN: not covered yet; the
1047
+ * generation does not finish while a layer is open. NOT_APPLICABLE: nothing to
1048
+ * test it from.
1049
+ */
1050
+ status: 'COVERED' | 'SKIPPED' | 'OPEN' | 'NOT_APPLICABLE';
1051
+ summary: string;
1052
+ }
1053
+ /**
1054
+ * The question the generation is waiting on, while NEEDS_INPUT
1055
+ */
1056
+ interface Question {
1057
+ defaultOption: string;
1058
+ options: Array<string>;
1059
+ question: string;
1060
+ }
1061
+ interface TestDataNeeded {
1062
+ callId: string | null;
1063
+ label: string;
1064
+ reason: string;
1065
+ }
1066
+ }
1067
+ }
61
1068
  export interface SimulationMockToolResponse {
62
1069
  /**
63
1070
  * A simulated backend response for a guarded tool during a Roark test call. The
@@ -121,7 +1128,7 @@ export declare namespace SimulationRunResponse {
121
1128
  */
122
1129
  simulationRunPlanId: string;
123
1130
  /**
124
- * The run. Poll it with GET /v1/simulation/plan/job/{jobId}.
1131
+ * The run. Poll it with `GET /v1/simulation/plan/job/{jobId}`.
125
1132
  */
126
1133
  simulationRunPlanJobId: string;
127
1134
  /**
@@ -131,6 +1138,81 @@ export declare namespace SimulationRunResponse {
131
1138
  status: 'PENDING' | 'QUEUED' | 'CREATING_SNAPSHOTS' | 'CREATING_SIMULATIONS' | 'PREPARING_CAPACITY' | 'RUNNING_SIMULATIONS' | 'COMPLETED' | 'FAILED' | 'TIMED_OUT' | 'CANCELLED' | 'CANCELLING' | 'ENDING_SIMULATIONS';
132
1139
  }
133
1140
  }
1141
+ export interface SimulationAnswerResourceGenerationParams {
1142
+ /**
1143
+ * What you want the generation to know
1144
+ */
1145
+ text: string;
1146
+ }
1147
+ export interface SimulationGenerateResourcesParams {
1148
+ /**
1149
+ * The agents to generate simulation resources for. One agent per generation for
1150
+ * now.
1151
+ */
1152
+ agentIds: Array<string>;
1153
+ /**
1154
+ * The endpoint the run plan calls. Defaults to the agent's newest endpoint.
1155
+ */
1156
+ agentEndpointId?: string;
1157
+ /**
1158
+ * The capabilities to test. Omit to let Roark work them out from the agent.
1159
+ */
1160
+ capabilities?: Array<'APPOINTMENT_BOOKING' | 'FAQ' | 'IDENTITY_VERIFICATION' | 'ACCOUNT_MANAGEMENT' | 'BILLING_AND_PAYMENTS' | 'ORDER_MANAGEMENT' | 'TROUBLESHOOTING' | 'CALL_ROUTING' | 'LEAD_QUALIFICATION' | 'COLLECTIONS' | 'OUTBOUND_CALLING'>;
1161
+ /**
1162
+ * Exploration settings
1163
+ */
1164
+ explore?: SimulationGenerateResourcesParams.Explore;
1165
+ /**
1166
+ * The industry the agent serves.
1167
+ */
1168
+ industry?: 'HEALTHCARE' | 'FINANCIAL_SERVICES' | 'INSURANCE' | 'DEBT_COLLECTION' | 'RETAIL' | 'TRAVEL_AND_HOSPITALITY' | 'TELECOMMUNICATIONS' | 'TECHNOLOGY' | 'PUBLIC_SECTOR' | 'UTILITIES' | 'LOGISTICS' | 'AUTOMOTIVE' | 'HOME_SERVICES' | 'RESTAURANTS' | 'EDUCATION' | 'OTHER';
1169
+ /**
1170
+ * What you want tested, in your own words. Each scenario you describe becomes a
1171
+ * flow.
1172
+ */
1173
+ testingInstructions?: string;
1174
+ /**
1175
+ * A page Roark reads to learn about the business.
1176
+ */
1177
+ websiteUrl?: string;
1178
+ }
1179
+ export declare namespace SimulationGenerateResourcesParams {
1180
+ /**
1181
+ * Exploration settings
1182
+ */
1183
+ interface Explore {
1184
+ /**
1185
+ * Whether Roark calls the agent to discover what it does before finishing the
1186
+ * generation. Exploration calls are billed.
1187
+ */
1188
+ enabled?: boolean;
1189
+ /**
1190
+ * The longest a single exploration call may last, in minutes.
1191
+ */
1192
+ maxConversationMinutes?: number;
1193
+ /**
1194
+ * The most exploration calls Roark places.
1195
+ */
1196
+ maxConversations?: number;
1197
+ }
1198
+ }
1199
+ export interface SimulationGuideResourceGenerationParams {
1200
+ /**
1201
+ * What you want the generation to know
1202
+ */
1203
+ text: string;
1204
+ }
1205
+ export interface SimulationListResourceGenerationsParams {
1206
+ /**
1207
+ * Only generations for these agents, comma-separated, at most 100. Omit for every
1208
+ * agent.
1209
+ */
1210
+ agentIds?: string;
1211
+ /**
1212
+ * How many to return, newest first. Default 20, max 50.
1213
+ */
1214
+ limit?: number;
1215
+ }
134
1216
  export interface SimulationMockToolParams {
135
1217
  /**
136
1218
  * The simulation this session belongs to, from the agent-config resolve response
@@ -611,8 +1693,8 @@ export declare namespace SimulationRunParams {
611
1693
  }
612
1694
  interface RunSimulationFromPlanID {
613
1695
  /**
614
- * The run plan to run, saved or hidden. Rename or unhide it with PUT
615
- * /v1/simulation/plan/{planId}.
1696
+ * The run plan to run, saved or hidden. Rename or unhide it with
1697
+ * `PUT /v1/simulation/plan/{planId}`.
616
1698
  */
617
1699
  planId: string;
618
1700
  /**
@@ -1100,6 +2182,6 @@ export declare namespace SimulationRunParams {
1100
2182
  }
1101
2183
  }
1102
2184
  export declare namespace Simulation {
1103
- export { type SimulationMockToolResponse as SimulationMockToolResponse, type SimulationRunResponse as SimulationRunResponse, type SimulationMockToolParams as SimulationMockToolParams, type SimulationRunParams as SimulationRunParams, };
2185
+ export { type SimulationAnswerResourceGenerationResponse as SimulationAnswerResourceGenerationResponse, type SimulationCancelResourceGenerationResponse as SimulationCancelResourceGenerationResponse, type SimulationGenerateResourcesResponse as SimulationGenerateResourcesResponse, type SimulationGetResourceGenerationResponse as SimulationGetResourceGenerationResponse, type SimulationGuideResourceGenerationResponse as SimulationGuideResourceGenerationResponse, type SimulationListResourceGenerationsResponse as SimulationListResourceGenerationsResponse, type SimulationMockToolResponse as SimulationMockToolResponse, type SimulationRunResponse as SimulationRunResponse, type SimulationAnswerResourceGenerationParams as SimulationAnswerResourceGenerationParams, type SimulationGenerateResourcesParams as SimulationGenerateResourcesParams, type SimulationGuideResourceGenerationParams as SimulationGuideResourceGenerationParams, type SimulationListResourceGenerationsParams as SimulationListResourceGenerationsParams, type SimulationMockToolParams as SimulationMockToolParams, type SimulationRunParams as SimulationRunParams, };
1104
2186
  }
1105
2187
  //# sourceMappingURL=simulation.d.mts.map