@deepstrike/sdk 0.1.11 → 0.1.13
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/README.md +30 -1
- package/dist/agent.d.ts +13 -10
- package/dist/agent.js +135 -14
- package/dist/harness/harness.d.ts +10 -0
- package/dist/harness/harness.js +15 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +1 -1
- package/dist/kernel.d.ts +5 -2
- package/dist/memory/protocols.d.ts +8 -1
- package/dist/providers/anthropic.d.ts +7 -3
- package/dist/providers/anthropic.js +36 -15
- package/dist/providers/base.d.ts +8 -4
- package/dist/providers/base.js +47 -38
- package/dist/providers/deepseek.d.ts +3 -2
- package/dist/providers/deepseek.js +42 -3
- package/dist/providers/gemini.d.ts +4 -3
- package/dist/providers/gemini.js +20 -17
- package/dist/providers/ollama.d.ts +5 -3
- package/dist/providers/ollama.js +50 -12
- package/dist/providers/openai-chat.d.ts +2 -2
- package/dist/providers/openai-chat.js +6 -4
- package/dist/providers/openai-responses.d.ts +6 -5
- package/dist/providers/openai-responses.js +21 -20
- package/dist/providers/openai.d.ts +4 -3
- package/dist/providers/openai.js +30 -6
- package/dist/providers/qwen.d.ts +5 -3
- package/dist/providers/qwen.js +47 -14
- package/dist/tools/index.d.ts +7 -2
- package/dist/tools/index.js +83 -0
- package/dist/types.d.ts +47 -2
- package/package.json +2 -2
package/dist/providers/openai.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import OpenAI from "openai";
|
|
2
2
|
import { withServerRuntimeGuard } from "../runtime/server.js";
|
|
3
|
-
import { CircuitBreaker } from "./base.js";
|
|
3
|
+
import { CircuitBreaker, omitExtensionKeys } from "./base.js";
|
|
4
4
|
import { OpenAIChatAdapter } from "./openai-chat.js";
|
|
5
5
|
export class OpenAIChatProvider {
|
|
6
6
|
model;
|
|
@@ -16,14 +16,15 @@ export class OpenAIChatProvider {
|
|
|
16
16
|
this.maxRetries = retry.maxRetries;
|
|
17
17
|
this.baseDelay = retry.baseDelay;
|
|
18
18
|
}
|
|
19
|
-
async complete(
|
|
19
|
+
async complete(context, tools, extensions) {
|
|
20
20
|
if (this.circuit.isOpen())
|
|
21
21
|
throw new Error("Circuit breaker open");
|
|
22
|
-
const msgs = this.chat.buildMessages(
|
|
22
|
+
const msgs = this.chat.buildMessages(context);
|
|
23
23
|
let lastErr;
|
|
24
24
|
for (let i = 0; i < this.maxRetries; i++) {
|
|
25
25
|
try {
|
|
26
26
|
const resp = await this.client.chat.completions.create({
|
|
27
|
+
...this.requestExtensions(extensions),
|
|
27
28
|
model: this.model,
|
|
28
29
|
messages: msgs,
|
|
29
30
|
...(tools.length ? { tools: this.chat.buildTools(tools) } : {}),
|
|
@@ -42,10 +43,12 @@ export class OpenAIChatProvider {
|
|
|
42
43
|
}
|
|
43
44
|
throw lastErr;
|
|
44
45
|
}
|
|
45
|
-
async *stream(
|
|
46
|
-
const msgs = this.chat.buildMessages(
|
|
46
|
+
async *stream(context, tools, extensions) {
|
|
47
|
+
const msgs = this.chat.buildMessages(context);
|
|
47
48
|
const toolCallBufs = {};
|
|
49
|
+
const emittedToolCallIndexes = new Set();
|
|
48
50
|
const stream = await this.client.chat.completions.create({
|
|
51
|
+
...this.requestExtensions(extensions),
|
|
49
52
|
model: this.model,
|
|
50
53
|
messages: msgs,
|
|
51
54
|
...(tools.length ? { tools: this.chat.buildTools(tools) } : {}),
|
|
@@ -73,7 +76,10 @@ export class OpenAIChatProvider {
|
|
|
73
76
|
toolCallBufs[idx].argsBuf += tc.function?.arguments ?? "";
|
|
74
77
|
}
|
|
75
78
|
if (choice.finish_reason === "tool_calls") {
|
|
76
|
-
for (const tb of Object.
|
|
79
|
+
for (const [index, tb] of Object.entries(toolCallBufs)) {
|
|
80
|
+
const idx = Number(index);
|
|
81
|
+
if (emittedToolCallIndexes.has(idx))
|
|
82
|
+
continue;
|
|
77
83
|
let args = {};
|
|
78
84
|
try {
|
|
79
85
|
args = JSON.parse(tb.argsBuf || "{}");
|
|
@@ -81,12 +87,30 @@ export class OpenAIChatProvider {
|
|
|
81
87
|
catch {
|
|
82
88
|
args = {};
|
|
83
89
|
}
|
|
90
|
+
emittedToolCallIndexes.add(idx);
|
|
84
91
|
yield { type: "tool_call", id: tb.id, name: tb.name, arguments: args };
|
|
85
92
|
}
|
|
86
93
|
}
|
|
87
94
|
}
|
|
95
|
+
for (const [index, tb] of Object.entries(toolCallBufs)) {
|
|
96
|
+
const idx = Number(index);
|
|
97
|
+
if (emittedToolCallIndexes.has(idx))
|
|
98
|
+
continue;
|
|
99
|
+
let args = {};
|
|
100
|
+
try {
|
|
101
|
+
args = JSON.parse(tb.argsBuf || "{}");
|
|
102
|
+
}
|
|
103
|
+
catch {
|
|
104
|
+
args = {};
|
|
105
|
+
}
|
|
106
|
+
emittedToolCallIndexes.add(idx);
|
|
107
|
+
yield { type: "tool_call", id: tb.id, name: tb.name, arguments: args };
|
|
108
|
+
}
|
|
88
109
|
if (totalTokens > 0)
|
|
89
110
|
yield { type: "usage", totalTokens };
|
|
90
111
|
}
|
|
112
|
+
requestExtensions(extensions) {
|
|
113
|
+
return omitExtensionKeys(extensions, ["model", "messages", "tools", "stream", "stream_options"]);
|
|
114
|
+
}
|
|
91
115
|
}
|
|
92
116
|
export { OpenAIChatProvider as OpenAIProvider };
|
package/dist/providers/qwen.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import OpenAI from "openai";
|
|
2
|
-
import type { LLMProvider, Message, StreamEvent, ToolSchema } from "../types.js";
|
|
2
|
+
import type { LLMProvider, Message, RenderedContext, StreamEvent, ToolSchema } from "../types.js";
|
|
3
3
|
import { CircuitBreaker } from "./base.js";
|
|
4
4
|
import { OpenAIChatAdapter } from "./openai-chat.js";
|
|
5
5
|
export declare class QwenProvider implements LLMProvider {
|
|
@@ -13,6 +13,8 @@ export declare class QwenProvider implements LLMProvider {
|
|
|
13
13
|
maxRetries: number;
|
|
14
14
|
baseDelay: number;
|
|
15
15
|
}, baseURL?: string);
|
|
16
|
-
complete(
|
|
17
|
-
stream(
|
|
16
|
+
complete(context: RenderedContext, tools: ToolSchema[], extensions?: Record<string, unknown>): Promise<Message>;
|
|
17
|
+
stream(context: RenderedContext, tools: ToolSchema[], extensions?: Record<string, unknown>): AsyncIterable<StreamEvent>;
|
|
18
|
+
private thinkingExtraBody;
|
|
19
|
+
private requestExtensions;
|
|
18
20
|
}
|
package/dist/providers/qwen.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import OpenAI from "openai";
|
|
2
2
|
import { withServerRuntimeGuard } from "../runtime/server.js";
|
|
3
|
-
import { CircuitBreaker } from "./base.js";
|
|
3
|
+
import { CircuitBreaker, omitExtensionKeys } from "./base.js";
|
|
4
4
|
import { OpenAIChatAdapter } from "./openai-chat.js";
|
|
5
5
|
import { endpointProfiles } from "./profiles.js";
|
|
6
6
|
const QWEN_BASE = endpointProfiles["qwen.dashscope"].baseURL;
|
|
@@ -18,17 +18,20 @@ export class QwenProvider {
|
|
|
18
18
|
this.maxRetries = retry.maxRetries;
|
|
19
19
|
this.baseDelay = retry.baseDelay;
|
|
20
20
|
}
|
|
21
|
-
async complete(
|
|
21
|
+
async complete(context, tools, extensions) {
|
|
22
22
|
if (this.circuit.isOpen())
|
|
23
23
|
throw new Error("Circuit breaker open");
|
|
24
|
-
const msgs = this.chat.buildMessages(
|
|
24
|
+
const msgs = this.chat.buildMessages(context);
|
|
25
|
+
const extraBody = this.thinkingExtraBody(extensions);
|
|
25
26
|
let lastErr;
|
|
26
27
|
for (let i = 0; i < this.maxRetries; i++) {
|
|
27
28
|
try {
|
|
28
29
|
const resp = await this.client.chat.completions.create({
|
|
30
|
+
...this.requestExtensions(extensions),
|
|
29
31
|
model: this.model,
|
|
30
32
|
messages: msgs,
|
|
31
33
|
...(tools.length ? { tools: this.chat.buildTools(tools) } : {}),
|
|
34
|
+
...(extraBody ? { extra_body: extraBody } : {}),
|
|
32
35
|
});
|
|
33
36
|
this.circuit.recordSuccess();
|
|
34
37
|
const choice = resp.choices[0].message;
|
|
@@ -44,23 +47,19 @@ export class QwenProvider {
|
|
|
44
47
|
}
|
|
45
48
|
throw lastErr;
|
|
46
49
|
}
|
|
47
|
-
async *stream(
|
|
48
|
-
const
|
|
49
|
-
const thinkingBudget = extensions?.thinkingBudget ?? extensions?.thinking_budget;
|
|
50
|
-
const msgs = this.chat.buildMessages(messages);
|
|
50
|
+
async *stream(context, tools, extensions) {
|
|
51
|
+
const msgs = this.chat.buildMessages(context);
|
|
51
52
|
const toolCallBufs = {};
|
|
53
|
+
const emittedToolCallIndexes = new Set();
|
|
54
|
+
const extraBody = this.thinkingExtraBody(extensions);
|
|
52
55
|
const stream = await this.client.chat.completions.create({
|
|
56
|
+
...this.requestExtensions(extensions),
|
|
53
57
|
model: this.model,
|
|
54
58
|
messages: msgs,
|
|
55
59
|
...(tools.length ? { tools: this.chat.buildTools(tools) } : {}),
|
|
56
60
|
stream: true,
|
|
57
61
|
stream_options: { include_usage: true },
|
|
58
|
-
...(
|
|
59
|
-
extra_body: {
|
|
60
|
-
enable_thinking: true,
|
|
61
|
-
...(typeof thinkingBudget === "number" ? { thinking_budget: thinkingBudget } : {}),
|
|
62
|
-
},
|
|
63
|
-
} : {}),
|
|
62
|
+
...(extraBody ? { extra_body: extraBody } : {}),
|
|
64
63
|
});
|
|
65
64
|
let totalTokens = 0;
|
|
66
65
|
for await (const chunk of stream) {
|
|
@@ -85,7 +84,10 @@ export class QwenProvider {
|
|
|
85
84
|
toolCallBufs[idx].argsBuf += tc.function?.arguments ?? "";
|
|
86
85
|
}
|
|
87
86
|
if (choice.finish_reason === "tool_calls") {
|
|
88
|
-
for (const tb of Object.
|
|
87
|
+
for (const [index, tb] of Object.entries(toolCallBufs)) {
|
|
88
|
+
const idx = Number(index);
|
|
89
|
+
if (emittedToolCallIndexes.has(idx))
|
|
90
|
+
continue;
|
|
89
91
|
let args = {};
|
|
90
92
|
try {
|
|
91
93
|
args = JSON.parse(tb.argsBuf || "{}");
|
|
@@ -93,11 +95,42 @@ export class QwenProvider {
|
|
|
93
95
|
catch {
|
|
94
96
|
args = {};
|
|
95
97
|
}
|
|
98
|
+
emittedToolCallIndexes.add(idx);
|
|
96
99
|
yield { type: "tool_call", id: tb.id, name: tb.name, arguments: args };
|
|
97
100
|
}
|
|
98
101
|
}
|
|
99
102
|
}
|
|
103
|
+
for (const [index, tb] of Object.entries(toolCallBufs)) {
|
|
104
|
+
const idx = Number(index);
|
|
105
|
+
if (emittedToolCallIndexes.has(idx))
|
|
106
|
+
continue;
|
|
107
|
+
let args = {};
|
|
108
|
+
try {
|
|
109
|
+
args = JSON.parse(tb.argsBuf || "{}");
|
|
110
|
+
}
|
|
111
|
+
catch {
|
|
112
|
+
args = {};
|
|
113
|
+
}
|
|
114
|
+
emittedToolCallIndexes.add(idx);
|
|
115
|
+
yield { type: "tool_call", id: tb.id, name: tb.name, arguments: args };
|
|
116
|
+
}
|
|
100
117
|
if (totalTokens > 0)
|
|
101
118
|
yield { type: "usage", totalTokens };
|
|
102
119
|
}
|
|
120
|
+
thinkingExtraBody(extensions) {
|
|
121
|
+
const enableThinking = Boolean(extensions?.enableThinking ?? extensions?.enable_thinking);
|
|
122
|
+
const thinkingBudget = extensions?.thinkingBudget ?? extensions?.thinking_budget;
|
|
123
|
+
if (!enableThinking)
|
|
124
|
+
return undefined;
|
|
125
|
+
return {
|
|
126
|
+
enable_thinking: true,
|
|
127
|
+
...(typeof thinkingBudget === "number" ? { thinking_budget: thinkingBudget } : {}),
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
requestExtensions(extensions) {
|
|
131
|
+
return omitExtensionKeys(extensions, [
|
|
132
|
+
"model", "messages", "tools", "stream", "stream_options", "extra_body",
|
|
133
|
+
"enableThinking", "enable_thinking", "thinkingBudget", "thinking_budget",
|
|
134
|
+
]);
|
|
135
|
+
}
|
|
103
136
|
}
|
package/dist/tools/index.d.ts
CHANGED
|
@@ -1,9 +1,14 @@
|
|
|
1
|
-
import type { ToolSchema, ToolResult } from "../types.js";
|
|
1
|
+
import type { ToolChunk, ToolSchema, ToolResult } from "../types.js";
|
|
2
2
|
export interface RegisteredTool {
|
|
3
3
|
schema: ToolSchema;
|
|
4
|
-
execute(args: Record<string, unknown>): Promise<string>;
|
|
4
|
+
execute(args: Record<string, unknown>): Promise<string> | AsyncIterable<ToolChunk>;
|
|
5
5
|
}
|
|
6
6
|
export declare function tool(name: string, description: string, parameters: Record<string, unknown>, fn: (args: Record<string, unknown>) => Promise<string> | string): RegisteredTool;
|
|
7
|
+
export declare function streamingTool(name: string, description: string, parameters: Record<string, unknown>, fn: (args: Record<string, unknown>) => AsyncIterable<ToolChunk>): RegisteredTool;
|
|
8
|
+
export declare function isAsyncIterable<T>(value: unknown): value is AsyncIterable<T>;
|
|
9
|
+
export declare function normalizeToolChunk(chunk: ToolChunk): Exclude<ToolChunk, string>;
|
|
10
|
+
export declare function toolChunkText(chunk: ToolChunk): string;
|
|
11
|
+
export declare function validateToolArguments(schemaJson: string, args: Record<string, unknown>): string | undefined;
|
|
7
12
|
export declare function executeTools(calls: {
|
|
8
13
|
id: string;
|
|
9
14
|
name: string;
|
package/dist/tools/index.js
CHANGED
|
@@ -4,6 +4,80 @@ export function tool(name, description, parameters, fn) {
|
|
|
4
4
|
async execute(args) { return fn(args); },
|
|
5
5
|
};
|
|
6
6
|
}
|
|
7
|
+
export function streamingTool(name, description, parameters, fn) {
|
|
8
|
+
return {
|
|
9
|
+
schema: { name, description, parameters: JSON.stringify(parameters) },
|
|
10
|
+
execute(args) { return fn(args); },
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
export function isAsyncIterable(value) {
|
|
14
|
+
return typeof value === "object" && value !== null && Symbol.asyncIterator in value;
|
|
15
|
+
}
|
|
16
|
+
export function normalizeToolChunk(chunk) {
|
|
17
|
+
return typeof chunk === "string" ? { type: "text", text: chunk } : chunk;
|
|
18
|
+
}
|
|
19
|
+
export function toolChunkText(chunk) {
|
|
20
|
+
const normalized = normalizeToolChunk(chunk);
|
|
21
|
+
return normalized.type === "text" ? normalized.text : "";
|
|
22
|
+
}
|
|
23
|
+
export function validateToolArguments(schemaJson, args) {
|
|
24
|
+
let schema;
|
|
25
|
+
try {
|
|
26
|
+
schema = JSON.parse(schemaJson);
|
|
27
|
+
}
|
|
28
|
+
catch {
|
|
29
|
+
return "invalid tool schema";
|
|
30
|
+
}
|
|
31
|
+
return validateValue(schema, args, "$", true);
|
|
32
|
+
}
|
|
33
|
+
function validateValue(schema, value, path, isRoot = false) {
|
|
34
|
+
const expectedType = schema.type;
|
|
35
|
+
if (typeof expectedType === "string") {
|
|
36
|
+
if (expectedType === "object") {
|
|
37
|
+
if (!value || typeof value !== "object" || Array.isArray(value))
|
|
38
|
+
return `${path} must be object`;
|
|
39
|
+
const obj = value;
|
|
40
|
+
for (const required of schema.required ?? []) {
|
|
41
|
+
if (!(required in obj))
|
|
42
|
+
return `${path}.${required} is required`;
|
|
43
|
+
}
|
|
44
|
+
const properties = schema.properties ?? {};
|
|
45
|
+
for (const [key, child] of Object.entries(properties)) {
|
|
46
|
+
if (key in obj) {
|
|
47
|
+
const err = validateValue(child, obj[key], `${path}.${key}`);
|
|
48
|
+
if (err)
|
|
49
|
+
return err;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
else if (expectedType === "array") {
|
|
54
|
+
if (!Array.isArray(value))
|
|
55
|
+
return `${path} must be array`;
|
|
56
|
+
}
|
|
57
|
+
else if (expectedType === "string") {
|
|
58
|
+
if (typeof value !== "string")
|
|
59
|
+
return `${path} must be string`;
|
|
60
|
+
}
|
|
61
|
+
else if (expectedType === "number") {
|
|
62
|
+
if (typeof value !== "number" || Number.isNaN(value))
|
|
63
|
+
return `${path} must be number`;
|
|
64
|
+
}
|
|
65
|
+
else if (expectedType === "integer") {
|
|
66
|
+
if (!Number.isInteger(value))
|
|
67
|
+
return `${path} must be integer`;
|
|
68
|
+
}
|
|
69
|
+
else if (expectedType === "boolean") {
|
|
70
|
+
if (typeof value !== "boolean")
|
|
71
|
+
return `${path} must be boolean`;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
else if (isRoot && (!value || typeof value !== "object" || Array.isArray(value))) {
|
|
75
|
+
return `${path} must be object`;
|
|
76
|
+
}
|
|
77
|
+
if (Array.isArray(schema.enum) && !schema.enum.includes(value))
|
|
78
|
+
return `${path} must be one of enum values`;
|
|
79
|
+
return undefined;
|
|
80
|
+
}
|
|
7
81
|
export async function executeTools(calls, registry) {
|
|
8
82
|
return Promise.all(calls.map(async (c) => {
|
|
9
83
|
const t = registry.get(c.name);
|
|
@@ -11,7 +85,16 @@ export async function executeTools(calls, registry) {
|
|
|
11
85
|
return { callId: c.id, output: `unknown tool: ${c.name}`, isError: true };
|
|
12
86
|
try {
|
|
13
87
|
const args = JSON.parse(c.arguments || "{}");
|
|
88
|
+
const validationError = validateToolArguments(t.schema.parameters, args);
|
|
89
|
+
if (validationError)
|
|
90
|
+
return { callId: c.id, output: `invalid arguments: ${validationError}`, isError: true };
|
|
14
91
|
const output = await t.execute(args);
|
|
92
|
+
if (isAsyncIterable(output)) {
|
|
93
|
+
let combined = "";
|
|
94
|
+
for await (const chunk of output)
|
|
95
|
+
combined += toolChunkText(chunk);
|
|
96
|
+
return { callId: c.id, output: combined, isError: false };
|
|
97
|
+
}
|
|
15
98
|
return { callId: c.id, output, isError: false };
|
|
16
99
|
}
|
|
17
100
|
catch (err) {
|
package/dist/types.d.ts
CHANGED
|
@@ -69,6 +69,41 @@ export interface ToolCallEvent extends StreamEvent {
|
|
|
69
69
|
name: string;
|
|
70
70
|
arguments: Record<string, unknown>;
|
|
71
71
|
}
|
|
72
|
+
export type ToolChunk = string | {
|
|
73
|
+
type: "text";
|
|
74
|
+
text: string;
|
|
75
|
+
} | {
|
|
76
|
+
type: "progress";
|
|
77
|
+
progress: number;
|
|
78
|
+
message?: string;
|
|
79
|
+
} | {
|
|
80
|
+
type: "artifact";
|
|
81
|
+
artifactId: string;
|
|
82
|
+
mimeType?: string;
|
|
83
|
+
label?: string;
|
|
84
|
+
} | {
|
|
85
|
+
type: "json_patch";
|
|
86
|
+
patch: Record<string, unknown>;
|
|
87
|
+
} | {
|
|
88
|
+
type: "suspend";
|
|
89
|
+
suspensionId: string;
|
|
90
|
+
payload?: Record<string, unknown>;
|
|
91
|
+
};
|
|
92
|
+
export interface ToolDeltaEvent extends StreamEvent {
|
|
93
|
+
type: "tool_delta";
|
|
94
|
+
callId: string;
|
|
95
|
+
name: string;
|
|
96
|
+
/** Backward-compatible text projection when the chunk carries text. */
|
|
97
|
+
delta?: string;
|
|
98
|
+
chunk: Exclude<ToolChunk, string>;
|
|
99
|
+
}
|
|
100
|
+
export interface ToolSuspendEvent extends StreamEvent {
|
|
101
|
+
type: "tool_suspend";
|
|
102
|
+
callId: string;
|
|
103
|
+
name: string;
|
|
104
|
+
suspensionId: string;
|
|
105
|
+
payload?: Record<string, unknown>;
|
|
106
|
+
}
|
|
72
107
|
export interface ToolResultEvent extends StreamEvent {
|
|
73
108
|
type: "tool_result";
|
|
74
109
|
callId: string;
|
|
@@ -117,8 +152,18 @@ export interface RetryConfig {
|
|
|
117
152
|
* Responses `previous_response_id` without leaking those semantics into the kernel.
|
|
118
153
|
*/
|
|
119
154
|
export type ProviderRunState = Record<string, unknown>;
|
|
155
|
+
/** Structured render output produced by the kernel for each LLM call. */
|
|
156
|
+
export interface RenderedContext {
|
|
157
|
+
/** Combined system text: system partition + dashboard (when non-empty).
|
|
158
|
+
* Anthropic → `system` param · OpenAI → messages[0] system role ·
|
|
159
|
+
* Gemini → `systemInstruction`. */
|
|
160
|
+
systemText: string;
|
|
161
|
+
/** Strictly alternating user / assistant / tool turns.
|
|
162
|
+
* Working-partition signals are already folded into the first user turn. */
|
|
163
|
+
turns: Message[];
|
|
164
|
+
}
|
|
120
165
|
export interface LLMProvider {
|
|
121
166
|
createRunState?(): ProviderRunState;
|
|
122
|
-
complete(
|
|
123
|
-
stream(
|
|
167
|
+
complete(context: RenderedContext, tools: ToolSchema[], extensions?: Record<string, unknown>): Promise<Message>;
|
|
168
|
+
stream(context: RenderedContext, tools: ToolSchema[], extensions?: Record<string, unknown>, state?: ProviderRunState): AsyncIterable<StreamEvent>;
|
|
124
169
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deepstrike/sdk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.13",
|
|
4
4
|
"description": "DeepStrike Node.js SDK",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
18
|
"@anthropic-ai/sdk": "^0.39.0",
|
|
19
|
-
"@deepstrike/core": "0.1.
|
|
19
|
+
"@deepstrike/core": "0.1.13",
|
|
20
20
|
"@google/generative-ai": "^0.24.1",
|
|
21
21
|
"openai": "^4.77.0"
|
|
22
22
|
},
|