@anthropic-ai/claude-agent-sdk 0.2.44 → 0.2.47
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/bun.lock +9 -8
- package/cli.js +8333 -3710
- package/manifest.json +18 -18
- package/manifest.zst.json +18 -18
- package/package.json +11 -10
- package/sdk-tools.d.ts +1 -1
- package/sdk.d.ts +79 -16
- package/sdk.mjs +20 -20
package/manifest.json
CHANGED
|
@@ -1,46 +1,46 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "2.1.
|
|
3
|
-
"buildDate": "2026-02-
|
|
2
|
+
"version": "2.1.47",
|
|
3
|
+
"buildDate": "2026-02-18T20:16:40Z",
|
|
4
4
|
"platforms": {
|
|
5
5
|
"darwin-arm64": {
|
|
6
6
|
"binary": "claude",
|
|
7
|
-
"checksum": "
|
|
8
|
-
"size":
|
|
7
|
+
"checksum": "73795e6d8f0aa4e07d8f20d351e0f84e515db2ce73b69770650bc3d5d582ef73",
|
|
8
|
+
"size": 184395680
|
|
9
9
|
},
|
|
10
10
|
"darwin-x64": {
|
|
11
11
|
"binary": "claude",
|
|
12
|
-
"checksum": "
|
|
13
|
-
"size":
|
|
12
|
+
"checksum": "b62889b0d4d1f07bf76ebe89b6d1b1b85690977a939307bc896cd76748df3031",
|
|
13
|
+
"size": 189516896
|
|
14
14
|
},
|
|
15
15
|
"linux-arm64": {
|
|
16
16
|
"binary": "claude",
|
|
17
|
-
"checksum": "
|
|
18
|
-
"size":
|
|
17
|
+
"checksum": "9255d330db19353d73b3975b0bc2ebaddd1cf002a62fa15b95a6bbfec8a9be18",
|
|
18
|
+
"size": 221546407
|
|
19
19
|
},
|
|
20
20
|
"linux-x64": {
|
|
21
21
|
"binary": "claude",
|
|
22
|
-
"checksum": "
|
|
23
|
-
"size":
|
|
22
|
+
"checksum": "9c48bde67bda274d65c3d65da4f78e21a458ce722a8955edcc272d32c98c74a3",
|
|
23
|
+
"size": 224432260
|
|
24
24
|
},
|
|
25
25
|
"linux-arm64-musl": {
|
|
26
26
|
"binary": "claude",
|
|
27
|
-
"checksum": "
|
|
28
|
-
"size":
|
|
27
|
+
"checksum": "2bb8530b925220727cbc7ba4880dd12ccda308ebed513915a5c71674c3bc05f2",
|
|
28
|
+
"size": 214713415
|
|
29
29
|
},
|
|
30
30
|
"linux-x64-musl": {
|
|
31
31
|
"binary": "claude",
|
|
32
|
-
"checksum": "
|
|
33
|
-
"size":
|
|
32
|
+
"checksum": "3ba4ec54ff2f4d6500dd156725914695c40369851ee429583c821cb09c04d36e",
|
|
33
|
+
"size": 216932316
|
|
34
34
|
},
|
|
35
35
|
"win32-x64": {
|
|
36
36
|
"binary": "claude.exe",
|
|
37
|
-
"checksum": "
|
|
38
|
-
"size":
|
|
37
|
+
"checksum": "b29dca8880f7bcd8820909cb630f0bace6e8a4a126caa7aafdd5ca2dbd13c497",
|
|
38
|
+
"size": 233474208
|
|
39
39
|
},
|
|
40
40
|
"win32-arm64": {
|
|
41
41
|
"binary": "claude.exe",
|
|
42
|
-
"checksum": "
|
|
43
|
-
"size":
|
|
42
|
+
"checksum": "ae9b2d1274aa067d79663f19045a9b0df2882c073f90d208d827610f4014c2dc",
|
|
43
|
+
"size": 225526432
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
}
|
package/manifest.zst.json
CHANGED
|
@@ -1,46 +1,46 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "2.1.
|
|
3
|
-
"buildDate": "2026-02-
|
|
2
|
+
"version": "2.1.47",
|
|
3
|
+
"buildDate": "2026-02-18T20:16:41Z",
|
|
4
4
|
"platforms": {
|
|
5
5
|
"darwin-arm64": {
|
|
6
6
|
"binary": "claude.zst",
|
|
7
|
-
"checksum": "
|
|
8
|
-
"size":
|
|
7
|
+
"checksum": "652b522572807857cf622038259285e9a1e666ed98f4ec2555d22591222ba3fb",
|
|
8
|
+
"size": 39048134
|
|
9
9
|
},
|
|
10
10
|
"darwin-x64": {
|
|
11
11
|
"binary": "claude.zst",
|
|
12
|
-
"checksum": "
|
|
13
|
-
"size":
|
|
12
|
+
"checksum": "1f6135f3e4d2be25091bd4e8cb79c93920068b1a2d29c7dfde1f25a45e6ca840",
|
|
13
|
+
"size": 41229584
|
|
14
14
|
},
|
|
15
15
|
"linux-arm64": {
|
|
16
16
|
"binary": "claude.zst",
|
|
17
|
-
"checksum": "
|
|
18
|
-
"size":
|
|
17
|
+
"checksum": "a9b1dc5b73cc91d27049ad88910126bc9e26998e283a0293221de1a7bd86dd49",
|
|
18
|
+
"size": 49593234
|
|
19
19
|
},
|
|
20
20
|
"linux-x64": {
|
|
21
21
|
"binary": "claude.zst",
|
|
22
|
-
"checksum": "
|
|
23
|
-
"size":
|
|
22
|
+
"checksum": "b865b442549bb802b601c9e46785181a9770517c5caec3dec1bf4eb29c767eaa",
|
|
23
|
+
"size": 50294350
|
|
24
24
|
},
|
|
25
25
|
"linux-arm64-musl": {
|
|
26
26
|
"binary": "claude.zst",
|
|
27
|
-
"checksum": "
|
|
28
|
-
"size":
|
|
27
|
+
"checksum": "6afc3cb58218f410990df863a9a50515f528e5bdcc2d68a241f1417b4abf8630",
|
|
28
|
+
"size": 48108388
|
|
29
29
|
},
|
|
30
30
|
"linux-x64-musl": {
|
|
31
31
|
"binary": "claude.zst",
|
|
32
|
-
"checksum": "
|
|
33
|
-
"size":
|
|
32
|
+
"checksum": "96b5dd8374117a66890ad564f19161bc6c2da5214e43f2fffcdb6cb82821d067",
|
|
33
|
+
"size": 48735299
|
|
34
34
|
},
|
|
35
35
|
"win32-x64": {
|
|
36
36
|
"binary": "claude.exe.zst",
|
|
37
|
-
"checksum": "
|
|
38
|
-
"size":
|
|
37
|
+
"checksum": "3d268db33cc47d27db48f727e3f935b826264ef3b9a012b581ee915592a2b9f3",
|
|
38
|
+
"size": 52361586
|
|
39
39
|
},
|
|
40
40
|
"win32-arm64": {
|
|
41
41
|
"binary": "claude.exe.zst",
|
|
42
|
-
"checksum": "
|
|
43
|
-
"size":
|
|
42
|
+
"checksum": "960e906b23cd4f890769dcb2f0e2631e20d064dfcaddfb47a987ccf2a18960e8",
|
|
43
|
+
"size": 49638684
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@anthropic-ai/claude-agent-sdk",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.47",
|
|
4
4
|
"main": "sdk.mjs",
|
|
5
5
|
"types": "sdk.d.ts",
|
|
6
6
|
"engines": {
|
|
@@ -28,14 +28,15 @@
|
|
|
28
28
|
"zod": "^4.0.0"
|
|
29
29
|
},
|
|
30
30
|
"optionalDependencies": {
|
|
31
|
-
"@img/sharp-darwin-arm64": "^0.
|
|
32
|
-
"@img/sharp-darwin-x64": "^0.
|
|
33
|
-
"@img/sharp-linux-arm": "^0.
|
|
34
|
-
"@img/sharp-linux-arm64": "^0.
|
|
35
|
-
"@img/sharp-linux-x64": "^0.
|
|
36
|
-
"@img/sharp-linuxmusl-arm64": "^0.
|
|
37
|
-
"@img/sharp-linuxmusl-x64": "^0.
|
|
38
|
-
"@img/sharp-win32-
|
|
31
|
+
"@img/sharp-darwin-arm64": "^0.34.2",
|
|
32
|
+
"@img/sharp-darwin-x64": "^0.34.2",
|
|
33
|
+
"@img/sharp-linux-arm": "^0.34.2",
|
|
34
|
+
"@img/sharp-linux-arm64": "^0.34.2",
|
|
35
|
+
"@img/sharp-linux-x64": "^0.34.2",
|
|
36
|
+
"@img/sharp-linuxmusl-arm64": "^0.34.2",
|
|
37
|
+
"@img/sharp-linuxmusl-x64": "^0.34.2",
|
|
38
|
+
"@img/sharp-win32-arm64": "^0.34.2",
|
|
39
|
+
"@img/sharp-win32-x64": "^0.34.2"
|
|
39
40
|
},
|
|
40
|
-
"claudeCodeVersion": "2.1.
|
|
41
|
+
"claudeCodeVersion": "2.1.47"
|
|
41
42
|
}
|
package/sdk-tools.d.ts
CHANGED
|
@@ -69,7 +69,7 @@ export interface AgentInput {
|
|
|
69
69
|
/**
|
|
70
70
|
* Permission mode for spawned teammate (e.g., "plan" to require plan approval).
|
|
71
71
|
*/
|
|
72
|
-
mode?: "acceptEdits" | "bypassPermissions" | "default" | "
|
|
72
|
+
mode?: "acceptEdits" | "bypassPermissions" | "default" | "dontAsk" | "plan";
|
|
73
73
|
}
|
|
74
74
|
export interface BashInput {
|
|
75
75
|
/**
|
package/sdk.d.ts
CHANGED
|
@@ -70,7 +70,7 @@ export declare type AgentMcpServerSpec = string | Record<string, McpServerConfig
|
|
|
70
70
|
|
|
71
71
|
export declare type AnyZodRawShape = ZodRawShape | ZodRawShape_2;
|
|
72
72
|
|
|
73
|
-
export declare type ApiKeySource = 'user' | 'project' | 'org' | 'temporary';
|
|
73
|
+
export declare type ApiKeySource = 'user' | 'project' | 'org' | 'temporary' | 'oauth';
|
|
74
74
|
|
|
75
75
|
export declare type AsyncHookJSONOutput = {
|
|
76
76
|
async: true;
|
|
@@ -142,6 +142,7 @@ declare namespace coreTypes {
|
|
|
142
142
|
export {
|
|
143
143
|
SandboxSettings,
|
|
144
144
|
SandboxNetworkConfig,
|
|
145
|
+
SandboxFilesystemConfig,
|
|
145
146
|
SandboxIgnoreViolations,
|
|
146
147
|
NonNullableUsage,
|
|
147
148
|
HOOK_EVENTS,
|
|
@@ -208,6 +209,7 @@ declare namespace coreTypes {
|
|
|
208
209
|
SDKStatus,
|
|
209
210
|
SDKSystemMessage,
|
|
210
211
|
SDKTaskNotificationMessage,
|
|
212
|
+
SDKTaskStartedMessage,
|
|
211
213
|
SDKToolProgressMessage,
|
|
212
214
|
SDKToolUseSummaryMessage,
|
|
213
215
|
SDKUserMessageReplay,
|
|
@@ -228,6 +230,10 @@ declare namespace coreTypes {
|
|
|
228
230
|
SyncHookJSONOutput,
|
|
229
231
|
TaskCompletedHookInput,
|
|
230
232
|
TeammateIdleHookInput,
|
|
233
|
+
ThinkingAdaptive,
|
|
234
|
+
ThinkingConfig,
|
|
235
|
+
ThinkingDisabled,
|
|
236
|
+
ThinkingEnabled,
|
|
231
237
|
UserPromptSubmitHookInput,
|
|
232
238
|
UserPromptSubmitHookSpecificOutput
|
|
233
239
|
}
|
|
@@ -622,14 +628,7 @@ export declare type Options = {
|
|
|
622
628
|
*
|
|
623
629
|
* @see https://docs.anthropic.com/en/docs/build-with-claude/adaptive-thinking
|
|
624
630
|
*/
|
|
625
|
-
thinking?:
|
|
626
|
-
type: 'adaptive';
|
|
627
|
-
} | {
|
|
628
|
-
type: 'enabled';
|
|
629
|
-
budgetTokens: number;
|
|
630
|
-
} | {
|
|
631
|
-
type: 'disabled';
|
|
632
|
-
};
|
|
631
|
+
thinking?: ThinkingConfig;
|
|
633
632
|
/**
|
|
634
633
|
* Controls how much effort Claude puts into its response.
|
|
635
634
|
* Works with adaptive thinking to guide thinking depth.
|
|
@@ -678,7 +677,7 @@ export declare type Options = {
|
|
|
678
677
|
mcpServers?: Record<string, McpServerConfig>;
|
|
679
678
|
/**
|
|
680
679
|
* Claude model to use. Defaults to the CLI default model.
|
|
681
|
-
* Examples: 'claude-sonnet-4-
|
|
680
|
+
* Examples: 'claude-sonnet-4-6', 'claude-opus-4-6'
|
|
682
681
|
*/
|
|
683
682
|
model?: string;
|
|
684
683
|
/**
|
|
@@ -868,9 +867,9 @@ export declare type OutputFormatType = 'json_schema';
|
|
|
868
867
|
export declare type PermissionBehavior = 'allow' | 'deny' | 'ask';
|
|
869
868
|
|
|
870
869
|
/**
|
|
871
|
-
* Permission mode for controlling how tool executions are handled. 'default' - Standard behavior, prompts for dangerous operations. 'acceptEdits' - Auto-accept file edit operations. 'bypassPermissions' - Bypass all permission checks (requires allowDangerouslySkipPermissions). 'plan' - Planning mode, no actual tool execution. '
|
|
870
|
+
* Permission mode for controlling how tool executions are handled. 'default' - Standard behavior, prompts for dangerous operations. 'acceptEdits' - Auto-accept file edit operations. 'bypassPermissions' - Bypass all permission checks (requires allowDangerouslySkipPermissions). 'plan' - Planning mode, no actual tool execution. 'dontAsk' - Don't prompt for permissions, deny if not pre-approved.
|
|
872
871
|
*/
|
|
873
|
-
export declare type PermissionMode = 'default' | 'acceptEdits' | 'bypassPermissions' | 'plan' | '
|
|
872
|
+
export declare type PermissionMode = 'default' | 'acceptEdits' | 'bypassPermissions' | 'plan' | 'dontAsk';
|
|
874
873
|
|
|
875
874
|
export declare type PermissionRequestHookInput = BaseHookInput & {
|
|
876
875
|
hook_event_name: 'PermissionRequest';
|
|
@@ -1147,6 +1146,17 @@ export declare type RewindFilesResult = {
|
|
|
1147
1146
|
deletions?: number;
|
|
1148
1147
|
};
|
|
1149
1148
|
|
|
1149
|
+
export declare type SandboxFilesystemConfig = NonNullable<z.infer<typeof SandboxFilesystemConfigSchema>>;
|
|
1150
|
+
|
|
1151
|
+
/**
|
|
1152
|
+
* Filesystem configuration schema for sandbox.
|
|
1153
|
+
*/
|
|
1154
|
+
declare const SandboxFilesystemConfigSchema: z.ZodOptional<z.ZodObject<{
|
|
1155
|
+
allowWrite: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1156
|
+
denyWrite: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1157
|
+
denyRead: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1158
|
+
}, z.core.$strip>>;
|
|
1159
|
+
|
|
1150
1160
|
export declare type SandboxIgnoreViolations = NonNullable<SandboxSettings['ignoreViolations']>;
|
|
1151
1161
|
|
|
1152
1162
|
export declare type SandboxNetworkConfig = NonNullable<z.infer<typeof SandboxNetworkConfigSchema>>;
|
|
@@ -1182,6 +1192,11 @@ declare const SandboxSettingsSchema: z.ZodObject<{
|
|
|
1182
1192
|
httpProxyPort: z.ZodOptional<z.ZodNumber>;
|
|
1183
1193
|
socksProxyPort: z.ZodOptional<z.ZodNumber>;
|
|
1184
1194
|
}, z.core.$strip>>;
|
|
1195
|
+
filesystem: z.ZodOptional<z.ZodObject<{
|
|
1196
|
+
allowWrite: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1197
|
+
denyWrite: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1198
|
+
denyRead: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1199
|
+
}, z.core.$strip>>;
|
|
1185
1200
|
ignoreViolations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>>;
|
|
1186
1201
|
enableWeakerNestedSandbox: z.ZodOptional<z.ZodBoolean>;
|
|
1187
1202
|
excludedCommands: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -1367,7 +1382,7 @@ declare type SDKControlSetModelRequest = {
|
|
|
1367
1382
|
declare type SDKControlSetPermissionModeRequest = {
|
|
1368
1383
|
subtype: 'set_permission_mode';
|
|
1369
1384
|
/**
|
|
1370
|
-
* Permission mode for controlling how tool executions are handled. 'default' - Standard behavior, prompts for dangerous operations. 'acceptEdits' - Auto-accept file edit operations. 'bypassPermissions' - Bypass all permission checks (requires allowDangerouslySkipPermissions). 'plan' - Planning mode, no actual tool execution. '
|
|
1385
|
+
* Permission mode for controlling how tool executions are handled. 'default' - Standard behavior, prompts for dangerous operations. 'acceptEdits' - Auto-accept file edit operations. 'bypassPermissions' - Bypass all permission checks (requires allowDangerouslySkipPermissions). 'plan' - Planning mode, no actual tool execution. 'dontAsk' - Don't prompt for permissions, deny if not pre-approved.
|
|
1371
1386
|
*/
|
|
1372
1387
|
mode: coreTypes.PermissionMode;
|
|
1373
1388
|
};
|
|
@@ -1473,7 +1488,7 @@ export declare type SdkMcpToolDefinition<Schema extends AnyZodRawShape = AnyZodR
|
|
|
1473
1488
|
handler: (args: InferShape<Schema>, extra: unknown) => Promise<CallToolResult>;
|
|
1474
1489
|
};
|
|
1475
1490
|
|
|
1476
|
-
export declare type SDKMessage = SDKAssistantMessage | SDKUserMessage | SDKUserMessageReplay | SDKResultMessage | SDKSystemMessage | SDKPartialAssistantMessage | SDKCompactBoundaryMessage | SDKStatusMessage | SDKHookStartedMessage | SDKHookProgressMessage | SDKHookResponseMessage | SDKToolProgressMessage | SDKAuthStatusMessage | SDKTaskNotificationMessage | SDKFilesPersistedEvent | SDKToolUseSummaryMessage;
|
|
1491
|
+
export declare type SDKMessage = SDKAssistantMessage | SDKUserMessage | SDKUserMessageReplay | SDKResultMessage | SDKSystemMessage | SDKPartialAssistantMessage | SDKCompactBoundaryMessage | SDKStatusMessage | SDKHookStartedMessage | SDKHookProgressMessage | SDKHookResponseMessage | SDKToolProgressMessage | SDKAuthStatusMessage | SDKTaskNotificationMessage | SDKTaskStartedMessage | SDKFilesPersistedEvent | SDKToolUseSummaryMessage | SDKRateLimitEvent;
|
|
1477
1492
|
|
|
1478
1493
|
export declare type SDKPartialAssistantMessage = {
|
|
1479
1494
|
type: 'stream_event';
|
|
@@ -1642,7 +1657,7 @@ export declare type SDKSystemMessage = {
|
|
|
1642
1657
|
}[];
|
|
1643
1658
|
model: string;
|
|
1644
1659
|
/**
|
|
1645
|
-
* Permission mode for controlling how tool executions are handled. 'default' - Standard behavior, prompts for dangerous operations. 'acceptEdits' - Auto-accept file edit operations. 'bypassPermissions' - Bypass all permission checks (requires allowDangerouslySkipPermissions). 'plan' - Planning mode, no actual tool execution. '
|
|
1660
|
+
* Permission mode for controlling how tool executions are handled. 'default' - Standard behavior, prompts for dangerous operations. 'acceptEdits' - Auto-accept file edit operations. 'bypassPermissions' - Bypass all permission checks (requires allowDangerouslySkipPermissions). 'plan' - Planning mode, no actual tool execution. 'dontAsk' - Don't prompt for permissions, deny if not pre-approved.
|
|
1646
1661
|
*/
|
|
1647
1662
|
permissionMode: PermissionMode;
|
|
1648
1663
|
slash_commands: string[];
|
|
@@ -1660,6 +1675,7 @@ export declare type SDKTaskNotificationMessage = {
|
|
|
1660
1675
|
type: 'system';
|
|
1661
1676
|
subtype: 'task_notification';
|
|
1662
1677
|
task_id: string;
|
|
1678
|
+
tool_use_id?: string;
|
|
1663
1679
|
status: 'completed' | 'failed' | 'stopped';
|
|
1664
1680
|
output_file: string;
|
|
1665
1681
|
summary: string;
|
|
@@ -1667,12 +1683,24 @@ export declare type SDKTaskNotificationMessage = {
|
|
|
1667
1683
|
session_id: string;
|
|
1668
1684
|
};
|
|
1669
1685
|
|
|
1686
|
+
export declare type SDKTaskStartedMessage = {
|
|
1687
|
+
type: 'system';
|
|
1688
|
+
subtype: 'task_started';
|
|
1689
|
+
task_id: string;
|
|
1690
|
+
tool_use_id?: string;
|
|
1691
|
+
description: string;
|
|
1692
|
+
task_type?: string;
|
|
1693
|
+
uuid: UUID;
|
|
1694
|
+
session_id: string;
|
|
1695
|
+
};
|
|
1696
|
+
|
|
1670
1697
|
export declare type SDKToolProgressMessage = {
|
|
1671
1698
|
type: 'tool_progress';
|
|
1672
1699
|
tool_use_id: string;
|
|
1673
1700
|
tool_name: string;
|
|
1674
1701
|
parent_tool_use_id: string | null;
|
|
1675
1702
|
elapsed_time_seconds: number;
|
|
1703
|
+
task_id?: string;
|
|
1676
1704
|
uuid: UUID;
|
|
1677
1705
|
session_id: string;
|
|
1678
1706
|
};
|
|
@@ -1822,6 +1850,10 @@ declare type StdoutMessage = coreTypes.SDKMessage | coreTypes.SDKStreamlinedText
|
|
|
1822
1850
|
export declare type StopHookInput = BaseHookInput & {
|
|
1823
1851
|
hook_event_name: 'Stop';
|
|
1824
1852
|
stop_hook_active: boolean;
|
|
1853
|
+
/**
|
|
1854
|
+
* Text content of the last assistant message before stopping. Avoids the need to read and parse the transcript file.
|
|
1855
|
+
*/
|
|
1856
|
+
last_assistant_message?: string;
|
|
1825
1857
|
};
|
|
1826
1858
|
|
|
1827
1859
|
export declare type SubagentStartHookInput = BaseHookInput & {
|
|
@@ -1841,6 +1873,10 @@ export declare type SubagentStopHookInput = BaseHookInput & {
|
|
|
1841
1873
|
agent_id: string;
|
|
1842
1874
|
agent_transcript_path: string;
|
|
1843
1875
|
agent_type: string;
|
|
1876
|
+
/**
|
|
1877
|
+
* Text content of the last assistant message before stopping. Avoids the need to read and parse the transcript file.
|
|
1878
|
+
*/
|
|
1879
|
+
last_assistant_message?: string;
|
|
1844
1880
|
};
|
|
1845
1881
|
|
|
1846
1882
|
export declare type SyncHookJSONOutput = {
|
|
@@ -1868,6 +1904,33 @@ export declare type TeammateIdleHookInput = BaseHookInput & {
|
|
|
1868
1904
|
team_name: string;
|
|
1869
1905
|
};
|
|
1870
1906
|
|
|
1907
|
+
/**
|
|
1908
|
+
* Claude decides when and how much to think (Opus 4.6+).
|
|
1909
|
+
*/
|
|
1910
|
+
export declare type ThinkingAdaptive = {
|
|
1911
|
+
type: 'adaptive';
|
|
1912
|
+
};
|
|
1913
|
+
|
|
1914
|
+
/**
|
|
1915
|
+
* Controls Claude's thinking/reasoning behavior. When set, takes precedence over the deprecated maxThinkingTokens.
|
|
1916
|
+
*/
|
|
1917
|
+
export declare type ThinkingConfig = ThinkingAdaptive | ThinkingEnabled | ThinkingDisabled;
|
|
1918
|
+
|
|
1919
|
+
/**
|
|
1920
|
+
* No extended thinking
|
|
1921
|
+
*/
|
|
1922
|
+
export declare type ThinkingDisabled = {
|
|
1923
|
+
type: 'disabled';
|
|
1924
|
+
};
|
|
1925
|
+
|
|
1926
|
+
/**
|
|
1927
|
+
* Fixed thinking token budget (older models)
|
|
1928
|
+
*/
|
|
1929
|
+
export declare type ThinkingEnabled = {
|
|
1930
|
+
type: 'enabled';
|
|
1931
|
+
budgetTokens?: number;
|
|
1932
|
+
};
|
|
1933
|
+
|
|
1871
1934
|
export declare function tool<Schema extends AnyZodRawShape>(_name: string, _description: string, _inputSchema: Schema, _handler: (args: InferShape<Schema>, extra: unknown) => Promise<CallToolResult>, _extras?: {
|
|
1872
1935
|
annotations?: ToolAnnotations;
|
|
1873
1936
|
}): SdkMcpToolDefinition<Schema>;
|
|
@@ -1917,7 +1980,7 @@ export declare function unstable_v2_createSession(_options: SDKSessionOptions):
|
|
|
1917
1980
|
* @example
|
|
1918
1981
|
* ```typescript
|
|
1919
1982
|
* const result = await unstable_v2_prompt("What files are here?", {
|
|
1920
|
-
* model: 'claude-sonnet-4-
|
|
1983
|
+
* model: 'claude-sonnet-4-6'
|
|
1921
1984
|
* })
|
|
1922
1985
|
* ```
|
|
1923
1986
|
*/
|