chatbase 0.3.0 → 0.4.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/README.md CHANGED
@@ -77,6 +77,7 @@ calls you invoke.
77
77
  * [`chatbase tickets reply [TICKETNUMBER]`](#chatbase-tickets-reply-ticketnumber)
78
78
  * [`chatbase tickets search QUERY`](#chatbase-tickets-search-query)
79
79
  * [`chatbase tickets update TICKETNUMBER`](#chatbase-tickets-update-ticketnumber)
80
+ * [`chatbase voice start`](#chatbase-voice-start)
80
81
  * [`chatbase whatsapp send-template TEMPLATE`](#chatbase-whatsapp-send-template-template)
81
82
  * [`chatbase whatsapp templates`](#chatbase-whatsapp-templates)
82
83
 
@@ -115,7 +116,7 @@ EXAMPLES
115
116
  $ chatbase agents auto-retrain --enabled
116
117
  ```
117
118
 
118
- _See code: [src/commands/agents/auto-retrain.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.3.0/src/commands/agents/auto-retrain.ts)_
119
+ _See code: [src/commands/agents/auto-retrain.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.4.0/src/commands/agents/auto-retrain.ts)_
119
120
 
120
121
  ## `chatbase agents clone AGENTID`
121
122
 
@@ -145,7 +146,7 @@ EXAMPLES
145
146
  $ chatbase agents clone agt_123
146
147
  ```
147
148
 
148
- _See code: [src/commands/agents/clone.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.3.0/src/commands/agents/clone.ts)_
149
+ _See code: [src/commands/agents/clone.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.4.0/src/commands/agents/clone.ts)_
149
150
 
150
151
  ## `chatbase agents create`
151
152
 
@@ -180,7 +181,7 @@ EXAMPLES
180
181
  $ chatbase agents create --data @agent.json
181
182
  ```
182
183
 
183
- _See code: [src/commands/agents/create.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.3.0/src/commands/agents/create.ts)_
184
+ _See code: [src/commands/agents/create.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.4.0/src/commands/agents/create.ts)_
184
185
 
185
186
  ## `chatbase agents delete AGENTID`
186
187
 
@@ -211,7 +212,7 @@ EXAMPLES
211
212
  $ chatbase agents delete agt_123 --confirm agt_123
212
213
  ```
213
214
 
214
- _See code: [src/commands/agents/delete.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.3.0/src/commands/agents/delete.ts)_
215
+ _See code: [src/commands/agents/delete.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.4.0/src/commands/agents/delete.ts)_
215
216
 
216
217
  ## `chatbase agents get [AGENTID]`
217
218
 
@@ -246,7 +247,7 @@ EXAMPLES
246
247
  $ chatbase agents get
247
248
  ```
248
249
 
249
- _See code: [src/commands/agents/get.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.3.0/src/commands/agents/get.ts)_
250
+ _See code: [src/commands/agents/get.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.4.0/src/commands/agents/get.ts)_
250
251
 
251
252
  ## `chatbase agents list`
252
253
 
@@ -279,7 +280,7 @@ EXAMPLES
279
280
  $ chatbase agents list --json
280
281
  ```
281
282
 
282
- _See code: [src/commands/agents/list.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.3.0/src/commands/agents/list.ts)_
283
+ _See code: [src/commands/agents/list.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.4.0/src/commands/agents/list.ts)_
283
284
 
284
285
  ## `chatbase agents styles [AGENTID]`
285
286
 
@@ -316,7 +317,7 @@ EXAMPLES
316
317
  $ chatbase agents styles --data @styles.json
317
318
  ```
318
319
 
319
- _See code: [src/commands/agents/styles.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.3.0/src/commands/agents/styles.ts)_
320
+ _See code: [src/commands/agents/styles.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.4.0/src/commands/agents/styles.ts)_
320
321
 
321
322
  ## `chatbase agents train [AGENTID]`
322
323
 
@@ -351,7 +352,7 @@ EXAMPLES
351
352
  $ chatbase agents train
352
353
  ```
353
354
 
354
- _See code: [src/commands/agents/train.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.3.0/src/commands/agents/train.ts)_
355
+ _See code: [src/commands/agents/train.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.4.0/src/commands/agents/train.ts)_
355
356
 
356
357
  ## `chatbase agents update [AGENTID]`
357
358
 
@@ -393,7 +394,7 @@ EXAMPLES
393
394
  $ chatbase agents update agt_123 --data @agent.json
394
395
  ```
395
396
 
396
- _See code: [src/commands/agents/update.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.3.0/src/commands/agents/update.ts)_
397
+ _See code: [src/commands/agents/update.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.4.0/src/commands/agents/update.ts)_
397
398
 
398
399
  ## `chatbase api METHOD PATH`
399
400
 
@@ -434,7 +435,7 @@ EXAMPLES
434
435
  $ chatbase api PATCH /agents/agt_123 --body @patch.json
435
436
  ```
436
437
 
437
- _See code: [src/commands/api.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.3.0/src/commands/api.ts)_
438
+ _See code: [src/commands/api.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.4.0/src/commands/api.ts)_
438
439
 
439
440
  ## `chatbase auth login`
440
441
 
@@ -467,7 +468,7 @@ EXAMPLES
467
468
  cat key.txt | chatbase auth login --with-token
468
469
  ```
469
470
 
470
- _See code: [src/commands/auth/login.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.3.0/src/commands/auth/login.ts)_
471
+ _See code: [src/commands/auth/login.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.4.0/src/commands/auth/login.ts)_
471
472
 
472
473
  ## `chatbase auth logout`
473
474
 
@@ -494,7 +495,7 @@ EXAMPLES
494
495
  $ chatbase auth logout
495
496
  ```
496
497
 
497
- _See code: [src/commands/auth/logout.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.3.0/src/commands/auth/logout.ts)_
498
+ _See code: [src/commands/auth/logout.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.4.0/src/commands/auth/logout.ts)_
498
499
 
499
500
  ## `chatbase auth status`
500
501
 
@@ -521,7 +522,7 @@ EXAMPLES
521
522
  $ chatbase auth status
522
523
  ```
523
524
 
524
- _See code: [src/commands/auth/status.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.3.0/src/commands/auth/status.ts)_
525
+ _See code: [src/commands/auth/status.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.4.0/src/commands/auth/status.ts)_
525
526
 
526
527
  ## `chatbase chat`
527
528
 
@@ -563,7 +564,7 @@ EXAMPLES
563
564
  $ chatbase chat -a agt_123 -m "hi" --json
564
565
  ```
565
566
 
566
- _See code: [src/commands/chat/index.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.3.0/src/commands/chat/index.ts)_
567
+ _See code: [src/commands/chat/index.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.4.0/src/commands/chat/index.ts)_
567
568
 
568
569
  ## `chatbase chat retry`
569
570
 
@@ -598,7 +599,7 @@ EXAMPLES
598
599
  $ chatbase chat retry --conversation c_123 -a agt_123 --message-id msg_456 --no-stream
599
600
  ```
600
601
 
601
- _See code: [src/commands/chat/retry.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.3.0/src/commands/chat/retry.ts)_
602
+ _See code: [src/commands/chat/retry.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.4.0/src/commands/chat/retry.ts)_
602
603
 
603
604
  ## `chatbase config get KEY`
604
605
 
@@ -630,7 +631,7 @@ EXAMPLES
630
631
  $ chatbase config get timeout
631
632
  ```
632
633
 
633
- _See code: [src/commands/config/get.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.3.0/src/commands/config/get.ts)_
634
+ _See code: [src/commands/config/get.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.4.0/src/commands/config/get.ts)_
634
635
 
635
636
  ## `chatbase config list`
636
637
 
@@ -657,7 +658,7 @@ EXAMPLES
657
658
  $ chatbase config list
658
659
  ```
659
660
 
660
- _See code: [src/commands/config/list.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.3.0/src/commands/config/list.ts)_
661
+ _See code: [src/commands/config/list.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.4.0/src/commands/config/list.ts)_
661
662
 
662
663
  ## `chatbase config set KEY [VALUE]`
663
664
 
@@ -692,7 +693,7 @@ EXAMPLES
692
693
  $ chatbase config set timeout 60000
693
694
  ```
694
695
 
695
- _See code: [src/commands/config/set.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.3.0/src/commands/config/set.ts)_
696
+ _See code: [src/commands/config/set.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.4.0/src/commands/config/set.ts)_
696
697
 
697
698
  ## `chatbase conversations export`
698
699
 
@@ -751,7 +752,7 @@ EXAMPLES
751
752
  $ chatbase conversations export -a agt_123 --conversation conv_123
752
753
  ```
753
754
 
754
- _See code: [src/commands/conversations/export.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.3.0/src/commands/conversations/export.ts)_
755
+ _See code: [src/commands/conversations/export.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.4.0/src/commands/conversations/export.ts)_
755
756
 
756
757
  ## `chatbase conversations get [CONVERSATIONID]`
757
758
 
@@ -787,7 +788,7 @@ EXAMPLES
787
788
  $ chatbase conversations get --conversation conv_123 -a agt_123
788
789
  ```
789
790
 
790
- _See code: [src/commands/conversations/get.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.3.0/src/commands/conversations/get.ts)_
791
+ _See code: [src/commands/conversations/get.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.4.0/src/commands/conversations/get.ts)_
791
792
 
792
793
  ## `chatbase conversations list`
793
794
 
@@ -838,7 +839,7 @@ EXAMPLES
838
839
  $ chatbase conversations list -a agt_123 --all --json
839
840
  ```
840
841
 
841
- _See code: [src/commands/conversations/list.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.3.0/src/commands/conversations/list.ts)_
842
+ _See code: [src/commands/conversations/list.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.4.0/src/commands/conversations/list.ts)_
842
843
 
843
844
  ## `chatbase conversations tool-result [CONVERSATIONID]`
844
845
 
@@ -882,7 +883,7 @@ EXAMPLES
882
883
  $ chatbase conversations tool-result conv_123 --tool-call-id tc_1 -a agt_123
883
884
  ```
884
885
 
885
- _See code: [src/commands/conversations/tool-result.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.3.0/src/commands/conversations/tool-result.ts)_
886
+ _See code: [src/commands/conversations/tool-result.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.4.0/src/commands/conversations/tool-result.ts)_
886
887
 
887
888
  ## `chatbase health`
888
889
 
@@ -911,7 +912,7 @@ EXAMPLES
911
912
  $ chatbase health --json
912
913
  ```
913
914
 
914
- _See code: [src/commands/health.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.3.0/src/commands/health.ts)_
915
+ _See code: [src/commands/health.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.4.0/src/commands/health.ts)_
915
916
 
916
917
  ## `chatbase help [COMMAND]`
917
918
 
@@ -961,7 +962,7 @@ EXAMPLES
961
962
  $ chatbase helpdesk statuses -a agt_123
962
963
  ```
963
964
 
964
- _See code: [src/commands/helpdesk/statuses.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.3.0/src/commands/helpdesk/statuses.ts)_
965
+ _See code: [src/commands/helpdesk/statuses.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.4.0/src/commands/helpdesk/statuses.ts)_
965
966
 
966
967
  ## `chatbase helpdesk teams`
967
968
 
@@ -991,7 +992,7 @@ EXAMPLES
991
992
  $ chatbase helpdesk teams -a agt_123
992
993
  ```
993
994
 
994
- _See code: [src/commands/helpdesk/teams.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.3.0/src/commands/helpdesk/teams.ts)_
995
+ _See code: [src/commands/helpdesk/teams.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.4.0/src/commands/helpdesk/teams.ts)_
995
996
 
996
997
  ## `chatbase messages feedback [MESSAGEID]`
997
998
 
@@ -1030,7 +1031,7 @@ EXAMPLES
1030
1031
  $ chatbase messages feedback --conversation conv_123 --message msg_1 --rating clear -a agt_123
1031
1032
  ```
1032
1033
 
1033
- _See code: [src/commands/messages/feedback.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.3.0/src/commands/messages/feedback.ts)_
1034
+ _See code: [src/commands/messages/feedback.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.4.0/src/commands/messages/feedback.ts)_
1034
1035
 
1035
1036
  ## `chatbase messages list`
1036
1037
 
@@ -1066,7 +1067,7 @@ EXAMPLES
1066
1067
  $ chatbase messages list --conversation conv_123 -a agt_123 --all --json
1067
1068
  ```
1068
1069
 
1069
- _See code: [src/commands/messages/list.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.3.0/src/commands/messages/list.ts)_
1070
+ _See code: [src/commands/messages/list.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.4.0/src/commands/messages/list.ts)_
1070
1071
 
1071
1072
  ## `chatbase sources create`
1072
1073
 
@@ -1113,7 +1114,7 @@ EXAMPLES
1113
1114
  $ chatbase sources create --file ./guide.pdf -a agt_123
1114
1115
  ```
1115
1116
 
1116
- _See code: [src/commands/sources/create.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.3.0/src/commands/sources/create.ts)_
1117
+ _See code: [src/commands/sources/create.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.4.0/src/commands/sources/create.ts)_
1117
1118
 
1118
1119
  ## `chatbase sources delete SOURCEID`
1119
1120
 
@@ -1146,7 +1147,7 @@ EXAMPLES
1146
1147
  $ chatbase sources delete src_1 -a agt_1
1147
1148
  ```
1148
1149
 
1149
- _See code: [src/commands/sources/delete.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.3.0/src/commands/sources/delete.ts)_
1150
+ _See code: [src/commands/sources/delete.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.4.0/src/commands/sources/delete.ts)_
1150
1151
 
1151
1152
  ## `chatbase sources get SOURCEID`
1152
1153
 
@@ -1179,7 +1180,7 @@ EXAMPLES
1179
1180
  $ chatbase sources get src_123 -a agt_123
1180
1181
  ```
1181
1182
 
1182
- _See code: [src/commands/sources/get.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.3.0/src/commands/sources/get.ts)_
1183
+ _See code: [src/commands/sources/get.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.4.0/src/commands/sources/get.ts)_
1183
1184
 
1184
1185
  ## `chatbase sources list`
1185
1186
 
@@ -1216,7 +1217,7 @@ EXAMPLES
1216
1217
  $ chatbase sources list -a agt_123 --all --json
1217
1218
  ```
1218
1219
 
1219
- _See code: [src/commands/sources/list.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.3.0/src/commands/sources/list.ts)_
1220
+ _See code: [src/commands/sources/list.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.4.0/src/commands/sources/list.ts)_
1220
1221
 
1221
1222
  ## `chatbase sources restore SOURCEID`
1222
1223
 
@@ -1249,7 +1250,7 @@ EXAMPLES
1249
1250
  $ chatbase sources restore src_1 -a agt_1
1250
1251
  ```
1251
1252
 
1252
- _See code: [src/commands/sources/restore.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.3.0/src/commands/sources/restore.ts)_
1253
+ _See code: [src/commands/sources/restore.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.4.0/src/commands/sources/restore.ts)_
1253
1254
 
1254
1255
  ## `chatbase sources summary`
1255
1256
 
@@ -1279,7 +1280,7 @@ EXAMPLES
1279
1280
  $ chatbase sources summary -a agt_123
1280
1281
  ```
1281
1282
 
1282
- _See code: [src/commands/sources/summary.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.3.0/src/commands/sources/summary.ts)_
1283
+ _See code: [src/commands/sources/summary.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.4.0/src/commands/sources/summary.ts)_
1283
1284
 
1284
1285
  ## `chatbase sources update SOURCEID`
1285
1286
 
@@ -1317,7 +1318,7 @@ EXAMPLES
1317
1318
  $ chatbase sources update src_1 --file ./updated.pdf -a agt_1
1318
1319
  ```
1319
1320
 
1320
- _See code: [src/commands/sources/update.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.3.0/src/commands/sources/update.ts)_
1321
+ _See code: [src/commands/sources/update.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.4.0/src/commands/sources/update.ts)_
1321
1322
 
1322
1323
  ## `chatbase tickets create`
1323
1324
 
@@ -1355,7 +1356,7 @@ EXAMPLES
1355
1356
  $ chatbase tickets create --subject "Export failing" --data '{"description":"Customer cannot export.","customer":{"email":"jane@example.com"}}' -a agt_123
1356
1357
  ```
1357
1358
 
1358
- _See code: [src/commands/tickets/create.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.3.0/src/commands/tickets/create.ts)_
1359
+ _See code: [src/commands/tickets/create.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.4.0/src/commands/tickets/create.ts)_
1359
1360
 
1360
1361
  ## `chatbase tickets get TICKETNUMBER`
1361
1362
 
@@ -1388,7 +1389,7 @@ EXAMPLES
1388
1389
  $ chatbase tickets get 42 -a agt_123
1389
1390
  ```
1390
1391
 
1391
- _See code: [src/commands/tickets/get.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.3.0/src/commands/tickets/get.ts)_
1392
+ _See code: [src/commands/tickets/get.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.4.0/src/commands/tickets/get.ts)_
1392
1393
 
1393
1394
  ## `chatbase tickets list`
1394
1395
 
@@ -1438,7 +1439,7 @@ EXAMPLES
1438
1439
  $ chatbase tickets list -a agt_123 --all --json
1439
1440
  ```
1440
1441
 
1441
- _See code: [src/commands/tickets/list.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.3.0/src/commands/tickets/list.ts)_
1442
+ _See code: [src/commands/tickets/list.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.4.0/src/commands/tickets/list.ts)_
1442
1443
 
1443
1444
  ## `chatbase tickets messages [TICKETNUMBER]`
1444
1445
 
@@ -1481,7 +1482,7 @@ EXAMPLES
1481
1482
  $ chatbase tickets messages 42 -a agt_123 --all --json
1482
1483
  ```
1483
1484
 
1484
- _See code: [src/commands/tickets/messages.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.3.0/src/commands/tickets/messages.ts)_
1485
+ _See code: [src/commands/tickets/messages.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.4.0/src/commands/tickets/messages.ts)_
1485
1486
 
1486
1487
  ## `chatbase tickets reply [TICKETNUMBER]`
1487
1488
 
@@ -1520,7 +1521,7 @@ EXAMPLES
1520
1521
  $ chatbase tickets reply 42 -m "On it" --author-email sam@example.com -a agt_123
1521
1522
  ```
1522
1523
 
1523
- _See code: [src/commands/tickets/reply.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.3.0/src/commands/tickets/reply.ts)_
1524
+ _See code: [src/commands/tickets/reply.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.4.0/src/commands/tickets/reply.ts)_
1524
1525
 
1525
1526
  ## `chatbase tickets search QUERY`
1526
1527
 
@@ -1556,7 +1557,7 @@ EXAMPLES
1556
1557
  $ chatbase tickets search "refund" -a agt_123 --limit 10 --json
1557
1558
  ```
1558
1559
 
1559
- _See code: [src/commands/tickets/search.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.3.0/src/commands/tickets/search.ts)_
1560
+ _See code: [src/commands/tickets/search.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.4.0/src/commands/tickets/search.ts)_
1560
1561
 
1561
1562
  ## `chatbase tickets update TICKETNUMBER`
1562
1563
 
@@ -1592,7 +1593,51 @@ EXAMPLES
1592
1593
  $ chatbase tickets update 42 --data '{"statusCategory":"closed"}' -a agt_123
1593
1594
  ```
1594
1595
 
1595
- _See code: [src/commands/tickets/update.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.3.0/src/commands/tickets/update.ts)_
1596
+ _See code: [src/commands/tickets/update.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.4.0/src/commands/tickets/update.ts)_
1597
+
1598
+ ## `chatbase voice start`
1599
+
1600
+ Start a voice session
1601
+
1602
+ ```
1603
+ USAGE
1604
+ $ chatbase voice start [--json] [--plain] [-q] [--verbose] [--no-input] [--no-color] [--agent-name <value> | -a
1605
+ <value>] [--conversation <value>] [--user <value>] [--timezone <value>]
1606
+
1607
+ FLAGS
1608
+ -a, --agent=<value> Agent ID (or set CHATBASE_AGENT_ID)
1609
+ -q, --quiet Suppress non-essential output
1610
+ --agent-name=<value> Agent display name (looked up to an ID)
1611
+ --conversation=<value> Conversation ID to reuse, grouping several sessions into one conversation (default: start
1612
+ a new conversation)
1613
+ --no-color Disable colored output
1614
+ --no-input Never prompt; fail instead
1615
+ --timezone=<value> [default: UTC] IANA timezone of the end user, used by the agent for time-aware answers
1616
+ --user=<value> Your end-user ID; send a stable value so per-user voice limits apply (default: generated
1617
+ per session)
1618
+ --verbose Verbose diagnostics
1619
+
1620
+ OUTPUT FLAGS
1621
+ --json Output raw API JSON
1622
+ --plain Tab-separated output for scripts
1623
+
1624
+ DESCRIPTION
1625
+ Start a voice session
1626
+
1627
+ Create a real-time voice session for an agent and print its credentials. Pass the response to the Chatbase Voice SDK
1628
+ (@chatbase-co/voice-sdk) in your client: the SDK connects, publishes the microphone, and the agent joins
1629
+ automatically. Requires a plan with voice mode enabled; voice minutes consume message credits. The participant token
1630
+ is abbreviated in the default output — use --json or --plain for the full value.
1631
+
1632
+ EXAMPLES
1633
+ $ chatbase voice start -a agt_123
1634
+
1635
+ $ chatbase voice start --user user_42 --timezone Europe/Paris -a agt_123
1636
+
1637
+ $ chatbase voice start --conversation 0b6a1f2e-7c3d-4a5b-8e9f-1a2b3c4d5e6f --json -a agt_123
1638
+ ```
1639
+
1640
+ _See code: [src/commands/voice/start.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.4.0/src/commands/voice/start.ts)_
1596
1641
 
1597
1642
  ## `chatbase whatsapp send-template TEMPLATE`
1598
1643
 
@@ -1636,7 +1681,7 @@ EXAMPLES
1636
1681
  $ chatbase whatsapp send-template order_update --to 14155552671 --language en_US --variables '{"header":{"1":"#1042"},"body":{"1":"Jane","2":"Friday"}}' -a agt_123
1637
1682
  ```
1638
1683
 
1639
- _See code: [src/commands/whatsapp/send-template.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.3.0/src/commands/whatsapp/send-template.ts)_
1684
+ _See code: [src/commands/whatsapp/send-template.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.4.0/src/commands/whatsapp/send-template.ts)_
1640
1685
 
1641
1686
  ## `chatbase whatsapp templates`
1642
1687
 
@@ -1672,5 +1717,5 @@ EXAMPLES
1672
1717
  $ chatbase whatsapp templates -a agt_123 --json
1673
1718
  ```
1674
1719
 
1675
- _See code: [src/commands/whatsapp/templates.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.3.0/src/commands/whatsapp/templates.ts)_
1720
+ _See code: [src/commands/whatsapp/templates.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.4.0/src/commands/whatsapp/templates.ts)_
1676
1721
  <!-- commandsstop -->
@@ -0,0 +1,78 @@
1
+ import { Flags } from '@oclif/core';
2
+ import { AgentCommand } from '../../base/agent-command.js';
3
+ import { throwIfError } from '../../client/client.js';
4
+ const VOICE_SESSION_COLUMNS = [
5
+ { key: 'sessionId', header: 'SESSION' },
6
+ { key: 'conversationId', header: 'CONVERSATION' },
7
+ { key: 'userId', header: 'USER' },
8
+ { key: 'roomName', header: 'ROOM' },
9
+ { key: 'maxDurationSeconds', header: 'MAX_SECONDS' },
10
+ { key: 'participantToken', header: 'TOKEN' }
11
+ ];
12
+ export default class VoiceStart extends AgentCommand {
13
+ static summary = 'Start a voice session';
14
+ static description = 'Create a real-time voice session for an agent and print its ' +
15
+ 'credentials. Pass the response to the Chatbase Voice SDK ' +
16
+ '(@chatbase-co/voice-sdk) in your client: the SDK connects, publishes ' +
17
+ 'the microphone, and the agent joins automatically. Requires a plan ' +
18
+ 'with voice mode enabled; voice minutes consume message credits. The ' +
19
+ 'participant token is abbreviated in the default output — use --json ' +
20
+ 'or --plain for the full value.';
21
+ static examples = [
22
+ '<%= config.bin %> voice start -a agt_123',
23
+ '<%= config.bin %> voice start --user user_42 --timezone Europe/Paris -a agt_123',
24
+ '<%= config.bin %> voice start --conversation 0b6a1f2e-7c3d-4a5b-8e9f-1a2b3c4d5e6f --json -a agt_123'
25
+ ];
26
+ static flags = {
27
+ ...AgentCommand.baseFlags,
28
+ conversation: Flags.string({
29
+ description: 'Conversation ID to reuse, grouping several sessions into one conversation (default: start a new conversation)'
30
+ }),
31
+ user: Flags.string({
32
+ description: 'Your end-user ID; send a stable value so per-user voice limits apply (default: generated per session)'
33
+ }),
34
+ timezone: Flags.string({
35
+ description: 'IANA timezone of the end user, used by the agent for time-aware answers',
36
+ default: 'UTC'
37
+ })
38
+ };
39
+ async run() {
40
+ const { flags } = await this.parse(VoiceStart);
41
+ const client = this.apiClient(flags);
42
+ const agentId = await this.agentId(flags, client);
43
+ // `timezone` carries a spec default, so it is required in the body type.
44
+ const body = {
45
+ timezone: flags.timezone,
46
+ ...(flags.conversation
47
+ ? { conversationId: flags.conversation }
48
+ : {}),
49
+ ...(flags.user ? { userId: flags.user } : {})
50
+ };
51
+ const { data, error, response } = await client.POST('/agents/{agentId}/voice/sessions', { params: { path: { agentId } }, body });
52
+ throwIfError(response, error);
53
+ const session = data.data;
54
+ const row = {
55
+ sessionId: session.sessionId,
56
+ conversationId: session.conversationId,
57
+ userId: session.userId,
58
+ roomName: session.roomName,
59
+ maxDurationSeconds: String(session.maxDurationSeconds),
60
+ participantToken: session.participantToken
61
+ };
62
+ this.success(flags, 'Voice session started');
63
+ this.printDetail(flags, data, row, VOICE_SESSION_COLUMNS, [
64
+ ['Session', session.sessionId],
65
+ ['Conversation', session.conversationId],
66
+ ['User', session.userId],
67
+ ['Room', session.roomName],
68
+ ['Max duration', `${session.maxDurationSeconds}s`],
69
+ [
70
+ 'Token',
71
+ `${session.participantToken.slice(0, 16)}… (${session.participantToken.length} chars)`
72
+ ]
73
+ ]);
74
+ if (this.mode(flags) === 'pretty') {
75
+ this.note(flags, '→ rerun with --json to get the full participant token for the Voice SDK');
76
+ }
77
+ }
78
+ }
@@ -4113,6 +4113,113 @@
4113
4113
  "update.js"
4114
4114
  ]
4115
4115
  },
4116
+ "voice:start": {
4117
+ "aliases": [],
4118
+ "args": {},
4119
+ "description": "Create a real-time voice session for an agent and print its credentials. Pass the response to the Chatbase Voice SDK (@chatbase-co/voice-sdk) in your client: the SDK connects, publishes the microphone, and the agent joins automatically. Requires a plan with voice mode enabled; voice minutes consume message credits. The participant token is abbreviated in the default output — use --json or --plain for the full value.",
4120
+ "examples": [
4121
+ "<%= config.bin %> voice start -a agt_123",
4122
+ "<%= config.bin %> voice start --user user_42 --timezone Europe/Paris -a agt_123",
4123
+ "<%= config.bin %> voice start --conversation 0b6a1f2e-7c3d-4a5b-8e9f-1a2b3c4d5e6f --json -a agt_123"
4124
+ ],
4125
+ "flags": {
4126
+ "json": {
4127
+ "description": "Output raw API JSON",
4128
+ "helpGroup": "OUTPUT",
4129
+ "name": "json",
4130
+ "allowNo": false,
4131
+ "type": "boolean"
4132
+ },
4133
+ "plain": {
4134
+ "description": "Tab-separated output for scripts",
4135
+ "helpGroup": "OUTPUT",
4136
+ "name": "plain",
4137
+ "allowNo": false,
4138
+ "type": "boolean"
4139
+ },
4140
+ "quiet": {
4141
+ "char": "q",
4142
+ "description": "Suppress non-essential output",
4143
+ "name": "quiet",
4144
+ "allowNo": false,
4145
+ "type": "boolean"
4146
+ },
4147
+ "verbose": {
4148
+ "description": "Verbose diagnostics",
4149
+ "name": "verbose",
4150
+ "allowNo": false,
4151
+ "type": "boolean"
4152
+ },
4153
+ "no-input": {
4154
+ "description": "Never prompt; fail instead",
4155
+ "name": "no-input",
4156
+ "allowNo": false,
4157
+ "type": "boolean"
4158
+ },
4159
+ "no-color": {
4160
+ "description": "Disable colored output",
4161
+ "name": "no-color",
4162
+ "allowNo": false,
4163
+ "type": "boolean"
4164
+ },
4165
+ "agent": {
4166
+ "char": "a",
4167
+ "description": "Agent ID (or set CHATBASE_AGENT_ID)",
4168
+ "name": "agent",
4169
+ "hasDynamicHelp": false,
4170
+ "multiple": false,
4171
+ "type": "option"
4172
+ },
4173
+ "agent-name": {
4174
+ "description": "Agent display name (looked up to an ID)",
4175
+ "exclusive": [
4176
+ "agent"
4177
+ ],
4178
+ "name": "agent-name",
4179
+ "hasDynamicHelp": false,
4180
+ "multiple": false,
4181
+ "type": "option"
4182
+ },
4183
+ "conversation": {
4184
+ "description": "Conversation ID to reuse, grouping several sessions into one conversation (default: start a new conversation)",
4185
+ "name": "conversation",
4186
+ "hasDynamicHelp": false,
4187
+ "multiple": false,
4188
+ "type": "option"
4189
+ },
4190
+ "user": {
4191
+ "description": "Your end-user ID; send a stable value so per-user voice limits apply (default: generated per session)",
4192
+ "name": "user",
4193
+ "hasDynamicHelp": false,
4194
+ "multiple": false,
4195
+ "type": "option"
4196
+ },
4197
+ "timezone": {
4198
+ "description": "IANA timezone of the end user, used by the agent for time-aware answers",
4199
+ "name": "timezone",
4200
+ "default": "UTC",
4201
+ "hasDynamicHelp": false,
4202
+ "multiple": false,
4203
+ "type": "option"
4204
+ }
4205
+ },
4206
+ "hasDynamicHelp": false,
4207
+ "hiddenAliases": [],
4208
+ "id": "voice:start",
4209
+ "pluginAlias": "chatbase",
4210
+ "pluginName": "chatbase",
4211
+ "pluginType": "core",
4212
+ "strict": true,
4213
+ "summary": "Start a voice session",
4214
+ "enableJsonFlag": false,
4215
+ "isESM": true,
4216
+ "relativePath": [
4217
+ "dist",
4218
+ "commands",
4219
+ "voice",
4220
+ "start.js"
4221
+ ]
4222
+ },
4116
4223
  "whatsapp:send-template": {
4117
4224
  "aliases": [],
4118
4225
  "args": {
@@ -4317,5 +4424,5 @@
4317
4424
  ]
4318
4425
  }
4319
4426
  },
4320
- "version": "0.3.0"
4427
+ "version": "0.4.0"
4321
4428
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chatbase",
3
- "version": "0.3.0",
3
+ "version": "0.4.0",
4
4
  "description": "The official command-line interface for the Chatbase API v2",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -73,6 +73,9 @@
73
73
  "helpdesk": {
74
74
  "description": "Look up helpdesk teams and ticket statuses"
75
75
  },
76
+ "voice": {
77
+ "description": "Start real-time voice sessions for an agent"
78
+ },
76
79
  "whatsapp": {
77
80
  "description": "List WhatsApp templates and send template messages"
78
81
  },
package/spec/openapi.json CHANGED
@@ -3173,6 +3173,65 @@
3173
3173
  "messageId"
3174
3174
  ]
3175
3175
  },
3176
+ "VoiceSessionResponse": {
3177
+ "type": "object",
3178
+ "properties": {
3179
+ "participantToken": {
3180
+ "type": "string",
3181
+ "description": "Short-lived token scoped to this session. Pass the response `data` to the Chatbase Voice SDK in your client; safe to hand to the browser or mobile app."
3182
+ },
3183
+ "sessionId": {
3184
+ "type": "string",
3185
+ "description": "The voice session ID."
3186
+ },
3187
+ "roomName": {
3188
+ "type": "string",
3189
+ "description": "The session room name, for correlating logs."
3190
+ },
3191
+ "maxDurationSeconds": {
3192
+ "type": "integer",
3193
+ "description": "Maximum session duration; the session ends automatically when it elapses."
3194
+ },
3195
+ "conversationId": {
3196
+ "type": "string",
3197
+ "description": "The conversation this session belongs to (echoed or generated)."
3198
+ },
3199
+ "userId": {
3200
+ "type": "string",
3201
+ "description": "The end-user ID for this session (echoed or generated)."
3202
+ }
3203
+ },
3204
+ "required": [
3205
+ "participantToken",
3206
+ "sessionId",
3207
+ "roomName",
3208
+ "maxDurationSeconds",
3209
+ "conversationId",
3210
+ "userId"
3211
+ ]
3212
+ },
3213
+ "VoiceSessionRequest": {
3214
+ "type": "object",
3215
+ "properties": {
3216
+ "conversationId": {
3217
+ "type": "string",
3218
+ "format": "uuid",
3219
+ "description": "Optional conversation UUID. Reuse a value to group multiple voice sessions into one conversation in chat logs. If omitted, a new conversation is created. A conversation belongs to the end-user who started it: when reusing, send that same userId or omit userId to inherit it. Sending a different userId is rejected with CONVERSATION_USER_MISMATCH, unless the conversation is still anonymous — then it is claimed by the userId you send."
3220
+ },
3221
+ "userId": {
3222
+ "type": "string",
3223
+ "maxLength": 128,
3224
+ "pattern": "^[a-zA-Z0-9._-]+$",
3225
+ "description": "Your end-user ID. Send a stable ID so per-user voice limits apply; if omitted a random one is generated per session (or inherited from the conversation when reusing a conversationId). Sessions with the same userId but no conversationId are separate conversations owned by the same end-user. Must contain only URL-safe characters (letters, digits, hyphens, underscores, dots)."
3226
+ },
3227
+ "timezone": {
3228
+ "type": "string",
3229
+ "maxLength": 64,
3230
+ "default": "UTC",
3231
+ "description": "IANA timezone of the end user (e.g. \"Europe/Paris\"), used by the agent for time-aware answers. Defaults to UTC."
3232
+ }
3233
+ }
3234
+ },
3176
3235
  "ListConversationsResponse": {
3177
3236
  "type": "object",
3178
3237
  "properties": {
@@ -7458,6 +7517,177 @@
7458
7517
  }
7459
7518
  }
7460
7519
  },
7520
+ "/agents/{agentId}/voice/sessions": {
7521
+ "post": {
7522
+ "operationId": "createVoiceSession",
7523
+ "tags": [
7524
+ "Agents"
7525
+ ],
7526
+ "summary": "Start a voice session",
7527
+ "description": "Create a real-time voice session for an agent. Pass the response `data` to the Chatbase Voice SDK (`@chatbase-co/voice-sdk`) in your client: the SDK connects, publishes the microphone, and the agent joins automatically. Requires a plan with voice mode enabled; voice minutes consume message credits. Send `{}` when no options are needed.",
7528
+ "security": [
7529
+ {
7530
+ "bearerAuth": []
7531
+ }
7532
+ ],
7533
+ "parameters": [
7534
+ {
7535
+ "schema": {
7536
+ "type": "string",
7537
+ "minLength": 1,
7538
+ "description": "The agent ID",
7539
+ "example": "5QHA6VB-DIAbBhxwqxfdi"
7540
+ },
7541
+ "required": true,
7542
+ "description": "The agent ID",
7543
+ "name": "agentId",
7544
+ "in": "path"
7545
+ }
7546
+ ],
7547
+ "requestBody": {
7548
+ "required": true,
7549
+ "content": {
7550
+ "application/json": {
7551
+ "schema": {
7552
+ "$ref": "#/components/schemas/VoiceSessionRequest"
7553
+ }
7554
+ }
7555
+ }
7556
+ },
7557
+ "responses": {
7558
+ "200": {
7559
+ "description": "Voice session created",
7560
+ "content": {
7561
+ "application/json": {
7562
+ "schema": {
7563
+ "type": "object",
7564
+ "properties": {
7565
+ "data": {
7566
+ "$ref": "#/components/schemas/VoiceSessionResponse"
7567
+ }
7568
+ },
7569
+ "required": [
7570
+ "data"
7571
+ ]
7572
+ }
7573
+ }
7574
+ }
7575
+ },
7576
+ "400": {
7577
+ "description": "The request body failed schema validation. Inspect the `details` object in the error response for field-level errors.",
7578
+ "content": {
7579
+ "application/json": {
7580
+ "schema": {
7581
+ "$ref": "#/components/schemas/ErrorResponse"
7582
+ },
7583
+ "example": {
7584
+ "error": {
7585
+ "code": "VALIDATION_INVALID_BODY",
7586
+ "message": "Invalid request"
7587
+ }
7588
+ }
7589
+ }
7590
+ }
7591
+ },
7592
+ "401": {
7593
+ "description": "No Authorization header present. Provide a valid API key as a Bearer token in the Authorization header: `Authorization: Bearer <api-key>`.",
7594
+ "content": {
7595
+ "application/json": {
7596
+ "schema": {
7597
+ "$ref": "#/components/schemas/ErrorResponse"
7598
+ },
7599
+ "example": {
7600
+ "error": {
7601
+ "code": "AUTH_MISSING_API_KEY",
7602
+ "message": "Authentication required"
7603
+ }
7604
+ }
7605
+ }
7606
+ }
7607
+ },
7608
+ "403": {
7609
+ "description": "Your current plan does not include API access. Upgrade to the Standard plan or higher to use the API.",
7610
+ "content": {
7611
+ "application/json": {
7612
+ "schema": {
7613
+ "$ref": "#/components/schemas/ErrorResponse"
7614
+ },
7615
+ "example": {
7616
+ "error": {
7617
+ "code": "SUBSCRIPTION_API_RESTRICTED_PLAN",
7618
+ "message": "A Standard plan or higher is required to access the API"
7619
+ }
7620
+ }
7621
+ }
7622
+ }
7623
+ },
7624
+ "404": {
7625
+ "description": "No agent matches the provided `agentId`, or it does not belong to the authenticated account.",
7626
+ "content": {
7627
+ "application/json": {
7628
+ "schema": {
7629
+ "$ref": "#/components/schemas/ErrorResponse"
7630
+ },
7631
+ "example": {
7632
+ "error": {
7633
+ "code": "AGENT_NOT_FOUND",
7634
+ "message": "Agent not found"
7635
+ }
7636
+ }
7637
+ }
7638
+ }
7639
+ },
7640
+ "429": {
7641
+ "description": "Rate limit exceeded. Check the `X-RateLimit-Reset` response header for the Unix epoch seconds when the limit resets.",
7642
+ "content": {
7643
+ "application/json": {
7644
+ "schema": {
7645
+ "$ref": "#/components/schemas/ErrorResponse"
7646
+ },
7647
+ "example": {
7648
+ "error": {
7649
+ "code": "RATE_LIMIT_TOO_MANY_REQUESTS",
7650
+ "message": "Too many requests, please try again later"
7651
+ }
7652
+ }
7653
+ }
7654
+ }
7655
+ },
7656
+ "500": {
7657
+ "description": "An unhandled server error occurred. If the issue persists, contact support with the `x-request-id` response header value for debugging.",
7658
+ "content": {
7659
+ "application/json": {
7660
+ "schema": {
7661
+ "$ref": "#/components/schemas/ErrorResponse"
7662
+ },
7663
+ "example": {
7664
+ "error": {
7665
+ "code": "INTERNAL_SERVER_ERROR",
7666
+ "message": "Something went wrong, please try again"
7667
+ }
7668
+ }
7669
+ }
7670
+ }
7671
+ },
7672
+ "503": {
7673
+ "description": "Chatbase is undergoing scheduled maintenance and the API is temporarily rejecting requests. This is transient; retry after a short delay. Requests are rejected before any data is read or written, so no partial changes are applied.",
7674
+ "content": {
7675
+ "application/json": {
7676
+ "schema": {
7677
+ "$ref": "#/components/schemas/ErrorResponse"
7678
+ },
7679
+ "example": {
7680
+ "error": {
7681
+ "code": "SERVICE_UNDER_MAINTENANCE",
7682
+ "message": "The API is temporarily unavailable for scheduled maintenance, please try again later"
7683
+ }
7684
+ }
7685
+ }
7686
+ }
7687
+ }
7688
+ }
7689
+ }
7690
+ },
7461
7691
  "/agents/{agentId}/conversations": {
7462
7692
  "get": {
7463
7693
  "operationId": "listConversations",