@anthropic-ai/claude-agent-sdk 0.1.53 → 0.1.55
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/cli.js +1265 -1248
- package/package.json +1 -1
- package/sdk.d.ts +26 -2
- package/sdk.mjs +2 -2
- package/tree-sitter-bash.wasm +0 -0
- package/tree-sitter.wasm +0 -0
package/package.json
CHANGED
package/sdk.d.ts
CHANGED
|
@@ -52,7 +52,7 @@ export type McpSdkServerConfigWithInstance = McpSdkServerConfig & {
|
|
|
52
52
|
};
|
|
53
53
|
export type McpServerConfig = McpStdioServerConfig | McpSSEServerConfig | McpHttpServerConfig | McpSdkServerConfigWithInstance;
|
|
54
54
|
export type McpServerConfigForProcessTransport = McpStdioServerConfig | McpSSEServerConfig | McpHttpServerConfig | McpSdkServerConfig;
|
|
55
|
-
type PermissionUpdateDestination = 'userSettings' | 'projectSettings' | 'localSettings' | 'session';
|
|
55
|
+
type PermissionUpdateDestination = 'userSettings' | 'projectSettings' | 'localSettings' | 'session' | 'cliArg';
|
|
56
56
|
export type PermissionBehavior = 'allow' | 'deny' | 'ask';
|
|
57
57
|
export type PermissionUpdate = {
|
|
58
58
|
type: 'addRules';
|
|
@@ -188,6 +188,7 @@ export type PermissionRequestHookInput = BaseHookInput & {
|
|
|
188
188
|
hook_event_name: 'PermissionRequest';
|
|
189
189
|
tool_name: string;
|
|
190
190
|
tool_input: unknown;
|
|
191
|
+
permission_suggestions?: PermissionUpdate[];
|
|
191
192
|
};
|
|
192
193
|
export type PostToolUseHookInput = BaseHookInput & {
|
|
193
194
|
hook_event_name: 'PostToolUse';
|
|
@@ -271,6 +272,7 @@ export type SyncHookJSONOutput = {
|
|
|
271
272
|
decision: {
|
|
272
273
|
behavior: 'allow';
|
|
273
274
|
updatedInput?: Record<string, unknown>;
|
|
275
|
+
updatedPermissions?: PermissionUpdate[];
|
|
274
276
|
} | {
|
|
275
277
|
behavior: 'deny';
|
|
276
278
|
message?: string;
|
|
@@ -279,7 +281,7 @@ export type SyncHookJSONOutput = {
|
|
|
279
281
|
};
|
|
280
282
|
};
|
|
281
283
|
export type HookJSONOutput = AsyncHookJSONOutput | SyncHookJSONOutput;
|
|
282
|
-
export type PermissionMode = 'default' | 'acceptEdits' | 'bypassPermissions' | 'plan';
|
|
284
|
+
export type PermissionMode = 'default' | 'acceptEdits' | 'bypassPermissions' | 'plan' | 'dontAsk';
|
|
283
285
|
export type SlashCommand = {
|
|
284
286
|
name: string;
|
|
285
287
|
description: string;
|
|
@@ -621,4 +623,26 @@ export declare function query(_params: {
|
|
|
621
623
|
prompt: string | AsyncIterable<SDKUserMessage>;
|
|
622
624
|
options?: Options;
|
|
623
625
|
}): Query;
|
|
626
|
+
/**
|
|
627
|
+
* V2 API - UNSTABLE
|
|
628
|
+
* Create a persistent session for multi-turn conversations
|
|
629
|
+
*/
|
|
630
|
+
export declare function unstable_v2_createSession(_options: SDKSessionOptions): SDKSession;
|
|
631
|
+
/**
|
|
632
|
+
* V2 API - UNSTABLE
|
|
633
|
+
* Resume an existing session by ID
|
|
634
|
+
*/
|
|
635
|
+
export declare function unstable_v2_resumeSession(_sessionId: string, _options: SDKSessionOptions): SDKSession;
|
|
636
|
+
/**
|
|
637
|
+
* V2 API - UNSTABLE
|
|
638
|
+
* One-shot convenience function for single prompts
|
|
639
|
+
*
|
|
640
|
+
* @example
|
|
641
|
+
* ```typescript
|
|
642
|
+
* const result = await unstable_v2_prompt("What files are here?", {
|
|
643
|
+
* model: 'claude-sonnet-4-5-20250929'
|
|
644
|
+
* })
|
|
645
|
+
* ```
|
|
646
|
+
*/
|
|
647
|
+
export declare function unstable_v2_prompt(_message: string, _options: SDKSessionOptions): Promise<SDKResultMessage>;
|
|
624
648
|
export {};
|
package/sdk.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
// (c) Anthropic PBC. All rights reserved. Use is subject to the Legal Agreements outlined here: https://docs.claude.com/en/docs/claude-code/legal-and-compliance.
|
|
3
3
|
|
|
4
|
-
// Version: 0.1.
|
|
4
|
+
// Version: 0.1.55
|
|
5
5
|
|
|
6
6
|
// Want to see the unminified source? We're hiring!
|
|
7
7
|
// https://job-boards.greenhouse.io/anthropic/jobs/4816199008
|
|
@@ -15075,7 +15075,7 @@ function query({
|
|
|
15075
15075
|
const dirname2 = join5(filename, "..");
|
|
15076
15076
|
pathToClaudeCodeExecutable = join5(dirname2, "cli.js");
|
|
15077
15077
|
}
|
|
15078
|
-
process.env.CLAUDE_AGENT_SDK_VERSION = "0.1.
|
|
15078
|
+
process.env.CLAUDE_AGENT_SDK_VERSION = "0.1.55";
|
|
15079
15079
|
const {
|
|
15080
15080
|
abortController = createAbortController(),
|
|
15081
15081
|
additionalDirectories = [],
|
|
Binary file
|
package/tree-sitter.wasm
ADDED
|
Binary file
|