@anthropic-ai/claude-agent-sdk 0.2.15 → 0.2.17

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 (5) hide show
  1. package/cli.js +2530 -1840
  2. package/package.json +2 -2
  3. package/sdk-tools.d.ts +20 -0
  4. package/sdk.d.ts +15 -1
  5. package/sdk.mjs +7 -7
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anthropic-ai/claude-agent-sdk",
3
- "version": "0.2.15",
3
+ "version": "0.2.17",
4
4
  "main": "sdk.mjs",
5
5
  "types": "sdk.d.ts",
6
6
  "engines": {
@@ -37,5 +37,5 @@
37
37
  "@img/sharp-linuxmusl-x64": "^0.33.5",
38
38
  "@img/sharp-win32-x64": "^0.33.5"
39
39
  },
40
- "claudeCodeVersion": "2.1.15"
40
+ "claudeCodeVersion": "2.1.17"
41
41
  }
package/sdk-tools.d.ts CHANGED
@@ -58,6 +58,18 @@ export interface AgentInput {
58
58
  * Maximum number of agentic turns (API round-trips) before stopping. Used internally for warmup.
59
59
  */
60
60
  max_turns?: number;
61
+ /**
62
+ * Name for the spawned agent
63
+ */
64
+ name?: string;
65
+ /**
66
+ * Team name for spawning. Uses current team context if omitted.
67
+ */
68
+ team_name?: string;
69
+ /**
70
+ * Permission mode for spawned teammate (e.g., "plan" to require plan approval).
71
+ */
72
+ mode?: "acceptEdits" | "bypassPermissions" | "default" | "delegate" | "dontAsk" | "plan";
61
73
  }
62
74
  export interface BashInput {
63
75
  /**
@@ -142,6 +154,14 @@ export interface ExitPlanModeInput {
142
154
  * The remote session title if pushed to remote
143
155
  */
144
156
  remoteSessionTitle?: string;
157
+ /**
158
+ * Whether to launch a swarm to implement the plan
159
+ */
160
+ launchSwarm?: boolean;
161
+ /**
162
+ * Number of teammates to spawn in the swarm
163
+ */
164
+ teammateCount?: number;
145
165
  [k: string]: unknown;
146
166
  }
147
167
  export interface FileEditInput {
package/sdk.d.ts CHANGED
@@ -191,6 +191,7 @@ declare namespace coreTypes {
191
191
  SDKAssistantMessage,
192
192
  SDKAuthStatusMessage,
193
193
  SDKCompactBoundaryMessage,
194
+ SDKHookProgressMessage,
194
195
  SDKHookResponseMessage,
195
196
  SDKHookStartedMessage,
196
197
  SDKMessage,
@@ -1203,6 +1204,19 @@ declare type SDKHookCallbackRequest = {
1203
1204
  tool_use_id?: string;
1204
1205
  };
1205
1206
 
1207
+ export declare type SDKHookProgressMessage = {
1208
+ type: 'system';
1209
+ subtype: 'hook_progress';
1210
+ hook_id: string;
1211
+ hook_name: string;
1212
+ hook_event: string;
1213
+ stdout: string;
1214
+ stderr: string;
1215
+ output: string;
1216
+ uuid: UUID;
1217
+ session_id: string;
1218
+ };
1219
+
1206
1220
  export declare type SDKHookResponseMessage = {
1207
1221
  type: 'system';
1208
1222
  subtype: 'hook_response';
@@ -1247,7 +1261,7 @@ export declare type SdkMcpToolDefinition<Schema extends AnyZodRawShape = AnyZodR
1247
1261
  handler: (args: InferShape<Schema>, extra: unknown) => Promise<CallToolResult>;
1248
1262
  };
1249
1263
 
1250
- export declare type SDKMessage = SDKAssistantMessage | SDKUserMessage | SDKUserMessageReplay | SDKResultMessage | SDKSystemMessage | SDKPartialAssistantMessage | SDKCompactBoundaryMessage | SDKStatusMessage | SDKHookStartedMessage | SDKHookResponseMessage | SDKToolProgressMessage | SDKAuthStatusMessage | SDKTaskNotificationMessage;
1264
+ export declare type SDKMessage = SDKAssistantMessage | SDKUserMessage | SDKUserMessageReplay | SDKResultMessage | SDKSystemMessage | SDKPartialAssistantMessage | SDKCompactBoundaryMessage | SDKStatusMessage | SDKHookStartedMessage | SDKHookProgressMessage | SDKHookResponseMessage | SDKToolProgressMessage | SDKAuthStatusMessage | SDKTaskNotificationMessage;
1251
1265
 
1252
1266
  export declare type SDKPartialAssistantMessage = {
1253
1267
  type: 'stream_event';