@anthropic-ai/claude-agent-sdk 0.1.33 → 0.1.35
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 +1636 -1504
- package/package.json +1 -1
- package/sdk.mjs +10 -4
package/package.json
CHANGED
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.35
|
|
5
5
|
|
|
6
6
|
// Want to see the unminified source? We're hiring!
|
|
7
7
|
// https://job-boards.greenhouse.io/anthropic/jobs/4816199008
|
|
@@ -7369,7 +7369,10 @@ var maxOutputTokensValidator = {
|
|
|
7369
7369
|
|
|
7370
7370
|
// ../src/bootstrap/state.ts
|
|
7371
7371
|
function getInitialState() {
|
|
7372
|
-
|
|
7372
|
+
let resolvedCwd = "";
|
|
7373
|
+
if (typeof process !== "undefined" && typeof process.cwd === "function") {
|
|
7374
|
+
resolvedCwd = realpathSync2(cwd());
|
|
7375
|
+
}
|
|
7373
7376
|
return {
|
|
7374
7377
|
originalCwd: resolvedCwd,
|
|
7375
7378
|
totalCostUSD: 0,
|
|
@@ -7520,7 +7523,10 @@ class Query {
|
|
|
7520
7523
|
this.canUseTool = canUseTool;
|
|
7521
7524
|
this.hooks = hooks;
|
|
7522
7525
|
this.abortController = abortController;
|
|
7523
|
-
this.streamCloseTimeout =
|
|
7526
|
+
this.streamCloseTimeout = 60000;
|
|
7527
|
+
if (typeof process !== "undefined" && process.env?.CLAUDE_CODE_STREAM_CLOSE_TIMEOUT) {
|
|
7528
|
+
this.streamCloseTimeout = parseInt(process.env.CLAUDE_CODE_STREAM_CLOSE_TIMEOUT);
|
|
7529
|
+
}
|
|
7524
7530
|
for (const [name, server] of sdkMcpServers) {
|
|
7525
7531
|
const sdkTransport = new SdkControlServerTransport((message) => this.sendMcpServerMessageToCli(name, message));
|
|
7526
7532
|
this.sdkMcpTransports.set(name, sdkTransport);
|
|
@@ -14770,7 +14776,7 @@ function query({
|
|
|
14770
14776
|
const dirname2 = join3(filename, "..");
|
|
14771
14777
|
pathToClaudeCodeExecutable = join3(dirname2, "cli.js");
|
|
14772
14778
|
}
|
|
14773
|
-
process.env.CLAUDE_AGENT_SDK_VERSION = "0.1.
|
|
14779
|
+
process.env.CLAUDE_AGENT_SDK_VERSION = "0.1.35";
|
|
14774
14780
|
const {
|
|
14775
14781
|
abortController = createAbortController(),
|
|
14776
14782
|
additionalDirectories = [],
|