langwatch 0.7.1 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (88) hide show
  1. package/README.md +43 -52
  2. package/dist/{add-HWFRMAQX.mjs → add-TMFGG3SC.mjs} +7 -7
  3. package/dist/{add-5QV3TEWC.js → add-VOEIH432.js} +24 -24
  4. package/dist/{add-5QV3TEWC.js.map → add-VOEIH432.js.map} +1 -1
  5. package/dist/{chunk-5HAVK64Q.js → chunk-B5K6DU6G.js} +2 -2
  6. package/dist/chunk-B5K6DU6G.js.map +1 -0
  7. package/dist/{chunk-VMZUN4EF.js → chunk-BP2WGNIV.js} +3 -1
  8. package/dist/chunk-BP2WGNIV.js.map +1 -0
  9. package/dist/{chunk-UNMZPS55.mjs → chunk-DQU2PZAL.mjs} +3 -1
  10. package/dist/chunk-DQU2PZAL.mjs.map +1 -0
  11. package/dist/{chunk-DZH6SY3Z.js → chunk-GC7VHCU5.js} +10 -10
  12. package/dist/{chunk-DZH6SY3Z.js.map → chunk-GC7VHCU5.js.map} +1 -1
  13. package/dist/{chunk-7VHZNB2S.mjs → chunk-GMQHOSEU.mjs} +2 -2
  14. package/dist/chunk-GMQHOSEU.mjs.map +1 -0
  15. package/dist/{chunk-AD7QRYIJ.mjs → chunk-MBXENFRR.mjs} +2 -2
  16. package/dist/{chunk-PYVDTUA6.mjs → chunk-O6D3W3PG.mjs} +38 -49
  17. package/dist/chunk-O6D3W3PG.mjs.map +1 -0
  18. package/dist/{chunk-EPGKOTSN.mjs → chunk-SC4YBWRM.mjs} +17 -7
  19. package/dist/chunk-SC4YBWRM.mjs.map +1 -0
  20. package/dist/{chunk-7MG7DGPP.mjs → chunk-VH7IIHFW.mjs} +109 -20
  21. package/dist/chunk-VH7IIHFW.mjs.map +1 -0
  22. package/dist/{chunk-J55AV2YW.js → chunk-VWZCWYRH.js} +121 -32
  23. package/dist/chunk-VWZCWYRH.js.map +1 -0
  24. package/dist/{chunk-36XAYVMC.js → chunk-WAAQLJ67.js} +39 -50
  25. package/dist/chunk-WAAQLJ67.js.map +1 -0
  26. package/dist/{chunk-D7UAKYVI.js → chunk-XHNJY5BP.js} +26 -16
  27. package/dist/chunk-XHNJY5BP.js.map +1 -0
  28. package/dist/cli/index.js +7 -7
  29. package/dist/cli/index.mjs +7 -7
  30. package/dist/{create-S5RDGF3H.js → create-ACGBGFVO.js} +8 -8
  31. package/dist/{create-S5RDGF3H.js.map → create-ACGBGFVO.js.map} +1 -1
  32. package/dist/{create-LXQB4EFB.mjs → create-YUOTG2TS.mjs} +3 -3
  33. package/dist/{implementation-DsHp9FYU.d.ts → implementation-TF91Gn0l.d.ts} +154 -20
  34. package/dist/{implementation-nE9dgTwc.d.mts → implementation-pq0g2B5y.d.mts} +154 -20
  35. package/dist/index.d.mts +5 -2
  36. package/dist/index.d.ts +5 -2
  37. package/dist/index.js +13 -13
  38. package/dist/index.mjs +5 -5
  39. package/dist/{init-T4YDPHBA.mjs → init-ED3OW3TK.mjs} +3 -3
  40. package/dist/{init-UADBKUJU.js → init-UFZF26SF.js} +4 -4
  41. package/dist/{init-UADBKUJU.js.map → init-UFZF26SF.js.map} +1 -1
  42. package/dist/{list-HSCIBC4Z.js → list-42DGIFAC.js} +9 -9
  43. package/dist/{list-HSCIBC4Z.js.map → list-42DGIFAC.js.map} +1 -1
  44. package/dist/{list-BQXECLEM.mjs → list-KDYBQLVU.mjs} +6 -6
  45. package/dist/{login-EUDCIJRM.js → login-IRO5FBZI.js} +3 -3
  46. package/dist/{login-EUDCIJRM.js.map → login-IRO5FBZI.js.map} +1 -1
  47. package/dist/{login-3IM3PYSJ.mjs → login-RNWEYFQK.mjs} +2 -2
  48. package/dist/observability-sdk/index.d.mts +4 -3
  49. package/dist/observability-sdk/index.d.ts +4 -3
  50. package/dist/observability-sdk/index.js +4 -4
  51. package/dist/observability-sdk/index.mjs +3 -3
  52. package/dist/observability-sdk/instrumentation/langchain/index.d.mts +1 -1
  53. package/dist/observability-sdk/instrumentation/langchain/index.d.ts +1 -1
  54. package/dist/observability-sdk/instrumentation/langchain/index.js +3 -3
  55. package/dist/observability-sdk/instrumentation/langchain/index.mjs +1 -1
  56. package/dist/observability-sdk/setup/node/index.js +29 -10
  57. package/dist/observability-sdk/setup/node/index.js.map +1 -1
  58. package/dist/observability-sdk/setup/node/index.mjs +21 -2
  59. package/dist/observability-sdk/setup/node/index.mjs.map +1 -1
  60. package/dist/{remove-VDQ4M6JF.js → remove-5EXAIGBX.js} +14 -14
  61. package/dist/{remove-VDQ4M6JF.js.map → remove-5EXAIGBX.js.map} +1 -1
  62. package/dist/{remove-IVFQAHNT.mjs → remove-UWKI7GIJ.mjs} +6 -6
  63. package/dist/{sync-KUMBMGJS.js → sync-MOBSZVYV.js} +30 -31
  64. package/dist/sync-MOBSZVYV.js.map +1 -0
  65. package/dist/{sync-2MVHHWCX.mjs → sync-WJSJIKEW.mjs} +12 -13
  66. package/dist/sync-WJSJIKEW.mjs.map +1 -0
  67. package/dist/{types-B9772cUR.d.ts → types-CAQOMGrf.d.ts} +161 -43
  68. package/dist/{types-DbPAi4US.d.mts → types-DhEYjnRD.d.mts} +161 -43
  69. package/package.json +3 -2
  70. package/dist/chunk-36XAYVMC.js.map +0 -1
  71. package/dist/chunk-5HAVK64Q.js.map +0 -1
  72. package/dist/chunk-7MG7DGPP.mjs.map +0 -1
  73. package/dist/chunk-7VHZNB2S.mjs.map +0 -1
  74. package/dist/chunk-D7UAKYVI.js.map +0 -1
  75. package/dist/chunk-EPGKOTSN.mjs.map +0 -1
  76. package/dist/chunk-J55AV2YW.js.map +0 -1
  77. package/dist/chunk-PYVDTUA6.mjs.map +0 -1
  78. package/dist/chunk-UNMZPS55.mjs.map +0 -1
  79. package/dist/chunk-VMZUN4EF.js.map +0 -1
  80. package/dist/sync-2MVHHWCX.mjs.map +0 -1
  81. package/dist/sync-KUMBMGJS.js.map +0 -1
  82. /package/dist/{add-HWFRMAQX.mjs.map → add-TMFGG3SC.mjs.map} +0 -0
  83. /package/dist/{chunk-AD7QRYIJ.mjs.map → chunk-MBXENFRR.mjs.map} +0 -0
  84. /package/dist/{create-LXQB4EFB.mjs.map → create-YUOTG2TS.mjs.map} +0 -0
  85. /package/dist/{init-T4YDPHBA.mjs.map → init-ED3OW3TK.mjs.map} +0 -0
  86. /package/dist/{list-BQXECLEM.mjs.map → list-KDYBQLVU.mjs.map} +0 -0
  87. /package/dist/{login-3IM3PYSJ.mjs.map → login-RNWEYFQK.mjs.map} +0 -0
  88. /package/dist/{remove-IVFQAHNT.mjs.map → remove-UWKI7GIJ.mjs.map} +0 -0
