@tangle-network/agent-runtime 0.105.0 → 0.106.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (218) hide show
  1. package/README.md +2 -2
  2. package/dist/activation-CRjVfOiy.js +203 -0
  3. package/dist/activation-CRjVfOiy.js.map +1 -0
  4. package/dist/activation-DyWB0K6E.d.ts +98 -0
  5. package/dist/agent.d.ts +216 -234
  6. package/dist/agent.js +615 -547
  7. package/dist/agent.js.map +1 -1
  8. package/dist/analyst-loop-DGdtVENg.js +517 -0
  9. package/dist/analyst-loop-DGdtVENg.js.map +1 -0
  10. package/dist/analyst-loop.d.ts +10 -43
  11. package/dist/analyst-loop.js +2 -11
  12. package/dist/backends-CiOCyRHb.js +743 -0
  13. package/dist/backends-CiOCyRHb.js.map +1 -0
  14. package/dist/candidate-execution/index.d.ts +4 -192
  15. package/dist/candidate-execution/index.js +5 -66
  16. package/dist/candidate-execution-DqMbv1rU.js +488 -0
  17. package/dist/candidate-execution-DqMbv1rU.js.map +1 -0
  18. package/dist/coder-yhVWbdWc.js +40 -0
  19. package/dist/coder-yhVWbdWc.js.map +1 -0
  20. package/dist/conversation-BpLQZGPH.js +1265 -0
  21. package/dist/conversation-BpLQZGPH.js.map +1 -0
  22. package/dist/conversation.d.ts +2 -804
  23. package/dist/conversation.js +2 -55
  24. package/dist/environment-provider-CfLUmKmf.js +1168 -0
  25. package/dist/environment-provider-CfLUmKmf.js.map +1 -0
  26. package/dist/environment-provider-IUGU3epE.d.ts +964 -0
  27. package/dist/environment-provider.d.ts +2 -78
  28. package/dist/environment-provider.js +2 -18
  29. package/dist/errors-DEAvWQPy.js +111 -0
  30. package/dist/errors-DEAvWQPy.js.map +1 -0
  31. package/dist/improvement-adapter-Cr5TBSji.d.ts +166 -0
  32. package/dist/improvement-cycle-C095kS_g.js +2624 -0
  33. package/dist/improvement-cycle-C095kS_g.js.map +1 -0
  34. package/dist/index-BGdxAwfO.d.ts +838 -0
  35. package/dist/index-C-FYUuFG.d.ts +193 -0
  36. package/dist/index-CbNM40xG.d.ts +140 -0
  37. package/dist/index-DruSKs3Z.d.ts +7224 -0
  38. package/dist/index-Efjb3nrQ.d.ts +671 -0
  39. package/dist/index.d.ts +14 -1058
  40. package/dist/index.js +2106 -2082
  41. package/dist/index.js.map +1 -1
  42. package/dist/intelligence.d.ts +768 -889
  43. package/dist/intelligence.js +1466 -1367
  44. package/dist/intelligence.js.map +1 -1
  45. package/dist/{kb-gate-CwHO0vz6.d.ts → kb-gate-C8z2juK8.d.ts} +33 -31
  46. package/dist/kb-gate-DpaSwXVx.js +80 -0
  47. package/dist/kb-gate-DpaSwXVx.js.map +1 -0
  48. package/dist/knowledge-Ku-mPP4f.js +433 -0
  49. package/dist/knowledge-Ku-mPP4f.js.map +1 -0
  50. package/dist/knowledge.d.ts +2 -150
  51. package/dist/knowledge.js +2 -40
  52. package/dist/local-harness-Dh8PJ0ot.d.ts +455 -0
  53. package/dist/loop-runner-bin-BXsFEUcf.d.ts +162 -0
  54. package/dist/loop-runner-bin-CRagyuNb.js +268 -0
  55. package/dist/loop-runner-bin-CRagyuNb.js.map +1 -0
  56. package/dist/loop-runner-bin.d.ts +2 -15
  57. package/dist/loop-runner-bin.js +2 -24
  58. package/dist/loops.d.ts +5 -4164
  59. package/dist/loops.js +8 -419
  60. package/dist/mcp/bin.d.ts +1 -1
  61. package/dist/mcp/bin.js +116 -146
  62. package/dist/mcp/bin.js.map +1 -1
  63. package/dist/mcp/index.d.ts +295 -436
  64. package/dist/mcp/index.js +1242 -1177
  65. package/dist/mcp/index.js.map +1 -1
  66. package/dist/mcp/memory-bin.d.ts +1 -1
  67. package/dist/mcp/memory-bin.js +37 -16
  68. package/dist/mcp/memory-bin.js.map +1 -1
  69. package/dist/memory-server-DL6cE2Ag.js +234 -0
  70. package/dist/memory-server-DL6cE2Ag.js.map +1 -0
  71. package/dist/model-resolution-Btd9iIKV.js +98 -0
  72. package/dist/model-resolution-Btd9iIKV.js.map +1 -0
  73. package/dist/openai-tools-B68JaOCx.d.ts +24 -0
  74. package/dist/openai-tools-CKLy1C7M.js +44 -0
  75. package/dist/openai-tools-CKLy1C7M.js.map +1 -0
  76. package/dist/otel-export-D34IQW1C.js +843 -0
  77. package/dist/otel-export-D34IQW1C.js.map +1 -0
  78. package/dist/platform.d.ts +188 -185
  79. package/dist/platform.js +185 -218
  80. package/dist/platform.js.map +1 -1
  81. package/dist/prepare-B53sPV7M.js +4292 -0
  82. package/dist/prepare-B53sPV7M.js.map +1 -0
  83. package/dist/primeintellect/index.d.ts +149 -145
  84. package/dist/primeintellect/index.js +626 -1003
  85. package/dist/primeintellect/index.js.map +1 -1
  86. package/dist/profiles.d.ts +296 -490
  87. package/dist/profiles.js +722 -749
  88. package/dist/profiles.js.map +1 -1
  89. package/dist/protected-model-port-BLPH5VVv.js +722 -0
  90. package/dist/protected-model-port-BLPH5VVv.js.map +1 -0
  91. package/dist/protected-model-port-BP6Z4eau.d.ts +283 -0
  92. package/dist/protected-redaction--F3v1oo8.js +200 -0
  93. package/dist/protected-redaction--F3v1oo8.js.map +1 -0
  94. package/dist/redact-D-u-rrcn.js +82 -0
  95. package/dist/redact-D-u-rrcn.js.map +1 -0
  96. package/dist/redact-kbIOjfjM.d.ts +452 -0
  97. package/dist/researcher-CoVqNhfI.js +433 -0
  98. package/dist/researcher-CoVqNhfI.js.map +1 -0
  99. package/dist/runtime-5zM5XxLr.js +5408 -0
  100. package/dist/runtime-5zM5XxLr.js.map +1 -0
  101. package/dist/sandbox-events-DeI5xX8P.js +316 -0
  102. package/dist/sandbox-events-DeI5xX8P.js.map +1 -0
  103. package/dist/spawn-journal-CwPvKUTa.js +456 -0
  104. package/dist/spawn-journal-CwPvKUTa.js.map +1 -0
  105. package/dist/structural-rollout-IXUEplky.js +1445 -0
  106. package/dist/structural-rollout-IXUEplky.js.map +1 -0
  107. package/dist/substrate-B0TYNrXn.js +27 -0
  108. package/dist/substrate-B0TYNrXn.js.map +1 -0
  109. package/dist/{substrate-Dyiqmd3o.d.ts → substrate-BcnuSHXm.d.ts} +57 -54
  110. package/dist/supervise-BiRutHS9.js +7321 -0
  111. package/dist/supervise-BiRutHS9.js.map +1 -0
  112. package/dist/supervisor-DTKhF-RV.js +3826 -0
  113. package/dist/supervisor-DTKhF-RV.js.map +1 -0
  114. package/dist/testing.d.ts +4 -3
  115. package/dist/testing.js +2478 -2637
  116. package/dist/testing.js.map +1 -1
  117. package/dist/tool-server-RcWgLIsL.js +141 -0
  118. package/dist/tool-server-RcWgLIsL.js.map +1 -0
  119. package/dist/trace-propagation-CJJC7SVB.js +57 -0
  120. package/dist/trace-propagation-CJJC7SVB.js.map +1 -0
  121. package/dist/types-BaIpb0XT.d.ts +492 -0
  122. package/dist/types-BevOjfTY.d.ts +765 -0
  123. package/dist/types-C9j4qg6l.d.ts +500 -0
  124. package/dist/types-Cja5OTGh.d.ts +190 -0
  125. package/dist/util-MVgdwuIS.js +145 -0
  126. package/dist/util-MVgdwuIS.js.map +1 -0
  127. package/dist/workspace-archive-BosQiotA.js +575 -0
  128. package/dist/workspace-archive-BosQiotA.js.map +1 -0
  129. package/package.json +44 -56
  130. package/skills/build-with-agent-runtime/SKILL.md +1 -0
  131. package/dist/activation-Cm-9MMX1.d.ts +0 -69
  132. package/dist/analyst-loop.js.map +0 -1
  133. package/dist/backends-BO4Jqoe2.d.ts +0 -134
  134. package/dist/candidate-execution/index.js.map +0 -1
  135. package/dist/chunk-2KGAN2HM.js +0 -1256
  136. package/dist/chunk-2KGAN2HM.js.map +0 -1
  137. package/dist/chunk-2VZYRB55.js +0 -834
  138. package/dist/chunk-2VZYRB55.js.map +0 -1
  139. package/dist/chunk-3MDZX7YU.js +0 -125
  140. package/dist/chunk-3MDZX7YU.js.map +0 -1
  141. package/dist/chunk-5IBQAPVB.js +0 -29
  142. package/dist/chunk-5IBQAPVB.js.map +0 -1
  143. package/dist/chunk-5QOB7H74.js +0 -387
  144. package/dist/chunk-5QOB7H74.js.map +0 -1
  145. package/dist/chunk-C5RTIBNZ.js +0 -48
  146. package/dist/chunk-C5RTIBNZ.js.map +0 -1
  147. package/dist/chunk-CTRA64LY.js +0 -680
  148. package/dist/chunk-CTRA64LY.js.map +0 -1
  149. package/dist/chunk-DPEUKJRO.js +0 -27
  150. package/dist/chunk-DPEUKJRO.js.map +0 -1
  151. package/dist/chunk-FD2MBMOH.js +0 -494
  152. package/dist/chunk-FD2MBMOH.js.map +0 -1
  153. package/dist/chunk-H5QPIZNX.js +0 -907
  154. package/dist/chunk-H5QPIZNX.js.map +0 -1
  155. package/dist/chunk-HLKC4UYB.js +0 -3514
  156. package/dist/chunk-HLKC4UYB.js.map +0 -1
  157. package/dist/chunk-HNP72PNU.js +0 -192
  158. package/dist/chunk-HNP72PNU.js.map +0 -1
  159. package/dist/chunk-ISPWRSEC.js +0 -408
  160. package/dist/chunk-ISPWRSEC.js.map +0 -1
  161. package/dist/chunk-KRBFHMV6.js +0 -1228
  162. package/dist/chunk-KRBFHMV6.js.map +0 -1
  163. package/dist/chunk-M22PL4GH.js +0 -171
  164. package/dist/chunk-M22PL4GH.js.map +0 -1
  165. package/dist/chunk-NURIQBJQ.js +0 -72
  166. package/dist/chunk-NURIQBJQ.js.map +0 -1
  167. package/dist/chunk-OPVWXJ2H.js +0 -75
  168. package/dist/chunk-OPVWXJ2H.js.map +0 -1
  169. package/dist/chunk-PZZKQVQV.js +0 -52
  170. package/dist/chunk-PZZKQVQV.js.map +0 -1
  171. package/dist/chunk-Q2JSAVQ3.js +0 -671
  172. package/dist/chunk-Q2JSAVQ3.js.map +0 -1
  173. package/dist/chunk-RDOAVVHY.js +0 -699
  174. package/dist/chunk-RDOAVVHY.js.map +0 -1
  175. package/dist/chunk-SGKPNBXE.js +0 -60
  176. package/dist/chunk-SGKPNBXE.js.map +0 -1
  177. package/dist/chunk-SMQXZGLZ.js +0 -351
  178. package/dist/chunk-SMQXZGLZ.js.map +0 -1
  179. package/dist/chunk-UHEZW5BU.js +0 -2918
  180. package/dist/chunk-UHEZW5BU.js.map +0 -1
  181. package/dist/chunk-UPWGXKXB.js +0 -254
  182. package/dist/chunk-UPWGXKXB.js.map +0 -1
  183. package/dist/chunk-VISA6CI3.js +0 -200
  184. package/dist/chunk-VISA6CI3.js.map +0 -1
  185. package/dist/chunk-WMTCUOQL.js +0 -474
  186. package/dist/chunk-WMTCUOQL.js.map +0 -1
  187. package/dist/chunk-WRTOVNN4.js +0 -4728
  188. package/dist/chunk-WRTOVNN4.js.map +0 -1
  189. package/dist/chunk-WSTRQZYQ.js +0 -5576
  190. package/dist/chunk-WSTRQZYQ.js.map +0 -1
  191. package/dist/chunk-XBG2W2VW.js +0 -6434
  192. package/dist/chunk-XBG2W2VW.js.map +0 -1
  193. package/dist/chunk-YEJR7IXO.js +0 -68
  194. package/dist/chunk-YEJR7IXO.js.map +0 -1
  195. package/dist/chunk-YJZA2BIK.js +0 -1338
  196. package/dist/chunk-YJZA2BIK.js.map +0 -1
  197. package/dist/completion-gate-BMy5LGoP.d.ts +0 -256
  198. package/dist/conversation.js.map +0 -1
  199. package/dist/coordination-BZZSVYpZ.d.ts +0 -2570
  200. package/dist/environment-provider.js.map +0 -1
  201. package/dist/improvement-adapter-HAZz-7vK.d.ts +0 -203
  202. package/dist/knowledge.js.map +0 -1
  203. package/dist/local-harness-BDNcl6jI.d.ts +0 -175
  204. package/dist/loop-runner-bin-68aoM9-7.d.ts +0 -199
  205. package/dist/loop-runner-bin.js.map +0 -1
  206. package/dist/loops.js.map +0 -1
  207. package/dist/openai-tools-fnj6SRVg.d.ts +0 -46
  208. package/dist/protected-model-port-B4t-OQjL.d.ts +0 -271
  209. package/dist/redact-BuFjxBUJ.d.ts +0 -481
  210. package/dist/sanitize-DEbPNtyI.d.ts +0 -328
  211. package/dist/structural-rollout-DEh6CEsa.d.ts +0 -446
  212. package/dist/supervise-4_48wwvy.d.ts +0 -379
  213. package/dist/types-BCoemcXU.d.ts +0 -802
  214. package/dist/types-BwoZWq-i.d.ts +0 -510
  215. package/dist/types-Cbp72qyu.d.ts +0 -491
  216. package/dist/types-CmYCMbFT.d.ts +0 -203
  217. package/dist/types-CvNwMzQt.d.ts +0 -957
  218. package/dist/worktree-fanout-DxhAWr5Z.d.ts +0 -999
