@mono-agent/agent-app 0.11.2 → 0.11.4

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 (374) hide show
  1. package/LICENSE +674 -0
  2. package/README.md +222 -26
  3. package/dist/adapter-send-tools-main.js +7 -1
  4. package/dist/adapter-send-tools-main.js.map +1 -1
  5. package/dist/adapter-send-tools.d.ts +19 -1
  6. package/dist/adapter-send-tools.d.ts.map +1 -1
  7. package/dist/adapter-send-tools.js +127 -13
  8. package/dist/adapter-send-tools.js.map +1 -1
  9. package/dist/app-config.d.ts.map +1 -1
  10. package/dist/app-config.js +15 -2
  11. package/dist/app-config.js.map +1 -1
  12. package/dist/app-controller-channels.d.ts +8 -0
  13. package/dist/app-controller-channels.d.ts.map +1 -0
  14. package/dist/app-controller-channels.js +207 -0
  15. package/dist/app-controller-channels.js.map +1 -0
  16. package/dist/app-controller-continuation.d.ts +26 -0
  17. package/dist/app-controller-continuation.d.ts.map +1 -0
  18. package/dist/app-controller-continuation.js +198 -0
  19. package/dist/app-controller-continuation.js.map +1 -0
  20. package/dist/app-controller-lifecycle.d.ts +6 -0
  21. package/dist/app-controller-lifecycle.d.ts.map +1 -0
  22. package/dist/app-controller-lifecycle.js +81 -0
  23. package/dist/app-controller-lifecycle.js.map +1 -0
  24. package/dist/app-controller-maintenance.d.ts +13 -0
  25. package/dist/app-controller-maintenance.d.ts.map +1 -0
  26. package/dist/app-controller-maintenance.js +180 -0
  27. package/dist/app-controller-maintenance.js.map +1 -0
  28. package/dist/app-controller-memory-health.d.ts +12 -0
  29. package/dist/app-controller-memory-health.d.ts.map +1 -0
  30. package/dist/app-controller-memory-health.js +160 -0
  31. package/dist/app-controller-memory-health.js.map +1 -0
  32. package/dist/app-controller-memory.d.ts +9 -0
  33. package/dist/app-controller-memory.d.ts.map +1 -0
  34. package/dist/app-controller-memory.js +83 -0
  35. package/dist/app-controller-memory.js.map +1 -0
  36. package/dist/app-controller-responder.d.ts +20 -0
  37. package/dist/app-controller-responder.d.ts.map +1 -0
  38. package/dist/app-controller-responder.js +246 -0
  39. package/dist/app-controller-responder.js.map +1 -0
  40. package/dist/app-controller-traceability.d.ts +25 -0
  41. package/dist/app-controller-traceability.d.ts.map +1 -0
  42. package/dist/app-controller-traceability.js +418 -0
  43. package/dist/app-controller-traceability.js.map +1 -0
  44. package/dist/app-controller-utils.d.ts +38 -0
  45. package/dist/app-controller-utils.d.ts.map +1 -0
  46. package/dist/app-controller-utils.js +185 -0
  47. package/dist/app-controller-utils.js.map +1 -0
  48. package/dist/app-controller.d.ts +400 -0
  49. package/dist/app-controller.d.ts.map +1 -0
  50. package/dist/app-controller.js +336 -0
  51. package/dist/app-controller.js.map +1 -0
  52. package/dist/app.d.ts +7 -115
  53. package/dist/app.d.ts.map +1 -1
  54. package/dist/app.js +6 -1912
  55. package/dist/app.js.map +1 -1
  56. package/dist/artifact-retention.d.ts +4 -0
  57. package/dist/artifact-retention.d.ts.map +1 -1
  58. package/dist/artifact-retention.js +38 -0
  59. package/dist/artifact-retention.js.map +1 -1
  60. package/dist/backfill.d.ts +3 -1
  61. package/dist/backfill.d.ts.map +1 -1
  62. package/dist/backfill.js +5 -1
  63. package/dist/backfill.js.map +1 -1
  64. package/dist/background-runtime.d.ts +27 -0
  65. package/dist/background-runtime.d.ts.map +1 -1
  66. package/dist/background-runtime.js +383 -205
  67. package/dist/background-runtime.js.map +1 -1
  68. package/dist/background-worker-lease.d.ts.map +1 -1
  69. package/dist/background-worker-lease.js +41 -241
  70. package/dist/background-worker-lease.js.map +1 -1
  71. package/dist/background.d.ts +31 -9
  72. package/dist/background.d.ts.map +1 -1
  73. package/dist/background.js +543 -272
  74. package/dist/background.js.map +1 -1
  75. package/dist/channel-drivers/cron.d.ts +11 -0
  76. package/dist/channel-drivers/cron.d.ts.map +1 -0
  77. package/dist/channel-drivers/cron.js +168 -0
  78. package/dist/channel-drivers/cron.js.map +1 -0
  79. package/dist/channel-drivers/live.d.ts +11 -0
  80. package/dist/channel-drivers/live.d.ts.map +1 -0
  81. package/dist/channel-drivers/live.js +47 -0
  82. package/dist/channel-drivers/live.js.map +1 -0
  83. package/dist/channel-drivers/native-notify.d.ts +27 -0
  84. package/dist/channel-drivers/native-notify.d.ts.map +1 -0
  85. package/dist/channel-drivers/native-notify.js +94 -0
  86. package/dist/channel-drivers/native-notify.js.map +1 -0
  87. package/dist/channel-drivers/openai-api.d.ts +7 -0
  88. package/dist/channel-drivers/openai-api.d.ts.map +1 -0
  89. package/dist/channel-drivers/openai-api.js +63 -0
  90. package/dist/channel-drivers/openai-api.js.map +1 -0
  91. package/dist/channel-drivers/shared.d.ts +4 -0
  92. package/dist/channel-drivers/shared.d.ts.map +1 -0
  93. package/dist/channel-drivers/shared.js +5 -0
  94. package/dist/channel-drivers/shared.js.map +1 -0
  95. package/dist/channel-drivers/slack.d.ts +14 -0
  96. package/dist/channel-drivers/slack.d.ts.map +1 -0
  97. package/dist/channel-drivers/slack.js +227 -0
  98. package/dist/channel-drivers/slack.js.map +1 -0
  99. package/dist/channel-drivers/telegram.d.ts +11 -0
  100. package/dist/channel-drivers/telegram.d.ts.map +1 -0
  101. package/dist/channel-drivers/telegram.js +244 -0
  102. package/dist/channel-drivers/telegram.js.map +1 -0
  103. package/dist/channel-drivers/tui.d.ts +15 -0
  104. package/dist/channel-drivers/tui.d.ts.map +1 -0
  105. package/dist/channel-drivers/tui.js +108 -0
  106. package/dist/channel-drivers/tui.js.map +1 -0
  107. package/dist/channel-drivers/webhook.d.ts +7 -0
  108. package/dist/channel-drivers/webhook.d.ts.map +1 -0
  109. package/dist/channel-drivers/webhook.js +115 -0
  110. package/dist/channel-drivers/webhook.js.map +1 -0
  111. package/dist/channels.d.ts +21 -81
  112. package/dist/channels.d.ts.map +1 -1
  113. package/dist/channels.js +11 -1174
  114. package/dist/channels.js.map +1 -1
  115. package/dist/cli-args.d.ts +121 -0
  116. package/dist/cli-args.d.ts.map +1 -0
  117. package/dist/cli-args.js +532 -0
  118. package/dist/cli-args.js.map +1 -0
  119. package/dist/cli-background-command.d.ts +59 -0
  120. package/dist/cli-background-command.d.ts.map +1 -0
  121. package/dist/cli-background-command.js +475 -0
  122. package/dist/cli-background-command.js.map +1 -0
  123. package/dist/cli-cancellation.d.ts +6 -0
  124. package/dist/cli-cancellation.d.ts.map +1 -0
  125. package/dist/cli-cancellation.js +23 -0
  126. package/dist/cli-cancellation.js.map +1 -0
  127. package/dist/cli-commands.d.ts +12 -0
  128. package/dist/cli-commands.d.ts.map +1 -0
  129. package/dist/cli-commands.js +306 -0
  130. package/dist/cli-commands.js.map +1 -0
  131. package/dist/cli-help.d.ts +11 -0
  132. package/dist/cli-help.d.ts.map +1 -0
  133. package/dist/cli-help.js +262 -0
  134. package/dist/cli-help.js.map +1 -0
  135. package/dist/cli-init-command.d.ts +60 -0
  136. package/dist/cli-init-command.d.ts.map +1 -0
  137. package/dist/cli-init-command.js +1910 -0
  138. package/dist/cli-init-command.js.map +1 -0
  139. package/dist/cli-install-skill-command.d.ts +3 -0
  140. package/dist/cli-install-skill-command.d.ts.map +1 -0
  141. package/dist/cli-install-skill-command.js +51 -0
  142. package/dist/cli-install-skill-command.js.map +1 -0
  143. package/dist/cli-sandbox-command.d.ts +10 -0
  144. package/dist/cli-sandbox-command.d.ts.map +1 -0
  145. package/dist/cli-sandbox-command.js +100 -0
  146. package/dist/cli-sandbox-command.js.map +1 -0
  147. package/dist/cli-validate-config-command.d.ts +36 -0
  148. package/dist/cli-validate-config-command.d.ts.map +1 -0
  149. package/dist/cli-validate-config-command.js +317 -0
  150. package/dist/cli-validate-config-command.js.map +1 -0
  151. package/dist/cli.d.ts +6 -248
  152. package/dist/cli.d.ts.map +1 -1
  153. package/dist/cli.js +6 -3792
  154. package/dist/cli.js.map +1 -1
  155. package/dist/config-reference.d.ts +2 -1
  156. package/dist/config-reference.d.ts.map +1 -1
  157. package/dist/config-reference.js +34 -8
  158. package/dist/config-reference.js.map +1 -1
  159. package/dist/configured-agent.d.ts +23 -0
  160. package/dist/configured-agent.d.ts.map +1 -1
  161. package/dist/configured-agent.js +92 -13
  162. package/dist/configured-agent.js.map +1 -1
  163. package/dist/continuation-dispatch-worker.d.ts +21 -0
  164. package/dist/continuation-dispatch-worker.d.ts.map +1 -0
  165. package/dist/continuation-dispatch-worker.js +425 -0
  166. package/dist/continuation-dispatch-worker.js.map +1 -0
  167. package/dist/continuation-http-routes.d.ts +15 -0
  168. package/dist/continuation-http-routes.d.ts.map +1 -0
  169. package/dist/continuation-http-routes.js +265 -0
  170. package/dist/continuation-http-routes.js.map +1 -0
  171. package/dist/continuation-operator-api.d.ts +18 -0
  172. package/dist/continuation-operator-api.d.ts.map +1 -0
  173. package/dist/continuation-operator-api.js +164 -0
  174. package/dist/continuation-operator-api.js.map +1 -0
  175. package/dist/continuation-origin-store.d.ts +19 -0
  176. package/dist/continuation-origin-store.d.ts.map +1 -0
  177. package/dist/continuation-origin-store.js +273 -0
  178. package/dist/continuation-origin-store.js.map +1 -0
  179. package/dist/continuation-service-errors.d.ts +18 -0
  180. package/dist/continuation-service-errors.d.ts.map +1 -0
  181. package/dist/continuation-service-errors.js +35 -0
  182. package/dist/continuation-service-errors.js.map +1 -0
  183. package/dist/continuation-service-helpers.d.ts +39 -0
  184. package/dist/continuation-service-helpers.d.ts.map +1 -0
  185. package/dist/continuation-service-helpers.js +308 -0
  186. package/dist/continuation-service-helpers.js.map +1 -0
  187. package/dist/continuation-service-origin.d.ts +55 -0
  188. package/dist/continuation-service-origin.d.ts.map +1 -0
  189. package/dist/continuation-service-origin.js +325 -0
  190. package/dist/continuation-service-origin.js.map +1 -0
  191. package/dist/continuation-service-types.d.ts +110 -0
  192. package/dist/continuation-service-types.d.ts.map +1 -0
  193. package/dist/continuation-service-types.js +11 -0
  194. package/dist/continuation-service-types.js.map +1 -0
  195. package/dist/continuation-service.d.ts +4 -97
  196. package/dist/continuation-service.d.ts.map +1 -1
  197. package/dist/continuation-service.js +9 -1525
  198. package/dist/continuation-service.js.map +1 -1
  199. package/dist/continuation-store-fs.d.ts +15 -0
  200. package/dist/continuation-store-fs.d.ts.map +1 -0
  201. package/dist/continuation-store-fs.js +247 -0
  202. package/dist/continuation-store-fs.js.map +1 -0
  203. package/dist/continuation-store-policy.d.ts +21 -0
  204. package/dist/continuation-store-policy.d.ts.map +1 -0
  205. package/dist/continuation-store-policy.js +278 -0
  206. package/dist/continuation-store-policy.js.map +1 -0
  207. package/dist/continuation-store-records.d.ts +9 -0
  208. package/dist/continuation-store-records.d.ts.map +1 -0
  209. package/dist/continuation-store-records.js +221 -0
  210. package/dist/continuation-store-records.js.map +1 -0
  211. package/dist/continuation-store-types.d.ts +173 -0
  212. package/dist/continuation-store-types.d.ts.map +1 -0
  213. package/dist/continuation-store-types.js +26 -0
  214. package/dist/continuation-store-types.js.map +1 -0
  215. package/dist/continuation-store.d.ts +4 -138
  216. package/dist/continuation-store.d.ts.map +1 -1
  217. package/dist/continuation-store.js +145 -1049
  218. package/dist/continuation-store.js.map +1 -1
  219. package/dist/doctor.d.ts +10 -5
  220. package/dist/doctor.d.ts.map +1 -1
  221. package/dist/doctor.js +629 -58
  222. package/dist/doctor.js.map +1 -1
  223. package/dist/init.d.ts +2 -0
  224. package/dist/init.d.ts.map +1 -1
  225. package/dist/init.js +92 -239
  226. package/dist/init.js.map +1 -1
  227. package/dist/interaction-bridge.d.ts +19 -0
  228. package/dist/interaction-bridge.d.ts.map +1 -1
  229. package/dist/interaction-bridge.js +130 -0
  230. package/dist/interaction-bridge.js.map +1 -1
  231. package/dist/launchd-logs.d.ts +91 -0
  232. package/dist/launchd-logs.d.ts.map +1 -0
  233. package/dist/launchd-logs.js +1499 -0
  234. package/dist/launchd-logs.js.map +1 -0
  235. package/dist/launchd.d.ts +27 -0
  236. package/dist/launchd.d.ts.map +1 -1
  237. package/dist/launchd.js +89 -10
  238. package/dist/launchd.js.map +1 -1
  239. package/dist/memory-command.d.ts +2 -0
  240. package/dist/memory-command.d.ts.map +1 -1
  241. package/dist/memory-command.js +161 -48
  242. package/dist/memory-command.js.map +1 -1
  243. package/dist/memory-recall-settings.d.ts +64 -0
  244. package/dist/memory-recall-settings.d.ts.map +1 -0
  245. package/dist/memory-recall-settings.js +51 -0
  246. package/dist/memory-recall-settings.js.map +1 -0
  247. package/dist/memory-recall.d.ts +7 -95
  248. package/dist/memory-recall.d.ts.map +1 -1
  249. package/dist/memory-recall.js +8 -143
  250. package/dist/memory-recall.js.map +1 -1
  251. package/dist/memory-rituals.d.ts +3 -3
  252. package/dist/memory-rituals.d.ts.map +1 -1
  253. package/dist/memory-rituals.js +16 -111
  254. package/dist/memory-rituals.js.map +1 -1
  255. package/dist/modules/catalog.js +2 -2
  256. package/dist/modules/catalog.js.map +1 -1
  257. package/dist/modules/known-tools.d.ts +8 -6
  258. package/dist/modules/known-tools.d.ts.map +1 -1
  259. package/dist/modules/known-tools.js +8 -6
  260. package/dist/modules/known-tools.js.map +1 -1
  261. package/dist/notify-destinations.d.ts +5 -0
  262. package/dist/notify-destinations.d.ts.map +1 -1
  263. package/dist/notify-destinations.js +7 -1
  264. package/dist/notify-destinations.js.map +1 -1
  265. package/dist/owner-private-lock.d.ts +95 -0
  266. package/dist/owner-private-lock.d.ts.map +1 -0
  267. package/dist/owner-private-lock.js +566 -0
  268. package/dist/owner-private-lock.js.map +1 -0
  269. package/dist/pi-oauth-login.d.ts +2 -0
  270. package/dist/pi-oauth-login.d.ts.map +1 -1
  271. package/dist/pi-oauth-login.js +39 -5
  272. package/dist/pi-oauth-login.js.map +1 -1
  273. package/dist/posted-message-index.d.ts +35 -16
  274. package/dist/posted-message-index.d.ts.map +1 -1
  275. package/dist/posted-message-index.js +1068 -52
  276. package/dist/posted-message-index.js.map +1 -1
  277. package/dist/posted-reply-history.d.ts +17 -0
  278. package/dist/posted-reply-history.d.ts.map +1 -0
  279. package/dist/posted-reply-history.js +169 -0
  280. package/dist/posted-reply-history.js.map +1 -0
  281. package/dist/proactive-notify.d.ts.map +1 -1
  282. package/dist/proactive-notify.js +6 -4
  283. package/dist/proactive-notify.js.map +1 -1
  284. package/dist/project-skills.d.ts +4 -0
  285. package/dist/project-skills.d.ts.map +1 -1
  286. package/dist/project-skills.js +99 -130
  287. package/dist/project-skills.js.map +1 -1
  288. package/dist/provider-setup.d.ts +0 -1
  289. package/dist/provider-setup.d.ts.map +1 -1
  290. package/dist/provider-setup.js +0 -3
  291. package/dist/provider-setup.js.map +1 -1
  292. package/dist/readiness-probe-worker.d.ts +61 -1
  293. package/dist/readiness-probe-worker.d.ts.map +1 -1
  294. package/dist/readiness-probe-worker.js +54 -58
  295. package/dist/readiness-probe-worker.js.map +1 -1
  296. package/dist/readiness-probe.d.ts +6 -9
  297. package/dist/readiness-probe.d.ts.map +1 -1
  298. package/dist/readiness-probe.js +30 -56
  299. package/dist/readiness-probe.js.map +1 -1
  300. package/dist/redact-secrets.d.ts +15 -0
  301. package/dist/redact-secrets.d.ts.map +1 -0
  302. package/dist/redact-secrets.js +65 -0
  303. package/dist/redact-secrets.js.map +1 -0
  304. package/dist/run-history.js +34 -24
  305. package/dist/run-history.js.map +1 -1
  306. package/dist/runtime-provenance.d.ts +8 -0
  307. package/dist/runtime-provenance.d.ts.map +1 -0
  308. package/dist/runtime-provenance.js +225 -0
  309. package/dist/runtime-provenance.js.map +1 -0
  310. package/dist/sandbox-manager.d.ts +4 -1
  311. package/dist/sandbox-manager.d.ts.map +1 -1
  312. package/dist/sandbox-manager.js +114 -273
  313. package/dist/sandbox-manager.js.map +1 -1
  314. package/dist/secure-file-replace.d.ts +49 -0
  315. package/dist/secure-file-replace.d.ts.map +1 -0
  316. package/dist/secure-file-replace.js +270 -0
  317. package/dist/secure-file-replace.js.map +1 -0
  318. package/dist/seen-conversations.d.ts +32 -5
  319. package/dist/seen-conversations.d.ts.map +1 -1
  320. package/dist/seen-conversations.js +145 -15
  321. package/dist/seen-conversations.js.map +1 -1
  322. package/dist/sessions.d.ts +20 -0
  323. package/dist/sessions.d.ts.map +1 -1
  324. package/dist/sessions.js +41 -6
  325. package/dist/sessions.js.map +1 -1
  326. package/dist/wizard/index.d.ts +2 -2
  327. package/dist/wizard/index.d.ts.map +1 -1
  328. package/dist/wizard/index.js +1 -1
  329. package/dist/wizard/index.js.map +1 -1
  330. package/dist/wizard/presets.d.ts +2 -1
  331. package/dist/wizard/presets.d.ts.map +1 -1
  332. package/dist/wizard/presets.js +2 -1
  333. package/dist/wizard/presets.js.map +1 -1
  334. package/dist/wizard/run.d.ts +0 -26
  335. package/dist/wizard/run.d.ts.map +1 -1
  336. package/dist/wizard/run.js +0 -53
  337. package/dist/wizard/run.js.map +1 -1
  338. package/package.json +22 -17
  339. package/schema/mono-agent.config.schema.json +45 -10
  340. package/skills/mono-agent-composer/SKILL.md +3 -3
  341. package/skills/mono-agent-composer/references/config-blueprint.md +123 -29
  342. package/skills/mono-agent-composer/references/discovery-questions.md +10 -8
  343. package/skills/mono-agent-composer/references/feature-coverage.md +90 -76
  344. package/skills/mono-agent-composer/references/package-map.md +6 -4
  345. package/skills/mono-agent-composer/references/playbooks.md +48 -27
  346. package/skills/mono-agent-composer/references/validation.md +16 -3
  347. package/dist/notify-runtime.d.ts +0 -26
  348. package/dist/notify-runtime.d.ts.map +0 -1
  349. package/dist/notify-runtime.js +0 -27
  350. package/dist/notify-runtime.js.map +0 -1
  351. package/dist/notify-tool.d.ts +0 -51
  352. package/dist/notify-tool.d.ts.map +0 -1
  353. package/dist/notify-tool.js +0 -182
  354. package/dist/notify-tool.js.map +0 -1
  355. package/dist/recipes/base.d.ts +0 -15
  356. package/dist/recipes/base.d.ts.map +0 -1
  357. package/dist/recipes/base.js +0 -51
  358. package/dist/recipes/base.js.map +0 -1
  359. package/dist/recipes/catalog.d.ts +0 -4
  360. package/dist/recipes/catalog.d.ts.map +0 -1
  361. package/dist/recipes/catalog.js +0 -525
  362. package/dist/recipes/catalog.js.map +0 -1
  363. package/dist/recipes/index.d.ts +0 -11
  364. package/dist/recipes/index.d.ts.map +0 -1
  365. package/dist/recipes/index.js +0 -14
  366. package/dist/recipes/index.js.map +0 -1
  367. package/dist/recipes/types.d.ts +0 -70
  368. package/dist/recipes/types.d.ts.map +0 -1
  369. package/dist/recipes/types.js +0 -15
  370. package/dist/recipes/types.js.map +0 -1
  371. package/dist/setup.d.ts +0 -29
  372. package/dist/setup.d.ts.map +0 -1
  373. package/dist/setup.js +0 -97
  374. package/dist/setup.js.map +0 -1
