@animalabs/agent-framework 0.26.2 → 0.27.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (276) hide show
  1. package/README.md +56 -6
  2. package/dist/src/agent.d.ts +263 -22
  3. package/dist/src/agent.d.ts.map +1 -1
  4. package/dist/src/agent.js +531 -54
  5. package/dist/src/agent.js.map +1 -1
  6. package/dist/src/api/server.d.ts.map +1 -1
  7. package/dist/src/api/server.js +1 -2
  8. package/dist/src/api/server.js.map +1 -1
  9. package/dist/src/auto-continue.d.ts +33 -0
  10. package/dist/src/auto-continue.d.ts.map +1 -0
  11. package/dist/src/auto-continue.js +35 -0
  12. package/dist/src/auto-continue.js.map +1 -0
  13. package/dist/src/code-execution/isolate/scripts.d.ts +11 -0
  14. package/dist/src/code-execution/isolate/scripts.d.ts.map +1 -1
  15. package/dist/src/code-execution/isolate/scripts.js +5 -1
  16. package/dist/src/code-execution/isolate/scripts.js.map +1 -1
  17. package/dist/src/framework.d.ts +759 -129
  18. package/dist/src/framework.d.ts.map +1 -1
  19. package/dist/src/framework.js +3482 -928
  20. package/dist/src/framework.js.map +1 -1
  21. package/dist/src/gate/event-gate.d.ts +309 -46
  22. package/dist/src/gate/event-gate.d.ts.map +1 -1
  23. package/dist/src/gate/event-gate.js +2117 -395
  24. package/dist/src/gate/event-gate.js.map +1 -1
  25. package/dist/src/gate/index.d.ts +2 -2
  26. package/dist/src/gate/index.d.ts.map +1 -1
  27. package/dist/src/gate/index.js +1 -1
  28. package/dist/src/gate/index.js.map +1 -1
  29. package/dist/src/gate/recipe-reconcile.d.ts +103 -0
  30. package/dist/src/gate/recipe-reconcile.d.ts.map +1 -0
  31. package/dist/src/gate/recipe-reconcile.js +325 -0
  32. package/dist/src/gate/recipe-reconcile.js.map +1 -0
  33. package/dist/src/gate/types.d.ts +68 -8
  34. package/dist/src/gate/types.d.ts.map +1 -1
  35. package/dist/src/index.d.ts +6 -4
  36. package/dist/src/index.d.ts.map +1 -1
  37. package/dist/src/index.js +5 -2
  38. package/dist/src/index.js.map +1 -1
  39. package/dist/src/mcpl/channel-registry.d.ts +433 -113
  40. package/dist/src/mcpl/channel-registry.d.ts.map +1 -1
  41. package/dist/src/mcpl/channel-registry.js +1152 -434
  42. package/dist/src/mcpl/channel-registry.js.map +1 -1
  43. package/dist/src/mcpl/conversation-router.d.ts +16 -8
  44. package/dist/src/mcpl/conversation-router.d.ts.map +1 -1
  45. package/dist/src/mcpl/conversation-router.js +29 -15
  46. package/dist/src/mcpl/conversation-router.js.map +1 -1
  47. package/dist/src/mcpl/convert-block.d.ts.map +1 -1
  48. package/dist/src/mcpl/convert-block.js +14 -2
  49. package/dist/src/mcpl/convert-block.js.map +1 -1
  50. package/dist/src/mcpl/hook-orchestrator.d.ts +7 -1
  51. package/dist/src/mcpl/hook-orchestrator.d.ts.map +1 -1
  52. package/dist/src/mcpl/hook-orchestrator.js +32 -7
  53. package/dist/src/mcpl/hook-orchestrator.js.map +1 -1
  54. package/dist/src/mcpl/index.d.ts +5 -1
  55. package/dist/src/mcpl/index.d.ts.map +1 -1
  56. package/dist/src/mcpl/index.js +4 -0
  57. package/dist/src/mcpl/index.js.map +1 -1
  58. package/dist/src/mcpl/inference-router.d.ts +14 -2
  59. package/dist/src/mcpl/inference-router.d.ts.map +1 -1
  60. package/dist/src/mcpl/inference-router.js +73 -28
  61. package/dist/src/mcpl/inference-router.js.map +1 -1
  62. package/dist/src/mcpl/prose-grammar.d.ts +4 -0
  63. package/dist/src/mcpl/prose-grammar.d.ts.map +1 -1
  64. package/dist/src/mcpl/prose-grammar.js +6 -0
  65. package/dist/src/mcpl/prose-grammar.js.map +1 -1
  66. package/dist/src/mcpl/protocol-family.d.ts.map +1 -1
  67. package/dist/src/mcpl/protocol-family.js +3 -0
  68. package/dist/src/mcpl/protocol-family.js.map +1 -1
  69. package/dist/src/mcpl/push-coalescer.d.ts +20 -2
  70. package/dist/src/mcpl/push-coalescer.d.ts.map +1 -1
  71. package/dist/src/mcpl/push-coalescer.js +33 -11
  72. package/dist/src/mcpl/push-coalescer.js.map +1 -1
  73. package/dist/src/mcpl/reference-fetcher.d.ts +63 -42
  74. package/dist/src/mcpl/reference-fetcher.d.ts.map +1 -1
  75. package/dist/src/mcpl/reference-fetcher.js +177 -145
  76. package/dist/src/mcpl/reference-fetcher.js.map +1 -1
  77. package/dist/src/mcpl/references.d.ts +380 -46
  78. package/dist/src/mcpl/references.d.ts.map +1 -1
  79. package/dist/src/mcpl/references.js +736 -77
  80. package/dist/src/mcpl/references.js.map +1 -1
  81. package/dist/src/mcpl/server-connection.d.ts +82 -3
  82. package/dist/src/mcpl/server-connection.d.ts.map +1 -1
  83. package/dist/src/mcpl/server-connection.js +132 -7
  84. package/dist/src/mcpl/server-connection.js.map +1 -1
  85. package/dist/src/mcpl/tool-lifecycle.d.ts +11 -0
  86. package/dist/src/mcpl/tool-lifecycle.d.ts.map +1 -1
  87. package/dist/src/mcpl/tool-lifecycle.js +21 -0
  88. package/dist/src/mcpl/tool-lifecycle.js.map +1 -1
  89. package/dist/src/mcpl/tool-presence.d.ts +259 -0
  90. package/dist/src/mcpl/tool-presence.d.ts.map +1 -0
  91. package/dist/src/mcpl/tool-presence.js +628 -0
  92. package/dist/src/mcpl/tool-presence.js.map +1 -0
  93. package/dist/src/mcpl/tool-result-normalize.d.ts +9 -3
  94. package/dist/src/mcpl/tool-result-normalize.d.ts.map +1 -1
  95. package/dist/src/mcpl/tool-result-normalize.js +14 -6
  96. package/dist/src/mcpl/tool-result-normalize.js.map +1 -1
  97. package/dist/src/mcpl/tool-signature.d.ts +39 -0
  98. package/dist/src/mcpl/tool-signature.d.ts.map +1 -0
  99. package/dist/src/mcpl/tool-signature.js +292 -0
  100. package/dist/src/mcpl/tool-signature.js.map +1 -0
  101. package/dist/src/mcpl/toolset-host.d.ts +200 -0
  102. package/dist/src/mcpl/toolset-host.d.ts.map +1 -0
  103. package/dist/src/mcpl/toolset-host.js +621 -0
  104. package/dist/src/mcpl/toolset-host.js.map +1 -0
  105. package/dist/src/mcpl/toolsets-module.d.ts +80 -0
  106. package/dist/src/mcpl/toolsets-module.d.ts.map +1 -0
  107. package/dist/src/mcpl/toolsets-module.js +431 -0
  108. package/dist/src/mcpl/toolsets-module.js.map +1 -0
  109. package/dist/src/mcpl/transport.d.ts +2 -2
  110. package/dist/src/mcpl/transport.d.ts.map +1 -1
  111. package/dist/src/mcpl/transport.js +3 -2
  112. package/dist/src/mcpl/transport.js.map +1 -1
  113. package/dist/src/mcpl/types.d.ts +21 -1
  114. package/dist/src/mcpl/types.d.ts.map +1 -1
  115. package/dist/src/mcpl/types.js.map +1 -1
  116. package/dist/src/mcpl/visible-content.d.ts +7 -9
  117. package/dist/src/mcpl/visible-content.d.ts.map +1 -1
  118. package/dist/src/mcpl/visible-content.js +21 -9
  119. package/dist/src/mcpl/visible-content.js.map +1 -1
  120. package/dist/src/module-registry.d.ts +23 -8
  121. package/dist/src/module-registry.d.ts.map +1 -1
  122. package/dist/src/module-registry.js +68 -15
  123. package/dist/src/module-registry.js.map +1 -1
  124. package/dist/src/modules/discord/index.js +1 -1
  125. package/dist/src/modules/discord/index.js.map +1 -1
  126. package/dist/src/modules/history/index.d.ts +2 -1
  127. package/dist/src/modules/history/index.d.ts.map +1 -1
  128. package/dist/src/modules/history/index.js +51 -17
  129. package/dist/src/modules/history/index.js.map +1 -1
  130. package/dist/src/modules/history/semantic.d.ts +108 -6
  131. package/dist/src/modules/history/semantic.d.ts.map +1 -1
  132. package/dist/src/modules/history/semantic.js +273 -57
  133. package/dist/src/modules/history/semantic.js.map +1 -1
  134. package/dist/src/modules/workspace/direct-write.d.ts +181 -0
  135. package/dist/src/modules/workspace/direct-write.d.ts.map +1 -0
  136. package/dist/src/modules/workspace/direct-write.js +384 -0
  137. package/dist/src/modules/workspace/direct-write.js.map +1 -0
  138. package/dist/src/modules/workspace/edit-text.d.ts +26 -12
  139. package/dist/src/modules/workspace/edit-text.d.ts.map +1 -1
  140. package/dist/src/modules/workspace/edit-text.js +58 -28
  141. package/dist/src/modules/workspace/edit-text.js.map +1 -1
  142. package/dist/src/modules/workspace/effects.d.ts +10 -0
  143. package/dist/src/modules/workspace/effects.d.ts.map +1 -1
  144. package/dist/src/modules/workspace/effects.js +1 -1
  145. package/dist/src/modules/workspace/effects.js.map +1 -1
  146. package/dist/src/modules/workspace/index.d.ts +246 -27
  147. package/dist/src/modules/workspace/index.d.ts.map +1 -1
  148. package/dist/src/modules/workspace/index.js +1216 -236
  149. package/dist/src/modules/workspace/index.js.map +1 -1
  150. package/dist/src/modules/workspace/read-page.d.ts +41 -0
  151. package/dist/src/modules/workspace/read-page.d.ts.map +1 -0
  152. package/dist/src/modules/workspace/read-page.js +213 -0
  153. package/dist/src/modules/workspace/read-page.js.map +1 -0
  154. package/dist/src/modules/workspace/result-text.d.ts +67 -0
  155. package/dist/src/modules/workspace/result-text.d.ts.map +1 -0
  156. package/dist/src/modules/workspace/result-text.js +94 -0
  157. package/dist/src/modules/workspace/result-text.js.map +1 -0
  158. package/dist/src/modules/workspace/text.d.ts +29 -12
  159. package/dist/src/modules/workspace/text.d.ts.map +1 -1
  160. package/dist/src/modules/workspace/text.js +35 -33
  161. package/dist/src/modules/workspace/text.js.map +1 -1
  162. package/dist/src/modules/workspace/types.d.ts +41 -17
  163. package/dist/src/modules/workspace/types.d.ts.map +1 -1
  164. package/dist/src/modules/workspace/types.js.map +1 -1
  165. package/dist/src/sent-rows.d.ts +59 -0
  166. package/dist/src/sent-rows.d.ts.map +1 -0
  167. package/dist/src/sent-rows.js +145 -0
  168. package/dist/src/sent-rows.js.map +1 -0
  169. package/dist/src/silent-heartbeat.d.ts +17 -10
  170. package/dist/src/silent-heartbeat.d.ts.map +1 -1
  171. package/dist/src/silent-heartbeat.js.map +1 -1
  172. package/dist/src/stable-hash.d.ts +3 -0
  173. package/dist/src/stable-hash.d.ts.map +1 -0
  174. package/dist/src/stable-hash.js +15 -0
  175. package/dist/src/stable-hash.js.map +1 -0
  176. package/dist/src/stored-injections.d.ts +99 -0
  177. package/dist/src/stored-injections.d.ts.map +1 -0
  178. package/dist/src/stored-injections.js +106 -0
  179. package/dist/src/stored-injections.js.map +1 -0
  180. package/dist/src/text-as-stored.d.ts +4 -3
  181. package/dist/src/text-as-stored.d.ts.map +1 -1
  182. package/dist/src/text-as-stored.js +4 -3
  183. package/dist/src/text-as-stored.js.map +1 -1
  184. package/dist/src/thinking-drops.d.ts +81 -0
  185. package/dist/src/thinking-drops.d.ts.map +1 -0
  186. package/dist/src/thinking-drops.js +103 -0
  187. package/dist/src/thinking-drops.js.map +1 -0
  188. package/dist/src/tool-image-ledger.d.ts +9 -8
  189. package/dist/src/tool-image-ledger.d.ts.map +1 -1
  190. package/dist/src/tool-image-ledger.js +9 -8
  191. package/dist/src/tool-image-ledger.js.map +1 -1
  192. package/dist/src/tool-presentation.d.ts.map +1 -1
  193. package/dist/src/tool-presentation.js +3 -1
  194. package/dist/src/tool-presentation.js.map +1 -1
  195. package/dist/src/tool-result-guard.d.ts +4 -2
  196. package/dist/src/tool-result-guard.d.ts.map +1 -1
  197. package/dist/src/tool-result-guard.js +21 -6
  198. package/dist/src/tool-result-guard.js.map +1 -1
  199. package/dist/src/tool-result-history.d.ts +176 -24
  200. package/dist/src/tool-result-history.d.ts.map +1 -1
  201. package/dist/src/tool-result-history.js +411 -91
  202. package/dist/src/tool-result-history.js.map +1 -1
  203. package/dist/src/tune-out/coordinator.d.ts +17 -9
  204. package/dist/src/tune-out/coordinator.d.ts.map +1 -1
  205. package/dist/src/tune-out/coordinator.js +84 -37
  206. package/dist/src/tune-out/coordinator.js.map +1 -1
  207. package/dist/src/types/agent.d.ts +186 -7
  208. package/dist/src/types/agent.d.ts.map +1 -1
  209. package/dist/src/types/events.d.ts +15 -1
  210. package/dist/src/types/events.d.ts.map +1 -1
  211. package/dist/src/types/framework.d.ts +24 -3
  212. package/dist/src/types/framework.d.ts.map +1 -1
  213. package/dist/src/types/module.d.ts +90 -7
  214. package/dist/src/types/module.d.ts.map +1 -1
  215. package/dist/src/types/trace.d.ts +57 -2
  216. package/dist/src/types/trace.d.ts.map +1 -1
  217. package/package.json +4 -3
  218. package/src/agent.ts +593 -60
  219. package/src/api/server.ts +1 -2
  220. package/src/auto-continue.ts +42 -0
  221. package/src/code-execution/isolate/scripts.ts +11 -3
  222. package/src/framework.ts +3601 -967
  223. package/src/gate/event-gate.ts +2315 -389
  224. package/src/gate/index.ts +2 -1
  225. package/src/gate/recipe-reconcile.ts +355 -0
  226. package/src/gate/types.ts +70 -8
  227. package/src/index.ts +7 -4
  228. package/src/mcpl/channel-registry.ts +1220 -467
  229. package/src/mcpl/conversation-router.ts +34 -16
  230. package/src/mcpl/convert-block.ts +14 -1
  231. package/src/mcpl/hook-orchestrator.ts +33 -6
  232. package/src/mcpl/index.ts +6 -1
  233. package/src/mcpl/inference-router.ts +79 -34
  234. package/src/mcpl/prose-grammar.ts +7 -0
  235. package/src/mcpl/protocol-family.ts +2 -0
  236. package/src/mcpl/push-coalescer.ts +51 -13
  237. package/src/mcpl/reference-fetcher.ts +201 -162
  238. package/src/mcpl/references.ts +851 -77
  239. package/src/mcpl/server-connection.ts +145 -7
  240. package/src/mcpl/tool-lifecycle.ts +21 -0
  241. package/src/mcpl/tool-presence.ts +650 -0
  242. package/src/mcpl/tool-result-normalize.ts +18 -6
  243. package/src/mcpl/tool-signature.ts +285 -0
  244. package/src/mcpl/toolset-host.ts +637 -0
  245. package/src/mcpl/toolsets-module.ts +451 -0
  246. package/src/mcpl/transport.ts +3 -2
  247. package/src/mcpl/types.ts +22 -1
  248. package/src/mcpl/visible-content.ts +22 -9
  249. package/src/module-registry.ts +77 -24
  250. package/src/modules/discord/index.ts +1 -1
  251. package/src/modules/history/index.ts +48 -18
  252. package/src/modules/history/semantic.ts +308 -54
  253. package/src/modules/workspace/direct-write.ts +425 -0
  254. package/src/modules/workspace/edit-text.ts +82 -35
  255. package/src/modules/workspace/effects.ts +1 -1
  256. package/src/modules/workspace/index.ts +1274 -241
  257. package/src/modules/workspace/read-page.ts +222 -0
  258. package/src/modules/workspace/result-text.ts +119 -0
  259. package/src/modules/workspace/text.ts +58 -32
  260. package/src/modules/workspace/types.ts +41 -17
  261. package/src/sent-rows.ts +162 -0
  262. package/src/silent-heartbeat.ts +17 -10
  263. package/src/stable-hash.ts +14 -0
  264. package/src/stored-injections.ts +131 -0
  265. package/src/text-as-stored.ts +4 -3
  266. package/src/thinking-drops.ts +141 -0
  267. package/src/tool-image-ledger.ts +9 -8
  268. package/src/tool-presentation.ts +3 -1
  269. package/src/tool-result-guard.ts +19 -6
  270. package/src/tool-result-history.ts +471 -90
  271. package/src/tune-out/coordinator.ts +80 -37
  272. package/src/types/agent.ts +189 -7
  273. package/src/types/events.ts +15 -1
  274. package/src/types/framework.ts +21 -3
  275. package/src/types/module.ts +86 -7
  276. package/src/types/trace.ts +58 -2
