@mono-agent/agent-app 0.19.0 → 0.20.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 (303) hide show
  1. package/README.md +304 -32
  2. package/dist/acp-bridge.d.ts.map +1 -1
  3. package/dist/acp-bridge.js +113 -54
  4. package/dist/acp-bridge.js.map +1 -1
  5. package/dist/acp-session-store.d.ts +12 -0
  6. package/dist/acp-session-store.d.ts.map +1 -0
  7. package/dist/acp-session-store.js +74 -0
  8. package/dist/acp-session-store.js.map +1 -0
  9. package/dist/agent-artifact-paths.d.ts +8 -0
  10. package/dist/agent-artifact-paths.d.ts.map +1 -0
  11. package/dist/agent-artifact-paths.js +11 -0
  12. package/dist/agent-artifact-paths.js.map +1 -0
  13. package/dist/agent-root-coordinator.d.ts +101 -0
  14. package/dist/agent-root-coordinator.d.ts.map +1 -0
  15. package/dist/agent-root-coordinator.js +470 -0
  16. package/dist/agent-root-coordinator.js.map +1 -0
  17. package/dist/app-controller-channels.d.ts +11 -1
  18. package/dist/app-controller-channels.d.ts.map +1 -1
  19. package/dist/app-controller-channels.js +145 -20
  20. package/dist/app-controller-channels.js.map +1 -1
  21. package/dist/app-controller-continuation.d.ts +2 -0
  22. package/dist/app-controller-continuation.d.ts.map +1 -1
  23. package/dist/app-controller-continuation.js.map +1 -1
  24. package/dist/app-controller-lifecycle.d.ts +5 -0
  25. package/dist/app-controller-lifecycle.d.ts.map +1 -1
  26. package/dist/app-controller-lifecycle.js +24 -5
  27. package/dist/app-controller-lifecycle.js.map +1 -1
  28. package/dist/app-controller-maintenance.d.ts +2 -0
  29. package/dist/app-controller-maintenance.d.ts.map +1 -1
  30. package/dist/app-controller-maintenance.js +32 -2
  31. package/dist/app-controller-maintenance.js.map +1 -1
  32. package/dist/app-controller-process-jobs.d.ts +46 -0
  33. package/dist/app-controller-process-jobs.d.ts.map +1 -0
  34. package/dist/app-controller-process-jobs.js +281 -0
  35. package/dist/app-controller-process-jobs.js.map +1 -0
  36. package/dist/app-controller-responder.d.ts +15 -0
  37. package/dist/app-controller-responder.d.ts.map +1 -1
  38. package/dist/app-controller-responder.js +146 -12
  39. package/dist/app-controller-responder.js.map +1 -1
  40. package/dist/app-controller-traceability.d.ts +6 -0
  41. package/dist/app-controller-traceability.d.ts.map +1 -1
  42. package/dist/app-controller-traceability.js +10 -0
  43. package/dist/app-controller-traceability.js.map +1 -1
  44. package/dist/app-controller-utils.d.ts +8 -0
  45. package/dist/app-controller-utils.d.ts.map +1 -1
  46. package/dist/app-controller-utils.js +24 -1
  47. package/dist/app-controller-utils.js.map +1 -1
  48. package/dist/app-controller.d.ts +40 -1
  49. package/dist/app-controller.d.ts.map +1 -1
  50. package/dist/app-controller.js +124 -39
  51. package/dist/app-controller.js.map +1 -1
  52. package/dist/background-log-maintenance.d.ts +85 -2
  53. package/dist/background-log-maintenance.d.ts.map +1 -1
  54. package/dist/background-log-maintenance.js +407 -136
  55. package/dist/background-log-maintenance.js.map +1 -1
  56. package/dist/background-runtime.d.ts.map +1 -1
  57. package/dist/background-runtime.js +22 -41
  58. package/dist/background-runtime.js.map +1 -1
  59. package/dist/background.d.ts +18 -26
  60. package/dist/background.d.ts.map +1 -1
  61. package/dist/background.js +83 -138
  62. package/dist/background.js.map +1 -1
  63. package/dist/channel-drivers/cron.d.ts +12 -1
  64. package/dist/channel-drivers/cron.d.ts.map +1 -1
  65. package/dist/channel-drivers/cron.js +121 -18
  66. package/dist/channel-drivers/cron.js.map +1 -1
  67. package/dist/channel-drivers/native-notify.d.ts +3 -0
  68. package/dist/channel-drivers/native-notify.d.ts.map +1 -1
  69. package/dist/channel-drivers/native-notify.js +2 -1
  70. package/dist/channel-drivers/native-notify.js.map +1 -1
  71. package/dist/channel-drivers/slack.d.ts.map +1 -1
  72. package/dist/channel-drivers/slack.js +41 -4
  73. package/dist/channel-drivers/slack.js.map +1 -1
  74. package/dist/channel-drivers/telegram.d.ts.map +1 -1
  75. package/dist/channel-drivers/telegram.js +46 -3
  76. package/dist/channel-drivers/telegram.js.map +1 -1
  77. package/dist/channel-drivers/tui.d.ts +13 -2
  78. package/dist/channel-drivers/tui.d.ts.map +1 -1
  79. package/dist/channel-drivers/tui.js +112 -3
  80. package/dist/channel-drivers/tui.js.map +1 -1
  81. package/dist/channels.d.ts +1 -1
  82. package/dist/channels.d.ts.map +1 -1
  83. package/dist/channels.js +4 -2
  84. package/dist/channels.js.map +1 -1
  85. package/dist/cli-args.d.ts +15 -1
  86. package/dist/cli-args.d.ts.map +1 -1
  87. package/dist/cli-args.js +82 -12
  88. package/dist/cli-args.js.map +1 -1
  89. package/dist/cli-background-command.d.ts +9 -2
  90. package/dist/cli-background-command.d.ts.map +1 -1
  91. package/dist/cli-background-command.js +174 -66
  92. package/dist/cli-background-command.js.map +1 -1
  93. package/dist/cli-commands.d.ts.map +1 -1
  94. package/dist/cli-commands.js +50 -12
  95. package/dist/cli-commands.js.map +1 -1
  96. package/dist/cli-help.d.ts.map +1 -1
  97. package/dist/cli-help.js +21 -1
  98. package/dist/cli-help.js.map +1 -1
  99. package/dist/config-reference.d.ts.map +1 -1
  100. package/dist/config-reference.js +99 -2
  101. package/dist/config-reference.js.map +1 -1
  102. package/dist/configured-agent.d.ts +44 -3
  103. package/dist/configured-agent.d.ts.map +1 -1
  104. package/dist/configured-agent.js +805 -156
  105. package/dist/configured-agent.js.map +1 -1
  106. package/dist/conversation-state-roots.d.ts +59 -0
  107. package/dist/conversation-state-roots.d.ts.map +1 -0
  108. package/dist/conversation-state-roots.js +248 -0
  109. package/dist/conversation-state-roots.js.map +1 -0
  110. package/dist/cron-control-store.d.ts +91 -0
  111. package/dist/cron-control-store.d.ts.map +1 -0
  112. package/dist/cron-control-store.js +1251 -0
  113. package/dist/cron-control-store.js.map +1 -0
  114. package/dist/cron-operator-service.d.ts +54 -0
  115. package/dist/cron-operator-service.d.ts.map +1 -0
  116. package/dist/cron-operator-service.js +352 -0
  117. package/dist/cron-operator-service.js.map +1 -0
  118. package/dist/doctor-session-history.d.ts +9 -0
  119. package/dist/doctor-session-history.d.ts.map +1 -0
  120. package/dist/doctor-session-history.js +313 -0
  121. package/dist/doctor-session-history.js.map +1 -0
  122. package/dist/doctor.d.ts +2 -1
  123. package/dist/doctor.d.ts.map +1 -1
  124. package/dist/doctor.js +320 -9
  125. package/dist/doctor.js.map +1 -1
  126. package/dist/index.d.ts +4 -0
  127. package/dist/index.d.ts.map +1 -1
  128. package/dist/index.js +2 -0
  129. package/dist/index.js.map +1 -1
  130. package/dist/interaction-bridge.d.ts +1 -0
  131. package/dist/interaction-bridge.d.ts.map +1 -1
  132. package/dist/interaction-bridge.js +54 -6
  133. package/dist/interaction-bridge.js.map +1 -1
  134. package/dist/jobs-command.d.ts +17 -0
  135. package/dist/jobs-command.d.ts.map +1 -0
  136. package/dist/jobs-command.js +207 -0
  137. package/dist/jobs-command.js.map +1 -0
  138. package/dist/launchd-lifecycle-lock.d.ts +36 -0
  139. package/dist/launchd-lifecycle-lock.d.ts.map +1 -0
  140. package/dist/launchd-lifecycle-lock.js +124 -0
  141. package/dist/launchd-lifecycle-lock.js.map +1 -0
  142. package/dist/launchd-log-monitor-status.d.ts +7 -0
  143. package/dist/launchd-log-monitor-status.d.ts.map +1 -0
  144. package/dist/launchd-log-monitor-status.js +224 -0
  145. package/dist/launchd-log-monitor-status.js.map +1 -0
  146. package/dist/launchd-logs.d.ts +9 -1
  147. package/dist/launchd-logs.d.ts.map +1 -1
  148. package/dist/launchd-logs.js +69 -16
  149. package/dist/launchd-logs.js.map +1 -1
  150. package/dist/launchd-maintenance-command.d.ts +10 -0
  151. package/dist/launchd-maintenance-command.d.ts.map +1 -0
  152. package/dist/launchd-maintenance-command.js +2 -0
  153. package/dist/launchd-maintenance-command.js.map +1 -0
  154. package/dist/launchd-maintenance-entry.d.ts +30 -0
  155. package/dist/launchd-maintenance-entry.d.ts.map +1 -0
  156. package/dist/launchd-maintenance-entry.js +206 -0
  157. package/dist/launchd-maintenance-entry.js.map +1 -0
  158. package/dist/launchd-maintenance-gate.d.ts +28 -0
  159. package/dist/launchd-maintenance-gate.d.ts.map +1 -0
  160. package/dist/launchd-maintenance-gate.js +80 -0
  161. package/dist/launchd-maintenance-gate.js.map +1 -0
  162. package/dist/launchd-private-files.d.ts +3 -0
  163. package/dist/launchd-private-files.d.ts.map +1 -0
  164. package/dist/launchd-private-files.js +58 -0
  165. package/dist/launchd-private-files.js.map +1 -0
  166. package/dist/launchd.d.ts +56 -2
  167. package/dist/launchd.d.ts.map +1 -1
  168. package/dist/launchd.js +210 -5
  169. package/dist/launchd.js.map +1 -1
  170. package/dist/local-configuration.d.ts.map +1 -1
  171. package/dist/local-configuration.js +33 -7
  172. package/dist/local-configuration.js.map +1 -1
  173. package/dist/managed-launchd-maintenance-environment.d.ts +3 -0
  174. package/dist/managed-launchd-maintenance-environment.d.ts.map +1 -0
  175. package/dist/managed-launchd-maintenance-environment.js +12 -0
  176. package/dist/managed-launchd-maintenance-environment.js.map +1 -0
  177. package/dist/managed-runtime-launch-proof.d.ts +11 -0
  178. package/dist/managed-runtime-launch-proof.d.ts.map +1 -0
  179. package/dist/managed-runtime-launch-proof.js +59 -0
  180. package/dist/managed-runtime-launch-proof.js.map +1 -0
  181. package/dist/managed-runtime-maintenance-entry.d.ts +10 -0
  182. package/dist/managed-runtime-maintenance-entry.d.ts.map +1 -0
  183. package/dist/managed-runtime-maintenance-entry.js +244 -0
  184. package/dist/managed-runtime-maintenance-entry.js.map +1 -0
  185. package/dist/managed-web-logs.d.ts +29 -11
  186. package/dist/managed-web-logs.d.ts.map +1 -1
  187. package/dist/managed-web-logs.js +244 -121
  188. package/dist/managed-web-logs.js.map +1 -1
  189. package/dist/managed-web-maintenance-environment.d.ts +6 -0
  190. package/dist/managed-web-maintenance-environment.d.ts.map +1 -0
  191. package/dist/managed-web-maintenance-environment.js +19 -0
  192. package/dist/managed-web-maintenance-environment.js.map +1 -0
  193. package/dist/mcp-apps.d.ts +37 -0
  194. package/dist/mcp-apps.d.ts.map +1 -0
  195. package/dist/mcp-apps.js +1753 -0
  196. package/dist/mcp-apps.js.map +1 -0
  197. package/dist/memory-command.d.ts +12 -0
  198. package/dist/memory-command.d.ts.map +1 -1
  199. package/dist/memory-command.js +510 -1
  200. package/dist/memory-command.js.map +1 -1
  201. package/dist/modules/known-tools.d.ts +1 -1
  202. package/dist/modules/known-tools.d.ts.map +1 -1
  203. package/dist/modules/known-tools.js +2 -0
  204. package/dist/modules/known-tools.js.map +1 -1
  205. package/dist/posted-reply-history.d.ts.map +1 -1
  206. package/dist/posted-reply-history.js +12 -0
  207. package/dist/posted-reply-history.js.map +1 -1
  208. package/dist/proactive-notify.d.ts +4 -1
  209. package/dist/proactive-notify.d.ts.map +1 -1
  210. package/dist/proactive-notify.js +43 -5
  211. package/dist/proactive-notify.js.map +1 -1
  212. package/dist/process-jobs-config.d.ts +82 -0
  213. package/dist/process-jobs-config.d.ts.map +1 -0
  214. package/dist/process-jobs-config.js +423 -0
  215. package/dist/process-jobs-config.js.map +1 -0
  216. package/dist/process-jobs-context.d.ts +24 -0
  217. package/dist/process-jobs-context.d.ts.map +1 -0
  218. package/dist/process-jobs-context.js +135 -0
  219. package/dist/process-jobs-context.js.map +1 -0
  220. package/dist/process-jobs-root-registry.d.ts +115 -0
  221. package/dist/process-jobs-root-registry.d.ts.map +1 -0
  222. package/dist/process-jobs-root-registry.js +978 -0
  223. package/dist/process-jobs-root-registry.js.map +1 -0
  224. package/dist/process-jobs-runtime.d.ts +35 -0
  225. package/dist/process-jobs-runtime.d.ts.map +1 -0
  226. package/dist/process-jobs-runtime.js +177 -0
  227. package/dist/process-jobs-runtime.js.map +1 -0
  228. package/dist/process-jobs-service.d.ts +70 -0
  229. package/dist/process-jobs-service.d.ts.map +1 -0
  230. package/dist/process-jobs-service.js +1989 -0
  231. package/dist/process-jobs-service.js.map +1 -0
  232. package/dist/process-jobs-store.d.ts +151 -0
  233. package/dist/process-jobs-store.d.ts.map +1 -0
  234. package/dist/process-jobs-store.js +1290 -0
  235. package/dist/process-jobs-store.js.map +1 -0
  236. package/dist/reply-artifacts.d.ts +65 -0
  237. package/dist/reply-artifacts.d.ts.map +1 -0
  238. package/dist/reply-artifacts.js +1147 -0
  239. package/dist/reply-artifacts.js.map +1 -0
  240. package/dist/reply-part-budget.d.ts +16 -0
  241. package/dist/reply-part-budget.d.ts.map +1 -0
  242. package/dist/reply-part-budget.js +57 -0
  243. package/dist/reply-part-budget.js.map +1 -0
  244. package/dist/request-model-override.d.ts +19 -0
  245. package/dist/request-model-override.d.ts.map +1 -1
  246. package/dist/request-model-override.js +54 -1
  247. package/dist/request-model-override.js.map +1 -1
  248. package/dist/request-scoped-mcp.d.ts +31 -0
  249. package/dist/request-scoped-mcp.d.ts.map +1 -0
  250. package/dist/request-scoped-mcp.js +197 -0
  251. package/dist/request-scoped-mcp.js.map +1 -0
  252. package/dist/run-history.d.ts.map +1 -1
  253. package/dist/run-history.js +50 -254
  254. package/dist/run-history.js.map +1 -1
  255. package/dist/runtime-option-extensions.d.ts +21 -0
  256. package/dist/runtime-option-extensions.d.ts.map +1 -1
  257. package/dist/runtime-option-extensions.js +53 -0
  258. package/dist/runtime-option-extensions.js.map +1 -1
  259. package/dist/secure-file-replace.d.ts +3 -0
  260. package/dist/secure-file-replace.d.ts.map +1 -1
  261. package/dist/secure-file-replace.js +31 -7
  262. package/dist/secure-file-replace.js.map +1 -1
  263. package/dist/session-history.d.ts +146 -0
  264. package/dist/session-history.d.ts.map +1 -0
  265. package/dist/session-history.js +347 -0
  266. package/dist/session-history.js.map +1 -0
  267. package/dist/sessions.d.ts +45 -2
  268. package/dist/sessions.d.ts.map +1 -1
  269. package/dist/sessions.js +849 -30
  270. package/dist/sessions.js.map +1 -1
  271. package/dist/web-command.d.ts +12 -11
  272. package/dist/web-command.d.ts.map +1 -1
  273. package/dist/web-command.js +554 -80
  274. package/dist/web-command.js.map +1 -1
  275. package/dist/web-log-maintenance-command.d.ts +7 -0
  276. package/dist/web-log-maintenance-command.d.ts.map +1 -0
  277. package/dist/web-log-maintenance-command.js +21 -0
  278. package/dist/web-log-maintenance-command.js.map +1 -0
  279. package/dist/web-log-maintenance-status.d.ts +26 -0
  280. package/dist/web-log-maintenance-status.d.ts.map +1 -0
  281. package/dist/web-log-maintenance-status.js +171 -0
  282. package/dist/web-log-maintenance-status.js.map +1 -0
  283. package/dist/web-log-maintenance.d.ts +32 -0
  284. package/dist/web-log-maintenance.d.ts.map +1 -0
  285. package/dist/web-log-maintenance.js +163 -0
  286. package/dist/web-log-maintenance.js.map +1 -0
  287. package/dist/web-maintenance-paths.d.ts +12 -0
  288. package/dist/web-maintenance-paths.d.ts.map +1 -0
  289. package/dist/web-maintenance-paths.js +24 -0
  290. package/dist/web-maintenance-paths.js.map +1 -0
  291. package/dist/wizard/prompts.d.ts.map +1 -1
  292. package/dist/wizard/prompts.js +1 -0
  293. package/dist/wizard/prompts.js.map +1 -1
  294. package/dist/wizard/run.js +1 -1
  295. package/dist/wizard/run.js.map +1 -1
  296. package/package.json +15 -15
  297. package/schema/mono-agent.config.schema.json +102 -1
  298. package/skills/mono-agent-composer/references/config-blueprint.md +26 -2
  299. package/skills/mono-agent-composer/references/discovery-questions.md +2 -2
  300. package/skills/mono-agent-composer/references/feature-coverage.md +6 -4
  301. package/skills/mono-agent-composer/references/package-map.md +19 -3
  302. package/skills/mono-agent-composer/references/playbooks.md +3 -3
  303. package/skills/mono-agent-composer/references/validation.md +4 -2
