@anthropic-ai/claude-agent-sdk 0.3.185 → 0.3.187

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/bridge.d.ts CHANGED
@@ -37,6 +37,13 @@ export type BridgeSessionHandle = {
37
37
  * replaying full history.
38
38
  */
39
39
  getSequenceNum(): number;
40
+ /**
41
+ * Worker epoch the current transport is writing as. Callers that
42
+ * reconnect for a token refresh (not a cold re-attach) pass this back
43
+ * via `reconnectTransport({epoch})` so the handle reuses the epoch
44
+ * instead of calling registerWorker again.
45
+ */
46
+ getEpoch(): number | undefined;
40
47
  /** True once the write path (CCRClient initialize) is ready. */
41
48
  isConnected(): boolean;
42
49
  /** Write a single SDKMessage. `session_id` is injected automatically. */
@@ -64,7 +71,7 @@ export type BridgeSessionHandle = {
64
71
  reconnectTransport(opts: {
65
72
  ingressToken: string;
66
73
  apiBaseUrl: string;
67
- /** Omit to call registerWorker; provide if the server already bumped. */
74
+ /** Omit to reuse the current transport's epoch (token-refresh reconnect); provide to override. */
68
75
  epoch?: number;
69
76
  }): Promise<void>;
70
77
  /**