@@ -420,9 +420,11 @@ interface paths {
420
420
  message?: string;
421
421
  has_error?: boolean;
422
422
  } | null;
423
- /** @example [
423
+ /**
424
+ * @example [
424
425
  * "cccd21e0b70c706034dfd9f7772816a3"
425
- * ] */
426
+ * ]
427
+ */
426
428
  indexing_md5s?: string[];
427
429
  spans?: {
428
430
  /** @example trace_BKZL_X0TKSD4oa1aBJTc_ */
@@ -474,7 +476,8 @@ interface paths {
474
476
  input?: {
475
477
  /** @example chat_messages */
476
478
  type?: string;
477
- /** @example [
479
+ /**
480
+ * @example [
478
481
  * {
479
482
  * "role": "system",
480
483
  * "content": "You are a helpful assistant that only reply in short tweet-like responses, using lots of emojis."
@@ -483,7 +486,8 @@ interface paths {
483
486
  * "role": "user",
484
487
  * "content": "hi"
485
488
  * }
486
- * ] */
489
+ * ]
490
+ */
487
491
  value?: {
488
492
  /** @example system */
489
493
  role?: string;
@@ -494,12 +498,14 @@ interface paths {
494
498
  output?: {
495
499
  /** @example chat_messages */
496
500
  type?: string;
497
- /** @example [
501
+ /**
502
+ * @example [
498
503
  * {
499
504
  * "role": "assistant",
500
505
  * "content": "Hey there! 👋😊"
501
506
  * }
502
- * ] */
507
+ * ]
508
+ */
503
509
  value?: {
504
510
  /** @example assistant */
505
511
  role?: string;
@@ -528,9 +534,11 @@ interface paths {
528
534
  inserted_at?: number;
529
535
  };
530
536
  error?: {
531
- /** @example [
537
+ /**
538
+ * @example [
532
539
  * "TypeError: fetch failed"
533
- * ] */
540
+ * ]
541
+ */
534
542
  stacktrace?: string[];
535
543
  /** @example fetch failed */
536
544
  message?: string;
@@ -950,12 +958,14 @@ interface components {
950
958
  totalHits?: number;
951
959
  };
952
960
  DatasetPostEntries: {
953
- /** @example [
961
+ /**
962
+ * @example [
954
963
  * {
955
964
  * "input": "hi",
956
965
  * "output": "Hello, how can I help you today?"
957
966
  * }
958
- * ] */
967
+ * ]
968
+ */
959
969
  entries: {
960
970
  [key: string]: unknown;
961
971
  }[];
@@ -1035,8 +1045,9 @@ interface operations {
1035
1045
  [key: string]: string[];
1036
1046
  };
1037
1047
  columnTypes: {
1048
+ id?: string;
1038
1049
  name: string;
1039
- type: "string" | "boolean" | "number" | "date" | "list" | "json" | "spans" | "rag_contexts" | "chat_messages" | "annotations" | "evaluations";
1050
+ type: "string" | "boolean" | "number" | "date" | "list" | "json" | "spans" | "rag_contexts" | "chat_messages" | "annotations" | "evaluations" | "image";
1040
1051
  }[];
1041
1052
  };
1042
1053
  };
@@ -1051,8 +1062,9 @@ interface operations {
1051
1062
  [key: string]: string[];
1052
1063
  };
1053
1064
  columnTypes: {
1065
+ id?: string;
1054
1066
  name: string;
1055
- type: "string" | "boolean" | "number" | "date" | "list" | "json" | "spans" | "rag_contexts" | "chat_messages" | "annotations" | "evaluations";
1067
+ type: "string" | "boolean" | "number" | "date" | "list" | "json" | "spans" | "rag_contexts" | "chat_messages" | "annotations" | "evaluations" | "image";
1056
1068
  }[];
1057
1069
  };
1058
1070
  };
@@ -1104,6 +1116,18 @@ interface operations {
1104
1116
  };
1105
1117
  };
1106
1118
  };
1119
+ /** @description Unprocessable Entity */
1120
+ 422: {
1121
+ headers: {
1122
+ [name: string]: unknown;
1123
+ };
1124
+ content: {
1125
+ "application/json": {
1126
+ error: string;
1127
+ message?: string;
1128
+ };
1129
+ };
1130
+ };
1107
1131
  /** @description Internal Server Error */
1108
1132
  500: {
1109
1133
  headers: {
@@ -1130,11 +1154,10 @@ interface operations {
1130
1154
  requestBody?: {
1131
1155
  content: {
1132
1156
  "application/json": {
1133
- handle?: string;
1134
1157
  model?: string;
1135
1158
  temperature?: number;
1136
1159
  maxTokens?: number;
1137
- commitMessage?: string;
1160
+ commitMessage: string;
1138
1161
  authorId?: string;
1139
1162
  prompt?: string;
1140
1163
  messages?: {
@@ -1161,6 +1184,7 @@ interface operations {
1161
1184
  schemaVersion?: "1.0";
1162
1185
  /** @enum {string} */
1163
1186
  scope?: "ORGANIZATION" | "PROJECT";
1187
+ handle?: string;
1164
1188
  };
1165
1189
  };
1166
1190
  };
@@ -1218,8 +1242,9 @@ interface operations {
1218
1242
  [key: string]: string[];
1219
1243
  };
1220
1244
  columnTypes: {
1245
+ id?: string;
1221
1246
  name: string;
1222
- type: "string" | "boolean" | "number" | "date" | "list" | "json" | "spans" | "rag_contexts" | "chat_messages" | "annotations" | "evaluations";
1247
+ type: "string" | "boolean" | "number" | "date" | "list" | "json" | "spans" | "rag_contexts" | "chat_messages" | "annotations" | "evaluations" | "image";
1223
1248
  }[];
1224
1249
  };
1225
1250
  };
@@ -1234,8 +1259,9 @@ interface operations {
1234
1259
  [key: string]: string[];
1235
1260
  };
1236
1261
  columnTypes: {
1262
+ id?: string;
1237
1263
  name: string;
1238
- type: "string" | "boolean" | "number" | "date" | "list" | "json" | "spans" | "rag_contexts" | "chat_messages" | "annotations" | "evaluations";
1264
+ type: "string" | "boolean" | "number" | "date" | "list" | "json" | "spans" | "rag_contexts" | "chat_messages" | "annotations" | "evaluations" | "image";
1239
1265
  }[];
1240
1266
  };
1241
1267
  };
@@ -1383,6 +1409,18 @@ interface operations {
1383
1409
  };
1384
1410
  };
