@respan/cli 0.7.3 → 0.7.4

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.
Files changed (50) hide show
  1. package/dist/commands/auth/logout.d.ts +1 -0
  2. package/dist/commands/auth/status.d.ts +1 -0
  3. package/dist/commands/auth/status.js +2 -1
  4. package/dist/commands/config/get.d.ts +1 -0
  5. package/dist/commands/config/get.js +5 -0
  6. package/dist/commands/config/list.d.ts +1 -0
  7. package/dist/commands/config/list.js +9 -2
  8. package/dist/commands/config/set.d.ts +1 -0
  9. package/dist/commands/config/set.js +4 -0
  10. package/dist/commands/datasets/add-spans.d.ts +1 -0
  11. package/dist/commands/datasets/create-span.d.ts +1 -0
  12. package/dist/commands/datasets/create.d.ts +1 -0
  13. package/dist/commands/datasets/get-span.d.ts +1 -0
  14. package/dist/commands/datasets/get.d.ts +1 -0
  15. package/dist/commands/datasets/list.d.ts +1 -0
  16. package/dist/commands/datasets/spans.d.ts +1 -0
  17. package/dist/commands/datasets/update.d.ts +1 -0
  18. package/dist/commands/evaluators/create.d.ts +1 -0
  19. package/dist/commands/evaluators/get.d.ts +1 -0
  20. package/dist/commands/evaluators/list.d.ts +1 -0
  21. package/dist/commands/evaluators/run.d.ts +1 -0
  22. package/dist/commands/evaluators/update.d.ts +1 -0
  23. package/dist/commands/experiments/create.d.ts +1 -0
  24. package/dist/commands/experiments/get.d.ts +1 -0
  25. package/dist/commands/experiments/list.d.ts +1 -0
  26. package/dist/commands/logs/create.d.ts +1 -0
  27. package/dist/commands/logs/get.d.ts +1 -0
  28. package/dist/commands/logs/list.d.ts +1 -0
  29. package/dist/commands/logs/summary.d.ts +1 -0
  30. package/dist/commands/prompts/create-version.d.ts +1 -0
  31. package/dist/commands/prompts/create.d.ts +1 -0
  32. package/dist/commands/prompts/get.d.ts +1 -0
  33. package/dist/commands/prompts/list.d.ts +1 -0
  34. package/dist/commands/prompts/update.d.ts +1 -0
  35. package/dist/commands/prompts/versions.d.ts +1 -0
  36. package/dist/commands/traces/get.d.ts +1 -0
  37. package/dist/commands/traces/list.d.ts +1 -0
  38. package/dist/commands/traces/summary.d.ts +1 -0
  39. package/dist/commands/users/create.d.ts +1 -0
  40. package/dist/commands/users/get.d.ts +1 -0
  41. package/dist/commands/users/list.d.ts +1 -0
  42. package/dist/commands/users/update.d.ts +1 -0
  43. package/dist/commands/whoami.d.ts +1 -0
  44. package/dist/commands/whoami.js +3 -2
  45. package/dist/lib/auth.d.ts +1 -0
  46. package/dist/lib/auth.js +16 -7
  47. package/dist/lib/base-command.d.ts +1 -0
  48. package/dist/lib/base-command.js +4 -0
  49. package/oclif.manifest.json +674 -401
  50. package/package.json +1 -1
@@ -13,6 +13,13 @@
13
13
  "multiple": false,
14
14
  "type": "option"
15
15
  },
16
+ "base-url": {
17
+ "description": "Temporary API base URL override for this command",
18
+ "name": "base-url",
19
+ "hasDynamicHelp": false,
20
+ "multiple": false,
21
+ "type": "option"
22
+ },
16
23
  "profile": {
17
24
  "description": "Named profile to use",
18
25
  "name": "profile",
@@ -67,6 +74,13 @@
67
74
  "multiple": false,
68
75
  "type": "option"
69
76
  },
77
+ "base-url": {
78
+ "description": "API base URL (auto-detected from login method if not set)",
79
+ "name": "base-url",
80
+ "hasDynamicHelp": false,
81
+ "multiple": false,
82
+ "type": "option"
83
+ },
70
84
  "profile": {
71
85
  "description": "Named profile to use",
72
86
  "name": "profile",
@@ -101,13 +115,6 @@
101
115
  "multiple": false,
102
116
  "type": "option"
103
117
  },
104
- "base-url": {
105
- "description": "API base URL (auto-detected from login method if not set)",
106
- "name": "base-url",
107
- "hasDynamicHelp": false,
108
- "multiple": false,
109
- "type": "option"
110
- },
111
118
  "enterprise": {
112
119
  "description": "Use enterprise SSO login",
113
120
  "name": "enterprise",
@@ -144,6 +151,13 @@
144
151
  "multiple": false,
145
152
  "type": "option"
146
153
  },
154
+ "base-url": {
155
+ "description": "Temporary API base URL override for this command",
156
+ "name": "base-url",
157
+ "hasDynamicHelp": false,
158
+ "multiple": false,
159
+ "type": "option"
160
+ },
147
161
  "profile": {
148
162
  "description": "Profile to log out",
149
163
  "name": "profile",
@@ -200,6 +214,13 @@
200
214
  "multiple": false,
201
215
  "type": "option"
202
216
  },
217
+ "base-url": {
218
+ "description": "Temporary API base URL override for this command",
219
+ "name": "base-url",
220
+ "hasDynamicHelp": false,
221
+ "multiple": false,
222
+ "type": "option"
223
+ },
203
224
  "profile": {
204
225
  "description": "Named profile to use",
205
226
  "name": "profile",
@@ -262,6 +283,13 @@
262
283
  "multiple": false,
263
284
  "type": "option"
264
285
  },
286
+ "base-url": {
287
+ "description": "Temporary API base URL override for this command",
288
+ "name": "base-url",
289
+ "hasDynamicHelp": false,
290
+ "multiple": false,
291
+ "type": "option"
292
+ },
265
293
  "profile": {
266
294
  "description": "Named profile to use",
267
295
  "name": "profile",
@@ -318,6 +346,13 @@
318
346
  "multiple": false,
319
347
  "type": "option"
320
348
  },
349
+ "base-url": {
350
+ "description": "Temporary API base URL override for this command",
351
+ "name": "base-url",
352
+ "hasDynamicHelp": false,
353
+ "multiple": false,
354
+ "type": "option"
355
+ },
321
356
  "profile": {
322
357
  "description": "Named profile to use",
323
358
  "name": "profile",
@@ -385,6 +420,13 @@
385
420
  "multiple": false,
386
421
  "type": "option"
387
422
  },
423
+ "base-url": {
424
+ "description": "Temporary API base URL override for this command",
425
+ "name": "base-url",
426
+ "hasDynamicHelp": false,
427
+ "multiple": false,
428
+ "type": "option"
429
+ },
388
430
  "profile": {
389
431
  "description": "Named profile to use",
390
432
  "name": "profile",
@@ -447,6 +489,13 @@
447
489
  "multiple": false,
448
490
  "type": "option"
449
491
  },
492
+ "base-url": {
493
+ "description": "Temporary API base URL override for this command",
494
+ "name": "base-url",
495
+ "hasDynamicHelp": false,
496
+ "multiple": false,
497
+ "type": "option"
498
+ },
450
499
  "profile": {
451
500
  "description": "Named profile to use",
452
501
  "name": "profile",
@@ -517,6 +566,13 @@
517
566
  "multiple": false,
518
567
  "type": "option"
519
568
  },
569
+ "base-url": {
570
+ "description": "Temporary API base URL override for this command",
571
+ "name": "base-url",
572
+ "hasDynamicHelp": false,
573
+ "multiple": false,
574
+ "type": "option"
575
+ },
520
576
  "profile": {
521
577
  "description": "Named profile to use",
522
578
  "name": "profile",
@@ -581,6 +637,13 @@
581
637
  "multiple": false,
582
638
  "type": "option"
583
639
  },