@@ -5,7 +5,7 @@
5
5
  > <https://mono-agent-docs.vercel.app/config/>. This annotated JSON
6
6
  > stays the offline canonical shape.
7
7
 
8
- One `mono-agent.config.json` declares the whole agent. Paths are relative to the folder; every field also has a `MONO_AGENT_*` env var that overrides it (env > JSON > defaults). Omit a section to leave that capability off — every section except `runtime.model` and `context.identityPath` is optional. `references/feature-coverage.md` maps every framework feature to its config key; if a capability is not listed there, it needs the programmatic escape hatch.
8
+ One `mono-agent.config.json` declares the whole agent. Paths are relative to the folder; config fields may be JSON-only. Environment-variable overrides are optional: only fields with a documented `MONO_AGENT_*` mapping accept one (env > JSON > defaults), so consult the generated config reference's `Env override` column (`--` means none, as for `channels.plugins`) instead of inferring one. Omit a section to leave that capability off — every section except `runtime.model` and `context.identityPath` is optional. `references/feature-coverage.md` maps every framework feature to its config key; if a capability is not listed there, it needs the programmatic escape hatch.
9
9
 
10
10
  ## Folder Layout
11
11
 
@@ -27,26 +27,46 @@ my-agent/
27
27
 
28
28
  ## Annotated Config