@@ -1,65 +1,45 @@
1
- import { a as SandboxClient, b as LoopSandboxPlacement } from '../types-BCoemcXU.js';
2
- import { F as FleetHandle, D as DelegationExecutor, a as DelegationTaskQueue, b as FeedbackStore, c as DelegateFeedbackResult, d as DelegateFeedbackArgs, U as UiAuditorDelegate, e as DelegateUiAuditArgs, f as DelegateUiAuditResult, g as DelegationHistoryResult, h as DelegationHistoryArgs, i as DelegationStatusResult, j as DelegationStatusArgs } from '../coordination-BZZSVYpZ.js';
3
- export { A as AnalystRegistry, C as CappedDelegationTrace, k as CoderDelegate, l as CoderReview, m as CoderReviewer, n as CoordinationEvent, o as CoordinationTools, p as CoordinationToolsOptions, q as DELEGATE_DESCRIPTION, r as DELEGATE_INPUT_SCHEMA, s as DELEGATE_TOOL_NAME, t as DELEGATION_TRACE_MAX_BYTES, u as DELEGATION_TRACE_MAX_SPANS, v as DelegateArgs, w as DelegateCodeArgs, x as DelegateCodeConfig, y as DelegateCodeResult, z as DelegateHandlerOptions, B as DelegateResearchArgs, G as DelegateResearchConfig, H as DelegateResearchResult, I as DelegateResult, J as DelegateRunCtx, K as DelegateUiAuditConfig, L as DelegateUiAuditRoute, N as DelegationError, O as DelegationFeedbackSnapshot, P as DelegationHistoryEntry, Q as DelegationPersistenceError, R as DelegationProfile, S as DelegationProgress, T as DelegationRecord, V as DelegationResultPayload, X as DelegationResumeContext, Y as DelegationResumeDriver, Z as DelegationResumeTick, _ as DelegationRunContext, $ as DelegationStateCorruptError, a0 as DelegationStatus, a1 as DelegationStore, a2 as DelegationTaskQueueOptions, a3 as DelegationTraceCaps, a4 as DelegationTraceCollector, a5 as DelegationTraceSpan, a6 as DetachedSessionDelegateOptions, a7 as DetachedSessionRefParts, a8 as DetachedTurn, a9 as DetachedTurnResumeDriverOptions, aa as DetachedWinnerSelection, ab as DriveTurnCapableBox, ac as DriveTurnTick, ad as FeedbackEvent, ae as FeedbackRating, af as FeedbackRefersTo, ag as FileDelegationStore, ah as FileDelegationStoreOptions, ai as FleetWorkspaceExecutorOptions, aj as InMemoryDelegationStore, ak as InMemoryFeedbackStore, al as JsonRpcMessage, am as JsonRpcResponse, M as MakeWorkerAgent, an as McpServer, ao as McpServerOptions, ap as McpToolDescriptor, aq as McpTransport, ar as Question, as as QuestionDecision, at as QuestionPolicy, au as QuestionRecord, av as ResearchOutputShape, aw as ResearchSource, ax as RunDetachedTurnOptions, ay as SettleDetachedCoderTurnOptions, az as SettledWorker, aA as SiblingSandboxExecutorOptions, aB as SubmitInput, aC as SubmitOutput, aD as TraceContext, aE as UiAuditorDelegationOutput, aF as buildDelegationTraceSpans, aG as capDelegationTrace, aH as coderTaskFromArgs, aI as composeLoopTraceEmitters, aJ as createCoordinationTools, aK as createDelegateHandler, aL as createDelegationTraceCollector, aM as createDetachedTurnResumeDriver, aN as createFleetWorkspaceExecutor, aO as createInProcessTransport, aP as createMcpServer, aQ as createPropagatingTraceEmitter, aR as createSiblingSandboxExecutor, aS as detachedSessionDelegate, aT as detachedTurnEvents, aU as eventToSnapshot, aV as formatDetachedSessionRef, aW as hashIdempotencyInput, aX as parseDetachedSessionRef, aY as readTraceContextFromEnv, aZ as runDetachedTurn, a_ as settleDetachedCoderTurn, a$ as traceContextToEnv, b0 as validateDelegateArgs } from '../coordination-BZZSVYpZ.js';
4
- import { L as LocalHarness, r as runLocalHarness } from '../local-harness-BDNcl6jI.js';
5
- export { b as CodexExecutionEvidence, a as CodexExecutionPolicy, C as CodexTokenUsage, c as LocalHarnessResult, R as RunLocalHarnessOptions, p as parseCodexTokenUsage } from '../local-harness-BDNcl6jI.js';
6
- import { G as GitRunner } from '../completion-gate-BMy5LGoP.js';
7
- export { C as CreateWorktreeOptions, b as DiffOptions, c as DiffResult, R as RemoveWorktreeOptions, d as WorktreeHandle, e as captureWorktreeDiff, f as createWorktree, r as removeWorktree } from '../completion-gate-BMy5LGoP.js';
8
- export { C as CreateKbGateOptions, F as FactCandidate, a as FactJudge, b as FactJudgeVerdict, K as KbGateResult, c as createKbGate } from '../kb-gate-CwHO0vz6.js';
9
- import { AgentProfileMcpServer } from '@tangle-network/agent-interface';
10
- export { m as mcpToolsForRuntimeMcp, a as mcpToolsForRuntimeMcpSubset } from '../openai-tools-fnj6SRVg.js';
11
- import { AnalystFinding } from '@tangle-network/agent-eval';
12
- import { a as UiLens } from '../substrate-Dyiqmd3o.js';
13
- import '@tangle-network/sandbox';
14
- import '../types-BwoZWq-i.js';
15
- import '../types-CvNwMzQt.js';
16
- import '../sanitize-DEbPNtyI.js';
17
- import '../environment-provider.js';
18
- import '@tangle-network/agent-interface/environment-provider';
19
- import 'node:child_process';
20
- import '@tangle-network/agent-profile-materialize';
21
-
1
+ import { E as SandboxClient, h as LoopSandboxPlacement } from "../types-BevOjfTY.js";
2
+ import { $c as DetachedSessionRefParts, $l as traceContextToEnv, Ac as McpToolDescriptor, Al as DelegateUiAuditConfig, As as createCoordinationTools, Au as FileDelegationStore, Bc as DetachedSessionDelegateOptions, Bl as DelegationResultPayload, Bs as DelegateResult, Cc as captureWorktreeDiff, Cl as DelegateCodeResult, Cs as QuestionLevel, Cu as buildDelegationTraceSpans, Dl as DelegateResearchConfig, Ds as QuestionUrgency, Du as DelegationPersistenceError, El as DelegateResearchArgs, Es as QuestionRecord, Eu as createDelegationTraceCollector, Fc as eventToSnapshot, Fl as DelegationHistoryArgs, Fs as DELEGATE_DESCRIPTION, Gc as detachedSessionDelegate, Gl as FeedbackRefersTo, Hc as SettleDetachedCoderTurnOptions, Hl as DelegationStatusArgs, Hs as validateDelegateArgs, Hu as CoderOutput, Ic as CoderDelegate, Il as DelegationHistoryEntry, Is as DELEGATE_INPUT_SCHEMA, Jc as FleetHandle, Jl as UiAuditLensFilter, Kc as settleDetachedCoderTurn, Kl as ResearchOutputShape, Lc as CoderReview, Ll as DelegationHistoryResult, Ls as DELEGATE_TOOL_NAME, Mc as FeedbackEvent, Ml as DelegateUiAuditRoute, Ms as McpServerOptions, Mu as InMemoryDelegationStore, Nc as FeedbackStore, Nl as DelegationError, Ns as createInProcessTransport, Oc as JsonRpcMessage, Ol as DelegateResearchResult, Os as SettledWorker, Ou as DelegationStateCorruptError, Pc as InMemoryFeedbackStore, Pl as DelegationFeedbackSnapshot, Ps as createMcpServer, Qc as createSiblingSandboxExecutor, Ql as readTraceContextFromEnv, Rc as CoderReviewer, Rl as DelegationProfile, Rs as DelegateArgs, Sc as WorktreeHandle, Sl as DelegateCodeConfig, Ss as QuestionDecision, Su as DelegationTraceSpan, Tc as removeWorktree, Tl as DelegateFeedbackResult, Ts as QuestionPolicy, Tu as composeLoopTraceEmitters, Uc as UiAuditorDelegate, Ul as DelegationStatusResult, Vc as DetachedWinnerSelection, Vl as DelegationStatus, Vs as createDelegateHandler, Wc as coderTaskFromArgs, Wl as FeedbackRating, Xc as SiblingSandboxExecutorOptions, Xl as TraceContext, Yc as FleetWorkspaceExecutorOptions, Yl as UiAuditorDelegationOutput, Zc as createFleetWorkspaceExecutor, Zl as createPropagatingTraceEmitter, _c as CreateWorktreeOptions, _l as DelegationTaskQueueOptions, _s as CoordinationToolsOptions, _u as CappedDelegationTrace, al as createDetachedTurnResumeDriver, bc as GitRunner, bl as hashIdempotencyInput, bs as MakeWorkerAgent, bu as DelegationTraceCaps, cl as parseDetachedSessionRef, dl as DelegationRecord, el as DetachedTurn, fl as DelegationResumeContext, gl as DelegationTaskQueue, gs as CoordinationTools, hl as DelegationRunContext, hs as CoordinationEvent, il as RunDetachedTurnOptions, jc as McpTransport, jl as DelegateUiAuditResult, js as McpServer, ju as FileDelegationStoreOptions, kc as JsonRpcResponse, kl as DelegateUiAuditArgs, ks as WorkerWatchOptions, ku as DelegationStore, ll as runDetachedTurn, ml as DelegationResumeTick, ms as AnalystRegistry, nl as DriveTurnCapableBox, ol as detachedTurnEvents, pl as DelegationResumeDriver, ps as AnalystFindingEvent, qc as DelegationExecutor, ql as ResearchSource, rl as DriveTurnTick, sl as formatDetachedSessionRef, tl as DetachedTurnResumeDriverOptions, ul as DelegationArgs, vc as DiffOptions, vl as SubmitInput, vs as DEFAULT_AWAIT_EVENT_TIMEOUT_MS, vu as DELEGATION_TRACE_MAX_BYTES, wc as createWorktree, wl as DelegateFeedbackArgs, ws as QuestionOption, wu as capDelegationTrace, xc as RemoveWorktreeOptions, xl as DelegateCodeArgs, xs as Question, xu as DelegationTraceCollector, yc as DiffResult, yl as SubmitOutput, ys as DownMessageEvent, yu as DELEGATION_TRACE_MAX_SPANS, zc as DelegateRunCtx, zl as DelegationProgress, zs as DelegateHandlerOptions } from "../index-DruSKs3Z.js";
3
+ import { o as UiLens } from "../substrate-BcnuSHXm.js";
4
+ import { a as LocalHarnessResult, c as runLocalHarness, i as LocalHarness, n as CodexExecutionPolicy, o as RunLocalHarnessOptions, r as CodexTokenUsage, s as parseCodexTokenUsage, t as CodexExecutionEvidence } from "../local-harness-Dh8PJ0ot.js";
5
+ import { a as KbGateResult, i as FactJudgeVerdict, n as FactCandidate, o as createKbGate, r as FactJudge, t as CreateKbGateOptions } from "../kb-gate-C8z2juK8.js";
6
+ import { n as mcpToolsForRuntimeMcpSubset, t as mcpToolsForRuntimeMcp } from "../openai-tools-B68JaOCx.js";
7
+ import { AnalystFinding } from "@tangle-network/agent-eval";
8
+ import { AgentProfileMcpServer } from "@tangle-network/agent-interface";
9
+ //#region src/mcp/codex-diagnostics.d.ts
22
10
  /** Bounded, credential-redacted process context attached when reproducible Codex output fails
23
11
  * validation. The process still fails closed; this only preserves enough evidence to diagnose it. */