1385
1411
  };
1412
+ /** @description Unprocessable Entity */
1413
+ 422: {
1414
+ headers: {
1415
+ [name: string]: unknown;
1416
+ };
1417
+ content: {
1418
+ "application/json": {
1419
+ error: string;
1420
+ message?: string;
1421
+ };
1422
+ };
1423
+ };
1386
1424
  /** @description Internal Server Error */
1387
1425
  500: {
1388
1426
  headers: {
@@ -1461,8 +1499,9 @@ interface operations {
1461
1499
  [key: string]: string[];
1462
1500
  };
1463
1501
  columnTypes: {
1502
+ id?: string;
1464
1503
  name: string;
1465
- type: "string" | "boolean" | "number" | "date" | "list" | "json" | "spans" | "rag_contexts" | "chat_messages" | "annotations" | "evaluations";
1504
+ type: "string" | "boolean" | "number" | "date" | "list" | "json" | "spans" | "rag_contexts" | "chat_messages" | "annotations" | "evaluations" | "image";
1466
1505
  }[];
1467
1506
  };
1468
1507
  };
@@ -1477,8 +1516,9 @@ interface operations {
1477
1516
  [key: string]: string[];
1478
1517
  };
1479
1518
  columnTypes: {
1519
+ id?: string;
1480
1520
  name: string;
1481
- type: "string" | "boolean" | "number" | "date" | "list" | "json" | "spans" | "rag_contexts" | "chat_messages" | "annotations" | "evaluations";
1521
+ type: "string" | "boolean" | "number" | "date" | "list" | "json" | "spans" | "rag_contexts" | "chat_messages" | "annotations" | "evaluations" | "image";
1482
1522
  }[];
1483
1523
  };
1484
1524
  };
@@ -1530,6 +1570,18 @@ interface operations {
1530
1570
  };
1531
1571
  };
1532
1572
  };
1573
+ /** @description Unprocessable Entity */
1574
+ 422: {
1575
+ headers: {
1576
+ [name: string]: unknown;
1577
+ };
1578
+ content: {
1579
+ "application/json": {
1580
+ error: string;
1581
+ message?: string;
1582
+ };
1583
+ };
1584
+ };
1533
1585
  /** @description Internal Server Error */
1534
1586
  500: {
1535
1587
  headers: {
@@ -1590,8 +1642,9 @@ interface operations {
1590
1642
  [key: string]: string[];
1591
1643
  };
1592
1644
  columnTypes: {
1645
+ id?: string;
1593
1646
  name: string;
1594
- type: "string" | "boolean" | "number" | "date" | "list" | "json" | "spans" | "rag_contexts" | "chat_messages" | "annotations" | "evaluations";
1647
+ type: "string" | "boolean" | "number" | "date" | "list" | "json" | "spans" | "rag_contexts" | "chat_messages" | "annotations" | "evaluations" | "image";
1595
1648
  }[];
1596
1649
  };
1597
1650
  };
@@ -1606,8 +1659,9 @@ interface operations {
1606
1659
  [key: string]: string[];
1607
1660
  };
1608
1661
  columnTypes: {
1662
+ id?: string;
1609
1663
  name: string;
1610
- type: "string" | "boolean" | "number" | "date" | "list" | "json" | "spans" | "rag_contexts" | "chat_messages" | "annotations" | "evaluations";
1664
+ type: "string" | "boolean" | "number" | "date" | "list" | "json" | "spans" | "rag_contexts" | "chat_messages" | "annotations" | "evaluations" | "image";
1611
1665
  }[];
1612
1666
  };
1613
1667
  };
@@ -1683,8 +1737,9 @@ interface operations {
1683
1737
  [key: string]: string[];
1684
1738
  };
1685
1739
  columnTypes: {
1740
+ id?: string;
1686
1741
  name: string;
1687
- type: "string" | "boolean" | "number" | "date" | "list" | "json" | "spans" | "rag_contexts" | "chat_messages" | "annotations" | "evaluations";
1742
+ type: "string" | "boolean" | "number" | "date" | "list" | "json" | "spans" | "rag_contexts" | "chat_messages" | "annotations" | "evaluations" | "image";
1688
1743
  }[];
1689
1744
  };
1690
1745
  };
@@ -1699,8 +1754,9 @@ interface operations {
1699
1754
  [key: string]: string[];
1700
1755
  };
1701
1756
  columnTypes: {
1757
+ id?: string;
1702
1758
  name: string;
1703
- type: "string" | "boolean" | "number" | "date" | "list" | "json" | "spans" | "rag_contexts" | "chat_messages" | "annotations" | "evaluations";
1759
+ type: "string" | "boolean" | "number" | "date" | "list" | "json" | "spans" | "rag_contexts" | "chat_messages" | "annotations" | "evaluations" | "image";
1704
1760
  }[];
1705
1761
  };
1706
1762
  };
@@ -1752,8 +1808,9 @@ interface operations {
1752
1808
  [key: string]: string[];
1753
1809
  };
1754
1810
  columnTypes: {
1811
+ id?: string;
1755
1812
  name: string;
1756
- type: "string" | "boolean" | "number" | "date" | "list" | "json" | "spans" | "rag_contexts" | "chat_messages" | "annotations" | "evaluations";
1813
+ type: "string" | "boolean" | "number" | "date" | "list" | "json" | "spans" | "rag_contexts" | "chat_messages" | "annotations" | "evaluations" | "image";
1757
1814
  }[];
1758
1815
  };
1759
1816
  };
@@ -1768,8 +1825,9 @@ interface operations {
1768
1825
  [key: string]: string[];
1769
1826
  };
1770
1827
  columnTypes: {
1828
+ id?: string;
1771
1829
  name: string;
1772
- type: "string" | "boolean" | "number" | "date" | "list" | "json" | "spans" | "rag_contexts" | "chat_messages" | "annotations" | "evaluations";
1830
+ type: "string" | "boolean" | "number" | "date" | "list" | "json" | "spans" | "rag_contexts" | "chat_messages" | "annotations" | "evaluations" | "image";
1773
1831
  }[];
1774
1832
  };
1775
1833
  };
@@ -1811,6 +1869,18 @@ interface operations {
1811
1869
  };
1812
1870
  };
1813
1871
  };
1872
+ /** @description Unprocessable Entity */
1873
+ 422: {
1874
+ headers: {
1875
+ [name: string]: unknown;
1876
+ };
1877
+ content: {
1878
+ "application/json": {
1879
+ error: string;
1880
+ message?: string;
1881
+ };
1882
+ };
1883
+ };
1814
1884
  /** @description Internal Server Error */
1815
1885
  500: {
1816
1886
  headers: {
@@ -1879,9 +1949,8 @@ interface operations {
1879
1949
  };
1880
1950
  content: {
1881
1951
  "application/json": {
1882
- /** @default error */
1883
- status: string;
1884
- message: string;
1952
+ error: string;
1953
+ message?: string;
1885
1954
  };
1886
1955
  };
1887
1956
  };
@@ -1892,9 +1961,8 @@ interface operations {
1892
1961
  };
1893
1962
  content: {
1894
1963
  "application/json": {
1895
- /** @default error */
1896
- status: string;
1897
- message: string;
1964
+ error: string;
1965
+ message?: string;
1898
1966
  };
1899
1967
  };
1900
1968
  };
