@animalabs/agent-framework 0.32.0 → 0.34.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 (368) hide show
  1. package/README.md +340 -22
  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 +208 -80
  7. package/dist/src/agent.d.ts.map +1 -1
  8. package/dist/src/agent.js +345 -113
  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/append-all.d.ts +5 -0
  17. package/dist/src/append-all.d.ts.map +1 -0
  18. package/dist/src/append-all.js +8 -0
  19. package/dist/src/append-all.js.map +1 -0
  20. package/dist/src/code-execution/isolate/scripts.d.ts +12 -8
  21. package/dist/src/code-execution/isolate/scripts.d.ts.map +1 -1
  22. package/dist/src/code-execution/isolate/scripts.js +24 -0
  23. package/dist/src/code-execution/isolate/scripts.js.map +1 -1
  24. package/dist/src/config-checks.d.ts +7 -0
  25. package/dist/src/config-checks.d.ts.map +1 -1
  26. package/dist/src/config-checks.js +14 -0
  27. package/dist/src/config-checks.js.map +1 -1
  28. package/dist/src/context-manager-errors.d.ts +25 -0
  29. package/dist/src/context-manager-errors.d.ts.map +1 -0
  30. package/dist/src/context-manager-errors.js +31 -0
  31. package/dist/src/context-manager-errors.js.map +1 -0
  32. package/dist/src/context-options.d.ts +70 -0
  33. package/dist/src/context-options.d.ts.map +1 -0
  34. package/dist/src/context-options.js +90 -0
  35. package/dist/src/context-options.js.map +1 -0
  36. package/dist/src/cut-off-round.js +4 -4
  37. package/dist/src/deferred-import.d.ts +93 -0
  38. package/dist/src/deferred-import.d.ts.map +1 -0
  39. package/dist/src/deferred-import.js +177 -0
  40. package/dist/src/deferred-import.js.map +1 -0
  41. package/dist/src/dendrite/audience.d.ts +223 -0
  42. package/dist/src/dendrite/audience.d.ts.map +1 -0
  43. package/dist/src/dendrite/audience.js +202 -0
  44. package/dist/src/dendrite/audience.js.map +1 -0
  45. package/dist/src/dendrite/index.d.ts +5 -3
  46. package/dist/src/dendrite/index.d.ts.map +1 -1
  47. package/dist/src/dendrite/index.js +2 -1
  48. package/dist/src/dendrite/index.js.map +1 -1
  49. package/dist/src/dendrite/presets.d.ts +10 -5
  50. package/dist/src/dendrite/presets.d.ts.map +1 -1
  51. package/dist/src/dendrite/presets.js +17 -5
  52. package/dist/src/dendrite/presets.js.map +1 -1
  53. package/dist/src/dendrite/registry.d.ts +62 -7
  54. package/dist/src/dendrite/registry.d.ts.map +1 -1
  55. package/dist/src/dendrite/registry.js +183 -12
  56. package/dist/src/dendrite/registry.js.map +1 -1
  57. package/dist/src/dendrite/types.d.ts +91 -8
  58. package/dist/src/dendrite/types.d.ts.map +1 -1
  59. package/dist/src/failure-text.d.ts +36 -0
  60. package/dist/src/failure-text.d.ts.map +1 -0
  61. package/dist/src/failure-text.js +89 -0
  62. package/dist/src/failure-text.js.map +1 -0
  63. package/dist/src/foreign-rounds.d.ts +69 -0
  64. package/dist/src/foreign-rounds.d.ts.map +1 -0
  65. package/dist/src/foreign-rounds.js +152 -0
  66. package/dist/src/foreign-rounds.js.map +1 -0
  67. package/dist/src/framework.d.ts +2064 -842
  68. package/dist/src/framework.d.ts.map +1 -1
  69. package/dist/src/framework.js +8586 -3739
  70. package/dist/src/framework.js.map +1 -1
  71. package/dist/src/gate/event-gate.d.ts +125 -21
  72. package/dist/src/gate/event-gate.d.ts.map +1 -1
  73. package/dist/src/gate/event-gate.js +487 -72
  74. package/dist/src/gate/event-gate.js.map +1 -1
  75. package/dist/src/gate/index.d.ts +1 -1
  76. package/dist/src/gate/index.d.ts.map +1 -1
  77. package/dist/src/gate/index.js.map +1 -1
  78. package/dist/src/gate/reply-judge.d.ts +4 -0
  79. package/dist/src/gate/reply-judge.d.ts.map +1 -1
  80. package/dist/src/gate/reply-judge.js +12 -3
  81. package/dist/src/gate/reply-judge.js.map +1 -1
  82. package/dist/src/gate/rule-scope.d.ts +30 -0
  83. package/dist/src/gate/rule-scope.d.ts.map +1 -0
  84. package/dist/src/gate/rule-scope.js +41 -0
  85. package/dist/src/gate/rule-scope.js.map +1 -0
  86. package/dist/src/gate/suppress-script-worker.d.ts +2 -0
  87. package/dist/src/gate/suppress-script-worker.d.ts.map +1 -0
  88. package/dist/src/gate/suppress-script-worker.js +103 -0
  89. package/dist/src/gate/suppress-script-worker.js.map +1 -0
  90. package/dist/src/gate/suppress-scripts.d.ts +105 -0
  91. package/dist/src/gate/suppress-scripts.d.ts.map +1 -0
  92. package/dist/src/gate/suppress-scripts.js +403 -0
  93. package/dist/src/gate/suppress-scripts.js.map +1 -0
  94. package/dist/src/gate/suppression-review.d.ts +143 -0
  95. package/dist/src/gate/suppression-review.d.ts.map +1 -0
  96. package/dist/src/gate/suppression-review.js +463 -0
  97. package/dist/src/gate/suppression-review.js.map +1 -0
  98. package/dist/src/gate/suppression-stats.d.ts +125 -0
  99. package/dist/src/gate/suppression-stats.d.ts.map +1 -0
  100. package/dist/src/gate/suppression-stats.js +214 -0
  101. package/dist/src/gate/suppression-stats.js.map +1 -0
  102. package/dist/src/gate/types.d.ts +142 -7
  103. package/dist/src/gate/types.d.ts.map +1 -1
  104. package/dist/src/gate/wake-onboarding.d.ts +119 -0
  105. package/dist/src/gate/wake-onboarding.d.ts.map +1 -0
  106. package/dist/src/gate/wake-onboarding.js +277 -0
  107. package/dist/src/gate/wake-onboarding.js.map +1 -0
  108. package/dist/src/heartbeat/heartbeat.js +1 -1
  109. package/dist/src/heartbeat/heartbeat.js.map +1 -1
  110. package/dist/src/held-writes.d.ts +31 -23
  111. package/dist/src/held-writes.d.ts.map +1 -1
  112. package/dist/src/held-writes.js +44 -59
  113. package/dist/src/held-writes.js.map +1 -1
  114. package/dist/src/index.d.ts +6 -2
  115. package/dist/src/index.d.ts.map +1 -1
  116. package/dist/src/index.js +4 -0
  117. package/dist/src/index.js.map +1 -1
  118. package/dist/src/inference-bounds.d.ts +2 -1
  119. package/dist/src/inference-bounds.d.ts.map +1 -1
  120. package/dist/src/inference-bounds.js +9 -6
  121. package/dist/src/inference-bounds.js.map +1 -1
  122. package/dist/src/jsonrpc-envelope.d.ts +69 -0
  123. package/dist/src/jsonrpc-envelope.d.ts.map +1 -0
  124. package/dist/src/jsonrpc-envelope.js +66 -0
  125. package/dist/src/jsonrpc-envelope.js.map +1 -0
  126. package/dist/src/mcpl/channel-registry.d.ts +188 -28
  127. package/dist/src/mcpl/channel-registry.d.ts.map +1 -1
  128. package/dist/src/mcpl/channel-registry.js +426 -70
  129. package/dist/src/mcpl/channel-registry.js.map +1 -1
  130. package/dist/src/mcpl/checkpoint-manager.d.ts +2 -4
  131. package/dist/src/mcpl/checkpoint-manager.d.ts.map +1 -1
  132. package/dist/src/mcpl/checkpoint-manager.js.map +1 -1
  133. package/dist/src/mcpl/feature-set-manager.d.ts +2 -4
  134. package/dist/src/mcpl/feature-set-manager.d.ts.map +1 -1
  135. package/dist/src/mcpl/feature-set-manager.js.map +1 -1
  136. package/dist/src/mcpl/inbound-source.d.ts +2 -1
  137. package/dist/src/mcpl/inbound-source.d.ts.map +1 -1
  138. package/dist/src/mcpl/inbound-source.js +2 -1
  139. package/dist/src/mcpl/inbound-source.js.map +1 -1
  140. package/dist/src/mcpl/inference-router.d.ts +6 -6
  141. package/dist/src/mcpl/inference-router.d.ts.map +1 -1
  142. package/dist/src/mcpl/inference-router.js.map +1 -1
  143. package/dist/src/mcpl/modern-connection.d.ts +109 -15
  144. package/dist/src/mcpl/modern-connection.d.ts.map +1 -1
  145. package/dist/src/mcpl/modern-connection.js +593 -86
  146. package/dist/src/mcpl/modern-connection.js.map +1 -1
  147. package/dist/src/mcpl/protocol-family.d.ts +3 -1
  148. package/dist/src/mcpl/protocol-family.d.ts.map +1 -1
  149. package/dist/src/mcpl/protocol-family.js +15 -9
  150. package/dist/src/mcpl/protocol-family.js.map +1 -1
  151. package/dist/src/mcpl/push-coalescer.d.ts +132 -22
  152. package/dist/src/mcpl/push-coalescer.d.ts.map +1 -1
  153. package/dist/src/mcpl/push-coalescer.js +105 -15
  154. package/dist/src/mcpl/push-coalescer.js.map +1 -1
  155. package/dist/src/mcpl/push-handler.d.ts +9 -7
  156. package/dist/src/mcpl/push-handler.d.ts.map +1 -1
  157. package/dist/src/mcpl/push-handler.js.map +1 -1
  158. package/dist/src/mcpl/server-connection.d.ts +50 -28
  159. package/dist/src/mcpl/server-connection.d.ts.map +1 -1
  160. package/dist/src/mcpl/server-connection.js +165 -72
  161. package/dist/src/mcpl/server-connection.js.map +1 -1
  162. package/dist/src/mcpl/tool-classes.d.ts.map +1 -1
  163. package/dist/src/mcpl/tool-classes.js +3 -0
  164. package/dist/src/mcpl/tool-classes.js.map +1 -1
  165. package/dist/src/mcpl/tool-presence.d.ts.map +1 -1
  166. package/dist/src/mcpl/tool-presence.js +10 -6
  167. package/dist/src/mcpl/tool-presence.js.map +1 -1
  168. package/dist/src/mcpl/toolset-host.d.ts.map +1 -1
  169. package/dist/src/mcpl/toolset-host.js +7 -6
  170. package/dist/src/mcpl/toolset-host.js.map +1 -1
  171. package/dist/src/mcpl/toolsets-module.d.ts.map +1 -1
  172. package/dist/src/mcpl/toolsets-module.js +2 -1
  173. package/dist/src/mcpl/toolsets-module.js.map +1 -1
  174. package/dist/src/mcpl/types.d.ts +33 -6
  175. package/dist/src/mcpl/types.d.ts.map +1 -1
  176. package/dist/src/mcpl/types.js.map +1 -1
  177. package/dist/src/module-registry.d.ts +24 -1
  178. package/dist/src/module-registry.d.ts.map +1 -1
  179. package/dist/src/module-registry.js +68 -18
  180. package/dist/src/module-registry.js.map +1 -1
  181. package/dist/src/modules/discord/index.d.ts +45 -8
  182. package/dist/src/modules/discord/index.d.ts.map +1 -1
  183. package/dist/src/modules/discord/index.js +238 -87
  184. package/dist/src/modules/discord/index.js.map +1 -1
  185. package/dist/src/modules/health/index.js +2 -2
  186. package/dist/src/modules/health/index.js.map +1 -1
  187. package/dist/src/modules/history/index.d.ts +59 -0
  188. package/dist/src/modules/history/index.d.ts.map +1 -1
  189. package/dist/src/modules/history/index.js +432 -67
  190. package/dist/src/modules/history/index.js.map +1 -1
  191. package/dist/src/modules/history/semantic.d.ts +6 -5
  192. package/dist/src/modules/history/semantic.d.ts.map +1 -1
  193. package/dist/src/modules/history/semantic.js +18 -25
  194. package/dist/src/modules/history/semantic.js.map +1 -1
  195. package/dist/src/modules/workspace/disk-agreement.d.ts +1 -1
  196. package/dist/src/modules/workspace/disk-agreement.js +1 -1
  197. package/dist/src/modules/workspace/index.d.ts +28 -7
  198. package/dist/src/modules/workspace/index.d.ts.map +1 -1
  199. package/dist/src/modules/workspace/index.js +80 -25
  200. package/dist/src/modules/workspace/index.js.map +1 -1
  201. package/dist/src/modules/workspace/observe.d.ts.map +1 -1
  202. package/dist/src/modules/workspace/observe.js +2 -1
  203. package/dist/src/modules/workspace/observe.js.map +1 -1
  204. package/dist/src/modules/workspace/reconcile.d.ts.map +1 -1
  205. package/dist/src/modules/workspace/reconcile.js +3 -2
  206. package/dist/src/modules/workspace/reconcile.js.map +1 -1
  207. package/dist/src/notice-tags.d.ts +20 -9
  208. package/dist/src/notice-tags.d.ts.map +1 -1
  209. package/dist/src/notice-tags.js +20 -9
  210. package/dist/src/notice-tags.js.map +1 -1
  211. package/dist/src/operator-log.d.ts +36 -3
  212. package/dist/src/operator-log.d.ts.map +1 -1
  213. package/dist/src/operator-log.js +2 -2
  214. package/dist/src/operator-log.js.map +1 -1
  215. package/dist/src/presentation.d.ts +747 -0
  216. package/dist/src/presentation.d.ts.map +1 -0
  217. package/dist/src/presentation.js +1437 -0
  218. package/dist/src/presentation.js.map +1 -0
  219. package/dist/src/prose-drafts.d.ts +15 -11
  220. package/dist/src/prose-drafts.d.ts.map +1 -1
  221. package/dist/src/prose-drafts.js +16 -12
  222. package/dist/src/prose-drafts.js.map +1 -1
  223. package/dist/src/read-marks.d.ts +192 -0
  224. package/dist/src/read-marks.d.ts.map +1 -0
  225. package/dist/src/read-marks.js +242 -0
  226. package/dist/src/read-marks.js.map +1 -0
  227. package/dist/src/reasoning-loss.d.ts +5 -0
  228. package/dist/src/reasoning-loss.d.ts.map +1 -0
  229. package/dist/src/reasoning-loss.js +8 -0
  230. package/dist/src/reasoning-loss.js.map +1 -0
  231. package/dist/src/recovery/offline-branch.d.ts +91 -6
  232. package/dist/src/recovery/offline-branch.d.ts.map +1 -1
  233. package/dist/src/recovery/offline-branch.js +277 -32
  234. package/dist/src/recovery/offline-branch.js.map +1 -1
  235. package/dist/src/recovery/recover-cli.js +24 -4
  236. package/dist/src/recovery/recover-cli.js.map +1 -1
  237. package/dist/src/send-tools.d.ts +5 -9
  238. package/dist/src/send-tools.d.ts.map +1 -1
  239. package/dist/src/send-tools.js +40 -7
  240. package/dist/src/send-tools.js.map +1 -1
  241. package/dist/src/sent-rows.js +1 -1
  242. package/dist/src/stored-injections.d.ts +2 -2
  243. package/dist/src/stored-injections.js +2 -2
  244. package/dist/src/stored-removal.d.ts +17 -4
  245. package/dist/src/stored-removal.d.ts.map +1 -1
  246. package/dist/src/stored-removal.js +29 -5
  247. package/dist/src/stored-removal.js.map +1 -1
  248. package/dist/src/supplied-text.d.ts +1 -1
  249. package/dist/src/supplied-text.js +3 -3
  250. package/dist/src/supplied-text.js.map +1 -1
  251. package/dist/src/thinking-drops.d.ts +2 -0
  252. package/dist/src/thinking-drops.d.ts.map +1 -1
  253. package/dist/src/thinking-drops.js.map +1 -1
  254. package/dist/src/tool-presentation.d.ts.map +1 -1
  255. package/dist/src/tool-presentation.js +38 -9
  256. package/dist/src/tool-presentation.js.map +1 -1
  257. package/dist/src/tool-result-guard.d.ts +12 -1
  258. package/dist/src/tool-result-guard.d.ts.map +1 -1
  259. package/dist/src/tool-result-guard.js +42 -8
  260. package/dist/src/tool-result-guard.js.map +1 -1
  261. package/dist/src/tune-out/coordinator.d.ts +1170 -81
  262. package/dist/src/tune-out/coordinator.d.ts.map +1 -1
  263. package/dist/src/tune-out/coordinator.js +3732 -369
  264. package/dist/src/tune-out/coordinator.js.map +1 -1
  265. package/dist/src/tune-out/tools.d.ts +114 -17
  266. package/dist/src/tune-out/tools.d.ts.map +1 -1
  267. package/dist/src/tune-out/tools.js +89 -28
  268. package/dist/src/tune-out/tools.js.map +1 -1
  269. package/dist/src/tune-out/window-anchor.d.ts +143 -0
  270. package/dist/src/tune-out/window-anchor.d.ts.map +1 -0
  271. package/dist/src/tune-out/window-anchor.js +202 -0
  272. package/dist/src/tune-out/window-anchor.js.map +1 -0
  273. package/dist/src/types/agent.d.ts +121 -25
  274. package/dist/src/types/agent.d.ts.map +1 -1
  275. package/dist/src/types/events.d.ts +2 -0
  276. package/dist/src/types/events.d.ts.map +1 -1
  277. package/dist/src/types/framework.d.ts +72 -17
  278. package/dist/src/types/framework.d.ts.map +1 -1
  279. package/dist/src/types/inference-log.d.ts +1 -0
  280. package/dist/src/types/inference-log.d.ts.map +1 -1
  281. package/dist/src/types/module.d.ts +180 -69
  282. package/dist/src/types/module.d.ts.map +1 -1
  283. package/dist/src/types/trace.d.ts +573 -39
  284. package/dist/src/types/trace.d.ts.map +1 -1
  285. package/package.json +4 -4
  286. package/src/admission/admit.ts +32 -3
  287. package/src/agent.ts +392 -132
  288. package/src/api/mcp-server-core.ts +54 -17
  289. package/src/api/server.ts +4 -23
  290. package/src/append-all.ts +6 -0
  291. package/src/code-execution/isolate/scripts.ts +28 -3
  292. package/src/config-checks.ts +14 -0
  293. package/src/context-manager-errors.ts +37 -0
  294. package/src/context-options.ts +106 -0
  295. package/src/cut-off-round.ts +4 -4
  296. package/src/deferred-import.ts +239 -0
  297. package/src/dendrite/audience.ts +315 -0
  298. package/src/dendrite/index.ts +14 -2
  299. package/src/dendrite/presets.ts +18 -6
  300. package/src/dendrite/registry.ts +213 -14
  301. package/src/dendrite/types.ts +92 -8
  302. package/src/failure-text.ts +88 -0
  303. package/src/foreign-rounds.ts +199 -0
  304. package/src/framework.ts +8796 -3813
  305. package/src/gate/event-gate.ts +518 -91
  306. package/src/gate/index.ts +3 -0
  307. package/src/gate/reply-judge.ts +12 -3
  308. package/src/gate/rule-scope.ts +45 -0
  309. package/src/gate/suppress-script-worker.ts +89 -0
  310. package/src/gate/suppress-scripts.ts +414 -0
  311. package/src/gate/suppression-review.ts +517 -0
  312. package/src/gate/suppression-stats.ts +314 -0
  313. package/src/gate/types.ts +148 -7
  314. package/src/gate/wake-onboarding.ts +309 -0
  315. package/src/heartbeat/heartbeat.ts +1 -1
  316. package/src/held-writes.ts +49 -60
  317. package/src/index.ts +10 -2
  318. package/src/inference-bounds.ts +11 -6
  319. package/src/jsonrpc-envelope.ts +81 -0
  320. package/src/mcpl/channel-registry.ts +513 -116
  321. package/src/mcpl/checkpoint-manager.ts +3 -2
  322. package/src/mcpl/feature-set-manager.ts +2 -1
  323. package/src/mcpl/inbound-source.ts +2 -1
  324. package/src/mcpl/inference-router.ts +7 -4
  325. package/src/mcpl/modern-connection.ts +629 -91
  326. package/src/mcpl/protocol-family.ts +15 -9
  327. package/src/mcpl/push-coalescer.ts +193 -34
  328. package/src/mcpl/push-handler.ts +10 -5
  329. package/src/mcpl/server-connection.ts +169 -75
  330. package/src/mcpl/tool-classes.ts +3 -0
  331. package/src/mcpl/tool-presence.ts +10 -5
  332. package/src/mcpl/toolset-host.ts +7 -6
  333. package/src/mcpl/toolsets-module.ts +2 -1
  334. package/src/mcpl/types.ts +33 -6
  335. package/src/module-registry.ts +73 -17
  336. package/src/modules/discord/index.ts +230 -82
  337. package/src/modules/health/index.ts +2 -2
  338. package/src/modules/history/index.ts +439 -70
  339. package/src/modules/history/semantic.ts +18 -24
  340. package/src/modules/workspace/disk-agreement.ts +1 -1
  341. package/src/modules/workspace/index.ts +89 -26
  342. package/src/modules/workspace/observe.ts +2 -1
  343. package/src/modules/workspace/reconcile.ts +3 -2
  344. package/src/notice-tags.ts +21 -9
  345. package/src/operator-log.ts +36 -3
  346. package/src/presentation.ts +1678 -0
  347. package/src/prose-drafts.ts +16 -12
  348. package/src/read-marks.ts +328 -0
  349. package/src/reasoning-loss.ts +7 -0
  350. package/src/recovery/offline-branch.ts +350 -35
  351. package/src/recovery/recover-cli.ts +23 -4
  352. package/src/send-tools.ts +40 -7
  353. package/src/sent-rows.ts +1 -1
  354. package/src/stored-injections.ts +2 -2
  355. package/src/stored-removal.ts +31 -7
  356. package/src/supplied-text.ts +3 -3
  357. package/src/thinking-drops.ts +2 -0
  358. package/src/tool-presentation.ts +34 -9
  359. package/src/tool-result-guard.ts +41 -7
  360. package/src/tune-out/coordinator.ts +4121 -472
  361. package/src/tune-out/tools.ts +162 -44
  362. package/src/tune-out/window-anchor.ts +277 -0
  363. package/src/types/agent.ts +122 -25
  364. package/src/types/events.ts +2 -0
  365. package/src/types/framework.ts +73 -17
  366. package/src/types/inference-log.ts +1 -0
  367. package/src/types/module.ts +181 -68
  368. package/src/types/trace.ts +607 -43
