@ycodium-ai/agent-claude 0.2.4343 → 0.2.4351
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/dist/index.js +17 -5
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import * as NodePath20 from "node:path";
|
|
|
3
3
|
import { definePlugin } from "@ycodium-ai/plugin-api";
|
|
4
4
|
|
|
5
5
|
// ../../packages/plugin-api/src/version.ts
|
|
6
|
-
var PLUGIN_API_VERSION =
|
|
6
|
+
var PLUGIN_API_VERSION = 110;
|
|
7
7
|
|
|
8
8
|
// src/index.ts
|
|
9
9
|
import {
|
|
@@ -23494,7 +23494,8 @@ var claudeFailureCategory = (signals) => {
|
|
|
23494
23494
|
if (signals.assistantError === "rate_limit" || status === 429) {
|
|
23495
23495
|
return signals.quotaWindowRejected === true ? "quota" : "rate-limit";
|
|
23496
23496
|
}
|
|
23497
|
-
if (status === 524
|
|
23497
|
+
if (status === 524) return "transport";
|
|
23498
|
+
if (signals.establishedStreamExit === true) return "process-exit";
|
|
23498
23499
|
return void 0;
|
|
23499
23500
|
};
|
|
23500
23501
|
var failureCategoryField = (category) => category === void 0 ? {} : { failureCategory: category };
|
|
@@ -24526,6 +24527,16 @@ var makeClaudeModelCatalog = (deps) => {
|
|
|
24526
24527
|
};
|
|
24527
24528
|
};
|
|
24528
24529
|
|
|
24530
|
+
// src/streamExitMessage.ts
|
|
24531
|
+
import { lastStderrLines, redactStderrExcerpt } from "@ycodium-ai/plugin-api/process-stdin";
|
|
24532
|
+
var STREAM_EXIT_STDERR_MAX_CHARS = 800;
|
|
24533
|
+
function claudeStreamExitMessage(reason, stderrTail) {
|
|
24534
|
+
const excerpt = lastStderrLines(redactStderrExcerpt(stderrTail), STREAM_EXIT_STDERR_MAX_CHARS);
|
|
24535
|
+
return excerpt.length === 0 ? reason : `${reason}
|
|
24536
|
+
Claude stderr (last lines):
|
|
24537
|
+
${excerpt}`;
|
|
24538
|
+
}
|
|
24539
|
+
|
|
24529
24540
|
// src/adapter/sdkStream.ts
|
|
24530
24541
|
var makeSdkStream = (deps) => {
|
|
24531
24542
|
const {
|
|
@@ -24623,13 +24634,14 @@ var makeSdkStream = (deps) => {
|
|
|
24623
24634
|
await completeTurn(context, "interrupted", "Claude runtime interrupted.");
|
|
24624
24635
|
}
|
|
24625
24636
|
} else {
|
|
24626
|
-
const cliSaid = context.stderrTail.read();
|
|
24627
24637
|
const reason = cause instanceof Error ? cause.message : "Claude runtime stream failed.";
|
|
24628
|
-
const message =
|
|
24638
|
+
const message = claudeStreamExitMessage(reason, context.stderrTail.read());
|
|
24629
24639
|
const category = claudeFailureCategory({
|
|
24630
24640
|
establishedStreamExit: streamBroke && context.sessionEstablished
|
|
24631
24641
|
});
|
|
24632
|
-
|
|
24642
|
+
if (!context.turnState) {
|
|
24643
|
+
await emitRuntimeError(context, message, { cause: String(cause) }, category);
|
|
24644
|
+
}
|
|
24633
24645
|
await completeTurn(context, "failed", message, void 0, category);
|
|
24634
24646
|
}
|
|
24635
24647
|
} else if (context.turnState) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ycodium-ai/agent-claude",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.4351",
|
|
4
4
|
"description": "Claude executor: Claude Code CLI via @anthropic-ai/claude-agent-sdk.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ycodium",
|
|
@@ -24,9 +24,9 @@
|
|
|
24
24
|
"@types/node": "24.12.4",
|
|
25
25
|
"esbuild": "0.28.1",
|
|
26
26
|
"vite-plus": "0.2.2",
|
|
27
|
-
"@ycodium-ai/plugin-api": "0.2.
|
|
28
|
-
"ycodium-executor-testing": "0.0.0",
|
|
27
|
+
"@ycodium-ai/plugin-api": "0.2.4351",
|
|
29
28
|
"ycodium-composer-tokens": "0.0.0",
|
|
29
|
+
"ycodium-executor-testing": "0.0.0",
|
|
30
30
|
"ycodium-jsonl-stream": "0.0.0"
|
|
31
31
|
},
|
|
32
32
|
"ycodium": {
|