@deepstrike/sdk 0.2.70 → 0.2.72
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 +57 -41
- package/dist/advanced/public.d.ts +24 -0
- package/dist/advanced/public.js +18 -0
- package/dist/agent-facade.d.ts +96 -0
- package/dist/agent-facade.js +317 -0
- package/dist/agent-ir.d.ts +11 -5
- package/dist/agent-ir.js +42 -26
- package/dist/canonical-prefix-allowlist.d.ts +6 -0
- package/dist/canonical-prefix-allowlist.js +30 -0
- package/dist/evals/public.d.ts +50 -0
- package/dist/evals/public.js +25 -0
- package/dist/guardrail.d.ts +4 -1
- package/dist/handoff-target.d.ts +2 -0
- package/dist/handoff-target.js +7 -1
- package/dist/index.d.ts +14 -30
- package/dist/index.js +7 -16
- package/dist/kernel.d.ts +2 -2
- package/dist/knowledge/public.d.ts +2 -0
- package/dist/knowledge/public.js +1 -1
- package/dist/knowledge/source.d.ts +7 -0
- package/dist/knowledge/source.js +20 -1
- package/dist/memory/protocols.d.ts +2 -2
- package/dist/projection-pairs.d.ts +43 -0
- package/dist/projection-pairs.js +9 -0
- package/dist/providers/anthropic-adapter.d.ts +2 -2
- package/dist/providers/anthropic.d.ts +4 -4
- package/dist/providers/base.d.ts +5 -5
- package/dist/providers/content-normalization.d.ts +4 -4
- package/dist/providers/gemini-adapter.d.ts +2 -2
- package/dist/providers/gemini.d.ts +3 -3
- package/dist/providers/ollama-adapter.d.ts +2 -2
- package/dist/providers/ollama.d.ts +2 -2
- package/dist/providers/openai-chat.d.ts +4 -4
- package/dist/providers/openai-responses-adapter.d.ts +2 -2
- package/dist/providers/openai-responses.d.ts +2 -2
- package/dist/providers/openai.d.ts +4 -4
- package/dist/providers/protocol-adapter.d.ts +2 -2
- package/dist/providers/protocol-capabilities.d.ts +1 -0
- package/dist/providers/protocol-capabilities.js +3 -0
- package/dist/providers/public.d.ts +4 -2
- package/dist/providers/public.js +2 -1
- package/dist/providers/replay-validator.d.ts +3 -3
- package/dist/runtime/archive.d.ts +7 -7
- package/dist/runtime/canonical-kernel-step.d.ts +2 -2
- package/dist/runtime/context-manager.d.ts +56 -0
- package/dist/runtime/context-manager.js +112 -0
- package/dist/runtime/eval.d.ts +2 -2
- package/dist/runtime/kernel-step.d.ts +5 -5
- package/dist/runtime/provider-replay.d.ts +2 -2
- package/dist/runtime/public.d.ts +22 -0
- package/dist/runtime/public.js +11 -0
- package/dist/runtime/replay-fixture.d.ts +3 -3
- package/dist/runtime/replay-fixture.js +1 -1
- package/dist/runtime/replay-provider.d.ts +4 -4
- package/dist/runtime/replay-provider.js +1 -1
- package/dist/runtime/runner.d.ts +17 -5
- package/dist/runtime/runner.js +110 -37
- package/dist/runtime/session-log.d.ts +1 -1
- package/dist/runtime/session-repair.d.ts +2 -2
- package/dist/runtime/workflow-control-flow.d.ts +1 -1
- package/dist/runtime/workflow-control-flow.js +16 -2
- package/dist/runtime-classification.d.ts +161 -0
- package/dist/runtime-classification.js +66 -0
- package/dist/runtime-language.d.ts +32 -0
- package/dist/runtime-language.js +51 -0
- package/dist/skill.d.ts +31 -5
- package/dist/types/agent.d.ts +17 -4
- package/dist/types.d.ts +22 -12
- package/dist/workflow/definition.d.ts +19 -0
- package/dist/workflow/definition.js +29 -0
- package/dist/workflow/public.d.ts +3 -1
- package/dist/workflow/public.js +1 -0
- package/package.json +23 -2
- package/dist/compat/anthropic/mcp.d.ts +0 -15
- package/dist/compat/anthropic/mcp.js +0 -10
- package/dist/compat/openai/agent.d.ts +0 -34
- package/dist/compat/openai/agent.js +0 -24
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { MCPServer } from "../../mcp-server.js";
|
|
2
|
-
/** spc_007 §3: minimal Anthropic/Claude-style MCP server config shape (the per-server object in
|
|
3
|
-
* a Claude Desktop-style `mcpServers` map — `{ command, args, env }`), not a live SDK type
|
|
4
|
-
* import — this adapter reads a serialized config (e.g.
|
|
5
|
-
* `__fixtures__/anthropic-mcp-config.json`). */
|
|
6
|
-
export interface AnthropicMcpConfigJson {
|
|
7
|
-
name?: string;
|
|
8
|
-
command: string;
|
|
9
|
-
args?: string[];
|
|
10
|
-
env?: Record<string, string>;
|
|
11
|
-
}
|
|
12
|
-
/** Anthropic MCP config → DeepStrike `MCPServer` (spc_001-07). Anthropic's config format is
|
|
13
|
-
* always a subprocess launch (stdio transport) — there is no http/sse/custom variant to map
|
|
14
|
-
* from. Pure Surface→Surface mapping, produces only `MCPServer`. */
|
|
15
|
-
export declare function fromAnthropicMcpConfig(json: AnthropicMcpConfigJson): MCPServer;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/** Anthropic MCP config → DeepStrike `MCPServer` (spc_001-07). Anthropic's config format is
|
|
2
|
-
* always a subprocess launch (stdio transport) — there is no http/sse/custom variant to map
|
|
3
|
-
* from. Pure Surface→Surface mapping, produces only `MCPServer`. */
|
|
4
|
-
export function fromAnthropicMcpConfig(json) {
|
|
5
|
-
return {
|
|
6
|
-
name: json.name,
|
|
7
|
-
transport: { kind: "stdio", command: json.command, args: json.args },
|
|
8
|
-
...(json.env ? { metadata: { env: json.env } } : {}),
|
|
9
|
-
};
|
|
10
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { Agent } from "../../agent.js";
|
|
2
|
-
/** spc_007 §2: minimal OpenAI Agents SDK agent-definition shape this adapter accepts. Field
|
|
3
|
-
* names/shape mirror the doc's §2 table left column, not any live OpenAI SDK type import — this
|
|
4
|
-
* adapter reads a serialized agent definition (e.g. `__fixtures__/openai-agent.json`), not a
|
|
5
|
-
* running SDK object. */
|
|
6
|
-
export interface OpenAiAgentJson {
|
|
7
|
-
name: string;
|
|
8
|
-
instructions?: string;
|
|
9
|
-
model?: string;
|
|
10
|
-
tools?: Array<{
|
|
11
|
-
type?: string;
|
|
12
|
-
name: string;
|
|
13
|
-
description?: string;
|
|
14
|
-
parameters?: Record<string, unknown>;
|
|
15
|
-
}>;
|
|
16
|
-
handoffs?: Array<{
|
|
17
|
-
agent: string;
|
|
18
|
-
description?: string;
|
|
19
|
-
}>;
|
|
20
|
-
/** OpenAI-specific: no common `Agent` field for this (spc_007 §2's "Guardrails" row lowers to
|
|
21
|
-
* governance policy, not a Canonical IR field) — preserved under `providerOptions.openai`
|
|
22
|
-
* rather than silently dropped (spc_001 §3: "Unknown fields → never silently discarded"). */
|
|
23
|
-
guardrails?: unknown[];
|
|
24
|
-
}
|
|
25
|
-
/** spc_007 §2: OpenAI Agent → DeepStrike `Agent` (spc_001's Canonical Agent IR entry object).
|
|
26
|
-
* Pure Surface→Surface mapping — produces only `Agent`, never a Kernel-internal type
|
|
27
|
-
* (`Tcb`/`Capability`/etc.), matching this doc's own boundary ("Adapter 代码不得进入 Kernel
|
|
28
|
-
* crate").
|
|
29
|
-
*
|
|
30
|
-
* A JSON tool definition carries no executable body, so each mapped tool's `execute` is a
|
|
31
|
-
* placeholder that throws — this adapter only reconstructs declarative shape (name/description/
|
|
32
|
-
* schema/count), never behavior; wiring a real implementation back onto an OpenAI-sourced tool
|
|
33
|
-
* definition is a separate, later concern outside this card. */
|
|
34
|
-
export declare function fromOpenAiAgent(json: OpenAiAgentJson): Agent;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { Agent } from "../../agent.js";
|
|
2
|
-
import { tool } from "../../tools/index.js";
|
|
3
|
-
/** spc_007 §2: OpenAI Agent → DeepStrike `Agent` (spc_001's Canonical Agent IR entry object).
|
|
4
|
-
* Pure Surface→Surface mapping — produces only `Agent`, never a Kernel-internal type
|
|
5
|
-
* (`Tcb`/`Capability`/etc.), matching this doc's own boundary ("Adapter 代码不得进入 Kernel
|
|
6
|
-
* crate").
|
|
7
|
-
*
|
|
8
|
-
* A JSON tool definition carries no executable body, so each mapped tool's `execute` is a
|
|
9
|
-
* placeholder that throws — this adapter only reconstructs declarative shape (name/description/
|
|
10
|
-
* schema/count), never behavior; wiring a real implementation back onto an OpenAI-sourced tool
|
|
11
|
-
* definition is a separate, later concern outside this card. */
|
|
12
|
-
export function fromOpenAiAgent(json) {
|
|
13
|
-
const tools = (json.tools ?? []).map(t => tool(t.name, t.description ?? "", t.parameters ?? { type: "object", properties: {} }, async () => {
|
|
14
|
-
throw new Error(`tool "${t.name}" has no execution binding — fromOpenAiAgent only carries declarative shape`);
|
|
15
|
-
}));
|
|
16
|
-
return new Agent({
|
|
17
|
-
name: json.name,
|
|
18
|
-
instructions: json.instructions,
|
|
19
|
-
model: json.model,
|
|
20
|
-
tools,
|
|
21
|
-
handoffs: json.handoffs,
|
|
22
|
-
...(json.guardrails ? { providerOptions: { openai: { guardrails: json.guardrails } } } : {}),
|
|
23
|
-
});
|
|
24
|
-
}
|