@tangle-network/sandbox 0.64.16 → 0.64.17
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/preview.d.ts +1 -1
- package/dist/{client-C9dbdA-u.d.ts → client-Bzklblzg.d.ts} +10 -10
- package/dist/core.d.ts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/{preview-DKi8KpOO.d.ts → preview-Cjg3Lsls.d.ts} +1 -1
- package/dist/session-gateway/index.d.ts +1 -3
- package/dist/session-gateway/index.js +21 -21
- package/package.json +7 -7
package/dist/agent/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { I as SandboxTaskSession, O as SandboxInstance, R as SandboxSession } from "../index-iYdJi4O8.js";
|
|
2
2
|
import { Di as CodeResultPart, Ei as CodeExecutionResult, Ha as CodeLanguage, Ti as CodeExecutionOptions, bn as SandboxFleetParent, vo as BackendType, xa as BackendConfig, xt as SessionListOptions, yt as SessionInfo } from "../types-CxfH95D5.js";
|
|
3
|
-
import { t as Sandbox } from "../client-
|
|
4
|
-
import { u as PreviewAuthorizer } from "../preview-
|
|
3
|
+
import { t as Sandbox } from "../client-Bzklblzg.js";
|
|
4
|
+
import { u as PreviewAuthorizer } from "../preview-Cjg3Lsls.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/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-Cjg3Lsls.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 };
|
|
@@ -3292,15 +3292,15 @@ declare const manageSandboxesInputSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
3292
3292
|
}, z.core.$strict>;
|
|
3293
3293
|
}, z.core.$strict>, z.ZodObject<{
|
|
3294
3294
|
action: z.ZodEnum<{
|
|
3295
|
-
cost: "cost";
|
|
3296
|
-
createWorkspaceSnapshot: "createWorkspaceSnapshot";
|
|
3297
|
-
manifest: "manifest";
|
|
3298
|
-
reconcileWorkspace: "reconcileWorkspace";
|
|
3299
|
-
trace: "trace";
|
|
3300
3295
|
list: "list";
|
|
3301
3296
|
delete: "delete";
|
|
3297
|
+
manifest: "manifest";
|
|
3302
3298
|
usage: "usage";
|
|
3299
|
+
trace: "trace";
|
|
3303
3300
|
intelligence: "intelligence";
|
|
3301
|
+
cost: "cost";
|
|
3302
|
+
createWorkspaceSnapshot: "createWorkspaceSnapshot";
|
|
3303
|
+
reconcileWorkspace: "reconcileWorkspace";
|
|
3304
3304
|
}>;
|
|
3305
3305
|
fleetId: z.ZodString;
|
|
3306
3306
|
}, z.core.$strict>, z.ZodObject<{
|
|
@@ -5228,15 +5228,15 @@ declare const MANAGE_SANDBOXES_PARAMETERS: z.core.ZodStandardJSONSchemaPayload<z
|
|
|
5228
5228
|
}, z.core.$strict>;
|
|
5229
5229
|
}, z.core.$strict>, z.ZodObject<{
|
|
5230
5230
|
action: z.ZodEnum<{
|
|
5231
|
-
cost: "cost";
|
|
5232
|
-
createWorkspaceSnapshot: "createWorkspaceSnapshot";
|
|
5233
|
-
manifest: "manifest";
|
|
5234
|
-
reconcileWorkspace: "reconcileWorkspace";
|
|
5235
|
-
trace: "trace";
|
|
5236
5231
|
list: "list";
|
|
5237
5232
|
delete: "delete";
|
|
5233
|
+
manifest: "manifest";
|
|
5238
5234
|
usage: "usage";
|
|
5235
|
+
trace: "trace";
|
|
5239
5236
|
intelligence: "intelligence";
|
|
5237
|
+
cost: "cost";
|
|
5238
|
+
createWorkspaceSnapshot: "createWorkspaceSnapshot";
|
|
5239
|
+
reconcileWorkspace: "reconcileWorkspace";
|
|
5240
5240
|
}>;
|
|
5241
5241
|
fleetId: z.ZodString;
|
|
5242
5242
|
}, z.core.$strict>, z.ZodObject<{
|
package/dist/core.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { B as WorkspaceImages, O as SandboxInstance, V as ProfileFileDeliveryRep
|
|
|
2
2
|
import { A as NotFoundError, F as SandboxError, H as TimeoutError, I as SandboxErrorJson, L as SandboxFailureDetail, M as ProfileFileMountPathError, N as QuotaError, R as ServerError, S as CapabilityError, T as FileWriteConflictError, U as ValidationError, b as AuthError, j as PartialFailureError, k as NetworkError, z as StateError } from "./terminal-stream-types-ClZCArRg.js";
|
|
3
3
|
import { Ai as ManagedProcessRecord, Ba as WorkspaceImagePublishInput, Ct as SessionMessageAdmission, H as PreviewLinkInfo, Ja as SandboxEnvRecoveryView, Mi as ManagedProcessSpec, Ni as ManagedProcessState, Oi as ManagedProcessJobs, U as PreviewLinkManager, Va as WorkspaceImagePublishResult, W as PreviewLinkWaitOptions, _r as NetworkConfig, ar as CreateSandboxOptions, ei as ExecOptions, ji as ManagedProcessResumeOptions, ki as ManagedProcessOptions, la as PromptInputPart, lr as SandboxStatus, nt as ConversationTurnResult, or as SandboxConfig, qa as SandboxEnvRecovery, ti as ExecResult, tt as ConversationTurnOptions, zn as SandboxInfo } from "./types-CxfH95D5.js";
|
|
4
4
|
import { D as LineReplyCode, E as LineReminderPreferences, F as LineSenderVerification, G as LineApplicationRequest, H as LINE_APPLICATION_REPLY_MAX_CHARS, I as LineSenderVerificationStart, J as LineApplicationView, K as LineApplicationResult, N as LineSendInput, O as LineReplyCodeInput, P as LineSendReceipt, T as LineProvider, U as LINE_APPLICATION_REQUEST_MAX_BYTES, W as LineApplication, X as parseLineApplicationResult, Y as parseLineApplicationRequest, _ as LineInstanceCreate, a as Line, b as LineMemberInstance, d as LineAttachment, f as LineAttachmentReauthorization, g as LineInstanceAttachOptions, h as LineImage, i as profileChannelReference, l as LineApplicationAttachOptions, o as LineAgentRolePolicy, p as LineExecutionKey, q as LineApplicationState, r as lineInstanceKey, t as LinesClient, w as LineNumberInventory, y as LineMember } from "./lines-CEX65fBF.js";
|
|
5
|
-
import { Ct as InstancesClient, _t as EnsureInstanceOptions, an as BackendRegistryInteractionKind, bt as InstanceRecord, cn as backendRegistryEntrySchema, dn as isBackendRegistryInteractionKind, fn as parseBackendRegistryResponse, in as BackendRegistryEntry, it as ManagedProcessClient, ln as backendRegistryInteractionKindSchema, on as BackendRegistryResponse, pn as parseBackendRegistryResponseBody, rn as BackendRegistryCapabilities, sn as backendRegistryCapabilitiesSchema, t as Sandbox, un as backendRegistryResponseSchema, vt as HostedInstance, xt as InstanceRestartingError, yt as InstanceProfile } from "./client-
|
|
5
|
+
import { Ct as InstancesClient, _t as EnsureInstanceOptions, an as BackendRegistryInteractionKind, bt as InstanceRecord, cn as backendRegistryEntrySchema, dn as isBackendRegistryInteractionKind, fn as parseBackendRegistryResponse, in as BackendRegistryEntry, it as ManagedProcessClient, ln as backendRegistryInteractionKindSchema, on as BackendRegistryResponse, pn as parseBackendRegistryResponseBody, rn as BackendRegistryCapabilities, sn as backendRegistryCapabilitiesSchema, t as Sandbox, un as backendRegistryResponseSchema, vt as HostedInstance, xt as InstanceRestartingError, yt as InstanceProfile } from "./client-Bzklblzg.js";
|
|
6
6
|
import { a as PublicTemplatesClient, i as PublicTemplatePublishRequestOptions, n as PublicTemplatePublishError, r as PublicTemplatePublishJob, t as PublicTemplatePublishArtifact } from "./public-templates-CXn4aQsN.js";
|
|
7
7
|
|
|
8
8
|
//#region src/core.d.ts
|
package/dist/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { $ as CompletedTurnPayload, $a as RawEvidenceBoxDirectoryExport, $i as D
|
|
|
4
4
|
import { A as LineRespondAgent, B as LineVoiceOptions, C as LineMessage, D as LineReplyCode, E as LineReminderPreferences, F as LineSenderVerification, G as LineApplicationRequest, H as LINE_APPLICATION_REPLY_MAX_CHARS, I as LineSenderVerificationStart, J as LineApplicationView, K as LineApplicationResult, L as LineThread, M as LineRole, N as LineSendInput, O as LineReplyCodeInput, P as LineSendReceipt, R as LineTransport, S as LineMemberSpec, T as LineProvider, U as LINE_APPLICATION_REQUEST_MAX_BYTES, W as LineApplication, X as parseLineApplicationResult, Y as parseLineApplicationRequest, _ as LineInstanceCreate, a as Line, b as LineMemberInstance, c as LineAllowanceSubject, d as LineAttachment, f as LineAttachmentReauthorization, g as LineInstanceAttachOptions, h as LineImage, i as profileChannelReference, j as LineRespondView, k as LineReplyGate, l as LineApplicationAttachOptions, m as LineFromConnectionInput, n as SandboxLines, o as LineAgentRolePolicy, p as LineExecutionKey, q as LineApplicationState, r as lineInstanceKey, s as LineAllowance, t as LinesClient, u as LineAttachOptions, v as LineLimits, w as LineNumberInventory, x as LineMemberPatch, y as LineMember, z as LineVoice } from "./lines-CEX65fBF.js";
|
|
5
5
|
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-CvObO_Kf.js";
|
|
6
6
|
import { a as InteractiveSessionControllerOptions, i as InteractiveSessionController, n as BrowserInteractiveSessionControllerOptions, o as InteractiveSessionControllerTransport, r as InteractiveAttachRequest, t as BrowserInteractiveSessionController } from "./interactive-controller-CG-ikeYf.js";
|
|
7
|
-
import { $ as SANDBOX_SIZE_PRESET_NAMES, $t as Team, A as RunsHttpClient, At as ImageBuilder, B as RunTangleRouterEvalMatrixInSandboxOptions, Bt as normalizeRuntimeBackendConfig, C as SessionBroadcastResult, Ct as InstancesClient, D as RunRecord, Dt as ImageBuildFetchClient, E as RunPlacementRecord, Et as ImageBuildClientConfig, F as RouterEvalMatrixSandboxBox, Ft as createConfidentialSandbox, G as TangleSearchProvider, Gt as startTeeAttestationHeartbeat, H as runTangleRouterEvalMatrixInSandbox, Ht as TeeAttestationHeartbeat, I as RouterEvalMatrixSandboxClient, It as generateAttestationNonce, J as buildTangleRouterSearchBackend, Jt as ParseSSEStreamOptions, K as buildTangleRouterEvalMatrixRequest, Kt as BuildProgressEvent, L as RouterEvalMatrixScenario, Lt as BatchResultAccumulator, M as RouterEvalMatrixCaseResult, Mt as ConfidentialSandboxResult, N as RouterEvalMatrixHarness, Nt as ConfidentialTeeType, O as RunWaitOptions, Ot as ImageBuildOptions, P as RouterEvalMatrixPayload, Pt as CreateConfidentialSandboxOptions, Q as SANDBOX_SIZE_PRESETS, Qt as InviteTeamMemberOptions, R as RouterEvalMatrixSuiteResponse, Rt as createBatchResultAccumulator, S as SessionBroadcastEvent, St as InstanceStart, T as RunPlacement, Tt as ImageBuildClient, U as RouterSearchConfig, Ut as TeeAttestationHeartbeatOptions, V as RunTangleRouterEvalMatrixInSandboxResult, Vt as requestedPublicProfileDigest, W as RouterSearchConfigOptions, Wt as TeeAttestationHeartbeatSample, X as fetchTangleRouterSearchConfig, Xt as parseSSEStream, Y as buildTangleRouterSearchProfile, Yt as ParsedSSEEvent, Z as DEFAULT_SANDBOX_SIZE, Zt as CreateTeamOptions, _ as AgentRunCancellationAcknowledgement, _t as EnsureInstanceOptions, a as AgentProfileCapabilities, an as BackendRegistryInteractionKind, at as MANAGE_SANDBOXES_PARAMETERS, b as Capability, bt as InstanceRecord, c as AgentProfileMcpServer, cn as backendRegistryEntrySchema, ct as ManageSandboxesTool, d as AgentProfilePrompt, dn as isBackendRegistryInteractionKind, dt as manageSandboxesInputSchema, en as TeamInvitation, et as SandboxSizePreset, f as AgentProfileResourceRef, fn as parseBackendRegistryResponse, ft as applySandboxEventText, g as AgentProfileValidationResult, gt as isToolBearingEvent, h as AgentProfileValidationIssue, ht as getSandboxEventText, i as AgentProfile, in as BackendRegistryEntry, it as ManagedProcessClient, j as RouterEvalMatrixAgentProfile, jt as generateDockerfile, k as RunsClient, kt as ImageBuildResult, l as AgentProfileModelHints, ln as backendRegistryInteractionKindSchema, lt as ManageSandboxesToolOptions, m as AgentProfileSecurityPolicy, mt as collectAgentResponseText, n as SandboxFleetClient, nn as IntelligenceClient, nt as sandboxResourcesForSize, o as AgentProfileConnection, on as BackendRegistryResponse, ot as MANAGE_SANDBOXES_TOOL_NAME, p as AgentProfileResources, pn as parseBackendRegistryResponseBody, pt as collectAgentFinalMessageText, q as buildTangleRouterResponsesWebSearchRequest, qt as ImageSpec, r as SandboxFleet, rn as BackendRegistryCapabilities, rt as materializeProfileFileMounts, s as AgentProfileFileMount, sn as backendRegistryCapabilitiesSchema, st as ManageSandboxesInput, t as Sandbox, tn as TeamMember, tt as resolveSandboxResources, u as AgentProfilePermissionValue, un as backendRegistryResponseSchema, ut as createManageSandboxesTool, v as AgentRunCancellationRequest, vt as HostedInstance, w as RunOptions, wt as Image, x as terminalUpgradeHeadersSupported, xt as InstanceRestartingError, y as AgentSubagentProfile, yt as InstanceProfile, z as RouterImportedRunResponse, zt as validateBatchRunRequest } from "./client-
|
|
7
|
+
import { $ as SANDBOX_SIZE_PRESET_NAMES, $t as Team, A as RunsHttpClient, At as ImageBuilder, B as RunTangleRouterEvalMatrixInSandboxOptions, Bt as normalizeRuntimeBackendConfig, C as SessionBroadcastResult, Ct as InstancesClient, D as RunRecord, Dt as ImageBuildFetchClient, E as RunPlacementRecord, Et as ImageBuildClientConfig, F as RouterEvalMatrixSandboxBox, Ft as createConfidentialSandbox, G as TangleSearchProvider, Gt as startTeeAttestationHeartbeat, H as runTangleRouterEvalMatrixInSandbox, Ht as TeeAttestationHeartbeat, I as RouterEvalMatrixSandboxClient, It as generateAttestationNonce, J as buildTangleRouterSearchBackend, Jt as ParseSSEStreamOptions, K as buildTangleRouterEvalMatrixRequest, Kt as BuildProgressEvent, L as RouterEvalMatrixScenario, Lt as BatchResultAccumulator, M as RouterEvalMatrixCaseResult, Mt as ConfidentialSandboxResult, N as RouterEvalMatrixHarness, Nt as ConfidentialTeeType, O as RunWaitOptions, Ot as ImageBuildOptions, P as RouterEvalMatrixPayload, Pt as CreateConfidentialSandboxOptions, Q as SANDBOX_SIZE_PRESETS, Qt as InviteTeamMemberOptions, R as RouterEvalMatrixSuiteResponse, Rt as createBatchResultAccumulator, S as SessionBroadcastEvent, St as InstanceStart, T as RunPlacement, Tt as ImageBuildClient, U as RouterSearchConfig, Ut as TeeAttestationHeartbeatOptions, V as RunTangleRouterEvalMatrixInSandboxResult, Vt as requestedPublicProfileDigest, W as RouterSearchConfigOptions, Wt as TeeAttestationHeartbeatSample, X as fetchTangleRouterSearchConfig, Xt as parseSSEStream, Y as buildTangleRouterSearchProfile, Yt as ParsedSSEEvent, Z as DEFAULT_SANDBOX_SIZE, Zt as CreateTeamOptions, _ as AgentRunCancellationAcknowledgement, _t as EnsureInstanceOptions, a as AgentProfileCapabilities, an as BackendRegistryInteractionKind, at as MANAGE_SANDBOXES_PARAMETERS, b as Capability, bt as InstanceRecord, c as AgentProfileMcpServer, cn as backendRegistryEntrySchema, ct as ManageSandboxesTool, d as AgentProfilePrompt, dn as isBackendRegistryInteractionKind, dt as manageSandboxesInputSchema, en as TeamInvitation, et as SandboxSizePreset, f as AgentProfileResourceRef, fn as parseBackendRegistryResponse, ft as applySandboxEventText, g as AgentProfileValidationResult, gt as isToolBearingEvent, h as AgentProfileValidationIssue, ht as getSandboxEventText, i as AgentProfile, in as BackendRegistryEntry, it as ManagedProcessClient, j as RouterEvalMatrixAgentProfile, jt as generateDockerfile, k as RunsClient, kt as ImageBuildResult, l as AgentProfileModelHints, ln as backendRegistryInteractionKindSchema, lt as ManageSandboxesToolOptions, m as AgentProfileSecurityPolicy, mt as collectAgentResponseText, n as SandboxFleetClient, nn as IntelligenceClient, nt as sandboxResourcesForSize, o as AgentProfileConnection, on as BackendRegistryResponse, ot as MANAGE_SANDBOXES_TOOL_NAME, p as AgentProfileResources, pn as parseBackendRegistryResponseBody, pt as collectAgentFinalMessageText, q as buildTangleRouterResponsesWebSearchRequest, qt as ImageSpec, r as SandboxFleet, rn as BackendRegistryCapabilities, rt as materializeProfileFileMounts, s as AgentProfileFileMount, sn as backendRegistryCapabilitiesSchema, st as ManageSandboxesInput, t as Sandbox, tn as TeamMember, tt as resolveSandboxResources, u as AgentProfilePermissionValue, un as backendRegistryResponseSchema, ut as createManageSandboxesTool, v as AgentRunCancellationRequest, vt as HostedInstance, w as RunOptions, wt as Image, x as terminalUpgradeHeadersSupported, xt as InstanceRestartingError, y as AgentSubagentProfile, yt as InstanceProfile, z as RouterImportedRunResponse, zt as validateBatchRunRequest } from "./client-Bzklblzg.js";
|
|
8
8
|
import { a as deriveAgentRunOutcome, i as deriveAgentResultOutcome, n as AgentRunOutcomeTracker, o as projectAgentTerminalRecord, r as createAgentRunOutcomeTracker, t as AgentRunOutcome } from "./agent-run-outcome-UqVoiafo.js";
|
|
9
9
|
import { d as AnyTokenPayload, h as IssueCollaborationTokenOptions, m as CollaborationTokenPayload, p as CollaborationAccess } from "./index-C8VSFtWl.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-CVjTnRWP.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { O as SandboxInstance } from "./index-iYdJi4O8.js";
|
|
2
2
|
import { F as EnsureDevServerOptions, H as PreviewLinkInfo } from "./types-CxfH95D5.js";
|
|
3
|
-
import { t as Sandbox } from "./client-
|
|
3
|
+
import { t as Sandbox } from "./client-Bzklblzg.js";
|
|
4
4
|
|
|
5
5
|
//#region src/agent/preview-operations.d.ts
|
|
6
6
|
type AgentPreviewOptions = Pick<EnsureDevServerOptions, "sessionId" | "cwd"> & {
|
|
@@ -431,7 +431,7 @@ interface SessionGatewayStats {
|
|
|
431
431
|
*/
|
|
432
432
|
declare function calculateConnectionQuality(metrics: ConnectionMetrics, isConnected: boolean): ConnectionQuality;
|
|
433
433
|
//#endregion
|
|
434
|
-
//#region ../../../packages/sdk/dist/client-
|
|
434
|
+
//#region ../../../packages/sdk/dist/client-DlMgBOqN.d.ts
|
|
435
435
|
//#region src/session-gateway/core-types.d.ts
|
|
436
436
|
interface SubscriptionDenial {
|
|
437
437
|
channel: string;
|
|
@@ -505,8 +505,6 @@ declare class SessionGatewayClientCore {
|
|
|
505
505
|
private state;
|
|
506
506
|
private readonly counters;
|
|
507
507
|
private readonly connectionWaiters;
|
|
508
|
-
private readonly reconnects;
|
|
509
|
-
private readonly heartbeat;
|
|
510
508
|
private readonly metrics;
|
|
511
509
|
private readonly replayCursor;
|
|
512
510
|
private readonly inbound;
|
|
@@ -33,7 +33,7 @@ function calculateConnectionQuality(metrics, isConnected) {
|
|
|
33
33
|
return "good";
|
|
34
34
|
}
|
|
35
35
|
//#endregion
|
|
36
|
-
//#region ../../../packages/sdk/dist/types-
|
|
36
|
+
//#region ../../../packages/sdk/dist/types-B1NMYFuB.js
|
|
37
37
|
function invokeClientCallback(name, callback, onError) {
|
|
38
38
|
try {
|
|
39
39
|
callback();
|
|
@@ -713,8 +713,8 @@ var SessionGatewayClientCore = class {
|
|
|
713
713
|
eventsReceived: 0
|
|
714
714
|
};
|
|
715
715
|
connectionWaiters;
|
|
716
|
-
reconnects;
|
|
717
|
-
heartbeat;
|
|
716
|
+
#reconnects;
|
|
717
|
+
#heartbeat;
|
|
718
718
|
metrics;
|
|
719
719
|
replayCursor;
|
|
720
720
|
inbound;
|
|
@@ -724,9 +724,9 @@ var SessionGatewayClientCore = class {
|
|
|
724
724
|
this.#config = resolveClientConfig(config);
|
|
725
725
|
this.handlers = config.handlers ?? {};
|
|
726
726
|
this.connectionWaiters = new ConnectionWaiters(this.#config.connectionEstablishmentTimeoutMs);
|
|
727
|
-
this
|
|
727
|
+
this.#reconnects = new ReconnectScheduler(this.#config);
|
|
728
728
|
this.metrics = new ConnectionMetricsTracker(initialMetrics, this.#config.latencyHistorySize, () => this.state === "connected", (metrics) => invokeClientCallback("onMetricsChange", () => this.handlers.onMetricsChange?.(metrics), this.handlers.onError));
|
|
729
|
-
this
|
|
729
|
+
this.#heartbeat = new Heartbeat(this.#config, this.metrics, () => this.ws, (message) => this.send(message));
|
|
730
730
|
this.replayCursor = new ReplayCursor(new ReplayStateStore(this.#config.enableReplayPersistence, replayStorage, this.#config.replayStorageKeyPrefix, this.#config.url, this.#config.sessionId), {
|
|
731
731
|
enabled: this.#config.enableDeduplication,
|
|
732
732
|
maxSize: this.#config.maxDeduplicationSize
|
|
@@ -749,7 +749,7 @@ var SessionGatewayClientCore = class {
|
|
|
749
749
|
*/
|
|
750
750
|
connect() {
|
|
751
751
|
if (this.state === "connected" || this.state === "connecting" || this.state === "reconnecting") return;
|
|
752
|
-
const nextState = this
|
|
752
|
+
const nextState = this.#reconnects.hasConnectedBefore ? "reconnecting" : "connecting";
|
|
753
753
|
this.setState(nextState);
|
|
754
754
|
if (this.getState() !== nextState) return;
|
|
755
755
|
this.connectWebSocket();
|
|
@@ -769,7 +769,7 @@ var SessionGatewayClientCore = class {
|
|
|
769
769
|
}
|
|
770
770
|
};
|
|
771
771
|
socket.onopen = () => {
|
|
772
|
-
if (this.ws === socket) this
|
|
772
|
+
if (this.ws === socket) this.#heartbeat.resetMissedPongs();
|
|
773
773
|
};
|
|
774
774
|
socket.onclose = (event) => this.handleClose(socket, event.code, event.reason);
|
|
775
775
|
socket.onerror = () => {
|
|
@@ -789,8 +789,8 @@ var SessionGatewayClientCore = class {
|
|
|
789
789
|
*/
|
|
790
790
|
disconnect() {
|
|
791
791
|
this.connectionWaiters.rejectAll(/* @__PURE__ */ new Error("Client disconnected"));
|
|
792
|
-
this
|
|
793
|
-
this
|
|
792
|
+
this.#heartbeat.stop();
|
|
793
|
+
this.#reconnects.cancel();
|
|
794
794
|
this.inbound.requests.rejectAll("Connection closed");
|
|
795
795
|
this.connectionWaiters.established = false;
|
|
796
796
|
const socket = this.ws;
|
|
@@ -870,9 +870,9 @@ var SessionGatewayClientCore = class {
|
|
|
870
870
|
return {
|
|
871
871
|
state: this.state,
|
|
872
872
|
connectedAt: this.counters.connectedAt,
|
|
873
|
-
lastPingAt: this
|
|
874
|
-
lastPongAt: this
|
|
875
|
-
reconnectAttempts: this
|
|
873
|
+
lastPingAt: this.#heartbeat.lastPingAt,
|
|
874
|
+
lastPongAt: this.#heartbeat.lastPongAt,
|
|
875
|
+
reconnectAttempts: this.#reconnects.attempts,
|
|
876
876
|
messagesReceived: this.counters.messagesReceived,
|
|
877
877
|
messagesSent: this.counters.messagesSent,
|
|
878
878
|
eventsReceived: this.counters.eventsReceived,
|
|
@@ -920,12 +920,12 @@ var SessionGatewayClientCore = class {
|
|
|
920
920
|
handleConnectionEstablished(sessionId) {
|
|
921
921
|
if (this.connectionWaiters.established) return;
|
|
922
922
|
this.connectionWaiters.clear();
|
|
923
|
-
const isReconnect = this
|
|
923
|
+
const isReconnect = this.#reconnects.hasConnectedBefore;
|
|
924
924
|
this.connectionWaiters.established = true;
|
|
925
|
-
this
|
|
925
|
+
this.#reconnects.hasConnectedBefore = true;
|
|
926
926
|
this.counters.connectedAt = Date.now();
|
|
927
|
-
this
|
|
928
|
-
this
|
|
927
|
+
this.#reconnects.attempts = 0;
|
|
928
|
+
this.#heartbeat.start();
|
|
929
929
|
const subscribe = this.replayCursor.subscribeMessage(this.#config.channels);
|
|
930
930
|
if (subscribe) this.send(subscribe);
|
|
931
931
|
this.setState("connected");
|
|
@@ -942,12 +942,12 @@ var SessionGatewayClientCore = class {
|
|
|
942
942
|
this.connectionWaiters.clear();
|
|
943
943
|
this.ws = null;
|
|
944
944
|
this.connectionWaiters.established = false;
|
|
945
|
-
this
|
|
946
|
-
this
|
|
945
|
+
this.#heartbeat.stop();
|
|
946
|
+
this.#reconnects.cancel();
|
|
947
947
|
this.inbound.requests.rejectAll("Connection closed");
|
|
948
|
-
if (this
|
|
948
|
+
if (this.#reconnects.canRetry()) {
|
|
949
949
|
this.setState("reconnecting");
|
|
950
|
-
if (this.state === "reconnecting") this
|
|
950
|
+
if (this.state === "reconnecting") this.#reconnects.schedule(() => {
|
|
951
951
|
if (this.state === "reconnecting" && this.ws === null) this.connectWebSocket();
|
|
952
952
|
});
|
|
953
953
|
} else {
|
|
@@ -962,7 +962,7 @@ var SessionGatewayClientCore = class {
|
|
|
962
962
|
const message = parseServerFrame(data, this.handlers);
|
|
963
963
|
if (!message) return;
|
|
964
964
|
if (CONTROL_MESSAGE_TYPES.has(message.type)) {
|
|
965
|
-
if (message.type === "pong") this
|
|
965
|
+
if (message.type === "pong") this.#heartbeat.handlePong(message.timestamp);
|
|
966
966
|
deliverServerMessage(message, this.inbound);
|
|
967
967
|
return;
|
|
968
968
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tangle-network/sandbox",
|
|
3
|
-
"version": "0.64.
|
|
3
|
+
"version": "0.64.17",
|
|
4
4
|
"description": "Client SDK for the Tangle Sandbox platform - build AI agent applications with dev containers",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": [
|
|
@@ -160,16 +160,16 @@
|
|
|
160
160
|
"ws": "^8.20.0",
|
|
161
161
|
"yjs": "13.6.30",
|
|
162
162
|
"@products/sandbox-test-utils": "0.0.0",
|
|
163
|
+
"@repo/shared": "0.0.0",
|
|
164
|
+
"@tangle-network/agent-profile-materialize": "0.26.0",
|
|
163
165
|
"@tangle-network/cli-agent-registry": "0.10.2",
|
|
164
|
-
"@tangle-network/runtime-contracts": "0.19.0",
|
|
165
166
|
"@tangle-network/sdk": "4.0.16",
|
|
166
|
-
"@tangle-network/
|
|
167
|
-
"@
|
|
168
|
-
"@tangle-network/agent-profile-materialize": "0.26.0"
|
|
167
|
+
"@tangle-network/runtime-contracts": "0.19.0",
|
|
168
|
+
"@tangle-network/sse-core": "0.0.0"
|
|
169
169
|
},
|
|
170
170
|
"tangleRelease": {
|
|
171
|
-
"sourceSha": "
|
|
172
|
-
"mergedAt": "2026-10-
|
|
171
|
+
"sourceSha": "08bb687ce982f53edfe2bd5a65d41c74291b6724",
|
|
172
|
+
"mergedAt": "2026-10-22T15:17:12-06:00"
|
|
173
173
|
},
|
|
174
174
|
"scripts": {
|
|
175
175
|
"build": "node scripts/build-dist.mjs",
|