@@ -1,10 +1,11 @@
1
1
  import { type PresentationSnapshot } from "./tool-presentation.js";
2
2
  import { JsStore } from '@animalabs/chronicle';
3
3
  import type { Membrane, NormalizedRequest } from '@animalabs/membrane';
4
+ import { type RetrySettings } from '@animalabs/membrane/retry';
4
5
  import { ContextManager } from '@animalabs/context-manager';
5
6
  import type { TokenBudget } from '@animalabs/context-manager';
6
- import type { FrameworkConfig, TraceEventListener, InferenceLogQuery, InferenceLogQueryResult, InferenceLogEntryWithId, ProcessLogQuery, ProcessLogQueryResult, ProcessLogEntryWithId, ProcessEvent, ToolCall, ToolResult, AgentConfig, InferenceRequest, Module, ContextMaintenanceSnapshot, AgentRuntimeSettingsPatch, AgentRuntimeSettingsSnapshot, SameRoundThinkTextPolicy } from './types/index.js';
7
- import { Agent } from './agent.js';
7
+ import type { FrameworkConfig, ErrorPolicy, ErrorAction, TraceEventListener, InferenceLogQuery, InferenceLogQueryResult, InferenceLogEntryWithId, ProcessLogQuery, ProcessLogQueryResult, ProcessLogEntryWithId, ProcessEvent, ToolCall, ToolResult, AgentConfig, InferenceRequest, Module, ContextMaintenanceSnapshot, AgentRuntimeSettingsPatch, AgentRuntimeSettingsSnapshot, SameRoundThinkTextPolicy } from './types/index.js';
8
+ import { Agent, type RenderStats } from './agent.js';
8
9
  import { type ToolClass, type ToolClassSource } from './mcpl/tool-classes.js';
9
10
  import { ChannelRegistry } from './mcpl/channel-registry.js';
10
11
  import { ConversationRouter } from './mcpl/conversation-router.js';