640
+ "base-url": {
641
+ "description": "Temporary API base URL override for this command",
642
+ "name": "base-url",
643
+ "hasDynamicHelp": false,
644
+ "multiple": false,
645
+ "type": "option"
646
+ },
584
647
  "profile": {
585
648
  "description": "Named profile to use",
586
649
  "name": "profile",
@@ -663,6 +726,13 @@
663
726
  "multiple": false,
664
727
  "type": "option"
665
728
  },
729
+ "base-url": {
730
+ "description": "Temporary API base URL override for this command",
731
+ "name": "base-url",
732
+ "hasDynamicHelp": false,
733
+ "multiple": false,
734
+ "type": "option"
735
+ },
666
736
  "profile": {
667
737
  "description": "Named profile to use",
668
738
  "name": "profile",
@@ -725,6 +795,13 @@
725
795
  "multiple": false,
726
796
  "type": "option"
727
797
  },
798
+ "base-url": {
799
+ "description": "Temporary API base URL override for this command",
800
+ "name": "base-url",
801
+ "hasDynamicHelp": false,
802
+ "multiple": false,
803
+ "type": "option"
804
+ },
728
805
  "profile": {
729
806
  "description": "Named profile to use",
730
807
  "name": "profile",
@@ -781,6 +858,13 @@
781
858
  "multiple": false,
782
859
  "type": "option"
783
860
  },
861
+ "base-url": {
862
+ "description": "Temporary API base URL override for this command",
863
+ "name": "base-url",
864
+ "hasDynamicHelp": false,
865
+ "multiple": false,
866
+ "type": "option"
867
+ },
784
868
  "profile": {
785
869
  "description": "Named profile to use",
786
870
  "name": "profile",
@@ -859,6 +943,13 @@
859
943
  "multiple": false,
860
944
  "type": "option"
861
945
  },
946
+ "base-url": {
947
+ "description": "Temporary API base URL override for this command",
948
+ "name": "base-url",
949
+ "hasDynamicHelp": false,
950
+ "multiple": false,
951
+ "type": "option"
952
+ },
862
953
  "profile": {
863
954
  "description": "Named profile to use",
864
955
  "name": "profile",
@@ -921,6 +1012,13 @@
921
1012
  "multiple": false,
922
1013
  "type": "option"
923
1014
  },
1015
+ "base-url": {
1016
+ "description": "Temporary API base URL override for this command",
1017
+ "name": "base-url",
1018
+ "hasDynamicHelp": false,
1019
+ "multiple": false,
1020
+ "type": "option"
1021
+ },
924
1022
  "profile": {
925
1023
  "description": "Named profile to use",
926
1024
  "name": "profile",
@@ -991,6 +1089,13 @@
991
1089
  "multiple": false,
992
1090
  "type": "option"
993
1091
  },
1092
+ "base-url": {
1093
+ "description": "Temporary API base URL override for this command",
1094
+ "name": "base-url",
1095
+ "hasDynamicHelp": false,
1096
+ "multiple": false,
1097
+ "type": "option"
1098
+ },
994
1099
  "profile": {
995
1100
  "description": "Named profile to use",
996
1101
  "name": "profile",
@@ -1082,6 +1187,13 @@
1082
1187
  "multiple": false,
1083
1188
  "type": "option"
1084
1189
  },
1190
+ "base-url": {
1191
+ "description": "Temporary API base URL override for this command",
1192
+ "name": "base-url",
1193
+ "hasDynamicHelp": false,
1194
+ "multiple": false,
1195
+ "type": "option"
1196
+ },
1085
1197
  "profile": {
1086
1198
  "description": "Named profile to use",
1087
1199
  "name": "profile",
@@ -1138,6 +1250,13 @@
1138
1250
  "multiple": false,
1139
1251
  "type": "option"
1140
1252
  },
1253
+ "base-url": {
1254
+ "description": "Temporary API base URL override for this command",
1255
+ "name": "base-url",
1256
+ "hasDynamicHelp": false,
1257
+ "multiple": false,
1258
+ "type": "option"
1259
+ },
1141
1260
  "profile": {
1142
1261
  "description": "Named profile to use",
1143
1262
  "name": "profile",
@@ -1216,6 +1335,13 @@
1216
1335
  "multiple": false,
1217
1336
  "type": "option"
1218
1337
  },
1338
+ "base-url": {
1339
+ "description": "Temporary API base URL override for this command",
1340
+ "name": "base-url",
1341
+ "hasDynamicHelp": false,
1342
+ "multiple": false,
1343
+ "type": "option"
1344
+ },
1219
1345
  "profile": {
1220
1346
  "description": "Named profile to use",
1221
1347
  "name": "profile",
@@ -1299,6 +1425,13 @@
1299
1425
  "multiple": false,
1300
1426
  "type": "option"
1301
1427
  },
1428
+ "base-url": {
1429
+ "description": "Temporary API base URL override for this command",
1430
+ "name": "base-url",
1431
+ "hasDynamicHelp": false,
1432
+ "multiple": false,
1433
+ "type": "option"
1434
+ },
1302
1435
  "profile": {
1303
1436
  "description": "Named profile to use",
1304
1437
  "name": "profile",
@@ -1376,6 +1509,13 @@
1376
1509
  "multiple": false,
1377
1510
  "type": "option"
1378
1511
  },
1512
+ "base-url": {
1513
+ "description": "Temporary API base URL override for this command",
1514
+ "name": "base-url",
1515
+ "hasDynamicHelp": false,
1516
+ "multiple": false,
1517
+ "type": "option"
1518
+ },
1379
1519
  "profile": {
1380
1520
  "description": "Named profile to use",
1381
1521
  "name": "profile",
@@ -1468,6 +1608,13 @@
1468
1608
  "multiple": false,
1469
1609
  "type": "option"
1470
1610
  },
1611
+ "base-url": {
1612
+ "description": "Temporary API base URL override for this command",
1613
+ "name": "base-url",
1614
+ "hasDynamicHelp": false,
1615
+ "multiple": false,
1616
+ "type": "option"
1617
+ },
1471
1618
  "profile": {
1472
1619
  "description": "Named profile to use",
1473
1620
  "name": "profile",
@@ -1524,6 +1671,13 @@
1524
1671
  "multiple": false,
1525
1672
  "type": "option"
1526
1673
  },
1674
+ "base-url": {
1675
+ "description": "Temporary API base URL override for this command",
1676
+ "name": "base-url",
1677
+ "hasDynamicHelp": false,
1678
+ "multiple": false,
1679
+ "type": "option"
1680
+ },
1527
1681
  "profile": {
1528
1682
  "description": "Named profile to use",
1529
1683
  "name": "profile",
@@ -1583,10 +1737,18 @@
1583
1737
  "list.js"
1584
1738
  ]
1585
1739
  },
