@deepstrike/sdk 0.2.0 → 0.2.2

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.
@@ -50,6 +50,8 @@ export class DeepSeekProvider extends OpenAIChatProvider {
50
50
  if (!choice)
51
51
  continue;
52
52
  const delta = choice.delta;
53
+ if (!delta)
54
+ continue;
53
55
  if (exposeReasoning && delta.reasoning_content) {
54
56
  yield { type: "thinking_delta", delta: delta.reasoning_content };
55
57
  }
@@ -105,6 +105,8 @@ export class OpenAIChatProvider {
105
105
  if (!choice)
106
106
  continue;
107
107
  const delta = choice.delta;
108
+ if (!delta)
109
+ continue;
108
110
  if (delta.reasoning_content) {
109
111
  accumulatedReasoning += delta.reasoning_content;
110
112
  yield { type: "thinking_delta", delta: delta.reasoning_content };
@@ -102,6 +102,8 @@ export class QwenProvider {
102
102
  if (!choice)
103
103
  continue;
104
104
  const delta = choice.delta;
105
+ if (!delta)
106
+ continue;
105
107
  if (delta.reasoning_content) {
106
108
  reasoningContent += String(delta.reasoning_content);
107
109
  yield { type: "thinking_delta", delta: delta.reasoning_content };
@@ -81,7 +81,15 @@ export class LocalExecutionPlane {
81
81
  const task = active[index];
82
82
  if (result.done) {
83
83
  const r = result.value;
84
- yield { type: "tool_result", callId: r.callId, name: task.call.name, content: r.output, isError: r.isError };
84
+ yield {
85
+ type: "tool_result",
86
+ callId: r.callId,
87
+ name: task.call.name,
88
+ content: r.output,
89
+ isError: r.isError,
90
+ isFatal: r.isFatal,
91
+ errorKind: r.errorKind,
92
+ };
85
93
  active.splice(index, 1);
86
94
  continue;
87
95
  }
@@ -142,7 +150,13 @@ export class LocalExecutionPlane {
142
150
  return { callId: call.id, output, isError: false };
143
151
  }
144
152
  catch (err) {
145
- return { callId: call.id, output: String(err), isError: true };
153
+ return {
154
+ callId: call.id,
155
+ output: String(err),
156
+ isError: true,
157
+ isFatal: Boolean(err?.isFatal),
158
+ errorKind: err?.errorKind,
159
+ };
146
160
  }
147
161
  }
148
162
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deepstrike/sdk",
3
- "version": "0.2.0",
3
+ "version": "0.2.2",
4
4
  "description": "DeepStrike Node.js SDK",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -17,7 +17,7 @@
17
17
  },
18
18
  "dependencies": {
19
19
  "@anthropic-ai/sdk": "^0.39.0",
20
- "@deepstrike/core": "0.2.0",
20
+ "@deepstrike/core": "0.2.2",
21
21
  "@google/generative-ai": "^0.24.1",
22
22
  "openai": "^4.77.0"
23
23
  },