@tangle-network/agent-runtime 0.123.0 → 0.126.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/{activation-B7sTehZB.js → activation-DhWJ3p8N.js} +2 -2
- package/dist/{activation-B7sTehZB.js.map → activation-DhWJ3p8N.js.map} +1 -1
- package/dist/agent.d.ts +1 -1
- package/dist/agent.js +3 -3
- package/dist/{environment-provider-CY22kUQH.js → environment-provider-DqFS6FSZ.js} +3 -2
- package/dist/environment-provider-DqFS6FSZ.js.map +1 -0
- package/dist/{environment-provider-CEjwunXO.d.ts → environment-provider-PM9PeW_J.d.ts} +5 -1
- package/dist/environment-provider.d.ts +1 -1
- package/dist/environment-provider.js +1 -1
- package/dist/{improvement-cycle-BcwsSbT-.js → improvement-cycle-IJgCbKWQ.js} +5 -5
- package/dist/improvement-cycle-IJgCbKWQ.js.map +1 -0
- package/dist/{index-CKply5aj.d.ts → index-DIV33AF5.d.ts} +3 -3
- package/dist/{index-BKSzgMvA.d.ts → index-D_M4d1_B.d.ts} +5 -5
- package/dist/{index-CyXinqJw.d.ts → index-EdjCQBV9.d.ts} +52 -128
- package/dist/index.d.ts +5 -5
- package/dist/index.js +7 -7
- package/dist/intelligence.d.ts +1 -1
- package/dist/intelligence.js +4 -4
- package/dist/kernel.d.ts +3 -3
- package/dist/kernel.js +6 -6
- package/dist/{knowledge-Cuvb21T7.js → knowledge-EnuEqm_Y.js} +3 -3
- package/dist/{knowledge-Cuvb21T7.js.map → knowledge-EnuEqm_Y.js.map} +1 -1
- package/dist/knowledge.d.ts +1 -1
- package/dist/knowledge.js +1 -1
- package/dist/{loop-runner-bin-BjnNpN5m.d.ts → loop-runner-bin-Bo29_fiD.d.ts} +3 -3
- package/dist/{loop-runner-bin-Clhj8gy5.js → loop-runner-bin-qwT_4F5I.js} +3 -3
- package/dist/{loop-runner-bin-Clhj8gy5.js.map → loop-runner-bin-qwT_4F5I.js.map} +1 -1
- package/dist/loop-runner-bin.d.ts +1 -1
- package/dist/loop-runner-bin.js +1 -1
- package/dist/mcp/bin.js +2 -2
- package/dist/mcp/index.d.ts +2 -2
- package/dist/mcp/index.js +4 -4
- package/dist/{openai-tools-BwTsBfd-.js → openai-tools-Bp1KSkP6.js} +2 -2
- package/dist/{openai-tools-BwTsBfd-.js.map → openai-tools-Bp1KSkP6.js.map} +1 -1
- package/dist/primeintellect/index.d.ts +1 -1
- package/dist/{runtime-OI7oLLec.js → runtime-BzXz7OjS.js} +92 -130
- package/dist/runtime-BzXz7OjS.js.map +1 -0
- package/dist/{structural-rollout-C4Jv_7vt.js → structural-rollout-zY0oqQzO.js} +2 -2
- package/dist/{structural-rollout-C4Jv_7vt.js.map → structural-rollout-zY0oqQzO.js.map} +1 -1
- package/dist/{supervise-Dwq16u8n.js → supervise-Ds8FtyI9.js} +144 -49
- package/dist/supervise-Ds8FtyI9.js.map +1 -0
- package/dist/{supervisor-DjZ82HIB.js → supervisor-DpjO0Gmy.js} +67 -8
- package/dist/supervisor-DpjO0Gmy.js.map +1 -0
- package/dist/testing.js +9 -9
- package/package.json +4 -4
- package/dist/environment-provider-CY22kUQH.js.map +0 -1
- package/dist/improvement-cycle-BcwsSbT-.js.map +0 -1
- package/dist/runtime-OI7oLLec.js.map +0 -1
- package/dist/supervise-Dwq16u8n.js.map +0 -1
- package/dist/supervisor-DjZ82HIB.js.map +0 -1
package/dist/loop-runner-bin.js
CHANGED
package/dist/mcp/bin.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { i as ConfigError } from "../errors-DEAvWQPy.js";
|
|
3
|
-
import { x as readTraceContextFromEnv } from "../supervisor-
|
|
4
|
-
import { L as DelegationTaskQueue, l as createMcpServer, q as FileDelegationStore } from "../supervise-
|
|
3
|
+
import { x as readTraceContextFromEnv } from "../supervisor-DpjO0Gmy.js";
|
|
4
|
+
import { L as DelegationTaskQueue, l as createMcpServer, q as FileDelegationStore } from "../supervise-Ds8FtyI9.js";
|
|
5
5
|
import { a as resolveRouterBaseUrl } from "../model-resolution-Btd9iIKV.js";
|
|
6
6
|
//#region src/mcp/delegate-supervisor-provisioning.ts
|
|
7
7
|
const DEFAULT_WORKER_HARNESS = "opencode";
|
package/dist/mcp/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { $
|
|
1
|
+
import { $c as ContinuationInstruction, $u as DelegationResumeDriver, Ad as FeedbackRating, Al as DelegateError, Au as coderTaskFromArgs, Bd as DelegationTraceCollector, Bu as DetachedTurn, Cd as DelegationHistoryResult, Cl as McpServerOptions, Cu as CoderReview, Dd as DelegationStatus, Dl as DELEGATE_INPUT_SCHEMA, Du as DetachedWinnerSelection, Ed as DelegationResultPayload, El as DELEGATE_DESCRIPTION, Eu as DetachedSessionDelegateOptions, Fd as UiAuditorDelegationOutput, Fu as FleetWorkspaceExecutorOptions, Gd as createDelegationTraceCollector, Gu as createDetachedTurnResumeDriver, Hd as buildDelegationTraceSpans, Hu as DriveTurnCapableBox, Id as CappedDelegationTrace, Iu as SiblingSandboxExecutorOptions, Jc as AnalystFindingEvent, Jd as DelegationStore, Ju as parseDetachedSessionRef, Kd as DelegationPersistenceError, Ku as detachedTurnEvents, Ld as DELEGATION_TRACE_MAX_BYTES, Lu as createFleetWorkspaceExecutor, Md as ResearchOutputShape, Ml as DelegateResult, Mu as settleDetachedCoderTurn, Nd as ResearchSource, Nl as createDelegateHandler, Nu as DelegationExecutor, Od as DelegationStatusArgs, Ol as DELEGATE_TOOL_NAME, Ou as SettleDetachedCoderTurnOptions, Pd as UiAuditLensFilter, Pl as validateDelegateArgs, Pu as FleetHandle, Qc as AuthorizedDownMessage, Qu as DelegationResumeContext, Rd as DELEGATION_TRACE_MAX_SPANS, Ru as createSiblingSandboxExecutor, Sd as DelegationHistoryEntry, Sl as McpServer, Su as CoderDelegate, Td as DelegationProgress, Tl as createMcpServer, Tu as DelegateRunCtx, Ud as capDelegationTrace, Uu as DriveTurnTick, Vd as DelegationTraceSpan, Vu as DetachedTurnResumeDriverOptions, Wd as composeLoopTraceEmitters, Wu as RunDetachedTurnOptions, Xd as FileDelegationStoreOptions, Xu as DelegationArgs, Yc as AnalystRegistry, Yd as FileDelegationStore, Yu as runDetachedTurn, Zc as AuthorizeDownMessage, Zd as InMemoryDelegationStore, Zu as DelegationRecord, _d as DelegateUiAuditResult, _l as WorkerSpawnContext, _u as McpTransport, ad as SubmitOutput, al as DownMessageDeliveryAttempt, au as CreateWorktreeOptions, bd as DelegationFeedbackSnapshot, bl as createCoordinationTools, bu as InMemoryFeedbackStore, cd as DelegateCodeConfig, cl as MakeWorkerAgent, cu as GitRunner, dd as DelegateFeedbackResult, dl as QuestionLevel, du as captureWorktreeDiff, ed as DelegationResumeTick, el as CoordinationEvent, fd as DelegateResearchArgs, fl as QuestionOption, fu as createWorktree, gd as DelegateUiAuditConfig, gl as SettledWorker, gu as McpToolDescriptor, hd as DelegateUiAuditArgs, hl as QuestionUrgency, hu as JsonRpcResponse, id as SubmitInput, il as DownMessageAuthorizationInput, jd as FeedbackRefersTo, jl as DelegateHandlerOptions, ju as detachedSessionDelegate, kd as DelegationStatusResult, kl as DelegateArgs, ku as UiAuditorDelegate, ld as DelegateCodeResult, ll as Question, lu as RemoveWorktreeOptions, md as DelegateResearchResult, ml as QuestionRecord, mu as JsonRpcMessage, nd as DelegationTaskQueue, nl as CoordinationToolsOptions, od as hashIdempotencyInput, ol as DownMessageDeliveryOutcome, ou as DiffOptions, pd as DelegateResearchConfig, pl as QuestionPolicy, pu as removeWorktree, qd as DelegationStateCorruptError, qu as formatDetachedSessionRef, rd as DelegationTaskQueueOptions, rl as DEFAULT_AWAIT_EVENT_TIMEOUT_MS, sd as DelegateCodeArgs, sf as CoderOutput, sl as DownMessageEvent, su as DiffResult, td as DelegationRunContext, tl as CoordinationTools, ud as DelegateFeedbackArgs, ul as QuestionDecision, uu as WorktreeHandle, vd as DelegateUiAuditRoute, vl as WorkerWatchOptions, vu as FeedbackEvent, wd as DelegationProfile, wl as createInProcessTransport, wu as CoderReviewer, xd as DelegationHistoryArgs, xu as eventToSnapshot, yd as DelegationError, yu as FeedbackStore, zd as DelegationTraceCaps, zu as DetachedSessionRefParts } from "../index-EdjCQBV9.js";
|
|
2
2
|
import { E as SandboxClient, h as LoopSandboxPlacement } from "../types-DnNGJ5Gz.js";
|
|
3
|
-
import { Bt as mergeTraceEnv, Ht as traceContextToEnv, Rt as TraceContext, Vt as readTraceContextFromEnv, zt as createPropagatingTraceEmitter } from "../environment-provider-
|
|
3
|
+
import { Bt as mergeTraceEnv, Ht as traceContextToEnv, Rt as TraceContext, Vt as readTraceContextFromEnv, zt as createPropagatingTraceEmitter } from "../environment-provider-PM9PeW_J.js";
|
|
4
4
|
import { o as UiLens } from "../substrate-BcnuSHXm.js";
|
|
5
5
|
import { a as LOCAL_HARNESSES, c as RunLocalHarnessOptions, d as parseCodexTokenUsage, f as runLocalHarness, i as DEFAULT_LOCAL_HARNESS, l as harnessSupportsReasoningEffort, n as CodexExecutionPolicy, o as LocalHarness, r as CodexTokenUsage, s as LocalHarnessResult, t as CodexExecutionEvidence, u as localHarnessExecutable } from "../local-harness-BIajef4A.js";
|
|
6
6
|
import { a as KbGateResult, i as FactJudgeVerdict, n as FactCandidate, o as createKbGate, r as FactJudge, t as CreateKbGateOptions } from "../kb-gate-C8z2juK8.js";
|
package/dist/mcp/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { u as ValidationError } from "../errors-DEAvWQPy.js";
|
|
2
2
|
import { l as throwAbort, n as deleteBoxSafe, s as sleep, u as throwIfAborted } from "../util-MVgdwuIS.js";
|
|
3
|
-
import { Ct as runWorktreeHarness, Dt as removeWorktree, Et as createWorktree, Gt as harnessSupportsReasoningEffort, Ht as DEFAULT_LOCAL_HARNESS, Jt as runLocalHarness, Kt as localHarnessExecutable, S as traceContextToEnv, Tt as captureWorktreeDiff, Ut as LOCAL_HARNESSES, Yt as CodexExecutionDiagnosticError, b as mergeTraceEnv, qt as parseCodexTokenUsage, x as readTraceContextFromEnv, y as createPropagatingTraceEmitter } from "../supervisor-
|
|
4
|
-
import { S as runCoderChecks, tt as selectValidWinner } from "../runtime-
|
|
5
|
-
import { A as DELEGATE_DESCRIPTION, At as createSandboxForSpec, B as DELEGATION_TRACE_MAX_SPANS, C as createDelegateUiAuditHandler, D as DELEGATE_FEEDBACK_TOOL_NAME, E as DELEGATE_FEEDBACK_INPUT_SCHEMA, G as DelegationPersistenceError, H as capDelegationTrace, J as InMemoryDelegationStore, K as DelegationStateCorruptError, L as DelegationTaskQueue, M as DELEGATE_TOOL_NAME, Mt as runAgentRounds, N as createDelegateHandler, O as createDelegateFeedbackHandler, P as validateDelegateArgs, R as hashIdempotencyInput, S as DELEGATE_UI_AUDIT_TOOL_NAME, T as DELEGATE_FEEDBACK_DESCRIPTION, U as composeLoopTraceEmitters, V as buildDelegationTraceSpans, W as createDelegationTraceCollector, X as eventToSnapshot, Y as InMemoryFeedbackStore, _ as DELEGATION_HISTORY_TOOL_NAME, b as DELEGATE_UI_AUDIT_DESCRIPTION, c as createInProcessTransport, d as DELEGATION_STATUS_INPUT_SCHEMA, dt as DEFAULT_AWAIT_EVENT_TIMEOUT_MS, f as DELEGATION_STATUS_TOOL_NAME, g as DELEGATION_HISTORY_INPUT_SCHEMA, h as DELEGATION_HISTORY_DESCRIPTION, j as DELEGATE_INPUT_SCHEMA, k as validateDelegateFeedbackArgs, l as createMcpServer, m as validateDelegationStatusArgs, p as createDelegationStatusHandler, pt as createCoordinationTools, q as FileDelegationStore, u as DELEGATION_STATUS_DESCRIPTION, v as createDelegationHistoryHandler, w as validateDelegateUiAuditArgs, x as DELEGATE_UI_AUDIT_INPUT_SCHEMA, y as validateDelegationHistoryArgs, z as DELEGATION_TRACE_MAX_BYTES } from "../supervise-
|
|
3
|
+
import { Ct as runWorktreeHarness, Dt as removeWorktree, Et as createWorktree, Gt as harnessSupportsReasoningEffort, Ht as DEFAULT_LOCAL_HARNESS, Jt as runLocalHarness, Kt as localHarnessExecutable, S as traceContextToEnv, Tt as captureWorktreeDiff, Ut as LOCAL_HARNESSES, Yt as CodexExecutionDiagnosticError, b as mergeTraceEnv, qt as parseCodexTokenUsage, x as readTraceContextFromEnv, y as createPropagatingTraceEmitter } from "../supervisor-DpjO0Gmy.js";
|
|
4
|
+
import { S as runCoderChecks, tt as selectValidWinner } from "../runtime-BzXz7OjS.js";
|
|
5
|
+
import { A as DELEGATE_DESCRIPTION, At as createSandboxForSpec, B as DELEGATION_TRACE_MAX_SPANS, C as createDelegateUiAuditHandler, D as DELEGATE_FEEDBACK_TOOL_NAME, E as DELEGATE_FEEDBACK_INPUT_SCHEMA, G as DelegationPersistenceError, H as capDelegationTrace, J as InMemoryDelegationStore, K as DelegationStateCorruptError, L as DelegationTaskQueue, M as DELEGATE_TOOL_NAME, Mt as runAgentRounds, N as createDelegateHandler, O as createDelegateFeedbackHandler, P as validateDelegateArgs, R as hashIdempotencyInput, S as DELEGATE_UI_AUDIT_TOOL_NAME, T as DELEGATE_FEEDBACK_DESCRIPTION, U as composeLoopTraceEmitters, V as buildDelegationTraceSpans, W as createDelegationTraceCollector, X as eventToSnapshot, Y as InMemoryFeedbackStore, _ as DELEGATION_HISTORY_TOOL_NAME, b as DELEGATE_UI_AUDIT_DESCRIPTION, c as createInProcessTransport, d as DELEGATION_STATUS_INPUT_SCHEMA, dt as DEFAULT_AWAIT_EVENT_TIMEOUT_MS, f as DELEGATION_STATUS_TOOL_NAME, g as DELEGATION_HISTORY_INPUT_SCHEMA, h as DELEGATION_HISTORY_DESCRIPTION, j as DELEGATE_INPUT_SCHEMA, k as validateDelegateFeedbackArgs, l as createMcpServer, m as validateDelegationStatusArgs, p as createDelegationStatusHandler, pt as createCoordinationTools, q as FileDelegationStore, u as DELEGATION_STATUS_DESCRIPTION, v as createDelegationHistoryHandler, w as validateDelegateUiAuditArgs, x as DELEGATE_UI_AUDIT_INPUT_SCHEMA, y as validateDelegationHistoryArgs, z as DELEGATION_TRACE_MAX_BYTES } from "../supervise-Ds8FtyI9.js";
|
|
6
6
|
import { t as createStdioToolServer } from "../tool-server-RcWgLIsL.js";
|
|
7
7
|
import { t as createKbGate } from "../kb-gate-DpaSwXVx.js";
|
|
8
|
-
import { n as mcpToolsForRuntimeMcpSubset, t as mcpToolsForRuntimeMcp } from "../openai-tools-
|
|
8
|
+
import { n as mcpToolsForRuntimeMcpSubset, t as mcpToolsForRuntimeMcp } from "../openai-tools-Bp1KSkP6.js";
|
|
9
9
|
import { t as coderTaskToPrompt } from "../coder-yhVWbdWc.js";
|
|
10
10
|
import { a as createMemoryToolServer, c as resolveMemoryFromEnv, i as MEMORY_NAME_ENV, n as MEMORY_ITEMS_ENV, o as parseMemoryItems, r as MEMORY_LOG_ENV, s as readMemoryItemsFile, t as MEMORY_FILE_ENV } from "../memory-server-DL6cE2Ag.js";
|
|
11
11
|
import { randomUUID } from "node:crypto";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { D as DELEGATE_FEEDBACK_TOOL_NAME, E as DELEGATE_FEEDBACK_INPUT_SCHEMA, T as DELEGATE_FEEDBACK_DESCRIPTION, _ as DELEGATION_HISTORY_TOOL_NAME, d as DELEGATION_STATUS_INPUT_SCHEMA, f as DELEGATION_STATUS_TOOL_NAME, g as DELEGATION_HISTORY_INPUT_SCHEMA, h as DELEGATION_HISTORY_DESCRIPTION, u as DELEGATION_STATUS_DESCRIPTION } from "./supervise-
|
|
1
|
+
import { D as DELEGATE_FEEDBACK_TOOL_NAME, E as DELEGATE_FEEDBACK_INPUT_SCHEMA, T as DELEGATE_FEEDBACK_DESCRIPTION, _ as DELEGATION_HISTORY_TOOL_NAME, d as DELEGATION_STATUS_INPUT_SCHEMA, f as DELEGATION_STATUS_TOOL_NAME, g as DELEGATION_HISTORY_INPUT_SCHEMA, h as DELEGATION_HISTORY_DESCRIPTION, u as DELEGATION_STATUS_DESCRIPTION } from "./supervise-Ds8FtyI9.js";
|
|
2
2
|
//#region src/mcp/openai-tools.ts
|
|
3
3
|
function buildTool(name, description, parameters) {
|
|
4
4
|
return {
|
|
@@ -41,4 +41,4 @@ function mcpToolsForRuntimeMcpSubset(names) {
|
|
|
41
41
|
//#endregion
|
|
42
42
|
export { mcpToolsForRuntimeMcpSubset as n, mcpToolsForRuntimeMcp as t };
|
|
43
43
|
|
|
44
|
-
//# sourceMappingURL=openai-tools-
|
|
44
|
+
//# sourceMappingURL=openai-tools-Bp1KSkP6.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"openai-tools-
|
|
1
|
+
{"version":3,"file":"openai-tools-Bp1KSkP6.js","names":[],"sources":["../src/mcp/openai-tools.ts"],"sourcesContent":["/**\n *\n * OpenAI Chat Completions `tools[]` projection of the queue-bound agent-runtime\n * MCP delegation tools.\n *\n * Use when configuring `createOpenAICompatibleBackend({ tools: ... })` so the\n * model can call `delegate_feedback`, `delegation_status`, and\n * `delegation_history` through the OpenAI-compat transport (tcloud, OpenRouter,\n * OpenAI direct, cli-bridge). The runtime surfaces tool calls as `tool_call`\n * stream events — execution is the caller's responsibility (typically the\n * parent sandbox runtime's MCP mount).\n *\n * Sandbox-SDK callers do NOT need this helper: the sandbox runtime mounts\n * MCP servers natively and the in-sandbox harness discovers tools via the\n * runtime, not via an OpenAI tools array.\n *\n * Tool name + description + JSON-schema are pulled from the canonical\n * `DELEGATE_*` constants exported by `./tools/*` so the projection cannot\n * drift from the server's own validators.\n *\n * @experimental\n */\n\nimport type { OpenAIChatTool } from '../types'\nimport {\n DELEGATE_FEEDBACK_DESCRIPTION,\n DELEGATE_FEEDBACK_INPUT_SCHEMA,\n DELEGATE_FEEDBACK_TOOL_NAME,\n} from './tools/delegate-feedback'\nimport {\n DELEGATION_HISTORY_DESCRIPTION,\n DELEGATION_HISTORY_INPUT_SCHEMA,\n DELEGATION_HISTORY_TOOL_NAME,\n} from './tools/delegation-history'\nimport {\n DELEGATION_STATUS_DESCRIPTION,\n DELEGATION_STATUS_INPUT_SCHEMA,\n DELEGATION_STATUS_TOOL_NAME,\n} from './tools/delegation-status'\n\nfunction buildTool(\n name: string,\n description: string,\n parameters: Readonly<Record<string, unknown>>,\n): OpenAIChatTool {\n // `parameters` arrives as a deeply-readonly `as const` literal. The\n // OpenAI-compat backend JSON-serializes the body so a shallow copy\n // into a plain object is sufficient — and shields callers that mutate\n // the returned descriptor from corrupting the source constant.\n return {\n type: 'function',\n function: { name, description, parameters: { ...parameters } },\n }\n}\n\n/**\n *\n * Returns the queue-bound delegation tools projected into OpenAI Chat\n * Completions `tools[]` shape. The order is stable: `delegate_feedback`,\n * `delegation_status`, `delegation_history`.\n *\n * @experimental\n */\nexport function mcpToolsForRuntimeMcp(): OpenAIChatTool[] {\n return [\n buildTool(\n DELEGATE_FEEDBACK_TOOL_NAME,\n DELEGATE_FEEDBACK_DESCRIPTION,\n DELEGATE_FEEDBACK_INPUT_SCHEMA as Readonly<Record<string, unknown>>,\n ),\n buildTool(\n DELEGATION_STATUS_TOOL_NAME,\n DELEGATION_STATUS_DESCRIPTION,\n DELEGATION_STATUS_INPUT_SCHEMA as Readonly<Record<string, unknown>>,\n ),\n buildTool(\n DELEGATION_HISTORY_TOOL_NAME,\n DELEGATION_HISTORY_DESCRIPTION,\n DELEGATION_HISTORY_INPUT_SCHEMA as Readonly<Record<string, unknown>>,\n ),\n ]\n}\n\n/**\n *\n * Subset filter — return only the projected tools whose `function.name`\n * appears in `names`. Useful for curated mounts (e.g. only the queue-bound\n * delegation tools, omitting `delegate_feedback`). Unknown names are\n * silently ignored; pass an empty array to get an empty result.\n *\n * @experimental\n */\nexport function mcpToolsForRuntimeMcpSubset(names: ReadonlyArray<string>): OpenAIChatTool[] {\n const allowed = new Set(names)\n return mcpToolsForRuntimeMcp().filter((tool) => allowed.has(tool.function.name))\n}\n"],"mappings":";;AAwCA,SAAS,UACP,MACA,aACA,YACgB;CAKhB,OAAO;EACL,MAAM;EACN,UAAU;GAAE;GAAM;GAAa,YAAY,EAAE,GAAG,WAAW;EAAE;CAC/D;AACF;;;;;;;;;AAUA,SAAgB,wBAA0C;CACxD,OAAO;EACL,UACE,6BACA,+BACA,8BACF;EACA,UACE,6BACA,+BACA,8BACF;EACA,UACE,8BACA,gCACA,+BACF;CACF;AACF;;;;;;;;;;AAWA,SAAgB,4BAA4B,OAAgD;CAC1F,MAAM,UAAU,IAAI,IAAI,KAAK;CAC7B,OAAO,sBAAsB,CAAC,CAAC,QAAQ,SAAS,QAAQ,IAAI,KAAK,SAAS,IAAI,CAAC;AACjF"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as AgentExecutionBackend, r as AgentBackendInput } from "../types-C9j4qg6l.js";
|
|
2
|
-
import { lt as createOpenAICompatibleBackend } from "../index-
|
|
2
|
+
import { lt as createOpenAICompatibleBackend } from "../index-D_M4d1_B.js";
|
|
3
3
|
import { RunRecord } from "@tangle-network/agent-eval";
|
|
4
4
|
//#region src/primeintellect/types.d.ts
|
|
5
5
|
type PrimeIntellectSplit = 'train' | 'eval';
|
|
@@ -3,11 +3,11 @@ import { i as normalizeBackendStreamEvent, o as newRuntimeSession, s as nowIso }
|
|
|
3
3
|
import { i as InMemorySpawnJournal, r as InMemoryResultBlobStore, v as isTraceAnalysisStore } from "./spawn-journal-DsZKDqeh.js";
|
|
4
4
|
import { a as randomSuffix, c as stringifySafe, f as zeroTokenUsage, r as isAbortError, s as sleep, t as addTokenUsage } from "./util-MVgdwuIS.js";
|
|
5
5
|
import { i as redactProtectedValue, r as redactProtectedReason } from "./protected-redaction--F3v1oo8.js";
|
|
6
|
-
import { _t as routerChatWithUsage, bt as runBrainLoop, et as rollingDispatch, ht as routerBrain, l as withDriverExecutor, m as settledToIteration, n as createSupervisor } from "./supervisor-
|
|
7
|
-
import { C as observe, O as strategyAuthorMethod, b as sample, v as refine, x as sampleThenRefine, y as runAgentic } from "./structural-rollout-
|
|
6
|
+
import { _t as routerChatWithUsage, bt as runBrainLoop, en as isHarnessNativeModel, et as rollingDispatch, ht as routerBrain, l as withDriverExecutor, m as settledToIteration, n as createSupervisor } from "./supervisor-DpjO0Gmy.js";
|
|
7
|
+
import { C as observe, O as strategyAuthorMethod, b as sample, v as refine, x as sampleThenRefine, y as runAgentic } from "./structural-rollout-zY0oqQzO.js";
|
|
8
8
|
import { i as notifyRuntimeHookEvent, t as composeRuntimeHooks } from "./runtime-hooks-C7iJOWm3.js";
|
|
9
9
|
import { a as notifySandboxEventObserver, i as mapSandboxToolEvent, r as mapSandboxEvent, t as createSandboxToolPartState } from "./sandbox-events-Yhd1GYWl.js";
|
|
10
|
-
import {
|
|
10
|
+
import { Ct as createWorktreeCliExecutor, Et as createPushTraceSource, Ft as probeSandboxCapabilities, Mt as runAgentRounds, Pt as createSandboxLineage, Qt as kernelPromptRegistry, St as createExecutorRegistry, Zt as formatPromptHandle, jt as defaultSelectWinner, n as supervise, nn as gateOnDeliverable, r as workerFromBackend, xt as createExecutor } from "./supervise-Ds8FtyI9.js";
|
|
11
11
|
import { CODING_HARNESSES, InMemoryTraceStore, OUTPUT_VALUE, benjaminiHochberg, buildTrajectory, computeFindingId as computeFindingId$1, confidenceInterval, expandProfileAxes, harnessAxisOf, makeFinding as makeFinding$1, pairedBootstrap, paretoFrontier, scoreKnowledgeReadiness, wilcoxonSignedRank, wilson } from "@tangle-network/agent-eval";
|
|
12
12
|
import { heldoutSignificance, runProfileMatrix } from "@tangle-network/agent-eval/campaign";
|
|
13
13
|
import { agentProfileSchema, canonicalCandidateDigest, validateAgentProfileSecurity } from "@tangle-network/agent-interface";
|
|
@@ -1295,106 +1295,13 @@ function resolveSandboxClient(opts) {
|
|
|
1295
1295
|
}
|
|
1296
1296
|
}
|
|
1297
1297
|
//#endregion
|
|
1298
|
-
//#region src/runtime/steering-drivers.ts
|
|
1299
|
-
/**
|
|
1300
|
-
* Interpret a {@link SteeringDirectiveData} as a loop `Driver` — the ONE interpreter both
|
|
1301
|
-
* control policies share. The directive is data; only `applyContinuation` (how the caller's
|
|
1302
|
-
* opaque Task carries a steering string) remains code, exactly as `taskToPrompt` does.
|
|
1303
|
-
*/
|
|
1304
|
-
function steeringDriver(directive, applyContinuation, name) {
|
|
1305
|
-
const driverName = name ?? directive.kind;
|
|
1306
|
-
const maxIterations = directive.maxTraversals;
|
|
1307
|
-
const continuationFor = (passed) => directive.kind === "naive" ? directive.continuation : passed ? directive.onPass : directive.onFail;
|
|
1308
|
-
const rationale = directive.kind === "naive" ? "naive fixed continuation (no grade signal)" : "dumb pass/fail-only continuation (no grader findings)";
|
|
1309
|
-
return {
|
|
1310
|
-
name: driverName,
|
|
1311
|
-
plan(task, history) {
|
|
1312
|
-
if (history.length === 0) return Promise.resolve([task]);
|
|
1313
|
-
const passed = history[history.length - 1]?.verdict?.valid === true;
|
|
1314
|
-
if (passed) return Promise.resolve([]);
|
|
1315
|
-
if (history.length >= maxIterations) return Promise.resolve([]);
|
|
1316
|
-
return Promise.resolve([applyContinuation(task, continuationFor(passed))]);
|
|
1317
|
-
},
|
|
1318
|
-
decide(history) {
|
|
1319
|
-
return decideUntilValidOrCapped(history, maxIterations);
|
|
1320
|
-
},
|
|
1321
|
-
describePlan() {
|
|
1322
|
-
return {
|
|
1323
|
-
kind: "refine",
|
|
1324
|
-
rationale
|
|
1325
|
-
};
|
|
1326
|
-
}
|
|
1327
|
-
};
|
|
1328
|
-
}
|
|
1329
|
-
/**
|
|
1330
|
-
* Shared `decide()` for the steering drivers. Verbatim semantics of the
|
|
1331
|
-
* reference refine driver: a valid iteration anywhere → terminal `'pick-winner'`;
|
|
1332
|
-
* otherwise `'refine'` (non-terminal, run another shot) while history is under
|
|
1333
|
-
* the shot cap, else terminal `'fail'`. Pure over history; reads only
|
|
1334
|
-
* `verdict.valid` (never notes/scores) so it adds no leak of its own.
|
|
1335
|
-
*/
|
|
1336
|
-
function decideUntilValidOrCapped(history, maxIterations) {
|
|
1337
|
-
if (history.some((it) => it.verdict?.valid)) return "pick-winner";
|
|
1338
|
-
return history.length < maxIterations ? "refine" : "fail";
|
|
1339
|
-
}
|
|
1340
|
-
/**
|
|
1341
|
-
* `naiveDriver` — the no-signal steering control.
|
|
1342
|
-
*
|
|
1343
|
-
* `plan()` runs the initial `task` at shot 0, then issues the SAME fixed
|
|
1344
|
-
* `continuation` every subsequent round until a shot is valid or the cap is
|
|
1345
|
-
* hit. It reads NOTHING from `history[last].verdict` — not `.valid`, not
|
|
1346
|
-
* `.notes`, not `.scores`. It is the floor a coached loop must beat to earn its
|
|
1347
|
-
* coaching: any lift over naive that is not also present in `dumb` is
|
|
1348
|
-
* attributable to the pass/fail bit, and any lift of `refine` over `dumb` is
|
|
1349
|
-
* attributable to the grader's findings.
|
|
1350
|
-
*/
|
|
1351
|
-
/** Thin compatibility wrapper over {@link steeringDriver} for the naive (no-signal) control.
|
|
1352
|
-
* @deprecated The policy is DATA now — build the directive and interpret it:
|
|
1353
|
-
* `steeringDriver({ kind: 'naive', continuation, maxTraversals }, applyContinuation)`. This
|
|
1354
|
-
* wrapper survives for existing callers and will be removed in the next major. */
|
|
1355
|
-
function naiveDriver(options) {
|
|
1356
|
-
const { continuation, applyContinuation, maxIterations, name = "naive" } = options;
|
|
1357
|
-
return steeringDriver({
|
|
1358
|
-
kind: "naive",
|
|
1359
|
-
continuation,
|
|
1360
|
-
maxTraversals: maxIterations
|
|
1361
|
-
}, applyContinuation, name);
|
|
1362
|
-
}
|
|
1363
|
-
/**
|
|
1364
|
-
* `dumbDriver` — the pass/fail-only steering control.
|
|
1365
|
-
*
|
|
1366
|
-
* `plan()` runs the initial `task` at shot 0, then reads ONLY
|
|
1367
|
-
* `history[last].verdict.valid` (the boolean) and issues `onPass` or `onFail`
|
|
1368
|
-
* accordingly. It MUST NOT read `.notes` or `.scores` — that boundary is the
|
|
1369
|
-
* leak-free firewall. A `verdict` with no `valid` set (or no verdict) is
|
|
1370
|
-
* treated as not-valid, so the driver is total and never throws on a
|
|
1371
|
-
* grader/transport gap.
|
|
1372
|
-
*
|
|
1373
|
-
* The `dumb → refine` gap is the headline measurement: refine reads the
|
|
1374
|
-
* grader's `notes`, dumb reads only the pass/fail bit, so the difference is
|
|
1375
|
-
* exactly the value the findings add over a bare boolean.
|
|
1376
|
-
*/
|
|
1377
|
-
/** Thin compatibility wrapper over {@link steeringDriver} for the dumb (pass/fail-only) control.
|
|
1378
|
-
* @deprecated The policy is DATA now — build the directive and interpret it:
|
|
1379
|
-
* `steeringDriver({ kind: 'dumb', onPass, onFail, maxTraversals }, applyContinuation)`. This
|
|
1380
|
-
* wrapper survives for existing callers and will be removed in the next major. */
|
|
1381
|
-
function dumbDriver(options) {
|
|
1382
|
-
const { onPass, onFail, applyContinuation, maxIterations, name = "dumb" } = options;
|
|
1383
|
-
return steeringDriver({
|
|
1384
|
-
kind: "dumb",
|
|
1385
|
-
onPass,
|
|
1386
|
-
onFail,
|
|
1387
|
-
maxTraversals: maxIterations
|
|
1388
|
-
}, applyContinuation, name);
|
|
1389
|
-
}
|
|
1390
|
-
//#endregion
|
|
1391
1298
|
//#region src/runtime/define-leaderboard.ts
|
|
1392
1299
|
/**
|
|
1393
1300
|
* `defineLeaderboard` — the declarative eval-leaderboard facade.
|
|
1394
1301
|
*
|
|
1395
1302
|
* A product's harness×model leaderboard is always the same assembly: expand a
|
|
1396
1303
|
* base profile across the harness×model axes (`expandProfileAxes`), run every
|
|
1397
|
-
* (profile, case) cell as a driven loop (`loopDispatch` + the naive
|
|
1304
|
+
* (profile, case) cell as a driven loop (`loopDispatch` + the naive retry driver), score
|
|
1398
1305
|
* with the domain's grader, and emit ONE `runProfileMatrix` call. Each product
|
|
1399
1306
|
* hand-rolled that assembly (~650 lines each) and re-hit the same footguns:
|
|
1400
1307
|
* stale cell-cache reuse, zero-token stub cells, missing model snapshots.
|
|
@@ -1420,6 +1327,36 @@ function dumbDriver(options) {
|
|
|
1420
1327
|
*
|
|
1421
1328
|
* @experimental
|
|
1422
1329
|
*/
|
|
1330
|
+
/**
|
|
1331
|
+
* The no-signal retry floor as a bare `Driver` literal: re-run the case VERBATIM as an
|
|
1332
|
+
* independent attempt until one shot scores (`verdict.valid`) or the shot cap. It reads ONLY
|
|
1333
|
+
* `verdict.valid` — never `notes`/`scores` — so a leaderboard cell's retries carry no grader
|
|
1334
|
+
* findings into the next shot (the leak-free firewall). Steering POLICY texts are registry data
|
|
1335
|
+
* (`delegates/naive-continuation` and siblings in the kernel prompt registry) attached to graph
|
|
1336
|
+
* edges; this loop-kernel control folds no text in — each shot is the same task object, and the
|
|
1337
|
+
* per-shot nonce in `taskToPrompt` keeps the attempts independent at the router.
|
|
1338
|
+
*/
|
|
1339
|
+
function naiveRetryDriver(shots) {
|
|
1340
|
+
return {
|
|
1341
|
+
name: "naive",
|
|
1342
|
+
plan(task, history) {
|
|
1343
|
+
if (history.length === 0) return Promise.resolve([task]);
|
|
1344
|
+
if (history[history.length - 1]?.verdict?.valid === true) return Promise.resolve([]);
|
|
1345
|
+
if (history.length >= shots) return Promise.resolve([]);
|
|
1346
|
+
return Promise.resolve([task]);
|
|
1347
|
+
},
|
|
1348
|
+
decide(history) {
|
|
1349
|
+
if (history.some((it) => it.verdict?.valid)) return "pick-winner";
|
|
1350
|
+
return history.length < shots ? "refine" : "fail";
|
|
1351
|
+
},
|
|
1352
|
+
describePlan() {
|
|
1353
|
+
return {
|
|
1354
|
+
kind: "refine",
|
|
1355
|
+
rationale: "naive fixed continuation (no grade signal)"
|
|
1356
|
+
};
|
|
1357
|
+
}
|
|
1358
|
+
};
|
|
1359
|
+
}
|
|
1423
1360
|
/** Read `--name <value>` from an argv array. */
|
|
1424
1361
|
function argOf(argv, name) {
|
|
1425
1362
|
const i = argv.indexOf(`--${name}`);
|
|
@@ -1583,21 +1520,18 @@ function defineLeaderboard(spec) {
|
|
|
1583
1520
|
toLoopOptions: (cellScenario, cellProfile) => {
|
|
1584
1521
|
const axis = harnessAxisOf(cellProfile);
|
|
1585
1522
|
const modelId = bareModel(axis?.model ?? models[0] ?? "");
|
|
1523
|
+
const backendModel = {
|
|
1524
|
+
...spec.modelBackend,
|
|
1525
|
+
...!isHarnessNativeModel(modelId) || backendName === "cli-bridge" ? { model: modelId } : {}
|
|
1526
|
+
};
|
|
1586
1527
|
return {
|
|
1587
|
-
driver:
|
|
1588
|
-
kind: "naive",
|
|
1589
|
-
continuation: "",
|
|
1590
|
-
maxTraversals: shots
|
|
1591
|
-
}, (task) => task, "naive"),
|
|
1528
|
+
driver: naiveRetryDriver(shots),
|
|
1592
1529
|
agentRun: {
|
|
1593
1530
|
profile: cellProfile,
|
|
1594
1531
|
taskToPrompt: (s) => `${promptOf(s)}\n\n<!-- independent-attempt:${shotNonce++} -->`,
|
|
1595
1532
|
...axis ? { sandboxOverrides: { backend: {
|
|
1596
1533
|
type: axis.harness,
|
|
1597
|
-
model: {
|
|
1598
|
-
...spec.modelBackend,
|
|
1599
|
-
model: modelId
|
|
1600
|
-
}
|
|
1534
|
+
...Object.keys(backendModel).length > 0 ? { model: backendModel } : {}
|
|
1601
1535
|
} } } : {}
|
|
1602
1536
|
},
|
|
1603
1537
|
output: { parse: (events) => spec.parseOutput ? spec.parseOutput(events, cellScenario.case) : collectAgentResponseText(events) ?? "" },
|
|
@@ -4690,10 +4624,13 @@ function deriveTurnSignal(callerSignal, timeoutMs) {
|
|
|
4690
4624
|
* 4. **Per-edge traversal caps** — the cyclic-graph backstop. A delegates edge whose cap is
|
|
4691
4625
|
* exhausted REFUSES further traversals (fail loud), so a cycle cannot spin the pool dry.
|
|
4692
4626
|
*
|
|
4693
|
-
* ORACLES ARE ENVIRONMENT, NEVER
|
|
4694
|
-
*
|
|
4695
|
-
*
|
|
4696
|
-
*
|
|
4627
|
+
* ORACLES ARE ENVIRONMENT, NEVER WORKERS. Graders/verifiers must not be spawnable in the graph —
|
|
4628
|
+
* a delegates edge to them leaks the rubric. An `analyzes` edge names its analyst in one of two
|
|
4629
|
+
* forms: a LENS id from the environment's registry (a pure function over trace evidence), or the
|
|
4630
|
+
* id of a graph NODE — a tool-equipped analyst AGENT spawned on each matching settle with the
|
|
4631
|
+
* node's pinned profile, whose settle output IS the findings. Either way the oracle doctrine
|
|
4632
|
+
* holds: an analyst node can never be a delegates target (refused loudly), so no driver can hand
|
|
4633
|
+
* it work, and an id living in both the registry and the nodes is refused as ambiguous.
|
|
4697
4634
|
*
|
|
4698
4635
|
* @experimental
|
|
4699
4636
|
*/
|
|
@@ -4752,16 +4689,24 @@ function validateGraph(graph, registry, analysts) {
|
|
|
4752
4689
|
const root = requireNode(roots[0], "root resolution");
|
|
4753
4690
|
for (const edge of delegates) if (edge.from !== root.id) throw new ValidationError(`runGraph: ${edgeId(edge)} delegates from a non-root node — P0 executes one driver over its workers (the 2-node cyclic case, star-generalized); deeper delegation is P3`);
|
|
4754
4691
|
const analystIds = /* @__PURE__ */ new Set();
|
|
4692
|
+
const analystNodes = /* @__PURE__ */ new Map();
|
|
4755
4693
|
for (const edge of analyzes) {
|
|
4756
4694
|
if (analystIds.has(edge.analyst)) throw new ValidationError(`runGraph: two analyzes edges share analyst '${edge.analyst}' — one analyzes edge per analyst lens (traversals are ledgered by analyst id; a second edge would silently absorb the first's). Register the lens under a second id for a second edge.`);
|
|
4757
4695
|
analystIds.add(edge.analyst);
|
|
4758
|
-
|
|
4759
|
-
|
|
4760
|
-
if (
|
|
4696
|
+
const analystNode = byId.get(edge.analyst);
|
|
4697
|
+
const inRegistry = analysts?.kinds.some((kind) => kind.id === edge.analyst) === true;
|
|
4698
|
+
if (analystNode !== void 0 && inRegistry) throw new ValidationError(`runGraph: ${edgeId(edge)} analyst '${edge.analyst}' is BOTH a graph node and a lens in the analysts registry — the id alone distinguishes the two analyst forms, so this is ambiguous; rename the node or register the lens under another id`);
|
|
4699
|
+
if (analystNode !== void 0) {
|
|
4700
|
+
if (analystNode.id === root.id) throw new ValidationError(`runGraph: ${edgeId(edge)} names the ROOT as its analyst — the root is the driver; give the analyst its own node with no delegates edge pointing at it`);
|
|
4701
|
+
if (delegatedTo.has(analystNode.id)) throw new ValidationError(`runGraph: ${edgeId(edge)} names node '${edge.analyst}' as its analyst, but that node is a delegates target — oracle doctrine: an analyst is never delegated to. An analyst NODE is legal only with NO delegates edge pointing at it; give the analyst its own delegates-free node or pass a lens id from RunGraphOptions.analysts.`);
|
|
4702
|
+
analystNodes.set(analystNode.id, analystNode);
|
|
4703
|
+
} else if (!analysts) throw new ValidationError(`runGraph: ${edgeId(edge)} analyst '${edge.analyst}' is not a graph node, and no RunGraphOptions.analysts registry was provided to resolve it as a lens`);
|
|
4704
|
+
else if (!inRegistry) throw new ValidationError(`runGraph: ${edgeId(edge)} analyst '${edge.analyst}' is neither a graph node nor in the analysts registry (known lenses: ${analysts.kinds.map((kind) => kind.id).join(", ") || "none"})`);
|
|
4761
4705
|
if (edge.over.length === 0) throw new ValidationError(`runGraph: ${edgeId(edge)} must analyze at least one node`);
|
|
4762
4706
|
for (const over of edge.over) requireNode(over, edgeId(edge));
|
|
4763
4707
|
requireNode(edge.to, edgeId(edge));
|
|
4764
4708
|
}
|
|
4709
|
+
for (const edge of analyzes) for (const over of edge.over) if (analystNodes.has(over)) throw new ValidationError(`runGraph: ${edgeId(edge)} analyzes '${over}', which is an analyst node — an analyst run settles as a finding, never as a worker, so this edge would silently never fire; analyst nodes are not analyzable`);
|
|
4765
4710
|
const workers = /* @__PURE__ */ new Map();
|
|
4766
4711
|
const delegatesByWorker = /* @__PURE__ */ new Map();
|
|
4767
4712
|
for (const edge of delegates) {
|
|
@@ -4769,12 +4714,13 @@ function validateGraph(graph, registry, analysts) {
|
|
|
4769
4714
|
delegatesByWorker.set(edge.to, edge);
|
|
4770
4715
|
workers.set(edge.to, requireNode(edge.to, edgeId(edge)));
|
|
4771
4716
|
}
|
|
4772
|
-
for (const node of graph.nodes) if (node.id !== root.id && !workers.has(node.id)) throw new ValidationError(`runGraph: node '${node.id}' has no delegates edge to it — an unreachable node never runs`);
|
|
4717
|
+
for (const node of graph.nodes) if (node.id !== root.id && !workers.has(node.id) && !analystNodes.has(node.id)) throw new ValidationError(`runGraph: node '${node.id}' has no delegates edge to it — an unreachable node never runs`);
|
|
4773
4718
|
return {
|
|
4774
4719
|
root,
|
|
4775
4720
|
workers,
|
|
4776
4721
|
delegatesByWorker,
|
|
4777
|
-
analyzes
|
|
4722
|
+
analyzes,
|
|
4723
|
+
analystNodes
|
|
4778
4724
|
};
|
|
4779
4725
|
}
|
|
4780
4726
|
const byteLength = (text) => Buffer.byteLength(text, "utf8");
|
|
@@ -4796,7 +4742,7 @@ function stringifyPayload(payload) {
|
|
|
4796
4742
|
*/
|
|
4797
4743
|
function runGraph(graph, opts) {
|
|
4798
4744
|
const registry = opts.registry ?? kernelPromptRegistry();
|
|
4799
|
-
const { root, workers, delegatesByWorker, analyzes } = validateGraph(graph, registry, opts.analysts);
|
|
4745
|
+
const { root, workers, delegatesByWorker, analyzes, analystNodes } = validateGraph(graph, registry, opts.analysts);
|
|
4800
4746
|
if (!opts.backend && !opts.makeWorkerAgent) throw new ValidationError("runGraph: provide opts.backend (where nodes run) or opts.makeWorkerAgent");
|
|
4801
4747
|
const journal = opts.journal ?? new InMemorySpawnJournal();
|
|
4802
4748
|
const blobs = opts.blobs ?? new InMemoryResultBlobStore();
|
|
@@ -4847,6 +4793,11 @@ function runGraph(graph, opts) {
|
|
|
4847
4793
|
const pendingByAssignment = /* @__PURE__ */ new Map();
|
|
4848
4794
|
const graphWorker = (authoredProfile, spawnContext) => {
|
|
4849
4795
|
const requested = typeof authoredProfile?.name === "string" ? authoredProfile.name : void 0;
|
|
4796
|
+
if (spawnContext?.analyst !== void 0) {
|
|
4797
|
+
const analystNode = analystNodes.get(spawnContext.analyst);
|
|
4798
|
+
if (!analystNode || requested !== analystNode.id) throw new ValidationError(`runGraph: analyst run for ${JSON.stringify(spawnContext.analyst)} does not name an analyst node of this graph (analyst nodes: ${[...analystNodes.keys()].join(", ") || "none"})`);
|
|
4799
|
+
return makeLeaf(analystNode.profile, spawnContext);
|
|
4800
|
+
}
|
|
4850
4801
|
const node = requested !== void 0 ? workers.get(requested) : void 0;
|
|
4851
4802
|
if (!node) throw new ValidationError(`runGraph: spawn_agent named profile ${JSON.stringify(requested)} which is not a worker node of this graph (nodes: ${[...workers.keys()].join(", ")}). Spawn by node id: profile.name selects the node; the node profile itself is pinned by the graph.`);
|
|
4852
4803
|
const edge = delegatesByWorker.get(node.id);
|
|
@@ -4891,16 +4842,26 @@ function runGraph(graph, opts) {
|
|
|
4891
4842
|
};
|
|
4892
4843
|
return makeLeaf(pinned, spawnContext);
|
|
4893
4844
|
};
|
|
4894
|
-
const routes = analyzes.map((edge) =>
|
|
4895
|
-
|
|
4896
|
-
|
|
4897
|
-
|
|
4898
|
-
|
|
4899
|
-
|
|
4900
|
-
|
|
4901
|
-
|
|
4845
|
+
const routes = analyzes.map((edge) => {
|
|
4846
|
+
const analystNode = analystNodes.get(edge.analyst);
|
|
4847
|
+
if (analystNode) return {
|
|
4848
|
+
kind: edge.analyst,
|
|
4849
|
+
over: edge.over,
|
|
4850
|
+
agent: analystNode.profile,
|
|
4851
|
+
directive: registry.resolve(edge.directive).text,
|
|
4852
|
+
...edge.to === root.id ? {} : { to: edge.to }
|
|
4853
|
+
};
|
|
4854
|
+
return edge.to === root.id ? {
|
|
4855
|
+
kind: edge.analyst,
|
|
4856
|
+
over: edge.over
|
|
4857
|
+
} : {
|
|
4858
|
+
kind: edge.analyst,
|
|
4859
|
+
over: edge.over,
|
|
4860
|
+
to: edge.to,
|
|
4861
|
+
directive: registry.resolve(edge.directive).text
|
|
4862
|
+
};
|
|
4902
4863
|
});
|
|
4903
|
-
const driverAnalyzesBriefs = analyzes.filter((edge) => edge.to === root.id).map((edge) => `Findings from analyst '${edge.analyst}' (over: ${edge.over.join(", ")}) will arrive as finding events.\n${registry.resolve(edge.directive).text}`);
|
|
4864
|
+
const driverAnalyzesBriefs = analyzes.filter((edge) => edge.to === root.id).map((edge) => analystNodes.has(edge.analyst) ? `Findings from analyst '${edge.analyst}' (a tool-equipped analyst agent node, over: ${edge.over.join(", ")}) will arrive as finding events.` : `Findings from analyst '${edge.analyst}' (over: ${edge.over.join(", ")}) will arrive as finding events.\n${registry.resolve(edge.directive).text}`);
|
|
4904
4865
|
const graphBrief = [
|
|
4905
4866
|
"AGENT GRAPH: you are the driver node of a fixed topology. You may spawn ONLY these worker",
|
|
4906
4867
|
"nodes, by EXACT name (spawn_agent with profile: { name: '<node id>' }; the node's full",
|
|
@@ -5012,10 +4973,11 @@ function runGraph(graph, opts) {
|
|
|
5012
4973
|
runId,
|
|
5013
4974
|
hooks,
|
|
5014
4975
|
onCoordinationEvent,
|
|
5015
|
-
...routes.length > 0
|
|
5016
|
-
|
|
5017
|
-
|
|
4976
|
+
...routes.length > 0 ? {
|
|
4977
|
+
analyzeOnSettle: routes,
|
|
4978
|
+
...opts.analysts ? { analysts: opts.analysts } : {}
|
|
5018
4979
|
} : {},
|
|
4980
|
+
...opts.watchWorkers ? { watchWorkers: opts.watchWorkers } : {},
|
|
5019
4981
|
...opts.router ? { router: opts.router } : {},
|
|
5020
4982
|
...opts.brain ? { brain: opts.brain } : {},
|
|
5021
4983
|
...authorizeMessage ? { authorizeMessage } : {},
|
|
@@ -6188,6 +6150,6 @@ function tail(s) {
|
|
|
6188
6150
|
return s.slice(-400);
|
|
6189
6151
|
}
|
|
6190
6152
|
//#endregion
|
|
6191
|
-
export { panel as $, runStrategyEvolution as A,
|
|
6153
|
+
export { panel as $, runStrategyEvolution as A, materializeLocalMcp as At, equalKOnCost as B, GraphEdgeCapError as C, renderLeaderboardMarkdown as Ct, streamAgentTurn as D, defaultAuditorInstruction as Dt, collectAgentTurn as E, auditIntent as Et, SandboxRunAbortError as F, resolveMcpServerLaunch as Ft, createShapeRegistry as G, definePersona as H, openSandboxRun as I, resolveSecretEnv as It, InMemoryCorpus as J, registerShape as K, printBenchmarkReport as L, secretEnvOfMcpServer as Lt, assertStrategyContract as M, sanitizeMcpToolSchema as Mt, authorStrategy as N, envKeyProvider as Nt, discriminatingMeans as O, McpSpawnFault as Ot, strategyAuthorContract as P, mcpSecretEnvMetadataKey as Pt, loopUntil as Q, runBenchmark as R, runCoderChecks as S, renderLeaderboardHtml as St, runGraph as T, renderPairwiseMarkdown as Tt, runPersonified as U, trajectoryReport as V, builtinShapes as W, fanout as X, renderCorpusToInstructions as Y, flatWidenGate as Z, settledWorkerOut as _, deterministicCompletion as _t, localShell as a, buildSteerContext as at, analyzeTrace as b, leaderboard as bt, createVerifierEnvironment as c, inProcessSandboxClient as ct, worktreeFanout as d, resolveSandboxClient as dt, pipeline as et, EVIDENCE_MAX_CHARS as f, localSandboxClient as ft, composeWorkerEvidence as g, completionAuthorizes as gt, closingWorkerNote as h, loopDispatch as ht, jjWorkspace as i, assertTraceDerivedFindings as it, selectChampion as j, createMcpEnvironment as jt, pickChampion as k, connectStdioMcp as kt, failuresAnalyst as l, harvestCorpus as lt, VERIFY_TAIL_CHARS as m, loopCampaignDispatch as mt, makeFinding$1 as n, verify as nt, runInWorkspace as o, createScopeAnalyst as ot, NOTE_MAX_CHARS as p, inlineSandboxClient as pt, FileCorpus as q, gitWorkspace as r, widen as rt, createWaterfallCollector as s, registryScopeAnalyst as st, computeFindingId$1 as t, selectValidWinner as tt, superviseSurface as u, defineLeaderboard as ut, copyUntrackedIntoClone as v, sentinelCompletion as vt, defaultEdgeTraversalCap as w, renderLeaderboardSvg as wt, patchDelivered as x, pairwiseSignificance as xt, withUntrackedArtifacts as y, stopSentinel as yt, promotionGate as z };
|
|
6192
6154
|
|
|
6193
|
-
//# sourceMappingURL=runtime-
|
|
6155
|
+
//# sourceMappingURL=runtime-BzXz7OjS.js.map
|