29
29
 
30
+ New configs use `runtime.fallbacks[]`, where each route owns its optional exact
31
+ effort. Legacy `runtime.fallbackModels` and `MONO_AGENT_FALLBACK_MODELS` remain
32
+ supported compatibility inputs with no removal deadline; do not emit them for a
33
+ new agent.
34
+
30
35
  ```jsonc
31
36
  {
32
37
  // Runtime: primary model plus ordered backups tried on retryable provider
33
38
  // failures (failover is reported in run results, never silent).
34
39
  "runtime": {
35
40
  "model": "claude:claude-sonnet-4-6", // claude:* | codex:* | pi:<provider>:<model>
36
- "fallbackModels": ["pi:ollama:gemma4:31b"],
41
+ "fallbacks": [{ "model": "pi:ollama:gemma4:31b" }],
42
+ "routeSafety": "uniform", // uniform | per-route-native
37
43
  "executionMode": "sdk", // sdk | cli (default inferred from model)
38
- "effort": "medium", // none|low|medium|high|xhigh|max; omit for direct opencode:*
44
+ "effort": "medium", // none|minimal|low|medium|high|xhigh|max|ultra; omit for direct opencode:*
45
+ // Reasoning-capable pi:* maps ultra to LOW; Pi without reasoning uses OFF.
46
+ // Direct codex:* forwards ultra unchanged. Mono-agent rejects ultra on its Claude SDK route
47
+ // because the pinned SDK public contract ends at max (the SDK JavaScript itself forwards the value).
48
+ // The Claude CLI route passes --effort ultra, but both tested Claude Code binaries
49
+ // (SDK-bundled 2.1.206 and local 2.1.210) warn that it is unknown, ignore it, and use default effort.
50
+ // Direct OpenCode rejects explicit effort.
51
+ // Ranking above max only prevents keyword downgrade.
39
52
  "permissionMode": "default", // default|plan|acceptEdits|bypassPermissions (CLI backends)
40
53
  "maxTurns": 0, // 0 or omitted means unlimited; 1-100 caps turns
41
54
  "workspace": ".",
42
55
  "session": { "mode": "continuous", "idleTimeoutMs": 1800000 } // or "per-message"
43
56
  },
44
57
 
58
+ // Per-channel admission/execution bounds. Each enabled channel owns one limiter.
59
+ "concurrency": {
60
+ "maxConcurrentRuns": 4,
61
+ "maxPendingRuns": 100
62
+ },
63
+
45
64
  // Local/self-hosted providers for pi:<provider>:<model> references.
46
65
  "providers": {
47
66
  "piAuthPath": "~/.pi/agent/auth.json", // Pi OAuth credentials (openai-codex, ...)
48
67
  // Pi-native bridge tuning (all optional).
49
68
  "piNative": {
69
+ "transport": "auto", // auto | sse | websocket | websocket-cached
50
70
  "piMaxRetries": 2, // 0-8; transient provider-transport retries
51
71
  "maxRetryDelayMs": 60000, // backoff cap between retries (ms)
52
72
  "piSessionsRoot": ".mono-agent/sessions" // durable JSONL sessions → resume across restarts (unset = in-memory)
@@ -58,7 +78,9 @@ my-agent/
58
78
  "baseUrl": "http://localhost:11434",
59
79
  "enabled": true,
60
80
  "trustPublicUrl": false, // explicit opt-in for non-private URLs
61
- "apiKeyEnv": "MY_PROVIDER_KEY", // or inline "apiKey" (untracked file only)
81
+ // Keep the key in .env; config stores only its variable name.
82
+ // Inline "apiKey" remains schema-compatible for existing consumers.
83
+ "apiKeyEnv": "MY_PROVIDER_KEY",
62
84
  "models": [{ "name": "gemma4:31b", "capabilities": { "context_window": 32768 } }]
63
85
  }
64
86
  ]
@@ -73,16 +95,19 @@ my-agent/
73
95
  "skillMaxBytes": 48000 // per-skill byte cap (256-1,000,000)
74
96
  },
75
97
 
76
- // Memory strategy. Omit the section for no memory.
98
+ // Memory strategy. Omit the section for no memory. The built-in "bujo"
99
+ // backend owns the three local tiers below; "supermemory" selects the
100
+ // separately installed, lockstep @mono-agent/memory-supermemory plugin.
77
101
  // Three tiers over one substrate (@mono-agent/memory store + bujo subpaths):
78
102
  // lite — FTS keyword recall + rapid-log; no external deps.
79
- // journal — + hybrid recall (BM25+vector) + decay; needs embeddings.
103
+ // journal — + hybrid recall (BM25+vector) + static, non-decaying salience; needs embeddings.
80
104
  // bujo — + LLM capture/reconcile + entity graph + auto-scheduled
81
105
  // lightweight consolidation; needs embeddings + an app-level memory.llm for capture/tier selection.
82
106
  "memory": {
107
+ "backend": "bujo", // bujo (default) | supermemory
83
108
  "mode": "bujo", // lite | journal | bujo
84
109
  "path": "./.mono-agent/memory", // root directory for all tiers
85
- "writeMode": "capture", // disabled | append-host-summary | capture (bujo only)
110
+ "writeMode": "capture", // disabled | append-host-summary | capture (bujo tier or external backend)
86
111
  "maxBytes": 64000,
87
112
  "embeddings": { // required for journal and bujo
88
113
  "provider": "ollama", // ollama | lmstudio | openai; exclusive, no fallback
@@ -100,7 +125,17 @@ my-agent/
100
125
  },
101
126
  // Bujo auto-scheduler — override the default or disable it.
102
127
  // Consolidation runs in-app; no external cron or launchd needed.
103
- "consolidation": { "enabled": true, "cron": "0 */2 * * *" } // default: every two hours
128
+ "consolidation": { "enabled": true, "cron": "0 */2 * * *" }, // default: every two hours
129
+ // For backend: "supermemory", omit path/mode/embeddings/llm/consolidation
130
+ // and configure the external service instead. Keep API keys in env.
131
+ // "supermemory": {
132
+ // "baseUrl": "http://127.0.0.1:6767",
133
+ // Inline "apiKey" remains schema-compatible; source configs use apiKeyEnv.
134
+ // "apiKeyEnv": "SUPERMEMORY_API_KEY",
135
+ // "container": "my-agent",
136
+ // "timeoutMs": 10000,
137
+ // "exposeMcpServer": false
138
+ // }
104
139
  },
105
140
 
106
141
  // Tool policy (allow-all by default) + MCP servers. Deny wins; overlap is rejected.
@@ -110,6 +145,17 @@ my-agent/
110
145
  "mcpConfigPath": "./mcp.json" // stdio/sse/http servers; inlined for SDK runtimes
111
146
  },
112
147
 
148
+ // Human-in-the-loop bridge: blocking AskUser / TelegramAskButtons plus
149
+ // run-scoped project-MCP progress. It auto-starts when either ask tool is
150
+ // allowed, this block or an interaction env override is configured, or
151
+ // interaction.progress.enabled resolves true while
152
+ // tools.mcpRequestContextServers names at least one opted project MCP server.
153
+ "interaction": {
154
+ "bridge": { "host": "127.0.0.1", "port": 0 },
155
+ "askUser": { "timeoutMs": 600000 },
156
+ "progress": { "enabled": true }
157
+ },
158
+
113
159
  // Sandbox for Pi-owned runtime commands. Direct Codex uses its own sandbox;
114
160
  // Claude/direct OpenCode cannot enforce these exact srt scopes. All reject
115
161
  // this block (pi:opencode-go:* remains a Pi route).
@@ -123,8 +169,10 @@ my-agent/
123
169
  "unsafeAllowHostProcess": false // explicit opt-in required for the unsafe fallback
124
170
  },
125
171
 
126
- // Observability: JSONL artifacts (always written; the local fallback) + the
127
- // trace-source registry that `mono-agent status` reads.
172
+ // Observability: the recorder writes empty events + a running summary at start,
173
+ // buffers key-redacted/capped events in RAM, then replaces both files at finish/fail.
174
+ // A pre-terminal crash can lose buffered events. `mono-agent status` reads the
175
+ // separate trace-source registry.
128
176
  "artifacts": {
129
177
  "dir": "./.mono-agent/artifacts",
130
178
  "retention": { "maxAgeDays": 365, "maxCount": 50000, "dryRun": false },
@@ -142,11 +190,12 @@ my-agent/
142
190
  "globalDiscovery": true
143
191
  },
144
192
 
145
- // Optional trace viewer: add a Phoenix (OTLP) exporter to browse traces in
146
- // Phoenix. Omit this entry to keep only the local JSONL artifacts.
193
+ // Optional trace viewer: add a best-effort, terminal-batched Phoenix (OTLP)
194
+ // exporter. Omit it to keep only bounded local terminal JSONL snapshots; a
195
+ // pre-terminal crash can lose buffered events.
147
196
  "observability": {
148
197
  "exporters": [
149
- { "type": "phoenix", "endpoint": "http://127.0.0.1:6006/v1/traces" }
198
+ { "type": "phoenix", "endpoint": "http://127.0.0.1:6006/v1/traces", "contentPatternRedaction": false }
150
199
  ]
151
200
  },
152
201
 
@@ -159,8 +208,7 @@ my-agent/
159
208
  "host": "127.0.0.1",
160
209
  "port": 0,
161
210
  "basePath": "/tui",
162
- "allowNonLoopback": false,
163
- "apiKey": "optional-bearer"
211
+ "allowNonLoopback": false // set MONO_AGENT_TUI_API_KEY in .env when needed
164
212
  },
165
213
 
166
214
  "live": {
@@ -168,19 +216,36 @@ my-agent/
168
216
  "host": "127.0.0.1",
169
217
  "port": 0,
170
218
  "basePath": "/live",
171
- "allowNonLoopback": false,
172
- "apiKey": "optional-bearer"
219
+ "allowNonLoopback": false // set MONO_AGENT_LIVE_API_KEY in .env when needed
173
220
  },
174
221
 
175
222
  "webhook": {
223
+ // For bearer auth, put MONO_AGENT_WEBHOOK_API_KEY=<strong-random-secret> in
224
+ // the owner-only .env file; JSON strings are literal and do not interpolate env: values.
176
225
  "enabled": true,
177
226
  "host": "127.0.0.1", // loopback-only unless allowNonLoopback
178
227
  "port": 0, // 0 picks a free port
179
228
  "path": "/webhook/invoke",
180
- "allowNonLoopback": false,
229
+ "allowNonLoopback": false, // a non-loopback bind also requires the .env key
181
230
  "defaultMode": "sync", // sync | async (202 + status URL polling)
231
+ "endpoints": [
232
+ {
233
+ "name": "invoke",
234
+ "path": "/webhook/invoke",
235
+ "mode": "sync",
236
+ "prompt": "Respond to this request:",
237
+ "model": "claude:claude-sonnet-4-6", // optional per-trigger override
238
+ "effort": "high", // same eight-level effort enum as runtime
239
+ "maxRunMs": 3600000, // endpoint override; 0 disables only this watchdog
240
+ "notify": true, // deliver the successful final answer verbatim
241
+ // Explicit destination; if omitted, infer only with exactly one candidate.
242
+ // Zero or multiple candidates skip with a warning.
243
+ "notifyConversationId": "slack:C0123"
244
+ }
245
+ ],
182
246
  "retentionMs": 300000, // async status retention
183
- "maxStoredRequests": 100
247
+ "maxStoredRequests": 100,
248
+ "maxRunMs": 1200000 // fallback when an endpoint omits maxRunMs
184
249
  },
185
250
 
186
251
  "openaiApi": {
@@ -199,20 +264,40 @@ my-agent/
199
264
  // stream.finalOnly=false. The OpenAI-compatible endpoint still streams tokens.
200
265
  "telegram": {
201
266
  "enabled": true, // opt-in; defaults to false (off → "disabled")
202
- "botToken": "...",
267
+ // Put MONO_AGENT_TELEGRAM_BOT_TOKEN in .env; do not inline botToken here.
203
268
  "allowedChatIds": ["123456789"], // or "allowAllChats": true
204
269
  "allowAllChats": false
205
270
  },
206
271
 
207
272
  "slack": {
208
273
  "enabled": true, // opt-in; defaults to false (off → "disabled")
209
- "botToken": "xoxb-...", // Socket Mode app
210
- "appToken": "xapp-...",
274
+ // Put MONO_AGENT_SLACK_BOT_TOKEN and MONO_AGENT_SLACK_APP_TOKEN in .env.
211
275
  "allowedChannelIds": ["C0123"], // or "allowAllChannels": true
212
276
  "allowAllChannels": false,
213
277
  "botUserIds": ["U0BOT"], // mention detection
214
278
  "mentionTextAliases": ["@agent"],
215
- "stripMentionText": true
279
+ "stripMentionText": true,
280
+ "shortcuts": [ // slack.shortcuts: JSON-only; callbackId matches the Slack app
281
+ {
282
+ "callbackId": "triage_request",
283
+ "prompt": "Prepare the daily support triage checklist.",
284
+ "channelId": "C0123",
285
+ "ackText": "Triage started…",
286
+ "threadReply": true
287
+ }
288
+ ],
289
+ "homeTab": { // slack.homeTab: JSON-only; enable App Home + app_home_opened
290
+ "enabled": true,
291
+ "headerText": "*Quick actions*",
292
+ "buttons": [
293
+ {
294
+ "actionId": "build_digest",
295
+ "label": "Build digest",
296
+ "prompt": "Build today's team digest.",
297
+ "channelId": "C0123"
298
+ }
299
+ ]
300
+ }
216
301
  },
217
302
 
218
303
  "channels": {
@@ -241,9 +326,9 @@ my-agent/
241
326
  "host": "127.0.0.1",
242
327
  "port": 4201,
243
328
  "publicBaseUrl": "https://agent.example.com",
244
- "allowNonLoopback": false,
329
+ "allowNonLoopback": true,
245
330
  "requireBearer": false,
246
- "bearerToken": "...",
331
+ // Put MONO_AGENT_A2A_BEARER_TOKEN in .env when bearer auth is required.
247
332
  "idempotency": { // optional; namespace explicitly enables the v1 extension
248
333
  "namespace": "my-agent-production", // stable authenticated-principal boundary
249
334
  "stateDir": ".mono-agent/a2a-my-agent", // optional derived owner-only path when omitted
@@ -256,7 +341,7 @@ my-agent/
256
341
  "consumer": { // settings for calling remote A2A agents
257
342
  "remoteAgentUrls": ["http://127.0.0.1:4202"],
258
343
  "defaultRemoteAgentUrl": "http://127.0.0.1:4202",
259
- "bearerToken": "...",
344
+ // Put MONO_AGENT_A2A_CONSUMER_BEARER_TOKEN in .env when the remote requires auth.
260
345
  "timeoutMs": 30000
261
346
  }
262
347
  }
@@ -273,11 +358,20 @@ my-agent/
273
358
  "expression": "0 9 * * *", // five-field cron
274
359
  "timezone": "UTC", // IANA timezone
275
360
  "prompt": "Post the morning summary.",
276
- "conversationId": "cron-daily" // optional: share memory/history across ticks
361
+ "conversationId": "cron-daily", // optional: share memory/history across ticks
362
+ "model": "claude:claude-sonnet-4-6", // optional per-trigger override
363
+ "effort": "high",
364
+ "notify": true, // successful non-empty final answer is delivered verbatim
365
+ // Explicit destination; if omitted, infer only with exactly one candidate.
366
+ // Zero or multiple candidates skip with a warning.
367
+ "notifyConversationId": "slack:C0123",
368
+ // Model-exhaustion notices require this explicit destination; never infer.
369
+ "notifyFailureCooldownHours": 6
277
370
  }
278
371
  ]
279
372
  // Jobs here merge with cron/*.md files (duplicate ids error).
280
- // Overlapping ticks of the same job are skipped, never queued.
373
+ // Agent-app pins overlap to skip; config exposes no queue/replace controls.
374
+ // Overlapping ticks of the same configured job are therefore skipped, never queued.
281
375
  }
282
376
  }
283
377
  ```