24
12
  interface CodexExecutionFailureDiagnostic {
25
- exitCode: number | null;
26
- killedBySignal: NodeJS.Signals | null;
27
- timedOut: boolean;
28
- aborted?: boolean;
29
- durationMs: number;
30
- stdout: string;
31
- stderr: string;
32
- stdoutTruncated: boolean;
33
- stderrTruncated: boolean;
13
+ exitCode: number | null;
14
+ killedBySignal: NodeJS.Signals | null;
15
+ timedOut: boolean;
16
+ aborted?: boolean;
17
+ durationMs: number;
18
+ stdout: string;
19
+ stderr: string;
20
+ stdoutTruncated: boolean;
21
+ stderrTruncated: boolean;
34
22
  }
35
23
  /** Thrown when reproducible Codex exits without one valid terminal usage event. */
36
24
  declare class CodexExecutionDiagnosticError extends Error {
37
- readonly reason: string;
38
- readonly diagnostic: CodexExecutionFailureDiagnostic;
39
- readonly code = "CODEX_EXECUTION_DIAGNOSTIC";
40
- constructor(reason: string, diagnostic: CodexExecutionFailureDiagnostic, cause?: unknown);
25
+ readonly reason: string;
26
+ readonly diagnostic: CodexExecutionFailureDiagnostic;
27
+ readonly code = "CODEX_EXECUTION_DIAGNOSTIC";
28
+ constructor(reason: string, diagnostic: CodexExecutionFailureDiagnostic, cause?: unknown);
41
29
  }
