@roarkanalytics/cli 0.23.1 → 0.25.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,19 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.25.0](https://github.com/roarkhq/cli-roark-analytics/compare/v0.24.0...v0.25.0) (2026-09-23)
4
+
5
+
6
+ ### Features
7
+
8
+ * **cli:** cli update ([#62](https://github.com/roarkhq/cli-roark-analytics/issues/62)) ([940ab33](https://github.com/roarkhq/cli-roark-analytics/commit/940ab3309f5d28787e74d4644dabdbb81b6b5e45))
9
+
10
+ ## [0.24.0](https://github.com/roarkhq/cli-roark-analytics/compare/v0.23.1...v0.24.0) (2026-09-22)
11
+
12
+
13
+ ### Features
14
+
15
+ * **cli:** cli update ([#59](https://github.com/roarkhq/cli-roark-analytics/issues/59)) ([9669eda](https://github.com/roarkhq/cli-roark-analytics/commit/9669eda9e475e8cd018d7743d446c8ee30bfdc6f))
16
+
3
17
  ## [0.23.1](https://github.com/roarkhq/cli-roark-analytics/compare/v0.23.0...v0.23.1) (2026-09-21)
4
18
 
5
19
 
package/README.md CHANGED
@@ -110,6 +110,7 @@ roark completion fish | source
110
110
 
111
111
  | Command | Description |
112
112
  | ------------------------------------------------------------------------------------ | --------------------------- |
113
+ | `roark agent build --name <value> --job-description <value>` | Build a Roark-hosted agent |
113
114
  | `roark agent create --name <value>` | Create a new agent |
114
115
  | `roark agent endpoint create --agent-id <value> --value <value> --direction <value>` | Create a new agent endpoint |
115
116
  | `roark agent endpoint get <endpoint-id>` | Get agent endpoint by ID |
@@ -122,6 +123,17 @@ roark completion fish | source
122
123
  | `roark agent prompt version list <agent-id> <prompt-id>` | List a prompt's versions |
123
124
  | `roark agent update <agent-id>` | Update an agent |
124
125
 
126
+ ### agent-config
127
+
128
+ | Command | Description |
129
+ | ---------------------------------------------------------------------- | ----------------------------- |
130
+ | `roark agent-config get <key>` | Get a managed config |
131
+ | `roark agent-config list` | List managed configs |
132
+ | `roark agent-config promote <key>` | Promote staging to production |
133
+ | `roark agent-config resolve <key>` | Resolve config for a session |
134
+ | `roark agent-config staging delete <key>` | Discard the staging revision |
135
+ | `roark agent-config update <key> --channel <value> --document <value>` | Write a config revision |
136
+
125
137
  ### autoimprove
126
138
 
127
139
  | Command | Description |
package/commands.js CHANGED
@@ -12,6 +12,8 @@ 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
+ 'agent-config': 'Manage agent configs',
16
+ 'agent-config staging': 'Manage agent config staging',
15
17
  autoimprove: 'Manage autoimproves',
16
18
  'autoimprove job': 'Manage autoimprove jobs',
17
19
  'autoimprove job guidance': 'Read autoimprove job guidance',
@@ -48,6 +50,51 @@ exports.GROUPS = {
48
50
  webhook: 'Manage webhooks',
49
51
  };
50
52
  exports.COMMANDS = [
53
+ {
54
+ commandPath: ['agent', 'build'],
55
+ clientProperty: 'agent',
56
+ methodName: 'build',
57
+ httpMethod: 'post',
58
+ httpPath: '/v1/agent/build',
59
+ summary: 'Build a Roark-hosted agent',
60
+ description: 'Creates a new Roark-hosted agent from a one-line job description. Roark authors the system prompt and hosts the config, so the agent is live and self-improvable from creation.',
61
+ positionals: [],
62
+ flags: [
63
+ {
64
+ name: 'name',
65
+ path: ['name'],
66
+ location: 'body',
67
+ required: true,
68
+ description: 'Name of the agent',
69
+ valueKind: 'string',
70
+ repeatable: false,
71
+ },
72
+ {
73
+ name: 'job-description',
74
+ path: ['jobDescription'],
75
+ location: 'body',
76
+ required: true,
77
+ description: 'One-line description of what the agent should do. Roark authors the system prompt from this.',
78
+ valueKind: 'string',
79
+ repeatable: false,
80
+ },
81
+ {
82
+ name: 'voice',
83
+ path: ['voice'],
84
+ location: 'body',
85
+ required: false,
86
+ description: 'Optional voice label for the hosted agent',
87
+ valueKind: 'string',
88
+ repeatable: false,
89
+ },
90
+ ],
91
+ hasParams: true,
92
+ paramsAllOptional: false,
93
+ bodyOpaque: false,
94
+ bodyVariants: [],
95
+ acceptsBody: true,
96
+ requiresAuth: true,
97
+ },
51
98
  {
52
99
  commandPath: ['agent', 'create'],
53
100
  clientProperty: 'agent',
@@ -483,6 +530,216 @@ exports.COMMANDS = [
483
530
  acceptsBody: true,
484
531
  requiresAuth: true,
485
532
  },
533
+ {
534
+ commandPath: ['agent-config', 'get'],
535
+ clientProperty: 'agentConfig',
536
+ methodName: 'getByID',
537
+ httpMethod: 'get',
538
+ httpPath: '/v1/agent-config/{key}',
539
+ summary: 'Get a managed config',
540
+ description: 'Fetch one managed config with its channel pointers and recent revisions, newest first.',
541
+ positionals: [
542
+ {
543
+ name: 'key',
544
+ paramKey: 'key',
545
+ },
546
+ ],
547
+ flags: [],
548
+ hasParams: false,
549
+ paramsAllOptional: true,
550
+ bodyOpaque: false,
551
+ bodyVariants: [],
552
+ acceptsBody: false,
553
+ requiresAuth: true,
554
+ },
555
+ {
556
+ commandPath: ['agent-config', 'list'],
557
+ clientProperty: 'agentConfig',
558
+ methodName: 'list',
559
+ httpMethod: 'get',
560
+ httpPath: '/v1/agent-config',
561
+ summary: 'List managed configs',
562
+ description: 'List the managed agent configs in this project, most recent first.',
563
+ positionals: [],
564
+ flags: [],
565
+ hasParams: false,
566
+ paramsAllOptional: true,
567
+ bodyOpaque: false,
568
+ bodyVariants: [],
569
+ acceptsBody: false,
570
+ requiresAuth: true,
571
+ },
572
+ {
573
+ commandPath: ['agent-config', 'promote'],
574
+ clientProperty: 'agentConfig',
575
+ methodName: 'promote',
576
+ httpMethod: 'post',
577
+ httpPath: '/v1/agent-config/{key}/promote',
578
+ summary: 'Promote staging to production',
579
+ description: 'Point the production channel at the staging revision. Real traffic reads it from the next session onward; roll back by writing the prior revision id to production (the chain preserves every state).',
580
+ positionals: [
581
+ {
582
+ name: 'key',
583
+ paramKey: 'key',
584
+ },
585
+ ],
586
+ flags: [],
587
+ hasParams: false,
588
+ paramsAllOptional: true,
589
+ bodyOpaque: false,
590
+ bodyVariants: [],
591
+ acceptsBody: false,
592
+ requiresAuth: true,
593
+ },
594
+ {
595
+ commandPath: ['agent-config', 'resolve'],
596
+ clientProperty: 'agentConfig',
597
+ methodName: 'resolve',
598
+ httpMethod: 'post',
599
+ httpPath: '/v1/agent-config/{key}/resolve',
600
+ summary: 'Resolve config for a session',
601
+ description: 'The call your agent makes at session start. Returns the config JSON for this session, with per-session simulation recognition built in: when the session was originated by a Roark simulation (matched by caller number against the calls Roark has in flight), the STAGING revision is served for that session only, so Autoimprove candidates are tested on your real deployment. Real traffic always resolves to production; any recognition miss degrades to production too. On the first fetch of an unknown key, pass `defaults` (your baked-in config): the key is registered and the defaults become revision 1. That makes integration a single call. Cache the response per session; do not fetch per turn.',
602
+ positionals: [
603
+ {
604
+ name: 'key',
605
+ paramKey: 'key',
606
+ },
607
+ ],
608
+ flags: [
609
+ {
610
+ name: 'defaults',
611
+ path: ['defaults'],
612
+ location: 'body',
613
+ required: false,
614
+ description: 'Your baked-in config. On the first fetch of an unknown key this registers the config and becomes revision 1, so integration is a single call. Ignored once the key exists.',
615
+ valueKind: 'object',
616
+ repeatable: false,
617
+ },
618
+ {
619
+ name: 'session',
620
+ path: ['session'],
621
+ location: 'body',
622
+ required: false,
623
+ description: 'Session context. When the call was originated by a Roark simulation, Roark recognizes it here and serves the staging revision for this session only; real traffic always gets production.',
624
+ valueKind: 'object',
625
+ },
626
+ {
627
+ name: 'session.session-id',
628
+ path: ['session', 'sessionId'],
629
+ location: 'body',
630
+ required: false,
631
+ description: 'Your session or room identifier, for correlation.',
632
+ valueKind: 'string',
633
+ repeatable: false,
634
+ },
635
+ {
636
+ name: 'session.caller-number',
637
+ path: ['session', 'callerNumber'],
638
+ location: 'body',
639
+ required: false,
640
+ description: 'The number calling your agent (E.164). Required for simulation recognition.',
641
+ valueKind: 'string',
642
+ repeatable: false,
643
+ },
644
+ {
645
+ name: 'session.called-number',
646
+ path: ['session', 'calledNumber'],
647
+ location: 'body',
648
+ required: false,
649
+ description: 'The number your agent was reached on (E.164).',
650
+ valueKind: 'string',
651
+ repeatable: false,
652
+ },
653
+ ],
654
+ hasParams: true,
655
+ paramsAllOptional: true,
656
+ bodyOpaque: false,
657
+ bodyVariants: [],
658
+ acceptsBody: true,
659
+ requiresAuth: true,
660
+ },
661
+ {
662
+ commandPath: ['agent-config', 'staging', 'delete'],
663
+ clientProperty: 'agentConfig',
664
+ methodName: 'deleteStaging',
665
+ httpMethod: 'delete',
666
+ httpPath: '/v1/agent-config/{key}/staging',
667
+ summary: 'Discard the staging revision',
668
+ description: 'Clear the staging channel. Production is untouched; recognized simulation sessions go back to reading production.',
669
+ positionals: [
670
+ {
671
+ name: 'key',
672
+ paramKey: 'key',
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: ['agent-config', 'update'],
685
+ clientProperty: 'agentConfig',
686
+ methodName: 'update',
687
+ httpMethod: 'put',
688
+ httpPath: '/v1/agent-config/{key}',
689
+ summary: 'Write a config revision',
690
+ description: 'Write a new revision onto a channel. Writing production creates the key when it does not exist; writing staging stages a candidate that only Roark-recognized simulation sessions will read. Every write is a new revision; nothing is overwritten.',
691
+ positionals: [
692
+ {
693
+ name: 'key',
694
+ paramKey: 'key',
695
+ },
696
+ ],
697
+ flags: [
698
+ {
699
+ name: 'channel',
700
+ path: ['channel'],
701
+ location: 'body',
702
+ required: true,
703
+ description: 'Which channel to write.',
704
+ valueKind: 'string',
705
+ enumValues: ['production', 'staging'],
706
+ repeatable: false,
707
+ },
708
+ {
709
+ name: 'document',
710
+ path: ['document'],
711
+ location: 'body',
712
+ required: true,
713
+ description: 'The full config JSON for the new revision.',
714
+ valueKind: 'object',
715
+ repeatable: false,
716
+ },
717
+ {
718
+ name: 'summary',
719
+ path: ['summary'],
720
+ location: 'body',
721
+ required: false,
722
+ description: 'One-line story of the change.',
723
+ valueKind: 'string',
724
+ repeatable: false,
725
+ },
726
+ {
727
+ name: 'agent-id',
728
+ path: ['agentId'],
729
+ location: 'body',
730
+ required: false,
731
+ description: 'Link this config to a Roark agent (the one your calls report). Required before Autoimprove can run on it: the link is how a fix finds the config channel.',
732
+ valueKind: 'string',
733
+ repeatable: false,
734
+ },
735
+ ],
736
+ hasParams: true,
737
+ paramsAllOptional: false,
738
+ bodyOpaque: false,
739
+ bodyVariants: [],
740
+ acceptsBody: true,
741
+ requiresAuth: true,
742
+ },
486
743
  {
487
744
  commandPath: ['autoimprove', 'job', 'answer'],
488
745
  clientProperty: 'autoimproveJob',
@@ -544,7 +801,7 @@ exports.COMMANDS = [
544
801
  httpMethod: 'post',
545
802
  httpPath: '/v1/autoimprove/job',
546
803
  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.',
804
+ 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, Retell, or ElevenLabs) 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
805
  positionals: [],
549
806
  flags: [
550
807
  {