@respan/cli 0.3.3 → 0.4.1

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.
@@ -428,10 +428,16 @@
428
428
  "set.js"
429
429
  ]
430
430
  },
431
- "evaluators:create": {
431
+ "datasets:add-spans": {
432
432
  "aliases": [],
433
- "args": {},
434
- "description": "Create a new evaluator",
433
+ "args": {
434
+ "dataset-id": {
435
+ "description": "Dataset ID",
436
+ "name": "dataset-id",
437
+ "required": true
438
+ }
439
+ },
440
+ "description": "Add existing spans to a dataset",
435
441
  "flags": {
436
442
  "api-key": {
437
443
  "description": "API key (env: RESPAN_API_KEY)",
@@ -467,39 +473,18 @@
467
473
  "allowNo": false,
468
474
  "type": "boolean"
469
475
  },
470
- "name": {
471
- "description": "Evaluator name",
472
- "name": "name",
476
+ "span-ids": {
477
+ "description": "Comma-separated span IDs",
478
+ "name": "span-ids",
473
479
  "required": true,
474
480
  "hasDynamicHelp": false,
475
481
  "multiple": false,
476
482
  "type": "option"
477
- },
478
- "type": {
479
- "description": "Evaluator type",
480
- "name": "type",
481
- "hasDynamicHelp": false,
482
- "multiple": false,
483
- "type": "option"
484
- },
485
- "description": {
486
- "description": "Evaluator description",
487
- "name": "description",
488
- "hasDynamicHelp": false,
489
- "multiple": false,
490
- "type": "option"
491
- },
492
- "config": {
493
- "description": "Evaluator config as JSON string",
494
- "name": "config",
495
- "hasDynamicHelp": false,
496
- "multiple": false,
497
- "type": "option"
498
483
  }
499
484
  },
500
485
  "hasDynamicHelp": false,
501
486
  "hiddenAliases": [],
502
- "id": "evaluators:create",
487
+ "id": "datasets:add-spans",
503
488
  "pluginAlias": "@respan/cli",
504
489
  "pluginName": "@respan/cli",
505
490
  "pluginType": "core",
@@ -509,20 +494,20 @@
509
494
  "relativePath": [
510
495
  "dist",
511
496
  "commands",
512
- "evaluators",
513
- "create.js"
497
+ "datasets",
498
+ "add-spans.js"
514
499
  ]
515
500
  },
516
- "evaluators:get": {
501
+ "datasets:create-span": {
517
502
  "aliases": [],
518
503
  "args": {
519
- "id": {
520
- "description": "Evaluator ID",
521
- "name": "id",
504
+ "dataset-id": {
505
+ "description": "Dataset ID",
506
+ "name": "dataset-id",
522
507
  "required": true
523
508
  }
524
509
  },
525
- "description": "Get a specific evaluator",
510
+ "description": "Create a span in a dataset",
526
511
  "flags": {
527
512
  "api-key": {
528
513
  "description": "API key (env: RESPAN_API_KEY)",
@@ -557,11 +542,19 @@
557
542
  "name": "verbose",
558
543
  "allowNo": false,
559
544
  "type": "boolean"
545
+ },
546
+ "body": {
547
+ "description": "Span body as JSON string",
548
+ "name": "body",
549
+ "required": true,
550
+ "hasDynamicHelp": false,
551
+ "multiple": false,
552
+ "type": "option"
560
553
  }
561
554
  },
562
555
  "hasDynamicHelp": false,
563
556
  "hiddenAliases": [],
564
- "id": "evaluators:get",
557
+ "id": "datasets:create-span",
565
558
  "pluginAlias": "@respan/cli",
566
559
  "pluginName": "@respan/cli",
567
560
  "pluginType": "core",
@@ -571,14 +564,14 @@
571
564
  "relativePath": [
572
565
  "dist",
573
566
  "commands",
574
- "evaluators",
575
- "get.js"
567
+ "datasets",
568
+ "create-span.js"
576
569
  ]
577
570
  },
578
- "evaluators:list": {
571
+ "datasets:create": {
579
572
  "aliases": [],
580
573
  "args": {},
581
- "description": "List evaluators",
574
+ "description": "Create a new dataset",
582
575
  "flags": {
583
576
  "api-key": {
584
577
  "description": "API key (env: RESPAN_API_KEY)",
@@ -614,18 +607,17 @@
614
607
  "allowNo": false,
615
608
  "type": "boolean"
616
609
  },
617
- "limit": {
618
- "description": "Number of results per page",
619
- "name": "limit",
620
- "default": 20,
610
+ "name": {
611
+ "description": "Dataset name",
612
+ "name": "name",
613
+ "required": true,
621
614
  "hasDynamicHelp": false,
622
615
  "multiple": false,
623
616
  "type": "option"
624
617
  },
625
- "page": {
626
- "description": "Page number",
627
- "name": "page",
628
- "default": 1,
618
+ "description": {
619
+ "description": "Dataset description",
620
+ "name": "description",
629
621
  "hasDynamicHelp": false,
630
622
  "multiple": false,
631
623
  "type": "option"
@@ -633,7 +625,7 @@
633
625
  },
634
626
  "hasDynamicHelp": false,
635
627
  "hiddenAliases": [],
636
- "id": "evaluators:list",
628
+ "id": "datasets:create",
637
629
  "pluginAlias": "@respan/cli",
638
630
  "pluginName": "@respan/cli",
639
631
  "pluginType": "core",
@@ -643,20 +635,25 @@
643
635
  "relativePath": [
644
636
  "dist",
645
637
  "commands",
646
- "evaluators",
647
- "list.js"
638
+ "datasets",
639
+ "create.js"
648
640
  ]
649
641
  },
650
- "evaluators:run": {
642
+ "datasets:get-span": {
651
643
  "aliases": [],
652
644
  "args": {
653
- "id": {
654
- "description": "Evaluator ID",
655
- "name": "id",
645
+ "dataset-id": {
646
+ "description": "Dataset ID",
647
+ "name": "dataset-id",
648
+ "required": true
649
+ },
650
+ "span-id": {
651
+ "description": "Span ID",
652
+ "name": "span-id",
656
653
  "required": true
657
654
  }
658
655
  },
659
- "description": "Run an evaluator",
656
+ "description": "Get a specific span from a dataset",
660
657
  "flags": {
661
658
  "api-key": {
662
659
  "description": "API key (env: RESPAN_API_KEY)",
@@ -691,32 +688,11 @@
691
688
  "name": "verbose",
692
689
  "allowNo": false,
693
690
  "type": "boolean"
694
- },
695
- "dataset-id": {
696
- "description": "Dataset ID to evaluate against",
697
- "name": "dataset-id",
698
- "hasDynamicHelp": false,
699
- "multiple": false,
700
- "type": "option"
701
- },
702
- "log-ids": {
703
- "description": "Comma-separated log/span IDs to evaluate",
704
- "name": "log-ids",
705
- "hasDynamicHelp": false,
706
- "multiple": false,
707
- "type": "option"
708
- },
709
- "params": {
710
- "description": "Additional parameters as JSON string",
711
- "name": "params",
712
- "hasDynamicHelp": false,
713
- "multiple": false,
714
- "type": "option"
715
691
  }
716
692
  },
717
693
  "hasDynamicHelp": false,
718
694
  "hiddenAliases": [],
719
- "id": "evaluators:run",
695
+ "id": "datasets:get-span",
720
696
  "pluginAlias": "@respan/cli",
721
697
  "pluginName": "@respan/cli",
722
698
  "pluginType": "core",
@@ -726,20 +702,20 @@
726
702
  "relativePath": [
727
703
  "dist",
728
704
  "commands",
729
- "evaluators",
730
- "run.js"
705
+ "datasets",
706
+ "get-span.js"
731
707
  ]
732
708
  },
733
- "evaluators:update": {
709
+ "datasets:get": {
734
710
  "aliases": [],
735
711
  "args": {
736
712
  "id": {
737
- "description": "Evaluator ID",
713
+ "description": "Dataset ID",
738
714
  "name": "id",
739
715
  "required": true
740
716
  }
741
717
  },
742
- "description": "Update an evaluator",
718
+ "description": "Get a specific dataset",
743
719
  "flags": {
744
720
  "api-key": {
745
721
  "description": "API key (env: RESPAN_API_KEY)",
@@ -774,32 +750,11 @@
774
750
  "name": "verbose",
775
751
  "allowNo": false,
776
752
  "type": "boolean"
777
- },
778
- "name": {
779
- "description": "Evaluator name",
780
- "name": "name",
781
- "hasDynamicHelp": false,
782
- "multiple": false,
783
- "type": "option"
784
- },
785
- "description": {
786
- "description": "Evaluator description",
787
- "name": "description",
788
- "hasDynamicHelp": false,
789
- "multiple": false,
790
- "type": "option"
791
- },
792
- "config": {
793
- "description": "Evaluator config as JSON string",
794
- "name": "config",
795
- "hasDynamicHelp": false,
796
- "multiple": false,
797
- "type": "option"
798
753
  }
799
754
  },
800
755
  "hasDynamicHelp": false,
801
756
  "hiddenAliases": [],
802
- "id": "evaluators:update",
757
+ "id": "datasets:get",
803
758
  "pluginAlias": "@respan/cli",
804
759
  "pluginName": "@respan/cli",
805
760
  "pluginType": "core",
@@ -809,20 +764,14 @@
809
764
  "relativePath": [
810
765
  "dist",
811
766
  "commands",
812
- "evaluators",
813
- "update.js"
767
+ "datasets",
768
+ "get.js"
814
769
  ]
815
770
  },
816
- "datasets:add-spans": {
771
+ "datasets:list": {
817
772
  "aliases": [],
818
- "args": {
819
- "dataset-id": {
820
- "description": "Dataset ID",
821
- "name": "dataset-id",
822
- "required": true
823
- }
824
- },
825
- "description": "Add existing spans to a dataset",
773
+ "args": {},
774
+ "description": "List datasets",
826
775
  "flags": {
827
776
  "api-key": {
828
777
  "description": "API key (env: RESPAN_API_KEY)",
@@ -858,10 +807,18 @@
858
807
  "allowNo": false,
859
808
  "type": "boolean"
860
809
  },
861
- "span-ids": {
862
- "description": "Comma-separated span IDs",
863
- "name": "span-ids",
864
- "required": true,
810
+ "limit": {
811
+ "description": "Number of results per page",
812
+ "name": "limit",
813
+ "default": 50,
814
+ "hasDynamicHelp": false,
815
+ "multiple": false,
816
+ "type": "option"
817
+ },
818
+ "page": {
819
+ "description": "Page number",
820
+ "name": "page",
821
+ "default": 1,
865
822
  "hasDynamicHelp": false,
866
823
  "multiple": false,
867
824
  "type": "option"
@@ -869,7 +826,7 @@
869
826
  },
870
827
  "hasDynamicHelp": false,
871
828
  "hiddenAliases": [],
872
- "id": "datasets:add-spans",
829
+ "id": "datasets:list",
873
830
  "pluginAlias": "@respan/cli",
874
831
  "pluginName": "@respan/cli",
875
832
  "pluginType": "core",
@@ -880,10 +837,10 @@
880
837
  "dist",
881
838
  "commands",
882
839
  "datasets",
883
- "add-spans.js"
840
+ "list.js"
884
841
  ]
885
842
  },
886
- "datasets:create-span": {
843
+ "datasets:spans": {
887
844
  "aliases": [],
888
845
  "args": {
889
846
  "dataset-id": {
@@ -892,7 +849,7 @@
892
849
  "required": true
893
850
  }
894
851
  },
895
- "description": "Create a span in a dataset",
852
+ "description": "List spans in a dataset",
896
853
  "flags": {
897
854
  "api-key": {
898
855
  "description": "API key (env: RESPAN_API_KEY)",
@@ -927,19 +884,11 @@
927
884
  "name": "verbose",
928
885
  "allowNo": false,
929
886
  "type": "boolean"
930
- },
931
- "body": {
932
- "description": "Span body as JSON string",
933
- "name": "body",
934
- "required": true,
935
- "hasDynamicHelp": false,
936
- "multiple": false,
937
- "type": "option"
938
887
  }
939
888
  },
940
889
  "hasDynamicHelp": false,
941
890
  "hiddenAliases": [],
942
- "id": "datasets:create-span",
891
+ "id": "datasets:spans",
943
892
  "pluginAlias": "@respan/cli",
944
893
  "pluginName": "@respan/cli",
945
894
  "pluginType": "core",
@@ -950,13 +899,19 @@
950
899
  "dist",
951
900
  "commands",
952
901
  "datasets",
953
- "create-span.js"
902
+ "spans.js"
954
903
  ]
955
904
  },
956
- "datasets:create": {
905
+ "datasets:update": {
957
906
  "aliases": [],
958
- "args": {},
959
- "description": "Create a new dataset",
907
+ "args": {
908
+ "id": {
909
+ "description": "Dataset ID",
910
+ "name": "id",
911
+ "required": true
912
+ }
913
+ },
914
+ "description": "Update a dataset",
960
915
  "flags": {
961
916
  "api-key": {
962
917
  "description": "API key (env: RESPAN_API_KEY)",
@@ -995,7 +950,6 @@
995
950
  "name": {
996
951
  "description": "Dataset name",
997
952
  "name": "name",
998
- "required": true,
999
953
  "hasDynamicHelp": false,
1000
954
  "multiple": false,
1001
955
  "type": "option"
@@ -1010,7 +964,7 @@
1010
964
  },
1011
965
  "hasDynamicHelp": false,
1012
966
  "hiddenAliases": [],
1013
- "id": "datasets:create",
967
+ "id": "datasets:update",
1014
968
  "pluginAlias": "@respan/cli",
1015
969
  "pluginName": "@respan/cli",
1016
970
  "pluginType": "core",
@@ -1021,24 +975,13 @@
1021
975
  "dist",
1022
976
  "commands",
1023
977
  "datasets",
1024
- "create.js"
978
+ "update.js"
1025
979
  ]
1026
980
  },
1027
- "datasets:get-span": {
981
+ "evaluators:create": {
1028
982
  "aliases": [],
1029
- "args": {
1030
- "dataset-id": {
1031
- "description": "Dataset ID",
1032
- "name": "dataset-id",
1033
- "required": true
1034
- },
1035
- "span-id": {
1036
- "description": "Span ID",
1037
- "name": "span-id",
1038
- "required": true
1039
- }
1040
- },
1041
- "description": "Get a specific span from a dataset",
983
+ "args": {},
984
+ "description": "Create a new evaluator",
1042
985
  "flags": {
1043
986
  "api-key": {
1044
987
  "description": "API key (env: RESPAN_API_KEY)",
@@ -1073,11 +1016,40 @@
1073
1016
  "name": "verbose",
1074
1017
  "allowNo": false,
1075
1018
  "type": "boolean"
1076
- }
1077
- },
1078
- "hasDynamicHelp": false,
1079
- "hiddenAliases": [],
1080
- "id": "datasets:get-span",
1019
+ },
1020
+ "name": {
1021
+ "description": "Evaluator name",
1022
+ "name": "name",
1023
+ "required": true,
1024
+ "hasDynamicHelp": false,
1025
+ "multiple": false,
1026
+ "type": "option"
1027
+ },
1028
+ "type": {
1029
+ "description": "Evaluator type",
1030
+ "name": "type",
1031
+ "hasDynamicHelp": false,
1032
+ "multiple": false,
1033
+ "type": "option"
1034
+ },
1035
+ "description": {
1036
+ "description": "Evaluator description",
1037
+ "name": "description",
1038
+ "hasDynamicHelp": false,
1039
+ "multiple": false,
1040
+ "type": "option"
1041
+ },
1042
+ "config": {
1043
+ "description": "Evaluator config as JSON string",
1044
+ "name": "config",
1045
+ "hasDynamicHelp": false,
1046
+ "multiple": false,
1047
+ "type": "option"
1048
+ }
1049
+ },
1050
+ "hasDynamicHelp": false,
1051
+ "hiddenAliases": [],
1052
+ "id": "evaluators:create",
1081
1053
  "pluginAlias": "@respan/cli",
1082
1054
  "pluginName": "@respan/cli",
1083
1055
  "pluginType": "core",
@@ -1087,20 +1059,20 @@
1087
1059
  "relativePath": [
1088
1060
  "dist",
1089
1061
  "commands",
1090
- "datasets",
1091
- "get-span.js"
1062
+ "evaluators",
1063
+ "create.js"
1092
1064
  ]
1093
1065
  },
1094
- "datasets:get": {
1066
+ "evaluators:get": {
1095
1067
  "aliases": [],
1096
1068
  "args": {
1097
1069
  "id": {
1098
- "description": "Dataset ID",
1070
+ "description": "Evaluator ID",
1099
1071
  "name": "id",
1100
1072
  "required": true
1101
1073
  }
1102
1074
  },
1103
- "description": "Get a specific dataset",
1075
+ "description": "Get a specific evaluator",
1104
1076
  "flags": {
1105
1077
  "api-key": {
1106
1078
  "description": "API key (env: RESPAN_API_KEY)",
@@ -1139,7 +1111,7 @@
1139
1111
  },
1140
1112
  "hasDynamicHelp": false,
1141
1113
  "hiddenAliases": [],
1142
- "id": "datasets:get",
1114
+ "id": "evaluators:get",
1143
1115
  "pluginAlias": "@respan/cli",
1144
1116
  "pluginName": "@respan/cli",
1145
1117
  "pluginType": "core",
@@ -1149,14 +1121,14 @@
1149
1121
  "relativePath": [
1150
1122
  "dist",
1151
1123
  "commands",
1152
- "datasets",
1124
+ "evaluators",
1153
1125
  "get.js"
1154
1126
  ]
1155
1127
  },
1156
- "datasets:list": {
1128
+ "evaluators:list": {
1157
1129
  "aliases": [],
1158
1130
  "args": {},
1159
- "description": "List datasets",
1131
+ "description": "List evaluators",
1160
1132
  "flags": {
1161
1133
  "api-key": {
1162
1134
  "description": "API key (env: RESPAN_API_KEY)",
@@ -1195,7 +1167,7 @@
1195
1167
  "limit": {
1196
1168
  "description": "Number of results per page",
1197
1169
  "name": "limit",
1198
- "default": 50,
1170
+ "default": 20,
1199
1171
  "hasDynamicHelp": false,
1200
1172
  "multiple": false,
1201
1173
  "type": "option"
@@ -1211,7 +1183,7 @@
1211
1183
  },
1212
1184
  "hasDynamicHelp": false,
1213
1185
  "hiddenAliases": [],
1214
- "id": "datasets:list",
1186
+ "id": "evaluators:list",
1215
1187
  "pluginAlias": "@respan/cli",
1216
1188
  "pluginName": "@respan/cli",
1217
1189
  "pluginType": "core",
@@ -1221,20 +1193,20 @@
1221
1193
  "relativePath": [
1222
1194
  "dist",
1223
1195
  "commands",
1224
- "datasets",
1196
+ "evaluators",
1225
1197
  "list.js"
1226
1198
  ]
1227
1199
  },
1228
- "datasets:spans": {
1200
+ "evaluators:run": {
1229
1201
  "aliases": [],
1230
1202
  "args": {
1231
- "dataset-id": {
1232
- "description": "Dataset ID",
1233
- "name": "dataset-id",
1203
+ "id": {
1204
+ "description": "Evaluator ID",
1205
+ "name": "id",
1234
1206
  "required": true
1235
1207
  }
1236
1208
  },
1237
- "description": "List spans in a dataset",
1209
+ "description": "Run an evaluator",
1238
1210
  "flags": {
1239
1211
  "api-key": {
1240
1212
  "description": "API key (env: RESPAN_API_KEY)",
@@ -1269,11 +1241,32 @@
1269
1241
  "name": "verbose",
1270
1242
  "allowNo": false,
1271
1243
  "type": "boolean"
1244
+ },
1245
+ "dataset-id": {
1246
+ "description": "Dataset ID to evaluate against",
1247
+ "name": "dataset-id",
1248
+ "hasDynamicHelp": false,
1249
+ "multiple": false,
1250
+ "type": "option"
1251
+ },
1252
+ "log-ids": {
1253
+ "description": "Comma-separated log/span IDs to evaluate",
1254
+ "name": "log-ids",
1255
+ "hasDynamicHelp": false,
1256
+ "multiple": false,
1257
+ "type": "option"
1258
+ },
1259
+ "params": {
1260
+ "description": "Additional parameters as JSON string",
1261
+ "name": "params",
1262
+ "hasDynamicHelp": false,
1263
+ "multiple": false,
1264
+ "type": "option"
1272
1265
  }
1273
1266
  },
1274
1267
  "hasDynamicHelp": false,
1275
1268
  "hiddenAliases": [],
1276
- "id": "datasets:spans",
1269
+ "id": "evaluators:run",
1277
1270
  "pluginAlias": "@respan/cli",
1278
1271
  "pluginName": "@respan/cli",
1279
1272
  "pluginType": "core",
@@ -1283,20 +1276,20 @@
1283
1276
  "relativePath": [
1284
1277
  "dist",
1285
1278
  "commands",
1286
- "datasets",
1287
- "spans.js"
1279
+ "evaluators",
1280
+ "run.js"
1288
1281
  ]
1289
1282
  },
1290
- "datasets:update": {
1283
+ "evaluators:update": {
1291
1284
  "aliases": [],
1292
1285
  "args": {
1293
1286
  "id": {
1294
- "description": "Dataset ID",
1287
+ "description": "Evaluator ID",
1295
1288
  "name": "id",
1296
1289
  "required": true
1297
1290
  }
1298
1291
  },
1299
- "description": "Update a dataset",
1292
+ "description": "Update an evaluator",
1300
1293
  "flags": {
1301
1294
  "api-key": {
1302
1295
  "description": "API key (env: RESPAN_API_KEY)",
@@ -1333,23 +1326,30 @@
1333
1326
  "type": "boolean"
1334
1327
  },
1335
1328
  "name": {
1336
- "description": "Dataset name",
1329
+ "description": "Evaluator name",
1337
1330
  "name": "name",
1338
1331
  "hasDynamicHelp": false,
1339
1332
  "multiple": false,
1340
1333
  "type": "option"
1341
1334
  },
1342
1335
  "description": {
1343
- "description": "Dataset description",
1336
+ "description": "Evaluator description",
1344
1337
  "name": "description",
1345
1338
  "hasDynamicHelp": false,
1346
1339
  "multiple": false,
1347
1340
  "type": "option"
1341
+ },
1342
+ "config": {
1343
+ "description": "Evaluator config as JSON string",
1344
+ "name": "config",
1345
+ "hasDynamicHelp": false,
1346
+ "multiple": false,
1347
+ "type": "option"
1348
1348
  }
1349
1349
  },
1350
1350
  "hasDynamicHelp": false,
1351
1351
  "hiddenAliases": [],
1352
- "id": "datasets:update",
1352
+ "id": "evaluators:update",
1353
1353
  "pluginAlias": "@respan/cli",
1354
1354
  "pluginName": "@respan/cli",
1355
1355
  "pluginType": "core",
@@ -1359,7 +1359,7 @@
1359
1359
  "relativePath": [
1360
1360
  "dist",
1361
1361
  "commands",
1362
- "datasets",
1362
+ "evaluators",
1363
1363
  "update.js"
1364
1364
  ]
1365
1365
  },
@@ -1583,16 +1583,17 @@
1583
1583
  "list.js"
1584
1584
  ]
1585
1585
  },
1586
- "prompts:create-version": {
1586
+ "integrate:claude-code": {
1587
1587
  "aliases": [],
1588
- "args": {
1589
- "prompt-id": {
1590
- "description": "Prompt ID",
1591
- "name": "prompt-id",
1592
- "required": true
1593
- }
1594
- },
1595
- "description": "Create a new version of a prompt",
1588
+ "args": {},
1589
+ "description": "Integrate Respan with Claude Code.\n\nInstalls a Stop hook that reads conversation transcripts and sends\nthem to Respan as structured spans (chat, tool, thinking).\n\nScope:\n --global Install hook script + register in ~/.claude/settings.json\n --local Write credentials + enable flag to .claude/settings.local.json\n (default) Both: install hook globally + enable for current project",
1590
+ "examples": [
1591
+ "respan integrate claude-code",
1592
+ "respan integrate claude-code --global",
1593
+ "respan integrate claude-code --local --project-id my-project",
1594
+ "respan integrate claude-code --attrs '{\"env\":\"prod\"}'",
1595
+ "respan integrate claude-code --dry-run"
1596
+ ],
1596
1597
  "flags": {
1597
1598
  "api-key": {
1598
1599
  "description": "API key (env: RESPAN_API_KEY)",
@@ -1628,39 +1629,58 @@
1628
1629
  "allowNo": false,
1629
1630
  "type": "boolean"
1630
1631
  },
1631
- "messages": {
1632
- "description": "Messages as JSON array string",
1633
- "name": "messages",
1634
- "required": true,
1635
- "hasDynamicHelp": false,
1636
- "multiple": false,
1637
- "type": "option"
1632
+ "local": {
1633
+ "description": "Write per-project config (default)",
1634
+ "exclusive": [
1635
+ "global"
1636
+ ],
1637
+ "name": "local",
1638
+ "allowNo": false,
1639
+ "type": "boolean"
1638
1640
  },
1639
- "model": {
1640
- "description": "Model name",
1641
- "name": "model",
1641
+ "global": {
1642
+ "description": "Write user-level global config",
1643
+ "exclusive": [
1644
+ "local"
1645
+ ],
1646
+ "name": "global",
1647
+ "allowNo": false,
1648
+ "type": "boolean"
1649
+ },
1650
+ "project-id": {
1651
+ "description": "Respan project ID (added to metadata / resource attributes)",
1652
+ "env": "RESPAN_PROJECT_ID",
1653
+ "name": "project-id",
1642
1654
  "hasDynamicHelp": false,
1643
1655
  "multiple": false,
1644
1656
  "type": "option"
1645
1657
  },
1646
- "temperature": {
1647
- "description": "Temperature value",
1648
- "name": "temperature",
1658
+ "base-url": {
1659
+ "description": "Respan API base URL (for enterprise deployments)",
1660
+ "name": "base-url",
1661
+ "default": "https://api.respan.ai/api",
1649
1662
  "hasDynamicHelp": false,
1650
1663
  "multiple": false,
1651
1664
  "type": "option"
1652
1665
  },
1653
- "max-tokens": {
1654
- "description": "Max tokens",
1655
- "name": "max-tokens",
1666
+ "attrs": {
1667
+ "description": "Custom attributes JSON (e.g. '{\"env\":\"prod\"}')",
1668
+ "name": "attrs",
1669
+ "default": "{}",
1656
1670
  "hasDynamicHelp": false,
1657
1671
  "multiple": false,
1658
1672
  "type": "option"
1673
+ },
1674
+ "dry-run": {
1675
+ "description": "Preview changes without writing files",
1676
+ "name": "dry-run",
1677
+ "allowNo": false,
1678
+ "type": "boolean"
1659
1679
  }
1660
1680
  },
1661
1681
  "hasDynamicHelp": false,
1662
1682
  "hiddenAliases": [],
1663
- "id": "prompts:create-version",
1683
+ "id": "integrate:claude-code",
1664
1684
  "pluginAlias": "@respan/cli",
1665
1685
  "pluginName": "@respan/cli",
1666
1686
  "pluginType": "core",
@@ -1670,14 +1690,20 @@
1670
1690
  "relativePath": [
1671
1691
  "dist",
1672
1692
  "commands",
1673
- "prompts",
1674
- "create-version.js"
1693
+ "integrate",
1694
+ "claude-code.js"
1675
1695
  ]
1676
1696
  },
1677
- "prompts:create": {
1697
+ "integrate:codex-cli": {
1678
1698
  "aliases": [],
1679
1699
  "args": {},
1680
- "description": "Create a new prompt",
1700
+ "description": "Integrate Respan with Codex CLI.\n\nCodex CLI has native OTel traces (prompts, tool approvals, results)\nso we append an [otel] block to its TOML config.\n\nScope:\n --local Write to .codex/config.toml in project root (default)\n --global Write to ~/.codex/config.toml\n If [otel] already exists in the target file, warns and does not overwrite.",
1701
+ "examples": [
1702
+ "respan integrate codex-cli",
1703
+ "respan integrate codex-cli --global",
1704
+ "respan integrate codex-cli --project-id my-project --attrs '{\"env\":\"prod\"}'",
1705
+ "respan integrate codex-cli --dry-run"
1706
+ ],
1681
1707
  "flags": {
1682
1708
  "api-key": {
1683
1709
  "description": "API key (env: RESPAN_API_KEY)",
@@ -1713,25 +1739,58 @@
1713
1739
  "allowNo": false,
1714
1740
  "type": "boolean"
1715
1741
  },
1716
- "name": {
1717
- "description": "Prompt name",
1718
- "name": "name",
1719
- "required": true,
1742
+ "local": {
1743
+ "description": "Write per-project config (default)",
1744
+ "exclusive": [
1745
+ "global"
1746
+ ],
1747
+ "name": "local",
1748
+ "allowNo": false,
1749
+ "type": "boolean"
1750
+ },
1751
+ "global": {
1752
+ "description": "Write user-level global config",
1753
+ "exclusive": [
1754
+ "local"
1755
+ ],
1756
+ "name": "global",
1757
+ "allowNo": false,
1758
+ "type": "boolean"
1759
+ },
1760
+ "project-id": {
1761
+ "description": "Respan project ID (added to metadata / resource attributes)",
1762
+ "env": "RESPAN_PROJECT_ID",
1763
+ "name": "project-id",
1720
1764
  "hasDynamicHelp": false,
1721
1765
  "multiple": false,
1722
1766
  "type": "option"
1723
1767
  },
1724
- "description": {
1725
- "description": "Prompt description",
1726
- "name": "description",
1768
+ "base-url": {
1769
+ "description": "Respan API base URL (for enterprise deployments)",
1770
+ "name": "base-url",
1771
+ "default": "https://api.respan.ai/api",
1772
+ "hasDynamicHelp": false,
1773
+ "multiple": false,
1774
+ "type": "option"
1775
+ },
1776
+ "attrs": {
1777
+ "description": "Custom attributes JSON (e.g. '{\"env\":\"prod\"}')",
1778
+ "name": "attrs",
1779
+ "default": "{}",
1727
1780
  "hasDynamicHelp": false,
1728
1781
  "multiple": false,
1729
1782
  "type": "option"
1783
+ },
1784
+ "dry-run": {
1785
+ "description": "Preview changes without writing files",
1786
+ "name": "dry-run",
1787
+ "allowNo": false,
1788
+ "type": "boolean"
1730
1789
  }
1731
1790
  },
1732
1791
  "hasDynamicHelp": false,
1733
1792
  "hiddenAliases": [],
1734
- "id": "prompts:create",
1793
+ "id": "integrate:codex-cli",
1735
1794
  "pluginAlias": "@respan/cli",
1736
1795
  "pluginName": "@respan/cli",
1737
1796
  "pluginType": "core",
@@ -1741,20 +1800,20 @@
1741
1800
  "relativePath": [
1742
1801
  "dist",
1743
1802
  "commands",
1744
- "prompts",
1745
- "create.js"
1803
+ "integrate",
1804
+ "codex-cli.js"
1746
1805
  ]
1747
1806
  },
1748
- "prompts:get": {
1807
+ "integrate:gemini-cli": {
1749
1808
  "aliases": [],
1750
- "args": {
1751
- "id": {
1752
- "description": "Prompt ID",
1753
- "name": "id",
1754
- "required": true
1755
- }
1756
- },
1757
- "description": "Get a specific prompt",
1809
+ "args": {},
1810
+ "description": "Integrate Respan with Gemini CLI.\n\nGemini CLI has native OTel traces (tool_call, llm_call, agent_call)\nso we configure it to send telemetry directly to the Respan OTLP\nendpoint.\n\nScope:\n --local Write to .gemini/settings.json in project root (default)\n --global Write to ~/.gemini/settings.json",
1811
+ "examples": [
1812
+ "respan integrate gemini-cli",
1813
+ "respan integrate gemini-cli --global",
1814
+ "respan integrate gemini-cli --project-id my-project --attrs '{\"env\":\"prod\"}'",
1815
+ "respan integrate gemini-cli --dry-run"
1816
+ ],
1758
1817
  "flags": {
1759
1818
  "api-key": {
1760
1819
  "description": "API key (env: RESPAN_API_KEY)",
@@ -1789,11 +1848,59 @@
1789
1848
  "name": "verbose",
1790
1849
  "allowNo": false,
1791
1850
  "type": "boolean"
1851
+ },
1852
+ "local": {
1853
+ "description": "Write per-project config (default)",
1854
+ "exclusive": [
1855
+ "global"
1856
+ ],
1857
+ "name": "local",
1858
+ "allowNo": false,
1859
+ "type": "boolean"
1860
+ },
1861
+ "global": {
1862
+ "description": "Write user-level global config",
1863
+ "exclusive": [
1864
+ "local"
1865
+ ],
1866
+ "name": "global",
1867
+ "allowNo": false,
1868
+ "type": "boolean"
1869
+ },
1870
+ "project-id": {
1871
+ "description": "Respan project ID (added to metadata / resource attributes)",
1872
+ "env": "RESPAN_PROJECT_ID",
1873
+ "name": "project-id",
1874
+ "hasDynamicHelp": false,
1875
+ "multiple": false,
1876
+ "type": "option"
1877
+ },
1878
+ "base-url": {
1879
+ "description": "Respan API base URL (for enterprise deployments)",
1880
+ "name": "base-url",
1881
+ "default": "https://api.respan.ai/api",
1882
+ "hasDynamicHelp": false,
1883
+ "multiple": false,
1884
+ "type": "option"
1885
+ },
1886
+ "attrs": {
1887
+ "description": "Custom attributes JSON (e.g. '{\"env\":\"prod\"}')",
1888
+ "name": "attrs",
1889
+ "default": "{}",
1890
+ "hasDynamicHelp": false,
1891
+ "multiple": false,
1892
+ "type": "option"
1893
+ },
1894
+ "dry-run": {
1895
+ "description": "Preview changes without writing files",
1896
+ "name": "dry-run",
1897
+ "allowNo": false,
1898
+ "type": "boolean"
1792
1899
  }
1793
1900
  },
1794
1901
  "hasDynamicHelp": false,
1795
1902
  "hiddenAliases": [],
1796
- "id": "prompts:get",
1903
+ "id": "integrate:gemini-cli",
1797
1904
  "pluginAlias": "@respan/cli",
1798
1905
  "pluginName": "@respan/cli",
1799
1906
  "pluginType": "core",
@@ -1803,14 +1910,20 @@
1803
1910
  "relativePath": [
1804
1911
  "dist",
1805
1912
  "commands",
1806
- "prompts",
1807
- "get.js"
1913
+ "integrate",
1914
+ "gemini-cli.js"
1808
1915
  ]
1809
1916
  },
1810
- "prompts:list": {
1917
+ "integrate:opencode": {
1811
1918
  "aliases": [],
1812
1919
  "args": {},
1813
- "description": "List prompts",
1920
+ "description": "Integrate Respan with OpenCode.\n\nOpenCode's built-in OTel does not work reliably, so this uses the\ncommunity opencode-otel plugin instead.\n\nScope:\n --local Write plugin config to project root (default)\n --global Write to ~/.config/opencode/plugins/otel.json\n The opencode-otel package is always installed globally.",
1921
+ "examples": [
1922
+ "respan integrate opencode",
1923
+ "respan integrate opencode --global",
1924
+ "respan integrate opencode --project-id my-project --attrs '{\"env\":\"prod\"}'",
1925
+ "respan integrate opencode --dry-run"
1926
+ ],
1814
1927
  "flags": {
1815
1928
  "api-key": {
1816
1929
  "description": "API key (env: RESPAN_API_KEY)",
@@ -1846,18 +1959,58 @@
1846
1959
  "allowNo": false,
1847
1960
  "type": "boolean"
1848
1961
  },
1849
- "limit": {
1850
- "description": "Number of results per page",
1851
- "name": "limit",
1852
- "default": 50,
1962
+ "local": {
1963
+ "description": "Write per-project config (default)",
1964
+ "exclusive": [
1965
+ "global"
1966
+ ],
1967
+ "name": "local",
1968
+ "allowNo": false,
1969
+ "type": "boolean"
1970
+ },
1971
+ "global": {
1972
+ "description": "Write user-level global config",
1973
+ "exclusive": [
1974
+ "local"
1975
+ ],
1976
+ "name": "global",
1977
+ "allowNo": false,
1978
+ "type": "boolean"
1979
+ },
1980
+ "project-id": {
1981
+ "description": "Respan project ID (added to metadata / resource attributes)",
1982
+ "env": "RESPAN_PROJECT_ID",
1983
+ "name": "project-id",
1984
+ "hasDynamicHelp": false,
1985
+ "multiple": false,
1986
+ "type": "option"
1987
+ },
1988
+ "base-url": {
1989
+ "description": "Respan API base URL (for enterprise deployments)",
1990
+ "name": "base-url",
1991
+ "default": "https://api.respan.ai/api",
1992
+ "hasDynamicHelp": false,
1993
+ "multiple": false,
1994
+ "type": "option"
1995
+ },
1996
+ "attrs": {
1997
+ "description": "Custom attributes JSON (e.g. '{\"env\":\"prod\"}')",
1998
+ "name": "attrs",
1999
+ "default": "{}",
1853
2000
  "hasDynamicHelp": false,
1854
2001
  "multiple": false,
1855
2002
  "type": "option"
2003
+ },
2004
+ "dry-run": {
2005
+ "description": "Preview changes without writing files",
2006
+ "name": "dry-run",
2007
+ "allowNo": false,
2008
+ "type": "boolean"
1856
2009
  }
1857
2010
  },
1858
2011
  "hasDynamicHelp": false,
1859
2012
  "hiddenAliases": [],
1860
- "id": "prompts:list",
2013
+ "id": "integrate:opencode",
1861
2014
  "pluginAlias": "@respan/cli",
1862
2015
  "pluginName": "@respan/cli",
1863
2016
  "pluginType": "core",
@@ -1867,20 +2020,14 @@
1867
2020
  "relativePath": [
1868
2021
  "dist",
1869
2022
  "commands",
1870
- "prompts",
1871
- "list.js"
2023
+ "integrate",
2024
+ "opencode.js"
1872
2025
  ]
1873
2026
  },
1874
- "prompts:update": {
2027
+ "logs:create": {
1875
2028
  "aliases": [],
1876
- "args": {
1877
- "id": {
1878
- "description": "Prompt ID",
1879
- "name": "id",
1880
- "required": true
1881
- }
1882
- },
1883
- "description": "Update a prompt",
2029
+ "args": {},
2030
+ "description": "Create a log span",
1884
2031
  "flags": {
1885
2032
  "api-key": {
1886
2033
  "description": "API key (env: RESPAN_API_KEY)",
@@ -1916,16 +2063,31 @@
1916
2063
  "allowNo": false,
1917
2064
  "type": "boolean"
1918
2065
  },
1919
- "name": {
1920
- "description": "Prompt name",
1921
- "name": "name",
2066
+ "input": {
2067
+ "description": "Input text or JSON",
2068
+ "name": "input",
2069
+ "required": true,
1922
2070
  "hasDynamicHelp": false,
1923
2071
  "multiple": false,
1924
2072
  "type": "option"
1925
2073
  },
1926
- "description": {
1927
- "description": "Prompt description",
1928
- "name": "description",
2074
+ "output": {
2075
+ "description": "Output text or JSON",
2076
+ "name": "output",
2077
+ "hasDynamicHelp": false,
2078
+ "multiple": false,
2079
+ "type": "option"
2080
+ },
2081
+ "model": {
2082
+ "description": "Model name",
2083
+ "name": "model",
2084
+ "hasDynamicHelp": false,
2085
+ "multiple": false,
2086
+ "type": "option"
2087
+ },
2088
+ "metadata": {
2089
+ "description": "Metadata as JSON string",
2090
+ "name": "metadata",
1929
2091
  "hasDynamicHelp": false,
1930
2092
  "multiple": false,
1931
2093
  "type": "option"
@@ -1933,7 +2095,7 @@
1933
2095
  },
1934
2096
  "hasDynamicHelp": false,
1935
2097
  "hiddenAliases": [],
1936
- "id": "prompts:update",
2098
+ "id": "logs:create",
1937
2099
  "pluginAlias": "@respan/cli",
1938
2100
  "pluginName": "@respan/cli",
1939
2101
  "pluginType": "core",
@@ -1943,20 +2105,20 @@
1943
2105
  "relativePath": [
1944
2106
  "dist",
1945
2107
  "commands",
1946
- "prompts",
1947
- "update.js"
2108
+ "logs",
2109
+ "create.js"
1948
2110
  ]
1949
2111
  },
1950
- "prompts:versions": {
2112
+ "logs:get": {
1951
2113
  "aliases": [],
1952
2114
  "args": {
1953
- "prompt-id": {
1954
- "description": "Prompt ID",
1955
- "name": "prompt-id",
2115
+ "id": {
2116
+ "description": "Span ID",
2117
+ "name": "id",
1956
2118
  "required": true
1957
2119
  }
1958
2120
  },
1959
- "description": "List versions of a prompt",
2121
+ "description": "Get a specific log span",
1960
2122
  "flags": {
1961
2123
  "api-key": {
1962
2124
  "description": "API key (env: RESPAN_API_KEY)",
@@ -1995,7 +2157,7 @@
1995
2157
  },
1996
2158
  "hasDynamicHelp": false,
1997
2159
  "hiddenAliases": [],
1998
- "id": "prompts:versions",
2160
+ "id": "logs:get",
1999
2161
  "pluginAlias": "@respan/cli",
2000
2162
  "pluginName": "@respan/cli",
2001
2163
  "pluginType": "core",
@@ -2005,14 +2167,14 @@
2005
2167
  "relativePath": [
2006
2168
  "dist",
2007
2169
  "commands",
2008
- "prompts",
2009
- "versions.js"
2170
+ "logs",
2171
+ "get.js"
2010
2172
  ]
2011
2173
  },
2012
- "logs:create": {
2174
+ "logs:list": {
2013
2175
  "aliases": [],
2014
2176
  "args": {},
2015
- "description": "Create a log span",
2177
+ "description": "List and filter LLM request logs (spans).\n\nSupports pagination, sorting, time range, and server-side filtering.\n\nFILTER SYNTAX: field:operator:value\n\nOPERATORS:\n (empty) Exact match model::gpt-4\n not Not equal status_code:not:200\n gt Greater than cost:gt:0.01\n gte Greater than/equal latency:gte:1.0\n lt Less than cost:lt:0.5\n lte Less than/equal prompt_tokens:lte:100\n contains Contains substring error_message:contains:timeout\n icontains Case-insensitive model:icontains:gpt\n startswith Starts with model:startswith:gpt\n endswith Ends with model:endswith:mini\n in Value in list model:in:gpt-4,gpt-4o\n isnull Is null error_message:isnull:true\n iexact Case-insens. exact status:iexact:success\n\nFILTERABLE FIELDS (logs):\n model, status_code, status, cost, latency, prompt_tokens,\n completion_tokens, customer_identifier, custom_identifier,\n thread_identifier, trace_unique_id, span_name, span_workflow_name,\n environment, log_type, error_message, failed, provider_id,\n deployment_name, prompt_name, prompt_id, unique_id, stream,\n temperature, max_tokens, tokens_per_second, time_to_first_token,\n total_request_tokens, metadata__<key>, scores__<evaluator_id>\n\nEXAMPLES:\n --filter model::gpt-4o --filter cost:gt:0.01\n --filter status_code:not:200\n --filter metadata__env::production\n --filter model:in:gpt-4,gpt-4o",
2016
2178
  "flags": {
2017
2179
  "api-key": {
2018
2180
  "description": "API key (env: RESPAN_API_KEY)",
@@ -2048,31 +2210,67 @@
2048
2210
  "allowNo": false,
2049
2211
  "type": "boolean"
2050
2212
  },
2051
- "input": {
2052
- "description": "Input text or JSON",
2053
- "name": "input",
2054
- "required": true,
2213
+ "limit": {
2214
+ "description": "Number of results per page (max 1000)",
2215
+ "name": "limit",
2216
+ "default": 50,
2055
2217
  "hasDynamicHelp": false,
2056
2218
  "multiple": false,
2057
2219
  "type": "option"
2058
2220
  },
2059
- "output": {
2060
- "description": "Output text or JSON",
2061
- "name": "output",
2221
+ "page": {
2222
+ "description": "Page number",
2223
+ "name": "page",
2224
+ "default": 1,
2062
2225
  "hasDynamicHelp": false,
2063
2226
  "multiple": false,
2064
2227
  "type": "option"
2065
2228
  },
2066
- "model": {
2067
- "description": "Model name",
2068
- "name": "model",
2229
+ "sort-by": {
2230
+ "description": "Sort field (prefix with - for descending, e.g. -cost, -latency)",
2231
+ "name": "sort-by",
2069
2232
  "hasDynamicHelp": false,
2070
2233
  "multiple": false,
2071
2234
  "type": "option"
2072
2235
  },
2073
- "metadata": {
2074
- "description": "Metadata as JSON string",
2075
- "name": "metadata",
2236
+ "start-time": {
2237
+ "description": "Start time filter (ISO 8601)",
2238
+ "name": "start-time",
2239
+ "hasDynamicHelp": false,
2240
+ "multiple": false,
2241
+ "type": "option"
2242
+ },
2243
+ "end-time": {
2244
+ "description": "End time filter (ISO 8601)",
2245
+ "name": "end-time",
2246
+ "hasDynamicHelp": false,
2247
+ "multiple": false,
2248
+ "type": "option"
2249
+ },
2250
+ "filter": {
2251
+ "description": "Filter in field:operator:value format (repeatable)",
2252
+ "name": "filter",
2253
+ "hasDynamicHelp": false,
2254
+ "multiple": true,
2255
+ "type": "option"
2256
+ },
2257
+ "all-envs": {
2258
+ "description": "Include all environments (true/false)",
2259
+ "name": "all-envs",
2260
+ "hasDynamicHelp": false,
2261
+ "multiple": false,
2262
+ "type": "option"
2263
+ },
2264
+ "is-test": {
2265
+ "description": "Filter by test (true) or production (false) environment",
2266
+ "name": "is-test",
2267
+ "hasDynamicHelp": false,
2268
+ "multiple": false,
2269
+ "type": "option"
2270
+ },
2271
+ "include-fields": {
2272
+ "description": "Comma-separated fields to include in response",
2273
+ "name": "include-fields",
2076
2274
  "hasDynamicHelp": false,
2077
2275
  "multiple": false,
2078
2276
  "type": "option"
@@ -2080,7 +2278,7 @@
2080
2278
  },
2081
2279
  "hasDynamicHelp": false,
2082
2280
  "hiddenAliases": [],
2083
- "id": "logs:create",
2281
+ "id": "logs:list",
2084
2282
  "pluginAlias": "@respan/cli",
2085
2283
  "pluginName": "@respan/cli",
2086
2284
  "pluginType": "core",
@@ -2091,19 +2289,13 @@
2091
2289
  "dist",
2092
2290
  "commands",
2093
2291
  "logs",
2094
- "create.js"
2292
+ "list.js"
2095
2293
  ]
2096
2294
  },
2097
- "logs:get": {
2295
+ "logs:summary": {
2098
2296
  "aliases": [],
2099
- "args": {
2100
- "id": {
2101
- "description": "Span ID",
2102
- "name": "id",
2103
- "required": true
2104
- }
2105
- },
2106
- "description": "Get a specific log span",
2297
+ "args": {},
2298
+ "description": "Get aggregated summary statistics for log spans in a time range.\n\nReturns total cost, total tokens, request count, and score summaries.\n\nFILTER SYNTAX: field:operator:value\n\nOPERATORS:\n (empty) Exact match model::gpt-4\n not Not equal status_code:not:200\n gt Greater than cost:gt:0.01\n gte Greater than/equal latency:gte:1.0\n lt Less than cost:lt:0.5\n lte Less than/equal prompt_tokens:lte:100\n contains Contains substring error_message:contains:timeout\n icontains Case-insensitive model:icontains:gpt\n startswith Starts with model:startswith:gpt\n endswith Ends with model:endswith:mini\n in Value in list model:in:gpt-4,gpt-4o\n isnull Is null error_message:isnull:true\n iexact Case-insens. exact status:iexact:success\n\nFILTERABLE FIELDS (logs):\n model, status_code, status, cost, latency, prompt_tokens,\n completion_tokens, customer_identifier, custom_identifier,\n thread_identifier, trace_unique_id, span_name, span_workflow_name,\n environment, log_type, error_message, failed, provider_id,\n deployment_name, prompt_name, prompt_id, unique_id, stream,\n temperature, max_tokens, tokens_per_second, time_to_first_token,\n total_request_tokens, metadata__<key>, scores__<evaluator_id>\n\nEXAMPLES:\n --filter model::gpt-4o --filter cost:gt:0.01\n --filter status_code:not:200\n --filter metadata__env::production\n --filter model:in:gpt-4,gpt-4o",
2107
2299
  "flags": {
2108
2300
  "api-key": {
2109
2301
  "description": "API key (env: RESPAN_API_KEY)",
@@ -2138,11 +2330,48 @@
2138
2330
  "name": "verbose",
2139
2331
  "allowNo": false,
2140
2332
  "type": "boolean"
2333
+ },
2334
+ "start-time": {
2335
+ "description": "Start time (ISO 8601)",
2336
+ "name": "start-time",
2337
+ "required": true,
2338
+ "hasDynamicHelp": false,
2339
+ "multiple": false,
2340
+ "type": "option"
2341
+ },
2342
+ "end-time": {
2343
+ "description": "End time (ISO 8601)",
2344
+ "name": "end-time",
2345
+ "required": true,
2346
+ "hasDynamicHelp": false,
2347
+ "multiple": false,
2348
+ "type": "option"
2349
+ },
2350
+ "filter": {
2351
+ "description": "Filter in field:operator:value format (repeatable)",
2352
+ "name": "filter",
2353
+ "hasDynamicHelp": false,
2354
+ "multiple": true,
2355
+ "type": "option"
2356
+ },
2357
+ "all-envs": {
2358
+ "description": "Include all environments (true/false)",
2359
+ "name": "all-envs",
2360
+ "hasDynamicHelp": false,
2361
+ "multiple": false,
2362
+ "type": "option"
2363
+ },
2364
+ "is-test": {
2365
+ "description": "Filter by test (true) or production (false) environment",
2366
+ "name": "is-test",
2367
+ "hasDynamicHelp": false,
2368
+ "multiple": false,
2369
+ "type": "option"
2141
2370
  }
2142
2371
  },
2143
2372
  "hasDynamicHelp": false,
2144
2373
  "hiddenAliases": [],
2145
- "id": "logs:get",
2374
+ "id": "logs:summary",
2146
2375
  "pluginAlias": "@respan/cli",
2147
2376
  "pluginName": "@respan/cli",
2148
2377
  "pluginType": "core",
@@ -2153,13 +2382,19 @@
2153
2382
  "dist",
2154
2383
  "commands",
2155
2384
  "logs",
2156
- "get.js"
2385
+ "summary.js"
2157
2386
  ]
2158
2387
  },
2159
- "logs:list": {
2388
+ "prompts:create-version": {
2160
2389
  "aliases": [],
2161
- "args": {},
2162
- "description": "List and filter LLM request logs (spans).\n\nSupports pagination, sorting, time range, and server-side filtering.\n\nFILTER SYNTAX: field:operator:value\n\nOPERATORS:\n (empty) Exact match model::gpt-4\n not Not equal status_code:not:200\n gt Greater than cost:gt:0.01\n gte Greater than/equal latency:gte:1.0\n lt Less than cost:lt:0.5\n lte Less than/equal prompt_tokens:lte:100\n contains Contains substring error_message:contains:timeout\n icontains Case-insensitive model:icontains:gpt\n startswith Starts with model:startswith:gpt\n endswith Ends with model:endswith:mini\n in Value in list model:in:gpt-4,gpt-4o\n isnull Is null error_message:isnull:true\n iexact Case-insens. exact status:iexact:success\n\nFILTERABLE FIELDS (logs):\n model, status_code, status, cost, latency, prompt_tokens,\n completion_tokens, customer_identifier, custom_identifier,\n thread_identifier, trace_unique_id, span_name, span_workflow_name,\n environment, log_type, error_message, failed, provider_id,\n deployment_name, prompt_name, prompt_id, unique_id, stream,\n temperature, max_tokens, tokens_per_second, time_to_first_token,\n total_request_tokens, metadata__<key>, scores__<evaluator_id>\n\nEXAMPLES:\n --filter model::gpt-4o --filter cost:gt:0.01\n --filter status_code:not:200\n --filter metadata__env::production\n --filter model:in:gpt-4,gpt-4o",
2390
+ "args": {
2391
+ "prompt-id": {
2392
+ "description": "Prompt ID",
2393
+ "name": "prompt-id",
2394
+ "required": true
2395
+ }
2396
+ },
2397
+ "description": "Create a new version of a prompt",
2163
2398
  "flags": {
2164
2399
  "api-key": {
2165
2400
  "description": "API key (env: RESPAN_API_KEY)",
@@ -2195,75 +2430,172 @@
2195
2430
  "allowNo": false,
2196
2431
  "type": "boolean"
2197
2432
  },
2198
- "limit": {
2199
- "description": "Number of results per page (max 1000)",
2200
- "name": "limit",
2201
- "default": 50,
2433
+ "messages": {
2434
+ "description": "Messages as JSON array string",
2435
+ "name": "messages",
2436
+ "required": true,
2202
2437
  "hasDynamicHelp": false,
2203
2438
  "multiple": false,
2204
2439
  "type": "option"
2205
2440
  },
2206
- "page": {
2207
- "description": "Page number",
2208
- "name": "page",
2209
- "default": 1,
2441
+ "model": {
2442
+ "description": "Model name",
2443
+ "name": "model",
2210
2444
  "hasDynamicHelp": false,
2211
2445
  "multiple": false,
2212
2446
  "type": "option"
2213
2447
  },
2214
- "sort-by": {
2215
- "description": "Sort field (prefix with - for descending, e.g. -cost, -latency)",
2216
- "name": "sort-by",
2448
+ "temperature": {
2449
+ "description": "Temperature value",
2450
+ "name": "temperature",
2217
2451
  "hasDynamicHelp": false,
2218
2452
  "multiple": false,
2219
2453
  "type": "option"
2220
2454
  },
2221
- "start-time": {
2222
- "description": "Start time filter (ISO 8601)",
2223
- "name": "start-time",
2455
+ "max-tokens": {
2456
+ "description": "Max tokens",
2457
+ "name": "max-tokens",
2224
2458
  "hasDynamicHelp": false,
2225
2459
  "multiple": false,
2226
2460
  "type": "option"
2227
- },
2228
- "end-time": {
2229
- "description": "End time filter (ISO 8601)",
2230
- "name": "end-time",
2461
+ }
2462
+ },
2463
+ "hasDynamicHelp": false,
2464
+ "hiddenAliases": [],
2465
+ "id": "prompts:create-version",
2466
+ "pluginAlias": "@respan/cli",
2467
+ "pluginName": "@respan/cli",
2468
+ "pluginType": "core",
2469
+ "strict": true,
2470
+ "enableJsonFlag": false,
2471
+ "isESM": true,
2472
+ "relativePath": [
2473
+ "dist",
2474
+ "commands",
2475
+ "prompts",
2476
+ "create-version.js"
2477
+ ]
2478
+ },
2479
+ "prompts:create": {
2480
+ "aliases": [],
2481
+ "args": {},
2482
+ "description": "Create a new prompt",
2483
+ "flags": {
2484
+ "api-key": {
2485
+ "description": "API key (env: RESPAN_API_KEY)",
2486
+ "env": "RESPAN_API_KEY",
2487
+ "name": "api-key",
2231
2488
  "hasDynamicHelp": false,
2232
2489
  "multiple": false,
2233
2490
  "type": "option"
2234
2491
  },
2235
- "filter": {
2236
- "description": "Filter in field:operator:value format (repeatable)",
2237
- "name": "filter",
2492
+ "profile": {
2493
+ "description": "Named profile to use",
2494
+ "name": "profile",
2238
2495
  "hasDynamicHelp": false,
2239
- "multiple": true,
2496
+ "multiple": false,
2240
2497
  "type": "option"
2241
2498
  },
2242
- "all-envs": {
2243
- "description": "Include all environments (true/false)",
2244
- "name": "all-envs",
2499
+ "json": {
2500
+ "description": "Output as JSON",
2501
+ "name": "json",
2502
+ "allowNo": false,
2503
+ "type": "boolean"
2504
+ },
2505
+ "csv": {
2506
+ "description": "Output as CSV",
2507
+ "name": "csv",
2508
+ "allowNo": false,
2509
+ "type": "boolean"
2510
+ },
2511
+ "verbose": {
2512
+ "char": "v",
2513
+ "description": "Show verbose output",
2514
+ "name": "verbose",
2515
+ "allowNo": false,
2516
+ "type": "boolean"
2517
+ },
2518
+ "name": {
2519
+ "description": "Prompt name",
2520
+ "name": "name",
2521
+ "required": true,
2245
2522
  "hasDynamicHelp": false,
2246
2523
  "multiple": false,
2247
2524
  "type": "option"
2248
2525
  },
2249
- "is-test": {
2250
- "description": "Filter by test (true) or production (false) environment",
2251
- "name": "is-test",
2526
+ "description": {
2527
+ "description": "Prompt description",
2528
+ "name": "description",
2529
+ "hasDynamicHelp": false,
2530
+ "multiple": false,
2531
+ "type": "option"
2532
+ }
2533
+ },
2534
+ "hasDynamicHelp": false,
2535
+ "hiddenAliases": [],
2536
+ "id": "prompts:create",
2537
+ "pluginAlias": "@respan/cli",
2538
+ "pluginName": "@respan/cli",
2539
+ "pluginType": "core",
2540
+ "strict": true,
2541
+ "enableJsonFlag": false,
2542
+ "isESM": true,
2543
+ "relativePath": [
2544
+ "dist",
2545
+ "commands",
2546
+ "prompts",
2547
+ "create.js"
2548
+ ]
2549
+ },
2550
+ "prompts:get": {
2551
+ "aliases": [],
2552
+ "args": {
2553
+ "id": {
2554
+ "description": "Prompt ID",
2555
+ "name": "id",
2556
+ "required": true
2557
+ }
2558
+ },
2559
+ "description": "Get a specific prompt",
2560
+ "flags": {
2561
+ "api-key": {
2562
+ "description": "API key (env: RESPAN_API_KEY)",
2563
+ "env": "RESPAN_API_KEY",
2564
+ "name": "api-key",
2252
2565
  "hasDynamicHelp": false,
2253
2566
  "multiple": false,
2254
2567
  "type": "option"
2255
2568
  },
2256
- "include-fields": {
2257
- "description": "Comma-separated fields to include in response",
2258
- "name": "include-fields",
2569
+ "profile": {
2570
+ "description": "Named profile to use",
2571
+ "name": "profile",
2259
2572
  "hasDynamicHelp": false,
2260
2573
  "multiple": false,
2261
2574
  "type": "option"
2575
+ },
2576
+ "json": {
2577
+ "description": "Output as JSON",
2578
+ "name": "json",
2579
+ "allowNo": false,
2580
+ "type": "boolean"
2581
+ },
2582
+ "csv": {
2583
+ "description": "Output as CSV",
2584
+ "name": "csv",
2585
+ "allowNo": false,
2586
+ "type": "boolean"
2587
+ },
2588
+ "verbose": {
2589
+ "char": "v",
2590
+ "description": "Show verbose output",
2591
+ "name": "verbose",
2592
+ "allowNo": false,
2593
+ "type": "boolean"
2262
2594
  }
2263
2595
  },
2264
2596
  "hasDynamicHelp": false,
2265
2597
  "hiddenAliases": [],
2266
- "id": "logs:list",
2598
+ "id": "prompts:get",
2267
2599
  "pluginAlias": "@respan/cli",
2268
2600
  "pluginName": "@respan/cli",
2269
2601
  "pluginType": "core",
@@ -2273,14 +2605,14 @@
2273
2605
  "relativePath": [
2274
2606
  "dist",
2275
2607
  "commands",
2276
- "logs",
2277
- "list.js"
2608
+ "prompts",
2609
+ "get.js"
2278
2610
  ]
2279
2611
  },
2280
- "logs:summary": {
2612
+ "prompts:list": {
2281
2613
  "aliases": [],
2282
2614
  "args": {},
2283
- "description": "Get aggregated summary statistics for log spans in a time range.\n\nReturns total cost, total tokens, request count, and score summaries.\n\nFILTER SYNTAX: field:operator:value\n\nOPERATORS:\n (empty) Exact match model::gpt-4\n not Not equal status_code:not:200\n gt Greater than cost:gt:0.01\n gte Greater than/equal latency:gte:1.0\n lt Less than cost:lt:0.5\n lte Less than/equal prompt_tokens:lte:100\n contains Contains substring error_message:contains:timeout\n icontains Case-insensitive model:icontains:gpt\n startswith Starts with model:startswith:gpt\n endswith Ends with model:endswith:mini\n in Value in list model:in:gpt-4,gpt-4o\n isnull Is null error_message:isnull:true\n iexact Case-insens. exact status:iexact:success\n\nFILTERABLE FIELDS (logs):\n model, status_code, status, cost, latency, prompt_tokens,\n completion_tokens, customer_identifier, custom_identifier,\n thread_identifier, trace_unique_id, span_name, span_workflow_name,\n environment, log_type, error_message, failed, provider_id,\n deployment_name, prompt_name, prompt_id, unique_id, stream,\n temperature, max_tokens, tokens_per_second, time_to_first_token,\n total_request_tokens, metadata__<key>, scores__<evaluator_id>\n\nEXAMPLES:\n --filter model::gpt-4o --filter cost:gt:0.01\n --filter status_code:not:200\n --filter metadata__env::production\n --filter model:in:gpt-4,gpt-4o",
2615
+ "description": "List prompts",
2284
2616
  "flags": {
2285
2617
  "api-key": {
2286
2618
  "description": "API key (env: RESPAN_API_KEY)",
@@ -2316,47 +2648,156 @@
2316
2648
  "allowNo": false,
2317
2649
  "type": "boolean"
2318
2650
  },
2319
- "start-time": {
2320
- "description": "Start time (ISO 8601)",
2321
- "name": "start-time",
2322
- "required": true,
2651
+ "limit": {
2652
+ "description": "Number of results per page",
2653
+ "name": "limit",
2654
+ "default": 50,
2655
+ "hasDynamicHelp": false,
2656
+ "multiple": false,
2657
+ "type": "option"
2658
+ }
2659
+ },
2660
+ "hasDynamicHelp": false,
2661
+ "hiddenAliases": [],
2662
+ "id": "prompts:list",
2663
+ "pluginAlias": "@respan/cli",
2664
+ "pluginName": "@respan/cli",
2665
+ "pluginType": "core",
2666
+ "strict": true,
2667
+ "enableJsonFlag": false,
2668
+ "isESM": true,
2669
+ "relativePath": [
2670
+ "dist",
2671
+ "commands",
2672
+ "prompts",
2673
+ "list.js"
2674
+ ]
2675
+ },
2676
+ "prompts:update": {
2677
+ "aliases": [],
2678
+ "args": {
2679
+ "id": {
2680
+ "description": "Prompt ID",
2681
+ "name": "id",
2682
+ "required": true
2683
+ }
2684
+ },
2685
+ "description": "Update a prompt",
2686
+ "flags": {
2687
+ "api-key": {
2688
+ "description": "API key (env: RESPAN_API_KEY)",
2689
+ "env": "RESPAN_API_KEY",
2690
+ "name": "api-key",
2323
2691
  "hasDynamicHelp": false,
2324
2692
  "multiple": false,
2325
2693
  "type": "option"
2326
2694
  },
2327
- "end-time": {
2328
- "description": "End time (ISO 8601)",
2329
- "name": "end-time",
2330
- "required": true,
2695
+ "profile": {
2696
+ "description": "Named profile to use",
2697
+ "name": "profile",
2331
2698
  "hasDynamicHelp": false,
2332
2699
  "multiple": false,
2333
2700
  "type": "option"
2334
2701
  },
2335
- "filter": {
2336
- "description": "Filter in field:operator:value format (repeatable)",
2337
- "name": "filter",
2702
+ "json": {
2703
+ "description": "Output as JSON",
2704
+ "name": "json",
2705
+ "allowNo": false,
2706
+ "type": "boolean"
2707
+ },
2708
+ "csv": {
2709
+ "description": "Output as CSV",
2710
+ "name": "csv",
2711
+ "allowNo": false,
2712
+ "type": "boolean"
2713
+ },
2714
+ "verbose": {
2715
+ "char": "v",
2716
+ "description": "Show verbose output",
2717
+ "name": "verbose",
2718
+ "allowNo": false,
2719
+ "type": "boolean"
2720
+ },
2721
+ "name": {
2722
+ "description": "Prompt name",
2723
+ "name": "name",
2338
2724
  "hasDynamicHelp": false,
2339
- "multiple": true,
2725
+ "multiple": false,
2340
2726
  "type": "option"
2341
2727
  },
2342
- "all-envs": {
2343
- "description": "Include all environments (true/false)",
2344
- "name": "all-envs",
2728
+ "description": {
2729
+ "description": "Prompt description",
2730
+ "name": "description",
2731
+ "hasDynamicHelp": false,
2732
+ "multiple": false,
2733
+ "type": "option"
2734
+ }
2735
+ },
2736
+ "hasDynamicHelp": false,
2737
+ "hiddenAliases": [],
2738
+ "id": "prompts:update",
2739
+ "pluginAlias": "@respan/cli",
2740
+ "pluginName": "@respan/cli",
2741
+ "pluginType": "core",
2742
+ "strict": true,
2743
+ "enableJsonFlag": false,
2744
+ "isESM": true,
2745
+ "relativePath": [
2746
+ "dist",
2747
+ "commands",
2748
+ "prompts",
2749
+ "update.js"
2750
+ ]
2751
+ },
2752
+ "prompts:versions": {
2753
+ "aliases": [],
2754
+ "args": {
2755
+ "prompt-id": {
2756
+ "description": "Prompt ID",
2757
+ "name": "prompt-id",
2758
+ "required": true
2759
+ }
2760
+ },
2761
+ "description": "List versions of a prompt",
2762
+ "flags": {
2763
+ "api-key": {
2764
+ "description": "API key (env: RESPAN_API_KEY)",
2765
+ "env": "RESPAN_API_KEY",
2766
+ "name": "api-key",
2345
2767
  "hasDynamicHelp": false,
2346
2768
  "multiple": false,
2347
2769
  "type": "option"
2348
2770
  },
2349
- "is-test": {
2350
- "description": "Filter by test (true) or production (false) environment",
2351
- "name": "is-test",
2771
+ "profile": {
2772
+ "description": "Named profile to use",
2773
+ "name": "profile",
2352
2774
  "hasDynamicHelp": false,
2353
2775
  "multiple": false,
2354
2776
  "type": "option"
2777
+ },
2778
+ "json": {
2779
+ "description": "Output as JSON",
2780
+ "name": "json",
2781
+ "allowNo": false,
2782
+ "type": "boolean"
2783
+ },
2784
+ "csv": {
2785
+ "description": "Output as CSV",
2786
+ "name": "csv",
2787
+ "allowNo": false,
2788
+ "type": "boolean"
2789
+ },
2790
+ "verbose": {
2791
+ "char": "v",
2792
+ "description": "Show verbose output",
2793
+ "name": "verbose",
2794
+ "allowNo": false,
2795
+ "type": "boolean"
2355
2796
  }
2356
2797
  },
2357
2798
  "hasDynamicHelp": false,
2358
2799
  "hiddenAliases": [],
2359
- "id": "logs:summary",
2800
+ "id": "prompts:versions",
2360
2801
  "pluginAlias": "@respan/cli",
2361
2802
  "pluginName": "@respan/cli",
2362
2803
  "pluginType": "core",
@@ -2366,8 +2807,8 @@
2366
2807
  "relativePath": [
2367
2808
  "dist",
2368
2809
  "commands",
2369
- "logs",
2370
- "summary.js"
2810
+ "prompts",
2811
+ "versions.js"
2371
2812
  ]
2372
2813
  },
2373
2814
  "traces:get": {
@@ -2929,5 +3370,5 @@
2929
3370
  ]
2930
3371
  }
2931
3372
  },
2932
- "version": "0.3.3"
3373
+ "version": "0.4.1"
2933
3374
  }