@tangle-network/sandbox 0.60.78-develop.20261017090901.9326d18 → 0.60.78-develop.20261021201434.3bcd5ef

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.
Files changed (66) hide show
  1. package/README.md +61 -0
  2. package/dist/agent/index.d.ts +4 -4
  3. package/dist/agent/index.js +5 -5
  4. package/dist/agent/preview.d.ts +1 -1
  5. package/dist/agent/preview.js +2 -2
  6. package/dist/{agent-run-outcome-CTEpjCEZ.d.ts → agent-run-outcome-brwJbH5S.d.ts} +1 -1
  7. package/dist/auth/index.d.ts +2 -2
  8. package/dist/auth/index.js +5 -5
  9. package/dist/{backend-types-D6bYbvMB.js → backend-types-CLvdSX8V.js} +41 -1
  10. package/dist/{browser-interactive-control-controller-rpTbyvAS.d.ts → browser-interactive-control-controller-CvObO_Kf.d.ts} +1 -1
  11. package/dist/{browser-interactive-control-controller-BJf0P_J4.js → browser-interactive-control-controller-DHx53yre.js} +16 -1
  12. package/dist/{chunked-upload-DtIvkKNo.js → chunked-upload-DN2twsUu.js} +2 -59
  13. package/dist/{chunked-upload-file-DnsHEjg0.js → chunked-upload-file-Dpv1YsoA.js} +2 -1
  14. package/dist/{cli-auth-bundle-cSJjPeFF.js → cli-auth-bundle-CFeHsq-5.js} +23 -11
  15. package/dist/{client-R1tw-4Px.js → client-CgtR203z.js} +3349 -3341
  16. package/dist/client-Dr8qasCR.d.ts +6076 -0
  17. package/dist/collaboration/index.d.ts +1 -1
  18. package/dist/collaboration/index.js +1 -1
  19. package/dist/{collaboration-DaJU5O0E.js → collaboration-g_HzXa6f.js} +5 -5
  20. package/dist/core.d.ts +7 -7
  21. package/dist/core.js +7 -6
  22. package/dist/direct-http2-Dar5erTH.js +99 -0
  23. package/dist/{errors-DSJBKmGZ.js → errors-BfbOP_rx.js} +171 -22
  24. package/dist/{index-DO7GVpk_.d.ts → index-C8VSFtWl.d.ts} +1 -1
  25. package/dist/{index-DZ27pdB8.d.ts → index-CVjTnRWP.d.ts} +1 -1
  26. package/dist/{sandbox-CoIGxzm_.d.ts → index-D5dVNm76.d.ts} +2117 -1519
  27. package/dist/index.d.ts +12 -4704
  28. package/dist/index.js +40 -15
  29. package/dist/intelligence/index.js +1 -1
  30. package/dist/interactive-control.d.ts +1 -1
  31. package/dist/interactive-control.js +1 -1
  32. package/dist/{interactive-controller-CJ24g8Va.js → interactive-controller-OAsASPd_.js} +662 -620
  33. package/dist/interactive-controller-nMhGqXxq.d.ts +41 -0
  34. package/dist/keep-alive-fetch-BBzJDWyt.js +247 -0
  35. package/dist/{lines-DodQslsf.d.ts → lines-C5CPSg8n.d.ts} +21 -17
  36. package/dist/lines-C5ER4aN_.js +298 -0
  37. package/dist/lines.d.ts +1 -1
  38. package/dist/lines.js +1 -295
  39. package/dist/{local-cli-auth-CBV7Vjk5.js → local-cli-auth-D-CQ0-ub.js} +1 -1
  40. package/dist/{mcp-local-DjryqUiY.js → mcp-local-BjLG7VHY.js} +1 -1
  41. package/dist/{preview-wpGGk0bu.d.ts → preview-COO7TSBk.d.ts} +3 -3
  42. package/dist/public-templates-BDrchm0J.d.ts +80 -0
  43. package/dist/public-templates.d.ts +2 -0
  44. package/dist/public-templates.js +173 -0
  45. package/dist/{raw-evidence-archive-Br5a3xZ_.js → raw-evidence-archive-CDYDqHNv.js} +161 -69
  46. package/dist/runtime.d.ts +49 -41
  47. package/dist/runtime.js +8 -8
  48. package/dist/{sandbox-C7Tk62qn.js → sandbox-BrZxAq11.js} +9048 -8939
  49. package/dist/{secp256k1-Dx2XABHz.js → secp256k1-CmLpsmWl.js} +1 -1
  50. package/dist/session-gateway/index.d.ts +23 -67
  51. package/dist/session-gateway/index.js +578 -451
  52. package/dist/tangle/index.d.ts +1 -1
  53. package/dist/tangle/index.js +1 -1
  54. package/dist/{tangle-Ba4Kz5zT.js → tangle-GiPBak5X.js} +176 -169
  55. package/dist/terminal-stream-types-ClZCArRg.d.ts +662 -0
  56. package/dist/{types-B_QF-iHm.d.ts → types-CtH0GRql.d.ts} +6161 -5812
  57. package/package.json +12 -7
  58. package/dist/client-Lhxo82x1.d.ts +0 -1261
  59. package/dist/errors-mPL-qvgF.d.ts +0 -347
  60. package/dist/index-DRto9Ijb.d.ts +0 -579
  61. package/dist/managed-process-B7WfqKmi.d.ts +0 -15
  62. package/dist/terminal-stream-jdYomM1m.d.ts +0 -389
  63. /package/dist/{cli-auth-bundle-ODe06Ts7.d.ts → cli-auth-bundle-Dyw3hCGx.d.ts} +0 -0
  64. /package/dist/{line-application-Cq6dJLBD.js → line-application-DY9ZTdgF.js} +0 -0
  65. /package/dist/{preview-operations-DqSo-IBm.js → preview-operations-Ca02vPDJ.js} +0 -0
  66. /package/dist/{utils-B7_9Hl_z.js → utils-BGvM02yJ.js} +0 -0
