@anthropic-ai/claude-agent-sdk 0.1.30 → 0.1.33
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 +2080 -1997
- package/package.json +1 -1
- package/sdk-tools.d.ts +6 -2
- package/sdk.d.ts +10 -1
- package/sdk.mjs +2 -2
package/package.json
CHANGED
package/sdk-tools.d.ts
CHANGED
|
@@ -182,7 +182,7 @@ export interface GrepInput {
|
|
|
182
182
|
*/
|
|
183
183
|
"-C"?: number;
|
|
184
184
|
/**
|
|
185
|
-
* Show line numbers in output (rg -n). Requires output_mode: "content", ignored otherwise.
|
|
185
|
+
* Show line numbers in output (rg -n). Requires output_mode: "content", ignored otherwise. Defaults to true.
|
|
186
186
|
*/
|
|
187
187
|
"-n"?: boolean;
|
|
188
188
|
/**
|
|
@@ -194,9 +194,13 @@ export interface GrepInput {
|
|
|
194
194
|
*/
|
|
195
195
|
type?: string;
|
|
196
196
|
/**
|
|
197
|
-
* Limit output to first N lines/entries, equivalent to "| head -N". Works across all output modes: content (limits output lines), files_with_matches (limits file paths), count (limits count entries).
|
|
197
|
+
* Limit output to first N lines/entries, equivalent to "| head -N". Works across all output modes: content (limits output lines), files_with_matches (limits file paths), count (limits count entries). Defaults based on "cap" experiment value: 0 (unlimited), 20, or 100.
|
|
198
198
|
*/
|
|
199
199
|
head_limit?: number;
|
|
200
|
+
/**
|
|
201
|
+
* Skip first N lines/entries before applying head_limit, equivalent to "| tail -n +N | head -N". Works across all output modes. Defaults to 0.
|
|
202
|
+
*/
|
|
203
|
+
offset?: number;
|
|
200
204
|
/**
|
|
201
205
|
* Enable multiline mode where . matches newlines and patterns can span lines (rg -U --multiline-dotall). Default: false.
|
|
202
206
|
*/
|
package/sdk.d.ts
CHANGED
|
@@ -219,6 +219,7 @@ export type SyncHookJSONOutput = {
|
|
|
219
219
|
} | {
|
|
220
220
|
hookEventName: 'PostToolUse';
|
|
221
221
|
additionalContext?: string;
|
|
222
|
+
updatedMCPToolOutput?: unknown;
|
|
222
223
|
};
|
|
223
224
|
};
|
|
224
225
|
export type HookJSONOutput = AsyncHookJSONOutput | SyncHookJSONOutput;
|
|
@@ -358,6 +359,14 @@ export type SDKCompactBoundaryMessage = {
|
|
|
358
359
|
uuid: UUID;
|
|
359
360
|
session_id: string;
|
|
360
361
|
};
|
|
362
|
+
export type SDKStatus = 'compacting' | null;
|
|
363
|
+
export type SDKStatusMessage = {
|
|
364
|
+
type: 'system';
|
|
365
|
+
subtype: 'status';
|
|
366
|
+
status: SDKStatus;
|
|
367
|
+
uuid: UUID;
|
|
368
|
+
session_id: string;
|
|
369
|
+
};
|
|
361
370
|
export type SDKHookResponseMessage = {
|
|
362
371
|
type: 'system';
|
|
363
372
|
subtype: 'hook_response';
|
|
@@ -386,7 +395,7 @@ export type SDKAuthStatusMessage = {
|
|
|
386
395
|
uuid: UUID;
|
|
387
396
|
session_id: string;
|
|
388
397
|
};
|
|
389
|
-
export type SDKMessage = SDKAssistantMessage | SDKUserMessage | SDKUserMessageReplay | SDKResultMessage | SDKSystemMessage | SDKPartialAssistantMessage | SDKCompactBoundaryMessage | SDKHookResponseMessage | SDKToolProgressMessage | SDKAuthStatusMessage;
|
|
398
|
+
export type SDKMessage = SDKAssistantMessage | SDKUserMessage | SDKUserMessageReplay | SDKResultMessage | SDKSystemMessage | SDKPartialAssistantMessage | SDKCompactBoundaryMessage | SDKStatusMessage | SDKHookResponseMessage | SDKToolProgressMessage | SDKAuthStatusMessage;
|
|
390
399
|
export interface Query extends AsyncGenerator<SDKMessage, void> {
|
|
391
400
|
/**
|
|
392
401
|
* Control Requests
|
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.33
|
|
5
5
|
|
|
6
6
|
// Want to see the unminified source? We're hiring!
|
|
7
7
|
// https://job-boards.greenhouse.io/anthropic/jobs/4816199008
|
|
@@ -14770,7 +14770,7 @@ function query({
|
|
|
14770
14770
|
const dirname2 = join3(filename, "..");
|
|
14771
14771
|
pathToClaudeCodeExecutable = join3(dirname2, "cli.js");
|
|
14772
14772
|
}
|
|
14773
|
-
process.env.CLAUDE_AGENT_SDK_VERSION = "0.1.
|
|
14773
|
+
process.env.CLAUDE_AGENT_SDK_VERSION = "0.1.33";
|
|
14774
14774
|
const {
|
|
14775
14775
|
abortController = createAbortController(),
|
|
14776
14776
|
additionalDirectories = [],
|