@anthropic-ai/claude-agent-sdk 0.1.30 → 0.1.31
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 +1011 -998
- package/package.json +1 -1
- package/sdk-tools.d.ts +6 -2
- package/sdk.d.ts +9 -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
|
@@ -358,6 +358,14 @@ export type SDKCompactBoundaryMessage = {
|
|
|
358
358
|
uuid: UUID;
|
|
359
359
|
session_id: string;
|
|
360
360
|
};
|
|
361
|
+
export type SDKStatus = 'compacting' | null;
|
|
362
|
+
export type SDKStatusMessage = {
|
|
363
|
+
type: 'system';
|
|
364
|
+
subtype: 'status';
|
|
365
|
+
status: SDKStatus;
|
|
366
|
+
uuid: UUID;
|
|
367
|
+
session_id: string;
|
|
368
|
+
};
|
|
361
369
|
export type SDKHookResponseMessage = {
|
|
362
370
|
type: 'system';
|
|
363
371
|
subtype: 'hook_response';
|
|
@@ -386,7 +394,7 @@ export type SDKAuthStatusMessage = {
|
|
|
386
394
|
uuid: UUID;
|
|
387
395
|
session_id: string;
|
|
388
396
|
};
|
|
389
|
-
export type SDKMessage = SDKAssistantMessage | SDKUserMessage | SDKUserMessageReplay | SDKResultMessage | SDKSystemMessage | SDKPartialAssistantMessage | SDKCompactBoundaryMessage | SDKHookResponseMessage | SDKToolProgressMessage | SDKAuthStatusMessage;
|
|
397
|
+
export type SDKMessage = SDKAssistantMessage | SDKUserMessage | SDKUserMessageReplay | SDKResultMessage | SDKSystemMessage | SDKPartialAssistantMessage | SDKCompactBoundaryMessage | SDKStatusMessage | SDKHookResponseMessage | SDKToolProgressMessage | SDKAuthStatusMessage;
|
|
390
398
|
export interface Query extends AsyncGenerator<SDKMessage, void> {
|
|
391
399
|
/**
|
|
392
400
|
* 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.31
|
|
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.31";
|
|
14774
14774
|
const {
|
|
14775
14775
|
abortController = createAbortController(),
|
|
14776
14776
|
additionalDirectories = [],
|