@animalabs/agent-framework 0.31.0 → 0.33.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 (298) hide show
  1. package/README.md +204 -14
  2. package/dist/src/admission/admit.d.ts +18 -0
  3. package/dist/src/admission/admit.d.ts.map +1 -1
  4. package/dist/src/admission/admit.js +16 -3
  5. package/dist/src/admission/admit.js.map +1 -1
  6. package/dist/src/agent.d.ts +185 -78
  7. package/dist/src/agent.d.ts.map +1 -1
  8. package/dist/src/agent.js +279 -102
  9. package/dist/src/agent.js.map +1 -1
  10. package/dist/src/api/mcp-server-core.d.ts.map +1 -1
  11. package/dist/src/api/mcp-server-core.js +50 -12
  12. package/dist/src/api/mcp-server-core.js.map +1 -1
  13. package/dist/src/api/server.d.ts.map +1 -1
  14. package/dist/src/api/server.js +4 -20
  15. package/dist/src/api/server.js.map +1 -1
  16. package/dist/src/code-execution/isolate/scripts.d.ts +12 -8
  17. package/dist/src/code-execution/isolate/scripts.d.ts.map +1 -1
  18. package/dist/src/code-execution/isolate/scripts.js +24 -0
  19. package/dist/src/code-execution/isolate/scripts.js.map +1 -1
  20. package/dist/src/config-checks.d.ts +7 -0
  21. package/dist/src/config-checks.d.ts.map +1 -1
  22. package/dist/src/config-checks.js +14 -0
  23. package/dist/src/config-checks.js.map +1 -1
  24. package/dist/src/context-manager-errors.d.ts +25 -0
  25. package/dist/src/context-manager-errors.d.ts.map +1 -0
  26. package/dist/src/context-manager-errors.js +31 -0
  27. package/dist/src/context-manager-errors.js.map +1 -0
  28. package/dist/src/context-options.d.ts +67 -0
  29. package/dist/src/context-options.d.ts.map +1 -0
  30. package/dist/src/context-options.js +85 -0
  31. package/dist/src/context-options.js.map +1 -0
  32. package/dist/src/deferred-import.d.ts +93 -0
  33. package/dist/src/deferred-import.d.ts.map +1 -0
  34. package/dist/src/deferred-import.js +177 -0
  35. package/dist/src/deferred-import.js.map +1 -0
  36. package/dist/src/dendrite/audience.d.ts +223 -0
  37. package/dist/src/dendrite/audience.d.ts.map +1 -0
  38. package/dist/src/dendrite/audience.js +202 -0
  39. package/dist/src/dendrite/audience.js.map +1 -0
  40. package/dist/src/dendrite/index.d.ts +5 -3
  41. package/dist/src/dendrite/index.d.ts.map +1 -1
  42. package/dist/src/dendrite/index.js +2 -1
  43. package/dist/src/dendrite/index.js.map +1 -1
  44. package/dist/src/dendrite/presets.d.ts +10 -5
  45. package/dist/src/dendrite/presets.d.ts.map +1 -1
  46. package/dist/src/dendrite/presets.js +17 -5
  47. package/dist/src/dendrite/presets.js.map +1 -1
  48. package/dist/src/dendrite/registry.d.ts +62 -7
  49. package/dist/src/dendrite/registry.d.ts.map +1 -1
  50. package/dist/src/dendrite/registry.js +179 -10
  51. package/dist/src/dendrite/registry.js.map +1 -1
  52. package/dist/src/dendrite/types.d.ts +91 -8
  53. package/dist/src/dendrite/types.d.ts.map +1 -1
  54. package/dist/src/foreign-rounds.d.ts +69 -0
  55. package/dist/src/foreign-rounds.d.ts.map +1 -0
  56. package/dist/src/foreign-rounds.js +152 -0
  57. package/dist/src/foreign-rounds.js.map +1 -0
  58. package/dist/src/framework.d.ts +1977 -820
  59. package/dist/src/framework.d.ts.map +1 -1
  60. package/dist/src/framework.js +7571 -3457
  61. package/dist/src/framework.js.map +1 -1
  62. package/dist/src/gate/event-gate.d.ts +85 -15
  63. package/dist/src/gate/event-gate.d.ts.map +1 -1
  64. package/dist/src/gate/event-gate.js +421 -47
  65. package/dist/src/gate/event-gate.js.map +1 -1
  66. package/dist/src/gate/index.d.ts +1 -1
  67. package/dist/src/gate/index.d.ts.map +1 -1
  68. package/dist/src/gate/index.js.map +1 -1
  69. package/dist/src/gate/rule-scope.d.ts +30 -0
  70. package/dist/src/gate/rule-scope.d.ts.map +1 -0
  71. package/dist/src/gate/rule-scope.js +41 -0
  72. package/dist/src/gate/rule-scope.js.map +1 -0
  73. package/dist/src/gate/suppress-script-worker.d.ts +2 -0
  74. package/dist/src/gate/suppress-script-worker.d.ts.map +1 -0
  75. package/dist/src/gate/suppress-script-worker.js +103 -0
  76. package/dist/src/gate/suppress-script-worker.js.map +1 -0
  77. package/dist/src/gate/suppress-scripts.d.ts +105 -0
  78. package/dist/src/gate/suppress-scripts.d.ts.map +1 -0
  79. package/dist/src/gate/suppress-scripts.js +403 -0
  80. package/dist/src/gate/suppress-scripts.js.map +1 -0
  81. package/dist/src/gate/suppression-review.d.ts +143 -0
  82. package/dist/src/gate/suppression-review.d.ts.map +1 -0
  83. package/dist/src/gate/suppression-review.js +463 -0
  84. package/dist/src/gate/suppression-review.js.map +1 -0
  85. package/dist/src/gate/suppression-stats.d.ts +125 -0
  86. package/dist/src/gate/suppression-stats.d.ts.map +1 -0
  87. package/dist/src/gate/suppression-stats.js +214 -0
  88. package/dist/src/gate/suppression-stats.js.map +1 -0
  89. package/dist/src/gate/types.d.ts +135 -7
  90. package/dist/src/gate/types.d.ts.map +1 -1
  91. package/dist/src/gate/wake-onboarding.d.ts +119 -0
  92. package/dist/src/gate/wake-onboarding.d.ts.map +1 -0
  93. package/dist/src/gate/wake-onboarding.js +277 -0
  94. package/dist/src/gate/wake-onboarding.js.map +1 -0
  95. package/dist/src/held-writes.d.ts +31 -23
  96. package/dist/src/held-writes.d.ts.map +1 -1
  97. package/dist/src/held-writes.js +44 -59
  98. package/dist/src/held-writes.js.map +1 -1
  99. package/dist/src/index.d.ts +5 -2
  100. package/dist/src/index.d.ts.map +1 -1
  101. package/dist/src/index.js +3 -0
  102. package/dist/src/index.js.map +1 -1
  103. package/dist/src/jsonrpc-envelope.d.ts +69 -0
  104. package/dist/src/jsonrpc-envelope.d.ts.map +1 -0
  105. package/dist/src/jsonrpc-envelope.js +66 -0
  106. package/dist/src/jsonrpc-envelope.js.map +1 -0
  107. package/dist/src/mcpl/channel-registry.d.ts +131 -15
  108. package/dist/src/mcpl/channel-registry.d.ts.map +1 -1
  109. package/dist/src/mcpl/channel-registry.js +290 -46
  110. package/dist/src/mcpl/channel-registry.js.map +1 -1
  111. package/dist/src/mcpl/checkpoint-manager.d.ts +2 -4
  112. package/dist/src/mcpl/checkpoint-manager.d.ts.map +1 -1
  113. package/dist/src/mcpl/checkpoint-manager.js.map +1 -1
  114. package/dist/src/mcpl/feature-set-manager.d.ts +2 -4
  115. package/dist/src/mcpl/feature-set-manager.d.ts.map +1 -1
  116. package/dist/src/mcpl/feature-set-manager.js.map +1 -1
  117. package/dist/src/mcpl/inbound-source.d.ts +2 -1
  118. package/dist/src/mcpl/inbound-source.d.ts.map +1 -1
  119. package/dist/src/mcpl/inbound-source.js +2 -1
  120. package/dist/src/mcpl/inbound-source.js.map +1 -1
  121. package/dist/src/mcpl/inference-router.d.ts +6 -6
  122. package/dist/src/mcpl/inference-router.d.ts.map +1 -1
  123. package/dist/src/mcpl/inference-router.js.map +1 -1
  124. package/dist/src/mcpl/push-coalescer.d.ts +132 -22
  125. package/dist/src/mcpl/push-coalescer.d.ts.map +1 -1
  126. package/dist/src/mcpl/push-coalescer.js +105 -15
  127. package/dist/src/mcpl/push-coalescer.js.map +1 -1
  128. package/dist/src/mcpl/push-handler.d.ts +9 -7
  129. package/dist/src/mcpl/push-handler.d.ts.map +1 -1
  130. package/dist/src/mcpl/push-handler.js.map +1 -1
  131. package/dist/src/mcpl/server-connection.d.ts +13 -10
  132. package/dist/src/mcpl/server-connection.d.ts.map +1 -1
  133. package/dist/src/mcpl/server-connection.js +134 -56
  134. package/dist/src/mcpl/server-connection.js.map +1 -1
  135. package/dist/src/mcpl/tool-classes.d.ts.map +1 -1
  136. package/dist/src/mcpl/tool-classes.js +3 -0
  137. package/dist/src/mcpl/tool-classes.js.map +1 -1
  138. package/dist/src/mcpl/types.d.ts +8 -2
  139. package/dist/src/mcpl/types.d.ts.map +1 -1
  140. package/dist/src/mcpl/types.js.map +1 -1
  141. package/dist/src/module-registry.d.ts +24 -1
  142. package/dist/src/module-registry.d.ts.map +1 -1
  143. package/dist/src/module-registry.js +68 -18
  144. package/dist/src/module-registry.js.map +1 -1
  145. package/dist/src/modules/discord/index.d.ts +45 -8
  146. package/dist/src/modules/discord/index.d.ts.map +1 -1
  147. package/dist/src/modules/discord/index.js +237 -86
  148. package/dist/src/modules/discord/index.js.map +1 -1
  149. package/dist/src/modules/history/index.d.ts +59 -0
  150. package/dist/src/modules/history/index.d.ts.map +1 -1
  151. package/dist/src/modules/history/index.js +432 -67
  152. package/dist/src/modules/history/index.js.map +1 -1
  153. package/dist/src/modules/history/semantic.d.ts +6 -5
  154. package/dist/src/modules/history/semantic.d.ts.map +1 -1
  155. package/dist/src/modules/history/semantic.js +15 -22
  156. package/dist/src/modules/history/semantic.js.map +1 -1
  157. package/dist/src/modules/workspace/disk-agreement.d.ts +1 -1
  158. package/dist/src/modules/workspace/disk-agreement.js +1 -1
  159. package/dist/src/modules/workspace/index.d.ts +28 -7
  160. package/dist/src/modules/workspace/index.d.ts.map +1 -1
  161. package/dist/src/modules/workspace/index.js +76 -22
  162. package/dist/src/modules/workspace/index.js.map +1 -1
  163. package/dist/src/notice-tags.d.ts +10 -1
  164. package/dist/src/notice-tags.d.ts.map +1 -1
  165. package/dist/src/notice-tags.js +10 -1
  166. package/dist/src/notice-tags.js.map +1 -1
  167. package/dist/src/operator-log.d.ts +36 -3
  168. package/dist/src/operator-log.d.ts.map +1 -1
  169. package/dist/src/operator-log.js +2 -2
  170. package/dist/src/operator-log.js.map +1 -1
  171. package/dist/src/presentation.d.ts +746 -0
  172. package/dist/src/presentation.d.ts.map +1 -0
  173. package/dist/src/presentation.js +1435 -0
  174. package/dist/src/presentation.js.map +1 -0
  175. package/dist/src/prose-drafts.d.ts +15 -11
  176. package/dist/src/prose-drafts.d.ts.map +1 -1
  177. package/dist/src/prose-drafts.js +16 -12
  178. package/dist/src/prose-drafts.js.map +1 -1
  179. package/dist/src/read-marks.d.ts +192 -0
  180. package/dist/src/read-marks.d.ts.map +1 -0
  181. package/dist/src/read-marks.js +242 -0
  182. package/dist/src/read-marks.js.map +1 -0
  183. package/dist/src/recovery/offline-branch.d.ts +91 -6
  184. package/dist/src/recovery/offline-branch.d.ts.map +1 -1
  185. package/dist/src/recovery/offline-branch.js +273 -29
  186. package/dist/src/recovery/offline-branch.js.map +1 -1
  187. package/dist/src/recovery/recover-cli.js +22 -3
  188. package/dist/src/recovery/recover-cli.js.map +1 -1
  189. package/dist/src/send-tools.d.ts +5 -9
  190. package/dist/src/send-tools.d.ts.map +1 -1
  191. package/dist/src/send-tools.js +40 -7
  192. package/dist/src/send-tools.js.map +1 -1
  193. package/dist/src/stored-injections.d.ts +2 -2
  194. package/dist/src/stored-injections.js +2 -2
  195. package/dist/src/stored-removal.d.ts +17 -4
  196. package/dist/src/stored-removal.d.ts.map +1 -1
  197. package/dist/src/stored-removal.js +29 -5
  198. package/dist/src/stored-removal.js.map +1 -1
  199. package/dist/src/tool-result-guard.d.ts +12 -1
  200. package/dist/src/tool-result-guard.d.ts.map +1 -1
  201. package/dist/src/tool-result-guard.js +42 -8
  202. package/dist/src/tool-result-guard.js.map +1 -1
  203. package/dist/src/tune-out/coordinator.d.ts +1159 -79
  204. package/dist/src/tune-out/coordinator.d.ts.map +1 -1
  205. package/dist/src/tune-out/coordinator.js +3709 -363
  206. package/dist/src/tune-out/coordinator.js.map +1 -1
  207. package/dist/src/tune-out/tools.d.ts +114 -17
  208. package/dist/src/tune-out/tools.d.ts.map +1 -1
  209. package/dist/src/tune-out/tools.js +87 -27
  210. package/dist/src/tune-out/tools.js.map +1 -1
  211. package/dist/src/tune-out/window-anchor.d.ts +143 -0
  212. package/dist/src/tune-out/window-anchor.d.ts.map +1 -0
  213. package/dist/src/tune-out/window-anchor.js +202 -0
  214. package/dist/src/tune-out/window-anchor.js.map +1 -0
  215. package/dist/src/types/agent.d.ts +86 -31
  216. package/dist/src/types/agent.d.ts.map +1 -1
  217. package/dist/src/types/events.d.ts +2 -0
  218. package/dist/src/types/events.d.ts.map +1 -1
  219. package/dist/src/types/framework.d.ts +43 -21
  220. package/dist/src/types/framework.d.ts.map +1 -1
  221. package/dist/src/types/module.d.ts +180 -69
  222. package/dist/src/types/module.d.ts.map +1 -1
  223. package/dist/src/types/trace.d.ts +510 -36
  224. package/dist/src/types/trace.d.ts.map +1 -1
  225. package/package.json +3 -3
  226. package/src/admission/admit.ts +32 -3
  227. package/src/agent.ts +323 -120
  228. package/src/api/mcp-server-core.ts +54 -17
  229. package/src/api/server.ts +4 -23
  230. package/src/code-execution/isolate/scripts.ts +28 -3
  231. package/src/config-checks.ts +14 -0
  232. package/src/context-manager-errors.ts +37 -0
  233. package/src/context-options.ts +96 -0
  234. package/src/deferred-import.ts +239 -0
  235. package/src/dendrite/audience.ts +315 -0
  236. package/src/dendrite/index.ts +14 -2
  237. package/src/dendrite/presets.ts +18 -6
  238. package/src/dendrite/registry.ts +209 -12
  239. package/src/dendrite/types.ts +92 -8
  240. package/src/foreign-rounds.ts +199 -0
  241. package/src/framework.ts +7814 -3585
  242. package/src/gate/event-gate.ts +428 -65
  243. package/src/gate/index.ts +3 -0
  244. package/src/gate/rule-scope.ts +45 -0
  245. package/src/gate/suppress-script-worker.ts +89 -0
  246. package/src/gate/suppress-scripts.ts +414 -0
  247. package/src/gate/suppression-review.ts +517 -0
  248. package/src/gate/suppression-stats.ts +314 -0
  249. package/src/gate/types.ts +141 -7
  250. package/src/gate/wake-onboarding.ts +309 -0
  251. package/src/held-writes.ts +49 -60
  252. package/src/index.ts +9 -2
  253. package/src/jsonrpc-envelope.ts +81 -0
  254. package/src/mcpl/channel-registry.ts +353 -85
  255. package/src/mcpl/checkpoint-manager.ts +3 -2
  256. package/src/mcpl/feature-set-manager.ts +2 -1
  257. package/src/mcpl/inbound-source.ts +2 -1
  258. package/src/mcpl/inference-router.ts +7 -4
  259. package/src/mcpl/push-coalescer.ts +193 -34
  260. package/src/mcpl/push-handler.ts +10 -5
  261. package/src/mcpl/server-connection.ts +141 -60
  262. package/src/mcpl/tool-classes.ts +3 -0
  263. package/src/mcpl/types.ts +8 -2
  264. package/src/module-registry.ts +73 -17
  265. package/src/modules/discord/index.ts +229 -81
  266. package/src/modules/history/index.ts +439 -70
  267. package/src/modules/history/semantic.ts +15 -21
  268. package/src/modules/workspace/disk-agreement.ts +1 -1
  269. package/src/modules/workspace/index.ts +85 -23
  270. package/src/notice-tags.ts +10 -1
  271. package/src/operator-log.ts +36 -3
  272. package/src/presentation.ts +1676 -0
  273. package/src/prose-drafts.ts +16 -12
  274. package/src/read-marks.ts +328 -0
  275. package/src/recovery/offline-branch.ts +346 -32
  276. package/src/recovery/recover-cli.ts +21 -3
  277. package/src/send-tools.ts +40 -7
  278. package/src/stored-injections.ts +2 -2
  279. package/src/stored-removal.ts +31 -7
  280. package/src/tool-result-guard.ts +41 -7
  281. package/src/tune-out/coordinator.ts +4089 -457
  282. package/src/tune-out/tools.ts +160 -43
  283. package/src/tune-out/window-anchor.ts +277 -0
  284. package/src/types/agent.ts +90 -31
  285. package/src/types/events.ts +2 -0
  286. package/src/types/framework.ts +43 -21
  287. package/src/types/module.ts +181 -68
  288. package/src/types/trace.ts +542 -40
  289. package/dist/src/reasoning-loss-notice.d.ts +0 -23
  290. package/dist/src/reasoning-loss-notice.d.ts.map +0 -1
  291. package/dist/src/reasoning-loss-notice.js +0 -52
  292. package/dist/src/reasoning-loss-notice.js.map +0 -1
  293. package/dist/src/reasoning-loss.d.ts +0 -24
  294. package/dist/src/reasoning-loss.d.ts.map +0 -1
  295. package/dist/src/reasoning-loss.js +0 -102
  296. package/dist/src/reasoning-loss.js.map +0 -1
  297. package/src/reasoning-loss-notice.ts +0 -64
  298. package/src/reasoning-loss.ts +0 -120
