@anthropic-ai/claude-agent-sdk 0.3.178 → 0.3.179

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/assistant.d.ts CHANGED
@@ -23,6 +23,29 @@ export type WorkerState = {
23
23
  claudeSessionId?: string;
24
24
  lastSSESequenceNum?: number;
25
25
  bridgeSessionId?: string;
26
+ /**
27
+ * Bridge-requested model override, replayed onto spawned queries.
28
+ * `{ model: undefined }` — which a JSON round-trip stores as `{}` — is a
29
+ * deliberate "reset to default" and distinct from the field being absent
30
+ * (never requested), so adapters must preserve an empty object rather
31
+ * than discard it. Optional: an adapter that drops the field degrades to
32
+ * the worker's in-memory latch, so settings survive for the worker's
33
+ * lifetime but not across restarts.
34
+ */
35
+ desiredModel?: {
36
+ model?: string;
37
+ };
38
+ /** Bridge-requested thinking-budget override; same semantics as desiredModel. */
39
+ desiredMaxThinkingTokens?: {
40
+ maxThinkingTokens: number | null;
41
+ /**
42
+ * Display mode carried alongside the budget so a replayed
43
+ * set_max_thinking_tokens re-installs the same display the bridge
44
+ * requested. Absent = keep the session's spawn-time snapshot;
45
+ * null = clear to the API default. Mirrors the control-protocol field.
46
+ */
47
+ thinkingDisplay?: 'summarized' | 'omitted' | null;
48
+ };
26
49
  };
27
50
  /** @alpha */
28
51
  export type WorkerStateAdapter = {
@@ -125,6 +148,7 @@ export type AssistantWorkerHandle = {
125
148
  /** Resolves when the fan-in loop exits and teardown completes. */
126
149
  done: Promise<void>;
127
150
  teardown(): Promise<void>;
151
+ [Symbol.asyncDispose](): Promise<void>;
128
152
  };
129
153
  /**
130
154
  * Run a single-session assistant worker: connect to the claude.ai bridge,