@roarkanalytics/cli 0.58.0 → 0.59.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.59.0](https://github.com/roarkhq/cli-roark-analytics/compare/v0.58.0...v0.59.0) (2026-10-28)
4
+
5
+
6
+ ### Features
7
+
8
+ * **cli:** cli update ([#152](https://github.com/roarkhq/cli-roark-analytics/issues/152)) ([650a36e](https://github.com/roarkhq/cli-roark-analytics/commit/650a36ea66ad12ed13a9d54a792e397c62921336))
9
+
3
10
  ## [0.58.0](https://github.com/roarkhq/cli-roark-analytics/compare/v0.57.0...v0.58.0) (2026-10-28)
4
11
 
5
12
 
package/README.md CHANGED
@@ -112,6 +112,11 @@ roark completion fish | source
112
112
  | ---------------------------------------------------------------------------------------------------------- | --------------------------- |
113
113
  | `roark agent build --name <value> --job-description <value> --tts.provider <value> --tts.voice-id <value>` | Build a Roark-hosted agent |
114
114
  | `roark agent create --name <value>` | Create a new agent |
115
+ | `roark agent draft create <agent-id>` | Start a draft |
116
+ | `roark agent draft delete <agent-id>` | Discard the draft |
117
+ | `roark agent draft get <agent-id>` | Get an agent's draft |
118
+ | `roark agent draft publish <agent-id> --expected-revision <value>` | Publish the draft |
119
+ | `roark agent draft update <agent-id> --settings <value>` | Edit the draft |
115
120
  | `roark agent endpoint create --agent-id <value> --value <value> --direction <value>` | Create a new agent endpoint |
116
121
  | `roark agent endpoint get <endpoint-id>` | Get agent endpoint by ID |
117
122
  | `roark agent endpoint list` | List agent endpoints |
@@ -122,6 +127,9 @@ roark completion fish | source
122
127
  | `roark agent prompt update <agent-id> --prompt <value>` | Set an agent's prompt |
123
128
  | `roark agent prompt version list <agent-id> <prompt-id>` | List a prompt's versions |
124
129
  | `roark agent update <agent-id>` | Update an agent |
130
+ | `roark agent version get <agent-id> <version-id>` | Get an agent version |
131
+ | `roark agent version list <agent-id>` | List an agent's versions |
132
+ | `roark agent version restore <agent-id> <version-id>` | Restore an agent version |
125
133
 
126
134
  ### agent-config
127
135
 
package/commands.js CHANGED
@@ -9,9 +9,11 @@ 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 draft': 'Manage agent drafts',
12
13
  'agent endpoint': 'Manage agent endpoints',
13
14
  'agent prompt': 'Manage agent prompts',
14
15
  'agent prompt version': 'Read agent prompt versions',
16
+ 'agent version': 'Read agent versions',
15
17
  'agent-config': 'Manage agent configs',
16
18
  'agent-config staging': 'Manage agent config staging',
17
19
  analytics: 'Read analyticses',
@@ -124,8 +126,9 @@ exports.COMMANDS = [
124
126
  path: ['tts', 'provider'],
125
127
  location: 'body',
126
128
  required: true,
127
- description: 'Text-to-speech provider, for example ELEVENLABS. Not checked against a known list.',
129
+ description: 'Text-to-speech provider, for example ELEVENLABS',
128
130
  valueKind: 'string',
131
+ enumValues: ['CARTESIA', 'ELEVENLABS', 'OPENAI', 'RIME'],
129
132
  repeatable: false,
130
133
  },
131
134
  {
@@ -190,6 +193,455 @@ exports.COMMANDS = [
190
193
  acceptsBody: true,
191
194
  requiresAuth: true,
192
195
  },
196
+ {
197
+ commandPath: ['agent', 'draft', 'create'],
198
+ clientProperty: 'agentDraft',
199
+ methodName: 'create',
200
+ httpMethod: 'post',
201
+ httpPath: '/v1/agent/{agentId}/draft',
202
+ summary: 'Start a draft',
203
+ description: "Opens the agent's one shared draft, a copy of the live version or of an older published version. Fails with 409 when a draft is already open.",
204
+ positionals: [
205
+ {
206
+ name: 'agent-id',
207
+ paramKey: 'agentId',
208
+ },
209
+ ],
210
+ flags: [
211
+ {
212
+ name: 'from-version-id',
213
+ path: ['fromVersionId'],
214
+ location: 'body',
215
+ required: false,
216
+ description: 'Start from this published version instead of the live one.',
217
+ valueKind: 'string',
218
+ repeatable: false,
219
+ },
220
+ ],
221
+ hasParams: true,
222
+ paramsAllOptional: true,
223
+ bodyOpaque: false,
224
+ bodyVariants: [],
225
+ acceptsBody: true,
226
+ requiresAuth: true,
227
+ },
228
+ {
229
+ commandPath: ['agent', 'draft', 'delete'],
230
+ clientProperty: 'agentDraft',
231
+ methodName: 'delete',
232
+ httpMethod: 'delete',
233
+ httpPath: '/v1/agent/{agentId}/draft',
234
+ summary: 'Discard the draft',
235
+ description: 'Throws the open draft away and returns it. The live version is unchanged.',
236
+ positionals: [
237
+ {
238
+ name: 'agent-id',
239
+ paramKey: 'agentId',
240
+ },
241
+ ],
242
+ flags: [],
243
+ hasParams: false,
244
+ paramsAllOptional: true,
245
+ bodyOpaque: false,
246
+ bodyVariants: [],
247
+ acceptsBody: false,
248
+ requiresAuth: true,
249
+ },
250
+ {
251
+ commandPath: ['agent', 'draft', 'get'],
252
+ clientProperty: 'agentDraft',
253
+ methodName: 'get',
254
+ httpMethod: 'get',
255
+ httpPath: '/v1/agent/{agentId}/draft',
256
+ summary: "Get an agent's draft",
257
+ description: "The agent's open draft, with the issues that would stop it from being published.",
258
+ positionals: [
259
+ {
260
+ name: 'agent-id',
261
+ paramKey: 'agentId',
262
+ },
263
+ ],
264
+ flags: [],
265
+ hasParams: false,
266
+ paramsAllOptional: true,
267
+ bodyOpaque: false,
268
+ bodyVariants: [],
269
+ acceptsBody: false,
270
+ requiresAuth: true,
271
+ },
272
+ {
273
+ commandPath: ['agent', 'draft', 'publish'],
274
+ clientProperty: 'agentDraft',
275
+ methodName: 'publish',
276
+ httpMethod: 'post',
277
+ httpPath: '/v1/agent/{agentId}/draft/publish',
278
+ summary: 'Publish the draft',
279
+ description: 'Makes the draft the live version, numbered v1, v2, ... Fails with 409 if the draft was edited after expectedRevision, if another version was published since the draft started, or if it changes nothing; with 400 and the issues if the version cannot run.',
280
+ positionals: [
281
+ {
282
+ name: 'agent-id',
283
+ paramKey: 'agentId',
284
+ },
285
+ ],
286
+ flags: [
287
+ {
288
+ name: 'expected-revision',
289
+ path: ['expectedRevision'],
290
+ location: 'body',
291
+ required: true,
292
+ description: 'The draft revision you reviewed.',
293
+ valueKind: 'integer',
294
+ repeatable: false,
295
+ },
296
+ {
297
+ name: 'summary',
298
+ path: ['summary'],
299
+ location: 'body',
300
+ required: false,
301
+ description: 'What changed.',
302
+ valueKind: 'string',
303
+ repeatable: false,
304
+ },
305
+ ],
306
+ hasParams: true,
307
+ paramsAllOptional: false,
308
+ bodyOpaque: false,
309
+ bodyVariants: [],
310
+ acceptsBody: true,
311
+ requiresAuth: true,
312
+ },
313
+ {
314
+ commandPath: ['agent', 'draft', 'update'],
315
+ clientProperty: 'agentDraft',
316
+ methodName: 'update',
317
+ httpMethod: 'patch',
318
+ httpPath: '/v1/agent/{agentId}/draft',
319
+ summary: 'Edit the draft',
320
+ description: 'Changes settings on the draft. Omitted settings stay as they are. Pass the revision you read as expectedRevision to fail with 409 if anyone edited the draft since, instead of applying on top of their edit.',
321
+ positionals: [
322
+ {
323
+ name: 'agent-id',
324
+ paramKey: 'agentId',
325
+ },
326
+ ],
327
+ flags: [
328
+ {
329
+ name: 'expected-revision',
330
+ path: ['expectedRevision'],
331
+ location: 'body',
332
+ required: false,
333
+ description: "The draft's revision when you read it. When sent, the edit is refused if the draft changed since; when omitted, it applies on top of the latest edit.",
334
+ valueKind: 'integer',
335
+ repeatable: false,
336
+ },
337
+ {
338
+ name: 'settings',
339
+ path: ['settings'],
340
+ location: 'body',
341
+ required: true,
342
+ description: 'The settings to change. Omitted settings stay as they are; null clears one to the runtime default. subAgents replaces every speaker and must include `main`.',
343
+ valueKind: 'object',
344
+ },
345
+ {
346
+ name: 'settings.modalities',
347
+ path: ['settings', 'modalities'],
348
+ location: 'body',
349
+ required: false,
350
+ valueKind: 'array',
351
+ enumValues: ['call', 'chat'],
352
+ repeatable: true,
353
+ },
354
+ {
355
+ name: 'settings.language',
356
+ path: ['settings', 'language'],
357
+ location: 'body',
358
+ required: false,
359
+ valueKind: 'string',
360
+ repeatable: false,
361
+ },
362
+ {
363
+ name: 'settings.first-message-mode',
364
+ path: ['settings', 'firstMessageMode'],
365
+ location: 'body',
366
+ required: false,
367
+ valueKind: 'string',
368
+ enumValues: ['SPEAK_TEXT', 'PLAY_AUDIO', 'WAIT_FOR_CALLER'],
369
+ repeatable: false,
370
+ },
371
+ {
372
+ name: 'settings.first-message',
373
+ path: ['settings', 'firstMessage'],
374
+ location: 'body',
375
+ required: false,
376
+ valueKind: 'string',
377
+ repeatable: false,
378
+ },
379
+ {
380
+ name: 'settings.first-message-audio-url',
381
+ path: ['settings', 'firstMessageAudioUrl'],
382
+ location: 'body',
383
+ required: false,
384
+ valueKind: 'string',
385
+ repeatable: false,
386
+ },
387
+ {
388
+ name: 'settings.llm-provider',
389
+ path: ['settings', 'llmProvider'],
390
+ location: 'body',
391
+ required: false,
392
+ valueKind: 'string',
393
+ enumValues: ['OPENAI', 'ANTHROPIC', 'GOOGLE', 'XAI', 'ULTRAVOX', 'AWS', 'ELEVENLABS'],
394
+ repeatable: false,
395
+ },
396
+ {
397
+ name: 'settings.llm-model',
398
+ path: ['settings', 'llmModel'],
399
+ location: 'body',
400
+ required: false,
401
+ valueKind: 'string',
402
+ repeatable: false,
403
+ },
404
+ {
405
+ name: 'settings.llm-temperature',
406
+ path: ['settings', 'llmTemperature'],
407
+ location: 'body',
408
+ required: false,
409
+ valueKind: 'number',
410
+ repeatable: false,
411
+ },
412
+ {
413
+ name: 'settings.llm-max-tokens',
414
+ path: ['settings', 'llmMaxTokens'],
415
+ location: 'body',
416
+ required: false,
417
+ valueKind: 'integer',
418
+ repeatable: false,
419
+ },
420
+ {
421
+ name: 'settings.llm-backend-model',
422
+ path: ['settings', 'llmBackendModel'],
423
+ location: 'body',
424
+ required: false,
425
+ valueKind: 'string',
426
+ repeatable: false,
427
+ },
428
+ {
429
+ name: 'settings.llm-voice',
430
+ path: ['settings', 'llmVoice'],
431
+ location: 'body',
432
+ required: false,
433
+ valueKind: 'string',
434
+ repeatable: false,
435
+ },
436
+ {
437
+ name: 'settings.stt-provider',
438
+ path: ['settings', 'sttProvider'],
439
+ location: 'body',
440
+ required: false,
441
+ valueKind: 'string',
442
+ enumValues: ['DEEPGRAM', 'OPENAI_WHISPER', 'SPEECHMATICS', 'ASSEMBLYAI', 'ELEVENLABS'],
443
+ repeatable: false,
444
+ },
445
+ {
446
+ name: 'settings.stt-model',
447
+ path: ['settings', 'sttModel'],
448
+ location: 'body',
449
+ required: false,
450
+ valueKind: 'string',
451
+ repeatable: false,
452
+ },
453
+ {
454
+ name: 'settings.stt-keyterms',
455
+ path: ['settings', 'sttKeyterms'],
456
+ location: 'body',
457
+ required: false,
458
+ valueKind: 'array',
459
+ repeatable: true,
460
+ },
461
+ {
462
+ name: 'settings.stt-smart-format',
463
+ path: ['settings', 'sttSmartFormat'],
464
+ location: 'body',
465
+ required: false,
466
+ valueKind: 'boolean',
467
+ repeatable: false,
468
+ },
469
+ {
470
+ name: 'settings.stt-endpointing-ms',
471
+ path: ['settings', 'sttEndpointingMs'],
472
+ location: 'body',
473
+ required: false,
474
+ valueKind: 'integer',
475
+ repeatable: false,
476
+ },
477
+ {
478
+ name: 'settings.stt-turn-detection',
479
+ path: ['settings', 'sttTurnDetection'],
480
+ location: 'body',
481
+ required: false,
482
+ valueKind: 'string',
483
+ enumValues: ['pipeline', 'provider'],
484
+ repeatable: false,
485
+ },
486
+ {
487
+ name: 'settings.interruption-mode',
488
+ path: ['settings', 'interruptionMode'],
489
+ location: 'body',
490
+ required: false,
491
+ valueKind: 'string',
492
+ enumValues: ['ALLOW', 'BLOCK'],
493
+ repeatable: false,
494
+ },
495
+ {
496
+ name: 'settings.vad-start-secs',
497
+ path: ['settings', 'vadStartSecs'],
498
+ location: 'body',
499
+ required: false,
500
+ valueKind: 'number',
501
+ repeatable: false,
502
+ },
503
+ {
504
+ name: 'settings.vad-stop-secs',
505
+ path: ['settings', 'vadStopSecs'],
506
+ location: 'body',
507
+ required: false,
508
+ valueKind: 'number',
509
+ repeatable: false,
510
+ },
511
+ {
512
+ name: 'settings.call-max-duration-seconds',
513
+ path: ['settings', 'callMaxDurationSeconds'],
514
+ location: 'body',
515
+ required: false,
516
+ valueKind: 'integer',
517
+ repeatable: false,
518
+ },
519
+ {
520
+ name: 'settings.call-silence-timeout-seconds',
521
+ path: ['settings', 'callSilenceTimeoutSeconds'],
522
+ location: 'body',
523
+ required: false,
524
+ valueKind: 'integer',
525
+ repeatable: false,
526
+ },
527
+ {
528
+ name: 'settings.idle-timeout-seconds',
529
+ path: ['settings', 'idleTimeoutSeconds'],
530
+ location: 'body',
531
+ required: false,
532
+ valueKind: 'integer',
533
+ repeatable: false,
534
+ },
535
+ {
536
+ name: 'settings.idle-max-count',
537
+ path: ['settings', 'idleMaxCount'],
538
+ location: 'body',
539
+ required: false,
540
+ valueKind: 'integer',
541
+ repeatable: false,
542
+ },
543
+ {
544
+ name: 'settings.idle-messages',
545
+ path: ['settings', 'idleMessages'],
546
+ location: 'body',
547
+ required: false,
548
+ valueKind: 'array',
549
+ repeatable: true,
550
+ },
551
+ {
552
+ name: 'settings.end-detection-phrases',
553
+ path: ['settings', 'endDetectionPhrases'],
554
+ location: 'body',
555
+ required: false,
556
+ valueKind: 'array',
557
+ repeatable: true,
558
+ },
559
+ {
560
+ name: 'settings.end-detection-reasons',
561
+ path: ['settings', 'endDetectionReasons'],
562
+ location: 'body',
563
+ required: false,
564
+ valueKind: 'array',
565
+ repeatable: true,
566
+ },
567
+ {
568
+ name: 'settings.end-call-goodbye-message',
569
+ path: ['settings', 'endCallGoodbyeMessage'],
570
+ location: 'body',
571
+ required: false,
572
+ valueKind: 'string',
573
+ repeatable: false,
574
+ },
575
+ {
576
+ name: 'settings.background-noise',
577
+ path: ['settings', 'backgroundNoise'],
578
+ location: 'body',
579
+ required: false,
580
+ valueKind: 'string',
581
+ enumValues: [
582
+ 'NONE',
583
+ 'AIRPORT',
584
+ 'CHILDREN_PLAYING',
585
+ 'CITY',
586
+ 'COFFEE_SHOP',
587
+ 'CONSTRUCTION',
588
+ 'CRYING_BABY',
589
+ 'DRIVING',
590
+ 'LIBRARY',
591
+ 'OFFICE',
592
+ 'THUNDERSTORM',
593
+ 'TRAIN',
594
+ ],
595
+ repeatable: false,
596
+ },
597
+ {
598
+ name: 'settings.background-noise-url',
599
+ path: ['settings', 'backgroundNoiseUrl'],
600
+ location: 'body',
601
+ required: false,
602
+ valueKind: 'string',
603
+ repeatable: false,
604
+ },
605
+ {
606
+ name: 'settings.background-noise-volume',
607
+ path: ['settings', 'backgroundNoiseVolume'],
608
+ location: 'body',
609
+ required: false,
610
+ valueKind: 'number',
611
+ repeatable: false,
612
+ },
613
+ {
614
+ name: 'settings.chat-max-duration-seconds',
615
+ path: ['settings', 'chatMaxDurationSeconds'],
616
+ location: 'body',
617
+ required: false,
618
+ valueKind: 'integer',
619
+ repeatable: false,
620
+ },
621
+ {
622
+ name: 'settings.chat-inactivity-timeout-seconds',
623
+ path: ['settings', 'chatInactivityTimeoutSeconds'],
624
+ location: 'body',
625
+ required: false,
626
+ valueKind: 'integer',
627
+ repeatable: false,
628
+ },
629
+ {
630
+ name: 'settings.sub-agents',
631
+ path: ['settings', 'subAgents'],
632
+ location: 'body',
633
+ required: false,
634
+ valueKind: 'array',
635
+ repeatable: false,
636
+ },
637
+ ],
638
+ hasParams: true,
639
+ paramsAllOptional: false,
640
+ bodyOpaque: false,
641
+ bodyVariants: [],
642
+ acceptsBody: true,
643
+ requiresAuth: true,
644
+ },
193
645
  {
194
646
  commandPath: ['agent', 'endpoint', 'create'],
195
647
  clientProperty: 'agentEndpoint',
@@ -580,6 +1032,115 @@ exports.COMMANDS = [
580
1032
  acceptsBody: true,
581
1033
  requiresAuth: true,
582
1034
  },
1035
+ {
1036
+ commandPath: ['agent', 'version', 'get'],
1037
+ clientProperty: 'agentVersion',
1038
+ methodName: 'getByID',
1039
+ httpMethod: 'get',
1040
+ httpPath: '/v1/agent/{agentId}/versions/{versionId}',
1041
+ summary: 'Get an agent version',
1042
+ description: 'One version with every setting, plus the issues that stop it from running, if any.',
1043
+ positionals: [
1044
+ {
1045
+ name: 'agent-id',
1046
+ paramKey: 'agentId',
1047
+ },
1048
+ {
1049
+ name: 'version-id',
1050
+ paramKey: 'versionId',
1051
+ },
1052
+ ],
1053
+ flags: [],
1054
+ hasParams: true,
1055
+ paramsAllOptional: false,
1056
+ bodyOpaque: false,
1057
+ bodyVariants: [],
1058
+ acceptsBody: false,
1059
+ requiresAuth: true,
1060
+ },
1061
+ {
1062
+ commandPath: ['agent', 'version', 'list'],
1063
+ clientProperty: 'agentVersion',
1064
+ methodName: 'list',
1065
+ httpMethod: 'get',
1066
+ httpPath: '/v1/agent/{agentId}/versions',
1067
+ summary: "List an agent's versions",
1068
+ description: 'The open draft first, if there is one, then published versions newest first. Paginated: pass `pagination.nextCursor` as `after` for the next page.',
1069
+ positionals: [
1070
+ {
1071
+ name: 'agent-id',
1072
+ paramKey: 'agentId',
1073
+ },
1074
+ ],
1075
+ flags: [
1076
+ {
1077
+ name: 'limit',
1078
+ path: ['limit'],
1079
+ location: 'query',
1080
+ required: false,
1081
+ valueKind: 'integer',
1082
+ repeatable: false,
1083
+ },
1084
+ {
1085
+ name: 'after',
1086
+ path: ['after'],
1087
+ location: 'query',
1088
+ required: false,
1089
+ valueKind: 'string',
1090
+ repeatable: false,
1091
+ },
1092
+ ],
1093
+ hasParams: true,
1094
+ paramsAllOptional: true,
1095
+ bodyOpaque: false,
1096
+ bodyVariants: [],
1097
+ acceptsBody: false,
1098
+ requiresAuth: true,
1099
+ },
1100
+ {
1101
+ commandPath: ['agent', 'version', 'restore'],
1102
+ clientProperty: 'agentVersion',
1103
+ methodName: 'restore',
1104
+ httpMethod: 'post',
1105
+ httpPath: '/v1/agent/{agentId}/versions/{versionId}/restore',
1106
+ summary: 'Restore an agent version',
1107
+ description: "Roll back: publishes a new version, numbered after the latest, with this version's settings and makes it live. History stays append-only. An open draft started before this is kept but can no longer be published (409 `agent_draft_base_changed`); discard it or start a new one. Pass `expectedLiveVersionId` to be refused (409 `agent_live_version_changed`) if another version went live since you read it.",
1108
+ positionals: [
1109
+ {
1110
+ name: 'agent-id',
1111
+ paramKey: 'agentId',
1112
+ },
1113
+ {
1114
+ name: 'version-id',
1115
+ paramKey: 'versionId',
1116
+ },
1117
+ ],
1118
+ flags: [
1119
+ {
1120
+ name: 'summary',
1121
+ path: ['summary'],
1122
+ location: 'body',
1123
+ required: false,
1124
+ valueKind: 'string',
1125
+ repeatable: false,
1126
+ },
1127
+ {
1128
+ name: 'expected-live-version-id',
1129
+ path: ['expectedLiveVersionId'],
1130
+ location: 'body',
1131
+ required: false,
1132
+ description: 'The live version when you decided to restore. When sent, the restore is refused with 409 if another version went live since.',
1133
+ valueKind: 'string',
1134
+ repeatable: false,
1135
+ },
1136
+ ],
1137
+ hasParams: true,
1138
+ paramsAllOptional: false,
1139
+ bodyOpaque: false,
1140
+ bodyVariants: [],
1141
+ acceptsBody: true,
1142
+ requiresAuth: true,
1143
+ },
583
1144
  {
584
1145
  commandPath: ['agent-config', 'get'],
585
1146
  clientProperty: 'agentConfig',