@roarkanalytics/cli 0.73.1 → 0.74.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 (128) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/README.md +191 -148
  3. package/commands.js +2868 -944
  4. package/completions.js +4 -4
  5. package/man/roark-agent-build.1 +3 -3
  6. package/man/roark-agent-conversation-create.1 +106 -0
  7. package/man/roark-agent-create.1 +27 -3
  8. package/man/roark-agent-draft-update.1 +4 -1
  9. package/man/roark-agent-endpoint-create.1 +5 -5
  10. package/man/roark-agent-endpoint-get.1 +1 -1
  11. package/man/roark-agent-get.1 +1 -1
  12. package/man/roark-autoimprove-job-cancel.1 +1 -1
  13. package/man/roark-autoimprove-job-dismiss.1 +1 -1
  14. package/man/roark-autoimprove-job-guidance-send.1 +1 -1
  15. package/man/roark-autoimprove-job-promote.1 +1 -1
  16. package/man/roark-benchmark-target-history-list.1 +1 -1
  17. package/man/roark-call-get.1 +1 -1
  18. package/man/roark-connections-agent-backfill-cancel.1 +96 -0
  19. package/man/roark-connections-agent-backfill-create.1 +97 -0
  20. package/man/roark-connections-agent-backfill-list.1 +93 -0
  21. package/man/roark-connections-agent-create.1 +124 -0
  22. package/man/roark-connections-agent-delete.1 +93 -0
  23. package/man/roark-connections-agent-discover.1 +96 -0
  24. package/man/roark-connections-agent-get.1 +93 -0
  25. package/man/roark-connections-agent-list.1 +93 -0
  26. package/man/roark-connections-agent-provider-list.1 +89 -0
  27. package/man/roark-connections-agent-update.1 +128 -0
  28. package/man/roark-connections-calendar-calendar-list.1 +93 -0
  29. package/man/roark-connections-calendar-calendly-oauth-start.1 +99 -0
  30. package/man/{roark-calendar-connection-check.1 → roark-connections-calendar-check.1} +5 -5
  31. package/man/{roark-calendar-connection-create.1 → roark-connections-calendar-create.1} +7 -7
  32. package/man/{roark-calendar-connection-delete.1 → roark-connections-calendar-delete.1} +5 -5
  33. package/man/{roark-calendar-connection-get.1 → roark-connections-calendar-get.1} +5 -5
  34. package/man/roark-connections-calendar-google-oauth-start.1 +102 -0
  35. package/man/{roark-calendar-connection-list.1 → roark-connections-calendar-list.1} +6 -6
  36. package/man/roark-connections-calendar-target-create.1 +124 -0
  37. package/man/roark-connections-calendar-target-delete.1 +96 -0
  38. package/man/{roark-calendar-connection-target-get.1 → roark-connections-calendar-target-get.1} +5 -5
  39. package/man/{roark-calendar-connection-target-list.1 → roark-connections-calendar-target-list.1} +5 -5
  40. package/man/roark-connections-calendar-target-update.1 +124 -0
  41. package/man/{roark-calendar-connection-update.1 → roark-connections-calendar-update.1} +5 -5
  42. package/man/roark-connections-mcp-server-create.1 +105 -0
  43. package/man/roark-connections-mcp-server-delete.1 +93 -0
  44. package/man/roark-connections-mcp-server-discover.1 +99 -0
  45. package/man/roark-connections-mcp-server-get.1 +93 -0
  46. package/man/roark-connections-mcp-server-list.1 +89 -0
  47. package/man/roark-connections-mcp-server-refresh.1 +93 -0
  48. package/man/roark-connections-mcp-server-update.1 +100 -0
  49. package/man/roark-conversation-get.1 +93 -0
  50. package/man/roark-credential-create.1 +2 -2
  51. package/man/roark-credential-list.1 +2 -2
  52. package/man/roark-credential-revoke.1 +2 -2
  53. package/man/{roark-customer-profile-attribute-delete.1 → roark-customer-attribute-delete.1} +5 -5
  54. package/man/{roark-customer-profile-attribute-unlock.1 → roark-customer-attribute-unlock.1} +5 -5
  55. package/man/{roark-customer-profile-attribute-update.1 → roark-customer-attribute-update.1} +5 -5
  56. package/man/{roark-customer-profile-conversation-list.1 → roark-customer-conversation-list.1} +5 -5
  57. package/man/{roark-customer-profile-delete.1 → roark-customer-delete.1} +6 -6
  58. package/man/roark-customer-field-create.1 +105 -0
  59. package/man/roark-customer-field-delete.1 +93 -0
  60. package/man/roark-customer-field-list.1 +89 -0
  61. package/man/roark-customer-field-update.1 +106 -0
  62. package/man/roark-customer-flow-edge-case-create.1 +1 -1
  63. package/man/roark-customer-flow-edge-case-update.1 +1 -1
  64. package/man/roark-customer-flow-folder-create.1 +99 -0
  65. package/man/roark-customer-flow-folder-delete.1 +93 -0
  66. package/man/roark-customer-flow-folder-list.1 +89 -0
  67. package/man/roark-customer-flow-get.1 +1 -1
  68. package/man/roark-customer-flow-happy-path-update.1 +1 -1
  69. package/man/roark-customer-flow-list.1 +3 -0
  70. package/man/roark-customer-flow-update.1 +4 -1
  71. package/man/{roark-customer-profile-get.1 → roark-customer-get.1} +6 -6
  72. package/man/{roark-customer-profile-list.1 → roark-customer-list.1} +8 -8
  73. package/man/{roark-customer-profile-notes-update.1 → roark-customer-notes-update.1} +5 -5
  74. package/man/roark-dashboard-list.1 +1 -1
  75. package/man/roark-dashboard-update.1 +1 -1
  76. package/man/roark-http-request-definition-create.1 +1 -1
  77. package/man/roark-http-request-definition-get.1 +1 -1
  78. package/man/roark-http-request-definition-update.1 +1 -1
  79. package/man/roark-metric-collection-job-get.1 +1 -1
  80. package/man/roark-metric-definition-create.1 +1 -1
  81. package/man/roark-metric-definition-update.1 +1 -1
  82. package/man/roark-metric-policy-create.1 +1 -1
  83. package/man/roark-metric-policy-get.1 +1 -1
  84. package/man/roark-metric-variant-list.1 +1 -1
  85. package/man/roark-metric-variant-update.1 +1 -1
  86. package/man/roark-project-list.1 +1 -1
  87. package/man/roark-simulation-environment-create.1 +12 -0
  88. package/man/roark-simulation-environment-get.1 +1 -1
  89. package/man/roark-simulation-environment-update.1 +12 -0
  90. package/man/roark-simulation-group-create.1 +2 -2
  91. package/man/roark-simulation-group-delete.1 +1 -1
  92. package/man/roark-simulation-group-get.1 +1 -1
  93. package/man/roark-simulation-group-list.1 +1 -1
  94. package/man/roark-simulation-group-run.1 +2 -2
  95. package/man/roark-simulation-group-update.1 +1 -1
  96. package/man/roark-simulation-job-get.1 +1 -1
  97. package/man/roark-simulation-job-lookup.1 +1 -1
  98. package/man/roark-simulation-persona-create.1 +1 -1
  99. package/man/roark-simulation-persona-get.1 +1 -1
  100. package/man/roark-simulation-persona-update.1 +1 -1
  101. package/man/roark-simulation-plan-get.1 +1 -1
  102. package/man/roark-simulation-plan-job-cancel.1 +1 -1
  103. package/man/roark-simulation-plan-job-cost-get.1 +1 -1
  104. package/man/roark-simulation-plan-job-debrief-create.1 +1 -1
  105. package/man/roark-simulation-plan-job-delete.1 +1 -1
  106. package/man/roark-simulation-plan-job-get.1 +1 -1
  107. package/man/roark-simulation-plan-job-list.1 +1 -1
  108. package/man/roark-simulation-plan-job-result-get.1 +1 -1
  109. package/man/roark-simulation-plan-update.1 +7 -1
  110. package/man/roark-simulation-resource-generate.1 +120 -0
  111. package/man/roark-simulation-resource-generation-answer.1 +97 -0
  112. package/man/roark-simulation-resource-generation-cancel.1 +93 -0
  113. package/man/roark-simulation-resource-generation-get.1 +93 -0
  114. package/man/roark-simulation-resource-generation-guidance-send.1 +97 -0
  115. package/man/roark-simulation-resource-generation-list.1 +96 -0
  116. package/man/roark-simulation-run-group-list.1 +1 -1
  117. package/man/roark-tool-create.1 +32 -2
  118. package/man/roark-tool-update.1 +32 -2
  119. package/man/roark-usage-get.1 +1 -1
  120. package/man/roark-webhook-create.1 +2 -2
  121. package/man/roark-webhook-delete.1 +1 -1
  122. package/man/roark-webhook-get.1 +1 -1
  123. package/man/roark-whoami.1 +1 -1
  124. package/man/roark.1 +208 -94
  125. package/npm-shrinkwrap.json +6 -6
  126. package/package.json +56 -18
  127. package/version.d.ts +1 -1
  128. package/version.js +1 -1
package/commands.js CHANGED
@@ -9,6 +9,7 @@ exports.DESCRIPTION = 'Command line interface for the Roark Analytics API';
9
9
  // Help text for the command groups, which have no operation of their own.