42
-
43
- /**
44
- *
45
- * Helpers extracted from `bin.ts` so the env-detection + executor-selection
46
- * logic is unit-testable without spawning a subprocess. The bin imports from
47
- * here; tests import from here directly.
48
- *
49
- * @experimental
50
- */
51
-
30
+ //#endregion
31
+ //#region src/mcp/bin-helpers.d.ts
52
32
  /** @experimental */
53
33
  interface DetectExecutorArgs {
54
- sandboxClient: SandboxClient;
55
- /** Raw env (defaults to `process.env`). Pass an explicit map for tests. */
56
- env?: Record<string, string | undefined>;
57
- /**
58
- * Override how a fleet handle is resolved from the client + fleet id. The
59
- * default reads `client.fleets.get(fleetId)` and validates the returned
60
- * shape against the structural `FleetHandle` contract.
61
- */
62
- resolveFleet?: (client: SandboxClient, fleetId: string) => Promise<FleetHandle>;
34
+ sandboxClient: SandboxClient;
35
+ /** Raw env (defaults to `process.env`). Pass an explicit map for tests. */
36
+ env?: Record<string, string | undefined>;
37
+ /**
38
+ * Override how a fleet handle is resolved from the client + fleet id. The
39
+ * default reads `client.fleets.get(fleetId)` and validates the returned
40
+ * shape against the structural `FleetHandle` contract.
41
+ */
42
+ resolveFleet?: (client: SandboxClient, fleetId: string) => Promise<FleetHandle>;
63
43
  }
64
44
  /**
65
45
  * Pick the right executor for an MCP server invocation based on env vars.
@@ -76,39 +56,40 @@ interface DetectExecutorArgs {
76
56
  * @experimental
77
57
  */
78
58
  declare function detectExecutor(args: DetectExecutorArgs): Promise<DelegationExecutor>;
79
-
59
+ //#endregion
60
+ //#region src/mcp/in-process-executor.d.ts
80
61
  /** @experimental */
81
62
  interface InProcessExecutorOptions {
82
- /** Absolute path to the git repo (the workspace). Worktrees go under `<repoRoot>/.agent-worktrees/`. */
83
- repoRoot: string;
84
- /** Harnesses to round-robin across `create()` calls. One entry = no fanout. Default `['claude']`. */
85
- harnesses?: ReadonlyArray<LocalHarness>;
86
- /** Optional per-delegation test command run in the worktree after the harness exits. */
87
- testCmd?: string;
88
- /** Optional per-delegation typecheck command. Same shape as `testCmd`. */
89
- typecheckCmd?: string;
90
- /** Wall-clock cap per harness subprocess (ms). Default 5min. */
91
- harnessTimeoutMs?: number;
92
- /** Wall-clock cap per test/typecheck subprocess (ms). Default 2min. */
93
- postCheckTimeoutMs?: number;
94
- /** Test seam — override the git runner used by the worktree helpers. */
95
- runGit?: GitRunner;
96
- /** Test seam — override the harness runner (defaults to the real CLI via `runLocalHarness`). */
97
- runHarness?: typeof runLocalHarness;
98
- /** Test seam — override the post-check runner (defaults to a `sh -c` spawn). A throw is folded
99
- * into a non-fatal `{exitCode:-1}` so a broken check command fails the signal, not the run. */
100
- runPostCheck?: (cmd: string, cwd: string, signal?: AbortSignal) => Promise<{
101
- exitCode: number;
102
- stdout: string;
103
- stderr: string;
104
- }>;
63
+ /** Absolute path to the git repo (the workspace). Worktrees go under `<repoRoot>/.agent-worktrees/`. */
64
+ repoRoot: string;
65
+ /** Harnesses to round-robin across `create()` calls. One entry = no fanout. Default `['claude']`. */
66
+ harnesses?: ReadonlyArray<LocalHarness>;
67
+ /** Optional per-delegation test command run in the worktree after the harness exits. */
68
+ testCmd?: string;
69
+ /** Optional per-delegation typecheck command. Same shape as `testCmd`. */
70
+ typecheckCmd?: string;
71
+ /** Wall-clock cap per harness subprocess (ms). Default 5min. */
72
+ harnessTimeoutMs?: number;
73
+ /** Wall-clock cap per test/typecheck subprocess (ms). Default 2min. */
74
+ postCheckTimeoutMs?: number;
75
+ /** Test seam — override the git runner used by the worktree helpers. */
76
+ runGit?: GitRunner;
77
+ /** Test seam — override the harness runner (defaults to the real CLI via `runLocalHarness`). */
78
+ runHarness?: typeof runLocalHarness;
79
+ /** Test seam — override the post-check runner (defaults to a `sh -c` spawn). A throw is folded
80
+ * into a non-fatal `{exitCode:-1}` so a broken check command fails the signal, not the run. */
81
+ runPostCheck?: (cmd: string, cwd: string, signal?: AbortSignal) => Promise<{
82
+ exitCode: number;
83
+ stdout: string;
84
+ stderr: string;
85
+ }>;
105
86
  }
106
87
  /** @experimental */
107
88
  interface InProcessExecutorDescribePlacement extends LoopSandboxPlacement {
108
- /** Worktree path in the parent sandbox's filesystem (set so traces correlate to on-disk artifacts). */
109
- worktreePath?: string;
110
- /** Which harness handled this delegation. */
111
- harness?: LocalHarness;
89
+ /** Worktree path in the parent sandbox's filesystem (set so traces correlate to on-disk artifacts). */
90
+ worktreePath?: string;
91
+ /** Which harness handled this delegation. */
92
+ harness?: LocalHarness;
112
93
  }
113
94
  /**
114
95
  * Build an in-process executor. Returns a {@link DelegationExecutor} whose `client.create()`
@@ -120,108 +101,42 @@ interface InProcessExecutorDescribePlacement extends LoopSandboxPlacement {
120
101
  * @experimental
121
102
  */
122
103
  declare function createInProcessExecutor(options: InProcessExecutorOptions): DelegationExecutor;
123
-
124
- /**
125
- * `createStdioToolServer` — the generic newline-delimited JSON-RPC 2.0 MCP
126
- * server core: `initialize` / `notifications/initialized` / `tools/list` /
127
- * `tools/call` over a stdio-shaped transport, protocol 2024-11-05.
128
- *
129
- * Extracted from `createMcpServer` (server.ts) so every in-repo MCP server —
130
- * the delegation server, the memory server — serves the ONE wire protocol the
131
- * same-host client (`connectStdioMcp`, runtime/stdio-mcp-client.ts) speaks.
132
- * A second hand-rolled serve loop could drift from what the client expects;
133
- * this core makes that impossible by construction.
134
- *
135
- * @experimental
136
- */
137
- /** @experimental */
138
- interface McpToolDescriptor {
139
- name: string;
140
- description: string;
141
- inputSchema: Record<string, unknown>;
142
- handler: (raw: unknown) => Promise<unknown>;
143
- }
144
- /** @experimental */
145
- interface McpTransport {
146
- input: NodeJS.ReadableStream;
147
- output: NodeJS.WritableStream;
148
- }
149
- /** @experimental */
150
- interface JsonRpcMessage {
151
- jsonrpc: '2.0';
152
- id?: number | string | null;
153
- method: string;
154
- params?: unknown;
155
- }
156
- /** @experimental */
157
- interface JsonRpcResponse {
158
- jsonrpc: '2.0';
159
- id: number | string | null;
160
- result?: unknown;
161
- error?: {
162
- code: number;
163
- message: string;
164
- data?: unknown;
165
- };
166
- }
104
+ //#endregion
105
+ //#region src/mcp/tool-server.d.ts
167
106
  /** @experimental */
168
107
  interface StdioToolServerOptions {
169
- /** Server display name surfaced via `initialize`. */
170
- serverName: string;
171
- /** Server version surfaced via `initialize`. */
172
- serverVersion: string;
173
- /** The tools to serve. Duplicate names throw — a silent shadow would hide a tool. */
174
- tools: readonly McpToolDescriptor[];
108
+ /** Server display name surfaced via `initialize`. */
109
+ serverName: string;
110
+ /** Server version surfaced via `initialize`. */
111
+ serverVersion: string;
112
+ /** The tools to serve. Duplicate names throw — a silent shadow would hide a tool. */
113
+ tools: readonly McpToolDescriptor[];
175
114
  }
176
115
  /** @experimental */
177
116
  interface StdioToolServer {
178
- /** Tools currently registered, keyed by name. */
179
- readonly tools: ReadonlyMap<string, McpToolDescriptor>;
180
- /** Handle a single parsed JSON-RPC message. Returns the response object (or `null` for notifications). */
181
- handle(message: JsonRpcMessage): Promise<JsonRpcResponse | null>;
182
- /** Drive the server on a stdio-shaped transport until `stop()` is called. */
183
- serve(transport?: McpTransport): Promise<void>;
184
- /** Stop a `serve` call. Subsequent requests are rejected. */
185
- stop(): void;
117
+ /** Tools currently registered, keyed by name. */
118
+ readonly tools: ReadonlyMap<string, McpToolDescriptor>;
119
+ /** Handle a single parsed JSON-RPC message. Returns the response object (or `null` for notifications). */
120
+ handle(message: JsonRpcMessage): Promise<JsonRpcResponse | null>;
121
+ /** Drive the server on a stdio-shaped transport until `stop()` is called. */
122
+ serve(transport?: McpTransport): Promise<void>;
123
+ /** Stop a `serve` call. Subsequent requests are rejected. */
124
+ stop(): void;
186
125
  }
