@deepstrike/sdk 0.2.52 → 0.2.61
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 +28 -28
- package/dist/agent-ir.d.ts +103 -0
- package/dist/agent-ir.js +134 -0
- package/dist/agent.d.ts +67 -0
- package/dist/agent.js +36 -0
- package/dist/collaboration/harness.js +1 -1
- package/dist/collaboration/modes/creator-verifier.d.ts +2 -7
- package/dist/collaboration/modes/creator-verifier.js +4 -6
- package/dist/collaboration/pool.d.ts +8 -20
- package/dist/collaboration/pool.js +27 -97
- package/dist/compat/anthropic/mcp.d.ts +15 -0
- package/dist/compat/anthropic/mcp.js +10 -0
- package/dist/compat/openai/agent.d.ts +34 -0
- package/dist/compat/openai/agent.js +24 -0
- package/dist/governance.d.ts +1 -17
- package/dist/governance.js +1 -34
- package/dist/guardrail.d.ts +6 -0
- package/dist/guardrail.js +1 -0
- package/dist/handoff-target.d.ts +12 -0
- package/dist/handoff-target.js +1 -0
- package/dist/harness/manifest.js +0 -4
- package/dist/index.d.ts +19 -7
- package/dist/index.js +8 -5
- package/dist/kernel.d.ts +2 -20
- package/dist/knowledge/public.d.ts +29 -0
- package/dist/knowledge/public.js +1 -0
- package/dist/mcp-server.d.ts +28 -0
- package/dist/mcp-server.js +1 -0
- package/dist/memory/agent.d.ts +2 -2
- package/dist/memory/agent.js +2 -2
- package/dist/memory/durable.d.ts +16 -0
- package/dist/memory/durable.js +46 -0
- package/dist/memory/in-memory-store.d.ts +9 -7
- package/dist/memory/in-memory-store.js +8 -2
- package/dist/memory/protocols.d.ts +22 -4
- package/dist/memory/public.d.ts +4 -3
- package/dist/memory/public.js +3 -2
- package/dist/os/public.d.ts +1 -1
- package/dist/os/public.js +1 -1
- package/dist/providers/anthropic-adapter.d.ts +59 -0
- package/dist/providers/anthropic-adapter.js +530 -0
- package/dist/providers/anthropic-compatible.d.ts +2 -3
- package/dist/providers/anthropic-compatible.js +8 -5
- package/dist/providers/anthropic.d.ts +20 -23
- package/dist/providers/anthropic.js +176 -395
- package/dist/providers/base.d.ts +2 -2
- package/dist/providers/base.js +50 -8
- package/dist/providers/capability-router.d.ts +29 -0
- package/dist/providers/capability-router.js +43 -0
- package/dist/providers/catalog.d.ts +16 -4
- package/dist/providers/catalog.js +112 -36
- package/dist/providers/content-normalization.d.ts +57 -0
- package/dist/providers/content-normalization.js +238 -0
- package/dist/providers/content-policy.d.ts +16 -0
- package/dist/providers/content-policy.js +39 -0
- package/dist/providers/credentials.d.ts +83 -0
- package/dist/providers/credentials.js +190 -0
- package/dist/providers/endpoints.d.ts +137 -0
- package/dist/providers/endpoints.js +128 -0
- package/dist/providers/factories.js +25 -9
- package/dist/providers/gemini-adapter.d.ts +33 -0
- package/dist/providers/gemini-adapter.js +264 -0
- package/dist/providers/gemini.d.ts +16 -3
- package/dist/providers/gemini.js +97 -195
- package/dist/providers/model-catalog.d.ts +37 -0
- package/dist/providers/model-catalog.js +62 -0
- package/dist/providers/model-registry.d.ts +119 -0
- package/dist/providers/model-registry.js +379 -0
- package/dist/providers/ollama-adapter.d.ts +65 -0
- package/dist/providers/ollama-adapter.js +188 -0
- package/dist/providers/ollama.d.ts +9 -4
- package/dist/providers/ollama.js +96 -109
- package/dist/providers/openai-chat-dialects.d.ts +154 -0
- package/dist/providers/openai-chat-dialects.js +179 -0
- package/dist/providers/openai-chat.d.ts +46 -18
- package/dist/providers/openai-chat.js +416 -51
- package/dist/providers/openai-responses-adapter.d.ts +42 -0
- package/dist/providers/openai-responses-adapter.js +343 -0
- package/dist/providers/openai-responses.d.ts +19 -33
- package/dist/providers/openai-responses.js +164 -264
- package/dist/providers/openai.d.ts +29 -76
- package/dist/providers/openai.js +195 -292
- package/dist/providers/protocol-adapter.d.ts +39 -0
- package/dist/providers/protocol-adapter.js +13 -0
- package/dist/providers/protocol-capabilities.d.ts +34 -0
- package/dist/providers/protocol-capabilities.js +44 -0
- package/dist/providers/provider-error.d.ts +31 -0
- package/dist/providers/provider-error.js +153 -0
- package/dist/providers/public.d.ts +26 -3
- package/dist/providers/public.js +13 -1
- package/dist/providers/registry.d.ts +7 -6
- package/dist/providers/registry.js +47 -20
- package/dist/providers/request-plan.d.ts +89 -0
- package/dist/providers/request-plan.js +199 -0
- package/dist/providers/usage-normalizer.d.ts +48 -0
- package/dist/providers/usage-normalizer.js +139 -0
- package/dist/providers/vendor-profiles.d.ts +2 -15
- package/dist/providers/vendor-profiles.js +14 -60
- package/dist/runtime/canonical-kernel-step.d.ts +1 -2
- package/dist/runtime/canonical-kernel-step.js +47 -12
- package/dist/runtime/context-policy.d.ts +10 -12
- package/dist/runtime/context-policy.js +6 -8
- package/dist/runtime/durable-content.d.ts +50 -0
- package/dist/runtime/durable-content.js +159 -0
- package/dist/runtime/execution-plane.d.ts +2 -2
- package/dist/runtime/execution-plane.js +2 -2
- package/dist/runtime/kernel-event-log.js +0 -1
- package/dist/runtime/kernel-step.d.ts +0 -1
- package/dist/runtime/kernel-step.js +4 -2
- package/dist/runtime/mcp-proxy-plane.d.ts +25 -1
- package/dist/runtime/mcp-proxy-plane.js +44 -6
- package/dist/runtime/output-schema.d.ts +1 -2
- package/dist/runtime/provider-replay.d.ts +5 -1
- package/dist/runtime/provider-replay.js +26 -27
- package/dist/runtime/reactive-session.d.ts +1 -1
- package/dist/runtime/reactive-session.js +2 -3
- package/dist/runtime/run-group.d.ts +1 -1
- package/dist/runtime/runner.d.ts +31 -45
- package/dist/runtime/runner.js +178 -63
- package/dist/runtime/session-log.d.ts +8 -1
- package/dist/runtime/session-log.js +42 -2
- package/dist/runtime/session-repair.d.ts +1 -1
- package/dist/runtime/session-repair.js +1 -1
- package/dist/runtime/sub-agent-orchestrator.d.ts +1 -1
- package/dist/runtime/sub-agent-orchestrator.js +8 -11
- package/dist/runtime/workflow-control-flow.d.ts +0 -4
- package/dist/runtime/workflow-control-flow.js +0 -16
- package/dist/session.d.ts +11 -0
- package/dist/session.js +1 -0
- package/dist/skill.d.ts +17 -0
- package/dist/skill.js +16 -0
- package/dist/skills/loader.d.ts +3 -0
- package/dist/tools/errors.d.ts +1 -3
- package/dist/tools/errors.js +1 -3
- package/dist/tools/index.d.ts +3 -0
- package/dist/types/agent.d.ts +21 -9
- package/dist/types/agent.js +30 -4
- package/dist/types.d.ts +135 -17
- package/package.json +4 -4
- package/dist/providers/deepseek.d.ts +0 -46
- package/dist/providers/deepseek.js +0 -97
- package/dist/providers/glm.d.ts +0 -25
- package/dist/providers/glm.js +0 -48
- package/dist/providers/kimi.d.ts +0 -23
- package/dist/providers/kimi.js +0 -30
- package/dist/providers/minimax.d.ts +0 -49
- package/dist/providers/minimax.js +0 -98
- package/dist/providers/profiles.d.ts +0 -1992
- package/dist/providers/profiles.js +0 -796
- package/dist/providers/qwen.d.ts +0 -38
- package/dist/providers/qwen.js +0 -97
package/dist/providers/qwen.d.ts
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import type { Message, ProviderDescriptor, ProviderReplay, RuntimePolicy } from "../types.js";
|
|
2
|
-
import { OpenAIChatProvider } from "./openai.js";
|
|
3
|
-
import { AnthropicCompatibleProvider } from "./anthropic-compatible.js";
|
|
4
|
-
/**
|
|
5
|
-
* Qwen over its Anthropic-compatible endpoint.
|
|
6
|
-
* @deprecated Prefer `qwen({ protocol: "anthropic" })`. Behavior is now fully
|
|
7
|
-
* data-driven via `anthropicVendorProfiles.qwen`; this thin shim is kept for
|
|
8
|
-
* backward compatibility and `instanceof` checks.
|
|
9
|
-
*/
|
|
10
|
-
export declare class QwenAnthropicProvider extends AnthropicCompatibleProvider {
|
|
11
|
-
constructor(apiKey: string, model?: string, retry?: {
|
|
12
|
-
maxRetries: number;
|
|
13
|
-
baseDelay: number;
|
|
14
|
-
}, baseURL?: string);
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Qwen / DashScope over its OpenAI-compatible (DashScope) endpoint. Reasoning is carried
|
|
18
|
-
* out-of-band as `reasoning_content`; thinking is opted into via `enable_thinking` /
|
|
19
|
-
* `thinking_budget` (sent under `extra_body`). The streaming / tool-call machinery and the
|
|
20
|
-
* default `{ reasoning_content }` replay are inherited from OpenAIChatProvider; only request
|
|
21
|
-
* shaping and the (string-coerced) replay peek differ, supplied via the Template-Method hooks.
|
|
22
|
-
*/
|
|
23
|
-
export declare class QwenProvider extends OpenAIChatProvider {
|
|
24
|
-
constructor(apiKey: string, model?: string, retry?: {
|
|
25
|
-
maxRetries: number;
|
|
26
|
-
baseDelay: number;
|
|
27
|
-
}, baseURL?: string);
|
|
28
|
-
runtimePolicy(): RuntimePolicy;
|
|
29
|
-
descriptor(): ProviderDescriptor;
|
|
30
|
-
protected cacheKeyParams(): Record<string, unknown>;
|
|
31
|
-
protected usesInlineThinkingTags(): boolean;
|
|
32
|
-
protected requestBodyExtras(extensions?: Record<string, unknown>): Record<string, unknown>;
|
|
33
|
-
protected requestExtensions(extensions?: Record<string, unknown>): Record<string, unknown>;
|
|
34
|
-
private searchExtraBody;
|
|
35
|
-
peekProviderReplay(message: Pick<Message, "content" | "toolCalls">): ProviderReplay | undefined;
|
|
36
|
-
seedProviderReplay(message: Pick<Message, "content" | "toolCalls">, replay: ProviderReplay): void;
|
|
37
|
-
private thinkingExtraBody;
|
|
38
|
-
}
|
package/dist/providers/qwen.js
DELETED
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
import { OpenAIChatProvider } from "./openai.js";
|
|
2
|
-
import { AnthropicCompatibleProvider } from "./anthropic-compatible.js";
|
|
3
|
-
import { omitExtensionKeys } from "./base.js";
|
|
4
|
-
import { endpointProfiles } from "./profiles.js";
|
|
5
|
-
import { QWEN_POLICIES, anthropicVendorProfiles } from "./vendor-profiles.js";
|
|
6
|
-
/**
|
|
7
|
-
* Qwen over its Anthropic-compatible endpoint.
|
|
8
|
-
* @deprecated Prefer `qwen({ protocol: "anthropic" })`. Behavior is now fully
|
|
9
|
-
* data-driven via `anthropicVendorProfiles.qwen`; this thin shim is kept for
|
|
10
|
-
* backward compatibility and `instanceof` checks.
|
|
11
|
-
*/
|
|
12
|
-
export class QwenAnthropicProvider extends AnthropicCompatibleProvider {
|
|
13
|
-
constructor(apiKey, model, retry, baseURL) {
|
|
14
|
-
super(anthropicVendorProfiles.qwen, apiKey, model, retry, baseURL);
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Qwen / DashScope over its OpenAI-compatible (DashScope) endpoint. Reasoning is carried
|
|
19
|
-
* out-of-band as `reasoning_content`; thinking is opted into via `enable_thinking` /
|
|
20
|
-
* `thinking_budget` (sent under `extra_body`). The streaming / tool-call machinery and the
|
|
21
|
-
* default `{ reasoning_content }` replay are inherited from OpenAIChatProvider; only request
|
|
22
|
-
* shaping and the (string-coerced) replay peek differ, supplied via the Template-Method hooks.
|
|
23
|
-
*/
|
|
24
|
-
export class QwenProvider extends OpenAIChatProvider {
|
|
25
|
-
constructor(apiKey, model = "qwen3.6-plus", retry, baseURL = endpointProfiles["qwen.dashscope"].baseURL) {
|
|
26
|
-
super(apiKey, model, retry, baseURL);
|
|
27
|
-
}
|
|
28
|
-
runtimePolicy() {
|
|
29
|
-
return QWEN_POLICIES[this.model] ?? {};
|
|
30
|
-
}
|
|
31
|
-
descriptor() {
|
|
32
|
-
return {
|
|
33
|
-
provider: "qwen",
|
|
34
|
-
protocol: "openai-chat",
|
|
35
|
-
model: this.model,
|
|
36
|
-
reasoning: {
|
|
37
|
-
supported: true,
|
|
38
|
-
preserveAcrossToolTurns: true,
|
|
39
|
-
},
|
|
40
|
-
toolCalls: {
|
|
41
|
-
supported: true,
|
|
42
|
-
requiresStrictPairing: true,
|
|
43
|
-
},
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
// DashScope auto prefix-caches and does not accept OpenAI's `prompt_cache_key`; omit it.
|
|
47
|
-
cacheKeyParams() {
|
|
48
|
-
return {};
|
|
49
|
-
}
|
|
50
|
-
// Reasoning arrives out-of-band as `reasoning_content`, never as inline <thinking> tags.
|
|
51
|
-
usesInlineThinkingTags() {
|
|
52
|
-
return false;
|
|
53
|
-
}
|
|
54
|
-
requestBodyExtras(extensions) {
|
|
55
|
-
// DashScope vendor knobs travel under `extra_body` in OpenAI-compat mode: thinking + web search.
|
|
56
|
-
const extraBody = { ...this.thinkingExtraBody(extensions), ...this.searchExtraBody(extensions) };
|
|
57
|
-
return Object.keys(extraBody).length ? { extra_body: extraBody } : {};
|
|
58
|
-
}
|
|
59
|
-
requestExtensions(extensions) {
|
|
60
|
-
return omitExtensionKeys(extensions, [
|
|
61
|
-
"model", "messages", "tools", "stream", "stream_options", "extra_body",
|
|
62
|
-
"enableThinking", "enable_thinking", "thinkingBudget", "thinking_budget",
|
|
63
|
-
"enable_search", "search_options",
|
|
64
|
-
]);
|
|
65
|
-
}
|
|
66
|
-
// DashScope web search (Qwen vendor feature): `extensions={ enable_search: true }` + optional
|
|
67
|
-
// `search_options` (forced_search / search_strategy / enable_citation …). Mirrors the Python provider.
|
|
68
|
-
searchExtraBody(extensions) {
|
|
69
|
-
if (!extensions?.enable_search)
|
|
70
|
-
return {};
|
|
71
|
-
return {
|
|
72
|
-
enable_search: true,
|
|
73
|
-
...(extensions.search_options != null ? { search_options: extensions.search_options } : {}),
|
|
74
|
-
};
|
|
75
|
-
}
|
|
76
|
-
peekProviderReplay(message) {
|
|
77
|
-
const fields = this.chat.peekReplayFields(message);
|
|
78
|
-
if (!fields || !("reasoning_content" in fields))
|
|
79
|
-
return undefined;
|
|
80
|
-
return { reasoning_content: String(fields.reasoning_content ?? "") };
|
|
81
|
-
}
|
|
82
|
-
seedProviderReplay(message, replay) {
|
|
83
|
-
if (replay.reasoning_content !== undefined) {
|
|
84
|
-
this.chat.rememberReplayFields(message, { reasoning_content: replay.reasoning_content });
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
thinkingExtraBody(extensions) {
|
|
88
|
-
const enableThinking = Boolean(extensions?.enableThinking ?? extensions?.enable_thinking);
|
|
89
|
-
const thinkingBudget = extensions?.thinkingBudget ?? extensions?.thinking_budget;
|
|
90
|
-
if (!enableThinking)
|
|
91
|
-
return undefined;
|
|
92
|
-
return {
|
|
93
|
-
enable_thinking: true,
|
|
94
|
-
...(typeof thinkingBudget === "number" ? { thinking_budget: thinkingBudget } : {}),
|
|
95
|
-
};
|
|
96
|
-
}
|
|
97
|
-
}
|