langsmith 0.5.22 → 0.5.23

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.
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.estimateSerializedSize = estimateSerializedSize;
3
4
  exports.serialize = serialize;
4
5
  /* eslint-disable */
5
6
  // @ts-nocheck
@@ -60,6 +61,233 @@ function createDefaultReplacer(userReplacer) {
60
61
  return serializeWellKnownTypes(val);
61
62
  };
62
63
  }
64
+ /**
65
+ * Estimate the serialized JSON byte size of a value without actually
66
+ * serializing it. Used on hot paths (enqueuing runs for batched tracing)
67
+ * where the exact serialized size is not required -- only a reasonable
68
+ * approximation for soft memory accounting.
69
+ *
70
+ * Walks the object graph in O(n) without allocating a JSON string,
71
+ * avoiding the event-loop blocking that JSON.stringify causes on large
72
+ * payloads.
73
+ *
74
+ * Accuracy notes (all estimates are approximate, never exact):
75
+ * - Strings: UTF-8 byte length via Buffer.byteLength when available,
76
+ * falling back to code-unit length for non-Node environments. Does
77
+ * not account for escape expansion (\", \\, control chars, surrogate
78
+ * escapes) which is usually a small fraction of total size.
79
+ * - Binary data (Buffer / typed arrays / ArrayBuffer / DataView): sized
80
+ * from their JSON.stringify representations where practical
81
+ * ({ type: "Buffer", data: [...] } for Buffer, keyed objects for typed
82
+ * arrays). DataView and ArrayBuffer themselves have no enumerable own
83
+ * properties and serialize as "{}". Each byte contributes ~3.5
84
+ * characters on average in Buffer's decimal-array representation
85
+ * (digit(s) + comma).
86
+ * - Other objects with toJSON(): we invoke toJSON() once and estimate
87
+ * the result. This matches JSON.stringify semantics for libraries
88
+ * like Decimal.js, Moment, Luxon, Mongoose documents, etc.
89
+ * - Cycles: detected via an ancestor-path set that is pushed/popped
90
+ * during recursion. This matches JSON.stringify semantics --
91
+ * repeated references that are *not* on the current ancestor chain
92
+ * (shared subobjects) are counted every time they appear, because
93
+ * JSON.stringify will serialize them every time.
94
+ * - No depth limit (JSON.stringify has none either).
95
+ */
96
+ function estimateSerializedSize(value) {
97
+ try {
98
+ // Ancestor set for cycle detection. An object is only treated as
99
+ // circular if it appears on the current recursion path, not merely
100
+ // if it has been seen before elsewhere in the graph.
101
+ const ancestors = new Set();
102
+ // In Node / Bun, Buffer.byteLength is a fast native way to get UTF-8
103
+ // byte length without allocating an encoded copy. In other runtimes
104
+ // we fall back to code-unit length (a small under-estimate for
105
+ // non-ASCII text, which is acceptable for soft limits).
106
+ const byteLen = typeof Buffer !== "undefined" && typeof Buffer.byteLength === "function"
107
+ ? (s) => Buffer.byteLength(s, "utf8")
108
+ : (s) => s.length;
109
+ function estimateString(s) {
110
+ // +2 for the surrounding quotes. Escape expansion is not counted.
111
+ return byteLen(s) + 2;
112
+ }
113
+ // Size of a byte sequence when rendered as a JSON array of decimal
114
+ // numbers: "[b0,b1,b2,...]". Each byte averages ~3.5 chars (value 0-9
115
+ // => 1 char, 10-99 => 2 chars, 100-255 => 3 chars; weighted mean over
116
+ // a uniform distribution is ~2.81, plus one comma per element except
117
+ // the last). Round up to 4 bytes/element for a small safety margin.
118
+ function estimateByteArrayJson(byteLength) {
119
+ if (byteLength === 0)
120
+ return 2; // "[]"
121
+ return 2 + byteLength * 4;
122
+ }
123
+ // Returns true for values that JSON.stringify drops when they appear
124
+ // as an object property (as opposed to an array element, where they
125
+ // become "null").
126
+ function isDropped(v) {
127
+ return (v === undefined || typeof v === "function" || typeof v === "symbol");
128
+ }
129
+ // In arrays, undefined / function / symbol become "null" (4 bytes).
130
+ function estimateInArray(v) {
131
+ if (v === undefined || typeof v === "function" || typeof v === "symbol") {
132
+ return 4;
133
+ }
134
+ return estimate(v);
135
+ }
136
+ function estimate(val) {
137
+ if (val === null)
138
+ return 4; // "null"
139
+ if (val === undefined)
140
+ return 0; // top-level or property context; array handled separately
141
+ const t = typeof val;
142
+ if (t === "boolean")
143
+ return 5; // "true" / "false" upper bound
144
+ if (t === "number") {
145
+ if (!Number.isFinite(val))
146
+ return 4; // "null"
147
+ // Convert to string to get exact length. This is cheap for numbers
148
+ // (V8 caches small-number strings) and makes the estimate far
149
+ // tighter for common cases like integer arrays.
150
+ return val.toString().length;
151
+ }
152
+ if (t === "bigint") {
153
+ // Our replacer renders BigInt via .toString(), then JSON.stringify
154
+ // quotes it.
155
+ return val.toString().length + 2;
156
+ }
157
+ if (t === "string")
158
+ return estimateString(val);
159
+ if (t === "function" || t === "symbol")
160
+ return 0;
161
+ // Objects from here on.
162
+ const obj = val;
163
+ // Well-known types handled by our replacer.
164
+ if (obj instanceof Date)
165
+ return 26; // "2024-01-01T00:00:00.000Z"
166
+ if (obj instanceof RegExp)
167
+ return byteLen(obj.toString()) + 2;
168
+ if (obj instanceof Error) {
169
+ const name = obj.name ?? "";
170
+ const message = obj.message ?? "";
171
+ // {"name":"...","message":"..."}
172
+ return 22 + byteLen(name) + byteLen(message);
173
+ }
174
+ // Binary data types. These commonly appear in LLM payloads (images,
175
+ // audio) and their JSON representations vary widely.
176
+ if (typeof Buffer !== "undefined" && obj instanceof Buffer) {
177
+ // { "type": "Buffer", "data": [0, 1, 2, ...] }
178
+ return 28 + estimateByteArrayJson(obj.byteLength);
179
+ }
180
+ if (ArrayBuffer.isView(obj)) {
181
+ if (obj instanceof DataView) {
182
+ // DataView has no enumerable own properties; serializes as "{}".
183
+ return 2;
184
+ }
185
+ // Typed arrays serialize as {"0":v0,"1":v1,...} (keyed objects),
186
+ // which is much larger than a plain array would be. Per element
187
+ // cost: digits for index + digits for value + ":" + "," + quotes.
188
+ const len = obj.length ?? 0;
189
+ const isFloat = obj instanceof Float32Array || obj instanceof Float64Array;
190
+ // Index digits grow with len; worst-case per element:
191
+ // "NNN":V, where NNN = log10(len) digits and V depends on type.
192
+ // Loose but safe bounds: integer views ~12 chars/element, float
193
+ // views ~30 chars/element (Float32 ToString can be up to ~17 chars).
194
+ const perElement = isFloat ? 30 : 12;
195
+ return 2 + len * perElement;
196
+ }
197
+ if (obj instanceof ArrayBuffer) {
198
+ // Plain ArrayBuffer has no enumerable properties; serializes as "{}".
199
+ return 2;
200
+ }
201
+ if (ancestors.has(obj)) {
202
+ // Cycle: our decirc fallback replaces with { result: "[Circular]" }.
203
+ return 24;
204
+ }
205
+ // Custom toJSON (Decimal.js, Moment, Luxon, Mongoose docs, etc.).
206
+ // This runs after explicit built-in / binary cases above so known
207
+ // types (for example Buffer) use their dedicated fast-path sizing
208
+ // logic instead of duck-typing through toJSON().
209
+ if (typeof obj.toJSON === "function") {
210
+ let projected;
211
+ try {
212
+ projected = obj.toJSON("");
213
+ }
214
+ catch {
215
+ // If toJSON throws, JSON.stringify would also throw and our
216
+ // serializer would emit "[Unserializable]" (~16 bytes).
217
+ return 16;
218
+ }
219
+ ancestors.add(obj);
220
+ const size = estimate(projected);
221
+ ancestors.delete(obj);
222
+ return size;
223
+ }
224
+ ancestors.add(obj);
225
+ let size;
226
+ if (Array.isArray(obj)) {
227
+ size = 2; // []
228
+ const len = obj.length;
229
+ for (let i = 0; i < len; i++) {
230
+ size += estimateInArray(obj[i]);
231
+ if (i < len - 1)
232
+ size += 1; // comma
233
+ }
234
+ }
235
+ else if (obj instanceof Map) {
236
+ // Rendered as { k: v, ... } via Object.fromEntries.
237
+ size = 2;
238
+ let emitted = 0;
239
+ for (const [k, v] of obj) {
240
+ if (isDropped(v))
241
+ continue;
242
+ if (emitted > 0)
243
+ size += 1; // comma
244
+ const keyStr = typeof k === "string" ? k : String(k);
245
+ size += byteLen(keyStr) + 3; // "key":
246
+ size += estimate(v);
247
+ emitted++;
248
+ }
249
+ }
250
+ else if (obj instanceof Set) {
251
+ // Rendered as [v, ...] via Array.from.
252
+ size = 2;
253
+ let emitted = 0;
254
+ for (const v of obj) {
255
+ if (emitted > 0)
256
+ size += 1; // comma
257
+ size += estimateInArray(v);
258
+ emitted++;
259
+ }
260
+ }
261
+ else {
262
+ size = 2; // {}
263
+ let emitted = 0;
264
+ // Object.keys only returns own enumerable string keys, matching
265
+ // JSON.stringify.
266
+ const keys = Object.keys(obj);
267
+ for (let i = 0; i < keys.length; i++) {
268
+ const key = keys[i];
269
+ const v = obj[key];
270
+ if (isDropped(v))
271
+ continue;
272
+ if (emitted > 0)
273
+ size += 1; // comma
274
+ size += byteLen(key) + 3; // "key":
275
+ size += estimate(v);
276
+ emitted++;
277
+ }
278
+ }
279
+ ancestors.delete(obj);
280
+ return size;
281
+ }
282
+ return estimate(value);
283
+ }
284
+ catch {
285
+ // If the estimator itself hits an unexpected edge case, fall back to the
286
+ // exact serialized size. This preserves correctness of queue-size
287
+ // accounting at the cost of a slower hot path for that one payload.
288
+ return serialize(value).length;
289
+ }
290
+ }
63
291
  // Regular stringify
