@anthropic-ai/claude-agent-sdk 0.2.7 → 0.2.8
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 +2425 -2391
- package/package.json +2 -2
- package/sdk.d.ts +1 -0
- package/sdk.mjs +10 -4
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.8",
|
|
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.
|
|
40
|
+
"claudeCodeVersion": "2.1.8"
|
|
41
41
|
}
|
package/sdk.d.ts
CHANGED
|
@@ -1393,6 +1393,7 @@ export declare type SessionStartHookInput = BaseHookInput & {
|
|
|
1393
1393
|
hook_event_name: 'SessionStart';
|
|
1394
1394
|
source: 'startup' | 'resume' | 'clear' | 'compact';
|
|
1395
1395
|
agent_type?: string;
|
|
1396
|
+
model?: string;
|
|
1396
1397
|
};
|
|
1397
1398
|
|
|
1398
1399
|
export declare type SessionStartHookSpecificOutput = {
|
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://code.claude.com/docs/en/legal-and-compliance.
|
|
3
3
|
|
|
4
|
-
// Version: 0.2.
|
|
4
|
+
// Version: 0.2.8
|
|
5
5
|
|
|
6
6
|
// Want to see the unminified source? We're hiring!
|
|
7
7
|
// https://job-boards.greenhouse.io/anthropic/jobs/4816199008
|
|
@@ -7156,6 +7156,7 @@ function getInitialState() {
|
|
|
7156
7156
|
codeEditToolDecisionCounter: null,
|
|
7157
7157
|
activeTimeCounter: null,
|
|
7158
7158
|
sessionId: randomUUID(),
|
|
7159
|
+
parentSessionId: undefined,
|
|
7159
7160
|
loggerProvider: null,
|
|
7160
7161
|
eventLogger: null,
|
|
7161
7162
|
meterProvider: null,
|
|
@@ -7901,8 +7902,13 @@ class ProcessTransport {
|
|
|
7901
7902
|
try {
|
|
7902
7903
|
for await (const line of rl) {
|
|
7903
7904
|
if (line.trim()) {
|
|
7904
|
-
|
|
7905
|
-
|
|
7905
|
+
try {
|
|
7906
|
+
const message = jsonParse(line);
|
|
7907
|
+
yield message;
|
|
7908
|
+
} catch (_parseError) {
|
|
7909
|
+
logForSdkDebugging(`Non-JSON stdout: ${line}`);
|
|
7910
|
+
throw new Error(`CLI output was not valid JSON. ` + `This may indicate an error during startup. ` + `Output: ${line.slice(0, 200)}${line.length > 200 ? "..." : ""}`);
|
|
7911
|
+
}
|
|
7906
7912
|
}
|
|
7907
7913
|
}
|
|
7908
7914
|
await this.waitForExit();
|
|
@@ -21315,7 +21321,7 @@ function query({
|
|
|
21315
21321
|
const dirname2 = join5(filename, "..");
|
|
21316
21322
|
pathToClaudeCodeExecutable = join5(dirname2, "cli.js");
|
|
21317
21323
|
}
|
|
21318
|
-
process.env.CLAUDE_AGENT_SDK_VERSION = "0.2.
|
|
21324
|
+
process.env.CLAUDE_AGENT_SDK_VERSION = "0.2.8";
|
|
21319
21325
|
const {
|
|
21320
21326
|
abortController = createAbortController(),
|
|
21321
21327
|
additionalDirectories = [],
|