@@ -1905,9 +1973,8 @@ interface operations {
1905
1973
  };
1906
1974
  content: {
1907
1975
  "application/json": {
1908
- /** @default error */
1909
- status: string;
1910
- message: string;
1976
+ error: string;
1977
+ message?: string;
1911
1978
  };
1912
1979
  };
1913
1980
  };
@@ -1918,9 +1985,8 @@ interface operations {
1918
1985
  };
1919
1986
  content: {
1920
1987
  "application/json": {
1921
- /** @default error */
1922
- status: string;
1923
- message: string;
1988
+ error: string;
1989
+ message?: string;
1924
1990
  };
1925
1991
  };
1926
1992
  };
@@ -1931,9 +1997,8 @@ interface operations {
1931
1997
  };
1932
1998
  content: {
1933
1999
  "application/json": {
1934
- /** @default error */
1935
- status: string;
1936
- message: string;
2000
+ error: string;
2001
+ message?: string;
1937
2002
  };
1938
2003
  };
1939
2004
  };
@@ -2001,8 +2066,9 @@ interface operations {
2001
2066
  [key: string]: string[];
2002
2067
  };
2003
2068
  columnTypes: {
2069
+ id?: string;
2004
2070
  name: string;
2005
- type: "string" | "boolean" | "number" | "date" | "list" | "json" | "spans" | "rag_contexts" | "chat_messages" | "annotations" | "evaluations";
2071
+ type: "string" | "boolean" | "number" | "date" | "list" | "json" | "spans" | "rag_contexts" | "chat_messages" | "annotations" | "evaluations" | "image";
2006
2072
  }[];
2007
2073
  };
2008
2074
  };
@@ -2017,8 +2083,9 @@ interface operations {
2017
2083
  [key: string]: string[];
2018
2084
  };
2019
2085
  columnTypes: {
2086
+ id?: string;
2020
2087
  name: string;
2021
- type: "string" | "boolean" | "number" | "date" | "list" | "json" | "spans" | "rag_contexts" | "chat_messages" | "annotations" | "evaluations";
2088
+ type: "string" | "boolean" | "number" | "date" | "list" | "json" | "spans" | "rag_contexts" | "chat_messages" | "annotations" | "evaluations" | "image";
2022
2089
  }[];
2023
2090
  };
2024
2091
  };
@@ -2058,6 +2125,18 @@ interface operations {
2058
2125
  };
2059
2126
  };
2060
2127
  };
2128
+ /** @description Unprocessable Entity */
2129
+ 422: {
2130
+ headers: {
2131
+ [name: string]: unknown;
2132
+ };
2133
+ content: {
2134
+ "application/json": {
2135
+ error: string;
2136
+ message?: string;
2137
+ };
2138
+ };
2139
+ };
2061
2140
  /** @description Internal Server Error */
2062
2141
  500: {
2063
2142
  headers: {
@@ -2173,8 +2252,9 @@ interface operations {
2173
2252
  [key: string]: string[];
2174
2253
  };
2175
2254
  columnTypes: {
2255
+ id?: string;
2176
2256
  name: string;
2177
- type: "string" | "boolean" | "number" | "date" | "list" | "json" | "spans" | "rag_contexts" | "chat_messages" | "annotations" | "evaluations";
2257
+ type: "string" | "boolean" | "number" | "date" | "list" | "json" | "spans" | "rag_contexts" | "chat_messages" | "annotations" | "evaluations" | "image";
2178
2258
  }[];
2179
2259
  };
2180
2260
  };
@@ -2189,8 +2269,9 @@ interface operations {
2189
2269
  [key: string]: string[];
2190
2270
  };
2191
2271
  columnTypes: {
2272
+ id?: string;
2192
2273
  name: string;
2193
- type: "string" | "boolean" | "number" | "date" | "list" | "json" | "spans" | "rag_contexts" | "chat_messages" | "annotations" | "evaluations";
2274
+ type: "string" | "boolean" | "number" | "date" | "list" | "json" | "spans" | "rag_contexts" | "chat_messages" | "annotations" | "evaluations" | "image";
2194
2275
  }[];
2195
2276
  };
2196
2277
  };
@@ -2242,6 +2323,18 @@ interface operations {
2242
2323
  };
2243
2324
  };
2244
2325
  };
2326
+ /** @description Unprocessable Entity */
2327
+ 422: {
2328
+ headers: {
2329
+ [name: string]: unknown;
2330
+ };
2331
+ content: {
2332
+ "application/json": {
2333
+ error: string;
2334
+ message?: string;
2335
+ };
2336
+ };
2337
+ };
2245
2338
  /** @description Internal Server Error */