1586
- "logs:create": {
1740
+ "integrate:claude-code": {
1587
1741
  "aliases": [],
1588
1742
  "args": {},
1589
- "description": "Create a log span",
1743
+ "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\nDefault behavior installs the global hook and writes local project config.",
1744
+ "examples": [
1745
+ "respan integrate claude-code",
1746
+ "respan integrate claude-code --disable",
1747
+ "respan integrate claude-code --global",
1748
+ "respan integrate claude-code --local --project-id my-project",
1749
+ "respan integrate claude-code --attrs '{\"env\":\"prod\"}'",
1750
+ "respan integrate claude-code --dry-run"
1751
+ ],
1590
1752
  "flags": {
1591
1753
  "api-key": {
1592
1754
  "description": "API key (env: RESPAN_API_KEY)",
@@ -1596,6 +1758,14 @@
1596
1758
  "multiple": false,
1597
1759
  "type": "option"
1598
1760
  },
1761
+ "base-url": {
1762
+ "description": "Respan API base URL (for enterprise deployments)",
1763
+ "name": "base-url",
1764
+ "default": "https://api.respan.ai/api",
1765
+ "hasDynamicHelp": false,
1766
+ "multiple": false,
1767
+ "type": "option"
1768
+ },
1599
1769
  "profile": {
1600
1770
  "description": "Named profile to use",
1601
1771
  "name": "profile",
@@ -1622,39 +1792,90 @@
1622
1792
  "allowNo": false,
1623
1793
  "type": "boolean"
1624
1794
  },
1625
- "input": {
1626
- "description": "Input text or JSON",
1627
- "name": "input",
1628
- "required": true,
1795
+ "local": {
1796
+ "description": "Write per-project config (default)",
1797
+ "exclusive": [
1798
+ "global"
1799
+ ],
1800
+ "name": "local",
1801
+ "allowNo": false,
1802
+ "type": "boolean"
1803
+ },
1804
+ "global": {
1805
+ "description": "Write user-level global config",
1806
+ "exclusive": [
1807
+ "local"
1808
+ ],
1809
+ "name": "global",
1810
+ "allowNo": false,
1811
+ "type": "boolean"
1812
+ },
1813
+ "enable": {
1814
+ "description": "Enable tracing (default)",
1815
+ "exclusive": [
1816
+ "disable"
1817
+ ],
1818
+ "name": "enable",
1819
+ "allowNo": false,
1820
+ "type": "boolean"
1821
+ },
1822
+ "disable": {
1823
+ "description": "Disable tracing",
1824
+ "exclusive": [
1825
+ "enable"
1826
+ ],
1827
+ "name": "disable",
1828
+ "allowNo": false,
1829
+ "type": "boolean"
1830
+ },
1831
+ "project-id": {
1832
+ "description": "Respan project ID (added to metadata / resource attributes)",
1833
+ "env": "RESPAN_PROJECT_ID",
1834
+ "name": "project-id",
1629
1835
  "hasDynamicHelp": false,
1630
1836
  "multiple": false,
1631
1837
  "type": "option"
1632
1838
  },
1633
- "output": {
1634
- "description": "Output text or JSON",
1635
- "name": "output",
1839
+ "attrs": {
1840
+ "description": "Custom attributes JSON (e.g. '{\"env\":\"prod\"}')",
1841
+ "name": "attrs",
1842
+ "default": "{}",
1636
1843
  "hasDynamicHelp": false,
1637
1844
  "multiple": false,
1638
1845
  "type": "option"
1639
1846
  },
1640
- "model": {
1641
- "description": "Model name",
1642
- "name": "model",
1847
+ "customer-id": {
1848
+ "description": "Customer/user identifier for traces (e.g. your name or email)",
1849
+ "env": "RESPAN_CUSTOMER_ID",
1850
+ "name": "customer-id",
1643
1851
  "hasDynamicHelp": false,
1644
1852
  "multiple": false,
1645
1853
  "type": "option"
1646
1854
  },
1647
- "metadata": {
1648
- "description": "Metadata as JSON string",
1649
- "name": "metadata",
1855
+ "span-name": {
1856
+ "description": "Root span name for traces (default: claude-code)",
1857
+ "name": "span-name",
1858
+ "hasDynamicHelp": false,
1859
+ "multiple": false,
1860
+ "type": "option"
1861
+ },
1862
+ "workflow-name": {
1863
+ "description": "Workflow name for traces (default: claude-code)",
1864
+ "name": "workflow-name",
1650
1865
  "hasDynamicHelp": false,
1651
1866
  "multiple": false,
1652
1867
  "type": "option"
1868
+ },
1869
+ "dry-run": {
1870
+ "description": "Preview changes without writing files",
1871
+ "name": "dry-run",
1872
+ "allowNo": false,
1873
+ "type": "boolean"
1653
1874
  }
1654
1875
  },
1655
1876
  "hasDynamicHelp": false,
1656
1877
  "hiddenAliases": [],
1657
- "id": "logs:create",
1878
+ "id": "integrate:claude-code",
1658
1879
  "pluginAlias": "@respan/cli",
1659
1880
  "pluginName": "@respan/cli",
1660
1881
  "pluginType": "core",
@@ -1664,20 +1885,22 @@
1664
1885
  "relativePath": [
1665
1886
  "dist",
1666
1887
  "commands",
1667
- "logs",
1668
- "create.js"
1888
+ "integrate",
1889
+ "claude-code.js"
1669
1890
  ]
1670
1891
  },
1671
- "logs:get": {
1892
+ "integrate:codex-cli": {
1672
1893
  "aliases": [],
1673
- "args": {
1674
- "id": {
1675
- "description": "Span ID",
1676
- "name": "id",
1677
- "required": true
1678
- }
1679
- },
1680
- "description": "Get a specific log span",
1894
+ "args": {},
1895
+ "description": "Integrate Respan with Codex CLI.\n\nInstalls a notify hook that reads session JSONL files and sends\nthem to Respan as structured spans (chat, tool, reasoning).\n\nScope:\n --global Install hook script + register notify in ~/.codex/config.toml\n --local Write .codex/respan.json with customer_id, span_name, etc.\n\nDefault behavior installs the global notify hook and writes local project config.",
1896
+ "examples": [
1897
+ "respan integrate codex-cli",
1898
+ "respan integrate codex-cli --disable",
1899
+ "respan integrate codex-cli --global",
1900
+ "respan integrate codex-cli --local --customer-id frank",
1901
+ "respan integrate codex-cli --attrs '{\"env\":\"prod\"}'",
1902
+ "respan integrate codex-cli --dry-run"
1903
+ ],
1681
1904
  "flags": {
1682
1905
  "api-key": {
1683
1906
  "description": "API key (env: RESPAN_API_KEY)",
@@ -1687,58 +1910,10 @@
1687
1910
  "multiple": false,
1688
1911
  "type": "option"
1689
1912
  },
1690
- "profile": {
1691
- "description": "Named profile to use",
1692
- "name": "profile",
1693
- "hasDynamicHelp": false,
1694
- "multiple": false,
1695
- "type": "option"
1696
- },
1697
- "json": {
1698
- "description": "Output as JSON",
1699
- "name": "json",
1700
- "allowNo": false,
1701
- "type": "boolean"
1702
- },
1703
- "csv": {
1704
- "description": "Output as CSV",
1705
- "name": "csv",
1706
- "allowNo": false,
1707
- "type": "boolean"
1708
- },
1709
- "verbose": {
1710
- "char": "v",
1711
- "description": "Show verbose output",
1712
- "name": "verbose",
1713
- "allowNo": false,
1714
- "type": "boolean"
1715
- }
1716
- },
1717
- "hasDynamicHelp": false,
1718
- "hiddenAliases": [],
1719
- "id": "logs:get",
1720
- "pluginAlias": "@respan/cli",
1721
- "pluginName": "@respan/cli",
1722
- "pluginType": "core",
1723
- "strict": true,
1724
- "enableJsonFlag": false,
1725
- "isESM": true,
1726
- "relativePath": [
1727
- "dist",
1728
- "commands",
1729
- "logs",
1730
- "get.js"
1731
- ]
1732
- },
1733
- "logs:list": {
1734
- "aliases": [],
1735
- "args": {},
1736
- "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",
1737
- "flags": {
1738
- "api-key": {
1739
- "description": "API key (env: RESPAN_API_KEY)",
1740
- "env": "RESPAN_API_KEY",
1741
- "name": "api-key",
1913
+ "base-url": {
1914
+ "description": "Respan API base URL (for enterprise deployments)",
1915
+ "name": "base-url",
1916
+ "default": "https://api.respan.ai/api",
1742
1917
  "hasDynamicHelp": false,
1743
1918
  "multiple": false,
1744
1919
  "type": "option"
@@ -1769,168 +1944,90 @@
1769
1944
  "allowNo": false,
1770
1945
  "type": "boolean"
1771
1946
  },
1772
- "limit": {
1773
- "description": "Number of results per page (max 1000)",
1774
- "name": "limit",
1775
- "default": 50,
1776
- "hasDynamicHelp": false,
1777
- "multiple": false,
1778
- "type": "option"
1779
- },
1780
- "page": {
1781
- "description": "Page number",
1782
- "name": "page",
1783
- "default": 1,
1784
- "hasDynamicHelp": false,
1785
- "multiple": false,
1786
- "type": "option"
1787
- },
1788
- "sort-by": {
1789
- "description": "Sort field (prefix with - for descending, e.g. -cost, -latency)",
1790
- "name": "sort-by",
1791
- "hasDynamicHelp": false,
1792
- "multiple": false,
1793
- "type": "option"
1794
- },
1795
- "start-time": {
1796
- "description": "Start time filter (ISO 8601)",
1797
- "name": "start-time",
1798
- "hasDynamicHelp": false,
1799
- "multiple": false,
1800
- "type": "option"
1801
- },
1802
- "end-time": {
1803
- "description": "End time filter (ISO 8601)",
1804
- "name": "end-time",
1805
- "hasDynamicHelp": false,
1806
- "multiple": false,
1807
- "type": "option"
1808
- },
1809
- "filter": {
1810
- "description": "Filter in field:operator:value format (repeatable)",
1811
- "name": "filter",
1812
- "hasDynamicHelp": false,
1813
- "multiple": true,
1814
- "type": "option"
1815
- },
1816
- "all-envs": {
1817
- "description": "Include all environments (true/false)",
1818
- "name": "all-envs",
1819
- "hasDynamicHelp": false,
1820
- "multiple": false,
1821
- "type": "option"
1822
- },
1823
- "is-test": {
1824
- "description": "Filter by test (true) or production (false) environment",
1825
- "name": "is-test",
1826
- "hasDynamicHelp": false,
1827
- "multiple": false,
1828
- "type": "option"
1829
- },
1830
- "include-fields": {
1831
- "description": "Comma-separated fields to include in response",
1832
- "name": "include-fields",
1833
- "hasDynamicHelp": false,
1834
- "multiple": false,
1835
- "type": "option"
1836
- }
1837
- },
1838
- "hasDynamicHelp": false,
1839
- "hiddenAliases": [],
1840
- "id": "logs:list",
1841
- "pluginAlias": "@respan/cli",
1842
- "pluginName": "@respan/cli",
1843
- "pluginType": "core",
1844
- "strict": true,
1845
- "enableJsonFlag": false,
1846
- "isESM": true,
1847
- "relativePath": [
1848
- "dist",
1849
- "commands",
1850
- "logs",
1851
- "list.js"
1852
- ]
1853
- },
1854
- "logs:summary": {
1855
- "aliases": [],
1856
- "args": {},
1857
- "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",
1858
- "flags": {
1859
- "api-key": {
1860
- "description": "API key (env: RESPAN_API_KEY)",
1861
- "env": "RESPAN_API_KEY",
1862
- "name": "api-key",
1863
- "hasDynamicHelp": false,
1864
- "multiple": false,
1865
- "type": "option"
1866
- },
1867
- "profile": {
1868
- "description": "Named profile to use",
1869
- "name": "profile",
1870
- "hasDynamicHelp": false,
1871
- "multiple": false,
1872
- "type": "option"
1947
+ "local": {
1948
+ "description": "Write per-project config (default)",
1949
+ "exclusive": [
1950
+ "global"
1951
+ ],
1952
+ "name": "local",
1953
+ "allowNo": false,
1954
+ "type": "boolean"
1873
1955
  },
1874
- "json": {
1875
- "description": "Output as JSON",
1876
- "name": "json",
1956
+ "global": {
1957
+ "description": "Write user-level global config",
1958
+ "exclusive": [
1959
+ "local"
1960
+ ],
1961
+ "name": "global",
1877
1962
  "allowNo": false,
1878
1963
  "type": "boolean"
1879
1964
  },
1880
- "csv": {
1881
- "description": "Output as CSV",
1882
- "name": "csv",
1965
+ "enable": {
1966
+ "description": "Enable tracing (default)",
1967
+ "exclusive": [
1968
+ "disable"
1969
+ ],
1970
+ "name": "enable",
1883
1971
  "allowNo": false,
1884
1972
  "type": "boolean"
1885
1973
  },
1886
- "verbose": {
1887
- "char": "v",
1888
- "description": "Show verbose output",
1889
- "name": "verbose",
1974
+ "disable": {
1975
+ "description": "Disable tracing",
1976
+ "exclusive": [
1977
+ "enable"
1978
+ ],
1979
+ "name": "disable",
1890
1980
  "allowNo": false,
1891
1981
  "type": "boolean"
1892
1982
  },
1893
- "start-time": {
1894
- "description": "Start time (ISO 8601)",
1895
- "name": "start-time",
1896
- "required": true,
1983
+ "project-id": {
1984
+ "description": "Respan project ID (added to metadata / resource attributes)",
1985
+ "env": "RESPAN_PROJECT_ID",
1986
+ "name": "project-id",
1897
1987
  "hasDynamicHelp": false,
1898
1988
  "multiple": false,
1899
1989
  "type": "option"
1900
1990
  },
1901
- "end-time": {
1902
- "description": "End time (ISO 8601)",
1903
- "name": "end-time",
1904
- "required": true,
1991
+ "attrs": {
1992
+ "description": "Custom attributes JSON (e.g. '{\"env\":\"prod\"}')",
1993
+ "name": "attrs",
1994
+ "default": "{}",
1905
1995
  "hasDynamicHelp": false,
1906
1996
  "multiple": false,
1907
1997
  "type": "option"
1908
1998
  },
1909
- "filter": {
1910
- "description": "Filter in field:operator:value format (repeatable)",
1911
- "name": "filter",
1999
+ "customer-id": {
2000
+ "description": "Customer/user identifier for traces (e.g. your name or email)",
2001
+ "env": "RESPAN_CUSTOMER_ID",
2002
+ "name": "customer-id",
1912
2003
  "hasDynamicHelp": false,
1913
- "multiple": true,
2004
+ "multiple": false,
1914
2005
  "type": "option"
1915
2006
  },
1916
- "all-envs": {
1917
- "description": "Include all environments (true/false)",
1918
- "name": "all-envs",
2007
+ "span-name": {
2008
+ "description": "Root span name for traces (default: claude-code)",
2009
+ "name": "span-name",
1919
2010
  "hasDynamicHelp": false,
1920
2011
  "multiple": false,
1921
2012
  "type": "option"
1922
2013
  },
1923
- "is-test": {
1924
- "description": "Filter by test (true) or production (false) environment",
1925
- "name": "is-test",
2014
+ "workflow-name": {
2015
+ "description": "Workflow name for traces (default: claude-code)",
2016
+ "name": "workflow-name",
1926
2017
  "hasDynamicHelp": false,
1927
2018
  "multiple": false,
1928
2019
  "type": "option"
2020
+ },
2021
+ "dry-run": {
2022
+ "description": "Preview changes without writing files",
2023
+ "name": "dry-run",
2024
+ "allowNo": false,
2025
+ "type": "boolean"
1929
2026
  }
1930
2027
  },
1931
2028
  "hasDynamicHelp": false,
1932
2029
  "hiddenAliases": [],
1933
- "id": "logs:summary",
2030
+ "id": "integrate:codex-cli",
1934
2031
  "pluginAlias": "@respan/cli",
1935
2032
  "pluginName": "@respan/cli",
1936
2033
  "pluginType": "core",
@@ -1940,21 +2037,20 @@
1940
2037
  "relativePath": [
1941
2038
  "dist",
1942
2039
  "commands",
1943
- "logs",
1944
- "summary.js"
2040
+ "integrate",
2041
+ "codex-cli.js"
1945
2042
  ]
1946
2043
  },
1947
- "integrate:claude-code": {
2044
+ "integrate:gemini-cli": {
1948
2045
  "aliases": [],
1949
- "args": {},
1950
- "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\nDefault behavior installs the global hook and writes local project config.",
1951
- "examples": [
1952
- "respan integrate claude-code",
1953
- "respan integrate claude-code --disable",
1954
- "respan integrate claude-code --global",
1955
- "respan integrate claude-code --local --project-id my-project",
1956
- "respan integrate claude-code --attrs '{\"env\":\"prod\"}'",
1957
- "respan integrate claude-code --dry-run"
2046
+ "args": {},
2047
+ "description": "Integrate Respan with Gemini CLI.\n\nInstalls an AfterModel hook that captures LLM request/response data\nand sends it to Respan as structured spans with model, token counts,\nand input/output.\n\nScope:\n --global Write to ~/.gemini/settings.json (default)\n --local Write to .gemini/settings.json in project root\n\nGemini CLI ignores workspace-level telemetry settings, so --global is the default.",
2048
+ "examples": [
2049
+ "respan integrate gemini-cli",
2050
+ "respan integrate gemini-cli --disable",
2051
+ "respan integrate gemini-cli --local",
2052
+ "respan integrate gemini-cli --project-id my-project --attrs '{\"env\":\"prod\"}'",
2053
+ "respan integrate gemini-cli --dry-run"
1958
2054
  ],
1959
2055
  "flags": {
1960
2056
  "api-key": {
@@ -1965,6 +2061,14 @@
1965
2061
  "multiple": false,
1966
2062
  "type": "option"
1967
2063
  },
2064
+ "base-url": {
2065
+ "description": "Respan API base URL (for enterprise deployments)",
2066
+ "name": "base-url",
2067
+ "default": "https://api.respan.ai/api",
2068
+ "hasDynamicHelp": false,
2069
+ "multiple": false,
2070
+ "type": "option"
2071
+ },
1968
2072
  "profile": {
1969
2073
  "description": "Named profile to use",
1970
2074
  "name": "profile",
@@ -2035,14 +2139,6 @@
2035
2139
  "multiple": false,
2036
2140
  "type": "option"
2037
2141
  },
2038
- "base-url": {
2039
- "description": "Respan API base URL (for enterprise deployments)",
2040
- "name": "base-url",
2041
- "default": "https://api.respan.ai/api",
2042
- "hasDynamicHelp": false,
2043
- "multiple": false,
2044
- "type": "option"
2045
- },
2046
2142
  "attrs": {
2047
2143
  "description": "Custom attributes JSON (e.g. '{\"env\":\"prod\"}')",
2048
2144
  "name": "attrs",
@@ -2082,7 +2178,7 @@
2082
2178
  },
2083
2179
  "hasDynamicHelp": false,
2084
2180
  "hiddenAliases": [],
2085
- "id": "integrate:claude-code",
2181
+ "id": "integrate:gemini-cli",
2086
2182
  "pluginAlias": "@respan/cli",
2087
2183
  "pluginName": "@respan/cli",
2088
2184
  "pluginType": "core",
@@ -2093,20 +2189,19 @@
2093
2189
  "dist",
2094
2190
  "commands",
2095
2191
  "integrate",
2096
- "claude-code.js"
2192
+ "gemini-cli.js"
2097
2193
  ]
2098
2194
  },
2099
- "integrate:codex-cli": {
2195
+ "integrate:opencode": {
2100
2196
  "aliases": [],
2101
2197
  "args": {},
2102
- "description": "Integrate Respan with Codex CLI.\n\nInstalls a notify hook that reads session JSONL files and sends\nthem to Respan as structured spans (chat, tool, reasoning).\n\nScope:\n --global Install hook script + register notify in ~/.codex/config.toml\n --local Write .codex/respan.json with customer_id, span_name, etc.\n\nDefault behavior installs the global notify hook and writes local project config.",
2198
+ "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.",
2103
2199
  "examples": [
2104
- "respan integrate codex-cli",
2105
- "respan integrate codex-cli --disable",
2106
- "respan integrate codex-cli --global",
2107
- "respan integrate codex-cli --local --customer-id frank",
2108
- "respan integrate codex-cli --attrs '{\"env\":\"prod\"}'",
2109
- "respan integrate codex-cli --dry-run"
2200
+ "respan integrate opencode",
2201
+ "respan integrate opencode --disable",
2202
+ "respan integrate opencode --global",
2203
+ "respan integrate opencode --project-id my-project --attrs '{\"env\":\"prod\"}'",
2204
+ "respan integrate opencode --dry-run"
2110
2205
  ],
2111
2206
  "flags": {
2112
2207
  "api-key": {
@@ -2117,6 +2212,14 @@
2117
2212
  "multiple": false,
2118
2213
  "type": "option"
2119
2214
  },
2215
+ "base-url": {
2216
+ "description": "Respan API base URL (for enterprise deployments)",
2217
+ "name": "base-url",
2218
+ "default": "https://api.respan.ai/api",
2219
+ "hasDynamicHelp": false,
2220
+ "multiple": false,
2221
+ "type": "option"
2222
+ },
2120
2223
  "profile": {
2121
2224
  "description": "Named profile to use",
2122
2225
  "name": "profile",
@@ -2187,14 +2290,6 @@
2187
2290
  "multiple": false,
2188
2291
  "type": "option"
2189
2292
  },
2190
- "base-url": {
2191
- "description": "Respan API base URL (for enterprise deployments)",
2192
- "name": "base-url",
2193
- "default": "https://api.respan.ai/api",
2194
- "hasDynamicHelp": false,
2195
- "multiple": false,
2196
- "type": "option"
2197
- },
2198
2293
  "attrs": {
2199
2294
  "description": "Custom attributes JSON (e.g. '{\"env\":\"prod\"}')",
2200
2295
  "name": "attrs",
@@ -2234,7 +2329,7 @@
2234
2329
  },
2235
2330
  "hasDynamicHelp": false,
2236
2331
  "hiddenAliases": [],
2237
- "id": "integrate:codex-cli",
2332
+ "id": "integrate:opencode",
2238
2333
  "pluginAlias": "@respan/cli",
2239
2334
  "pluginName": "@respan/cli",
2240
2335
  "pluginType": "core",
@@ -2245,20 +2340,13 @@
2245
2340
  "dist",
2246
2341
  "commands",
2247
2342
  "integrate",
2248
- "codex-cli.js"
2343
+ "opencode.js"
2249
2344
  ]
2250
2345
  },
2251
- "integrate:gemini-cli": {
2346
+ "logs:create": {
2252
2347
  "aliases": [],
2253
2348
  "args": {},
2254
- "description": "Integrate Respan with Gemini CLI.\n\nInstalls an AfterModel hook that captures LLM request/response data\nand sends it to Respan as structured spans with model, token counts,\nand input/output.\n\nScope:\n --global Write to ~/.gemini/settings.json (default)\n --local Write to .gemini/settings.json in project root\n\nGemini CLI ignores workspace-level telemetry settings, so --global is the default.",
2255
- "examples": [
2256
- "respan integrate gemini-cli",
2257
- "respan integrate gemini-cli --disable",
2258
- "respan integrate gemini-cli --local",
2259
- "respan integrate gemini-cli --project-id my-project --attrs '{\"env\":\"prod\"}'",
2260
- "respan integrate gemini-cli --dry-run"
2261
- ],
2349
+ "description": "Create a log span",
2262
2350
  "flags": {
2263
2351
  "api-key": {
2264
2352
  "description": "API key (env: RESPAN_API_KEY)",
@@ -2268,6 +2356,13 @@
2268
2356
  "multiple": false,
2269
2357
  "type": "option"
2270
2358
  },
2359
+ "base-url": {
2360
+ "description": "Temporary API base URL override for this command",
2361
+ "name": "base-url",
2362
+ "hasDynamicHelp": false,
2363
+ "multiple": false,
2364
+ "type": "option"
2365
+ },
2271
2366
  "profile": {
2272
2367
  "description": "Named profile to use",
2273
2368
  "name": "profile",
@@ -2294,98 +2389,236 @@
2294
2389
  "allowNo": false,
2295
2390
  "type": "boolean"
2296
2391
  },
2297
- "local": {
2298
- "description": "Write per-project config (default)",
2299
- "exclusive": [
2300
- "global"
2301
- ],
2302
- "name": "local",
2392
+ "input": {
2393
+ "description": "Input text or JSON",
2394
+ "name": "input",
2395
+ "required": true,
2396
+ "hasDynamicHelp": false,
2397
+ "multiple": false,
2398
+ "type": "option"
2399
+ },
2400
+ "output": {
2401
+ "description": "Output text or JSON",
2402
+ "name": "output",
2403
+ "hasDynamicHelp": false,
2404
+ "multiple": false,
2405
+ "type": "option"
2406
+ },
2407
+ "model": {
2408
+ "description": "Model name",
2409
+ "name": "model",
2410
+ "hasDynamicHelp": false,
2411
+ "multiple": false,
2412
+ "type": "option"
2413
+ },
2414
+ "metadata": {
2415
+ "description": "Metadata as JSON string",
2416
+ "name": "metadata",
2417
+ "hasDynamicHelp": false,
2418
+ "multiple": false,
2419
+ "type": "option"
2420
+ }
2421
+ },
2422
+ "hasDynamicHelp": false,
2423
+ "hiddenAliases": [],
2424
+ "id": "logs:create",
2425
+ "pluginAlias": "@respan/cli",
2426
+ "pluginName": "@respan/cli",
2427
+ "pluginType": "core",
2428
+ "strict": true,
2429
+ "enableJsonFlag": false,
2430
+ "isESM": true,
2431
+ "relativePath": [
2432
+ "dist",
2433
+ "commands",
2434
+ "logs",
2435
+ "create.js"
2436
+ ]
2437
+ },
2438
+ "logs:get": {
2439
+ "aliases": [],
2440
+ "args": {
2441
+ "id": {
2442
+ "description": "Span ID",
2443
+ "name": "id",
2444
+ "required": true
2445
+ }
2446
+ },
2447
+ "description": "Get a specific log span",
2448
+ "flags": {
2449
+ "api-key": {
2450
+ "description": "API key (env: RESPAN_API_KEY)",
2451
+ "env": "RESPAN_API_KEY",
2452
+ "name": "api-key",
2453
+ "hasDynamicHelp": false,
2454
+ "multiple": false,
2455
+ "type": "option"
2456
+ },
2457
+ "base-url": {
2458
+ "description": "Temporary API base URL override for this command",
2459
+ "name": "base-url",
2460
+ "hasDynamicHelp": false,
2461
+ "multiple": false,
2462
+ "type": "option"
2463
+ },
2464
+ "profile": {
2465
+ "description": "Named profile to use",
2466
+ "name": "profile",
2467
+ "hasDynamicHelp": false,
2468
+ "multiple": false,
2469
+ "type": "option"
2470
+ },
2471
+ "json": {
2472
+ "description": "Output as JSON",
2473
+ "name": "json",
2303
2474
  "allowNo": false,
2304
2475
  "type": "boolean"
2305
2476
  },
2306
- "global": {
2307
- "description": "Write user-level global config",
2308
- "exclusive": [
2309
- "local"
2310
- ],
2311
- "name": "global",
2477
+ "csv": {
2478
+ "description": "Output as CSV",
2479
+ "name": "csv",
2312
2480
  "allowNo": false,
2313
2481
  "type": "boolean"
2314
2482
  },
2315
- "enable": {
2316
- "description": "Enable tracing (default)",
2317
- "exclusive": [
2318
- "disable"
2319
- ],
2320
- "name": "enable",
2483
+ "verbose": {
2484
+ "char": "v",
2485
+ "description": "Show verbose output",
2486
+ "name": "verbose",
2487
+ "allowNo": false,
2488
+ "type": "boolean"
2489
+ }
2490
+ },
2491
+ "hasDynamicHelp": false,
2492
+ "hiddenAliases": [],
2493
+ "id": "logs:get",
2494
+ "pluginAlias": "@respan/cli",
2495
+ "pluginName": "@respan/cli",
2496
+ "pluginType": "core",
2497
+ "strict": true,
2498
+ "enableJsonFlag": false,
2499
+ "isESM": true,
2500
+ "relativePath": [
2501
+ "dist",
2502
+ "commands",
2503
+ "logs",
2504
+ "get.js"
2505
+ ]
2506
+ },
2507
+ "logs:list": {
2508
+ "aliases": [],
2509
+ "args": {},
2510
+ "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",
2511
+ "flags": {
2512
+ "api-key": {
2513
+ "description": "API key (env: RESPAN_API_KEY)",
2514
+ "env": "RESPAN_API_KEY",
2515
+ "name": "api-key",
2516
+ "hasDynamicHelp": false,
2517
+ "multiple": false,
2518
+ "type": "option"
2519
+ },
2520
+ "base-url": {
2521
+ "description": "Temporary API base URL override for this command",
2522
+ "name": "base-url",
2523
+ "hasDynamicHelp": false,
2524
+ "multiple": false,
2525
+ "type": "option"
2526
+ },
2527
+ "profile": {
2528
+ "description": "Named profile to use",
2529
+ "name": "profile",
2530
+ "hasDynamicHelp": false,
2531
+ "multiple": false,
2532
+ "type": "option"
2533
+ },
2534
+ "json": {
2535
+ "description": "Output as JSON",
2536
+ "name": "json",
2321
2537
  "allowNo": false,
2322
2538
  "type": "boolean"
2323
2539
  },
2324
- "disable": {
2325
- "description": "Disable tracing",
2326
- "exclusive": [
2327
- "enable"
2328
- ],
2329
- "name": "disable",
2540
+ "csv": {
2541
+ "description": "Output as CSV",
2542
+ "name": "csv",
2543
+ "allowNo": false,
2544
+ "type": "boolean"
2545
+ },
2546
+ "verbose": {
2547
+ "char": "v",
2548
+ "description": "Show verbose output",
2549
+ "name": "verbose",
2330
2550
  "allowNo": false,
2331
2551
  "type": "boolean"
2332
2552
  },
2333
- "project-id": {
2334
- "description": "Respan project ID (added to metadata / resource attributes)",
2335
- "env": "RESPAN_PROJECT_ID",
2336
- "name": "project-id",
2553
+ "limit": {
2554
+ "description": "Number of results per page (max 1000)",
2555
+ "name": "limit",
2556
+ "default": 50,
2557
+ "hasDynamicHelp": false,
2558
+ "multiple": false,
2559
+ "type": "option"
2560
+ },
2561
+ "page": {
2562
+ "description": "Page number",
2563
+ "name": "page",
2564
+ "default": 1,
2337
2565
  "hasDynamicHelp": false,
2338
2566
  "multiple": false,
2339
2567
  "type": "option"
2340
2568
  },
2341
- "base-url": {
2342
- "description": "Respan API base URL (for enterprise deployments)",
2343
- "name": "base-url",
2344
- "default": "https://api.respan.ai/api",
2569
+ "sort-by": {
2570
+ "description": "Sort field (prefix with - for descending, e.g. -cost, -latency)",
2571
+ "name": "sort-by",
2345
2572
  "hasDynamicHelp": false,
2346
2573
  "multiple": false,
2347
2574
  "type": "option"
2348
2575
  },
2349
- "attrs": {
2350
- "description": "Custom attributes JSON (e.g. '{\"env\":\"prod\"}')",
2351
- "name": "attrs",
2352
- "default": "{}",
2576
+ "start-time": {
2577
+ "description": "Start time filter (ISO 8601)",
2578
+ "name": "start-time",
2353
2579
  "hasDynamicHelp": false,
2354
2580
  "multiple": false,
2355
2581
  "type": "option"
2356
2582
  },
2357
- "customer-id": {
2358
- "description": "Customer/user identifier for traces (e.g. your name or email)",
2359
- "env": "RESPAN_CUSTOMER_ID",
2360
- "name": "customer-id",
2583
+ "end-time": {
2584
+ "description": "End time filter (ISO 8601)",
2585
+ "name": "end-time",
2361
2586
  "hasDynamicHelp": false,
2362
2587
  "multiple": false,
2363
2588
  "type": "option"
2364
2589
  },
2365
- "span-name": {
2366
- "description": "Root span name for traces (default: claude-code)",
2367
- "name": "span-name",
2590
+ "filter": {
2591
+ "description": "Filter in field:operator:value format (repeatable)",
2592
+ "name": "filter",
2593
+ "hasDynamicHelp": false,
2594
+ "multiple": true,
2595
+ "type": "option"
2596
+ },
2597
+ "all-envs": {
2598
+ "description": "Include all environments (true/false)",
2599
+ "name": "all-envs",
2368
2600
  "hasDynamicHelp": false,
2369
2601
  "multiple": false,
2370
2602
  "type": "option"
2371
2603
  },
2372
- "workflow-name": {
2373
- "description": "Workflow name for traces (default: claude-code)",
2374
- "name": "workflow-name",
2604
+ "is-test": {
2605
+ "description": "Filter by test (true) or production (false) environment",
2606
+ "name": "is-test",
2375
2607
  "hasDynamicHelp": false,
2376
2608
  "multiple": false,
2377
2609
  "type": "option"
2378
2610
  },
2379
- "dry-run": {
2380
- "description": "Preview changes without writing files",
2381
- "name": "dry-run",
2382
- "allowNo": false,
2383
- "type": "boolean"
2611
+ "include-fields": {
2612
+ "description": "Comma-separated fields to include in response",
2613
+ "name": "include-fields",
2614
+ "hasDynamicHelp": false,
2615
+ "multiple": false,
2616
+ "type": "option"
2384
2617
  }
2385
2618
  },
2386
2619
  "hasDynamicHelp": false,
2387
2620
  "hiddenAliases": [],
2388
- "id": "integrate:gemini-cli",
2621
+ "id": "logs:list",
2389
2622
  "pluginAlias": "@respan/cli",
2390
2623
  "pluginName": "@respan/cli",
2391
2624
  "pluginType": "core",
@@ -2395,21 +2628,14 @@
2395
2628
  "relativePath": [
2396
2629
  "dist",
2397
2630
  "commands",
2398
- "integrate",
2399
- "gemini-cli.js"
2631
+ "logs",
2632
+ "list.js"
2400
2633
  ]
2401
2634
  },
2402
- "integrate:opencode": {
2635
+ "logs:summary": {
2403
2636
  "aliases": [],
2404
2637
  "args": {},
2405
- "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.",
2406
- "examples": [
2407
- "respan integrate opencode",
2408
- "respan integrate opencode --disable",
2409
- "respan integrate opencode --global",
2410
- "respan integrate opencode --project-id my-project --attrs '{\"env\":\"prod\"}'",
2411
- "respan integrate opencode --dry-run"
2412
- ],
2638
+ "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",
2413
2639
  "flags": {
2414
2640
  "api-key": {
2415
2641
  "description": "API key (env: RESPAN_API_KEY)",
@@ -2419,6 +2645,13 @@
2419
2645
  "multiple": false,
2420
2646
  "type": "option"
2421
2647
  },
2648
+ "base-url": {
2649
+ "description": "Temporary API base URL override for this command",
2650
+ "name": "base-url",
2651
+ "hasDynamicHelp": false,
2652
+ "multiple": false,
2653
+ "type": "option"
2654
+ },
2422
2655
  "profile": {
2423
2656
  "description": "Named profile to use",
2424
2657
  "name": "profile",
@@ -2445,98 +2678,47 @@
2445
2678
  "allowNo": false,
2446
2679
  "type": "boolean"
2447
2680
  },
2448
- "local": {
2449
- "description": "Write per-project config (default)",
2450
- "exclusive": [
2451
- "global"
2452
- ],
2453
- "name": "local",
2454
- "allowNo": false,
2455
- "type": "boolean"
2456
- },
2457
- "global": {
2458
- "description": "Write user-level global config",
2459
- "exclusive": [
2460
- "local"
2461
- ],
2462
- "name": "global",
2463
- "allowNo": false,
2464
- "type": "boolean"
2465
- },
2466
- "enable": {
2467
- "description": "Enable tracing (default)",
2468
- "exclusive": [
2469
- "disable"
2470
- ],
2471
- "name": "enable",
2472
- "allowNo": false,
2473
- "type": "boolean"
2474
- },
2475
- "disable": {
2476
- "description": "Disable tracing",
2477
- "exclusive": [
2478
- "enable"
2479
- ],
2480
- "name": "disable",
2481
- "allowNo": false,
2482
- "type": "boolean"
2483
- },
2484
- "project-id": {
2485
- "description": "Respan project ID (added to metadata / resource attributes)",
2486
- "env": "RESPAN_PROJECT_ID",
2487
- "name": "project-id",
2488
- "hasDynamicHelp": false,
2489
- "multiple": false,
2490
- "type": "option"
2491
- },
2492
- "base-url": {
2493
- "description": "Respan API base URL (for enterprise deployments)",
2494
- "name": "base-url",
2495
- "default": "https://api.respan.ai/api",
2681
+ "start-time": {
2682
+ "description": "Start time (ISO 8601)",
2683
+ "name": "start-time",
2684
+ "required": true,
2496
2685
  "hasDynamicHelp": false,
2497
2686
  "multiple": false,
2498
2687
  "type": "option"
2499
2688
  },
2500
- "attrs": {
2501
- "description": "Custom attributes JSON (e.g. '{\"env\":\"prod\"}')",
2502
- "name": "attrs",
2503
- "default": "{}",
2689
+ "end-time": {
2690
+ "description": "End time (ISO 8601)",
2691
+ "name": "end-time",
2692
+ "required": true,
2504
2693
  "hasDynamicHelp": false,
2505
2694
  "multiple": false,
2506
2695
  "type": "option"
2507
2696
  },
2508
- "customer-id": {
2509
- "description": "Customer/user identifier for traces (e.g. your name or email)",
2510
- "env": "RESPAN_CUSTOMER_ID",
2511
- "name": "customer-id",
2697
+ "filter": {
2698
+ "description": "Filter in field:operator:value format (repeatable)",
2699
+ "name": "filter",
2512
2700
  "hasDynamicHelp": false,
2513
- "multiple": false,
2701
+ "multiple": true,
2514
2702
  "type": "option"
2515
2703
  },
2516
- "span-name": {
2517
- "description": "Root span name for traces (default: claude-code)",
2518
- "name": "span-name",
2704
+ "all-envs": {
2705
+ "description": "Include all environments (true/false)",
2706
+ "name": "all-envs",
2519
2707
  "hasDynamicHelp": false,
2520
2708
  "multiple": false,
2521
2709
  "type": "option"
2522
2710
  },
2523
- "workflow-name": {
2524
- "description": "Workflow name for traces (default: claude-code)",
2525
- "name": "workflow-name",
2711
+ "is-test": {
2712
+ "description": "Filter by test (true) or production (false) environment",
2713
+ "name": "is-test",
2526
2714
  "hasDynamicHelp": false,
2527
2715
  "multiple": false,
2528
2716
  "type": "option"
2529
- },
2530
- "dry-run": {
2531
- "description": "Preview changes without writing files",
2532
- "name": "dry-run",
2533
- "allowNo": false,
2534
- "type": "boolean"
2535
2717
  }
2536
2718
  },
2537
2719
  "hasDynamicHelp": false,
2538
2720
  "hiddenAliases": [],
2539
- "id": "integrate:opencode",
2721
+ "id": "logs:summary",
2540
2722
  "pluginAlias": "@respan/cli",
2541
2723
  "pluginName": "@respan/cli",
2542
2724
  "pluginType": "core",
@@ -2546,8 +2728,8 @@
2546
2728
  "relativePath": [
2547
2729
  "dist",
2548
2730
  "commands",
2549
- "integrate",
2550
- "opencode.js"
2731
+ "logs",
2732
+ "summary.js"
2551
2733
  ]
2552
2734
  },
2553
2735
  "prompts:create-version": {
@@ -2569,6 +2751,13 @@
2569
2751
  "multiple": false,
2570
2752
  "type": "option"
2571
2753
  },
2754
+ "base-url": {
2755
+ "description": "Temporary API base URL override for this command",
2756
+ "name": "base-url",
2757
+ "hasDynamicHelp": false,
2758
+ "multiple": false,
2759
+ "type": "option"
2760
+ },
2572
2761
  "profile": {
2573
2762
  "description": "Named profile to use",
2574
2763
  "name": "profile",
@@ -2654,6 +2843,13 @@
2654
2843
  "multiple": false,
2655
2844
  "type": "option"
2656
2845
  },
2846
+ "base-url": {
2847
+ "description": "Temporary API base URL override for this command",
2848
+ "name": "base-url",
2849
+ "hasDynamicHelp": false,
2850
+ "multiple": false,
2851
+ "type": "option"
2852
+ },
2657
2853
  "profile": {
2658
2854
  "description": "Named profile to use",
2659
2855
  "name": "profile",
@@ -2731,6 +2927,13 @@
2731
2927
  "multiple": false,
2732
2928
  "type": "option"
2733
2929
  },
2930
+ "base-url": {
2931
+ "description": "Temporary API base URL override for this command",
2932
+ "name": "base-url",
2933
+ "hasDynamicHelp": false,
2934
+ "multiple": false,
2935
+ "type": "option"
2936
+ },
2734
2937
  "profile": {
2735
2938
  "description": "Named profile to use",
2736
2939
  "name": "profile",
@@ -2787,6 +2990,13 @@
2787
2990
  "multiple": false,
2788
2991
  "type": "option"
2789
2992
  },
2993
+ "base-url": {
2994
+ "description": "Temporary API base URL override for this command",
2995
+ "name": "base-url",
2996
+ "hasDynamicHelp": false,
2997
+ "multiple": false,
2998
+ "type": "option"
2999
+ },
2790
3000
  "profile": {
2791
3001
  "description": "Named profile to use",
2792
3002
  "name": "profile",
@@ -2857,6 +3067,13 @@
2857
3067
  "multiple": false,
2858
3068
  "type": "option"
2859
3069
  },
3070
+ "base-url": {
3071
+ "description": "Temporary API base URL override for this command",
3072
+ "name": "base-url",
3073
+ "hasDynamicHelp": false,
3074
+ "multiple": false,
3075
+ "type": "option"
3076
+ },
2860
3077
  "profile": {
2861
3078
  "description": "Named profile to use",
2862
3079
  "name": "profile",
@@ -2933,6 +3150,13 @@
2933
3150
  "multiple": false,
2934
3151
  "type": "option"
2935
3152
  },
3153
+ "base-url": {
3154
+ "description": "Temporary API base URL override for this command",
3155
+ "name": "base-url",
3156
+ "hasDynamicHelp": false,
3157
+ "multiple": false,
3158
+ "type": "option"
3159
+ },
2936
3160
  "profile": {
2937
3161
  "description": "Named profile to use",
2938
3162
  "name": "profile",
@@ -2995,6 +3219,13 @@
2995
3219
  "multiple": false,
2996
3220
  "type": "option"
2997
3221
  },
3222
+ "base-url": {
3223
+ "description": "Temporary API base URL override for this command",
3224
+ "name": "base-url",
3225
+ "hasDynamicHelp": false,
3226
+ "multiple": false,
3227
+ "type": "option"
3228
+ },
2998
3229
  "profile": {
2999
3230
  "description": "Named profile to use",
3000
3231
  "name": "profile",
@@ -3051,6 +3282,13 @@
3051
3282
  "multiple": false,
3052
3283
  "type": "option"
3053
3284
  },
3285
+ "base-url": {
3286
+ "description": "Temporary API base URL override for this command",
3287
+ "name": "base-url",
3288
+ "hasDynamicHelp": false,
3289
+ "multiple": false,
3290
+ "type": "option"
3291
+ },
3054
3292
  "profile": {
3055
3293
  "description": "Named profile to use",
3056
3294
  "name": "profile",
@@ -3159,6 +3397,13 @@
3159
3397
  "multiple": false,
3160
3398
  "type": "option"
3161
3399
  },
3400
+ "base-url": {
3401
+ "description": "Temporary API base URL override for this command",
3402
+ "name": "base-url",
3403
+ "hasDynamicHelp": false,
3404
+ "multiple": false,
3405
+ "type": "option"
3406
+ },
3162
3407
  "profile": {
3163
3408
  "description": "Named profile to use",
3164
3409
  "name": "profile",
@@ -3231,6 +3476,13 @@
3231
3476
  "multiple": false,
3232
3477
  "type": "option"
3233
3478
  },
3479
+ "base-url": {
3480
+ "description": "Temporary API base URL override for this command",
3481
+ "name": "base-url",
3482
+ "hasDynamicHelp": false,
3483
+ "multiple": false,
3484
+ "type": "option"
3485
+ },
3234
3486
  "profile": {
3235
3487
  "description": "Named profile to use",
3236
3488
  "name": "profile",
@@ -3322,6 +3574,13 @@
3322
3574
  "multiple": false,
3323
3575
  "type": "option"
3324
3576
  },
3577
+ "base-url": {
3578
+ "description": "Temporary API base URL override for this command",
3579
+ "name": "base-url",
3580
+ "hasDynamicHelp": false,
3581
+ "multiple": false,
3582
+ "type": "option"
3583
+ },
3325
3584
  "profile": {
3326
3585
  "description": "Named profile to use",
3327
3586
  "name": "profile",
@@ -3378,6 +3637,13 @@
3378
3637
  "multiple": false,
3379
3638
  "type": "option"
3380
3639
  },
3640
+ "base-url": {
3641
+ "description": "Temporary API base URL override for this command",
3642
+ "name": "base-url",
3643
+ "hasDynamicHelp": false,
3644
+ "multiple": false,
3645
+ "type": "option"
3646
+ },
3381
3647
  "profile": {
3382
3648
  "description": "Named profile to use",
3383
3649
  "name": "profile",
@@ -3470,6 +3736,13 @@
3470
3736
  "multiple": false,
3471
3737
  "type": "option"
3472
3738
  },
3739
+ "base-url": {
3740
+ "description": "Temporary API base URL override for this command",
3741
+ "name": "base-url",
3742
+ "hasDynamicHelp": false,
3743
+ "multiple": false,
3744
+ "type": "option"
3745
+ },
3473
3746
  "profile": {
3474
3747
  "description": "Named profile to use",
3475
3748
  "name": "profile",
@@ -3535,5 +3808,5 @@
3535
3808
  ]
3536
3809
  }
3537
3810
  },
3538
- "version": "0.7.3"
3811
+ "version": "0.7.4"
3539
3812
  }