@tangle-network/sandbox 0.58.8 → 0.60.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent/index.d.ts +4 -4
- package/dist/agent/index.js +4 -4
- package/dist/agent/preview.d.ts +2 -2
- package/dist/agent/preview.js +54 -4
- package/dist/{agent-run-outcome-1MxGwnx3.d.ts → agent-run-outcome-CBaBwtEo.d.ts} +1 -1
- package/dist/auth/index.js +1 -1
- package/dist/{browser-interactive-control-controller-DRBQ-jf0.js → browser-interactive-control-controller-BJf0P_J4.js} +40 -3
- package/dist/{browser-interactive-control-controller-BzR8sFjo.d.ts → browser-interactive-control-controller-C2qVGzQz.d.ts} +7 -2
- package/dist/{cli-auth-bundle-CzmAaefZ.js → cli-auth-bundle-ChOdvrjd.js} +1 -1
- package/dist/{client-DA3Pwd3t.js → client-8U6wuUY9.js} +6 -27
- package/dist/{client-xDfwI4yj.d.ts → client-DixtsEVX.d.ts} +4 -12
- package/dist/collaboration/index.js +1 -1
- package/dist/core.d.ts +5 -5
- package/dist/core.js +3 -3
- package/dist/{index-DFXcrGG6.d.ts → index-Cma6Iz3v.d.ts} +2 -2
- package/dist/index.d.ts +10 -9
- package/dist/index.js +8 -8
- package/dist/interactive-control.d.ts +2 -2
- package/dist/interactive-control.js +2 -2
- package/dist/{runtime-api-BZhd0M3Z.js → interactive-controller-CZpuKFMa.js} +837 -3
- package/dist/interactive-controller-Dghv9yMk.d.ts +40 -0
- package/dist/{lines-DuPzlFrJ.d.ts → lines-CqurEIaM.d.ts} +41 -2
- package/dist/lines.d.ts +2 -2
- package/dist/lines.js +21 -0
- package/dist/{local-cli-auth-ChDP5zu4.js → local-cli-auth-CdIM0B6p.js} +1 -1
- package/dist/{mcp-local-DY1CnWBn.js → mcp-local-BSvH4yAU.js} +1 -1
- package/dist/{preview-l8HsyZzA.d.ts → preview-BQOsoAEx.d.ts} +19 -6
- package/dist/runtime.d.ts +6 -3
- package/dist/runtime.js +3 -3
- package/dist/{sandbox-fTLRps4I.d.ts → sandbox-CJt1v5Cj.d.ts} +9 -40
- package/dist/{sandbox-D8HtCO-L.js → sandbox-DSP2E-3S.js} +88 -865
- package/dist/tangle/index.d.ts +1 -1
- package/dist/tangle/index.js +1 -1
- package/dist/{tangle-CYGQg5Bf.js → tangle-DgmZElaI.js} +1 -1
- package/dist/{types-B_rwXChV.d.ts → types-C8OQ8bzc.d.ts} +7 -2
- package/package.json +2 -2
- package/dist/abort-signal-BpYYr4JT.js +0 -31
- /package/dist/{collaboration-d8Xcvel7.js → collaboration-C1JAl5kE.js} +0 -0
- /package/dist/{line-application-9k30rhb2.js → line-application-DJYY1v8U.js} +0 -0
- /package/dist/{preview-operations-CbTiBE-a.js → preview-operations-BLsclF88.js} +0 -0
- /package/dist/{specs-CnqSWFNT-CHd9ACzP.js → specs-CnqSWFNT-i2wJxPoD.js} +0 -0
- /package/dist/{terminal-stream-CB2DF-qq.d.ts → terminal-stream-C9jxoB07.d.ts} +0 -0
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { a as TerminalStreamReconnectAuthority, l as ScopedToken, t as TerminalStream } from "./terminal-stream-C9jxoB07.js";
|
|
2
|
+
import { a as InteractiveSessionControlController, c as InteractiveSessionIdentity, f as InteractiveAttachOptions, h as InteractiveRequestOptions, n as BrowserInteractiveSessionControlControllerOptions, o as InteractiveSessionControlControllerOptions, s as InteractiveSessionControlTransport } from "./browser-interactive-control-controller-C2qVGzQz.js";
|
|
3
|
+
import { AgentInteractiveSessionRef } from "@tangle-network/agent-interface";
|
|
4
|
+
|
|
5
|
+
//#region src/interactive-controller.d.ts
|
|
6
|
+
/** The request fields supplied by an attach caller before control is claimed. */
|
|
7
|
+
type InteractiveAttachRequest = Omit<InteractiveAttachOptions, "control">;
|
|
8
|
+
/** Transport used by the status → claim → WebSocket controller. */
|
|
9
|
+
interface InteractiveSessionControllerTransport extends InteractiveSessionControlTransport {
|
|
10
|
+
attach(sessionId: string, ref: AgentInteractiveSessionRef, request: InteractiveAttachOptions, options?: InteractiveRequestOptions, reconnectAuthority?: TerminalStreamReconnectAuthority): Promise<TerminalStream>;
|
|
11
|
+
}
|
|
12
|
+
interface InteractiveSessionControllerOptions extends InteractiveSessionControlControllerOptions {}
|
|
13
|
+
/**
|
|
14
|
+
* Attach-capable controller for one exact interactive process.
|
|
15
|
+
*
|
|
16
|
+
* Control ownership lives in the dependency-light base controller. This layer
|
|
17
|
+
* adds only the terminal attach operation after that ownership is resolved.
|
|
18
|
+
*/
|
|
19
|
+
declare class InteractiveSessionController extends InteractiveSessionControlController {
|
|
20
|
+
private readonly attachTransport;
|
|
21
|
+
private attachInFlight?;
|
|
22
|
+
constructor(attachTransport: InteractiveSessionControllerTransport, options: InteractiveSessionControllerOptions);
|
|
23
|
+
attach(request: InteractiveAttachRequest, requestOptions?: InteractiveRequestOptions): Promise<TerminalStream>;
|
|
24
|
+
/**
|
|
25
|
+
* Open a stream for a claim returned by this controller's `resolve()`.
|
|
26
|
+
* The controller releases that claim when the stream cannot be opened.
|
|
27
|
+
*/
|
|
28
|
+
attachWithIdentity(identity: InteractiveSessionIdentity, request: InteractiveAttachRequest, requestOptions?: InteractiveRequestOptions): Promise<TerminalStream>;
|
|
29
|
+
}
|
|
30
|
+
/** Browser transport options for the attach-capable controller. */
|
|
31
|
+
interface BrowserInteractiveSessionControllerOptions extends InteractiveSessionControllerOptions, BrowserInteractiveSessionControlControllerOptions {
|
|
32
|
+
/** Mint a future session-runtime token for every browser terminal dial. */
|
|
33
|
+
terminalTokenProvider?: (signal?: AbortSignal) => Promise<ScopedToken>;
|
|
34
|
+
}
|
|
35
|
+
/** Concrete controller for browser deep links and terminal attachment. */
|
|
36
|
+
declare class BrowserInteractiveSessionController extends InteractiveSessionController {
|
|
37
|
+
constructor(options: BrowserInteractiveSessionControllerOptions);
|
|
38
|
+
}
|
|
39
|
+
//#endregion
|
|
40
|
+
export { InteractiveSessionControllerOptions as a, InteractiveSessionController as i, BrowserInteractiveSessionControllerOptions as n, InteractiveSessionControllerTransport as o, InteractiveAttachRequest as r, BrowserInteractiveSessionController as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as CreateSandboxOptions, d as BackendConfig } from "./types-
|
|
1
|
+
import { B as CreateSandboxOptions, d as BackendConfig } from "./types-C8OQ8bzc.js";
|
|
2
2
|
|
|
3
3
|
//#region src/line-application.d.ts
|
|
4
4
|
/** Bounded callback request bytes after canonicalization, including JSON framing. */
|
|
@@ -232,10 +232,33 @@ interface LineExecutionKey {
|
|
|
232
232
|
name: string;
|
|
233
233
|
expiresAt: string | null;
|
|
234
234
|
}
|
|
235
|
+
/** The owner texts `testText` to the line from the handset being enrolled. */
|
|
236
|
+
interface LineSenderVerificationStart {
|
|
237
|
+
lineId: string;
|
|
238
|
+
testId: string;
|
|
239
|
+
state: "awaiting_test";
|
|
240
|
+
testText: string;
|
|
241
|
+
expiresAt: string;
|
|
242
|
+
}
|
|
243
|
+
interface LineSenderVerification {
|
|
244
|
+
lineId: string;
|
|
245
|
+
testId: string;
|
|
246
|
+
state: "awaiting_test" | "sending" | "challenge_sent" | "verified" | "consumed" | "cancelled" | "superseded" | "failed" | "expired";
|
|
247
|
+
expiresAt: string;
|
|
248
|
+
proof: {
|
|
249
|
+
signedInboundTestAt: string | null;
|
|
250
|
+
providerReplyAcknowledgedAt: string | null;
|
|
251
|
+
signedInboundConfirmAt: string | null;
|
|
252
|
+
};
|
|
253
|
+
/** Owner-server read only. Never expose this address to public page state. */
|
|
254
|
+
approvedSender?: string;
|
|
255
|
+
}
|
|
235
256
|
interface LineAttachOptions {
|
|
236
257
|
/** Browser session only: explicitly select an owned root key ID. No key bytes.
|
|
237
258
|
* An API-key request can omit it or name only its own key ID. */
|
|
238
259
|
runAsKeyId?: string;
|
|
260
|
+
/** One-use proof from `startSenderVerification` for a new Inkbox iMessage application attachment. */
|
|
261
|
+
senderVerificationId?: string;
|
|
239
262
|
/** A line id (`ln_...`) or an address of one of your lines. */
|
|
240
263
|
number: string;
|
|
241
264
|
/** `personal`: one owner member. `shared`: many members, one thread each. */
|
|
@@ -352,6 +375,8 @@ interface LineMember {
|
|
|
352
375
|
interface LineAttachment {
|
|
353
376
|
id: string;
|
|
354
377
|
lineId: string;
|
|
378
|
+
/** Execution key ID. Pass the observed value when reauthorizing this attachment. */
|
|
379
|
+
runAsKeyId: string;
|
|
355
380
|
/** Native execution sandbox or initial application enrollment anchor; empty for member instances. */
|
|
356
381
|
sandboxId: string;
|
|
357
382
|
/** Present when each member runs in their own sandbox. */
|
|
@@ -372,6 +397,11 @@ interface LineAttachment {
|
|
|
372
397
|
/** Present on the attach response. */
|
|
373
398
|
members?: LineMember[];
|
|
374
399
|
}
|
|
400
|
+
/** Compare-and-swap tokens from a previously read active attachment. */
|
|
401
|
+
interface LineAttachmentReauthorization {
|
|
402
|
+
expectedAttachmentId: string;
|
|
403
|
+
expectedRunAsKeyId: string;
|
|
404
|
+
}
|
|
375
405
|
/**
|
|
376
406
|
* Voice on a line. A member calls the line, a ph0ny agent answers, and each
|
|
377
407
|
* question the agent asks with its `ask_workspace` tool runs in the caller's
|
|
@@ -475,6 +505,10 @@ declare class LinesClient {
|
|
|
475
505
|
get(lineId: string): Promise<Line>;
|
|
476
506
|
/** A line id for a line id or one of your lines' addresses. */
|
|
477
507
|
resolve(number: string): Promise<string>;
|
|
508
|
+
/** Start a signed Inkbox iMessage owner-handset test for an unattached line. */
|
|
509
|
+
startSenderVerification(number: string): Promise<LineSenderVerificationStart>;
|
|
510
|
+
/** Read proof state with the same owner API key that started the test. */
|
|
511
|
+
getSenderVerification(number: string, testId: string): Promise<LineSenderVerification>;
|
|
478
512
|
/**
|
|
479
513
|
* Attach a line so each member runs in their own sandbox. Hub checks that
|
|
480
514
|
* your API key can run sandboxes, and each turn runs as a short-lived child
|
|
@@ -482,6 +516,11 @@ declare class LinesClient {
|
|
|
482
516
|
* attachment. To attach a line to one sandbox, use `box.lines.attach()`.
|
|
483
517
|
*/
|
|
484
518
|
attach(options: LineInstanceAttachOptions): Promise<LineAttachment>;
|
|
519
|
+
/** Bind the current API key to this same attachment after app key rotation.
|
|
520
|
+
* Hub checks the observed attachment and old key, app key lineage, owner,
|
|
521
|
+
* workspace and sandbox. A race leaves the existing binding unchanged.
|
|
522
|
+
*/
|
|
523
|
+
reauthorizeAttachment(number: string, expected: LineAttachmentReauthorization): Promise<LineAttachment>;
|
|
485
524
|
/**
|
|
486
525
|
* Detach a line (by id or address), whatever it is attached to. This is
|
|
487
526
|
* the way to detach a line attached with `instance`, which names no
|
|
@@ -553,4 +592,4 @@ declare class SandboxLines {
|
|
|
553
592
|
detach(number: string): Promise<void>;
|
|
554
593
|
}
|
|
555
594
|
//#endregion
|
|
556
|
-
export {
|
|
595
|
+
export { LineTransport as A, LineApplication as B, LineRespondView as C, LineSenderVerification as D, LineSendReceipt as E, SandboxLines as F, parseLineApplicationRequest as G, LineApplicationResult as H, lineInstanceKey as I, parseLineApplicationResult as K, profileChannelReference as L, LineVoiceOptions as M, LinesClient as N, LineSenderVerificationStart as O, LinesHttpClient as P, LINE_APPLICATION_REPLY_MAX_CHARS as R, LineRespondAgent as S, LineSendInput as T, LineApplicationState as U, LineApplicationRequest as V, LineApplicationView as W, LineMessage as _, LineAttachOptions as a, LineReminderPreferences as b, LineExecutionKey as c, LineInstanceCreate as d, LineLimits as f, LineMemberSpec as g, LineMemberPatch as h, LineAllowanceSubject as i, LineVoice as j, LineThread as k, LineFromConnectionInput as l, LineMemberInstance as m, LineAgentRolePolicy as n, LineAttachment as o, LineMember as p, LineAllowance as r, LineAttachmentReauthorization as s, Line as t, LineInstanceAttachOptions as u, LineNumberInventory as v, LineRole as w, LineReplyGate as x, LineProvider as y, LINE_APPLICATION_REQUEST_MAX_BYTES as z };
|
package/dist/lines.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as
|
|
2
|
-
export { Line, LineAgentRolePolicy, LineAllowance, LineAllowanceSubject, LineAttachOptions, LineAttachment, LineExecutionKey, LineFromConnectionInput, LineInstanceAttachOptions, LineInstanceCreate, LineLimits, LineMember, LineMemberInstance, LineMemberPatch, LineMemberSpec, LineMessage, LineNumberInventory, LineProvider, LineReminderPreferences, LineReplyGate, LineRespondAgent, LineRespondView, LineRole, LineSendInput, LineSendReceipt, LineThread, LineTransport, LineVoice, LineVoiceOptions, LinesClient, LinesHttpClient, SandboxLines, lineInstanceKey, profileChannelReference };
|
|
1
|
+
import { A as LineTransport, C as LineRespondView, D as LineSenderVerification, E as LineSendReceipt, F as SandboxLines, I as lineInstanceKey, L as profileChannelReference, M as LineVoiceOptions, N as LinesClient, O as LineSenderVerificationStart, P as LinesHttpClient, S as LineRespondAgent, T as LineSendInput, _ as LineMessage, a as LineAttachOptions, b as LineReminderPreferences, c as LineExecutionKey, d as LineInstanceCreate, f as LineLimits, g as LineMemberSpec, h as LineMemberPatch, i as LineAllowanceSubject, j as LineVoice, k as LineThread, l as LineFromConnectionInput, m as LineMemberInstance, n as LineAgentRolePolicy, o as LineAttachment, p as LineMember, r as LineAllowance, s as LineAttachmentReauthorization, t as Line, u as LineInstanceAttachOptions, v as LineNumberInventory, w as LineRole, x as LineReplyGate, y as LineProvider } from "./lines-CqurEIaM.js";
|
|
2
|
+
export { Line, LineAgentRolePolicy, LineAllowance, LineAllowanceSubject, LineAttachOptions, LineAttachment, LineAttachmentReauthorization, LineExecutionKey, LineFromConnectionInput, LineInstanceAttachOptions, LineInstanceCreate, LineLimits, LineMember, LineMemberInstance, LineMemberPatch, LineMemberSpec, LineMessage, LineNumberInventory, LineProvider, LineReminderPreferences, LineReplyGate, LineRespondAgent, LineRespondView, LineRole, LineSendInput, LineSendReceipt, LineSenderVerification, LineSenderVerificationStart, LineThread, LineTransport, LineVoice, LineVoiceOptions, LinesClient, LinesHttpClient, SandboxLines, lineInstanceKey, profileChannelReference };
|
package/dist/lines.js
CHANGED
|
@@ -121,6 +121,17 @@ var LinesClient = class {
|
|
|
121
121
|
if (!line) throw new ValidationError(`No line with address ${number}`);
|
|
122
122
|
return line.id;
|
|
123
123
|
}
|
|
124
|
+
/** Start a signed Inkbox iMessage owner-handset test for an unattached line. */
|
|
125
|
+
async startSenderVerification(number) {
|
|
126
|
+
const lineId = await this.resolve(number);
|
|
127
|
+
return hubData(await this.http.fetch(`/v1/lines/${encodeURIComponent(lineId)}/sender-verifications`, json("POST", {})));
|
|
128
|
+
}
|
|
129
|
+
/** Read proof state with the same owner API key that started the test. */
|
|
130
|
+
async getSenderVerification(number, testId) {
|
|
131
|
+
if (!/^lsv_[A-Za-z0-9_-]+$/.test(testId)) throw new ValidationError("A valid sender verification id is required");
|
|
132
|
+
const lineId = await this.resolve(number);
|
|
133
|
+
return hubData(await this.http.fetch(`/v1/lines/${encodeURIComponent(lineId)}/sender-verifications/${encodeURIComponent(testId)}`));
|
|
134
|
+
}
|
|
124
135
|
/**
|
|
125
136
|
* Attach a line so each member runs in their own sandbox. Hub checks that
|
|
126
137
|
* your API key can run sandboxes, and each turn runs as a short-lived child
|
|
@@ -132,6 +143,16 @@ var LinesClient = class {
|
|
|
132
143
|
const { number: _number, ...rest } = options;
|
|
133
144
|
return (await hubData(await this.http.fetch(`/v1/lines/${encodeURIComponent(lineId)}/attachment`, json("PUT", rest)))).attachment;
|
|
134
145
|
}
|
|
146
|
+
/** Bind the current API key to this same attachment after app key rotation.
|
|
147
|
+
* Hub checks the observed attachment and old key, app key lineage, owner,
|
|
148
|
+
* workspace and sandbox. A race leaves the existing binding unchanged.
|
|
149
|
+
*/
|
|
150
|
+
async reauthorizeAttachment(number, expected) {
|
|
151
|
+
if (!/^lat_[A-Za-z0-9_-]+$/.test(expected.expectedAttachmentId)) throw new ValidationError("A valid expected attachment id is required");
|
|
152
|
+
if (!/^key_[A-Za-z0-9_-]+$/.test(expected.expectedRunAsKeyId)) throw new ValidationError("A valid expected execution key id is required");
|
|
153
|
+
const lineId = await this.resolve(number);
|
|
154
|
+
return (await hubData(await this.http.fetch(`/v1/lines/${encodeURIComponent(lineId)}/attachment/reauthorize`, json("PUT", expected)))).attachment;
|
|
155
|
+
}
|
|
135
156
|
/**
|
|
136
157
|
* Detach a line (by id or address), whatever it is attached to. This is
|
|
137
158
|
* the way to detach a line attached with `instance`, which names no
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as AUTH_BUNDLE_PATHS } from "./cli-auth-bundle-
|
|
1
|
+
import { t as AUTH_BUNDLE_PATHS } from "./cli-auth-bundle-ChOdvrjd.js";
|
|
2
2
|
import { existsSync, readFileSync } from "node:fs";
|
|
3
3
|
import { homedir } from "node:os";
|
|
4
4
|
import { join } from "node:path";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as listAgentPreviews, i as getAgentPreview, o as publishAgentPreview, r as ensureAgentPreview, s as removeAgentPreview, t as AgentPreviewError } from "./preview-operations-
|
|
1
|
+
import { a as listAgentPreviews, i as getAgentPreview, o as publishAgentPreview, r as ensureAgentPreview, s as removeAgentPreview, t as AgentPreviewError } from "./preview-operations-BLsclF88.js";
|
|
2
2
|
import { createRequire } from "node:module";
|
|
3
3
|
//#region \0rolldown/runtime.js
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { r as SandboxInstance } from "./sandbox-
|
|
2
|
-
import { Pn as PreviewLinkInfo, mt as EnsureDevServerOptions } from "./types-
|
|
3
|
-
import { i as Sandbox } from "./client-
|
|
1
|
+
import { r as SandboxInstance } from "./sandbox-CJt1v5Cj.js";
|
|
2
|
+
import { Pn as PreviewLinkInfo, mt as EnsureDevServerOptions } from "./types-C8OQ8bzc.js";
|
|
3
|
+
import { i as Sandbox } from "./client-DixtsEVX.js";
|
|
4
4
|
|
|
5
5
|
//#region src/agent/preview-operations.d.ts
|
|
6
6
|
type AgentPreviewOptions = Pick<EnsureDevServerOptions, "sessionId" | "cwd"> & {
|
|
@@ -55,8 +55,21 @@ declare function getAgentPreview(box: Pick<SandboxInstance, "previewLinks">, pre
|
|
|
55
55
|
/** Unpublishes one service; does not stop it or affect other app URLs. */
|
|
56
56
|
declare function removeAgentPreview(box: Pick<SandboxInstance, "previewLinks">, previewId: string, context?: PreviewExecutionContext): Promise<void>;
|
|
57
57
|
//#endregion
|
|
58
|
-
//#region src/agent/preview-
|
|
58
|
+
//#region src/agent/preview-policy.d.ts
|
|
59
59
|
declare const PREVIEW_TOOLS: readonly ["sandbox_preview", "sandbox_preview_publish", "sandbox_preview_list", "sandbox_preview_get", "sandbox_preview_remove"];
|
|
60
|
+
declare const PREVIEW_MCP_ALIAS = "tangle_previews";
|
|
61
|
+
type PreviewTool = (typeof PREVIEW_TOOLS)[number];
|
|
62
|
+
declare function previewOperationTool(operation: PreviewAuthorizationRequest["operation"]): PreviewTool;
|
|
63
|
+
/**
|
|
64
|
+
* Select preview tools without granting account, sandbox, or member authority.
|
|
65
|
+
* The host authenticates the caller and supplies the authorizer separately.
|
|
66
|
+
* The same profile contract applies to web, native, workflow, and messaging
|
|
67
|
+
* hosts. Disabled shells and provider-specific restrictions require explicit
|
|
68
|
+
* preview grants; selecting a read tool never promotes the profile to execution.
|
|
69
|
+
*/
|
|
70
|
+
declare function previewToolsForProfile(input?: unknown): readonly PreviewTool[];
|
|
71
|
+
//#endregion
|
|
72
|
+
//#region src/agent/preview-mcp.d.ts
|
|
60
73
|
/** Host-side bridge for native agents, custom apps and isolated computers.
|
|
61
74
|
* Authenticate the request before calling this function. The host keeps its
|
|
62
75
|
* Sandbox credential; the agent receives only the host's limited capability.
|
|
@@ -66,7 +79,7 @@ declare function servePreviewMcp(request: Request, config: {
|
|
|
66
79
|
box: SandboxInstance;
|
|
67
80
|
sessionId?: string;
|
|
68
81
|
authorize: PreviewAuthorizer;
|
|
69
|
-
tools?: readonly
|
|
82
|
+
tools?: readonly PreviewTool[];
|
|
70
83
|
}): Promise<Response>;
|
|
71
84
|
//#endregion
|
|
72
|
-
export {
|
|
85
|
+
export { publishAgentPreview as _, previewOperationTool as a, AgentPreviewOptions as c, PreviewExecutionContext as d, PublishAgentPreviewOptions as f, listAgentPreviews as g, getAgentPreview as h, PreviewTool as i, PreviewAuthorizationRequest as l, ensureAgentPreview as m, PREVIEW_MCP_ALIAS as n, previewToolsForProfile as o, assertPreviewId as p, PREVIEW_TOOLS as r, AgentPreviewError as s, servePreviewMcp as t, PreviewAuthorizer as u, removeAgentPreview as v, resolveSelfSandbox as y };
|
package/dist/runtime.d.ts
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { l as ScopedToken, t as TerminalStream } from "./terminal-stream-C9jxoB07.js";
|
|
2
|
+
import { c as InteractiveSessionIdentity, l as InteractiveSessionNotRunningError, r as browserInteractiveControlHolderId } from "./browser-interactive-control-controller-C2qVGzQz.js";
|
|
3
|
+
import { t as BrowserInteractiveSessionController } from "./interactive-controller-Dghv9yMk.js";
|
|
4
|
+
import { A as CommitTaskSessionOptions, At as FileUsageResult, Bi as SessionExecutionInfo, Ci as SandboxTerminalManager, Dt as FileTreeOptions, Er as SandboxEvent, Fi as SendSessionMessageOptions, H as CreateTaskSessionOptions, Ii as SendSessionMessageRequest, Ji as SessionMessageAdmission, Li as SentSessionMessage, Ot as FileTreeResult, Si as SandboxTerminalInfo, Sn as ListMessagesOptions, T as ChunkedUploadResult, V as CreateSessionOptions, Vi as SessionExecutionStatus, Wi as SessionInfo, bt as FileReadBatchOptions, fa as TaskSessionInfo, hi as SandboxRuntimeHealth, jt as FileWriteResult, ka as WriteFileOptions, kt as FileUsageOptions, la as TaskSessionChanges, li as SandboxPortBinding, or as RenameOptions, qi as SessionMessage, ua as TaskSessionCommitResult, w as ChunkedUploadOptions, wa as UploadProgress, wi as SandboxTerminalRequestOptions, wt as FileRenameResult, xi as SandboxTerminalCreateOptions, xt as FileReadBatchResult, zi as SessionEventStreamOptions } from "./types-C8OQ8bzc.js";
|
|
2
5
|
import { _ as TimeoutError, a as FileWriteConflictError, c as NotFoundError, f as SandboxError, g as StateError, h as ServerError, l as PartialFailureError, m as SandboxFailureDetail, n as CapabilityError, p as SandboxErrorJson, s as NetworkError, t as AuthError, u as QuotaError, v as ValidationError } from "./errors-C6dll8Qf.js";
|
|
3
|
-
import { a as deriveAgentRunOutcome, i as deriveAgentResultOutcome, n as AgentRunOutcomeTracker, r as createAgentRunOutcomeTracker, t as AgentRunOutcome } from "./agent-run-outcome-
|
|
6
|
+
import { a as deriveAgentRunOutcome, i as deriveAgentResultOutcome, n as AgentRunOutcomeTracker, r as createAgentRunOutcomeTracker, t as AgentRunOutcome } from "./agent-run-outcome-CBaBwtEo.js";
|
|
4
7
|
|
|
5
8
|
//#region src/lib/chunked-upload.d.ts
|
|
6
9
|
/** The transport a caller wires this module to — {@link SandboxInstance.runtimeFetch}
|
|
@@ -132,4 +135,4 @@ declare class SandboxRuntimeClient extends SandboxRuntimeApi {
|
|
|
132
135
|
}
|
|
133
136
|
declare function createSandboxRuntimeClient(config: SandboxRuntimeClientConfig): SandboxRuntimeClient;
|
|
134
137
|
//#endregion
|
|
135
|
-
export { type AgentRunOutcome, type AgentRunOutcomeTracker, AuthError, CapabilityError, type ChunkedUploadOptions, type ChunkedUploadResult, type ChunkedUploadTransport, type FileReadBatchOptions, type FileReadBatchResult, type FileRenameResult, type FileTreeOptions, type FileTreeResult, FileWriteConflictError, type FileWriteResult, type ListMessagesOptions, NetworkError, NotFoundError, PartialFailureError, QuotaError, type RenameOptions, SandboxError, type SandboxErrorJson, type SandboxEvent, type SandboxFailureDetail, SandboxRuntimeClient, type SandboxRuntimeClientConfig, type SandboxRuntimeHealth, type SandboxTerminalCreateOptions, type SandboxTerminalInfo, type SandboxTerminalManager, type SandboxTerminalRequestOptions, ServerError, type SessionEventStreamOptions, type SessionExecutionInfo, type SessionExecutionStatus, type SessionMessage, type SessionMessageAdmission, StateError, TimeoutError, type UploadProgress, ValidationError, type WriteFileOptions, createAgentRunOutcomeTracker, createSandboxRuntimeClient, deriveAgentResultOutcome, deriveAgentRunOutcome, uploadChunked };
|
|
138
|
+
export { type AgentRunOutcome, type AgentRunOutcomeTracker, AuthError, BrowserInteractiveSessionController, CapabilityError, type ChunkedUploadOptions, type ChunkedUploadResult, type ChunkedUploadTransport, type FileReadBatchOptions, type FileReadBatchResult, type FileRenameResult, type FileTreeOptions, type FileTreeResult, FileWriteConflictError, type FileWriteResult, type InteractiveSessionIdentity, InteractiveSessionNotRunningError, type ListMessagesOptions, NetworkError, NotFoundError, PartialFailureError, QuotaError, type RenameOptions, SandboxError, type SandboxErrorJson, type SandboxEvent, type SandboxFailureDetail, SandboxRuntimeClient, type SandboxRuntimeClientConfig, type SandboxRuntimeHealth, type SandboxTerminalCreateOptions, type SandboxTerminalInfo, type SandboxTerminalManager, type SandboxTerminalRequestOptions, type ScopedToken, ServerError, type SessionEventStreamOptions, type SessionExecutionInfo, type SessionExecutionStatus, type SessionMessage, type SessionMessageAdmission, StateError, type TerminalStream, TimeoutError, type UploadProgress, ValidationError, type WriteFileOptions, browserInteractiveControlHolderId, createAgentRunOutcomeTracker, createSandboxRuntimeClient, deriveAgentResultOutcome, deriveAgentRunOutcome, uploadChunked };
|
package/dist/runtime.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { M as createAgentRunOutcomeTracker, N as deriveAgentResultOutcome, P as deriveAgentRunOutcome, b as uploadChunked, l as SandboxRuntimeApi, t as BrowserInteractiveSessionController } from "./interactive-controller-CZpuKFMa.js";
|
|
2
2
|
import { a as FileWriteConflictError, c as NotFoundError, f as SandboxError, g as ValidationError, h as TimeoutError, l as PartialFailureError, m as StateError, n as CapabilityError, p as ServerError, s as NetworkError, t as AuthError, u as QuotaError } from "./errors-CKl_BSlD.js";
|
|
3
|
-
import {
|
|
3
|
+
import { f as combineAbortSignals, n as browserInteractiveControlHolderId, s as InteractiveSessionNotRunningError } from "./browser-interactive-control-controller-BJf0P_J4.js";
|
|
4
4
|
//#region src/runtime-client.ts
|
|
5
5
|
const DEFAULT_RUNTIME_TIMEOUT_MS = 3e4;
|
|
6
6
|
function requireToken(token) {
|
|
@@ -81,4 +81,4 @@ function createSandboxRuntimeClient(config) {
|
|
|
81
81
|
return new SandboxRuntimeClient(config);
|
|
82
82
|
}
|
|
83
83
|
//#endregion
|
|
84
|
-
export { AuthError, CapabilityError, FileWriteConflictError, NetworkError, NotFoundError, PartialFailureError, QuotaError, SandboxError, SandboxRuntimeClient, ServerError, StateError, TimeoutError, ValidationError, createAgentRunOutcomeTracker, createSandboxRuntimeClient, deriveAgentResultOutcome, deriveAgentRunOutcome, uploadChunked };
|
|
84
|
+
export { AuthError, BrowserInteractiveSessionController, CapabilityError, FileWriteConflictError, InteractiveSessionNotRunningError, NetworkError, NotFoundError, PartialFailureError, QuotaError, SandboxError, SandboxRuntimeClient, ServerError, StateError, TimeoutError, ValidationError, browserInteractiveControlHolderId, createAgentRunOutcomeTracker, createSandboxRuntimeClient, deriveAgentResultOutcome, deriveAgentRunOutcome, uploadChunked };
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { a as TerminalStreamReconnectAuthority, c as MintScopedTokenOptions, h as TerminalReadyInfo, l as ScopedToken, r as TerminalStreamHandlers, t as TerminalStream } from "./terminal-stream-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { a as TerminalStreamReconnectAuthority, c as MintScopedTokenOptions, h as TerminalReadyInfo, l as ScopedToken, r as TerminalStreamHandlers, t as TerminalStream } from "./terminal-stream-C9jxoB07.js";
|
|
2
|
+
import { f as InteractiveAttachOptions, g as InteractiveSessionStatus, h as InteractiveRequestOptions, m as InteractiveControlClaimOptions, p as InteractiveControlClaimAcknowledgement } from "./browser-interactive-control-controller-C2qVGzQz.js";
|
|
3
|
+
import { r as InteractiveAttachRequest } from "./interactive-controller-Dghv9yMk.js";
|
|
4
|
+
import { F as SandboxLines } from "./lines-CqurEIaM.js";
|
|
5
|
+
import { A as CommitTaskSessionOptions, Aa as WriteManyFile, An as NetworkManager, Bi as SessionExecutionInfo, C as BranchOptions, Cr as SandboxDeleteOptions, D as CodeExecutionResult, Da as WaitForRolloutOptions, E as CodeExecutionOptions, Ea as WaitForOptions, Ei as SandboxTraceBundle, Er as SandboxEvent, Fi as SendSessionMessageOptions, Fn as PreviewLinkManager, Gi as SessionInterruptOptions, Gn as PromptInputPart, H as CreateTaskSessionOptions, Ii as SendSessionMessageRequest, Ji as SessionMessageAdmission, Jn as ProvisionEvent, Ki as SessionListOptions, Kn as PromptOptions, Li as SentSessionMessage, M as ConversationTurnOptions, Mi as SearchOptions, N as ConversationTurnResult, Nn as PermissionsManager, O as CodeLanguage, Oa as WorkspaceOperationLookup, Q as DispatchedSession, Qi as SnapshotDeleteAcknowledgement, Sn as ListMessagesOptions, Sr as SandboxDeleteAcknowledgement, Ti as SandboxTerminals, Tt as FileSystem, Ui as SessionForkOptions, V as CreateSessionOptions, Vn as ProcessManager, Wi as SessionInfo, Xi as SessionResultOptions, Xt as ForkIdempotency, Yn as ProvisionResult, Yt as ForkCounts, Z as DispatchPromptOptions, Zr as SandboxFleetTraceBundle, Zt as ForkLookupOptions, _n as IntelligenceReportBudget, _r as SSHCredentials, _t as ExecOptions, aa as StartupDiagnostics, an as GpuLease, at as DurablePlan, bi as SandboxTerminalAttachOptions, bn as IntelligenceReportWindow, cr as ResumeOptions, d as BackendConfig, dr as RolloutOptions, en as GitBranch, fa as TaskSessionInfo, fi as SandboxResourceUsage, ft as EgressManager, ga as TeeAttestationResponse, gi as SandboxShape, gn as IntelligenceReport, gr as SSHCommandDescriptor, hi as SandboxRuntimeHealth, hn as InstalledTool, ht as EventStreamOptions, in as GitStatus, j as CompletedTurnResult, ja as WriteManyOptions, ji as SearchMatch, jt as FileWriteResult, ka as WriteFileOptions, ki as SandboxTraceOptions, la as TaskSessionChanges, li as SandboxPortBinding, lr as Rollout, ma as TeeAttestationOptions, mi as SandboxRuntimeCapabilities, na as SnapshotOptions, ot as DurablePlanDecisionResult, p as BackendManager, pr as RolloutStartResult, qi as SessionMessage, qn as PromptResult, ra as SnapshotResult, rn as GitDiff, rt as DriverInfo, si as SandboxInfo, sr as RestoreSnapshotOptions, ta as SnapshotInfo, tn as GitCommit, tt as DriveTurnOptions, ua as TaskSessionCommitResult, un as GpuLeaseManager, va as TeePublicKeyResponse, vn as IntelligenceReportCompareTo, vt as ExecResult, xa as TurnDriveResult, xn as JsonValue, xr as SandboxCreateReceipt, yi as SandboxStatus, yr as SandboxConnection, zi as SessionEventStreamOptions } from "./types-C8OQ8bzc.js";
|
|
5
6
|
import { AgentInteractiveSessionAttach, AgentInteractiveSessionControlClaim, AgentInteractiveSessionControlClaimAcknowledgement, AgentInteractiveSessionControlClaimRequest, AgentInteractiveSessionPromptAcknowledgement, AgentInteractiveSessionPromptCommand, AgentInteractiveSessionRef, AgentInteractiveSessionStart, AgentInteractiveSessionStopAcknowledgement, AgentInteractiveSessionStopCommand, AgentInteractiveTerminalSession, AgentInteractiveTerminalSession as AgentInteractiveTerminalSession$1, AgentRunCancellationAcknowledgement, AgentRunCancellationRequest, InteractionAcknowledgement, InteractionData, InteractionRequest, InteractionResponseCommand, TerminalOutputEvent, TerminalReplayWindow, agentInteractiveSessionPromptRequestDigest } from "@tangle-network/agent-interface";
|
|
6
7
|
import { z } from "zod";
|
|
7
8
|
|
|
@@ -190,41 +191,6 @@ interface SandboxInteractionCommandResult {
|
|
|
190
191
|
serverResult?: SandboxInteractionResult;
|
|
191
192
|
}
|
|
192
193
|
//#endregion
|
|
193
|
-
//#region src/interactive-controller.d.ts
|
|
194
|
-
/** The request fields supplied by an attach caller before control is claimed. */
|
|
195
|
-
type InteractiveAttachRequest = Omit<InteractiveAttachOptions, "control">;
|
|
196
|
-
/** Transport used by the status → claim → WebSocket controller. */
|
|
197
|
-
interface InteractiveSessionControllerTransport extends InteractiveSessionControlTransport {
|
|
198
|
-
attach(sessionId: string, ref: AgentInteractiveSessionRef, request: InteractiveAttachOptions, options?: InteractiveRequestOptions, reconnectAuthority?: TerminalStreamReconnectAuthority): Promise<TerminalStream>;
|
|
199
|
-
}
|
|
200
|
-
interface InteractiveSessionControllerOptions extends InteractiveSessionControlControllerOptions {}
|
|
201
|
-
/**
|
|
202
|
-
* Attach-capable controller for one exact interactive process.
|
|
203
|
-
*
|
|
204
|
-
* Control ownership lives in the dependency-light base controller. This layer
|
|
205
|
-
* adds only the terminal attach operation after that ownership is resolved.
|
|
206
|
-
*/
|
|
207
|
-
declare class InteractiveSessionController extends InteractiveSessionControlController {
|
|
208
|
-
private readonly attachTransport;
|
|
209
|
-
private attachInFlight?;
|
|
210
|
-
constructor(attachTransport: InteractiveSessionControllerTransport, options: InteractiveSessionControllerOptions);
|
|
211
|
-
attach(request: InteractiveAttachRequest, requestOptions?: InteractiveRequestOptions): Promise<TerminalStream>;
|
|
212
|
-
/**
|
|
213
|
-
* Open a stream for a claim returned by this controller's `resolve()`.
|
|
214
|
-
* The controller releases that claim when the stream cannot be opened.
|
|
215
|
-
*/
|
|
216
|
-
attachWithIdentity(identity: InteractiveSessionIdentity, request: InteractiveAttachRequest, requestOptions?: InteractiveRequestOptions): Promise<TerminalStream>;
|
|
217
|
-
}
|
|
218
|
-
/** Browser transport options for the attach-capable controller. */
|
|
219
|
-
interface BrowserInteractiveSessionControllerOptions extends InteractiveSessionControllerOptions, BrowserInteractiveSessionControlControllerOptions {
|
|
220
|
-
/** Mint a future session-runtime token for every browser terminal dial. */
|
|
221
|
-
terminalTokenProvider?: (signal?: AbortSignal) => Promise<ScopedToken>;
|
|
222
|
-
}
|
|
223
|
-
/** Concrete controller for browser deep links and terminal attachment. */
|
|
224
|
-
declare class BrowserInteractiveSessionController extends InteractiveSessionController {
|
|
225
|
-
constructor(options: BrowserInteractiveSessionControllerOptions);
|
|
226
|
-
}
|
|
227
|
-
//#endregion
|
|
228
194
|
//#region src/interactive-terminal-session.d.ts
|
|
229
195
|
/** Metadata required to describe one terminal without reading provider state. */
|
|
230
196
|
interface InteractiveTerminalMetadata {
|
|
@@ -1864,6 +1830,9 @@ declare class SandboxInstance {
|
|
|
1864
1830
|
* Resume a stopped sandbox.
|
|
1865
1831
|
*/
|
|
1866
1832
|
resume(options?: ResumeOptions): Promise<void>;
|
|
1833
|
+
/** Rebuild a stopped sandbox from its durable snapshot under the same ID. */
|
|
1834
|
+
rebuild(options?: ResumeOptions): Promise<void>;
|
|
1835
|
+
private resumeRuntime;
|
|
1867
1836
|
/**
|
|
1868
1837
|
* Delete the sandbox permanently. This is how a forked child is destroyed.
|
|
1869
1838
|
*
|
|
@@ -2210,4 +2179,4 @@ declare class SandboxInstance {
|
|
|
2210
2179
|
}): Promise<DurablePlanDecisionResult>;
|
|
2211
2180
|
}
|
|
2212
2181
|
//#endregion
|
|
2213
|
-
export {
|
|
2182
|
+
export { InteractiveStopCommand as A, SandboxInteractionConflict as B, InteractiveSessionHandleOptions as C, InteractiveSessionRef as D, InteractiveSessionInfo as E, InteractiveTerminalFrameLog as F, CONTROL_PLANE_MCP_SERVER_NAME as G, SandboxInteractionResult as H, InteractiveTerminalMetadata as I, SandboxMcpEndpoint as J, SANDBOX_MCP_SERVER_NAME as K, createInteractiveTerminalCapture as L, RespondToPermissionOptions as M, agentInteractiveSessionPromptRequestDigest as N, InteractiveSessionStartOptions as O, InteractiveTerminalCapture as P, createInteractiveTerminalSession as R, InteractiveSessionHandle as S, InteractiveSessionIncarnationId as T, BuildControlPlaneMcpConfigOptions as U, SandboxInteractionResolution as V, BuildSandboxMcpConfigOptions as W, buildControlPlaneMcpConfig as X, SandboxMcpServerEntry as Y, buildSandboxMcpConfig as Z, SandboxSession as _, WorkspaceImagePublishRequestOptions as a, InteractivePromptCommand as b, TraceExportFormat as c, buildTraceExportPayload as d, exportTraceBundle as f, RawEvidenceExport as g, SandboxTaskSession as h, WorkspaceImagePublishInput as i, InterruptResult as j, InteractiveSessionStartResult as k, TraceExportResult as l, toOtelJson as m, HttpClient as n, WorkspaceImagePublishResult as o, otelTraceIdForTangleTrace as p, SandboxMcpConfig as q, SandboxInstance as r, WorkspaceImages as s, ForkAcknowledgement as t, TraceExportSink as u, AgentInteractiveTerminalSession$1 as v, InteractiveSessionHost as w, InteractiveSessionControlClaim as x, InteractiveControlClaimRequest as y, SandboxInteractionCommandResult as z };
|