@@ -288,7 +382,7 @@ my-agent/
288
382
  mono-agent presets list # saved answer-sets (id, risk, description)
289
383
  mono-agent presets show <id> # generated config + .env.example + follow-up checklist
290
384
  mono-agent init --preset <id> --yes [--with slack,cron] [--dry-run] # scaffold from a preset (non-interactive)
291
- mono-agent init --model claude:claude-sonnet-4-6 --fallback-models pi:ollama:gemma4:31b [--memory lite|journal|bujo]
385
+ mono-agent init --model claude:claude-sonnet-4-6 --fallback pi:ollama:gemma4:31b [--memory lite|journal|bujo]
292
386
  mono-agent config # resolved config field-by-field, each value tagged env/json/default
293
387
  mono-agent validate [--preset <id>] [--consumer <path>] # per-section report; --preset also checks the preset's capabilities
294
388
  mono-agent start # traceability + every configured channel
@@ -16,7 +16,7 @@ Which model should drive the agent, and should any backups take over when the pr
16
16
  5. A custom MonoRuntimeLike supplied programmatically (escape hatch)
17
17
  ```
18
18
 
19
- Fills: `runtime.model`, `runtime.fallbackModels` (ordered backup references tried on retryable provider failures), `runtime.executionMode` (usually inferred), `runtime.effort`, `runtime.maxTurns`. Keep a direct `codex:*` chain all-direct. Pi, Claude, and direct OpenCode may mix only with `sandbox` omitted/off; if native mono-agent sandboxing is selected, every primary/fallback/trigger model must stay on Pi (`pi:opencode-go:*` is Pi). Direct `opencode:*` is advanced scaffold/config-only, requires exact allow-all plus an explicit native `permissionMode`, and must omit `runtime.effort` under SDK 1.x.
19
+ Fills: `runtime.model`, canonical `runtime.fallbacks[]` (ordered backup routes tried on retryable provider failures, each with optional exact effort), `runtime.executionMode` (usually inferred), `runtime.effort`, `runtime.maxTurns`. Legacy `runtime.fallbackModels` and `MONO_AGENT_FALLBACK_MODELS` remain supported with no removal deadline, but do not emit them for a new agent. Keep a direct `codex:*` chain all-direct. Pi, Claude, and direct OpenCode may mix only with `sandbox` omitted/off; if native mono-agent sandboxing is selected, every primary/fallback/trigger model must stay on Pi (`pi:opencode-go:*` is Pi). Direct `opencode:*` is advanced scaffold/config-only, requires exact allow-all plus an explicit native `permissionMode`, and must omit `runtime.effort` under SDK 1.x.
20
20
 
21
21
  The interactive `mono-agent init` wizard discovers Pi OpenAI-Codex auth, OpenCode models, Ollama models, and LM Studio's local server best-effort. It defaults to direct `codex:gpt-5.6-terra` and presents both `pi:openai-codex:gpt-5.6-terra` and `pi:openai-codex:gpt-5.6-sol` as concrete selectable candidates. Direct `codex:gpt-5.6-sol` is also selectable; direct GPT-5.6 routes require Codex CLI 0.144.0 or newer. The wizard maps discovered OpenCode options to `pi:opencode-go:<model>` for setup/preflight, and auto-adds local provider modules when a primary or fallback model uses `pi:ollama:*` or `pi:lmstudio:*`. Recover missing Pi OAuth with `mono-agent auth login <provider>` (and `--pi-auth-path` when required). Direct `opencode:<provider>:<model>` refs are supported only as hand-authored runtime backend config; do not present them as a first-class composer or init wizard selection. For local models also fill `providers.local` (e.g. an Ollama or LM Studio base URL plus model capabilities). Follow-up only if needed: continuous provider session per conversation (`runtime.session.mode: "continuous"`, default) versus stateless per-message.
22
22
 
@@ -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 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 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
 
@@ -88,7 +88,7 @@ Should the agent remember anything between conversations?
88
88
 
89
89
  1. No durable memory yet (recommended for first integration)
90
90
  2. Lite memory — FTS keyword recall + rapid-log capture; zero external deps
91
- 3. Journal memory — hybrid recall (BM25+vector) + salience decay; requires embeddings
91
+ 3. Journal memory — hybrid recall (BM25+vector) + static salience; requires embeddings
92
92
  4. BuJo memory — full tier: journal + LLM capture/reconcile + entity graph + auto-scheduled
93
93
  consolidation; requires embeddings AND a chat model
94
94
  ```