187
126
  /** Build the generic stdio JSON-RPC tool server. */
188
127
  declare function createStdioToolServer(options: StdioToolServerOptions): StdioToolServer;
189
-
190
- /**
191
- * Memory MCP server — the LIVE serving half of the `memory` profile surface
192
- * (Phase 5). A curated memory (lessons distilled from prior runs) is only
193
- * real if the DRIVEN agent can query it mid-task; this module serves a flat
194
- * store of `MemoryItem` rows as `memory_search` / `memory_get` tools over the
195
- * ONE in-repo stdio JSON-RPC core (`createStdioToolServer`), so the exact
196
- * wire protocol the same-host client (`connectStdioMcp` /
197
- * `materializeLocalMcp`, runtime/stdio-mcp-client.ts) speaks is guaranteed by
198
- * construction — serve and consume cannot drift.
199
- *
200
- * Retrieval is DETERMINISTIC lexical overlap (no vectors, no LLM): a lift
201
- * measured with this memory mounted is attributable to the lessons
202
- * themselves, never to retrieval-model noise. Every
203
- * `memory_search` can append one JSONL row to a retrieval log (`logPath`) —
204
- * the per-query record an off-policy retrieval estimator (agent-knowledge's
205
- * `RetrievalHoldout`) consumes. agent-knowledge is NOT a dependency of this
206
- * repo, so the log file is the flagged cross-package seam, not an import.
207
- *
208
- * Fail-loud discipline (mirrors `materializeLocalMcp`): an EMPTY memory is
209
- * never served — a profile without memory simply omits the artifact, and
210
- * silently serving zero rows would fake the with/without ablation.
211
- *
212
- * @experimental
213
- */
214
-
128
+ //#endregion
129
+ //#region src/mcp/memory-server.d.ts
215
130
  /** One row of agent memory: a crisp lesson/fact with provenance. */
216
131
  interface MemoryItem {
217
- /** Stable id (content-hash by convention; see `memoryArtifactFromLessons`). */
218
- id: string;
219
- /** The lesson itself — one imperative or observation the agent should recall. */
220
- text: string;
221
- /** Optional retrieval tags, matched by `memory_search` alongside the text. */
222
- tags?: string[];
223
- /** Provenance: the finding / trace / curation pass this row came from. */
224
- source?: string;
132
+ /** Stable id (content-hash by convention; see `memoryArtifactFromLessons`). */
133
+ id: string;
134
+ /** The lesson itself — one imperative or observation the agent should recall. */
135
+ text: string;
136
+ /** Optional retrieval tags, matched by `memory_search` alongside the text. */
137
+ tags?: string[];
138
+ /** Provenance: the finding / trace / curation pass this row came from. */
139
+ source?: string;
225
140
  }
226
141
  /**
227
142
  * The `memory` artifact payload — HOW a profile's memory is stored and served:
@@ -238,15 +153,15 @@ interface MemoryItem {
238
153
  * — the retrieval log a holdout estimator reads (see module doc).
239
154
  */
240
155
  interface AgentMemorySpec {
241
- store: 'file' | 'mcp';
242
- /** `store:'file'` — host path to the durable row store (JSON array or JSONL). */
243
- path?: string;
244
- /** Inline seed rows, served alongside (and winning over) `path` rows. */
245
- items?: MemoryItem[];
246
- /** `store:'mcp'` — the external server that already serves memory tools. */
247
- server?: AgentProfileMcpServer;
248
- /** JSONL retrieval log: one row per `memory_search` (ts, query, k, returned). */
249
- logPath?: string;
156
+ store: 'file' | 'mcp';
157
+ /** `store:'file'` — host path to the durable row store (JSON array or JSONL). */
158
+ path?: string;
159
+ /** Inline seed rows, served alongside (and winning over) `path` rows. */
160
+ items?: MemoryItem[];
161
+ /** `store:'mcp'` — the external server that already serves memory tools. */
162
+ server?: AgentProfileMcpServer;
163
+ /** JSONL retrieval log: one row per `memory_search` (ts, query, k, returned). */
164
+ logPath?: string;
250
165
  }
251
166
  /** Env var naming the durable row store file the memory bin loads (the
252
167
  * `memoryMcpServer` ↔ memory-bin contract). */
@@ -258,16 +173,16 @@ declare const MEMORY_LOG_ENV = "AGENT_MEMORY_LOG";
258
173
  /** Env var overriding the served display name (default 'agent-memory'). */
259
174
  declare const MEMORY_NAME_ENV = "AGENT_MEMORY_NAME";
260
175
  interface CreateMemoryToolServerOptions {
261
- /** The rows to serve. MUST be non-empty (an empty memory is never served). */
262
- items: readonly MemoryItem[];
263
- /** Server display name surfaced via `initialize`. Default 'agent-memory'. */
264
- serverName?: string;
265
- /** Server version surfaced via `initialize`. Default '0'. */
266
- serverVersion?: string;
267
- /** Default result count for `memory_search`. Default 5. */
268
- defaultK?: number;
269
- /** Append one JSONL row per `memory_search` (the retrieval-holdout seam). */
270
- logPath?: string;
176
+ /** The rows to serve. MUST be non-empty (an empty memory is never served). */
177
+ items: readonly MemoryItem[];
178
+ /** Server display name surfaced via `initialize`. Default 'agent-memory'. */
179
+ serverName?: string;
180
+ /** Server version surfaced via `initialize`. Default '0'. */
181
+ serverVersion?: string;
182
+ /** Default result count for `memory_search`. Default 5. */
183
+ defaultK?: number;
184
+ /** Append one JSONL row per `memory_search` (the retrieval-holdout seam). */
185
+ logPath?: string;
271
186
  }
272
187
  /**
273
188
  * Build the memory MCP server: `memory_search` (lexical top-k over the rows)
@@ -280,9 +195,9 @@ declare function parseMemoryItems(value: unknown, source: string): MemoryItem[];
280
195
  declare function readMemoryItemsFile(path: string): MemoryItem[];
281
196
  /** What the memory bin resolved from its environment. */
282
197
  interface ResolvedMemoryEnv {
283
- items: MemoryItem[];
284
- serverName?: string;
285
- logPath?: string;
198
+ items: MemoryItem[];
199
+ serverName?: string;
200
+ logPath?: string;
286
201
  }
287
202
  /**
288
203
  * Resolve the bin's memory from `AGENT_MEMORY_FILE` (durable store) and/or
@@ -290,35 +205,18 @@ interface ResolvedMemoryEnv {
290
205
  * a boot FAILURE, matching the fail-closed materialization discipline.
291
206
  */
292
207
  declare function resolveMemoryFromEnv(env: Record<string, string | undefined>): ResolvedMemoryEnv;
293
-
294
- /**
295
- *
296
- * The trace-analyst KIND directory — the operator's lenses, as composable DATA.
297
- *
298
- * An analyst is not one question. A kind is ONE lens (completeness, correctness, policy, efficiency,
299
- * tool-use, …); each emits `AnalystFinding`s tagged by its `area`. The driver `list_analysts` to see
300
- * the menu, `run_analyst(kind, worker)` to apply a lens, and `define_analyst` to author a new one —
301
- * so at test time you compose the exact lenses a domain needs (maximum specificity), not one generic
302
- * reviewer. The kinds are data, the runner is generic, and the finding shape + firewall are reused
303
- * from agent-eval / the keystone — never re-derived.
304
- *
305
- * A kind here is a lightweight lens (`Check`); it is a deliberate SUBSET of agent-eval's full
306
- * `TraceAnalystKindSpec`, so a kind that needs the heavy agentic actor (sub-agent recursion, tools,
307
- * goldens) upgrades to `createTraceAnalystKind` without changing this directory's surface.
308
- *
309
- * @experimental
310
- */
311
-
208
+ //#endregion
209
+ //#region src/mcp/tools/checks.d.ts
312
210
  /** One lens — a composable analyst kind. Identity fields mirror `TraceAnalystKindSpec` so a kind is
313
211
  * upgradeable to the full agentic factory; `lookFor` is the lens question the actor applies. */
314
212
  interface Check {
315
- readonly id: string;
316
- readonly description: string;
317
- /** Coarse classification stamped on every finding this kind emits (the renderer groups by it). */
318
- readonly area: string;
319
- readonly version: string;
320
- /** The lens — what this analyst looks for in the trace. */
321
- readonly lookFor: string;
213
+ readonly id: string;
214
+ readonly description: string;
215
+ /** Coarse classification stamped on every finding this kind emits (the renderer groups by it). */
216
+ readonly area: string;
217
+ readonly version: string;
218
+ /** The lens — what this analyst looks for in the trace. */
219
+ readonly lookFor: string;
322
220
  }
323
221
  /** The built-in lens directory. Domain-blind (about any agent trace); compose at test time. */
324
222
  declare const defaultChecks: Record<string, Check>;
