langsmith 0.10.11 → 0.10.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +20 -0
- package/README.md +198 -198
- package/lib/sandbox/index.d.mts +1 -1
- package/lib/sandbox/index.d.mts.map +1 -1
- package/lib/sandbox/index.d.ts +1 -1
- package/lib/sandbox/index.d.ts.map +1 -1
- package/lib/sandbox/index.js.map +1 -1
- package/lib/sandbox/index.mjs.map +1 -1
- package/lib/sandbox/mounts.d.mts +3 -2
- package/lib/sandbox/mounts.d.mts.map +1 -1
- package/lib/sandbox/mounts.d.ts +3 -2
- package/lib/sandbox/mounts.d.ts.map +1 -1
- package/lib/sandbox/mounts.js +6 -1
- package/lib/sandbox/mounts.js.map +1 -1
- package/lib/sandbox/mounts.mjs +6 -1
- package/lib/sandbox/mounts.mjs.map +1 -1
- package/lib/sandbox/types.d.mts +7 -0
- package/lib/sandbox/types.d.mts.map +1 -1
- package/lib/sandbox/types.d.ts +7 -0
- package/lib/sandbox/types.d.ts.map +1 -1
- package/lib/sandbox/verify.d.mts.map +1 -1
- package/lib/sandbox/verify.d.ts.map +1 -1
- package/lib/sandbox/verify.js +81 -19
- package/lib/sandbox/verify.js.map +1 -1
- package/lib/sandbox/verify.mjs +81 -19
- package/lib/sandbox/verify.mjs.map +1 -1
- package/package.json +13 -4
- package/resources/annotation-queues/annotation-queues.d.mts +33 -2
- package/resources/annotation-queues/annotation-queues.d.mts.map +1 -1
- package/resources/annotation-queues/annotation-queues.d.ts +33 -2
- package/resources/annotation-queues/annotation-queues.d.ts.map +1 -1
- package/resources/annotation-queues/annotation-queues.js.map +1 -1
- package/resources/annotation-queues/annotation-queues.mjs.map +1 -1
- package/resources/runs/runs.d.mts +14 -1
- package/resources/runs/runs.d.mts.map +1 -1
- package/resources/runs/runs.d.ts +14 -1
- package/resources/runs/runs.d.ts.map +1 -1
- package/resources/runs/runs.js +4 -0
- package/resources/runs/runs.js.map +1 -1
- package/resources/runs/runs.mjs +4 -0
- package/resources/runs/runs.mjs.map +1 -1
- package/resources/sandboxes/boxes.d.mts +32 -0
- package/resources/sandboxes/boxes.d.mts.map +1 -1
- package/resources/sandboxes/boxes.d.ts +32 -0
- package/resources/sandboxes/boxes.d.ts.map +1 -1
- package/resources/sandboxes/sandboxes.d.mts +32 -0
- package/resources/sandboxes/sandboxes.d.mts.map +1 -1
- package/resources/sandboxes/sandboxes.d.ts +32 -0
- package/resources/sandboxes/sandboxes.d.ts.map +1 -1
- package/resources/sandboxes/sandboxes.js.map +1 -1
- package/resources/sandboxes/sandboxes.mjs.map +1 -1
- package/resources/threads/threads.d.mts +13 -1
- package/resources/threads/threads.d.mts.map +1 -1
- package/resources/threads/threads.d.ts +13 -1
- package/resources/threads/threads.d.ts.map +1 -1
- package/resources/threads/threads.js +4 -0
- package/resources/threads/threads.js.map +1 -1
- package/resources/threads/threads.mjs +4 -0
- package/resources/threads/threads.mjs.map +1 -1
- package/resources/traces.d.mts +34 -16
- package/resources/traces.d.mts.map +1 -1
- package/resources/traces.d.ts +34 -16
- package/resources/traces.d.ts.map +1 -1
- package/resources/traces.js +7 -1
- package/resources/traces.js.map +1 -1
- package/resources/traces.mjs +7 -1
- package/resources/traces.mjs.map +1 -1
- package/src/lib/sandbox/README.md +3 -2
- package/src/lib/sandbox/index.ts +1 -0
- package/src/lib/sandbox/mounts.ts +8 -0
- package/src/lib/sandbox/types.ts +8 -0
- package/src/lib/sandbox/verify.ts +107 -28
- package/src/resources/annotation-queues/annotation-queues.ts +46 -2
- package/src/resources/runs/runs.ts +15 -1
- package/src/resources/sandboxes/boxes.ts +40 -0
- package/src/resources/sandboxes/sandboxes.ts +40 -0
- package/src/resources/threads/threads.ts +14 -1
- package/src/resources/traces.ts +38 -16
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -4,6 +4,7 @@ import type {
|
|
|
4
4
|
GitMountRefSpec,
|
|
5
5
|
GitMountSpec,
|
|
6
6
|
MountCacheConfig,
|
|
7
|
+
MountEncryptionConfig,
|
|
7
8
|
SandboxAwsAuthRule,
|
|
8
9
|
SandboxGcpAuthRule,
|
|
9
10
|
S3MountSpec,
|
|
@@ -98,6 +99,7 @@ export function s3Mount({
|
|
|
98
99
|
pathStyle = false,
|
|
99
100
|
readOnly,
|
|
100
101
|
cache,
|
|
102
|
+
encryption,
|
|
101
103
|
}: {
|
|
102
104
|
id: string;
|
|
103
105
|
mountPath: string;
|
|
@@ -108,6 +110,7 @@ export function s3Mount({
|
|
|
108
110
|
pathStyle?: boolean;
|
|
109
111
|
readOnly?: boolean;
|
|
110
112
|
cache?: MountCacheConfig;
|
|
113
|
+
encryption?: MountEncryptionConfig;
|
|
111
114
|
}): S3MountSpec {
|
|
112
115
|
const mount: S3MountSpec = {
|
|
113
116
|
id: requireNonEmptyString(id, "id"),
|
|
@@ -129,6 +132,11 @@ export function s3Mount({
|
|
|
129
132
|
if (cache !== undefined) {
|
|
130
133
|
mount.cache = { ...cache };
|
|
131
134
|
}
|
|
135
|
+
if (encryption !== undefined) {
|
|
136
|
+
mount.encryption = {
|
|
137
|
+
kms_key: requireNonEmptyString(encryption.kms_key, "encryption.kms_key"),
|
|
138
|
+
};
|
|
139
|
+
}
|
|
132
140
|
return mount;
|
|
133
141
|
}
|
|
134
142
|
|
package/src/lib/sandbox/types.ts
CHANGED
|
@@ -603,10 +603,18 @@ export interface S3MountConfig {
|
|
|
603
603
|
path_style?: boolean;
|
|
604
604
|
}
|
|
605
605
|
|
|
606
|
+
/** Customer-managed key that uploads through a mount are encrypted with. */
|
|
607
|
+
export interface MountEncryptionConfig {
|
|
608
|
+
/** KMS key ARN in the mount's region; uploads use SSE-KMS with this key. */
|
|
609
|
+
kms_key: string;
|
|
610
|
+
}
|
|
611
|
+
|
|
606
612
|
/** S3-backed sandbox mount specification. */
|
|
607
613
|
export interface S3MountSpec extends SandboxBucketMountBase {
|
|
608
614
|
/** Mount type. */
|
|
609
615
|
type: "s3";
|
|
616
|
+
/** Optional customer-managed key for uploads. */
|
|
617
|
+
encryption?: MountEncryptionConfig;
|
|
610
618
|
/** S3 mount configuration. */
|
|
611
619
|
s3: S3MountConfig;
|
|
612
620
|
}
|
|
@@ -99,7 +99,72 @@ interface Jwk {
|
|
|
99
99
|
kty?: string;
|
|
100
100
|
crv?: string;
|
|
101
101
|
kid?: string;
|
|
102
|
+
alg?: string;
|
|
102
103
|
x?: string;
|
|
104
|
+
y?: string;
|
|
105
|
+
n?: string;
|
|
106
|
+
e?: string;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
interface VerificationKey {
|
|
110
|
+
alg: string;
|
|
111
|
+
key: CryptoKey;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
interface AlgorithmSpec {
|
|
115
|
+
kty: string;
|
|
116
|
+
crv?: string;
|
|
117
|
+
importParams: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams;
|
|
118
|
+
verifyParams: AlgorithmIdentifier | RsaPssParams | EcdsaParams;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
// Every JOSE asymmetric algorithm; the JWKS key picks which one a token may use.
|
|
122
|
+
const ALGORITHMS: Record<string, AlgorithmSpec> = {
|
|
123
|
+
EdDSA: {
|
|
124
|
+
kty: "OKP",
|
|
125
|
+
crv: "Ed25519",
|
|
126
|
+
importParams: { name: "Ed25519" },
|
|
127
|
+
verifyParams: { name: "Ed25519" },
|
|
128
|
+
},
|
|
129
|
+
};
|
|
130
|
+
for (const [bits, curve] of [
|
|
131
|
+
[256, "P-256"],
|
|
132
|
+
[384, "P-384"],
|
|
133
|
+
[512, "P-521"],
|
|
134
|
+
] as const) {
|
|
135
|
+
const hash = `SHA-${bits}`;
|
|
136
|
+
ALGORITHMS[`RS${bits}`] = {
|
|
137
|
+
kty: "RSA",
|
|
138
|
+
importParams: { name: "RSASSA-PKCS1-v1_5", hash },
|
|
139
|
+
verifyParams: { name: "RSASSA-PKCS1-v1_5" },
|
|
140
|
+
};
|
|
141
|
+
// JWS RSA-PSS uses a salt as long as the hash.
|
|
142
|
+
ALGORITHMS[`PS${bits}`] = {
|
|
143
|
+
kty: "RSA",
|
|
144
|
+
importParams: { name: "RSA-PSS", hash },
|
|
145
|
+
verifyParams: { name: "RSA-PSS", saltLength: bits / 8 },
|
|
146
|
+
};
|
|
147
|
+
// The JWS ECDSA signature is raw r||s, which Web Crypto verifies directly.
|
|
148
|
+
ALGORITHMS[`ES${bits}`] = {
|
|
149
|
+
kty: "EC",
|
|
150
|
+
crv: curve,
|
|
151
|
+
importParams: { name: "ECDSA", namedCurve: curve },
|
|
152
|
+
verifyParams: { name: "ECDSA", hash },
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
const USER_TOKEN_ALGORITHMS = Object.keys(ALGORITHMS);
|
|
157
|
+
const CALLBACK_ALGORITHMS = ["EdDSA"];
|
|
158
|
+
|
|
159
|
+
/** A JWK's algorithm: its `alg` member if supported, else derived from its key type. */
|
|
160
|
+
function jwkAlgorithm(jwk: Jwk): string | undefined {
|
|
161
|
+
if (jwk.alg !== undefined) {
|
|
162
|
+
return USER_TOKEN_ALGORITHMS.includes(jwk.alg) ? jwk.alg : undefined;
|
|
163
|
+
}
|
|
164
|
+
if (jwk.kty === "RSA") return "RS256";
|
|
165
|
+
return USER_TOKEN_ALGORITHMS.find(
|
|
166
|
+
(alg) => ALGORITHMS[alg].kty === jwk.kty && ALGORITHMS[alg].crv === jwk.crv,
|
|
167
|
+
);
|
|
103
168
|
}
|
|
104
169
|
|
|
105
170
|
function fail(message: string): never {
|
|
@@ -202,7 +267,7 @@ function timingSafeEqual(a: string, b: string): boolean {
|
|
|
202
267
|
export class SandboxTokenVerifier {
|
|
203
268
|
private readonly jwksUrl: string;
|
|
204
269
|
private readonly timeoutMs: number;
|
|
205
|
-
private keys = new Map<string,
|
|
270
|
+
private keys = new Map<string, VerificationKey>();
|
|
206
271
|
private fetchedAt = 0;
|
|
207
272
|
private inflight?: Promise<void>;
|
|
208
273
|
|
|
@@ -233,6 +298,7 @@ export class SandboxTokenVerifier {
|
|
|
233
298
|
): Promise<SandboxUser> {
|
|
234
299
|
const claims = await this.verify(
|
|
235
300
|
token,
|
|
301
|
+
USER_TOKEN_ALGORITHMS,
|
|
236
302
|
serviceHost(options.audience),
|
|
237
303
|
options.issuer,
|
|
238
304
|
);
|
|
@@ -260,6 +326,7 @@ export class SandboxTokenVerifier {
|
|
|
260
326
|
): Promise<SandboxCallback> {
|
|
261
327
|
const claims = await this.verify(
|
|
262
328
|
options.signature,
|
|
329
|
+
CALLBACK_ALGORITHMS,
|
|
263
330
|
options.aud,
|
|
264
331
|
options.issuer,
|
|
265
332
|
);
|
|
@@ -293,6 +360,7 @@ export class SandboxTokenVerifier {
|
|
|
293
360
|
|
|
294
361
|
private async verify(
|
|
295
362
|
token: string,
|
|
363
|
+
algorithms: string[],
|
|
296
364
|
audience: AudienceMatcher | undefined,
|
|
297
365
|
issuer: string | undefined,
|
|
298
366
|
): Promise<Claims> {
|
|
@@ -308,14 +376,19 @@ export class SandboxTokenVerifier {
|
|
|
308
376
|
} catch (e) {
|
|
309
377
|
fail(`malformed token: ${(e as Error).message}`);
|
|
310
378
|
}
|
|
311
|
-
if (header.alg
|
|
379
|
+
if (!algorithms.includes(header.alg as string)) {
|
|
312
380
|
fail(`unexpected signing algorithm: ${JSON.stringify(header.alg)}`);
|
|
313
381
|
}
|
|
314
382
|
if (typeof header.kid !== "string" || !header.kid) fail("token has no kid");
|
|
315
383
|
|
|
316
|
-
const key = await this.key(header.kid);
|
|
384
|
+
const { alg, key } = await this.key(header.kid);
|
|
385
|
+
// The key belongs to one algorithm; the token must claim that one.
|
|
386
|
+
if (header.alg !== alg) {
|
|
387
|
+
fail(`unexpected signing algorithm: ${JSON.stringify(header.alg)}`);
|
|
388
|
+
}
|
|
317
389
|
const signed = new TextEncoder().encode(`${parts[0]}.${parts[1]}`);
|
|
318
|
-
|
|
390
|
+
const { verifyParams } = ALGORITHMS[alg];
|
|
391
|
+
if (!(await subtle().verify(verifyParams, key, signature, signed))) {
|
|
319
392
|
fail("invalid signature");
|
|
320
393
|
}
|
|
321
394
|
|
|
@@ -347,7 +420,7 @@ export class SandboxTokenVerifier {
|
|
|
347
420
|
return claims;
|
|
348
421
|
}
|
|
349
422
|
|
|
350
|
-
private async key(kid: string): Promise<
|
|
423
|
+
private async key(kid: string): Promise<VerificationKey> {
|
|
351
424
|
const age = Date.now() - this.fetchedAt;
|
|
352
425
|
const fresh = this.keys.has(kid) && age < JWKS_TTL_MS;
|
|
353
426
|
if (!fresh && (this.fetchedAt === 0 || age >= JWKS_MIN_REFRESH_MS)) {
|
|
@@ -356,17 +429,9 @@ export class SandboxTokenVerifier {
|
|
|
356
429
|
});
|
|
357
430
|
await this.inflight;
|
|
358
431
|
}
|
|
359
|
-
const
|
|
360
|
-
if (!
|
|
361
|
-
|
|
362
|
-
return await key;
|
|
363
|
-
} catch (e) {
|
|
364
|
-
fail(
|
|
365
|
-
`signing key ${kid} is not a usable Ed25519 key: ${
|
|
366
|
-
(e as Error).message
|
|
367
|
-
}`,
|
|
368
|
-
);
|
|
369
|
-
}
|
|
432
|
+
const entry = this.keys.get(kid);
|
|
433
|
+
if (!entry) fail(`unknown signing key: ${kid}`);
|
|
434
|
+
return entry;
|
|
370
435
|
}
|
|
371
436
|
|
|
372
437
|
private async refresh(): Promise<void> {
|
|
@@ -386,20 +451,34 @@ export class SandboxTokenVerifier {
|
|
|
386
451
|
if (!Array.isArray(entries)) {
|
|
387
452
|
fail("invalid JWKS: expected an object with a keys array");
|
|
388
453
|
}
|
|
389
|
-
const keys = new Map<string,
|
|
454
|
+
const keys = new Map<string, VerificationKey>();
|
|
455
|
+
const webCrypto = subtle();
|
|
390
456
|
for (const jwk of entries as (Jwk | null)[]) {
|
|
391
|
-
if (typeof jwk !== "object" || jwk === null) continue;
|
|
392
|
-
|
|
457
|
+
if (typeof jwk !== "object" || jwk === null || !jwk.kid) continue;
|
|
458
|
+
const alg = jwkAlgorithm(jwk);
|
|
459
|
+
if (!alg) continue;
|
|
460
|
+
const { kty, crv, importParams } = ALGORITHMS[alg];
|
|
461
|
+
if (jwk.kty !== kty || jwk.crv !== crv) continue;
|
|
462
|
+
try {
|
|
463
|
+
// Import with the key's own algorithm: Web Crypto fixes the RSA hash here.
|
|
464
|
+
const key = await webCrypto.importKey(
|
|
465
|
+
"jwk",
|
|
466
|
+
{
|
|
467
|
+
kty: jwk.kty,
|
|
468
|
+
crv: jwk.crv,
|
|
469
|
+
x: jwk.x,
|
|
470
|
+
y: jwk.y,
|
|
471
|
+
n: jwk.n,
|
|
472
|
+
e: jwk.e,
|
|
473
|
+
},
|
|
474
|
+
importParams,
|
|
475
|
+
false,
|
|
476
|
+
["verify"],
|
|
477
|
+
);
|
|
478
|
+
keys.set(jwk.kid, { alg, key });
|
|
479
|
+
} catch {
|
|
393
480
|
continue;
|
|
394
|
-
|
|
395
|
-
"jwk",
|
|
396
|
-
{ kty: "OKP", crv: "Ed25519", x: jwk.x },
|
|
397
|
-
{ name: "Ed25519" },
|
|
398
|
-
false,
|
|
399
|
-
["verify"],
|
|
400
|
-
);
|
|
401
|
-
imported.catch(() => undefined);
|
|
402
|
-
keys.set(jwk.kid, imported);
|
|
481
|
+
}
|
|
403
482
|
}
|
|
404
483
|
this.keys = keys;
|
|
405
484
|
this.fetchedAt = Date.now();
|
|
@@ -194,6 +194,8 @@ export interface AnnotationQueueRubricItemSchema {
|
|
|
194
194
|
|
|
195
195
|
description?: string | null;
|
|
196
196
|
|
|
197
|
+
feedback_config?: AnnotationQueueRubricItemSchema.FeedbackConfig | null;
|
|
198
|
+
|
|
197
199
|
feedback_config_id?: string | null;
|
|
198
200
|
|
|
199
201
|
is_assertion?: boolean | null;
|
|
@@ -207,6 +209,48 @@ export interface AnnotationQueueRubricItemSchema {
|
|
|
207
209
|
value_descriptions?: { [key: string]: string } | null;
|
|
208
210
|
}
|
|
209
211
|
|
|
212
|
+
export namespace AnnotationQueueRubricItemSchema {
|
|
213
|
+
export interface FeedbackConfig {
|
|
214
|
+
id: string;
|
|
215
|
+
|
|
216
|
+
feedback_config: FeedbackConfig.FeedbackConfig;
|
|
217
|
+
|
|
218
|
+
feedback_key: string;
|
|
219
|
+
|
|
220
|
+
modified_at: string;
|
|
221
|
+
|
|
222
|
+
tenant_id: string;
|
|
223
|
+
|
|
224
|
+
is_lower_score_better?: boolean | null;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
export namespace FeedbackConfig {
|
|
228
|
+
export interface FeedbackConfig {
|
|
229
|
+
/**
|
|
230
|
+
* Enum for feedback types.
|
|
231
|
+
*/
|
|
232
|
+
type: 'continuous' | 'categorical' | 'freeform';
|
|
233
|
+
|
|
234
|
+
categories?: Array<FeedbackConfig.Category> | null;
|
|
235
|
+
|
|
236
|
+
max?: number | null;
|
|
237
|
+
|
|
238
|
+
min?: number | null;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
export namespace FeedbackConfig {
|
|
242
|
+
/**
|
|
243
|
+
* Specific value and label pair for feedback
|
|
244
|
+
*/
|
|
245
|
+
export interface Category {
|
|
246
|
+
value: number;
|
|
247
|
+
|
|
248
|
+
label?: string | null;
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
|
|
210
254
|
/**
|
|
211
255
|
* AnnotationQueue schema.
|
|
212
256
|
*/
|
|
@@ -519,7 +563,7 @@ export interface AnnotationQueueUpdateParams {
|
|
|
519
563
|
|
|
520
564
|
description?: string | null;
|
|
521
565
|
|
|
522
|
-
enable_reservations?: boolean;
|
|
566
|
+
enable_reservations?: boolean | DatasetsAPI.Missing;
|
|
523
567
|
|
|
524
568
|
metadata?: { [key: string]: unknown } | DatasetsAPI.Missing | null;
|
|
525
569
|
|
|
@@ -527,7 +571,7 @@ export interface AnnotationQueueUpdateParams {
|
|
|
527
571
|
|
|
528
572
|
num_reviewers_per_item?: number | DatasetsAPI.Missing | null;
|
|
529
573
|
|
|
530
|
-
reservation_minutes?: number | null;
|
|
574
|
+
reservation_minutes?: number | DatasetsAPI.Missing | null;
|
|
531
575
|
|
|
532
576
|
reviewer_access_mode?: 'any' | 'assigned' | null;
|
|
533
577
|
|
|
@@ -41,6 +41,10 @@ export class Runs extends APIResource {
|
|
|
41
41
|
* start_time. Supports filters, cursor pagination, and `selects` to select fields
|
|
42
42
|
* to return.
|
|
43
43
|
*
|
|
44
|
+
* When `ai_search` is set, `Accept: text/event-stream` is required; requests
|
|
45
|
+
* without it return 406. AI search is unavailable on deployments that route
|
|
46
|
+
* queries to the v1 backend and returns 501 there.
|
|
47
|
+
*
|
|
44
48
|
* Self-hosted deployments require LangSmith `v0.16` or later.
|
|
45
49
|
*
|
|
46
50
|
* @example
|
|
@@ -872,6 +876,15 @@ export interface RunGetURLParams {
|
|
|
872
876
|
}
|
|
873
877
|
|
|
874
878
|
export interface RunQueryV2Params extends ItemsCursorPostPaginationParams {
|
|
879
|
+
/**
|
|
880
|
+
* Body param: `ai_search` is a plain-language criterion evaluated against the
|
|
881
|
+
* messages from the agent trajectory scoped to the run. AND-ed with the ordinary
|
|
882
|
+
* filters. Requires semantic filtering enabled for the deployment. Must contain
|
|
883
|
+
* nonempty text of at most 2000 UTF-8 bytes. Not supported on public dataset
|
|
884
|
+
* queries.
|
|
885
|
+
*/
|
|
886
|
+
ai_search?: string;
|
|
887
|
+
|
|
875
888
|
/**
|
|
876
889
|
* Body param: `filter` narrows results to runs matching this LangSmith filter
|
|
877
890
|
* expression, evaluated against each individual run. For example: and(eq(run_type,
|
|
@@ -972,7 +985,8 @@ export interface RunQueryV2Params extends ItemsCursorPostPaginationParams {
|
|
|
972
985
|
tree_filter?: string;
|
|
973
986
|
|
|
974
987
|
/**
|
|
975
|
-
* Header param: application/json or text/event-stream
|
|
988
|
+
* Header param: application/json, or text/event-stream (required when ai_search is
|
|
989
|
+
* set)
|
|
976
990
|
*/
|
|
977
991
|
Accept?: string;
|
|
978
992
|
}
|
|
@@ -404,6 +404,8 @@ export namespace BoxCreateParams {
|
|
|
404
404
|
|
|
405
405
|
contexthub?: SandboxapiS3BucketMountSpec.Contexthub;
|
|
406
406
|
|
|
407
|
+
encryption?: SandboxapiS3BucketMountSpec.Encryption;
|
|
408
|
+
|
|
407
409
|
gcs?: SandboxapiS3BucketMountSpec.Gcs;
|
|
408
410
|
|
|
409
411
|
git?: SandboxapiS3BucketMountSpec.Git;
|
|
@@ -445,6 +447,14 @@ export namespace BoxCreateParams {
|
|
|
445
447
|
initial_pull_only?: boolean;
|
|
446
448
|
}
|
|
447
449
|
|
|
450
|
+
export interface Encryption {
|
|
451
|
+
/**
|
|
452
|
+
* KMSKey is the key to encrypt uploads with. S3 mounts take a KMS key ARN in the
|
|
453
|
+
* mount's region.
|
|
454
|
+
*/
|
|
455
|
+
kms_key: string;
|
|
456
|
+
}
|
|
457
|
+
|
|
448
458
|
export interface Gcs {
|
|
449
459
|
bucket: string;
|
|
450
460
|
|
|
@@ -481,6 +491,8 @@ export namespace BoxCreateParams {
|
|
|
481
491
|
|
|
482
492
|
contexthub?: SandboxapiGcsBucketMountSpec.Contexthub;
|
|
483
493
|
|
|
494
|
+
encryption?: SandboxapiGcsBucketMountSpec.Encryption;
|
|
495
|
+
|
|
484
496
|
git?: SandboxapiGcsBucketMountSpec.Git;
|
|
485
497
|
|
|
486
498
|
read_only?: boolean;
|
|
@@ -516,6 +528,14 @@ export namespace BoxCreateParams {
|
|
|
516
528
|
initial_pull_only?: boolean;
|
|
517
529
|
}
|
|
518
530
|
|
|
531
|
+
export interface Encryption {
|
|
532
|
+
/**
|
|
533
|
+
* KMSKey is the key to encrypt uploads with. S3 mounts take a KMS key ARN in the
|
|
534
|
+
* mount's region.
|
|
535
|
+
*/
|
|
536
|
+
kms_key: string;
|
|
537
|
+
}
|
|
538
|
+
|
|
519
539
|
export interface Git {
|
|
520
540
|
remote_url: string;
|
|
521
541
|
|
|
@@ -558,6 +578,8 @@ export namespace BoxCreateParams {
|
|
|
558
578
|
|
|
559
579
|
contexthub?: SandboxapiGitRepoMountSpec.Contexthub;
|
|
560
580
|
|
|
581
|
+
encryption?: SandboxapiGitRepoMountSpec.Encryption;
|
|
582
|
+
|
|
561
583
|
gcs?: SandboxapiGitRepoMountSpec.Gcs;
|
|
562
584
|
|
|
563
585
|
read_only?: boolean;
|
|
@@ -603,6 +625,14 @@ export namespace BoxCreateParams {
|
|
|
603
625
|
initial_pull_only?: boolean;
|
|
604
626
|
}
|
|
605
627
|
|
|
628
|
+
export interface Encryption {
|
|
629
|
+
/**
|
|
630
|
+
* KMSKey is the key to encrypt uploads with. S3 mounts take a KMS key ARN in the
|
|
631
|
+
* mount's region.
|
|
632
|
+
*/
|
|
633
|
+
kms_key: string;
|
|
634
|
+
}
|
|
635
|
+
|
|
606
636
|
export interface Gcs {
|
|
607
637
|
bucket: string;
|
|
608
638
|
|
|
@@ -633,6 +663,8 @@ export namespace BoxCreateParams {
|
|
|
633
663
|
|
|
634
664
|
cache?: SandboxapiContextHubRepoMountSpec.Cache;
|
|
635
665
|
|
|
666
|
+
encryption?: SandboxapiContextHubRepoMountSpec.Encryption;
|
|
667
|
+
|
|
636
668
|
gcs?: SandboxapiContextHubRepoMountSpec.Gcs;
|
|
637
669
|
|
|
638
670
|
git?: SandboxapiContextHubRepoMountSpec.Git;
|
|
@@ -664,6 +696,14 @@ export namespace BoxCreateParams {
|
|
|
664
696
|
writeback_seconds?: number;
|
|
665
697
|
}
|
|
666
698
|
|
|
699
|
+
export interface Encryption {
|
|
700
|
+
/**
|
|
701
|
+
* KMSKey is the key to encrypt uploads with. S3 mounts take a KMS key ARN in the
|
|
702
|
+
* mount's region.
|
|
703
|
+
*/
|
|
704
|
+
kms_key: string;
|
|
705
|
+
}
|
|
706
|
+
|
|
667
707
|
export interface Gcs {
|
|
668
708
|
bucket: string;
|
|
669
709
|
|
|
@@ -260,6 +260,8 @@ export namespace SandboxResponse {
|
|
|
260
260
|
|
|
261
261
|
contexthub?: SandboxapiS3BucketMountSpec.Contexthub;
|
|
262
262
|
|
|
263
|
+
encryption?: SandboxapiS3BucketMountSpec.Encryption;
|
|
264
|
+
|
|
263
265
|
gcs?: SandboxapiS3BucketMountSpec.Gcs;
|
|
264
266
|
|
|
265
267
|
git?: SandboxapiS3BucketMountSpec.Git;
|
|
@@ -301,6 +303,14 @@ export namespace SandboxResponse {
|
|
|
301
303
|
initial_pull_only?: boolean;
|
|
302
304
|
}
|
|
303
305
|
|
|
306
|
+
export interface Encryption {
|
|
307
|
+
/**
|
|
308
|
+
* KMSKey is the key to encrypt uploads with. S3 mounts take a KMS key ARN in the
|
|
309
|
+
* mount's region.
|
|
310
|
+
*/
|
|
311
|
+
kms_key: string;
|
|
312
|
+
}
|
|
313
|
+
|
|
304
314
|
export interface Gcs {
|
|
305
315
|
bucket: string;
|
|
306
316
|
|
|
@@ -337,6 +347,8 @@ export namespace SandboxResponse {
|
|
|
337
347
|
|
|
338
348
|
contexthub?: SandboxapiGcsBucketMountSpec.Contexthub;
|
|
339
349
|
|
|
350
|
+
encryption?: SandboxapiGcsBucketMountSpec.Encryption;
|
|
351
|
+
|
|
340
352
|
git?: SandboxapiGcsBucketMountSpec.Git;
|
|
341
353
|
|
|
342
354
|
read_only?: boolean;
|
|
@@ -372,6 +384,14 @@ export namespace SandboxResponse {
|
|
|
372
384
|
initial_pull_only?: boolean;
|
|
373
385
|
}
|
|
374
386
|
|
|
387
|
+
export interface Encryption {
|
|
388
|
+
/**
|
|
389
|
+
* KMSKey is the key to encrypt uploads with. S3 mounts take a KMS key ARN in the
|
|
390
|
+
* mount's region.
|
|
391
|
+
*/
|
|
392
|
+
kms_key: string;
|
|
393
|
+
}
|
|
394
|
+
|
|
375
395
|
export interface Git {
|
|
376
396
|
remote_url: string;
|
|
377
397
|
|
|
@@ -414,6 +434,8 @@ export namespace SandboxResponse {
|
|
|
414
434
|
|
|
415
435
|
contexthub?: SandboxapiGitRepoMountSpec.Contexthub;
|
|
416
436
|
|
|
437
|
+
encryption?: SandboxapiGitRepoMountSpec.Encryption;
|
|
438
|
+
|
|
417
439
|
gcs?: SandboxapiGitRepoMountSpec.Gcs;
|
|
418
440
|
|
|
419
441
|
read_only?: boolean;
|
|
@@ -459,6 +481,14 @@ export namespace SandboxResponse {
|
|
|
459
481
|
initial_pull_only?: boolean;
|
|
460
482
|
}
|
|
461
483
|
|
|
484
|
+
export interface Encryption {
|
|
485
|
+
/**
|
|
486
|
+
* KMSKey is the key to encrypt uploads with. S3 mounts take a KMS key ARN in the
|
|
487
|
+
* mount's region.
|
|
488
|
+
*/
|
|
489
|
+
kms_key: string;
|
|
490
|
+
}
|
|
491
|
+
|
|
462
492
|
export interface Gcs {
|
|
463
493
|
bucket: string;
|
|
464
494
|
|
|
@@ -489,6 +519,8 @@ export namespace SandboxResponse {
|
|
|
489
519
|
|
|
490
520
|
cache?: SandboxapiContextHubRepoMountSpec.Cache;
|
|
491
521
|
|
|
522
|
+
encryption?: SandboxapiContextHubRepoMountSpec.Encryption;
|
|
523
|
+
|
|
492
524
|
gcs?: SandboxapiContextHubRepoMountSpec.Gcs;
|
|
493
525
|
|
|
494
526
|
git?: SandboxapiContextHubRepoMountSpec.Git;
|
|
@@ -520,6 +552,14 @@ export namespace SandboxResponse {
|
|
|
520
552
|
writeback_seconds?: number;
|
|
521
553
|
}
|
|
522
554
|
|
|
555
|
+
export interface Encryption {
|
|
556
|
+
/**
|
|
557
|
+
* KMSKey is the key to encrypt uploads with. S3 mounts take a KMS key ARN in the
|
|
558
|
+
* mount's region.
|
|
559
|
+
*/
|
|
560
|
+
kms_key: string;
|
|
561
|
+
}
|
|
562
|
+
|
|
523
563
|
export interface Gcs {
|
|
524
564
|
bucket: string;
|
|
525
565
|
|
|
@@ -85,6 +85,10 @@ export class Threads extends APIResource {
|
|
|
85
85
|
* Query threads within a project (session), with cursor-based pagination. Returns
|
|
86
86
|
* threads matching the given time range and optional filters.
|
|
87
87
|
*
|
|
88
|
+
* When `ai_search` is set, `Accept: text/event-stream` is required; requests
|
|
89
|
+
* without it return 406. AI search is unavailable on deployments that route
|
|
90
|
+
* queries to the v1 backend and returns 501 there.
|
|
91
|
+
*
|
|
88
92
|
* Self-hosted deployments require LangSmith `v0.16` or later.
|
|
89
93
|
*
|
|
90
94
|
* @example
|
|
@@ -1087,6 +1091,14 @@ export interface ThreadListTracesParams extends ItemsCursorGetPaginationParams {
|
|
|
1087
1091
|
}
|
|
1088
1092
|
|
|
1089
1093
|
export interface ThreadQueryParams extends ItemsCursorPostPaginationParams {
|
|
1094
|
+
/**
|
|
1095
|
+
* Body param: `ai_search` is a plain-language criterion evaluated against the
|
|
1096
|
+
* messages from the agent trajectory scoped to the thread. AND-ed with the
|
|
1097
|
+
* ordinary filters. Requires semantic filtering enabled for the deployment. Must
|
|
1098
|
+
* contain nonempty text of at most 2000 UTF-8 bytes.
|
|
1099
|
+
*/
|
|
1100
|
+
ai_search?: string;
|
|
1101
|
+
|
|
1090
1102
|
/**
|
|
1091
1103
|
* Body param: `filter` narrows which threads are returned, using a LangSmith
|
|
1092
1104
|
* filter expression evaluated against each thread's root run. For example:
|
|
@@ -1143,7 +1155,8 @@ export interface ThreadQueryParams extends ItemsCursorPostPaginationParams {
|
|
|
1143
1155
|
tree_filter?: string;
|
|
1144
1156
|
|
|
1145
1157
|
/**
|
|
1146
|
-
* Header param: application/json or text/event-stream
|
|
1158
|
+
* Header param: application/json, or text/event-stream (required when ai_search is
|
|
1159
|
+
* set)
|
|
1147
1160
|
*/
|
|
1148
1161
|
Accept?: string;
|
|
1149
1162
|
}
|