@roarkanalytics/cli 0.21.0 → 0.23.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,23 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.23.0](https://github.com/roarkhq/cli-roark-analytics/compare/v0.22.0...v0.23.0) (2026-09-21)
4
+
5
+
6
+ ### ⚠ BREAKING CHANGES
7
+
8
+ * **cli:** removes or renames commands. Scripts using the old names will fail.
9
+
10
+ ### Features
11
+
12
+ * **cli:** cli update ([#54](https://github.com/roarkhq/cli-roark-analytics/issues/54)) ([2722903](https://github.com/roarkhq/cli-roark-analytics/commit/2722903aae2a0bb35dd6060fb11a6957c7a92f83))
13
+
14
+ ## [0.22.0](https://github.com/roarkhq/cli-roark-analytics/compare/v0.21.0...v0.22.0) (2026-09-18)
15
+
16
+
17
+ ### Features
18
+
19
+ * **cli:** cli update ([#52](https://github.com/roarkhq/cli-roark-analytics/issues/52)) ([5efaf54](https://github.com/roarkhq/cli-roark-analytics/commit/5efaf54e4c88b10cf1e03aed8eefabef30935f22))
20
+
3
21
  ## [0.21.0](https://github.com/roarkhq/cli-roark-analytics/compare/v0.20.0...v0.21.0) (2026-09-17)
4
22
 
5
23
 
package/README.md CHANGED
@@ -122,6 +122,19 @@ roark completion fish | source
122
122
  | `roark agent prompt version list <agent-id> <prompt-id>` | List a prompt's versions |
123
123
  | `roark agent update <agent-id>` | Update an agent |
124
124
 
125
+ ### autoimprove
126
+
127
+ | Command | Description |
128
+ | -------------------------------------------------------------------------------------------------------------------- | ------------------------------------ |
129
+ | `roark autoimprove job answer <job-id> --text <value>` | Answer Roark's question |
130
+ | `roark autoimprove job cancel <job-id>` | Cancel a job |
131
+ | `roark autoimprove job create --agent-id <value> --objective-metric-definition-id <value> --objective-label <value>` | Start an Autoimprove job |
132
+ | `roark autoimprove job dismiss <job-id>` | Dismiss a verified job |
133
+ | `roark autoimprove job get <job-id>` | Get an Autoimprove job |
134
+ | `roark autoimprove job guidance send <job-id> --text <value>` | Send guidance to a running job |
135
+ | `roark autoimprove job list` | List Autoimprove jobs |
136
+ | `roark autoimprove job promote <job-id>` | Promote a verified job to production |
137
+
125
138
  ### benchmark
126
139
 
127
140
  | Command | Description |
package/commands.js CHANGED
@@ -12,6 +12,9 @@ exports.GROUPS = {
12
12
  'agent endpoint': 'Manage agent endpoints',
13
13
  'agent prompt': 'Manage agent prompts',
14
14
  'agent prompt version': 'Read agent prompt versions',
15
+ autoimprove: 'Manage autoimproves',
16
+ 'autoimprove job': 'Manage autoimprove jobs',
17
+ 'autoimprove job guidance': 'Read autoimprove job guidance',
15
18
  benchmark: 'Read benchmarks',
16
19
  'benchmark leaderboard': 'Read benchmark leaderboard',
17
20
  'benchmark metric': 'Read benchmark metrics',
@@ -480,6 +483,274 @@ exports.COMMANDS = [
480
483
  acceptsBody: true,
481
484
  requiresAuth: true,
482
485
  },
486
+ {
487
+ commandPath: ['autoimprove', 'job', 'answer'],
488
+ clientProperty: 'autoimproveJob',
489
+ methodName: 'answerQuestion',
490
+ httpMethod: 'post',
491
+ httpPath: '/v1/autoimprove/job/{jobId}/answer',
492
+ summary: "Answer Roark's question",
493
+ description: 'Answer the question a job is blocked on. Only meaningful while the job status is NEEDS_INPUT (the open QUESTION entry carries the offered options; free text is also accepted). Otherwise returns a conflict.',
494
+ positionals: [
495
+ {
496
+ name: 'job-id',
497
+ paramKey: 'jobId',
498
+ },
499
+ ],
500
+ flags: [
501
+ {
502
+ name: 'text',
503
+ path: ['text'],
504
+ location: 'body',
505
+ required: true,
506
+ description: 'The message for Roark.',
507
+ valueKind: 'string',
508
+ repeatable: false,
509
+ },
510
+ ],
511
+ hasParams: true,
512
+ paramsAllOptional: false,
513
+ bodyOpaque: false,
514
+ bodyVariants: [],
515
+ acceptsBody: true,
516
+ requiresAuth: true,
517
+ },
518
+ {
519
+ commandPath: ['autoimprove', 'job', 'cancel'],
520
+ clientProperty: 'autoimproveJob',
521
+ methodName: 'cancel',
522
+ httpMethod: 'post',
523
+ httpPath: '/v1/autoimprove/job/{jobId}/cancel',
524
+ summary: 'Cancel a job',
525
+ 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.',
526
+ positionals: [
527
+ {
528
+ name: 'job-id',
529
+ paramKey: 'jobId',
530
+ },
531
+ ],
532
+ flags: [],
533
+ hasParams: false,
534
+ paramsAllOptional: true,
535
+ bodyOpaque: false,
536
+ bodyVariants: [],
537
+ acceptsBody: false,
538
+ requiresAuth: true,
539
+ },
540
+ {
541
+ commandPath: ['autoimprove', 'job', 'create'],
542
+ clientProperty: 'autoimproveJob',
543
+ methodName: 'create',
544
+ httpMethod: 'post',
545
+ httpPath: '/v1/autoimprove/job',
546
+ summary: 'Start an Autoimprove job',
547
+ description: 'Commission Roark on an objective. It clones the agent into a staging shadow (or uses your designated staging agent), authors a validation suite of simulated callers, measures a baseline, changes the staging configuration, and re-tests until the objective metric passes its target. Production is never touched by the loop; verified changes wait for promotion. Requires an active provider integration (Vapi or Retell) with agent config writes enabled. One live job per agent: starting a second returns a conflict. The job runs asynchronously; poll GET /v1/autoimprove/job/{jobId} or watch it in the dashboard. When its status is NEEDS_INPUT, answer via the answer endpoint; when AWAITING_PROMOTE, promote or dismiss.',
548
+ positionals: [],
549
+ flags: [
550
+ {
551
+ name: 'agent-id',
552
+ path: ['agentId'],
553
+ location: 'body',
554
+ required: true,
555
+ description: 'The production agent to improve. It is never modified until you promote.',
556
+ valueKind: 'string',
557
+ repeatable: false,
558
+ },
559
+ {
560
+ name: 'objective-metric-definition-id',
561
+ path: ['objectiveMetricDefinitionId'],
562
+ location: 'body',
563
+ required: true,
564
+ description: 'The metric that defines success: a pass/fail metric, or a threshold variant of a scale metric (for example "PII Handling >= 4"). Roark measures the pass rate of this metric across simulated calls.',
565
+ valueKind: 'string',
566
+ repeatable: false,
567
+ },
568
+ {
569
+ name: 'objective-label',
570
+ path: ['objectiveLabel'],
571
+ location: 'body',
572
+ required: true,
573
+ description: 'Human-readable label for the objective, shown everywhere the job appears.',
574
+ valueKind: 'string',
575
+ repeatable: false,
576
+ },
577
+ {
578
+ name: 'target-value',
579
+ path: ['targetValue'],
580
+ location: 'body',
581
+ required: false,
582
+ description: 'The pass-rate percentage that counts as fixed. Defaults to 90.',
583
+ valueKind: 'number',
584
+ repeatable: false,
585
+ },
586
+ {
587
+ name: 'staging-agent-id',
588
+ path: ['stagingAgentId'],
589
+ location: 'body',
590
+ required: false,
591
+ description: 'An existing agent to stage changes on instead of the default shadow clone. Must be a different agent from agentId, on the same provider.',
592
+ valueKind: 'string',
593
+ repeatable: false,
594
+ },
595
+ {
596
+ name: 'customer-integration-id',
597
+ path: ['customerIntegrationId'],
598
+ location: 'body',
599
+ required: false,
600
+ description: "The provider integration whose credentials Roark uses. Omit to use the project's active integration for the agent's provider. The integration must have agent config writes enabled.",
601
+ valueKind: 'string',
602
+ repeatable: false,
603
+ },
604
+ {
605
+ name: 'validation-run-plan-id',
606
+ path: ['validationRunPlanId'],
607
+ location: 'body',
608
+ required: false,
609
+ description: 'An existing simulation run plan to validate with. Omit to let Roark author its own suite.',
610
+ valueKind: 'string',
611
+ repeatable: false,
612
+ },
613
+ {
614
+ name: 'max-iterations',
615
+ path: ['maxIterations'],
616
+ location: 'body',
617
+ required: false,
618
+ description: 'Cap on decision turns. Defaults to 50.',
619
+ valueKind: 'integer',
620
+ repeatable: false,
621
+ },
622
+ {
623
+ name: 'max-sim-calls',
624
+ path: ['maxSimCalls'],
625
+ location: 'body',
626
+ required: false,
627
+ description: 'Cap on simulated calls dialed. Defaults to 200.',
628
+ valueKind: 'integer',
629
+ repeatable: false,
630
+ },
631
+ ],
632
+ hasParams: true,
633
+ paramsAllOptional: false,
634
+ bodyOpaque: false,
635
+ bodyVariants: [],
636
+ acceptsBody: true,
637
+ requiresAuth: true,
638
+ },
639
+ {
640
+ commandPath: ['autoimprove', 'job', 'dismiss'],
641
+ clientProperty: 'autoimproveJob',
642
+ methodName: 'dismiss',
643
+ httpMethod: 'post',
644
+ httpPath: '/v1/autoimprove/job/{jobId}/dismiss',
645
+ summary: 'Dismiss a verified job',
646
+ 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.',
647
+ positionals: [
648
+ {
649
+ name: 'job-id',
650
+ paramKey: 'jobId',
651
+ },
652
+ ],
653
+ flags: [],
654
+ hasParams: false,
655
+ paramsAllOptional: true,
656
+ bodyOpaque: false,
657
+ bodyVariants: [],
658
+ acceptsBody: false,
659
+ requiresAuth: true,
660
+ },
661
+ {
662
+ commandPath: ['autoimprove', 'job', 'get'],
663
+ clientProperty: 'autoimproveJob',
664
+ methodName: 'getByID',
665
+ httpMethod: 'get',
666
+ httpPath: '/v1/autoimprove/job/{jobId}',
667
+ summary: 'Get an Autoimprove job',
668
+ description: 'Fetch one job with its full worklog: every step Roark took, the validation batches with their pass-rate movement, any question it is waiting on, and its final report once concluded.',
669
+ positionals: [
670
+ {
671
+ name: 'job-id',
672
+ paramKey: 'jobId',
673
+ },
674
+ ],
675
+ flags: [],
676
+ hasParams: false,
677
+ paramsAllOptional: true,
678
+ bodyOpaque: false,
679
+ bodyVariants: [],
680
+ acceptsBody: false,
681
+ requiresAuth: true,
682
+ },
683
+ {
684
+ commandPath: ['autoimprove', 'job', 'guidance', 'send'],
685
+ clientProperty: 'autoimproveJob',
686
+ methodName: 'sendGuidance',
687
+ httpMethod: 'post',
688
+ httpPath: '/v1/autoimprove/job/{jobId}/guidance',
689
+ summary: 'Send guidance to a running job',
690
+ 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.',
691
+ positionals: [
692
+ {
693
+ name: 'job-id',
694
+ paramKey: 'jobId',
695
+ },
696
+ ],
697
+ flags: [
698
+ {
699
+ name: 'text',
700
+ path: ['text'],
701
+ location: 'body',
702
+ required: true,
703
+ description: 'The message for Roark.',
704
+ valueKind: 'string',
705
+ repeatable: false,
706
+ },
707
+ ],
708
+ hasParams: true,
709
+ paramsAllOptional: false,
710
+ bodyOpaque: false,
711
+ bodyVariants: [],
712
+ acceptsBody: true,
713
+ requiresAuth: true,
714
+ },
715
+ {
716
+ commandPath: ['autoimprove', 'job', 'list'],
717
+ clientProperty: 'autoimproveJob',
718
+ methodName: 'list',
719
+ httpMethod: 'get',
720
+ httpPath: '/v1/autoimprove/job',
721
+ summary: 'List Autoimprove jobs',
722
+ description: 'List the Autoimprove jobs in this project, most recent first, capped at 100. A job is one autonomous engagement: Roark improving one agent toward one objective metric on a staging copy, with a human-gated promote to production at the end.',
723
+ positionals: [],
724
+ flags: [],
725
+ hasParams: false,
726
+ paramsAllOptional: true,
727
+ bodyOpaque: false,
728
+ bodyVariants: [],
729
+ acceptsBody: false,
730
+ requiresAuth: true,
731
+ },
732
+ {
733
+ commandPath: ['autoimprove', 'job', 'promote'],
734
+ clientProperty: 'autoimproveJob',
735
+ methodName: 'promote',
736
+ httpMethod: 'post',
737
+ httpPath: '/v1/autoimprove/job/{jobId}/promote',
738
+ summary: 'Promote a verified job to production',
739
+ 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.',
740
+ positionals: [
741
+ {
742
+ name: 'job-id',
743
+ paramKey: 'jobId',
744
+ },
745
+ ],
746
+ flags: [],
747
+ hasParams: false,
748
+ paramsAllOptional: true,
749
+ bodyOpaque: false,
750
+ bodyVariants: [],
751
+ acceptsBody: false,
752
+ requiresAuth: true,
753
+ },
483
754
  {
484
755
  commandPath: ['benchmark', 'leaderboard', 'get'],
485
756
  clientProperty: 'benchmark',
@@ -3567,11 +3838,21 @@ exports.COMMANDS = [
3567
3838
  path: ['responseTiming'],
3568
3839
  location: 'body',
3569
3840
  required: false,
3570
- description: 'Controls how quickly the persona responds to pauses in conversation (QUICK, NORMAL, RELAXED). BARGE_IN also talks over the agent once it has held the floor for several seconds.',
3841
+ description: 'Deprecated and inert: it no longer affects the call. It set how long the persona waited once the agent stopped talking, and measured across production simulations it moved the reply gap by less than the noise floor, because model and speech latency dominate it. Every persona now uses one voice-activity profile. Use `interruption` for a caller who talks over the agent. Still accepted and stored so existing clients keep working. BARGE_IN is stored as `responseTiming: QUICK` with `interruption: OCCASIONAL`.',
3571
3842
  valueKind: 'string',
3572
3843
  enumValues: ['RELAXED', 'NORMAL', 'QUICK', 'BARGE_IN'],
3573
3844
  repeatable: false,
3574
3845
  },
3846
+ {
3847
+ name: 'interruption',
3848
+ path: ['interruption'],
3849
+ location: 'body',
3850
+ required: false,
3851
+ description: 'How much the persona talks over the agent. Defaults to OFF, a caller that waits its turn.',
3852
+ valueKind: 'string',
3853
+ enumValues: ['OFF', 'BACKCHANNEL', 'OCCASIONAL', 'HEAVY'],
3854
+ repeatable: false,
3855
+ },
3575
3856
  {
3576
3857
  name: 'backstory-prompt',
3577
3858
  path: ['backstoryPrompt'],
@@ -3972,11 +4253,21 @@ exports.COMMANDS = [
3972
4253
  path: ['responseTiming'],
3973
4254
  location: 'body',
3974
4255
  required: false,
3975
- description: 'Controls how quickly the persona responds to pauses in conversation (QUICK, NORMAL, RELAXED). BARGE_IN also talks over the agent once it has held the floor for several seconds.',
4256
+ description: 'Deprecated and inert: it no longer affects the call. It set how long the persona waited once the agent stopped talking, and measured across production simulations it moved the reply gap by less than the noise floor, because model and speech latency dominate it. Every persona now uses one voice-activity profile. Use `interruption` for a caller who talks over the agent. Still accepted and stored so existing clients keep working. BARGE_IN is stored as `responseTiming: QUICK` with `interruption: OCCASIONAL`.',
3976
4257
  valueKind: 'string',
3977
4258
  enumValues: ['RELAXED', 'NORMAL', 'QUICK', 'BARGE_IN'],
3978
4259
  repeatable: false,
3979
4260
  },
4261
+ {
4262
+ name: 'interruption',
4263
+ path: ['interruption'],
4264
+ location: 'body',
4265
+ required: false,
4266
+ 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.',
4267
+ valueKind: 'string',
4268
+ enumValues: ['OFF', 'BACKCHANNEL', 'OCCASIONAL', 'HEAVY'],
4269
+ repeatable: false,
4270
+ },
3980
4271
  {
3981
4272
  name: 'backstory-prompt',
3982
4273
  path: ['backstoryPrompt'],
@@ -4221,6 +4512,7 @@ exports.COMMANDS = [
4221
4512
  'GENDER',
4222
4513
  'INTENT_CLARITY',
4223
4514
  'LANGUAGE',
4515
+ 'INTERRUPTION',
4224
4516
  'MEMORY_RELIABILITY',
4225
4517
  'RESPONSE_TIMING',
4226
4518
  'SPEECH_CLARITY',
@@ -4743,6 +5035,7 @@ exports.COMMANDS = [
4743
5035
  'GENDER',
4744
5036
  'INTENT_CLARITY',
4745
5037
  'LANGUAGE',
5038
+ 'INTERRUPTION',
4746
5039
  'MEMORY_RELIABILITY',
4747
5040
  'RESPONSE_TIMING',
4748
5041
  'SPEECH_CLARITY',