@anthropic-ai/claude-agent-sdk 0.3.174 → 0.3.176

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
@@ -134,7 +134,12 @@ export type AttachBridgeSessionOptions = {
134
134
  onPermissionResponse?: (res: SDKControlResponse) => void;
135
135
  /** `interrupt` control_request from claude.ai. Already auto-replied-to. */
136
136
  onInterrupt?: () => void;
137
- onSetModel?: (model: string | undefined) => void;
137
+ onSetModel?: (model: string | undefined) => {
138
+ ok: true;
139
+ } | {
140
+ ok: false;
141
+ error: string;
142
+ } | void;
138
143
  onSetMaxThinkingTokens?: (tokens: number | null) => void;
139
144
  /**
140
145
  * `set_permission_mode` from claude.ai. Return an error verdict to send
@@ -150,8 +155,9 @@ export type AttachBridgeSessionOptions = {
150
155
  };
151
156
  /**
152
157
  * Transport died permanently. 401 = JWT expired (re-attach with fresh
153
- * secret), 4090 = epoch superseded (409, newer worker registered),
154
- * 4091 = CCRClient init failed, 403/404 = permanent SSE HTTP rejection.
158
+ * secret), 4090 = epoch superseded (no longer the active worker),
159
+ * 4091 = CCRClient init failed, 4092 = codeless close (defensive
160
+ * fallback — cause unknown), 403/404 = permanent SSE HTTP rejection.
155
161
  * Transient disconnects (503, network blips) retry indefinitely inside
156
162
  * SSETransport and do NOT fire this.
157
163
  */