2246
2339
  500: {
2247
2340
  headers: {
@@ -2343,6 +2436,7 @@ interface operations {
2343
2436
  /** @constant */
2344
2437
  role: "tool";
2345
2438
  toolCallId: string;
2439
+ error?: string;
2346
2440
  }) | {
2347
2441
  role?: "system" | "user" | "assistant" | "function" | "tool" | "unknown";
2348
2442
  content?: string | ({
@@ -2433,6 +2527,18 @@ interface operations {
2433
2527
  };
2434
2528
  };
2435
2529
  };
2530
+ /** @description Unprocessable Entity */
2531
+ 422: {
2532
+ headers: {
2533
+ [name: string]: unknown;
2534
+ };
2535
+ content: {
2536
+ "application/json": {
2537
+ error: string;
2538
+ message?: string;
2539
+ };
2540
+ };
2541
+ };
2436
2542
  /** @description Internal Server Error */
2437
2543
  500: {
2438
2544
  headers: {
@@ -2492,6 +2598,18 @@ interface operations {
2492
2598
  };
2493
2599
  };
2494
2600
  };
2601
+ /** @description Unprocessable Entity */
2602
+ 422: {
2603
+ headers: {
2604
+ [name: string]: unknown;
2605
+ };
2606
+ content: {
2607
+ "application/json": {
2608
+ error: string;
2609
+ message?: string;
2610
+ };
2611
+ };
2612
+ };
2495
2613
  /** @description Internal Server Error */
2496
2614
  500: {
2497
2615
  headers: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "langwatch",
3
- "version": "0.7.1",
3
+ "version": "0.8.0",
4
4
  "description": "LangWatch TypeScript/JavaScript SDK. Interact with the full LangWatch API and use the LangWatch OpenTelemetry SDK to instrument your application. For more information, see https://docs.langwatch.ai/integration/typescript/guide",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -117,8 +117,9 @@
117
117
  "lint": "eslint .",
118
118
  "test": "vitest",
119
119
  "test:e2e": "vitest run -c ./vitest.e2e.config.mts",
120
- "prebuild": "pnpm i && pnpm run prepare",
120
+ "prebuild": "pnpm run prepare",
121
121
  "build": "tsc --noEmit && tsup",
122
+ "tarball": "pnpm build && pnpm pack",
122
123
  "typecheck": "tsc --noEmit",
123
124
  "prepublish": "pnpm run build",
124
125
  "generate:openapi-types": "npx openapi-typescript ../langwatch/src/app/api/openapiLangWatch.json -o ./src/internal/generated/openapi/api-client.ts",
@@ -1 +0,0 @@
1
- {"version":3,"sources":["/home/runner/work/langwatch/langwatch/typescript-sdk/dist/chunk-36XAYVMC.js","../src/cli/utils/promptConverter.ts","../src/cli/utils/fileManager.ts"],"names":["_a"],"mappings":"AAAA;AACE;AACF,sDAA4B;AAC5B;AACA;ACQO,IAAM,gBAAA,EAAN,MAAsB;AAAA;AAAA;AAAA;AAAA;AAAA,EAK3B,OAAO,qBAAA,CAAsB,MAAA,EAA4C;AACvE,IAAA,OAAO;AAAA,MACL,EAAA,EAAI,MAAA,CAAO,EAAA;AAAA,MACX,IAAA,EAAM,MAAA,CAAO,IAAA;AAAA,MACb,OAAA,EAAS,MAAA,CAAO,OAAA;AAAA,MAChB,SAAA,EAAW,MAAA,CAAO,SAAA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E9B,IAAA;AACe,MAAA;AACiB,MAAA;AAElC,MAAA;AAEW,QAAA;AAChC,UAAA;AACF,QAAA;AACkC,QAAA;AAC8B,MAAA;AACd,QAAA;AACpD,MAAA;AACF,IAAA;AACF,EAAA;AAEkB,EAAA;AACX,EAAA;AACT;AAxMK;AFkVyG;AACA;AACA;AACA;AACA","file":"/home/runner/work/langwatch/langwatch/typescript-sdk/dist/chunk-36XAYVMC.js","sourcesContent":[null,"import type { LocalPromptConfig, MaterializedPrompt } from \"../types\";\nimport { type PromptResponse } from \"@/client-sdk/services/prompts/types\";\n\n/**\n * Converter utility for transforming between YAML prompt format and API service format.\n *\n * The YAML format follows the GitHub .prompt.yaml file format standard,\n * while the API format is our internal prompt service schema tied to the database.\n *\n * This separation allows us to maintain and evolve both formats independently\n * while keeping the conversion logic centralized and well-tested.\n */\nexport class PromptConverter {\n /**\n * Converts a Prompt instance from the API service to the MaterializedPrompt format\n * used for saving to the .materialized directory.\n */\n static fromApiToMaterialized(prompt: PromptResponse): MaterializedPrompt {\n return {\n id: prompt.id,\n name: prompt.name,\n version: prompt.version,\n versionId: prompt.versionId,\n model: prompt.model,\n messages: prompt.messages,\n prompt: prompt.prompt,\n temperature: prompt.temperature,\n maxTokens: prompt.maxTokens,\n inputs: prompt.inputs,\n outputs: prompt.outputs,\n updatedAt: prompt.updatedAt,\n };\n }\n\n /**\n * Converts a MaterializedPrompt to the YAML content structure\n * for saving to .prompt.yaml files.\n */\n static fromMaterializedToYaml(prompt: MaterializedPrompt): {\n model: string;\n modelParameters?: {\n temperature?: number;\n maxTokens?: number;\n };\n messages: Array<{\n role: \"system\" | \"user\" | \"assistant\";\n content: string;\n }>;\n } {\n const result: any = {\n model: prompt.model,\n messages: prompt.messages,\n };\n\n // Add modelParameters if temperature or maxTokens exist\n if (prompt.temperature !== undefined || prompt.maxTokens !== undefined) {\n result.modelParameters = {};\n if (prompt.temperature !== undefined) {\n result.modelParameters.temperature = prompt.temperature;\n }\n if (prompt.maxTokens !== undefined) {\n result.modelParameters.maxTokens = prompt.maxTokens;\n }\n }\n\n return result;\n }\n\n /**\n * Converts a LocalPromptConfig (loaded from YAML) to the format\n * expected by the API service for upserting.\n */\n static fromLocalToApiFormat(config: LocalPromptConfig): {\n model: string;\n modelParameters?: {\n temperature?: number;\n max_tokens?: number;\n };\n messages: Array<{\n role: \"system\" | \"user\" | \"assistant\";\n content: string;\n }>;\n } {\n return {\n model: config.model,\n modelParameters: config.modelParameters,\n messages: config.messages,\n };\n }\n\n /**\n * Extracts the system prompt from messages array.\n * Used when converting to API format that separates system prompt from messages.\n */\n static extractSystemPrompt(\n messages: Array<{ role: string; content: string }>,\n ): string {\n return messages.find((m) => m.role === \"system\")?.content ?? \"\";\n }\n\n /**\n * Filters out system messages from the messages array.\n * Used when converting to API format that handles system prompt separately.\n */\n static filterNonSystemMessages(\n messages: Array<{\n role: \"system\" | \"user\" | \"assistant\";\n content: string;\n }>,\n ): Array<{ role: \"user\" | \"assistant\"; content: string }> {\n return messages.filter((m) => m.role !== \"system\") as Array<{\n role: \"user\" | \"assistant\";\n content: string;\n }>;\n }\n\n /**\n * Converts version specification strings to actual version constraints.\n * Handles npm-style version specs like \"latest\", \"5\", \"^5\", etc.\n */\n static parseVersionSpec(versionSpec: string): {\n type: \"latest\" | \"exact\" | \"tag\";\n value: string;\n } {\n if (versionSpec === \"latest\") {\n return { type: \"latest\", value: \"latest\" };\n }\n\n // For now, treat everything else as tags until we implement proper semver\n if (/^\\d+$/.test(versionSpec)) {\n return { type: \"exact\", value: versionSpec };\n }\n\n // Handle prefixes like ^, ~, etc. as tags for now\n return { type: \"tag\", value: versionSpec };\n }\n\n /**\n * Validates that a YAML config can be safely converted to API format.\n * Returns validation errors if any, or null if valid.\n */\n static validateForApiConversion(config: LocalPromptConfig): string[] {\n const errors: string[] = [];\n\n if (!config.model?.trim()) {\n errors.push(\"Model is required and cannot be empty\");\n }\n\n if (!config.messages || config.messages.length === 0) {\n errors.push(\"At least one message is required\");\n }\n\n if (config.messages) {\n config.messages.forEach((message, index) => {\n if (![\"system\", \"user\", \"assistant\"].includes(message.role)) {\n errors.push(\n `Message ${index}: role must be 'system', 'user', or 'assistant'`,\n );\n }\n if (!message.content?.trim()) {\n errors.push(`Message ${index}: content cannot be empty`);\n }\n });\n }\n\n return errors;\n }\n}\n","import * as fs from \"fs\";\nimport * as path from \"path\";\nimport * as yaml from \"js-yaml\";\nimport chalk from \"chalk\";\nimport type { PromptsConfig, LocalPromptConfig, MaterializedPrompt, PromptsLock } from \"../types\";\nimport { localPromptConfigSchema } from \"../types\";\nimport { PromptConverter } from \"@/cli/utils/promptConverter\";\n\nexport class FileManager {\n private static readonly PROMPTS_CONFIG_FILE = \"prompts.json\";\n private static readonly PROMPTS_LOCK_FILE = \"prompts-lock.json\";\n private static readonly PROMPTS_DIR = \"prompts\";\n private static readonly MATERIALIZED_DIR = \".materialized\";\n\n static getPromptsConfigPath(): string {\n return path.join(process.cwd(), this.PROMPTS_CONFIG_FILE);\n }\n\n static getPromptsLockPath(): string {\n return path.join(process.cwd(), this.PROMPTS_LOCK_FILE);\n }\n\n static getPromptsDir(): string {\n return path.join(process.cwd(), this.PROMPTS_DIR);\n }\n\n static getMaterializedDir(): string {\n return path.join(this.getPromptsDir(), this.MATERIALIZED_DIR);\n }\n\n static ensureDirectories(): void {\n const promptsDir = this.getPromptsDir();\n const materializedDir = this.getMaterializedDir();\n\n if (!fs.existsSync(promptsDir)) {\n fs.mkdirSync(promptsDir, { recursive: true });\n }\n\n if (!fs.existsSync(materializedDir)) {\n fs.mkdirSync(materializedDir, { recursive: true });\n }\n }\n\n static loadPromptsConfig(): PromptsConfig {\n const configPath = this.getPromptsConfigPath();\n\n if (!fs.existsSync(configPath)) {\n return { prompts: {} };\n }\n\n try {\n const content = fs.readFileSync(configPath, \"utf-8\");\n return JSON.parse(content) as PromptsConfig;\n } catch (error) {\n throw new Error(`Failed to parse prompts.json: ${error instanceof Error ? error.message : \"Unknown error\"}`);\n }\n }\n\n static savePromptsConfig(config: PromptsConfig): void {\n const configPath = this.getPromptsConfigPath();\n fs.writeFileSync(configPath, JSON.stringify(config, null, 2) + \"\\n\");\n }\n\n static initializePromptsConfig(): { created: boolean; path: string } {\n const configPath = this.getPromptsConfigPath();\n const existed = fs.existsSync(configPath);\n\n if (!existed) {\n const emptyConfig: PromptsConfig = { prompts: {} };\n this.savePromptsConfig(emptyConfig);\n return { created: true, path: configPath };\n }\n\n return { created: false, path: configPath };\n }\n\n static loadPromptsLock = (): PromptsLock => {\n const lockPath = this.getPromptsLockPath();\n\n if (!fs.existsSync(lockPath)) {\n return {\n lockfileVersion: 1,\n prompts: {}\n };\n }\n\n try {\n const content = fs.readFileSync(lockPath, \"utf-8\");\n return JSON.parse(content) as PromptsLock;\n } catch (error) {\n throw new Error(`Failed to parse prompts-lock.json: ${error instanceof Error ? error.message : \"Unknown error\"}`);\n }\n }\n\n static savePromptsLock(lock: PromptsLock): void {\n const lockPath = this.getPromptsLockPath();\n fs.writeFileSync(lockPath, JSON.stringify(lock, null, 2) + \"\\n\");\n }\n\n static initializePromptsLock(): { created: boolean; path: string } {\n const lockPath = this.getPromptsLockPath();\n const existed = fs.existsSync(lockPath);\n\n if (!existed) {\n const emptyLock: PromptsLock = {\n lockfileVersion: 1,\n prompts: {}\n };\n this.savePromptsLock(emptyLock);\n return { created: true, path: lockPath };\n }\n\n return { created: false, path: lockPath };\n }\n\n static loadLocalPrompt = (filePath: string): LocalPromptConfig => {\n const fullPath = path.resolve(filePath);\n\n if (!fs.existsSync(fullPath)) {\n throw new Error(`Local prompt file not found: ${filePath}`);\n }\n\n try {\n const content = fs.readFileSync(fullPath, \"utf-8\");\n const rawData = yaml.load(content);\n\n // Validate with zod and provide nice error messages\n const result = localPromptConfigSchema.safeParse(rawData);\n\n if (!result.success) {\n // Format zod errors nicely (manually since z.prettifyError might not be available)\n const prettyError = result.error.issues\n .map(issue => `✖ ${issue.message}${issue.path.length > 0 ? `\\n → at ${issue.path.join('.')}` : ''}`)\n .join('\\n');\n\n throw new Error(\n `Invalid prompt configuration in ${chalk.yellow(filePath)}:\\n${prettyError}`\n );\n }\n\n return result.data;\n } catch (error) {\n if (error instanceof Error && error.message.includes(\"Invalid prompt configuration\")) {\n throw error; // Re-throw zod validation errors as-is\n }\n throw new Error(`Failed to parse local prompt file ${filePath}: ${error instanceof Error ? error.message : \"Unknown error\"}`);\n }\n }\n\n static saveMaterializedPrompt(name: string, prompt: MaterializedPrompt): string {\n const materializedDir = this.getMaterializedDir();\n const parts = name.split(\"/\");\n const fileName = `${parts[parts.length - 1]}.prompt.yaml`;\n\n // Create nested directories if needed\n if (parts.length > 1) {\n const subDir = path.join(materializedDir, ...parts.slice(0, -1));\n if (!fs.existsSync(subDir)) {\n fs.mkdirSync(subDir, { recursive: true });\n }\n }\n\n const filePath = path.join(materializedDir, ...parts.slice(0, -1), fileName);\n\n // Convert to YAML format using the converter\n const yamlContent = PromptConverter.fromMaterializedToYaml(prompt);\n\n const yamlString = yaml.dump(yamlContent, {\n lineWidth: -1,\n noRefs: true,\n sortKeys: false\n });\n\n fs.writeFileSync(filePath, yamlString);\n return filePath;\n }\n\n static getLocalPromptFiles = (): string[] => {\n const promptsDir = this.getPromptsDir();\n const materializedDir = this.getMaterializedDir();\n\n if (!fs.existsSync(promptsDir)) {\n return [];\n }\n\n const files: string[] = [];\n\n const walkDir = (dir: string, relativePath = \"\"): void => {\n const entries = fs.readdirSync(dir, { withFileTypes: true });\n\n for (const entry of entries) {\n const fullPath = path.join(dir, entry.name);\n const relativeFilePath = path.join(relativePath, entry.name);\n\n if (entry.isDirectory()) {\n // Skip the .materialized directory\n if (fullPath === materializedDir) {\n continue;\n }\n walkDir(fullPath, relativeFilePath);\n } else if (entry.isFile() && entry.name.endsWith(\".prompt.yaml\")) {\n files.push(path.join(promptsDir, relativeFilePath));\n }\n }\n };\n\n walkDir(promptsDir);\n return files;\n }\n\n static promptNameFromPath(filePath: string): string {\n const promptsDir = this.getPromptsDir();\n const relativePath = path.relative(promptsDir, filePath);\n return relativePath.replace(/\\.prompt\\.yaml$/, \"\");\n }\n\n static cleanupOrphanedMaterializedFiles(currentDependencies: Set<string>): string[] {\n const materializedDir = this.getMaterializedDir();\n\n if (!fs.existsSync(materializedDir)) {\n return [];\n }\n\n const cleaned: string[] = [];\n\n const cleanupDir = (dir: string, relativePath = \"\"): void => {\n const entries = fs.readdirSync(dir, { withFileTypes: true });\n\n for (const entry of entries) {\n const fullPath = path.join(dir, entry.name);\n const relativeFilePath = path.join(relativePath, entry.name);\n\n if (entry.isDirectory()) {\n cleanupDir(fullPath, relativeFilePath);\n\n // Remove empty directories\n try {\n const dirEntries = fs.readdirSync(fullPath);\n if (dirEntries.length === 0) {\n fs.rmdirSync(fullPath);\n }\n } catch {\n // Directory not empty or other error, ignore\n }\n } else if (entry.isFile() && entry.name.endsWith(\".prompt.yaml\")) {\n // Extract prompt name from materialized file path\n const promptName = relativeFilePath.replace(/\\.prompt\\.yaml$/, \"\");\n\n if (!currentDependencies.has(promptName)) {\n fs.unlinkSync(fullPath);\n cleaned.push(promptName);\n }\n }\n }\n };\n\n cleanupDir(materializedDir);\n return cleaned;\n }\n\n static updateLockEntry(lock: PromptsLock, name: string, prompt: MaterializedPrompt, materializedPath: string): void {\n const relativePath = path.relative(process.cwd(), materializedPath);\n\n lock.prompts[name] = {\n version: prompt.version,\n versionId: prompt.versionId,\n materialized: relativePath,\n };\n }\n\n static removeFromLock(lock: PromptsLock, names: string[]): void {\n for (const name of names) {\n delete lock.prompts[name];\n }\n }\n\n static addToGitignore(entry: string): { added: boolean; existed: boolean } {\n const gitignorePath = path.join(process.cwd(), \".gitignore\");\n\n // Check if .gitignore exists\n if (!fs.existsSync(gitignorePath)) {\n // Create new .gitignore with the entry\n fs.writeFileSync(gitignorePath, `${entry}\\n`);\n return { added: true, existed: false };\n }\n\n // Read existing .gitignore\n const content = fs.readFileSync(gitignorePath, \"utf-8\");\n const lines = content.split(\"\\n\").map(line => line.trim());\n\n // Check if entry already exists\n if (lines.includes(entry)) {\n return { added: false, existed: true };\n }\n\n // Add entry to .gitignore\n const newContent = content.endsWith(\"\\n\") ? `${content}${entry}\\n` : `${content}\\n${entry}\\n`;\n fs.writeFileSync(gitignorePath, newContent);\n\n return { added: true, existed: false };\n }\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["/home/runner/work/langwatch/langwatch/typescript-sdk/dist/chunk-5HAVK64Q.js","../package.json","../src/internal/runtime.ts","../src/internal/constants.ts"],"names":[],"mappings":"AAAA;ACEI,IAAA,QAAA,EAAW,OAAA;ADAf;AACA;AEDA,IAAI,QAAA;AAMG,IAAM,WAAA,EAAa,CAAA,EAAA,GAAiB;AACzC,EAAA,SAAA,GAAA,KAAA,EAAA,SAAA,EAAA,SAAA,EAAa,aAAA,CAAc,CAAA;AAC3B,EAAA,OAAO,QAAA;AACT,CAAA;AAcO,SAAS,aAAA,CAAc,OAAA,EAA0B;AAzBxD,EAAA,IAAA,EAAA;AA0BE,EAAA,IAAI,EAAA,EAAI,UAAA;AACR,EAAA,GAAA,CAAI,OAAA,EAAS;AACX,IAAA,GAAA,CAAI,OAAA,CAAQ,GAAA,CAAI,SAAA,IAAa,MAAA,EAAQ;AACnC,MAAA,EAAA,EAAI,OAAA;AAAA,IACN,EAAA,KAAO;AACL,MAAA,OAAA,CAAQ,IAAA,CAAK,oGAAoG,CAAA;AAAA,IACnH;AAAA,EACF;AAEA,EAAA,IAAI;AACF,IAAA,GAAA,CACE,OAAA,GAAU,EAAA,GACV,OAAO,CAAA,CAAE,KAAA,IAAS,SAAA,GAClB,CAAA,CAAE,KAAA,GACF,UAAA,GAAa,CAAA,CAAE,KAAA,GACf,OAAO,CAAA,CAAE,IAAA,CAAK,QAAA,IAAY,QAAA,EAC1B;AACA,MAAA,OAAO,MAAA;AAAA,IACT;AACA,IAAA,GAAA,CACE,MAAA,GAAS,EAAA,GACT,OAAO,CAAA,CAAE,IAAA,IAAQ,SAAA,GACjB,CAAA,CAAE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js","sourcesContent":[null,"{\n \"name\": \"langwatch\",\n \"version\": \"0.7.1\",\n \"description\": \"LangWatch TypeScript/JavaScript SDK. Interact with the full LangWatch API and use the LangWatch OpenTelemetry SDK to instrument your application. For more information, see https://docs.langwatch.ai/integration/typescript/guide\",\n \"main\": \"dist/index.js\",\n \"module\": \"dist/index.mjs\",\n \"types\": \"dist/index.d.ts\",\n \"author\": \"LangWatch\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=20\",\n \"pnpm\": \">=8\"\n },\n \"files\": [\n \"dist\",\n \"README.md\",\n \"LICENSE\"\n ],\n \"bin\": {\n \"langwatch\": \"./dist/cli/index.js\"\n },\n \"exports\": {\n \".\": {\n \"types\": \"./dist/index.d.ts\",\n \"import\": \"./dist/index.mjs\",\n \"require\": \"./dist/index.js\"\n },\n \"./observability\": {\n \"types\": \"./dist/observability-sdk/index.d.ts\",\n \"require\": \"./dist/observability-sdk/index.js\",\n \"import\": \"./dist/observability-sdk/index.mjs\"\n },\n \"./observability/node\": {\n \"types\": \"./dist/observability-sdk/setup/node/index.d.ts\",\n \"require\": \"./dist/observability-sdk/setup/node/index.js\",\n \"import\": \"./dist/observability-sdk/setup/node/index.mjs\"\n },\n \"./observability/instrumentation/langchain\": {\n \"types\": \"./dist/observability-sdk/instrumentation/langchain/index.d.ts\",\n \"require\": \"./dist/observability-sdk/instrumentation/langchain/index.js\",\n \"import\": \"./dist/observability-sdk/instrumentation/langchain/index.mjs\"\n }\n },\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/langwatch/langwatch.git\",\n \"directory\": \"typescript-sdk\"\n },\n \"scripts\": {\n \"prepare\": \"pnpm run generate:server-types && pnpm run generate:openapi-types\",\n \"cli\": \"node dist/cli/index.js\",\n \"lint\": \"eslint .\",\n \"test\": \"vitest\",\n \"test:e2e\": \"vitest run -c ./vitest.e2e.config.mts\",\n \"prebuild\": \"pnpm i && pnpm run prepare\",\n \"build\": \"tsc --noEmit && tsup\",\n \"typecheck\": \"tsc --noEmit\",\n \"prepublish\": \"pnpm run build\",\n \"generate:openapi-types\": \"npx openapi-typescript ../langwatch/src/app/api/openapiLangWatch.json -o ./src/internal/generated/openapi/api-client.ts\",\n \"generate:server-types\": \"./copy-types.sh\"\n },\n \"devDependencies\": {\n \"@eslint/js\": \"^9.32.0\",\n \"@langchain/core\": \">=0.3.68 <0.4.0\",\n \"@langchain/langgraph\": \">=0.4.0 <1.0.0\",\n \"@langchain/openai\": \">=0.6.0 <1.0.0\",\n \"@opentelemetry/sdk-node\": \"0.205.0\",\n \"@opentelemetry/sdk-trace-node\": \"^2.0.1\",\n \"@opentelemetry/sdk-trace-web\": \">=2.0.1\",\n \"@types/debug\": \"^4.1.12\",\n \"@types/js-yaml\": \"^4.0.9\",\n \"@types/node\": \"^24.1.0\",\n \"@typescript/native-preview\": \"7.0.0-dev.20250804.1\",\n \"@vercel/otel\": \"^1.13.0\",\n \"@vitest/coverage-v8\": \"3.2.4\",\n \"esbuild\": \"^0.25.8\",\n \"eslint\": \"^9.32.0\",\n \"fets\": \"^0.8.5\",\n \"fishery\": \"^2.3.1\",\n \"langchain\": \">=0.3.0 <1.0.0\",\n \"msw\": \"^2.10.4\",\n \"nock\": \"^14.0.8\",\n \"openapi-msw\": \"^1.2.0\",\n \"ts-to-zod\": \"4.0.1\",\n \"tsup\": \"^8.5.0\",\n \"typescript\": \"^5.9.2\",\n \"typescript-eslint\": \"^8.38.0\",\n \"vitest\": \"^3.2.4\",\n \"vitest-mock-extended\": \"^3.1.0\",\n \"yaml\": \"^2.8.1\"\n },\n \"dependencies\": {\n \"@opentelemetry/api\": \"^1.9.0\",\n \"@opentelemetry/api-logs\": \"0.205.0\",\n \"@opentelemetry/core\": \"^2.0.1\",\n \"@opentelemetry/exporter-logs-otlp-http\": \"0.205.0\",\n \"@opentelemetry/exporter-trace-otlp-http\": \"0.205.0\",\n \"@opentelemetry/instrumentation\": \"0.205.0\",\n \"@opentelemetry/resources\": \"^2.0.1\",\n \"@opentelemetry/sdk-logs\": \"0.205.0\",\n \"@opentelemetry/sdk-metrics\": \"^2.0.1\",\n \"@opentelemetry/sdk-trace-base\": \"^2.0.1\",\n \"@opentelemetry/semantic-conventions\": \"^1.36.0\",\n \"@types/prompts\": \"^2.4.9\",\n \"chalk\": \"^4.1.2\",\n \"commander\": \"^12.0.0\",\n \"dotenv\": \"^16.6.1\",\n \"js-yaml\": \"^4.1.0\",\n \"liquidjs\": \"^10.21.1\",\n \"open\": \"^10.2.0\",\n \"openapi-fetch\": \"^0.14.0\",\n \"ora\": \"^5.4.1\",\n \"prompts\": \"^2.4.2\",\n \"xksuid\": \"^0.0.4\",\n \"zod\": \"^4.0.14\"\n },\n \"peerDependencies\": {\n \"@ai-sdk/openai\": \">=2.0.0 <3.0.0\",\n \"@langchain/core\": \">=0.3.0 <1.0.0\",\n \"@langchain/langgraph\": \">=0.4.0 <1.0.0\",\n \"@langchain/openai\": \">=0.6.0 <1.0.0\",\n \"@opentelemetry/context-async-hooks\": \"^2.1.0\",\n \"@opentelemetry/context-zone\": \">=1.19.0 <3.0.0\",\n \"@opentelemetry/sdk-node\": \">=0.200.0 <1.0.0\",\n \"@opentelemetry/sdk-trace-web\": \">=1.19.0 <3.0.0\",\n \"langchain\": \">=0.3.0 <1.0.0\"\n },\n \"pnpm\": {\n \"overrides\": {\n \"@opentelemetry/api\": \"^1.9.0\",\n \"@opentelemetry/core\": \"^2.0.1\",\n \"@opentelemetry/resources\": \"^2.0.1\",\n \"@opentelemetry/sdk-trace-base\": \"^2.0.1\",\n \"@opentelemetry/instrumentation\": \"0.205.0\",\n \"@opentelemetry/sdk-node\": \"0.205.0\",\n \"@opentelemetry/context-async-hooks\": \"^2.1.0\",\n \"@opentelemetry/api-logs\": \"0.205.0\",\n \"@opentelemetry/sdk-logs\": \"0.205.0\",\n \"@opentelemetry/exporter-logs-otlp-http\": \"0.205.0\",\n \"@opentelemetry/exporter-trace-otlp-http\": \"0.205.0\",\n \"zod\": \"^4.0.14\"\n }\n }\n}\n","export type JsRuntime = \"node\" | \"deno\" | \"bun\" | \"web\" | \"unknown\";\n\nlet _runtime: JsRuntime | undefined;\n\n/**\n * Gets the cached JavaScript runtime environment.\n * @returns The detected runtime environment\n */\nexport const getRuntime = (): JsRuntime => {\n _runtime ??= detectRuntime();\n return _runtime;\n};\n\n/**\n * Resets the cached runtime. Only used for testing.\n * @internal\n */\nexport const resetRuntimeCache = (): void => {\n _runtime = undefined;\n};\n\n/**\n * Detects the JavaScript runtime environment.\n * @param globals - (Test only) Optionally override the global object for environment simulation. Only used if NODE_ENV === 'test'.\n */\nexport function detectRuntime(globals?: any): JsRuntime {\n let g = globalThis;\n if (globals) {\n if (process.env.NODE_ENV === \"test\") {\n g = globals;\n } else {\n console.warn(\"[LangWatch Observability] overriding detectRuntime is only supported when running in NODE_ENV=test\");\n }\n }\n\n try {\n if (\n \"Deno\" in g &&\n typeof g.Deno === \"object\" &&\n g.Deno &&\n 'version' in g.Deno &&\n typeof g.Deno.version === \"object\"\n ) {\n return \"deno\";\n }\n if (\n \"Bun\" in g &&\n typeof g.Bun === \"object\" &&\n g.Bun &&\n 'version' in g.Bun &&\n typeof g.Bun.version === \"string\"\n ) {\n return \"bun\";\n }\n if (\n \"process\" in g &&\n typeof g.process === \"object\" &&\n g.process &&\n typeof g.process.versions === \"object\" &&\n typeof g.process.versions.node === \"string\"\n ) {\n return \"node\";\n }\n if (\n typeof g.window?.document !== \"undefined\" &&\n g === g.window\n ) {\n return \"web\";\n }\n return \"unknown\";\n } catch (error) {\n console.warn(\"[LangWatch Observability] Failed to detect runtime\", error);\n return \"unknown\";\n }\n}\n","import { version } from \"../../package.json\";\nimport { getRuntime } from \"./runtime\";\n\nexport const LANGWATCH_SDK_RUNTIME = getRuntime;\n\nexport const LANGWATCH_SDK_NAME_OBSERVABILITY = \"langwatch-observability-sdk\";\nexport const LANGWATCH_SDK_NAME_CLIENT = \"langwatch-client-sdk\";\nexport const LANGWATCH_SDK_LANGUAGE = \"typescript\";\nexport const LANGWATCH_SDK_VERSION = version;\n\nexport const DEFAULT_ENDPOINT = \"https://app.langwatch.ai/\";\nexport const DEFAULT_SERVICE_NAME = \"unknown-service.langwatch\";\n\nexport const TRACES_PATH = \"/api/otel/v1/traces\";\nexport const LOGS_PATH = \"/api/otel/v1/logs\";\nexport const METRICS_PATH = \"/api/otel/v1/metrics\";\n"]}