@anthropic-ai/claude-agent-sdk 0.3.215 → 0.3.217

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
@@ -140,8 +140,10 @@ export type AttachBridgeSessionOptions = {
140
140
  /**
141
141
  * `control_response` from claude.ai — the user answered a `can_use_tool`
142
142
  * prompt sent via `sendControlRequest`. Caller correlates by `request_id`.
143
+ * Return `false` when the response is rejected (malformed/forged) so the
144
+ * prompt stays eligible for initialize re-delivery; void = accepted.
143
145
  */
144
- onPermissionResponse?: (res: SDKControlResponse) => void;
146
+ onPermissionResponse?: (res: SDKControlResponse) => boolean | void;
145
147
  /** `interrupt` control_request from claude.ai. Already auto-replied-to. */
146
148
  onInterrupt?: () => void;
147
149
  onSetModel?: (model: string | undefined) => {
@@ -163,6 +165,13 @@ export type AttachBridgeSessionOptions = {
163
165
  ok: false;
164
166
  error: string;
165
167
  };
168
+ /** `rename_session` from claude.ai. Return an error verdict to reject. */
169
+ onRenameSession?: (title: string) => {
170
+ ok: true;
171
+ } | {
172
+ ok: false;
173
+ error: string;
174
+ };
166
175
  /**
167
176
  * Transport died permanently. 401 = JWT expired (re-attach with fresh
168
177
  * secret), 4090 = epoch superseded (no longer the active worker),