@tangle-network/sdk-provider-claude-code 0.6.68 → 0.6.70
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.d.mts +10 -1
- package/dist/index.mjs +16 -8
- package/package.json +6 -6
package/dist/index.d.mts
CHANGED
|
@@ -133,6 +133,15 @@ interface ClaudeCodeContentBlockStop {
|
|
|
133
133
|
type: "content_block_stop";
|
|
134
134
|
index: number;
|
|
135
135
|
}
|
|
136
|
+
/** One Messages stream event, as `--include-partial-messages` prints it. */
|
|
137
|
+
interface ClaudeCodePartialEvent {
|
|
138
|
+
type: "stream_event";
|
|
139
|
+
event: {
|
|
140
|
+
type: string;
|
|
141
|
+
};
|
|
142
|
+
/** Set on a subagent's event; null on the main conversation's. */
|
|
143
|
+
parent_tool_use_id?: string | null;
|
|
144
|
+
}
|
|
136
145
|
/**
|
|
137
146
|
* Tool use event - tool invocation.
|
|
138
147
|
*/
|
|
@@ -254,7 +263,7 @@ interface ClaudeCodeAssistantEvent {
|
|
|
254
263
|
/**
|
|
255
264
|
* Union of all Claude Code CLI events.
|
|
256
265
|
*/
|
|
257
|
-
type ClaudeCodeEvent = ClaudeCodeInitEvent | ClaudeCodeSystemEvent | ClaudeCodeAssistantEvent | ClaudeCodeUserEvent | ClaudeCodeContentBlockStart | ClaudeCodeContentBlockDelta | ClaudeCodeContentBlockStop | ClaudeCodeToolUseEvent | ClaudeCodeToolResultEvent | ClaudeCodeResultEvent | ClaudeCodeErrorEvent | ClaudeCodeRateLimitEvent;
|
|
266
|
+
type ClaudeCodeEvent = ClaudeCodeInitEvent | ClaudeCodeSystemEvent | ClaudeCodeAssistantEvent | ClaudeCodeUserEvent | ClaudeCodeContentBlockStart | ClaudeCodeContentBlockDelta | ClaudeCodeContentBlockStop | ClaudeCodePartialEvent | ClaudeCodeToolUseEvent | ClaudeCodeToolResultEvent | ClaudeCodeResultEvent | ClaudeCodeErrorEvent | ClaudeCodeRateLimitEvent;
|
|
258
267
|
/** Subscription rate-limit state, emitted when it changes (seconds since epoch). */
|
|
259
268
|
interface ClaudeCodeRateLimitEvent {
|
|
260
269
|
type: "rate_limit_event";
|
package/dist/index.mjs
CHANGED
|
@@ -749,10 +749,13 @@ function grantToPermissionResult(grant, toolName, input) {
|
|
|
749
749
|
const DEFAULT_MODEL = "claude-opus-5-5";
|
|
750
750
|
/** Output, model, session, prompt and permission-mode flags of one turn. */
|
|
751
751
|
function claudeSessionArgs(params, planMode, routesPermissions) {
|
|
752
|
-
const args = [
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
752
|
+
const args = [
|
|
753
|
+
"--print",
|
|
754
|
+
"--output-format",
|
|
755
|
+
"stream-json",
|
|
756
|
+
"--verbose",
|
|
757
|
+
"--include-partial-messages"
|
|
758
|
+
];
|
|
756
759
|
const authMode = params.config.authMode ?? (params.config.apiKey ? "api-key" : "oauth");
|
|
757
760
|
const model = params.model ?? params.config.model ?? (authMode === "api-key" ? DEFAULT_MODEL : void 0);
|
|
758
761
|
if (model) args.push("--model", normalizeExplicitClaudeModel(model, authMode));
|
|
@@ -1346,6 +1349,7 @@ var ClaudeEventAdapter = class extends ClaudeWarmAdapter {
|
|
|
1346
1349
|
case "content_block_start": return this.mapContentBlockStart(event, state);
|
|
1347
1350
|
case "content_block_delta": return this.mapContentBlockDelta(event, state);
|
|
1348
1351
|
case "content_block_stop": return this.mapContentBlockStop(event, state);
|
|
1352
|
+
case "stream_event": return event.parent_tool_use_id || !event.event.type.startsWith("content_block_") ? [] : this.mapEventToStreamEvents(event.event, state);
|
|
1349
1353
|
case "tool_use": return toolStart(state, event);
|
|
1350
1354
|
case "tool_result": return this.mapToolResultEvent(event, state);
|
|
1351
1355
|
case "result": return this.mapResultEvent(event, state);
|
|
@@ -1434,10 +1438,14 @@ var ClaudeEventAdapter = class extends ClaudeWarmAdapter {
|
|
|
1434
1438
|
type: "model-processing",
|
|
1435
1439
|
phase: "thinking"
|
|
1436
1440
|
});
|
|
1437
|
-
else if (block.type === "text")
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
+
else if (block.type === "text") {
|
|
1442
|
+
state.textBuffer = "";
|
|
1443
|
+
state.textPartFrom = 0;
|
|
1444
|
+
events.push({
|
|
1445
|
+
type: "model-processing",
|
|
1446
|
+
phase: "generating"
|
|
1447
|
+
});
|
|
1448
|
+
}
|
|
1441
1449
|
return events;
|
|
1442
1450
|
}
|
|
1443
1451
|
mapContentBlockDelta(event, state) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tangle-network/sdk-provider-claude-code",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.70",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -17,10 +17,10 @@
|
|
|
17
17
|
"dependencies": {
|
|
18
18
|
"@modelcontextprotocol/sdk": "^1.32.2",
|
|
19
19
|
"@tangle-network/agent-interface": "^5.10.23",
|
|
20
|
-
"@tangle-network/agent-profile-materialize": "1.1.
|
|
20
|
+
"@tangle-network/agent-profile-materialize": "1.1.117",
|
|
21
21
|
"@tangle-network/sdk-cli-runner": "0.3.12",
|
|
22
|
-
"@tangle-network/sdk-provider-cli-base": "0.13.
|
|
23
|
-
"@tangle-network/sdk-session-persistence": "0.7.
|
|
22
|
+
"@tangle-network/sdk-provider-cli-base": "0.13.93",
|
|
23
|
+
"@tangle-network/sdk-session-persistence": "0.7.11",
|
|
24
24
|
"zod": "4.6.7"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
@@ -35,8 +35,8 @@
|
|
|
35
35
|
"registry": "https://registry.npmjs.org"
|
|
36
36
|
},
|
|
37
37
|
"tangleRelease": {
|
|
38
|
-
"sourceSha": "
|
|
39
|
-
"mergedAt": "2026-11-
|
|
38
|
+
"sourceSha": "a464531c96150a11720e09de24261ae3d3394f0a",
|
|
39
|
+
"mergedAt": "2026-11-15T17:19:41-08:00"
|
|
40
40
|
},
|
|
41
41
|
"scripts": {
|
|
42
42
|
"build": "tsdown",
|