@tangle-network/sandbox 0.10.0 → 0.10.2

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.
@@ -1,5 +1,5 @@
1
1
  import { $ as CodeExecutionResult, Q as CodeExecutionOptions, et as CodeLanguage, n as SandboxInstance, nt as CodeResultPart } from "../sandbox-Bm2C9Phd.js";
2
- import { i as SandboxClient } from "../client-cfdZckhU.js";
2
+ import { i as SandboxClient } from "../client-8wOu9raV.js";
3
3
  import * as _$_modelcontextprotocol_sdk_server_index_js0 from "@modelcontextprotocol/sdk/server/index.js";
4
4
 
5
5
  //#region src/agent/tools/_specs.d.ts
@@ -185,6 +185,20 @@ declare class SandboxFleetClient {
185
185
  private listBySandboxMetadata;
186
186
  }
187
187
  //#endregion
188
+ //#region src/session-events.d.ts
189
+ /** Event delivered to a product session through the Sandbox session gateway. */
190
+ interface SessionBroadcastEvent {
191
+ type: string;
192
+ id?: string;
193
+ data?: unknown;
194
+ channel?: string;
195
+ }
196
+ /** Result returned after Sandbox accepts or rejects a session event. */
197
+ interface SessionBroadcastResult {
198
+ success: boolean;
199
+ sessionId: string;
200
+ }
201
+ //#endregion
188
202
  //#region src/client.d.ts
189
203
  /**
190
204
  * Client for the Tangle Sandbox platform.
@@ -256,6 +270,10 @@ declare class SandboxClient implements HttpClient {
256
270
  get sshKeys(): SshKeysManager;
257
271
  /** List agent profiles registered by the Sandbox API. */
258
272
  listProfiles(): Promise<SandboxProfileSummary[]>;
273
+ /** Deliver a server-originated event to a mapped product session. */
274
+ broadcastSessionEvent(sessionId: string, event: SessionBroadcastEvent): Promise<SessionBroadcastResult>;
275
+ /** Deliver a product payload through SessionGateway's `onAgentEvent`. */
276
+ broadcastSessionAgentEvent<T>(sessionId: string, event: T): Promise<SessionBroadcastResult>;
259
277
  private _environments;
260
278
  /**
261
279
  * Access available development environments.
@@ -716,4 +734,4 @@ declare class TeamsClient {
716
734
  * Alias for SandboxClient for cleaner imports.
717
735
  */
718
736
  //#endregion
719
- export { Team as a, SandboxFleet as c, ParsedSSEEvent as d, parseSSEStream as f, SandboxClient as i, SandboxFleetClient as l, IntelligenceClient as n, TeamInvitation as o, InviteTeamMemberOptions as r, TeamMember as s, CreateTeamOptions as t, ParseSSEStreamOptions as u };
737
+ export { Team as a, SessionBroadcastEvent as c, SandboxFleetClient as d, ParseSSEStreamOptions as f, SandboxClient as i, SessionBroadcastResult as l, parseSSEStream as m, IntelligenceClient as n, TeamInvitation as o, ParsedSSEEvent as p, InviteTeamMemberOptions as r, TeamMember as s, CreateTeamOptions as t, SandboxFleet as u };
@@ -946,6 +946,39 @@ function getMachineRole(info) {
946
946
  return value === "coordinator" || value === "worker" ? value : void 0;
947
947
  }
948
948
  //#endregion
949
+ //#region src/session-events.ts
950
+ async function broadcastSessionEvent(client, sessionId, event) {
951
+ if (!sessionId.trim()) throw new ValidationError("Session ID is required");
952
+ if (!event.type.trim()) throw new ValidationError("Session event type is required");
953
+ const response = await client.fetch(`/v1/session/${encodeURIComponent(sessionId)}/broadcast`, {
954
+ method: "POST",
955
+ body: JSON.stringify(event)
956
+ });
957
+ if (!response.ok) {
958
+ const body = await response.text();
959
+ throw parseErrorResponse(response.status, body, void 0, response.headers);
960
+ }
961
+ const result = await response.json();
962
+ return {
963
+ success: result.success,
964
+ sessionId: result.sessionId
965
+ };
966
+ }
967
+ /**
968
+ * Deliver a product event through SessionGateway's `onAgentEvent` callback.
969
+ *
970
+ * This derives the only wire envelope that SessionGateway clients dispatch as
971
+ * an agent event. Products should use this instead of assembling
972
+ * `type: "agent.event"` and `channel: "session:<id>"` themselves.
973
+ */
974
+ async function broadcastSessionAgentEvent(client, sessionId, event) {
975
+ return broadcastSessionEvent(client, sessionId, {
976
+ type: "agent.event",
977
+ channel: `session:${sessionId}`,
978
+ data: event
979
+ });
980
+ }
981
+ //#endregion
949
982
  //#region src/client.ts
950
983
  /**
951
984
  * Sandbox Client
@@ -1176,6 +1209,14 @@ var SandboxClient = class {
1176
1209
  }
1177
1210
  return (await response.json()).profiles ?? [];
1178
1211
  }
1212
+ /** Deliver a server-originated event to a mapped product session. */
1213
+ async broadcastSessionEvent(sessionId, event) {
1214
+ return broadcastSessionEvent(this, sessionId, event);
1215
+ }
1216
+ /** Deliver a product payload through SessionGateway's `onAgentEvent`. */
1217
+ async broadcastSessionAgentEvent(sessionId, event) {
1218
+ return broadcastSessionAgentEvent(this, sessionId, event);
1219
+ }
1179
1220
  _environments = null;