@@ -160,6 +161,42 @@ export declare class ProviderWaitNotSleptError extends Error {
160
161
  interface InferenceToolSnapshot {
161
162
  sameRoundThinkTextPolicy: SameRoundThinkTextPolicy;
162
163
  }
164
+ /**
165
+ * Default error policy: membrane's own retry schedules, decided here.
166
+ *
167
+ * The framework's turns pass `retry: false` to membrane, so a failure reaches
168
+ * this policy after one send, and the framework is the one retry layer: each
169
+ * retry is a fresh compile, a stop cancels its wait, and the wait is seen.
170
+ * The decision is membrane's (`@animalabs/membrane/retry`), on the settings
171
+ * given (membrane's defaults unless a host passes its own, e.g. from a
172
+ * recipe's retry config):
173
+ * - not retryable (400 invalid_request, 401 auth, context_length, safety,
174
+ * a caller-code error): terminal on the first failure. Retrying them burns
175
+ * API quota without any chance of success; production traces showed clerk +
176
+ * reviewer wasting 4 inferences on each 400 due to blind retries.
177
+ * - overloaded (a 529, or an overloaded error mid-stream): the overloaded
178
+ * schedule, jittered (by default 7 tries, 10 s doubling to 5 min, ~10 min).
179
+ * - rate limited (429): the base schedule with at least 5 tries.
180
+ * - any other retryable failure, a stream deadline on a sent request
181
+ * included (membrane leaves those to its caller): the base schedule (by
182
+ * default 3 tries, 1 s then 2 s).
183
+ * A provider's stated wait (`retryAfterMs`) is waited when it is longer than
184
+ * the backoff, up to the framework's own cap (PROVIDER_ACCELERATION_MAX_
185
+ * COOLDOWN_MS, ten minutes) where a schedule's ceiling is lower; past it the
186
+ * turn ends here. (Before this policy runs, the framework holds a resident
187
+ * for a stated wait or an acceleration 429 itself, and ends an ephemeral run
188
+ * on a wait past that cap; see holdProviderAcceleration and
189
+ * nonOwningProviderWait.)
190
+ * An error that isn't a MembraneError is retried as a retryable failure, on
191
+ * the base schedule.
192
+ */
193
+ export declare class DefaultErrorPolicy implements ErrorPolicy {
194
+ /** The most retries any class allows (ErrorPolicy's bound, for readers). */
195
+ readonly maxRetries: number;
196
+ private readonly settings;
197
+ constructor(settings?: RetrySettings);
198
+ onInferenceError(error: Error, _agentName: string, attempt: number): ErrorAction;
199
+ }
163
200
  /**
164
201
  * Whether the poison-history breaker may shed the newest exchange for a
165
202
  * failure: an `invalid_request` at HTTP 400, 413 or 422 or with no status, or
@@ -222,6 +259,29 @@ export declare class AgentFramework {
222
259
  private toolPresentations;
223
260
  private presentationPreviews;
224
261
  getRequestToolPresentation(request: object): PresentationSnapshot | null;
262
+ /**
263
+ * The render stats of the dry compile that built `request`, a request
264
+ * `previewActivation` returned (or `Agent.buildActivationRequest` with
265
+ * `dryRun`), as context-manager gives them in `CompileResult.renderStats`:
266
+ * what that compile's select put in the context, by kind. They count the
267
+ * selection, not each message of the request. The injections
268
+ * context-manager merges in after its select, such as those
269
+ * `previewActivation` gathers with `injections: true`, aren't counted;
270
+ * context-manager's doc of `CompileResult.renderStats` names what else its
271
+ * compile does after the select. The agent then changes the messages
272
+ * itself, and the stats come from before that: they count a message it
273
+ * drops, such as one left holding only blank text, and leave out the turns
274
+ * it adds, such as `[Continue]`, a silent heartbeat's separator,
275
+ * request-only turns, and the stand-ins `previewActivation` shows for the
276
+ * `afterUser` injections a start would store (stored-injections.ts). A
277
+ * later preview or live compile leaves them as they were.
278
+ * They're the object the compile returned, not a copy, so treat them as
279
+ * read-only: a change to them shows in every later read. Null for a request
280
+ * no dry run built, a request that is sent included, and when the agent's
281
+ * strategy records none (of context-manager's own, the autobiographical
282
+ * strategy and the knowledge strategy built on it do).
283
+ */
284
+ getRequestCompileStats(request: object): RenderStats | null;
225
285
  private store;
226
286
  private ownsStore;
227
287
  private stopPromise;
@@ -389,6 +449,10 @@ export declare class AgentFramework {
389
449
  /** Consecutive bounce-wakes per agent; capped so an agent that keeps
390
450
  * emitting unprefixed prose can't wake-loop (notices still append). */
391
451
  private proseBounceStreaks;
452
+ /** Consecutive autoContinue continuations per agent, capped by its
453
+ * maxConsecutive. Cleared when a turn starts with a cause of its own
454
+ * (processInferenceRequests) or a tool ends a turn (skip_reply). */
455
+ private autoContinueStreaks;
392
456
  private pendingAssistantBlocks;
393
457
  /** Streams the FRAMEWORK cancelled for non-terminal reasons, keyed
394
458
  * `${agentName}:${streamId}`: an endTurn tool result or a context-budget
@@ -521,6 +585,12 @@ export declare class AgentFramework {
521
585
  */
522
586
  private deferredScanFrom;
523
587
  private deferredMessages;
588
+ /** The marked held writes whose store couldn't be searched, each with the
589
+ * failure said, said once until a lookup of them succeeds and again when
590
+ * the failure changes (landedCopiesById), and those a drain has said it
591
+ * holds what's queued behind (writeDrainedInOrder). */
592
+ private unsearchableSaid;
593
+ private stillUnknownSaid;
524
594
  private activeTurnTokens;
525
595
  /** Each running scheduler pass's requests, which it took from
526
596
  * pendingRequests: it holds those of the agents it hasn't taken up yet
@@ -624,6 +694,9 @@ export declare class AgentFramework {
624
694
  * ephemeral agents have isolated slots and are their own only readers.
625
695
  */
626
696
  private readonly sharedSlotAgents;
697
+ /** The batched-wake lines already written (placeWakeLines), so every agent a
698
+ * wake was for, and every later start of it, writes each at most once. */
699
+ private readonly placedWakeLines;
627
700
  /** Rounds of tool calls, by their results array, that a save_recent_image
628
701
  * in the round counted by their share of the bound: such a round is
629
702
  * stored by its share whether or not it fits (buildStoredToolResultContent). */
@@ -659,6 +732,21 @@ export declare class AgentFramework {
659
732
  private closingConversationAgents;
660
733
  private codeExecution;
661
734
  private scriptToolWaiters;
735
+ /** A script's call being dispatched, by its call id: what its script was
736
+ * started with, its words' turn and reading. `turnId` is the turn the
737
+ * script was started in, if one was (callingTurnOf); `readThrough` is the
738
+ * consumed watermark its agent had when the run call started it, which a
739
+ * publish the call makes is credited with (publishReadThrough). Kept only
740
+ * while the dispatch runs (dispatchScriptToolCall). */
741
+ private readonly scriptCallStarts;
742
+ /** Per agent, the unexpected thinking drops its last operator alert counted (noteThinkingLoss). */
743
+ private readonly thinkingLossIncidents;
744
+ /** Per live stream that can be noted, its rows so far after the compiled messages (noteRoundSent). */
745
+ private readonly streamRequestNotes;
746
+ /** Per pending round's blocks (pendingAssistantBlocks' value), what membrane held as that round's reply
747
+ * (`roundContent`, its results left out); null where the round has no `roundContent` (XML or fallback). Keyed by
748
+ * the blocks themselves, so it goes wherever they go. */
749
+ private readonly pendingRoundSent;
662
750
  /** Per agent, a round that called code_execution and waits for those calls'
663
751
  * results before its prose is routed (ScriptRound). */
664
752
  private scriptRounds;
@@ -741,6 +829,10 @@ export declare class AgentFramework {
741
829
  /** Host capabilities advertised during the MCP handshake — stored so servers
742
830
  * can be connected at runtime (connectMcplServer) after initialization. */
743
831
  private mcplHostCapabilities;
832
+ /** MCPL RFC-014: every toolHints server's tool presence, for the
833
+ * `toolsets` module's meta-tools and reminders. Made when the first
834
+ * server configured with `toolHints: true` is set up; null until then. */
835
+ private toolsetHub;
744
836
  /** Inference routing policy from FrameworkConfig — stored so the MCPL
745
837
  * subsystem can be lazily initialized by connectMcplServer when the
746
838
  * framework started with zero configured servers. */
@@ -986,7 +1078,8 @@ export declare class AgentFramework {
986
1078
  * a stated 0, as in ProviderWaits: the 1 s floor, plus jitter. */
987
1079
  private accelerationCooldownMs;
988
1080
  /** Whether two requests are one wake, for a provider hold's dedup: the
989
- * same agent, reason, source, time and channel, and the same coalescing
1081
+ * same agent, reason, source, time and channel, on the same server (two
1082
+ * servers' channels can share an id), and the same coalescing
990
1083
  * marks: a batch wake's subject, a batch-only merge's subjects (it has no
991
1084
  * single subject), and the write a wake reads. A wake with any of them
992
1085
  * can be withdrawn or dropped on its own, and must not stand for one
@@ -1254,6 +1347,10 @@ export declare class AgentFramework {
1254
1347
  * a read-write workspace mount without an include for storage). */
1255
1348
  private referenceFetcherInstance?;
1256
1349
  private getReferenceFetcher;
1350
+ /** Configure an MCPL server: its config, for tool routing and the fetcher,
1351
+ * which reads a server's address and credential from it, and its address
1352
+ * in the reference registry, where a reference's stub reads it. */
1353
+ private setMcplServerConfig;
1257
1354
  /** Register every RFC-005 reference in an MCPL peer's tool-result content
1258
1355
  * against its server, then fetch by `mode`:
1259
1356
  * - `register`: nothing. An in-process caller (executeMcplToolCall) may
@@ -1263,13 +1360,18 @@ export declare class AgentFramework {
1263
1360
  * bound, so fetch_reference can fetch it.
1264
1361
  * - `model`: eagerly fetch the ones inside the autofetch envelope (below
1265
1362
  * the eager ceiling, connection origin — never worse than the server
1266
- * having inlined the bytes). Failures are non-fatal: the stub then says
1267
- * fetch_reference instead of a path.
1268
- * - `script`: as `model`, then fetch every reference ("eagerly lazy"): a
1363
+ * having inlined the bytes, for a reference whose claim is true; a fetch
1364
+ * it starts stops reading at the first chunk past that ceiling).
1365
+ * Failures are non-fatal: the stub then says fetch_reference instead of
1366
+ * a path, and the eager default doesn't choose that reference again.
1367
+ * - `script`: as `model`, then fetch every reference but a link ("eagerly lazy"): a
1269
1368
  * script receiving a result is the strongest available signal that the
1270
1369
  * bytes are wanted (scripts process, they do not browse), so the stub it
1271
1370
  * receives carries a workspace path it can open directly.
1272
- * A uri the result calls expired is fetched in no mode. */
1371
+ * A uri the result calls expired is fetched in no mode: by its blocks, or
1372
+ * by `claims` where given, those of everything a script's view of it
1373
+ * shows (scriptViewClaims), nested fields included, as the module
1374
+ * route's demand fetch reads them (Ada-1017, room-203 #201013). */
1273
1375
  private autoFetchReferences;
1274
1376
  /** Core agent_settings keys — extension keys must not collide with these. */
1275
1377
  private static readonly AGENT_SETTINGS_CORE_KEYS;
@@ -1284,6 +1386,74 @@ export declare class AgentFramework {
1284
1386
  private spillSettingsExtension;
1285
1387
  private captureInferenceToolSnapshot;
1286
1388
  private toolResultGuardSettingsExtension;
1389
+ /** Whether the agent wants the note on words that land in a closed channel:
1390
+ * on unless they've turned it off with agent_settings. */
1391
+ private closedChannelNoteOn;
1392
+ private closedChannelNoteSettingsExtension;
1393
+ /** What `who` is told when their words go to a channel that stays closed
1394
+ * because it closed or declined the channel itself (ChannelRegistry
1395
+ * closedByAgent), or undefined where nothing needs saying. Speech also
1396
+ * leaves a channel a module closed as it stands (speechOpens), but there
1397
+ * the module's own tool is the way back. Every other closed channel opens
1398
+ * on speech where this host directs its server's lifecycle, as it always
1399
+ * did, so the agent meets the change here, where speaking used to reopen
1400
+ * what it had closed. The channel is read on the server the words went
1401
+ * to. A channel whose transport is open, as when its server refused the
1402
+ * agent's close, gets none, since its traffic still flows.
1403
+ *
1404
+ * The rest is judged for its reader, as the opened notices' advice is
1405
+ * (channelOpenedNotices). That messages addressing it still reach it is
1406
+ * said where they land in its window: a push, and off a host that routes
1407
+ * conversations a channel's incoming message, is stored with the delivery
1408
+ * agent, where the residents' shared slot is read (residentHoldsTraffic),
1409
+ * and an ephemeral run's window is its own. What a closed channel
1410
+ * delivers beyond those is the connector's (slack-mcpl delivers ambient
1411
+ * traffic by its own subscription), so the note promises only those. One
1412
+ * connector state the host can't see makes that sentence false: a channel
1413
+ * muted with discord-mcpl's mute_channel delivers nothing, messages that
1414
+ * address the agent included. The agent that muted it knows. channel_open
1415
+ * is offered where the reader may call it (canAgentUseTool) and this host
1416
+ * may open the channel: everywhere but a server that's up without
1417
+ * channels.lifecycle (lifecycleWithheld), since a reconnecting server's
1418
+ * grant is empty only until its next exchange, and the note stays in the
1419
+ * window after that. */
1420
+ private closedChannelNoteFor;
1421
+ /** What an agent is told when a send tool's words go to a channel it tuned
1422
+ * out, or undefined where nothing needs saying. A send keeps the tune-out
1423
+ * (ChannelRegistry.openChannelNow), so the agent that sent there expecting
1424
+ * answers learns they still go to its subconscious. A send tool's answer
1425
+ * carries this, send_dm's included, or for a code_execution script's send
1426
+ * a notice in the agent's window: a tune-out diverts a DM too. The same setting
1427
+ * turns it off, a conversation agent gets none, and a failure while
1428
+ * working it out is logged and adds nothing, as for the closed-channel
1429
+ * note. */
1430
+ private tunedOutSendNote;
1431
+ /** How to stop the closed-channel note, said once wherever it appears, to
1432
+ * a reader that may call agent_settings (canAgentUseTool), with the space
1433
+ * before it; nothing to one that may not. */
1434
+ private closedChannelNoteOff;
1435
+ /** The closed-channel notes for an agent's words that landed in these
1436
+ * channels, or none when they've turned the note off. A conversation agent
1437
+ * gets none: channel_open is refused to it and its settings end with its
1438
+ * conversation, so neither what the note offers nor turning it off is its
1439
+ * own, and the resident that owns the channel gets the note for its own
1440
+ * words. The note is advice: if working it out fails, the words were still
1441
+ * delivered, so that's logged and nothing is added. */
1442
+ private closedChannelNotes;
1443
+ /**
1444
+ * A send tool's answer, with the closed-channel note where its words
1445
+ * stayed in a channel the agent closed or declined itself, or the tune-out
1446
+ * line where they went to one it tuned out, after the server's own words:
1447
+ * one more text block where the answer is a list of blocks, or a paragraph
1448
+ * where it's text. A code_execution script's send (`forScript`) keeps the
1449
+ * server's answer alone, since the script parses it, and the agent whose
1450
+ * script sent is told in its own window instead, as a notice. The channel
1451
+ * is the one the send went to on its server (resolveSendTarget), from the
1452
+ * id the send's answer or its call named. The note is advice: if working it
1453
+ * out fails, or the window can't take the notice, that's logged, and the
1454
+ * answer stays as it was.
1455
+ */
1456
+ private noteSendIntoKeptChannel;
1287
1457
  /** Every guard's annotation still running, for stop() (agent-framework #277). */
1288
1458
  private readonly guardAnnotations;
1289
1459
  /** Each guard that isn't idle, by agent name, as the guard reports it. An
@@ -1650,10 +1820,9 @@ export declare class AgentFramework {
1650
1820
  * delegates to `Agent.buildActivationRequest`. No tokens are spent, no
1651
1821
  * external MCPL server is contacted, no fold resolution is persisted and
1652
1822
  * none of the compression its fold plan calls for is queued; the consumed
1653
- * watermark and any prepared budget change are left alone; and once
1654
- * context-manager's thinking binding (context-manager#160, not yet
1655
- * released) ships, no stamps are committed and no compile awaits
1656
- * acceptance. In context-manager 0.14 its dry run leaves nothing else
1823
+ * watermark and any prepared budget change are left alone; and with the
1824
+ * thinking binding (`thinkingBinding.binds`), no binding record is
1825
+ * written. In context-manager 0.14 its dry run leaves nothing else
1657
1826
  * behind but the release of an expired compression hold, as any compile
1658
1827
  * does (see `Agent.compileWithInjections`). The preview keeps in-memory
1659
1828
  * bookkeeping of its own, such as handing the context manager the
@@ -1679,6 +1848,16 @@ export declare class AgentFramework {
1679
1848
  *
1680
1849
  * Pass `{ injections: true }` to opt into full-fidelity gathering and accept
1681
1850
  * those side effects (byte-faithful to a real activation's injected context).
1851
+ * An `afterUser` injection a start would store (stored-injections.ts) is
1852
+ * shown where that start's compile would render it, and one it would skip
1853
+ * isn't shown again; nothing is stored. The stand-in isn't weighed against
1854
+ * the budget or shaped as the stored row would be, so where the strategy
1855
+ * would cap, shard or leave out rows to fit it, the start's request
1856
+ * differs from the preview.
1857
+ *
1858
+ * What the dry compile selected, by kind, is `getRequestCompileStats` of the
1859
+ * request this returns. It doesn't count the stand-in, which is added after
1860
+ * the compile.
1682
1861
  */
1683
1862
  previewActivation(agentName: string, opts?: {
1684
1863
  injections?: boolean;
@@ -1747,11 +1926,21 @@ export declare class AgentFramework {
1747
1926
  getModule(name: string): Module | null;
1748
1927
  /**
1749
1928
  * Add or replace (upsert) a gate policy at runtime. Validated and persisted
1750
- * to gate.json; hot-applied in memory. Throws if no gate is configured or the
1751
- * policy is invalid. Placement: `'prepend'` puts a rule ahead of EVERYTHING
1752
- * (including addressed-message wake rules — see EventGate.lintShadows);
1753
- * `{before: name}` / `{after: name}` anchor it against a specific rule,
1754
- * which is usually what a sampler or debounce actually wants.
1929
+ * to gate.json; hot-applied in memory. Placement: `'prepend'` puts a rule
1930
+ * ahead of EVERYTHING (including addressed-message wake rules — see
1931
+ * EventGate.lintShadows); `{before: name}` / `{after: name}` anchor it
1932
+ * against a specific rule, which is usually what a sampler or debounce
1933
+ * actually wants. Every rule the change doesn't touch is written back as it
1934
+ * was written. Over a gate.json the gate doesn't use, the change is written
1935
+ * only if gate.json then loads, as when it replaces or removes the rule that
1936
+ * keeps it out. Fields the gate reads nowhere, and that aren't a slip of one
1937
+ * it does, are left out, and named to `onIgnoredFields`, called once the
1938
+ * change is made; a throw from it is logged, not thrown. Throws if no gate is
1939
+ * configured, the policy is invalid, the placement can't be made, gate.json
1940
+ * has no rule list a change could edit, it isn't used and the change doesn't
1941
+ * mend it, or it can't be read, isn't JSON or can't be written
1942
+ * (EventGate.addPolicy). A refusal leaves gate.json as it is; a write that
1943
+ * fails after its open may leave it part-written, and its error says so.
1755
1944
  */
1756
1945
  addGatePolicy(rawPolicy: unknown, options?: {
1757
1946
  position?: 'append' | 'prepend' | {
@@ -1759,10 +1948,14 @@ export declare class AgentFramework {
1759
1948
  } | {
1760
1949
  after: string;
1761
1950
  };
1951
+ onIgnoredFields?: (notes: string[]) => void;
1762
1952
  }): import('./gate/types.js').GatePolicy;
1763
1953
  /**
1764
1954
  * Remove a gate policy by name at runtime. Returns false if it didn't exist.
1765
- * Throws if no gate is configured.
1955
+ * Throws if no gate is configured, gate.json has no rule list a change could
1956
+ * edit, it isn't used and the removal doesn't mend it, or it can't be read,
1957
+ * isn't JSON or can't be written (EventGate.removePolicy); the rules in
1958
+ * force then stay as they were.
1766
1959
  */
1767
1960
  removeGatePolicy(name: string): boolean;
1768
1961
  /** Current gate policy names (freshest on-disk view). Empty when no gate. */
@@ -2582,8 +2775,9 @@ export declare class AgentFramework {
2582
2775
  * and keeping the agent registered would just grow every agent scan and
2583
2776
  * broadcast filter forever. Its window is released now, or, while the host
2584
2777
  * is quiesced, at resume (releaseWindowNowOrAfterResume); when stop() ends
2585
- * it then, stop()'s pass for postponed releases passes on the failed
2586
- * replies it left unread instead. No binding names it
2778
+ * it then, stop()'s pass for postponed releases passes on what it left
2779
+ * unread that the primary takes in its place instead (passesToPrimary:
2780
+ * failed replies, channel notices, module writes). No binding names it
2587
2781
  * by then: the idle sweep unbinds its channel as the closure begins,
2588
2782
  * stop() unbinds it just before it ends the fork, and a spawn whose fork
2589
2783
  * stop() has ended binds nothing (spawnConversationAgent). The fork's
@@ -2643,14 +2837,22 @@ export declare class AgentFramework {
2643
2837
  * only that messages addressing the agent reach it whether or not it opens
2644
2838
  * the channel: it is shown only when one has arrived from a closed channel,
2645
2839
  * and both servers deliver them either way. What else arrives is for the
2646
- * server to say on its push. Option 1 says a reply opens the channel,
2647
- * because routeSpeech opens a closed channel before delivering into it. Its
2648
- * old follow-up warning assumed the channel stays closed after the reply,
2649
- * which that open makes false (and on discord-mcpl, channels/open also
2650
- * subscribes). When the surface tracks a missed-ambient tally
2651
- * (discord-mcpl sends `missedMessages`/`missedCharacters` in push origin),
2652
- * the invitation shows the count — the cost of staying out, as a number, at
2653
- * decision time.
2840
+ * server to say on its push. Option 1 says what a reply does, which
2841
+ * speechOpens decides: a reply opens a closed channel nobody decided to keep
2842
+ * closed, and leaves one the agent closed or declined itself closed. What
2843
+ * else reaches the agent from a channel left closed is its server's to say
2844
+ * on its push, so the option says nothing about it. When the surface tracks
2845
+ * a missed-ambient tally (discord-mcpl sends
2846
+ * `missedMessages`/`missedCharacters` in push origin), the invitation shows
2847
+ * the count — the cost of staying out, as a number, at decision time.
2848
+ *
2849
+ * No invitation on a direct message (`chat:dm`): every message of a DM is
2850
+ * addressed, so it reaches the agent open or closed, and there is nothing
2851
+ * to miss or open. A DM registers closed, and stays closed until the agent
2852
+ * answers it, or for good once the agent closes it, so without this a DM
2853
+ * would carry the block. The tag describes the message, not the channel:
2854
+ * a whisper tagged `chat:dm` inside a shared channel that is closed
2855
+ * carries no invitation either.
2654
2856
  */
2655
2857
  private buildClosedChannelInvitation;
2656
2858
  /**
@@ -2740,7 +2942,8 @@ export declare class AgentFramework {
2740
2942
  /** Queue a wake for each agent of the batch's audience, when its latest
2741
2943
  * occurrence triggers inference. `plain`: an ordinary push wake, without
2742
2944
  * the subject a withdrawal of the batch's wakes goes by, for a render
2743
- * placed in its agent's deferred queue (wakeToRead), at `readsDeferredWrite`. */
2945
+ * placed in its agent's deferred queue (wakeToRead), at `readsDeferredWrite`,
2946
+ * marked ambient when every notice the render folds was (`allAmbient`). */
2744
2947
  private queueCoalescedWakes;
2745
2948
  /** Withdraw unstarted wakes whose sole cause is this subject (§4.2). */
2746
2949
  private cancelCoalescedWakes;
@@ -2776,6 +2979,34 @@ export declare class AgentFramework {
2776
2979
  * a fork is that fork's conversation, so no other agent takes it.
2777
2980
  */
2778
2981
  private mayTakeGateRoute;
2982
+ /**
2983
+ * The one channel a wake's channel names: `channelId` on `serverId` when
2984
+ * the wake gives its server, otherwise the one registered channel that id,
2985
+ * or its server-qualified name, means (ChannelRegistry.channelsNamed).
2986
+ * Undefined when it means none or several: channel ids are unique only
2987
+ * within one server's connection (MCPL §14.2), and a name two servers'
2988
+ * channels answer to is never resolved to either.
2989
+ */
2990
+ private channelNamed;
2991
+ /**
2992
+ * Explicit mode's typing channel for one start of a turn, which has no
2993
+ * locus, read once as the start opens (driveStream then shows what the
2994
+ * start showed, TurnRouting.typing): where that start's wake came from,
2995
+ * its trigger's channel with its server (channelNamed), so a start batched
2996
+ * with a new wake shows typing where that wake came from. Not the turn's
2997
+ * trigger channel, which a channel_open moves as the turn's default
2998
+ * outgoing channel. A start whose wake names no one channel, as a budget
2999
+ * restart's or a re-inference's names none, keeps the channel the turn
3000
+ * shows typing in (TurnRouting.typing), showing it again where a stop or
3001
+ * a failed start ended the indicator, since the turn is still at work
3002
+ * there; a turn that has shown none, as a heartbeat's, shows none. A guard
3003
+ * retry's wake is its start's, read again. In a turn that has no channel
3004
+ * (TurnRouting.noChannel), a wake named without its server isn't read: a
3005
+ * retry's trigger names it again, and reading it then could take a
3006
+ * channel the turn never had. A wake that gives its server, as every one
3007
+ * the framework makes for a channel does, names that pair.
3008
+ */
3009
+ private explicitTypingChannel;
2779
3010
  /**
2780
3011
  * Derive the MCPL composite channel id (the outbound routing locus) for a
2781
3012
  * push event from its server-defined `origin`, if it carries one.
@@ -2851,7 +3082,9 @@ export declare class AgentFramework {
2851
3082
  private draftTime;
2852
3083
  /** A draft's opening words, for the drafts tool's listing only. */
2853
3084
  private static draftPreview;
2854
- private static destinationText;
3085
+ /** A destination as the agent is shown it: its label, with its name as
3086
+ * ChannelRegistry.nameShown gives it. */
3087
+ private destinationText;
2855
3088
  /** One line per draft: id, state, when, why, size, preview. */
2856
3089
  private draftLine;
2857
3090
  /** A draft's state in words that claim only what is known. */
@@ -2882,6 +3115,16 @@ export declare class AgentFramework {
2882
3115
  * queue names.
2883
3116
  */
2884
3117
  private noticeUnnoticedDrafts;
3118
+ /**
3119
+ * Turn start, every one: where the agent's history holds neither its
3120
+ * latest direct write to a mount nor the notice of its departure
3121
+ * from it, as after an undo or another move of the store's head away from
3122
+ * that write, the workspace's notice that those writes are still on disk
3123
+ * goes into the history, privately, before the compile, as the drafts
3124
+ * notice does, and the workspace keeps its id (headMoveNotice). On an
3125
+ * unmoved head it finds nothing due and stores nothing.
3126
+ */
3127
+ private noticeHeadMoves;
2885
3128
  /**
2886
3129
  * Logical turn end, after the turn's deferred notices are flushed: record
2887
3130
  * as noticed exactly the drafts a stored message names (the receipt, a
@@ -2921,6 +3164,9 @@ export declare class AgentFramework {
2921
3164
  * drafts. Private to the calling resident. `resend` is an explicit send:
2922
3165
  * each draft is published verbatim, in order, through the normal publish
2923
3166
  * executor, its attempt journaled durably before the request leaves.
3167
+ * `turn` is the turn the call was made in (callingTurnOf), none for a
3168
+ * call made outside the agent's current turn: a resend's destination names
3169
+ * its own channels (ownChannels) by their ids, and its sends engage it.
2924
3170
  */
2925
3171
  private handleDraftsTool;
2926
3172
  /** Why a draft can't be resent now (dismissed, or possibly already posted
@@ -2942,6 +3188,17 @@ export declare class AgentFramework {
2942
3188
  * ([discord-send-failed]); this is the success half.
2943
3189
  */
2944
3190
  private appendProseDeliveryReceipt;
3191
+ /**
3192
+ * The closed-channel note alone, in a send's words, at explicit mode's turn
3193
+ * end, which has no `[delivered]` receipt since the agent named every
3194
+ * destination itself. A `>>` into a channel the agent closed or declined
3195
+ * leaves it closed, so the note goes wherever the turn's speech stayed in
3196
+ * such a channel, once per channel. It goes through addMessage, as the
3197
+ * open notices do: held while the agent has a turn alive and written at
3198
+ * that turn's next boundary, so it reaches the agent once and never
3199
+ * mid-turn. No-op otherwise.
3200
+ */
3201
+ private appendClosedChannelNoteAlone;
2945
3202
  /**
2946
3203
  * Announce-on-change locus notice (turn-frozen routing). Appends a durable
2947
3204
  * `[routing]` window message when the turn's effective outbound locus
@@ -2987,6 +3244,65 @@ export declare class AgentFramework {
2987
3244
  * window's all the same, so it's returned, and a tool boundary injects it.
2988
3245
  */
2989
3246
  private storeDueClock;
3247
+ /**
3248
+ * Store `agent`'s `afterUser` injections in its own window, as the
3249
+ * messages `compile()` would have placed after the last user message, and
3250
+ * return the injections left for `compile()` to place: the rest, and any
3251
+ * that couldn't be stored (stored-injections.ts, #155 part 5). Which are
3252
+ * stored, and which skipped, is planInjectionStores'.
3253
+ *
3254
+ * Nothing is stored while the window is held (slotHeldFrom: the host is
3255
+ * quiesced, or another reader of the residents' shared slot has a turn
3256
+ * alive, as for a clock row): `compile()` places what the plan would have
3257
+ * stored, and what it skips, being in view already, isn't placed again.
3258
+ * Rows are written in the order gathered. A row whose write throws is
3259
+ * placed by `compile()` instead, with every row after it, unless the
3260
+ * read-back shows it landed; where the read-back fails, a row whose write
3261
+ * returned counts as landed and the rest are placed, so the request may
3262
+ * carry a landed one twice, which is logged as unknown.
3263
+ */
3264
+ private storeInjections;
3265
+ /**
3266
+ * Which of `injections` a start stores in `agent`'s window, and which it
3267
+ * leaves for `compile()`. Each source's stored kind (isStoredKind), by
3268
+ * namespace, is one unit. A unit is skipped, neither stored nor placed,
3269
+ * when the copy the agent will read as that namespace's current one has
3270
+ * every part of it with the same content: the newest copy this agent
3271
+ * stored since its last request compiled to send, where a start stored one
3272
+ * and its compile then didn't record, as when it threw
3273
+ * (Agent.unsentInjection), and otherwise the
3274
+ * newest stored unit of that namespace the last request held
3275
+ * (Agent.renderedInjection). It's where the agent saw it, or will see it
3276
+ * at this compile, and placing it again would move it; a fold or scroll-out
3277
+ * since costs one request, as below. A part the strategy cut at its
3278
+ * per-message cap, or stripped an image from, counts as held, since a new
3279
+ * copy would meet the same. One a fold has summarized, a strategy's window
3280
+ * has scrolled past, a throwing write left part-stored, or that no request
3281
+ * since this agent started has held (and no failed start since has
3282
+ * stored), is stored again at the next start,
3283
+ * so the agent has the current copy at the cost of one more row: a fold
3284
+ * between two starts leaves the request after it with the summary's word,
3285
+ * and the start after that stores it again. The rows to store come in the order gathered,
3286
+ * as `compile()` would have placed them. A stored row is appended, so
3287
+ * where the window ends on a user message (a turn's start, a restart
3288
+ * after tool results) it lands where `compile()` would have placed it;
3289
+ * where it ends on the agent's latest reply (a wake with nothing new), it
3290
+ * lands after that reply, where `compile()` placed it after the last user
3291
+ * message, before the reply, or at the end when there was none.
3292
+ * Undefined when there's nothing of the stored kind.
3293
+ */
3294
+ private planInjectionStores;
3295
+ /**
3296
+ * Whether a write the framework makes into `agent`'s window of its own
3297
+ * accord (a clock row, a batched wake's line) waits: while the host is
3298
+ * quiesced, or, for a reader of the residents' shared slot (the
3299
+ * subconscious, which reads it through a merged view, included), while
3300
+ * another reader of it has a turn alive, where it would land inside that
3301
+ * turn.
3302
+ */
3303
+ private slotHeldFrom;
3304
+ /** Rows isNewestIn reads back past clock rows and stored injections. */
3305
+ private static readonly NEWEST_SCAN_ROWS;
2990
3306
  /** Rows a window's last-clock scan reads at a time. */
2991
3307
  private static readonly CLOCK_SCAN_ROWS;
2992
3308
  /** What the next clock is planned from: the window's newest row's time and
@@ -3019,7 +3335,7 @@ export declare class AgentFramework {
3019
3335
  */
3020
3336
  private noteForOtherResidents;
3021
3337
  /**
3022
- * Show the turn's typing indicator in `channelId`, stopping the one it last
3338
+ * Show the turn's typing indicator in `channel`, stopping the one it last
3023
3339
  * showed elsewhere: this stream's, or one an earlier stream of the turn
3024
3340
  * left running when it handed the turn on.
3025
3341
  */
@@ -3053,8 +3369,9 @@ export declare class AgentFramework {
3053
3369
  * when the server next registers the channel), or an open that the agent's
3054
3370
  * own delivery or reply caused (`opened-by-delivery`, `opened-by-reply`),
3055
3371
  * once its transport is confirmed. It names `channel_close` as the opt-out
3056
- * (neither the subscription policy nor the server's default reopens a
3057
- * channel the agent closed) only where the agent it's addressed to can
3372
+ * (neither the agent's own speech there, the subscription policy nor the
3373
+ * server's default reopens a channel the agent closed: speechOpens and
3374
+ * ensureInitialDesiredState) only where the agent it's addressed to can
3058
3375
  * call it for every channel it names (canCloseChannels): a conversation
3059
3376
  * fork may close only its home channel, and an agent's allowedTools can leave
3060
3377
  * channel_close out. The other residents can read it too, where several
@@ -3099,14 +3416,14 @@ export declare class AgentFramework {
3099
3416
  */
3100
3417
  private channelOpenedNotices;
3101
3418
  /**
3102
- * Whether `who` can call channel_close for every one of `channelIds` here:
3419
+ * Whether `who` can call channel_close for every one of `channels` here:
3103
3420
  * its allowedTools hold it (canAgentUseTool), and a conversation fork,
3104
3421
  * whose channel_close dispatchChannelToolCall refuses for any channel but
3105
3422
  * its home, only for its home.
3106
3423
  */
3107
3424
  private canCloseChannels;
3108
3425
  /**
3109
- * Whether `who` holds the traffic of every one of `channelIds`, so that
3426
+ * Whether `who` holds the traffic of every one of `channels`, so that
3110
3427
  * what an open channel delivers is in its window. Where conversations are
3111
3428
  * routed, an incoming message goes to the fork its channel is bound to, or
3112
3429
  * nowhere, and never to the primary (handleMcplChannelIncoming), so a fork
@@ -3208,8 +3525,77 @@ export declare class AgentFramework {
3208
3525
  * a turn abandoned by a quiesce asks for none.
3209
3526
  */
3210
3527
  private requestProseContinuation;
3528
+ /**
3529
+ * autoContinue (AgentConfig.autoContinue): after a turn the model ended
3530
+ * itself (AUTO_CONTINUE_STOP_REASONS), with prose or with nothing, queue
3531
+ * another, unless its last word was a skip (`>>skip_reply`, or a hybrid
3532
+ * `>>>skip_reply` hold still standing). Runs at the logical turn end of a
3533
+ * stream's `complete`, after the turn's deliveries and `[delivered]`
3534
+ * receipt, and only when the turn asked for no ` !` continuation (that one
3535
+ * runs instead). A tool that ends the turn (skip_reply, sleep) never
3536
+ * reaches here, and clears the run's count.
3537
+ *
3538
+ * It continues only an agent that has a way to stop it is offered: the
3539
+ * skip_reply tool, or in explicit/hybrid mode a skip envelope. It leaves
3540
+ * a turn whose closing prose bounced to the bounce, and never continues an
3541
+ * ephemeral run or a conversation fork. The wake names
3542
+ * the turn's locus, or the unresolved channel of a turn that had none, so
3543
+ * the next turn speaks, or doesn't, where this one did; a batched message's
3544
+ * channel outranks it. Its mark (InferenceRequest.autoContinueRun) holds
3545
+ * what the `[continue]` row says, written as the turn starts
3546
+ * (startAgentStream). A run is capped at maxConsecutive; the last allowed
3547
+ * row says so, and the cap holds until a turn starts with a cause of its own.
3548
+ */
3549
+ private autoContinueAfterTurn;
3550
+ /** How an autoContinue agent stops a run, as its `[continue]` row says it,
3551
+ * or undefined when no way is offered: the skip_reply tool when the
3552
+ * channel registry offers it and the agent may call it, else a skip
3553
+ * envelope in explicit or hybrid mode. */
3554
+ private autoContinueStop;
3555
+ /**
3556
+ * Store a continuation's `[continue]` row in the agent's window as its turn
3557
+ * starts (startAgentStream), with the run's count as it stands and the
3558
+ * agent's cap. False when it couldn't be stored.
3559
+ */
3560
+ private writeAutoContinueNotice;
3561
+ /** Whether another reader of the residents' shared slot has a turn alive,
3562
+ * so no row may be written there now (as storeDueClock checks). */
3563
+ private sharedSlotBusy;
3564
+ /** A continuation whose turn doesn't run: the run's count goes back to
3565
+ * what it was before it was queued. */
3566
+ private giveBackAutoContinue;
3211
3567
  /** The agent's routing state for its current turn, made when it has none. */
3212
3568
  private routingOf;
3569
+ /**
3570
+ * A turn's own channels, every channel that has been its trigger or its
3571
+ * locus (TurnRouting.wasIn), so a channel_open or a re-pin adds one and
3572
+ * drops none: a `>>` target, a drafts resend's destination or a channel
3573
+ * tool's name one of them answers to by its id means that channel, on its
3574
+ * server (ChannelRegistry.ownChannelNamed). A tool call takes them only
3575
+ * when it is made inside that turn (callOwnChannels).
3576
+ */
3577
+ private ownChannels;
3578
+ /**
3579
+ * The agent's current turn, where a tool call was made inside it, else
3580
+ * none: a call made outside it, such as a script's left running after its
3581
+ * turn, carries no turn (ToolCall.callerTurnId), and a script's call in a
3582
+ * turn other than the one that started the script isn't that turn's. The
3583
+ * one test for both what a call's names mean (callOwnChannels) and which
3584
+ * turn's routing it may change: a channel_open's move of the trigger and
3585
+ * locus, and the engagement of a send or a drafts resend. Read while the
3586
+ * call is dispatched, since a script's start turn is kept only then.
3587
+ */
3588
+ private callingTurnOf;
3589
+ /** What a publish a call makes is credited with having read
3590
+ * (Agent.notePublished): its agent's consumed watermark at the call, or,
3591
+ * for a script's call, the watermark when the run call started the
3592
+ * script. A script is written then, and a later round's wait that watches
3593
+ * it shares the turn's id but not what the agent has read since, so the
3594
+ * script's words can't answer anything injected after it started. */
3595
+ private publishReadThrough;
3596
+ /** The own channels (ownChannels) of the turn a tool call was made in
3597
+ * (callingTurnOf), and none for a call made outside it. */
3598
+ private callOwnChannels;
3213
3599
  /**
3214
3600
  * Explicit-prose-routing delivery gateway (docs/explicit-prose-routing.md),
3215
3601
  * entered directly: parse the `>>` prefix, resolve the target, deliver, or
@@ -3373,12 +3759,15 @@ export declare class AgentFramework {
3373
3759
  /**
3374
3760
  * Execute a tool call and return the result.
3375
3761
  * Routes to the appropriate handler (module registry or MCPL).
3376
- * Used by SubagentModule to dispatch tool calls for ephemeral agents.
3762
+ * Its one caller in the framework is the operator's puppet
3763
+ * (puppetToolCall), which puts the agent's inline cap on the call as
3764
+ * resultMaxChars; a host may call it as well.
3377
3765
  *
3378
- * This public entry always carries AGENT origin. Ephemeral/promise-based
3379
- * callers are models, and provenance must identify which internal path a
3380
- * call entered through — a public method shared with model callers can
3381
- * never confer module trust, whatever the input claims. Module origin
3766
+ * This public entry always carries AGENT origin. Its callers act for an
3767
+ * agent, the puppet as the agent and a host for the model it runs, and
3768
+ * provenance must identify which internal path a call entered through — a
3769
+ * public method shared with model callers can never confer module trust,
3770
+ * whatever the input claims. Module origin
3382
3771
  * exists only through the private closure handed to ModuleRegistry
3383
3772
  * (ctx.callTool → executeToolCallFrom with {kind:'module'}), which is exempt
3384
3773
  * from agent allowlists. Registered agents' allowedTools is enforced at
@@ -3432,7 +3821,42 @@ export declare class AgentFramework {
3432
3821
  /** puppetToolCall's work, run where stop() can wait for it. */
3433
3822
  private runPuppetToolCall;
3434
3823
  private executeToolCallFrom;
3435
- /** A programmatic call of an MCPL tool: `serverId` and `prefix` as resolveMcplTool matched them. */
3824
+ /**
3825
+ * RFC-014: the calls toolsets--act resolved to a server's dynamic tool,
3826
+ * with the instance each is for (`_meta["mcpl/instance"]`, §5.5). The MCPL
3827
+ * dispatch paths read it: such a call isn't refused as a dynamic tool
3828
+ * called by name, and carries its instance. Nothing else about it differs
3829
+ * from a direct call of the tool. Created on first use, so a framework
3830
+ * assembled field by field (as unit tests do) needs no setup for it.
3831
+ */
3832
+ private toolsetActCalls?;
3833
+ /** A toolsets--act call resolved (resolveAct) to the call of the server's
3834
+ * tool it makes, under that tool's model-facing name and with its
3835
+ * arguments, its id kept; or the reason it can't be sent. */
3836
+ private resolveToolsetAct;
3837
+ /**
3838
+ * RFC-014 §8.2: a toolsets--act call from the agent (the model's, or a
3839
+ * script's) goes down the path a direct call of the server's tool takes
3840
+ * (dispatchMcplToolCall): its agent's allowedTools, the server's tool
3841
+ * policy, the state exchange, RFC-005's reading of the result, the tool
3842
+ * change shown after it, and RFC-007's lifecycle, which describes the call
3843
+ * as that tool, with its arguments, before it opens. Only
3844
+ * `_meta["mcpl/instance"]` is added. A call act can't resolve is refused
3845
+ * before anything is sent.
3846
+ */
3847
+ private dispatchToolsetAct;
3848
+ /**
3849
+ * RFC-014 §6.2: a tool result that goes to the agent, with the tool change
3850
+ * its hints made (applied as the result was read) told after the server's
3851
+ * content; taking it means it isn't told again as a notice. The result
3852
+ * itself when there's none, as for every server without toolHints.
3853
+ */
3854
+ private withToolsetChange;
3855
+ /** A programmatic call of an MCPL tool: `serverId` and `prefix` as
3856
+ * resolveMcplTool matched them, or as toolsets--act resolved them
3857
+ * (toolsetActCalls). Its RFC-014 tool change isn't shown with its result,
3858
+ * which goes to its caller, not necessarily to the agent: it's told as a
3859
+ * notice (ToolsetController.tellUnlessClaimed). */
3436
3860
  private executeMcplToolCall;
3437
3861
  /** Event-pushing wrapper for the model-driven dispatch path. */
3438
3862
  private dispatchCodeExecutionToolCall;
@@ -3481,12 +3905,21 @@ export declare class AgentFramework {
3481
3905
  /** The tools a script of this agent may call now: the agent's own surface, without code_execution. */
3482
3906
  private scriptTools;
3483
3907
  /**
3484
- * The first read-write mount without an include, or null. The framework
3485
- * keeps its own files there (`tool-results/`, `refs/`). A mount with an
3486
- * include holds only the files it names, so it would refuse them, and a
3487
- * setup whose only writable mount has one is treated as having none.
3908
+ * The first read-write mount without an include that isn't configured
3909
+ * direct, or null. The framework keeps its own files there
3910
+ * (`tool-results/`, `refs/`). A mount with an include holds only the files
3911
+ * it names, so it would refuse them, and a setup whose only writable mount
3912
+ * has one, or is direct, is treated as having none.
3488
3913
  */
3489
3914
  private firstWritableMountName;
3915
+ /**
3916
+ * Why firstWritableMountName found no mount, for the words that say so:
3917
+ * none writable without an include, or only mounts configured direct, which
3918
+ * it passes over.
3919
+ */
3920
+ private noFileMountText;
3921
+ /** Whether firstWritableMountName passed over a writable mount without an include because it's configured direct. */
3922
+ private directPassedOver;
3490
3923
  /**
3491
3924
  * A script's word to its agent: a wake_agent() payload, or the ending of a
3492
3925
  * left script that failed, crashed or was stopped at its limit. It enters
@@ -3526,15 +3959,16 @@ export declare class AgentFramework {
3526
3959
  * the image stays reachable by provenance after the bytes leave the wire.
3527
3960
  *
3528
3961
  * The live copy is the stored text itself unless the result is a content
3529
- * array carrying an inline image, which tryNativeToolResultContent sends
3530
- * as native blocks. It takes the same arrays the serializer takes block by
3531
- * block, and shows each image and each reference block's stub whole and
3532
- * each text block up to where it cuts that block at the cap (`maxChars`,
3533
- * toolResultCutAt), so those are the ranges of the text it showed.
3962
+ * array carrying an inline image whose links and markers fit the cap
3963
+ * together (goesNative). Then `live` holds the blocks this text was made
3964
+ * from, which toMembraneToolResult sends as native blocks (nativeContent),
3965
+ * showing each image, stub and marker whole and each text block up to where
3966
+ * it cuts that block at the cap (`maxChars`, toolResultCutAt), so those are
3967
+ * the ranges of the text it showed.
3534
3968
  */
3535
3969
  private storedToolResultText;
3536
3970
  /** Where a tool result labelled `label` is written: `<first writable
3537
- * mount without an include>/tool-results/<label>.txt` (see
3971
+ * mount without an include, not configured direct>/tool-results/<label>.txt` (see
3538
3972
  * firstWritableMountName), or null when there is no such mount. */
3539
3973
  private toolResultFilePlace;
3540
3974
  /**
@@ -3595,7 +4029,9 @@ export declare class AgentFramework {
3595
4029
  * what the model would read: a structured result's blocks as the dispatch
3596
4030
  * gave them (the direct reading, with RFC-005's treatment of an MCPL peer's
3597
4031
  * blocks there, bound to the server that sent them), a module's under
3598
- * history's reading of RFC-005 at every depth (shownToScript), and
4032
+ * history's reading of RFC-005 at every depth (shownToScript), each
4033
+ * reading the claims of everything the script's view shows, nested fields
4034
+ * included (scriptViewClaims), and
3599
4035
  * otherwise one text block of the model's text, which for a failure is its
3600
4036
  * error. A module's is any result whose call the dispatch didn't send to
3601
4037
  * a server (`toServer`, from the call's waiter). `structuredContent` is the
@@ -3617,9 +4053,11 @@ export declare class AgentFramework {
3617
4053
  * RFC-007: with an `origin`, observers see the call as they see a model
3618
4054
  * call (register, dispatch with its refusal sites, open; the terminal at
3619
4055
  * the waiter intercept), under the inner tool's own name and class.
3620
- * `turnId` is the turn the call was made in (dispatchToolCall). `route` is
3621
- * the waiter's: the dispatch sets `toServer` when it sends the call to a
3622
- * server.
4056
+ * `turnId` is the turn the call was made in (dispatchToolCall), the turn
4057
+ * of the run or wait call watching the script; `start` is what the script
4058
+ * was started with, its turn and its agent's reading, which its words
4059
+ * carry (scriptCallStarts). `route` is the waiter's: the dispatch sets
4060
+ * `toServer` when it sends the call to a server.
3623
4061
  */
3624
4062
  private dispatchScriptToolCall;
3625
4063
  /**
@@ -3643,17 +4081,20 @@ export declare class AgentFramework {
3643
4081
  private liveTurns;
3644
4082
  private toMembraneToolResult;
3645
4083
  /**
3646
- * If `data` is an MCP tool-result content array carrying at least one image,
3647
- * convert to Membrane's native ToolResultContentBlock[]. Returns null when
3648
- * the array is text-only (let JSON path handle it; saves a code path).
3649
- * `maxChars`, when provided, caps each accompanying text block so an image
3650
- * inlined alongside an enormous text payload can't blow the context. A
3651
- * block is cut at the cap as the stored copy's cut at that cap is
3652
- * (toolResultCutAt), never inside a slot, so the stored copy can keep
3653
- * exactly the slots this showed (#403); under a readers' bound the stored
3654
- * copy's cut can come earlier (cutStoredToolResultToFit).
3655
- */
3656
- private tryNativeToolResultContent;
4084
+ * A content array's blocks (toolResultBlocks) as Membrane's native
4085
+ * ToolResultContentBlock[], for a caller that found they go natively: at
4086
+ * least one image, with links and markers that fit the cap together
4087
+ * (goesNative), which this doesn't check. Each image as itself, each text block
4088
+ * cut at the cap, and every other block whole, as the text the stored copy
4089
+ * shows for it. `maxChars`, when provided, caps each text block so an image
4090
+ * inlined beside an enormous text payload can't blow the context. A block
4091
+ * is cut as the stored copy is at that cap (toolResultCutAt), never inside a
4092
+ * slot, so the stored copy can keep exactly the slots this showed (#403);
4093
+ * under a readers' bound the stored copy's cut can come earlier
4094
+ * (cutStoredToolResultToFit). Each text is already well formed, as the
4095
+ * stored copy's is (toolResultBlocks).
4096
+ */
4097
+ private nativeContent;
3657
4098
  private toolImageLedgerFor;
3658
4099
  /** Strategy-derived per-message bound (maxMessageTokens * 4 chars). */
3659
4100
  private strategyDerivedToolResultChars;
@@ -3784,6 +4225,61 @@ export declare class AgentFramework {
3784
4225
  private dispatchToolCall;
3785
4226
  private dispatchToolCallEvent;
3786
4227
  private addMessage;
4228
+ /**
4229
+ * Whether an MCPL event's own stored entry is the newest entry in the window
4230
+ * a batched wake's line is written to (deliveryAgent(): the primary's), with
4231
+ * no turn alive there (turnAlive: started, streaming, or waiting on its
4232
+ * tools) and nothing waiting to be written (deferred). The gate then hands
4233
+ * the line to the wake (WakeLine) instead of writing it, and the turn's
4234
+ * start decides it (placeWakeLines). A channel message is found by its
4235
+ * server, channel and message id, a push event by its server and event id.
4236
+ * A message a tune-out holds from the residents is never "newest" here.
4237
+ */
4238
+ private isNewestContextEntry;
4239
+ /**
4240
+ * Write the batched-wake lines the gate left to this turn's start (WakeLine)
4241
+ * into the window they name, the delivery agent's (the residents' shared
4242
+ * slot where it is one), on that agent's own start only. Called by a fresh
4243
+ * start that doesn't resume a logical turn, after the turn's own inputs (a
4244
+ * due clock row, the deferred-write and assembly flushes) and before its
4245
+ * checkpoint, so a line lands after whatever arrived since the gate's
4246
+ * decision, before the notices the turn's start writes itself (the locus
4247
+ * notice among them), and before the agent's answer to the wake.
4248
+ *
4249
+ * - A wake's one line whose event is still the newest entry is left out:
4250
+ * no message follows the wake's, so it is the wake's whole cause, and the
4251
+ * start's token defers an arrival into the window past its request. (The
4252
+ * start's own notices, written after this, aren't messages a reply could
4253
+ * be meant for.)
4254
+ * - A co-resident's start places nothing. Every resident gets every
4255
+ * batched wake, so a co-resident writing the line would put it under the
4256
+ * message, the line #727 left out, or after the delivery agent's answer,
4257
+ * a wake line for a message already answered. Its request shows what the
4258
+ * slot holds, as on `main`: a reply after the message is in the message's
4259
+ * own channel, but a message from another channel that lands between the
4260
+ * gate's decision and its compile follows the message with no line.
4261
+ * - Two or more lines are all written, each naming its message, its age
4262
+ * counted to now.
4263
+ * - None is written while the host is quiesced or another reader of the
4264
+ * slot has a turn alive (slotHeldFrom, as for a clock row): written, a
4265
+ * line would land inside that turn, and deferred, it would wait for the
4266
+ * delivery agent's next boundary, never reaching this request
4267
+ * (overlapping turns in the slot, #286). They stay undecided, and are
4268
+ * written only if another fresh start of the wake comes (a provider
4269
+ * hold's release, a requeue): this start's request goes without them.
4270
+ *
4271
+ * A line left out is traced. Each line is written once (placedWakeLines),
4272
+ * across the wake's retries and holds, whichever copy of its trigger a
4273
+ * start carries: every request for the wake carries the same line. A line
4274
+ * left out, or whose write fails, stays undecided for a later fresh start.
4275
+ */
4276
+ private placeWakeLines;
4277
+ /** Whether `entry`'s own stored entry is the newest in `agent`'s window,
4278
+ * clock rows and stored context injections after it aside: a channel
4279
+ * message by its server, channel and message id, a push event by its
4280
+ * server and event id, and never one a tune-out holds. Past
4281
+ * NEWEST_SCAN_ROWS such rows, it answers no. */
4282
+ private isNewestIn;
3787
4283
  /** Where addMessage delivers: the named agent, else the primary, else the
3788
4284
  * first registered agent. Undefined when there is no such agent. */
3789
4285
  private deliveryAgent;
@@ -3813,25 +4309,13 @@ export declare class AgentFramework {
3813
4309
  * its window (ContextManager.renderAsNewest): cut by the per-message cap,
3814
4310
  * a sharded body joined, and the image limits applied over the batch, so
3815
4311
  * the live stream hears what the next compile sends. An id comes back as
3816
- * null where that compile won't send the message among its newest.
3817
- * Undefined where the strategy has no such hook, or the render threw,
3818
- * which is logged: the boundary then injects what it stored, as it did
3819
- * before strategies could say.
4312
+ * null where the render can't place the message among the newest, and the
4313
+ * boundary injects that one as stored (see the boundary's null). Undefined
4314
+ * where the strategy has no such hook, or the render threw, which is
4315
+ * logged: the boundary then injects what it stored, as it did before
4316
+ * strategies could say.
3820
4317
  */
3821
4318
  private renderForInjection;
3822
- /**
3823
- * Tell the agent of the messages a tool boundary stored and left out of
3824
- * its injection, since the next compile won't send them among its newest:
3825
- * who sent each and its size, and how to read it, `history--extract`
3826
- * around it where the agent is shown that tool, else its id. None of a
3827
- * message's words: the line stands in for a message the live round
3828
- * doesn't carry. A system line, so it's no conversation: it neither
3829
- * re-pins the turn nor clears its send suppression. It names the agent
3830
- * it's for, since every resident sharing the slot reads it too. Returns
3831
- * the notice as stored, for the boundary to inject after the batch, or
3832
- * undefined when it couldn't be stored, which is logged.
3833
- */
3834
- private recordLeftOutNotice;
3835
4319
  /**
3836
4320
  * Write drained entries in queue (seq) order, whatever their targets:
3837
4321
  * residents share one message slot, so the order entries arrived in is the
@@ -3905,11 +4389,15 @@ export declare class AgentFramework {
3905
4389
  * appended later without splitting the body.) Boot's scan for landed
3906
4390
  * writes counts a landed shard the same way. When the store can't be read
3907
4391
  * back (storedCopiesOf logs it), or couldn't say how many messages it held
3908
- * before the write, whether the entry landed is unknown: it's put back
4392
+ * before the write, the store is searched for the entry's id at once
4393
+ * (landedCopiesById): found, it counts as written, as above. When that
4394
+ * can't be done either, whether the entry landed is unknown: it's put back
3909
4395
  * marked so (`landing`), and before it's written again the store is
3910
- * searched for its id (landedCopiesById). Found, it counts as written, as
3911
- * above, at the flush that finds it; not found, it's written; and while
3912
- * the store can't be searched, it stays queued, holding what's behind it.
4396
+ * searched for its id. Found then, it counts as written where it was
4397
+ * stored, ahead of what was stored since without it, a known limit
4398
+ * (context-manager #155, named at the tool boundary's drain); not found,
4399
+ * it's written. While the store can't be searched, it stays queued,
4400
+ * holding what's behind it.
3913
4401
  *
3914
4402
  * Returns what was written (stored, or deferred again by addMessage, whose
3915
4403
  * id is then empty), in queue order: for one target, its entries up to the
@@ -3937,10 +4425,29 @@ export declare class AgentFramework {
3937
4425
  * when the store can't be read back, which is logged under `tag`, naming
3938
4426
  * `what` was written: not the same as nothing found. */
3939
4427
  private storedSince;
3940
- /** The messages carrying `deferredWriteId` anywhere in the agent's store,
3941
- * found by their id (queryMessages, as landedRow finds a held write's),
3942
- * so no position is needed. Undefined when the store can't be searched,
3943
- * which is logged. */
4428
+ /**
4429
+ * The positions on `cm`'s current branch of the messages carrying
4430
+ * `deferredWriteId`, in store order: the whole branch, read in blob-free
4431
+ * windows, so a blob missing from some other message can't make it fail,
4432
+ * as it makes queryMessages fail (every blob on the branch is resolved for
4433
+ * it). Throws when a window can't be read, or holds fewer messages than it
4434
+ * was asked for: a scan that didn't reach every message can't say a write
4435
+ * is absent, and a write taken as absent is stored again.
4436
+ */
4437
+ private landedPositions;
4438
+ /**
4439
+ * The messages carrying `deferredWriteId` anywhere on the agent's current
4440
+ * branch, in store order with their blobs resolved, as a request carries
4441
+ * them, so no position is needed. They're found with queryMessages, over
4442
+ * context-manager's cached view, as landedRow finds a held write's row.
4443
+ * Where that throws, as one blob missing anywhere on the branch makes it
4444
+ * do, the branch is scanned blob-free instead (landedPositions), and only
4445
+ * the rows that match are read with their blobs. Undefined when the store
4446
+ * can be searched neither way, or the scan finds the write's rows but one
4447
+ * of them can't be read. Each write whose lookup fails is said once until
4448
+ * a lookup of it succeeds, since every path that reads held writes looks
4449
+ * again.
4450
+ */
3944
4451
  private landedCopiesById;
3945
4452
  /** The line naming a drained write that threw: one that couldn't be stored,
3946
4453
  * which is already back in the queue; with 'dropped', a malformed refusal
@@ -3981,9 +4488,10 @@ export declare class AgentFramework {
3981
4488
  * A target no longer registered (a fork or a run that has ended, here or
3982
4489
  * before a crash) has no window to land in: a failed reply queued for it,
3983
4490
  * or a channel notice it could have acted on, becomes the primary's
3984
- * by-name notice, under the entry's own id and place in the queue
3985
- * (queuedNoticeForPrimary), and is written with the rest; any other write
3986
- * is dropped, logged, by addMessage. Nothing here reads the gone agent's
4491
+ * by-name notice, and a module's write for a run or a fork goes to it as
4492
+ * written, each under the entry's own id and place in the queue
4493
+ * (passesToPrimary, queuedNoticeForPrimary), written with the rest; any
4494
+ * other write is dropped, logged, by addMessage. Nothing here reads the gone agent's
3987
4495
  * window, so such a notice an earlier write of which landed there, and
3988
4496
  * which the agent read, goes on too. */
3989
4497
  private readdDrained;
@@ -4014,7 +4522,8 @@ export declare class AgentFramework {
4014
4522
  *
4015
4523
  * The agent never reads its window again, so every failed-reply notice it
4016
4524
  * never read, and every channel notice it could act on and never read, is
4017
- * passed to the primary, by name, once (passesToPrimary,
4525
+ * passed to the primary, by name, once, and so is every module write for
4526
+ * it that it never read, as the write itself (passesToPrimary,
4018
4527
  * passOnFromReleasedWindow): each one stored in its window above its
4019
4528
  * consumed watermark (flushed there at its turn's end, or stored while it
4020
4529
  * was idle) and not heard at a tool boundary, and each one still queued
@@ -4045,8 +4554,9 @@ export declare class AgentFramework {
4045
4554
  * The part of a released agent's pass to the primary that its release and
4046
4555
  * stop() share (stop() runs it for a release the quiesce postponed). Each
4047
4556
  * notice stored in its window that it never read and the primary takes in
4048
- * its place (passesToPrimary: a failed reply, or a channel notice its
4049
- * reader could act on) goes on as stored, by name (passNoticeToPrimary),
4557
+ * its place (passesToPrimary: a failed reply, a channel notice its reader
4558
+ * could act on, or a module's write for a run or a fork, which goes as
4559
+ * the write itself) goes on as stored, by name (passNoticeToPrimary),
4050
4560
  * except a copy of an entry for it still in the durable queue, pending or
4051
4561
  * un-acked: that entry is the notice's one identity until its ack, the one
4052
4562
  * boot's check for landed writes knows, so it's the entry that goes on, as
@@ -4067,8 +4577,11 @@ export declare class AgentFramework {
4067
4577
  * What a released agent's window holds that its pass to the primary reads
4068
4578
  * (passOnFromReleasedWindow): `unread`, the notices stored there that it
4069
4579
  * never read and the primary takes in its place (passesToPrimary: its
4070
- * failed replies, and the channel notices it was told it could act on),
4071
- * other than copies of the entries `held` names; and `held`, for each of
4580
+ * failed replies, the channel notices it was told it could act on, and a
4581
+ * run's or a fork's module writes), each with its participant and
4582
+ * content, a sharded body's shards joined into one text, as the
4583
+ * autobiographical strategy joins them (asCompiled), other than
4584
+ * copies of the entries `held` names; and `held`, for each of
4072
4585
  * those entries with a copy there, its copies and whether any of them is
4073
4586
  * unread. A notice is read below the lower of its consumed watermark and
4074
4587
  * the point where the watermark's branch and the current one part
@@ -4102,8 +4615,8 @@ export declare class AgentFramework {
4102
4615
  * deregistered, so its stream can't dispatch anything more and resume
4103
4616
  * doesn't weigh its context, and a write addressed to it meanwhile is
4104
4617
  * treated as for any agent no longer registered (dropped, or passed to the
4105
- * primary if it's a failed reply, or a channel notice its reader could act
4106
- * on).
4618
+ * primary if it's a failed reply, a channel notice its reader could act
4619
+ * on, or a module's write for a run or a fork: passesToPrimary).
4107
4620
  */
4108
4621
  private releaseWindowNowOrAfterResume;
4109
4622
  /** resume(): the windows whose release the quiesce window postponed, each on its own. */
@@ -4138,7 +4651,10 @@ export declare class AgentFramework {
4138
4651
  * The primary's by-name notice in place of one `speaker` never read, and
4139
4652
  * what it's about, as a log line says it: a failed reply's
4140
4653
  * (failedReplyNoticeForPrimary) or a channel notice's
4141
- * (channelNoticeForPrimary). null when no one is told, which is logged
4654
+ * (channelNoticeForPrimary). A module's write for a run or a fork that
4655
+ * it never read (PRIMARY_IF_UNREAD_KEY), given with what was `written`,
4656
+ * goes as the write itself: its participant, its content, and its
4657
+ * metadata without the mark. null when no one is told, which is logged
4142
4658
  * where it's decided.
4143
4659
  */
4144
4660
  private noticeForPrimary;
@@ -4175,11 +4691,34 @@ export declare class AgentFramework {
4175
4691
  */
4176
4692
  private channelForNotice;
4177
4693
  /**
4178
- * A module's write through its context: addMessage's, except that a write
4179
- * the framework holds is answered by its handle (heldHandle) rather than
4180
- * '', so the module can find, read, edit and remove what it wrote before
4181
- * the write lands. The framework's own callers keep the '' they've always
4182
- * had, which their traces and checks take as a write not stored yet.
4694
+ * A channel as the agent is shown it: its label, with the name that picks
4695
+ * it alone (ChannelRegistry.nameShown), which is its id, or, where another
4696
+ * server registers the same id, its server-qualified name; or, for a
4697
+ * channel no string picks alone, its id and its server.
4698
+ */
4699
+ private channelShown;
4700
+ /** A channel named in a notice with the label it was given there: the
4701
+ * label, with its name as ChannelRegistry.nameShown gives it. */
4702
+ private labelledChannel;
4703
+ /**
4704
+ * A module's write through its context (ModuleContext.addMessage):
4705
+ * addMessage's, except that a write the framework holds is answered by its
4706
+ * handle (heldHandle) rather than '', so the module can find, read, edit
4707
+ * and remove what it wrote before the write lands, through getMessage,
4708
+ * editMessage and removeMessage, which read the delivery agent's window: a
4709
+ * handle for a write held for a fork or a sub-agent isn't found there. The
4710
+ * framework's own callers keep the '' they've always had, which their
4711
+ * traces and checks take as a write not stored yet.
4712
+ *
4713
+ * With `forAgent`, the write is for the named agent's window, which must
4714
+ * be registered when the write is made: a name that isn't, or the empty
4715
+ * one, which addMessage would read as none (deliveryAgent), throws, naming
4716
+ * the registered ones, as queryMessages does. The framework's own writes
4717
+ * log and drop instead, as a held write does whose agent is gone by its
4718
+ * flush. A write for an ephemeral run or a conversation fork, whose
4719
+ * window nothing reads after its release, is marked (PRIMARY_IF_UNREAD_KEY),
4720
+ * so the release passes it to the primary if its target never read it,
4721
+ * as it passes a notice (passOnFromReleasedWindow).
4183
4722
  */
4184
4723
  private addModuleMessage;
4185
4724
  /**
@@ -4190,7 +4729,8 @@ export declare class AgentFramework {
4190
4729
  * no module reads that agent's store, and the write waits for its window's
4191
4730
  * release (drainDeferredFor) or, at its flush, is dropped (addMessage), a
4192
4731
  * failed reply, or a channel notice its reader could act on, passing to the
4193
- * primary as its notice (queuedNoticeForPrimary).
4732
+ * primary as its notice, and a module's write for a run as written
4733
+ * (passesToPrimary, queuedNoticeForPrimary).
4194
4734
  */
4195
4735
  private heldWritesFor;
4196
4736
  /**
@@ -4212,10 +4752,11 @@ export declare class AgentFramework {
4212
4752
  * Settle held writes whose landing is unknown (DeferredWrite.landing),
4213
4753
  * among those `which` picks, before a path reads or changes held writes:
4214
4754
  * each is looked up by its id in its target's store (landedCopiesById).
4215
- * Found, the write landed (settleFound). Not found, the mark goes, and
4216
- * it's an ordinary held write, which is persisted as an edit is. Where the
4217
- * store can't be searched, it stays marked, a doubt each path reads by its
4218
- * own rule.
4755
+ * Found, the write landed (settleFound), where its copy sits, a known
4756
+ * limit (writeDrainedInOrder). Not found, the mark goes, and it's an
4757
+ * ordinary held write, which is persisted as an edit is. Where the store
4758
+ * can't be searched, it stays marked, a doubt each path reads by its own
4759
+ * rule.
4219
4760
  */
4220
4761
  private settleUnknownLandings;
4221
4762
  /**
@@ -4236,7 +4777,8 @@ export declare class AgentFramework {
4236
4777
  * that write's copy, so the write landed, and it's settled as found
4237
4778
  * (settleFound) before the row is read or changed. A lookup by the id
4238
4779
  * can't be needed then, so this holds where the store can't be searched
4239
- * too.
4780
+ * too. One row of a sharded body says it's a shard, without a count,
4781
+ * since one row doesn't tell how many landed.
4240
4782
  */
4241
4783
  private settleByCopy;
4242
4784
  /** A held write whose landing stays unknown after settling, its store
@@ -4244,21 +4786,43 @@ export declare class AgentFramework {
4244
4786
  * changing only the queued entry could leave its stored copy as it was.
4245
4787
  * Throws with nothing changed. */
4246
4788
  private refuseUnsettled;
4247
- /** Whether the agent has nothing left to read of a deferred write, on
4248
- * evidence only: the row it landed as is at or below the agent's consumed
4249
- * watermark on its current branch, or it's in neither the queue (drained
4250
- * entries not yet stored included) nor the store's current branch:
4251
- * removed, or left on a branch the agent has switched from, where a turn
4252
- * now would find nothing of it (switching back brings it back unread,
4253
- * with no wake, as main's wake spent on this branch leaves it). Any doubt
4254
- * reads as unread, such as a watermark that a branch switch or an undo
4255
- * left on another branch, or a store that can't be read: a turn that
4256
- * finds nothing new costs less than a write no wake brings the agent to
4257
- * read. */
4258
- private deferredWriteReadOrGone;
4789
+ /** Whether a wake for a deferred write has nothing left for the agent to
4790
+ * do, on evidence only. The write's row is at or below the newest
4791
+ * consumed watermark of an answered request (Agent.getAnsweredWatermark)
4792
+ * on the agent's current branch, and for a wake that carries a channel
4793
+ * and wasn't marked ambient (`to`, that channel on the wake's server), the
4794
+ * agent has since published there having read the row
4795
+ * (Agent.publishedAfterReading): hearing a message isn't answering it,
4796
+ * and the wake's turn is the agent's chance to answer there. Or the
4797
+ * write is in neither the queue (drained entries not yet stored
4798
+ * included) nor the store's current branch: removed, or left on a
4799
+ * branch the agent has switched from, where a turn now would find
4800
+ * nothing of it (switching back brings it back unread, with no wake, as
4801
+ * main's wake spent on this branch leaves it). Any doubt keeps the
4802
+ * wake, such as a watermark that a branch switch or an undo left on
4803
+ * another branch, or a store that can't be read: a turn that finds
4804
+ * nothing new costs less than a write no wake brings the agent to read
4805
+ * or answer. */
4806
+ private deferredWriteDone;
4807
+ /** The mark a wake for `agentName` takes for the write it was queued with
4808
+ * (`placement`, addMessage's out-param): set only when that write was
4809
+ * deferred for that agent, since a stored write's wake starts the turn
4810
+ * that reads it. The scheduler drops the wake once the write needs
4811
+ * nothing more of the agent (deferredWriteDone). */
4812
+ private readsDeferredFor;
4259
4813
  private editMessage;
4260
4814
  private removeMessage;
4261
4815
  private getMessage;
4816
+ /** The refusal of a module's `forAgent` that names no registered agent:
4817
+ * the name, cut at 120 characters; the registered ones, a list over 400
4818
+ * characters cut with how many there are; and what leaving forAgent out
4819
+ * does. With none registered, there's no window either way, and it says
4820
+ * so. */
4821
+ private unknownAgentError;
4822
+ /** A module's query (ModuleContext.queryMessages): the delivery agent's
4823
+ * window (the primary's, or the first agent's when none is primary), or
4824
+ * the named agent's, which must be registered: an unknown name, or the
4825
+ * empty one, throws, naming the registered ones, as a write's does. */
4262
4826
  private queryMessages;
4263
4827
  private createFrameworkState;
4264
4828
  private emitTrace;
@@ -4317,6 +4881,41 @@ export declare class AgentFramework {
4317
4881
  * failures.log + ops:alert trace + CONNECTOME_OPS_WEBHOOK.
4318
4882
  */
4319
4883
  notifyOps(kind: string, agentName: string, message: string, data?: Record<string, unknown>): void;
4884
+ /**
4885
+ * Tells the context manager what a stream's later round carries after its compiled messages: every round so far,
4886
+ * in sent order, with the round's own rows appended (roundRows): each stored row's id where the next request will
4887
+ * carry it as the stream sent it, the marker where it won't. A request-only row (a heartbeat tick, a `[Continue]`)
4888
+ * isn't a row here: the next request puts it back in the same place (renderRequestOnlyRows), and no compile holds
4889
+ * it. A round with no `roundContent` (membrane's XML or fallback path, where the stored reply is the framework's
4890
+ * rebuild) can't be vouched for, so nothing more of the stream is noted, and its later rounds' thinking is left
4891
+ * out at the next compile rather than refused. So is a stream whose note threw or wrote nothing (noteStreamRows).
4892
+ */
4893
+ private noteRoundSent;
4894
+ /**
4895
+ * At the stream's end, after its last reply is stored: every row so far, judged as of now, with that reply as the
4896
+ * final row (or none, where the stream's last request had no reply after it). Past the record's end nothing
4897
+ * keeps its thinking, so the last reply keeps its own only by being noted here. Judged as of now, a batch the
4898
+ * tool-result guard held at its boundary and has since settled to the originals is named. A reply with no
4899
+ * `roundContent` to vouch for ends noting instead, as a round's does.
4900
+ */
4901
+ private noteStreamEnd;
4902
+ /**
4903
+ * Every row so far, judged as of now (roundRows), noted. A note the context manager writes nothing for (false)
4904
+ * ends the stream's notes, with a line saying so: where the stream's compile no longer wrote the branch's record, or
4905
+ * the branch has none, no later note could write either; where its store failed, a later one might, and stopping
4906
+ * gives that up for this stream's later rounds, whose thinking then goes at the next compile, as it would have
4907
+ * after the failed write. A note that throws is a fault, and ends them too.
4908
+ */
4909
+ private noteStreamRows;
4910
+ /**
4911
+ * A call's dropped blocks, placed, against the branch's binding-record start (splitThinkingDrops). Replies stored at
4912
+ * or below it may lose their thinking with no strip having missed, since the context manager recorded nothing they
4913
+ * were sent under, and so may any block for a binding the record doesn't track (the account's). Any other drop is
4914
+ * one the record doesn't account for: a change ahead of it that the record didn't see. The operators hear of it
4915
+ * once per incident, again only if a call shows more, and the incident ends at a call that shows no unexpected drop
4916
+ * (ThinkingLossIncidents).
4917
+ */
4918
+ private noteThinkingLoss;
4320
4919
  private opsAlert;
4321
4920
  /**
4322
4921
  * Record a model refusal for observability: per-agent stats + a
@@ -4561,6 +5160,32 @@ export declare class AgentFramework {
4561
5160
  * logged here rather than replacing the failure the connect reports.
4562
5161
  */
4563
5162
  private closeFailedRuntimeConnect;
5163
+ /**
5164
+ * The host capabilities offered to one server: the host's own, plus
5165
+ * RFC-014's `toolHints` where its configuration asks for them. Without it,
5166
+ * the very object every server is offered.
5167
+ */
5168
+ private mcplHostCapabilitiesFor;
5169
+ /** RFC-014: every toolHints server's presence, made on first use. */
5170
+ private toolsets;
5171
+ /** RFC-014: the `toolsets` module (toolsets--open, --act, --look,
5172
+ * --close), registered once, by the first server configured with
5173
+ * toolHints. Its tools don't change after that. */
5174
+ private ensureToolsetsModule;
5175
+ /** RFC-014 §5.3: after a (re)connect whose policy has settled, read what
5176
+ * the server holds open and adopt it. In the background: its notices are
5177
+ * written as they come. */
5178
+ private reattachToolsets;
5179
+ /**
5180
+ * RFC-014 §8.3: a tool change with no result or event to ride on (a
5181
+ * standalone tools/hints, a late result, a reconnect's adoption, a
5182
+ * recovery) is told as a notice, which doesn't wake the agent. Like any
5183
+ * delivery from a server into the conversation, it needs `pushEvents`
5184
+ * (§6.1); without it the change is still tracked, and toolsets--look shows
5185
+ * it. The text is the server's (its tool definitions, titles, reasons), so
5186
+ * the notice names the server.
5187
+ */
5188
+ private recordToolsetNotice;
4564
5189
  /**
4565
5190
  * Connect a single MCPL server: register routing entries, open the
4566
5191
  * connection, wire events, and initialize feature sets / scopes /
@@ -4983,8 +5608,8 @@ export declare class AgentFramework {
4983
5608
  * Handle the synthesized `read_image` tool: read image bytes from a
4984
5609
  * workspace mount and return them as a native MCP-shaped content array
4985
5610
  * (`[{type:'text'…},{type:'image', data, mimeType}]`). The live-turn
4986
- * converter (tryNativeToolResultContent → membrane tool_result image
4987
- * blocks) delivers the actual image to the model; history storage keeps
5611
+ * converter (toMembraneToolResult's nativeContent → membrane tool_result
5612
+ * image blocks) delivers the actual image to the model; history storage keeps
4988
5613
  * the standard compact `[image: …]` placeholder.
4989
5614
  */
4990
5615
  /** RFC-005 on-demand dereference: [ref id] → workspace file, via the
@@ -5021,9 +5646,10 @@ export declare class AgentFramework {
5021
5646
  */
5022
5647
  private dispatchSaveImageToolCall;
5023
5648
  /** The `utils` meta-tool: list/describe/run over module utilities
5024
- * (Module.getUtilities). Shared by the model-facing dispatcher and the
5025
- * programmatic path (executeToolCall), so code_execution scripts and
5026
- * ephemerals reach utilities too. */
5649
+ * (Module.getUtilities). Shared by the model-facing dispatcher, which a
5650
+ * running code_execution script's calls take too, and executeToolCallFrom,
5651
+ * which the puppet and a host reach through executeToolCall and a module
5652
+ * through callTool. */
5027
5653
  private handleUtilsToolCall;
5028
5654
  private dispatchUtilsToolCall;
5029
5655
  private dispatchAgentSettingsToolCall;
@@ -5032,6 +5658,10 @@ export declare class AgentFramework {
5032
5658
  private buildEventTagsResult;
5033
5659
  private dispatchEventTagsToolCall;
5034
5660
  private dispatchGateToolCall;
5661
+ /** The channel context one server is told for an agent's inference
5662
+ * (context/beforeInference, §14.4): only that server's own channels
5663
+ * (ChannelRegistry.buildChannelContext). */
5664
+ private channelsForServer;
5035
5665
  private buildBeforeInferenceParams;
5036
5666
  }
5037
5667
  export {};