@tangle-network/agent-runtime 0.132.5 → 0.132.7

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.
Files changed (62) hide show
  1. package/dist/{activation-Djhlt6gA.js → activation-Cb1vGSdK.js} +2 -2
  2. package/dist/{activation-Djhlt6gA.js.map → activation-Cb1vGSdK.js.map} +1 -1
  3. package/dist/agent.d.ts +1 -1
  4. package/dist/agent.js +2 -2
  5. package/dist/{authoring-4Yyp4Get.js → authoring-CQP4S4uc.js} +2 -2
  6. package/dist/{authoring-4Yyp4Get.js.map → authoring-CQP4S4uc.js.map} +1 -1
  7. package/dist/{conversation-D95pue6P.js → conversation-BiII3X_6.js} +3 -3
  8. package/dist/{conversation-D95pue6P.js.map → conversation-BiII3X_6.js.map} +1 -1
  9. package/dist/conversation.d.ts +1 -1
  10. package/dist/conversation.js +1 -1
  11. package/dist/{environment-provider-DlYw_pjo.d.ts → environment-provider-CkSDxRZd.d.ts} +2 -2
  12. package/dist/environment-provider.d.ts +1 -1
  13. package/dist/{graph-C-2FjZYl.js → graph-DgDaI3KK.js} +2 -2
  14. package/dist/{graph-C-2FjZYl.js.map → graph-DgDaI3KK.js.map} +1 -1
  15. package/dist/{improvement-cycle-CcNYXtV3.js → improvement-cycle-DCBmuhht.js} +4 -4
  16. package/dist/{improvement-cycle-CcNYXtV3.js.map → improvement-cycle-DCBmuhht.js.map} +1 -1
  17. package/dist/{index-CcpNgmQY.d.ts → index-BsrFZu0N.d.ts} +4 -4
  18. package/dist/{index-iwZ0at5o.d.ts → index-Cdf9NET5.d.ts} +2 -2
  19. package/dist/{index-D9dVsozT.d.ts → index-DixXnx07.d.ts} +73 -7
  20. package/dist/index.d.ts +8 -8
  21. package/dist/index.js +9 -9
  22. package/dist/intelligence.d.ts +4 -4
  23. package/dist/intelligence.js +3 -3
  24. package/dist/kernel.d.ts +6 -6
  25. package/dist/kernel.js +7 -7
  26. package/dist/{knowledge-DHC3bfYP.js → knowledge-B8pmbGqF.js} +3 -3
  27. package/dist/{knowledge-DHC3bfYP.js.map → knowledge-B8pmbGqF.js.map} +1 -1
  28. package/dist/knowledge.d.ts +1 -1
  29. package/dist/knowledge.js +1 -1
  30. package/dist/{loop-runner-bin-D9OAFkP_.d.ts → loop-runner-bin-BqJGlXju.d.ts} +3 -3
  31. package/dist/{loop-runner-bin-BDKC-Pfw.js → loop-runner-bin-D9qLc2dD.js} +3 -3
  32. package/dist/{loop-runner-bin-BDKC-Pfw.js.map → loop-runner-bin-D9qLc2dD.js.map} +1 -1
  33. package/dist/loop-runner-bin.d.ts +1 -1
  34. package/dist/loop-runner-bin.js +1 -1
  35. package/dist/{materialization-DBXuH34A.js → materialization-JR_nN_oT.js} +18 -2
  36. package/dist/materialization-JR_nN_oT.js.map +1 -0
  37. package/dist/mcp/bin.js +3 -3
  38. package/dist/mcp/index.d.ts +3 -3
  39. package/dist/mcp/index.js +4 -4
  40. package/dist/{openai-tools-DWfAhx1n.js → openai-tools-C6KQ6aVK.js} +2 -2
  41. package/dist/{openai-tools-DWfAhx1n.js.map → openai-tools-C6KQ6aVK.js.map} +1 -1
  42. package/dist/primeintellect/index.d.ts +1 -1
  43. package/dist/{redact-mWj5eu4X.d.ts → redact-BAnM2avI.d.ts} +3 -3
  44. package/dist/{runtime-B3Ty5dJP.js → runtime-B5z9C4gn.js} +65 -15
  45. package/dist/runtime-B5z9C4gn.js.map +1 -0
  46. package/dist/{runtime-aXvRThzL.d.ts → runtime-CKk_poJ-.d.ts} +3 -3
  47. package/dist/{stream-agent-turn-BxwZJVfZ.js → stream-agent-turn-Bo5ZSAUR.js} +2 -2
  48. package/dist/{stream-agent-turn-BxwZJVfZ.js.map → stream-agent-turn-Bo5ZSAUR.js.map} +1 -1
  49. package/dist/{stream-agent-turn-BXiMHdCf.d.ts → stream-agent-turn-By46GZlo.d.ts} +2 -2
  50. package/dist/{structural-rollout-lRYq5ra9.js → structural-rollout-DBYiyyE-.js} +4 -4
  51. package/dist/{structural-rollout-lRYq5ra9.js.map → structural-rollout-DBYiyyE-.js.map} +1 -1
  52. package/dist/{supervise-CxYIRLFa.js → supervise-oLZHae_v.js} +40 -5
  53. package/dist/supervise-oLZHae_v.js.map +1 -0
  54. package/dist/{supervisor-CRYhRmN7.js → supervisor-D5ar0Rs6.js} +6 -5
  55. package/dist/{supervisor-CRYhRmN7.js.map → supervisor-D5ar0Rs6.js.map} +1 -1
  56. package/dist/testing.d.ts +2 -2
  57. package/dist/testing.js +11 -11
  58. package/dist/{types-B9KAen_0.d.ts → types-BjUQODeG.d.ts} +21 -2
  59. package/package.json +1 -1
  60. package/dist/materialization-DBXuH34A.js.map +0 -1
  61. package/dist/runtime-B3Ty5dJP.js.map +0 -1
  62. package/dist/supervise-CxYIRLFa.js.map +0 -1