@@ -329,11 +227,11 @@ declare function liftFindings(kind: Check, rows: unknown[], producedAt: string):
329
227
  * the trace shape: a `{ messages }` conversation, a bare message array, else stringified. */
330
228
  declare function renderTrace(trace: unknown): string;
331
229
  interface CheckRunnerOptions {
332
- routerBaseUrl: string;
333
- routerKey: string;
334
- model: string;
335
- /** Test/override seam — replace the LLM call. Default: a router chat completion. */
336
- chat?: (system: string, user: string) => Promise<string>;
230
+ routerBaseUrl: string;
231
+ routerKey: string;
232
+ model: string;
233
+ /** Test/override seam — replace the LLM call. Default: a router chat completion. */
234
+ chat?: (system: string, user: string) => Promise<string>;
337
235
  }
338
236
  /** Run ONE lens over a trace → findings. Generic over any kind: prompt = the lens + the agent-eval
339
237
  * finding schema; the model's JSON array is parsed (`parseRawFinding`), lifted, and firewalled. */
@@ -344,288 +242,249 @@ declare function runCheck(kind: Check, trace: unknown, opts: CheckRunnerOptions,
344
242
  * passed in because replay-safe paths must not read `Date.now`.
345
243
  */
346
244
  declare function makeCheckRunner(kinds: Record<string, Check>, opts: CheckRunnerOptions): (kindId: string, trace: unknown, producedAt: string) => Promise<AnalystFinding[] | {
347
- error: string;
245
+ error: string;
348
246
  }>;
349
-
350
- /**
351
- *
352
- * `delegate_feedback` MCP tool — synchronous record of agent / user /
353
- * downstream-judge feedback on a delegation, artifact, or outcome.
354
- *
355
- * The store is append-only. Every rating is its own event; no dedupe.
356
- * When `refersTo.kind === 'delegation'`, the snapshot is also attached
357
- * to the matching queue record so `delegation_history` surfaces it
358
- * inline without a join.
359
- *
360
- * @experimental
361
- */
362
-
247
+ //#endregion
248
+ //#region src/mcp/tools/delegate-feedback.d.ts
363
249
  /** MCP tool name for the `delegate_feedback` feedback-recording tool. @experimental */
364
250
  declare const DELEGATE_FEEDBACK_TOOL_NAME = "delegate_feedback";
365
251
  /** Human-readable description of the `delegate_feedback` MCP tool, injected into the tool manifest. @experimental */
366
252
  declare const DELEGATE_FEEDBACK_DESCRIPTION: string;
367
253
  /** JSON Schema for `delegate_feedback` tool arguments (`refersTo`, `rating`, `by`, optional fields). @experimental */
368
254
  declare const DELEGATE_FEEDBACK_INPUT_SCHEMA: {
369
- readonly type: "object";
370
- readonly properties: {
371
- readonly refersTo: {
372
- readonly type: "object";
373
- readonly properties: {
374
- readonly kind: {
375
- readonly type: "string";
376
- readonly enum: readonly ["delegation", "artifact", "outcome"];
377
- };
378
- readonly ref: {
379
- readonly type: "string";
380
- };
381
- };
382
- readonly required: readonly ["kind", "ref"];
383
- readonly additionalProperties: false;
255
+ readonly type: "object";
256
+ readonly properties: {
257
+ readonly refersTo: {
258
+ readonly type: "object";
259
+ readonly properties: {
260
+ readonly kind: {
261
+ readonly type: "string";
262
+ readonly enum: readonly ["delegation", "artifact", "outcome"];
384
263
  };
385
- readonly rating: {
386
- readonly type: "object";
387
- readonly properties: {
388
- readonly score: {
389
- readonly type: "number";
390
- readonly minimum: 0;
391
- readonly maximum: 1;
392
- };
393
- readonly label: {
394
- readonly type: "string";
395
- readonly enum: readonly ["good", "bad", "neutral", "mixed"];
396
- };
397
- readonly notes: {
398
- readonly type: "string";
399
- };
400
- };
401
- readonly required: readonly ["score", "notes"];
402
- readonly additionalProperties: false;
264
+ readonly ref: {
265
+ readonly type: "string";
403
266
  };
404
- readonly by: {
405
- readonly type: "string";
406
- readonly enum: readonly ["agent", "user", "downstream-judge"];
267
+ };
268
+ readonly required: readonly ["kind", "ref"];
269
+ readonly additionalProperties: false;
270
+ };
271
+ readonly rating: {
272
+ readonly type: "object";
273
+ readonly properties: {
274
+ readonly score: {
275
+ readonly type: "number";
276
+ readonly minimum: 0;
277
+ readonly maximum: 1;
407
278
  };
408
- readonly capturedAt: {
409
- readonly type: "string";
279
+ readonly label: {
280
+ readonly type: "string";
281
+ readonly enum: readonly ["good", "bad", "neutral", "mixed"];
410
282
  };
411
- readonly namespace: {
412
- readonly type: "string";
283
+ readonly notes: {
284
+ readonly type: "string";
413
285
  };
286
+ };
287
+ readonly required: readonly ["score", "notes"];
288
+ readonly additionalProperties: false;
289
+ };
290
+ readonly by: {
291
+ readonly type: "string";
292
+ readonly enum: readonly ["agent", "user", "downstream-judge"];
293
+ };
294
+ readonly capturedAt: {
295
+ readonly type: "string";
414
296
  };
415
- readonly required: readonly ["refersTo", "rating", "by"];
416
- readonly additionalProperties: false;
297
+ readonly namespace: {
298
+ readonly type: "string";
299
+ };
300
+ };
301
+ readonly required: readonly ["refersTo", "rating", "by"];
302
+ readonly additionalProperties: false;
417
303
  };
418
304
  /** Parse and validate raw MCP tool input into typed `DelegateFeedbackArgs`; throws `TypeError` on bad input. @experimental */
419
305
  declare function validateDelegateFeedbackArgs(raw: unknown): DelegateFeedbackArgs;
420
306
  /** @experimental */
421
307
  interface DelegateFeedbackHandlerOptions {
422
- queue: DelegationTaskQueue;
423
- store: FeedbackStore;
424
- generateId?: () => string;
425
- now?: () => string;
308
+ queue: DelegationTaskQueue;
309
+ store: FeedbackStore;
310
+ generateId?: () => string;
311
+ now?: () => string;
426
312
  }
427
313
  /** Build the MCP tool handler that persists feedback events and attaches them to delegation records. @experimental */
428
314
  declare function createDelegateFeedbackHandler(options: DelegateFeedbackHandlerOptions): (raw: unknown) => Promise<DelegateFeedbackResult>;
429
-
430
- /**
431
- *
432
- * `delegate_ui_audit` MCP tool — async kickoff for UI audit runs. Validates
433
- * the input, computes an idempotency key over the canonical fields, hands
434
- * the task to the queue, and returns a taskId. Identical inputs return
435
- * the same taskId.
436
- *
437
- * The handler does not import the auditor profile directly — consumers
438
- * inject a `UiAuditorDelegate` via `createMcpServer({ uiAuditorDelegate })`.
439
- * The delegate is the seam where the consumer chooses the judge (vision
440
- * model) and the `SandboxClient` (in-process Playwright vs fleet vs
441
- * remote browser). agent-runtime ships the in-process client under
442
- * `./profiles` so consumers who want the canonical setup can wire it
443
- * with a few lines.
444
- *
445
- * @experimental
446
- */
447
-
315
+ //#endregion
316
+ //#region src/mcp/tools/delegate-ui-audit.d.ts
448
317
  /** MCP tool name for the `delegate_ui_audit` async kickoff tool. @experimental */
449
318
  declare const DELEGATE_UI_AUDIT_TOOL_NAME = "delegate_ui_audit";
450
319
  /** Human-readable description of the `delegate_ui_audit` MCP tool, injected into the tool manifest. @experimental */
451
320
  declare const DELEGATE_UI_AUDIT_DESCRIPTION: string;
452
321
  /** JSON Schema for `delegate_ui_audit` tool arguments (`workspaceDir`, `routes`, optional config). @experimental */
453
322
  declare const DELEGATE_UI_AUDIT_INPUT_SCHEMA: {
454
- readonly type: "object";
455
- readonly properties: {
456
- readonly workspaceDir: {
323
+ readonly type: "object";
324
+ readonly properties: {
325
+ readonly workspaceDir: {
326
+ readonly type: "string";
327
+ readonly description: "Absolute path for the audit workspace.";
328
+ };
329
+ readonly routes: {
330
+ readonly type: "array";
331
+ readonly items: {
332
+ readonly type: "object";
333
+ readonly properties: {
334
+ readonly name: {
457
335
  readonly type: "string";
458
- readonly description: "Absolute path for the audit workspace.";
459
- };
460
- readonly routes: {
336
+ readonly description: "Stable route name (used in screenshot filenames).";
337
+ };
338
+ readonly url: {
339
+ readonly type: "string";
340
+ readonly description: "Fully-qualified URL.";
341
+ };
342
+ readonly viewports: {
461
343
  readonly type: "array";
462
344
  readonly items: {
463
- readonly type: "object";
464
- readonly properties: {
465
- readonly name: {
466
- readonly type: "string";
467
- readonly description: "Stable route name (used in screenshot filenames).";
468
- };
469
- readonly url: {
470
- readonly type: "string";
471
- readonly description: "Fully-qualified URL.";
472
- };
473
- readonly viewports: {
474
- readonly type: "array";
475
- readonly items: {
476
- readonly type: "object";
477
- readonly properties: {
478
- readonly width: {
479
- readonly type: "integer";
480
- readonly minimum: 1;
481
- };
482
- readonly height: {
483
- readonly type: "integer";
484
- readonly minimum: 1;
485
- };
486
- };
487
- readonly required: readonly ["width", "height"];
488
- readonly additionalProperties: false;
489
- };
490
- readonly description: "Viewports to capture at. Default [{1280, 800}].";
491
- };
492
- readonly fullPage: {
493
- readonly type: "boolean";
494
- };
495
- readonly waitFor: {
496
- readonly type: "string";
497
- readonly description: "CSS selector to wait for before capturing.";
498
- };
345
+ readonly type: "object";
346
+ readonly properties: {
347
+ readonly width: {
348
+ readonly type: "integer";
349
+ readonly minimum: 1;
350
+ };
351
+ readonly height: {
352
+ readonly type: "integer";
353
+ readonly minimum: 1;
499
354
  };
500
- readonly required: readonly ["name", "url"];
501
- readonly additionalProperties: false;
355
+ };
356
+ readonly required: readonly ["width", "height"];
357
+ readonly additionalProperties: false;
502
358
  };
503
- readonly minItems: 1;
359
+ readonly description: "Viewports to capture at. Default [{1280, 800}].";
360
+ };
361
+ readonly fullPage: {
362
+ readonly type: "boolean";
363
+ };
364
+ readonly waitFor: {
365
+ readonly type: "string";
366
+ readonly description: "CSS selector to wait for before capturing.";
367
+ };
504
368
  };
505
- readonly namespace: {
369
+ readonly required: readonly ["name", "url"];
370
+ readonly additionalProperties: false;
371
+ };
372
+ readonly minItems: 1;
373
+ };
374
+ readonly namespace: {
375
+ readonly type: "string";
376
+ readonly description: "Multi-tenant scope.";
377
+ };
378
+ readonly config: {
379
+ readonly type: "object";
380
+ readonly properties: {
381
+ readonly lenses: {
382
+ readonly type: "array";
383
+ readonly items: {
506
384
  readonly type: "string";
507
- readonly description: "Multi-tenant scope.";
385
+ readonly enum: readonly UiLens[];
386
+ };
387
+ readonly description: "Lenses to iterate. Default: every lens except \"other\".";
508
388
  };
509
- readonly config: {
510
- readonly type: "object";
511
- readonly properties: {
512
- readonly lenses: {
513
- readonly type: "array";
514
- readonly items: {
515
- readonly type: "string";
516
- readonly enum: readonly UiLens[];
517
- };
518
- readonly description: "Lenses to iterate. Default: every lens except \"other\".";
519
- };
520
- readonly maxIterations: {
521
- readonly type: "integer";
522
- readonly minimum: 1;
523
- };
524
- readonly maxConcurrency: {
525
- readonly type: "integer";
526
- readonly minimum: 1;
527
- };
528
- readonly productContext: {
529
- readonly type: "string";
530
- };
531
- };
532
- readonly additionalProperties: false;
389
+ readonly maxIterations: {
390
+ readonly type: "integer";
391
+ readonly minimum: 1;
392
+ };
393
+ readonly maxConcurrency: {
394
+ readonly type: "integer";
395
+ readonly minimum: 1;
396
+ };
397
+ readonly productContext: {
398
+ readonly type: "string";
533
399
  };
400
+ };
401
+ readonly additionalProperties: false;
534
402
  };
535
- readonly required: readonly ["workspaceDir", "routes"];
536
- readonly additionalProperties: false;
403
+ };
404
+ readonly required: readonly ["workspaceDir", "routes"];
405
+ readonly additionalProperties: false;
537
406
  };
538
407
  /** Parse and validate raw MCP tool input into typed `DelegateUiAuditArgs`; throws `TypeError` on bad input. @experimental */
539
408
  declare function validateDelegateUiAuditArgs(raw: unknown): DelegateUiAuditArgs;
540
409
  /** @experimental */
541
410
  interface DelegateUiAuditHandlerOptions {
542
- queue: DelegationTaskQueue;
543
- delegate: UiAuditorDelegate;
544
- estimateDurationMs?: (args: DelegateUiAuditArgs) => number;
411
+ queue: DelegationTaskQueue;
412
+ delegate: UiAuditorDelegate;
413
+ estimateDurationMs?: (args: DelegateUiAuditArgs) => number;
545
414
  }
546
415
  /** Build the MCP tool handler that validates input, deduplicates via idempotency key, and enqueues a UI audit. @experimental */
547
416
  declare function createDelegateUiAuditHandler(options: DelegateUiAuditHandlerOptions): (raw: unknown) => Promise<DelegateUiAuditResult>;
548
-
549
- /**
550
- *
551
- * `delegation_history` MCP tool — synchronous read of past delegations.
552
- * The agent uses this for self-introspection — "have I delegated this
553
- * kind of task before? did it work?" — and calibration.
554
- *
555
- * @experimental
556
- */
557
-
417
+ //#endregion
418
+ //#region src/mcp/tools/delegation-history.d.ts
558
419
  /** MCP tool name for the `delegation_history` read-past-delegations tool. @experimental */
559
420
  declare const DELEGATION_HISTORY_TOOL_NAME = "delegation_history";
560
421
  /** Human-readable description of the `delegation_history` MCP tool, injected into the tool manifest. @experimental */
561
422
  declare const DELEGATION_HISTORY_DESCRIPTION: string;
562
423
  /** JSON Schema for `delegation_history` tool arguments (optional `namespace`, `profile`, `since`, `limit`). @experimental */
563
424
  declare const DELEGATION_HISTORY_INPUT_SCHEMA: {
564
- readonly type: "object";
565
- readonly properties: {
566
- readonly namespace: {
567
- readonly type: "string";
568
- };
569
- readonly profile: {
570
- readonly type: "string";
571
- readonly enum: readonly ["coder", "researcher"];
572
- };
573
- readonly since: {
574
- readonly type: "string";
575
- readonly description: "ISO datetime — earliest startedAt to include.";
576
- };
577
- readonly limit: {
578
- readonly type: "integer";
579
- readonly minimum: 1;
580
- readonly maximum: 500;
581
- };
425
+ readonly type: "object";
426
+ readonly properties: {
427
+ readonly namespace: {
428
+ readonly type: "string";
429
+ };
430
+ readonly profile: {
431
+ readonly type: "string";
432
+ readonly enum: readonly ["coder", "researcher"];
582
433
  };
583
- readonly additionalProperties: false;
434
+ readonly since: {
435
+ readonly type: "string";
436
+ readonly description: "ISO datetime — earliest startedAt to include.";
437
+ };
438
+ readonly limit: {
439
+ readonly type: "integer";
440
+ readonly minimum: 1;
441
+ readonly maximum: 500;
442
+ };
443
+ };
444
+ readonly additionalProperties: false;
584
445
  };
585
446
  /** Parse and validate raw MCP tool input into typed `DelegationHistoryArgs`; throws `TypeError` on bad input. @experimental */
586
447
  declare function validateDelegationHistoryArgs(raw: unknown): DelegationHistoryArgs;
587
448
  /** @experimental */
588
449
  interface DelegationHistoryHandlerOptions {
589
- queue: DelegationTaskQueue;
450
+ queue: DelegationTaskQueue;
590
451
  }
591
452
  /** Build the MCP tool handler that reads filtered past delegations from a `DelegationTaskQueue`. @experimental */
592
453
  declare function createDelegationHistoryHandler(options: DelegationHistoryHandlerOptions): (raw: unknown) => Promise<DelegationHistoryResult>;
593
-
594
- /**
595
- *
596
- * `delegation_status` MCP tool — synchronous poll. Returns the current
597
- * state machine + optional progress + final result (when terminal).
598
- *
599
- * @experimental
600
- */
601
-
454
+ //#endregion
455
+ //#region src/mcp/tools/delegation-status.d.ts
602
456
  /** MCP tool name for the `delegation_status` synchronous-poll tool. @experimental */
603
457
  declare const DELEGATION_STATUS_TOOL_NAME = "delegation_status";
604
458
  /** Human-readable description of the `delegation_status` MCP tool, injected into the tool manifest. @experimental */
605
459
  declare const DELEGATION_STATUS_DESCRIPTION: string;
606
460
  /** JSON Schema for `delegation_status` tool arguments (`taskId` + optional `includeTrace`). @experimental */
607
461
  declare const DELEGATION_STATUS_INPUT_SCHEMA: {
608
- readonly type: "object";
609
- readonly properties: {
610
- readonly taskId: {
611
- readonly type: "string";
612
- readonly description: "Returned by delegate_ui_audit.";
613
- };
614
- readonly includeTrace: {
615
- readonly type: "boolean";
616
- readonly description: "Also return the journaled loop-trace span tree for this delegation. Default false.";
617
- };
462
+ readonly type: "object";
463
+ readonly properties: {
464
+ readonly taskId: {
465
+ readonly type: "string";
466
+ readonly description: "Returned by delegate_ui_audit.";
467
+ };
468
+ readonly includeTrace: {
469
+ readonly type: "boolean";
470
+ readonly description: "Also return the journaled loop-trace span tree for this delegation. Default false.";
618
471
  };
619
- readonly required: readonly ["taskId"];
620
- readonly additionalProperties: false;
472
+ };
473
+ readonly required: readonly ["taskId"];
474
+ readonly additionalProperties: false;
621
475
  };
622
476
  /** Parse and validate raw MCP tool input into typed `DelegationStatusArgs`; throws `TypeError` on bad input. @experimental */
623
477
  declare function validateDelegationStatusArgs(raw: unknown): DelegationStatusArgs;
624
478
  /** @experimental */
625
479
  interface DelegationStatusHandlerOptions {
626
- queue: DelegationTaskQueue;
480
+ queue: DelegationTaskQueue;
627
481
  }
628
482
  /** Build the MCP tool handler that polls a `DelegationTaskQueue` for task status. @experimental */
629
483
  declare function createDelegationStatusHandler(options: DelegationStatusHandlerOptions): (raw: unknown) => Promise<DelegationStatusResult>;
630
-
631
- export { type AgentMemorySpec, type Check, type CheckRunnerOptions, CodexExecutionDiagnosticError, type CodexExecutionFailureDiagnostic, type CreateMemoryToolServerOptions, DELEGATE_FEEDBACK_DESCRIPTION, DELEGATE_FEEDBACK_INPUT_SCHEMA, DELEGATE_FEEDBACK_TOOL_NAME, DELEGATE_UI_AUDIT_DESCRIPTION, DELEGATE_UI_AUDIT_INPUT_SCHEMA, DELEGATE_UI_AUDIT_TOOL_NAME, DELEGATION_HISTORY_DESCRIPTION, DELEGATION_HISTORY_INPUT_SCHEMA, DELEGATION_HISTORY_TOOL_NAME, DELEGATION_STATUS_DESCRIPTION, DELEGATION_STATUS_INPUT_SCHEMA, DELEGATION_STATUS_TOOL_NAME, DelegateFeedbackArgs, DelegateFeedbackResult, DelegateUiAuditArgs, DelegateUiAuditResult, DelegationExecutor, DelegationHistoryArgs, DelegationHistoryResult, DelegationStatusArgs, DelegationStatusResult, DelegationTaskQueue, type DetectExecutorArgs, FeedbackStore, FleetHandle, GitRunner, type InProcessExecutorDescribePlacement, type InProcessExecutorOptions, LocalHarness, MEMORY_FILE_ENV, MEMORY_ITEMS_ENV, MEMORY_LOG_ENV, MEMORY_NAME_ENV, type MemoryItem, type ResolvedMemoryEnv, type McpToolDescriptor as StdioToolDescriptor, type StdioToolServer, type StdioToolServerOptions, UiAuditorDelegate, createDelegateFeedbackHandler, createDelegateUiAuditHandler, createDelegationHistoryHandler, createDelegationStatusHandler, createInProcessExecutor, createMemoryToolServer, createStdioToolServer, defaultChecks, detectExecutor, liftFindings, makeCheckRunner, parseMemoryItems, readMemoryItemsFile, renderTrace, resolveMemoryFromEnv, runCheck, runLocalHarness, validateDelegateFeedbackArgs, validateDelegateUiAuditArgs, validateDelegationHistoryArgs, validateDelegationStatusArgs };
484
+ //#endregion
485
+ //#region src/mcp/index.d.ts
486
+ /** @deprecated Use `McpToolDescriptor`; both names are the same protocol contract. */
487
+ type StdioToolDescriptor = McpToolDescriptor;
488
+ //#endregion
489
+ export { type AgentMemorySpec, type AnalystFindingEvent, type AnalystRegistry, type CappedDelegationTrace, type Check, type CheckRunnerOptions, type CoderDelegate, type CoderOutput, type CoderReview, type CoderReviewer, CodexExecutionDiagnosticError, type CodexExecutionEvidence, type CodexExecutionFailureDiagnostic, type CodexExecutionPolicy, type CodexTokenUsage, type CoordinationEvent, type CoordinationTools, type CoordinationToolsOptions, type CreateKbGateOptions, type CreateMemoryToolServerOptions, type CreateWorktreeOptions, DEFAULT_AWAIT_EVENT_TIMEOUT_MS, DELEGATE_DESCRIPTION, DELEGATE_FEEDBACK_DESCRIPTION, DELEGATE_FEEDBACK_INPUT_SCHEMA, DELEGATE_FEEDBACK_TOOL_NAME, DELEGATE_INPUT_SCHEMA, DELEGATE_TOOL_NAME, DELEGATE_UI_AUDIT_DESCRIPTION, DELEGATE_UI_AUDIT_INPUT_SCHEMA, DELEGATE_UI_AUDIT_TOOL_NAME, DELEGATION_HISTORY_DESCRIPTION, DELEGATION_HISTORY_INPUT_SCHEMA, DELEGATION_HISTORY_TOOL_NAME, DELEGATION_STATUS_DESCRIPTION, DELEGATION_STATUS_INPUT_SCHEMA, DELEGATION_STATUS_TOOL_NAME, DELEGATION_TRACE_MAX_BYTES, DELEGATION_TRACE_MAX_SPANS, type DelegateArgs, type DelegateCodeArgs, type DelegateCodeConfig, type DelegateCodeResult, type DelegateFeedbackArgs, type DelegateFeedbackHandlerOptions, type DelegateFeedbackResult, type DelegateHandlerOptions, type DelegateResearchArgs, type DelegateResearchConfig, type DelegateResearchResult, type DelegateResult, type DelegateRunCtx, type DelegateUiAuditArgs, type DelegateUiAuditConfig, type DelegateUiAuditHandlerOptions, type DelegateUiAuditResult, type DelegateUiAuditRoute, type DelegationArgs, type DelegationError, type DelegationExecutor, type DelegationFeedbackSnapshot, type DelegationHistoryArgs, type DelegationHistoryEntry, type DelegationHistoryHandlerOptions, type DelegationHistoryResult, DelegationPersistenceError, type DelegationProfile, type DelegationProgress, type DelegationRecord, type DelegationResultPayload, type DelegationResumeContext, type DelegationResumeDriver, type DelegationResumeTick, type DelegationRunContext, DelegationStateCorruptError, type DelegationStatus, type DelegationStatusArgs, type DelegationStatusHandlerOptions, type DelegationStatusResult, type DelegationStore, DelegationTaskQueue, type DelegationTaskQueueOptions, type DelegationTraceCaps, type DelegationTraceCollector, type DelegationTraceSpan, type DetachedSessionDelegateOptions, type DetachedSessionRefParts, type DetachedTurn, type DetachedTurnResumeDriverOptions, type DetachedWinnerSelection, type DetectExecutorArgs, type DiffOptions, type DiffResult, type DownMessageEvent, type DriveTurnCapableBox, type DriveTurnTick, type FactCandidate, type FactJudge, type FactJudgeVerdict, type FeedbackEvent, type FeedbackRating, type FeedbackRefersTo, type FeedbackStore, FileDelegationStore, type FileDelegationStoreOptions, type FleetHandle, type FleetWorkspaceExecutorOptions, type GitRunner, InMemoryDelegationStore, InMemoryFeedbackStore, type InProcessExecutorDescribePlacement, type InProcessExecutorOptions, type JsonRpcMessage, type JsonRpcResponse, type KbGateResult, type LocalHarness, type LocalHarnessResult, MEMORY_FILE_ENV, MEMORY_ITEMS_ENV, MEMORY_LOG_ENV, MEMORY_NAME_ENV, type MakeWorkerAgent, type McpServer, type McpServerOptions, type McpToolDescriptor, type McpTransport, type MemoryItem, type Question, type QuestionDecision, type QuestionLevel, type QuestionOption, type QuestionPolicy, type QuestionRecord, type QuestionUrgency, type RemoveWorktreeOptions, type ResearchOutputShape, type ResearchSource, type ResolvedMemoryEnv, type RunDetachedTurnOptions, type RunLocalHarnessOptions, type SettleDetachedCoderTurnOptions, type SettledWorker, type SiblingSandboxExecutorOptions, StdioToolDescriptor, type StdioToolServer, type StdioToolServerOptions, type SubmitInput, type SubmitOutput, type TraceContext, type UiAuditLensFilter, type UiAuditorDelegate, type UiAuditorDelegationOutput, type WorkerWatchOptions, type WorktreeHandle, buildDelegationTraceSpans, capDelegationTrace, captureWorktreeDiff, coderTaskFromArgs, composeLoopTraceEmitters, createCoordinationTools, createDelegateFeedbackHandler, createDelegateHandler, createDelegateUiAuditHandler, createDelegationHistoryHandler, createDelegationStatusHandler, createDelegationTraceCollector, createDetachedTurnResumeDriver, createFleetWorkspaceExecutor, createInProcessExecutor, createInProcessTransport, createKbGate, createMcpServer, createMemoryToolServer, createPropagatingTraceEmitter, createSiblingSandboxExecutor, createStdioToolServer, createWorktree, defaultChecks, detachedSessionDelegate, detachedTurnEvents, detectExecutor, eventToSnapshot, formatDetachedSessionRef, hashIdempotencyInput, liftFindings, makeCheckRunner, mcpToolsForRuntimeMcp, mcpToolsForRuntimeMcpSubset, parseCodexTokenUsage, parseDetachedSessionRef, parseMemoryItems, readMemoryItemsFile, readTraceContextFromEnv, removeWorktree, renderTrace, resolveMemoryFromEnv, runCheck, runDetachedTurn, runLocalHarness, settleDetachedCoderTurn, traceContextToEnv, validateDelegateArgs, validateDelegateFeedbackArgs, validateDelegateUiAuditArgs, validateDelegationHistoryArgs, validateDelegationStatusArgs };
490
+ //# sourceMappingURL=index.d.ts.map