@@ -1556,6 +1556,93 @@
1556
1556
  }
1557
1557
  }
1558
1558
  },
1559
+ "processJobs": {
1560
+ "type": "object",
1561
+ "additionalProperties": false,
1562
+ "properties": {
1563
+ "enabled": {
1564
+ "type": "boolean",
1565
+ "default": false
1566
+ },
1567
+ "stateDir": {
1568
+ "type": "string",
1569
+ "minLength": 1,
1570
+ "default": ".mono-agent/process-jobs"
1571
+ },
1572
+ "maxConcurrent": {
1573
+ "type": "integer",
1574
+ "minimum": 1,
1575
+ "maximum": 32,
1576
+ "default": 4
1577
+ },
1578
+ "maxActivePerConversation": {
1579
+ "type": "integer",
1580
+ "minimum": 1,
1581
+ "maximum": 8,
1582
+ "default": 2
1583
+ },
1584
+ "maxQueued": {
1585
+ "type": "integer",
1586
+ "minimum": 1,
1587
+ "maximum": 64,
1588
+ "default": 8
1589
+ },
1590
+ "maxRuntimeMs": {
1591
+ "type": "integer",
1592
+ "minimum": 1,
1593
+ "maximum": 86400000,
1594
+ "default": 1800000
1595
+ },
1596
+ "maxQueueAgeMs": {
1597
+ "type": "integer",
1598
+ "minimum": 1,
1599
+ "maximum": 3600000,
1600
+ "default": 300000
1601
+ },
1602
+ "maxOutputBytes": {
1603
+ "type": "integer",
1604
+ "minimum": 1,
1605
+ "maximum": 8388608,
1606
+ "default": 1048576
1607
+ },
1608
+ "previewChars": {
1609
+ "type": "integer",
1610
+ "minimum": 1,
1611
+ "maximum": 8000,
1612
+ "default": 2000
1613
+ },
1614
+ "maxChainDepth": {
1615
+ "type": "integer",
1616
+ "minimum": 1,
1617
+ "maximum": 8,
1618
+ "default": 4
1619
+ },
1620
+ "retention": {
1621
+ "type": "object",
1622
+ "additionalProperties": false,
1623
+ "properties": {
1624
+ "maxRecords": {
1625
+ "type": "integer",
1626
+ "minimum": 1,
1627
+ "maximum": 10000,
1628
+ "default": 1000
1629
+ },
1630
+ "maxAgeMs": {
1631
+ "type": "integer",
1632
+ "minimum": 1,
1633
+ "maximum": 2592000000,
1634
+ "default": 604800000
1635
+ },
1636
+ "artifactMaxBytes": {
1637
+ "type": "integer",
1638
+ "minimum": 1,
1639
+ "maximum": 1073741824,
1640
+ "default": 268435456
1641
+ }
1642
+ }
1643
+ }
1644
+ }
1645
+ },
1559
1646
  "interaction": {
1560
1647
  "type": "object",
1561
1648
  "additionalProperties": false,
@@ -1902,6 +1989,20 @@
1902
1989
  }