10
10
  exports.GROUPS = {
11
11
  agent: 'Manage agents',
12
+ 'agent conversation': 'Manage agent conversation',
12
13
  'agent draft': 'Manage agent drafts',
13
14
  'agent endpoint': 'Manage agent endpoints',
14
15
  'agent prompt': 'Manage agent prompts',
@@ -28,8 +29,6 @@ exports.GROUPS = {
28
29
  'benchmark target': 'Read benchmark targets',
29
30
  'benchmark target history': 'Read benchmark target histories',
30
31
  'benchmark target score-sample': 'Read benchmark target score samples',
31
- 'calendar-connection': 'Manage calendar connections',
32
- 'calendar-connection target': 'Read calendar connection targets',
33
32
  call: 'Manage calls',
34
33
  'call batch': 'Manage call batch',
35
34
  'call cost': 'Read call cost',
@@ -39,15 +38,28 @@ exports.GROUPS = {
39
38
  'call tool-invocation': 'Manage call tool invocations',
40
39
  'call transcript': 'Read call transcript',
41
40
  config: 'Read configs',
41
+ connections: 'Manage connectionses',
42
+ 'connections agent': 'Manage connections agents',
43
+ 'connections agent backfill': 'Manage connections agent backfills',
44
+ 'connections agent provider': 'Read connections agent providers',
45
+ 'connections calendar': 'Manage connections calendars',
46
+ 'connections calendar calendar': 'Read connections calendar calendars',
47
+ 'connections calendar calendly-oauth': 'Manage connections calendar calendly oauth',
48
+ 'connections calendar google-oauth': 'Manage connections calendar google oauth',
49
+ 'connections calendar target': 'Manage connections calendar targets',
50
+ 'connections mcp-server': 'Manage connections mcp servers',
51
+ conversation: 'Read conversation',
42
52
  credential: 'Manage credentials',
53
+ customer: 'Manage customers',
54
+ 'customer attribute': 'Manage customer attributes',
55
+ 'customer conversation': 'Read customer conversations',
56
+ 'customer field': 'Manage customer fields',
57
+ 'customer notes': 'Manage customer notes',
43
58
  'customer-flow': 'Manage customer flows',
44
59
  'customer-flow edge-case': 'Manage customer flow edge cases',
60
+ 'customer-flow folder': 'Manage customer flow folders',
45
61
  'customer-flow graph': 'Manage customer flow graph',
46
62
  'customer-flow happy-path': 'Manage customer flow happy path',
47
- 'customer-profile': 'Manage customer profiles',
48
- 'customer-profile attribute': 'Manage customer profile attributes',
49
- 'customer-profile conversation': 'Read customer profile conversations',
50
- 'customer-profile notes': 'Manage customer profile notes',
51
63
  dashboard: 'Manage dashboards',
52
64
  'dashboard data': 'Read dashboard data',
53
65
  'dashboard widget': 'Manage dashboard widgets',
@@ -76,6 +88,9 @@ exports.GROUPS = {
76
88
  'simulation plan job cost': 'Read simulation plan job cost',
77
89
  'simulation plan job debrief': 'Manage simulation plan job debrief',
78
90
  'simulation plan job result': 'Read simulation plan job result',
91
+ 'simulation resource': 'Read simulation resource',
92
+ 'simulation resource-generation': 'Read simulation resource generations',
93
+ 'simulation resource-generation guidance': 'Read simulation resource generation guidance',
79
94
  'simulation run-group': 'Manage simulation run groups',
80
95
  'simulation run-group report': 'Read simulation run group report',
81
96
  'simulation template': 'Read simulation templates',
@@ -138,7 +153,7 @@ exports.COMMANDS = [
138
153
  required: true,
139
154
  description: 'Text-to-speech provider, for example ELEVENLABS',
140
155
  valueKind: 'string',
141
- enumValues: ['CARTESIA', 'ELEVENLABS', 'OPENAI', 'RIME'],
156
+ enumValues: ['CARTESIA', 'ELEVENLABS', 'OPENAI', 'RIME', 'ASSEMBLYAI', 'DEEPGRAM', 'FISH_AUDIO'],
142
157
  repeatable: false,
143
158
  },
144
159
  {
@@ -174,7 +189,7 @@ exports.COMMANDS = [
174
189
  required: true,
175
190
  description: 'Speech-to-text provider, for example DEEPGRAM',
176
191
  valueKind: 'string',
177
- enumValues: ['DEEPGRAM', 'OPENAI_WHISPER', 'SPEECHMATICS', 'ASSEMBLYAI', 'ELEVENLABS'],
192
+ enumValues: ['DEEPGRAM', 'OPENAI_WHISPER', 'SPEECHMATICS', 'ASSEMBLYAI', 'ELEVENLABS', 'SONIOX'],
178
193
  repeatable: false,
179
194
  },
180
195
  {
@@ -201,7 +216,19 @@ exports.COMMANDS = [
201
216
  required: true,
202
217
  description: 'Text model provider, for example OPENAI',
203
218
  valueKind: 'string',
204
- enumValues: ['OPENAI', 'ANTHROPIC', 'GOOGLE', 'XAI', 'ULTRAVOX', 'AWS', 'ELEVENLABS'],
219
+ enumValues: [
220
+ 'OPENAI',
221
+ 'ANTHROPIC',
222
+ 'GOOGLE',
223
+ 'XAI',
224
+ 'ULTRAVOX',
225
+ 'AWS',
226
+ 'ELEVENLABS',
227
+ 'GROQ',
228
+ 'META',
229
+ 'RIME',
230
+ 'PHONIC',
231
+ ],
205
232
  repeatable: false,
206
233
  },
207
234
  {
@@ -221,13 +248,74 @@ exports.COMMANDS = [
221
248
  acceptsBody: true,
222
249
  requiresAuth: true,
223
250
  },
251
+ {
252
+ commandPath: ['agent', 'conversation', 'create'],
253
+ clientProperty: 'agentConversation',
254
+ methodName: 'create',
255
+ httpMethod: 'post',
256
+ httpPath: '/v1/agent/{agentId}/conversations',
257
+ summary: 'Start a conversation with an agent',
258
+ description: 'Starts a voice conversation (`modality: voice`) or chat (`modality: chat`) with this Roark-hosted agent and returns its id right away. `channel: web` is a conversation in a browser on your site. Call this endpoint from your server, never the browser: it needs your API key. Give the page only `web.clientToken`; the web SDK spends it to join from one of `allowedOrigins` before `web.clientTokenExpiresAt`. Read it back with `GET /v1/conversation/{conversationId}` straight away: `PENDING` until the browser joins, `IN_PROGRESS`, then `ENDED`. One nobody joins ends without ever starting and is never billed. Starting a voice conversation needs `call:create`, a chat `chat:create`, and the agent a published version that takes that kind.',
259
+ positionals: [
260
+ {
261
+ name: 'agent-id',
262
+ paramKey: 'agentId',
263
+ },
264
+ ],
265
+ flags: [
266
+ {
267
+ name: 'modality',
268
+ path: ['modality'],
269
+ location: 'body',
270
+ required: true,
271
+ description: '`voice` or `chat`. The agent must have that modality turned on.',
272
+ valueKind: 'string',
273
+ enumValues: ['voice', 'chat', 'call'],
274
+ repeatable: false,
275
+ },
276
+ {
277
+ name: 'channel',
278
+ path: ['channel'],
279
+ location: 'body',
280
+ required: true,
281
+ description: 'How it is reached. `web`: in a browser on one of `allowedOrigins`, joined with the web SDK.',
282
+ valueKind: 'string',
283
+ enumValues: ['web'],
284
+ repeatable: false,
285
+ },
286
+ {
287
+ name: 'allowed-origins',
288
+ path: ['allowedOrigins'],
289
+ location: 'body',
290
+ required: true,
291
+ description: 'The origins your page may join from, exactly as the browser sends them: https only (http on localhost for development), no paths or wildcards.',
292
+ valueKind: 'array',
293
+ repeatable: true,
294
+ },
295
+ {
296
+ name: 'client-token-ttl-seconds',
297
+ path: ['clientTokenTtlSeconds'],
298
+ location: 'body',
299
+ required: false,
300
+ description: 'How long the browser has to join, in seconds. Default 120.',
301
+ valueKind: 'integer',
302
+ repeatable: false,
303
+ },
304
+ ],
305
+ hasParams: true,
306
+ paramsAllOptional: false,
307
+ bodyOpaque: false,
308
+ bodyVariants: [],
309
+ acceptsBody: true,
310
+ requiresAuth: true,
311
+ },
224
312
  {
225
313
  commandPath: ['agent', 'create'],
226
314
  clientProperty: 'agent',
227
315
  methodName: 'create',
228
316
  httpMethod: 'post',
229
317
  httpPath: '/v1/agent',
230
- summary: 'Create a new agent',
318
+ summary: 'Create an agent',
231
319
  description: 'Creates a new agent for the authenticated project.',
232
320
  positionals: [],
233
321
  flags: [
@@ -254,7 +342,98 @@ exports.COMMANDS = [
254
342
  path: ['customId'],
255
343
  location: 'body',
256
344
  required: false,
257
- description: 'Custom identifier for the agent',
345
+ description: 'Custom identifier for the agent. Must be unique in the project.',
346
+ valueKind: 'string',
347
+ repeatable: false,
348
+ },
349
+ {
350
+ name: 'industry',
351
+ path: ['industry'],
352
+ location: 'body',
353
+ required: false,
354
+ description: 'The industry the agent serves.',
355
+ valueKind: 'string',
356
+ enumValues: [
357
+ 'HEALTHCARE',
358
+ 'FINANCIAL_SERVICES',
359
+ 'INSURANCE',
360
+ 'DEBT_COLLECTION',
361
+ 'RETAIL',
362
+ 'TRAVEL_AND_HOSPITALITY',
363
+ 'TELECOMMUNICATIONS',
364
+ 'TECHNOLOGY',
365
+ 'PUBLIC_SECTOR',
366
+ 'UTILITIES',
367
+ 'LOGISTICS',
368
+ 'AUTOMOTIVE',
369
+ 'HOME_SERVICES',
370
+ 'RESTAURANTS',
371
+ 'EDUCATION',
372
+ 'OTHER',
373
+ ],
374
+ repeatable: false,
375
+ },
376
+ {
377
+ name: 'prompt',
378
+ path: ['prompt'],
379
+ location: 'body',
380
+ required: false,
381
+ description: "The agent's system prompt.",
382
+ valueKind: 'string',
383
+ repeatable: false,
384
+ },
385
+ {
386
+ name: 'endpoint',
387
+ path: ['endpoint'],
388
+ location: 'body',
389
+ required: false,
390
+ description: 'The phone number or connection Roark calls to test the agent',
391
+ valueKind: 'object',
392
+ },
393
+ {
394
+ name: 'endpoint.value',
395
+ path: ['endpoint', 'value'],
396
+ location: 'body',
397
+ required: false,
398
+ description: 'Phone number in E.164 format (e.g., +12345678900). Optional when direction is OUTGOING, for an agent that calls from numbers you do not know up front.',
399
+ valueKind: 'string',
400
+ repeatable: false,
401
+ },
402
+ {
403
+ name: 'endpoint.environment',
404
+ path: ['endpoint', 'environment'],
405
+ location: 'body',
406
+ required: false,
407
+ description: 'Environment name (default: production)',
408
+ valueKind: 'string',
409
+ repeatable: false,
410
+ },
411
+ {
412
+ name: 'endpoint.direction',
413
+ path: ['endpoint', 'direction'],
414
+ location: 'body',
415
+ required: true,
416
+ description: 'Call direction: INCOMING, OUTGOING, or INCOMING_AND_OUTGOING',
417
+ valueKind: 'string',
418
+ enumValues: ['INCOMING', 'OUTGOING', 'INCOMING_AND_OUTGOING'],
419
+ repeatable: false,
420
+ },
421
+ {
422
+ name: 'endpoint.outbound-dial-type',
423
+ path: ['endpoint', 'outboundDialType'],
424
+ location: 'body',
425
+ required: false,
426
+ description: 'Outbound dial type: NONE or HTTP_REQUEST (default: NONE)',
427
+ valueKind: 'string',
428
+ enumValues: ['NONE', 'HTTP_REQUEST'],
429
+ repeatable: false,
430
+ },
431
+ {
432
+ name: 'endpoint.outbound-dial-http-request-definition-id',
433
+ path: ['endpoint', 'outboundDialHttpRequestDefinitionId'],
434
+ location: 'body',
435
+ required: false,
436
+ description: 'ID of the HTTP request definition for outbound dialing (required when outboundDialType is HTTP_REQUEST)',
258
437
  valueKind: 'string',
259
438
  repeatable: false,
260
439
  },
@@ -421,7 +600,7 @@ exports.COMMANDS = [
421
600
  location: 'body',
422
601
  required: false,
423
602
  valueKind: 'array',
424
- enumValues: ['call', 'chat'],
603
+ enumValues: ['voice', 'chat', 'call'],
425
604
  repeatable: true,
426
605
  },
427
606
  {
@@ -482,6 +661,14 @@ exports.COMMANDS = [
482
661
  valueKind: 'number',
483
662
  repeatable: false,
484
663
  },
664
+ {
665
+ name: 'settings.vad-max-silence-secs',
666
+ path: ['settings', 'vadMaxSilenceSecs'],
667
+ location: 'body',
668
+ required: false,
669
+ valueKind: 'number',
670
+ repeatable: false,
671
+ },
485
672
  {
486
673
  name: 'settings.call-max-duration-seconds',
487
674
  path: ['settings', 'callMaxDurationSeconds'],
@@ -622,19 +809,10 @@ exports.COMMANDS = [
622
809
  methodName: 'create',
623
810
  httpMethod: 'post',
624
811
  httpPath: '/v1/agent/endpoint',
625
- summary: 'Create a new agent endpoint',
812
+ summary: 'Create an agent endpoint',
626
813
  description: 'Creates a new agent endpoint for the authenticated project.',
627
814
  positionals: [],
628
815
  flags: [
629
- {
630
- name: 'agent-id',
631
- path: ['agentId'],
632
- location: 'body',
633
- required: true,
634
- description: 'Agent ID to associate this endpoint with',
635
- valueKind: 'string',
636
- repeatable: false,
637
- },
638
816
  {
639
817
  name: 'value',
640
818
  path: ['value'],
@@ -682,6 +860,15 @@ exports.COMMANDS = [
682
860
  valueKind: 'string',
683
861
  repeatable: false,
684
862
  },
863
+ {
864
+ name: 'agent-id',
865
+ path: ['agentId'],
866
+ location: 'body',
867
+ required: true,
868
+ description: 'Agent ID to associate this endpoint with',
869
+ valueKind: 'string',
870
+ repeatable: false,
871
+ },
685
872
  ],
686
873
  hasParams: true,
687
874
  paramsAllOptional: false,
@@ -696,7 +883,7 @@ exports.COMMANDS = [
696
883
  methodName: 'getByID',
697
884
  httpMethod: 'get',
698
885
  httpPath: '/v1/agent/endpoint/{endpointId}',
699
- summary: 'Get agent endpoint by ID',
886
+ summary: 'Get an agent endpoint',
700
887
  description: 'Returns a specific agent endpoint by its ID.',
701
888
  positionals: [
702
889
  {
@@ -825,7 +1012,7 @@ exports.COMMANDS = [
825
1012
  methodName: 'getByID',
826
1013
  httpMethod: 'get',
827
1014
  httpPath: '/v1/agent/{agentId}',
828
- summary: 'Get agent by ID',
1015
+ summary: 'Get an agent',
829
1016
  description: 'Returns a specific agent by its ID.',
830
1017
  positionals: [
831
1018
  {
@@ -1472,7 +1659,7 @@ exports.COMMANDS = [
1472
1659
  methodName: 'cancel',
1473
1660
  httpMethod: 'post',
1474
1661
  httpPath: '/v1/autoimprove/job/{jobId}/cancel',
1475
- summary: 'Cancel a job',
1662
+ summary: 'Cancel an Autoimprove job',
1476
1663
  description: 'Stop a live job. Production is never changed by a cancel; everything the job set up (the shadow agent, its phone number, authored test flows and run plan) is cleaned up automatically.',
1477
1664
  positionals: [
1478
1665
  {
@@ -1593,7 +1780,7 @@ exports.COMMANDS = [
1593
1780
  methodName: 'dismiss',
1594
1781
  httpMethod: 'post',
1595
1782
  httpPath: '/v1/autoimprove/job/{jobId}/dismiss',
1596
- summary: 'Dismiss a verified job',
1783
+ summary: 'Dismiss an Autoimprove job',
1597
1784
  description: 'Discard a verified job without promoting: production stays untouched and the staging resources are cleaned up. Only a job in AWAITING_PROMOTE can be dismissed.',
1598
1785
  positionals: [
1599
1786
  {
@@ -1637,7 +1824,7 @@ exports.COMMANDS = [
1637
1824
  methodName: 'sendGuidance',
1638
1825
  httpMethod: 'post',
1639
1826
  httpPath: '/v1/autoimprove/job/{jobId}/guidance',
1640
- summary: 'Send guidance to a running job',
1827
+ summary: 'Guide a running Autoimprove job',
1641
1828
  description: 'Steer Roark mid-job. The message is folded into its next decision and is binding. Accepted while the job is live (RUNNING, NEEDS_INPUT, or PAUSED); a concluded job returns a conflict.',
1642
1829
  positionals: [
1643
1830
  {
@@ -1686,7 +1873,7 @@ exports.COMMANDS = [
1686
1873
  methodName: 'promote',
1687
1874
  httpMethod: 'post',
1688
1875
  httpPath: '/v1/autoimprove/job/{jobId}/promote',
1689
- summary: 'Promote a verified job to production',
1876
+ summary: 'Promote an Autoimprove job to production',
1690
1877
  description: 'Apply the verified staging changes to the PRODUCTION agent. Only a job in AWAITING_PROMOTE can be promoted. A snapshot of the production configuration is taken immediately before the write, so the promote is fully rollbackable. After the promote the staging shadow and its phone number are cleaned up.',
1691
1878
  positionals: [
1692
1879
  {
@@ -1892,7 +2079,7 @@ exports.COMMANDS = [
1892
2079
  methodName: 'listTargetHistory',
1893
2080
  httpMethod: 'get',
1894
2081
  httpPath: '/v1/benchmark/target/{targetKey}/history',
1895
- summary: 'List a target’s published generations',
2082
+ summary: "List a benchmark target's published generations",
1896
2083
  description: 'Returns every sweep published for a target, newest first, including superseded ones. This is the trend read: it answers "did this model regress?" from Roark’s own published record. Metadata only — pass a row’s `publicationId` to GET /v1/benchmark/target/{targetKey} for that generation’s numbers.',
1897
2084
  positionals: [
1898
2085
  {
@@ -2017,18 +2204,44 @@ exports.COMMANDS = [
2017
2204
  requiresAuth: true,
2018
2205
  },
2019
2206
  {
2020
- commandPath: ['calendar-connection', 'check'],
2021
- clientProperty: 'calendarConnection',
2022
- methodName: 'check',
2207
+ commandPath: ['call', 'batch', 'delete'],
2208
+ clientProperty: 'call',
2209
+ methodName: 'batchDelete',
2023
2210
  httpMethod: 'post',
2024
- httpPath: '/v1/calendar-connection/{connectionId}/check',
2025
- summary: 'Check a calendar connection',
2026
- description: 'Re-verifies the stored credential against the provider and records the result on the connection. A credential the provider rejects sets `status` to INVALID_CREDENTIALS. A provider outage is a 500 and leaves the status untouched: being unable to reach the provider is not evidence that the customer’s credential is bad.',
2211
+ httpPath: '/v1/call/batch-delete',
2212
+ summary: 'Delete calls in batch',
2213
+ description: 'Deletes up to 100 calls by ID in one request. Each deleted call, its metrics and its analysis are hidden from every read, and any analysis still running on it is cancelled. IDs that do not exist in this project, or were already deleted, are returned in notFoundCallIds and left untouched. The request succeeds even when none of the calls are found. IDs are returned lowercase, each once.',
2214
+ positionals: [],
2215
+ flags: [
2216
+ {
2217
+ name: 'call-ids',
2218
+ path: ['callIds'],
2219
+ location: 'body',
2220
+ required: true,
2221
+ description: 'IDs of the calls to delete, at most 100. Repeated IDs are counted once.',
2222
+ valueKind: 'array',
2223
+ repeatable: true,
2224
+ },
2225
+ ],
2226
+ hasParams: true,
2227
+ paramsAllOptional: false,
2228
+ bodyOpaque: false,
2229
+ bodyVariants: [],
2230
+ acceptsBody: true,
2231
+ requiresAuth: true,
2232
+ },
2233
+ {
2234
+ commandPath: ['call', 'cost', 'get'],
2235
+ clientProperty: 'call',
2236
+ methodName: 'getCost',
2237
+ httpMethod: 'get',
2238
+ httpPath: '/v1/call/{callId}/cost',
2239
+ summary: 'Get call cost',
2240
+ description: 'The billable spend attributed to one call, split by cost type, with every cost line behind it. Simulated calls include the costs their simulation incurred before the call connected. Amounts are billable spend only, in exact micro-dollars (`*UsdMicros`) and dollars (`*Usd`, for display). Requires an API key with the `billing:read` permission.',
2027
2241
  positionals: [
2028
2242
  {
2029
- name: 'connection-id',
2030
- paramKey: 'connectionId',
2031
- description: 'Calendar connection ID',
2243
+ name: 'call-id',
2244
+ paramKey: 'callId',
2032
2245
  },
2033
2246
  ],
2034
2247
  flags: [],
@@ -2040,341 +2253,61 @@ exports.COMMANDS = [
2040
2253
  requiresAuth: true,
2041
2254
  },
2042
2255
  {
2043
- commandPath: ['calendar-connection', 'create'],
2044
- clientProperty: 'calendarConnection',
2256
+ commandPath: ['call', 'create'],
2257
+ clientProperty: 'call',
2045
2258
  methodName: 'create',
2046
2259
  httpMethod: 'post',
2047
- httpPath: '/v1/calendar-connection',
2048
- summary: 'Connect a calendar account',
2049
- description: 'Verifies the credential against the provider and, only if it works, stores it encrypted. A credential the provider rejects is a 400 and no connection is created: a connection that has never worked would next be exercised by an inbound call at 2am, with nobody there to fix it.',
2260
+ httpPath: '/v1/call',
2261
+ summary: 'Create a call',
2262
+ description: 'Create a new call with recording, transcript, agents, and customers',
2050
2263
  positionals: [],
2051
2264
  flags: [
2052
2265
  {
2053
- name: 'provider',
2054
- path: ['provider'],
2266
+ name: 'recording-url',
2267
+ path: ['recordingUrl'],
2055
2268
  location: 'body',
2056
2269
  required: true,
2057
- description: 'Who holds the calendar. CAL_COM is the only provider that can be connected today; GOOGLE and CALENDLY are described by `capabilities` but not yet connectable.',
2270
+ description: 'URL of source recording (must be an accessible WAV, MP3, MP4, or OGG file). Can be a signed URL.',
2058
2271
  valueKind: 'string',
2059
- enumValues: ['CAL_COM', 'GOOGLE', 'CALENDLY'],
2060
2272
  repeatable: false,
2061
2273
  },
2062
2274
  {
2063
- name: 'label',
2064
- path: ['label'],
2275
+ name: 'stereo-recording-url',
2276
+ path: ['stereoRecordingUrl'],
2065
2277
  location: 'body',
2066
- required: true,
2067
- description: 'Customer-facing name for this account, unique within the project. Required.',
2278
+ required: false,
2279
+ description: 'URL of source stereo recording. Must be accessible. Can be a signed URL. Supported formats: WAV, MP3, MP4, OGG.',
2068
2280
  valueKind: 'string',
2069
2281
  repeatable: false,
2070
2282
  },
2071
2283
  {
2072
- name: 'api-key',
2073
- path: ['apiKey'],
2284
+ name: 'started-at',
2285
+ path: ['startedAt'],
2074
2286
  location: 'body',
2075
2287
  required: true,
2076
- description: 'For CAL_COM: a Cal.com API key (starts with `cal_`). It is verified against Cal.com before anything is stored, so an invalid key is a 400 and no connection is created. Stored encrypted and never returned.',
2288
+ description: 'When the call started (ISO 8601 format)',
2077
2289
  valueKind: 'string',
2078
2290
  repeatable: false,
2079
2291
  },
2080
2292
  {
2081
- name: 'timezone',
2082
- path: ['timezone'],
2293
+ name: 'interface-type',
2294
+ path: ['interfaceType'],
2083
2295
  location: 'body',
2084
- required: false,
2085
- description: 'The named IANA timezone to offer slots in, for example `America/Los_Angeles`. Omit to adopt the provider account’s own timezone. A fixed offset such as `-08:00` is rejected: it does not observe DST.',
2296
+ required: true,
2297
+ description: 'Interface type of the call (PHONE or WEB)',
2086
2298
  valueKind: 'string',
2299
+ enumValues: ['PHONE', 'WEB'],
2087
2300
  repeatable: false,
2088
2301
  },
2089
- ],
2090
- hasParams: true,
2091
- paramsAllOptional: false,
2092
- bodyOpaque: false,
2093
- bodyVariants: [],
2094
- acceptsBody: true,
2095
- requiresAuth: true,
2096
- },
2097
- {
2098
- commandPath: ['calendar-connection', 'delete'],
2099
- clientProperty: 'calendarConnection',
2100
- methodName: 'delete',
2101
- httpMethod: 'delete',
2102
- httpPath: '/v1/calendar-connection/{connectionId}',
2103
- summary: 'Delete a calendar connection',
2104
- description: 'Disconnects the calendar and destroys the stored credential. A credential the customer deleted should stop existing, so this is not an archive. Appointments already recorded against the connection are kept, so a booking stays explainable after the calendar is disconnected. Refused with a 409 while a calendar tool is still bound to the connection, naming the tools: point them at another calendar, or delete them, first. A dangling binding would otherwise be found by whoever next tried to ship the agent, who is not the person who disconnected the calendar.',
2105
- positionals: [
2106
2302
  {
2107
- name: 'connection-id',
2108
- paramKey: 'connectionId',
2109
- description: 'Calendar connection ID',
2110
- },
2111
- ],
2112
- flags: [],
2113
- hasParams: false,
2114
- paramsAllOptional: true,
2115
- bodyOpaque: false,
2116
- bodyVariants: [],
2117
- acceptsBody: false,
2118
- requiresAuth: true,
2119
- },
2120
- {
2121
- commandPath: ['calendar-connection', 'get'],
2122
- clientProperty: 'calendarConnection',
2123
- methodName: 'getByID',
2124
- httpMethod: 'get',
2125
- httpPath: '/v1/calendar-connection/{connectionId}',
2126
- summary: 'Get a calendar connection',
2127
- description: 'Returns one calendar connection. The stored credential is never included.',
2128
- positionals: [
2129
- {
2130
- name: 'connection-id',
2131
- paramKey: 'connectionId',
2132
- description: 'Calendar connection ID',
2133
- },
2134
- ],
2135
- flags: [],
2136
- hasParams: false,
2137
- paramsAllOptional: true,
2138
- bodyOpaque: false,
2139
- bodyVariants: [],
2140
- acceptsBody: false,
2141
- requiresAuth: true,
2142
- },
2143
- {
2144
- commandPath: ['calendar-connection', 'list'],
2145
- clientProperty: 'calendarConnection',
2146
- methodName: 'list',
2147
- httpMethod: 'get',
2148
- httpPath: '/v1/calendar-connection',
2149
- summary: 'List calendar connections',
2150
- description: 'Returns every calendar connection in the authenticated project, by label. A project has a handful of these, so the list is not paginated: `pagination.hasMore` is always false.',
2151
- positionals: [],
2152
- flags: [
2153
- {
2154
- name: 'provider',
2155
- path: ['provider'],
2156
- location: 'query',
2157
- required: false,
2158
- description: 'Who holds the calendar. CAL_COM is the only provider that can be connected today; GOOGLE and CALENDLY are described by `capabilities` but not yet connectable.',
2159
- valueKind: 'string',
2160
- enumValues: ['CAL_COM', 'GOOGLE', 'CALENDLY'],
2161
- repeatable: false,
2162
- },
2163
- ],
2164
- hasParams: true,
2165
- paramsAllOptional: true,
2166
- bodyOpaque: false,
2167
- bodyVariants: [],
2168
- acceptsBody: false,
2169
- requiresAuth: true,
2170
- },
2171
- {
2172
- commandPath: ['calendar-connection', 'target', 'get'],
2173
- clientProperty: 'calendarConnection',
2174
- methodName: 'getTarget',
2175
- httpMethod: 'get',
2176
- httpPath: '/v1/calendar-connection/{connectionId}/targets/{targetId}',
2177
- summary: 'Read one bookable target',
2178
- description: 'The same entry as the list, plus what it demands of a booker. `requiresAttendeeEmail` is the field that decides an agent’s design: the attendee object itself needs only a name and a timezone, but an event type can declare email required, and an agent that cannot collect one simply cannot book on it. Read this when configuring a calendar tool, not after a caller is already waiting. Costs one provider call more than the list, which is why the list does not fold it in.',
2179
- positionals: [
2180
- {
2181
- name: 'connection-id',
2182
- paramKey: 'connectionId',
2183
- description: 'Calendar connection ID',
2184
- },
2185
- {
2186
- name: 'target-id',
2187
- paramKey: 'targetId',
2188
- description: 'Target id, as the list returned it',
2189
- },
2190
- ],
2191
- flags: [],
2192
- hasParams: true,
2193
- paramsAllOptional: false,
2194
- bodyOpaque: false,
2195
- bodyVariants: [],
2196
- acceptsBody: false,
2197
- requiresAuth: true,
2198
- },
2199
- {
2200
- commandPath: ['calendar-connection', 'target', 'list'],
2201
- clientProperty: 'calendarConnection',
2202
- methodName: 'listTargets',
2203
- httpMethod: 'get',
2204
- httpPath: '/v1/calendar-connection/{connectionId}/targets',
2205
- summary: 'List what can be booked on a calendar',
2206
- description: 'What an agent can be pointed at on this connection: Cal.com event types today, Google calendars when that lands. Read live from the provider, so an event type added since you connected is here without reconnecting. Each entry carries a `target` ready to put on a calendar tool, so nothing has to assemble one by hand.',
2207
- positionals: [
2208
- {
2209
- name: 'connection-id',
2210
- paramKey: 'connectionId',
2211
- description: 'Calendar connection ID',
2212
- },
2213
- ],
2214
- flags: [],
2215
- hasParams: false,
2216
- paramsAllOptional: true,
2217
- bodyOpaque: false,
2218
- bodyVariants: [],
2219
- acceptsBody: false,
2220
- requiresAuth: true,
2221
- },
2222
- {
2223
- commandPath: ['calendar-connection', 'update'],
2224
- clientProperty: 'calendarConnection',
2225
- methodName: 'update',
2226
- httpMethod: 'patch',
2227
- httpPath: '/v1/calendar-connection/{connectionId}',
2228
- summary: 'Update a calendar connection',
2229
- description: 'Renames a connection, changes the timezone slots are offered in, or rotates the credential. A rotated credential is verified first, and a verified credential returns the connection to ACTIVE.',
2230
- positionals: [
2231
- {
2232
- name: 'connection-id',
2233
- paramKey: 'connectionId',
2234
- description: 'Calendar connection ID',
2235
- },
2236
- ],
2237
- flags: [
2238
- {
2239
- name: 'label',
2240
- path: ['label'],
2241
- location: 'body',
2242
- required: false,
2243
- description: 'Rename the connection.',
2244
- valueKind: 'string',
2245
- repeatable: false,
2246
- },
2247
- {
2248
- name: 'timezone',
2249
- path: ['timezone'],
2250
- location: 'body',
2251
- required: false,
2252
- description: 'Change the named IANA timezone slots are offered in.',
2253
- valueKind: 'string',
2254
- repeatable: false,
2255
- },
2256
- {
2257
- name: 'api-key',
2258
- path: ['apiKey'],
2259
- location: 'body',
2260
- required: false,
2261
- description: 'Rotate the credential. The new key is verified before it is stored, and a verified key returns the connection to ACTIVE, which is how a connection recovers from INVALID_CREDENTIALS.',
2262
- valueKind: 'string',
2263
- repeatable: false,
2264
- },
2265
- ],
2266
- hasParams: true,
2267
- paramsAllOptional: true,
2268
- bodyOpaque: false,
2269
- bodyVariants: [],
2270
- acceptsBody: true,
2271
- requiresAuth: true,
2272
- },
2273
- {
2274
- commandPath: ['call', 'batch', 'delete'],
2275
- clientProperty: 'call',
2276
- methodName: 'batchDelete',
2277
- httpMethod: 'post',
2278
- httpPath: '/v1/call/batch-delete',
2279
- summary: 'Delete calls in batch',
2280
- description: 'Deletes up to 100 calls by ID in one request. Each deleted call, its metrics and its analysis are hidden from every read, and any analysis still running on it is cancelled. IDs that do not exist in this project, or were already deleted, are returned in notFoundCallIds and left untouched. The request succeeds even when none of the calls are found. IDs are returned lowercase, each once.',
2281
- positionals: [],
2282
- flags: [
2283
- {
2284
- name: 'call-ids',
2285
- path: ['callIds'],
2286
- location: 'body',
2287
- required: true,
2288
- description: 'IDs of the calls to delete, at most 100. Repeated IDs are counted once.',
2289
- valueKind: 'array',
2290
- repeatable: true,
2291
- },
2292
- ],
2293
- hasParams: true,
2294
- paramsAllOptional: false,
2295
- bodyOpaque: false,
2296
- bodyVariants: [],
2297
- acceptsBody: true,
2298
- requiresAuth: true,
2299
- },
2300
- {
2301
- commandPath: ['call', 'cost', 'get'],
2302
- clientProperty: 'call',
2303
- methodName: 'getCost',
2304
- httpMethod: 'get',
2305
- httpPath: '/v1/call/{callId}/cost',
2306
- summary: 'Get call cost',
2307
- description: 'The billable spend attributed to one call, split by cost type, with every cost line behind it. Simulated calls include the costs their simulation incurred before the call connected. Amounts are billable spend only, in exact micro-dollars (`*UsdMicros`) and dollars (`*Usd`, for display). Requires an API key with the `billing:read` permission.',
2308
- positionals: [
2309
- {
2310
- name: 'call-id',
2311
- paramKey: 'callId',
2312
- },
2313
- ],
2314
- flags: [],
2315
- hasParams: false,
2316
- paramsAllOptional: true,
2317
- bodyOpaque: false,
2318
- bodyVariants: [],
2319
- acceptsBody: false,
2320
- requiresAuth: true,
2321
- },
2322
- {
2323
- commandPath: ['call', 'create'],
2324
- clientProperty: 'call',
2325
- methodName: 'create',
2326
- httpMethod: 'post',
2327
- httpPath: '/v1/call',
2328
- summary: 'Create a call',
2329
- description: 'Create a new call with recording, transcript, agents, and customers',
2330
- positionals: [],
2331
- flags: [
2332
- {
2333
- name: 'recording-url',
2334
- path: ['recordingUrl'],
2335
- location: 'body',
2336
- required: true,
2337
- description: 'URL of source recording (must be an accessible WAV, MP3, MP4, or OGG file). Can be a signed URL.',
2338
- valueKind: 'string',
2339
- repeatable: false,
2340
- },
2341
- {
2342
- name: 'stereo-recording-url',
2343
- path: ['stereoRecordingUrl'],
2344
- location: 'body',
2345
- required: false,
2346
- description: 'URL of source stereo recording. Must be accessible. Can be a signed URL. Supported formats: WAV, MP3, MP4, OGG.',
2347
- valueKind: 'string',
2348
- repeatable: false,
2349
- },
2350
- {
2351
- name: 'started-at',
2352
- path: ['startedAt'],
2353
- location: 'body',
2354
- required: true,
2355
- description: 'When the call started (ISO 8601 format)',
2356
- valueKind: 'string',
2357
- repeatable: false,
2358
- },
2359
- {
2360
- name: 'interface-type',
2361
- path: ['interfaceType'],
2362
- location: 'body',
2363
- required: true,
2364
- description: 'Interface type of the call (PHONE or WEB)',
2365
- valueKind: 'string',
2366
- enumValues: ['PHONE', 'WEB'],
2367
- repeatable: false,
2368
- },
2369
- {
2370
- name: 'call-direction',
2371
- path: ['callDirection'],
2372
- location: 'body',
2373
- required: true,
2374
- description: 'Direction of the call (INBOUND or OUTBOUND)',
2375
- valueKind: 'string',
2376
- enumValues: ['INBOUND', 'OUTBOUND'],
2377
- repeatable: false,
2303
+ name: 'call-direction',
2304
+ path: ['callDirection'],
2305
+ location: 'body',
2306
+ required: true,
2307
+ description: 'Direction of the call (INBOUND or OUTBOUND)',
2308
+ valueKind: 'string',
2309
+ enumValues: ['INBOUND', 'OUTBOUND'],
2310
+ repeatable: false,
2378
2311
  },
2379
2312
  {
2380
2313
  name: 'ended-status',
@@ -2576,7 +2509,7 @@ exports.COMMANDS = [
2576
2509
  methodName: 'getByID',
2577
2510
  httpMethod: 'get',
2578
2511
  httpPath: '/v1/call/{callId}',
2579
- summary: 'Get a call by ID',
2512
+ summary: 'Get a call',
2580
2513
  description: 'Retrieve an existing call by its unique identifier',
2581
2514
  positionals: [
2582
2515
  {
@@ -2980,87 +2913,1767 @@ exports.COMMANDS = [
2980
2913
  requiresAuth: true,
2981
2914
  },
2982
2915
  {
2983
- commandPath: ['credential', 'create'],
2984
- clientProperty: 'me',
2985
- methodName: 'createAPIKey',
2916
+ commandPath: ['connections', 'agent', 'backfill', 'cancel'],
2917
+ clientProperty: 'agentConnection',
2918
+ methodName: 'cancelBackfill',
2986
2919
  httpMethod: 'post',
2987
- httpPath: '/v1/me/api-keys',
2988
- summary: 'Create a personal credential',
2989
- description: 'Mints a credential that acts as you, for a CLI or an automation. The key value is returned exactly once, in the `key` field: capture it now, it is unreadable afterwards. Requires a personal credential (a project API key is refused) and admin on the project the credential defaults to. The new credential can never exceed the one that created it: not in scope, not in permissions, and not in lifetime. Omit a field to copy it from the calling credential.',
2990
- positionals: [],
2991
- flags: [
2920
+ httpPath: '/v1/connections/agent/{connectionId}/backfills/{backfillId}/cancel',
2921
+ summary: 'Cancel a backfill',
2922
+ description: 'Stops a running backfill. Calls it already imported stay.',
2923
+ positionals: [
2992
2924
  {
2993
- name: 'name',
2994
- path: ['name'],
2995
- location: 'body',
2996
- required: true,
2997
- description: 'A label you will recognise later. It is the only thing that tells two credentials apart in the list you revoke from.',
2998
- valueKind: 'string',
2999
- repeatable: false,
2925
+ name: 'connection-id',
2926
+ paramKey: 'connectionId',
3000
2927
  },
3001
2928
  {
3002
- name: 'project-id',
3003
- path: ['projectId'],
3004
- location: 'body',
3005
- required: false,
3006
- description: "Project the credential assumes when a request sends no X-Roark-Project-Id header. Defaults to the calling credential's own default project. You must be an admin of whichever project is used.",
3007
- valueKind: 'string',
3008
- repeatable: false,
2929
+ name: 'backfill-id',
2930
+ paramKey: 'backfillId',
3009
2931
  },
2932
+ ],
2933
+ flags: [],
2934
+ hasParams: true,
2935
+ paramsAllOptional: false,
2936
+ bodyOpaque: false,
2937
+ bodyVariants: [],
2938
+ acceptsBody: false,
2939
+ requiresAuth: true,
2940
+ },
2941
+ {
2942
+ commandPath: ['connections', 'agent', 'backfill', 'create'],
2943
+ clientProperty: 'agentConnection',
2944
+ methodName: 'createBackfill',
2945
+ httpMethod: 'post',
2946
+ httpPath: '/v1/connections/agent/{connectionId}/backfills',
2947
+ summary: 'Import past calls',
2948
+ description: 'Starts a backfill that imports up to `maxCalls` of the most recent past calls from a Retell, Vapi, ElevenLabs or Leaping connection. Other platforms return 400.',
2949
+ positionals: [
2950
+ {
2951
+ name: 'connection-id',
2952
+ paramKey: 'connectionId',
2953
+ },
2954
+ ],
2955
+ flags: [
2956
+ {
2957
+ name: 'max-calls',
2958
+ path: ['maxCalls'],
2959
+ location: 'body',
2960
+ required: true,
2961
+ description: 'How many of the most recent past calls to import, up to 1000.',
2962
+ valueKind: 'integer',
2963
+ repeatable: false,
2964
+ },
2965
+ ],
2966
+ hasParams: true,
2967
+ paramsAllOptional: false,
2968
+ bodyOpaque: false,
2969
+ bodyVariants: [],
2970
+ acceptsBody: true,
2971
+ requiresAuth: true,
2972
+ },
2973
+ {
2974
+ commandPath: ['connections', 'agent', 'backfill', 'list'],
2975
+ clientProperty: 'agentConnection',
2976
+ methodName: 'listBackfills',
2977
+ httpMethod: 'get',
2978
+ httpPath: '/v1/connections/agent/{connectionId}/backfills',
2979
+ summary: 'List backfills',
2980
+ description: "A connection's imports of past calls, newest first.",
2981
+ positionals: [
2982
+ {
2983
+ name: 'connection-id',
2984
+ paramKey: 'connectionId',
2985
+ },
2986
+ ],
2987
+ flags: [],
2988
+ hasParams: false,
2989
+ paramsAllOptional: true,
2990
+ bodyOpaque: false,
2991
+ bodyVariants: [],
2992
+ acceptsBody: false,
2993
+ requiresAuth: true,
2994
+ },
2995
+ {
2996
+ commandPath: ['connections', 'agent', 'create'],
2997
+ clientProperty: 'agentConnection',
2998
+ methodName: 'create',
2999
+ httpMethod: 'post',
3000
+ httpPath: '/v1/connections/agent',
3001
+ summary: 'Connect an agent',
3002
+ description: 'Connects the platform a project’s agents run on. The body is shaped by `provider`; `GET /v1/connections/agent/providers` lists what each needs. Retell, Vapi, ElevenLabs and Bland keys are checked by listing agents first, so a refused key returns 400 and nothing is stored. Platforms that pull agents start syncing straight away. For LIVEKIT_SELF_HOSTED and the Pipecat providers, the response carries `observerApiKey`, shown once, for your SDK to report calls with. Most platforms connect once per project, and a second create returns 409; LiveKit Cloud may connect several accounts.',
3003
+ positionals: [],
3004
+ flags: [],
3005
+ hasParams: true,
3006
+ paramsAllOptional: false,
3007
+ bodyOpaque: true,
3008
+ bodyVariants: [
3009
+ {
3010
+ name: 'AgentConnectionCreateRetell',
3011
+ required: ['provider', 'name', 'apiKey'],
3012
+ },
3013
+ {
3014
+ name: 'AgentConnectionCreateVapi',
3015
+ required: ['provider', 'name', 'apiKey'],
3016
+ },
3017
+ {
3018
+ name: 'AgentConnectionCreateElevenLabs',
3019
+ required: ['provider', 'name', 'apiKey'],
3020
+ },
3021
+ {
3022
+ name: 'AgentConnectionCreateBland',
3023
+ required: ['provider', 'name', 'apiKey'],
3024
+ },
3025
+ {
3026
+ name: 'AgentConnectionCreateLeaping',
3027
+ required: ['provider', 'name', 'apiKey', 'agentIds'],
3028
+ },
3029
+ {
3030
+ name: 'AgentConnectionCreateLivekit',
3031
+ required: ['provider', 'name', 'url', 'apiKey', 'apiSecret'],
3032
+ },
3033
+ {
3034
+ name: 'AgentConnectionCreateLivekitSelfHosted',
3035
+ required: ['provider', 'name'],
3036
+ },
3037
+ {
3038
+ name: 'AgentConnectionCreatePipecatSelfHosted',
3039
+ required: ['provider', 'name'],
3040
+ },
3041
+ {
3042
+ name: 'AgentConnectionCreatePipecatCloud',
3043
+ required: ['provider', 'name'],
3044
+ },
3045
+ {
3046
+ name: 'AgentConnectionCreateKore',
3047
+ required: ['provider', 'name', 'apiKey', 'appId', 'envName'],
3048
+ },
3049
+ {
3050
+ name: 'AgentConnectionCreateGoogleCes',
3051
+ required: ['provider', 'name', 'wifConfig', 'location', 'appId', 'deploymentId'],
3052
+ },
3053
+ ],
3054
+ acceptsBody: true,
3055
+ requiresAuth: true,
3056
+ },
3057
+ {
3058
+ commandPath: ['connections', 'agent', 'delete'],
3059
+ clientProperty: 'agentConnection',
3060
+ methodName: 'delete',
3061
+ httpMethod: 'delete',
3062
+ httpPath: '/v1/connections/agent/{connectionId}',
3063
+ summary: 'Disconnect an agent connection',
3064
+ description: 'Deletes the connection and its stored credential, and stops syncing. Agents and calls it already brought in stay in the project. Alerts that notify through it stop notifying.',
3065
+ positionals: [
3066
+ {
3067
+ name: 'connection-id',
3068
+ paramKey: 'connectionId',
3069
+ },
3070
+ ],
3071
+ flags: [],
3072
+ hasParams: false,
3073
+ paramsAllOptional: true,
3074
+ bodyOpaque: false,
3075
+ bodyVariants: [],
3076
+ acceptsBody: false,
3077
+ requiresAuth: true,
3078
+ },
3079
+ {
3080
+ commandPath: ['connections', 'agent', 'discover'],
3081
+ clientProperty: 'agentConnection',
3082
+ methodName: 'discover',
3083
+ httpMethod: 'post',
3084
+ httpPath: '/v1/connections/agent/discover',
3085
+ summary: 'Discover agents with a platform API key',
3086
+ description: 'Lists the agents a Retell, Vapi, ElevenLabs or Bland API key can see, without storing anything. Use it to check a key and to pick `agentIds` before connecting. A key the platform refuses returns 400.',
3087
+ positionals: [],
3088
+ flags: [
3089
+ {
3090
+ name: 'provider',
3091
+ path: ['provider'],
3092
+ location: 'body',
3093
+ required: true,
3094
+ description: 'Platforms whose agents can be listed with a key.',
3095
+ valueKind: 'string',
3096
+ enumValues: ['RETELL', 'VAPI', 'ELEVEN_LABS', 'BLAND'],
3097
+ repeatable: false,
3098
+ },
3099
+ {
3100
+ name: 'api-key',
3101
+ path: ['apiKey'],
3102
+ location: 'body',
3103
+ required: true,
3104
+ description: 'The platform API key to list agents with. Stored nowhere.',
3105
+ valueKind: 'string',
3106
+ repeatable: false,
3107
+ },
3108
+ ],
3109
+ hasParams: true,
3110
+ paramsAllOptional: false,
3111
+ bodyOpaque: false,
3112
+ bodyVariants: [],
3113
+ acceptsBody: true,
3114
+ requiresAuth: true,
3115
+ },
3116
+ {
3117
+ commandPath: ['connections', 'agent', 'get'],
3118
+ clientProperty: 'agentConnection',
3119
+ methodName: 'getByID',
3120
+ httpMethod: 'get',
3121
+ httpPath: '/v1/connections/agent/{connectionId}',
3122
+ summary: 'Get an agent connection',
3123
+ description: 'One connection, with its settings and latest sync. Credentials are never returned.',
3124
+ positionals: [
3125
+ {
3126
+ name: 'connection-id',
3127
+ paramKey: 'connectionId',
3128
+ },
3129
+ ],
3130
+ flags: [],
3131
+ hasParams: false,
3132
+ paramsAllOptional: true,
3133
+ bodyOpaque: false,
3134
+ bodyVariants: [],
3135
+ acceptsBody: false,
3136
+ requiresAuth: true,
3137
+ },
3138
+ {
3139
+ commandPath: ['connections', 'agent', 'list'],
3140
+ clientProperty: 'agentConnection',
3141
+ methodName: 'list',
3142
+ httpMethod: 'get',
3143
+ httpPath: '/v1/connections/agent',
3144
+ summary: 'List agent connections',
3145
+ description: "The project's connections to the platforms its agents run on (Retell, Vapi, LiveKit, Pipecat and others), each with its settings and latest sync. Credentials are never returned.",
3146
+ positionals: [],
3147
+ flags: [
3148
+ {
3149
+ name: 'provider',
3150
+ path: ['provider'],
3151
+ location: 'query',
3152
+ required: false,
3153
+ description: 'The platform the agents run on. LIVEKIT is LiveKit Cloud; LIVEKIT_SELF_HOSTED is the LiveKit Agents SDK reporting through the Roark plugin. PIPECAT_CLOUD_INTEGRATION and PIPECAT_SELF_HOSTED_INTEGRATION are Pipecat Cloud and a self-hosted Pipecat bot. `GET /v1/connections/agent/providers` describes what each one needs.',
3154
+ valueKind: 'string',
3155
+ enumValues: [
3156
+ 'RETELL',
3157
+ 'VAPI',
3158
+ 'ELEVEN_LABS',
3159
+ 'BLAND',
3160
+ 'LEAPING',
3161
+ 'LIVEKIT',
3162
+ 'LIVEKIT_SELF_HOSTED',
3163
+ 'PIPECAT_CLOUD_INTEGRATION',
3164
+ 'PIPECAT_SELF_HOSTED_INTEGRATION',
3165
+ 'KORE',
3166
+ 'GOOGLE_CES',
3167
+ ],
3168
+ repeatable: false,
3169
+ },
3170
+ ],
3171
+ hasParams: true,
3172
+ paramsAllOptional: true,
3173
+ bodyOpaque: false,
3174
+ bodyVariants: [],
3175
+ acceptsBody: false,
3176
+ requiresAuth: true,
3177
+ },
3178
+ {
3179
+ commandPath: ['connections', 'agent', 'provider', 'list'],
3180
+ clientProperty: 'agentConnection',
3181
+ methodName: 'listProviders',
3182
+ httpMethod: 'get',
3183
+ httpPath: '/v1/connections/agent/providers',
3184
+ summary: 'List agent connection providers',
3185
+ description: 'Every platform a project can connect, with the fields its create body needs, how its calls reach Roark, and which settings apply. Read this before connecting one.',
3186
+ positionals: [],
3187
+ flags: [],
3188
+ hasParams: false,
3189
+ paramsAllOptional: true,
3190
+ bodyOpaque: false,
3191
+ bodyVariants: [],
3192
+ acceptsBody: false,
3193
+ requiresAuth: true,
3194
+ },
3195
+ {
3196
+ commandPath: ['connections', 'agent', 'update'],
3197
+ clientProperty: 'agentConnection',
3198
+ methodName: 'update',
3199
+ httpMethod: 'patch',
3200
+ httpPath: '/v1/connections/agent/{connectionId}',
3201
+ summary: 'Update an agent connection',
3202
+ description: 'Changes a connection’s settings or rotates its credential. Send `provider` (it must match the connection’s) and only the fields to change; the rest keep their stored values. A new Retell, Vapi, ElevenLabs or Bland key is checked by listing agents first. Set `status` to INACTIVE to pause syncing without deleting anything.',
3203
+ positionals: [
3204
+ {
3205
+ name: 'connection-id',
3206
+ paramKey: 'connectionId',
3207
+ },
3208
+ ],
3209
+ flags: [],
3210
+ hasParams: true,
3211
+ paramsAllOptional: false,
3212
+ bodyOpaque: true,
3213
+ bodyVariants: [
3214
+ {
3215
+ name: 'AgentConnectionUpdateRetell',
3216
+ required: ['provider'],
3217
+ },
3218
+ {
3219
+ name: 'AgentConnectionUpdateVapi',
3220
+ required: ['provider'],
3221
+ },
3222
+ {
3223
+ name: 'AgentConnectionUpdateElevenLabs',
3224
+ required: ['provider'],
3225
+ },
3226
+ {
3227
+ name: 'AgentConnectionUpdateBland',
3228
+ required: ['provider'],
3229
+ },
3230
+ {
3231
+ name: 'AgentConnectionUpdateLeaping',
3232
+ required: ['provider'],
3233
+ },
3234
+ {
3235
+ name: 'AgentConnectionUpdateLivekit',
3236
+ required: ['provider'],
3237
+ },
3238
+ {
3239
+ name: 'AgentConnectionUpdateLivekitSelfHosted',
3240
+ required: ['provider'],
3241
+ },
3242
+ {
3243
+ name: 'AgentConnectionUpdatePipecatSelfHosted',
3244
+ required: ['provider'],
3245
+ },
3246
+ {
3247
+ name: 'AgentConnectionUpdatePipecatCloud',
3248
+ required: ['provider'],
3249
+ },
3250
+ {
3251
+ name: 'AgentConnectionUpdateKore',
3252
+ required: ['provider'],
3253
+ },
3254
+ {
3255
+ name: 'AgentConnectionUpdateGoogleCes',
3256
+ required: ['provider'],
3257
+ },
3258
+ ],
3259
+ acceptsBody: true,
3260
+ requiresAuth: true,
3261
+ },
3262
+ {
3263
+ commandPath: ['connections', 'calendar', 'calendar', 'list'],
3264
+ clientProperty: 'calendarConnection',
3265
+ methodName: 'listCalendars',
3266
+ httpMethod: 'get',
3267
+ httpPath: '/v1/connections/calendar/{connectionId}/calendars',
3268
+ summary: 'List calendars for bookable targets',
3269
+ description: 'Only for a connection whose `capabilities.roarkOwnsBookingPolicy` is true: on a scheduling system the bookable things already exist and `GET /targets` returns them. Calendars the account can only read are left out rather than listed and refused: one would answer availability perfectly well and then fail the booking, mid-call, with a caller on the line.',
3270
+ positionals: [
3271
+ {
3272
+ name: 'connection-id',
3273
+ paramKey: 'connectionId',
3274
+ description: 'Calendar connection ID',
3275
+ },
3276
+ ],
3277
+ flags: [],
3278
+ hasParams: false,
3279
+ paramsAllOptional: true,
3280
+ bodyOpaque: false,
3281
+ bodyVariants: [],
3282
+ acceptsBody: false,
3283
+ requiresAuth: true,
3284
+ },
3285
+ {
3286
+ commandPath: ['connections', 'calendar', 'calendly-oauth', 'start'],
3287
+ clientProperty: 'calendarConnection',
3288
+ methodName: 'startCalendlyOauth',
3289
+ httpMethod: 'post',
3290
+ httpPath: '/v1/connections/calendar/calendly/authorize-url',
3291
+ summary: 'Start connecting a Calendly account',
3292
+ description: 'Returns a URL to open in a browser. Calendly has no credential a request body can carry, so connecting one is two steps: ask for this URL, let the customer consent, and Roark finishes the rest server-side (it exchanges the code, verifies the credential, reads the account’s own timezone when none was given, and stores the connection). Nothing is created until the customer consents, and a link that is not used expires. Read the result with `GET /v1/connections/calendar?provider=CALENDLY`.',
3293
+ positionals: [],
3294
+ flags: [
3295
+ {
3296
+ name: 'calendar-connection-id',
3297
+ path: ['calendarConnectionId'],
3298
+ location: 'body',
3299
+ required: false,
3300
+ description: 'Reconnect an existing connection instead of creating one: the consent screen replaces that connection’s credential in place, so every tool bound to it keeps working. Use this when a connection reports `INVALID_CREDENTIALS`. The connection’s existing name and timezone are kept, so `label` is ignored when this is set.',
3301
+ valueKind: 'string',
3302
+ repeatable: false,
3303
+ },
3304
+ {
3305
+ name: 'label',
3306
+ path: ['label'],
3307
+ location: 'body',
3308
+ required: false,
3309
+ description: 'Customer-facing name for the connection, unique within the project. Required unless `calendarConnectionId` is set, and decided now because the consent screen has nowhere to carry it.',
3310
+ valueKind: 'string',
3311
+ repeatable: false,
3312
+ },
3313
+ {
3314
+ name: 'timezone',
3315
+ path: ['timezone'],
3316
+ location: 'body',
3317
+ required: false,
3318
+ description: 'The named IANA timezone to offer slots in, for example `America/Los_Angeles`. Omit to adopt the Calendly account’s own. A fixed offset such as `-08:00` is rejected: it does not observe DST.',
3319
+ valueKind: 'string',
3320
+ repeatable: false,
3321
+ },
3322
+ ],
3323
+ hasParams: true,
3324
+ paramsAllOptional: true,
3325
+ bodyOpaque: false,
3326
+ bodyVariants: [],
3327
+ acceptsBody: true,
3328
+ requiresAuth: true,
3329
+ },
3330
+ {
3331
+ commandPath: ['connections', 'calendar', 'check'],
3332
+ clientProperty: 'calendarConnection',
3333
+ methodName: 'check',
3334
+ httpMethod: 'post',
3335
+ httpPath: '/v1/connections/calendar/{connectionId}/check',
3336
+ summary: 'Check a calendar connection',
3337
+ description: 'Re-verifies the stored credential against the provider and records the result on the connection. A credential the provider rejects sets `status` to INVALID_CREDENTIALS. A provider outage is a 500 and leaves the status untouched: being unable to reach the provider is not evidence that the customer’s credential is bad.',
3338
+ positionals: [
3339
+ {
3340
+ name: 'connection-id',
3341
+ paramKey: 'connectionId',
3342
+ description: 'Calendar connection ID',
3343
+ },
3344
+ ],
3345
+ flags: [],
3346
+ hasParams: false,
3347
+ paramsAllOptional: true,
3348
+ bodyOpaque: false,
3349
+ bodyVariants: [],
3350
+ acceptsBody: false,
3351
+ requiresAuth: true,
3352
+ },
3353
+ {
3354
+ commandPath: ['connections', 'calendar', 'create'],
3355
+ clientProperty: 'calendarConnection',
3356
+ methodName: 'create',
3357
+ httpMethod: 'post',
3358
+ httpPath: '/v1/connections/calendar',
3359
+ summary: 'Connect a calendar account',
3360
+ description: 'Verifies the credential against the provider and, only if it works, stores it encrypted. A credential the provider rejects is a 400 and no connection is created: a connection that has never worked would next be exercised by an inbound call at 2am, with nobody there to fix it.',
3361
+ positionals: [],
3362
+ flags: [
3363
+ {
3364
+ name: 'provider',
3365
+ path: ['provider'],
3366
+ location: 'body',
3367
+ required: true,
3368
+ description: 'Who holds the calendar. CAL_COM is connected with an API key; GOOGLE and CALENDLY are connected by consent, through `POST /v1/connections/calendar/google/authorize-url` and `POST /v1/connections/calendar/calendly/authorize-url`.',
3369
+ valueKind: 'string',
3370
+ enumValues: ['CAL_COM', 'GOOGLE', 'CALENDLY'],
3371
+ repeatable: false,
3372
+ },
3373
+ {
3374
+ name: 'label',
3375
+ path: ['label'],
3376
+ location: 'body',
3377
+ required: true,
3378
+ description: 'Customer-facing name for this account, unique within the project. Required.',
3379
+ valueKind: 'string',
3380
+ repeatable: false,
3381
+ },
3382
+ {
3383
+ name: 'api-key',
3384
+ path: ['apiKey'],
3385
+ location: 'body',
3386
+ required: true,
3387
+ description: 'The provider account’s API key. For CAL_COM, a Cal.com API key (starts with `cal_`). It is verified against the provider before anything is stored, so an invalid key is a 400 and no connection is created. Stored encrypted and never returned.',
3388
+ valueKind: 'string',
3389
+ repeatable: false,
3390
+ },
3391
+ {
3392
+ name: 'timezone',
3393
+ path: ['timezone'],
3394
+ location: 'body',
3395
+ required: false,
3396
+ description: 'The named IANA timezone to offer slots in, for example `America/Los_Angeles`. Omit to adopt the provider account’s own timezone. A fixed offset such as `-08:00` is rejected: it does not observe DST.',
3397
+ valueKind: 'string',
3398
+ repeatable: false,
3399
+ },
3400
+ ],
3401
+ hasParams: true,
3402
+ paramsAllOptional: false,
3403
+ bodyOpaque: false,
3404
+ bodyVariants: [],
3405
+ acceptsBody: true,
3406
+ requiresAuth: true,
3407
+ },
3408
+ {
3409
+ commandPath: ['connections', 'calendar', 'delete'],
3410
+ clientProperty: 'calendarConnection',
3411
+ methodName: 'delete',
3412
+ httpMethod: 'delete',
3413
+ httpPath: '/v1/connections/calendar/{connectionId}',
3414
+ summary: 'Delete a calendar connection',
3415
+ description: 'Disconnects the calendar and destroys the stored credential. A credential the customer deleted should stop existing, so this is not an archive. Appointments already recorded against the connection are kept, so a booking stays explainable after the calendar is disconnected. Refused with a 409 while a calendar tool is still bound to the connection, naming the tools: point them at another calendar, or delete them, first. A dangling binding would otherwise be found by whoever next tried to ship the agent, who is not the person who disconnected the calendar.',
3416
+ positionals: [
3417
+ {
3418
+ name: 'connection-id',
3419
+ paramKey: 'connectionId',
3420
+ description: 'Calendar connection ID',
3421
+ },
3422
+ ],
3423
+ flags: [],
3424
+ hasParams: false,
3425
+ paramsAllOptional: true,
3426
+ bodyOpaque: false,
3427
+ bodyVariants: [],
3428
+ acceptsBody: false,
3429
+ requiresAuth: true,
3430
+ },
3431
+ {
3432
+ commandPath: ['connections', 'calendar', 'get'],
3433
+ clientProperty: 'calendarConnection',
3434
+ methodName: 'getByID',
3435
+ httpMethod: 'get',
3436
+ httpPath: '/v1/connections/calendar/{connectionId}',
3437
+ summary: 'Get a calendar connection',
3438
+ description: 'Returns one calendar connection. The stored credential is never included.',
3439
+ positionals: [
3440
+ {
3441
+ name: 'connection-id',
3442
+ paramKey: 'connectionId',
3443
+ description: 'Calendar connection ID',
3444
+ },
3445
+ ],
3446
+ flags: [],
3447
+ hasParams: false,
3448
+ paramsAllOptional: true,
3449
+ bodyOpaque: false,
3450
+ bodyVariants: [],
3451
+ acceptsBody: false,
3452
+ requiresAuth: true,
3453
+ },
3454
+ {
3455
+ commandPath: ['connections', 'calendar', 'google-oauth', 'start'],
3456
+ clientProperty: 'calendarConnection',
3457
+ methodName: 'startGoogleOauth',
3458
+ httpMethod: 'post',
3459
+ httpPath: '/v1/connections/calendar/google/authorize-url',
3460
+ summary: 'Start connecting a Google Calendar',
3461
+ description: 'Returns a URL to open in a browser. Google has no credential a request body can carry, so connecting one is two steps: ask for this URL, let the customer consent, and Roark finishes the rest server-side (it exchanges the code, verifies that both calendar permissions were granted, reads the account’s own timezone when none was given, and stores the connection). Nothing is created until the customer consents, and a link that is not used expires. Read the result with `GET /v1/connections/calendar?provider=GOOGLE`.',
3462
+ positionals: [],
3463
+ flags: [
3464
+ {
3465
+ name: 'calendar-connection-id',
3466
+ path: ['calendarConnectionId'],
3467
+ location: 'body',
3468
+ required: false,
3469
+ description: 'Reconnect an existing connection instead of creating one: the consent screen replaces that connection’s credential in place, so every tool bound to it keeps working. Use this when a connection reports `INVALID_CREDENTIALS`. The connection’s existing name and timezone are kept, so `label` is ignored when this is set.',
3470
+ valueKind: 'string',
3471
+ repeatable: false,
3472
+ },
3473
+ {
3474
+ name: 'label',
3475
+ path: ['label'],
3476
+ location: 'body',
3477
+ required: false,
3478
+ description: 'Customer-facing name for the connection, unique within the project. Required unless `calendarConnectionId` is set, and decided now because the consent screen has nowhere to carry it.',
3479
+ valueKind: 'string',
3480
+ repeatable: false,
3481
+ },
3482
+ {
3483
+ name: 'timezone',
3484
+ path: ['timezone'],
3485
+ location: 'body',
3486
+ required: false,
3487
+ description: 'The named IANA timezone to offer slots in, for example `America/Los_Angeles`. Omit to adopt the Google account’s own. A fixed offset such as `-08:00` is rejected: it does not observe DST.',
3488
+ valueKind: 'string',
3489
+ repeatable: false,
3490
+ },
3491
+ {
3492
+ name: 'login-hint',
3493
+ path: ['loginHint'],
3494
+ location: 'body',
3495
+ required: false,
3496
+ description: 'The Google account to preselect on the consent screen. A hint only: it is ignored if the user is signed into another account, and nothing is authorized by it.',
3497
+ valueKind: 'string',
3498
+ repeatable: false,
3499
+ },
3500
+ ],
3501
+ hasParams: true,
3502
+ paramsAllOptional: true,
3503
+ bodyOpaque: false,
3504
+ bodyVariants: [],
3505
+ acceptsBody: true,
3506
+ requiresAuth: true,
3507
+ },
3508
+ {
3509
+ commandPath: ['connections', 'calendar', 'list'],
3510
+ clientProperty: 'calendarConnection',
3511
+ methodName: 'list',
3512
+ httpMethod: 'get',
3513
+ httpPath: '/v1/connections/calendar',
3514
+ summary: 'List calendar connections',
3515
+ description: 'Returns every calendar connection in the authenticated project, by label. A project has a handful of these, so the list is not paginated: `pagination.hasMore` is always false.',
3516
+ positionals: [],
3517
+ flags: [
3518
+ {
3519
+ name: 'provider',
3520
+ path: ['provider'],
3521
+ location: 'query',
3522
+ required: false,
3523
+ description: 'Who holds the calendar. CAL_COM is connected with an API key; GOOGLE and CALENDLY are connected by consent, through `POST /v1/connections/calendar/google/authorize-url` and `POST /v1/connections/calendar/calendly/authorize-url`.',
3524
+ valueKind: 'string',
3525
+ enumValues: ['CAL_COM', 'GOOGLE', 'CALENDLY'],
3526
+ repeatable: false,
3527
+ },
3528
+ ],
3529
+ hasParams: true,
3530
+ paramsAllOptional: true,
3531
+ bodyOpaque: false,
3532
+ bodyVariants: [],
3533
+ acceptsBody: false,
3534
+ requiresAuth: true,
3535
+ },
3536
+ {
3537
+ commandPath: ['connections', 'calendar', 'target', 'create'],
3538
+ clientProperty: 'calendarConnection',
3539
+ methodName: 'createTarget',
3540
+ httpMethod: 'post',
3541
+ httpPath: '/v1/connections/calendar/{connectionId}/targets',
3542
+ summary: 'Create a bookable target',
3543
+ description: 'Only for a connection whose `capabilities.roarkOwnsBookingPolicy` is true. A calendar with no scheduling of its own has nothing an agent can be pointed at, so the thing a calendar tool books into is created here: the calendar, how long an appointment runs, and the hours it is offered in. The policy and the hours are written together, because a target with no hours offers nothing. Refused if the calendar is one the account can only read.',
3544
+ positionals: [
3545
+ {
3546
+ name: 'connection-id',
3547
+ paramKey: 'connectionId',
3548
+ description: 'Calendar connection ID',
3549
+ },
3550
+ ],
3551
+ flags: [
3552
+ {
3553
+ name: 'name',
3554
+ path: ['name'],
3555
+ location: 'body',
3556
+ required: true,
3557
+ description: 'Unique within the connection, and how a config file refers to this target. Letters, digits, spaces, _ or -.',
3558
+ valueKind: 'string',
3559
+ repeatable: false,
3560
+ },
3561
+ {
3562
+ name: 'calendar-id',
3563
+ path: ['calendarId'],
3564
+ location: 'body',
3565
+ required: true,
3566
+ description: 'The calendar to write appointments to, from `GET /v1/connections/calendar/{connectionId}/calendars`. `primary` is accepted and stored as the account’s own id.',
3567
+ valueKind: 'string',
3568
+ repeatable: false,
3569
+ },
3570
+ {
3571
+ name: 'duration-minutes',
3572
+ path: ['durationMinutes'],
3573
+ location: 'body',
3574
+ required: true,
3575
+ valueKind: 'integer',
3576
+ repeatable: false,
3577
+ },
3578
+ {
3579
+ name: 'buffer-before-minutes',
3580
+ path: ['bufferBeforeMinutes'],
3581
+ location: 'body',
3582
+ required: false,
3583
+ description: 'Dead time before an appointment, counted as busy when a slot is offered. Defaults to 0.',
3584
+ valueKind: 'integer',
3585
+ repeatable: false,
3586
+ },
3587
+ {
3588
+ name: 'buffer-after-minutes',
3589
+ path: ['bufferAfterMinutes'],
3590
+ location: 'body',
3591
+ required: false,
3592
+ valueKind: 'integer',
3593
+ repeatable: false,
3594
+ },
3595
+ {
3596
+ name: 'min-notice-minutes',
3597
+ path: ['minNoticeMinutes'],
3598
+ location: 'body',
3599
+ required: false,
3600
+ description: 'How soon from now an appointment may be made. Defaults to 120.',
3601
+ valueKind: 'integer',
3602
+ repeatable: false,
3603
+ },
3604
+ {
3605
+ name: 'horizon-days',
3606
+ path: ['horizonDays'],
3607
+ location: 'body',
3608
+ required: false,
3609
+ description: 'How far ahead appointments may be made. Defaults to 30.',
3610
+ valueKind: 'integer',
3611
+ repeatable: false,
3612
+ },
3613
+ {
3614
+ name: 'slot-interval-minutes',
3615
+ path: ['slotIntervalMinutes'],
3616
+ location: 'body',
3617
+ required: false,
3618
+ description: 'The grid slots are offered on. Defaults to the duration, which gives back-to-back appointments.',
3619
+ valueKind: 'integer',
3620
+ repeatable: false,
3621
+ },
3622
+ {
3623
+ name: 'all-day-events-block',
3624
+ path: ['allDayEventsBlock'],
3625
+ location: 'body',
3626
+ required: false,
3627
+ description: 'Whether an all-day event closes the day. Defaults to true, because a calendar marks all-day events free unless their creator says otherwise and a public holiday entered as one would otherwise be bookable.',
3628
+ valueKind: 'boolean',
3629
+ repeatable: false,
3630
+ },
3631
+ {
3632
+ name: 'hours',
3633
+ path: ['hours'],
3634
+ location: 'body',
3635
+ required: false,
3636
+ description: 'The windows of the week appointments are offered in. Omit to adopt Monday to Friday, 09:00 to 17:00. A target with no windows offers nothing at all, which reads to a caller as a permanently full diary.',
3637
+ valueKind: 'array',
3638
+ repeatable: false,
3639
+ },
3640
+ ],
3641
+ hasParams: true,
3642
+ paramsAllOptional: false,
3643
+ bodyOpaque: false,
3644
+ bodyVariants: [],
3645
+ acceptsBody: true,
3646
+ requiresAuth: true,
3647
+ },
3648
+ {
3649
+ commandPath: ['connections', 'calendar', 'target', 'delete'],
3650
+ clientProperty: 'calendarConnection',
3651
+ methodName: 'deleteTarget',
3652
+ httpMethod: 'delete',
3653
+ httpPath: '/v1/connections/calendar/{connectionId}/targets/{targetId}',
3654
+ summary: 'Delete a bookable target',
3655
+ description: 'Refused while a calendar tool still books into it, naming the tools. A dangling binding would otherwise be found by whoever next tried to ship the agent, who is not the person who deleted the target. Appointments already recorded against it are kept.',
3656
+ positionals: [
3657
+ {
3658
+ name: 'connection-id',
3659
+ paramKey: 'connectionId',
3660
+ description: 'Calendar connection ID',
3661
+ },
3662
+ {
3663
+ name: 'target-id',
3664
+ paramKey: 'targetId',
3665
+ description: 'Bookable target ID',
3666
+ },
3667
+ ],
3668
+ flags: [],
3669
+ hasParams: true,
3670
+ paramsAllOptional: false,
3671
+ bodyOpaque: false,
3672
+ bodyVariants: [],
3673
+ acceptsBody: false,
3674
+ requiresAuth: true,
3675
+ },
3676
+ {
3677
+ commandPath: ['connections', 'calendar', 'target', 'get'],
3678
+ clientProperty: 'calendarConnection',
3679
+ methodName: 'getTarget',
3680
+ httpMethod: 'get',
3681
+ httpPath: '/v1/connections/calendar/{connectionId}/targets/{targetId}',
3682
+ summary: 'Get a bookable target',
3683
+ description: 'The same entry as the list, plus what it demands of a booker. `requiresAttendeeEmail` is the field that decides an agent’s design: the attendee object itself needs only a name and a timezone, but an event type can declare email required, and an agent that cannot collect one simply cannot book on it. Read this when configuring a calendar tool, not after a caller is already waiting. Costs one provider call more than the list, which is why the list does not fold it in.',
3684
+ positionals: [
3685
+ {
3686
+ name: 'connection-id',
3687
+ paramKey: 'connectionId',
3688
+ description: 'Calendar connection ID',
3689
+ },
3690
+ {
3691
+ name: 'target-id',
3692
+ paramKey: 'targetId',
3693
+ description: 'Target id, as the list returned it',
3694
+ },
3695
+ ],
3696
+ flags: [],
3697
+ hasParams: true,
3698
+ paramsAllOptional: false,
3699
+ bodyOpaque: false,
3700
+ bodyVariants: [],
3701
+ acceptsBody: false,
3702
+ requiresAuth: true,
3703
+ },
3704
+ {
3705
+ commandPath: ['connections', 'calendar', 'target', 'list'],
3706
+ clientProperty: 'calendarConnection',
3707
+ methodName: 'listTargets',
3708
+ httpMethod: 'get',
3709
+ httpPath: '/v1/connections/calendar/{connectionId}/targets',
3710
+ summary: 'List bookable targets',
3711
+ description: 'What an agent can be pointed at on this connection: Cal.com event types today, Google calendars when that lands. Read live from the provider, so an event type added since you connected is here without reconnecting. Each entry carries a `target` ready to put on a calendar tool, so nothing has to assemble one by hand.',
3712
+ positionals: [
3713
+ {
3714
+ name: 'connection-id',
3715
+ paramKey: 'connectionId',
3716
+ description: 'Calendar connection ID',
3717
+ },
3718
+ ],
3719
+ flags: [],
3720
+ hasParams: false,
3721
+ paramsAllOptional: true,
3722
+ bodyOpaque: false,
3723
+ bodyVariants: [],
3724
+ acceptsBody: false,
3725
+ requiresAuth: true,
3726
+ },
3727
+ {
3728
+ commandPath: ['connections', 'calendar', 'target', 'update'],
3729
+ clientProperty: 'calendarConnection',
3730
+ methodName: 'updateTarget',
3731
+ httpMethod: 'put',
3732
+ httpPath: '/v1/connections/calendar/{connectionId}/targets/{targetId}',
3733
+ summary: 'Update a bookable target',
3734
+ description: 'Changes what agents ALREADY PUBLISHED against this target book, with no new tool version, the same thing editing a Cal.com event type on cal.com does. `hours` replaces the whole week when present, because a rota is described as a week and a partial update of one window has no meaning anybody would expect. The calendar cannot be changed: it is the target’s identity for the booking ledger, so moving it would orphan every appointment made on the old one.',
3735
+ positionals: [
3736
+ {
3737
+ name: 'connection-id',
3738
+ paramKey: 'connectionId',
3739
+ description: 'Calendar connection ID',
3740
+ },
3741
+ {
3742
+ name: 'target-id',
3743
+ paramKey: 'targetId',
3744
+ description: 'Bookable target ID',
3745
+ },
3746
+ ],
3747
+ flags: [
3748
+ {
3749
+ name: 'name',
3750
+ path: ['name'],
3751
+ location: 'body',
3752
+ required: false,
3753
+ description: 'Unique within the connection, and how a config file refers to this target. Letters, digits, spaces, _ or -.',
3754
+ valueKind: 'string',
3755
+ repeatable: false,
3756
+ },
3757
+ {
3758
+ name: 'duration-minutes',
3759
+ path: ['durationMinutes'],
3760
+ location: 'body',
3761
+ required: false,
3762
+ valueKind: 'integer',
3763
+ repeatable: false,
3764
+ },
3765
+ {
3766
+ name: 'buffer-before-minutes',
3767
+ path: ['bufferBeforeMinutes'],
3768
+ location: 'body',
3769
+ required: false,
3770
+ description: 'Dead time before an appointment, counted as busy when a slot is offered. Defaults to 0.',
3771
+ valueKind: 'integer',
3772
+ repeatable: false,
3773
+ },
3774
+ {
3775
+ name: 'buffer-after-minutes',
3776
+ path: ['bufferAfterMinutes'],
3777
+ location: 'body',
3778
+ required: false,
3779
+ valueKind: 'integer',
3780
+ repeatable: false,
3781
+ },
3782
+ {
3783
+ name: 'min-notice-minutes',
3784
+ path: ['minNoticeMinutes'],
3785
+ location: 'body',
3786
+ required: false,
3787
+ description: 'How soon from now an appointment may be made. Defaults to 120.',
3788
+ valueKind: 'integer',
3789
+ repeatable: false,
3790
+ },
3791
+ {
3792
+ name: 'horizon-days',
3793
+ path: ['horizonDays'],
3794
+ location: 'body',
3795
+ required: false,
3796
+ description: 'How far ahead appointments may be made. Defaults to 30.',
3797
+ valueKind: 'integer',
3798
+ repeatable: false,
3799
+ },
3800
+ {
3801
+ name: 'slot-interval-minutes',
3802
+ path: ['slotIntervalMinutes'],
3803
+ location: 'body',
3804
+ required: false,
3805
+ description: 'The grid slots are offered on. Defaults to the duration, which gives back-to-back appointments.',
3806
+ valueKind: 'integer',
3807
+ repeatable: false,
3808
+ },
3809
+ {
3810
+ name: 'all-day-events-block',
3811
+ path: ['allDayEventsBlock'],
3812
+ location: 'body',
3813
+ required: false,
3814
+ description: 'Whether an all-day event closes the day. Defaults to true, because a calendar marks all-day events free unless their creator says otherwise and a public holiday entered as one would otherwise be bookable.',
3815
+ valueKind: 'boolean',
3816
+ repeatable: false,
3817
+ },
3818
+ {
3819
+ name: 'hours',
3820
+ path: ['hours'],
3821
+ location: 'body',
3822
+ required: false,
3823
+ description: 'The windows of the week appointments are offered in. Omit to adopt Monday to Friday, 09:00 to 17:00. A target with no windows offers nothing at all, which reads to a caller as a permanently full diary.',
3824
+ valueKind: 'array',
3825
+ repeatable: false,
3826
+ },
3827
+ ],
3828
+ hasParams: true,
3829
+ paramsAllOptional: false,
3830
+ bodyOpaque: false,
3831
+ bodyVariants: [],
3832
+ acceptsBody: true,
3833
+ requiresAuth: true,
3834
+ },
3835
+ {
3836
+ commandPath: ['connections', 'calendar', 'update'],
3837
+ clientProperty: 'calendarConnection',
3838
+ methodName: 'update',
3839
+ httpMethod: 'patch',
3840
+ httpPath: '/v1/connections/calendar/{connectionId}',
3841
+ summary: 'Update a calendar connection',
3842
+ description: 'Renames a connection, changes the timezone slots are offered in, or rotates the credential. A rotated credential is verified first, and a verified credential returns the connection to ACTIVE.',
3843
+ positionals: [
3844
+ {
3845
+ name: 'connection-id',
3846
+ paramKey: 'connectionId',
3847
+ description: 'Calendar connection ID',
3848
+ },
3849
+ ],
3850
+ flags: [
3851
+ {
3852
+ name: 'label',
3853
+ path: ['label'],
3854
+ location: 'body',
3855
+ required: false,
3856
+ description: 'Rename the connection.',
3857
+ valueKind: 'string',
3858
+ repeatable: false,
3859
+ },
3860
+ {
3861
+ name: 'timezone',
3862
+ path: ['timezone'],
3863
+ location: 'body',
3864
+ required: false,
3865
+ description: 'Change the named IANA timezone slots are offered in.',
3866
+ valueKind: 'string',
3867
+ repeatable: false,
3868
+ },
3869
+ {
3870
+ name: 'api-key',
3871
+ path: ['apiKey'],
3872
+ location: 'body',
3873
+ required: false,
3874
+ description: 'Rotate the credential. The new key is verified before it is stored, and a verified key returns the connection to ACTIVE, which is how a connection recovers from INVALID_CREDENTIALS.',
3875
+ valueKind: 'string',
3876
+ repeatable: false,
3877
+ },
3878
+ ],
3879
+ hasParams: true,
3880
+ paramsAllOptional: true,
3881
+ bodyOpaque: false,
3882
+ bodyVariants: [],
3883
+ acceptsBody: true,
3884
+ requiresAuth: true,
3885
+ },
3886
+ {
3887
+ commandPath: ['connections', 'mcp-server', 'create'],
3888
+ clientProperty: 'mcpServer',
3889
+ methodName: 'create',
3890
+ httpMethod: 'post',
3891
+ httpPath: '/v1/connections/mcp-server',
3892
+ summary: 'Connect an MCP server',
3893
+ description: 'Connects to the server, reads its tools, then stores it for the project. A server that does not answer, or refuses the credential, returns 400 and nothing is stored. The credential is encrypted and never returned.',
3894
+ positionals: [],
3895
+ flags: [
3896
+ {
3897
+ name: 'url',
3898
+ path: ['url'],
3899
+ location: 'body',
3900
+ required: true,
3901
+ valueKind: 'string',
3902
+ repeatable: false,
3903
+ },
3904
+ {
3905
+ name: 'transport',
3906
+ path: ['transport'],
3907
+ location: 'body',
3908
+ required: false,
3909
+ valueKind: 'string',
3910
+ enumValues: ['STREAMABLE_HTTP', 'SSE'],
3911
+ repeatable: false,
3912
+ },
3913
+ {
3914
+ name: 'auth',
3915
+ path: ['auth'],
3916
+ location: 'body',
3917
+ required: false,
3918
+ valueKind: 'object',
3919
+ },
3920
+ {
3921
+ name: 'label',
3922
+ path: ['label'],
3923
+ location: 'body',
3924
+ required: true,
3925
+ valueKind: 'string',
3926
+ repeatable: false,
3927
+ },
3928
+ {
3929
+ name: 'directory-key',
3930
+ path: ['directoryKey'],
3931
+ location: 'body',
3932
+ required: false,
3933
+ valueKind: 'string',
3934
+ repeatable: false,
3935
+ },
3936
+ ],
3937
+ hasParams: true,
3938
+ paramsAllOptional: false,
3939
+ bodyOpaque: false,
3940
+ bodyVariants: [],
3941
+ acceptsBody: true,
3942
+ requiresAuth: true,
3943
+ },
3944
+ {
3945
+ commandPath: ['connections', 'mcp-server', 'delete'],
3946
+ clientProperty: 'mcpServer',
3947
+ methodName: 'delete',
3948
+ httpMethod: 'delete',
3949
+ httpPath: '/v1/connections/mcp-server/{serverId}',
3950
+ summary: 'Disconnect an MCP server',
3951
+ description: 'Deletes the server and its stored credential. A server a tool still uses returns 409, naming the tools.',
3952
+ positionals: [
3953
+ {
3954
+ name: 'server-id',
3955
+ paramKey: 'serverId',
3956
+ },
3957
+ ],
3958
+ flags: [],
3959
+ hasParams: false,
3960
+ paramsAllOptional: true,
3961
+ bodyOpaque: false,
3962
+ bodyVariants: [],
3963
+ acceptsBody: false,
3964
+ requiresAuth: true,
3965
+ },
3966
+ {
3967
+ commandPath: ['connections', 'mcp-server', 'discover'],
3968
+ clientProperty: 'mcpServer',
3969
+ methodName: 'discover',
3970
+ httpMethod: 'post',
3971
+ httpPath: '/v1/connections/mcp-server/discover',
3972
+ summary: 'Discover an MCP server',
3973
+ description: 'Connects to a server and returns the tools it offers, without storing anything. Use it to check a url and credential before connecting.',
3974
+ positionals: [],
3975
+ flags: [
3976
+ {
3977
+ name: 'url',
3978
+ path: ['url'],
3979
+ location: 'body',
3980
+ required: true,
3981
+ valueKind: 'string',
3982
+ repeatable: false,
3983
+ },
3984
+ {
3985
+ name: 'transport',
3986
+ path: ['transport'],
3987
+ location: 'body',
3988
+ required: false,
3989
+ valueKind: 'string',
3990
+ enumValues: ['STREAMABLE_HTTP', 'SSE'],
3991
+ repeatable: false,
3992
+ },
3993
+ {
3994
+ name: 'auth',
3995
+ path: ['auth'],
3996
+ location: 'body',
3997
+ required: false,
3998
+ valueKind: 'object',
3999
+ },
4000
+ ],
4001
+ hasParams: true,
4002
+ paramsAllOptional: false,
4003
+ bodyOpaque: false,
4004
+ bodyVariants: [],
4005
+ acceptsBody: true,
4006
+ requiresAuth: true,
4007
+ },
4008
+ {
4009
+ commandPath: ['connections', 'mcp-server', 'get'],
4010
+ clientProperty: 'mcpServer',
4011
+ methodName: 'getByID',
4012
+ httpMethod: 'get',
4013
+ httpPath: '/v1/connections/mcp-server/{serverId}',
4014
+ summary: 'Get an MCP server',
4015
+ description: 'One MCP server. The credential is never returned.',
4016
+ positionals: [
4017
+ {
4018
+ name: 'server-id',
4019
+ paramKey: 'serverId',
4020
+ },
4021
+ ],
4022
+ flags: [],
4023
+ hasParams: false,
4024
+ paramsAllOptional: true,
4025
+ bodyOpaque: false,
4026
+ bodyVariants: [],
4027
+ acceptsBody: false,
4028
+ requiresAuth: true,
4029
+ },
4030
+ {
4031
+ commandPath: ['connections', 'mcp-server', 'list'],
4032
+ clientProperty: 'mcpServer',
4033
+ methodName: 'list',
4034
+ httpMethod: 'get',
4035
+ httpPath: '/v1/connections/mcp-server',
4036
+ summary: 'List MCP servers',
4037
+ description: "The project's MCP servers, by label, each with the tools it offered when last checked. Credentials are never returned.",
4038
+ positionals: [],
4039
+ flags: [],
4040
+ hasParams: false,
4041
+ paramsAllOptional: true,
4042
+ bodyOpaque: false,
4043
+ bodyVariants: [],
4044
+ acceptsBody: false,
4045
+ requiresAuth: true,
4046
+ },
4047
+ {
4048
+ commandPath: ['connections', 'mcp-server', 'refresh'],
4049
+ clientProperty: 'mcpServer',
4050
+ methodName: 'refresh',
4051
+ httpMethod: 'post',
4052
+ httpPath: '/v1/connections/mcp-server/{serverId}/refresh',
4053
+ summary: 'Refresh an MCP server',
4054
+ description: 'Connects to the server again and records the tools it offers now. Agents keep calling the tools they were given; a new tool reaches an agent only once you add it.',
4055
+ positionals: [
4056
+ {
4057
+ name: 'server-id',
4058
+ paramKey: 'serverId',
4059
+ },
4060
+ ],
4061
+ flags: [],
4062
+ hasParams: false,
4063
+ paramsAllOptional: true,
4064
+ bodyOpaque: false,
4065
+ bodyVariants: [],
4066
+ acceptsBody: false,
4067
+ requiresAuth: true,
4068
+ },
4069
+ {
4070
+ commandPath: ['connections', 'mcp-server', 'update'],
4071
+ clientProperty: 'mcpServer',
4072
+ methodName: 'update',
4073
+ httpMethod: 'patch',
4074
+ httpPath: '/v1/connections/mcp-server/{serverId}',
4075
+ summary: 'Update an MCP server',
4076
+ description: 'Renames the server or replaces its credential. A new credential is checked by connecting with it first; one the server refuses returns 400 and changes nothing.',
4077
+ positionals: [
4078
+ {
4079
+ name: 'server-id',
4080
+ paramKey: 'serverId',
4081
+ },
4082
+ ],
4083
+ flags: [
4084
+ {
4085
+ name: 'label',
4086
+ path: ['label'],
4087
+ location: 'body',
4088
+ required: false,
4089
+ valueKind: 'string',
4090
+ repeatable: false,
4091
+ },
4092
+ {
4093
+ name: 'auth',
4094
+ path: ['auth'],
4095
+ location: 'body',
4096
+ required: false,
4097
+ description: 'How the server authenticates. Stored encrypted; never returned.',
4098
+ valueKind: 'string',
4099
+ repeatable: false,
4100
+ },
4101
+ ],
4102
+ hasParams: true,
4103
+ paramsAllOptional: true,
4104
+ bodyOpaque: false,
4105
+ bodyVariants: [],
4106
+ acceptsBody: true,
4107
+ requiresAuth: true,
4108
+ },
4109
+ {
4110
+ commandPath: ['conversation', 'get'],
4111
+ clientProperty: 'conversation',
4112
+ methodName: 'getByID',
4113
+ httpMethod: 'get',
4114
+ httpPath: '/v1/conversation/{conversationId}',
4115
+ summary: 'Get a conversation',
4116
+ description: 'Fetches one conversation by its id, whether it is a call or a chat. The same endpoint reads both modalities, and `modality` in the response says which one it is, so you do not need to know it up front. A conversation started with `POST /v1/agent/{agentId}/conversations` reads back from the moment it is created, before it is recorded as a call or chat. For its transcript and metrics, use the call or chat endpoints that match its `modality`.',
4117
+ positionals: [
4118
+ {
4119
+ name: 'conversation-id',
4120
+ paramKey: 'conversationId',
4121
+ },
4122
+ ],
4123
+ flags: [],
4124
+ hasParams: false,
4125
+ paramsAllOptional: true,
4126
+ bodyOpaque: false,
4127
+ bodyVariants: [],
4128
+ acceptsBody: false,
4129
+ requiresAuth: true,
4130
+ },
4131
+ {
4132
+ commandPath: ['credential', 'create'],
4133
+ clientProperty: 'me',
4134
+ methodName: 'createAPIKey',
4135
+ httpMethod: 'post',
4136
+ httpPath: '/v1/me/api-keys',
4137
+ summary: 'Create a personal API key',
4138
+ description: 'Requires a personal API key (a project API key is refused) and admin on the project the new key defaults to. Mints a personal API key that acts as you, for a CLI or an automation. The key value is returned exactly once, in the `key` field: capture it now, it is unreadable afterwards. The new key can never exceed the one that created it: not in scope, not in permissions, and not in lifetime. Omit a field to copy it from the calling credential.',
4139
+ positionals: [],
4140
+ flags: [
4141
+ {
4142
+ name: 'name',
4143
+ path: ['name'],
4144
+ location: 'body',
4145
+ required: true,
4146
+ description: 'A label you will recognise later. It is the only thing that tells two credentials apart in the list you revoke from.',
4147
+ valueKind: 'string',
4148
+ repeatable: false,
4149
+ },
4150
+ {
4151
+ name: 'project-id',
4152
+ path: ['projectId'],
4153
+ location: 'body',
4154
+ required: false,
4155
+ description: "Project the credential assumes when a request sends no X-Roark-Project-Id header. Defaults to the calling credential's own default project. You must be an admin of whichever project is used.",
4156
+ valueKind: 'string',
4157
+ repeatable: false,
4158
+ },
4159
+ {
4160
+ name: 'scopes',
4161
+ path: ['scopes'],
4162
+ location: 'body',
4163
+ required: false,
4164
+ description: "Coarse tier. Defaults to the calling credential's own tier, and can never exceed it: a READ credential cannot mint a WRITE one.",
4165
+ valueKind: 'array',
4166
+ enumValues: ['READ', 'WRITE'],
4167
+ repeatable: true,
4168
+ },
4169
+ {
4170
+ name: 'permissions',
4171
+ path: ['permissions'],
4172
+ location: 'body',
4173
+ required: false,
4174
+ description: "Granular 'resource:action' permissions. Defaults to the calling credential's own set, and can never exceed it. A ceiling, not an entitlement: the holder still only reaches what their project membership allows.",
4175
+ valueKind: 'array',
4176
+ repeatable: true,
4177
+ },
4178
+ {
4179
+ name: 'expires-at',
4180
+ path: ['expiresAt'],
4181
+ location: 'body',
4182
+ required: false,
4183
+ description: "ISO 8601 expiry. Defaults to the calling credential's own expiry (no expiry, for a `roark auth login` credential) and may not outlive it, so a short-lived connector credential cannot mint a permanent one.",
4184
+ valueKind: 'string',
4185
+ repeatable: false,
4186
+ },
4187
+ ],
4188
+ hasParams: true,
4189
+ paramsAllOptional: false,
4190
+ bodyOpaque: false,
4191
+ bodyVariants: [],
4192
+ acceptsBody: true,
4193
+ requiresAuth: true,
4194
+ },
4195
+ {
4196
+ commandPath: ['credential', 'list'],
4197
+ clientProperty: 'me',
4198
+ methodName: 'listAPIKeys',
4199
+ httpMethod: 'get',
4200
+ httpPath: '/v1/me/api-keys',
4201
+ summary: 'List personal API keys',
4202
+ description: 'Requires a personal API key; a project API key is refused. Returns the personal API keys that act as you: the ones created in the dashboard, from `roark auth login`, and MCP connectors. Defaults to ACTIVE, pass ?status=REVOKED to see revoked ones. The key value itself is never returned.',
4203
+ positionals: [],
4204
+ flags: [
4205
+ {
4206
+ name: 'status',
4207
+ path: ['status'],
4208
+ location: 'query',
4209
+ required: false,
4210
+ description: 'Filter by status. Defaults to ACTIVE.',
4211
+ valueKind: 'string',
4212
+ enumValues: ['ACTIVE', 'REVOKED'],
4213
+ repeatable: false,
4214
+ },
4215
+ ],
4216
+ hasParams: true,
4217
+ paramsAllOptional: true,
4218
+ bodyOpaque: false,
4219
+ bodyVariants: [],
4220
+ acceptsBody: false,
4221
+ requiresAuth: true,
4222
+ },
4223
+ {
4224
+ commandPath: ['credential', 'revoke'],
4225
+ clientProperty: 'me',
4226
+ methodName: 'revokeAPIKey',
4227
+ httpMethod: 'delete',
4228
+ httpPath: '/v1/me/api-keys/{id}',
4229
+ summary: 'Revoke a personal API key',
4230
+ description: 'Requires a personal API key. Revokes one of your personal API keys; it stops working immediately. A key may revoke itself, which is what `roark auth logout` does. Repeating the call is safe; an unknown id, or one belonging to someone else, answers 404.',
4231
+ positionals: [
4232
+ {
4233
+ name: 'credential-id',
4234
+ paramKey: 'id',
4235
+ },
4236
+ ],
4237
+ flags: [],
4238
+ hasParams: false,
4239
+ paramsAllOptional: true,
4240
+ bodyOpaque: false,
4241
+ bodyVariants: [],
4242
+ acceptsBody: false,
4243
+ requiresAuth: true,
4244
+ },
4245
+ {
4246
+ commandPath: ['customer', 'attribute', 'delete'],
4247
+ clientProperty: 'customer',
4248
+ methodName: 'clearAttribute',
4249
+ httpMethod: 'delete',
4250
+ httpPath: '/v1/customer/{customerProfileId}/attributes/{key}',
4251
+ summary: 'Clear a field on a customer',
4252
+ description: 'Removes the value and any lock, so a later conversation can fill it again.',
4253
+ positionals: [
4254
+ {
4255
+ name: 'customer-profile-id',
4256
+ paramKey: 'customerProfileId',
4257
+ },
4258
+ {
4259
+ name: 'key',
4260
+ paramKey: 'key',
4261
+ },
4262
+ ],
4263
+ flags: [],
4264
+ hasParams: true,
4265
+ paramsAllOptional: false,
4266
+ bodyOpaque: false,
4267
+ bodyVariants: [],
4268
+ acceptsBody: false,
4269
+ requiresAuth: true,
4270
+ },
4271
+ {
4272
+ commandPath: ['customer', 'attribute', 'unlock'],
4273
+ clientProperty: 'customer',
4274
+ methodName: 'unlockAttribute',
4275
+ httpMethod: 'post',
4276
+ httpPath: '/v1/customer/{customerProfileId}/attributes/{key}/unlock',
4277
+ summary: 'Unlock a field on a customer',
4278
+ description: 'Lets newer conversations change this field again. The current value stays until one does.',
4279
+ positionals: [
4280
+ {
4281
+ name: 'customer-profile-id',
4282
+ paramKey: 'customerProfileId',
4283
+ },
4284
+ {
4285
+ name: 'key',
4286
+ paramKey: 'key',
4287
+ },
4288
+ ],
4289
+ flags: [],
4290
+ hasParams: true,
4291
+ paramsAllOptional: false,
4292
+ bodyOpaque: false,
4293
+ bodyVariants: [],
4294
+ acceptsBody: false,
4295
+ requiresAuth: true,
4296
+ },
4297
+ {
4298
+ commandPath: ['customer', 'attribute', 'update'],
4299
+ clientProperty: 'customer',
4300
+ methodName: 'setAttribute',
4301
+ httpMethod: 'put',
4302
+ httpPath: '/v1/customer/{customerProfileId}/attributes/{key}',
4303
+ summary: 'Set a field on a customer',
4304
+ description: 'Sets the value and locks the field, so newer conversations cannot change it.',
4305
+ positionals: [
4306
+ {
4307
+ name: 'customer-profile-id',
4308
+ paramKey: 'customerProfileId',
4309
+ },
4310
+ {
4311
+ name: 'key',
4312
+ paramKey: 'key',
4313
+ },
4314
+ ],
4315
+ flags: [
4316
+ {
4317
+ name: 'value',
4318
+ path: ['value'],
4319
+ location: 'body',
4320
+ required: true,
4321
+ description: 'The new value. Setting a field locks it, so newer conversations cannot change it.',
4322
+ valueKind: 'string',
4323
+ repeatable: false,
4324
+ },
4325
+ ],
4326
+ hasParams: true,
4327
+ paramsAllOptional: false,
4328
+ bodyOpaque: false,
4329
+ bodyVariants: [],
4330
+ acceptsBody: true,
4331
+ requiresAuth: true,
4332
+ },
4333
+ {
4334
+ commandPath: ['customer', 'conversation', 'list'],
4335
+ clientProperty: 'customer',
4336
+ methodName: 'listConversations',
4337
+ httpMethod: 'get',
4338
+ httpPath: '/v1/customer/{customerProfileId}/conversations',
4339
+ summary: "List a customer's conversations",
4340
+ description: 'Calls and chats with this customer, newest first.',
4341
+ positionals: [
4342
+ {
4343
+ name: 'customer-profile-id',
4344
+ paramKey: 'customerProfileId',
4345
+ },
4346
+ ],
4347
+ flags: [
4348
+ {
4349
+ name: 'limit',
4350
+ path: ['limit'],
4351
+ location: 'query',
4352
+ required: false,
4353
+ valueKind: 'integer',
4354
+ repeatable: false,
4355
+ },
4356
+ {
4357
+ name: 'page',
4358
+ path: ['page'],
4359
+ location: 'query',
4360
+ required: false,
4361
+ valueKind: 'integer',
4362
+ repeatable: false,
4363
+ },
4364
+ ],
4365
+ hasParams: true,
4366
+ paramsAllOptional: true,
4367
+ bodyOpaque: false,
4368
+ bodyVariants: [],
4369
+ acceptsBody: false,
4370
+ requiresAuth: true,
4371
+ },
4372
+ {
4373
+ commandPath: ['customer', 'delete'],
4374
+ clientProperty: 'customer',
4375
+ methodName: 'delete',
4376
+ httpMethod: 'delete',
4377
+ httpPath: '/v1/customer/{customerProfileId}',
4378
+ summary: 'Erase a customer',
4379
+ description: 'Permanently removes the customer, with their fields, evidence and notes. Conversations are kept. A new conversation from the same identifier starts a new customer.',
4380
+ positionals: [
3010
4381
  {
3011
- name: 'scopes',
3012
- path: ['scopes'],
4382
+ name: 'customer-profile-id',
4383
+ paramKey: 'customerProfileId',
4384
+ },
4385
+ ],
4386
+ flags: [],
4387
+ hasParams: false,
4388
+ paramsAllOptional: true,
4389
+ bodyOpaque: false,
4390
+ bodyVariants: [],
4391
+ acceptsBody: false,
4392
+ requiresAuth: true,
4393
+ },
4394
+ {
4395
+ commandPath: ['customer', 'field', 'create'],
4396
+ clientProperty: 'customer',
4397
+ methodName: 'createField',
4398
+ httpMethod: 'post',
4399
+ httpPath: '/v1/customer/fields',
4400
+ summary: 'Create a customer field',
4401
+ description: "Adds a field of your project's own. With extract on, conversations fill it from what customers say, guided by its description.",
4402
+ positionals: [],
4403
+ flags: [
4404
+ {
4405
+ name: 'key',
4406
+ path: ['key'],
4407
+ location: 'body',
4408
+ required: true,
4409
+ description: 'Starts with a letter; letters, numbers and underscores only. Fixed once created.',
4410
+ valueKind: 'string',
4411
+ repeatable: false,
4412
+ },
4413
+ {
4414
+ name: 'label',
4415
+ path: ['label'],
4416
+ location: 'body',
4417
+ required: true,
4418
+ valueKind: 'string',
4419
+ repeatable: false,
4420
+ },
4421
+ {
4422
+ name: 'description',
4423
+ path: ['description'],
3013
4424
  location: 'body',
3014
4425
  required: false,
3015
- description: "Coarse tier. Defaults to the calling credential's own tier, and can never exceed it: a READ credential cannot mint a WRITE one.",
3016
- valueKind: 'array',
3017
- enumValues: ['READ', 'WRITE'],
3018
- repeatable: true,
4426
+ description: 'What the agent listens for in a conversation. Required when extract is true.',
4427
+ valueKind: 'string',
4428
+ repeatable: false,
3019
4429
  },
3020
4430
  {
3021
- name: 'permissions',
3022
- path: ['permissions'],
4431
+ name: 'value-type',
4432
+ path: ['valueType'],
4433
+ location: 'body',
4434
+ required: true,
4435
+ valueKind: 'string',
4436
+ enumValues: ['TEXT', 'NUMBER', 'BOOLEAN', 'DATE', 'PHONE_NUMBER', 'EMAIL', 'CURRENCY'],
4437
+ repeatable: false,
4438
+ },
4439
+ {
4440
+ name: 'extract',
4441
+ path: ['extract'],
4442
+ location: 'body',
4443
+ required: true,
4444
+ description: 'Whether conversations fill this field',
4445
+ valueKind: 'boolean',
4446
+ repeatable: false,
4447
+ },
4448
+ ],
4449
+ hasParams: true,
4450
+ paramsAllOptional: false,
4451
+ bodyOpaque: false,
4452
+ bodyVariants: [],
4453
+ acceptsBody: true,
4454
+ requiresAuth: true,
4455
+ },
4456
+ {
4457
+ commandPath: ['customer', 'field', 'delete'],
4458
+ clientProperty: 'customer',
4459
+ methodName: 'deleteField',
4460
+ httpMethod: 'delete',
4461
+ httpPath: '/v1/customer/fields/{key}',
4462
+ summary: 'Delete a customer field',
4463
+ description: "Deletes a field of your project's own. Its values stop showing on customers. A built-in field cannot be deleted; turn it off instead.",
4464
+ positionals: [
4465
+ {
4466
+ name: 'key',
4467
+ paramKey: 'key',
4468
+ },
4469
+ ],
4470
+ flags: [],
4471
+ hasParams: false,
4472
+ paramsAllOptional: true,
4473
+ bodyOpaque: false,
4474
+ bodyVariants: [],
4475
+ acceptsBody: false,
4476
+ requiresAuth: true,
4477
+ },
4478
+ {
4479
+ commandPath: ['customer', 'field', 'list'],
4480
+ clientProperty: 'customer',
4481
+ methodName: 'listFields',
4482
+ httpMethod: 'get',
4483
+ httpPath: '/v1/customer/fields',
4484
+ summary: 'List customer fields',
4485
+ description: "The fields this project's customers can hold, in display order. Use a field's key to filter, sort and set attributes.",
4486
+ positionals: [],
4487
+ flags: [],
4488
+ hasParams: false,
4489
+ paramsAllOptional: true,
4490
+ bodyOpaque: false,
4491
+ bodyVariants: [],
4492
+ acceptsBody: false,
4493
+ requiresAuth: true,
4494
+ },
4495
+ {
4496
+ commandPath: ['customer', 'field', 'update'],
4497
+ clientProperty: 'customer',
4498
+ methodName: 'updateField',
4499
+ httpMethod: 'patch',
4500
+ httpPath: '/v1/customer/fields/{key}',
4501
+ summary: 'Update a customer field',
4502
+ description: "Changes a field. A built-in field can only be turned on or off for your project; any field of your project's own can change everything but its key.",
4503
+ positionals: [
4504
+ {
4505
+ name: 'key',
4506
+ paramKey: 'key',
4507
+ },
4508
+ ],
4509
+ flags: [
4510
+ {
4511
+ name: 'label',
4512
+ path: ['label'],
3023
4513
  location: 'body',
3024
4514
  required: false,
3025
- description: "Granular 'resource:action' permissions. Defaults to the calling credential's own set, and can never exceed it. A ceiling, not an entitlement: the holder still only reaches what their project membership allows.",
3026
- valueKind: 'array',
3027
- repeatable: true,
4515
+ valueKind: 'string',
4516
+ repeatable: false,
3028
4517
  },
3029
4518
  {
3030
- name: 'expires-at',
3031
- path: ['expiresAt'],
4519
+ name: 'description',
4520
+ path: ['description'],
4521
+ location: 'body',
4522
+ required: false,
4523
+ valueKind: 'string',
4524
+ repeatable: false,
4525
+ },
4526
+ {
4527
+ name: 'value-type',
4528
+ path: ['valueType'],
3032
4529
  location: 'body',
3033
4530
  required: false,
3034
- description: "ISO 8601 expiry. Defaults to the calling credential's own expiry (no expiry, for a `roark auth login` credential) and may not outlive it, so a short-lived connector credential cannot mint a permanent one.",
3035
4531
  valueKind: 'string',
4532
+ enumValues: ['TEXT', 'NUMBER', 'BOOLEAN', 'DATE', 'PHONE_NUMBER', 'EMAIL', 'CURRENCY'],
4533
+ repeatable: false,
4534
+ },
4535
+ {
4536
+ name: 'extract',
4537
+ path: ['extract'],
4538
+ location: 'body',
4539
+ required: false,
4540
+ valueKind: 'boolean',
3036
4541
  repeatable: false,
3037
4542
  },
3038
4543
  ],
3039
4544
  hasParams: true,
3040
- paramsAllOptional: false,
4545
+ paramsAllOptional: true,
3041
4546
  bodyOpaque: false,
3042
4547
  bodyVariants: [],
3043
4548
  acceptsBody: true,
3044
4549
  requiresAuth: true,
3045
4550
  },
3046
4551
  {
3047
- commandPath: ['credential', 'list'],
3048
- clientProperty: 'me',
3049
- methodName: 'listAPIKeys',
4552
+ commandPath: ['customer', 'get'],
4553
+ clientProperty: 'customer',
4554
+ methodName: 'getByID',
3050
4555
  httpMethod: 'get',
3051
- httpPath: '/v1/me/api-keys',
3052
- summary: 'List your personal credentials',
3053
- description: 'Returns the credentials that act as you: the ones created in the dashboard, from `roark auth login`, and MCP connectors. Requires a personal credential; a project API key is refused. Defaults to ACTIVE, pass ?status=REVOKED to see revoked ones. The key value itself is never returned.',
4556
+ httpPath: '/v1/customer/{customerProfileId}',
4557
+ summary: 'Get a customer',
4558
+ description: 'Get a customer',
4559
+ positionals: [
4560
+ {
4561
+ name: 'customer-profile-id',
4562
+ paramKey: 'customerProfileId',
4563
+ },
4564
+ ],
4565
+ flags: [],
4566
+ hasParams: false,
4567
+ paramsAllOptional: true,
4568
+ bodyOpaque: false,
4569
+ bodyVariants: [],
4570
+ acceptsBody: false,
4571
+ requiresAuth: true,
4572
+ },
4573
+ {
4574
+ commandPath: ['customer', 'list'],
4575
+ clientProperty: 'customer',
4576
+ methodName: 'list',
4577
+ httpMethod: 'get',
4578
+ httpPath: '/v1/customer',
4579
+ summary: 'List customers',
4580
+ description: 'Returns the people who have talked to your agents in this project. Customers we hold nothing about beyond their identifier are left out unless includeNoData is true.',
3054
4581
  positionals: [],
3055
4582
  flags: [
3056
4583
  {
3057
- name: 'status',
3058
- path: ['status'],
4584
+ name: 'limit',
4585
+ path: ['limit'],
4586
+ location: 'query',
4587
+ required: false,
4588
+ valueKind: 'integer',
4589
+ repeatable: false,
4590
+ },
4591
+ {
4592
+ name: 'page',
4593
+ path: ['page'],
4594
+ location: 'query',
4595
+ required: false,
4596
+ valueKind: 'integer',
4597
+ repeatable: false,
4598
+ },
4599
+ {
4600
+ name: 'search',
4601
+ path: ['search'],
4602
+ location: 'query',
4603
+ required: false,
4604
+ valueKind: 'string',
4605
+ repeatable: false,
4606
+ },
4607
+ {
4608
+ name: 'agent-id',
4609
+ path: ['agentId'],
4610
+ location: 'query',
4611
+ required: false,
4612
+ valueKind: 'string',
4613
+ repeatable: false,
4614
+ },
4615
+ {
4616
+ name: 'modality',
4617
+ path: ['modality'],
4618
+ location: 'query',
4619
+ required: false,
4620
+ valueKind: 'string',
4621
+ enumValues: ['voice', 'chat', 'call'],
4622
+ repeatable: false,
4623
+ },
4624
+ {
4625
+ name: 'include-no-data',
4626
+ path: ['includeNoData'],
4627
+ location: 'query',
4628
+ required: false,
4629
+ description: 'Include customers we hold nothing about beyond their identifier. Defaults to false.',
4630
+ valueKind: 'string',
4631
+ enumValues: ['true', 'false'],
4632
+ repeatable: false,
4633
+ },
4634
+ {
4635
+ name: 'sort-by',
4636
+ path: ['sortBy'],
4637
+ location: 'query',
4638
+ required: false,
4639
+ description: "lastSeenAt (the default), firstSeenAt, conversationCount, voiceCount, chatCount, talkTimeMs or displayName, or field.<key> (for example field.COMPANY) to sort by a field's value. Field keys come from GET /v1/customer/fields. Customers without a value sort last.",
4640
+ valueKind: 'string',
4641
+ repeatable: false,
4642
+ },
4643
+ {
4644
+ name: 'sort-direction',
4645
+ path: ['sortDirection'],
4646
+ location: 'query',
4647
+ required: false,
4648
+ valueKind: 'string',
4649
+ enumValues: ['asc', 'desc'],
4650
+ repeatable: false,
4651
+ },
4652
+ {
4653
+ name: 'field-key',
4654
+ path: ['fieldKey'],
4655
+ location: 'query',
4656
+ required: false,
4657
+ description: 'Filter by this field, a key from GET /v1/customer/fields. Use with fieldOperator and, unless checking presence, fieldValue.',
4658
+ valueKind: 'string',
4659
+ repeatable: false,
4660
+ },
4661
+ {
4662
+ name: 'field-operator',
4663
+ path: ['fieldOperator'],
4664
+ location: 'query',
4665
+ required: false,
4666
+ description: 'How fieldValue is compared, ignoring case. NOT_EQUALS includes customers without the field.',
4667
+ valueKind: 'string',
4668
+ enumValues: ['EQUALS', 'NOT_EQUALS', 'CONTAINS', 'STARTS_WITH', 'IS_SET', 'IS_NOT_SET'],
4669
+ repeatable: false,
4670
+ },
4671
+ {
4672
+ name: 'field-value',
4673
+ path: ['fieldValue'],
3059
4674
  location: 'query',
3060
4675
  required: false,
3061
- description: 'Filter by status. Defaults to ACTIVE.',
3062
4676
  valueKind: 'string',
3063
- enumValues: ['ACTIVE', 'REVOKED'],
3064
4677
  repeatable: false,
3065
4678
  },
3066
4679
  ],
@@ -3072,25 +4685,35 @@ exports.COMMANDS = [
3072
4685
  requiresAuth: true,
3073
4686
  },
3074
4687
  {
3075
- commandPath: ['credential', 'revoke'],
3076
- clientProperty: 'me',
3077
- methodName: 'revokeAPIKey',
3078
- httpMethod: 'delete',
3079
- httpPath: '/v1/me/api-keys/{id}',
3080
- summary: 'Revoke one of your personal credentials',
3081
- description: 'Revokes a credential that acts as you. It stops working immediately. A credential may revoke itself, which is what `roark auth logout` does. Repeating the call is safe; an unknown id, or one belonging to someone else, answers 404.',
4688
+ commandPath: ['customer', 'notes', 'update'],
4689
+ clientProperty: 'customer',
4690
+ methodName: 'updateNotes',
4691
+ httpMethod: 'put',
4692
+ httpPath: '/v1/customer/{customerProfileId}/notes',
4693
+ summary: 'Update the notes on a customer',
4694
+ description: "Replaces your team's shared notes. Null or empty clears them. The last save wins.",
3082
4695
  positionals: [
3083
4696
  {
3084
- name: 'credential-id',
3085
- paramKey: 'id',
4697
+ name: 'customer-profile-id',
4698
+ paramKey: 'customerProfileId',
3086
4699
  },
3087
4700
  ],
3088
- flags: [],
3089
- hasParams: false,
3090
- paramsAllOptional: true,
4701
+ flags: [
4702
+ {
4703
+ name: 'notes',
4704
+ path: ['notes'],
4705
+ location: 'body',
4706
+ required: true,
4707
+ description: 'Replaces the existing notes. Null or empty clears them.',
4708
+ valueKind: 'string',
4709
+ repeatable: false,
4710
+ },
4711
+ ],
4712
+ hasParams: true,
4713
+ paramsAllOptional: false,
3091
4714
  bodyOpaque: false,
3092
4715
  bodyVariants: [],
3093
- acceptsBody: false,
4716
+ acceptsBody: true,
3094
4717
  requiresAuth: true,
3095
4718
  },
3096
4719
  {
@@ -3218,6 +4841,7 @@ exports.COMMANDS = [
3218
4841
  path: ['prompt'],
3219
4842
  location: 'body',
3220
4843
  required: false,
4844
+ description: 'The brief the simulated customer improvises from. Caller cues steer the caller from that point in the brief: `#{emotion:<emotion>}`, `#{language:<ISO 639-1 code>}`, `#{noise:<environmentId>}`, and `#{interrupt}`, whose sentence says when to cut in on your agent. Cues are voice only. See "Caller cues" in the customer flows concept.',
3221
4845
  valueKind: 'string',
3222
4846
  repeatable: false,
3223
4847
  },
@@ -3372,6 +4996,7 @@ exports.COMMANDS = [
3372
4996
  path: ['prompt'],
3373
4997
  location: 'body',
3374
4998
  required: false,
4999
+ description: 'Improv flows only. The brief the simulated customer improvises from. Caller cues steer the caller from that point in the brief: `#{emotion:<emotion>}`, `#{language:<ISO 639-1 code>}`, `#{noise:<environmentId>}`, and `#{interrupt}`, whose sentence says when to cut in on your agent. Cues are voice only. See "Caller cues" in the customer flows concept.',
3375
5000
  valueKind: 'string',
3376
5001
  repeatable: false,
3377
5002
  },
@@ -3434,13 +5059,111 @@ exports.COMMANDS = [
3434
5059
  acceptsBody: true,
3435
5060
  requiresAuth: true,
3436
5061
  },
5062
+ {
5063
+ commandPath: ['customer-flow', 'folder', 'create'],
5064
+ clientProperty: 'customerFlowFolder',
5065
+ methodName: 'create',
5066
+ httpMethod: 'post',
5067
+ httpPath: '/v1/customer-flow/folder',
5068
+ summary: 'Create a customer flow folder',
5069
+ description: 'Creates a folder to group customer flows. File a flow into it by sending its `folderId` when you create or update the flow. Names are unique within a project, ignoring case. Customer flows were previously called scenarios.',
5070
+ positionals: [],
5071
+ flags: [
5072
+ {
5073
+ name: 'name',
5074
+ path: ['name'],
5075
+ location: 'body',
5076
+ required: true,
5077
+ description: 'The folder name. Must be unique in the project.',
5078
+ valueKind: 'string',
5079
+ repeatable: false,
5080
+ },
5081
+ {
5082
+ name: 'color',
5083
+ path: ['color'],
5084
+ location: 'body',
5085
+ required: false,
5086
+ description: 'The color the folder is shown with in the app. Folders share the palette labels use. Defaults to GREY.',
5087
+ valueKind: 'string',
5088
+ enumValues: [
5089
+ 'GREEN',
5090
+ 'RED',
5091
+ 'ORANGE',
5092
+ 'PURPLE',
5093
+ 'GREY',
5094
+ 'BLUE',
5095
+ 'PEACH',
5096
+ 'TEAL',
5097
+ 'INDIGO',
5098
+ 'AMBER',
5099
+ 'ROSE',
5100
+ 'CYAN',
5101
+ ],
5102
+ repeatable: false,
5103
+ },
5104
+ {
5105
+ name: 'description',
5106
+ path: ['description'],
5107
+ location: 'body',
5108
+ required: false,
5109
+ description: 'What belongs in this folder.',
5110
+ valueKind: 'string',
5111
+ repeatable: false,
5112
+ },
5113
+ ],
5114
+ hasParams: true,
5115
+ paramsAllOptional: false,
5116
+ bodyOpaque: false,
5117
+ bodyVariants: [],
5118
+ acceptsBody: true,
5119
+ requiresAuth: true,
5120
+ },
5121
+ {
5122
+ commandPath: ['customer-flow', 'folder', 'delete'],
5123
+ clientProperty: 'customerFlowFolder',
5124
+ methodName: 'delete',
5125
+ httpMethod: 'delete',
5126
+ httpPath: '/v1/customer-flow/folder/{folderId}',
5127
+ summary: 'Delete a customer flow folder',
5128
+ description: 'Deletes a folder. The flows in it are kept and no longer sit in any folder. Built-in folders cannot be deleted.',
5129
+ positionals: [
5130
+ {
5131
+ name: 'folder-id',
5132
+ paramKey: 'folderId',
5133
+ },
5134
+ ],
5135
+ flags: [],
5136
+ hasParams: false,
5137
+ paramsAllOptional: true,
5138
+ bodyOpaque: false,
5139
+ bodyVariants: [],
5140
+ acceptsBody: false,
5141
+ requiresAuth: true,
5142
+ },
5143
+ {
5144
+ commandPath: ['customer-flow', 'folder', 'list'],
5145
+ clientProperty: 'customerFlowFolder',
5146
+ methodName: 'list',
5147
+ httpMethod: 'get',
5148
+ httpPath: '/v1/customer-flow/folder',
5149
+ summary: 'List customer flow folders',
5150
+ description: 'Returns every folder the project groups its customer flows into, with how many flows each holds, in the order the app shows them. Filter the flow list to one folder with `GET /v1/customer-flow?folderId=`. Customer flows were previously called scenarios.',
5151
+ positionals: [],
5152
+ flags: [],
5153
+ hasParams: false,
5154
+ paramsAllOptional: true,
5155
+ bodyOpaque: false,
5156
+ bodyVariants: [],
5157
+ acceptsBody: false,
5158
+ requiresAuth: true,
5159
+ },
3437
5160
  {
3438
5161
  commandPath: ['customer-flow', 'get'],
3439
5162
  clientProperty: 'customerFlow',
3440
5163
  methodName: 'getByID',
3441
5164
  httpMethod: 'get',
3442
5165
  httpPath: '/v1/customer-flow/{flowId}',
3443
- summary: 'Get customer flow by ID',
5166
+ summary: 'Get a customer flow',
3444
5167
  description: 'Returns a customer flow with its happy path, edge cases, expectations and linked agents. Scripted flows also carry their step graph.',
3445
5168
  positionals: [
3446
5169
  {
@@ -3501,168 +5224,10 @@ exports.COMMANDS = [
3501
5224
  commandPath: ['customer-flow', 'happy-path', 'update'],
3502
5225
  clientProperty: 'customerFlow',
3503
5226
  methodName: 'updateHappyPath',
3504
- httpMethod: 'put',
3505
- httpPath: '/v1/customer-flow/{flowId}/happy-path',
3506
- summary: "Update a flow's happy path",
3507
- description: "Updates the happy path's title, persona, environment, brief or expectations. Omitted fields are left alone; `additionalExpectations` replaces the set wholesale rather than appending. Its persona and environment are what the edge cases inherit, so changing them here changes every edge case that does not name its own.",
3508
- positionals: [
3509
- {
3510
- name: 'flow-id',
3511
- paramKey: 'flowId',
3512
- },
3513
- ],
3514
- flags: [
3515
- {
3516
- name: 'title',
3517
- path: ['title'],
3518
- location: 'body',
3519
- required: false,
3520
- valueKind: 'string',
3521
- repeatable: false,
3522
- },
3523
- {
3524
- name: 'environment-id',
3525
- path: ['environmentId'],
3526
- location: 'body',
3527
- required: false,
3528
- valueKind: 'string',
3529
- repeatable: false,
3530
- },
3531
- {
3532
- name: 'prompt',
3533
- path: ['prompt'],
3534
- location: 'body',
3535
- required: false,
3536
- valueKind: 'string',
3537
- repeatable: false,
3538
- },
3539
- {
3540
- name: 'opening-line',
3541
- path: ['openingLine'],
3542
- location: 'body',
3543
- required: false,
3544
- valueKind: 'string',
3545
- repeatable: false,
3546
- },
3547
- {
3548
- name: 'preceded-by-customer-flow-id',
3549
- path: ['precededByCustomerFlowId'],
3550
- location: 'body',
3551
- required: false,
3552
- valueKind: 'string',
3553
- repeatable: false,
3554
- },
3555
- {
3556
- name: 'preceded-by-customer-flow-variant-id',
3557
- path: ['precededByCustomerFlowVariantId'],
3558
- location: 'body',
3559
- required: false,
3560
- valueKind: 'string',
3561
- repeatable: false,
3562
- },
3563
- {
3564
- name: 'include-flow-expectations',
3565
- path: ['includeFlowExpectations'],
3566
- location: 'body',
3567
- required: false,
3568
- description: "Whether this edge case is graded on the flow's agentExpectations as well as its own additionalExpectations. Defaults to true; false grades it on its additionalExpectations only.",
3569
- valueKind: 'boolean',
3570
- repeatable: false,
3571
- },
3572
- {
3573
- name: 'persona-override-id',
3574
- path: ['personaOverrideId'],
3575
- location: 'body',
3576
- required: false,
3577
- description: "The persona this runs as. Null on an edge case inherits the happy path's.",
3578
- valueKind: 'string',
3579
- repeatable: false,
3580
- },
3581
- {
3582
- name: 'additional-expectations',
3583
- path: ['additionalExpectations'],
3584
- location: 'body',
3585
- required: false,
3586
- description: "The expectations graded on this variant only, on top of the flow's own. Sent as the complete set: it replaces whatever the variant had, so omit it to leave the set alone and send [] to clear it. Improv flows only: a scripted variant's expectations come from the agent turns on its path and are rewritten on every graph edit.",
3587
- valueKind: 'array',
3588
- repeatable: false,
3589
- },
3590
- ],
3591
- hasParams: true,
3592
- paramsAllOptional: true,
3593
- bodyOpaque: false,
3594
- bodyVariants: [],
3595
- acceptsBody: true,
3596
- requiresAuth: true,
3597
- },
3598
- {
3599
- commandPath: ['customer-flow', 'list'],
3600
- clientProperty: 'customerFlow',
3601
- methodName: 'list',
3602
- httpMethod: 'get',
3603
- httpPath: '/v1/customer-flow',
3604
- summary: 'List customer flows',
3605
- description: "Returns a paginated list of customer flows with their agents, expectations, happy path and edge cases. The step graph is the one field omitted: reading it walks the project's whole step graph, so it comes back from the single-flow endpoint instead. Customer flows are how a project describes what to test; they replace the older simulation scenarios.",
3606
- positionals: [],
3607
- flags: [
3608
- {
3609
- name: 'limit',
3610
- path: ['limit'],
3611
- location: 'query',
3612
- required: false,
3613
- valueKind: 'integer',
3614
- repeatable: false,
3615
- },
3616
- {
3617
- name: 'after',
3618
- path: ['after'],
3619
- location: 'query',
3620
- required: false,
3621
- valueKind: 'string',
3622
- repeatable: false,
3623
- },
3624
- {
3625
- name: 'search-text',
3626
- path: ['searchText'],
3627
- location: 'query',
3628
- required: false,
3629
- valueKind: 'string',
3630
- repeatable: false,
3631
- },
3632
- {
3633
- name: 'type',
3634
- path: ['type'],
3635
- location: 'query',
3636
- required: false,
3637
- valueKind: 'string',
3638
- enumValues: ['SCRIPTED', 'IMPROV', 'VOICEMAIL'],
3639
- repeatable: false,
3640
- },
3641
- {
3642
- name: 'include-system',
3643
- path: ['includeSystem'],
3644
- location: 'query',
3645
- required: false,
3646
- valueKind: 'string',
3647
- enumValues: ['true', 'false'],
3648
- repeatable: false,
3649
- },
3650
- ],
3651
- hasParams: true,
3652
- paramsAllOptional: true,
3653
- bodyOpaque: false,
3654
- bodyVariants: [],
3655
- acceptsBody: false,
3656
- requiresAuth: true,
3657
- },
3658
- {
3659
- commandPath: ['customer-flow', 'update'],
3660
- clientProperty: 'customerFlow',
3661
- methodName: 'update',
3662
- httpMethod: 'put',
3663
- httpPath: '/v1/customer-flow/{flowId}',
3664
- summary: 'Update a customer flow',
3665
- description: "Updates a flow's title, description, branching mode, linked agents or flow-level expectations. The step graph is replaced through PUT /graph.",
5227
+ httpMethod: 'put',
5228
+ httpPath: '/v1/customer-flow/{flowId}/happy-path',
5229
+ summary: "Update a flow's happy path",
5230
+ description: "Updates the happy path's title, persona, environment, brief or expectations. Omitted fields are left alone; `additionalExpectations` replaces the set wholesale rather than appending. Its persona and environment are what the edge cases inherit, so changing them here changes every edge case that does not name its own.",
3666
5231
  positionals: [
3667
5232
  {
3668
5233
  name: 'flow-id',
@@ -3679,98 +5244,70 @@ exports.COMMANDS = [
3679
5244
  repeatable: false,
3680
5245
  },
3681
5246
  {
3682
- name: 'description',
3683
- path: ['description'],
5247
+ name: 'environment-id',
5248
+ path: ['environmentId'],
3684
5249
  location: 'body',
3685
5250
  required: false,
3686
5251
  valueKind: 'string',
3687
5252
  repeatable: false,
3688
5253
  },
3689
5254
  {
3690
- name: 'script-adherence',
3691
- path: ['scriptAdherence'],
5255
+ name: 'prompt',
5256
+ path: ['prompt'],
3692
5257
  location: 'body',
3693
5258
  required: false,
3694
- description: 'Scripted flows only. How closely a run follows the script. LOOSE (default) hands the whole script to the simulated customer as one prompt; it keeps the call moving whatever your agent says. STRICT runs the script as a state machine on the agent service: at every agent step the simulated customer waits, silent, until your agent has said the expected line, and only then moves on. Scripted flows only; STRICT needs the agent-service transport and is not available on realtime models.',
5259
+ description: 'Improv flows only. The brief the simulated customer improvises from. Caller cues steer the caller from that point in the brief: `#{emotion:<emotion>}`, `#{language:<ISO 639-1 code>}`, `#{noise:<environmentId>}`, and `#{interrupt}`, whose sentence says when to cut in on your agent. Cues are voice only. See "Caller cues" in the customer flows concept.',
3695
5260
  valueKind: 'string',
3696
- enumValues: ['LOOSE', 'STRICT'],
3697
5261
  repeatable: false,
3698
5262
  },
3699
5263
  {
3700
- name: 'off-script-policy',
3701
- path: ['offScriptPolicy'],
5264
+ name: 'opening-line',
5265
+ path: ['openingLine'],
3702
5266
  location: 'body',
3703
5267
  required: false,
3704
- description: 'STRICT only. What the simulated customer does when your agent does not say the expected line. Each unmatched agent utterance is an attempt: `reaction` runs per attempt (STAY_SILENT, REPEAT its last scripted line, RESPOND once in character without moving on, or SAY `sayLine`), and `then` runs when attempts reach `maxAttempts` or your agent stays silent for `waitSeconds` (HANG_UP ends the call with ended reason SCRIPT_DIVERGED, HANG_UP_INVALIDATE ends it the same way and invalidates the run so it is scored by nothing and counted nowhere, MOVE_ON advances anyway, ADAPT hands the rest of the call to loose behaviour). Null: stay silent, 3 attempts, hang up. The default for every agent step; an AGENT_TURN step can carry its own.',
3705
- valueKind: 'object',
3706
- },
3707
- {
3708
- name: 'off-script-policy.reaction',
3709
- path: ['offScriptPolicy', 'reaction'],
3710
- location: 'body',
3711
- required: true,
3712
5268
  valueKind: 'string',
3713
- enumValues: ['STAY_SILENT', 'REPEAT', 'RESPOND', 'SAY'],
3714
5269
  repeatable: false,
3715
5270
  },
3716
5271
  {
3717
- name: 'off-script-policy.say-line',
3718
- path: ['offScriptPolicy', 'sayLine'],
5272
+ name: 'preceded-by-customer-flow-id',
5273
+ path: ['precededByCustomerFlowId'],
3719
5274
  location: 'body',
3720
5275
  required: false,
3721
5276
  valueKind: 'string',
3722
5277
  repeatable: false,
3723
5278
  },
3724
5279
  {
3725
- name: 'off-script-policy.max-attempts',
3726
- path: ['offScriptPolicy', 'maxAttempts'],
3727
- location: 'body',
3728
- required: true,
3729
- valueKind: 'integer',
3730
- repeatable: false,
3731
- },
3732
- {
3733
- name: 'off-script-policy.then',
3734
- path: ['offScriptPolicy', 'then'],
5280
+ name: 'preceded-by-customer-flow-variant-id',
5281
+ path: ['precededByCustomerFlowVariantId'],
3735
5282
  location: 'body',
3736
- required: true,
5283
+ required: false,
3737
5284
  valueKind: 'string',
3738
- enumValues: ['HANG_UP', 'MOVE_ON', 'ADAPT', 'HANG_UP_INVALIDATE'],
3739
5285
  repeatable: false,
3740
5286
  },
3741
5287
  {
3742
- name: 'off-script-policy.wait-seconds',
3743
- path: ['offScriptPolicy', 'waitSeconds'],
5288
+ name: 'include-flow-expectations',
5289
+ path: ['includeFlowExpectations'],
3744
5290
  location: 'body',
3745
5291
  required: false,
3746
- valueKind: 'integer',
5292
+ description: "Whether this edge case is graded on the flow's agentExpectations as well as its own additionalExpectations. Defaults to true; false grades it on its additionalExpectations only.",
5293
+ valueKind: 'boolean',
3747
5294
  repeatable: false,
3748
5295
  },
3749
5296
  {
3750
- name: 'branching-mode',
3751
- path: ['branchingMode'],
5297
+ name: 'persona-override-id',
5298
+ path: ['personaOverrideId'],
3752
5299
  location: 'body',
3753
5300
  required: false,
3754
- description: 'Scripted flows only. How a run walks the graph. DETERMINISTIC ("Simulate every path" in the app) places one call per variant, each following its path exactly whatever the agent says. ADAPTIVE ("Adapt to your agent") collapses the paths into one call PER PERSONA, on which the simulated customer picks a branch from what the agent actually said. Both modes speak the exact authored lines, and neither changes how metrics or expectations grade.',
5301
+ description: "The persona this runs as. Null on an edge case inherits the happy path's.",
3755
5302
  valueKind: 'string',
3756
- enumValues: ['DETERMINISTIC', 'ADAPTIVE'],
3757
5303
  repeatable: false,
3758
5304
  },
3759
5305
  {
3760
- name: 'agent-ids',
3761
- path: ['agentIds'],
3762
- location: 'body',
3763
- required: false,
3764
- description: 'Replaces the linked agents. Omit to leave them unchanged. An improv flow must keep at least one; a scripted flow can be left with none.',
3765
- valueKind: 'array',
3766
- repeatable: true,
3767
- },
3768
- {
3769
- name: 'agent-expectations',
3770
- path: ['agentExpectations'],
5306
+ name: 'additional-expectations',
5307
+ path: ['additionalExpectations'],
3771
5308
  location: 'body',
3772
5309
  required: false,
3773
- description: 'Replaces the flow-level expectations. Omit to leave them unchanged.',
5310
+ description: "The expectations graded on this variant only, on top of the flow's own. Sent as the complete set: it replaces whatever the variant had, so omit it to leave the set alone and send [] to clear it. Improv flows only: a scripted variant's expectations come from the agent turns on its path and are rewritten on every graph edit.",
3774
5311
  valueKind: 'array',
3775
5312
  repeatable: false,
3776
5313
  },
@@ -3783,122 +5320,63 @@ exports.COMMANDS = [
3783
5320
  requiresAuth: true,
3784
5321
  },
3785
5322
  {
3786
- commandPath: ['customer-profile', 'attribute', 'delete'],
3787
- clientProperty: 'customerProfile',
3788
- methodName: 'clearAttribute',
3789
- httpMethod: 'delete',
3790
- httpPath: '/v1/customer-profile/{customerProfileId}/attributes/{key}',
3791
- summary: 'Clear a customer profile field',
3792
- description: 'Removes the value and any lock, so a later conversation can fill it again.',
3793
- positionals: [
3794
- {
3795
- name: 'customer-profile-id',
3796
- paramKey: 'customerProfileId',
3797
- },
3798
- {
3799
- name: 'key',
3800
- paramKey: 'key',
3801
- },
3802
- ],
3803
- flags: [],
3804
- hasParams: true,
3805
- paramsAllOptional: false,
3806
- bodyOpaque: false,
3807
- bodyVariants: [],
3808
- acceptsBody: false,
3809
- requiresAuth: true,
3810
- },
3811
- {
3812
- commandPath: ['customer-profile', 'attribute', 'unlock'],
3813
- clientProperty: 'customerProfile',
3814
- methodName: 'unlockAttribute',
3815
- httpMethod: 'post',
3816
- httpPath: '/v1/customer-profile/{customerProfileId}/attributes/{key}/unlock',
3817
- summary: 'Unlock a customer profile field',
3818
- description: 'Lets newer conversations change this field again. The current value stays until one does.',
3819
- positionals: [
3820
- {
3821
- name: 'customer-profile-id',
3822
- paramKey: 'customerProfileId',
3823
- },
3824
- {
3825
- name: 'key',
3826
- paramKey: 'key',
3827
- },
3828
- ],
3829
- flags: [],
3830
- hasParams: true,
3831
- paramsAllOptional: false,
3832
- bodyOpaque: false,
3833
- bodyVariants: [],
3834
- acceptsBody: false,
3835
- requiresAuth: true,
3836
- },
3837
- {
3838
- commandPath: ['customer-profile', 'attribute', 'update'],
3839
- clientProperty: 'customerProfile',
3840
- methodName: 'setAttribute',
3841
- httpMethod: 'put',
3842
- httpPath: '/v1/customer-profile/{customerProfileId}/attributes/{key}',
3843
- summary: 'Set a customer profile field',
3844
- description: 'Sets the value and locks the field, so newer conversations cannot change it.',
3845
- positionals: [
5323
+ commandPath: ['customer-flow', 'list'],
5324
+ clientProperty: 'customerFlow',
5325
+ methodName: 'list',
5326
+ httpMethod: 'get',
5327
+ httpPath: '/v1/customer-flow',
5328
+ summary: 'List customer flows',
5329
+ description: "Returns a paginated list of customer flows with their agents, expectations, happy path and edge cases. The step graph is the one field omitted: reading it walks the project's whole step graph, so it comes back from the single-flow endpoint instead. Customer flows are how a project describes what to test; they replace the older simulation scenarios.",
5330
+ positionals: [],
5331
+ flags: [
3846
5332
  {
3847
- name: 'customer-profile-id',
3848
- paramKey: 'customerProfileId',
5333
+ name: 'limit',
5334
+ path: ['limit'],
5335
+ location: 'query',
5336
+ required: false,
5337
+ valueKind: 'integer',
5338
+ repeatable: false,
3849
5339
  },
3850
5340
  {
3851
- name: 'key',
3852
- paramKey: 'key',
5341
+ name: 'after',
5342
+ path: ['after'],
5343
+ location: 'query',
5344
+ required: false,
5345
+ valueKind: 'string',
5346
+ repeatable: false,
3853
5347
  },
3854
- ],
3855
- flags: [
3856
5348
  {
3857
- name: 'value',
3858
- path: ['value'],
3859
- location: 'body',
3860
- required: true,
3861
- description: 'The new value. Setting a field locks it, so newer conversations cannot change it.',
5349
+ name: 'search-text',
5350
+ path: ['searchText'],
5351
+ location: 'query',
5352
+ required: false,
3862
5353
  valueKind: 'string',
3863
5354
  repeatable: false,
3864
5355
  },
3865
- ],
3866
- hasParams: true,
3867
- paramsAllOptional: false,
3868
- bodyOpaque: false,
3869
- bodyVariants: [],
3870
- acceptsBody: true,
3871
- requiresAuth: true,
3872
- },
3873
- {
3874
- commandPath: ['customer-profile', 'conversation', 'list'],
3875
- clientProperty: 'customerProfile',
3876
- methodName: 'listConversations',
3877
- httpMethod: 'get',
3878
- httpPath: '/v1/customer-profile/{customerProfileId}/conversations',
3879
- summary: "List a customer's conversations",
3880
- description: 'Calls and chats with this customer, newest first.',
3881
- positionals: [
3882
5356
  {
3883
- name: 'customer-profile-id',
3884
- paramKey: 'customerProfileId',
5357
+ name: 'type',
5358
+ path: ['type'],
5359
+ location: 'query',
5360
+ required: false,
5361
+ valueKind: 'string',
5362
+ enumValues: ['SCRIPTED', 'IMPROV', 'VOICEMAIL'],
5363
+ repeatable: false,
3885
5364
  },
3886
- ],
3887
- flags: [
3888
5365
  {
3889
- name: 'limit',
3890
- path: ['limit'],
5366
+ name: 'folder-id',
5367
+ path: ['folderId'],
3891
5368
  location: 'query',
3892
5369
  required: false,
3893
- valueKind: 'integer',
5370
+ valueKind: 'string',
3894
5371
  repeatable: false,
3895
5372
  },
3896
5373
  {
3897
- name: 'page',
3898
- path: ['page'],
5374
+ name: 'include-system',
5375
+ path: ['includeSystem'],
3899
5376
  location: 'query',
3900
5377
  required: false,
3901
- valueKind: 'integer',
5378
+ valueKind: 'string',
5379
+ enumValues: ['true', 'false'],
3902
5380
  repeatable: false,
3903
5381
  },
3904
5382
  ],
@@ -3910,229 +5388,136 @@ exports.COMMANDS = [
3910
5388
  requiresAuth: true,
3911
5389
  },
3912
5390
  {
3913
- commandPath: ['customer-profile', 'delete'],
3914
- clientProperty: 'customerProfile',
3915
- methodName: 'delete',
3916
- httpMethod: 'delete',
3917
- httpPath: '/v1/customer-profile/{customerProfileId}',
3918
- summary: 'Erase a customer profile',
3919
- description: 'Permanently removes the profile, its fields, evidence and notes. Conversations are kept. A new conversation from the same identifier creates a new profile.',
3920
- positionals: [
3921
- {
3922
- name: 'customer-profile-id',
3923
- paramKey: 'customerProfileId',
3924
- },
3925
- ],
3926
- flags: [],
3927
- hasParams: false,
3928
- paramsAllOptional: true,
3929
- bodyOpaque: false,
3930
- bodyVariants: [],
3931
- acceptsBody: false,
3932
- requiresAuth: true,
3933
- },
3934
- {
3935
- commandPath: ['customer-profile', 'get'],
3936
- clientProperty: 'customerProfile',
3937
- methodName: 'getByID',
3938
- httpMethod: 'get',
3939
- httpPath: '/v1/customer-profile/{customerProfileId}',
3940
- summary: 'Get a customer profile',
3941
- description: 'Get a customer profile',
5391
+ commandPath: ['customer-flow', 'update'],
5392
+ clientProperty: 'customerFlow',
5393
+ methodName: 'update',
5394
+ httpMethod: 'put',
5395
+ httpPath: '/v1/customer-flow/{flowId}',
5396
+ summary: 'Update a customer flow',
5397
+ description: "Updates a flow's title, description, branching mode, linked agents, flow-level expectations or folder. The step graph is replaced through PUT /graph.",
3942
5398
  positionals: [
3943
5399
  {
3944
- name: 'customer-profile-id',
3945
- paramKey: 'customerProfileId',
5400
+ name: 'flow-id',
5401
+ paramKey: 'flowId',
3946
5402
  },
3947
5403
  ],
3948
- flags: [],
3949
- hasParams: false,
3950
- paramsAllOptional: true,
3951
- bodyOpaque: false,
3952
- bodyVariants: [],
3953
- acceptsBody: false,
3954
- requiresAuth: true,
3955
- },
3956
- {
3957
- commandPath: ['customer-profile', 'list'],
3958
- clientProperty: 'customerProfile',
3959
- methodName: 'list',
3960
- httpMethod: 'get',
3961
- httpPath: '/v1/customer-profile',
3962
- summary: 'List customer profiles',
3963
- description: 'Returns the people who have talked to your agents in this project. Customers we hold nothing about beyond their identifier are left out unless includeNoData is true.',
3964
- positionals: [],
3965
5404
  flags: [
3966
5405
  {
3967
- name: 'limit',
3968
- path: ['limit'],
3969
- location: 'query',
3970
- required: false,
3971
- valueKind: 'integer',
3972
- repeatable: false,
3973
- },
3974
- {
3975
- name: 'page',
3976
- path: ['page'],
3977
- location: 'query',
5406
+ name: 'title',
5407
+ path: ['title'],
5408
+ location: 'body',
3978
5409
  required: false,
3979
- valueKind: 'integer',
5410
+ valueKind: 'string',
3980
5411
  repeatable: false,
3981
5412
  },
3982
5413
  {
3983
- name: 'search',
3984
- path: ['search'],
3985
- location: 'query',
5414
+ name: 'description',
5415
+ path: ['description'],
5416
+ location: 'body',
3986
5417
  required: false,
3987
5418
  valueKind: 'string',
3988
5419
  repeatable: false,
3989
5420
  },
3990
5421
  {
3991
- name: 'agent-id',
3992
- path: ['agentId'],
3993
- location: 'query',
5422
+ name: 'script-adherence',
5423
+ path: ['scriptAdherence'],
5424
+ location: 'body',
3994
5425
  required: false,
5426
+ description: 'Scripted flows only. How closely a run follows the script. LOOSE (default) hands the whole script to the simulated customer as one prompt; it keeps the call moving whatever your agent says. STRICT runs the script as a state machine on the agent service: at every agent step the simulated customer waits, silent, until your agent has said the expected line, and only then moves on. Scripted flows only; STRICT needs the agent-service transport and is not available on realtime models.',
3995
5427
  valueKind: 'string',
5428
+ enumValues: ['LOOSE', 'STRICT'],
3996
5429
  repeatable: false,
3997
5430
  },
3998
5431
  {
3999
- name: 'modality',
4000
- path: ['modality'],
4001
- location: 'query',
5432
+ name: 'off-script-policy',
5433
+ path: ['offScriptPolicy'],
5434
+ location: 'body',
4002
5435
  required: false,
5436
+ description: 'STRICT only. What the simulated customer does when your agent does not say the expected line. Each unmatched agent utterance is an attempt: `reaction` runs per attempt (STAY_SILENT, REPEAT its last scripted line, RESPOND once in character without moving on, or SAY `sayLine`), and `then` runs when attempts reach `maxAttempts` or your agent stays silent for `waitSeconds` (HANG_UP ends the call with ended reason SCRIPT_DIVERGED, HANG_UP_INVALIDATE ends it the same way and invalidates the run so it is scored by nothing and counted nowhere, MOVE_ON advances anyway, ADAPT hands the rest of the call to loose behaviour). Null: stay silent, 3 attempts, hang up. The default for every agent step; an AGENT_TURN step can carry its own.',
5437
+ valueKind: 'object',
5438
+ },
5439
+ {
5440
+ name: 'off-script-policy.reaction',
5441
+ path: ['offScriptPolicy', 'reaction'],
5442
+ location: 'body',
5443
+ required: true,
4003
5444
  valueKind: 'string',
4004
- enumValues: ['call', 'chat'],
5445
+ enumValues: ['STAY_SILENT', 'REPEAT', 'RESPOND', 'SAY'],
4005
5446
  repeatable: false,
4006
5447
  },
4007
5448
  {
4008
- name: 'include-no-data',
4009
- path: ['includeNoData'],
4010
- location: 'query',
5449
+ name: 'off-script-policy.say-line',
5450
+ path: ['offScriptPolicy', 'sayLine'],
5451
+ location: 'body',
4011
5452
  required: false,
4012
- description: 'Include customers we hold nothing about beyond their identifier. Defaults to false.',
4013
5453
  valueKind: 'string',
4014
- enumValues: ['true', 'false'],
4015
5454
  repeatable: false,
4016
5455
  },
4017
5456
  {
4018
- name: 'sort-by',
4019
- path: ['sortBy'],
4020
- location: 'query',
4021
- required: false,
4022
- description: "A column, or field.<KEY> (for example field.COMPANY) to sort by a field's value. Customers without a value sort last.",
4023
- valueKind: 'string',
4024
- enumValues: [
4025
- 'lastSeenAt',
4026
- 'firstSeenAt',
4027
- 'conversationCount',
4028
- 'voiceCount',
4029
- 'chatCount',
4030
- 'talkTimeMs',
4031
- 'displayName',
4032
- 'field.FULL_NAME',
4033
- 'field.PREFERRED_NAME',
4034
- 'field.ACCOUNT_ID',
4035
- 'field.COMPANY',
4036
- 'field.JOB_TITLE',
4037
- 'field.EMAIL',
4038
- 'field.ALTERNATE_PHONE',
4039
- 'field.AGE',
4040
- 'field.GENDER',
4041
- 'field.LANGUAGE',
4042
- 'field.LOCATION',
4043
- 'field.TIMEZONE',
4044
- 'field.BEST_TIME_TO_REACH',
4045
- 'field.PREFERRED_CHANNEL',
4046
- ],
5457
+ name: 'off-script-policy.max-attempts',
5458
+ path: ['offScriptPolicy', 'maxAttempts'],
5459
+ location: 'body',
5460
+ required: true,
5461
+ valueKind: 'integer',
4047
5462
  repeatable: false,
4048
5463
  },
4049
5464
  {
4050
- name: 'sort-direction',
4051
- path: ['sortDirection'],
4052
- location: 'query',
4053
- required: false,
5465
+ name: 'off-script-policy.then',
5466
+ path: ['offScriptPolicy', 'then'],
5467
+ location: 'body',
5468
+ required: true,
4054
5469
  valueKind: 'string',
4055
- enumValues: ['asc', 'desc'],
5470
+ enumValues: ['HANG_UP', 'MOVE_ON', 'ADAPT', 'HANG_UP_INVALIDATE'],
4056
5471
  repeatable: false,
4057
5472
  },
4058
5473
  {
4059
- name: 'field-key',
4060
- path: ['fieldKey'],
4061
- location: 'query',
5474
+ name: 'off-script-policy.wait-seconds',
5475
+ path: ['offScriptPolicy', 'waitSeconds'],
5476
+ location: 'body',
4062
5477
  required: false,
4063
- description: 'Filter by this field. Use with fieldOperator and, unless checking presence, fieldValue.',
4064
- valueKind: 'string',
4065
- enumValues: [
4066
- 'FULL_NAME',
4067
- 'PREFERRED_NAME',
4068
- 'ACCOUNT_ID',
4069
- 'COMPANY',
4070
- 'JOB_TITLE',
4071
- 'EMAIL',
4072
- 'ALTERNATE_PHONE',
4073
- 'AGE',
4074
- 'GENDER',
4075
- 'LANGUAGE',
4076
- 'LOCATION',
4077
- 'TIMEZONE',
4078
- 'BEST_TIME_TO_REACH',
4079
- 'PREFERRED_CHANNEL',
4080
- ],
5478
+ valueKind: 'integer',
4081
5479
  repeatable: false,
4082
5480
  },
4083
5481
  {
4084
- name: 'field-operator',
4085
- path: ['fieldOperator'],
4086
- location: 'query',
5482
+ name: 'branching-mode',
5483
+ path: ['branchingMode'],
5484
+ location: 'body',
4087
5485
  required: false,
4088
- description: 'How fieldValue is compared, ignoring case. NOT_EQUALS includes customers without the field.',
5486
+ description: 'Scripted flows only. How a run walks the graph. DETERMINISTIC ("Simulate every path" in the app) places one call per variant, each following its path exactly whatever the agent says. ADAPTIVE ("Adapt to your agent") collapses the paths into one call PER PERSONA, on which the simulated customer picks a branch from what the agent actually said. Both modes speak the exact authored lines, and neither changes how metrics or expectations grade.',
4089
5487
  valueKind: 'string',
4090
- enumValues: ['EQUALS', 'NOT_EQUALS', 'CONTAINS', 'STARTS_WITH', 'IS_SET', 'IS_NOT_SET'],
5488
+ enumValues: ['DETERMINISTIC', 'ADAPTIVE'],
4091
5489
  repeatable: false,
4092
5490
  },
4093
5491
  {
4094
- name: 'field-value',
4095
- path: ['fieldValue'],
4096
- location: 'query',
5492
+ name: 'agent-ids',
5493
+ path: ['agentIds'],
5494
+ location: 'body',
4097
5495
  required: false,
4098
- valueKind: 'string',
4099
- repeatable: false,
5496
+ description: 'Replaces the linked agents. Omit to leave them unchanged. An improv flow must keep at least one; a scripted flow can be left with none.',
5497
+ valueKind: 'array',
5498
+ repeatable: true,
4100
5499
  },
4101
- ],
4102
- hasParams: true,
4103
- paramsAllOptional: true,
4104
- bodyOpaque: false,
4105
- bodyVariants: [],
4106
- acceptsBody: false,
4107
- requiresAuth: true,
4108
- },
4109
- {
4110
- commandPath: ['customer-profile', 'notes', 'update'],
4111
- clientProperty: 'customerProfile',
4112
- methodName: 'updateNotes',
4113
- httpMethod: 'put',
4114
- httpPath: '/v1/customer-profile/{customerProfileId}/notes',
4115
- summary: 'Update the notes on a customer profile',
4116
- description: "Replaces your team's shared notes. Null or empty clears them. The last save wins.",
4117
- positionals: [
4118
5500
  {
4119
- name: 'customer-profile-id',
4120
- paramKey: 'customerProfileId',
5501
+ name: 'agent-expectations',
5502
+ path: ['agentExpectations'],
5503
+ location: 'body',
5504
+ required: false,
5505
+ description: 'Replaces the flow-level expectations. Omit to leave them unchanged.',
5506
+ valueKind: 'array',
5507
+ repeatable: false,
4121
5508
  },
4122
- ],
4123
- flags: [
4124
5509
  {
4125
- name: 'notes',
4126
- path: ['notes'],
5510
+ name: 'folder-id',
5511
+ path: ['folderId'],
4127
5512
  location: 'body',
4128
- required: true,
4129
- description: 'Replaces the existing notes. Null or empty clears them.',
5513
+ required: false,
5514
+ description: 'Moves the flow into this folder. Null takes it out of its folder; omit to leave it where it is.',
4130
5515
  valueKind: 'string',
4131
5516
  repeatable: false,
4132
5517
  },
4133
5518
  ],
4134
5519
  hasParams: true,
4135
- paramsAllOptional: false,
5520
+ paramsAllOptional: true,
4136
5521
  bodyOpaque: false,
4137
5522
  bodyVariants: [],
4138
5523
  acceptsBody: true,
@@ -4308,7 +5693,7 @@ exports.COMMANDS = [
4308
5693
  httpMethod: 'get',
4309
5694
  httpPath: '/v1/dashboard',
4310
5695
  summary: 'List dashboards',
4311
- description: "Lists the project's dashboards, the default first. GET /v1/dashboard/{dashboardId} returns the widgets.",
5696
+ description: "Lists the project's dashboards, the default first. `GET /v1/dashboard/{dashboardId}` returns the widgets.",
4312
5697
  positionals: [],
4313
5698
  flags: [],
4314
5699
  hasParams: false,
@@ -4325,7 +5710,7 @@ exports.COMMANDS = [
4325
5710
  httpMethod: 'put',
4326
5711
  httpPath: '/v1/dashboard/{dashboardId}',
4327
5712
  summary: 'Update a dashboard',
4328
- description: 'Edits a dashboard. Omitted fields keep their current value. `widgets`, when sent, replaces the list: widgets are matched by name, so a widget that keeps its name keeps its id; a new name adds a widget and a name no longer listed removes it. To change one widget, PUT /v1/dashboard/{dashboardId}/widget/{widgetId}.',
5713
+ description: 'Edits a dashboard. Omitted fields keep their current value. `widgets`, when sent, replaces the list: widgets are matched by name, so a widget that keeps its name keeps its id; a new name adds a widget and a name no longer listed removes it. To change one widget, `PUT /v1/dashboard/{dashboardId}/widget/{widgetId}`.',
4329
5714
  positionals: [
4330
5715
  {
4331
5716
  name: 'dashboard-id',
@@ -4717,7 +6102,7 @@ exports.COMMANDS = [
4717
6102
  methodName: 'create',
4718
6103
  httpMethod: 'post',
4719
6104
  httpPath: '/v1/http-request-definition',
4720
- summary: 'Create HTTP request definition',
6105
+ summary: 'Create an HTTP request definition',
4721
6106
  description: 'Creates a new HTTP request definition. The signing secret is only returned in this response and cannot be retrieved later.',
4722
6107
  positionals: [],
4723
6108
  flags: [
@@ -4791,7 +6176,7 @@ exports.COMMANDS = [
4791
6176
  methodName: 'getByID',
4792
6177
  httpMethod: 'get',
4793
6178
  httpPath: '/v1/http-request-definition/{definitionId}',
4794
- summary: 'Get HTTP request definition by ID',
6179
+ summary: 'Get an HTTP request definition',
4795
6180
  description: 'Returns a specific HTTP request definition by its ID.',
4796
6181
  positionals: [
4797
6182
  {
@@ -4850,7 +6235,7 @@ exports.COMMANDS = [
4850
6235
  methodName: 'update',
4851
6236
  httpMethod: 'put',
4852
6237
  httpPath: '/v1/http-request-definition/{definitionId}',
4853
- summary: 'Update HTTP request definition',
6238
+ summary: 'Update an HTTP request definition',
4854
6239
  description: 'Updates an existing HTTP request definition.',
4855
6240
  positionals: [
4856
6241
  {
@@ -5465,7 +6850,7 @@ exports.COMMANDS = [
5465
6850
  methodName: 'getByID',
5466
6851
  httpMethod: 'get',
5467
6852
  httpPath: '/v1/metric/collection-jobs/{jobId}',
5468
- summary: 'Get metric collection job by ID',
6853
+ summary: 'Get a metric collection job',
5469
6854
  description: 'Returns a specific metric collection job with progress information.',
5470
6855
  positionals: [
5471
6856
  {
@@ -5534,7 +6919,7 @@ exports.COMMANDS = [
5534
6919
  methodName: 'createDefinition',
5535
6920
  httpMethod: 'post',
5536
6921
  httpPath: '/v1/metric/definitions',
5537
- summary: 'Create custom metric definition',
6922
+ summary: 'Create a metric definition',
5538
6923
  description: 'Create a new metric definition. The `calculationType` field selects the variant: LLM_JUDGE (LLM-evaluated), FORMULA (computed from a math expression over other metrics), or PATTERN (detects a trigger→outcome pattern within a window). To create a threshold on top of an existing metric, use `POST /metric/definitions/{idOrSlug}/thresholds` instead.',
5539
6924
  positionals: [],
5540
6925
  flags: [],
@@ -5626,7 +7011,7 @@ exports.COMMANDS = [
5626
7011
  path: ['llmPrompt'],
5627
7012
  location: 'body',
5628
7013
  required: false,
5629
- description: 'New LLM prompt (only for LLM_JUDGE metrics whose prompt is editable)',
7014
+ description: 'New LLM prompt (only for LLM_JUDGE metrics whose prompt is editable). A custom metric prompt must include a transcript variable such as `{{transcript}}` and `{{world_context}}`, which gives the judge the current date and time when it grades.',
5630
7015
  valueKind: 'string',
5631
7016
  repeatable: false,
5632
7017
  },
@@ -5923,9 +7308,9 @@ exports.COMMANDS = [
5923
7308
  path: ['modality'],
5924
7309
  location: 'body',
5925
7310
  required: true,
5926
- description: 'Modality this policy targets. A policy fires for exactly one modality and can only reference metrics that support that modality.',
7311
+ description: 'Modality this policy targets: `voice` or `chat` (`call` is still accepted for `voice`). A policy fires for exactly one modality and can only reference metrics that support that modality.',
5927
7312
  valueKind: 'string',
5928
- enumValues: ['call', 'chat'],
7313
+ enumValues: ['voice', 'chat', 'call'],
5929
7314
  repeatable: false,
5930
7315
  },
5931
7316
  {
@@ -5983,7 +7368,7 @@ exports.COMMANDS = [
5983
7368
  methodName: 'getByID',
5984
7369
  httpMethod: 'get',
5985
7370
  httpPath: '/v1/metric/policies/{policyId}',
5986
- summary: 'Get metric policy by ID',
7371
+ summary: 'Get a metric policy',
5987
7372
  description: 'Returns a specific metric policy with its conditions and metrics.',
5988
7373
  positionals: [
5989
7374
  {
@@ -6202,7 +7587,7 @@ exports.COMMANDS = [
6202
7587
  methodName: 'list',
6203
7588
  httpMethod: 'get',
6204
7589
  httpPath: '/v1/metric/definitions/{idOrSlug}/variants',
6205
- summary: 'List a metric’s variants',
7590
+ summary: "List a metric's variants",
6206
7591
  description: 'Every configuration of this metric your organization can use: Roark’s own variants and any your organization has added or forked. `isDefault` marks the one the metric is scored with when nothing pins another; pass any variant’s `id` as `sourceVariantId` to pin it on a derived metric. Auto-managed variants (the ones a package materializes for you) are not listed: they are engine state, not configuration you author.',
6207
7592
  positionals: [
6208
7593
  {
@@ -6254,7 +7639,7 @@ exports.COMMANDS = [
6254
7639
  path: ['llmPrompt'],
6255
7640
  location: 'body',
6256
7641
  required: false,
6257
- description: 'The rubric this variant applies. LLM judge metrics only.',
7642
+ description: 'The rubric this variant applies. LLM judge metrics only. A custom metric prompt must include a transcript variable such as `{{transcript}}` and `{{world_context}}`, which gives the judge the current date and time when it grades.',
6258
7643
  valueKind: 'string',
6259
7644
  repeatable: false,
6260
7645
  },
@@ -6626,7 +8011,7 @@ exports.COMMANDS = [
6626
8011
  methodName: 'list',
6627
8012
  httpMethod: 'get',
6628
8013
  httpPath: '/v1/projects',
6629
- summary: 'List projects available to this credential',
8014
+ summary: 'List accessible projects',
6630
8015
  description: 'Returns every project the calling credential may act on, with the permissions it holds in each. A project-scoped API key returns the single project it is bound to. A user-scoped credential returns the projects in its organization where the holder is an active member. Use the returned id in the X-Roark-Project-Id header.',
6631
8016
  positionals: [],
6632
8017
  flags: [],
@@ -6714,6 +8099,42 @@ exports.COMMANDS = [
6714
8099
  valueKind: 'number',
6715
8100
  repeatable: false,
6716
8101
  },
8102
+ {
8103
+ name: 'line-quality',
8104
+ path: ['lineQuality'],
8105
+ location: 'body',
8106
+ required: false,
8107
+ description: 'The phone line the simulated caller is on: packet loss applied to its 20 ms audio packets, per direction. The loss pattern is seeded per call, so a redial loses the same packets. CLEAR: No loss. MINOR_LOSS: 1% random, both ways. CELL_EDGE: 5% in 80 ms gaps, both ways. POOR_CONNECTION: 10% in 120 ms gaps, both ways. ONE_WAY_DEGRADED: 8% in 80 ms gaps, toward the agent only. CUSTOM: the per-direction loss in `lineCustom`, up to 20% in 0.5 steps, with a mean burst of up to 10 packets (omit it for random loss). Defaults to CLEAR.',
8108
+ valueKind: 'string',
8109
+ enumValues: ['CLEAR', 'MINOR_LOSS', 'CELL_EDGE', 'POOR_CONNECTION', 'ONE_WAY_DEGRADED', 'CUSTOM'],
8110
+ repeatable: false,
8111
+ },
8112
+ {
8113
+ name: 'line-custom',
8114
+ path: ['lineCustom'],
8115
+ location: 'body',
8116
+ required: false,
8117
+ description: 'The per-direction loss of a CUSTOM line.',
8118
+ valueKind: 'object',
8119
+ },
8120
+ {
8121
+ name: 'line-custom.to-agent',
8122
+ path: ['lineCustom', 'toAgent'],
8123
+ location: 'body',
8124
+ required: false,
8125
+ description: "The caller's audio on its way to the agent: what the agent hears. Omit for no loss.",
8126
+ valueKind: 'object',
8127
+ repeatable: false,
8128
+ },
8129
+ {
8130
+ name: 'line-custom.from-agent',
8131
+ path: ['lineCustom', 'fromAgent'],
8132
+ location: 'body',
8133
+ required: false,
8134
+ description: "The agent's audio on its way to the caller: what the caller hears. Omit for no loss.",
8135
+ valueKind: 'object',
8136
+ repeatable: false,
8137
+ },
6717
8138
  ],
6718
8139
  hasParams: true,
6719
8140
  paramsAllOptional: false,
@@ -6750,7 +8171,7 @@ exports.COMMANDS = [
6750
8171
  methodName: 'getByID',
6751
8172
  httpMethod: 'get',
6752
8173
  httpPath: '/v1/simulation/environment/{environmentId}',
6753
- summary: 'Get environment by ID',
8174
+ summary: 'Get an environment',
6754
8175
  description: 'Returns a single environment by its ID.',
6755
8176
  positionals: [
6756
8177
  {
@@ -6865,6 +8286,42 @@ exports.COMMANDS = [
6865
8286
  valueKind: 'number',
6866
8287
  repeatable: false,
6867
8288
  },
8289
+ {
8290
+ name: 'line-quality',
8291
+ path: ['lineQuality'],
8292
+ location: 'body',
8293
+ required: false,
8294
+ description: 'The phone line the simulated caller is on: packet loss applied to its 20 ms audio packets, per direction. The loss pattern is seeded per call, so a redial loses the same packets. CLEAR: No loss. MINOR_LOSS: 1% random, both ways. CELL_EDGE: 5% in 80 ms gaps, both ways. POOR_CONNECTION: 10% in 120 ms gaps, both ways. ONE_WAY_DEGRADED: 8% in 80 ms gaps, toward the agent only. CUSTOM: the per-direction loss in `lineCustom`, up to 20% in 0.5 steps, with a mean burst of up to 10 packets (omit it for random loss). Defaults to CLEAR.',
8295
+ valueKind: 'string',
8296
+ enumValues: ['CLEAR', 'MINOR_LOSS', 'CELL_EDGE', 'POOR_CONNECTION', 'ONE_WAY_DEGRADED', 'CUSTOM'],
8297
+ repeatable: false,
8298
+ },
8299
+ {
8300
+ name: 'line-custom',
8301
+ path: ['lineCustom'],
8302
+ location: 'body',
8303
+ required: false,
8304
+ description: 'The per-direction loss of a CUSTOM line.',
8305
+ valueKind: 'object',
8306
+ },
8307
+ {
8308
+ name: 'line-custom.to-agent',
8309
+ path: ['lineCustom', 'toAgent'],
8310
+ location: 'body',
8311
+ required: false,
8312
+ description: "The caller's audio on its way to the agent: what the agent hears. Omit for no loss.",
8313
+ valueKind: 'object',
8314
+ repeatable: false,
8315
+ },
8316
+ {
8317
+ name: 'line-custom.from-agent',
8318
+ path: ['lineCustom', 'fromAgent'],
8319
+ location: 'body',
8320
+ required: false,
8321
+ description: "The agent's audio on its way to the caller: what the caller hears. Omit for no loss.",
8322
+ valueKind: 'object',
8323
+ repeatable: false,
8324
+ },
6868
8325
  ],
6869
8326
  hasParams: true,
6870
8327
  paramsAllOptional: true,
@@ -6879,8 +8336,8 @@ exports.COMMANDS = [
6879
8336
  methodName: 'create',
6880
8337
  httpMethod: 'post',
6881
8338
  httpPath: '/v1/simulation/group',
6882
- summary: 'Create a simulation group',
6883
- description: 'Saves a named set of plans to run together, again and again. Nothing runs yet: POST /v1/simulation/group/{groupId}/run starts one run of every plan and groups them into a run group with one combined report. Slack channels need Slack connected to the project. Email is on by default.',
8339
+ summary: 'Create a plan group',
8340
+ description: 'Saves a named set of plans to run together, again and again. Nothing runs yet: `POST /v1/simulation/group/{groupId}/run` starts one run of every plan and groups them into a run group with one combined report. Slack channels need Slack connected to the project. Email is on by default.',
6884
8341
  positionals: [],
6885
8342
  flags: [
6886
8343
  {
@@ -6949,7 +8406,7 @@ exports.COMMANDS = [
6949
8406
  methodName: 'delete',
6950
8407
  httpMethod: 'delete',
6951
8408
  httpPath: '/v1/simulation/group/{groupId}',
6952
- summary: 'Delete a simulation group',
8409
+ summary: 'Delete a plan group',
6953
8410
  description: 'Deletes a saved simulation group and any schedules that run it. Run groups it already started, and their reports, stay. A group managed by config as code returns 409.',
6954
8411
  positionals: [
6955
8412
  {
@@ -6972,7 +8429,7 @@ exports.COMMANDS = [
6972
8429
  methodName: 'getByID',
6973
8430
  httpMethod: 'get',
6974
8431
  httpPath: '/v1/simulation/group/{groupId}',
6975
- summary: 'Get a simulation group',
8432
+ summary: 'Get a plan group',
6976
8433
  description: 'Returns a saved simulation group with its plans in run order and notification settings.',
6977
8434
  positionals: [
6978
8435
  {
@@ -6995,7 +8452,7 @@ exports.COMMANDS = [
6995
8452
  methodName: 'list',
6996
8453
  httpMethod: 'get',
6997
8454
  httpPath: '/v1/simulation/group',
6998
- summary: 'List simulation groups',
8455
+ summary: 'List plan groups',
6999
8456
  description: 'Returns the saved simulation groups in the project, most recently edited first, each with its plans in run order and notification settings.',
7000
8457
  positionals: [],
7001
8458
  flags: [
@@ -7031,8 +8488,8 @@ exports.COMMANDS = [
7031
8488
  methodName: 'run',
7032
8489
  httpMethod: 'post',
7033
8490
  httpPath: '/v1/simulation/group/{groupId}/run',
7034
- summary: 'Run a simulation group',
7035
- description: "Starts one run of every plan in the group, exactly as POST /v1/simulation/plan/{planId}/job would for each, and groups the runs into a run group whose combined report is announced through the group's notification settings once it is ready. This places real calls. Config-managed groups can be run here too. Returns the run group. Poll GET /v1/simulation/run-group/{groupId} until `latestReport.status` is READY. If a plan cannot start after others did, the runs that started are still grouped and the 400 names the run group id.",
8491
+ summary: 'Run a plan group',
8492
+ description: "Starts one run of every plan in the group, exactly as `POST /v1/simulation/plan/{planId}/job` would for each, and groups the runs into a run group whose combined report is announced through the group's notification settings once it is ready. This places real calls. Config-managed groups can be run here too. Returns the run group. Poll GET /v1/simulation/run-group/{groupId} until `latestReport.status` is READY. If a plan cannot start after others did, the runs that started are still grouped and the 400 names the run group id.",
7036
8493
  positionals: [
7037
8494
  {
7038
8495
  name: 'group-id',
@@ -7054,7 +8511,7 @@ exports.COMMANDS = [
7054
8511
  methodName: 'update',
7055
8512
  httpMethod: 'put',
7056
8513
  httpPath: '/v1/simulation/group/{groupId}',
7057
- summary: 'Update a simulation group',
8514
+ summary: 'Update a plan group',
7058
8515
  description: 'Edits a saved simulation group. Omitted fields keep their current value; `notifications`, when sent, replaces the settings as a whole. Run groups it already started keep theirs. A group managed by config as code (`configManaged: true`) returns 409: change it in the config file.',
7059
8516
  positionals: [
7060
8517
  {
@@ -7129,7 +8586,7 @@ exports.COMMANDS = [
7129
8586
  methodName: 'getByID',
7130
8587
  httpMethod: 'get',
7131
8588
  httpPath: '/v1/simulation/job/{jobId}',
7132
- summary: 'Get simulation by ID',
8589
+ summary: 'Get a simulated call',
7133
8590
  description: 'Get a individual simulation run directly by its ID. This is generally part of a larger simulation run plan job.',
7134
8591
  positionals: [
7135
8592
  {
@@ -7152,7 +8609,7 @@ exports.COMMANDS = [
7152
8609
  methodName: 'lookup',
7153
8610
  httpMethod: 'get',
7154
8611
  httpPath: '/v1/simulation/job/lookup',
7155
- summary: 'Lookup by phone number',
8612
+ summary: 'Find a simulated call by phone number',
7156
8613
  description: 'Find the matching simulation using the number used by the Roark simulation agent.',
7157
8614
  positionals: [],
7158
8615
  flags: [
@@ -7211,7 +8668,7 @@ exports.COMMANDS = [
7211
8668
  methodName: 'create',
7212
8669
  httpMethod: 'post',
7213
8670
  httpPath: '/v1/persona',
7214
- summary: 'Create a new persona',
8671
+ summary: 'Create a persona',
7215
8672
  description: 'Creates a new persona for the authenticated project.',
7216
8673
  positionals: [],
7217
8674
  flags: [
@@ -7555,7 +9012,7 @@ exports.COMMANDS = [
7555
9012
  methodName: 'getByID',
7556
9013
  httpMethod: 'get',
7557
9014
  httpPath: '/v1/persona/{personaId}',
7558
- summary: 'Get persona by ID',
9015
+ summary: 'Get a persona',
7559
9016
  description: 'Returns a specific persona by its ID.',
7560
9017
  positionals: [
7561
9018
  {
@@ -7897,7 +9354,7 @@ exports.COMMANDS = [
7897
9354
  path: ['interruption'],
7898
9355
  location: 'body',
7899
9356
  required: false,
7900
- description: 'How much the persona talks over the agent while it is still speaking. OFF waits its turn. BACKCHANNEL makes listening noises ("mm-hm") over the agent without taking the floor, which tests whether the agent wrongly stops for them. OCCASIONAL adds cutting in on some long agent turns, HEAVY on most of them. Timing is randomised per turn, so two runs of the same persona do not interrupt at identical moments.',
9357
+ description: 'How much the persona talks over the agent while it is still speaking. OFF waits its turn. BACKCHANNEL makes listening noises ("mm-hm") over the agent without taking the floor, which tests whether the agent wrongly stops for them. OCCASIONAL also cuts in where a caller like this plausibly would, and HEAVY does so readily, though never on every turn. The moments are chosen from what the agent is saying, such as reading back a number or starting a long explanation, not on a timer. A customer flow can also say exactly when to cut in, which applies at any level.',
7901
9358
  valueKind: 'string',
7902
9359
  enumValues: ['OFF', 'BACKCHANNEL', 'OCCASIONAL', 'HEAVY'],
7903
9360
  repeatable: false,
@@ -8019,7 +9476,7 @@ exports.COMMANDS = [
8019
9476
  methodName: 'getByID',
8020
9477
  httpMethod: 'get',
8021
9478
  httpPath: '/v1/simulation/plan/{planId}',
8022
- summary: 'Get run plan by ID',
9479
+ summary: 'Get a run plan',
8023
9480
  description: 'Returns a specific simulation run plan by its ID.',
8024
9481
  positionals: [
8025
9482
  {
@@ -8042,7 +9499,7 @@ exports.COMMANDS = [
8042
9499
  methodName: 'cancel',
8043
9500
  httpMethod: 'post',
8044
9501
  httpPath: '/v1/simulation/plan/job/{jobId}/cancel',
8045
- summary: 'Cancel a simulation plan job',
9502
+ summary: 'Cancel a simulation run',
8046
9503
  description: 'Stops a run that has not finished yet. Already-finished runs are left alone. Intended for CI: when a pipeline is cancelled or superseded, cancelling the run stops it placing calls you no longer need. Safe to call more than once.',
8047
9504
  positionals: [
8048
9505
  {
@@ -8065,7 +9522,7 @@ exports.COMMANDS = [
8065
9522
  methodName: 'getCost',
8066
9523
  httpMethod: 'get',
8067
9524
  httpPath: '/v1/simulation/plan/job/{jobId}/cost',
8068
- summary: 'Get simulation run cost',
9525
+ summary: "Get a simulation run's cost",
8069
9526
  description: 'The billable spend for one simulation run (run plan job), split by cost type, with the spend of each simulated call in it. Safe to call while the run is in progress: totals reflect the costs recorded so far. Amounts are billable spend only, in exact micro-dollars (`*UsdMicros`) and dollars (`*Usd`, for display). Requires an API key with the `billing:read` permission.',
8070
9527
  positionals: [
8071
9528
  {
@@ -8087,7 +9544,7 @@ exports.COMMANDS = [
8087
9544
  methodName: 'createDebrief',
8088
9545
  httpMethod: 'post',
8089
9546
  httpPath: '/v1/simulation/plan/job/{jobId}/debrief',
8090
- summary: 'Generate simulation run debrief',
9547
+ summary: 'Generate a simulation run debrief',
8091
9548
  description: 'Request the written debrief for a settled run: executive summary, failure themes and recommendations. Runs with graded calls get one automatically, so this is for regenerating one (`regenerate: true`) or retrying one that failed. Returns immediately. Generation takes a few minutes: poll GET /v1/simulation/plan/job/{jobId}/results until `debrief.status` is READY or FAILED. Without `regenerate`, a debrief that is ready or already being written is returned as-is.',
8092
9549
  positionals: [
8093
9550
  {
@@ -8119,7 +9576,7 @@ exports.COMMANDS = [
8119
9576
  methodName: 'delete',
8120
9577
  httpMethod: 'delete',
8121
9578
  httpPath: '/v1/simulation/plan/job/{jobId}',
8122
- summary: 'Delete a simulation plan job',
9579
+ summary: 'Delete a simulation run',
8123
9580
  description: 'Removes a finished run from the run history (a soft delete). The run stops appearing in run lists, counts and plan run histories, and reading it by ID returns 404. A run that is still in progress is refused with 409: cancel it first.',
8124
9581
  positionals: [
8125
9582
  {
@@ -8142,7 +9599,7 @@ exports.COMMANDS = [
8142
9599
  methodName: 'getByID',
8143
9600
  httpMethod: 'get',
8144
9601
  httpPath: '/v1/simulation/plan/job/{jobId}',
8145
- summary: 'Get simulation plan job',
9602
+ summary: 'Get a simulation run',
8146
9603
  description: 'Retrieve details of a simulation plan job including all associated simulation jobs (calls)',
8147
9604
  positionals: [
8148
9605
  {
@@ -8165,7 +9622,7 @@ exports.COMMANDS = [
8165
9622
  methodName: 'list',
8166
9623
  httpMethod: 'get',
8167
9624
  httpPath: '/v1/simulation/plan/jobs',
8168
- summary: 'List simulation plan jobs',
9625
+ summary: 'List simulation runs',
8169
9626
  description: 'Returns a paginated list of simulation run plan jobs. Filter by status, plan ID, or label to find specific simulation batches.',
8170
9627
  positionals: [],
8171
9628
  flags: [
@@ -8251,7 +9708,7 @@ exports.COMMANDS = [
8251
9708
  methodName: 'getResults',
8252
9709
  httpMethod: 'get',
8253
9710
  httpPath: '/v1/simulation/plan/job/{jobId}/results',
8254
- summary: 'Get simulation run results',
9711
+ summary: "Get a simulation run's results",
8255
9712
  description: 'Everything the run report shows, in one request: the summary and score, the pass/fail verdict, per-metric aggregates, every simulation with its check results, breakdowns by agent and persona, the comparison against the previous run (or `compareToJobId`), the sweep attribution, and the written debrief with its executive summary, failure themes and recommendations. Safe to call while the run is in progress: counts reflect what has landed so far. `verdict` and `sweepAttribution` stay null until the run ends. The debrief is generated automatically a few minutes after a run with graded calls settles; poll until `debrief.status` is READY, or request one with POST /v1/simulation/plan/job/{jobId}/debrief.',
8256
9713
  positionals: [
8257
9714
  {
@@ -8471,6 +9928,24 @@ exports.COMMANDS = [
8471
9928
  valueKind: 'integer',
8472
9929
  repeatable: false,
8473
9930
  },
9931
+ {
9932
+ name: 'calls-per-second',
9933
+ path: ['callsPerSecond'],
9934
+ location: 'body',
9935
+ required: false,
9936
+ description: "The most simulations a run starts per second (0.01-10), fractional allowed: 0.2 starts one every 5 seconds. Omitted or `null` starts them as fast as `maxConcurrentJobs` allows. The concurrency limit still applies on top, so a run holds the rate only while calls last under `maxConcurrentJobs` / `callsPerSecond` seconds. A run reports the rate it achieved as `dialRate.achievedCallsPerSecond`. A rate above the project's concurrency limit / 30 is refused with 400: that limit could only hold it with calls under 30 seconds. Send `null` to remove the rate; omit to leave it unchanged.",
9937
+ valueKind: 'number',
9938
+ repeatable: false,
9939
+ },
9940
+ {
9941
+ name: 'ramp-up-seconds',
9942
+ path: ['rampUpSeconds'],
9943
+ location: 'body',
9944
+ required: false,
9945
+ description: 'Seconds over which the rate climbs linearly from 0 to `callsPerSecond` (0-3600). Omitted, `null` or 0 starts at the full rate. Only used with `callsPerSecond`. Send `null` to remove the ramp; omit to leave it unchanged.',
9946
+ valueKind: 'integer',
9947
+ repeatable: false,
9948
+ },
8474
9949
  {
8475
9950
  name: 'end-call-phrases',
8476
9951
  path: ['endCallPhrases'],
@@ -8589,6 +10064,7 @@ exports.COMMANDS = [
8589
10064
  'INTENT_CLARITY',
8590
10065
  'LANGUAGE',
8591
10066
  'INTERRUPTION',
10067
+ 'LINE_QUALITY',
8592
10068
  'MEMORY_RELIABILITY',
8593
10069
  'RESPONSE_TIMING',
8594
10070
  'SPEECH_CLARITY',
@@ -8597,56 +10073,338 @@ exports.COMMANDS = [
8597
10073
  repeatable: false,
8598
10074
  },
8599
10075
  {
8600
- name: 'comparison-baseline',
8601
- path: ['comparisonBaseline'],
10076
+ name: 'comparison-baseline',
10077
+ path: ['comparisonBaseline'],
10078
+ location: 'body',
10079
+ required: false,
10080
+ description: 'The reference value, shown first in the results. See `POST /v1/simulation/plan`. A real value cannot be sent on its own: the property it belongs to decides which values are legal, and an omitted property means "leave unchanged", which this endpoint cannot check a baseline against. Send `comparisonProperty` with it, or get a `400`. `null` on its own IS allowed, and clears just the baseline while leaving the property set. Nothing needs validating when clearing, and a property with no baseline is a real state: the report falls back to that property\'s own norm, and `GENDER` has no norm to fall back to.',
10081
+ valueKind: 'string',
10082
+ repeatable: false,
10083
+ },
10084
+ {
10085
+ name: 'comparison-values',
10086
+ path: ['comparisonValues'],
10087
+ location: 'body',
10088
+ required: false,
10089
+ description: 'The arms to run. See `POST /v1/simulation/plan`. Omitting it keeps the arms the plan already has, pins included, so an edit that only renames the plan never widens a sweep you deliberately narrowed, and never multiplies what it costs. Send it with `comparisonProperty` and `flows`, which the arms are rebuilt from.',
10090
+ valueKind: 'array',
10091
+ repeatable: false,
10092
+ },
10093
+ {
10094
+ name: 'notifications',
10095
+ path: ['notifications'],
10096
+ location: 'body',
10097
+ required: false,
10098
+ description: "Where each run's report announces itself once it is ready.",
10099
+ valueKind: 'object',
10100
+ },
10101
+ {
10102
+ name: 'notifications.email',
10103
+ path: ['notifications', 'email'],
10104
+ location: 'body',
10105
+ required: false,
10106
+ valueKind: 'object',
10107
+ repeatable: false,
10108
+ },
10109
+ {
10110
+ name: 'notifications.slack',
10111
+ path: ['notifications', 'slack'],
10112
+ location: 'body',
10113
+ required: false,
10114
+ description: "Channels in the project's connected Slack workspace to post the report to (at most 10). Slack must be connected to the project first.",
10115
+ valueKind: 'array',
10116
+ repeatable: false,
10117
+ },
10118
+ ],
10119
+ hasParams: true,
10120
+ paramsAllOptional: true,
10121
+ bodyOpaque: false,
10122
+ bodyVariants: [],
10123
+ acceptsBody: true,
10124
+ requiresAuth: true,
10125
+ },
10126
+ {
10127
+ commandPath: ['simulation', 'resource', 'generate'],
10128
+ clientProperty: 'simulation',
10129
+ methodName: 'generateResources',
10130
+ httpMethod: 'post',
10131
+ httpPath: '/v1/simulation/generations/resources',
10132
+ summary: 'Generate simulation resources',
10133
+ description: "Works out what to test for an existing agent, then creates the customer flows, metrics and checks to simulate it, and a run plan that runs them. It does not create or change the agent. It also reads the agent's recent production calls and open issues. Run it again and it builds on what earlier generations made, adding only what changed; when nothing has, it finishes straight away and says so. Runs in the background: watch the `simulation.resource_generation.completed` webhook, or poll `GET /v1/simulation/generations/resources/{generationId}`. Takes one agent for now. Refused while another generation for the agent is running. Needs the 'simulation:create' and 'metric:create' permissions. Exploration also needs 'simulation:run', and is turned off for keys without it unless explore.enabled is set.",
10134
+ positionals: [],
10135
+ flags: [
10136
+ {
10137
+ name: 'agent-ids',
10138
+ path: ['agentIds'],
10139
+ location: 'body',
10140
+ required: true,
10141
+ description: 'The agents to generate simulation resources for. One agent per generation for now.',
10142
+ valueKind: 'array',
10143
+ repeatable: true,
10144
+ },
10145
+ {
10146
+ name: 'industry',
10147
+ path: ['industry'],
10148
+ location: 'body',
10149
+ required: false,
10150
+ description: 'The industry the agent serves.',
10151
+ valueKind: 'string',
10152
+ enumValues: [
10153
+ 'HEALTHCARE',
10154
+ 'FINANCIAL_SERVICES',
10155
+ 'INSURANCE',
10156
+ 'DEBT_COLLECTION',
10157
+ 'RETAIL',
10158
+ 'TRAVEL_AND_HOSPITALITY',
10159
+ 'TELECOMMUNICATIONS',
10160
+ 'TECHNOLOGY',
10161
+ 'PUBLIC_SECTOR',
10162
+ 'UTILITIES',
10163
+ 'LOGISTICS',
10164
+ 'AUTOMOTIVE',
10165
+ 'HOME_SERVICES',
10166
+ 'RESTAURANTS',
10167
+ 'EDUCATION',
10168
+ 'OTHER',
10169
+ ],
10170
+ repeatable: false,
10171
+ },
10172
+ {
10173
+ name: 'website-url',
10174
+ path: ['websiteUrl'],
10175
+ location: 'body',
10176
+ required: false,
10177
+ description: 'A page Roark reads to learn about the business.',
10178
+ valueKind: 'string',
10179
+ repeatable: false,
10180
+ },
10181
+ {
10182
+ name: 'testing-instructions',
10183
+ path: ['testingInstructions'],
8602
10184
  location: 'body',
8603
10185
  required: false,
8604
- description: 'The reference value, shown first in the results. See `POST /v1/simulation/plan`. A real value cannot be sent on its own: the property it belongs to decides which values are legal, and an omitted property means "leave unchanged", which this endpoint cannot check a baseline against. Send `comparisonProperty` with it, or get a `400`. `null` on its own IS allowed, and clears just the baseline while leaving the property set. Nothing needs validating when clearing, and a property with no baseline is a real state: the report falls back to that property\'s own norm, and `GENDER` has no norm to fall back to.',
10186
+ description: 'What you want tested, in your own words. Each scenario you describe becomes a flow.',
8605
10187
  valueKind: 'string',
8606
10188
  repeatable: false,
8607
10189
  },
8608
10190
  {
8609
- name: 'comparison-values',
8610
- path: ['comparisonValues'],
10191
+ name: 'capabilities',
10192
+ path: ['capabilities'],
8611
10193
  location: 'body',
8612
10194
  required: false,
8613
- description: 'The arms to run. See `POST /v1/simulation/plan`. Omitting it keeps the arms the plan already has, pins included, so an edit that only renames the plan never widens a sweep you deliberately narrowed, and never multiplies what it costs. Send it with `comparisonProperty` and `flows`, which the arms are rebuilt from.',
10195
+ description: 'The capabilities to test. Omit to let Roark work them out from the agent.',
8614
10196
  valueKind: 'array',
10197
+ enumValues: [
10198
+ 'APPOINTMENT_BOOKING',
10199
+ 'FAQ',
10200
+ 'IDENTITY_VERIFICATION',
10201
+ 'ACCOUNT_MANAGEMENT',
10202
+ 'BILLING_AND_PAYMENTS',
10203
+ 'ORDER_MANAGEMENT',
10204
+ 'TROUBLESHOOTING',
10205
+ 'CALL_ROUTING',
10206
+ 'LEAD_QUALIFICATION',
10207
+ 'COLLECTIONS',
10208
+ 'OUTBOUND_CALLING',
10209
+ ],
10210
+ repeatable: true,
10211
+ },
10212
+ {
10213
+ name: 'agent-endpoint-id',
10214
+ path: ['agentEndpointId'],
10215
+ location: 'body',
10216
+ required: false,
10217
+ description: "The endpoint the run plan calls. Defaults to the agent's newest endpoint.",
10218
+ valueKind: 'string',
8615
10219
  repeatable: false,
8616
10220
  },
8617
10221
  {
8618
- name: 'notifications',
8619
- path: ['notifications'],
10222
+ name: 'explore',
10223
+ path: ['explore'],
8620
10224
  location: 'body',
8621
10225
  required: false,
8622
- description: "Where each run's report announces itself once it is ready.",
10226
+ description: 'Exploration settings',
8623
10227
  valueKind: 'object',
8624
10228
  },
8625
10229
  {
8626
- name: 'notifications.email',
8627
- path: ['notifications', 'email'],
10230
+ name: 'explore.enabled',
10231
+ path: ['explore', 'enabled'],
8628
10232
  location: 'body',
8629
10233
  required: false,
8630
- valueKind: 'object',
10234
+ description: 'Whether Roark calls the agent to discover what it does before finishing the generation. Exploration calls are billed.',
10235
+ valueKind: 'boolean',
8631
10236
  repeatable: false,
8632
10237
  },
8633
10238
  {
8634
- name: 'notifications.slack',
8635
- path: ['notifications', 'slack'],
10239
+ name: 'explore.max-conversations',
10240
+ path: ['explore', 'maxConversations'],
8636
10241
  location: 'body',
8637
10242
  required: false,
8638
- description: "Channels in the project's connected Slack workspace to post the report to (at most 10). Slack must be connected to the project first.",
8639
- valueKind: 'array',
10243
+ description: 'The most exploration calls Roark places.',
10244
+ valueKind: 'integer',
10245
+ repeatable: false,
10246
+ },
10247
+ {
10248
+ name: 'explore.max-conversation-minutes',
10249
+ path: ['explore', 'maxConversationMinutes'],
10250
+ location: 'body',
10251
+ required: false,
10252
+ description: 'The longest a single exploration call may last, in minutes.',
10253
+ valueKind: 'integer',
10254
+ repeatable: false,
10255
+ },
10256
+ ],
10257
+ hasParams: true,
10258
+ paramsAllOptional: false,
10259
+ bodyOpaque: false,
10260
+ bodyVariants: [],
10261
+ acceptsBody: true,
10262
+ requiresAuth: true,
10263
+ },
10264
+ {
10265
+ commandPath: ['simulation', 'resource-generation', 'answer'],
10266
+ clientProperty: 'simulation',
10267
+ methodName: 'answerResourceGeneration',
10268
+ httpMethod: 'post',
10269
+ httpPath: '/v1/simulation/generations/resources/{generationId}/answer',
10270
+ summary: "Answer a simulation resource generation's question",
10271
+ description: 'Answers the question a simulation resource generation is waiting on (status NEEDS_INPUT). If nobody answers within 15 minutes, it goes ahead with its default.',
10272
+ positionals: [
10273
+ {
10274
+ name: 'generation-id',
10275
+ paramKey: 'generationId',
10276
+ },
10277
+ ],
10278
+ flags: [
10279
+ {
10280
+ name: 'text',
10281
+ path: ['text'],
10282
+ location: 'body',
10283
+ required: true,
10284
+ description: 'What you want the generation to know',
10285
+ valueKind: 'string',
8640
10286
  repeatable: false,
8641
10287
  },
8642
10288
  ],
8643
10289
  hasParams: true,
10290
+ paramsAllOptional: false,
10291
+ bodyOpaque: false,
10292
+ bodyVariants: [],
10293
+ acceptsBody: true,
10294
+ requiresAuth: true,
10295
+ },
10296
+ {
10297
+ commandPath: ['simulation', 'resource-generation', 'cancel'],
10298
+ clientProperty: 'simulation',
10299
+ methodName: 'cancelResourceGeneration',
10300
+ httpMethod: 'post',
10301
+ httpPath: '/v1/simulation/generations/resources/{generationId}/cancel',
10302
+ summary: 'Cancel a running simulation resource generation',
10303
+ description: 'Stops a running simulation resource generation. Flows and metrics it already created are kept; no run plan is made. Refused once the generation has finished.',
10304
+ positionals: [
10305
+ {
10306
+ name: 'generation-id',
10307
+ paramKey: 'generationId',
10308
+ },
10309
+ ],
10310
+ flags: [],
10311
+ hasParams: false,
10312
+ paramsAllOptional: true,
10313
+ bodyOpaque: false,
10314
+ bodyVariants: [],
10315
+ acceptsBody: false,
10316
+ requiresAuth: true,
10317
+ },
10318
+ {
10319
+ commandPath: ['simulation', 'resource-generation', 'get'],
10320
+ clientProperty: 'simulation',
10321
+ methodName: 'getResourceGeneration',
10322
+ httpMethod: 'get',
10323
+ httpPath: '/v1/simulation/generations/resources/{generationId}',
10324
+ summary: 'Get a simulation resource generation',
10325
+ description: 'Returns one simulation resource generation, for example the one a webhook named.',
10326
+ positionals: [
10327
+ {
10328
+ name: 'generation-id',
10329
+ paramKey: 'generationId',
10330
+ },
10331
+ ],
10332
+ flags: [],
10333
+ hasParams: false,
8644
10334
  paramsAllOptional: true,
8645
10335
  bodyOpaque: false,
8646
10336
  bodyVariants: [],
10337
+ acceptsBody: false,
10338
+ requiresAuth: true,
10339
+ },
10340
+ {
10341
+ commandPath: ['simulation', 'resource-generation', 'guidance', 'send'],
10342
+ clientProperty: 'simulation',
10343
+ methodName: 'guideResourceGeneration',
10344
+ httpMethod: 'post',
10345
+ httpPath: '/v1/simulation/generations/resources/{generationId}/guidance',
10346
+ summary: 'Guide a running simulation resource generation',
10347
+ description: 'Tells a running simulation resource generation what to focus on or avoid, in your own words. It reads it on its next turn and it outranks its own plan. Refused once the generation has finished.',
10348
+ positionals: [
10349
+ {
10350
+ name: 'generation-id',
10351
+ paramKey: 'generationId',
10352
+ },
10353
+ ],
10354
+ flags: [
10355
+ {
10356
+ name: 'text',
10357
+ path: ['text'],
10358
+ location: 'body',
10359
+ required: true,
10360
+ description: 'What you want the generation to know',
10361
+ valueKind: 'string',
10362
+ repeatable: false,
10363
+ },
10364
+ ],
10365
+ hasParams: true,
10366
+ paramsAllOptional: false,
10367
+ bodyOpaque: false,
10368
+ bodyVariants: [],
8647
10369
  acceptsBody: true,
8648
10370
  requiresAuth: true,
8649
10371
  },
10372
+ {
10373
+ commandPath: ['simulation', 'resource-generation', 'list'],
10374
+ clientProperty: 'simulation',
10375
+ methodName: 'listResourceGenerations',
10376
+ httpMethod: 'get',
10377
+ httpPath: '/v1/simulation/generations/resources',
10378
+ summary: 'List simulation resource generations',
10379
+ description: "Returns the project's simulation resource generations, newest first, optionally only for some agents: each one's progress, the run plan it created, and every flow, metric and check it added or left out, with the reason and the source it came from.",
10380
+ positionals: [],
10381
+ flags: [
10382
+ {
10383
+ name: 'agent-ids',
10384
+ path: ['agentIds'],
10385
+ location: 'query',
10386
+ required: false,
10387
+ description: 'Only generations for these agents, comma-separated, at most 100. Omit for every agent.',
10388
+ valueKind: 'string',
10389
+ repeatable: false,
10390
+ },
10391
+ {
10392
+ name: 'limit',
10393
+ path: ['limit'],
10394
+ location: 'query',
10395
+ required: false,
10396
+ description: 'How many to return, newest first. Default 20, max 50.',
10397
+ valueKind: 'integer',
10398
+ repeatable: false,
10399
+ },
10400
+ ],
10401
+ hasParams: true,
10402
+ paramsAllOptional: true,
10403
+ bodyOpaque: false,
10404
+ bodyVariants: [],
10405
+ acceptsBody: false,
10406
+ requiresAuth: true,
10407
+ },
8650
10408
  {
8651
10409
  commandPath: ['simulation', 'run'],
8652
10410
  clientProperty: 'simulation',
@@ -8779,7 +10537,7 @@ exports.COMMANDS = [
8779
10537
  httpMethod: 'get',
8780
10538
  httpPath: '/v1/simulation/run-group',
8781
10539
  summary: 'List run groups',
8782
- description: 'Returns the run groups in the project, newest first, with their runs and where each group report stands. Read a report document from GET /v1/simulation/run-group/{groupId}.',
10540
+ description: 'Returns the run groups in the project, newest first, with their runs and where each group report stands. Read a report document from `GET /v1/simulation/run-group/{groupId}`.',
8783
10541
  positionals: [],
8784
10542
  flags: [
8785
10543
  {
@@ -9077,7 +10835,7 @@ exports.COMMANDS = [
9077
10835
  httpMethod: 'post',
9078
10836
  httpPath: '/v1/tool',
9079
10837
  summary: 'Create a tool',
9080
- description: 'Creates a tool and declares its first version. A tool only recorded from calls under the same name is adopted; one already declared returns 409. Give it a `runtime` for a hosted agent to call your endpoint. Header values are returned on read, so keep secrets out of them.',
10838
+ description: 'Creates a tool and declares its first version. A tool only recorded from calls under the same name is adopted; one already declared returns 409. Give it a `runtime` for a hosted agent to call your endpoint, a `calendar` for it to book on a calendar connected to the project, or `mcp` for it to call a tool on an MCP server connected to the project. Header values are returned on read, so keep secrets out of them.',
9081
10839
  positionals: [],
9082
10840
  flags: [
9083
10841
  {
@@ -9169,6 +10927,88 @@ exports.COMMANDS = [
9169
10927
  valueKind: 'object',
9170
10928
  repeatable: false,
9171
10929
  },
10930
+ {
10931
+ name: 'calendar',
10932
+ path: ['calendar'],
10933
+ location: 'body',
10934
+ required: false,
10935
+ description: 'Makes this a calendar tool, which Roark runs against a connected calendar: it takes no runtime and no inputs. Omit or null for any other tool; on update, omitting it makes the tool an ordinary one.',
10936
+ valueKind: 'object',
10937
+ },
10938
+ {
10939
+ name: 'calendar.calendar-connection-id',
10940
+ path: ['calendar', 'calendarConnectionId'],
10941
+ location: 'body',
10942
+ required: true,
10943
+ valueKind: 'string',
10944
+ repeatable: false,
10945
+ },
10946
+ {
10947
+ name: 'calendar.operation',
10948
+ path: ['calendar', 'operation'],
10949
+ location: 'body',
10950
+ required: true,
10951
+ valueKind: 'string',
10952
+ enumValues: ['CHECK_AVAILABILITY', 'BOOK', 'LOOKUP_BOOKING', 'RESCHEDULE', 'CANCEL', 'LIST_BOOKINGS'],
10953
+ repeatable: false,
10954
+ },
10955
+ {
10956
+ name: 'calendar.appointment-types',
10957
+ path: ['calendar', 'appointmentTypes'],
10958
+ location: 'body',
10959
+ required: true,
10960
+ valueKind: 'array',
10961
+ repeatable: false,
10962
+ },
10963
+ {
10964
+ name: 'calendar.simulate',
10965
+ path: ['calendar', 'simulate'],
10966
+ location: 'body',
10967
+ required: false,
10968
+ valueKind: 'boolean',
10969
+ repeatable: false,
10970
+ },
10971
+ {
10972
+ name: 'calendar.messages',
10973
+ path: ['calendar', 'messages'],
10974
+ location: 'body',
10975
+ required: false,
10976
+ valueKind: 'object',
10977
+ repeatable: false,
10978
+ },
10979
+ {
10980
+ name: 'mcp',
10981
+ path: ['mcp'],
10982
+ location: 'body',
10983
+ required: false,
10984
+ description: "Makes this a tool on one of the project's MCP servers: it takes no runtime, no inputs and no calendar, and the description replaces the server's own. On update, omitting it makes the tool an ordinary one.",
10985
+ valueKind: 'object',
10986
+ },
10987
+ {
10988
+ name: 'mcp.mcp-server-id',
10989
+ path: ['mcp', 'mcpServerId'],
10990
+ location: 'body',
10991
+ required: true,
10992
+ valueKind: 'string',
10993
+ repeatable: false,
10994
+ },
10995
+ {
10996
+ name: 'mcp.tool',
10997
+ path: ['mcp', 'tool'],
10998
+ location: 'body',
10999
+ required: true,
11000
+ description: 'The tool as the server names it',
11001
+ valueKind: 'string',
11002
+ repeatable: false,
11003
+ },
11004
+ {
11005
+ name: 'mcp.messages',
11006
+ path: ['mcp', 'messages'],
11007
+ location: 'body',
11008
+ required: false,
11009
+ valueKind: 'object',
11010
+ repeatable: false,
11011
+ },
9172
11012
  ],
9173
11013
  hasParams: true,
9174
11014
  paramsAllOptional: false,
@@ -9265,7 +11105,7 @@ exports.COMMANDS = [
9265
11105
  httpMethod: 'put',
9266
11106
  httpPath: '/v1/tool/{toolId}',
9267
11107
  summary: 'Update a tool',
9268
- description: 'Replaces the tool: its name, scope, inputs, description, grading hints and runtime. A field left out is cleared, so omitting agentId makes the tool project-wide. A change declares a new version; agent versions pinned to an older one keep it.',
11108
+ description: 'Replaces the tool: its name, scope, inputs, description, grading hints, runtime, calendar and MCP tool. A field left out is cleared, so omitting agentId makes the tool project-wide and omitting calendar or mcp makes it an ordinary tool. A change declares a new version; agent versions pinned to an older one keep it. A tool managed by config-as-code returns 409.',
9269
11109
  positionals: [
9270
11110
  {
9271
11111
  name: 'tool-id',
@@ -9362,6 +11202,88 @@ exports.COMMANDS = [
9362
11202
  valueKind: 'object',
9363
11203
  repeatable: false,
9364
11204
  },
11205
+ {
11206
+ name: 'calendar',
11207
+ path: ['calendar'],
11208
+ location: 'body',
11209
+ required: false,
11210
+ description: 'Makes this a calendar tool, which Roark runs against a connected calendar: it takes no runtime and no inputs. Omit or null for any other tool; on update, omitting it makes the tool an ordinary one.',
11211
+ valueKind: 'object',
11212
+ },
11213
+ {
11214
+ name: 'calendar.calendar-connection-id',
11215
+ path: ['calendar', 'calendarConnectionId'],
11216
+ location: 'body',
11217
+ required: true,
11218
+ valueKind: 'string',
11219
+ repeatable: false,
11220
+ },
11221
+ {
11222
+ name: 'calendar.operation',
11223
+ path: ['calendar', 'operation'],
11224
+ location: 'body',
11225
+ required: true,
11226
+ valueKind: 'string',
11227
+ enumValues: ['CHECK_AVAILABILITY', 'BOOK', 'LOOKUP_BOOKING', 'RESCHEDULE', 'CANCEL', 'LIST_BOOKINGS'],
11228
+ repeatable: false,
11229
+ },
11230
+ {
11231
+ name: 'calendar.appointment-types',
11232
+ path: ['calendar', 'appointmentTypes'],
11233
+ location: 'body',
11234
+ required: true,
11235
+ valueKind: 'array',
11236
+ repeatable: false,
11237
+ },
11238
+ {
11239
+ name: 'calendar.simulate',
11240
+ path: ['calendar', 'simulate'],
11241
+ location: 'body',
11242
+ required: false,
11243
+ valueKind: 'boolean',
11244
+ repeatable: false,
11245
+ },
11246
+ {
11247
+ name: 'calendar.messages',
11248
+ path: ['calendar', 'messages'],
11249
+ location: 'body',
11250
+ required: false,
11251
+ valueKind: 'object',
11252
+ repeatable: false,
11253
+ },
11254
+ {
11255
+ name: 'mcp',
11256
+ path: ['mcp'],
11257
+ location: 'body',
11258
+ required: false,
11259
+ description: "Makes this a tool on one of the project's MCP servers: it takes no runtime, no inputs and no calendar, and the description replaces the server's own. On update, omitting it makes the tool an ordinary one.",
11260
+ valueKind: 'object',
11261
+ },
11262
+ {
11263
+ name: 'mcp.mcp-server-id',
11264
+ path: ['mcp', 'mcpServerId'],
11265
+ location: 'body',
11266
+ required: true,
11267
+ valueKind: 'string',
11268
+ repeatable: false,
11269
+ },
11270
+ {
11271
+ name: 'mcp.tool',
11272
+ path: ['mcp', 'tool'],
11273
+ location: 'body',
11274
+ required: true,
11275
+ description: 'The tool as the server names it',
11276
+ valueKind: 'string',
11277
+ repeatable: false,
11278
+ },
11279
+ {
11280
+ name: 'mcp.messages',
11281
+ path: ['mcp', 'messages'],
11282
+ location: 'body',
11283
+ required: false,
11284
+ valueKind: 'object',
11285
+ repeatable: false,
11286
+ },
9365
11287
  ],
9366
11288
  hasParams: true,
9367
11289
  paramsAllOptional: false,
@@ -9376,7 +11298,7 @@ exports.COMMANDS = [
9376
11298
  methodName: 'get',
9377
11299
  httpMethod: 'get',
9378
11300
  httpPath: '/v1/usage',
9379
- summary: 'Get usage & cost',
11301
+ summary: 'Get usage and cost',
9380
11302
  description: "Report billable usage and cost for the organization over a time window, broken down by project (highest spend first). Pass `from`/`to` as ISO 8601 timestamps; optionally pass `projectId` to scope the report to one project. Amounts are billable spend only (what we absorb is never included). Authenticated by either an organization API key with the `usage:read` permission (any project in the organization), or a project API key with the `billing:read` permission (that key's own project only; any other `projectId` is a 403).",
9381
11303
  positionals: [],
9382
11304
  flags: [
@@ -9421,7 +11343,7 @@ exports.COMMANDS = [
9421
11343
  methodName: 'create',
9422
11344
  httpMethod: 'post',
9423
11345
  httpPath: '/v1/webhook',
9424
- summary: 'Create webhook',
11346
+ summary: 'Create a webhook',
9425
11347
  description: 'Creates a new webhook with event subscriptions. The signing secret is only returned in this response.',
9426
11348
  positionals: [],
9427
11349
  flags: [
@@ -9479,6 +11401,8 @@ exports.COMMANDS = [
9479
11401
  'CHAT_ANALYSIS_FAILED',
9480
11402
  'ISSUE_OPENED',
9481
11403
  'ISSUE_RESOLVED',
11404
+ 'SIMULATION_RESOURCE_GENERATION_COMPLETED',
11405
+ 'SIMULATION_RESOURCE_GENERATION_FAILED',
9482
11406
  ],
9483
11407
  repeatable: true,
9484
11408
  },
@@ -9496,7 +11420,7 @@ exports.COMMANDS = [
9496
11420
  methodName: 'delete',
9497
11421
  httpMethod: 'delete',
9498
11422
  httpPath: '/v1/webhook/{webhookId}',
9499
- summary: 'Delete webhook',
11423
+ summary: 'Delete a webhook',
9500
11424
  description: 'Deletes a webhook and all its event subscriptions.',
9501
11425
  positionals: [
9502
11426
  {
@@ -9519,7 +11443,7 @@ exports.COMMANDS = [
9519
11443
  methodName: 'getByID',
9520
11444
  httpMethod: 'get',
9521
11445
  httpPath: '/v1/webhook/{webhookId}',
9522
- summary: 'Get webhook by ID',
11446
+ summary: 'Get a webhook',
9523
11447
  description: 'Returns a specific webhook with its event subscriptions.',
9524
11448
  positionals: [
9525
11449
  {
@@ -9578,7 +11502,7 @@ exports.COMMANDS = [
9578
11502
  methodName: 'get',
9579
11503
  httpMethod: 'get',
9580
11504
  httpPath: '/v1/me',
9581
- summary: 'Describe the current credential',
11505
+ summary: 'Get the current credential',
9582
11506
  description: 'Returns the scope of the credential making the request, the organization it acts in, its default project (if any) and the permissions it was granted. Works for both project-scoped API keys and user-scoped credentials from the CLI or an MCP connector.',
9583
11507
  positionals: [],
9584
11508
  flags: [],