@tangle-network/agent-app 0.44.59 → 0.44.60
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/dist/assistant/index.js +1 -1
- package/dist/chat-routes/index.js +1 -1
- package/dist/{chunk-2UDJH6QR.js → chunk-APFJITYT.js} +66 -1
- package/dist/chunk-APFJITYT.js.map +1 -0
- package/dist/{chunk-HCOROIRT.js → chunk-S4YW2Y52.js} +8 -5
- package/dist/chunk-S4YW2Y52.js.map +1 -0
- package/dist/sandbox/index.d.ts +435 -27
- package/dist/sandbox/index.js +3 -1
- package/dist/web-react/index.js +1 -1
- package/dist/web-react/terminal.d.ts +48 -3
- package/dist/web-react/terminal.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-2UDJH6QR.js.map +0 -1
- package/dist/chunk-HCOROIRT.js.map +0 -1
package/dist/sandbox/index.d.ts
CHANGED
|
@@ -261,20 +261,67 @@ declare function statSandboxFileSize(box: SandboxExecChannel, absolutePath: stri
|
|
|
261
261
|
* mismatch is reported, never returned as a short buffer. */
|
|
262
262
|
declare function readSandboxBinaryBytes(box: SandboxExecChannel, absolutePath: string, expectedSize: number, options?: SandboxExecOptions): Promise<SandboxFileBytesOutcome>;
|
|
263
263
|
|
|
264
|
-
/**
|
|
264
|
+
/**
|
|
265
|
+
* Define identity details for a terminal proxy including user, workspace, and sandbox identifiers
|
|
266
|
+
*
|
|
267
|
+
* @deprecated Identity shape for the same-origin proxy terminal transport,
|
|
268
|
+
* superseded by the browser-direct scoped-token transport — build the route
|
|
269
|
+
* with `createSandboxTerminalConnectionRoute` (`src/sandbox/terminal-connection.ts`)
|
|
270
|
+
* instead. Three apps still import this seam; retirement is tracked in #350
|
|
271
|
+
* and removal is a major.
|
|
272
|
+
*/
|
|
265
273
|
interface TerminalProxyIdentity {
|
|
266
274
|
userId: string;
|
|
267
275
|
workspaceId: string;
|
|
268
276
|
sandboxId: string;
|
|
269
277
|
}
|
|
270
|
-
/**
|
|
278
|
+
/**
|
|
279
|
+
* Generate a signed token for TerminalProxyIdentity with an expiration based on TTL milliseconds
|
|
280
|
+
*
|
|
281
|
+
* @deprecated Mints a token for the same-origin proxy terminal transport,
|
|
282
|
+
* superseded by the browser-direct scoped-token transport — build the route
|
|
283
|
+
* with `createSandboxTerminalConnectionRoute` (`src/sandbox/terminal-connection.ts`)
|
|
284
|
+
* instead. Three apps still import this seam; retirement is tracked in #350
|
|
285
|
+
* and removal is a major.
|
|
286
|
+
*/
|
|
271
287
|
declare function mintTerminalProxyToken(secret: string, identity: TerminalProxyIdentity, ttlMs?: number, now?: () => number): Promise<Outcome<{
|
|
272
288
|
token: string;
|
|
273
289
|
expiresAt: Date;
|
|
274
290
|
}>>;
|
|
275
|
-
/**
|
|
291
|
+
/**
|
|
292
|
+
* Verify the authenticity and validity of a terminal proxy token against expected identity and timestamp
|
|
293
|
+
*
|
|
294
|
+
* @deprecated Verifies a token for the same-origin proxy terminal transport,
|
|
295
|
+
* superseded by the browser-direct scoped-token transport — build the route
|
|
296
|
+
* with `createSandboxTerminalConnectionRoute` (`src/sandbox/terminal-connection.ts`)
|
|
297
|
+
* instead. Three apps still import this seam; retirement is tracked in #350
|
|
298
|
+
* and removal is a major.
|
|
299
|
+
*/
|
|
276
300
|
declare function verifyTerminalProxyToken(secret: string, token: string, expected: TerminalProxyIdentity, now?: () => number): Promise<boolean>;
|
|
277
301
|
|
|
302
|
+
/**
|
|
303
|
+
* The same-origin PROXY terminal transport: connection handler -> HMAC proxy
|
|
304
|
+
* token -> runtime proxy -> WebSocket upgrade relay, with a worker in the
|
|
305
|
+
* data path for every terminal byte. Epic #343 / decision #341 moved the
|
|
306
|
+
* fleet default to the browser-direct scoped-token transport in
|
|
307
|
+
* `./terminal-connection.ts` — the product's server authenticates +
|
|
308
|
+
* provisions once, mints an SDK scoped token, and the browser connects
|
|
309
|
+
* `TerminalView` straight to the sidecar with no worker relay. Nothing here
|
|
310
|
+
* is removed (three apps still import this seam); retirement is tracked in
|
|
311
|
+
* #350 and removal is a major.
|
|
312
|
+
*
|
|
313
|
+
* KEPT / DEPRECATED split in this file:
|
|
314
|
+
*
|
|
315
|
+
* | export | status |
|
|
316
|
+
* | ---------------------------------------------- | ----------------------------------- |
|
|
317
|
+
* | `createWorkspaceSandboxManager` + friends | KEPT — generic box lifecycle, used by both transports |
|
|
318
|
+
* | `WorkspaceSandboxInstanceLike` | KEPT — same reason |
|
|
319
|
+
* | `createWorkspaceSandboxConnectionHandler` | `@deprecated` — proxy connection route |
|
|
320
|
+
* | `createWorkspaceSandboxRuntimeProxyHandler` | `@deprecated` — proxy runtime relay |
|
|
321
|
+
* | `createWorkspaceSandboxTerminalUpgradeHandler` | `@deprecated` — proxy WS upgrade relay |
|
|
322
|
+
* | `createSandboxTerminalToken` / `verifySandboxTerminalToken` | `@deprecated` — proxy HMAC token |
|
|
323
|
+
* | every other exported helper below | `@deprecated` — exists only to serve the proxy relay |
|
|
324
|
+
*/
|
|
278
325
|
/** Define the shape of a workspace sandbox instance including its connection details and status */
|
|
279
326
|
interface WorkspaceSandboxInstanceLike {
|
|
280
327
|
id: string;
|
|
@@ -316,28 +363,84 @@ interface WorkspaceSandboxManager<TBox extends WorkspaceSandboxInstanceLike, TEn
|
|
|
316
363
|
}
|
|
317
364
|
/** Create a manager to handle workspace sandbox instances with client and options configuration */
|
|
318
365
|
declare function createWorkspaceSandboxManager<TClient, TBox extends WorkspaceSandboxInstanceLike, TEnsureOptions = void>(opts: WorkspaceSandboxManagerOptions<TClient, TBox, TEnsureOptions>): WorkspaceSandboxManager<TBox, TEnsureOptions>;
|
|
319
|
-
/**
|
|
366
|
+
/**
|
|
367
|
+
* Define options for generating a sandbox terminal token including secret and expiration settings
|
|
368
|
+
*
|
|
369
|
+
* @deprecated Options for the same-origin proxy terminal transport's HMAC
|
|
370
|
+
* token, superseded by the browser-direct scoped-token transport — build the
|
|
371
|
+
* route with `createSandboxTerminalConnectionRoute`
|
|
372
|
+
* (`src/sandbox/terminal-connection.ts`) instead. Three apps still import
|
|
373
|
+
* this seam; retirement is tracked in #350 and removal is a major.
|
|
374
|
+
*/
|
|
320
375
|
interface SandboxTerminalTokenOptions {
|
|
321
376
|
secret?: string;
|
|
322
377
|
expiresInMs?: number;
|
|
323
378
|
now?: () => number;
|
|
324
379
|
}
|
|
325
|
-
/**
|
|
380
|
+
/**
|
|
381
|
+
* Resolve the identity type used for sandbox terminal token subjects
|
|
382
|
+
*
|
|
383
|
+
* @deprecated Identity alias for the same-origin proxy terminal transport,
|
|
384
|
+
* superseded by the browser-direct scoped-token transport — build the route
|
|
385
|
+
* with `createSandboxTerminalConnectionRoute`
|
|
386
|
+
* (`src/sandbox/terminal-connection.ts`) instead. Three apps still import
|
|
387
|
+
* this seam; retirement is tracked in #350 and removal is a major.
|
|
388
|
+
*/
|
|
326
389
|
type SandboxTerminalTokenSubject = TerminalProxyIdentity;
|
|
327
|
-
/**
|
|
390
|
+
/**
|
|
391
|
+
* Provide token and expiration details for a sandbox terminal session
|
|
392
|
+
*
|
|
393
|
+
* @deprecated Result shape for the same-origin proxy terminal transport's
|
|
394
|
+
* HMAC token, superseded by the browser-direct scoped-token transport —
|
|
395
|
+
* build the route with `createSandboxTerminalConnectionRoute`
|
|
396
|
+
* (`src/sandbox/terminal-connection.ts`) instead. Three apps still import
|
|
397
|
+
* this seam; retirement is tracked in #350 and removal is a major.
|
|
398
|
+
*/
|
|
328
399
|
interface SandboxTerminalTokenResult {
|
|
329
400
|
token: string;
|
|
330
401
|
expiresAt: Date;
|
|
331
402
|
}
|
|
332
|
-
/**
|
|
403
|
+
/**
|
|
404
|
+
* Generate a sandbox terminal token for a given subject with specified options
|
|
405
|
+
*
|
|
406
|
+
* @deprecated Mints a token for the same-origin proxy terminal transport,
|
|
407
|
+
* superseded by the browser-direct scoped-token transport — build the route
|
|
408
|
+
* with `createSandboxTerminalConnectionRoute`
|
|
409
|
+
* (`src/sandbox/terminal-connection.ts`) instead. Three apps still import
|
|
410
|
+
* this seam; retirement is tracked in #350 and removal is a major.
|
|
411
|
+
*/
|
|
333
412
|
declare function createSandboxTerminalToken(subject: SandboxTerminalTokenSubject, opts: SandboxTerminalTokenOptions): Promise<SandboxTerminalTokenResult>;
|
|
334
|
-
/**
|
|
413
|
+
/**
|
|
414
|
+
* Verify the validity of a sandbox terminal token against the expected identity and options
|
|
415
|
+
*
|
|
416
|
+
* @deprecated Verifies a token for the same-origin proxy terminal transport,
|
|
417
|
+
* superseded by the browser-direct scoped-token transport — build the route
|
|
418
|
+
* with `createSandboxTerminalConnectionRoute`
|
|
419
|
+
* (`src/sandbox/terminal-connection.ts`) instead. Three apps still import
|
|
420
|
+
* this seam; retirement is tracked in #350 and removal is a major.
|
|
421
|
+
*/
|
|
335
422
|
declare function verifySandboxTerminalToken(token: string, expected: SandboxTerminalTokenSubject, opts: SandboxTerminalTokenOptions): Promise<boolean>;
|
|
336
|
-
/**
|
|
423
|
+
/**
|
|
424
|
+
* Represent an authenticated user within a sandbox environment with a unique identifier
|
|
425
|
+
*
|
|
426
|
+
* @deprecated Exists only to serve the same-origin proxy terminal transport,
|
|
427
|
+
* superseded by the browser-direct scoped-token transport — build the route
|
|
428
|
+
* with `createSandboxTerminalConnectionRoute`
|
|
429
|
+
* (`src/sandbox/terminal-connection.ts`) instead. Three apps still import
|
|
430
|
+
* this seam; retirement is tracked in #350 and removal is a major.
|
|
431
|
+
*/
|
|
337
432
|
interface AuthenticatedSandboxUser {
|
|
338
433
|
id: string;
|
|
339
434
|
}
|
|
340
|
-
/**
|
|
435
|
+
/**
|
|
436
|
+
* Define options to handle workspace sandbox connections with user authentication and access control
|
|
437
|
+
*
|
|
438
|
+
* @deprecated Options for the same-origin proxy terminal connection handler,
|
|
439
|
+
* superseded by the browser-direct scoped-token transport — build the route
|
|
440
|
+
* with `createSandboxTerminalConnectionRoute`
|
|
441
|
+
* (`src/sandbox/terminal-connection.ts`) instead. Three apps still import
|
|
442
|
+
* this seam; retirement is tracked in #350 and removal is a major.
|
|
443
|
+
*/
|
|
341
444
|
interface WorkspaceSandboxConnectionHandlerOptions<TBox extends WorkspaceSandboxInstanceLike> {
|
|
342
445
|
requireUser: (request: Request) => Promise<AuthenticatedSandboxUser>;
|
|
343
446
|
requireWorkspaceAccess: (args: {
|
|
@@ -356,16 +459,40 @@ interface WorkspaceSandboxConnectionHandlerOptions<TBox extends WorkspaceSandbox
|
|
|
356
459
|
}) => string;
|
|
357
460
|
exposeDirectSidecar?: boolean;
|
|
358
461
|
}
|
|
359
|
-
/**
|
|
462
|
+
/**
|
|
463
|
+
* Define arguments required to establish a workspace sandbox connection
|
|
464
|
+
*
|
|
465
|
+
* @deprecated Argument shape for the same-origin proxy terminal connection
|
|
466
|
+
* handler, superseded by the browser-direct scoped-token transport — build
|
|
467
|
+
* the route with `createSandboxTerminalConnectionRoute`
|
|
468
|
+
* (`src/sandbox/terminal-connection.ts`) instead. Three apps still import
|
|
469
|
+
* this seam; retirement is tracked in #350 and removal is a major.
|
|
470
|
+
*/
|
|
360
471
|
interface WorkspaceSandboxConnectionArgs {
|
|
361
472
|
request: Request;
|
|
362
473
|
params: {
|
|
363
474
|
workspaceId?: string;
|
|
364
475
|
};
|
|
365
476
|
}
|
|
366
|
-
/**
|
|
477
|
+
/**
|
|
478
|
+
* Create a handler to resolve workspace sandbox connections with user and access validation
|
|
479
|
+
*
|
|
480
|
+
* @deprecated The same-origin proxy terminal transport is superseded by the
|
|
481
|
+
* browser-direct scoped-token transport — build the route with
|
|
482
|
+
* `createSandboxTerminalConnectionRoute` (`src/sandbox/terminal-connection.ts`)
|
|
483
|
+
* instead. Three apps still import this seam; retirement is tracked in #350
|
|
484
|
+
* and removal is a major.
|
|
485
|
+
*/
|
|
367
486
|
declare function createWorkspaceSandboxConnectionHandler<TBox extends WorkspaceSandboxInstanceLike>(opts: WorkspaceSandboxConnectionHandlerOptions<TBox>): ({ request, params }: WorkspaceSandboxConnectionArgs) => Promise<Response>;
|
|
368
|
-
/**
|
|
487
|
+
/**
|
|
488
|
+
* Define credentials required to access the sandbox API environment
|
|
489
|
+
*
|
|
490
|
+
* @deprecated Exists only to serve the same-origin proxy terminal transport,
|
|
491
|
+
* superseded by the browser-direct scoped-token transport — build the route
|
|
492
|
+
* with `createSandboxTerminalConnectionRoute`
|
|
493
|
+
* (`src/sandbox/terminal-connection.ts`) instead. Three apps still import
|
|
494
|
+
* this seam; retirement is tracked in #350 and removal is a major.
|
|
495
|
+
*/
|
|
369
496
|
interface SandboxApiCredentials {
|
|
370
497
|
baseUrl: string;
|
|
371
498
|
apiKey: string;
|
|
@@ -391,15 +518,37 @@ interface SandboxApiCredentials {
|
|
|
391
518
|
* terminal against it and rendered a permanent spinner.
|
|
392
519
|
*
|
|
393
520
|
* Exported so no product writes the path literal a fourth time.
|
|
521
|
+
*
|
|
522
|
+
* @deprecated Exists only to serve the same-origin proxy terminal transport,
|
|
523
|
+
* superseded by the browser-direct scoped-token transport — build the route
|
|
524
|
+
* with `createSandboxTerminalConnectionRoute`
|
|
525
|
+
* (`src/sandbox/terminal-connection.ts`) instead. Three apps still import
|
|
526
|
+
* this seam; retirement is tracked in #350 and removal is a major.
|
|
394
527
|
*/
|
|
395
528
|
declare function sandboxSidecarProxyUrl(baseUrl: string, sandboxId: string): string;
|
|
396
|
-
/**
|
|
529
|
+
/**
|
|
530
|
+
* Define a connection configuration for sandbox runtime including URL and optional server-side auth token
|
|
531
|
+
*
|
|
532
|
+
* @deprecated Exists only to serve the same-origin proxy terminal transport,
|
|
533
|
+
* superseded by the browser-direct scoped-token transport — build the route
|
|
534
|
+
* with `createSandboxTerminalConnectionRoute`
|
|
535
|
+
* (`src/sandbox/terminal-connection.ts`) instead. Three apps still import
|
|
536
|
+
* this seam; retirement is tracked in #350 and removal is a major.
|
|
537
|
+
*/
|
|
397
538
|
interface SandboxRuntimeConnection {
|
|
398
539
|
runtimeUrl: string;
|
|
399
540
|
/** Server-side sidecar bearer. Must authorize terminal routes; never expose it to browser code. */
|
|
400
541
|
authToken?: string;
|
|
401
542
|
}
|
|
402
|
-
/**
|
|
543
|
+
/**
|
|
544
|
+
* Define options for handling workspace sandbox runtime proxy including user, access, credentials, and connection retrieval
|
|
545
|
+
*
|
|
546
|
+
* @deprecated Options for the same-origin proxy terminal runtime relay,
|
|
547
|
+
* superseded by the browser-direct scoped-token transport — build the route
|
|
548
|
+
* with `createSandboxTerminalConnectionRoute`
|
|
549
|
+
* (`src/sandbox/terminal-connection.ts`) instead. Three apps still import
|
|
550
|
+
* this seam; retirement is tracked in #350 and removal is a major.
|
|
551
|
+
*/
|
|
403
552
|
interface WorkspaceSandboxRuntimeProxyHandlerOptions {
|
|
404
553
|
requireUser: (request: Request) => Promise<AuthenticatedSandboxUser>;
|
|
405
554
|
requireWorkspaceAccess: (args: {
|
|
@@ -424,7 +573,15 @@ interface WorkspaceSandboxRuntimeProxyHandlerOptions {
|
|
|
424
573
|
fetch?: typeof fetch;
|
|
425
574
|
forwardHeaders?: string[];
|
|
426
575
|
}
|
|
427
|
-
/**
|
|
576
|
+
/**
|
|
577
|
+
* Define arguments for proxying runtime requests within a workspace sandbox environment
|
|
578
|
+
*
|
|
579
|
+
* @deprecated Argument shape for the same-origin proxy terminal runtime
|
|
580
|
+
* relay, superseded by the browser-direct scoped-token transport — build the
|
|
581
|
+
* route with `createSandboxTerminalConnectionRoute`
|
|
582
|
+
* (`src/sandbox/terminal-connection.ts`) instead. Three apps still import
|
|
583
|
+
* this seam; retirement is tracked in #350 and removal is a major.
|
|
584
|
+
*/
|
|
428
585
|
interface WorkspaceSandboxRuntimeProxyArgs {
|
|
429
586
|
request: Request;
|
|
430
587
|
params: {
|
|
@@ -433,9 +590,25 @@ interface WorkspaceSandboxRuntimeProxyArgs {
|
|
|
433
590
|
'*'?: string;
|
|
434
591
|
};
|
|
435
592
|
}
|
|
436
|
-
/**
|
|
593
|
+
/**
|
|
594
|
+
* Create a proxy handler to resolve sandbox runtime requests with user and workspace access validation
|
|
595
|
+
*
|
|
596
|
+
* @deprecated The same-origin proxy terminal transport is superseded by the
|
|
597
|
+
* browser-direct scoped-token transport — build the route with
|
|
598
|
+
* `createSandboxTerminalConnectionRoute` (`src/sandbox/terminal-connection.ts`)
|
|
599
|
+
* instead. Three apps still import this seam; retirement is tracked in #350
|
|
600
|
+
* and removal is a major.
|
|
601
|
+
*/
|
|
437
602
|
declare function createWorkspaceSandboxRuntimeProxyHandler(opts: WorkspaceSandboxRuntimeProxyHandlerOptions): ({ request, params }: WorkspaceSandboxRuntimeProxyArgs) => Promise<Response>;
|
|
438
|
-
/**
|
|
603
|
+
/**
|
|
604
|
+
* Define the structure for matching a sandbox terminal WebSocket with workspace and path details
|
|
605
|
+
*
|
|
606
|
+
* @deprecated Exists only to serve the same-origin proxy terminal transport,
|
|
607
|
+
* superseded by the browser-direct scoped-token transport — build the route
|
|
608
|
+
* with `createSandboxTerminalConnectionRoute`
|
|
609
|
+
* (`src/sandbox/terminal-connection.ts`) instead. Three apps still import
|
|
610
|
+
* this seam; retirement is tracked in #350 and removal is a major.
|
|
611
|
+
*/
|
|
439
612
|
interface SandboxTerminalWsMatch {
|
|
440
613
|
workspaceId: string;
|
|
441
614
|
sandboxId: string;
|
|
@@ -448,11 +621,33 @@ interface SandboxTerminalWsMatch {
|
|
|
448
621
|
* (`/api/workspaces/:workspaceId/sandbox/runtime/:sandboxId`) with a canonical
|
|
449
622
|
* `terminals/:id/ws` sub-path. `subPath` is left URL-encoded for re-use in the
|
|
450
623
|
* upstream URL; the ids are decoded for auth checks.
|
|
624
|
+
*
|
|
625
|
+
* @deprecated Parses a path for the same-origin proxy terminal transport,
|
|
626
|
+
* superseded by the browser-direct scoped-token transport — build the route
|
|
627
|
+
* with `createSandboxTerminalConnectionRoute`
|
|
628
|
+
* (`src/sandbox/terminal-connection.ts`) instead. Three apps still import
|
|
629
|
+
* this seam; retirement is tracked in #350 and removal is a major.
|
|
451
630
|
*/
|
|
452
631
|
declare function matchSandboxTerminalWsPath(pathname: string): SandboxTerminalWsMatch | null;
|
|
453
|
-
/**
|
|
632
|
+
/**
|
|
633
|
+
* True when `request` is a WebSocket upgrade for a sandbox terminal path.
|
|
634
|
+
*
|
|
635
|
+
* @deprecated Exists only to serve the same-origin proxy terminal transport,
|
|
636
|
+
* superseded by the browser-direct scoped-token transport — build the route
|
|
637
|
+
* with `createSandboxTerminalConnectionRoute`
|
|
638
|
+
* (`src/sandbox/terminal-connection.ts`) instead. Three apps still import
|
|
639
|
+
* this seam; retirement is tracked in #350 and removal is a major.
|
|
640
|
+
*/
|
|
454
641
|
declare function isSandboxTerminalWsUpgrade(request: Request): boolean;
|
|
455
|
-
/**
|
|
642
|
+
/**
|
|
643
|
+
* Define options to handle user authentication, workspace access, and sandbox API credential retrieval
|
|
644
|
+
*
|
|
645
|
+
* @deprecated Options for the same-origin proxy terminal WS upgrade relay,
|
|
646
|
+
* superseded by the browser-direct scoped-token transport — build the route
|
|
647
|
+
* with `createSandboxTerminalConnectionRoute`
|
|
648
|
+
* (`src/sandbox/terminal-connection.ts`) instead. Three apps still import
|
|
649
|
+
* this seam; retirement is tracked in #350 and removal is a major.
|
|
650
|
+
*/
|
|
456
651
|
interface WorkspaceSandboxTerminalUpgradeHandlerOptions {
|
|
457
652
|
requireUser: (request: Request) => Promise<AuthenticatedSandboxUser>;
|
|
458
653
|
requireWorkspaceAccess: (args: {
|
|
@@ -486,9 +681,23 @@ interface WorkspaceSandboxTerminalUpgradeHandlerOptions {
|
|
|
486
681
|
* const handled = await handleSandboxTerminalUpgrade(request)
|
|
487
682
|
* if (handled) return handled
|
|
488
683
|
* ```
|
|
684
|
+
*
|
|
685
|
+
* @deprecated The same-origin proxy terminal transport is superseded by the
|
|
686
|
+
* browser-direct scoped-token transport — build the route with
|
|
687
|
+
* `createSandboxTerminalConnectionRoute` (`src/sandbox/terminal-connection.ts`)
|
|
688
|
+
* instead. Three apps still import this seam; retirement is tracked in #350
|
|
689
|
+
* and removal is a major.
|
|
489
690
|
*/
|
|
490
691
|
declare function createWorkspaceSandboxTerminalUpgradeHandler(opts: WorkspaceSandboxTerminalUpgradeHandlerOptions): (request: Request) => Promise<Response | null>;
|
|
491
|
-
/**
|
|
692
|
+
/**
|
|
693
|
+
* A response-like shape carrying just what the subprotocol echo decision reads.
|
|
694
|
+
*
|
|
695
|
+
* @deprecated Exists only to serve the same-origin proxy terminal transport,
|
|
696
|
+
* superseded by the browser-direct scoped-token transport — build the route
|
|
697
|
+
* with `createSandboxTerminalConnectionRoute`
|
|
698
|
+
* (`src/sandbox/terminal-connection.ts`) instead. Three apps still import
|
|
699
|
+
* this seam; retirement is tracked in #350 and removal is a major.
|
|
700
|
+
*/
|
|
492
701
|
interface TerminalUpgradeResponseLike {
|
|
493
702
|
status: number;
|
|
494
703
|
statusText?: string;
|
|
@@ -509,6 +718,12 @@ interface TerminalUpgradeResponseLike {
|
|
|
509
718
|
*
|
|
510
719
|
* Kept as a pure function because a 101 `Response` cannot be constructed off
|
|
511
720
|
* Workers, so this is the only part of the decision a test can drive directly.
|
|
721
|
+
*
|
|
722
|
+
* @deprecated Exists only to serve the same-origin proxy terminal transport,
|
|
723
|
+
* superseded by the browser-direct scoped-token transport — build the route
|
|
724
|
+
* with `createSandboxTerminalConnectionRoute`
|
|
725
|
+
* (`src/sandbox/terminal-connection.ts`) instead. Three apps still import
|
|
726
|
+
* this seam; retirement is tracked in #350 and removal is a major.
|
|
512
727
|
*/
|
|
513
728
|
declare function terminalUpgradeSubprotocolEcho(upstream: TerminalUpgradeResponseLike, browserProtocol: string | null): {
|
|
514
729
|
status: number;
|
|
@@ -522,19 +737,212 @@ declare function terminalUpgradeSubprotocolEcho(upstream: TerminalUpgradeRespons
|
|
|
522
737
|
* Takes the raw `Sec-WebSocket-Protocol` value rather than the `Headers`, to
|
|
523
738
|
* match its siblings `bearerSubprotocolToken` and `stripBearerSubprotocol` —
|
|
524
739
|
* one shape for the whole family, and the caller reads the header once.
|
|
740
|
+
*
|
|
741
|
+
* @deprecated Exists only to serve the same-origin proxy terminal transport,
|
|
742
|
+
* superseded by the browser-direct scoped-token transport — build the route
|
|
743
|
+
* with `createSandboxTerminalConnectionRoute`
|
|
744
|
+
* (`src/sandbox/terminal-connection.ts`) instead. Three apps still import
|
|
745
|
+
* this seam; retirement is tracked in #350 and removal is a major.
|
|
525
746
|
*/
|
|
526
747
|
declare function selectedBearerSubprotocol(value: string | null): string | null;
|
|
527
|
-
/**
|
|
748
|
+
/**
|
|
749
|
+
* Build proxy headers for sandbox runtime including authorization and forwarded headers
|
|
750
|
+
*
|
|
751
|
+
* @deprecated Exists only to serve the same-origin proxy terminal transport,
|
|
752
|
+
* superseded by the browser-direct scoped-token transport — build the route
|
|
753
|
+
* with `createSandboxTerminalConnectionRoute`
|
|
754
|
+
* (`src/sandbox/terminal-connection.ts`) instead. Three apps still import
|
|
755
|
+
* this seam; retirement is tracked in #350 and removal is a major.
|
|
756
|
+
*/
|
|
528
757
|
declare function buildSandboxRuntimeProxyHeaders(source: Headers, sandboxApiKey: string, forwardHeaders?: string[]): Headers;
|
|
529
|
-
/**
|
|
758
|
+
/**
|
|
759
|
+
* Encode a runtime path by URI-encoding each valid segment and returning null for invalid segments
|
|
760
|
+
*
|
|
761
|
+
* @deprecated Exists only to serve the same-origin proxy terminal transport,
|
|
762
|
+
* superseded by the browser-direct scoped-token transport — build the route
|
|
763
|
+
* with `createSandboxTerminalConnectionRoute`
|
|
764
|
+
* (`src/sandbox/terminal-connection.ts`) instead. Three apps still import
|
|
765
|
+
* this seam; retirement is tracked in #350 and removal is a major.
|
|
766
|
+
*/
|
|
530
767
|
declare function encodeSandboxRuntimePath(runtimePath: string): string | null;
|
|
531
|
-
/**
|
|
768
|
+
/**
|
|
769
|
+
* Extract the token from a bearer authorization string or return null if invalid or missing
|
|
770
|
+
*
|
|
771
|
+
* @deprecated Exists only to serve the same-origin proxy terminal transport,
|
|
772
|
+
* superseded by the browser-direct scoped-token transport — build the route
|
|
773
|
+
* with `createSandboxTerminalConnectionRoute`
|
|
774
|
+
* (`src/sandbox/terminal-connection.ts`) instead. Three apps still import
|
|
775
|
+
* this seam; retirement is tracked in #350 and removal is a major.
|
|
776
|
+
*/
|
|
532
777
|
declare function bearerToken(value: string | null): string | null;
|
|
533
|
-
/**
|
|
778
|
+
/**
|
|
779
|
+
* Resolve and decode a bearer token from a comma-separated subprotocol string or return null
|
|
780
|
+
*
|
|
781
|
+
* @deprecated Exists only to serve the same-origin proxy terminal transport,
|
|
782
|
+
* superseded by the browser-direct scoped-token transport — build the route
|
|
783
|
+
* with `createSandboxTerminalConnectionRoute`
|
|
784
|
+
* (`src/sandbox/terminal-connection.ts`) instead. Three apps still import
|
|
785
|
+
* this seam; retirement is tracked in #350 and removal is a major.
|
|
786
|
+
*/
|
|
534
787
|
declare function bearerSubprotocolToken(value: string | null): string | null;
|
|
535
|
-
/**
|
|
788
|
+
/**
|
|
789
|
+
* Resolve the terminal token from request headers using Authorization or Sec-WebSocket-Protocol fields
|
|
790
|
+
*
|
|
791
|
+
* @deprecated Exists only to serve the same-origin proxy terminal transport,
|
|
792
|
+
* superseded by the browser-direct scoped-token transport — build the route
|
|
793
|
+
* with `createSandboxTerminalConnectionRoute`
|
|
794
|
+
* (`src/sandbox/terminal-connection.ts`) instead. Three apps still import
|
|
795
|
+
* this seam; retirement is tracked in #350 and removal is a major.
|
|
796
|
+
*/
|
|
536
797
|
declare function terminalTokenFromRequest(headers: Headers): string | null;
|
|
537
798
|
|
|
799
|
+
/**
|
|
800
|
+
* Browser-direct scoped-token terminal connection route (#341/#349).
|
|
801
|
+
*
|
|
802
|
+
* Epic #343 / decision #341: the fleet's terminal transport is browser-direct
|
|
803
|
+
* — the product's server authenticates the request and provisions/resolves
|
|
804
|
+
* the sandbox exactly once, mints a short-lived SDK scoped token
|
|
805
|
+
* (`box.mintScopedToken`), and hands the browser just enough to connect
|
|
806
|
+
* `TerminalView` straight to the sidecar. No worker relays terminal bytes for
|
|
807
|
+
* this shape — that is the proxy transport in `./workspace-terminal` +
|
|
808
|
+
* `./terminal-proxy-token`, now `@deprecated` in favor of this one
|
|
809
|
+
* (retirement tracked in #350; nothing removed, three apps still import it).
|
|
810
|
+
*
|
|
811
|
+
* VERIFIED PLATFORM CONTRACT (`@tangle-network/sandbox` 0.15.2 + the
|
|
812
|
+
* orchestrator/sidecar enforcement source, verified 2026-07-30):
|
|
813
|
+
*
|
|
814
|
+
* 1. Only a `scope: 'session-runtime'` token carries the `terminal`
|
|
815
|
+
* capability (`cap: ["read", "workspace", "terminal"]`). `'project'` and
|
|
816
|
+
* `'session'` mint SessionGateway READ tokens (HS256, `typ: "read"`, no
|
|
817
|
+
* `cap` claim at all — a different token family the sidecar rejects
|
|
818
|
+
* outright); `'read-only'` carries `cap: ["read"]` only. **No scope other
|
|
819
|
+
* than `'session-runtime'` can ever open a terminal**, which is why this
|
|
820
|
+
* route no longer takes `scope` as a parameter — it is pinned.
|
|
821
|
+
* 2. The orchestrator's terminal WS gate fails closed unless the token's
|
|
822
|
+
* `sid` claim EQUALS the `<connectionId>` path segment of
|
|
823
|
+
* `/terminals/<connectionId>/ws`
|
|
824
|
+
* (`verifyScopedSidecarCapability(sidecar, token, "terminal", connectionId)`).
|
|
825
|
+
* So `mintScopedToken({ scope: 'session-runtime', sessionId })` MUST be
|
|
826
|
+
* called with `sessionId === connectionId` — the exact id `TerminalView`
|
|
827
|
+
* will dial. That is why this route threads a `connectionId` end to end
|
|
828
|
+
* instead of deriving its own session id.
|
|
829
|
+
* 3. The browser-safe terminal base is the mint result's `sidecarProxyUrl`
|
|
830
|
+
* (`/v1/sidecar-proxy/{id}` on the Sandbox API) — **not**
|
|
831
|
+
* `box.connection.runtimeUrl`. The SDK's own `_attachTerminal` is the
|
|
832
|
+
* reference implementation:
|
|
833
|
+
* `mintScopedToken({ scope: 'session-runtime', sessionId: connectionId })`
|
|
834
|
+
* then dial `${scoped.sidecarProxyUrl}/terminals/${connectionId}/ws`.
|
|
835
|
+
* Pointing `TerminalView` at `runtimeUrl` fails auth regardless of scope —
|
|
836
|
+
* only the sidecar-proxy hop decodes the browser's
|
|
837
|
+
* `bearer.<base64url>` WS subprotocol.
|
|
838
|
+
*
|
|
839
|
+
* HISTORICAL NOTE: an earlier shape of this route (and legal-agent's
|
|
840
|
+
* production route it was modeled on, `scope: 'project'` +
|
|
841
|
+
* `connection.runtimeUrl`) predates the platform's terminal-auth hardening —
|
|
842
|
+
* the terminal capability gate (2026-06-19), the scoped-token terminal WS
|
|
843
|
+
* path (2026-07-15), and the `sid`-binding fail-closed check
|
|
844
|
+
* (2026-07-17/18). That shape does not authenticate on the current platform
|
|
845
|
+
* and is not a valid spec for the token path anymore.
|
|
846
|
+
*
|
|
847
|
+
* SECURITY POSTURE: unlike the read-only session-gateway streaming token
|
|
848
|
+
* (`box.mintScopedToken({scope:'session'})` paired with
|
|
849
|
+
* `SessionGatewayClient`), the token this route mints grants **command
|
|
850
|
+
* execution** in the sandbox once handed to `TerminalView`. Its safety rests
|
|
851
|
+
* on a **short TTL** (default 15 minutes, the SDK's own max — still a caller
|
|
852
|
+
* parameter) and, structurally, the narrowest scope the platform offers: one
|
|
853
|
+
* box (`ensureSandbox` resolved it for THIS user), one terminal connection
|
|
854
|
+
* (`session-runtime` bound to a single `sid`). Widening the TTL default
|
|
855
|
+
* without an explicit reason is a security regression, not a convenience.
|
|
856
|
+
*
|
|
857
|
+
* Wire contract: the browser passes the response's `sidecarUrl` as
|
|
858
|
+
* `TerminalView`'s `apiUrl` prop, `token` as its token prop, and the
|
|
859
|
+
* response's echoed `connectionId` as `TerminalView`'s `connectionId` prop —
|
|
860
|
+
* the token's `sid` is bound to exactly that id, so any other value fails the
|
|
861
|
+
* WS upgrade. sandbox-ui sends the token as a `bearer.<base64url>` WebSocket
|
|
862
|
+
* subprotocol (browsers cannot set `Authorization` on a WS handshake).
|
|
863
|
+
* `useSandboxTerminalConnection` (`../web-react/sandbox-terminal`) carries
|
|
864
|
+
* `connectionId` through automatically.
|
|
865
|
+
*/
|
|
866
|
+
/** The structural surface this route needs from an SDK sandbox box — no `@tangle-network/sandbox` class import (invariant 3). */
|
|
867
|
+
interface TerminalConnectionBoxLike {
|
|
868
|
+
id: string;
|
|
869
|
+
status?: string;
|
|
870
|
+
connection?: {
|
|
871
|
+
runtimeUrl?: string;
|
|
872
|
+
};
|
|
873
|
+
mintScopedToken(opts: {
|
|
874
|
+
scope: string;
|
|
875
|
+
sessionId?: string;
|
|
876
|
+
ttlMinutes?: number;
|
|
877
|
+
}): Promise<{
|
|
878
|
+
token: string;
|
|
879
|
+
expiresAt: Date;
|
|
880
|
+
sidecarProxyUrl: string;
|
|
881
|
+
}>;
|
|
882
|
+
}
|
|
883
|
+
/** Configuration for {@link createSandboxTerminalConnectionRoute}. */
|
|
884
|
+
interface SandboxTerminalConnectionRouteOptions<TBox extends TerminalConnectionBoxLike, TUser> {
|
|
885
|
+
/**
|
|
886
|
+
* Authenticate the incoming request. Return the authenticated user, or a
|
|
887
|
+
* `Response` to short-circuit the route (e.g. a 401) — that Response is
|
|
888
|
+
* returned to the caller verbatim.
|
|
889
|
+
*/
|
|
890
|
+
requireUser(request: Request): Promise<TUser | Response>;
|
|
891
|
+
/**
|
|
892
|
+
* Resolve (provisioning if needed) the sandbox this user's terminal should
|
|
893
|
+
* connect to. Domain-specific provisioning (workspace- vs user-scoped,
|
|
894
|
+
* naming, reuse) stays entirely in the product's implementation of this
|
|
895
|
+
* seam — the route only reacts to success/failure.
|
|
896
|
+
*/
|
|
897
|
+
ensureSandbox(user: TUser, request: Request): Promise<TBox>;
|
|
898
|
+
/** `box.mintScopedToken` TTL in minutes. Default `15` (the SDK's own max). */
|
|
899
|
+
ttlMinutes?: number;
|
|
900
|
+
/**
|
|
901
|
+
* Resolve the terminal connection id the minted token's `sid` is bound to
|
|
902
|
+
* — this MUST be the same id `TerminalView` dials
|
|
903
|
+
* (`tabTerminalConnectionId()`), because the orchestrator's terminal WS
|
|
904
|
+
* gate fails closed unless `sid === <connectionId>` in
|
|
905
|
+
* `/terminals/<connectionId>/ws`.
|
|
906
|
+
*
|
|
907
|
+
* `requested` is `new URL(request.url).searchParams.get('connectionId')`.
|
|
908
|
+
* The default resolver returns `requested` unchanged. A product may
|
|
909
|
+
* validate/namespace the id here (e.g. a per-user prefix in a shared box)
|
|
910
|
+
* — if it rewrites the id, the client MUST use the response's echoed
|
|
911
|
+
* `connectionId`, since the sid binding makes any other id fail the WS
|
|
912
|
+
* upgrade.
|
|
913
|
+
*
|
|
914
|
+
* A resolved falsy/empty value fails the request with a 400 before any
|
|
915
|
+
* sandbox work happens.
|
|
916
|
+
*/
|
|
917
|
+
resolveConnectionId?: (ctx: {
|
|
918
|
+
request: Request;
|
|
919
|
+
user: TUser;
|
|
920
|
+
box: TBox;
|
|
921
|
+
requested: string | null;
|
|
922
|
+
}) => string | null | undefined | Promise<string | null | undefined>;
|
|
923
|
+
}
|
|
924
|
+
/**
|
|
925
|
+
* Build the browser-direct terminal connection route: `GET` handler that
|
|
926
|
+
* authenticates, resolves the sandbox, mints a scoped token pinned to
|
|
927
|
+
* `scope: 'session-runtime'` (the ONLY scope the platform grants the
|
|
928
|
+
* `terminal` capability to), and returns exactly what the browser needs to
|
|
929
|
+
* connect `TerminalView` directly to the sidecar — no worker in the data
|
|
930
|
+
* path once the terminal is open.
|
|
931
|
+
*
|
|
932
|
+
* Response shapes:
|
|
933
|
+
* - `requireUser` returns a `Response` → that `Response`, verbatim.
|
|
934
|
+
* - `ensureSandbox` throws → `500 {error}` (the thrown message surfaced).
|
|
935
|
+
* - `box.connection?.runtimeUrl` missing → `503 {error, status: box.status}`
|
|
936
|
+
* — this is a READINESS gate only; the URL returned to the client on
|
|
937
|
+
* success is always the mint's `sidecarProxyUrl`, never `runtimeUrl`.
|
|
938
|
+
* - resolved connection id is falsy/empty → `400 {error}`.
|
|
939
|
+
* - `box.mintScopedToken` rejects → `503 {error}`.
|
|
940
|
+
* - success → `200 {sidecarUrl, token, expiresAt, status, sandboxId, connectionId}`.
|
|
941
|
+
* `connectionId` is the id the token's `sid` is bound to — the client MUST
|
|
942
|
+
* hand this (not its own) to `TerminalView`.
|
|
943
|
+
*/
|
|
944
|
+
declare function createSandboxTerminalConnectionRoute<TBox extends TerminalConnectionBoxLike, TUser>(opts: SandboxTerminalConnectionRouteOptions<TBox, TUser>): (request: Request) => Promise<Response>;
|
|
945
|
+
|
|
538
946
|
/**
|
|
539
947
|
* `createSandboxPrewarmer` — "this user just opened this project; start warming
|
|
540
948
|
* their box" as a shell primitive, so every agent-app product gets the same
|
|
@@ -1339,4 +1747,4 @@ declare function isTerminalPromptEvent(event: unknown): boolean;
|
|
|
1339
1747
|
/** Resolve the interactive question text from a structured event or return null if none found */
|
|
1340
1748
|
declare function detectInteractiveQuestion(event: unknown): string | null;
|
|
1341
1749
|
|
|
1342
|
-
export { type AppToolDescriptor, type AuthenticatedSandboxUser, type BuildAppToolMcpServersOptions, type BuildSandboxToolFileMountsOptions, type D1PrewarmClaimStoreOptions, DEFAULT_PREWARM_CLAIM_TABLE, DEFAULT_SANDBOX_RESOURCES, DEFAULT_SIDECAR_PROCESS_PATTERN, type DriveSandboxTurnOptions, ENV_TOTAL_MAX_BYTES, ENV_VALUE_MAX_BYTES, type EnsureWorkspaceSandboxOptions, type LivenessProbeConfig, type MemberSyncSeam, type ModelSelection, type ModelSelectionError, type ModelSelectionFailure, type ModelSelectionSource, type Outcome, PREWARM_CLAIM_TABLE_DDL, PROVISION_PAYLOAD_MAX_BYTES, type PeekWorkspaceSandboxOutcome, type PrewarmClaimD1Like, type PrewarmClaimStore, type PrewarmDecision, type PrewarmEvent, type PrewarmOutcome, type PrewarmResult, type ProfileComposeOptions, type PromptInputPart, type ProviderResolutionConfig, type ProvisionPayloadSections, type ProvisionProfileSection, type ResolveSandboxClientCredentialsOptions, type ResolvedModel, type SandboxApiCredentials, type SandboxBuildContext, type SandboxClientCredentials, type SandboxCredentialEnvironment, SandboxEgressPolicyMismatchError, type SandboxEgressPolicySource, type SandboxExecChannel, type SandboxExecOptions, type SandboxExistingBoxStage, type SandboxFileBytesOutcome, type SandboxFileSizeOutcome, SandboxModelResolutionError, type SandboxPermissionLevel, type SandboxPrewarmScope, type SandboxPrewarmer, type SandboxPrewarmerOptions, type SandboxReadiness, SandboxRecoveryFailedError, type SandboxRecoveryPhase, type SandboxResourceConfig, type SandboxRestoreSpec, SandboxRuntimeAuthRefreshError, type SandboxRuntimeConfig, type SandboxRuntimeConnection, type SandboxScope, type SandboxStepTransition, type SandboxTerminalTokenOptions, type SandboxTerminalTokenResult, type SandboxTerminalTokenSubject, type SandboxTerminalWsMatch, type SandboxToolPathOptions, type SandboxToolSpec, type ScopedTokenResult, type SecretStore, type StoppedSandboxResumeFailure, type StoppedSandboxResumeRecovery, type StreamSandboxPromptOptions, type TerminalProxyIdentity, type TerminalUpgradeResponseLike, type WorkspaceSandboxConnectionArgs, type WorkspaceSandboxConnectionHandlerOptions, type WorkspaceSandboxEnsureContext, type WorkspaceSandboxInstanceLike, type WorkspaceSandboxManager, type WorkspaceSandboxManagerOptions, type WorkspaceSandboxRuntimeProxyArgs, type WorkspaceSandboxRuntimeProxyHandlerOptions, type WorkspaceSandboxTerminalUpgradeHandlerOptions, type WriteProfileFilesOptions, assertEnvWithinLimits, assertProvisionPayloadWithinCap, attachReasoningEffort, bearerSubprotocolToken, bearerToken, buildAppToolMcpServers, buildSandboxRuntimeProxyHeaders, buildSandboxToolFileMounts, buildSandboxToolPathSetupScript, classifySeveredStream, collectSandboxPromptText, createD1PrewarmClaimStore, createSandboxPrewarmer, createSandboxTerminalToken, createWorkspaceSandboxConnectionHandler, createWorkspaceSandboxManager, createWorkspaceSandboxRuntimeProxyHandler, createWorkspaceSandboxTerminalUpgradeHandler, deferredCorpusHash, deleteSecret, detectInteractiveQuestion, driveSandboxTurn, encodeSandboxRuntimePath, ensureWorkspaceSandbox, flattenHistory, getClient, isSandboxTerminalWsUpgrade, isTerminalPromptEvent, matchSandboxTerminalWsPath, mergeExtraMcp, mergeHistoryIntoParts, mintSandboxScopedToken, mintTerminalProxyToken, peekWorkspaceSandbox, readSandboxBinaryBytes, readSecret, requireTransportableModel, resetClientCache, resolveModel, resolveModelSelection, resolveSandboxClientCredentials, runSandboxPrompt, runSandboxToolPathSetup, sandboxSidecarProxyUrl, sandboxToolBinDir, sandboxToolPath, sandboxToolRootDir, secretStoreFromClient, selectedBearerSubprotocol, shellQuote, splitDeferredProfileFiles, statSandboxFileSize, storeSecret, streamSandboxPrompt, syncSandboxMemberAdd, syncSandboxMemberRemove, syncSandboxMemberRole, terminalTokenFromRequest, terminalUpgradeSubprotocolEcho, verifySandboxTerminalToken, verifyTerminalProxyToken, writeProfileFilesToBox };
|
|
1750
|
+
export { type AppToolDescriptor, type AuthenticatedSandboxUser, type BuildAppToolMcpServersOptions, type BuildSandboxToolFileMountsOptions, type D1PrewarmClaimStoreOptions, DEFAULT_PREWARM_CLAIM_TABLE, DEFAULT_SANDBOX_RESOURCES, DEFAULT_SIDECAR_PROCESS_PATTERN, type DriveSandboxTurnOptions, ENV_TOTAL_MAX_BYTES, ENV_VALUE_MAX_BYTES, type EnsureWorkspaceSandboxOptions, type LivenessProbeConfig, type MemberSyncSeam, type ModelSelection, type ModelSelectionError, type ModelSelectionFailure, type ModelSelectionSource, type Outcome, PREWARM_CLAIM_TABLE_DDL, PROVISION_PAYLOAD_MAX_BYTES, type PeekWorkspaceSandboxOutcome, type PrewarmClaimD1Like, type PrewarmClaimStore, type PrewarmDecision, type PrewarmEvent, type PrewarmOutcome, type PrewarmResult, type ProfileComposeOptions, type PromptInputPart, type ProviderResolutionConfig, type ProvisionPayloadSections, type ProvisionProfileSection, type ResolveSandboxClientCredentialsOptions, type ResolvedModel, type SandboxApiCredentials, type SandboxBuildContext, type SandboxClientCredentials, type SandboxCredentialEnvironment, SandboxEgressPolicyMismatchError, type SandboxEgressPolicySource, type SandboxExecChannel, type SandboxExecOptions, type SandboxExistingBoxStage, type SandboxFileBytesOutcome, type SandboxFileSizeOutcome, SandboxModelResolutionError, type SandboxPermissionLevel, type SandboxPrewarmScope, type SandboxPrewarmer, type SandboxPrewarmerOptions, type SandboxReadiness, SandboxRecoveryFailedError, type SandboxRecoveryPhase, type SandboxResourceConfig, type SandboxRestoreSpec, SandboxRuntimeAuthRefreshError, type SandboxRuntimeConfig, type SandboxRuntimeConnection, type SandboxScope, type SandboxStepTransition, type SandboxTerminalConnectionRouteOptions, type SandboxTerminalTokenOptions, type SandboxTerminalTokenResult, type SandboxTerminalTokenSubject, type SandboxTerminalWsMatch, type SandboxToolPathOptions, type SandboxToolSpec, type ScopedTokenResult, type SecretStore, type StoppedSandboxResumeFailure, type StoppedSandboxResumeRecovery, type StreamSandboxPromptOptions, type TerminalConnectionBoxLike, type TerminalProxyIdentity, type TerminalUpgradeResponseLike, type WorkspaceSandboxConnectionArgs, type WorkspaceSandboxConnectionHandlerOptions, type WorkspaceSandboxEnsureContext, type WorkspaceSandboxInstanceLike, type WorkspaceSandboxManager, type WorkspaceSandboxManagerOptions, type WorkspaceSandboxRuntimeProxyArgs, type WorkspaceSandboxRuntimeProxyHandlerOptions, type WorkspaceSandboxTerminalUpgradeHandlerOptions, type WriteProfileFilesOptions, assertEnvWithinLimits, assertProvisionPayloadWithinCap, attachReasoningEffort, bearerSubprotocolToken, bearerToken, buildAppToolMcpServers, buildSandboxRuntimeProxyHeaders, buildSandboxToolFileMounts, buildSandboxToolPathSetupScript, classifySeveredStream, collectSandboxPromptText, createD1PrewarmClaimStore, createSandboxPrewarmer, createSandboxTerminalConnectionRoute, createSandboxTerminalToken, createWorkspaceSandboxConnectionHandler, createWorkspaceSandboxManager, createWorkspaceSandboxRuntimeProxyHandler, createWorkspaceSandboxTerminalUpgradeHandler, deferredCorpusHash, deleteSecret, detectInteractiveQuestion, driveSandboxTurn, encodeSandboxRuntimePath, ensureWorkspaceSandbox, flattenHistory, getClient, isSandboxTerminalWsUpgrade, isTerminalPromptEvent, matchSandboxTerminalWsPath, mergeExtraMcp, mergeHistoryIntoParts, mintSandboxScopedToken, mintTerminalProxyToken, peekWorkspaceSandbox, readSandboxBinaryBytes, readSecret, requireTransportableModel, resetClientCache, resolveModel, resolveModelSelection, resolveSandboxClientCredentials, runSandboxPrompt, runSandboxToolPathSetup, sandboxSidecarProxyUrl, sandboxToolBinDir, sandboxToolPath, sandboxToolRootDir, secretStoreFromClient, selectedBearerSubprotocol, shellQuote, splitDeferredProfileFiles, statSandboxFileSize, storeSecret, streamSandboxPrompt, syncSandboxMemberAdd, syncSandboxMemberRemove, syncSandboxMemberRole, terminalTokenFromRequest, terminalUpgradeSubprotocolEcho, verifySandboxTerminalToken, verifyTerminalProxyToken, writeProfileFilesToBox };
|
package/dist/sandbox/index.js
CHANGED
|
@@ -23,6 +23,7 @@ import {
|
|
|
23
23
|
collectSandboxPromptText,
|
|
24
24
|
createD1PrewarmClaimStore,
|
|
25
25
|
createSandboxPrewarmer,
|
|
26
|
+
createSandboxTerminalConnectionRoute,
|
|
26
27
|
createSandboxTerminalToken,
|
|
27
28
|
createWorkspaceSandboxConnectionHandler,
|
|
28
29
|
createWorkspaceSandboxManager,
|
|
@@ -72,7 +73,7 @@ import {
|
|
|
72
73
|
verifySandboxTerminalToken,
|
|
73
74
|
verifyTerminalProxyToken,
|
|
74
75
|
writeProfileFilesToBox
|
|
75
|
-
} from "../chunk-
|
|
76
|
+
} from "../chunk-APFJITYT.js";
|
|
76
77
|
import "../chunk-LWSJK546.js";
|
|
77
78
|
import "../chunk-CQZSAR77.js";
|
|
78
79
|
import "../chunk-ICOHEZK6.js";
|
|
@@ -105,6 +106,7 @@ export {
|
|
|
105
106
|
collectSandboxPromptText,
|
|
106
107
|
createD1PrewarmClaimStore,
|
|
107
108
|
createSandboxPrewarmer,
|
|
109
|
+
createSandboxTerminalConnectionRoute,
|
|
108
110
|
createSandboxTerminalToken,
|
|
109
111
|
createWorkspaceSandboxConnectionHandler,
|
|
110
112
|
createWorkspaceSandboxManager,
|
package/dist/web-react/index.js
CHANGED