@@ -258,17 +258,10 @@ export interface AgentConfig {
258
258
  * `thinking-binding-loss` ops alert, once per incident and again if a
259
259
  * call drops more. The provider reports drops only on a request that
260
260
  * carries the drop control; without it, such a block is refused;
261
- * - the agent is told, in a `[reasoning] <agent>:` system notice of kind
262
- * `reasoning-loss` stored for it as the framework's other notices are,
263
- * when a committing compile leaves out a stored reply's reasoning at a
264
- * change of the request's head, at a branch's first compile, or in a
265
- * fold or other change to an earlier message that takes a reply of the
266
- * current turn, and, with `dropBlock` set too, when the provider drops
267
- * blocks it can place as the agent's stored replies or the stream's
268
- * rounds, once per incident and again when a call drops more. The
269
- * framework hears compiles through `Agent.onThinkingStrip` from the
270
- * agent's first stream on, unless a host has set its own, so an agent
271
- * driven only through the direct API is never told.
261
+ * - the agent is told nothing of reasoning left out or dropped: no line
262
+ * about the mechanics of its own memory or reasoning is put in its
263
+ * context. Hosts can observe compiles' strips through
264
+ * `Agent.onThinkingStrip`;
272
265
  * The record and the notes
273
266
  * vouch for requests as agent-framework hands them to membrane, so a
274
267
  * membrane `beforeRequest` hook that changes a request must change every
@@ -337,8 +330,29 @@ export interface AgentConfig {
337
330
  * - 'disabled': generated prose is never published. Only explicit tools may
338
331
  * send externally; prose remains in Chronicle, and a turn that wrote plain
339
332
  * speech ends with a private `[delivered] plain speech → no channel` receipt.
333
+ * - 'locked': unprefixed prose goes to one destination the agent chose, on
334
+ * every turn, and nothing moves it automatically: not the channel that
335
+ * woke the turn, not an addressed message, a heartbeat or channel_open.
336
+ * Only the `prose_locus` tool moves it, to a channel or to drafts (held,
337
+ * never posted unless the agent resends them). The choice persists
338
+ * across turns and restarts. Until the agent first makes one,
339
+ * `proseLock` is the destination. It governs routing through the channel
340
+ * registry: a module that handles final speech itself (`onAgentSpeech`,
341
+ * such as the in-process Discord module) receives it in every mode, this
342
+ * one included. See docs/locked-prose-routing.md.
340
343
  */
341
- proseRouting?: 'locus' | 'explicit' | 'hybrid' | 'disabled';
344
+ proseRouting?: 'locus' | 'explicit' | 'hybrid' | 'disabled' | 'locked';
345
+
346
+ /**
347
+ * Locked mode's destination until the agent chooses one with `prose_locus`:
348
+ * `"#channel"`, `"@person"`, a channel id, or `"drafts"`. Resolved as a
349
+ * `>>` target is, at each turn's start, so a channel its server hasn't
350
+ * registered yet resolves once it has; until it resolves, plain speech is
351
+ * held as drafts. Left out, plain speech is held as drafts until the agent
352
+ * chooses. The agent's own choice, once made, takes its place. Ignored in
353
+ * the other modes.
354
+ */
355
+ proseLock?: string;
342
356
 
343
357
  /**
344
358
  * Stored participants that are this agent's own voice, in addition to its
@@ -431,6 +445,55 @@ export interface AgentConfig {
431
445
  * view.
432
446
  */
433
447
  clock?: import('../clock-rows.js').ClockConfig;
448
+
449
+ /**
450
+ * Keep the rows that open a turn raw for the whole turn (on when left out):
451
+ * at a start that opens a turn, the framework pins raw the rows of the
452
+ * agent's window after its newest own message and its consumed mark
453
+ * (`pinRange`, named `agent-framework:turn-inputs`; the README says
454
+ * which rows exactly), and removes the pin when the turn ends, so the
455
+ * strategy doesn't compress the rows the turn opened with while it runs,
456
+ * unless a committing compile refuses as over budget with it held: the
457
+ * pin is then removed and the compile runs once more (README). `false` places no pin:
458
+ * the turn's opening rows are compressed as any others, and a pin of the
459
+ * name left from before (a crash's) is removed at the next start that opens
460
+ * a turn, as a silent start removes one.
461
+ */
462
+ turnInputsPin?: boolean;
463
+
464
+ /**
465
+ * The other configured agents whose own rows this agent's window takes
466
+ * (none when left out). Residents share one slot, and each is shown only
467
+ * its own rows and the rows meant for it: another resident's rounds,
468
+ * replies, tool results and notes stay out of its window (#291, decision
469
+ * 1; rows an earlier release stored carry no stamp and stay in the window
470
+ * written down from the record: 291-presentation-mandatory). A name here
471
+ * is an observe edge in this agent's registry record, on
472
+ * that agent (`{ agent: name }`, the path the subconscious's edge takes),
473
+ * and the presentation index presents that agent's own rows to this one
474
+ * at its points, as it does any arrival (bearingOf); the history tools
475
+ * leave them in for its calls (ModuleContext.observes). That agent's own
476
+ * rows this one's window doesn't hold yet, those stored before the edge
477
+ * was declared included, enter it at its next presentation point, after
478
+ * what it holds: an edge declared on a store with history hands the
479
+ * observer that agent's earlier rows at once, at the end of its window
480
+ * (`ObserveEdge.fromMessageId`, which would start the edge at a row, is
481
+ * read by nothing yet). Only own rows: mail and channel traffic meant for that agent, and its stored
482
+ * context injections, stay out. One way: `nova` observing `mira` shows
483
+ * nova mira's rows, not mira nova's. `create()` refuses a name that is
484
+ * this agent's own or no configured agent's. Read when a configured agent
485
+ * is created; a derived agent's spec carries its own edges.
486
+ */
487
+ observes?: string[];
488
+
489
+ /**
490
+ * How the rounds of an agent it observes (`observes`) go out in this
491
+ * agent's requests, as `PersistentReaderConfig.foreignRounds` for the
492
+ * persistent subconscious: `'transcript'` (the default), a line per tool
493
+ * call and per result and none of their thinking, or `'raw'`, as stored.
494
+ * Unread for an agent that observes no one.
495
+ */
496
+ foreignRounds?: 'transcript' | 'raw';
434
497
  }
435
498
 
436
499
  /** The intentionally small set of agent settings that may change in-process. */
@@ -585,22 +648,19 @@ export interface InferenceRequest {
585
648
  * all of them without materializing content, the turn has no cause left
586
649
  * and does not run. */
587
650
  coalescingBatchSubjects?: string[];
588
- /** Host-owned: this wake's sole cause is this write, deferred for its
589
- * agent while a turn was alive: a coalesced render placed in its queue
651
+ /** Host-owned: this wake's sole cause is this row, by the stored row's
652
+ * id: one stored for its agent as it arrived, or one stored and not
653
+ * presented to its agent at its write, because a turn of the agent's was
654
+ * alive: a coalesced render its turn being assembled doesn't read
590
655
  * (wakeToRead), or a message, notice or event whose wake was queued with
591
- * it. Once a request that carried the write was answered and, for a wake
592
- * that carries a channel and isn't marked `ambient`, the agent has since
593
- * published into that channel having read it, or once the write is in
594
- * neither the agent's queue nor its store's current branch, the wake
595
- * starts no turn. */
596
- readsDeferredWrite?: string;
597
- /** Host-owned: this wake's sole cause is this message, stored in its
598
- * agent's store as it arrived, not deferred (its row's id). Once a
599
- * request that carried the message was answered and, for a wake that
600
- * carries a channel and isn't marked `ambient`, the agent has since
601
- * published into that channel having read it, or once the message isn't
602
- * on its store's current branch, the wake starts no turn. */
603
- readsStoredMessage?: string;
656
+ * it. Once a request that carried the row was answered (an answered
657
+ * request's consumed watermark covers it, in the agent's window once its
658
+ * context presents rows) and, for a wake that carries a channel and isn't
659
+ * marked `ambient`, the agent has since published into that channel
660
+ * having read it, or once the row is not on its store's current branch,
661
+ * the wake starts no turn. A row stored and not yet presented to the
662
+ * agent keeps its wake. */
663
+ readsRow?: string;
604
664
  agentName: string;
605
665
  reason: string;
606
666
  source: string;
@@ -660,10 +720,9 @@ export interface InferenceRequest {
660
720
  * (`chat:ambient`). A coalesced push's wake carries it only to read a
661
721
  * render, and only when every notice the render stands for was. Such a
662
722
  * message asked nothing of the agent, so a wake for it that carries
663
- * `readsDeferredWrite` or `readsStoredMessage` is dropped once a request
664
- * that carried the message was answered, with no publish asked of the
665
- * agent. A message with neither tag is in doubt, and is judged as an
666
- * addressed one.
723
+ * `readsRow` is dropped once a request that carried the message
724
+ * was answered, with no publish asked of the agent. A message with neither
725
+ * tag is in doubt, and is judged as an addressed one.
667
726
  */
668
727
  ambient?: true;
669
728
  /**
@@ -349,6 +349,8 @@ export interface ToolCall {
349
349
  * Converted from wire-format McplContentBlock to membrane ContentBlock.
350
350
  */
351
351
  export interface McplPushEvent {
352
+ /** The occurrence's suppression, when a coalesced push's wake decided it (CoalescedOccurrence.suppressionDecision). */
353
+ suppressionDecision?: string | null;
352
354
  type: 'mcpl:push-event';
353
355
  serverId: string;
354
356
  featureSet: string;
@@ -131,12 +131,12 @@ export interface FrameworkConfig {
131
131
  */
132
132
  announceOrphans?: boolean;
133
133
  /**
134
- * By default every derivation tells the agent it was made from, in one
135
- * host-framed line. After this many derivations of one kind from one
136
- * agent, that agent hears a count line every so many instead of a line
137
- * per fork, so a reader loop that forks a hundred times a session doesn't
138
- * fill its source's context with stamps; every derivation still emits its
139
- * `dendrite:agent-created` trace. Default 10; 0 never collapses.
134
+ * With a `derivationNotice`, after this many derivations of one kind from
135
+ * one agent, the line it's given is a count line every so many instead of
136
+ * a line per fork, so a reader loop that forks a hundred times a session
137
+ * doesn't fill its source's context with stamps; every derivation still
138
+ * emits its `dendrite:agent-created` trace. Default 10; 0 never collapses.
139
+ * Without a `derivationNotice` the source is told nothing.
140
140
  */
141
141
  collapseDerivationNoticesAfter?: number;
142
142
  /**
@@ -152,9 +152,11 @@ export interface FrameworkConfig {
152
152
  beforeDerive?: (spec: import('../dendrite/types.js').AgentSpec) => void | { refuse: string };
153
153
  /**
154
154
  * What an agent is told when something is derived from it. Given the
155
- * record, the agent it was derived from and the framework's default line,
156
- * return the text to add, or null to add nothing. Absent, the default
157
- * line is used. The `dendrite:agent-created` trace is emitted either way.
155
+ * record, the agent it was derived from and the framework's own line,
156
+ * return the text to add (that line, or the host's own), or null to add
157
+ * nothing. Absent, nothing is added: an agent isn't told of derivations
158
+ * unless the host asks for it. The `dendrite:agent-created` trace is
159
+ * emitted either way.
158
160
  */
159
161
  derivationNotice?: (record: import('../dendrite/types.js').AgentRecord, from: string, defaultText: string) => string | null;
160
162
  };
@@ -167,16 +169,14 @@ export interface FrameworkConfig {
167
169
  subconscious?: import('../tune-out/tools.js').SubconsciousConfig;
168
170
 
169
171
  /**
170
- * Tune-out without a reader (issue #232 §3.3). The hold machinery always
171
- * runs when MCPL channels exist, so a persisted epoch is resumed and
172
- * released whatever the configuration; this switch only decides whether
173
- * residents are offered `tune_out` when no reader is configured. Without
174
- * a reader a tune-out is a silent hold: no cadence, no wake budget,
175
- * mentions are acknowledged, the backlog is released on cancel.
172
+ * Tune-out settings. Residents are offered `tune_out` only with a reader
173
+ * (`subconscious`), or while a hold a failed release left is still on
174
+ * record to check or cancel: a hold nothing summarizes would hand the resident an
175
+ * undated backlog all at once when it ends. `enabled`, which offered one
176
+ * without a reader, was removed in 0.33.0: `enabled: true` is refused at
177
+ * `create` (`false` is still accepted, from JavaScript, and does nothing).
176
178
  */
177
179
  tuneOut?: {
178
- /** Offer `tune_out` without a subconscious. Default: only with one. */
179
- enabled?: boolean;
180
180
  /**
181
181
  * Announce the all-except scope in the excepted channel: one bracketed
182
182
  * line under the resident's name when it opens (who, for how long) and
@@ -200,7 +200,9 @@ export interface FrameworkConfig {
200
200
  * inbound message is a global fallback locus for turns without one, and
201
201
  * an addressed message injected mid-turn re-pins the turn's locus.
202
202
  *
203
- * Held traffic never moves the locus under either rule.
203
+ * Held traffic never moves the locus under either rule. Neither rule
204
+ * applies to an agent under locked prose routing (AgentConfig.proseRouting
205
+ * 'locked'): its turns speak at its lock, whatever arrives.
204
206
  */
205
207
  speech?: {
206
208
  locus?: 'delivery' | 'latest-inbound';
@@ -237,9 +239,29 @@ export interface FrameworkConfig {
237
239
  hostModePath?: string;
238
240
 
239
241
  /**
240
- * Branch-independent durable queue of context writes deferred while
241
- * quiesced. Defaults to `<storePath>/recovery/deferred-writes.json`; same
242
- * rationale and fallback as `hostModePath`.
242
+ * Where a release before #291 kept its durable queue of deferred context
243
+ * writes. Defaults to `<storePath>/recovery/deferred-writes.json`; without
244
+ * either, the store's `framework/deferred-writes` slot. This release keeps
245
+ * no durable queue: a write is stored when it is made, and enters each
246
+ * agent's window at that agent's presentation points. Two holds keep a
247
+ * write in memory instead, and a crash loses it: a live operator surgery
248
+ * (a rollback, a suppression, a branch switch), until its release stores
249
+ * it, and an agent's context manager refusing its work after a failed
250
+ * re-initialization, until a branch move (switchBranch, a rollback or a
251
+ * suppression) re-initializes it.
252
+ *
253
+ * create() reads the record once and stores its writes. A write for an
254
+ * agent no longer registered goes to the primary when it is a failed
255
+ * reply, a channel notice its reader could act on, or a module's write
256
+ * for a run or a fork, and is dropped otherwise, logged. It then rewrites
257
+ * the record with what it left for the next boot: a write it couldn't
258
+ * store, or couldn't tell had already landed, with that agent's later
259
+ * writes. A write the store refuses as malformed is dropped, logged, as an
260
+ * earlier release's flush dropped it. When the store doesn't sync after
261
+ * the import, the record is left as it was.
262
+ *
263
+ * @deprecated Read once at boot by the deferred-write importer; removed in
264
+ * the next release.
243
265
  */
244
266
  deferredWritesPath?: string;
245
267