@tangle-network/sandbox 0.60.54-develop.20261014160232.e048d61 → 0.60.55-develop.20261014191515.7241912
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 +2 -2
- package/dist/agent/index.js +2 -2
- package/dist/agent/preview.d.ts +1 -1
- package/dist/auth/index.js +1 -1
- package/dist/{cli-auth-bundle-vsnTj4FA.js → cli-auth-bundle-BWNakb5F.js} +21 -8
- package/dist/{client-Bjv76qkD.d.ts → client-CjjKVtr1.d.ts} +2 -0
- package/dist/{client-BPYCNSRH.js → client-DfDYb9iE.js} +14 -5
- package/dist/core.d.ts +1 -1
- package/dist/core.js +2 -2
- package/dist/examples/quickstart.d.ts +16 -0
- package/dist/examples/quickstart.js +61 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3 -3
- package/dist/{local-cli-auth-DR31IFOk.js → local-cli-auth-CZjO7FeG.js} +1 -1
- package/dist/{preview-D52HIxPc.d.ts → preview-C4K82Dnz.d.ts} +1 -1
- package/dist/{sandbox-DFHEqIKW.js → sandbox-BqM5Ky9N.js} +1 -1
- package/dist/tangle/index.js +1 -1
- package/dist/{tangle-B8B5v9AH.js → tangle-D7VHyODa.js} +1 -1
- package/package.json +9 -3
package/dist/agent/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { _ as SandboxSession, h as SandboxTaskSession, r as SandboxInstance } from "../sandbox-pZegGEjr.js";
|
|
2
2
|
import { D as CodeExecutionResult, E as CodeExecutionOptions, O as CodeLanguage, Qi as SessionInfo, Qr as SandboxFleetParent, ao as BackendType, d as BackendConfig, ea as SessionListOptions, k as CodeResultPart } from "../types-BNWkYhQf.js";
|
|
3
|
-
import { i as Sandbox } from "../client-
|
|
4
|
-
import { u as PreviewAuthorizer } from "../preview-
|
|
3
|
+
import { i as Sandbox } from "../client-CjjKVtr1.js";
|
|
4
|
+
import { u as PreviewAuthorizer } from "../preview-C4K82Dnz.js";
|
|
5
5
|
import * as _$_modelcontextprotocol_sdk_server_index_js0 from "@modelcontextprotocol/sdk/server/index.js";
|
|
6
6
|
import { JSONSchema } from "zod/v4/core";
|
|
7
7
|
import { ToolSet } from "ai";
|
package/dist/agent/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { a as TOOL_SPECS, i as ALL_TOOL_SPECS, o as serializeToolResult, r as bindToolSpecs, t as createMcpServer } from "../mcp-local-DjryqUiY.js";
|
|
2
2
|
import { E as assertCurrentBackendType } from "../interactive-controller-DbKLSfTD.js";
|
|
3
3
|
import { h as StateError, l as NotFoundError, v as ValidationError } from "../errors-iWIsey1D.js";
|
|
4
|
-
import { n as Sandbox } from "../client-
|
|
5
|
-
import { t as SandboxInstance } from "../sandbox-
|
|
4
|
+
import { n as Sandbox } from "../client-DfDYb9iE.js";
|
|
5
|
+
import { t as SandboxInstance } from "../sandbox-BqM5Ky9N.js";
|
|
6
6
|
import { z } from "zod";
|
|
7
7
|
//#region src/agent/instances.ts
|
|
8
8
|
const managers = /* @__PURE__ */ new WeakMap();
|
package/dist/agent/preview.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { _ as publishAgentPreview, a as previewOperationTool, c as AgentPreviewOptions, d as PreviewExecutionContext, f as PublishAgentPreviewOptions, g as listAgentPreviews, h as getAgentPreview, i as PreviewTool, l as PreviewAuthorizationRequest, m as ensureAgentPreview, n as PREVIEW_MCP_ALIAS, o as previewToolsForProfile, p as assertPreviewId, r as PREVIEW_TOOLS, s as AgentPreviewError, t as servePreviewMcp, u as PreviewAuthorizer, v as removeAgentPreview, y as resolveSelfSandbox } from "../preview-
|
|
1
|
+
import { _ as publishAgentPreview, a as previewOperationTool, c as AgentPreviewOptions, d as PreviewExecutionContext, f as PublishAgentPreviewOptions, g as listAgentPreviews, h as getAgentPreview, i as PreviewTool, l as PreviewAuthorizationRequest, m as ensureAgentPreview, n as PREVIEW_MCP_ALIAS, o as previewToolsForProfile, p as assertPreviewId, r as PREVIEW_TOOLS, s as AgentPreviewError, t as servePreviewMcp, u as PreviewAuthorizer, v as removeAgentPreview, y as resolveSelfSandbox } from "../preview-C4K82Dnz.js";
|
|
2
2
|
export { AgentPreviewError, AgentPreviewOptions, PREVIEW_MCP_ALIAS, PREVIEW_TOOLS, PreviewAuthorizationRequest, PreviewAuthorizer, PreviewExecutionContext, PreviewTool, PublishAgentPreviewOptions, assertPreviewId, ensureAgentPreview, getAgentPreview, listAgentPreviews, previewOperationTool, previewToolsForProfile, publishAgentPreview, removeAgentPreview, resolveSelfSandbox, servePreviewMcp };
|
package/dist/auth/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as materializeCliAuthBundle, n as assertCliAuthReferenceSupported, r as cliAuthReferenceSchema } from "../cli-auth-bundle-
|
|
1
|
+
import { i as materializeCliAuthBundle, n as assertCliAuthReferenceSupported, r as cliAuthReferenceSchema } from "../cli-auth-bundle-BWNakb5F.js";
|
|
2
2
|
//#region src/auth/tokens.ts
|
|
3
3
|
const textEncoder = new TextEncoder();
|
|
4
4
|
const textDecoder = new TextDecoder();
|
|
@@ -393,7 +393,7 @@ const NATIVE_SESSION_CONTRACTS = {
|
|
|
393
393
|
/** Persistent Kimi wire process and shared create/resume prewarm gates. */
|
|
394
394
|
const AGENT_INTERNAL_KIMI_WARM_SERVER_ENV_VAR = "AGENT_INTERNAL_KIMI_WARM_SERVER";
|
|
395
395
|
//#endregion
|
|
396
|
-
//#region ../../../packages/cli-agent-registry/dist/specs-
|
|
396
|
+
//#region ../../../packages/cli-agent-registry/dist/specs-B7vJDLJI.mjs
|
|
397
397
|
z.globalRegistry.add(agentProfileSchema$1, {
|
|
398
398
|
id: "AgentProfile",
|
|
399
399
|
...agentProfileJsonSchema
|
|
@@ -537,7 +537,6 @@ const CLI_AGENT_SPECS = [
|
|
|
537
537
|
oauthToken: "CLAUDE_CODE_OAUTH_TOKEN",
|
|
538
538
|
baseUrl: "ANTHROPIC_BASE_URL"
|
|
539
539
|
},
|
|
540
|
-
defaultModel: "anthropic/claude-opus-5",
|
|
541
540
|
modelWire: "anthropic-messages",
|
|
542
541
|
capabilities: {
|
|
543
542
|
streaming: true,
|
|
@@ -619,7 +618,6 @@ const CLI_AGENT_SPECS = [
|
|
|
619
618
|
authFiles: "CODEX_AUTH_FILES_JSON",
|
|
620
619
|
baseUrl: "OPENAI_BASE_URL"
|
|
621
620
|
},
|
|
622
|
-
defaultModel: "openai/gpt-5.6-luna",
|
|
623
621
|
modelWire: "openai-responses",
|
|
624
622
|
capabilities: {
|
|
625
623
|
streaming: true,
|
|
@@ -649,6 +647,7 @@ const CLI_AGENT_SPECS = [
|
|
|
649
647
|
messageStorageDir: ".amp-sessions",
|
|
650
648
|
displayName: "AMP (Sourcegraph)",
|
|
651
649
|
description: "Sourcegraph AMP CLI-based agent backend.",
|
|
650
|
+
callerCredentialOnly: true,
|
|
652
651
|
envVars: {
|
|
653
652
|
apiKey: "AMP_API_KEY",
|
|
654
653
|
model: "AMP_MODEL_NAME",
|
|
@@ -675,8 +674,11 @@ const CLI_AGENT_SPECS = [
|
|
|
675
674
|
nativeSession: NATIVE_SESSION_CONTRACTS["factory-droids"],
|
|
676
675
|
messageStorageDir: ".factory-droids",
|
|
677
676
|
displayName: "Factory Droids",
|
|
678
|
-
description: "Factory Droids CLI-based agent backend.",
|
|
679
|
-
envVars: {
|
|
677
|
+
description: "Factory Droids CLI-based agent backend. A managed box runs its Tangle Router model as a droid custom model; a caller's FACTORY_API_KEY runs on the caller's Factory account.",
|
|
678
|
+
envVars: {
|
|
679
|
+
apiKey: "FACTORY_API_KEY",
|
|
680
|
+
model: "FACTORY_DROIDS_MODEL_NAME"
|
|
681
|
+
},
|
|
680
682
|
capabilities: {
|
|
681
683
|
streaming: true,
|
|
682
684
|
toolUse: true,
|
|
@@ -727,7 +729,11 @@ const CLI_AGENT_SPECS = [
|
|
|
727
729
|
messageStorageDir: ".prime-provider",
|
|
728
730
|
displayName: "Prime Agent (PrimeIntellect)",
|
|
729
731
|
description: "PrimeIntellect-ai/prime-agent — IPython-first coding agent (pi hard fork, fork line 0.7.x) driven over its native ACP mode. Model tuple travels via backend.model into a per-session materialized models.json, never env; the adapter pins PRIME_AGENT_CODING_AGENT_DIR to an isolated per-session agent dir (fail-closed harness-state isolation).",
|
|
730
|
-
envVars: {
|
|
732
|
+
envVars: {
|
|
733
|
+
apiKey: "OPENCODE_MODEL_API_KEY",
|
|
734
|
+
model: "TANGLE_ROUTER_MODEL",
|
|
735
|
+
baseUrl: "TANGLE_ROUTER_BASE_URL"
|
|
736
|
+
},
|
|
731
737
|
hostPassthroughEnvVars: ["PRIME_AGENT_INSTALL_UV", "PRIME_AGENT_KERNEL_PYTHON"],
|
|
732
738
|
capabilities: {
|
|
733
739
|
streaming: true,
|
|
@@ -873,8 +879,13 @@ const CLI_AGENT_SPECS = [
|
|
|
873
879
|
nativeSession: NATIVE_SESSION_CONTRACTS.acp,
|
|
874
880
|
messageStorageDir: ".acp-agent",
|
|
875
881
|
displayName: "ACP Bridge (multi-agent)",
|
|
876
|
-
description: "Generic Agent Client Protocol bridge — fronts any ACP-compliant agent binary (claude-agent-acp, codex-acp, gemini, openclaw acp,
|
|
877
|
-
envVars: {
|
|
882
|
+
description: "Generic Agent Client Protocol bridge — fronts any ACP-compliant agent binary (claude-agent-acp, codex-acp, gemini, openclaw acp, hermes acp). Pick the backing agent via config.subAgent; hermes runs on the box's Router model when none is named. One TypeScript adapter, many supported coding harnesses.",
|
|
883
|
+
envVars: {
|
|
884
|
+
apiKey: "OPENCODE_MODEL_API_KEY",
|
|
885
|
+
model: "TANGLE_ROUTER_MODEL",
|
|
886
|
+
baseUrl: "TANGLE_ROUTER_BASE_URL",
|
|
887
|
+
authFiles: "ACP_AUTH_FILES_JSON"
|
|
888
|
+
},
|
|
878
889
|
capabilities: {
|
|
879
890
|
streaming: true,
|
|
880
891
|
toolUse: true,
|
|
@@ -896,6 +907,8 @@ const CLI_AGENT_SPECS = [
|
|
|
896
907
|
messageStorageDir: ".cursor-sdk-sessions",
|
|
897
908
|
displayName: "Cursor Agent SDK",
|
|
898
909
|
description: "Cursor Agent SDK backend. Runs Cursor's local agent against the sandbox workspace via @cursor/sdk, using CURSOR_API_KEY or backend.model.apiKey for authentication.",
|
|
910
|
+
callerCredentialOnly: true,
|
|
911
|
+
egressHosts: ["api2.cursor.sh", "api.cursor.com"],
|
|
899
912
|
envVars: {
|
|
900
913
|
apiKey: "CURSOR_API_KEY",
|
|
901
914
|
model: "CURSOR_MODEL_NAME"
|
|
@@ -52,6 +52,7 @@ declare const backendRegistryEntrySchema: z.ZodObject<{
|
|
|
52
52
|
configurable: z.ZodBoolean;
|
|
53
53
|
interactions: z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<("permission" | "question" | "plan")[], string[]>>;
|
|
54
54
|
}, z.core.$strip>;
|
|
55
|
+
callerCredentialOnly: z.ZodOptional<z.ZodBoolean>;
|
|
55
56
|
}, z.core.$strip>;
|
|
56
57
|
/** The exact response returned by authenticated `GET /v1/backends`. */
|
|
57
58
|
declare const backendRegistryResponseSchema: z.ZodObject<{
|
|
@@ -74,6 +75,7 @@ declare const backendRegistryResponseSchema: z.ZodObject<{
|
|
|
74
75
|
configurable: z.ZodBoolean;
|
|
75
76
|
interactions: z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<("permission" | "question" | "plan")[], string[]>>;
|
|
76
77
|
}, z.core.$strip>;
|
|
78
|
+
callerCredentialOnly: z.ZodOptional<z.ZodBoolean>;
|
|
77
79
|
}, z.core.$strip>>;
|
|
78
80
|
timestamp: z.ZodString;
|
|
79
81
|
}, z.core.$strip>;
|
|
@@ -2,7 +2,7 @@ import { r as backendTypeSchema } from "./backend-types-C7b_Gpa0.js";
|
|
|
2
2
|
import { D as foldModelRoutingFields, E as assertCurrentBackendType, M as withProfileHarness, S as encodePromptForWire, T as applyRequestedModel, k as normalizeRuntimeBackendConfig, s as requestInteractiveSessionToken, w as parseSSEStream } from "./interactive-controller-DbKLSfTD.js";
|
|
3
3
|
import { _ as TimeoutError, b as parseResponseError, c as NetworkError, d as QuotaError, l as NotFoundError, m as ServerError, p as SandboxError, s as NON_RETRYABLE_CREATE_QUOTA_REASONS, t as AuthError, u as PartialFailureError, v as ValidationError, x as readResponseJson, y as parseErrorResponse } from "./errors-iWIsey1D.js";
|
|
4
4
|
import { f as combineAbortSignals } from "./browser-interactive-control-controller-BJf0P_J4.js";
|
|
5
|
-
import { A as exportTraceBundle, C as splitInlineProfileFileMounts, D as normalizeSandboxShape, E as normalizeConnection, O as rewrapResponse, T as validateDeferredProfileFileMounts, a as normalizeStartupDiagnostics, i as normalizeSandboxCreateReceipt, n as createSandboxInstanceFromResponse, r as normalizeCaptureProof, w as splitInlineProfileSkills } from "./sandbox-
|
|
5
|
+
import { A as exportTraceBundle, C as splitInlineProfileFileMounts, D as normalizeSandboxShape, E as normalizeConnection, O as rewrapResponse, T as validateDeferredProfileFileMounts, a as normalizeStartupDiagnostics, i as normalizeSandboxCreateReceipt, n as createSandboxInstanceFromResponse, r as normalizeCaptureProof, w as splitInlineProfileSkills } from "./sandbox-BqM5Ky9N.js";
|
|
6
6
|
import { LinesClient } from "./lines.js";
|
|
7
7
|
import { agentProfileSchema } from "@tangle-network/agent-interface";
|
|
8
8
|
import { z } from "zod";
|
|
@@ -36,7 +36,12 @@ const backendRegistryEntrySchema = z.object({
|
|
|
36
36
|
type: z.string().min(1),
|
|
37
37
|
name: z.string(),
|
|
38
38
|
description: z.string(),
|
|
39
|
-
capabilities: backendRegistryCapabilitiesSchema
|
|
39
|
+
capabilities: backendRegistryCapabilitiesSchema,
|
|
40
|
+
/**
|
|
41
|
+
* True when Tangle Router cannot serve the backend, so a create must carry
|
|
42
|
+
* the caller's own credential. Absent from an API that predates the field.
|
|
43
|
+
*/
|
|
44
|
+
callerCredentialOnly: z.boolean().optional()
|
|
40
45
|
});
|
|
41
46
|
/** The exact response returned by authenticated `GET /v1/backends`. */
|
|
42
47
|
const backendRegistryResponseSchema = z.object({
|
|
@@ -3323,11 +3328,11 @@ function withRequestContextHeaders(response, path, method, body = response.body)
|
|
|
3323
3328
|
return rewrapResponse(response, headers, body);
|
|
3324
3329
|
}
|
|
3325
3330
|
async function resolveLocalCliAuthFiles(backendType) {
|
|
3326
|
-
const { discoverLocalCliAuthFiles } = await import("./local-cli-auth-
|
|
3331
|
+
const { discoverLocalCliAuthFiles } = await import("./local-cli-auth-CZjO7FeG.js");
|
|
3327
3332
|
return discoverLocalCliAuthFiles(backendType);
|
|
3328
3333
|
}
|
|
3329
3334
|
async function describeLocalCliAuthExpectation(backendType) {
|
|
3330
|
-
const { describeLocalCliAuthExpectation: describe } = await import("./local-cli-auth-
|
|
3335
|
+
const { describeLocalCliAuthExpectation: describe } = await import("./local-cli-auth-CZjO7FeG.js");
|
|
3331
3336
|
return describe(backendType);
|
|
3332
3337
|
}
|
|
3333
3338
|
/**
|
|
@@ -3968,7 +3973,10 @@ var Sandbox = class Sandbox {
|
|
|
3968
3973
|
*/
|
|
3969
3974
|
async get(id) {
|
|
3970
3975
|
const response = await this.fetch(`/v1/sandboxes/${encodeURIComponent(id)}`);
|
|
3971
|
-
if (response.status === 404)
|
|
3976
|
+
if (response.status === 404) {
|
|
3977
|
+
await response.body?.cancel();
|
|
3978
|
+
return null;
|
|
3979
|
+
}
|
|
3972
3980
|
const data = await readResponseJson(response);
|
|
3973
3981
|
return createSandboxInstanceFromResponse(this, this.parseInfo(data), void 0, data);
|
|
3974
3982
|
}
|
|
@@ -4259,6 +4267,7 @@ var Sandbox = class Sandbox {
|
|
|
4259
4267
|
const requestTimeoutMs = typeof fetchOptions?.timeoutMs === "number" && fetchOptions.timeoutMs > 0 ? fetchOptions.timeoutMs : this.timeoutMs;
|
|
4260
4268
|
const controller = new AbortController();
|
|
4261
4269
|
const timeoutId = setTimeout(() => controller.abort(), requestTimeoutMs);
|
|
4270
|
+
timeoutId.unref?.();
|
|
4262
4271
|
const requestSignal = options?.signal ? combineAbortSignals([options.signal, controller.signal]) : controller.signal;
|
|
4263
4272
|
let bodyOwnsTimeout = false;
|
|
4264
4273
|
try {
|
package/dist/core.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a as WorkspaceImagePublishRequestOptions, i as WorkspaceImagePublishInput, o as WorkspaceImagePublishResult, r as SandboxInstance, s as WorkspaceImages, v as ProfileFileDeliveryReport } from "./sandbox-pZegGEjr.js";
|
|
2
2
|
import { An as ManagedProcessRecord, B as CreateSandboxOptions, Di as SandboxStatus, Er as SandboxConfig, Ha as SandboxEnvRecovery, Hn as PreviewLinkManager, In as NetworkConfig, M as ConversationTurnOptions, Mn as ManagedProcessSpec, N as ConversationTurnResult, Nn as ManagedProcessState, On as ManagedProcessJobs, Qn as PromptInputPart, Ua as SandboxEnvRecoveryView, Un as PreviewLinkWaitOptions, Vn as PreviewLinkInfo, jn as ManagedProcessResumeOptions, kn as ManagedProcessOptions, mi as SandboxInfo, na as SessionMessageAdmission, vt as ExecOptions, yt as ExecResult } from "./types-BNWkYhQf.js";
|
|
3
3
|
import { A as LineSenderVerification, B as profileChannelReference, C as LineReplyCodeInput, G as LineApplicationResult, H as LINE_APPLICATION_REQUEST_MAX_BYTES, I as LinesClient, J as parseLineApplicationRequest, K as LineApplicationState, O as LineSendInput, S as LineReplyCode, U as LineApplication, V as LINE_APPLICATION_REPLY_MAX_CHARS, W as LineApplicationRequest, Y as parseLineApplicationResult, a as LineApplicationAttachOptions, b as LineProvider, c as LineAttachmentReauthorization, d as LineInstanceAttachOptions, f as LineInstanceCreate, h as LineMemberInstance, j as LineSenderVerificationStart, k as LineSendReceipt, l as LineExecutionKey, m as LineMember, n as LineAgentRolePolicy, q as LineApplicationView, s as LineAttachment, t as Line, x as LineReminderPreferences, y as LineNumberInventory, z as lineInstanceKey } from "./lines-Bv-HWQd3.js";
|
|
4
|
-
import { A as BackendRegistryEntry, C as InstancesClient, F as backendRegistryInteractionKindSchema, I as backendRegistryResponseSchema, L as isBackendRegistryInteractionKind, M as BackendRegistryResponse, N as backendRegistryCapabilitiesSchema, P as backendRegistryEntrySchema, R as parseBackendRegistryResponse, _ as EnsureInstanceOptions, b as InstanceRecord, i as Sandbox, j as BackendRegistryInteractionKind, k as BackendRegistryCapabilities, v as HostedInstance, x as InstanceRestartingError, y as InstanceProfile, z as parseBackendRegistryResponseBody } from "./client-
|
|
4
|
+
import { A as BackendRegistryEntry, C as InstancesClient, F as backendRegistryInteractionKindSchema, I as backendRegistryResponseSchema, L as isBackendRegistryInteractionKind, M as BackendRegistryResponse, N as backendRegistryCapabilitiesSchema, P as backendRegistryEntrySchema, R as parseBackendRegistryResponse, _ as EnsureInstanceOptions, b as InstanceRecord, i as Sandbox, j as BackendRegistryInteractionKind, k as BackendRegistryCapabilities, v as HostedInstance, x as InstanceRestartingError, y as InstanceProfile, z as parseBackendRegistryResponseBody } from "./client-CjjKVtr1.js";
|
|
5
5
|
import { a as FileWriteConflictError, b as ValidationError, 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, y as TimeoutError } from "./errors-sEMGx6WV.js";
|
|
6
6
|
import { t as ManagedProcessClient } from "./managed-process-BJoSEHl_.js";
|
|
7
7
|
|
package/dist/core.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { _ as TimeoutError, a as FileWriteConflictError, c as NetworkError, d as QuotaError, h as StateError, l as NotFoundError, m as ServerError, n as CapabilityError, p as SandboxError, t as AuthError, u as PartialFailureError, v as ValidationError } from "./errors-iWIsey1D.js";
|
|
2
|
-
import { _ as parseBackendRegistryResponse, a as InstanceRestartingError, f as backendRegistryCapabilitiesSchema, g as isBackendRegistryInteractionKind, h as backendRegistryResponseSchema, i as HostedInstance, m as backendRegistryInteractionKindSchema, n as Sandbox, o as InstancesClient, p as backendRegistryEntrySchema, v as parseBackendRegistryResponseBody } from "./client-
|
|
3
|
-
import { o as WorkspaceImages, t as SandboxInstance, x as ManagedProcessClient } from "./sandbox-
|
|
2
|
+
import { _ as parseBackendRegistryResponse, a as InstanceRestartingError, f as backendRegistryCapabilitiesSchema, g as isBackendRegistryInteractionKind, h as backendRegistryResponseSchema, i as HostedInstance, m as backendRegistryInteractionKindSchema, n as Sandbox, o as InstancesClient, p as backendRegistryEntrySchema, v as parseBackendRegistryResponseBody } from "./client-DfDYb9iE.js";
|
|
3
|
+
import { o as WorkspaceImages, t as SandboxInstance, x as ManagedProcessClient } from "./sandbox-BqM5Ky9N.js";
|
|
4
4
|
import { LinesClient, lineInstanceKey, profileChannelReference } from "./lines.js";
|
|
5
5
|
import { i as parseLineApplicationResult, n as LINE_APPLICATION_REQUEST_MAX_BYTES, r as parseLineApplicationRequest, t as LINE_APPLICATION_REPLY_MAX_CHARS } from "./line-application-Cq6dJLBD.js";
|
|
6
6
|
//#region src/core.ts
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
//#region src/examples/quickstart.d.ts
|
|
2
|
+
/** One runnable quickstart example, type-checked against this SDK in CI. */
|
|
3
|
+
interface QuickstartExample {
|
|
4
|
+
/** Stable identifier, e.g. `fix-failing-test`. */
|
|
5
|
+
id: string;
|
|
6
|
+
/** What the reader gets, e.g. "Fix a failing test". */
|
|
7
|
+
title: string;
|
|
8
|
+
/** One sentence for a card or tab. */
|
|
9
|
+
summary: string;
|
|
10
|
+
language: "typescript";
|
|
11
|
+
/** The complete file, ready to copy and run. */
|
|
12
|
+
code: string;
|
|
13
|
+
}
|
|
14
|
+
declare const quickstartExamples: readonly QuickstartExample[];
|
|
15
|
+
//#endregion
|
|
16
|
+
export { QuickstartExample, quickstartExamples };
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
//#region src/examples/quickstart.ts
|
|
2
|
+
const quickstartExamples = [
|
|
3
|
+
{
|
|
4
|
+
id: "run-code",
|
|
5
|
+
title: "Run code",
|
|
6
|
+
summary: "The fastest first success: a machine, one command, cleaned up.",
|
|
7
|
+
language: "typescript",
|
|
8
|
+
code: "import { Sandbox } from \"@tangle-network/sandbox\";\n\nconst client = new Sandbox({\n apiKey: process.env.TANGLE_API_KEY!,\n baseUrl: \"https://sandbox.tangle.tools\",\n});\n\nconst box = await client.create();\ntry {\n const { stdout } = await box.exec(\n \"python3 -c 'print(sum(range(1_000_000)))'\",\n );\n console.log(stdout);\n} finally {\n await box.delete();\n}\n"
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
id: "fix-failing-test",
|
|
12
|
+
title: "Fix a failing test",
|
|
13
|
+
summary: "A real job for an agent, a real check that it worked, and a patch you keep.",
|
|
14
|
+
language: "typescript",
|
|
15
|
+
code: "import { writeFile } from \"node:fs/promises\";\nimport { Sandbox } from \"@tangle-network/sandbox\";\n\nconst client = new Sandbox({\n apiKey: process.env.TANGLE_API_KEY!,\n baseUrl: \"https://sandbox.tangle.tools\",\n});\n\nconst box = await client.create({\n git: { url: \"https://github.com/your-org/your-repo\" },\n backend: { type: \"claude-code\" },\n});\ntry {\n const run = await box.prompt(\n \"`npm test` fails. Find the cause, fix it, and make the suite pass.\",\n );\n if (!run.success) throw new Error(run.error);\n\n // A finished turn is not a finished task: check the result yourself.\n const tests = await box.exec(\"npm test\");\n if (tests.exitCode !== 0)\n throw new Error(\"The agent stopped, but the tests still fail.\");\n\n await writeFile(\"fix.patch\", (await box.exec(\"git diff\")).stdout);\n console.log(run.response);\n console.log(run.usage); // { inputTokens, outputTokens, ... }\n} finally {\n await box.delete();\n}\n"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
id: "your-claude-subscription",
|
|
19
|
+
title: "Use your Claude subscription",
|
|
20
|
+
summary: "The same agent, paid by your Claude plan instead of metered tokens.",
|
|
21
|
+
language: "typescript",
|
|
22
|
+
code: "import { Sandbox } from \"@tangle-network/sandbox\";\n\nconst client = new Sandbox({\n apiKey: process.env.TANGLE_API_KEY!,\n baseUrl: \"https://sandbox.tangle.tools\",\n});\n\n// Once: store the token from `claude setup-token`.\nawait client.secrets.create(\n \"CLAUDE_TOKEN\",\n process.env.CLAUDE_CODE_OAUTH_TOKEN!,\n);\n\nconst box = await client.create({\n git: { url: \"https://github.com/your-org/your-repo\" },\n backend: {\n type: \"claude-code\",\n cliAuth: { account: \"me\", secretEnv: \"CLAUDE_TOKEN\", format: \"token\" },\n },\n secrets: [\"CLAUDE_TOKEN\"],\n});\ntry {\n const run = await box.prompt(\n \"Review the last commit for bugs and list each with a file and line.\",\n );\n console.log(run.success ? run.response : run.error);\n} finally {\n await box.delete();\n}\n"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
id: "race-two-agents",
|
|
26
|
+
title: "Race two agents",
|
|
27
|
+
summary: "One task, two harnesses, one table: who passed, how fast, at what cost.",
|
|
28
|
+
language: "typescript",
|
|
29
|
+
code: "import { Sandbox } from \"@tangle-network/sandbox\";\n\nconst client = new Sandbox({\n apiKey: process.env.TANGLE_API_KEY!,\n baseUrl: \"https://sandbox.tangle.tools\",\n});\n\nconst task =\n \"`npm test` fails on main. Find the cause, fix it, and make the suite pass.\";\nconst agents = [\"claude-code\", \"codex\"] as const;\n\nconst results = await Promise.all(\n agents.map(async (type) => {\n const box = await client.create({\n git: { url: \"https://github.com/your-org/your-repo\" },\n backend: { type },\n });\n try {\n const run = await box.prompt(task);\n const tests = await box.exec(\"npm test\");\n return {\n agent: type,\n passed: tests.exitCode === 0,\n seconds: run.durationMs / 1000,\n usd: run.costUsd ?? 0,\n };\n } finally {\n await box.delete();\n }\n }),\n);\nconsole.table(results);\n"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
id: "stream-the-work",
|
|
33
|
+
title: "Stream the work",
|
|
34
|
+
summary: "Watch the agent's text arrive as it works.",
|
|
35
|
+
language: "typescript",
|
|
36
|
+
code: "import { Sandbox } from \"@tangle-network/sandbox\";\n\nconst client = new Sandbox({\n apiKey: process.env.TANGLE_API_KEY!,\n baseUrl: \"https://sandbox.tangle.tools\",\n});\n\nconst box = await client.create({\n git: { url: \"https://github.com/your-org/your-repo\" },\n backend: { type: \"opencode\" },\n});\ntry {\n for await (const event of box.streamPrompt(\n \"Add input validation to the signup form and a test for it.\",\n )) {\n if (event.type === \"token\") process.stdout.write(String(event.data.value));\n }\n} finally {\n await box.delete();\n}\n"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
id: "lock-down-the-network",
|
|
40
|
+
title: "Lock down the network",
|
|
41
|
+
summary: "The agent can install packages and push code, and reach nothing else.",
|
|
42
|
+
language: "typescript",
|
|
43
|
+
code: "import { Sandbox } from \"@tangle-network/sandbox\";\n\nconst client = new Sandbox({\n apiKey: process.env.TANGLE_API_KEY!,\n baseUrl: \"https://sandbox.tangle.tools\",\n});\n\n// The agent can install packages and push code, and reach nothing else.\nconst box = await client.create({\n git: { url: \"https://github.com/your-org/your-repo\" },\n backend: { type: \"claude-code\" },\n egressPolicy: {\n mode: \"strict\",\n allowDomains: [\"registry.npmjs.org\", \"github.com\"],\n },\n});\ntry {\n const blocked = await box.exec(\"curl -sS -m 5 https://example.com\");\n console.log(\n blocked.exitCode === 0 ? \"reachable (unexpected)\" : \"blocked as configured\",\n );\n} finally {\n await box.delete();\n}\n"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
id: "share-a-preview",
|
|
47
|
+
title: "Share a preview",
|
|
48
|
+
summary: "Start the app and share a link that expires with the box.",
|
|
49
|
+
language: "typescript",
|
|
50
|
+
code: "import { Sandbox } from \"@tangle-network/sandbox\";\n\nconst client = new Sandbox({\n apiKey: process.env.TANGLE_API_KEY!,\n baseUrl: \"https://sandbox.tangle.tools\",\n});\n\nconst box = await client.create({\n git: { url: \"https://github.com/your-org/your-web-app\" },\n maxLifetimeSeconds: 3600, // the box deletes itself after an hour\n});\nawait box.exec(\"npm ci\");\n// Long-running processes are spawned, not exec'd.\nawait box.process.spawnExact(\n \"npm\",\n [\"run\", \"dev\", \"--\", \"--host\", \"0.0.0.0\", \"--port\", \"5173\"],\n {\n timeoutMs: 3_600_000,\n },\n);\n\nconst link = await box.previewLinks.create(5173);\nconst { url } = await box.previewLinks.waitUntilReady(link.previewId);\nconsole.log(`Share this for the next hour: ${url}`);\n"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
id: "pause-and-resume",
|
|
54
|
+
title: "Pause and resume",
|
|
55
|
+
summary: "Stop paying overnight and continue the same conversation later.",
|
|
56
|
+
language: "typescript",
|
|
57
|
+
code: "import { Sandbox } from \"@tangle-network/sandbox\";\n\nconst client = new Sandbox({\n apiKey: process.env.TANGLE_API_KEY!,\n baseUrl: \"https://sandbox.tangle.tools\",\n});\n\nconst backend = { type: \"claude-code\" } as const;\nconst box = await client.create({\n git: { url: \"https://github.com/your-org/your-repo\" },\n backend,\n});\nawait box.prompt(\"Read the codebase and draft a plan for adding OAuth login.\", {\n sessionId: \"oauth\",\n});\nawait box.stop(); // files and the conversation survive; compute billing stops\n\n// Later, from any process:\nconst again = await client.get(box.id);\nif (!again) throw new Error(\"sandbox not found\");\ntry {\n await again.resume();\n const run = await again.prompt(\"Implement step 1 of your plan.\", {\n sessionId: \"oauth\",\n backend, // resend the harness: the resumed session needs its credential again\n });\n console.log(run.response);\n} finally {\n await again.delete();\n}\n"
|
|
58
|
+
}
|
|
59
|
+
];
|
|
60
|
+
//#endregion
|
|
61
|
+
export { quickstartExamples };
|
package/dist/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { c as MintScopedTokenOptions, d as TERMINAL_WS_ECHO_SUBPROTOCOL, f as Te
|
|
|
4
4
|
import { a as InteractiveSessionControlController, c as InteractiveSessionIdentity, d as interactiveSessionIdentityDigest, f as InteractiveAttachOptions, g as InteractiveSessionStatus, h as InteractiveRequestOptions, i as INTERACTIVE_CONTROL_CLEANUP_TIMEOUT_MS, l as InteractiveSessionNotRunningError, m as InteractiveControlClaimOptions, n as BrowserInteractiveSessionControlControllerOptions, o as InteractiveSessionControlControllerOptions, p as InteractiveControlClaimAcknowledgement, r as browserInteractiveControlHolderId, s as InteractiveSessionControlTransport, t as BrowserInteractiveSessionControlController, u as createInteractiveControlHolderId } from "./browser-interactive-control-controller-JUW3gOGH.js";
|
|
5
5
|
import { a as InteractiveSessionControllerOptions, i as InteractiveSessionController, n as BrowserInteractiveSessionControllerOptions, o as InteractiveSessionControllerTransport, r as InteractiveAttachRequest, t as BrowserInteractiveSessionController } from "./interactive-controller-DNbLzamS.js";
|
|
6
6
|
import { A as LineSenderVerification, B as profileChannelReference, C as LineReplyCodeInput, D as LineRole, E as LineRespondView, F as LineVoiceOptions, G as LineApplicationResult, H as LINE_APPLICATION_REQUEST_MAX_BYTES, I as LinesClient, J as parseLineApplicationRequest, K as LineApplicationState, M as LineThread, N as LineTransport, O as LineSendInput, P as LineVoice, R as SandboxLines, S as LineReplyCode, T as LineRespondAgent, U as LineApplication, V as LINE_APPLICATION_REPLY_MAX_CHARS, W as LineApplicationRequest, Y as parseLineApplicationResult, _ as LineMemberSpec, a as LineApplicationAttachOptions, b as LineProvider, c as LineAttachmentReauthorization, d as LineInstanceAttachOptions, f as LineInstanceCreate, g as LineMemberPatch, h as LineMemberInstance, i as LineAllowanceSubject, j as LineSenderVerificationStart, k as LineSendReceipt, l as LineExecutionKey, m as LineMember, n as LineAgentRolePolicy, o as LineAttachOptions, p as LineLimits, q as LineApplicationView, r as LineAllowance, s as LineAttachment, t as Line, u as LineFromConnectionInput, v as LineMessage, w as LineReplyGate, x as LineReminderPreferences, y as LineNumberInventory, z as lineInstanceKey } from "./lines-Bv-HWQd3.js";
|
|
7
|
-
import { A as BackendRegistryEntry, C as InstancesClient, D as ParsedSSEEvent, E as ParseSSEStreamOptions, F as backendRegistryInteractionKindSchema, I as backendRegistryResponseSchema, L as isBackendRegistryInteractionKind, M as BackendRegistryResponse, N as backendRegistryCapabilitiesSchema, O as parseSSEStream, P as backendRegistryEntrySchema, R as parseBackendRegistryResponse, S as InstanceStart, T as SandboxFleetClient, _ as EnsureInstanceOptions, a as Team, b as InstanceRecord, c as SessionBroadcastEvent, d as RunPlacement, f as RunPlacementRecord, g as RunsHttpClient, h as RunsClient, i as Sandbox, j as BackendRegistryInteractionKind, k as BackendRegistryCapabilities, l as SessionBroadcastResult, m as RunWaitOptions, n as IntelligenceClient, o as TeamInvitation, p as RunRecord, r as InviteTeamMemberOptions, s as TeamMember, t as CreateTeamOptions, u as RunOptions, v as HostedInstance, w as SandboxFleet, x as InstanceRestartingError, y as InstanceProfile, z as parseBackendRegistryResponseBody } from "./client-
|
|
7
|
+
import { A as BackendRegistryEntry, C as InstancesClient, D as ParsedSSEEvent, E as ParseSSEStreamOptions, F as backendRegistryInteractionKindSchema, I as backendRegistryResponseSchema, L as isBackendRegistryInteractionKind, M as BackendRegistryResponse, N as backendRegistryCapabilitiesSchema, O as parseSSEStream, P as backendRegistryEntrySchema, R as parseBackendRegistryResponse, S as InstanceStart, T as SandboxFleetClient, _ as EnsureInstanceOptions, a as Team, b as InstanceRecord, c as SessionBroadcastEvent, d as RunPlacement, f as RunPlacementRecord, g as RunsHttpClient, h as RunsClient, i as Sandbox, j as BackendRegistryInteractionKind, k as BackendRegistryCapabilities, l as SessionBroadcastResult, m as RunWaitOptions, n as IntelligenceClient, o as TeamInvitation, p as RunRecord, r as InviteTeamMemberOptions, s as TeamMember, t as CreateTeamOptions, u as RunOptions, v as HostedInstance, w as SandboxFleet, x as InstanceRestartingError, y as InstanceProfile, z as parseBackendRegistryResponseBody } from "./client-CjjKVtr1.js";
|
|
8
8
|
import { _ as StreamInterruptedError, a as FileWriteConflictError, b as ValidationError, c as NotFoundError, d as ResumeEnvRequiredError, f as SandboxError, g as StateError, h as ServerError, i as EgressProxyRecoveryError, l as PartialFailureError, m as SandboxFailureDetail, n as CapabilityError, o as KeyBudgetExhaustedError, p as SandboxErrorJson, r as EdgeNotReadyError, s as NetworkError, t as AuthError, u as QuotaError, v as StreamInterruptionReason, y as TimeoutError } from "./errors-sEMGx6WV.js";
|
|
9
9
|
import { d as AnyTokenPayload, h as IssueCollaborationTokenOptions, m as CollaborationTokenPayload, p as CollaborationAccess } from "./index-BgmgfYZZ.js";
|
|
10
10
|
import { _ as CollaborationTransportConfig, a as CollaborationClient, c as CollaborationClientConfig, d as CollaborationDocumentRef, f as CollaborationFileBridgeOptions, g as CollaborationTokenRefreshResponse, h as CollaborationTokenRefreshRequest, i as parseCollaborationDocumentId, l as CollaborationDocumentAdapter, m as CollaborationPermissions, n as buildCollaborationDocumentId, o as CollaborationBootstrapRequest, p as CollaborationFileEvent, r as normalizeCollaborationPath, s as CollaborationBootstrapResponse, t as CollaborationFileBridge, u as CollaborationDocumentChange, v as SaveCollaborationSnapshotRequest, y as SaveCollaborationSnapshotResponse } from "./index-DHuHjNie.js";
|
package/dist/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { i as parseBackendType, r as backendTypeSchema, t as ALL_BACKEND_TYPES } from "./backend-types-C7b_Gpa0.js";
|
|
2
2
|
import { A as requestedPublicProfileDigest, F as deriveAgentResultOutcome, I as deriveAgentRunOutcome, L as projectAgentTerminalRecord, P as createAgentRunOutcomeTracker, a as TERMINAL_WS_ECHO_SUBPROTOCOL, i as TerminalStreamError, k as normalizeRuntimeBackendConfig, n as InteractiveSessionController, r as TerminalStream, t as BrowserInteractiveSessionController, w as parseSSEStream } from "./interactive-controller-DbKLSfTD.js";
|
|
3
3
|
import { _ as TimeoutError, a as FileWriteConflictError, c as NetworkError, d as QuotaError, f as ResumeEnvRequiredError, g as StreamInterruptedError, h as StateError, i as EgressProxyRecoveryError, l as NotFoundError, m as ServerError, n as CapabilityError, o as KeyBudgetExhaustedError, p as SandboxError, r as EdgeNotReadyError, t as AuthError, u as PartialFailureError, v as ValidationError } from "./errors-iWIsey1D.js";
|
|
4
|
-
import { _ as parseBackendRegistryResponse, a as InstanceRestartingError, c as SandboxFleetClient, d as validateBatchRunRequest, f as backendRegistryCapabilitiesSchema, g as isBackendRegistryInteractionKind, h as backendRegistryResponseSchema, i as HostedInstance, l as runtimeWorkspaceCwdSchema, m as backendRegistryInteractionKindSchema, n as Sandbox, o as InstancesClient, p as backendRegistryEntrySchema, r as RunsClient, s as SandboxFleet, t as IntelligenceClient, u as createBatchResultAccumulator, v as parseBackendRegistryResponseBody } from "./client-
|
|
4
|
+
import { _ as parseBackendRegistryResponse, a as InstanceRestartingError, c as SandboxFleetClient, d as validateBatchRunRequest, f as backendRegistryCapabilitiesSchema, g as isBackendRegistryInteractionKind, h as backendRegistryResponseSchema, i as HostedInstance, l as runtimeWorkspaceCwdSchema, m as backendRegistryInteractionKindSchema, n as Sandbox, o as InstancesClient, p as backendRegistryEntrySchema, r as RunsClient, s as SandboxFleet, t as IntelligenceClient, u as createBatchResultAccumulator, v as parseBackendRegistryResponseBody } from "./client-DfDYb9iE.js";
|
|
5
5
|
import { a as INTERACTIVE_CONTROL_CLEANUP_TIMEOUT_MS, l as createInteractiveControlHolderId, n as browserInteractiveControlHolderId, o as InteractiveSessionControlController, s as InteractiveSessionNotRunningError, t as BrowserInteractiveSessionControlController, u as interactiveSessionIdentityDigest } from "./browser-interactive-control-controller-BJf0P_J4.js";
|
|
6
|
-
import { A as exportTraceBundle, C as splitInlineProfileFileMounts, M as toOtelJson, S as materializeProfileFileMounts, T as validateDeferredProfileFileMounts, _ as collectAgentFinalMessageText, b as isToolBearingEvent, c as MAX_EGRESS_DENIALS_LIMIT, d as InteractiveSessionHandle, f as agentInteractiveSessionPromptRequestDigest, g as applySandboxEventText, h as createInteractiveTerminalSession, j as otelTraceIdForTangleTrace, k as buildTraceExportPayload, l as SandboxTaskSession, m as createInteractiveTerminalCapture, o as WorkspaceImages, p as InteractiveTerminalFrameLog, s as GPU_LEASE_PROVIDER_NAMES, t as SandboxInstance, u as SandboxSession, v as collectAgentResponseText, w as splitInlineProfileSkills, x as ManagedProcessClient, y as getSandboxEventText } from "./sandbox-
|
|
6
|
+
import { A as exportTraceBundle, C as splitInlineProfileFileMounts, M as toOtelJson, S as materializeProfileFileMounts, T as validateDeferredProfileFileMounts, _ as collectAgentFinalMessageText, b as isToolBearingEvent, c as MAX_EGRESS_DENIALS_LIMIT, d as InteractiveSessionHandle, f as agentInteractiveSessionPromptRequestDigest, g as applySandboxEventText, h as createInteractiveTerminalSession, j as otelTraceIdForTangleTrace, k as buildTraceExportPayload, l as SandboxTaskSession, m as createInteractiveTerminalCapture, o as WorkspaceImages, p as InteractiveTerminalFrameLog, s as GPU_LEASE_PROVIDER_NAMES, t as SandboxInstance, u as SandboxSession, v as collectAgentResponseText, w as splitInlineProfileSkills, x as ManagedProcessClient, y as getSandboxEventText } from "./sandbox-BqM5Ky9N.js";
|
|
7
7
|
import { LinesClient, SandboxLines, lineInstanceKey, profileChannelReference } from "./lines.js";
|
|
8
8
|
import { a as CollaborationClient, i as parseCollaborationDocumentId, n as buildCollaborationDocumentId, r as normalizeCollaborationPath, t as CollaborationFileBridge } from "./collaboration-B2g1j2ey.js";
|
|
9
9
|
import { i as parseLineApplicationResult, n as LINE_APPLICATION_REQUEST_MAX_BYTES, r as parseLineApplicationRequest, t as LINE_APPLICATION_REPLY_MAX_CHARS } from "./line-application-Cq6dJLBD.js";
|
|
10
|
-
import { s as TangleSandboxClient } from "./tangle-
|
|
10
|
+
import { s as TangleSandboxClient } from "./tangle-D7VHyODa.js";
|
|
11
11
|
import { SANDBOX_SIZE_PRESET_NAMES, agentProfileConfidentialSchema, agentProfileSchema } from "@tangle-network/agent-interface";
|
|
12
12
|
import { z } from "zod";
|
|
13
13
|
//#region src/confidential.ts
|
|
@@ -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-BWNakb5F.js";
|
|
2
2
|
import { existsSync, readFileSync } from "node:fs";
|
|
3
3
|
import { join } from "node:path";
|
|
4
4
|
import { homedir } from "node:os";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as SandboxInstance } from "./sandbox-pZegGEjr.js";
|
|
2
2
|
import { Vn as PreviewLinkInfo, ht as EnsureDevServerOptions } from "./types-BNWkYhQf.js";
|
|
3
|
-
import { i as Sandbox } from "./client-
|
|
3
|
+
import { i as Sandbox } from "./client-CjjKVtr1.js";
|
|
4
4
|
|
|
5
5
|
//#region src/agent/preview-operations.d.ts
|
|
6
6
|
type AgentPreviewOptions = Pick<EnsureDevServerOptions, "sessionId" | "cwd"> & {
|
|
@@ -4,7 +4,7 @@ import { _ as TimeoutError, b as parseResponseError, c as NetworkError, d as Quo
|
|
|
4
4
|
import { d as awaitWithAbort, f as combineAbortSignals, g as interactiveSessionStatusResponseSchema, h as interactiveSessionControlValidationResponseSchema, l as createInteractiveControlHolderId, m as interactiveSessionControlReleaseResponseSchema, p as interactiveSessionControlClaimResponseSchema } from "./browser-interactive-control-controller-BJf0P_J4.js";
|
|
5
5
|
import { SandboxLines } from "./lines.js";
|
|
6
6
|
import { l as SANDBOX_PROXY_REQUEST_MAX_BYTES, s as uploadChunked } from "./chunked-upload-BklCn3Li.js";
|
|
7
|
-
import { r as cliAuthReferenceSchema } from "./cli-auth-bundle-
|
|
7
|
+
import { r as cliAuthReferenceSchema } from "./cli-auth-bundle-BWNakb5F.js";
|
|
8
8
|
import { AgentExactRunControlRefSchema, AgentInteractiveSessionAttachSchema, AgentInteractiveSessionControlClaimAcknowledgementSchema, AgentInteractiveSessionControlClaimRequestSchema, AgentInteractiveSessionControlClaimSchema, AgentInteractiveSessionPromptAcknowledgementSchema, AgentInteractiveSessionPromptCommandSchema, AgentInteractiveSessionRefSchema, AgentInteractiveSessionStartSchema, AgentInteractiveSessionStopAcknowledgementSchema, AgentInteractiveSessionStopCommandSchema, AgentRunCancellationAcknowledgementSchema, AgentRunCancellationRequestSchema, InteractionAcknowledgementSchema, InteractionBindingSchema, InteractionRequestSchema, InteractionResponseCommandSchema, InteractionResponseSchema, TerminalInputSchema, TerminalOutputEventSchema, TerminalReplayWindowSchema, TerminalResizeSchema, TerminalSessionRefSchema, agentInteractiveSessionControlClaimAcknowledgementMatchesRequest, agentInteractiveSessionControlClaimIsNewer, agentInteractiveSessionControlClaimMatchesRef, agentInteractiveSessionPromptAcknowledgementMatchesCommand, agentInteractiveSessionPromptRequestDigest, agentInteractiveSessionRefMatchesStart, agentInteractiveSessionStatusMatchesRef, agentInteractiveSessionStopAcknowledgementMatchesCommand, agentProfileSchema, agentRunCancellationAcknowledgementMatchesRequest, canonicalCandidateDigest, canonicalCandidateJson, exactAgentInteractiveSessionStart, sha256DigestSchema, terminalSessionUsable } from "@tangle-network/agent-interface";
|
|
9
9
|
import { z } from "zod";
|
|
10
10
|
import { AgentInteractiveSessionControlClaimSchema as AgentInteractiveSessionControlClaimSchema$1, AgentInteractiveSessionPromptAcknowledgementSchema as AgentInteractiveSessionPromptAcknowledgementSchema$1, AgentInteractiveSessionRefSchema as AgentInteractiveSessionRefSchema$1, AgentInteractiveSessionStatusSchema, AgentInteractiveSessionStopAcknowledgementSchema as AgentInteractiveSessionStopAcknowledgementSchema$1 } from "@tangle-network/agent-interface/environment-interactive-control";
|
package/dist/tangle/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { _ as SandboxCreateParamTypes, a as parseQuoteResponse, c as OperatorSession, d as JOB_SANDBOX_DELETE, f as TANGLE_CHAIN_ID, g as JsonResponseParamTypes, h as ITangleJobsAbi, i as jobQuoteDigest, l as OperatorSessionError, m as AgentSandboxBlueprintAbi, n as fetchQuote, o as validateQuote, p as TANGLE_JOBS_CONTRACT, r as inputsHashOf, s as TangleSandboxClient, t as QuoteError, u as JOB_SANDBOX_CREATE, v as SandboxCreateResponseParamTypes, y as SandboxIdParamTypes } from "../tangle-
|
|
1
|
+
import { _ as SandboxCreateParamTypes, a as parseQuoteResponse, c as OperatorSession, d as JOB_SANDBOX_DELETE, f as TANGLE_CHAIN_ID, g as JsonResponseParamTypes, h as ITangleJobsAbi, i as jobQuoteDigest, l as OperatorSessionError, m as AgentSandboxBlueprintAbi, n as fetchQuote, o as validateQuote, p as TANGLE_JOBS_CONTRACT, r as inputsHashOf, s as TangleSandboxClient, t as QuoteError, u as JOB_SANDBOX_CREATE, v as SandboxCreateResponseParamTypes, y as SandboxIdParamTypes } from "../tangle-D7VHyODa.js";
|
|
2
2
|
export { AgentSandboxBlueprintAbi, ITangleJobsAbi, JOB_SANDBOX_CREATE, JOB_SANDBOX_DELETE, JsonResponseParamTypes, OperatorSession, OperatorSessionError, QuoteError, SandboxCreateParamTypes, SandboxCreateResponseParamTypes, SandboxIdParamTypes, TANGLE_CHAIN_ID, TANGLE_JOBS_CONTRACT, TangleSandboxClient, fetchQuote, inputsHashOf, jobQuoteDigest, parseQuoteResponse, validateQuote };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { x as readResponseJson } from "./errors-iWIsey1D.js";
|
|
2
|
-
import { n as createSandboxInstanceFromResponse } from "./sandbox-
|
|
2
|
+
import { n as createSandboxInstanceFromResponse } from "./sandbox-BqM5Ky9N.js";
|
|
3
3
|
import { _ as rotlBH, a as anumber, b as rotlSL, d as createXOFer, g as u32, h as toBytes$1, l as createHasher, m as swap32IfBE, n as abytes, o as aoutput, r as aexists, s as clean, t as Hash, v as rotlBL, x as split, y as rotlSH } from "./utils-B7_9Hl_z.js";
|
|
4
4
|
//#region src/tangle/abi.ts
|
|
5
5
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tangle-network/sandbox",
|
|
3
|
-
"version": "0.60.
|
|
3
|
+
"version": "0.60.55-develop.20261014191515.7241912",
|
|
4
4
|
"description": "Client SDK for the Tangle Sandbox platform - build AI agent applications with dev containers",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": [
|
|
@@ -73,6 +73,11 @@
|
|
|
73
73
|
"import": "./dist/lines.js",
|
|
74
74
|
"types": "./dist/lines.d.ts",
|
|
75
75
|
"default": "./dist/lines.js"
|
|
76
|
+
},
|
|
77
|
+
"./examples": {
|
|
78
|
+
"import": "./dist/examples/quickstart.js",
|
|
79
|
+
"types": "./dist/examples/quickstart.d.ts",
|
|
80
|
+
"default": "./dist/examples/quickstart.js"
|
|
76
81
|
}
|
|
77
82
|
},
|
|
78
83
|
"files": [
|
|
@@ -160,7 +165,7 @@
|
|
|
160
165
|
"scripts": {
|
|
161
166
|
"build": "node scripts/build-dist.mjs",
|
|
162
167
|
"build:clean": "node scripts/build-dist.mjs",
|
|
163
|
-
"check-types": "tsc --noEmit && tsc --noEmit -p tsconfig.type-tests.json",
|
|
168
|
+
"check-types": "tsc --noEmit && tsc --noEmit -p tsconfig.type-tests.json && tsc --noEmit -p tsconfig.examples.json && node scripts/generate-quickstart-examples.mjs --check",
|
|
164
169
|
"check-examples": "tsc -p tsconfig.examples.json && tsc -p tsconfig.worker-example.json",
|
|
165
170
|
"verify-dist": "bash scripts/verify-dist.sh",
|
|
166
171
|
"test": "vitest run",
|
|
@@ -171,6 +176,7 @@
|
|
|
171
176
|
"test:e2e:snapshots": "vitest run --config vitest.e2e.config.ts tests/e2e/snapshot-lifecycle.test.ts",
|
|
172
177
|
"test:e2e:harness": "SKIP_ORCHESTRATOR=true vitest run --config vitest.e2e.config.ts tests/e2e/harness-selection-smoke.test.ts",
|
|
173
178
|
"test:e2e:watch": "vitest --config vitest.e2e.config.ts",
|
|
174
|
-
"test:live:fleet": "vitest run --config vitest.live.config.ts tests/live/fleet.test.ts"
|
|
179
|
+
"test:live:fleet": "vitest run --config vitest.live.config.ts tests/live/fleet.test.ts",
|
|
180
|
+
"generate:examples": "node scripts/generate-quickstart-examples.mjs"
|
|
175
181
|
}
|
|
176
182
|
}
|