@tangle-network/agent-runtime 0.128.0 → 0.131.1
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 +70 -20
- package/dist/{activation-DhWJ3p8N.js → activation-BCzMOTaV.js} +3 -3
- package/dist/{activation-DhWJ3p8N.js.map → activation-BCzMOTaV.js.map} +1 -1
- package/dist/agent.d.ts +2 -3
- package/dist/agent.js +4 -5
- package/dist/agent.js.map +1 -1
- package/dist/{analyst-loop-DvSciOfB.js → analyst-loop-BE8cDs5Q.js} +2 -2
- package/dist/{analyst-loop-DvSciOfB.js.map → analyst-loop-BE8cDs5Q.js.map} +1 -1
- package/dist/analyst-loop.d.ts +1 -1
- package/dist/analyst-loop.js +1 -1
- package/dist/authoring-Dv3t6SXe.js +163 -0
- package/dist/authoring-Dv3t6SXe.js.map +1 -0
- package/dist/candidate-execution/index.js +4 -4
- package/dist/{candidate-execution-BFpq-Xi6.js → candidate-execution-BNxKr-Bu.js} +5 -5
- package/dist/{candidate-execution-BFpq-Xi6.js.map → candidate-execution-BNxKr-Bu.js.map} +1 -1
- package/dist/{conversation-BpLQZGPH.js → conversation-DNtxaJ1Z.js} +113 -31
- package/dist/conversation-DNtxaJ1Z.js.map +1 -0
- package/dist/conversation.d.ts +2 -2
- package/dist/conversation.js +2 -2
- package/dist/environment-provider-CxvSd1W6.d.ts +86 -0
- package/dist/{environment-provider-DqFS6FSZ.js → environment-provider-Dyg8DtLK.js} +8 -4
- package/dist/environment-provider-Dyg8DtLK.js.map +1 -0
- package/dist/environment-provider.d.ts +1 -1
- package/dist/environment-provider.js +1 -1
- package/dist/graph-xWdv53Le.js +471 -0
- package/dist/graph-xWdv53Le.js.map +1 -0
- package/dist/{improvement-cycle-IJgCbKWQ.js → improvement-cycle-Csp38cWg.js} +133 -224
- package/dist/improvement-cycle-Csp38cWg.js.map +1 -0
- package/dist/{index-BhZhQw77.d.ts → index-CoO7atyo.d.ts} +556 -1278
- package/dist/{index-BhuzfG2r.d.ts → index-DwGtu9nc.d.ts} +7 -9
- package/dist/{index-Efjb3nrQ.d.ts → index-qYHpsmG2.d.ts} +36 -18
- package/dist/index.d.ts +353 -11
- package/dist/index.js +111 -354
- package/dist/index.js.map +1 -1
- package/dist/intelligence.d.ts +6 -6
- package/dist/intelligence.js +9 -8
- package/dist/intelligence.js.map +1 -1
- package/dist/kernel.d.ts +7 -5
- package/dist/kernel.js +13 -9
- package/dist/{knowledge-DF63xPr4.js → knowledge-DPEu4f-0.js} +19 -17
- package/dist/knowledge-DPEu4f-0.js.map +1 -0
- package/dist/knowledge.d.ts +1 -1
- package/dist/knowledge.js +1 -1
- package/dist/{loop-runner-bin-Ckp_9tmD.d.ts → loop-runner-bin-BwgZ8m_7.d.ts} +6 -3
- package/dist/{loop-runner-bin-CWqOpCEw.js → loop-runner-bin-dg6li2-b.js} +5 -27
- package/dist/loop-runner-bin-dg6li2-b.js.map +1 -0
- package/dist/loop-runner-bin.d.ts +1 -1
- package/dist/loop-runner-bin.js +1 -1
- package/dist/materialization-COJ1UYQ-.js +272 -0
- package/dist/materialization-COJ1UYQ-.js.map +1 -0
- package/dist/mcp/bin.js +39 -47
- package/dist/mcp/bin.js.map +1 -1
- package/dist/mcp/index.d.ts +24 -26
- package/dist/mcp/index.js +67 -84
- package/dist/mcp/index.js.map +1 -1
- package/dist/mcp/memory-bin.js +1 -1
- package/dist/{memory-server-DL6cE2Ag.js → memory-server-eD2baiRO.js} +3 -3
- package/dist/{memory-server-DL6cE2Ag.js.map → memory-server-eD2baiRO.js.map} +1 -1
- package/dist/model-policy-CqziaqS1.js +232 -0
- package/dist/model-policy-CqziaqS1.js.map +1 -0
- package/dist/{openai-tools-B68JaOCx.d.ts → openai-tools-D3oMyVGl.d.ts} +2 -2
- package/dist/{openai-tools-D3XfrrQ6.js → openai-tools-zRphjXS4.js} +2 -2
- package/dist/openai-tools-zRphjXS4.js.map +1 -0
- package/dist/{prepare--8EvLqCr.js → prepare-DYWjVcPx.js} +169 -153
- package/dist/prepare-DYWjVcPx.js.map +1 -0
- package/dist/primeintellect/index.d.ts +7 -6
- package/dist/primeintellect/index.js +9 -11
- package/dist/primeintellect/index.js.map +1 -1
- package/dist/profiles.d.ts +21 -174
- package/dist/profiles.js +67 -276
- package/dist/profiles.js.map +1 -1
- package/dist/{protected-model-port-CXVfOUu_.js → protected-model-port-48ALLGxT.js} +2 -2
- package/dist/{protected-model-port-CXVfOUu_.js.map → protected-model-port-48ALLGxT.js.map} +1 -1
- package/dist/{redact-PQzmE1Jn.d.ts → redact-9_Gf-8m3.d.ts} +58 -69
- package/dist/{researcher-CoVqNhfI.js → researcher-Skz5-Uc8.js} +50 -26
- package/dist/researcher-Skz5-Uc8.js.map +1 -0
- package/dist/{run-layout-C2FGmZ3v.js → run-layout-CeJsEAom.js} +2 -2
- package/dist/{run-layout-C2FGmZ3v.js.map → run-layout-CeJsEAom.js.map} +1 -1
- package/dist/runtime-D-QfLbSd.d.ts +893 -0
- package/dist/{runtime-5uDVVfER.js → runtime-cOzDOOHr.js} +315 -1191
- package/dist/runtime-cOzDOOHr.js.map +1 -0
- package/dist/{sandbox-events-Yhd1GYWl.js → sandbox-events-CRDwc5WN.js} +42 -5
- package/dist/sandbox-events-CRDwc5WN.js.map +1 -0
- package/dist/snapshot-CXiiuHhL.js +21 -0
- package/dist/snapshot-CXiiuHhL.js.map +1 -0
- package/dist/{spawn-journal-DsZKDqeh.js → spawn-journal-saHQzqYi.js} +15 -21
- package/dist/spawn-journal-saHQzqYi.js.map +1 -0
- package/dist/stream-agent-turn-C852AgMT.d.ts +128 -0
- package/dist/stream-agent-turn-rYgaOLO0.js +910 -0
- package/dist/stream-agent-turn-rYgaOLO0.js.map +1 -0
- package/dist/{structural-rollout-zY0oqQzO.js → structural-rollout-3uxVGcg2.js} +459 -235
- package/dist/structural-rollout-3uxVGcg2.js.map +1 -0
- package/dist/{supervise-CsTKbH9R.js → supervise-DHYX8gO2.js} +867 -4788
- package/dist/supervise-DHYX8gO2.js.map +1 -0
- package/dist/{supervisor-DpjO0Gmy.js → supervisor-CV6Jh28D.js} +7439 -2897
- package/dist/supervisor-CV6Jh28D.js.map +1 -0
- package/dist/testing.d.ts +3 -1
- package/dist/testing.js +271 -221
- package/dist/testing.js.map +1 -1
- package/dist/{tool-server-RcWgLIsL.js → tool-server-Gs3VvfSK.js} +22 -9
- package/dist/tool-server-Gs3VvfSK.js.map +1 -0
- package/dist/{top-app-5unxqovu.js → top-app-G4M18b6i.js} +3 -3
- package/dist/{top-app-5unxqovu.js.map → top-app-G4M18b6i.js.map} +1 -1
- package/dist/tui/bin.js +1 -1
- package/dist/tui/index.js +1 -1
- package/dist/{environment-provider-CUFsyymu.d.ts → types-C6Q-J0Dt.d.ts} +51 -114
- package/dist/{types-DnNGJ5Gz.d.ts → types-ebIY0dMG.d.ts} +556 -30
- package/dist/{util-MVgdwuIS.js → util-Bw6srryQ.js} +3 -2
- package/dist/{util-MVgdwuIS.js.map → util-Bw6srryQ.js.map} +1 -1
- package/dist/{workspace-archive-BQxvkypI.js → workspace-archive-aOfJ47ms.js} +3 -3
- package/dist/{workspace-archive-BQxvkypI.js.map → workspace-archive-aOfJ47ms.js.map} +1 -1
- package/package.json +13 -15
- package/skills/agent-graphs/IMPROVE.md +3 -3
- package/skills/agent-graphs/SKILL.md +4 -5
- package/skills/agent-graphs/cases/review-pipeline.json +1 -2
- package/skills/agent-graphs/cases/unmeasured-harness.json +2 -4
- package/dist/backends-CiOCyRHb.js +0 -743
- package/dist/backends-CiOCyRHb.js.map +0 -1
- package/dist/conversation-BpLQZGPH.js.map +0 -1
- package/dist/environment-provider-DqFS6FSZ.js.map +0 -1
- package/dist/improvement-cycle-IJgCbKWQ.js.map +0 -1
- package/dist/index-DLM0W1h1.d.ts +0 -545
- package/dist/knowledge-DF63xPr4.js.map +0 -1
- package/dist/local-harness-BIajef4A.d.ts +0 -465
- package/dist/loop-runner-bin-CWqOpCEw.js.map +0 -1
- package/dist/model-resolution-Btd9iIKV.js +0 -98
- package/dist/model-resolution-Btd9iIKV.js.map +0 -1
- package/dist/openai-tools-D3XfrrQ6.js.map +0 -1
- package/dist/prepare--8EvLqCr.js.map +0 -1
- package/dist/researcher-CoVqNhfI.js.map +0 -1
- package/dist/runtime-5uDVVfER.js.map +0 -1
- package/dist/sandbox-events-Yhd1GYWl.js.map +0 -1
- package/dist/spawn-journal-DsZKDqeh.js.map +0 -1
- package/dist/structural-rollout-zY0oqQzO.js.map +0 -1
- package/dist/supervise-CsTKbH9R.js.map +0 -1
- package/dist/supervisor-DpjO0Gmy.js.map +0 -1
- package/dist/tool-server-RcWgLIsL.js.map +0 -1
- package/dist/types-C9j4qg6l.d.ts +0 -500
- package/skills/agent-graphs/cases/floor-trap-pi.json +0 -11
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tool-server-RcWgLIsL.js","names":[],"sources":["../src/mcp/tool-server.ts"],"sourcesContent":["/**\n * `createStdioToolServer` — the generic newline-delimited JSON-RPC 2.0 MCP\n * server core: `initialize` / `notifications/initialized` / `tools/list` /\n * `tools/call` over a stdio-shaped transport, protocol 2024-11-05.\n *\n * Extracted from `createMcpServer` (server.ts) so every in-repo MCP server —\n * the delegation server, the memory server — serves the ONE wire protocol the\n * same-host client (`connectStdioMcp`, runtime/stdio-mcp-client.ts) speaks.\n * A second hand-rolled serve loop could drift from what the client expects;\n * this core makes that impossible by construction.\n *\n * @experimental\n */\n\nimport { createInterface, type Interface as ReadlineInterface } from 'node:readline'\nimport { ValidationError } from '../errors'\nimport type { JsonRpcMessage, JsonRpcResponse, McpToolDescriptor, McpTransport } from './protocol'\n\nexport type { JsonRpcMessage, JsonRpcResponse, McpToolDescriptor, McpTransport } from './protocol'\n\nconst PROTOCOL_VERSION = '2024-11-05'\n\n/** @experimental */\nexport interface StdioToolServerOptions {\n /** Server display name surfaced via `initialize`. */\n serverName: string\n /** Server version surfaced via `initialize`. */\n serverVersion: string\n /** The tools to serve. Duplicate names throw — a silent shadow would hide a tool. */\n tools: readonly McpToolDescriptor[]\n}\n\n/** @experimental */\nexport interface StdioToolServer {\n /** Tools currently registered, keyed by name. */\n readonly tools: ReadonlyMap<string, McpToolDescriptor>\n /** Handle a single parsed JSON-RPC message. Returns the response object (or `null` for notifications). */\n handle(message: JsonRpcMessage): Promise<JsonRpcResponse | null>\n /** Drive the server on a stdio-shaped transport until `stop()` is called. */\n serve(transport?: McpTransport): Promise<void>\n /** Stop a `serve` call. Subsequent requests are rejected. */\n stop(): void\n}\n\n/** Build the generic stdio JSON-RPC tool server. */\nexport function createStdioToolServer(options: StdioToolServerOptions): StdioToolServer {\n const tools = new Map<string, McpToolDescriptor>()\n for (const tool of options.tools) {\n if (tools.has(tool.name)) {\n throw new ValidationError(`createStdioToolServer: duplicate tool name \"${tool.name}\"`)\n }\n tools.set(tool.name, tool)\n }\n\n let stopped = false\n let activeReadline: ReadlineInterface | undefined\n\n async function handle(message: JsonRpcMessage): Promise<JsonRpcResponse | null> {\n if (stopped) {\n return rpcError(message.id ?? null, -32099, 'server stopped')\n }\n if (message.method === 'initialize') {\n return rpcResult(message.id ?? null, {\n protocolVersion: PROTOCOL_VERSION,\n capabilities: { tools: {} },\n serverInfo: { name: options.serverName, version: options.serverVersion },\n })\n }\n if (message.method === 'notifications/initialized') {\n // MCP clients send this after the handshake; it has no id and expects\n // no response.\n return null\n }\n if (message.method === 'tools/list') {\n return rpcResult(message.id ?? null, {\n tools: [...tools.values()].map((tool) => ({\n name: tool.name,\n description: tool.description,\n inputSchema: tool.inputSchema,\n })),\n })\n }\n if (message.method === 'tools/call') {\n const params = (message.params ?? {}) as { name?: unknown; arguments?: unknown }\n const name = typeof params.name === 'string' ? params.name : ''\n const tool = tools.get(name)\n if (!tool) {\n return rpcError(message.id ?? null, -32601, `unknown tool: ${name}`)\n }\n try {\n const output = await tool.handler(params.arguments ?? {})\n return rpcResult(message.id ?? null, {\n content: [{ type: 'text', text: JSON.stringify(output) }],\n structuredContent: output,\n isError: false,\n })\n } catch (err) {\n const reason = err instanceof Error ? err.message : String(err)\n const code = err instanceof TypeError || err instanceof RangeError ? -32602 : -32000\n return rpcError(message.id ?? null, code, reason)\n }\n }\n if (message.id === undefined || message.id === null) return null\n return rpcError(message.id, -32601, `unknown method: ${message.method}`)\n }\n\n async function serve(transport?: McpTransport): Promise<void> {\n const input = transport?.input ?? process.stdin\n const output = transport?.output ?? process.stdout\n const rl = createInterface({ input, crlfDelay: Number.POSITIVE_INFINITY })\n activeReadline = rl\n return new Promise<void>((resolve, reject) => {\n rl.on('line', (line) => {\n const trimmed = line.trim()\n if (!trimmed) return\n let parsed: JsonRpcMessage | undefined\n try {\n parsed = JSON.parse(trimmed) as JsonRpcMessage\n } catch (err) {\n writeResponse(output, rpcError(null, -32700, `parse error: ${(err as Error).message}`))\n return\n }\n if (parsed?.jsonrpc !== '2.0' || typeof parsed.method !== 'string') {\n writeResponse(output, rpcError(parsed?.id ?? null, -32600, 'invalid request'))\n return\n }\n void handle(parsed).then((response) => {\n if (response) writeResponse(output, response)\n })\n })\n rl.on('close', () => resolve())\n rl.on('error', (err) => reject(err))\n if (stopped) {\n rl.close()\n resolve()\n }\n })\n }\n\n function stop(): void {\n stopped = true\n activeReadline?.close()\n activeReadline = undefined\n }\n\n return { tools, handle, serve, stop }\n}\n\nfunction rpcResult(id: number | string | null, result: unknown): JsonRpcResponse {\n return { jsonrpc: '2.0', id, result }\n}\n\nfunction rpcError(\n id: number | string | null,\n code: number,\n message: string,\n data?: unknown,\n): JsonRpcResponse {\n return {\n jsonrpc: '2.0',\n id,\n error: data === undefined ? { code, message } : { code, message, data },\n }\n}\n\nfunction writeResponse(output: NodeJS.WritableStream, response: JsonRpcResponse): void {\n output.write(`${JSON.stringify(response)}\\n`)\n}\n"],"mappings":"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"}
|
package/dist/types-C9j4qg6l.d.ts
DELETED
|
@@ -1,500 +0,0 @@
|
|
|
1
|
-
import { ControlBudget, ControlDecision, ControlEvalResult, ControlRunResult, ControlStep, DataAcquisitionPlan, KnowledgeReadinessReport, KnowledgeRequirement, RunRecord, TraceStore, UserQuestion } from "@tangle-network/agent-eval";
|
|
2
|
-
//#region src/types.d.ts
|
|
3
|
-
/** @stable */
|
|
4
|
-
interface AgentTaskSpec {
|
|
5
|
-
id: string;
|
|
6
|
-
intent: string;
|
|
7
|
-
/** Domain is metadata, not an architectural boundary: tax, legal, gtm, creative, blueprint, redteam, etc. */
|
|
8
|
-
domain?: string;
|
|
9
|
-
inputs?: Record<string, unknown>;
|
|
10
|
-
requiredKnowledge?: KnowledgeRequirement[];
|
|
11
|
-
budget?: Partial<ControlBudget>;
|
|
12
|
-
metadata?: Record<string, unknown>;
|
|
13
|
-
}
|
|
14
|
-
/** @stable */
|
|
15
|
-
interface AgentKnowledgeProvider {
|
|
16
|
-
buildReadiness?(task: AgentTaskSpec): Promise<KnowledgeReadinessReport> | KnowledgeReadinessReport;
|
|
17
|
-
answerQuestions?(questions: UserQuestion[], task: AgentTaskSpec): Promise<Record<string, string>> | Record<string, string>;
|
|
18
|
-
executeAcquisitionPlans?(plans: DataAcquisitionPlan[], task: AgentTaskSpec): Promise<string[]> | string[];
|
|
19
|
-
refreshReadiness?(input: {
|
|
20
|
-
task: AgentTaskSpec;
|
|
21
|
-
previous: KnowledgeReadinessReport;
|
|
22
|
-
userAnswers: Record<string, string>;
|
|
23
|
-
acquiredEvidenceIds: string[];
|
|
24
|
-
}): Promise<KnowledgeReadinessReport> | KnowledgeReadinessReport;
|
|
25
|
-
}
|
|
26
|
-
/** @stable */
|
|
27
|
-
interface AgentTaskContext<TState, TAction, TActionResult, TEval extends ControlEvalResult = ControlEvalResult> {
|
|
28
|
-
task: AgentTaskSpec;
|
|
29
|
-
knowledge: KnowledgeReadinessReport;
|
|
30
|
-
state: TState;
|
|
31
|
-
evals: TEval[];
|
|
32
|
-
history: ControlStep<TState, TAction, TActionResult, TEval>[];
|
|
33
|
-
budget: ControlBudget;
|
|
34
|
-
stepIndex: number;
|
|
35
|
-
wallMs: number;
|
|
36
|
-
spentCostUsd: number;
|
|
37
|
-
remainingCostUsd?: number;
|
|
38
|
-
abortSignal: AbortSignal;
|
|
39
|
-
}
|
|
40
|
-
/** @stable */
|
|
41
|
-
interface AgentAdapter<TState, TAction, TActionResult, TEval extends ControlEvalResult = ControlEvalResult> {
|
|
42
|
-
observe(ctx: {
|
|
43
|
-
task: AgentTaskSpec;
|
|
44
|
-
knowledge: KnowledgeReadinessReport;
|
|
45
|
-
history: ControlStep<TState, TAction, TActionResult, TEval>[];
|
|
46
|
-
abortSignal: AbortSignal;
|
|
47
|
-
}): Promise<TState> | TState;
|
|
48
|
-
validate(ctx: {
|
|
49
|
-
task: AgentTaskSpec;
|
|
50
|
-
knowledge: KnowledgeReadinessReport;
|
|
51
|
-
state: TState;
|
|
52
|
-
history: ControlStep<TState, TAction, TActionResult, TEval>[];
|
|
53
|
-
abortSignal: AbortSignal;
|
|
54
|
-
}): Promise<TEval[]> | TEval[];
|
|
55
|
-
decide(ctx: AgentTaskContext<TState, TAction, TActionResult, TEval>): Promise<ControlDecision<TAction>> | ControlDecision<TAction>;
|
|
56
|
-
act(action: TAction, ctx: AgentTaskContext<TState, TAction, TActionResult, TEval>): Promise<TActionResult> | TActionResult;
|
|
57
|
-
shouldStop?(ctx: AgentTaskContext<TState, TAction, TActionResult, TEval>): Promise<{
|
|
58
|
-
stop: boolean;
|
|
59
|
-
pass: boolean;
|
|
60
|
-
reason: string;
|
|
61
|
-
score?: number;
|
|
62
|
-
}> | {
|
|
63
|
-
stop: boolean;
|
|
64
|
-
pass: boolean;
|
|
65
|
-
reason: string;
|
|
66
|
-
score?: number;
|
|
67
|
-
};
|
|
68
|
-
onKnowledgeBlocked?(ctx: {
|
|
69
|
-
task: AgentTaskSpec;
|
|
70
|
-
knowledge: KnowledgeReadinessReport;
|
|
71
|
-
questions: UserQuestion[];
|
|
72
|
-
acquisitionPlans: DataAcquisitionPlan[];
|
|
73
|
-
}): Promise<ControlDecision<TAction>> | ControlDecision<TAction>;
|
|
74
|
-
getActionCostUsd?(ctx: {
|
|
75
|
-
action: TAction;
|
|
76
|
-
result: TActionResult;
|
|
77
|
-
task: AgentTaskSpec;
|
|
78
|
-
state: TState;
|
|
79
|
-
evals: TEval[];
|
|
80
|
-
history: ControlStep<TState, TAction, TActionResult, TEval>[];
|
|
81
|
-
}): number | undefined;
|
|
82
|
-
projectRunRecords?(result: ControlRunResult<TState, TAction, TActionResult, TEval>, task: AgentTaskSpec): RunRecord[];
|
|
83
|
-
}
|
|
84
|
-
/** @stable */
|
|
85
|
-
type AgentTaskStatus = 'completed' | 'blocked' | 'failed' | 'aborted';
|
|
86
|
-
/** @stable */
|
|
87
|
-
type AgentRuntimeEvent<TState = unknown, TAction = unknown, TActionResult = unknown, TEval extends ControlEvalResult = ControlEvalResult> = {
|
|
88
|
-
type: 'task_start';
|
|
89
|
-
task: AgentTaskSpec;
|
|
90
|
-
} | {
|
|
91
|
-
type: 'readiness_start';
|
|
92
|
-
task: AgentTaskSpec;
|
|
93
|
-
} | {
|
|
94
|
-
type: 'readiness_end';
|
|
95
|
-
task: AgentTaskSpec;
|
|
96
|
-
knowledge: KnowledgeReadinessReport;
|
|
97
|
-
} | {
|
|
98
|
-
type: 'questions_start';
|
|
99
|
-
task: AgentTaskSpec;
|
|
100
|
-
questions: UserQuestion[];
|
|
101
|
-
} | {
|
|
102
|
-
type: 'questions_end';
|
|
103
|
-
task: AgentTaskSpec;
|
|
104
|
-
questions: UserQuestion[];
|
|
105
|
-
userAnswers: Record<string, string>;
|
|
106
|
-
} | {
|
|
107
|
-
type: 'acquisition_start';
|
|
108
|
-
task: AgentTaskSpec;
|
|
109
|
-
acquisitionPlans: DataAcquisitionPlan[];
|
|
110
|
-
} | {
|
|
111
|
-
type: 'acquisition_end';
|
|
112
|
-
task: AgentTaskSpec;
|
|
113
|
-
acquisitionPlans: DataAcquisitionPlan[];
|
|
114
|
-
acquiredEvidenceIds: string[];
|
|
115
|
-
} | {
|
|
116
|
-
type: 'control_start';
|
|
117
|
-
task: AgentTaskSpec;
|
|
118
|
-
knowledge: KnowledgeReadinessReport;
|
|
119
|
-
} | {
|
|
120
|
-
type: 'control_step';
|
|
121
|
-
task: AgentTaskSpec;
|
|
122
|
-
step: ControlStep<TState, TAction, TActionResult, TEval>;
|
|
123
|
-
} | {
|
|
124
|
-
type: 'control_end';
|
|
125
|
-
task: AgentTaskSpec;
|
|
126
|
-
control: ControlRunResult<TState, TAction, TActionResult, TEval>;
|
|
127
|
-
} | {
|
|
128
|
-
type: 'task_end';
|
|
129
|
-
task: AgentTaskSpec;
|
|
130
|
-
status: AgentTaskStatus;
|
|
131
|
-
reason: string;
|
|
132
|
-
};
|
|
133
|
-
/** @stable */
|
|
134
|
-
type AgentRuntimeEventSink<TState = unknown, TAction = unknown, TActionResult = unknown, TEval extends ControlEvalResult = ControlEvalResult> = (event: AgentRuntimeEvent<TState, TAction, TActionResult, TEval>) => Promise<void> | void;
|
|
135
|
-
/**
|
|
136
|
-
*
|
|
137
|
-
* Typed transport / backend failure detail. Carried on `backend_error` and
|
|
138
|
-
* `final` events when the backend's stream throws or the upstream HTTP call
|
|
139
|
-
* returns a non-success status. Lets consumers (a) distinguish "stream
|
|
140
|
-
* completed with no text" from "stream never reached the model" and
|
|
141
|
-
* (b) reconstruct the precise upstream signal (status + truncated body) when
|
|
142
|
-
* building a `RunRecord.error`.
|
|
143
|
-
*
|
|
144
|
-
* `body` is truncated to 2 KiB by the backend so an HTML error page from a
|
|
145
|
-
* misconfigured proxy never bloats event payloads or logs. Consumers needing
|
|
146
|
-
* the full body should inspect the underlying `BackendTransportError.body`
|
|
147
|
-
* via a custom `mapEvent` or backend wrapper.
|
|
148
|
-
*
|
|
149
|
-
* @stable
|
|
150
|
-
*/
|
|
151
|
-
interface BackendErrorDetail {
|
|
152
|
-
/**
|
|
153
|
-
* `'transport'` — upstream HTTP / network failure with optional status code.
|
|
154
|
-
* `'backend'` — the backend's `stream()` generator threw for a non-transport
|
|
155
|
-
* reason (e.g. a custom adapter error, sandbox crash).
|
|
156
|
-
*/
|
|
157
|
-
kind: 'transport' | 'backend';
|
|
158
|
-
message: string;
|
|
159
|
-
/** Upstream HTTP status when known. `0` for connection / abort errors. */
|
|
160
|
-
status?: number;
|
|
161
|
-
/** Truncated response body (≤2 KiB). Diagnostic only — never machine-parsed. */
|
|
162
|
-
body?: string;
|
|
163
|
-
}
|
|
164
|
-
/**
|
|
165
|
-
*
|
|
166
|
-
* OpenAI Chat Completions tool descriptor. The shape mirrors the
|
|
167
|
-
* `/v1/chat/completions` `tools[]` parameter so callers can pass tool
|
|
168
|
-
* definitions through `createOpenAICompatibleBackend({ tools })` without any
|
|
169
|
-
* runtime translation. The router proxies this shape verbatim to Anthropic
|
|
170
|
-
* (translated server-side), DeepSeek, Groq, OpenAI, and Gemini — every model
|
|
171
|
-
* that the eval surface targets.
|
|
172
|
-
*
|
|
173
|
-
* Callers that build their tool list from MCP servers should run a one-shot
|
|
174
|
-
* MCP `tools/list` at config time and project the result into this shape. The
|
|
175
|
-
* runtime intentionally does NOT depend on `@modelcontextprotocol/sdk` —
|
|
176
|
-
* keeping the backend transport thin lets domain repos own MCP plumbing.
|
|
177
|
-
*
|
|
178
|
-
* @stable
|
|
179
|
-
*/
|
|
180
|
-
interface OpenAIChatTool {
|
|
181
|
-
type: 'function';
|
|
182
|
-
function: {
|
|
183
|
-
name: string;
|
|
184
|
-
description?: string;
|
|
185
|
-
parameters?: Record<string, unknown>;
|
|
186
|
-
};
|
|
187
|
-
}
|
|
188
|
-
/**
|
|
189
|
-
*
|
|
190
|
-
* `tool_choice` parameter for OpenAI-compat chat. Same shape as the OpenAI
|
|
191
|
-
* spec: `'auto'` (default — model decides), `'none'` (disable tool calling
|
|
192
|
-
* for this turn), `'required'` (force a tool call), or a specific function
|
|
193
|
-
* pin `{ type: 'function', function: { name } }`.
|
|
194
|
-
*
|
|
195
|
-
* @stable
|
|
196
|
-
*/
|
|
197
|
-
type OpenAIChatToolChoice = 'auto' | 'none' | 'required' | {
|
|
198
|
-
type: 'function';
|
|
199
|
-
function: {
|
|
200
|
-
name: string;
|
|
201
|
-
};
|
|
202
|
-
};
|
|
203
|
-
/**
|
|
204
|
-
*
|
|
205
|
-
* `response_format` parameter for OpenAI-compatible chat endpoints. Use
|
|
206
|
-
* `json_object` when the caller needs syntactically valid JSON, or
|
|
207
|
-
* `json_schema` when the upstream provider supports schema-constrained JSON.
|
|
208
|
-
*
|
|
209
|
-
* @stable
|
|
210
|
-
*/
|
|
211
|
-
type OpenAIChatResponseFormat = {
|
|
212
|
-
type: 'text';
|
|
213
|
-
} | {
|
|
214
|
-
type: 'json_object';
|
|
215
|
-
} | {
|
|
216
|
-
type: 'json_schema';
|
|
217
|
-
json_schema: Record<string, unknown>;
|
|
218
|
-
};
|
|
219
|
-
/** @stable */
|
|
220
|
-
type RuntimeStreamEvent = {
|
|
221
|
-
type: 'task_start';
|
|
222
|
-
task: AgentTaskSpec;
|
|
223
|
-
timestamp: string;
|
|
224
|
-
} | {
|
|
225
|
-
type: 'readiness_start';
|
|
226
|
-
task: AgentTaskSpec;
|
|
227
|
-
timestamp: string;
|
|
228
|
-
} | {
|
|
229
|
-
type: 'readiness_end';
|
|
230
|
-
task: AgentTaskSpec;
|
|
231
|
-
knowledge: KnowledgeReadinessReport;
|
|
232
|
-
decision: KnowledgeReadinessDecision;
|
|
233
|
-
timestamp: string;
|
|
234
|
-
} | {
|
|
235
|
-
type: 'questions_start';
|
|
236
|
-
task: AgentTaskSpec;
|
|
237
|
-
questions: UserQuestion[];
|
|
238
|
-
timestamp: string;
|
|
239
|
-
} | {
|
|
240
|
-
type: 'questions_end';
|
|
241
|
-
task: AgentTaskSpec;
|
|
242
|
-
questions: UserQuestion[];
|
|
243
|
-
userAnswers: Record<string, string>;
|
|
244
|
-
timestamp: string;
|
|
245
|
-
} | {
|
|
246
|
-
type: 'acquisition_start';
|
|
247
|
-
task: AgentTaskSpec;
|
|
248
|
-
acquisitionPlans: DataAcquisitionPlan[];
|
|
249
|
-
timestamp: string;
|
|
250
|
-
} | {
|
|
251
|
-
type: 'acquisition_end';
|
|
252
|
-
task: AgentTaskSpec;
|
|
253
|
-
acquisitionPlans: DataAcquisitionPlan[];
|
|
254
|
-
acquiredEvidenceIds: string[];
|
|
255
|
-
timestamp: string;
|
|
256
|
-
} | {
|
|
257
|
-
type: 'session_created';
|
|
258
|
-
task: AgentTaskSpec;
|
|
259
|
-
session: RuntimeSession;
|
|
260
|
-
timestamp: string;
|
|
261
|
-
} | {
|
|
262
|
-
type: 'session_resumed';
|
|
263
|
-
task: AgentTaskSpec;
|
|
264
|
-
session: RuntimeSession;
|
|
265
|
-
timestamp: string;
|
|
266
|
-
} | {
|
|
267
|
-
type: 'backend_start';
|
|
268
|
-
task: AgentTaskSpec;
|
|
269
|
-
session: RuntimeSession;
|
|
270
|
-
backend: string;
|
|
271
|
-
timestamp: string;
|
|
272
|
-
} | {
|
|
273
|
-
type: 'text_delta';
|
|
274
|
-
task?: AgentTaskSpec;
|
|
275
|
-
session?: RuntimeSession;
|
|
276
|
-
text: string;
|
|
277
|
-
timestamp?: string;
|
|
278
|
-
} | {
|
|
279
|
-
type: 'reasoning_delta';
|
|
280
|
-
task?: AgentTaskSpec;
|
|
281
|
-
session?: RuntimeSession;
|
|
282
|
-
text: string;
|
|
283
|
-
timestamp?: string;
|
|
284
|
-
} | {
|
|
285
|
-
type: 'tool_call';
|
|
286
|
-
task?: AgentTaskSpec;
|
|
287
|
-
session?: RuntimeSession;
|
|
288
|
-
toolName: string;
|
|
289
|
-
toolCallId?: string;
|
|
290
|
-
args?: unknown;
|
|
291
|
-
timestamp?: string;
|
|
292
|
-
} | {
|
|
293
|
-
type: 'tool_result';
|
|
294
|
-
task?: AgentTaskSpec;
|
|
295
|
-
session?: RuntimeSession;
|
|
296
|
-
toolName: string;
|
|
297
|
-
toolCallId?: string;
|
|
298
|
-
result?: unknown;
|
|
299
|
-
timestamp?: string;
|
|
300
|
-
} | {
|
|
301
|
-
type: 'llm_call';
|
|
302
|
-
task?: AgentTaskSpec;
|
|
303
|
-
session?: RuntimeSession;
|
|
304
|
-
model: string;
|
|
305
|
-
tokensIn?: number;
|
|
306
|
-
tokensOut?: number;
|
|
307
|
-
costUsd?: number;
|
|
308
|
-
latencyMs?: number;
|
|
309
|
-
finishReason?: string;
|
|
310
|
-
timestamp?: string;
|
|
311
|
-
} | {
|
|
312
|
-
type: 'artifact';
|
|
313
|
-
task?: AgentTaskSpec;
|
|
314
|
-
session?: RuntimeSession;
|
|
315
|
-
artifactId: string;
|
|
316
|
-
name?: string;
|
|
317
|
-
mimeType?: string;
|
|
318
|
-
uri?: string;
|
|
319
|
-
content?: string;
|
|
320
|
-
metadata?: Record<string, unknown>;
|
|
321
|
-
timestamp?: string;
|
|
322
|
-
} | {
|
|
323
|
-
type: 'proposal_created';
|
|
324
|
-
task?: AgentTaskSpec;
|
|
325
|
-
session?: RuntimeSession;
|
|
326
|
-
proposalId: string;
|
|
327
|
-
title: string;
|
|
328
|
-
status?: 'pending' | 'approved' | 'rejected';
|
|
329
|
-
content?: string;
|
|
330
|
-
timestamp?: string;
|
|
331
|
-
} | {
|
|
332
|
-
type: 'backend_error';
|
|
333
|
-
task: AgentTaskSpec;
|
|
334
|
-
session?: RuntimeSession;
|
|
335
|
-
backend: string;
|
|
336
|
-
message: string;
|
|
337
|
-
recoverable: boolean;
|
|
338
|
-
/**
|
|
339
|
-
* Typed transport diagnostic. Present when the upstream returned a
|
|
340
|
-
* non-success HTTP status or every retry attempt threw. Consumers MUST
|
|
341
|
-
* surface this onto their `RunRecord.error` — silently treating a
|
|
342
|
-
* `backend_error` as "no output" hides credit exhaustion, auth failure,
|
|
343
|
-
* and upstream outages from operators.
|
|
344
|
-
* - `kind: 'transport'` — HTTP / network failure with optional `status`
|
|
345
|
-
* + truncated response `body`.
|
|
346
|
-
* - `kind: 'backend'` — the backend's `stream()` generator threw for a
|
|
347
|
-
* reason that isn't a recognized transport failure.
|
|
348
|
-
*/
|
|
349
|
-
error?: BackendErrorDetail;
|
|
350
|
-
timestamp: string;
|
|
351
|
-
} | {
|
|
352
|
-
type: 'backend_end';
|
|
353
|
-
task: AgentTaskSpec;
|
|
354
|
-
session: RuntimeSession;
|
|
355
|
-
backend: string;
|
|
356
|
-
timestamp: string;
|
|
357
|
-
} | {
|
|
358
|
-
type: 'task_end';
|
|
359
|
-
task: AgentTaskSpec;
|
|
360
|
-
status: AgentTaskStatus;
|
|
361
|
-
reason: string;
|
|
362
|
-
timestamp: string;
|
|
363
|
-
} | {
|
|
364
|
-
type: 'final';
|
|
365
|
-
task: AgentTaskSpec;
|
|
366
|
-
session?: RuntimeSession;
|
|
367
|
-
status: AgentTaskStatus;
|
|
368
|
-
reason: string;
|
|
369
|
-
text?: string;
|
|
370
|
-
metadata?: Record<string, unknown>;
|
|
371
|
-
/**
|
|
372
|
-
* Typed terminal-error diagnostic. Mirrors the `backend_error.error`
|
|
373
|
-
* shape so a consumer that only listens for `final` still receives a
|
|
374
|
-
* loud, structured failure when the backend never produced output. Only
|
|
375
|
-
* set when `status !== 'completed'`. Consumers building a `RunRecord`
|
|
376
|
-
* MUST map this to `RunRecord.error` rather than recording silent
|
|
377
|
-
* `error: null` with empty `finalText`.
|
|
378
|
-
*/
|
|
379
|
-
error?: BackendErrorDetail;
|
|
380
|
-
timestamp: string;
|
|
381
|
-
};
|
|
382
|
-
/** @stable */
|
|
383
|
-
interface RuntimeSession {
|
|
384
|
-
id: string;
|
|
385
|
-
backend: string;
|
|
386
|
-
status: 'active' | 'completed' | 'failed' | 'aborted';
|
|
387
|
-
resumeToken?: string;
|
|
388
|
-
createdAt: string;
|
|
389
|
-
updatedAt: string;
|
|
390
|
-
metadata?: Record<string, unknown>;
|
|
391
|
-
}
|
|
392
|
-
/** @stable */
|
|
393
|
-
interface RuntimeSessionStore {
|
|
394
|
-
get(sessionId: string): Promise<RuntimeSession | undefined> | RuntimeSession | undefined;
|
|
395
|
-
put(session: RuntimeSession): Promise<void> | void;
|
|
396
|
-
appendEvent?(sessionId: string, event: RuntimeStreamEvent): Promise<void> | void;
|
|
397
|
-
listEvents?(sessionId: string): Promise<RuntimeStreamEvent[]> | RuntimeStreamEvent[];
|
|
398
|
-
}
|
|
399
|
-
/** @stable */
|
|
400
|
-
interface AgentBackendInput {
|
|
401
|
-
task: AgentTaskSpec;
|
|
402
|
-
message?: string;
|
|
403
|
-
messages?: Array<{
|
|
404
|
-
role: string;
|
|
405
|
-
content: string;
|
|
406
|
-
}>;
|
|
407
|
-
inputs?: Record<string, unknown>;
|
|
408
|
-
}
|
|
409
|
-
/** @stable */
|
|
410
|
-
interface AgentBackendContext {
|
|
411
|
-
task: AgentTaskSpec;
|
|
412
|
-
knowledge: KnowledgeReadinessReport;
|
|
413
|
-
session: RuntimeSession;
|
|
414
|
-
signal?: AbortSignal;
|
|
415
|
-
/**
|
|
416
|
-
* Conversation/run identifier when this call is part of a multi-agent run.
|
|
417
|
-
* Backends should stamp it into any trace/log emission so cross-participant
|
|
418
|
-
* events correlate. Absent when the call is a stand-alone `runAgentTask`.
|
|
419
|
-
*/
|
|
420
|
-
runId?: string;
|
|
421
|
-
/**
|
|
422
|
-
* Deterministic turn id for this single call. Stable across retries of the
|
|
423
|
-
* same logical turn so a caching gateway / idempotent backend can dedupe.
|
|
424
|
-
*/
|
|
425
|
-
turnId?: string;
|
|
426
|
-
/**
|
|
427
|
-
* If this call is itself nested inside a higher-order conversation
|
|
428
|
-
* (recursion via `createConversationBackend`), the enclosing turn's id.
|
|
429
|
-
* Used for trace stitching across nested orchestration.
|
|
430
|
-
*/
|
|
431
|
-
parentTurnId?: string;
|
|
432
|
-
/**
|
|
433
|
-
* Headers to forward verbatim to any outbound HTTP the backend issues:
|
|
434
|
-
* `X-Tangle-Forwarded-Authorization`, `X-Tangle-Forwarded-Depth`,
|
|
435
|
-
* run/turn correlation. Backends that issue HTTP MUST merge these into
|
|
436
|
-
* the outbound request; backends that don't issue HTTP may ignore them.
|
|
437
|
-
*/
|
|
438
|
-
propagatedHeaders?: Readonly<Record<string, string>>;
|
|
439
|
-
}
|
|
440
|
-
/** @stable */
|
|
441
|
-
interface AgentExecutionBackend<TInput extends AgentBackendInput = AgentBackendInput> {
|
|
442
|
-
kind: string;
|
|
443
|
-
start?(input: TInput, context: Omit<AgentBackendContext, 'session'> & {
|
|
444
|
-
requestedSessionId?: string;
|
|
445
|
-
}): Promise<RuntimeSession> | RuntimeSession;
|
|
446
|
-
resume?(session: RuntimeSession, input: TInput, context: Omit<AgentBackendContext, 'session'>): Promise<RuntimeSession> | RuntimeSession;
|
|
447
|
-
stream(input: TInput, context: AgentBackendContext): AsyncIterable<RuntimeStreamEvent>;
|
|
448
|
-
stop?(session: RuntimeSession, reason: string): Promise<void> | void;
|
|
449
|
-
}
|
|
450
|
-
/** @stable */
|
|
451
|
-
interface RunAgentTaskStreamOptions<TInput extends AgentBackendInput = AgentBackendInput> {
|
|
452
|
-
task: AgentTaskSpec;
|
|
453
|
-
backend: AgentExecutionBackend<TInput>;
|
|
454
|
-
input?: Omit<TInput, 'task'>;
|
|
455
|
-
knowledge?: AgentKnowledgeProvider;
|
|
456
|
-
sessionStore?: RuntimeSessionStore;
|
|
457
|
-
sessionId?: string;
|
|
458
|
-
resume?: boolean;
|
|
459
|
-
signal?: AbortSignal;
|
|
460
|
-
minimumReadinessScore?: number;
|
|
461
|
-
}
|
|
462
|
-
/** @stable */
|
|
463
|
-
interface RunAgentTaskOptions<TState, TAction, TActionResult, TEval extends ControlEvalResult = ControlEvalResult> {
|
|
464
|
-
task: AgentTaskSpec;
|
|
465
|
-
adapter: AgentAdapter<TState, TAction, TActionResult, TEval>;
|
|
466
|
-
knowledge?: AgentKnowledgeProvider;
|
|
467
|
-
onEvent?: AgentRuntimeEventSink<TState, TAction, TActionResult, TEval>;
|
|
468
|
-
store?: TraceStore;
|
|
469
|
-
signal?: AbortSignal;
|
|
470
|
-
scenarioId?: string;
|
|
471
|
-
projectId?: string;
|
|
472
|
-
variantId?: string;
|
|
473
|
-
minimumReadinessScore?: number;
|
|
474
|
-
}
|
|
475
|
-
/** @stable */
|
|
476
|
-
interface AgentTaskRunResult<TState, TAction, TActionResult, TEval extends ControlEvalResult = ControlEvalResult> {
|
|
477
|
-
task: AgentTaskSpec;
|
|
478
|
-
status: AgentTaskStatus;
|
|
479
|
-
knowledge: KnowledgeReadinessReport;
|
|
480
|
-
questions: UserQuestion[];
|
|
481
|
-
acquisitionPlans: DataAcquisitionPlan[];
|
|
482
|
-
userAnswers: Record<string, string>;
|
|
483
|
-
acquiredEvidenceIds: string[];
|
|
484
|
-
control: ControlRunResult<TState, TAction, TActionResult, TEval>;
|
|
485
|
-
runRecords: RunRecord[];
|
|
486
|
-
}
|
|
487
|
-
/** @stable */
|
|
488
|
-
interface KnowledgeReadinessDecision {
|
|
489
|
-
passed: boolean;
|
|
490
|
-
status: 'ready' | 'blocked' | 'caveat';
|
|
491
|
-
reason: string;
|
|
492
|
-
readinessScore: number;
|
|
493
|
-
recommendedAction: KnowledgeReadinessReport['recommendedAction'];
|
|
494
|
-
severity: KnowledgeReadinessReport['severity'];
|
|
495
|
-
blockingGapIds: string[];
|
|
496
|
-
nonBlockingGapIds: string[];
|
|
497
|
-
}
|
|
498
|
-
//#endregion
|
|
499
|
-
export { RunAgentTaskOptions as _, AgentKnowledgeProvider as a, RuntimeSessionStore as b, AgentTaskContext as c, AgentTaskStatus as d, BackendErrorDetail as f, OpenAIChatToolChoice as g, OpenAIChatTool as h, AgentExecutionBackend as i, AgentTaskRunResult as l, OpenAIChatResponseFormat as m, AgentBackendContext as n, AgentRuntimeEvent as o, KnowledgeReadinessDecision as p, AgentBackendInput as r, AgentRuntimeEventSink as s, AgentAdapter as t, AgentTaskSpec as u, RunAgentTaskStreamOptions as v, RuntimeStreamEvent as x, RuntimeSession as y };
|
|
500
|
-
//# sourceMappingURL=types-C9j4qg6l.d.ts.map
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"id": "floor-trap-pi",
|
|
3
|
-
"brief": "Cheap little task: have a pi agent write a one-line file. Keep the budget tight, like a few thousand tokens.",
|
|
4
|
-
"expect": {
|
|
5
|
-
"nodes": 1,
|
|
6
|
-
"analyzesWarranted": false,
|
|
7
|
-
"floorTrap": true,
|
|
8
|
-
"mustBudgetAtLeast": 31211,
|
|
9
|
-
"correctAuthorOverridesBrief": true
|
|
10
|
-
}
|
|
11
|
-
}
|