@@ -149,9 +149,11 @@ stopping the agent and running config-aware `mono-agent memory rebuild --json`.
149
149
  **Tier 4 — bujo (embeddings + chat model + consolidation):**
150
150
 
151
151
  Proactively explain what bujo does: capture → reconcile (ADD/UPDATE/SUPERSEDE/NOOP),
152
- hybrid BM25+vector recall, entity graph, scheduled consolidation (decay + duplicate
153
- superseding), living `index.md`, and an empty retired `future-log.md` stub. Consolidation
154
- is **auto-scheduled in-app** no external cron or launchd setup needed.
152
+ hybrid BM25+vector recall, entity graph, scheduled projection-only consolidation, living
153
+ `index.md`, and an empty retired `future-log.md` stub. Consolidation refreshes projections
154
+ and reports duplicate groups; it never decays salience or automatically supersedes or
155
+ rewrites canonical memory. It is **auto-scheduled in-app** — no external cron or launchd
156
+ setup needed.
155
157
 
156
158
  - Ask: which embeddings provider/service-root/model/dimension/auth-env? Use the same
157
159
  exclusive choices and real-probe contract as journal.
@@ -242,10 +244,10 @@ Question:
242
244
  Do you need a browsable trace viewer or just local artifacts?
243
245
 
244
246
  1. JSONL artifacts plus Phoenix as the trace viewer (recommended; add an `observability.exporters` Phoenix entry)