package/dist/mcp/index.js CHANGED
@@ -1,12 +1,12 @@
1
1
  import { i as ConfigError, u as ValidationError } from "../errors-DEAvWQPy.js";
2
2
  import { d as throwAbort, f as throwIfAborted, l as sleep, r as deleteBoxSafe } from "../util-Dr--8wAL.js";
3
3
  import { t as assertExecutableAgentProfile } from "../model-policy-mWSoToiQ.js";
4
- import { $ as runAgentRounds, At as createWorktree, Ft as localHarnessExecutable, It as parseCodexTokenUsage, Lt as CodexExecutionDiagnosticError, Mt as DEFAULT_LOCAL_HARNESS, Nt as LOCAL_HARNESSES, Ot as runWorktreeHarness, Pt as harnessSupportsReasoningEffort, Z as createSandboxForSpec, at as createPropagatingTraceEmitter, ct as traceContextToEnv, jt as removeWorktree, kt as captureWorktreeDiff, ot as mergeTraceEnv, st as readTraceContextFromEnv } from "../supervisor-CRYhRmN7.js";
5
- import { S as runCoderChecks, nt as selectValidWinner } from "../runtime-B3Ty5dJP.js";
6
- import { $ as DELEGATION_TRACE_MAX_BYTES, A as DELEGATION_HISTORY_INPUT_SCHEMA, B as DELEGATE_FEEDBACK_INPUT_SCHEMA, C as createMcpServer, D as createDelegationStatusHandler, Dt as createCoordinationTools, E as DELEGATION_STATUS_TOOL_NAME, F as DELEGATE_UI_AUDIT_INPUT_SCHEMA, G as DELEGATE_INPUT_SCHEMA, H as createDelegateFeedbackHandler, I as DELEGATE_UI_AUDIT_TOOL_NAME, J as validateDelegateArgs, K as DELEGATE_TOOL_NAME, L as createDelegateUiAuditHandler, M as createDelegationHistoryHandler, N as validateDelegationHistoryArgs, O as validateDelegationStatusArgs, P as DELEGATE_UI_AUDIT_DESCRIPTION, Q as hashIdempotencyInput, R as validateDelegateUiAuditArgs, S as createInProcessTransport, T as DELEGATION_STATUS_INPUT_SCHEMA, Tt as DEFAULT_AWAIT_EVENT_TIMEOUT_MS, U as validateDelegateFeedbackArgs, V as DELEGATE_FEEDBACK_TOOL_NAME, W as DELEGATE_DESCRIPTION, Z as DelegationTaskQueue, at as DelegationPersistenceError, ct as InMemoryDelegationStore, et as DELEGATION_TRACE_MAX_SPANS, it as createDelegationTraceCollector, j as DELEGATION_HISTORY_TOOL_NAME, k as DELEGATION_HISTORY_DESCRIPTION, lt as InMemoryFeedbackStore, nt as capDelegationTrace, ot as DelegationStateCorruptError, q as createDelegateHandler, rt as composeLoopTraceEmitters, st as FileDelegationStore, tt as buildDelegationTraceSpans, ut as eventToSnapshot, w as DELEGATION_STATUS_DESCRIPTION, z as DELEGATE_FEEDBACK_DESCRIPTION } from "../supervise-CxYIRLFa.js";
4
+ import { $ as runAgentRounds, At as createWorktree, Ft as localHarnessExecutable, It as parseCodexTokenUsage, Lt as CodexExecutionDiagnosticError, Mt as DEFAULT_LOCAL_HARNESS, Nt as LOCAL_HARNESSES, Ot as runWorktreeHarness, Pt as harnessSupportsReasoningEffort, Z as createSandboxForSpec, at as createPropagatingTraceEmitter, ct as traceContextToEnv, jt as removeWorktree, kt as captureWorktreeDiff, ot as mergeTraceEnv, st as readTraceContextFromEnv } from "../supervisor-D5ar0Rs6.js";
5
+ import { S as runCoderChecks, nt as selectValidWinner } from "../runtime-B5z9C4gn.js";
6
+ import { $ as DELEGATION_TRACE_MAX_BYTES, A as DELEGATION_HISTORY_INPUT_SCHEMA, B as DELEGATE_FEEDBACK_INPUT_SCHEMA, C as createMcpServer, D as createDelegationStatusHandler, Dt as createCoordinationTools, E as DELEGATION_STATUS_TOOL_NAME, F as DELEGATE_UI_AUDIT_INPUT_SCHEMA, G as DELEGATE_INPUT_SCHEMA, H as createDelegateFeedbackHandler, I as DELEGATE_UI_AUDIT_TOOL_NAME, J as validateDelegateArgs, K as DELEGATE_TOOL_NAME, L as createDelegateUiAuditHandler, M as createDelegationHistoryHandler, N as validateDelegationHistoryArgs, O as validateDelegationStatusArgs, P as DELEGATE_UI_AUDIT_DESCRIPTION, Q as hashIdempotencyInput, R as validateDelegateUiAuditArgs, S as createInProcessTransport, T as DELEGATION_STATUS_INPUT_SCHEMA, Tt as DEFAULT_AWAIT_EVENT_TIMEOUT_MS, U as validateDelegateFeedbackArgs, V as DELEGATE_FEEDBACK_TOOL_NAME, W as DELEGATE_DESCRIPTION, Z as DelegationTaskQueue, at as DelegationPersistenceError, ct as InMemoryDelegationStore, et as DELEGATION_TRACE_MAX_SPANS, it as createDelegationTraceCollector, j as DELEGATION_HISTORY_TOOL_NAME, k as DELEGATION_HISTORY_DESCRIPTION, lt as InMemoryFeedbackStore, nt as capDelegationTrace, ot as DelegationStateCorruptError, q as createDelegateHandler, rt as composeLoopTraceEmitters, st as FileDelegationStore, tt as buildDelegationTraceSpans, ut as eventToSnapshot, w as DELEGATION_STATUS_DESCRIPTION, z as DELEGATE_FEEDBACK_DESCRIPTION } from "../supervise-oLZHae_v.js";
7
7
  import { t as createStdioToolServer } from "../tool-server-Gs3VvfSK.js";
