@tangle-network/agent-app 0.44.28 → 0.44.29
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/sandbox/index.d.ts
CHANGED
|
@@ -369,6 +369,29 @@ interface SandboxApiCredentials {
|
|
|
369
369
|
baseUrl: string;
|
|
370
370
|
apiKey: string;
|
|
371
371
|
}
|
|
372
|
+
/**
|
|
373
|
+
* Build the sandbox API's sidecar-proxy base for a box:
|
|
374
|
+
* `{baseUrl}/v1/sidecar-proxy/{sandboxId}`.
|
|
375
|
+
*
|
|
376
|
+
* This is the ONLY upstream that serves the interactive terminal. Measured on
|
|
377
|
+
* production (`sandbox.tangle.tools`, one box, `ws` client, same credential in
|
|
378
|
+
* every arm):
|
|
379
|
+
*
|
|
380
|
+
* | upstream base | result |
|
|
381
|
+
* |----------------------------------------|---------------------------------|
|
|
382
|
+
* | `/v1/sidecar-proxy/{id}` | 101 -> `ready` 2551ms -> shell |
|
|
383
|
+
* | `/v1/sandboxes/{id}/runtime/` | HTTP 500 |
|
|
384
|
+
* | `connection.runtimeUrl` (the box host) | 101 then close 1000, 0 bytes |
|
|
385
|
+
*
|
|
386
|
+
* The box's own `connection.runtimeUrl` (`https://sandbox-*.tangle.sh`) accepts
|
|
387
|
+
* the upgrade — its Caddy front end upgrades every path, including ones that do
|
|
388
|
+
* not exist — and then hangs up without a PTY. A 101 from that host therefore
|
|
389
|
+
* proves nothing; only a `ready` control frame does. Two products shipped a
|
|
390
|
+
* terminal against it and rendered a permanent spinner.
|
|
391
|
+
*
|
|
392
|
+
* Exported so no product writes the path literal a fourth time.
|
|
393
|
+
*/
|
|
394
|
+
declare function sandboxSidecarProxyUrl(baseUrl: string, sandboxId: string): string;
|
|
372
395
|
/** Define a connection configuration for sandbox runtime including URL and optional server-side auth token */
|
|
373
396
|
interface SandboxRuntimeConnection {
|
|
374
397
|
runtimeUrl: string;
|
|
@@ -464,6 +487,42 @@ interface WorkspaceSandboxTerminalUpgradeHandlerOptions {
|
|
|
464
487
|
* ```
|
|
465
488
|
*/
|
|
466
489
|
declare function createWorkspaceSandboxTerminalUpgradeHandler(opts: WorkspaceSandboxTerminalUpgradeHandlerOptions): (request: Request) => Promise<Response | null>;
|
|
490
|
+
/** A response-like shape carrying just what the subprotocol echo decision reads. */
|
|
491
|
+
interface TerminalUpgradeResponseLike {
|
|
492
|
+
status: number;
|
|
493
|
+
statusText?: string;
|
|
494
|
+
headers: Headers;
|
|
495
|
+
}
|
|
496
|
+
/**
|
|
497
|
+
* Decide whether a terminal upgrade's 101 needs the browser's own subprotocol
|
|
498
|
+
* echoed back onto it, and return the headers to answer with. `null` means
|
|
499
|
+
* "pass the upstream response through untouched".
|
|
500
|
+
*
|
|
501
|
+
* Why this exists: the browser's terminal credential rides in a
|
|
502
|
+
* `bearer.<base64url>` WebSocket subprotocol, because a browser cannot set
|
|
503
|
+
* `Authorization` on a WS handshake. That subprotocol is a browser-to-Worker
|
|
504
|
+
* credential, so it is stripped before the upstream hop — and the upstream then
|
|
505
|
+
* answers the 101 selecting nothing. A browser MUST fail the connection when a
|
|
506
|
+
* 101 selects no subprotocol after it offered one (RFC 6455 s4.1), so the socket
|
|
507
|
+
* dies on open and the terminal renders a spinner forever.
|
|
508
|
+
*
|
|
509
|
+
* Kept as a pure function because a 101 `Response` cannot be constructed off
|
|
510
|
+
* Workers, so this is the only part of the decision a test can drive directly.
|
|
511
|
+
*/
|
|
512
|
+
declare function terminalUpgradeSubprotocolEcho(upstream: TerminalUpgradeResponseLike, browserProtocol: string | null): {
|
|
513
|
+
status: number;
|
|
514
|
+
statusText: string;
|
|
515
|
+
headers: Headers;
|
|
516
|
+
} | null;
|
|
517
|
+
/**
|
|
518
|
+
* The exact `bearer.*` subprotocol string the browser offered, so it can be
|
|
519
|
+
* echoed verbatim on the 101. Returns null when the browser offered none.
|
|
520
|
+
*
|
|
521
|
+
* Takes the raw `Sec-WebSocket-Protocol` value rather than the `Headers`, to
|
|
522
|
+
* match its siblings `bearerSubprotocolToken` and `stripBearerSubprotocol` —
|
|
523
|
+
* one shape for the whole family, and the caller reads the header once.
|
|
524
|
+
*/
|
|
525
|
+
declare function selectedBearerSubprotocol(value: string | null): string | null;
|
|
467
526
|
/** Build proxy headers for sandbox runtime including authorization and forwarded headers */
|
|
468
527
|
declare function buildSandboxRuntimeProxyHeaders(source: Headers, sandboxApiKey: string, forwardHeaders?: string[]): Headers;
|
|
469
528
|
/** Encode a runtime path by URI-encoding each valid segment and returning null for invalid segments */
|
|
@@ -475,6 +534,199 @@ declare function bearerSubprotocolToken(value: string | null): string | null;
|
|
|
475
534
|
/** Resolve the terminal token from request headers using Authorization or Sec-WebSocket-Protocol fields */
|
|
476
535
|
declare function terminalTokenFromRequest(headers: Headers): string | null;
|
|
477
536
|
|
|
537
|
+
/**
|
|
538
|
+
* `createSandboxPrewarmer` — "this user just opened this project; start warming
|
|
539
|
+
* their box" as a shell primitive, so every agent-app product gets the same
|
|
540
|
+
* answer instead of forking one.
|
|
541
|
+
*
|
|
542
|
+
* WHY THIS IS SHELL, NOT ENGINE. The engine rule asks whether the capability
|
|
543
|
+
* makes sense without a specific app's side channel. "Warm a box" does — but
|
|
544
|
+
* `@tangle-network/sandbox` has no notion of a WORKSPACE. It keys boxes by an
|
|
545
|
+
* opaque sandbox id; the workspace→box mapping, the harness match, and the
|
|
546
|
+
* profile materialisation all live in `ensureWorkspaceSandbox` here. A
|
|
547
|
+
* prewarmer is that mapping plus a scheduling policy, so it belongs beside it.
|
|
548
|
+
* It is deliberately NOT a new subpath: it composes `peekWorkspaceSandbox` and
|
|
549
|
+
* `ensureWorkspaceSandbox` directly and needs exactly the peers `/sandbox`
|
|
550
|
+
* already needs, so a separate entry would add a second place to look for "how
|
|
551
|
+
* do I get a box" and buy no peer isolation (the reason `/work-product-react`
|
|
552
|
+
* is split out).
|
|
553
|
+
*
|
|
554
|
+
* WHAT IT IS NOT. It does not make cold starts fast — they already are.
|
|
555
|
+
* Measured on the real platform (staging-sandbox, n=5, 2026-07-28): a box goes
|
|
556
|
+
* from nothing to terminal-ready in 2.34–3.19 s (median 2.73 s), and an
|
|
557
|
+
* already-running box answers in 1.16–2.29 s (median 1.35 s). Prewarming buys
|
|
558
|
+
* ~1.4 s. The reason it matters is not latency: it is that a product which
|
|
559
|
+
* only ever provisions lazily, on a path whose guard never passes, never
|
|
560
|
+
* provisions AT ALL — and the UI then shows a spinner over a box that does not
|
|
561
|
+
* exist and is not being created. That is the failure this primitive removes.
|
|
562
|
+
*
|
|
563
|
+
* ── COST POSTURE (read before adopting) ────────────────────────────────────
|
|
564
|
+
* A warmed box is a REAL charge. It bills from creation until the platform's
|
|
565
|
+
* idle timeout reclaims it — `SandboxRuntimeConfig`'s create-time
|
|
566
|
+
* `idleTimeoutSeconds`, not anything this module sets. A product warming on
|
|
567
|
+
* every project open pays that timeout for every user who opens and bounces.
|
|
568
|
+
* With a 3600 s idle timeout against a ~131 s mean session life, a bounce
|
|
569
|
+
* costs an hour of box time to save ~1.4 s. THAT TRADE IS USUALLY WRONG.
|
|
570
|
+
*
|
|
571
|
+
* So the levers are explicit and the defaults are the cheap ones:
|
|
572
|
+
* - `mode: 'resume-only'` (DEFAULT) never creates a box that does not exist.
|
|
573
|
+
* It only revives one the user already has, so the spend is bounded by
|
|
574
|
+
* boxes the user already caused. This is the safe fleet default.
|
|
575
|
+
* - `mode: 'create-or-resume'` is the owner-requested behaviour — warm on
|
|
576
|
+
* open even for a first-time user. Opt in per product, and lower the
|
|
577
|
+
* shell's `idleTimeoutSeconds` when you do.
|
|
578
|
+
* - `shouldPrewarm(scope)` is the product's own policy hook (paid tier only,
|
|
579
|
+
* returning user only, has-documents only …). Returning false costs nothing.
|
|
580
|
+
* - `failureCooldownMs` stops a hard-failing workspace from retry-storming;
|
|
581
|
+
* every retry is another create attempt, which is more spend.
|
|
582
|
+
* Warm with the SAME harness the next turn will use. `ensureWorkspaceSandbox`
|
|
583
|
+
* DELETES and recreates a name-matched box whose harness differs, so warming
|
|
584
|
+
* `opencode` and then turning `claude-code` pays for two boxes and is slower
|
|
585
|
+
* than not warming at all. The prewarm key includes the harness so the two are
|
|
586
|
+
* never deduped into one.
|
|
587
|
+
*
|
|
588
|
+
* ── SINGLE-FLIGHT (measured, not assumed) ──────────────────────────────────
|
|
589
|
+
* The sandbox platform does NOT dedupe by box name. Two concurrent
|
|
590
|
+
* `POST /v1/sandboxes` with an identical name both returned HTTP 201 and left
|
|
591
|
+
* two running boxes (verified against staging-sandbox, 2026-07-28). So two
|
|
592
|
+
* tabs, or two isolates, racing a warm genuinely leak a box — a prewarm that
|
|
593
|
+
* races is worse than no prewarm. Hence two layers:
|
|
594
|
+
* 1. an in-process map, which is free and catches same-isolate races
|
|
595
|
+
* (double-mount, two requests on one isolate);
|
|
596
|
+
* 2. a `claim` store the product supplies, which is the only thing that can
|
|
597
|
+
* make this correct ACROSS isolates — the usual deployment target here is
|
|
598
|
+
* Cloudflare Workers, where "same isolate" guarantees nothing.
|
|
599
|
+
* `claim` is REQUIRED, with `'single-isolate-only'` as the explicit opt-out,
|
|
600
|
+
* so nobody gets the unsafe behaviour by forgetting a field. Say it out loud
|
|
601
|
+
* or supply a store.
|
|
602
|
+
*
|
|
603
|
+
* ── FAILURE IS LOUD, NEVER FATAL ───────────────────────────────────────────
|
|
604
|
+
* A failed warm degrades to exactly today's lazy path: the next real request
|
|
605
|
+
* calls `ensureWorkspaceSandbox` itself. It never throws into the caller's
|
|
606
|
+
* render path — `completion` RESOLVES with `{ ok: false }` rather than
|
|
607
|
+
* rejecting, because an unhandled rejection handed to `waitUntil` can fail the
|
|
608
|
+
* request it rode in on. But it is never silent: every failure fires
|
|
609
|
+
* `onEvent({ type: 'failed' })` and is readable afterwards through
|
|
610
|
+
* `readiness()` as `{ status: 'failed' }`. The bug class this whole module
|
|
611
|
+
* exists to kill is a soft failure that surfaces as an unusable panel ten
|
|
612
|
+
* minutes later, so a warm that dies must leave a trace a product can render.
|
|
613
|
+
*/
|
|
614
|
+
|
|
615
|
+
/** The workspace a warm targets. Mirrors `EnsureWorkspaceSandboxOptions`'
|
|
616
|
+
* identity fields — the prewarmer forwards them verbatim so a warmed box is
|
|
617
|
+
* byte-identical to the one the lazy path would have built. */
|
|
618
|
+
interface SandboxPrewarmScope {
|
|
619
|
+
workspaceId: string;
|
|
620
|
+
userId?: string;
|
|
621
|
+
/** Must match the harness the next turn will use — see the cost note above. */
|
|
622
|
+
harness: Harness;
|
|
623
|
+
billingOwnerId?: string;
|
|
624
|
+
}
|
|
625
|
+
/**
|
|
626
|
+
* Cross-isolate claim. `acquire` must be atomic (a D1 conditional insert, a DO,
|
|
627
|
+
* a KV `put` with `onlyIf`) — a read-then-write is exactly the race this exists
|
|
628
|
+
* to close. `ttlSeconds` bounds a claim leaked by an isolate that died
|
|
629
|
+
* mid-warm; without expiry a single crash wedges a workspace forever.
|
|
630
|
+
*/
|
|
631
|
+
interface PrewarmClaimStore {
|
|
632
|
+
/** True when THIS caller now owns the right to warm `key`. */
|
|
633
|
+
acquire(key: string, ttlSeconds: number): Promise<boolean>;
|
|
634
|
+
/** Best-effort release. A throw here is swallowed — the TTL is the backstop. */
|
|
635
|
+
release(key: string): Promise<void>;
|
|
636
|
+
/** Optional: lets `readiness()` report `warming` for a warm running in
|
|
637
|
+
* ANOTHER isolate. Without it, `warming` is only visible in the isolate
|
|
638
|
+
* that started it, and every other one reports `absent`. */
|
|
639
|
+
isHeld?(key: string): Promise<boolean>;
|
|
640
|
+
}
|
|
641
|
+
/** What `prewarm()` decided. Every value except `started` means no box was
|
|
642
|
+
* created and nothing was spent on this call. */
|
|
643
|
+
type PrewarmOutcome = 'started' | 'already-running' | 'already-warming' | 'warming-elsewhere' | 'declined-by-policy' | 'cooling-down' | 'absent-and-resume-only';
|
|
644
|
+
/** Terminal result of a warm this caller owns. Never a rejection. */
|
|
645
|
+
interface PrewarmResult {
|
|
646
|
+
ok: boolean;
|
|
647
|
+
boxId?: string;
|
|
648
|
+
error?: string;
|
|
649
|
+
/** Wall time of the warm itself, for the product's own timing trace. */
|
|
650
|
+
ms: number;
|
|
651
|
+
}
|
|
652
|
+
interface PrewarmDecision {
|
|
653
|
+
outcome: PrewarmOutcome;
|
|
654
|
+
/** Present ONLY when `outcome === 'started'`. Hand it to `ctx.waitUntil` so a
|
|
655
|
+
* client disconnect cannot kill the warm. Never rejects. */
|
|
656
|
+
completion?: Promise<PrewarmResult>;
|
|
657
|
+
}
|
|
658
|
+
/** Readiness for the UI. `ready`/`warming` reuse the vocabulary
|
|
659
|
+
* `createSandboxFileIndexRoute` (`/chat-routes`) and `useFileMentions`
|
|
660
|
+
* (`/web-react`) already speak, so a product renders ONE warming state rather
|
|
661
|
+
* than inventing a second spinner for boxes. */
|
|
662
|
+
type SandboxReadiness = {
|
|
663
|
+
status: 'ready';
|
|
664
|
+
boxId: string;
|
|
665
|
+
} | {
|
|
666
|
+
status: 'warming';
|
|
667
|
+
} | {
|
|
668
|
+
status: 'absent';
|
|
669
|
+
} | {
|
|
670
|
+
status: 'failed';
|
|
671
|
+
error: string;
|
|
672
|
+
retryAfterMs: number;
|
|
673
|
+
};
|
|
674
|
+
type PrewarmEvent = {
|
|
675
|
+
type: 'started';
|
|
676
|
+
key: string;
|
|
677
|
+
workspaceId: string;
|
|
678
|
+
} | {
|
|
679
|
+
type: 'succeeded';
|
|
680
|
+
key: string;
|
|
681
|
+
workspaceId: string;
|
|
682
|
+
boxId: string;
|
|
683
|
+
ms: number;
|
|
684
|
+
} | {
|
|
685
|
+
type: 'failed';
|
|
686
|
+
key: string;
|
|
687
|
+
workspaceId: string;
|
|
688
|
+
error: string;
|
|
689
|
+
ms: number;
|
|
690
|
+
} | {
|
|
691
|
+
type: 'skipped';
|
|
692
|
+
key: string;
|
|
693
|
+
workspaceId: string;
|
|
694
|
+
outcome: PrewarmOutcome;
|
|
695
|
+
};
|
|
696
|
+
interface SandboxPrewarmerOptions {
|
|
697
|
+
/** Cross-isolate single-flight, or the explicit acknowledgement that you are
|
|
698
|
+
* accepting per-isolate dedupe only. No default — see the header. */
|
|
699
|
+
claim: PrewarmClaimStore | 'single-isolate-only';
|
|
700
|
+
/** `'resume-only'` (default) never creates a box that does not exist.
|
|
701
|
+
* `'create-or-resume'` warms from nothing — the expensive one. */
|
|
702
|
+
mode?: 'resume-only' | 'create-or-resume';
|
|
703
|
+
/** Product policy gate. Not called when a box is already running. */
|
|
704
|
+
shouldPrewarm?(scope: SandboxPrewarmScope): boolean | Promise<boolean>;
|
|
705
|
+
/** Observability seam. A failed warm MUST be visible somewhere. */
|
|
706
|
+
onEvent?(event: PrewarmEvent): void;
|
|
707
|
+
/** Claim lifetime. Default 180 s — comfortably over a cold create. */
|
|
708
|
+
claimTtlSeconds?: number;
|
|
709
|
+
/** Suppress re-warming a workspace that just failed. Default 60_000 ms. */
|
|
710
|
+
failureCooldownMs?: number;
|
|
711
|
+
/** Clock seam for tests. */
|
|
712
|
+
now?(): number;
|
|
713
|
+
}
|
|
714
|
+
interface SandboxPrewarmer {
|
|
715
|
+
/**
|
|
716
|
+
* Non-blocking warm. The returned promise settles as soon as the DECISION is
|
|
717
|
+
* known (at most one `list()` against the platform, plus a claim `acquire`);
|
|
718
|
+
* the provisioning itself rides on `completion`. On a render path either
|
|
719
|
+
* ignore the returned promise or run the whole call inside `waitUntil` — do
|
|
720
|
+
* not await `completion` before responding.
|
|
721
|
+
*/
|
|
722
|
+
prewarm(scope: SandboxPrewarmScope): Promise<PrewarmDecision>;
|
|
723
|
+
/** Zero-provisioning status read for a UI. Never creates or resumes. */
|
|
724
|
+
readiness(scope: SandboxPrewarmScope): Promise<SandboxReadiness>;
|
|
725
|
+
/** Clear a recorded failure so the next `prewarm` retries immediately. */
|
|
726
|
+
clearFailure(scope: SandboxPrewarmScope): void;
|
|
727
|
+
}
|
|
728
|
+
declare function createSandboxPrewarmer(shell: SandboxRuntimeConfig, options: SandboxPrewarmerOptions): SandboxPrewarmer;
|
|
729
|
+
|
|
478
730
|
/** Define client credentials for accessing the sandbox environment with API key and base URL */
|
|
479
731
|
interface SandboxClientCredentials {
|
|
480
732
|
apiKey: string;
|
|
@@ -976,4 +1228,4 @@ declare function isTerminalPromptEvent(event: unknown): boolean;
|
|
|
976
1228
|
/** Resolve the interactive question text from a structured event or return null if none found */
|
|
977
1229
|
declare function detectInteractiveQuestion(event: unknown): string | null;
|
|
978
1230
|
|
|
979
|
-
export { type AppToolDescriptor, type AuthenticatedSandboxUser, type BuildAppToolMcpServersOptions, type BuildSandboxToolFileMountsOptions, DEFAULT_SANDBOX_RESOURCES, 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, PROVISION_PAYLOAD_MAX_BYTES, type PeekWorkspaceSandboxOutcome, type ProfileComposeOptions, type PromptInputPart, type ProviderResolutionConfig, type ProvisionPayloadSections, type ProvisionProfileSection, type ResolveSandboxClientCredentialsOptions, type ResolvedModel, type SandboxApiCredentials, type SandboxBuildContext, type SandboxClientCredentials, type SandboxCredentialEnvironment, type SandboxExecChannel, type SandboxExecOptions, type SandboxFileBytesOutcome, type SandboxFileSizeOutcome, SandboxModelResolutionError, type SandboxPermissionLevel, 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 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, 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, sandboxToolBinDir, sandboxToolPath, sandboxToolRootDir, secretStoreFromClient, shellQuote, splitDeferredProfileFiles, statSandboxFileSize, storeSecret, streamSandboxPrompt, syncSandboxMemberAdd, syncSandboxMemberRemove, syncSandboxMemberRole, terminalTokenFromRequest, verifySandboxTerminalToken, verifyTerminalProxyToken, writeProfileFilesToBox };
|
|
1231
|
+
export { type AppToolDescriptor, type AuthenticatedSandboxUser, type BuildAppToolMcpServersOptions, type BuildSandboxToolFileMountsOptions, DEFAULT_SANDBOX_RESOURCES, 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, PROVISION_PAYLOAD_MAX_BYTES, type PeekWorkspaceSandboxOutcome, 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, type SandboxExecChannel, type SandboxExecOptions, 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, 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 };
|
package/dist/sandbox/index.js
CHANGED
|
@@ -17,6 +17,7 @@ import {
|
|
|
17
17
|
buildSandboxToolPathSetupScript,
|
|
18
18
|
classifySeveredStream,
|
|
19
19
|
collectSandboxPromptText,
|
|
20
|
+
createSandboxPrewarmer,
|
|
20
21
|
createSandboxTerminalToken,
|
|
21
22
|
createWorkspaceSandboxConnectionHandler,
|
|
22
23
|
createWorkspaceSandboxManager,
|
|
@@ -47,10 +48,12 @@ import {
|
|
|
47
48
|
resolveSandboxClientCredentials,
|
|
48
49
|
runSandboxPrompt,
|
|
49
50
|
runSandboxToolPathSetup,
|
|
51
|
+
sandboxSidecarProxyUrl,
|
|
50
52
|
sandboxToolBinDir,
|
|
51
53
|
sandboxToolPath,
|
|
52
54
|
sandboxToolRootDir,
|
|
53
55
|
secretStoreFromClient,
|
|
56
|
+
selectedBearerSubprotocol,
|
|
54
57
|
shellQuote,
|
|
55
58
|
splitDeferredProfileFiles,
|
|
56
59
|
statSandboxFileSize,
|
|
@@ -60,10 +63,11 @@ import {
|
|
|
60
63
|
syncSandboxMemberRemove,
|
|
61
64
|
syncSandboxMemberRole,
|
|
62
65
|
terminalTokenFromRequest,
|
|
66
|
+
terminalUpgradeSubprotocolEcho,
|
|
63
67
|
verifySandboxTerminalToken,
|
|
64
68
|
verifyTerminalProxyToken,
|
|
65
69
|
writeProfileFilesToBox
|
|
66
|
-
} from "../chunk-
|
|
70
|
+
} from "../chunk-BAC2B2KI.js";
|
|
67
71
|
import "../chunk-LWSJK546.js";
|
|
68
72
|
import "../chunk-CQZSAR77.js";
|
|
69
73
|
import "../chunk-ICOHEZK6.js";
|
|
@@ -90,6 +94,7 @@ export {
|
|
|
90
94
|
buildSandboxToolPathSetupScript,
|
|
91
95
|
classifySeveredStream,
|
|
92
96
|
collectSandboxPromptText,
|
|
97
|
+
createSandboxPrewarmer,
|
|
93
98
|
createSandboxTerminalToken,
|
|
94
99
|
createWorkspaceSandboxConnectionHandler,
|
|
95
100
|
createWorkspaceSandboxManager,
|
|
@@ -120,10 +125,12 @@ export {
|
|
|
120
125
|
resolveSandboxClientCredentials,
|
|
121
126
|
runSandboxPrompt,
|
|
122
127
|
runSandboxToolPathSetup,
|
|
128
|
+
sandboxSidecarProxyUrl,
|
|
123
129
|
sandboxToolBinDir,
|
|
124
130
|
sandboxToolPath,
|
|
125
131
|
sandboxToolRootDir,
|
|
126
132
|
secretStoreFromClient,
|
|
133
|
+
selectedBearerSubprotocol,
|
|
127
134
|
shellQuote,
|
|
128
135
|
splitDeferredProfileFiles,
|
|
129
136
|
statSandboxFileSize,
|
|
@@ -133,6 +140,7 @@ export {
|
|
|
133
140
|
syncSandboxMemberRemove,
|
|
134
141
|
syncSandboxMemberRole,
|
|
135
142
|
terminalTokenFromRequest,
|
|
143
|
+
terminalUpgradeSubprotocolEcho,
|
|
136
144
|
verifySandboxTerminalToken,
|
|
137
145
|
verifyTerminalProxyToken,
|
|
138
146
|
writeProfileFilesToBox
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tangle-network/agent-app",
|
|
3
|
-
"version": "0.44.
|
|
3
|
+
"version": "0.44.29",
|
|
4
4
|
"packageManager": "pnpm@10.33.4",
|
|
5
5
|
"description": "Application-shell framework for Tangle agent products: a bounded tool loop, the structured agent→app tool side channel, integration-hub client, per-workspace billing, and crypto — composed over the Tangle agent substrate through typed seams.",
|
|
6
6
|
"keywords": [
|