245
- 2. JSONL artifacts only (the local fallback; no external viewer)
247
+ 2. JSONL artifacts only (bounded terminal snapshots; no external viewer)
246
248
  ```
247
249
 
248
- Fills: `artifacts.dir`, `traceability.registryDir` / `sourceId` / `sourceLabel`, and — when Phoenix is wanted — an `observability.exporters` (phoenix) OTLP entry. Local JSONL artifacts are always written and are the fallback when no exporter is configured. Artifacts record runtime/tool/message events and summaries, not private chain-of-thought. For a terminal operator console, mention `mono-agent tui` (run from anywhere once the agent is started; live chat with thinking/tool insight, run replay, config view). Config is JSON-first — edit `mono-agent.config.json` directly and run `mono-agent restart` to apply changes.
250
+ Fills: `artifacts.dir`, `traceability.registryDir` / `sourceId` / `sourceLabel`, and — when Phoenix is wanted — an `observability.exporters` (phoenix) OTLP entry. The local recorder starts with empty events plus a `running` summary, applies key-based redaction and caps event strings at 4,096 bytes by default, buffers events in RAM, and replaces the artifacts at finish/fail; a pre-terminal crash can lose buffered events. Phoenix adds a best-effort terminal batch, not a crash-safe stream. Artifacts record runtime/tool/message events and summaries, not private chain-of-thought. For a terminal operator console, mention `mono-agent tui` (run from anywhere once the agent is started; live chat with thinking/tool insight, run replay, config view). Config is JSON-first — edit `mono-agent.config.json` directly and run `mono-agent restart` to apply changes.
249
251
 
250
252
  ## 9. Acceptance Smoke Test
251
253