@@ -221,11 +221,15 @@ export interface AgentConfig {
221
221
  * counts it. After a fold, each block after the stretch it rewrote is
222
222
  * bound to a conversation the request no longer holds. Where the context
223
223
  * strategy still sends such a block, the provider drops it on every call
224
- * until a later fold takes it out of the context, and while such blocks
225
- * are sent, no stream gives a sample and the calibration keeps the value
226
- * it had. A strategy that leaves that thinking out at the fold sends none
227
- * to drop. The direct API carries the control too, but reads no report: it
228
- * traces no usage and feeds no calibration.
224
+ * until a later fold takes it out of the context, or, with `binds` set
225
+ * too, until the next compile after a note lands: the stream tells the
226
+ * context manager which stored reply's thinking was dropped
227
+ * (`noteThinkingDropped`), and once a note lands, the next compile sends
228
+ * that reply without it. While such blocks are sent,
229
+ * no stream gives a sample and the calibration keeps the value it had. A
230
+ * strategy that leaves that thinking out at the fold sends none to drop.
231
+ * The direct API carries the control too, but reads no report: it traces
232
+ * no usage, feeds no calibration and notes nothing.
229
233
  *
230
234
  * Default false: nothing is sent, and the account's default applies.
231
235
  */
@@ -249,6 +253,11 @@ export interface AgentConfig {
249
253
  * thinking is kept at the next compile. The direct API
250
254
  * (`runInference`) notes nothing, so each of its replies' thinking is
251
255
  * left out at the compile after it's stored;
256
+ * - with `dropBlock` set too, each framework stream tells the context
257
+ * manager which stored replies' thinking the provider reports dropping
258
+ * (`noteThinkingDropped`), naming the compile it was built from, so
259
+ * once a note lands, the next compile sends those replies without their
260
+ * thinking;
252
261
  * - with `physicalWindowTokens` set too, `maxStreamTokens` no longer
253
262
  * starts a new stream mid-turn, since the new stream's compile can take
254
263
  * the turn's earlier reasoning out of the request;
@@ -330,8 +339,29 @@ export interface AgentConfig {
330
339
  * - 'disabled': generated prose is never published. Only explicit tools may
331
340
  * send externally; prose remains in Chronicle, and a turn that wrote plain
332
341
  * speech ends with a private `[delivered] plain speech → no channel` receipt.
342
+ * - 'locked': unprefixed prose goes to one destination the agent chose, on
343
+ * every turn, and nothing moves it automatically: not the channel that
344
+ * woke the turn, not an addressed message, a heartbeat or channel_open.
345
+ * Only the `prose_locus` tool moves it, to a channel or to drafts (held,
346
+ * never posted unless the agent resends them). The choice persists
347
+ * across turns and restarts. Until the agent first makes one,
348
+ * `proseLock` is the destination. It governs routing through the channel
349
+ * registry: a module that handles final speech itself (`onAgentSpeech`,
350
+ * such as the in-process Discord module) receives it in every mode, this
351
+ * one included. See docs/locked-prose-routing.md.
333
352
  */
334
- proseRouting?: 'locus' | 'explicit' | 'hybrid' | 'disabled';
353
+ proseRouting?: 'locus' | 'explicit' | 'hybrid' | 'disabled' | 'locked';
354
+
355
+ /**
356
+ * Locked mode's destination until the agent chooses one with `prose_locus`:
357
+ * `"#channel"`, `"@person"`, a channel id, or `"drafts"`. Resolved as a
358
+ * `>>` target is, at each turn's start, so a channel its server hasn't
359
+ * registered yet resolves once it has; until it resolves, plain speech is
360
+ * held as drafts. Left out, plain speech is held as drafts until the agent
361
+ * chooses. The agent's own choice, once made, takes its place. Ignored in
362
+ * the other modes.
363
+ */
364
+ proseLock?: string;
335
365
 
336
366
  /**
337
367
  * Stored participants that are this agent's own voice, in addition to its
@@ -424,6 +454,55 @@ export interface AgentConfig {
424
454
  * view.
425
455
  */
426
456
  clock?: import('../clock-rows.js').ClockConfig;
457
+
458
+ /**
459
+ * Keep the rows that open a turn raw for the whole turn (on when left out):
460
+ * at a start that opens a turn, the framework pins raw the rows of the
461
+ * agent's window after its newest own message and its consumed mark
462
+ * (`pinRange`, named `agent-framework:turn-inputs`; the README says
463
+ * which rows exactly), and removes the pin when the turn ends, so the
464
+ * strategy doesn't compress the rows the turn opened with while it runs,
465
+ * unless a committing compile refuses as over budget with it held: the
466
+ * pin is then removed and the compile runs once more (README). `false` places no pin:
467
+ * the turn's opening rows are compressed as any others, and a pin of the
468
+ * name left from before (a crash's) is removed at the next start that opens
469
+ * a turn, as a silent start removes one.
470
+ */
471
+ turnInputsPin?: boolean;
472
+
473
+ /**
474
+ * The other configured agents whose own rows this agent's window takes
475
+ * (none when left out). Residents share one slot, and each is shown only
476
+ * its own rows and the rows meant for it: another resident's rounds,
477
+ * replies, tool results and notes stay out of its window (#291, decision
478
+ * 1; rows an earlier release stored carry no stamp and stay in the window
479
+ * written down from the record: 291-presentation-mandatory). A name here
480
+ * is an observe edge in this agent's registry record, on
481
+ * that agent (`{ agent: name }`, the path the subconscious's edge takes),
482
+ * and the presentation index presents that agent's own rows to this one
483
+ * at its points, as it does any arrival (bearingOf); the history tools
484
+ * leave them in for its calls (ModuleContext.observes). That agent's own
485
+ * rows this one's window doesn't hold yet, those stored before the edge
486
+ * was declared included, enter it at its next presentation point, after
487
+ * what it holds: an edge declared on a store with history hands the
488
+ * observer that agent's earlier rows at once, at the end of its window
489
+ * (`ObserveEdge.fromMessageId`, which would start the edge at a row, is
490
+ * read by nothing yet). Only own rows: mail and channel traffic meant for that agent, and its stored
491
+ * context injections, stay out. One way: `nova` observing `mira` shows
492
+ * nova mira's rows, not mira nova's. `create()` refuses a name that is
493
+ * this agent's own or no configured agent's. Read when a configured agent
494
+ * is created; a derived agent's spec carries its own edges.
495
+ */
496
+ observes?: string[];
497
+
498
+ /**
499
+ * How the rounds of an agent it observes (`observes`) go out in this
500
+ * agent's requests, as `PersistentReaderConfig.foreignRounds` for the
501
+ * persistent subconscious: `'transcript'` (the default), a line per tool
502
+ * call and per result and none of their thinking, or `'raw'`, as stored.
503
+ * Unread for an agent that observes no one.
504
+ */
505
+ foreignRounds?: 'transcript' | 'raw';
427
506
  }
428
507
 
429
508
  /** The intentionally small set of agent settings that may change in-process. */
@@ -578,22 +657,19 @@ export interface InferenceRequest {
578
657
  * all of them without materializing content, the turn has no cause left
579
658
  * and does not run. */
580
659
  coalescingBatchSubjects?: string[];
581
- /** Host-owned: this wake's sole cause is this write, deferred for its
582
- * agent while a turn was alive: a coalesced render placed in its queue
660
+ /** Host-owned: this wake's sole cause is this row, by the stored row's
661
+ * id: one stored for its agent as it arrived, or one stored and not
662
+ * presented to its agent at its write, because a turn of the agent's was
663
+ * alive: a coalesced render its turn being assembled doesn't read
583
664
  * (wakeToRead), or a message, notice or event whose wake was queued with
584
- * it. Once a request that carried the write was answered and, for a wake
585
- * that carries a channel and isn't marked `ambient`, the agent has since
586
- * published into that channel having read it, or once the write is in
587
- * neither the agent's queue nor its store's current branch, the wake
588
- * starts no turn. */
589
- readsDeferredWrite?: string;
590
- /** Host-owned: this wake's sole cause is this message, stored in its
591
- * agent's store as it arrived, not deferred (its row's id). Once a
592
- * request that carried the message was answered and, for a wake that
593
- * carries a channel and isn't marked `ambient`, the agent has since
594
- * published into that channel having read it, or once the message isn't
595
- * on its store's current branch, the wake starts no turn. */
596
- readsStoredMessage?: string;
665
+ * it. Once a request that carried the row was answered (an answered
666
+ * request's consumed watermark covers it, in the agent's window once its
667
+ * context presents rows) and, for a wake that carries a channel and isn't
668
+ * marked `ambient`, the agent has since published into that channel
669
+ * having read it, or once the row is not on its store's current branch,
670
+ * the wake starts no turn. A row stored and not yet presented to the
671
+ * agent keeps its wake. */
672
+ readsRow?: string;
597
673
  agentName: string;
598
674
  reason: string;
599
675
  source: string;
@@ -653,10 +729,9 @@ export interface InferenceRequest {
653
729
  * (`chat:ambient`). A coalesced push's wake carries it only to read a
654
730
  * render, and only when every notice the render stands for was. Such a
655
731
  * message asked nothing of the agent, so a wake for it that carries
656
- * `readsDeferredWrite` or `readsStoredMessage` is dropped once a request
657
- * that carried the message was answered, with no publish asked of the
658
- * agent. A message with neither tag is in doubt, and is judged as an
659
- * addressed one.
732
+ * `readsRow` is dropped once a request that carried the message
733
+ * was answered, with no publish asked of the agent. A message with neither
734
+ * tag is in doubt, and is judged as an addressed one.
660
735
  */
661
736
  ambient?: true;
662
737
  /**
@@ -687,6 +762,28 @@ export interface InferenceRequest {
687
762
  * channel (ambient-only batches leave it unset).
688
763
  */
689
764
  wakeChannelId?: string;
765
+ /**
766
+ * Framework-set on a gate wake whose batch held no message that addressed
767
+ * the agent, and which so took no route: the channels its messages came
768
+ * from (a `chat:system` notice names none, unless it's a coalesced
769
+ * render's latest occurrence), each once. A start merged from several
770
+ * requests carries every one's channels, or, when any of them comes from
771
+ * outside the framework, isn't a silent heartbeat tick and brought
772
+ * channels, only those requests' channels. A request a quiesce keeps in
773
+ * another's place, and one a provider hold takes another into, carry both
774
+ * requests' channels.
775
+ * The framework's own wakes that continue a
776
+ * turn (a restart, a re-inference, a continuation, a retry, a bounce, a
777
+ * re-arm), unless its own wake named a channel that resolves to none,
778
+ * carry the channels the turn's starts gathered, whether or not the turn
779
+ * had a locus, so a turn's trigger can name channels from several batches,
780
+ * and a turn they open with no locus can name them too.
781
+ * When such a turn's plain speech, or a sleep's announcement, is routed
782
+ * with no locus, the agent is told these channels, unless the turn's own
783
+ * wake named a channel that resolves to none, or the turn is an ephemeral
784
+ * run's, which is told nothing.
785
+ */
786
+ wakeChannels?: Array<{ serverId: string; channelId: string }>;
690
787
  /** Timestamp of the event the wake provenance was taken from (ms). */
691
788
  wakeAt?: number;
692
789
  /** Batched-wake lines the gate handed to this wake rather than wrote
@@ -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;
@@ -169,16 +169,14 @@ export interface FrameworkConfig {
169
169
  subconscious?: import('../tune-out/tools.js').SubconsciousConfig;
170
170
 
171
171
  /**
172
- * Tune-out without a reader (issue #232 §3.3). The hold machinery always
173
- * runs when MCPL channels exist, so a persisted epoch is resumed and
174
- * released whatever the configuration; this switch only decides whether
175
- * residents are offered `tune_out` when no reader is configured. Without
176
- * a reader a tune-out is a silent hold: no cadence, no wake budget,
177
- * 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).
178
178
  */
179
179
  tuneOut?: {
180
- /** Offer `tune_out` without a subconscious. Default: only with one. */
181
- enabled?: boolean;
182
180
  /**
183
181
  * Announce the all-except scope in the excepted channel: one bracketed
184
182
  * line under the resident's name when it opens (who, for how long) and
@@ -193,16 +191,23 @@ export interface FrameworkConfig {
193
191
  * (architecture channel, 2026-10-06: the §3 carve-out accepted by the
194
192
  * residents).
195
193
  *
196
- * - `'delivery'` (default): the locus comes only from the delivery that
197
- * woke the turn, a conversation fork's home channel, or a channel the
198
- * agent opened during the turn. Incoming traffic never moves it — not
199
- * between turns, not mid-turn. A turn with no such locus keeps its
200
- * prose private, and says so in a `[routing]` notice.
194
+ * - `'delivery'` (default): the locus comes from the delivery that woke
195
+ * the turn, a conversation fork's home channel, or a channel the agent
196
+ * opened during the turn, and past those only from an open all-except
197
+ * hold's channel or `unpromptedChannel` (below), each for the turns that
198
+ * take it. Incoming traffic never moves it — not between turns, not
199
+ * mid-turn. A turn with no such locus keeps its prose private, and says
200
+ * so in a `[routing]` notice.
201
201
  * - `'latest-inbound'`: the previous rule. The most recent delivered
202
202
  * inbound message is a global fallback locus for turns without one, and
203
203
  * an addressed message injected mid-turn re-pins the turn's locus.
204
204
  *
205
- * Held traffic never moves the locus under either rule.
205
+ * Held traffic never moves the locus under either rule. Under either, a
206
+ * turn the agent's own timer starts takes `unpromptedChannel` where it's
207
+ * set, after an all-except hold's channel and before both rules' own
208
+ * fallbacks. Neither rule applies to an agent under locked prose routing
209
+ * (AgentConfig.proseRouting 'locked'): its turns speak at its lock,
210
+ * whatever arrives.
206
211
  */
207
212
  speech?: {
208
213
  locus?: 'delivery' | 'latest-inbound';
@@ -239,9 +244,29 @@ export interface FrameworkConfig {
239
244
  hostModePath?: string;
240
245
 
241
246
  /**
242
- * Branch-independent durable queue of context writes deferred while
243
- * quiesced. Defaults to `<storePath>/recovery/deferred-writes.json`; same
244
- * rationale and fallback as `hostModePath`.
247
+ * Where a release before #291 kept its durable queue of deferred context
248
+ * writes. Defaults to `<storePath>/recovery/deferred-writes.json`; without
249
+ * either, the store's `framework/deferred-writes` slot. This release keeps
250
+ * no durable queue: a write is stored when it is made, and enters each
251
+ * agent's window at that agent's presentation points. Two holds keep a
252
+ * write in memory instead, and a crash loses it: a live operator surgery
253
+ * (a rollback, a suppression, a branch switch), until its release stores
254
+ * it, and an agent's context manager refusing its work after a failed
255
+ * re-initialization, until a branch move (switchBranch, a rollback or a
256
+ * suppression) re-initializes it.
257
+ *
258
+ * create() reads the record once and stores its writes. A write for an
259
+ * agent no longer registered goes to the primary when it is a failed
260
+ * reply, a channel notice its reader could act on, or a module's write
261
+ * for a run or a fork, and is dropped otherwise, logged. It then rewrites
262
+ * the record with what it left for the next boot: a write it couldn't
263
+ * store, or couldn't tell had already landed, with that agent's later
264
+ * writes. A write the store refuses as malformed is dropped, logged, as an
265
+ * earlier release's flush dropped it. When the store doesn't sync after
266
+ * the import, the record is left as it was.
267
+ *
268
+ * @deprecated Read once at boot by the deferred-write importer; removed in
269
+ * the next release.
245
270
  */
246
271
  deferredWritesPath?: string;
247
272
 
@@ -482,6 +507,35 @@ export interface FrameworkConfig {
482
507
  */
483
508
  inferenceRouting?: InferenceRoutingPolicy;
484
509
 
510
+ /**
511
+ * The channel for a turn the agent's own timer starts, which no message
512
+ * prompted: the wake `skip_reply` schedules, or the end of a `sleep`. Plain
513
+ * speech in locus or hybrid prose routing goes there, and so does
514
+ * `channel_publish` naming no channel in any prose routing mode but locked,
515
+ * which servers are told as the turn's default outgoing channel. An
516
+ * all-except hold's channel still comes first while one is open, and without
517
+ * the setting such a turn follows `speech.locus`. A turn the framework opens
518
+ * to continue such a turn that had no locus of its own, as in explicit or
519
+ * disabled routing, takes it too: a `!` continuation, autoContinue's next
520
+ * turn, or a bounced reply's wake. No other turn takes it: not one a message
521
+ * prompted, from a channel, a module, a person at a console or another agent;
522
+ * not a heartbeat's or a reminder's (its plain speech is held as drafts); not
523
+ * a conversation fork's or an ephemeral run's; not a locked agent's, which
524
+ * speaks at its lock or holds its speech as drafts; and not a start merged
525
+ * from a timer's wake and any other cause. One value, for every agent on the
526
+ * framework. A registered channel's id, e.g. `discord:{guildId}:{channelId}`,
527
+ * or, to pick one server's where two register that id,
528
+ * `{serverId}:{channelId}`. `create()` refuses a value that is neither a
529
+ * string nor null, or is blank; null reads as not set. A value that names no
530
+ * registered channel, several, or one its server declared inbound-only, when
531
+ * a turn would take it, is logged, and logged again only after a turn has
532
+ * used it since; the turn takes what it would without the setting.
533
+ * `channel_publish`'s description adds a default for such turns only on a
534
+ * framework with an event gate, the only one with such turns; on any other
535
+ * the description is as it is without the setting.
536
+ */
537
+ unpromptedChannel?: string | null;
538
+
485
539
  /** EventGate config. If omitted, all events trigger inference (unchanged default). */
486
540
  gate?: GateOptions;
487
541
  /**
@@ -657,6 +711,8 @@ export interface InferenceLogEntry {
657
711
  success: boolean;
658
712
  /** Why it didn't succeed: the failure's message, or what stopped it */
659
713
  error?: string;
714
+ /** `error` in the framework's words, with no provider's text: what an agent may be shown of it */
715
+ errorWords?: string;
660
716
  /** Request data or blob ID if large. A stream the framework ended at a
661
717
  * tool boundary (stopReason 'turn_ended', 'context_budget' or
662
718
  * 'physical_window') records a note in place of the body. */
@@ -54,6 +54,7 @@ export interface InferenceLogSummary {
54
54
  requestId: string;
55
55
  success: boolean;
56
56
  error?: string;
57
+ errorWords?: string;
57
58
  durationMs: number;
58
59
  tokenUsage?: { input: number; output: number; cacheCreation?: number; cacheRead?: number };
59
60
  stopReason?: string;