@@ -1,4 +1,4 @@
1
- import { a as anumber, c as concatBytes$1, f as randomBytes, h as toBytes, i as ahash, l as createHasher$1, n as abytes$1, o as aoutput, p as rotr, r as aexists, s as clean, t as Hash, u as createView, x as split } from "./utils-B7_9Hl_z.js";
1
+ import { a as anumber, c as concatBytes$1, f as randomBytes, h as toBytes, i as ahash, l as createHasher$1, n as abytes$1, o as aoutput, p as rotr, r as aexists, s as clean, t as Hash, u as createView, x as split } from "./utils-BGvM02yJ.js";
2
2
  //#region ../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/_md.js
3
3
  /**
4
4
  * Internal Merkle-Damgard hash utils.
@@ -66,7 +66,7 @@ interface RuntimeUnavailableData {
66
66
  /**
67
67
  * Message types sent by the server.
68
68
  */
69
- type ServerMessage = (ServerMessageBase & {
69
+ type GatewayServerMessage = (ServerMessageBase & {
70
70
  type: "connection.established";
71
71
  data: {
72
72
  sessionId: string;
@@ -258,7 +258,7 @@ interface TokenRefreshResult {
258
258
  /**
259
259
  * Event handlers for session gateway events.
260
260
  */
261
- interface SessionGatewayEventHandlers {
261
+ interface GatewayEventHandlers {
262
262
  onConnect?: (sessionId: string) => void;
263
263
  onDisconnect?: (code: number, reason: string) => void;
264
264
  onReconnect?: () => void;
@@ -359,7 +359,7 @@ type TransportMode = "websocket";
359
359
  /**
360
360
  * Configuration for SessionGatewayClient.
361
361
  */
362
- interface SessionGatewayClientConfig {
362
+ interface GatewayClientConfig {
363
363
  /** WebSocket URL for the session gateway */
364
364
  url: string;
365
365
  /**
@@ -408,7 +408,7 @@ interface SessionGatewayClientConfig {
408
408
  /** Number of latency samples to track for averaging (default: 10) */
409
409
  latencyHistorySize?: number;
410
410
  /** Event handlers */
411
- handlers?: SessionGatewayEventHandlers;
411
+ handlers?: GatewayEventHandlers;
412
412
  }
413
413
  /**
414
414
  * Statistics for the session gateway connection.
@@ -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-D7H0VmDC.d.ts
434
+ //#region ../../../packages/sdk/dist/client-h8AqRerh.d.ts
435
435
  //#region src/session-gateway/core-types.d.ts
436
436
  interface SubscriptionDenial {
437
437
  channel: string;
@@ -441,7 +441,7 @@ interface SubscriptionAcknowledgement {
441
441
  channels: string[];
442
442
  denied?: SubscriptionDenial[];
443
443
  }
444
- type ServerMessage$2 = Exclude<ServerMessage, {
444
+ type ServerMessage$1 = Exclude<GatewayServerMessage, {
445
445
  type: "connection.established" | "subscribed";
446
446
  }> | (ServerMessageBase & {
447
447
  type: "connection.established";
@@ -483,56 +483,34 @@ interface RawWireMessage {
483
483
  interface NormalizedServerMessage extends RawWireMessage {
484
484
  type: string;
485
485
  }
486
- interface SessionGatewayEventHandlers$2 extends SessionGatewayEventHandlers {
486
+ interface SessionGatewayEventHandlers$1 extends GatewayEventHandlers {
487
487
  /** Called after internal processing for every non-duplicate normalized frame. */
488
488
  onMessage?: (message: NormalizedServerMessage) => void;
489
489
  }
490
- interface SessionGatewayClientConfig$2 extends Omit<SessionGatewayClientConfig, "handlers"> {
490
+ interface SessionGatewayClientConfig$1 extends Omit<GatewayClientConfig, "handlers"> {
491
491
  /** Browser session ID embedded in the session-scoped read token. */
492
492
  sessionId: string;
493
493
  /** Additional subscriptions; server-authorized channels are used by default. */
494
494
  channels?: string[];
495
495
  /** Maximum wait for `connection.established` (default: 10000 ms). */
496
496
  connectionEstablishmentTimeoutMs?: number;
497
- handlers?: SessionGatewayEventHandlers$2;
498
- } //#endregion
497
+ handlers?: SessionGatewayEventHandlers$1;
498
+ }
499
+ declare const INITIAL_METRICS: ConnectionMetrics; //#endregion
499
500
  //#region src/session-gateway/core.d.ts
500
501
  declare class SessionGatewayClientCore {
501
- private readonly initialMetrics;
502
+ #private;
502
503
  private ws;
503
- private readonly config;
504
504
  private readonly handlers;
505
- private readonly replayStateStore;
506
- private readonly tokenRefresher;
507
- private currentToken;
508
505
  private state;
509
- private connectedAt;
510
- private hasConnectedBefore;
511
- private connectionEstablishedForSocket;
512
- private lastPingAt;
513
- private lastPongAt;
514
- private lastPingSentAt;
515
- private missedPongCount;
516
- private reconnectAttempts;
517
- private messagesReceived;
518
- private messagesSent;
519
- private eventsReceived;
520
- private duplicatesSkipped;
521
- private reconnectTimer;
522
- private pingInterval;
523
- private pongTimeout;
524
- private pendingCallbacks;
506
+ private readonly counters;
525
507
  private readonly connectionWaiters;
526
- private messageIdCounter;
527
- private processedEventIds;
528
- private pingLatencyHistory;
529
- private connectionMetrics;
530
- private lastEventId;
531
- private currentExecutionId;
532
- private currentSessionId;
533
- private isReplaying;
534
- private replayProgress;
535
- constructor(config: SessionGatewayClientConfig$2, initialMetrics?: ConnectionMetrics);
508
+ private readonly reconnects;
509
+ private readonly heartbeat;
510
+ private readonly metrics;
511
+ private readonly replayCursor;
512
+ private readonly inbound;
513
+ constructor(config: SessionGatewayClientConfig$1, initialMetrics?: ConnectionMetrics);
536
514
  /**
537
515
  * Connect to the session gateway.
538
516
  */
@@ -590,44 +568,22 @@ declare class SessionGatewayClientCore {
590
568
  */
591
569
  getToken(): string;
592
570
  private setState;
593
- private handleOpen;
594
571
  private handleConnectionEstablished;
595
572
  private handleClose;
596
- private handleError;
597
- private closeBeforeEstablishment;
598
573
  private handleMessage;
599
- private handlePong;
600
- private dispatchMessage;
601
- private deliverMessage;
602
- private trackExecutionContext;
603
574
  private send;
604
575
  private sendWithResponse;
605
- private waitForConnectionEstablished;
606
- private restoreSubscriptions;
607
- private startPingInterval;
608
- private stopPingInterval;
609
- private sendPing;
610
- private clearPongTimeout;
611
- private scheduleReconnect;
612
- private cleanup;
613
- private updateConnectionMetrics;
614
- private updateConnectionQuality;
615
- private trackReconnection;
616
- private loadReplayState;
617
- private saveReplayState;
618
576
  } //#endregion
619
- //#region src/session-gateway/types.d.ts
620
- //#endregion
621
- //#region src/session-gateway/types.d.ts
622
- declare const INITIAL_METRICS: ConnectionMetrics;
577
+ //#region src/session-gateway/client.d.ts
578
+ /** SDK client with its original immediate, synchronous replay commands. */
623
579
  //#endregion
624
580
  //#region src/session-gateway/client.d.ts
625
581
  /** Sandbox replay waits for the server's authenticated connection receipt. */
626
582
  declare class SessionGatewayClient extends SessionGatewayClientCore {
627
- constructor(config: SessionGatewayClientConfig$2);
583
+ constructor(config: SessionGatewayClientConfig$1);
628
584
  /** @deprecated Timestamps are not a stable cursor. Use replaySinceSeq(). */
629
585
  replay(since: number): Promise<void>;
630
586
  replaySinceSeq(sinceSeq: number): Promise<void>;
631
587
  }
632
588
  //#endregion
633
- export { type ClientMessage, type ConnectionMetrics, type ConnectionQuality, type ConnectionState, INITIAL_METRICS, type NormalizedServerMessage, type PortEventData, type ReplayOptions, type ReplayState, type ReplayStateStorage, type RuntimeUnavailableData, type RuntimeUnavailableReason, type ServerMessage$2 as ServerMessage, SessionGatewayClient, type SessionGatewayClientConfig$2 as SessionGatewayClientConfig, type SessionGatewayEventHandlers$2 as SessionGatewayEventHandlers, type SessionGatewayStats, type SubscriptionAcknowledgement, type SubscriptionDenial, type TokenRefreshResult, type TransportMode, calculateConnectionQuality };
589
+ export { type ClientMessage, type ConnectionMetrics, type ConnectionQuality, type ConnectionState, INITIAL_METRICS, type NormalizedServerMessage, type PortEventData, type ReplayOptions, type ReplayState, type ReplayStateStorage, type RuntimeUnavailableData, type RuntimeUnavailableReason, type ServerMessage$1 as ServerMessage, SessionGatewayClient, type SessionGatewayClientConfig$1 as SessionGatewayClientConfig, type SessionGatewayEventHandlers$1 as SessionGatewayEventHandlers, type SessionGatewayStats, type SubscriptionAcknowledgement, type SubscriptionDenial, type TokenRefreshResult, type TransportMode, calculateConnectionQuality };