64
292
  function serialize(obj, errorContext, replacer, spacer, options) {
65
293
  try {
@@ -1 +1,34 @@
1
+ /**
2
+ * Estimate the serialized JSON byte size of a value without actually
3
+ * serializing it. Used on hot paths (enqueuing runs for batched tracing)
4
+ * where the exact serialized size is not required -- only a reasonable
5
+ * approximation for soft memory accounting.
6
+ *
7
+ * Walks the object graph in O(n) without allocating a JSON string,
8
+ * avoiding the event-loop blocking that JSON.stringify causes on large
9
+ * payloads.
10
+ *
11
+ * Accuracy notes (all estimates are approximate, never exact):
12
+ * - Strings: UTF-8 byte length via Buffer.byteLength when available,
13
+ * falling back to code-unit length for non-Node environments. Does
14
+ * not account for escape expansion (\", \\, control chars, surrogate
15
+ * escapes) which is usually a small fraction of total size.
16
+ * - Binary data (Buffer / typed arrays / ArrayBuffer / DataView): sized
17
+ * from their JSON.stringify representations where practical
18
+ * ({ type: "Buffer", data: [...] } for Buffer, keyed objects for typed
19
+ * arrays). DataView and ArrayBuffer themselves have no enumerable own
20
+ * properties and serialize as "{}". Each byte contributes ~3.5
21
+ * characters on average in Buffer's decimal-array representation
22
+ * (digit(s) + comma).
23
+ * - Other objects with toJSON(): we invoke toJSON() once and estimate
24
+ * the result. This matches JSON.stringify semantics for libraries
25
+ * like Decimal.js, Moment, Luxon, Mongoose documents, etc.
26
+ * - Cycles: detected via an ancestor-path set that is pushed/popped
27
+ * during recursion. This matches JSON.stringify semantics --
28
+ * repeated references that are *not* on the current ancestor chain
29
+ * (shared subobjects) are counted every time they appear, because
30
+ * JSON.stringify will serialize them every time.
31
+ * - No depth limit (JSON.stringify has none either).
32
+ */
33
+ export declare function estimateSerializedSize(value: unknown): number;
1
34
  export declare function serialize(obj: any, errorContext?: any, replacer?: any, spacer?: any, options?: any): Uint8Array<ArrayBuffer>;
@@ -57,6 +57,233 @@ function createDefaultReplacer(userReplacer) {
57
57
  return serializeWellKnownTypes(val);
58
58
  };
59
59
  }
60
+ /**
61
+ * Estimate the serialized JSON byte size of a value without actually
62
+ * serializing it. Used on hot paths (enqueuing runs for batched tracing)
63
+ * where the exact serialized size is not required -- only a reasonable
64
+ * approximation for soft memory accounting.
65
+ *
66
+ * Walks the object graph in O(n) without allocating a JSON string,
67
+ * avoiding the event-loop blocking that JSON.stringify causes on large
68
+ * payloads.
69
+ *
70
+ * Accuracy notes (all estimates are approximate, never exact):
71
+ * - Strings: UTF-8 byte length via Buffer.byteLength when available,
72
+ * falling back to code-unit length for non-Node environments. Does
73
+ * not account for escape expansion (\", \\, control chars, surrogate
74
+ * escapes) which is usually a small fraction of total size.
75
+ * - Binary data (Buffer / typed arrays / ArrayBuffer / DataView): sized
76
+ * from their JSON.stringify representations where practical
77
+ * ({ type: "Buffer", data: [...] } for Buffer, keyed objects for typed
78
+ * arrays). DataView and ArrayBuffer themselves have no enumerable own
79
+ * properties and serialize as "{}". Each byte contributes ~3.5
80
+ * characters on average in Buffer's decimal-array representation
81
+ * (digit(s) + comma).
82
+ * - Other objects with toJSON(): we invoke toJSON() once and estimate
83
+ * the result. This matches JSON.stringify semantics for libraries
84
+ * like Decimal.js, Moment, Luxon, Mongoose documents, etc.
85
+ * - Cycles: detected via an ancestor-path set that is pushed/popped
86
+ * during recursion. This matches JSON.stringify semantics --
87
+ * repeated references that are *not* on the current ancestor chain
88
+ * (shared subobjects) are counted every time they appear, because
89
+ * JSON.stringify will serialize them every time.
90
+ * - No depth limit (JSON.stringify has none either).
91
+ */
92
+ export function estimateSerializedSize(value) {
93
+ try {
94
+ // Ancestor set for cycle detection. An object is only treated as
95
+ // circular if it appears on the current recursion path, not merely
96
+ // if it has been seen before elsewhere in the graph.
97
+ const ancestors = new Set();
98
+ // In Node / Bun, Buffer.byteLength is a fast native way to get UTF-8
99
+ // byte length without allocating an encoded copy. In other runtimes
100
+ // we fall back to code-unit length (a small under-estimate for
101
+ // non-ASCII text, which is acceptable for soft limits).
102
+ const byteLen = typeof Buffer !== "undefined" && typeof Buffer.byteLength === "function"
103
+ ? (s) => Buffer.byteLength(s, "utf8")
104
+ : (s) => s.length;
105
+ function estimateString(s) {
106
+ // +2 for the surrounding quotes. Escape expansion is not counted.
107
+ return byteLen(s) + 2;
108
+ }
109
+ // Size of a byte sequence when rendered as a JSON array of decimal
110
+ // numbers: "[b0,b1,b2,...]". Each byte averages ~3.5 chars (value 0-9
111
+ // => 1 char, 10-99 => 2 chars, 100-255 => 3 chars; weighted mean over
112
+ // a uniform distribution is ~2.81, plus one comma per element except
113
+ // the last). Round up to 4 bytes/element for a small safety margin.
114
+ function estimateByteArrayJson(byteLength) {
115
+ if (byteLength === 0)
116
+ return 2; // "[]"
117
+ return 2 + byteLength * 4;
118
+ }
119
+ // Returns true for values that JSON.stringify drops when they appear
120
+ // as an object property (as opposed to an array element, where they
121
+ // become "null").
122
+ function isDropped(v) {
123
+ return (v === undefined || typeof v === "function" || typeof v === "symbol");
124
+ }
125
+ // In arrays, undefined / function / symbol become "null" (4 bytes).
126
+ function estimateInArray(v) {
127
+ if (v === undefined || typeof v === "function" || typeof v === "symbol") {
128
+ return 4;
129
+ }
130
+ return estimate(v);
131
+ }
132
+ function estimate(val) {
133
+ if (val === null)
134
+ return 4; // "null"
135
+ if (val === undefined)
136
+ return 0; // top-level or property context; array handled separately
137
+ const t = typeof val;
138
+ if (t === "boolean")
139
+ return 5; // "true" / "false" upper bound
140
+ if (t === "number") {
141
+ if (!Number.isFinite(val))
142
+ return 4; // "null"
143
+ // Convert to string to get exact length. This is cheap for numbers
144
+ // (V8 caches small-number strings) and makes the estimate far
145
+ // tighter for common cases like integer arrays.
146
+ return val.toString().length;
147
+ }
148
+ if (t === "bigint") {
149
+ // Our replacer renders BigInt via .toString(), then JSON.stringify
150
+ // quotes it.
151
+ return val.toString().length + 2;
152
+ }
153
+ if (t === "string")
154
+ return estimateString(val);
155
+ if (t === "function" || t === "symbol")
156
+ return 0;
157
+ // Objects from here on.
158
+ const obj = val;
159
+ // Well-known types handled by our replacer.
160
+ if (obj instanceof Date)
161
+ return 26; // "2024-01-01T00:00:00.000Z"
162
+ if (obj instanceof RegExp)
163
+ return byteLen(obj.toString()) + 2;
164
+ if (obj instanceof Error) {
165
+ const name = obj.name ?? "";
166
+ const message = obj.message ?? "";
167
+ // {"name":"...","message":"..."}
168
+ return 22 + byteLen(name) + byteLen(message);
169
+ }
170
+ // Binary data types. These commonly appear in LLM payloads (images,
171
+ // audio) and their JSON representations vary widely.
172
+ if (typeof Buffer !== "undefined" && obj instanceof Buffer) {
173
+ // { "type": "Buffer", "data": [0, 1, 2, ...] }
174
+ return 28 + estimateByteArrayJson(obj.byteLength);
175
+ }
176
+ if (ArrayBuffer.isView(obj)) {
177
+ if (obj instanceof DataView) {
178
+ // DataView has no enumerable own properties; serializes as "{}".
179
+ return 2;
180
+ }
181
+ // Typed arrays serialize as {"0":v0,"1":v1,...} (keyed objects),
182
+ // which is much larger than a plain array would be. Per element
183
+ // cost: digits for index + digits for value + ":" + "," + quotes.
184
+ const len = obj.length ?? 0;
185
+ const isFloat = obj instanceof Float32Array || obj instanceof Float64Array;
186
+ // Index digits grow with len; worst-case per element:
187
+ // "NNN":V, where NNN = log10(len) digits and V depends on type.
188
+ // Loose but safe bounds: integer views ~12 chars/element, float
189
+ // views ~30 chars/element (Float32 ToString can be up to ~17 chars).
190
+ const perElement = isFloat ? 30 : 12;
191
+ return 2 + len * perElement;
192
+ }
193
+ if (obj instanceof ArrayBuffer) {
194
+ // Plain ArrayBuffer has no enumerable properties; serializes as "{}".
195
+ return 2;
196
+ }
197
+ if (ancestors.has(obj)) {
198
+ // Cycle: our decirc fallback replaces with { result: "[Circular]" }.
199
+ return 24;
200
+ }
201
+ // Custom toJSON (Decimal.js, Moment, Luxon, Mongoose docs, etc.).
202
+ // This runs after explicit built-in / binary cases above so known
203
+ // types (for example Buffer) use their dedicated fast-path sizing
204
+ // logic instead of duck-typing through toJSON().
205
+ if (typeof obj.toJSON === "function") {
206
+ let projected;
207
+ try {
208
+ projected = obj.toJSON("");
209
+ }
210
+ catch {
211
+ // If toJSON throws, JSON.stringify would also throw and our
212
+ // serializer would emit "[Unserializable]" (~16 bytes).
213
+ return 16;
214
+ }
215
+ ancestors.add(obj);
216
+ const size = estimate(projected);
217
+ ancestors.delete(obj);
218
+ return size;
219
+ }
220
+ ancestors.add(obj);
221
+ let size;
222
+ if (Array.isArray(obj)) {
223
+ size = 2; // []
224
+ const len = obj.length;
225
+ for (let i = 0; i < len; i++) {
226
+ size += estimateInArray(obj[i]);
227
+ if (i < len - 1)
228
+ size += 1; // comma
229
+ }
230
+ }
231
+ else if (obj instanceof Map) {
232
+ // Rendered as { k: v, ... } via Object.fromEntries.
233
+ size = 2;
234
+ let emitted = 0;
235
+ for (const [k, v] of obj) {
236
+ if (isDropped(v))
237
+ continue;
238
+ if (emitted > 0)
239
+ size += 1; // comma
240
+ const keyStr = typeof k === "string" ? k : String(k);
241
+ size += byteLen(keyStr) + 3; // "key":
242
+ size += estimate(v);
243
+ emitted++;
244
+ }
245
+ }
246
+ else if (obj instanceof Set) {
247
+ // Rendered as [v, ...] via Array.from.
248
+ size = 2;
249
+ let emitted = 0;
250
+ for (const v of obj) {
251
+ if (emitted > 0)
252
+ size += 1; // comma
253
+ size += estimateInArray(v);
254
+ emitted++;
255
+ }
256
+ }
257
+ else {
258
+ size = 2; // {}
259
+ let emitted = 0;
260
+ // Object.keys only returns own enumerable string keys, matching
261
+ // JSON.stringify.
262
+ const keys = Object.keys(obj);
263
+ for (let i = 0; i < keys.length; i++) {
264
+ const key = keys[i];
265
+ const v = obj[key];
266
+ if (isDropped(v))
267
+ continue;
268
+ if (emitted > 0)
269
+ size += 1; // comma
270
+ size += byteLen(key) + 3; // "key":
271
+ size += estimate(v);
272
+ emitted++;
273
+ }
274
+ }
275
+ ancestors.delete(obj);
276
+ return size;
277
+ }
278
+ return estimate(value);
279
+ }
280
+ catch {
281
+ // If the estimator itself hits an unexpected edge case, fall back to the
282
+ // exact serialized size. This preserves correctness of queue-size
283
+ // accounting at the cost of a slower hot path for that one payload.
284
+ return serialize(value).length;
285
+ }
286
+ }
60
287
  // Regular stringify
61
288
  export function serialize(obj, errorContext, replacer, spacer, options) {
62
289
  try {
@@ -1,8 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.parsePromptIdentifier = parsePromptIdentifier;
3
+ exports.parseHubIdentifier = parseHubIdentifier;
4
4
  const error_js_1 = require("./error.cjs");
5
- function parsePromptIdentifier(identifier) {
5
+ /**
6
+ * Parse a hub repo identifier (owner/name:hash, name, etc.).
7
+ *
8
+ * Prompts, agents, and skills share the same identifier grammar on Hub.
9
+ */
10
+ function parseHubIdentifier(identifier) {
6
11
  if (!identifier ||
7
12
  identifier.split("/").length > 2 ||
8
13
  identifier.startsWith("/") ||
@@ -1 +1,6 @@
1
- export declare function parsePromptIdentifier(identifier: string): [string, string, string];
1
+ /**
2
+ * Parse a hub repo identifier (owner/name:hash, name, etc.).
3
+ *
4
+ * Prompts, agents, and skills share the same identifier grammar on Hub.
5
+ */
6
+ export declare function parseHubIdentifier(identifier: string): [string, string, string];
@@ -1,5 +1,10 @@
1
1
  import { getInvalidPromptIdentifierMsg } from "./error.js";
2
- export function parsePromptIdentifier(identifier) {
2
+ /**
3
+ * Parse a hub repo identifier (owner/name:hash, name, etc.).
4
+ *
5
+ * Prompts, agents, and skills share the same identifier grammar on Hub.
6
+ */
7
+ export function parseHubIdentifier(identifier) {
3
8
  if (!identifier ||
4
9
  identifier.split("/").length > 2 ||
5
10
  identifier.startsWith("/") ||
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "langsmith",
3
- "version": "0.5.22",
3
+ "version": "0.5.23",
4
4
  "description": "Client library to connect to the LangSmith Observability and Evaluation Platform.",
5
5
  "packageManager": "pnpm@10.33.0",
6
6
  "files": [
@@ -192,6 +192,7 @@
192
192
  "eslint-plugin-prettier": "^4.2.1",
193
193
  "jest": "^29.5.0",
194
194
  "langchain": "^0.3.29",
195
+ "mongoose": "^9.5.0",
195
196
  "msw": "^2.11.2",
196
197
  "node-fetch": "^3.3.2",
197
198
  "openai": "^6.18.0",
@@ -466,7 +467,8 @@
466
467
  },
467
468
  "pnpm": {
468
469
  "overrides": {
469
- "js-yaml": "^4.1.1"
470
+ "js-yaml": "^4.1.1",
471
+ "vite": "^7.3.2"
470
472
  }
471
473
  },
472
474
  "browser": {