8
8
  import { t as createKbGate } from "../kb-gate-DpaSwXVx.js";
9
- import { n as mcpToolsForRuntimeMcpSubset, t as mcpToolsForRuntimeMcp } from "../openai-tools-DWfAhx1n.js";
9
+ import { n as mcpToolsForRuntimeMcpSubset, t as mcpToolsForRuntimeMcp } from "../openai-tools-C6KQ6aVK.js";
10
10
  import { t as coderTaskToPrompt } from "../coder-yhVWbdWc.js";
11
11
  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-eD2baiRO.js";
12
12
  import { agentProfileSchema } from "@tangle-network/agent-interface";
@@ -1,4 +1,4 @@
1
- import { A as DELEGATION_HISTORY_INPUT_SCHEMA, B as DELEGATE_FEEDBACK_INPUT_SCHEMA, E as DELEGATION_STATUS_TOOL_NAME, T as DELEGATION_STATUS_INPUT_SCHEMA, V as DELEGATE_FEEDBACK_TOOL_NAME, j as DELEGATION_HISTORY_TOOL_NAME, k as DELEGATION_HISTORY_DESCRIPTION, w as DELEGATION_STATUS_DESCRIPTION, z as DELEGATE_FEEDBACK_DESCRIPTION } from "./supervise-CxYIRLFa.js";
1
+ import { A as DELEGATION_HISTORY_INPUT_SCHEMA, B as DELEGATE_FEEDBACK_INPUT_SCHEMA, E as DELEGATION_STATUS_TOOL_NAME, T as DELEGATION_STATUS_INPUT_SCHEMA, V as DELEGATE_FEEDBACK_TOOL_NAME, j as DELEGATION_HISTORY_TOOL_NAME, k as DELEGATION_HISTORY_DESCRIPTION, w as DELEGATION_STATUS_DESCRIPTION, z as DELEGATE_FEEDBACK_DESCRIPTION } from "./supervise-oLZHae_v.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-DWfAhx1n.js.map
44
+ //# sourceMappingURL=openai-tools-C6KQ6aVK.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"openai-tools-DWfAhx1n.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 a caller-owned OpenAI-compatible transport needs the model to call\n * `delegate_feedback`, `delegation_status`, and `delegation_history`. Execution\n * is the caller's responsibility (typically the parent sandbox runtime's MCP\n * mount); Runtime's profile-bound model path materializes profile tools through\n * its executor instead.\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-compatible transports JSON-serialize 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":";;AAuCA,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
+ {"version":3,"file":"openai-tools-C6KQ6aVK.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 a caller-owned OpenAI-compatible transport needs the model to call\n * `delegate_feedback`, `delegation_status`, and `delegation_history`. Execution\n * is the caller's responsibility (typically the parent sandbox runtime's MCP\n * mount); Runtime's profile-bound model path materializes profile tools through\n * its executor instead.\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-compatible transports JSON-serialize 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":";;AAuCA,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,4 +1,4 @@
1
- import { a as ExecutorConfig } from "../runtime-aXvRThzL.js";
1
+ import { a as ExecutorConfig } from "../runtime-CKk_poJ-.js";
2
2
  import { RunRecord } from "@tangle-network/agent-eval";
3
3
  //#region src/primeintellect/types.d.ts
4
4
  type PrimeIntellectSplit = 'train' | 'eval';
@@ -1,5 +1,5 @@
1
- import { a as ExecutorConfig } from "./runtime-aXvRThzL.js";
2
- import { i as CollectedAgentTurn, r as AgentTurnUsage } from "./stream-agent-turn-BXiMHdCf.js";
1
+ import { a as ExecutorConfig } from "./runtime-CKk_poJ-.js";
2
+ import { i as CollectedAgentTurn, r as AgentTurnUsage } from "./stream-agent-turn-By46GZlo.js";
3
3
  import { CostLedgerHandle, MaximumCharge, ProposalFinding } from "@tangle-network/agent-eval";
4
4
  import { CampaignScenarioIdentity, CompareOptimizationMethodsOptions, OptimizationMethod, OptimizationMethodComparison, WorktreeAdapter } from "@tangle-network/agent-eval/campaign";
5
5
  import { AgentProfile as AgentProfile$1, AgentProfileDiff, HarnessType as HarnessType$1, ReasoningEffort, Sha256Digest } from "@tangle-network/agent-interface";
@@ -545,4 +545,4 @@ declare function defaultRedactor(value: unknown): unknown;
545
545
  declare function resolveRedactor(redact: Redactor | false | undefined): Redactor;
546
546
  //#endregion
547
547
  export { agenticGenerator as $, ImprovementCandidate as A, ImprovementProfilePopulationLineage as B, ImproveProfileComponents as C, ImproveScenarioPartitions as D, ImproveRuntimeCodeGeneratorOptions as E, ImprovementProfileCandidatePopulationAvailable as F, ReadonlyAgentProfile as G, ImprovementProfilePopulationObservationSource as H, ImprovementProfileCandidatePopulationUnavailable as I, AgenticGeneratorShotDisposition as J, AgenticGeneratorExecutorForWorktree as K, ImprovementProfilePopulationArtifactSource as L, ImprovementMaterializedProfilePopulationCandidate as M, ImprovementProfileCandidate as N, ImproveSkillsOptions as O, ImprovementProfileCandidatePopulation as P, VerifyResult as Q, ImprovementProfilePopulationCandidate as R, ImproveProfileAgent as S, ImproveResult as T, ImprovementRefusedProfilePopulationCandidate as U, ImprovementProfilePopulationLineageNode as V, DeepReadonly as W, AgenticGeneratorShotReceipt as X, AgenticGeneratorShotExecution as Y, Verifier as Z, ImproveMethodOptions as _, ImproveCandidateValidationInput as a, ImproveOptimizationRunOptions as b, ImproveCodeOptions as c, ImproveCost as d, commandVerifier as et, ImproveCustomCodeGeneratorOptions as f, ImproveMethodLineage as g, ImproveMethodFactory as h, improve as i, ImprovementCodeCandidate as j, ImproveSurface as k, ImproveCodeResult as l, ImproveMethodContext as m, defaultRedactor as n, CandidateGenerator as nt, ImproveCandidateValidator as o, ImproveLineage as p, AgenticGeneratorOptions as q, resolveRedactor as r, ImproveCodeBaseOptions as s, Redactor as t, defaultBuildPrompt as tt, ImproveCodeRunOptions as u, ImproveMethodResult as v, ImproveProfileSurface as w, ImproveOptions as x, ImproveMethodSource as y, ImprovementProfilePopulationCandidateSource as z };
548
- //# sourceMappingURL=redact-mWj5eu4X.d.ts.map
548
+ //# sourceMappingURL=redact-BAnM2avI.d.ts.map
@@ -1,19 +1,19 @@
1
1
  import { n as AnalystError, s as PlannerError, u as ValidationError } from "./errors-DEAvWQPy.js";
2
- import "./stream-agent-turn-BxwZJVfZ.js";
2
+ import "./stream-agent-turn-Bo5ZSAUR.js";
3
3
  import { i as InMemorySpawnJournal, r as InMemoryResultBlobStore, v as isTraceAnalysisStore, x as contentAddress } from "./spawn-journal-Cd5L-Ie9.js";
4
4
  import { a as isAbortError, i as hasCompleteCacheBreakdown, l as sleep, m as zeroTokenUsage, n as cloneTokenUsage, s as randomSuffix, t as addTokenUsage, u as stringifySafe } from "./util-Dr--8wAL.js";
5
5
  import { i as redactProtectedValue, r as redactProtectedReason } from "./protected-redaction--F3v1oo8.js";
6
6
  import { a as notifySandboxEventObserver, c as parseCanonicalTransportEvent, s as extractTransportEventIdentity } from "./sandbox-events-vIwmuPdl.js";
7
7
  import { c as profileProviderModel, i as concreteModelId, s as profileModelExecutionSettings, t as assertExecutableAgentProfile } from "./model-policy-mWSoToiQ.js";
8
- import { v as executableAgentProfileSnapshot, y as executableAgentSpecSnapshot } from "./materialization-DBXuH34A.js";
9
- import { $ as runAgentRounds, I as createWorktreeCliExecutor, N as createExecutor, P as createExecutorRegistry, Q as defaultSelectWinner, W as createPushTraceSource, et as createSandboxLineage, it as runBrainLoop, l as withDriverExecutor, m as settledToIteration, n as createSupervisor, rt as routerBrain, tt as probeSandboxCapabilities, w as rollingDispatch } from "./supervisor-CRYhRmN7.js";
8
+ import { b as executableAgentProfileSnapshot, x as executableAgentSpecSnapshot } from "./materialization-JR_nN_oT.js";
9
+ import { $ as runAgentRounds, I as createWorktreeCliExecutor, N as createExecutor, P as createExecutorRegistry, Q as defaultSelectWinner, W as createPushTraceSource, et as createSandboxLineage, it as runBrainLoop, l as withDriverExecutor, m as settledToIteration, n as createSupervisor, rt as routerBrain, tt as probeSandboxCapabilities, w as rollingDispatch } from "./supervisor-D5ar0Rs6.js";
10
10
  import "./environment-provider-mDsjfGjY.js";
11
11
  import { i as notifyRuntimeHookEvent } from "./runtime-hooks-C7iJOWm3.js";
12
- import { C as observe, O as strategyAuthorMethod, T as profileChatClient, b as sample, v as refine, x as sampleThenRefine, y as runAgentic } from "./structural-rollout-lRYq5ra9.js";
13
- import { It as gateOnDeliverable, Lt as mapExecutorResult, n as supervise } from "./supervise-CxYIRLFa.js";
14
- import "./authoring-4Yyp4Get.js";
15
- import "./graph-C-2FjZYl.js";
16
- import { CODING_HARNESSES, InMemoryTraceStore, OUTPUT_VALUE, benjaminiHochberg, buildTrajectory, computeFindingId as computeFindingId$1, confidenceInterval, expandProfileAxes, makeFinding as makeFinding$1, pairedBootstrap, paretoFrontier, wilcoxonSignedRank, wilson } from "@tangle-network/agent-eval";
12
+ import { C as observe, O as strategyAuthorMethod, T as profileChatClient, b as sample, v as refine, x as sampleThenRefine, y as runAgentic } from "./structural-rollout-DBYiyyE-.js";
13
+ import { It as gateOnDeliverable, Lt as mapExecutorResult, n as supervise } from "./supervise-oLZHae_v.js";
14
+ import "./authoring-CQP4S4uc.js";
15
+ import "./graph-DgDaI3KK.js";
16
+ import { CODING_HARNESSES, InMemoryTraceStore, OUTPUT_VALUE, benjaminiHochberg, buildTrajectory, computeFindingId as computeFindingId$1, confidenceInterval, expandProfileAxes, makeFinding as makeFinding$1, modelHasSnapshot, pairedBootstrap, paretoFrontier, wilcoxonSignedRank, wilson } from "@tangle-network/agent-eval";
17
17
  import { heldoutSignificance, runProfileMatrix } from "@tangle-network/agent-eval/campaign";
18
18
  import { AgentEnvironmentCapabilitiesSchema, AgentExactRunControlRefSchema, AgentNativeContextContinuationResultSchema, AgentRunCancellationAcknowledgementSchema, AgentRunCancellationRequestSchema, AgentTurnResultSchema, InteractionAcknowledgementSchema, InteractionResponseCommandSchema, NativeContextBoundaryProofSchema, NativeContextContinuationRequestSchema, RuntimeEventEnvelopeSchema, agentNativeContextContinuationResultMatchesRequest, agentProfileSchema, agentRunCancellationAcknowledgementMatchesRequest, agentRunCancellationRequestDigest, canonicalAgentProfileDigest, canonicalCandidateDigest, nativeContextContinuationTurnDigest, validateAgentProfileSecurity } from "@tangle-network/agent-interface";
19
19
  import { dirname, isAbsolute, join, relative, resolve, sep } from "node:path";
@@ -995,6 +995,38 @@ function deterministicCompletion(check) {
995
995
  }
996
996
  //#endregion
997
997
  //#region src/runtime/loop-dispatch.ts
998
+ /**
999
+ * `loopDispatch` — turn `runAgentRounds` into an agent-eval campaign dispatch.
1000
+ *
1001
+ * Without this adapter a consumer wiring `runAgentRounds` into `runProfileMatrix` /
1002
+ * `runCampaign` has to, by hand, every time: (a) build an `ExecCtx` with a
1003
+ * sandbox client, (b) adapt the campaign `DispatchContext.trace` into a
1004
+ * `LoopTraceEmitter` (or lose all loop trace correlation), and (c) remember to
1005
+ * forward the loop's cost + tokens via `ctx.cost` (forgetting it yields a
1006
+ * `{0,0}` cell the backend-integrity guard reads as a stub). Three foot-guns,
1007
+ * the third silent. The fleet's products skipped (c) and fell back to a
1008
+ * `workerRecords[]` side-channel — the exact anti-pattern the substrate exists
1009
+ * to kill.
1010
+ *
1011
+ * `loopDispatch` collapses all three into one typed call:
1012
+ *
1013
+ * const dispatch = loopDispatch({
1014
+ * sandboxClient,
1015
+ * toLoopOptions: (scenario, profile) => ({ driver, agentRun, output, validator, task }),
1016
+ * })
1017
+ * await runProfileMatrix({ profiles, scenarios, dispatch, judges, commitSha })
1018
+ *
1019
+ * The complete Runtime cell starts inside `ctx.cost.runPaidCall` before any
1020
+ * sandbox work begins. Its provider-reported usage becomes the paid-call
1021
+ * receipt before Eval settles the call. A completed `LoopResult` cannot be
1022
+ * attached afterward because it cannot prove pre-execution admission.
1023
+ * Trace events are forwarded automatically and the Runtime context is built
1024
+ * automatically.
1025
+ *
1026
+ * Typed structurally against the campaign `DispatchContext` (imported type-only
1027
+ * from `@tangle-network/agent-eval/campaign`) — a downward dependency, never an
1028
+ * inversion.
1029
+ */
998
1030
  /** Bridge a campaign `DispatchContext.trace` to a `LoopTraceEmitter` so every
999
1031
  * `loop.*` event lands as a span under the cell's scoped trace. */
1000
1032
  function campaignTraceToLoopEmitter(trace) {
@@ -1066,15 +1098,19 @@ function costReceiptFromUsage(usage, model, cost) {
1066
1098
  /**
1067
1099
  * Eval has one pre-admitted paid call for this dispatch. A tree can only settle that one call when
1068
1100
  * Runtime can prove every visible leaf used the same model. Child identities come from Runtime's
1069
- * materialization receipts. A router root is validated against its exact profile model before
1070
- * Runtime accepts each response. A nested tree is not flattened in this result view, so it remains
1071
- * unknown rather than being relabelled from its parent. A caller-supplied override would be false.
1101
+ * materialization receipts. The root identity comes only from Runtime's settled provider receipt;
1102
+ * the authored profile remains a matching constraint, never a fallback. A nested tree is not
1103
+ * flattened in this result view, so it remains unknown rather than being relabelled from its
1104
+ * parent. A caller-supplied override would be false.
1072
1105
  */
1073
1106
  function supervisedTreeModel(result, rootProfile) {
1074
1107
  const models = /* @__PURE__ */ new Set();
1075
- const rootModel = rootProfile.harness === void 0 || rootProfile.harness === "cli-base" ? rootProfile.model?.default : void 0;
1076
- if (rootModel === void 0) return { kind: "unknown" };
1077
- models.add(rootModel);
1108
+ const rootEvidence = result.rootProviderModel;
1109
+ if (rootEvidence?.status !== "known" || rootEvidence.models.length === 0) return { kind: "unknown" };
1110
+ for (const model of rootEvidence.models) {
1111
+ if (!modelHasSnapshot(model) || !observedModelMatchesProfile(model, rootProfile)) return { kind: "unknown" };
1112
+ models.add(model);
1113
+ }
1078
1114
  let unknown = false;
1079
1115
  for (const node of result.tree.nodes) {
1080
1116
  if (node.ownedTreeRoot !== void 0) {
@@ -1098,6 +1134,20 @@ function supervisedTreeModel(result, rootProfile) {
1098
1134
  model: [...models][0]
1099
1135
  };
1100
1136
  }
1137
+ /** Match a provider-qualified response to the profile's base alias without accepting a different
1138
+ * model or using the profile alias as the reported identity. */
1139
+ function observedModelMatchesProfile(observed, profile) {
1140
+ const declared = profile.model?.default;
1141
+ if (typeof declared !== "string" || declared.length === 0) return false;
1142
+ if (modelHasSnapshot(declared)) return observed === declared;
1143
+ const observedBase = modelWithoutSnapshot(observed);
1144
+ const declaredBase = modelWithoutSnapshot(declared);
1145
+ return observedBase === declaredBase || observedBase.endsWith(`/${declaredBase}`) || declaredBase.endsWith(`/${observedBase}`);
1146
+ }
1147
+ function modelWithoutSnapshot(model) {
1148
+ const at = model.lastIndexOf("@");
1149
+ return at > 0 ? model.slice(0, at) : model;
1150
+ }
1101
1151
  /** The Eval receipt surface has no pre-admitted per-model recursive-tree receipt bundle yet. */
1102
1152
  var SupervisedTreeModelIdentityError = class extends Error {
1103
1153
  constructor(identity) {
@@ -6177,4 +6227,4 @@ function tail(s) {
6177
6227
  //#endregion
6178
6228
  export { loopUntil as $, assertStrategyContract as A, McpSpawnFault as At, promotionGate as B, chatTransportExecutor as C, pairwiseSignificance as Ct, pickChampion as D, renderPairwiseMarkdown as Dt, discriminatingMeans as E, renderLeaderboardSvg as Et, openSandboxRun as F, envKeyProvider as Ft, builtinShapes as G, trajectoryReport as H, printBenchmarkReport as I, mcpSecretEnvMetadataKey as It, FileCorpus as J, createShapeRegistry as K, runBenchmark as L, resolveMcpServerLaunch as Lt, strategyAuthorContract as M, materializeLocalMcp as Mt, strategyAuthorSystemPrompt as N, createMcpEnvironment as Nt, runStrategyEvolution as O, auditIntent as Ot, SandboxRunAbortError as P, sanitizeMcpToolSchema as Pt, flatWidenGate as Q, reconnectRetainedRun as R, resolveSecretEnv as Rt, runCoderChecks as S, leaderboard as St, createChatSessionStore as T, renderLeaderboardMarkdown as Tt, definePersona as U, equalKOnCost as V, runPersonified as W, renderCorpusToInstructions as X, InMemoryCorpus as Y, fanout as Z, settledWorkerOut as _, superviseDispatch as _t, localShell as a, assertTraceDerivedFindings as at, analyzeTrace as b, sentinelCompletion as bt, createVerifierEnvironment as c, registryScopeAnalyst as ct, worktreeFanout as d, defineLeaderboard as dt, panel as et, EVIDENCE_MAX_CHARS as f, resolveSandboxClient as ft, composeWorkerEvidence as g, loopDispatch as gt, closingWorkerNote as h, loopCampaignDispatch as ht, jjWorkspace as i, widen as it, authorStrategy as j, connectStdioMcp as jt, selectChampion as k, defaultAuditorInstruction as kt, failuresAnalyst as l, inProcessSandboxClient as lt, VERIFY_TAIL_CHARS as m, inlineSandboxClient as mt, makeFinding$1 as n, selectValidWinner as nt, runInWorkspace as o, buildSteerContext as ot, NOTE_MAX_CHARS as p, localSandboxClient as pt, registerShape as q, gitWorkspace as r, verify as rt, createWaterfallCollector as s, createScopeAnalyst as st, computeFindingId$1 as t, pipeline as tt, superviseSurface as u, harvestCorpus as ut, copyUntrackedIntoClone as v, completionAuthorizes as vt, chatWorkerSeam as w, renderLeaderboardHtml as wt, patchDelivered as x, stopSentinel as xt, withUntrackedArtifacts as y, deterministicCompletion as yt, startRetainedRun as z, secretEnvOfMcpServer as zt };
6179
6229
 
6180
- //# sourceMappingURL=runtime-B3Ty5dJP.js.map
6230
+ //# sourceMappingURL=runtime-B5z9C4gn.js.map