1180
1221
  /**
1181
1222
  * Access available development environments.
package/dist/core.d.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  import { An as PreviewLinkInfo, Dt as ExecOptions, Gr as SandboxStatus, Ot as ExecResult, Pr as SandboxInfo, Tn as NetworkConfig, dt as CreateSandboxOptions, jn as PreviewLinkManager, n as SandboxInstance, rr as SandboxClientConfig } from "./sandbox-Bm2C9Phd.js";
2
- import { i as SandboxClient } from "./client-cfdZckhU.js";
2
+ import { i as SandboxClient } from "./client-8wOu9raV.js";
3
3
  import { a as NotFoundError, c as SandboxError, d as ServerError, f as StateError, i as NetworkError, l as SandboxErrorJson, m as ValidationError, n as CapabilityError, o as PartialFailureError, p as TimeoutError, s as QuotaError, t as AuthError, u as SandboxFailureDetail } from "./errors-H9268M_g.js";
4
4
  export { AuthError, CapabilityError, type CreateSandboxOptions, type ExecOptions, type ExecResult, type NetworkConfig, NetworkError, NotFoundError, PartialFailureError, type PreviewLinkInfo, type PreviewLinkManager, QuotaError, SandboxClient as Sandbox, SandboxClient, type SandboxClientConfig, SandboxError, type SandboxErrorJson, type SandboxFailureDetail, type SandboxInfo, SandboxInstance, type SandboxStatus, ServerError, StateError, TimeoutError, ValidationError };
package/dist/core.js CHANGED
@@ -1,4 +1,4 @@
1
1
  import { t as SandboxInstance } from "./sandbox-CeimsfC8.js";
2
2
  import { a as NotFoundError, c as SandboxError, d as TimeoutError, f as ValidationError, i as NetworkError, l as ServerError, n as CapabilityError, o as PartialFailureError, s as QuotaError, t as AuthError, u as StateError } from "./errors-DSz87Rkk.js";
3
- import { n as SandboxClient } from "./client-InX98Zxk.js";
3
+ import { n as SandboxClient } from "./client-B3oM6E-L.js";
4
4
  export { AuthError, CapabilityError, NetworkError, NotFoundError, PartialFailureError, QuotaError, SandboxClient as Sandbox, SandboxClient, SandboxError, SandboxInstance, ServerError, StateError, TimeoutError, ValidationError };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { $i as AgentProfileFileMount, $n as ReconcileSandboxFleetsResult, $r as SandboxTraceOptions, $t as GitDiff, A as AddUserOptions, Ai as TaskSessionFileChange, An as PreviewLinkInfo, Ar as SandboxFleetWorkspace, At as FileReadBatchOptions, B as BatchBackendStats, Bi as TurnDriveResult, Bn as PromptOptions, Br as SandboxResourceUsage, Bt as FleetDispatchResultBuffer, C as SandboxMcpConfig, Ci as StartupOperation, Cn as MintScopedTokenOptions, Cr as SandboxFleetPolicy, Ct as DriverType, D as buildSandboxMcpConfig, Di as TaskResult, Dn as NonHostAgentDriverConfig, Dr as SandboxFleetTraceExport, Dt as ExecOptions, E as buildControlPlaneMcpConfig, Ei as TaskOptions, En as NetworkManager, Er as SandboxFleetTraceEvent, Et as EventStreamOptions, F as BackendInfo, Fi as TeeAttestationResponse, Fn as ProcessManager, Fr as SandboxIntelligenceEnvelope, Ft as FileTreeFile, G as BatchRunOptions, Gi as WaitForOptions, Gn as ProvisionStep, Gr as SandboxStatus, Gt as FleetMachineId, H as BatchEventDataMap, Hi as UploadOptions, Hn as ProvisionEvent, Hr as SandboxRuntimeHealth, Ht as FleetDispatchStreamOptions, I as BackendManager, Ii as TeePublicKey, In as ProcessSignal, Ir as SandboxPermissionsConfig, It as FileTreeOptions, J as BatchTask, Ji as WriteManyOptions, Jn as PublishPublicTemplateOptions, Jr as SandboxTerminalManager, Jt as GPU_LEASE_PROVIDER_NAMES, K as BatchRunRequest, Ki as WriteFileOptions, Kn as PublicTemplateInfo, Kr as SandboxTerminalCreateOptions, Kt as FleetPromptDispatchOptions, L as BackendStatus, Li as TeePublicKeyResponse, Ln as ProcessSpawnOptions, Lr as SandboxPortBinding, Lt as FileTreeResult, M as AttachSandboxFleetMachineOptions, Mi as TaskSessionProfile, Mn as Process, Mr as SandboxFleetWorkspaceRestoreResult, Mt as FileReadError, N as BackendCapabilities, Ni as TeeAttestationOptions, Nn as ProcessInfo, Nr as SandboxFleetWorkspaceSnapshotResult, Nt as FileReadResult, O as AcceleratorKind, Oi as TaskSessionChanges, On as PermissionLevel, Or as SandboxFleetTraceOptions, Ot as ExecResult, P as BackendConfig, Pi as TeeAttestationReport, Pn as ProcessLogEntry, Pr as SandboxInfo, Pt as FileSystem, Qi as AgentProfileConnection, Qn as ReconcileSandboxFleetsOptions, Qr as SandboxTraceExport, Qt as GitConfig, R as BackendType, Ri as TokenRefreshHandler, Rn as ProcessStatus, Rr as SandboxPortPreviewLink, Rt as FileWriteResult, S as SANDBOX_MCP_SERVER_NAME, Si as StartupDiagnostics, Sn as McpServerConfig, Sr as SandboxFleetOperationsSummary, St as DriverInfo, T as SandboxMcpServerEntry, Ti as SubscriptionInfo, Tn as NetworkConfig, Tr as SandboxFleetTraceBundle, Tt as EgressPolicy, U as BatchOptions, Ui as UploadProgress, Un as ProvisionResult, Ur as SandboxRuntimeProfile, Ut as FleetExecDispatchOptions, V as BatchEvent, Vi as UpdateUserOptions, Vn as PromptResult, Vr as SandboxResources, Vt as FleetDispatchResultBufferOptions, W as BatchResult, Wi as UsageInfo, Wn as ProvisionStatus, Wr as SandboxRuntimeProfileList, X as BatchTaskUsage, Xi as AgentProfileCapabilities, Xn as ReapExpiredSandboxFleetsOptions, Xr as SandboxTraceBundle, Xt as GitBranch, Y as BatchTaskResult, Yi as AgentProfile, Yn as PublishPublicTemplateVersionOptions, Yr as SandboxTerminalRequestOptions, Yt as GitAuth, Z as BranchOptions, Zi as AgentProfileConfidential, Zn as ReapExpiredSandboxFleetsResult, Zr as SandboxTraceEvent, Zt as GitCommit, _ as RespondToPermissionOptions, _i as SessionStatus, _n as IntelligenceReportWindow, _r as SandboxFleetMachineMeteredUsage, _t as DispatchedSession, a as TraceExportSink, aa as AgentProfileResources, ai as SecretInfo, an as GpuLeaseExecResult, ar as SandboxEnvironment, at as CreateGpuLeaseOptions, b as BuildSandboxMcpConfigOptions, bi as SnapshotResult, bn as ListSandboxFleetOptions, br as SandboxFleetManifest, bt as DriveTurnOptions, c as otelTraceIdForTangleTrace, ca as AgentSubagentProfile, ci as SendSessionMessageRequest, cn as GpuLeaseStatus, cr as SandboxFleetArtifactSpec, ct as CreateSandboxFleetOptions, d as SandboxSession, da as defineInlineResource, di as SessionEventStreamOptions, dn as HostAgentRuntimeBackend, dr as SandboxFleetDispatchResponse, dt as CreateSandboxOptions, ea as AgentProfileMcpServer, ei as SandboxUser, en as GitStatus, er as RunCodeOptions, f as InteractiveAuthFile, fa as mergeAgentProfiles, fi as SessionForkOptions, fn as InstalledTool, fr as SandboxFleetDriverCapability, ft as CreateSessionOptions, g as InterruptResult, gi as SessionMessageInputPart, gn as IntelligenceReportSubjectType, gr as SandboxFleetMachine, gt as DispatchPromptOptions, h as InteractiveSessionInfo, hi as SessionMessage, hn as IntelligenceReportCompareTo, hr as SandboxFleetIntelligenceEnvelope, ht as DirectoryPermission, i as TraceExportResult, ia as AgentProfileResourceRef, ii as SearchOptions, in as GpuLeaseExecOptions, ir as SandboxConnection, it as CompletedTurnResult, j as AttachGpuLeaseOptions, ji as TaskSessionInfo, jn as PreviewLinkManager, jr as SandboxFleetWorkspaceReconcileResult, jt as FileReadBatchResult, k as AccessPolicyRule, ki as TaskSessionCommitResult, kn as PermissionsManager, kr as SandboxFleetUsage, kt as FileInfo, l as toOtelJson, la as defineAgentProfile, li as SentSessionMessage, ln as GpuType, lr as SandboxFleetCostEstimate, m as InteractiveSessionHost, mi as SessionListOptions, mn as IntelligenceReportBudget, mr as SandboxFleetInfo, mt as DeleteOptions, n as SandboxInstance, na as AgentProfilePermissionValue, ni as ScopedTokenScope, nn as GpuLeaseBilling, nr as SSHCredentials, o as buildTraceExportPayload, oa as AgentProfileValidationIssue, oi as SecretsManager, on as GpuLeaseManager, or as SandboxEvent, ot as CreateIntelligenceReportOptions, p as InteractiveSessionHandle, pi as SessionInfo, pn as IntelligenceReport, pr as SandboxFleetDriverTimings, pt as CreateTaskSessionOptions, q as BatchSidecarGroup, qi as WriteManyFile, qn as PublicTemplateVersionInfo, qr as SandboxTerminalInfo, r as TraceExportFormat, ra as AgentProfilePrompt, ri as SearchMatch, rn as GpuLeaseCommandResult, rr as SandboxClientConfig, rt as CommitTaskSessionOptions, s as exportTraceBundle, sa as AgentProfileValidationResult, si as SendSessionMessageOptions, sn as GpuLeaseProviderName, sr as SandboxFleetArtifact, ta as AgentProfileModelHints, ti as ScopedToken, tn as GpuLease, tr as SSHCommandDescriptor, tt as CodeResult, u as SandboxTaskSession, ua as defineGitHubResource, ui as SessionBackendCredentials, un as HostAgentDriverConfig, ur as SandboxFleetDispatchFailureClass, ut as CreateSandboxFleetWithCoordinatorOptions, v as StartInteractiveOptions, vi as SnapshotInfo, vn as ListMessagesOptions, vr as SandboxFleetMachineRecord, vt as DownloadOptions, w as SandboxMcpEndpoint, wi as StorageConfig, wn as MkdirOptions, wr as SandboxFleetToken, wt as EgressManager, x as CONTROL_PLANE_MCP_SERVER_NAME, xn as ListSandboxOptions, xr as SandboxFleetManifestMachine, xt as DriverConfig, y as BuildControlPlaneMcpConfigOptions, yi as SnapshotOptions, yn as ListOptions, yr as SandboxFleetMachineSpec, yt as DownloadProgress, z as BatchBackend, zi as ToolsConfig, zr as SandboxProfileSummary, zt as FleetDispatchCancelResult } from "./sandbox-Bm2C9Phd.js";
2
- import { a as Team, c as SandboxFleet, d as ParsedSSEEvent, f as parseSSEStream, i as SandboxClient, l as SandboxFleetClient, n as IntelligenceClient, o as TeamInvitation, r as InviteTeamMemberOptions, s as TeamMember, t as CreateTeamOptions, u as ParseSSEStreamOptions } from "./client-cfdZckhU.js";
2
+ import { a as Team, c as SessionBroadcastEvent, d as SandboxFleetClient, f as ParseSSEStreamOptions, i as SandboxClient, l as SessionBroadcastResult, m as parseSSEStream, n as IntelligenceClient, o as TeamInvitation, p as ParsedSSEEvent, r as InviteTeamMemberOptions, s as TeamMember, t as CreateTeamOptions, u as SandboxFleet } from "./client-8wOu9raV.js";
3
3
  import { d as AnyTokenPayload, h as IssueCollaborationTokenOptions, m as CollaborationTokenPayload, p as CollaborationAccess } from "./index-D-2pH_70.js";
4
4
  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-D7bwmNs8.js";
5
5
  import { a as NotFoundError, c as SandboxError, d as ServerError, f as StateError, i as NetworkError, l as SandboxErrorJson, m as ValidationError, n as CapabilityError, o as PartialFailureError, p as TimeoutError, r as EgressProxyRecoveryError, s as QuotaError, t as AuthError, u as SandboxFailureDetail } from "./errors-H9268M_g.js";
@@ -1370,4 +1370,4 @@ interface RouterEvalMatrixCaseResult {
1370
1370
  }
1371
1371
  declare function runTangleRouterEvalMatrixInSandbox(options: RunTangleRouterEvalMatrixInSandboxOptions): Promise<RunTangleRouterEvalMatrixInSandboxResult>;
1372
1372
  //#endregion
1373
- export { type AcceleratorKind, type AccessPolicyRule, type AddUserOptions, type AgentProfile, type AgentProfileCapabilities, type AgentProfileConnection, type AgentProfileFileMount, type AgentProfileMcpServer, type AgentProfileModelHints, type AgentProfilePermissionValue, type AgentProfilePrompt, type AgentProfileResourceRef, type AgentProfileResources, type AgentProfileValidationIssue, type AgentProfileValidationResult, type AgentSubagentProfile, type AnyTokenPayload, type AttachGpuLeaseOptions, type AttachSandboxFleetMachineOptions, AuthError, type BackendCapabilities, type BackendConfig, type BackendInfo, type BackendManager, type BackendStatus, type BackendType, type BatchBackend, type BatchBackendStats, type BatchEvent, type BatchEventDataMap, type BatchOptions, type BatchResult, type BatchRunOptions, type BatchRunRequest, type BatchSidecarGroup, type BatchTask, type BatchTaskResult, type BatchTaskUsage, type BranchOptions, type BuildControlPlaneMcpConfigOptions, type BuildProgressEvent, type BuildSandboxMcpConfigOptions, CONTROL_PLANE_MCP_SERVER_NAME, CapabilityError, type CodeResult, type CollaborationAccess, type CollaborationBootstrapRequest, type CollaborationBootstrapResponse, CollaborationClient, type CollaborationClientConfig, type CollaborationDocumentAdapter, type CollaborationDocumentChange, type CollaborationDocumentRef, CollaborationFileBridge, type CollaborationFileBridgeOptions, type CollaborationFileEvent, type CollaborationPermissions, type CollaborationTokenPayload, type CollaborationTokenRefreshRequest, type CollaborationTokenRefreshResponse, type CollaborationTransportConfig, type CommitTaskSessionOptions, type CompletedTurnResult, type ConfidentialSandboxResult, type ConfidentialTeeType, type CreateConfidentialSandboxOptions, type CreateGpuLeaseOptions, type CreateIntelligenceReportOptions, type CreateSandboxFleetOptions, type CreateSandboxFleetWithCoordinatorOptions, type CreateSandboxOptions, type CreateSessionOptions, type CreateTaskSessionOptions, type CreateTeamOptions, DEFAULT_SANDBOX_SIZE, type DeleteOptions, type DirectoryPermission, type DispatchPromptOptions, type DispatchedSession, type DownloadOptions, type DownloadProgress, type DriveTurnOptions, type DriverConfig, type DriverInfo, type DriverType, type EgressManager, type EgressPolicy, EgressProxyRecoveryError, type EventStreamOptions, type ExecOptions, type ExecResult, type FileInfo, type FileReadBatchOptions, type FileReadBatchResult, type FileReadError, type FileReadResult, type FileSystem, type FileTreeFile, type FileTreeOptions, type FileTreeResult, type FileWriteResult, type FleetDispatchCancelResult, type FleetDispatchResultBuffer, type FleetDispatchResultBufferOptions, type FleetDispatchStreamOptions, type FleetExecDispatchOptions, type FleetMachineId, type FleetPromptDispatchOptions, GPU_LEASE_PROVIDER_NAMES, type GitAuth, type GitBranch, type GitCommit, type GitConfig, type GitDiff, type GitStatus, type GpuLease, type GpuLeaseBilling, type GpuLeaseCommandResult, type GpuLeaseExecOptions, type GpuLeaseExecResult, type GpuLeaseManager, type GpuLeaseProviderName, type GpuLeaseStatus, type GpuType, type HostAgentDriverConfig, type HostAgentRuntimeBackend, Image, type ImageBuildClient, type ImageBuildClientConfig, type ImageBuildFetchClient, type ImageBuildOptions, type ImageBuildResult, ImageBuilder, type ImageSpec, type InstalledTool, IntelligenceClient, type IntelligenceReport, type IntelligenceReportBudget, type IntelligenceReportCompareTo, type IntelligenceReportSubjectType, type IntelligenceReportWindow, type InteractiveAuthFile, InteractiveSessionHandle, type InteractiveSessionHost, type InteractiveSessionInfo, type InterruptResult, type InviteTeamMemberOptions, type IssueCollaborationTokenOptions, type ListMessagesOptions, type ListOptions, type ListSandboxFleetOptions, type ListSandboxOptions, MANAGE_SANDBOXES_PARAMETERS, MANAGE_SANDBOXES_TOOL_NAME, type ManageSandboxesInput, type ManageSandboxesTool, type ManageSandboxesToolOptions, type MaterializeProfileFileMountsOptions, type MaterializeProfileFileMountsResult, type McpServerConfig, type MintScopedTokenOptions, type MkdirOptions, type NetworkConfig, NetworkError, type NetworkManager, type NonHostAgentDriverConfig, NotFoundError, type ParseSSEStreamOptions, type ParsedSSEEvent, PartialFailureError, type PermissionLevel, type PermissionsManager, type PreviewLinkInfo, type PreviewLinkManager, type Process, type ProcessInfo, type ProcessLogEntry, type ProcessManager, type ProcessSignal, type ProcessSpawnOptions, type ProcessStatus, type PromptOptions, type PromptResult, type ProvisionEvent, type ProvisionResult, type ProvisionStatus, type ProvisionStep, type PublicTemplateInfo, type PublicTemplateVersionInfo, type PublishPublicTemplateOptions, type PublishPublicTemplateVersionOptions, QuotaError, type ReapExpiredSandboxFleetsOptions, type ReapExpiredSandboxFleetsResult, type ReconcileSandboxFleetsOptions, type ReconcileSandboxFleetsResult, type RespondToPermissionOptions, type RouterEvalMatrixAgentProfile, type RouterEvalMatrixCaseResult, type RouterEvalMatrixHarness, type RouterEvalMatrixPayload, type RouterEvalMatrixSandboxBox, type RouterEvalMatrixSandboxClient, type RouterEvalMatrixScenario, type RouterEvalMatrixSuiteResponse, type RouterImportedRunResponse, type RouterSearchConfig, type RouterSearchConfigOptions, type RunCodeOptions, type RunTangleRouterEvalMatrixInSandboxOptions, type RunTangleRouterEvalMatrixInSandboxResult, SANDBOX_MCP_SERVER_NAME, SANDBOX_SIZE_PRESETS, SANDBOX_SIZE_PRESET_NAMES, type SSHCommandDescriptor, type SSHCredentials, SandboxClient as Sandbox, SandboxClient, type SandboxClientConfig, type SandboxConnection, type SandboxEnvironment, SandboxError, type SandboxErrorJson, type SandboxEvent, type SandboxFailureDetail, SandboxFleet, type SandboxFleetArtifact, type SandboxFleetArtifactSpec, SandboxFleetClient, type SandboxFleetCostEstimate, type SandboxFleetDispatchFailureClass, type SandboxFleetDispatchResponse, type SandboxFleetDriverCapability, type SandboxFleetDriverTimings, type SandboxFleetInfo, type SandboxFleetIntelligenceEnvelope, type SandboxFleetMachine, type SandboxFleetMachineMeteredUsage, type SandboxFleetMachineRecord, type SandboxFleetMachineSpec, type SandboxFleetManifest, type SandboxFleetManifestMachine, type SandboxFleetOperationsSummary, type SandboxFleetPolicy, type SandboxFleetToken, type SandboxFleetTraceBundle, type SandboxFleetTraceEvent, type SandboxFleetTraceExport, type SandboxFleetTraceOptions, type SandboxFleetUsage, type SandboxFleetWorkspace, type SandboxFleetWorkspaceReconcileResult, type SandboxFleetWorkspaceRestoreResult, type SandboxFleetWorkspaceSnapshotResult, type SandboxInfo, SandboxInstance, type SandboxIntelligenceEnvelope, type SandboxMcpConfig, type SandboxMcpEndpoint, type SandboxMcpServerEntry, type SandboxPermissionsConfig, type SandboxPortBinding, type SandboxPortPreviewLink, type SandboxProfileSummary, type SandboxResourceUsage, type SandboxResources, type SandboxRuntimeHealth, type SandboxRuntimeProfile, type SandboxRuntimeProfileList, SandboxSession, type SandboxSizePreset, type SandboxStatus, SandboxTaskSession, type SandboxTerminalCreateOptions, type SandboxTerminalInfo, type SandboxTerminalManager, type SandboxTerminalRequestOptions, type SandboxTraceBundle, type SandboxTraceEvent, type SandboxTraceExport, type SandboxTraceOptions, type SandboxUser, type SaveCollaborationSnapshotRequest, type SaveCollaborationSnapshotResponse, type ScopedToken, type ScopedTokenScope, type SearchMatch, type SearchOptions, type SecretInfo, type SecretsManager, type SendSessionMessageOptions, type SendSessionMessageRequest, type SentSessionMessage, ServerError, type SessionBackendCredentials, type SessionEventStreamOptions, type SessionForkOptions, type SessionInfo, type SessionListOptions, type SessionMessage, type SessionMessageInputPart, type SessionStatus, type SnapshotInfo, type SnapshotOptions, type SnapshotResult, type SplitInlineProfileFileMountsResult, type StartInteractiveOptions, type StartupDiagnostics, type StartupOperation, StateError, type StorageConfig, type SubscriptionInfo, TangleSandboxClient, type TangleSandboxClientConfig, type TangleSearchProvider, type TaskOptions, type TaskResult, type TaskSessionChanges, type TaskSessionCommitResult, type TaskSessionFileChange, type TaskSessionInfo, type TaskSessionProfile, type Team, type TeamInvitation, type TeamMember, type TeeAttestationHeartbeat, type TeeAttestationHeartbeatOptions, type TeeAttestationHeartbeatSample, type TeeAttestationOptions, type TeeAttestationReport, type TeeAttestationResponse, type TeePublicKey, type TeePublicKeyResponse, TimeoutError, type TokenRefreshHandler, type ToolsConfig, type TraceExportFormat, type TraceExportResult, type TraceExportSink, type TurnDriveResult, type UpdateUserOptions, type UploadOptions, type UploadProgress, type UsageInfo, ValidationError, type WaitForOptions, type WriteFileOptions, type WriteManyFile, type WriteManyOptions, applySandboxEventText, buildCollaborationDocumentId, buildControlPlaneMcpConfig, buildSandboxMcpConfig, buildTangleRouterEvalMatrixRequest, buildTangleRouterResponsesWebSearchRequest, buildTangleRouterSearchBackend, buildTangleRouterSearchProfile, buildTraceExportPayload, collectAgentResponseText, createConfidentialSandbox, createManageSandboxesTool, defineAgentProfile, defineGitHubResource, defineInlineResource, exportTraceBundle, fetchTangleRouterSearchConfig, generateAttestationNonce, generateDockerfile, getSandboxEventText, materializeProfileFileMounts, mergeAgentProfiles, normalizeCollaborationPath, normalizeRuntimeBackendConfig, otelTraceIdForTangleTrace, parseCollaborationDocumentId, parseSSEStream, resolveSandboxResources, runTangleRouterEvalMatrixInSandbox, sandboxResourcesForSize, serializeForSidecar, splitInlineProfileFileMounts, startTeeAttestationHeartbeat, toOtelJson };
1373
+ export { type AcceleratorKind, type AccessPolicyRule, type AddUserOptions, type AgentProfile, type AgentProfileCapabilities, type AgentProfileConnection, type AgentProfileFileMount, type AgentProfileMcpServer, type AgentProfileModelHints, type AgentProfilePermissionValue, type AgentProfilePrompt, type AgentProfileResourceRef, type AgentProfileResources, type AgentProfileValidationIssue, type AgentProfileValidationResult, type AgentSubagentProfile, type AnyTokenPayload, type AttachGpuLeaseOptions, type AttachSandboxFleetMachineOptions, AuthError, type BackendCapabilities, type BackendConfig, type BackendInfo, type BackendManager, type BackendStatus, type BackendType, type BatchBackend, type BatchBackendStats, type BatchEvent, type BatchEventDataMap, type BatchOptions, type BatchResult, type BatchRunOptions, type BatchRunRequest, type BatchSidecarGroup, type BatchTask, type BatchTaskResult, type BatchTaskUsage, type BranchOptions, type BuildControlPlaneMcpConfigOptions, type BuildProgressEvent, type BuildSandboxMcpConfigOptions, CONTROL_PLANE_MCP_SERVER_NAME, CapabilityError, type CodeResult, type CollaborationAccess, type CollaborationBootstrapRequest, type CollaborationBootstrapResponse, CollaborationClient, type CollaborationClientConfig, type CollaborationDocumentAdapter, type CollaborationDocumentChange, type CollaborationDocumentRef, CollaborationFileBridge, type CollaborationFileBridgeOptions, type CollaborationFileEvent, type CollaborationPermissions, type CollaborationTokenPayload, type CollaborationTokenRefreshRequest, type CollaborationTokenRefreshResponse, type CollaborationTransportConfig, type CommitTaskSessionOptions, type CompletedTurnResult, type ConfidentialSandboxResult, type ConfidentialTeeType, type CreateConfidentialSandboxOptions, type CreateGpuLeaseOptions, type CreateIntelligenceReportOptions, type CreateSandboxFleetOptions, type CreateSandboxFleetWithCoordinatorOptions, type CreateSandboxOptions, type CreateSessionOptions, type CreateTaskSessionOptions, type CreateTeamOptions, DEFAULT_SANDBOX_SIZE, type DeleteOptions, type DirectoryPermission, type DispatchPromptOptions, type DispatchedSession, type DownloadOptions, type DownloadProgress, type DriveTurnOptions, type DriverConfig, type DriverInfo, type DriverType, type EgressManager, type EgressPolicy, EgressProxyRecoveryError, type EventStreamOptions, type ExecOptions, type ExecResult, type FileInfo, type FileReadBatchOptions, type FileReadBatchResult, type FileReadError, type FileReadResult, type FileSystem, type FileTreeFile, type FileTreeOptions, type FileTreeResult, type FileWriteResult, type FleetDispatchCancelResult, type FleetDispatchResultBuffer, type FleetDispatchResultBufferOptions, type FleetDispatchStreamOptions, type FleetExecDispatchOptions, type FleetMachineId, type FleetPromptDispatchOptions, GPU_LEASE_PROVIDER_NAMES, type GitAuth, type GitBranch, type GitCommit, type GitConfig, type GitDiff, type GitStatus, type GpuLease, type GpuLeaseBilling, type GpuLeaseCommandResult, type GpuLeaseExecOptions, type GpuLeaseExecResult, type GpuLeaseManager, type GpuLeaseProviderName, type GpuLeaseStatus, type GpuType, type HostAgentDriverConfig, type HostAgentRuntimeBackend, Image, type ImageBuildClient, type ImageBuildClientConfig, type ImageBuildFetchClient, type ImageBuildOptions, type ImageBuildResult, ImageBuilder, type ImageSpec, type InstalledTool, IntelligenceClient, type IntelligenceReport, type IntelligenceReportBudget, type IntelligenceReportCompareTo, type IntelligenceReportSubjectType, type IntelligenceReportWindow, type InteractiveAuthFile, InteractiveSessionHandle, type InteractiveSessionHost, type InteractiveSessionInfo, type InterruptResult, type InviteTeamMemberOptions, type IssueCollaborationTokenOptions, type ListMessagesOptions, type ListOptions, type ListSandboxFleetOptions, type ListSandboxOptions, MANAGE_SANDBOXES_PARAMETERS, MANAGE_SANDBOXES_TOOL_NAME, type ManageSandboxesInput, type ManageSandboxesTool, type ManageSandboxesToolOptions, type MaterializeProfileFileMountsOptions, type MaterializeProfileFileMountsResult, type McpServerConfig, type MintScopedTokenOptions, type MkdirOptions, type NetworkConfig, NetworkError, type NetworkManager, type NonHostAgentDriverConfig, NotFoundError, type ParseSSEStreamOptions, type ParsedSSEEvent, PartialFailureError, type PermissionLevel, type PermissionsManager, type PreviewLinkInfo, type PreviewLinkManager, type Process, type ProcessInfo, type ProcessLogEntry, type ProcessManager, type ProcessSignal, type ProcessSpawnOptions, type ProcessStatus, type PromptOptions, type PromptResult, type ProvisionEvent, type ProvisionResult, type ProvisionStatus, type ProvisionStep, type PublicTemplateInfo, type PublicTemplateVersionInfo, type PublishPublicTemplateOptions, type PublishPublicTemplateVersionOptions, QuotaError, type ReapExpiredSandboxFleetsOptions, type ReapExpiredSandboxFleetsResult, type ReconcileSandboxFleetsOptions, type ReconcileSandboxFleetsResult, type RespondToPermissionOptions, type RouterEvalMatrixAgentProfile, type RouterEvalMatrixCaseResult, type RouterEvalMatrixHarness, type RouterEvalMatrixPayload, type RouterEvalMatrixSandboxBox, type RouterEvalMatrixSandboxClient, type RouterEvalMatrixScenario, type RouterEvalMatrixSuiteResponse, type RouterImportedRunResponse, type RouterSearchConfig, type RouterSearchConfigOptions, type RunCodeOptions, type RunTangleRouterEvalMatrixInSandboxOptions, type RunTangleRouterEvalMatrixInSandboxResult, SANDBOX_MCP_SERVER_NAME, SANDBOX_SIZE_PRESETS, SANDBOX_SIZE_PRESET_NAMES, type SSHCommandDescriptor, type SSHCredentials, SandboxClient as Sandbox, SandboxClient, type SandboxClientConfig, type SandboxConnection, type SandboxEnvironment, SandboxError, type SandboxErrorJson, type SandboxEvent, type SandboxFailureDetail, SandboxFleet, type SandboxFleetArtifact, type SandboxFleetArtifactSpec, SandboxFleetClient, type SandboxFleetCostEstimate, type SandboxFleetDispatchFailureClass, type SandboxFleetDispatchResponse, type SandboxFleetDriverCapability, type SandboxFleetDriverTimings, type SandboxFleetInfo, type SandboxFleetIntelligenceEnvelope, type SandboxFleetMachine, type SandboxFleetMachineMeteredUsage, type SandboxFleetMachineRecord, type SandboxFleetMachineSpec, type SandboxFleetManifest, type SandboxFleetManifestMachine, type SandboxFleetOperationsSummary, type SandboxFleetPolicy, type SandboxFleetToken, type SandboxFleetTraceBundle, type SandboxFleetTraceEvent, type SandboxFleetTraceExport, type SandboxFleetTraceOptions, type SandboxFleetUsage, type SandboxFleetWorkspace, type SandboxFleetWorkspaceReconcileResult, type SandboxFleetWorkspaceRestoreResult, type SandboxFleetWorkspaceSnapshotResult, type SandboxInfo, SandboxInstance, type SandboxIntelligenceEnvelope, type SandboxMcpConfig, type SandboxMcpEndpoint, type SandboxMcpServerEntry, type SandboxPermissionsConfig, type SandboxPortBinding, type SandboxPortPreviewLink, type SandboxProfileSummary, type SandboxResourceUsage, type SandboxResources, type SandboxRuntimeHealth, type SandboxRuntimeProfile, type SandboxRuntimeProfileList, SandboxSession, type SandboxSizePreset, type SandboxStatus, SandboxTaskSession, type SandboxTerminalCreateOptions, type SandboxTerminalInfo, type SandboxTerminalManager, type SandboxTerminalRequestOptions, type SandboxTraceBundle, type SandboxTraceEvent, type SandboxTraceExport, type SandboxTraceOptions, type SandboxUser, type SaveCollaborationSnapshotRequest, type SaveCollaborationSnapshotResponse, type ScopedToken, type ScopedTokenScope, type SearchMatch, type SearchOptions, type SecretInfo, type SecretsManager, type SendSessionMessageOptions, type SendSessionMessageRequest, type SentSessionMessage, ServerError, type SessionBackendCredentials, type SessionBroadcastEvent, type SessionBroadcastResult, type SessionEventStreamOptions, type SessionForkOptions, type SessionInfo, type SessionListOptions, type SessionMessage, type SessionMessageInputPart, type SessionStatus, type SnapshotInfo, type SnapshotOptions, type SnapshotResult, type SplitInlineProfileFileMountsResult, type StartInteractiveOptions, type StartupDiagnostics, type StartupOperation, StateError, type StorageConfig, type SubscriptionInfo, TangleSandboxClient, type TangleSandboxClientConfig, type TangleSearchProvider, type TaskOptions, type TaskResult, type TaskSessionChanges, type TaskSessionCommitResult, type TaskSessionFileChange, type TaskSessionInfo, type TaskSessionProfile, type Team, type TeamInvitation, type TeamMember, type TeeAttestationHeartbeat, type TeeAttestationHeartbeatOptions, type TeeAttestationHeartbeatSample, type TeeAttestationOptions, type TeeAttestationReport, type TeeAttestationResponse, type TeePublicKey, type TeePublicKeyResponse, TimeoutError, type TokenRefreshHandler, type ToolsConfig, type TraceExportFormat, type TraceExportResult, type TraceExportSink, type TurnDriveResult, type UpdateUserOptions, type UploadOptions, type UploadProgress, type UsageInfo, ValidationError, type WaitForOptions, type WriteFileOptions, type WriteManyFile, type WriteManyOptions, applySandboxEventText, buildCollaborationDocumentId, buildControlPlaneMcpConfig, buildSandboxMcpConfig, buildTangleRouterEvalMatrixRequest, buildTangleRouterResponsesWebSearchRequest, buildTangleRouterSearchBackend, buildTangleRouterSearchProfile, buildTraceExportPayload, collectAgentResponseText, createConfidentialSandbox, createManageSandboxesTool, defineAgentProfile, defineGitHubResource, defineInlineResource, exportTraceBundle, fetchTangleRouterSearchConfig, generateAttestationNonce, generateDockerfile, getSandboxEventText, materializeProfileFileMounts, mergeAgentProfiles, normalizeCollaborationPath, normalizeRuntimeBackendConfig, otelTraceIdForTangleTrace, parseCollaborationDocumentId, parseSSEStream, resolveSandboxResources, runTangleRouterEvalMatrixInSandbox, sandboxResourcesForSize, serializeForSidecar, splitInlineProfileFileMounts, startTeeAttestationHeartbeat, toOtelJson };
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { _ as normalizeRuntimeBackendConfig, a as InteractiveSessionHandle, c as getSandboxEventText, d as exportTraceBundle, f as otelTraceIdForTangleTrace, g as parseSSEStream, h as encodeTextForWire, i as SandboxSession, o as applySandboxEventText, p as toOtelJson, r as SandboxTaskSession, s as collectAgentResponseText, t as SandboxInstance, u as buildTraceExportPayload, v as serializeForSidecar } from "./sandbox-CeimsfC8.js";
2
2
  import { a as NotFoundError, c as SandboxError, d as TimeoutError, f as ValidationError, i as NetworkError, l as ServerError, n as CapabilityError, o as PartialFailureError, r as EgressProxyRecoveryError, s as QuotaError, t as AuthError, u as StateError } from "./errors-DSz87Rkk.js";
3
- import { a as DEFAULT_SANDBOX_SIZE, c as resolveSandboxResources, i as SandboxFleetClient, l as sandboxResourcesForSize, n as SandboxClient, o as SANDBOX_SIZE_PRESETS, r as SandboxFleet, s as SANDBOX_SIZE_PRESET_NAMES, t as IntelligenceClient } from "./client-InX98Zxk.js";
3
+ import { a as DEFAULT_SANDBOX_SIZE, c as resolveSandboxResources, i as SandboxFleetClient, l as sandboxResourcesForSize, n as SandboxClient, o as SANDBOX_SIZE_PRESETS, r as SandboxFleet, s as SANDBOX_SIZE_PRESET_NAMES, t as IntelligenceClient } from "./client-B3oM6E-L.js";
4
4
  import { a as CollaborationClient, i as parseCollaborationDocumentId, n as buildCollaborationDocumentId, r as normalizeCollaborationPath, t as CollaborationFileBridge } from "./collaboration-D17lnOJX.js";
5
5
  import { t as TangleSandboxClient } from "./tangle-DayyZe-i.js";
6
6
  import { defineAgentProfile, defineGitHubResource, defineInlineResource, mergeAgentProfiles } from "@tangle-network/agent-interface";
@@ -163,21 +163,25 @@ var SessionGatewayClient = class {
163
163
  connectWebSocket() {
164
164
  const url = new URL(this.config.url);
165
165
  url.searchParams.set("token", this.currentToken);
166
- this.ws = new WebSocket(url.toString());
167
- this.ws.onopen = () => this.handleOpen();
168
- this.ws.onclose = (event) => this.handleClose(event.code, event.reason);
169
- this.ws.onerror = (_event) => {};
170
- this.ws.onmessage = (event) => this.handleMessage(event.data);
166
+ const socket = new WebSocket(url.toString());
167
+ this.ws = socket;
168
+ socket.onopen = () => {
169
+ if (this.ws === socket) this.handleOpen();
170
+ };
171
+ socket.onclose = (event) => this.handleClose(socket, event.code, event.reason);
172
+ socket.onerror = (_event) => {};
173
+ socket.onmessage = (event) => {
174
+ if (this.ws === socket) this.handleMessage(event.data);
175
+ };
171
176
  }
172
177
  /**
173
178
  * Disconnect from the session gateway.
174
179
  */
