@tangle-network/agent-runtime 0.72.0 → 0.73.0
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/dist/agent.d.ts +1 -1
- package/dist/agent.js +4 -3
- package/dist/agent.js.map +1 -1
- package/dist/analyst-loop.d.ts +1 -1
- package/dist/analyst-loop.js +3 -2
- package/dist/{chunk-VYXBFWHZ.js → chunk-7ODB76J5.js} +2 -2
- package/dist/{chunk-PHKNOAOU.js → chunk-HPYWEFVY.js} +25 -7
- package/dist/chunk-HPYWEFVY.js.map +1 -0
- package/dist/{chunk-P5OKDSLB.js → chunk-IODKUOBA.js} +5 -3
- package/dist/{chunk-P5OKDSLB.js.map → chunk-IODKUOBA.js.map} +1 -1
- package/dist/chunk-NBV35BR6.js +68 -0
- package/dist/chunk-NBV35BR6.js.map +1 -0
- package/dist/{chunk-55WKGOGU.js → chunk-NCH4XUZ7.js} +111 -31
- package/dist/chunk-NCH4XUZ7.js.map +1 -0
- package/dist/{chunk-VLF5RHEQ.js → chunk-T2HVQVB4.js} +1 -66
- package/dist/chunk-T2HVQVB4.js.map +1 -0
- package/dist/{chunk-HXVMLRYU.js → chunk-U56XGKVY.js} +7 -7
- package/dist/{coordination-CFVF0OzX.d.ts → coordination-DU0saWeg.d.ts} +8 -2
- package/dist/index.d.ts +6 -6
- package/dist/index.js +10 -9
- package/dist/index.js.map +1 -1
- package/dist/intelligence.d.ts +1 -1
- package/dist/lifecycle.d.ts +281 -0
- package/dist/lifecycle.js +174 -0
- package/dist/lifecycle.js.map +1 -0
- package/dist/{loop-runner-bin-B7biH0Gk.d.ts → loop-runner-bin-eD3m0rHW.d.ts} +2 -2
- package/dist/loop-runner-bin.d.ts +4 -4
- package/dist/loop-runner-bin.js +6 -5
- package/dist/loops.d.ts +45 -9
- package/dist/loops.js +6 -3
- package/dist/mcp/bin.js +6 -5
- package/dist/mcp/bin.js.map +1 -1
- package/dist/mcp/index.d.ts +6 -6
- package/dist/mcp/index.js +5 -4
- package/dist/mcp/index.js.map +1 -1
- package/dist/{openai-tools-DOI5mKNw.d.ts → openai-tools-CBurv8Cu.d.ts} +1 -1
- package/dist/profiles.d.ts +1 -1
- package/dist/{types-K8-xkiw1.d.ts → types-JufmXF2a.d.ts} +80 -1
- package/dist/{worktree-JXGJ1MxQ.d.ts → worktree-DaxOvw-C.d.ts} +1 -1
- package/dist/{worktree-fanout-DJHQy7Ux.d.ts → worktree-fanout-DIffZohV.d.ts} +15 -5
- package/package.json +6 -1
- package/dist/chunk-55WKGOGU.js.map +0 -1
- package/dist/chunk-PHKNOAOU.js.map +0 -1
- package/dist/chunk-VLF5RHEQ.js.map +0 -1
- /package/dist/{chunk-VYXBFWHZ.js.map → chunk-7ODB76J5.js.map} +0 -0
- /package/dist/{chunk-HXVMLRYU.js.map → chunk-U56XGKVY.js.map} +0 -0
|
@@ -1,58 +1,3 @@
|
|
|
1
|
-
// src/errors.ts
|
|
2
|
-
import { AgentEvalError } from "@tangle-network/agent-eval";
|
|
3
|
-
import {
|
|
4
|
-
AgentEvalError as AgentEvalError2,
|
|
5
|
-
ConfigError,
|
|
6
|
-
JudgeError,
|
|
7
|
-
NotFoundError,
|
|
8
|
-
ValidationError
|
|
9
|
-
} from "@tangle-network/agent-eval";
|
|
10
|
-
var SessionMismatchError = class extends AgentEvalError {
|
|
11
|
-
sessionBackend;
|
|
12
|
-
requestedBackend;
|
|
13
|
-
constructor(sessionBackend, requestedBackend, options) {
|
|
14
|
-
super(
|
|
15
|
-
"validation",
|
|
16
|
-
`Cannot resume ${sessionBackend} session with ${requestedBackend} backend`,
|
|
17
|
-
options
|
|
18
|
-
);
|
|
19
|
-
this.sessionBackend = sessionBackend;
|
|
20
|
-
this.requestedBackend = requestedBackend;
|
|
21
|
-
}
|
|
22
|
-
};
|
|
23
|
-
var BackendTransportError = class extends AgentEvalError {
|
|
24
|
-
backend;
|
|
25
|
-
status;
|
|
26
|
-
/**
|
|
27
|
-
* Truncated upstream response body (≤2 KiB) when available. Diagnostic
|
|
28
|
-
* only — surfaces in `backend_error.error.body` and `final.error.body`
|
|
29
|
-
* so operators can see "free_tier_limit", "invalid_api_key", etc. without
|
|
30
|
-
* cracking the log line open.
|
|
31
|
-
*/
|
|
32
|
-
body;
|
|
33
|
-
constructor(backend, message, options) {
|
|
34
|
-
super("config", message, options);
|
|
35
|
-
this.backend = backend;
|
|
36
|
-
this.status = options?.status;
|
|
37
|
-
this.body = options?.body;
|
|
38
|
-
}
|
|
39
|
-
};
|
|
40
|
-
var RuntimeRunStateError = class extends AgentEvalError {
|
|
41
|
-
constructor(message, options) {
|
|
42
|
-
super("validation", message, options);
|
|
43
|
-
}
|
|
44
|
-
};
|
|
45
|
-
var PlannerError = class extends AgentEvalError {
|
|
46
|
-
constructor(message, options) {
|
|
47
|
-
super("validation", message, options);
|
|
48
|
-
}
|
|
49
|
-
};
|
|
50
|
-
var AnalystError = class extends AgentEvalError {
|
|
51
|
-
constructor(message, options) {
|
|
52
|
-
super("validation", message, options);
|
|
53
|
-
}
|
|
54
|
-
};
|
|
55
|
-
|
|
56
1
|
// src/runtime/sandbox-events.ts
|
|
57
2
|
function extractLlmCallEvent(event, agentRunName) {
|
|
58
3
|
if (!event || typeof event !== "object") return void 0;
|
|
@@ -127,17 +72,7 @@ function mapSandboxEvent(event, opts = {}) {
|
|
|
127
72
|
}
|
|
128
73
|
|
|
129
74
|
export {
|
|
130
|
-
SessionMismatchError,
|
|
131
|
-
BackendTransportError,
|
|
132
|
-
RuntimeRunStateError,
|
|
133
|
-
PlannerError,
|
|
134
|
-
AnalystError,
|
|
135
|
-
AgentEvalError2 as AgentEvalError,
|
|
136
|
-
ConfigError,
|
|
137
|
-
JudgeError,
|
|
138
|
-
NotFoundError,
|
|
139
|
-
ValidationError,
|
|
140
75
|
extractLlmCallEvent,
|
|
141
76
|
mapSandboxEvent
|
|
142
77
|
};
|
|
143
|
-
//# sourceMappingURL=chunk-
|
|
78
|
+
//# sourceMappingURL=chunk-T2HVQVB4.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/runtime/sandbox-events.ts"],"sourcesContent":["/**\n * Sandbox-event → runtime-event mapping.\n *\n * The sandbox SDK emits a polymorphic `SandboxEvent = { type, data, id? }`\n * whose `type` vocabulary is backend-determined (opencode, etc.) rather than\n * enumerated by the SDK. Two consumers project it:\n * - the loop kernel's cost ledger (`extractLlmCallEvent`) — sums usage off\n * every cost-bearing event, regardless of stream shape;\n * - the `AgentRuntime.act` streaming contract (`mapSandboxEvent`) — projects\n * incremental events to the `RuntimeStreamEvent` chat-UX vocabulary.\n *\n * Both live here so the empirically-observed `type` vocabulary has one home.\n */\n\nimport type { SandboxEvent } from '@tangle-network/sandbox'\nimport type { RuntimeStreamEvent } from '../types'\n\n/**\n * Extract a `RuntimeStreamEvent`-shaped `llm_call` from a sandbox event when\n * the event carries usage/cost data. Returns `undefined` for non-cost events\n * so the kernel can iterate the full stream without branching.\n *\n * Canonical cost-carrying types observed in the wild:\n * - `llm_call` — `data: { model, tokensIn, tokensOut, costUsd, ... }`\n * - `message.completed` / `result` — `data: { usage: { inputTokens,\n * outputTokens, totalCostUsd? } }`\n * - `cost.usage` / `usage` — same shape under a dedicated type\n *\n * Numeric coercion is strict: `Number.isFinite` gates every accumulator write\n * so a sentinel `NaN` from a misbehaving backend cannot poison the ledger.\n */\nexport function extractLlmCallEvent(\n event: SandboxEvent,\n agentRunName: string,\n): (RuntimeStreamEvent & { type: 'llm_call' }) | undefined {\n if (!event || typeof event !== 'object') return undefined\n const type = String(event.type ?? '')\n const data =\n event.data && typeof event.data === 'object'\n ? (event.data as Record<string, unknown>)\n : ({} as Record<string, unknown>)\n\n if (type === 'llm_call' || type === 'cost.usage' || type === 'usage') {\n return buildLlmCall(data, agentRunName)\n }\n if (type === 'message.completed' || type === 'result' || type === 'final') {\n const usage = data.usage as Record<string, unknown> | undefined\n if (!usage || typeof usage !== 'object') return undefined\n return buildLlmCall({ ...usage, model: data.model ?? usage.model }, agentRunName)\n }\n // sandbox 0.4.0 terminal event: `data = { tokenUsage: { inputTokens, outputTokens,\n // reasoningTokens, cacheReadInputTokens }, totalCostUsd }`. Usage lives under\n // `tokenUsage` (not `usage`) and the cost is top-level — neither matched the\n // branches above, so an in-process loopDispatch run reported {0,0} and the\n // backend-integrity guard misread a real run as a stub. Reasoning tokens are\n // billed output (reasoning models), so they fold into the output count.\n if (type === 'done') {\n const usage = data.tokenUsage as Record<string, unknown> | undefined\n if (!usage || typeof usage !== 'object') return undefined\n const out = pickFiniteNumber(usage, ['outputTokens', 'completion_tokens', 'tokensOut'])\n const reasoning = pickFiniteNumber(usage, ['reasoningTokens'])\n const mergedOut =\n out !== undefined || reasoning !== undefined ? (out ?? 0) + (reasoning ?? 0) : undefined\n return buildLlmCall(\n {\n inputTokens: usage.inputTokens,\n outputTokens: mergedOut,\n totalCostUsd: data.totalCostUsd,\n model: data.model ?? usage.model,\n },\n agentRunName,\n )\n }\n return undefined\n}\n\nfunction buildLlmCall(\n data: Record<string, unknown>,\n agentRunName: string,\n): (RuntimeStreamEvent & { type: 'llm_call' }) | undefined {\n const tokensIn = pickFiniteNumber(data, ['tokensIn', 'inputTokens', 'prompt_tokens'])\n const tokensOut = pickFiniteNumber(data, ['tokensOut', 'outputTokens', 'completion_tokens'])\n const costUsd = pickFiniteNumber(data, ['costUsd', 'totalCostUsd', 'cost_usd', 'cost'])\n if (tokensIn === undefined && tokensOut === undefined && costUsd === undefined) {\n return undefined\n }\n const model = typeof data.model === 'string' && data.model.length > 0 ? data.model : agentRunName\n const event: RuntimeStreamEvent & { type: 'llm_call' } = {\n type: 'llm_call',\n model,\n }\n if (tokensIn !== undefined) event.tokensIn = tokensIn\n if (tokensOut !== undefined) event.tokensOut = tokensOut\n if (costUsd !== undefined) event.costUsd = costUsd\n return event\n}\n\nfunction pickFiniteNumber(data: Record<string, unknown>, keys: string[]): number | undefined {\n for (const key of keys) {\n const value = data[key]\n if (typeof value === 'number' && Number.isFinite(value)) return value\n }\n return undefined\n}\n\n/**\n * Project one `SandboxEvent` onto the `RuntimeStreamEvent` chat-UX vocabulary,\n * for runtimes that bridge a sandbox `streamPrompt` into the\n * `AgentRuntime.act` streaming contract. Returns `undefined` for events that\n * have no faithful projection — the raw stream is preserved separately for the\n * `OutputAdapter`, so an unmapped event never loses data.\n *\n * Mapped (the task-optional incremental variants — no synthesized task\n * lifecycle, no guessed tool-part shapes):\n * - `message.part.updated` text part → `text_delta`\n * - `message.part.updated` reasoning/thinking part → `reasoning_delta`\n * - cost-bearing events → `llm_call` (shared with the ledger extractor)\n *\n * The opencode backend emits incremental text as\n * `{ type: 'message.part.updated', data: { part: { type, text }, delta } }`;\n * `delta` is the increment, `part.text` the running accumulation.\n */\nexport function mapSandboxEvent(\n event: SandboxEvent,\n opts: { agentRunName?: string } = {},\n): RuntimeStreamEvent | undefined {\n if (!event || typeof event !== 'object') return undefined\n const type = String(event.type ?? '')\n const data =\n event.data && typeof event.data === 'object'\n ? (event.data as Record<string, unknown>)\n : ({} as Record<string, unknown>)\n\n if (type === 'message.part.updated') {\n const part =\n data.part && typeof data.part === 'object' ? (data.part as Record<string, unknown>) : {}\n const partType = String(part.type ?? '')\n const delta = typeof data.delta === 'string' ? data.delta : undefined\n const text = delta ?? (typeof part.text === 'string' ? part.text : undefined)\n if (text === undefined) return undefined\n if (partType === 'text') return { type: 'text_delta', text }\n if (partType === 'reasoning' || partType === 'thinking')\n return { type: 'reasoning_delta', text }\n return undefined\n }\n\n return extractLlmCallEvent(event, opts.agentRunName ?? 'agent')\n}\n"],"mappings":"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","names":[]}
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
runAnalystLoop
|
|
3
|
-
} from "./chunk-P5OKDSLB.js";
|
|
4
1
|
import {
|
|
5
2
|
createKbGate
|
|
6
3
|
} from "./chunk-FNMGYYSS.js";
|
|
@@ -8,13 +5,16 @@ import {
|
|
|
8
5
|
definePersona,
|
|
9
6
|
runPersonified,
|
|
10
7
|
worktreeFanout
|
|
11
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-HPYWEFVY.js";
|
|
12
9
|
import {
|
|
13
10
|
createExecutorRegistry
|
|
14
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-NCH4XUZ7.js";
|
|
12
|
+
import {
|
|
13
|
+
runAnalystLoop
|
|
14
|
+
} from "./chunk-IODKUOBA.js";
|
|
15
15
|
import {
|
|
16
16
|
ConfigError
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-NBV35BR6.js";
|
|
18
18
|
|
|
19
19
|
// src/loop-runner.ts
|
|
20
20
|
import {
|
|
@@ -196,4 +196,4 @@ export {
|
|
|
196
196
|
runLoopRunnerCli,
|
|
197
197
|
parseLoopRunnerArgv
|
|
198
198
|
};
|
|
199
|
-
//# sourceMappingURL=chunk-
|
|
199
|
+
//# sourceMappingURL=chunk-U56XGKVY.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { L as LocalHarness, p as ExecutorFactory, E as ExecutorRegistry, o as DeliverableSpec, l as Spend, g as Agent, m as Scope, h as ResultBlobStore, B as Budget } from './worktree-
|
|
1
|
+
import { L as LocalHarness, p as ExecutorFactory, E as ExecutorRegistry, o as DeliverableSpec, l as Spend, g as Agent, m as Scope, h as ResultBlobStore, B as Budget } from './worktree-DaxOvw-C.js';
|
|
2
2
|
import { AgentProfile } from '@tangle-network/agent-interface';
|
|
3
3
|
import { U as UiLens, a as UiFinding, C as CoderTask } from './substrate-rNj6TDc3.js';
|
|
4
|
-
import { e as LoopTraceEmitter, c as LoopTraceEvent, S as SandboxClient, A as AgentRunSpec, E as ExecCtx } from './types-
|
|
4
|
+
import { e as LoopTraceEmitter, c as LoopTraceEvent, S as SandboxClient, A as AgentRunSpec, E as ExecCtx } from './types-JufmXF2a.js';
|
|
5
5
|
import { SandboxEvent, SandboxInstance, BackendType } from '@tangle-network/sandbox';
|
|
6
6
|
import { AgentEvalError } from '@tangle-network/agent-eval';
|
|
7
7
|
import { O as OtelExporter } from './otel-export-BKmNwiCb.js';
|
|
@@ -2027,6 +2027,12 @@ interface CoordinationToolsOptions {
|
|
|
2027
2027
|
* and queued for the driver to pull via `await_event`. Omit/empty = no auto-analysis (default;
|
|
2028
2028
|
* the driver can still run lenses on demand via `run_analyst`). Requires `analysts`. */
|
|
2029
2029
|
readonly analyzeOnSettle?: ReadonlyArray<string>;
|
|
2030
|
+
/** Hard cap on how many workers may be LIVE (spawned but not yet settled) at once. `spawn_agent`
|
|
2031
|
+
* counts the scope's non-terminal nodes and fails closed (`error: 'max-live-workers'`) BEFORE
|
|
2032
|
+
* reserving from the pool when the cap is already met — a concurrency fence on top of the
|
|
2033
|
+
* conserved-budget fence (the pool bounds total work; this bounds simultaneous work, e.g. live
|
|
2034
|
+
* sandboxes/boxes). Omit or `<= 0` = no cap (the prior behavior; the pool stays the only fence). */
|
|
2035
|
+
readonly maxLiveWorkers?: number;
|
|
2030
2036
|
}
|
|
2031
2037
|
/**
|
|
2032
2038
|
* The supervisor-side toolbox returned by {@link createCoordinationTools}: the MCP tool
|
package/dist/index.d.ts
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { AgentProfile, AgentEvalError, AnalystFinding, KnowledgeReadinessReport, RunRecord, ControlEvalResult, KnowledgeRequirement } from '@tangle-network/agent-eval';
|
|
2
2
|
export { AgentEvalError, AgentEvalErrorCode, ConfigError, ControlBudget, ControlDecision, ControlEvalResult, ControlRunResult, ControlStep, DataAcquisitionPlan, JudgeError, KnowledgeReadinessReport, KnowledgeRequirement, NotFoundError, RunRecord, ValidationError } from '@tangle-network/agent-eval';
|
|
3
|
-
import { f as AgentBackendInput, g as AgentExecutionBackend, O as OpenAIChatTool, h as OpenAIChatToolChoice, i as AgentBackendContext, R as RuntimeStreamEvent, K as KnowledgeReadinessDecision, j as RunAgentTaskOptions, k as AgentTaskRunResult, l as RunAgentTaskStreamOptions, m as AgentRuntimeEvent, n as AgentTaskStatus, o as RuntimeSessionStore, p as RuntimeSession, b as RuntimeHooks } from './types-
|
|
4
|
-
export { q as AgentAdapter, r as AgentKnowledgeProvider, s as AgentRuntimeEventSink, t as AgentTaskContext, u as AgentTaskSpec, B as BackendErrorDetail, v as RuntimeDecisionEvidenceRef, w as RuntimeDecisionKind, x as RuntimeDecisionPoint, y as RuntimeHookContext, z as RuntimeHookErrorContext, C as RuntimeHookEvent, D as RuntimeHookPhase, F as RuntimeHookTarget, G as RuntimeRunHandle, H as RuntimeRunPersistenceAdapter, J as RuntimeRunRow, M as composeRuntimeHooks, N as defineRuntimeHooks, P as notifyRuntimeDecisionPoint, Q as notifyRuntimeHookEvent, T as startRuntimeRun } from './types-
|
|
3
|
+
import { f as AgentBackendInput, g as AgentExecutionBackend, O as OpenAIChatTool, h as OpenAIChatToolChoice, i as AgentBackendContext, R as RuntimeStreamEvent, K as KnowledgeReadinessDecision, j as RunAgentTaskOptions, k as AgentTaskRunResult, l as RunAgentTaskStreamOptions, m as AgentRuntimeEvent, n as AgentTaskStatus, o as RuntimeSessionStore, p as RuntimeSession, b as RuntimeHooks } from './types-JufmXF2a.js';
|
|
4
|
+
export { q as AgentAdapter, r as AgentKnowledgeProvider, s as AgentRuntimeEventSink, t as AgentTaskContext, u as AgentTaskSpec, B as BackendErrorDetail, v as RuntimeDecisionEvidenceRef, w as RuntimeDecisionKind, x as RuntimeDecisionPoint, y as RuntimeHookContext, z as RuntimeHookErrorContext, C as RuntimeHookEvent, D as RuntimeHookPhase, F as RuntimeHookTarget, G as RuntimeRunHandle, H as RuntimeRunPersistenceAdapter, J as RuntimeRunRow, M as composeRuntimeHooks, N as defineRuntimeHooks, P as notifyRuntimeDecisionPoint, Q as notifyRuntimeHookEvent, T as startRuntimeRun } from './types-JufmXF2a.js';
|
|
5
5
|
import { AgentProfile as AgentProfile$1 } from '@tangle-network/agent-interface';
|
|
6
6
|
import { Scenario, ProfileDispatchFn, LabeledScenarioStore, WorktreeAdapter, SurfaceProposer } from '@tangle-network/agent-eval/campaign';
|
|
7
|
-
import { L as LocalHarness, r as runLocalHarness } from './worktree-
|
|
7
|
+
import { L as LocalHarness, r as runLocalHarness } from './worktree-DaxOvw-C.js';
|
|
8
8
|
import { Scenario as Scenario$1, SurfaceProposer as SurfaceProposer$1, JudgeConfig, MutableSurface, DispatchContext, SelfImproveBudget, SelfImproveLlm, SelfImproveResult } from '@tangle-network/agent-eval/contract';
|
|
9
9
|
import { S as SurfaceImprovementEdit } from './improvement-adapter-CioiEE2z.js';
|
|
10
10
|
import { I as ImprovementAdapter } from './types-BC3bZpH0.js';
|
|
11
|
-
export { D as DELEGATED_LOOP_MODES, a as DelegatedLoopMode, b as DelegatedLoopRegistry, c as DelegatedLoopResult, d as DelegatedLoopRunner, L as LoopRunnerCliArgs, e as LoopRunnerCliResult, R as ResearchLoopResult, f as ResearchLoopRunnerOptions, g as RunDelegatedLoopOptions, V as VetoedFact, W as WorktreeLoopRunnerOptions, h as auditLoopRunner, i as isDelegatedLoopMode, p as parseLoopRunnerArgv, r as researchLoopRunner, j as runDelegatedLoop, k as runLoopRunnerCli, s as selfImproveLoopRunner, w as worktreeLoopRunner } from './loop-runner-bin-
|
|
12
|
-
export { m as mcpToolsForRuntimeMcp, a as mcpToolsForRuntimeMcpSubset } from './openai-tools-
|
|
11
|
+
export { D as DELEGATED_LOOP_MODES, a as DelegatedLoopMode, b as DelegatedLoopRegistry, c as DelegatedLoopResult, d as DelegatedLoopRunner, L as LoopRunnerCliArgs, e as LoopRunnerCliResult, R as ResearchLoopResult, f as ResearchLoopRunnerOptions, g as RunDelegatedLoopOptions, V as VetoedFact, W as WorktreeLoopRunnerOptions, h as auditLoopRunner, i as isDelegatedLoopMode, p as parseLoopRunnerArgv, r as researchLoopRunner, j as runDelegatedLoop, k as runLoopRunnerCli, s as selfImproveLoopRunner, w as worktreeLoopRunner } from './loop-runner-bin-eD3m0rHW.js';
|
|
12
|
+
export { m as mcpToolsForRuntimeMcp, a as mcpToolsForRuntimeMcpSubset } from './openai-tools-CBurv8Cu.js';
|
|
13
13
|
export { E as EvalRunEvent, a as EvalRunGeneration, b as EvalRunsExportConfig, c as EvalRunsExportResult, I as INTELLIGENCE_WIRE_VERSION, L as LoopSpanNode, d as OtelAttribute, e as OtelExportConfig, O as OtelExporter, f as OtelSpan, g as buildLoopOtelSpans, h as buildLoopSpanNodes, i as createOtelExporter, j as exportEvalRuns, l as loopEventToOtelSpan } from './otel-export-BKmNwiCb.js';
|
|
14
14
|
import '@tangle-network/sandbox';
|
|
15
15
|
import 'node:child_process';
|
|
16
16
|
import './kb-gate-CuzMYGYM.js';
|
|
17
|
-
import './worktree-fanout-
|
|
17
|
+
import './worktree-fanout-DIffZohV.js';
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
20
|
* @stable
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
import {
|
|
2
|
+
mcpToolsForRuntimeMcp,
|
|
3
|
+
mcpToolsForRuntimeMcpSubset
|
|
4
|
+
} from "./chunk-7ODB76J5.js";
|
|
1
5
|
import {
|
|
2
6
|
DEFAULT_ROUTER_BASE_URL,
|
|
3
7
|
cleanModelId,
|
|
@@ -16,14 +20,9 @@ import {
|
|
|
16
20
|
runLoopRunnerCli,
|
|
17
21
|
selfImproveLoopRunner,
|
|
18
22
|
worktreeLoopRunner
|
|
19
|
-
} from "./chunk-
|
|
20
|
-
import "./chunk-P5OKDSLB.js";
|
|
21
|
-
import {
|
|
22
|
-
mcpToolsForRuntimeMcp,
|
|
23
|
-
mcpToolsForRuntimeMcpSubset
|
|
24
|
-
} from "./chunk-VYXBFWHZ.js";
|
|
23
|
+
} from "./chunk-U56XGKVY.js";
|
|
25
24
|
import "./chunk-FNMGYYSS.js";
|
|
26
|
-
import "./chunk-
|
|
25
|
+
import "./chunk-HPYWEFVY.js";
|
|
27
26
|
import {
|
|
28
27
|
assertModelAllowed,
|
|
29
28
|
composeRuntimeHooks,
|
|
@@ -31,7 +30,7 @@ import {
|
|
|
31
30
|
notifyRuntimeDecisionPoint,
|
|
32
31
|
notifyRuntimeHookEvent,
|
|
33
32
|
runLocalHarness
|
|
34
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-NCH4XUZ7.js";
|
|
35
34
|
import {
|
|
36
35
|
INTELLIGENCE_WIRE_VERSION,
|
|
37
36
|
buildLoopOtelSpans,
|
|
@@ -40,6 +39,8 @@ import {
|
|
|
40
39
|
exportEvalRuns,
|
|
41
40
|
loopEventToOtelSpan
|
|
42
41
|
} from "./chunk-VMNEQHJR.js";
|
|
42
|
+
import "./chunk-IODKUOBA.js";
|
|
43
|
+
import "./chunk-T2HVQVB4.js";
|
|
43
44
|
import {
|
|
44
45
|
AgentEvalError,
|
|
45
46
|
BackendTransportError,
|
|
@@ -50,7 +51,7 @@ import {
|
|
|
50
51
|
RuntimeRunStateError,
|
|
51
52
|
SessionMismatchError,
|
|
52
53
|
ValidationError
|
|
53
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-NBV35BR6.js";
|
|
54
55
|
import "./chunk-WIR4HOOJ.js";
|
|
55
56
|
import "./chunk-DGUM43GV.js";
|
|
56
57
|
|