1903
1990
  }
1904
1991
  },
1992
+ "operatorActions": {
1993
+ "type": "object",
1994
+ "additionalProperties": false,
1995
+ "properties": {
1996
+ "enabled": {
1997
+ "description": "Allows API-key-authenticated, explicitly confirmed run-now and runtime enable/disable actions. Defaults off and never rewrites cron config sources.",
1998
+ "examples": [
1999
+ true
2000
+ ],
2001
+ "type": "boolean",
2002
+ "default": false
2003
+ }
2004
+ }
2005
+ },
1905
2006
  "enabled": {
1906
2007
  "description": "Enables the cron capability.",
1907
2008
  "examples": [
@@ -2318,7 +2419,7 @@
2318
2419
  }
2319
2420
  },
2320
2421
  "stripMentionText": {
2321
- "description": "When unset, defaults to `true` when `botUserIds` or `mentionTextAliases` is non-empty; otherwise `false`.",
2422
+ "description": "When unset, preserves one readable authenticated self-mention marker; `true` restores legacy full stripping and `false` keeps raw mention forms.",
2322
2423
  "examples": [
2323
2424
  false
2324
2425
  ],
@@ -21,6 +21,7 @@ my-agent/
21
21
  artifacts/ # JSONL run summaries + events
22
22
  workspace/ # runtime working directory (if not ".")
23
23
  memory/ # journal memory root (daily notes, graph.jsonl, index/)
24
+ process-jobs/ # opt-in owner-private Exec/Bash jobs and output
24
25
  whatsapp-auth/ # Baileys auth state (WhatsApp channel only)
25
26
  trace-sources/ # traceability registry (if kept folder-local)
26
27
  ```
@@ -150,7 +151,7 @@ new agent.
150
151
 
151
152
  // Tool policy (allow-all by default) + MCP servers. Deny wins; overlap is rejected.
152
153
  "tools": {
153
- "allowedTools": ["*"], // omit or include "*" = all tools; ["Read","Bash"] = just those; [] = none (chat-only)
154
+ "allowedTools": ["*"], // omit or include "*" = all tools; name PublishReplyFile in a restrictive list; [] = none (chat-only)
154
155
  "disallowedTools": ["Bash"], // deny wins even under allow-all; the escape hatch to subtract one tool
155
156
  "mcpConfigPath": "./mcp.json", // stdio/sse/http servers; inlined for SDK runtimes
156
157
  "web": {
@@ -168,6 +169,28 @@ new agent.
168
169
  // Exec is direct argv; use Bash only for shell syntax. NodeRepl shares state
169
170
  // only inside one run. All three use the same sandbox policy.
170
171
 
172
+ // Opt-in Pi-native Exec/Bash background jobs. The host owns the inherited
173
+ // POSIX process group (commands that daemonize into another group are unsupported),
174
+ // bounded output, exact Slack/Telegram/web wake, cancellation, and restart
175
+ // interruption. Unsupported on Windows; unknown keys are rejected.
176
+ "processJobs": {
177
+ "enabled": true, // default false
178
+ "stateDir": ".mono-agent/process-jobs", // relative child of the agent root
179
+ "maxConcurrent": 4, // cap 32
180
+ "maxActivePerConversation": 2, // cap 8
181
+ "maxQueued": 8, // cap 64
182
+ "maxRuntimeMs": 1800000, // 30 min; cap 24 h
183
+ "maxQueueAgeMs": 300000, // 5 min; cap 1 h
184
+ "maxOutputBytes": 1048576, // 1 MiB; cap 8 MiB
185
+ "previewChars": 2000, // cap 8000
186
+ "maxChainDepth": 4, // host-owned; cap 8
187
+ "retention": {
188
+ "maxRecords": 1000, // cap 10000
189
+ "maxAgeMs": 604800000, // 7 d; cap 30 d
190
+ "artifactMaxBytes": 268435456 // 256 MiB; cap 1 GiB
191
+ }
192
+ },
193
+
171
194
  // Human-in-the-loop bridge: structured blocking AskUser plus
172
195
  // run-scoped project-MCP progress. It auto-starts when either ask tool is
173
196
  // allowed, this block or an interaction env override is configured, or
@@ -378,6 +401,7 @@ new agent.
378
401
 
379
402
  "cron": {
380
403
  "dir": "cron", // optional: folder of *.md jobs (frontmatter + prompt body), default "cron"
404
+ "operatorActions": { "enabled": false }, // opt-in web run-now/runtime enable controls; requires tui.apiKey
381
405
  "jobs": [
382
406
  {
383
407
  "id": "daily",
@@ -421,7 +445,7 @@ A `.env` file in the folder is loaded automatically (exported shell variables wi
421
445
 
422
446
  For BuJo capture and the effective `bujo` tier that runs scheduled consolidation, configure `memory.llm`. Use `provider: "ollama"` with a local Ollama chat model string and optional `endpoint`, or `provider: "agent-host"` with `model` as a normal SDK runtime model reference such as `pi:openai-codex:gpt-5.5` and `executionMode: "sdk"`. `endpoint` is Ollama-only, and CLI-backed refs such as `codex:gpt-5.5` are rejected for memory LLMs until runtimes can enforce no external actions. The same values can be supplied via `MONO_AGENT_MEMORY_LLM_PROVIDER`, `MONO_AGENT_MEMORY_LLM_MODEL`, `MONO_AGENT_MEMORY_LLM_EXECUTION_MODE`, and `MONO_AGENT_MEMORY_LLM_ENDPOINT`. Routine BuJo consolidation runs via the in-app scheduler; the standalone `memory-bujo` maintenance CLI was removed (use `mono-agent memory <subcommand>` from the agent folder). `agent-host` LLM capture is an in-app composition path that injects the `LlmComplete` implementation into the BuJo store.
423
447
 
424
- For operator views, run `mono-agent tui` or `mono-agent web` from any directory once the agent is started. Both discover running agents via the trace-source registry. The TUI and assistant-ui web console chat over the default-on `tui` stream endpoint (`"tui": {"enabled": false}` opts out); on macOS, `mono-agent tui --configure` opens a persistent, visibly marked proposal-only SELF-CONFIG conversation against the managed background agent and must not be combined with `--local`. Approval, rejection, and no-change turns continue that session; only quitting exits it. `mono-agent web` is an always-on service namespace, binds `0.0.0.0:5050` by default, and has no app login; use `--loopback` to narrow it. The former read-only recorder command, package, and relay were removed; use `mono-agent tui` (recorded-run replay) or `mono-agent web` (live console). The low-level `mono-agent-tui` bin also supports `--responder <file>` (embedded, an ESM module default-exporting an `AgentResponderLike` or exporting `createResponder(env, cwd, configJson)`) and `--url <baseUrl>` (direct connect).
448
+ For operator views, run `mono-agent tui` or `mono-agent web` from any directory once the agent is started. Both discover running agents via the trace-source registry. The TUI and assistant-ui web console chat over the default-on `tui` stream endpoint (`"tui": {"enabled": false}` opts out); on macOS, `mono-agent tui --configure` opens a persistent, visibly marked proposal-only SELF-CONFIG conversation against the managed background agent and must not be combined with `--local`. Approval, rejection, and no-change turns continue that session; only quitting exits it. `mono-agent web` is an always-on service namespace, binds `0.0.0.0:5050` by default, and has no app login; use `--loopback` to narrow it. Capable agents expose stable read-only cron channels there. Run-now and runtime enable controls remain hidden unless `tui.apiKey` is configured and `cron.operatorActions.enabled` is explicitly true; every mutation still requires confirmation, is agent-audited, and does not rewrite job config. The former read-only recorder command, package, and relay were removed; use `mono-agent tui` (recorded-run replay) or `mono-agent web` (live console). The low-level `mono-agent-tui` bin also supports `--responder <file>` (embedded, an ESM module default-exporting an `AgentResponderLike` or exporting `createResponder(env, cwd, configJson)`) and `--url <baseUrl>` (direct connect).
425
449
 
426
450
  ## Programmatic Escape Hatch
427
451
 
@@ -36,7 +36,7 @@ Where should people (or other agents) reach this agent? Pick every channel that
36
36
  7. Cron (scheduled prompts, no inbound channel)
37
37
  ```
38
38
 
39
- Fills one config section per choice: built-in channels use `webhook`, `openaiApi`, `telegram`, `slack`, and `cron`; WhatsApp and A2A are external channel plugins under `channels.plugins[]` with package names `@mono-agent/whatsapp-adapter` and `@mono-agent/a2a-adapter`. Channels are independent: an unconfigured channel reports `waiting_for_config` and never blocks the others. For chat channels collect tokens and allowlists (chat IDs, channel IDs, JIDs). For HTTP channels collect host/port/path and whether non-loopback binding is allowed (default: loopback only); for webhook, offer an optional bearer key on loopback and require it whenever non-loopback is selected, storing it in `MONO_AGENT_WEBHOOK_API_KEY`. For paid or otherwise non-repeatable A2A dispatches, also collect a reviewed stable `provider.idempotency.namespace` (the authenticated-principal boundary), retention horizon, and lifetime unique-key capacity; callers must supply an existing stable logical key rather than a fresh key per attempt.
39
+ Fills one config section per choice: built-in channels use `webhook`, `openaiApi`, `telegram`, `slack`, and `cron`; WhatsApp and A2A are external channel plugins under `channels.plugins[]` with package names `@mono-agent/whatsapp-adapter` and `@mono-agent/a2a-adapter`. Channels are independent: an unconfigured channel reports `waiting_for_config` and never blocks the others. For chat channels collect tokens and allowlists (chat IDs, channel IDs, JIDs). For HTTP channels collect host/port/path and whether non-loopback binding is allowed (default: loopback only); for webhook, offer an optional bearer key on loopback and require it whenever non-loopback is selected, storing it in `MONO_AGENT_WEBHOOK_API_KEY`. For cron, collect the expression, timezone, prompt, and notification destination; ask separately whether the operator may run or runtime-disable jobs from the web console, keeping `cron.operatorActions.enabled` false unless explicitly requested and requiring `tui.apiKey` when enabled. For paid or otherwise non-repeatable A2A dispatches, also collect a reviewed stable `provider.idempotency.namespace` (the authenticated-principal boundary), retention horizon, and lifetime unique-key capacity; callers must supply an existing stable logical key rather than a fresh key per attempt.
40
40
 
41
41
  ## 3. Identity And Existing Knowledge
42
42
 
@@ -77,7 +77,7 @@ What tools does the agent need?
77
77
  Plus, independently: MCP servers from an mcp.json config file?
78
78
  ```
79
79
 
80
- Fills: `tools.allowedTools`, `tools.disallowedTools` (denylist wins, even under allow-all), `tools.mcpConfigPath`. The default is allow-all (`["*"]`) — write that unless the user asks to narrow. Under allow-all the adapter-derived send tools (`SlackSendMessage` / `TelegramSendMessage` / …) are auto-available once the channel is enabled; only a **specific** allowlist needs their exact names added. Valid enabled Slack/Telegram adapter config and destination allowlists are required either way. On the pi-native runtime `disallowedTools` does not filter external MCP-server tools — to withhold one, don't declare its server.
80
+ Fills: `tools.allowedTools`, `tools.disallowedTools` (denylist wins, even under allow-all), `tools.mcpConfigPath`. The default is allow-all (`["*"]`) — write that unless the user asks to narrow. Under allow-all the adapter-derived send tools (`SlackSendMessage` / `TelegramSendMessage` / …) and `PublishReplyFile` are auto-available once their host requirements are met; only a **specific** allowlist needs their exact names added. Valid enabled Slack/Telegram adapter config and destination allowlists are required either way. If the user needs MCP Apps, select a Pi-native primary and only Pi-native fallbacks: the host suppresses App registration and advertising when any possible route cannot carry the bridge. On the pi-native runtime `disallowedTools` does not filter external MCP-server tools — to withhold one, don't declare its server.
81
81
 
82
82
  For Pi process work, prefer the `Exec` built-in for one executable plus literal
83
83
  argv and offer `Bash` only when shell syntax is required. Offer `NodeRepl` when
@@ -54,8 +54,10 @@ Every framework capability and how a composed agent reaches it. This table is th
54
54
  | --- | --- | --- | --- |
55
55
  | Allow-all tool policy (omitted / `["*"]` = all tools; `[]` = none) | config | default `tools.allowedTools`; the harness no-policy safety net is `failClosedToolPolicy()` | `tool-policy.allow-all` |
56
56
  | Built-in tool allow/deny lists (deny wins, even under allow-all; pi doesn't deny external MCP tools) | config | `tools.allowedTools`, `tools.disallowedTools`; managed built-ins are Read/Write/Edit/Glob/Grep/Exec/Bash/NodeRepl/WebFetch/WebSearch | `tool-policy.allowlist`, `tool-policy.denylist`, `runtime.builtin-tools` |
57
+ | Pi-native Exec/Bash background process jobs with exact-thread wake | config + cli + auto | `processJobs.*` opts in (default off; unsupported on Windows). Only controller-ready exact Slack, Telegram, and web-console turns gain optional `background`; foreground schemas/behavior stay unchanged otherwise. Host-owned queue/runtime/output/depth/retention caps, owner-private records, inherited POSIX process groups, restart interruption, unforgeable-depth normal-tool wakes, Slack/Telegram same-message lifecycle updates, fail-closed live store health, `mono-agent jobs list\|get\|cancel`, and durable web cards are built in. Busy pre-turn wake admission remains pending without consuming its retry budget. Commands that daemonize into another group or session are unsupported | `agent-app.process-jobs` |
57
58
  | Local-first public-web research | config + auto | `tools.web.search.{backend,endpoint}` selects strict/first-choice loopback SearXNG or public no-credentials fallbacks; `tools.web.fetch.{render,browserCommand}` keeps static extraction as the default and optionally enables isolated agent-browser rendering; transient-fetch retry behavior is automatic rather than config-bearing | `runtime.web-research` |
58
59
  | MCP servers (stdio/sse/http) from a JSON file | config | `tools.mcpConfigPath` | `tool-policy.mcp-servers` |
60
+ | Generated reply files and Pi-native MCP Apps | config + auto | `PublishReplyFile` is included under allow-all or must be named in a restrictive `tools.allowedTools`; it publishes confined files through owner-private integrity storage for native Slack/Telegram upload and web download. MCP Apps appear only when every configured runtime route supports the Pi-owned bridge, and render only in the hardened web console. Files and Apps share a 20-part run cap; retention follows `artifacts.retention.maxAgeDays` | `agent-app.rich-replies` |
59
61
  | Durable origin-bound continuations for trusted stdio/loopback-HTTP MCP services | config + auto | `tools.continuationServers` + `continuations.*`; interactive claims pin a bounded immutable origin snapshot before commit, exact rollover buckets are preserved, v3 state is restart-safe, and unavailable/legacy snapshots use a fixed zero-model fallback | `agent-app.durable-continuations` |
60
62
  | Adapter-derived send tools for enabled Slack/Telegram adapters | config | auto-available under allow-all once the channel is enabled; a **specific** `tools.allowedTools` must include `SlackSendMessage` / `TelegramSendMessage`; valid `slack.*` / `telegram.*` config and existing adapter allowlists provide credentials and destination bounds; confirmed message posts are idempotently recorded in destination history | `agent-app.adapter-send-tools` |
61
63
  | Interaction bridge for adapter-send history, structured blocking asks, and MCP progress | config + auto | `interaction.bridge.{host,port}`, `interaction.askUser.timeoutMs`, `interaction.progress.enabled`; env `MONO_AGENT_INTERACTION_BRIDGE_HOST`, `MONO_AGENT_INTERACTION_BRIDGE_PORT`, `MONO_AGENT_ASK_USER_TIMEOUT_MS`, `MONO_AGENT_PROGRESS_ENABLED`. It auto-starts for configured Slack/Telegram send tools, when `AskUser` is allowed, when an `interaction` block or interaction env override is configured, or when `interaction.progress.enabled` resolves true and `tools.mcpRequestContextServers` names at least one opted project stdio MCP server. AskUser presents all questions together on web and sequential native controls on Slack/Telegram. | `interaction.bridge` |
@@ -84,8 +86,8 @@ Every framework capability and how a composed agent reaches it. This table is th
84
86
  | WhatsApp (Baileys, QR login, group mention/any triggers) | config | `channels.plugins[].package: "@mono-agent/whatsapp-adapter"` plus plugin `config.{enabled,allowedChatJids,allowAllChats,groupMode,botJids,mentionTextAliases,stripMentionText}` | `whatsapp.baileys` |
85
87
  | A2A provider (Agent Card, JSON-RPC + REST, streaming, bearer, configurable request-body limit, opt-in durable dispatch identity) | config | `channels.plugins[].package: "@mono-agent/a2a-adapter"` plus plugin `config.provider` (including `maxRequestBytes` and `idempotency.{namespace,stateDir,retentionMs,maxRecords}`), `config.agent`, `config.skill`; `config.enabled` is canonical | `a2a.provider` |
86
88
  | A2A consumer settings (remote agent URLs, timeouts) and calls | config + code | same A2A plugin entry's `config.consumer`; calls via `sendA2AMessage({ idempotencyKey })` or `createA2AConsumerResponder({ idempotencyKeyForRequest })` | `a2a.consumer` |
87
- | TUI stream endpoint (operator console transport) | config | `tui.{enabled,host,port,basePath,allowNonLoopback,apiKey}`; default on, loopback | `tui.stream-endpoint` |
88
- | Cron jobs (five-field expressions, timezones, stable job-id-seeded `H`; agent-app pins overlap to skip) | config + code | `cron.jobs[]`, including per-job `model` / `effort`; single-job `MONO_AGENT_CRON_*`, or one markdown file per job in `cron.dir` / `MONO_AGENT_CRON_DIR` (default `cron/`); queue/replace controls are programmatic-only `startCronAdapter` options | `cron.scheduled-prompts` |
89
+ | TUI stream endpoint (operator console transport) | config | `tui.{enabled,host,port,basePath,allowNonLoopback,apiKey}`; default on, loopback; `/v1/info` capability-gates exact AskUser and agent-owned cron routes without changing wire schema 1 | `tui.stream-endpoint` |
90
+ | Cron jobs (five-field expressions, timezones, stable job-id-seeded `H`; agent-app pins overlap to skip) | config + code | `cron.jobs[]`, including per-job `model` / `effort`; single-job `MONO_AGENT_CRON_*`, or one markdown file per job in `cron.dir` / `MONO_AGENT_CRON_DIR` (default `cron/`); `cron.operatorActions.enabled` / `MONO_AGENT_CRON_OPERATOR_ACTIONS_ENABLED` opt in to authenticated, confirmed, idempotent run-now and runtime enable controls (default off; never rewrites config); queue/replace controls are programmatic-only `startCronAdapter` options | `cron.scheduled-prompts` |
89
91
  | Cron per-run watchdog | config + code | `cron.jobs[].maxRunMs` or `maxRunMs` frontmatter; programmatic adapter fallback via `startCronAdapter({ maxRunMs })` | `cron.run-watchdog` |
90
92
  | Per-request runtime model and effort overrides | config + code | `cron.jobs[].{model,effort}`; `webhook.endpoints[].{model,effort}` plus request body `{model,effort}` (request wins); Telegram `/model` and `/effort`; Slack Block Kit selectors through thread-local `@agent /model` / `@agent /effort` and channel-wide `/<bot>-model` / `/<bot>-effort`, all over configured primary/fallback models | `runtime.per-trigger-model` |
91
93
  | Native final-answer notification for cron/webhook | config | Per job/endpoint `notify`; explicit `notifyConversationId` wins, otherwise inference occurs only with exactly one notify-capable Telegram/Slack candidate. With 0 or 2+ candidates delivery is skipped with a warning. Artifact-derived candidates use a 30-second post-scan cache. Telegram/Slack artifact commits invalidate it immediately; runs using default synthetic `cron:`/`webhook:` ids do not. Other artifact changes appear after expiry and the next scan. Cron model-exhaustion notices require an explicit `notifyConversationId` and never infer; `notifyFailureCooldownHours` rate-limits them. | `channel.native-notify` |
@@ -99,8 +101,8 @@ Every framework capability and how a composed agent reaches it. This table is th
99
101
  | JSONL run artifacts (events + summaries; strings capped; non-numeric values under sensitive-looking object keys are redacted; numeric values under matched keys are retained; retained free text is scanned for a closed set of high-confidence credential shapes) | config | `artifacts.dir`, `artifacts.retention`, `artifacts.memoryRetention` | `observability.jsonl-artifacts` |
100
102
  | Trace-source registry (heartbeat manifests `mono-agent status` reads) | config | `traceability.{registryDir,sourceId,sourceLabel,heartbeatMs,staleAfterMs,globalDiscovery}` | `observability.trace-registry` |
101
103
  | Phoenix trace viewer (best-effort terminal-batched OTLP exporter; independent local JSONL has bounded terminal snapshots and can lose RAM-buffered events on crash) | config | `observability.exporters` (phoenix entry) | `observability.phoenix-exporter` |
102
- | Operator console (live chat with thinking/tool/telemetry insight, run replay, config view) | cli | `mono-agent tui [--agent <label>]`; agents serve the `tui` stream endpoint by default (`tui.enabled`, loopback) | — |
103
- | Always-on multi-agent web console (persistent conversations and same-thread quotes, live active-agent skill discovery with canonical `$skill-name` insertion, fixed compact/expanded rail, offline-agent filtering that always preserves pinned/selected agents, alive-page/PWA response notifications, attachments, model/effort selection, reasoning/tools, hidden telemetry-backed cumulative context usage, cancellation) | cli | `mono-agent web start\|stop\|restart\|status\|logs\|run`; skill autocomplete/browse reads the running agent's bounded registry and never sends on selection; bare `mono-agent web` is read-only status/help; default `0.0.0.0:5050`, `--loopback` narrows to `127.0.0.1`; notifications require explicit per-origin browser permission plus a secure context and do not use Web Push; package `@mono-agent/web`; no app authentication, so LAN/Tailnet reachability is the access boundary | — |
104
+ | Operator console (live chat with thinking/tool/telemetry insight, run replay, config view, and owner-authenticated process-job routes when enabled) | cli | `mono-agent tui [--agent <label>]`; agents serve the `tui` stream endpoint by default (`tui.enabled`, loopback); `mono-agent jobs` uses a separate owner capability | — |
105
+ | Always-on multi-agent web console (persistent conversations and same-thread quotes, durable process-job cards, live active-agent skill discovery with canonical `$skill-name` insertion, fixed compact/expanded rail, offline-agent filtering that always preserves pinned/selected agents, durable Web Push, exact structured AskUser reconciliation, stable read-only per-cron channels with bounded keyset history, attachments, model/effort selection, reasoning/tools, hidden telemetry-backed cumulative context usage, cancellation) | cli | `mono-agent web start\|stop\|restart\|status\|logs\|run`; stable cron routes are `/agents/:sourceId/cron/:jobId`, read next-run only from capable agents, and expose confirmed mutations only when the agent has an operator key and `cron.operatorActions.enabled`; process-job cards are source/thread-bound and update through the owner-authenticated operator proxy without a live browser; skill autocomplete/browse reads the running agent's bounded registry and never sends on selection; bare `mono-agent web` is read-only status/help; default `0.0.0.0:5050`, `--loopback` narrows to `127.0.0.1`; package `@mono-agent/web`; no app authentication, so LAN/Tailnet reachability is the access boundary | — |
104
106
  | Managed proposal-only SELF-CONFIG conversation | cli + tool | macOS `mono-agent tui --configure` attaches to the authoritative background agent; persistent marker and capability map; stable configuration conversation with a fresh proposal capability after each checkpoint; host-gated `ProposeAgentConfiguration`; approval restarts and waits for readiness, failed start rolls files/agent back; only quitting exits. `--local` is ordinary chat only; off macOS configuration is manual | — |
105
107
  | Setup presets (saved answer-sets: generate config + `.env.example` + checklist) | cli | `mono-agent presets list\|show <id>`, `mono-agent init --preset <id> --yes` (the `recipes` command and `--recipe` alias were removed) | — |
106
108
  | Interactive setup wizard (preset/custom; exact `IDENTITY.md` → `## Role` prompt/outcome; walks model→channels→memory→tools→sandbox→observability; Journal/BuJo explicitly choose Ollama or LM Studio service root/model/dimension/optional auth env using typed discovery and a real probe; macOS starts the background agent before persistent SELF-CONFIG) | cli | `mono-agent init` (no flags, on a TTY; `setup` alias); manual embedding entry still requires readiness probe; flags/non-TTY stay scaffold-only; unsupported platforms use manual configuration/foreground start/ordinary TUI | — |
@@ -82,6 +82,22 @@ companion, not an MCP server injected into every composed agent. Add project
82
82
  MCP servers to the agent's own `mcp.json`; do not copy the documentation server
83
83
  there unless the resulting agent itself must answer mono-agent framework questions.
84
84
 
85
+ `RunHistory` and `SessionHistory` are app-owned request-scoped read tools, not
86
+ entries for `mcp.json`. `SessionHistory` searches the current logical session's
87
+ retained managed-tool calls/results and needs no config key. Allow-all exposes
88
+ it on compatible routes; a specific allowlist must name `SessionHistory`.
89
+ Direct OpenCode/ACP retain and cold-project lifecycle evidence but cannot expose
90
+ that request-scoped tool.
91
+ `@mono-agent/agent-app` also owns rich reply composition. `PublishReplyFile`
92
+ copies a confined generated file into owner-private integrity storage and is
93
+ available under allow-all (or by exact name in a restrictive policy). Supported
94
+ Pi-native MCP tool results can register their declared MCP App UI resource for
95
+ the web console. An all-Pi route chain is required for Apps; direct or fallback
96
+ routes that cannot carry the bridge do not advertise it. Adapters consume the
97
+ shared reply-part contract: Slack and Telegram confirm native uploads, the web
98
+ serves authorized downloads and sandboxed Apps, and machine/verbatim adapters
99
+ preserve answer text when they cannot represent a part.
100
+
85
101
  ```ts
86
102
  import { createToolPolicy, toolPolicyToRuntimeOptions } from "@mono-agent/agent-harness";
87
103
 
@@ -102,8 +118,8 @@ Communication adapters are edge packages. They accept an `AgentResponder` and ow
102
118
 
103
119
  | Surface | Package | First smoke |
104
120
  | --- | --- | --- |
105
- | Telegram | `@mono-agent/telegram-adapter` | Allowed chat sends a message |
106
- | Slack | `@mono-agent/slack-adapter` | Allowed channel or DM gets the final reply |
121
+ | Telegram | `@mono-agent/telegram-adapter` | Allowed chat receives text and a generated reply file through `sendDocument` |
122
+ | Slack | `@mono-agent/slack-adapter` | Allowed channel or DM receives text and a generated reply file through the external upload flow |
107
123
  | WhatsApp | `@mono-agent/whatsapp-adapter` (external channel plugin) | Allowed sender/group trigger produces a reply |
108
124
  | OpenAI-compatible API | `@mono-agent/openai-api-adapter` | `curl /v1/models` and `/v1/chat/completions` |
109
125
  | Operator endpoint | `@mono-agent/operator-adapter` | `mono-agent tui` and `mono-agent web` connect for chat |
@@ -118,7 +134,7 @@ Adapters must not import the harness, runtime adapter, memory package (`@mono-ag
118
134
  Use:
119
135
 
120
136
  - `@mono-agent/tui` for the pi-tui operator console (`mono-agent tui`): live chat with structured stream-event insight, recorded-run replay, and config view. Remote event frames have a strict 256 KiB UTF-8 NDJSON cap: assistant-thought/tool-call payload fields are reduced and remeasured, while another oversized variant or a reducible event whose minimal form still does not fit becomes a bounded `oversized_event` marker. Other frame kinds are unaffected, and replay contains only sensitive-key-redacted, credential-scanned, capped events that reached terminal JSONL persistence.
121
- - `@mono-agent/web` for the assistant-ui always-on browser console (`mono-agent web`): persistent multi-agent conversations and same-thread quotes, fixed compact/expanded agent navigation with offline filtering, explicit alive-page/PWA response notifications, device-local file picking, streamed reasoning/tools, internal telemetry-backed cumulative context usage, cancellation, LAN-default HTTP on port 5050, and conflict-safe optional Tailscale Serve HTTPS. It has no app login; network reachability is the access boundary.
137
+ - `@mono-agent/web` for the assistant-ui always-on browser console (`mono-agent web`): persistent multi-agent conversations and same-thread quotes, fixed compact/expanded agent navigation with offline filtering, explicit alive-page/PWA response notifications, device-local file picking, integrity-checked reply downloads, confirmation-gated MCP Apps in a double-frame sandbox, streamed reasoning/tools, internal telemetry-backed cumulative context usage, cancellation, LAN-default HTTP on port 5050, and conflict-safe optional Tailscale Serve HTTPS. It has no app login; network reachability is the access boundary.
122
138
  - `@mono-agent/operator-adapter` for the loopback NDJSON stream endpoint the TUI and web chat console connect to (`tui` config section, on by default).
123
139
  - `@mono-agent/observability` for JSONL event artifacts, summaries, trace-source registration, and the `@mono-agent/observability/otel` Phoenix OTLP exporter configured via `observability.exporters`.
124
140
 
@@ -273,20 +273,20 @@ per-route form for a new agent.
273
273
  ## 15. Interactive agent with long jobs and large media
274
274
  **For:** a builder whose Telegram agent needs to ask before acting, run multi-minute tools, and exchange large files.
275
275
  **Goal:** one Telegram agent uses `AskUser`, long-running MCP tool progress, a self-hosted Bot API server, and `TelegramSendFile`.
276
- **Features:** `telegram.long-polling`, `agent-app.adapter-send-tools`, `interaction.ask-user`, `interaction.progress`, `tool-policy.mcp-servers`.
276
+ **Features:** `telegram.long-polling`, `agent-app.adapter-send-tools`, `agent-app.rich-replies`, `interaction.ask-user`, `interaction.progress`, `tool-policy.mcp-servers`.
277
277
 
278
278
  **Bridge startup:** the interaction bridge defaults to loopback and auto-starts when `AskUser` is allowed, when the `interaction` block or an interaction env override is configured, or when `interaction.progress.enabled` resolves true and `tools.mcpRequestContextServers` names at least one opted project MCP server. Keep `interaction.bridge.host` on loopback because non-loopback values are not rejected. AskUser takes one to five structured questions with two or three described choices each; Telegram presents them sequentially with native buttons, Other/custom reply, and Done for multi-select.
279
279
 
280
280
  ```json
281
281
  {
282
282
  "runtime": { "model": "pi:openai-codex:gpt-5.5", "executionMode": "sdk" },
283
- "tools": { "allowedTools": ["Read", "AskUser", "TelegramSendFile"], "mcpConfigPath": "./.mcp.json", "mcpCallMaxTotalTimeoutMs": 2700000 },
283
+ "tools": { "allowedTools": ["Read", "AskUser", "TelegramSendFile", "PublishReplyFile"], "mcpConfigPath": "./.mcp.json", "mcpCallMaxTotalTimeoutMs": 2700000 },
284
284
  "interaction": { "bridge": { "host": "127.0.0.1", "port": 4471 }, "askUser": { "timeoutMs": 600000 }, "progress": { "enabled": true } },
285
285
  "telegram": { "enabled": true, "allowedChatIds": ["123456789"], "apiRoot": "http://127.0.0.1:8081", "attachments": { "maxBytes": 268435456, "maxUploadBytes": 268435456 } }
286
286
  }
287
287
  ```
288
288
  **Steps:** run a loopback self-hosted Bot API server if files exceed 20 MB, wire a long-running MCP tool in `.mcp.json`, `validate`, `start`.
289
- **Smoke:** send media with no caption, answer the `AskUser` question, watch progress update during the long job, and receive the generated file via `TelegramSendFile`.
289
+ **Smoke:** send media with no caption, answer the `AskUser` question, watch progress update during the long job, and receive both an explicit `TelegramSendFile` send and a final generated reply file published with `PublishReplyFile` as native documents.
290
290
 
291
291
  ## 16. Local-first web research agent
292
292
  **For:** a researcher wanting operator-owned search infrastructure and bounded public-page extraction.
@@ -116,8 +116,9 @@ pnpm run test:demo
116
116
  | Surface | Smoke |
117
117
  | --- | --- |
118
118
  | TUI | Start the host, connect with ordinary `mono-agent tui`, and complete one real prompt against the running responder. |
119
- | Telegram | Send one allowed chat message that uses a tool; verify the final reply arrives as a new message and the transient activity ledger is deleted. |
120
- | Slack | Send one allowed DM or channel message that uses a tool; verify formatting, a fresh final reply, and deletion of the transient activity ledger. Open `@agent /model`, choose a configured option, and verify DM-wide or shared-channel-thread-local scope as appropriate. |
119
+ | Telegram | Send one allowed chat message that uses a tool; verify the final reply arrives as a new message and the transient activity ledger is deleted. When generated reply files are required, call `PublishReplyFile` and verify one native document arrives at the exact reply target. |
120
+ | Slack | Send one allowed DM or channel message that uses a tool; verify formatting, a fresh final reply, and deletion of the transient activity ledger. When generated reply files are required, call `PublishReplyFile` and verify the external upload completes in the exact channel/thread. Open `@agent /model`, choose a configured option, and verify DM-wide or shared-channel-thread-local scope as appropriate. |
121
+ | Web rich replies | In the web console, download one generated reply file and verify its name, size, and content. For an MCP App on an all-Pi route chain, verify the App appears connected, a tool call shows the bounded/redacted confirmation preview, keyboard focus stays in the modal, and a denied action leaves the App isolated. |
121
122
  | Adapter send tools | When `SlackSendMessage` / `TelegramSendMessage` are available (allow-all, or an explicit `tools.allowedTools` entry) with the channel enabled, call them from a non-Slack/Telegram surface such as TUI, cron, or OpenAI API to an allowed destination; verify delivery, then reply at the destination and verify the exact sent text appears in replayed history. |
122
123
  | WhatsApp | Send one allowed sender/group trigger and verify the reply. |
123
124
  | OpenAI API | `curl /v1/models` and `/v1/chat/completions`. |
@@ -126,6 +127,7 @@ pnpm run test:demo
126
127
  | Cron | Run a one-off scheduled invocation or wait for one tick. |
127
128
  | Observability | Confirm a run writes a JSONL artifact with strings capped: non-numeric values under sensitive-looking object keys are redacted; numeric values under matched keys are retained; retained free text is scanned for a closed set of high-confidence credential shapes. If an `observability.exporters` Phoenix entry is set, confirm the trace appears in Phoenix. |
128
129
  | Memory recall tool | With any memory tier configured (`memory.recallTool.enabled` defaults on), ask the agent to recall an old note and confirm `MemoryRecall` appears separately from action-tool allowlists and returns it. |
130
+ | Session tool history | Complete a managed tool call, start a later cold turn in the same logical conversation, and confirm its bounded path-opaque call/result projection is available. After compaction, use `SessionHistory.search` then `get`; verify another conversation and the current run remain unavailable. A crash-dangling call must recover once as `interrupted` without rerun, while a clean writer shutdown must not be reported as crash recovery. |
129
131
  | Web research | Run `mono-agent validate` and require the Web search & fetch section to prove configured loopback SearXNG plus `agent-browser >=0.33.1` when rendering is enabled. Then ask for two query variants and one official-page fetch; require canonical ranked URLs, untrusted-content boundaries, and bounded timing metadata without query/URL leakage. |
130
132
  | Semantic memory search | With `memory.embeddings` set, first prove the configured provider only: Ollama model advertises `embedding` through `/api/show` and answers `/api/embed`, or LM Studio model has exact `type: "embedding"` in `/api/v1/models` and answers `/v1/embeddings`. Verify the finite vector dimension matches config, then ask a paraphrased question about an old note and confirm `MemoryRecall` returns it. Never accept a cross-provider fallback as proof. |
131
133