175
180
  disconnect() {
176
181
  this.cleanup();
177
- if (this.ws) {
178
- this.ws.close(1e3, "Client disconnect");
179
- this.ws = null;
180
- }
182
+ const socket = this.ws;
183
+ this.ws = null;
184
+ if (socket) socket.close(1e3, "Client disconnect");
181
185
  this.setState("disconnected");
182
186
  }
183
187
  /**
@@ -338,7 +342,9 @@ var SessionGatewayClient = class {
338
342
  this.handlers.onReconnect?.();
339
343
  }
340
344
  }
341
- handleClose(code, reason) {
345
+ handleClose(socket, code, reason) {
346
+ if (this.ws !== socket) return;
347
+ this.ws = null;
342
348
  this.cleanup();
343
349
  this.handlers.onDisconnect?.(code, reason);
344
350
  if (this.config.autoReconnect && this.reconnectAttempts < this.config.maxReconnectAttempts) {
package/package.json CHANGED
@@ -1,54 +1,45 @@
1
1
  {
2
2
  "name": "@tangle-network/sandbox",
3
- "version": "0.10.0",
3
+ "version": "0.10.2",
4
4
  "description": "Client SDK for the Tangle Sandbox platform - build AI agent applications with dev containers",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
7
- "types": "./dist/index.d.ts",
7
+ "types": "./src/index.ts",
8
8
  "exports": {
9
9
  ".": {
10
- "import": "./dist/index.js",
11
- "types": "./dist/index.d.ts",
10
+ "types": "./src/index.ts",
12
11
  "default": "./dist/index.js"
13
12
  },
14
13
  "./core": {
15
- "import": "./dist/core.js",
16
- "types": "./dist/core.d.ts",
14
+ "types": "./src/core.ts",
17
15
  "default": "./dist/core.js"
18
16
  },
19
17
  "./tangle": {
20
- "import": "./dist/tangle/index.js",
21
- "types": "./dist/tangle/index.d.ts",
18
+ "types": "./src/tangle/index.ts",
22
19
  "default": "./dist/tangle/index.js"
23
20
  },
24
21
  "./auth": {
25
- "import": "./dist/auth/index.js",
26
- "types": "./dist/auth/index.d.ts",
22
+ "types": "./src/auth/index.ts",
27
23
  "default": "./dist/auth/index.js"
28
24
  },
29
25
  "./collaboration": {
30
- "import": "./dist/collaboration/index.js",
31
- "types": "./dist/collaboration/index.d.ts",
26
+ "types": "./src/collaboration/index.ts",
32
27
  "default": "./dist/collaboration/index.js"
33
28
  },
34
29
  "./session-gateway": {
35
- "import": "./dist/session-gateway/index.js",
36
- "types": "./dist/session-gateway/index.d.ts",
30
+ "types": "./src/session-gateway/index.ts",
37
31
  "default": "./dist/session-gateway/index.js"
38
32
  },
39
33
  "./openai": {
40
- "import": "./dist/openai/index.js",
41
- "types": "./dist/openai/index.d.ts",
34
+ "types": "./src/openai/index.ts",
42
35
  "default": "./dist/openai/index.js"
43
36
  },
44
37
  "./agent": {
45
- "import": "./dist/agent/index.js",
46
- "types": "./dist/agent/index.d.ts",
38
+ "types": "./src/agent/index.ts",
47
39
  "default": "./dist/agent/index.js"
48
40
  },
49
41
  "./intelligence": {
50
- "import": "./dist/intelligence/index.js",
51
- "types": "./dist/intelligence/index.d.ts",
42
+ "types": "./src/intelligence/index.ts",
52
43
  "default": "./dist/intelligence/index.js"
53
44
  }
54
45
  },
@@ -58,7 +49,71 @@
58
49
  ],
59
50
  "publishConfig": {
60
51
  "access": "public",
61
- "registry": "https://registry.npmjs.org"
52
+ "registry": "https://registry.npmjs.org",
53
+ "main": "./dist/index.js",
54
+ "types": "./dist/index.d.ts",
55
+ "exports": {
56
+ ".": {
57
+ "import": "./dist/index.js",
58
+ "types": "./dist/index.d.ts",
59
+ "default": "./dist/index.js"
60
+ },
61
+ "./core": {
62
+ "import": "./dist/core.js",
63
+ "types": "./dist/core.d.ts",
64
+ "default": "./dist/core.js"
65
+ },
66
+ "./tangle": {
67
+ "import": "./dist/tangle/index.js",
68
+ "types": "./dist/tangle/index.d.ts",
69
+ "default": "./dist/tangle/index.js"
70
+ },
71
+ "./auth": {
72
+ "import": "./dist/auth/index.js",
73
+ "types": "./dist/auth/index.d.ts",
74
+ "default": "./dist/auth/index.js"
75
+ },
76
+ "./collaboration": {
77
+ "import": "./dist/collaboration/index.js",
78
+ "types": "./dist/collaboration/index.d.ts",
79
+ "default": "./dist/collaboration/index.js"
80
+ },
81
+ "./session-gateway": {
82
+ "import": "./dist/session-gateway/index.js",
83
+ "types": "./dist/session-gateway/index.d.ts",
84
+ "default": "./dist/session-gateway/index.js"
85
+ },
86
+ "./openai": {
87
+ "import": "./dist/openai/index.js",
88
+ "types": "./dist/openai/index.d.ts",
89
+ "default": "./dist/openai/index.js"
90
+ },
91
+ "./agent": {
92
+ "import": "./dist/agent/index.js",
93
+ "types": "./dist/agent/index.d.ts",
94
+ "default": "./dist/agent/index.js"
95
+ },
96
+ "./intelligence": {
97
+ "import": "./dist/intelligence/index.js",
98
+ "types": "./dist/intelligence/index.d.ts",
99
+ "default": "./dist/intelligence/index.js"
100
+ }
101
+ }
102
+ },
103
+ "scripts": {
104
+ "build": "tsdown",
105
+ "build:clean": "tsdown",
106
+ "check-types": "tsc --noEmit",
107
+ "verify-dist": "bash scripts/verify-dist.sh",
108
+ "prepack": "pnpm run build && pnpm run verify-dist",
109
+ "test": "vitest run",
110
+ "test:watch": "vitest",
111
+ "test:coverage": "vitest run --coverage",
112
+ "test:e2e": "vitest run --config vitest.e2e.config.ts",
113
+ "test:e2e:collaboration": "pnpm --dir ../../../packages/sdk-collaboration build && SKIP_ORCHESTRATOR=true vitest run --config vitest.e2e.config.ts tests/e2e/collaboration-lifecycle.test.ts",
114
+ "test:e2e:snapshots": "vitest run --config vitest.e2e.config.ts tests/e2e/snapshot-lifecycle.test.ts",
115
+ "test:e2e:harness": "SKIP_ORCHESTRATOR=true vitest run --config vitest.e2e.config.ts tests/e2e/harness-selection-smoke.test.ts",
116
+ "test:e2e:watch": "vitest --config vitest.e2e.config.ts"
62
117
  },
63
118
  "keywords": [
64
119
  "sandbox",
@@ -111,28 +166,14 @@
111
166
  },
112
167
  "devDependencies": {
113
168
  "@hocuspocus/provider": "^4.0.0",
114
- "@types/node": "25.6.0",
169
+ "@types/node": "catalog:",
115
170
  "@vitest/coverage-v8": "^4.1.5",
116
171
  "dotenv": "^16.4.5",
117
172
  "openai": "^6.36.0",
118
- "tsdown": "0.21.10",
173
+ "tsdown": "catalog:",
119
174
  "typescript": "^6.0.3",
120
175
  "vitest": "^4.1.5",
121
176
  "ws": "^8.20.0",
122
- "yjs": "13.6.30"
123
- },
124
- "scripts": {
125
- "build": "tsdown",
126
- "build:clean": "tsdown",
127
- "check-types": "tsc --noEmit",
128
- "verify-dist": "bash scripts/verify-dist.sh",
129
- "test": "vitest run",
130
- "test:watch": "vitest",
131
- "test:coverage": "vitest run --coverage",
132
- "test:e2e": "vitest run --config vitest.e2e.config.ts",
133
- "test:e2e:collaboration": "pnpm --dir ../../../packages/sdk-collaboration build && SKIP_ORCHESTRATOR=true vitest run --config vitest.e2e.config.ts tests/e2e/collaboration-lifecycle.test.ts",
134
- "test:e2e:snapshots": "vitest run --config vitest.e2e.config.ts tests/e2e/snapshot-lifecycle.test.ts",
135
- "test:e2e:harness": "SKIP_ORCHESTRATOR=true vitest run --config vitest.e2e.config.ts tests/e2e/harness-selection-smoke.test.ts",
136
- "test:e2e:watch": "vitest --config vitest.e2e.config.ts"
177
+ "yjs": "catalog:"
137
178
  }
138
- }
179
+ }
package/LICENSE DELETED
@@ -1,11 +0,0 @@
1
- Copyright (c) 2025 Tangle Network
2
-
3
- All rights reserved.
4
-
5
- This software and associated documentation files (the "Software") are proprietary
6
- and confidential. No part of this Software may be reproduced, distributed, or
7
- transmitted in any form or by any means, including photocopying, recording, or
8
- other electronic or mechanical methods, without the prior written permission of
9
- Tangle Network.
10
-
11
- For licensing inquiries, contact: hello@tangle.tools