agentix-cli 0.26.0 → 0.27.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (268) hide show
  1. package/dist/{App-BPNHIGUX.js → App-U52IPUK2.js} +2 -2
  2. package/dist/{ChatApp-6XSSZB4U.js → ChatApp-XP4OMHPL.js} +2 -2
  3. package/dist/agent-V2CA4TXD.js +2 -0
  4. package/dist/article-fields-L4D2BOGY.js +2 -0
  5. package/dist/article-quality-44ONVGLN.js +3 -0
  6. package/dist/article-quality-44ONVGLN.js.map +1 -0
  7. package/dist/{audit-JU3HWISB.js → audit-4245CX6P.js} +2 -2
  8. package/dist/backfill-MTD2B62I.js +6 -0
  9. package/dist/backfill-MTD2B62I.js.map +1 -0
  10. package/dist/{board-dashboard-M3372FLO.js → board-dashboard-TTMAYRLG.js} +1407 -447
  11. package/dist/board-dashboard-TTMAYRLG.js.map +1 -0
  12. package/dist/{builtin-FRKAQMFS.js → builtin-B67DMJ3M.js} +2 -2
  13. package/dist/calibration-ILS5OI44.js +2 -0
  14. package/dist/chunk-2T5W3ETS.js +5 -0
  15. package/dist/{chunk-K2CAPYES.js.map → chunk-2T5W3ETS.js.map} +1 -1
  16. package/dist/chunk-3SCPRYJB.js +5 -0
  17. package/dist/chunk-3SCPRYJB.js.map +1 -0
  18. package/dist/chunk-4BR7D2OU.js +36 -0
  19. package/dist/chunk-4BR7D2OU.js.map +1 -0
  20. package/dist/{chunk-P4VWIVKN.js → chunk-52ZPELD2.js} +403 -29
  21. package/dist/chunk-52ZPELD2.js.map +1 -0
  22. package/dist/{chunk-5U35WAZF.js → chunk-77OV7346.js} +6 -6
  23. package/dist/chunk-77OV7346.js.map +1 -0
  24. package/dist/chunk-AJ5RMU7X.js +2 -0
  25. package/dist/chunk-AJ5RMU7X.js.map +1 -0
  26. package/dist/chunk-AJONZWLT.js +2 -0
  27. package/dist/chunk-AJONZWLT.js.map +1 -0
  28. package/dist/chunk-AX2PWSRT.js +114 -0
  29. package/dist/chunk-AX2PWSRT.js.map +1 -0
  30. package/dist/chunk-BH3GTCZ6.js +2 -0
  31. package/dist/chunk-BH3GTCZ6.js.map +1 -0
  32. package/dist/chunk-BPIRO4YD.js +126 -0
  33. package/dist/chunk-BPIRO4YD.js.map +1 -0
  34. package/dist/chunk-CJQQIRPD.js +13 -0
  35. package/dist/chunk-CJQQIRPD.js.map +1 -0
  36. package/dist/chunk-DCDQZR7I.js +24 -0
  37. package/dist/chunk-DCDQZR7I.js.map +1 -0
  38. package/dist/chunk-EVWEG3VD.js +3 -0
  39. package/dist/chunk-EVWEG3VD.js.map +1 -0
  40. package/dist/chunk-F4HZTZHW.js +2 -0
  41. package/dist/chunk-F4HZTZHW.js.map +1 -0
  42. package/dist/chunk-F6CNF7V3.js +25 -0
  43. package/dist/chunk-F6CNF7V3.js.map +1 -0
  44. package/dist/chunk-FIEJDZVC.js +121 -0
  45. package/dist/chunk-FIEJDZVC.js.map +1 -0
  46. package/dist/chunk-FIOB3MEX.js +2 -0
  47. package/dist/{chunk-H5D7ATXS.js → chunk-FKBGJYWQ.js} +5 -5
  48. package/dist/chunk-FKBGJYWQ.js.map +1 -0
  49. package/dist/chunk-GDWJUGB5.js +9 -0
  50. package/dist/chunk-GDWJUGB5.js.map +1 -0
  51. package/dist/{chunk-BVGJSPW4.js → chunk-IB3F7VBE.js} +7 -7
  52. package/dist/{chunk-BVGJSPW4.js.map → chunk-IB3F7VBE.js.map} +1 -1
  53. package/dist/chunk-IBUSGCLQ.js +109 -0
  54. package/dist/chunk-IBUSGCLQ.js.map +1 -0
  55. package/dist/{chunk-LDHPMJ7M.js → chunk-IWMW5432.js} +3 -3
  56. package/dist/chunk-IWMW5432.js.map +1 -0
  57. package/dist/chunk-K33GIBSE.js +2 -0
  58. package/dist/chunk-K33GIBSE.js.map +1 -0
  59. package/dist/chunk-L2IZPR6P.js +45 -0
  60. package/dist/chunk-L2IZPR6P.js.map +1 -0
  61. package/dist/chunk-L2WSPY6S.js +2 -0
  62. package/dist/chunk-L2WSPY6S.js.map +1 -0
  63. package/dist/chunk-LCIREYTD.js +54 -0
  64. package/dist/chunk-LCIREYTD.js.map +1 -0
  65. package/dist/chunk-LNRB5MCU.js +530 -0
  66. package/dist/chunk-LNRB5MCU.js.map +1 -0
  67. package/dist/chunk-OPHIXXGI.js +157 -0
  68. package/dist/chunk-OPHIXXGI.js.map +1 -0
  69. package/dist/{chunk-JTJIPNXY.js → chunk-PNWNVOEZ.js} +1 -1
  70. package/dist/chunk-PNWNVOEZ.js.map +1 -0
  71. package/dist/{chunk-V3U4OF7L.js → chunk-UFAGYX73.js} +45 -47
  72. package/dist/chunk-UFAGYX73.js.map +1 -0
  73. package/dist/{chunk-DJEZ2HVU.js → chunk-VDMYBPYB.js} +1 -1
  74. package/dist/chunk-VDMYBPYB.js.map +1 -0
  75. package/dist/chunk-VTE7L6LO.js +5 -0
  76. package/dist/{chunk-O6YPEOQF.js.map → chunk-VTE7L6LO.js.map} +1 -1
  77. package/dist/chunk-W5C2GDNC.js +32 -0
  78. package/dist/{chunk-JP5IEXR7.js.map → chunk-W5C2GDNC.js.map} +1 -1
  79. package/dist/chunk-WPMX3VGI.js +3 -0
  80. package/dist/chunk-WPMX3VGI.js.map +1 -0
  81. package/dist/chunk-WZ72HX5C.js +1182 -0
  82. package/dist/chunk-WZ72HX5C.js.map +1 -0
  83. package/dist/chunk-ZTEU5JVQ.js +2 -0
  84. package/dist/chunk-ZTEU5JVQ.js.map +1 -0
  85. package/dist/{chunk-2WVX3LEC.js → chunk-ZVP6GB4G.js} +1 -1
  86. package/dist/chunk-ZVP6GB4G.js.map +1 -0
  87. package/dist/cli.js +1 -1
  88. package/dist/cli.js.map +1 -1
  89. package/dist/client-PX25MD47.js +2 -0
  90. package/dist/{compaction-NWEMOSHA.js → compaction-FD4R23HZ.js} +4 -4
  91. package/dist/config-HL5F36V4.js +2 -0
  92. package/dist/config-mutator-HBX53OMJ.js +2 -0
  93. package/dist/{conflict-detector-D7VIYPDI.js → conflict-detector-ZPOT3M2C.js} +2 -2
  94. package/dist/conflict-detector-ZPOT3M2C.js.map +1 -0
  95. package/dist/context-planner-AQHJMVY2.js +17 -0
  96. package/dist/context-planner-AQHJMVY2.js.map +1 -0
  97. package/dist/debug-3MEUO2P2.js +2 -0
  98. package/dist/{discover-XJXQXXIO.js → discover-D4VVRNAI.js} +2 -2
  99. package/dist/discover-D4VVRNAI.js.map +1 -0
  100. package/dist/doctor-PBAH6XL3.js +2 -0
  101. package/dist/editor-chat-OB7IQOB5.js +137 -0
  102. package/dist/editor-chat-OB7IQOB5.js.map +1 -0
  103. package/dist/entry-triage-LK34TSQD.js +2 -0
  104. package/dist/entry-triage-LK34TSQD.js.map +1 -0
  105. package/dist/facts-YVEJOM7O.js +22 -0
  106. package/dist/facts-YVEJOM7O.js.map +1 -0
  107. package/dist/heal-FVLBHYP7.js +2 -0
  108. package/dist/index.d.ts +1016 -65
  109. package/dist/index.js +13 -13
  110. package/dist/index.js.map +1 -1
  111. package/dist/{ingest-whatsapp-LZE62INA.js → ingest-whatsapp-NS4OWDOU.js} +2 -2
  112. package/dist/loader-4ZGTK7LD.js +2 -0
  113. package/dist/loader-BOKE5M5S.js +2 -0
  114. package/dist/memory-extract-F5ZHWY5E.js +2 -0
  115. package/dist/{migrate-v2-QO7SLKIM.js → migrate-v2-V4WN2VVM.js} +2 -2
  116. package/dist/ntfy-X7EPB3TG.js +4 -0
  117. package/dist/ntfy-X7EPB3TG.js.map +1 -0
  118. package/dist/processes-WU23U2OJ.js +2 -0
  119. package/dist/program-YGXVCV2Y.js +2 -0
  120. package/dist/{projects-api-KRME2YKZ.js → projects-api-QE6L65SK.js} +2 -2
  121. package/dist/{projects-mutate-3NHVG437.js → projects-mutate-MY7JTLSZ.js} +2 -2
  122. package/dist/providers-KO2DODIO.js +2 -0
  123. package/dist/query-ZKTFJMNE.js +2 -0
  124. package/dist/questions-4B4KSPXG.js +3 -0
  125. package/dist/questions-4B4KSPXG.js.map +1 -0
  126. package/dist/recipes-7S4MC5OJ.js +2 -0
  127. package/dist/registry-PSZDPFZK.js +2 -0
  128. package/dist/review-candidates-AEUXRQQC.js +4 -0
  129. package/dist/review-candidates-AEUXRQQC.js.map +1 -0
  130. package/dist/review-store-B4YE3EFK.js +4 -0
  131. package/dist/review-store-B4YE3EFK.js.map +1 -0
  132. package/dist/{rotation-memo-B3EXXSEH.js → rotation-memo-7T75BLEX.js} +2 -2
  133. package/dist/routing-4PV66BK6.js +2 -0
  134. package/dist/routing-4PV66BK6.js.map +1 -0
  135. package/dist/runner-YRBVNYTY.js +2 -0
  136. package/dist/scheduler-GZZAN6ZG.js +2 -0
  137. package/dist/seat-VZ7AVO27.js +2 -0
  138. package/dist/select-F5I5PO2O.js +2 -0
  139. package/dist/select-F5I5PO2O.js.map +1 -0
  140. package/dist/store-MCOA6N4F.js +2 -0
  141. package/dist/{subagent-WV7QKQ3L.js → subagent-2SJHSSJS.js} +2 -2
  142. package/dist/{surface-usage-PRL6Z4U3.js → surface-usage-NS74AXSE.js} +2 -2
  143. package/dist/timers-PCB4ZIBD.js +2 -0
  144. package/dist/triage-backtest-JNO7RKX7.js +2 -0
  145. package/dist/triage-backtest-JNO7RKX7.js.map +1 -0
  146. package/dist/types-H5ENIUIT.js +2 -0
  147. package/dist/types-OIFU3KSQ.js +2 -0
  148. package/dist/web/workflow-editor.global.js +1542 -0
  149. package/dist/web/workflow-editor.global.js.map +1 -0
  150. package/dist/{whatsapp-state-XMTCSRXU.js → whatsapp-state-6D6FHHD2.js} +2 -2
  151. package/dist/wiki-N5SMP3DT.js +2 -0
  152. package/dist/wiki-N5SMP3DT.js.map +1 -0
  153. package/dist/workflows/templates/branching.yaml +1 -1
  154. package/dist/{workspace-setup-TBQAHYHJ.js → workspace-setup-B3F3TUDE.js} +2 -2
  155. package/dist/workspace-setup-B3F3TUDE.js.map +1 -0
  156. package/package.json +1 -1
  157. package/dist/agent-5QMITZT6.js +0 -2
  158. package/dist/architect-SEPWMWS4.js +0 -2
  159. package/dist/board-dashboard-M3372FLO.js.map +0 -1
  160. package/dist/chunk-2WVX3LEC.js.map +0 -1
  161. package/dist/chunk-3WQFCIB6.js +0 -24
  162. package/dist/chunk-3WQFCIB6.js.map +0 -1
  163. package/dist/chunk-4YCH6IZV.js +0 -2
  164. package/dist/chunk-53NRX2NA.js +0 -2
  165. package/dist/chunk-53NRX2NA.js.map +0 -1
  166. package/dist/chunk-5U35WAZF.js.map +0 -1
  167. package/dist/chunk-BFXONUUN.js +0 -108
  168. package/dist/chunk-BFXONUUN.js.map +0 -1
  169. package/dist/chunk-BFZUG66X.js +0 -45
  170. package/dist/chunk-BFZUG66X.js.map +0 -1
  171. package/dist/chunk-BTHHSY7D.js +0 -13
  172. package/dist/chunk-BTHHSY7D.js.map +0 -1
  173. package/dist/chunk-D46VZ7K7.js +0 -116
  174. package/dist/chunk-D46VZ7K7.js.map +0 -1
  175. package/dist/chunk-DJEZ2HVU.js.map +0 -1
  176. package/dist/chunk-E5CXCI33.js +0 -155
  177. package/dist/chunk-E5CXCI33.js.map +0 -1
  178. package/dist/chunk-FDWOECJY.js +0 -54
  179. package/dist/chunk-FDWOECJY.js.map +0 -1
  180. package/dist/chunk-H5D7ATXS.js.map +0 -1
  181. package/dist/chunk-HR4JSRZS.js +0 -3
  182. package/dist/chunk-HR4JSRZS.js.map +0 -1
  183. package/dist/chunk-ISEBLHWX.js +0 -118
  184. package/dist/chunk-ISEBLHWX.js.map +0 -1
  185. package/dist/chunk-JP5IEXR7.js +0 -32
  186. package/dist/chunk-JTJIPNXY.js.map +0 -1
  187. package/dist/chunk-K2CAPYES.js +0 -5
  188. package/dist/chunk-LDHPMJ7M.js.map +0 -1
  189. package/dist/chunk-METYYZKQ.js +0 -1115
  190. package/dist/chunk-METYYZKQ.js.map +0 -1
  191. package/dist/chunk-MTAPOCGA.js +0 -47
  192. package/dist/chunk-MTAPOCGA.js.map +0 -1
  193. package/dist/chunk-O6YPEOQF.js +0 -5
  194. package/dist/chunk-P4VWIVKN.js.map +0 -1
  195. package/dist/chunk-SR3X25TN.js +0 -3
  196. package/dist/chunk-SR3X25TN.js.map +0 -1
  197. package/dist/chunk-UHE5FCPB.js +0 -431
  198. package/dist/chunk-UHE5FCPB.js.map +0 -1
  199. package/dist/chunk-V3U4OF7L.js.map +0 -1
  200. package/dist/chunk-VJUTQAPJ.js +0 -2
  201. package/dist/chunk-VJUTQAPJ.js.map +0 -1
  202. package/dist/chunk-VT5XYFDD.js +0 -126
  203. package/dist/chunk-VT5XYFDD.js.map +0 -1
  204. package/dist/client-HGKAC6VP.js +0 -2
  205. package/dist/config-A4RWEJHV.js +0 -2
  206. package/dist/config-mutator-MNSFUN7D.js +0 -2
  207. package/dist/conflict-detector-D7VIYPDI.js.map +0 -1
  208. package/dist/context-planner-45GEWKGL.js +0 -17
  209. package/dist/context-planner-45GEWKGL.js.map +0 -1
  210. package/dist/debug-N3B5NVJU.js +0 -2
  211. package/dist/discover-XJXQXXIO.js.map +0 -1
  212. package/dist/doctor-3Q36ZFE6.js +0 -2
  213. package/dist/heal-HZ3EQD52.js +0 -2
  214. package/dist/loader-5CA3O5GM.js +0 -2
  215. package/dist/loader-6IHUCPVO.js +0 -2
  216. package/dist/memory-extract-AENFVVO5.js +0 -2
  217. package/dist/processes-UIC4XXA6.js +0 -2
  218. package/dist/program-SAUNRCCD.js +0 -2
  219. package/dist/providers-L27BJ5A6.js +0 -2
  220. package/dist/query-HZYYRCLU.js +0 -2
  221. package/dist/recipes-EPLE2SNT.js +0 -2
  222. package/dist/registry-HK3WQ7BS.js +0 -2
  223. package/dist/runner-BFYDWPUO.js +0 -2
  224. package/dist/scheduler-6T2SU5ST.js +0 -2
  225. package/dist/store-I3HEWVLQ.js +0 -2
  226. package/dist/timers-5LPZN55J.js +0 -2
  227. package/dist/types-VECTMYTO.js +0 -2
  228. package/dist/types-Y6ZCZ52Z.js +0 -2
  229. package/dist/wiki-M6YNRFC4.js +0 -2
  230. /package/dist/{App-BPNHIGUX.js.map → App-U52IPUK2.js.map} +0 -0
  231. /package/dist/{ChatApp-6XSSZB4U.js.map → ChatApp-XP4OMHPL.js.map} +0 -0
  232. /package/dist/{agent-5QMITZT6.js.map → agent-V2CA4TXD.js.map} +0 -0
  233. /package/dist/{architect-SEPWMWS4.js.map → article-fields-L4D2BOGY.js.map} +0 -0
  234. /package/dist/{audit-JU3HWISB.js.map → audit-4245CX6P.js.map} +0 -0
  235. /package/dist/{builtin-FRKAQMFS.js.map → builtin-B67DMJ3M.js.map} +0 -0
  236. /package/dist/{chunk-4YCH6IZV.js.map → calibration-ILS5OI44.js.map} +0 -0
  237. /package/dist/{client-HGKAC6VP.js.map → chunk-FIOB3MEX.js.map} +0 -0
  238. /package/dist/{config-A4RWEJHV.js.map → client-PX25MD47.js.map} +0 -0
  239. /package/dist/{compaction-NWEMOSHA.js.map → compaction-FD4R23HZ.js.map} +0 -0
  240. /package/dist/{config-mutator-MNSFUN7D.js.map → config-HL5F36V4.js.map} +0 -0
  241. /package/dist/{debug-N3B5NVJU.js.map → config-mutator-HBX53OMJ.js.map} +0 -0
  242. /package/dist/{doctor-3Q36ZFE6.js.map → debug-3MEUO2P2.js.map} +0 -0
  243. /package/dist/{heal-HZ3EQD52.js.map → doctor-PBAH6XL3.js.map} +0 -0
  244. /package/dist/{loader-5CA3O5GM.js.map → heal-FVLBHYP7.js.map} +0 -0
  245. /package/dist/{ingest-whatsapp-LZE62INA.js.map → ingest-whatsapp-NS4OWDOU.js.map} +0 -0
  246. /package/dist/{loader-6IHUCPVO.js.map → loader-4ZGTK7LD.js.map} +0 -0
  247. /package/dist/{memory-extract-AENFVVO5.js.map → loader-BOKE5M5S.js.map} +0 -0
  248. /package/dist/{processes-UIC4XXA6.js.map → memory-extract-F5ZHWY5E.js.map} +0 -0
  249. /package/dist/{migrate-v2-QO7SLKIM.js.map → migrate-v2-V4WN2VVM.js.map} +0 -0
  250. /package/dist/{program-SAUNRCCD.js.map → processes-WU23U2OJ.js.map} +0 -0
  251. /package/dist/{providers-L27BJ5A6.js.map → program-YGXVCV2Y.js.map} +0 -0
  252. /package/dist/{projects-api-KRME2YKZ.js.map → projects-api-QE6L65SK.js.map} +0 -0
  253. /package/dist/{projects-mutate-3NHVG437.js.map → projects-mutate-MY7JTLSZ.js.map} +0 -0
  254. /package/dist/{query-HZYYRCLU.js.map → providers-KO2DODIO.js.map} +0 -0
  255. /package/dist/{recipes-EPLE2SNT.js.map → query-ZKTFJMNE.js.map} +0 -0
  256. /package/dist/{registry-HK3WQ7BS.js.map → recipes-7S4MC5OJ.js.map} +0 -0
  257. /package/dist/{runner-BFYDWPUO.js.map → registry-PSZDPFZK.js.map} +0 -0
  258. /package/dist/{rotation-memo-B3EXXSEH.js.map → rotation-memo-7T75BLEX.js.map} +0 -0
  259. /package/dist/{scheduler-6T2SU5ST.js.map → runner-YRBVNYTY.js.map} +0 -0
  260. /package/dist/{store-I3HEWVLQ.js.map → scheduler-GZZAN6ZG.js.map} +0 -0
  261. /package/dist/{surface-usage-PRL6Z4U3.js.map → seat-VZ7AVO27.js.map} +0 -0
  262. /package/dist/{timers-5LPZN55J.js.map → store-MCOA6N4F.js.map} +0 -0
  263. /package/dist/{subagent-WV7QKQ3L.js.map → subagent-2SJHSSJS.js.map} +0 -0
  264. /package/dist/{types-VECTMYTO.js.map → surface-usage-NS74AXSE.js.map} +0 -0
  265. /package/dist/{types-Y6ZCZ52Z.js.map → timers-PCB4ZIBD.js.map} +0 -0
  266. /package/dist/{wiki-M6YNRFC4.js.map → types-H5ENIUIT.js.map} +0 -0
  267. /package/dist/{workspace-setup-TBQAHYHJ.js.map → types-OIFU3KSQ.js.map} +0 -0
  268. /package/dist/{whatsapp-state-XMTCSRXU.js.map → whatsapp-state-6D6FHHD2.js.map} +0 -0
package/dist/index.d.ts CHANGED
@@ -29,6 +29,31 @@ interface ProviderOptions {
29
29
  * marks the task aborted in the registry; the underlying request
30
30
  * can hang for hours waiting for the model to finish thinking. */
31
31
  abortSignal?: AbortSignal;
32
+ /** Force the model to call one specific tool, making its whole reply the
33
+ * tool's structured `input`. Anthropic renders this as
34
+ * `tool_choice: {type:"tool", name}`; OpenAI as
35
+ * `tool_choice: {type:"function", function:{name}}`. Providers that
36
+ * can't force a tool (the claude-code CLI on OAuth) ignore it — callers
37
+ * must check `PROVIDER_CAPABILITIES[name].structuredOutput` first. */
38
+ toolChoice?: {
39
+ type: "tool";
40
+ name: string;
41
+ };
42
+ /** OpenAI-compatible structured-output passthrough. Anthropic ignores it;
43
+ * use `toolChoice` there instead. */
44
+ responseFormat?: {
45
+ type: "json_schema";
46
+ name: string;
47
+ schema: Record<string, unknown>;
48
+ };
49
+ /** Ask for the token distribution behind the answer. Only meaningful on
50
+ * OpenAI-compatible providers, and only useful when the answer is a
51
+ * single token — see src/decisions/backends/local-llm.ts, which is the
52
+ * one caller that has a use for it. */
53
+ logprobs?: {
54
+ enabled: true;
55
+ topK: number;
56
+ };
32
57
  }
33
58
  type StreamEvent = {
34
59
  type: "text_delta";
@@ -423,12 +448,12 @@ declare function getLegacyTools(): Array<{
423
448
  declare function formatToolsForSystemPrompt(): string;
424
449
  declare const ALL_TOOL_NAMES: string[];
425
450
 
426
- interface NoqtaToolContext {
427
- /** The noqta.tn user UUID this tool call impersonates. */
451
+ interface AcmeToolContext {
452
+ /** The example.com user UUID this tool call impersonates. */
428
453
  userId: string;
429
454
  /** Logical agent id (for the audit table's X-Agent-Id column). */
430
455
  agentId?: string;
431
- /** Override the noqta.tn base URL — defaults to NOQTA_API_URL env or https://noqta.tn. */
456
+ /** Override the example.com base URL — defaults to ACME_API_URL env or https://example.com. */
432
457
  apiUrl?: string;
433
458
  }
434
459
 
@@ -517,10 +542,10 @@ declare const skillFrontmatterSchema: z.ZodObject<{
517
542
  }>, "many">>;
518
543
  /** If true, skill is auto-injected into context when triggers match (per-turn) */
519
544
  autoInject: z.ZodOptional<z.ZodBoolean>;
520
- /** Reference card ids cited by this skill (e.g. "ksi.gitlab.project.ksi-v2").
545
+ /** Reference card ids cited by this skill (e.g. "initech.gitlab.project.initech-v2").
521
546
  * Audit lint flags FAILING when any id does not resolve. */
522
547
  references: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
523
- /** Skills this one delegates to (e.g. ksi-cx-email → [hotmail]). Audit lint
548
+ /** Skills this one delegates to (e.g. initech-cx-email → [hotmail]). Audit lint
524
549
  * flags FAILING when a delegate has no SKILL.md. */
525
550
  delegatesTo: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
526
551
  /** Free-form category — used by recipes and audit rules. Common values:
@@ -623,12 +648,12 @@ interface GenerateOptions {
623
648
  lintCommand?: string;
624
649
  maxAttempts?: number;
625
650
  };
626
- /** Enables the noqta workspace tool catalog (list_projects, create_task,
651
+ /** Enables the acme workspace tool catalog (list_projects, create_task,
627
652
  * …) in the agentic loop and threads the user_id through to the
628
- * executor. Without this set, the noqta-tools are absent from the
629
- * agent's tool list — keeps non-noqta agents clean. The bearer is
653
+ * executor. Without this set, the acme-tools are absent from the
654
+ * agent's tool list — keeps non-acme agents clean. The bearer is
630
655
  * read from env at dispatch time and NEVER enters the prompt. */
631
- noqtaContext?: NoqtaToolContext;
656
+ acmeContext?: AcmeToolContext;
632
657
  /** Provider-level options forwarded to `createProvider`. Today only
633
658
  * `thinking` (for DeepSeek thinking-mode). Wired from
634
659
  * `providers.<name>.thinking` in agentx.json by the daemon's
@@ -738,12 +763,12 @@ interface ToolExecutorOptions {
738
763
  interactive?: boolean;
739
764
  overwrite?: boolean;
740
765
  dryRun?: boolean;
741
- /** When set, noqta-tools (list_projects, create_task, etc.) become
766
+ /** When set, acme-tools (list_projects, create_task, etc.) become
742
767
  * available — the executor dispatches them by POSTing to
743
768
  * /api/agent/tools with the server-held bearer. The bearer NEVER
744
- * enters the model's prompt context. Omit to leave noqta-tools off
769
+ * enters the model's prompt context. Omit to leave acme-tools off
745
770
  * (the agent will see "Unknown tool" if it calls one anyway). */
746
- noqtaContext?: NoqtaToolContext;
771
+ acmeContext?: AcmeToolContext;
747
772
  /** Operator-cancel signal. When fired we short-circuit `execute()`
748
773
  * before dispatch and forward to execa as `cancelSignal` so a
749
774
  * hung shell command can't outlive the abort. */
@@ -1070,7 +1095,7 @@ declare class PermissionManager {
1070
1095
  }
1071
1096
  declare const globalPermissions: PermissionManager;
1072
1097
 
1073
- declare const HOOK_EVENTS: readonly ["pre:generate", "post:generate", "pre:file-write", "post:file-write", "pre:prompt", "post:response", "pre:command", "on:error", "pre:tool-call", "post:tool-call", "pre:channel-message", "post:channel-message", "pre:a2a-task", "pre:cron-run", "post:cron-run", "on:gitlab-pipeline", "on:gitlab-issue", "on:gitlab-mr", "on:gitlab-note", "on:github-issue", "on:github-pr", "on:github-push", "on:stripe-event", "on:sentry-issue", "on:vercel-deployment", "on:odoo-event", "on:hubspot-event"];
1098
+ declare const HOOK_EVENTS: readonly ["pre:generate", "post:generate", "pre:file-write", "post:file-write", "pre:prompt", "post:response", "pre:command", "on:error", "pre:tool-call", "post:tool-call", "pre:channel-message", "post:channel-message", "pre:a2a-task", "pre:cron-run", "post:cron-run", "on:gitlab-pipeline", "on:gitlab-issue", "on:gitlab-mr", "on:gitlab-note", "on:github-issue", "on:github-pr", "on:github-push", "on:n8n", "on:stripe-event", "on:sentry-issue", "on:vercel-deployment", "on:odoo-event", "on:hubspot-event"];
1074
1099
  type HookEvent = (typeof HOOK_EVENTS)[number];
1075
1100
  declare const BLOCKING_EVENTS: HookEvent[];
1076
1101
  declare const hookDefinitionSchema: z.ZodObject<{
@@ -1512,8 +1537,8 @@ declare const agentConfigSchema: z.ZodObject<{
1512
1537
  * .claude/settings.json permissions.allow with the codegraph_* tools,
1513
1538
  * (c) appends a CodeGraph instruction section to the managed CLAUDE.md,
1514
1539
  * and (d) background-indexes the workspace at daemon boot if .codegraph/
1515
- * is missing. Off by default — flip on for coding agents (mtgl-v2-coder,
1516
- * ksi-v2-coder, hasanah-coding, etc.) where token-volume on exploration
1540
+ * is missing. Off by default — flip on for coding agents (globex-v2-coder,
1541
+ * initech-v2-coder, umbrella-coding, etc.) where token-volume on exploration
1517
1542
  * loops is the bottleneck. */
1518
1543
  codegraph: z.ZodDefault<z.ZodBoolean>;
1519
1544
  /** Per-agent override for the global `session.contextStrategy`. Lets
@@ -1523,7 +1548,7 @@ declare const agentConfigSchema: z.ZodObject<{
1523
1548
  contextStrategy: z.ZodOptional<z.ZodEnum<["layered", "planner"]>>;
1524
1549
  /** When true, the registry resolves references-recipes for this agent's
1525
1550
  * workspace and renders a deterministic [Verified References] block at
1526
- * priority 4.7. Off by default — flip on per agent (pm-ksi, devops-agent,
1551
+ * priority 4.7. Off by default — flip on per agent (pm-initech, devops-agent,
1527
1552
  * etc.) once a `references/` registry exists in the agent's workspace
1528
1553
  * or repo root. See src/agents/references/. */
1529
1554
  contextReferences: z.ZodDefault<z.ZodBoolean>;
@@ -1603,7 +1628,7 @@ declare const agentConfigSchema: z.ZodObject<{
1603
1628
  integrations: z.ZodDefault<z.ZodArray<z.ZodObject<{
1604
1629
  /** Service identifier — open string, well-known values in INTEGRATION_KINDS. */
1605
1630
  kind: z.ZodString;
1606
- /** Human-readable label (e.g. "@cx_bot", "Noqta CRM", "anis@noqta.tn"). Unique per (agent, kind). */
1631
+ /** Human-readable label (e.g. "@cx_bot", "Acme CRM", "alex@example.com"). Unique per (agent, kind). */
1607
1632
  label: z.ZodString;
1608
1633
  credentials: z.ZodDefault<z.ZodObject<{
1609
1634
  /** Env var holding the secret. Uppercase identifier; daemon resolves at use-time. */
@@ -1786,12 +1811,31 @@ declare const agentConfigSchema: z.ZodObject<{
1786
1811
  metadata?: Record<string, string | number | boolean> | undefined;
1787
1812
  }[] | undefined;
1788
1813
  }>;
1789
- declare const cronJobSchema: z.ZodObject<{
1814
+ declare const cronJobSchema: z.ZodEffects<z.ZodObject<{
1790
1815
  enabled: z.ZodDefault<z.ZodBoolean>;
1791
1816
  schedule: z.ZodString;
1792
1817
  timezone: z.ZodDefault<z.ZodString>;
1793
1818
  agent: z.ZodString;
1794
- prompt: z.ZodString;
1819
+ prompt: z.ZodDefault<z.ZodString>;
1820
+ /**
1821
+ * A shell command to run INSTEAD of dispatching the agent.
1822
+ *
1823
+ * Seven of this fleet's twenty-six crons were a single command wrapped
1824
+ * in an agent, and every one of them carried a paragraph like "Run this
1825
+ * EXACT command. Do NOT substitute, rewrite, shorten, or fall back to
1826
+ * alternative commands." That paragraph is a scar: it exists because
1827
+ * models kept substituting, and no amount of prompt severity makes a
1828
+ * language model a deterministic executor.
1829
+ *
1830
+ * Measured before this existed: ~$0.31 and ~24s per run to execute one
1831
+ * `node script.js` and repeat ten lines of its output — a 114k-token
1832
+ * context for a job with no judgement in it at all.
1833
+ *
1834
+ * When set, the scheduler runs the command directly. No model, no
1835
+ * tokens, no improvisation. `agent` is still required and is who gets
1836
+ * told when it fails.
1837
+ */
1838
+ command: z.ZodOptional<z.ZodString>;
1795
1839
  timeout: z.ZodDefault<z.ZodNumber>;
1796
1840
  model: z.ZodOptional<z.ZodString>;
1797
1841
  /** Soft cap on output length. Claude Code CLI has no hard flag for this,
@@ -1821,6 +1865,7 @@ declare const cronJobSchema: z.ZodObject<{
1821
1865
  timezone: string;
1822
1866
  onError: ("notify" | "log" | "disable")[];
1823
1867
  model?: string | undefined;
1868
+ command?: string | undefined;
1824
1869
  notify?: {
1825
1870
  channel: string;
1826
1871
  chatId: string;
@@ -1828,11 +1873,44 @@ declare const cronJobSchema: z.ZodObject<{
1828
1873
  } | undefined;
1829
1874
  maxOutputTokens?: number | undefined;
1830
1875
  }, {
1876
+ agent: string;
1877
+ schedule: string;
1878
+ model?: string | undefined;
1879
+ enabled?: boolean | undefined;
1880
+ command?: string | undefined;
1881
+ prompt?: string | undefined;
1882
+ timeout?: number | undefined;
1883
+ timezone?: string | undefined;
1884
+ notify?: {
1885
+ channel: string;
1886
+ chatId: string;
1887
+ accountId?: string | undefined;
1888
+ } | undefined;
1889
+ maxOutputTokens?: number | undefined;
1890
+ onError?: "notify" | "log" | "disable" | ("notify" | "log" | "disable")[] | undefined;
1891
+ }>, {
1892
+ enabled: boolean;
1831
1893
  agent: string;
1832
1894
  prompt: string;
1895
+ timeout: number;
1896
+ schedule: string;
1897
+ timezone: string;
1898
+ onError: ("notify" | "log" | "disable")[];
1899
+ model?: string | undefined;
1900
+ command?: string | undefined;
1901
+ notify?: {
1902
+ channel: string;
1903
+ chatId: string;
1904
+ accountId?: string | undefined;
1905
+ } | undefined;
1906
+ maxOutputTokens?: number | undefined;
1907
+ }, {
1908
+ agent: string;
1833
1909
  schedule: string;
1834
1910
  model?: string | undefined;
1835
1911
  enabled?: boolean | undefined;
1912
+ command?: string | undefined;
1913
+ prompt?: string | undefined;
1836
1914
  timeout?: number | undefined;
1837
1915
  timezone?: string | undefined;
1838
1916
  notify?: {
@@ -1960,8 +2038,8 @@ declare const daemonConfigSchema: z.ZodObject<{
1960
2038
  * .claude/settings.json permissions.allow with the codegraph_* tools,
1961
2039
  * (c) appends a CodeGraph instruction section to the managed CLAUDE.md,
1962
2040
  * and (d) background-indexes the workspace at daemon boot if .codegraph/
1963
- * is missing. Off by default — flip on for coding agents (mtgl-v2-coder,
1964
- * ksi-v2-coder, hasanah-coding, etc.) where token-volume on exploration
2041
+ * is missing. Off by default — flip on for coding agents (globex-v2-coder,
2042
+ * initech-v2-coder, umbrella-coding, etc.) where token-volume on exploration
1965
2043
  * loops is the bottleneck. */
1966
2044
  codegraph: z.ZodDefault<z.ZodBoolean>;
1967
2045
  /** Per-agent override for the global `session.contextStrategy`. Lets
@@ -1971,7 +2049,7 @@ declare const daemonConfigSchema: z.ZodObject<{
1971
2049
  contextStrategy: z.ZodOptional<z.ZodEnum<["layered", "planner"]>>;
1972
2050
  /** When true, the registry resolves references-recipes for this agent's
1973
2051
  * workspace and renders a deterministic [Verified References] block at
1974
- * priority 4.7. Off by default — flip on per agent (pm-ksi, devops-agent,
2052
+ * priority 4.7. Off by default — flip on per agent (pm-initech, devops-agent,
1975
2053
  * etc.) once a `references/` registry exists in the agent's workspace
1976
2054
  * or repo root. See src/agents/references/. */
1977
2055
  contextReferences: z.ZodDefault<z.ZodBoolean>;
@@ -2051,7 +2129,7 @@ declare const daemonConfigSchema: z.ZodObject<{
2051
2129
  integrations: z.ZodDefault<z.ZodArray<z.ZodObject<{
2052
2130
  /** Service identifier — open string, well-known values in INTEGRATION_KINDS. */
2053
2131
  kind: z.ZodString;
2054
- /** Human-readable label (e.g. "@cx_bot", "Noqta CRM", "anis@noqta.tn"). Unique per (agent, kind). */
2132
+ /** Human-readable label (e.g. "@cx_bot", "Acme CRM", "alex@example.com"). Unique per (agent, kind). */
2055
2133
  label: z.ZodString;
2056
2134
  credentials: z.ZodDefault<z.ZodObject<{
2057
2135
  /** Env var holding the secret. Uppercase identifier; daemon resolves at use-time. */
@@ -2485,7 +2563,7 @@ declare const daemonConfigSchema: z.ZodObject<{
2485
2563
  /** If set, the agent lives on a remote mesh peer (node id). Forces the
2486
2564
  * username→agent map to resolve to this mapping even when a local
2487
2565
  * agent's token resolves to the same GitLab user — prevents collisions
2488
- * like two agents both claiming @devops-noqta. */
2566
+ * like two agents both claiming @devops-acme. */
2489
2567
  node: z.ZodOptional<z.ZodString>;
2490
2568
  }, "strip", z.ZodTypeAny, {
2491
2569
  agentId: string;
@@ -2626,6 +2704,37 @@ declare const daemonConfigSchema: z.ZodObject<{
2626
2704
  clientId?: string | undefined;
2627
2705
  privateKeyFile?: string | undefined;
2628
2706
  }>>;
2707
+ /** ntfy push notifications — outbound only. The operator-facing tap on
2708
+ * the shoulder: cron failures, task errors, and anything an agent decides
2709
+ * is worth interrupting a human for. `chatId` on an outgoing message is
2710
+ * the topic; empty falls back to `topic` here. */
2711
+ ntfy: z.ZodDefault<z.ZodObject<{
2712
+ enabled: z.ZodDefault<z.ZodBoolean>;
2713
+ /** Self-hosted ntfy base URL. Defaults to the public server. */
2714
+ server: z.ZodDefault<z.ZodString>;
2715
+ /** Default topic. Treat it as a secret — on ntfy.sh, knowing the topic
2716
+ * is the only thing needed to read or publish to it. */
2717
+ topic: z.ZodOptional<z.ZodString>;
2718
+ /** Access token for protected topics. */
2719
+ token: z.ZodOptional<z.ZodString>;
2720
+ /** 1 (min) .. 5 (max). ntfy's own default is 3. */
2721
+ defaultPriority: z.ZodDefault<z.ZodNumber>;
2722
+ defaultTitle: z.ZodOptional<z.ZodString>;
2723
+ }, "strip", z.ZodTypeAny, {
2724
+ enabled: boolean;
2725
+ server: string;
2726
+ defaultPriority: number;
2727
+ token?: string | undefined;
2728
+ topic?: string | undefined;
2729
+ defaultTitle?: string | undefined;
2730
+ }, {
2731
+ enabled?: boolean | undefined;
2732
+ token?: string | undefined;
2733
+ server?: string | undefined;
2734
+ topic?: string | undefined;
2735
+ defaultPriority?: number | undefined;
2736
+ defaultTitle?: string | undefined;
2737
+ }>>;
2629
2738
  webrtc: z.ZodDefault<z.ZodObject<{
2630
2739
  enabled: z.ZodDefault<z.ZodBoolean>;
2631
2740
  /** ICE STUN servers for NAT discovery. Default is Google's public STUN. */
@@ -2866,6 +2975,14 @@ declare const daemonConfigSchema: z.ZodObject<{
2866
2975
  clientId?: string | undefined;
2867
2976
  privateKeyFile?: string | undefined;
2868
2977
  };
2978
+ ntfy: {
2979
+ enabled: boolean;
2980
+ server: string;
2981
+ defaultPriority: number;
2982
+ token?: string | undefined;
2983
+ topic?: string | undefined;
2984
+ defaultTitle?: string | undefined;
2985
+ };
2869
2986
  webrtc: {
2870
2987
  enabled: boolean;
2871
2988
  stunServers: string[];
@@ -2979,6 +3096,14 @@ declare const daemonConfigSchema: z.ZodObject<{
2979
3096
  clientId?: string | undefined;
2980
3097
  privateKeyFile?: string | undefined;
2981
3098
  } | undefined;
3099
+ ntfy?: {
3100
+ enabled?: boolean | undefined;
3101
+ token?: string | undefined;
3102
+ server?: string | undefined;
3103
+ topic?: string | undefined;
3104
+ defaultPriority?: number | undefined;
3105
+ defaultTitle?: string | undefined;
3106
+ } | undefined;
2982
3107
  webrtc?: {
2983
3108
  enabled?: boolean | undefined;
2984
3109
  stunServers?: string[] | undefined;
@@ -3010,12 +3135,31 @@ declare const daemonConfigSchema: z.ZodObject<{
3010
3135
  } | undefined;
3011
3136
  } | undefined;
3012
3137
  }>>;
3013
- crons: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
3138
+ crons: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodObject<{
3014
3139
  enabled: z.ZodDefault<z.ZodBoolean>;
3015
3140
  schedule: z.ZodString;
3016
3141
  timezone: z.ZodDefault<z.ZodString>;
3017
3142
  agent: z.ZodString;
3018
- prompt: z.ZodString;
3143
+ prompt: z.ZodDefault<z.ZodString>;
3144
+ /**
3145
+ * A shell command to run INSTEAD of dispatching the agent.
3146
+ *
3147
+ * Seven of this fleet's twenty-six crons were a single command wrapped
3148
+ * in an agent, and every one of them carried a paragraph like "Run this
3149
+ * EXACT command. Do NOT substitute, rewrite, shorten, or fall back to
3150
+ * alternative commands." That paragraph is a scar: it exists because
3151
+ * models kept substituting, and no amount of prompt severity makes a
3152
+ * language model a deterministic executor.
3153
+ *
3154
+ * Measured before this existed: ~$0.31 and ~24s per run to execute one
3155
+ * `node script.js` and repeat ten lines of its output — a 114k-token
3156
+ * context for a job with no judgement in it at all.
3157
+ *
3158
+ * When set, the scheduler runs the command directly. No model, no
3159
+ * tokens, no improvisation. `agent` is still required and is who gets
3160
+ * told when it fails.
3161
+ */
3162
+ command: z.ZodOptional<z.ZodString>;
3019
3163
  timeout: z.ZodDefault<z.ZodNumber>;
3020
3164
  model: z.ZodOptional<z.ZodString>;
3021
3165
  /** Soft cap on output length. Claude Code CLI has no hard flag for this,
@@ -3045,6 +3189,7 @@ declare const daemonConfigSchema: z.ZodObject<{
3045
3189
  timezone: string;
3046
3190
  onError: ("notify" | "log" | "disable")[];
3047
3191
  model?: string | undefined;
3192
+ command?: string | undefined;
3048
3193
  notify?: {
3049
3194
  channel: string;
3050
3195
  chatId: string;
@@ -3052,11 +3197,44 @@ declare const daemonConfigSchema: z.ZodObject<{
3052
3197
  } | undefined;
3053
3198
  maxOutputTokens?: number | undefined;
3054
3199
  }, {
3200
+ agent: string;
3201
+ schedule: string;
3202
+ model?: string | undefined;
3203
+ enabled?: boolean | undefined;
3204
+ command?: string | undefined;
3205
+ prompt?: string | undefined;
3206
+ timeout?: number | undefined;
3207
+ timezone?: string | undefined;
3208
+ notify?: {
3209
+ channel: string;
3210
+ chatId: string;
3211
+ accountId?: string | undefined;
3212
+ } | undefined;
3213
+ maxOutputTokens?: number | undefined;
3214
+ onError?: "notify" | "log" | "disable" | ("notify" | "log" | "disable")[] | undefined;
3215
+ }>, {
3216
+ enabled: boolean;
3055
3217
  agent: string;
3056
3218
  prompt: string;
3219
+ timeout: number;
3220
+ schedule: string;
3221
+ timezone: string;
3222
+ onError: ("notify" | "log" | "disable")[];
3223
+ model?: string | undefined;
3224
+ command?: string | undefined;
3225
+ notify?: {
3226
+ channel: string;
3227
+ chatId: string;
3228
+ accountId?: string | undefined;
3229
+ } | undefined;
3230
+ maxOutputTokens?: number | undefined;
3231
+ }, {
3232
+ agent: string;
3057
3233
  schedule: string;
3058
3234
  model?: string | undefined;
3059
3235
  enabled?: boolean | undefined;
3236
+ command?: string | undefined;
3237
+ prompt?: string | undefined;
3060
3238
  timeout?: number | undefined;
3061
3239
  timezone?: string | undefined;
3062
3240
  notify?: {
@@ -3425,6 +3603,22 @@ declare const daemonConfigSchema: z.ZodObject<{
3425
3603
  project?: string | undefined;
3426
3604
  displayName?: string | undefined;
3427
3605
  }>, "many">>;
3606
+ clients: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
3607
+ name: z.ZodOptional<z.ZodString>;
3608
+ kind: z.ZodOptional<z.ZodEnum<["client", "internal", "own"]>>;
3609
+ respondWithin: z.ZodOptional<z.ZodString>;
3610
+ standing: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
3611
+ }, "strip", z.ZodTypeAny, {
3612
+ standing: string[];
3613
+ name?: string | undefined;
3614
+ kind?: "client" | "internal" | "own" | undefined;
3615
+ respondWithin?: string | undefined;
3616
+ }, {
3617
+ name?: string | undefined;
3618
+ kind?: "client" | "internal" | "own" | undefined;
3619
+ respondWithin?: string | undefined;
3620
+ standing?: string[] | undefined;
3621
+ }>>>;
3428
3622
  workTickMinutes: z.ZodDefault<z.ZodNumber>;
3429
3623
  idleQueueThreshold: z.ZodDefault<z.ZodNumber>;
3430
3624
  standup: z.ZodDefault<z.ZodObject<{
@@ -3496,6 +3690,12 @@ declare const daemonConfigSchema: z.ZodObject<{
3496
3690
  project?: string | undefined;
3497
3691
  displayName?: string | undefined;
3498
3692
  }[];
3693
+ clients: Record<string, {
3694
+ standing: string[];
3695
+ name?: string | undefined;
3696
+ kind?: "client" | "internal" | "own" | undefined;
3697
+ respondWithin?: string | undefined;
3698
+ }>;
3499
3699
  workTickMinutes: number;
3500
3700
  idleQueueThreshold: number;
3501
3701
  standup: {
@@ -3557,6 +3757,12 @@ declare const daemonConfigSchema: z.ZodObject<{
3557
3757
  project?: string | undefined;
3558
3758
  displayName?: string | undefined;
3559
3759
  }[] | undefined;
3760
+ clients?: Record<string, {
3761
+ name?: string | undefined;
3762
+ kind?: "client" | "internal" | "own" | undefined;
3763
+ respondWithin?: string | undefined;
3764
+ standing?: string[] | undefined;
3765
+ }> | undefined;
3560
3766
  workTickMinutes?: number | undefined;
3561
3767
  idleQueueThreshold?: number | undefined;
3562
3768
  standup?: {
@@ -3579,7 +3785,8 @@ declare const daemonConfigSchema: z.ZodObject<{
3579
3785
  type: "gitlab";
3580
3786
  projects: string[];
3581
3787
  }>]>;
3582
- primaryToolLabel: z.ZodOptional<z.ZodString>;
3788
+ primaryToolLabel: z.ZodOptional<z.ZodString>; /** Non-secret metadata — username, email, host URL, portal id, JID, etc.
3789
+ * Visible in the dashboard and to skills. */
3583
3790
  labels: z.ZodDefault<z.ZodArray<z.ZodObject<{
3584
3791
  name: z.ZodString;
3585
3792
  color: z.ZodDefault<z.ZodString>;
@@ -3828,12 +4035,373 @@ declare const daemonConfigSchema: z.ZodObject<{
3828
4035
  bm25?: number | undefined;
3829
4036
  } | undefined;
3830
4037
  }>>;
4038
+ decisions: z.ZodDefault<z.ZodObject<{
4039
+ enabled: z.ZodDefault<z.ZodBoolean>;
4040
+ dbPath: z.ZodDefault<z.ZodString>;
4041
+ /** State can contain message text. With this on, only the hash is kept,
4042
+ * which costs the ability to replay a decision offline. */
4043
+ redactState: z.ZodDefault<z.ZodBoolean>;
4044
+ /** Keep the serialized state for this many rows per seat, then prune to
4045
+ * hashes. Enough to replay and to grade an alternative backend on
4046
+ * identical inputs, without growing without bound. */
4047
+ keepStateRows: z.ZodDefault<z.ZodNumber>;
4048
+ defaultBackend: z.ZodDefault<z.ZodString>;
4049
+ backends: z.ZodDefault<z.ZodObject<{
4050
+ local: z.ZodDefault<z.ZodObject<{
4051
+ provider: z.ZodDefault<z.ZodString>;
4052
+ model: z.ZodDefault<z.ZodString>;
4053
+ /** auto resolves to a forced tool where the provider guarantees one,
4054
+ * and JSON-in-text otherwise (claude-code on OAuth cannot force a
4055
+ * tool). Never resolves to logprobs: that costs one call per
4056
+ * question, so it has to be asked for. */
4057
+ structureMode: z.ZodDefault<z.ZodEnum<["auto", "tool", "text"]>>;
4058
+ normalizeProbabilities: z.ZodDefault<z.ZodBoolean>;
4059
+ nRetryMalformedStructure: z.ZodDefault<z.ZodNumber>;
4060
+ maxStateChars: z.ZodDefault<z.ZodNumber>;
4061
+ }, "strip", z.ZodTypeAny, {
4062
+ provider: string;
4063
+ model: string;
4064
+ structureMode: "tool" | "text" | "auto";
4065
+ normalizeProbabilities: boolean;
4066
+ nRetryMalformedStructure: number;
4067
+ maxStateChars: number;
4068
+ }, {
4069
+ provider?: string | undefined;
4070
+ model?: string | undefined;
4071
+ structureMode?: "tool" | "text" | "auto" | undefined;
4072
+ normalizeProbabilities?: boolean | undefined;
4073
+ nRetryMalformedStructure?: number | undefined;
4074
+ maxStateChars?: number | undefined;
4075
+ }>>;
4076
+ /** A simple-jev server (featherless-ai/simple-jev). Reads the model's
4077
+ * next-token logits rather than asking it to write a probability, so
4078
+ * the distribution is the model's posterior instead of a number it
4079
+ * chose. Still not calibrated to correctness — that comes from
4080
+ * `agentx decisions recalibrate`. */
4081
+ simpleJev: z.ZodDefault<z.ZodObject<{
4082
+ baseUrl: z.ZodDefault<z.ZodString>;
4083
+ model: z.ZodOptional<z.ZodString>;
4084
+ apiKeyEnv: z.ZodOptional<z.ZodString>;
4085
+ timeoutMs: z.ZodDefault<z.ZodNumber>;
4086
+ maxStateChars: z.ZodDefault<z.ZodNumber>;
4087
+ /** Their Choice takes 2-50 candidates, well under Jev's 255. */
4088
+ maxChoiceOptions: z.ZodDefault<z.ZodNumber>;
4089
+ }, "strip", z.ZodTypeAny, {
4090
+ baseUrl: string;
4091
+ timeoutMs: number;
4092
+ maxStateChars: number;
4093
+ maxChoiceOptions: number;
4094
+ model?: string | undefined;
4095
+ apiKeyEnv?: string | undefined;
4096
+ }, {
4097
+ model?: string | undefined;
4098
+ baseUrl?: string | undefined;
4099
+ apiKeyEnv?: string | undefined;
4100
+ timeoutMs?: number | undefined;
4101
+ maxStateChars?: number | undefined;
4102
+ maxChoiceOptions?: number | undefined;
4103
+ }>>;
4104
+ /** TypeSafe Jev through OpenRouter's alpha decisions endpoint.
4105
+ * Verified live 2026-09-19 — resolves to typesafe/jev-1.13-20260917,
4106
+ * provider "TypeSafe", ~0.5s round trip. The id is "jev-latest";
4107
+ * the namespaced "typesafe/jev-latest" 400s, and neither appears in
4108
+ * OpenRouter's public model list. Needs OPENROUTER_API_KEY. */
4109
+ jev: z.ZodDefault<z.ZodObject<{
4110
+ baseUrl: z.ZodDefault<z.ZodString>;
4111
+ path: z.ZodDefault<z.ZodString>;
4112
+ model: z.ZodDefault<z.ZodString>;
4113
+ apiKeyEnv: z.ZodDefault<z.ZodString>;
4114
+ timeoutMs: z.ZodDefault<z.ZodNumber>;
4115
+ maxStateChars: z.ZodDefault<z.ZodNumber>;
4116
+ maxChoiceOptions: z.ZodDefault<z.ZodNumber>;
4117
+ }, "strip", z.ZodTypeAny, {
4118
+ model: string;
4119
+ path: string;
4120
+ baseUrl: string;
4121
+ apiKeyEnv: string;
4122
+ timeoutMs: number;
4123
+ maxStateChars: number;
4124
+ maxChoiceOptions: number;
4125
+ }, {
4126
+ model?: string | undefined;
4127
+ path?: string | undefined;
4128
+ baseUrl?: string | undefined;
4129
+ apiKeyEnv?: string | undefined;
4130
+ timeoutMs?: number | undefined;
4131
+ maxStateChars?: number | undefined;
4132
+ maxChoiceOptions?: number | undefined;
4133
+ }>>;
4134
+ /** Jev direct from TypeSafe rather than through OpenRouter. Same
4135
+ * contract, different billing and rate limits. Needs TYPESAFE_API_KEY. */
4136
+ typesafe: z.ZodDefault<z.ZodObject<{
4137
+ baseUrl: z.ZodDefault<z.ZodString>;
4138
+ path: z.ZodDefault<z.ZodString>;
4139
+ model: z.ZodDefault<z.ZodString>;
4140
+ apiKeyEnv: z.ZodDefault<z.ZodString>;
4141
+ timeoutMs: z.ZodDefault<z.ZodNumber>;
4142
+ maxStateChars: z.ZodDefault<z.ZodNumber>;
4143
+ maxChoiceOptions: z.ZodDefault<z.ZodNumber>;
4144
+ }, "strip", z.ZodTypeAny, {
4145
+ model: string;
4146
+ path: string;
4147
+ baseUrl: string;
4148
+ apiKeyEnv: string;
4149
+ timeoutMs: number;
4150
+ maxStateChars: number;
4151
+ maxChoiceOptions: number;
4152
+ }, {
4153
+ model?: string | undefined;
4154
+ path?: string | undefined;
4155
+ baseUrl?: string | undefined;
4156
+ apiKeyEnv?: string | undefined;
4157
+ timeoutMs?: number | undefined;
4158
+ maxStateChars?: number | undefined;
4159
+ maxChoiceOptions?: number | undefined;
4160
+ }>>;
4161
+ }, "strip", z.ZodTypeAny, {
4162
+ local: {
4163
+ provider: string;
4164
+ model: string;
4165
+ structureMode: "tool" | "text" | "auto";
4166
+ normalizeProbabilities: boolean;
4167
+ nRetryMalformedStructure: number;
4168
+ maxStateChars: number;
4169
+ };
4170
+ simpleJev: {
4171
+ baseUrl: string;
4172
+ timeoutMs: number;
4173
+ maxStateChars: number;
4174
+ maxChoiceOptions: number;
4175
+ model?: string | undefined;
4176
+ apiKeyEnv?: string | undefined;
4177
+ };
4178
+ jev: {
4179
+ model: string;
4180
+ path: string;
4181
+ baseUrl: string;
4182
+ apiKeyEnv: string;
4183
+ timeoutMs: number;
4184
+ maxStateChars: number;
4185
+ maxChoiceOptions: number;
4186
+ };
4187
+ typesafe: {
4188
+ model: string;
4189
+ path: string;
4190
+ baseUrl: string;
4191
+ apiKeyEnv: string;
4192
+ timeoutMs: number;
4193
+ maxStateChars: number;
4194
+ maxChoiceOptions: number;
4195
+ };
4196
+ }, {
4197
+ local?: {
4198
+ provider?: string | undefined;
4199
+ model?: string | undefined;
4200
+ structureMode?: "tool" | "text" | "auto" | undefined;
4201
+ normalizeProbabilities?: boolean | undefined;
4202
+ nRetryMalformedStructure?: number | undefined;
4203
+ maxStateChars?: number | undefined;
4204
+ } | undefined;
4205
+ simpleJev?: {
4206
+ model?: string | undefined;
4207
+ baseUrl?: string | undefined;
4208
+ apiKeyEnv?: string | undefined;
4209
+ timeoutMs?: number | undefined;
4210
+ maxStateChars?: number | undefined;
4211
+ maxChoiceOptions?: number | undefined;
4212
+ } | undefined;
4213
+ jev?: {
4214
+ model?: string | undefined;
4215
+ path?: string | undefined;
4216
+ baseUrl?: string | undefined;
4217
+ apiKeyEnv?: string | undefined;
4218
+ timeoutMs?: number | undefined;
4219
+ maxStateChars?: number | undefined;
4220
+ maxChoiceOptions?: number | undefined;
4221
+ } | undefined;
4222
+ typesafe?: {
4223
+ model?: string | undefined;
4224
+ path?: string | undefined;
4225
+ baseUrl?: string | undefined;
4226
+ apiKeyEnv?: string | undefined;
4227
+ timeoutMs?: number | undefined;
4228
+ maxStateChars?: number | undefined;
4229
+ maxChoiceOptions?: number | undefined;
4230
+ } | undefined;
4231
+ }>>;
4232
+ seats: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodDefault<z.ZodObject<{
4233
+ /** off: the seat is unreachable. shadow: runs and records, incumbent stays
4234
+ * authoritative. active: the answer is used. */
4235
+ mode: z.ZodDefault<z.ZodEnum<["off", "shadow", "active"]>>;
4236
+ /** Backend name from the decisions registry. Per-seat, so one seat can be
4237
+ * graded against a different backend than another at the same time. */
4238
+ backend: z.ZodOptional<z.ZodString>;
4239
+ model: z.ZodOptional<z.ZodString>;
4240
+ timeoutMs: z.ZodDefault<z.ZodNumber>;
4241
+ /** Post-hoc temperature fitted on this seat's own labeled rows. 1 means
4242
+ * "not calibrated yet", which is where every seat starts — see
4243
+ * `agentx decisions calibrate`. */
4244
+ temperature: z.ZodDefault<z.ZodNumber>;
4245
+ /** Fraction of would-be-skips to run anyway. Not a tuning knob: a skipped
4246
+ * decision can never be graded, so without exploration an active seat's
4247
+ * metrics are computed on the biased sample it selected for itself.
4248
+ * Setting this to 0 in active mode means the calibration report stops
4249
+ * being trustworthy the day you promote the seat. */
4250
+ explore: z.ZodDefault<z.ZodNumber>;
4251
+ }, "strip", z.ZodTypeAny, {
4252
+ temperature: number;
4253
+ mode: "active" | "off" | "shadow";
4254
+ timeoutMs: number;
4255
+ explore: number;
4256
+ model?: string | undefined;
4257
+ backend?: string | undefined;
4258
+ }, {
4259
+ model?: string | undefined;
4260
+ temperature?: number | undefined;
4261
+ backend?: string | undefined;
4262
+ mode?: "active" | "off" | "shadow" | undefined;
4263
+ timeoutMs?: number | undefined;
4264
+ explore?: number | undefined;
4265
+ }>>>>;
4266
+ /** Model routing driven by the task-tier seat.
4267
+ *
4268
+ * `cheapModel` is the whole switch: with no model named, no task is
4269
+ * ever routed anywhere. The feature cannot turn itself on, because a
4270
+ * fleet quietly answering on a smaller model is a regression nobody
4271
+ * would see in the output. */
4272
+ routing: z.ZodDefault<z.ZodObject<{
4273
+ cheapModel: z.ZodOptional<z.ZodString>;
4274
+ }, "strip", z.ZodTypeAny, {
4275
+ cheapModel?: string | undefined;
4276
+ }, {
4277
+ cheapModel?: string | undefined;
4278
+ }>>;
4279
+ }, "strip", z.ZodTypeAny, {
4280
+ enabled: boolean;
4281
+ dbPath: string;
4282
+ redactState: boolean;
4283
+ keepStateRows: number;
4284
+ defaultBackend: string;
4285
+ backends: {
4286
+ local: {
4287
+ provider: string;
4288
+ model: string;
4289
+ structureMode: "tool" | "text" | "auto";
4290
+ normalizeProbabilities: boolean;
4291
+ nRetryMalformedStructure: number;
4292
+ maxStateChars: number;
4293
+ };
4294
+ simpleJev: {
4295
+ baseUrl: string;
4296
+ timeoutMs: number;
4297
+ maxStateChars: number;
4298
+ maxChoiceOptions: number;
4299
+ model?: string | undefined;
4300
+ apiKeyEnv?: string | undefined;
4301
+ };
4302
+ jev: {
4303
+ model: string;
4304
+ path: string;
4305
+ baseUrl: string;
4306
+ apiKeyEnv: string;
4307
+ timeoutMs: number;
4308
+ maxStateChars: number;
4309
+ maxChoiceOptions: number;
4310
+ };
4311
+ typesafe: {
4312
+ model: string;
4313
+ path: string;
4314
+ baseUrl: string;
4315
+ apiKeyEnv: string;
4316
+ timeoutMs: number;
4317
+ maxStateChars: number;
4318
+ maxChoiceOptions: number;
4319
+ };
4320
+ };
4321
+ seats: Record<string, {
4322
+ temperature: number;
4323
+ mode: "active" | "off" | "shadow";
4324
+ timeoutMs: number;
4325
+ explore: number;
4326
+ model?: string | undefined;
4327
+ backend?: string | undefined;
4328
+ }>;
4329
+ routing: {
4330
+ cheapModel?: string | undefined;
4331
+ };
4332
+ }, {
4333
+ enabled?: boolean | undefined;
4334
+ dbPath?: string | undefined;
4335
+ redactState?: boolean | undefined;
4336
+ keepStateRows?: number | undefined;
4337
+ defaultBackend?: string | undefined;
4338
+ backends?: {
4339
+ local?: {
4340
+ provider?: string | undefined;
4341
+ model?: string | undefined;
4342
+ structureMode?: "tool" | "text" | "auto" | undefined;
4343
+ normalizeProbabilities?: boolean | undefined;
4344
+ nRetryMalformedStructure?: number | undefined;
4345
+ maxStateChars?: number | undefined;
4346
+ } | undefined;
4347
+ simpleJev?: {
4348
+ model?: string | undefined;
4349
+ baseUrl?: string | undefined;
4350
+ apiKeyEnv?: string | undefined;
4351
+ timeoutMs?: number | undefined;
4352
+ maxStateChars?: number | undefined;
4353
+ maxChoiceOptions?: number | undefined;
4354
+ } | undefined;
4355
+ jev?: {
4356
+ model?: string | undefined;
4357
+ path?: string | undefined;
4358
+ baseUrl?: string | undefined;
4359
+ apiKeyEnv?: string | undefined;
4360
+ timeoutMs?: number | undefined;
4361
+ maxStateChars?: number | undefined;
4362
+ maxChoiceOptions?: number | undefined;
4363
+ } | undefined;
4364
+ typesafe?: {
4365
+ model?: string | undefined;
4366
+ path?: string | undefined;
4367
+ baseUrl?: string | undefined;
4368
+ apiKeyEnv?: string | undefined;
4369
+ timeoutMs?: number | undefined;
4370
+ maxStateChars?: number | undefined;
4371
+ maxChoiceOptions?: number | undefined;
4372
+ } | undefined;
4373
+ } | undefined;
4374
+ seats?: Record<string, {
4375
+ model?: string | undefined;
4376
+ temperature?: number | undefined;
4377
+ backend?: string | undefined;
4378
+ mode?: "active" | "off" | "shadow" | undefined;
4379
+ timeoutMs?: number | undefined;
4380
+ explore?: number | undefined;
4381
+ } | undefined> | undefined;
4382
+ routing?: {
4383
+ cheapModel?: string | undefined;
4384
+ } | undefined;
4385
+ }>>;
3831
4386
  /** Workflow engine — declarative state machines that bind channel events
3832
4387
  * to agents. Off by default; existing installs see no change until
3833
4388
  * flipped. Definitions live under `dir` (default .agentx/workflows/). */
3834
4389
  workflows: z.ZodDefault<z.ZodObject<{
3835
4390
  enabled: z.ZodDefault<z.ZodBoolean>;
3836
4391
  dir: z.ZodDefault<z.ZodString>;
4392
+ /** n8n keeps its several hundred connectors; we keep the agents. Point
4393
+ * this at your n8n and the workflow builder lists YOUR n8n workflows as
4394
+ * steps, so nobody has to copy a webhook URL by hand. */
4395
+ n8n: z.ZodDefault<z.ZodObject<{
4396
+ baseUrl: z.ZodDefault<z.ZodString>;
4397
+ apiKey: z.ZodDefault<z.ZodString>;
4398
+ }, "strip", z.ZodTypeAny, {
4399
+ apiKey: string;
4400
+ baseUrl: string;
4401
+ }, {
4402
+ apiKey?: string | undefined;
4403
+ baseUrl?: string | undefined;
4404
+ }>>;
3837
4405
  matching: z.ZodDefault<z.ZodObject<{
3838
4406
  enabled: z.ZodDefault<z.ZodBoolean>;
3839
4407
  mode: z.ZodDefault<z.ZodEnum<["suggest", "auto"]>>;
@@ -3857,6 +4425,10 @@ declare const daemonConfigSchema: z.ZodObject<{
3857
4425
  }, "strip", z.ZodTypeAny, {
3858
4426
  dir: string;
3859
4427
  enabled: boolean;
4428
+ n8n: {
4429
+ apiKey: string;
4430
+ baseUrl: string;
4431
+ };
3860
4432
  matching: {
3861
4433
  enabled: boolean;
3862
4434
  mode: "auto" | "suggest";
@@ -3867,6 +4439,10 @@ declare const daemonConfigSchema: z.ZodObject<{
3867
4439
  }, {
3868
4440
  dir?: string | undefined;
3869
4441
  enabled?: boolean | undefined;
4442
+ n8n?: {
4443
+ apiKey?: string | undefined;
4444
+ baseUrl?: string | undefined;
4445
+ } | undefined;
3870
4446
  matching?: {
3871
4447
  enabled?: boolean | undefined;
3872
4448
  mode?: "auto" | "suggest" | undefined;
@@ -4039,6 +4615,17 @@ declare const daemonConfigSchema: z.ZodObject<{
4039
4615
  * Raise for Max 20×, lower if your workload stays under the cap naturally. */
4040
4616
  maxClaudeCodeDispatchesPerHour: z.ZodDefault<z.ZodNumber>;
4041
4617
  maxClaudeCodeDispatchesPer5h: z.ZodDefault<z.ZodNumber>;
4618
+ /** How many requests BEFORE the immediate predecessor to show the
4619
+ * session-continuity seat. 0 keeps today's two-message state exactly.
4620
+ *
4621
+ * Off by default on purpose. A probe over 27 hand-written turns found
4622
+ * that at 3, the seat's safety question (`needsHistory`) becomes
4623
+ * cleanly separable where two messages leave it straddling zero — but
4624
+ * that rests on 7 positive examples from synthetic scenarios, and this
4625
+ * seat's failure mode is the agent silently losing conversation
4626
+ * context. The promotion gate for that wants labelled production rows,
4627
+ * not a good afternoon on a fixture. Raise it to collect them. */
4628
+ continuityStateTurns: z.ZodDefault<z.ZodNumber>;
4042
4629
  }, "strip", z.ZodTypeAny, {
4043
4630
  contextStrategy: "layered" | "planner";
4044
4631
  staleMinutes: number;
@@ -4046,6 +4633,7 @@ declare const daemonConfigSchema: z.ZodObject<{
4046
4633
  tierTwoThresholdTokens: number;
4047
4634
  maxClaudeCodeDispatchesPerHour: number;
4048
4635
  maxClaudeCodeDispatchesPer5h: number;
4636
+ continuityStateTurns: number;
4049
4637
  }, {
4050
4638
  contextStrategy?: "layered" | "planner" | undefined;
4051
4639
  staleMinutes?: number | undefined;
@@ -4053,9 +4641,10 @@ declare const daemonConfigSchema: z.ZodObject<{
4053
4641
  tierTwoThresholdTokens?: number | undefined;
4054
4642
  maxClaudeCodeDispatchesPerHour?: number | undefined;
4055
4643
  maxClaudeCodeDispatchesPer5h?: number | undefined;
4644
+ continuityStateTurns?: number | undefined;
4056
4645
  }>>;
4057
4646
  /** Move B — JS/TS plugins. Each entry is an installed npm package name
4058
- * (e.g. `agentx-plugin-mattermost` or `@noqta/plugin-mattermost`); the
4647
+ * (e.g. `agentx-plugin-mattermost` or `@acme/plugin-mattermost`); the
4059
4648
  * loader does a dynamic `import(name)` at boot, validates the manifest,
4060
4649
  * and calls plugin.setup(ctx). Plugins can register channel adapters
4061
4650
  * via ctx.addChannel() and subscribe to bus events via ctx.on(). Empty
@@ -4272,6 +4861,14 @@ declare const daemonConfigSchema: z.ZodObject<{
4272
4861
  clientId?: string | undefined;
4273
4862
  privateKeyFile?: string | undefined;
4274
4863
  };
4864
+ ntfy: {
4865
+ enabled: boolean;
4866
+ server: string;
4867
+ defaultPriority: number;
4868
+ token?: string | undefined;
4869
+ topic?: string | undefined;
4870
+ defaultTitle?: string | undefined;
4871
+ };
4275
4872
  webrtc: {
4276
4873
  enabled: boolean;
4277
4874
  stunServers: string[];
@@ -4312,6 +4909,7 @@ declare const daemonConfigSchema: z.ZodObject<{
4312
4909
  timezone: string;
4313
4910
  onError: ("notify" | "log" | "disable")[];
4314
4911
  model?: string | undefined;
4912
+ command?: string | undefined;
4315
4913
  notify?: {
4316
4914
  channel: string;
4317
4915
  chatId: string;
@@ -4396,9 +4994,67 @@ declare const daemonConfigSchema: z.ZodObject<{
4396
4994
  token?: string | undefined;
4397
4995
  draftAgent?: string | undefined;
4398
4996
  };
4997
+ decisions: {
4998
+ enabled: boolean;
4999
+ dbPath: string;
5000
+ redactState: boolean;
5001
+ keepStateRows: number;
5002
+ defaultBackend: string;
5003
+ backends: {
5004
+ local: {
5005
+ provider: string;
5006
+ model: string;
5007
+ structureMode: "tool" | "text" | "auto";
5008
+ normalizeProbabilities: boolean;
5009
+ nRetryMalformedStructure: number;
5010
+ maxStateChars: number;
5011
+ };
5012
+ simpleJev: {
5013
+ baseUrl: string;
5014
+ timeoutMs: number;
5015
+ maxStateChars: number;
5016
+ maxChoiceOptions: number;
5017
+ model?: string | undefined;
5018
+ apiKeyEnv?: string | undefined;
5019
+ };
5020
+ jev: {
5021
+ model: string;
5022
+ path: string;
5023
+ baseUrl: string;
5024
+ apiKeyEnv: string;
5025
+ timeoutMs: number;
5026
+ maxStateChars: number;
5027
+ maxChoiceOptions: number;
5028
+ };
5029
+ typesafe: {
5030
+ model: string;
5031
+ path: string;
5032
+ baseUrl: string;
5033
+ apiKeyEnv: string;
5034
+ timeoutMs: number;
5035
+ maxStateChars: number;
5036
+ maxChoiceOptions: number;
5037
+ };
5038
+ };
5039
+ seats: Record<string, {
5040
+ temperature: number;
5041
+ mode: "active" | "off" | "shadow";
5042
+ timeoutMs: number;
5043
+ explore: number;
5044
+ model?: string | undefined;
5045
+ backend?: string | undefined;
5046
+ }>;
5047
+ routing: {
5048
+ cheapModel?: string | undefined;
5049
+ };
5050
+ };
4399
5051
  workflows: {
4400
5052
  dir: string;
4401
5053
  enabled: boolean;
5054
+ n8n: {
5055
+ apiKey: string;
5056
+ baseUrl: string;
5057
+ };
4402
5058
  matching: {
4403
5059
  enabled: boolean;
4404
5060
  mode: "auto" | "suggest";
@@ -4442,6 +5098,7 @@ declare const daemonConfigSchema: z.ZodObject<{
4442
5098
  tierTwoThresholdTokens: number;
4443
5099
  maxClaudeCodeDispatchesPerHour: number;
4444
5100
  maxClaudeCodeDispatchesPer5h: number;
5101
+ continuityStateTurns: number;
4445
5102
  };
4446
5103
  plugins: string[];
4447
5104
  processPool: {
@@ -4502,6 +5159,12 @@ declare const daemonConfigSchema: z.ZodObject<{
4502
5159
  project?: string | undefined;
4503
5160
  displayName?: string | undefined;
4504
5161
  }[];
5162
+ clients: Record<string, {
5163
+ standing: string[];
5164
+ name?: string | undefined;
5165
+ kind?: "client" | "internal" | "own" | undefined;
5166
+ respondWithin?: string | undefined;
5167
+ }>;
4505
5168
  workTickMinutes: number;
4506
5169
  idleQueueThreshold: number;
4507
5170
  standup: {
@@ -4693,6 +5356,14 @@ declare const daemonConfigSchema: z.ZodObject<{
4693
5356
  clientId?: string | undefined;
4694
5357
  privateKeyFile?: string | undefined;
4695
5358
  } | undefined;
5359
+ ntfy?: {
5360
+ enabled?: boolean | undefined;
5361
+ token?: string | undefined;
5362
+ server?: string | undefined;
5363
+ topic?: string | undefined;
5364
+ defaultPriority?: number | undefined;
5365
+ defaultTitle?: string | undefined;
5366
+ } | undefined;
4696
5367
  webrtc?: {
4697
5368
  enabled?: boolean | undefined;
4698
5369
  stunServers?: string[] | undefined;
@@ -4726,10 +5397,11 @@ declare const daemonConfigSchema: z.ZodObject<{
4726
5397
  } | undefined;
4727
5398
  crons?: Record<string, {
4728
5399
  agent: string;
4729
- prompt: string;
4730
5400
  schedule: string;
4731
5401
  model?: string | undefined;
4732
5402
  enabled?: boolean | undefined;
5403
+ command?: string | undefined;
5404
+ prompt?: string | undefined;
4733
5405
  timeout?: number | undefined;
4734
5406
  timezone?: string | undefined;
4735
5407
  notify?: {
@@ -4823,6 +5495,12 @@ declare const daemonConfigSchema: z.ZodObject<{
4823
5495
  project?: string | undefined;
4824
5496
  displayName?: string | undefined;
4825
5497
  }[] | undefined;
5498
+ clients?: Record<string, {
5499
+ name?: string | undefined;
5500
+ kind?: "client" | "internal" | "own" | undefined;
5501
+ respondWithin?: string | undefined;
5502
+ standing?: string[] | undefined;
5503
+ }> | undefined;
4826
5504
  workTickMinutes?: number | undefined;
4827
5505
  idleQueueThreshold?: number | undefined;
4828
5506
  standup?: {
@@ -4879,9 +5557,67 @@ declare const daemonConfigSchema: z.ZodObject<{
4879
5557
  }[] | undefined;
4880
5558
  draftAgent?: string | undefined;
4881
5559
  } | undefined;
5560
+ decisions?: {
5561
+ enabled?: boolean | undefined;
5562
+ dbPath?: string | undefined;
5563
+ redactState?: boolean | undefined;
5564
+ keepStateRows?: number | undefined;
5565
+ defaultBackend?: string | undefined;
5566
+ backends?: {
5567
+ local?: {
5568
+ provider?: string | undefined;
5569
+ model?: string | undefined;
5570
+ structureMode?: "tool" | "text" | "auto" | undefined;
5571
+ normalizeProbabilities?: boolean | undefined;
5572
+ nRetryMalformedStructure?: number | undefined;
5573
+ maxStateChars?: number | undefined;
5574
+ } | undefined;
5575
+ simpleJev?: {
5576
+ model?: string | undefined;
5577
+ baseUrl?: string | undefined;
5578
+ apiKeyEnv?: string | undefined;
5579
+ timeoutMs?: number | undefined;
5580
+ maxStateChars?: number | undefined;
5581
+ maxChoiceOptions?: number | undefined;
5582
+ } | undefined;
5583
+ jev?: {
5584
+ model?: string | undefined;
5585
+ path?: string | undefined;
5586
+ baseUrl?: string | undefined;
5587
+ apiKeyEnv?: string | undefined;
5588
+ timeoutMs?: number | undefined;
5589
+ maxStateChars?: number | undefined;
5590
+ maxChoiceOptions?: number | undefined;
5591
+ } | undefined;
5592
+ typesafe?: {
5593
+ model?: string | undefined;
5594
+ path?: string | undefined;
5595
+ baseUrl?: string | undefined;
5596
+ apiKeyEnv?: string | undefined;
5597
+ timeoutMs?: number | undefined;
5598
+ maxStateChars?: number | undefined;
5599
+ maxChoiceOptions?: number | undefined;
5600
+ } | undefined;
5601
+ } | undefined;
5602
+ seats?: Record<string, {
5603
+ model?: string | undefined;
5604
+ temperature?: number | undefined;
5605
+ backend?: string | undefined;
5606
+ mode?: "active" | "off" | "shadow" | undefined;
5607
+ timeoutMs?: number | undefined;
5608
+ explore?: number | undefined;
5609
+ } | undefined> | undefined;
5610
+ routing?: {
5611
+ cheapModel?: string | undefined;
5612
+ } | undefined;
5613
+ } | undefined;
4882
5614
  workflows?: {
4883
5615
  dir?: string | undefined;
4884
5616
  enabled?: boolean | undefined;
5617
+ n8n?: {
5618
+ apiKey?: string | undefined;
5619
+ baseUrl?: string | undefined;
5620
+ } | undefined;
4885
5621
  matching?: {
4886
5622
  enabled?: boolean | undefined;
4887
5623
  mode?: "auto" | "suggest" | undefined;
@@ -4925,6 +5661,7 @@ declare const daemonConfigSchema: z.ZodObject<{
4925
5661
  tierTwoThresholdTokens?: number | undefined;
4926
5662
  maxClaudeCodeDispatchesPerHour?: number | undefined;
4927
5663
  maxClaudeCodeDispatchesPer5h?: number | undefined;
5664
+ continuityStateTurns?: number | undefined;
4928
5665
  } | undefined;
4929
5666
  plugins?: string[] | undefined;
4930
5667
  processPool?: {
@@ -4959,20 +5696,36 @@ interface PeerState {
4959
5696
  consecutiveFailures: number;
4960
5697
  /** Last probe error message — surfaced for debugging via /mesh. */
4961
5698
  lastError?: string;
5699
+ /** True once the peer has answered at least one probe in this process.
5700
+ * Distinguishes "temporarily unreachable node we know hosts these
5701
+ * agents" from "peer configured but never seen" — only the former is
5702
+ * worth deferring messages for. */
5703
+ everHealthy: boolean;
4962
5704
  }
4963
5705
  declare class A2AMesh {
4964
5706
  private peers;
4965
5707
  private healthTimer?;
4966
5708
  private config;
4967
5709
  private log;
4968
- /** Optional callback fired on peer state transitions (recovered /
4969
- * lost / skills changed). Daemon wires this to the event bus for
4970
- * live operator visibility. */
4971
- private peerChangeCallback?;
4972
- /** Register a listener for peer state transitions. Only one listener
4973
- * is kept — repeat calls overwrite. Used by the daemon to bridge
4974
- * into the EventBus without introducing a circular dependency. */
4975
- onPeerChange(cb: typeof A2AMesh.prototype.peerChangeCallback): void;
5710
+ /** Listeners fired on peer state transitions (recovered / lost /
5711
+ * skills changed). The daemon bridges these into the EventBus for
5712
+ * live operator visibility; the router uses them to replay messages
5713
+ * it deferred while a peer was unreachable. */
5714
+ private peerChangeCallbacks;
5715
+ /** Register a listener for peer state transitions. Every registered
5716
+ * listener is called — an earlier single-callback field meant the
5717
+ * daemon's EventBus bridge silently displaced any other subscriber,
5718
+ * which is why the router could not learn about peer recovery.
5719
+ * Used to reach the daemon/router without a circular dependency. */
5720
+ onPeerChange(cb: (event: {
5721
+ peer: string;
5722
+ healthy: boolean;
5723
+ skills: string[];
5724
+ delta: "recovered" | "lost" | "skills-changed";
5725
+ }) => void): void;
5726
+ /** Fan a transition out to every listener. One throwing listener must
5727
+ * not stop the others or abort the discovery loop. */
5728
+ private emitPeerChange;
4976
5729
  constructor(config: DaemonConfig, log?: (...args: unknown[]) => void);
4977
5730
  /**
4978
5731
  * Start the mesh: discover peers and begin health checks.
@@ -5042,7 +5795,7 @@ declare class A2AMesh {
5042
5795
  * the sender used, instead of falling back to api/default. Without
5043
5796
  * this, a GitLab webhook routed across the mesh lands in the
5044
5797
  * recipient's api:default bucket with no project, no issue id, no
5045
- * channelMeta — i.e., the mtgl/hasanah confusion incident on
5798
+ * channelMeta — i.e., the globex/umbrella confusion incident on
5046
5799
  * 2026-04-29 issue #709. Shape matches AgentTask.context. */
5047
5800
  context?: Record<string, unknown>;
5048
5801
  }): Promise<string>;
@@ -5075,7 +5828,7 @@ declare class A2AMesh {
5075
5828
  *
5076
5829
  * Peer lookup is tolerant: the `to` field comes from whichever daemon
5077
5830
  * originated the signal, which often spells the same node differently
5078
- * ("MacBook-Local" vs "macbook-local"). Match on a normalized name so config
5831
+ * ("HQ-Local" vs "hq-local"). Match on a normalized name so config
5079
5832
  * drift across sides doesn't break the signaling path.
5080
5833
  */
5081
5834
  sendSignal(peerName: string, signal: unknown): Promise<boolean>;
@@ -5102,6 +5855,18 @@ declare class A2AMesh {
5102
5855
  * dashboards and /mesh; look them up per-request by peer name instead.
5103
5856
  */
5104
5857
  authHeaders(peerName: string): Record<string, string>;
5858
+ /**
5859
+ * Find the peer that hosts `agentId`, including peers that are currently
5860
+ * unreachable but were healthy earlier in this process (their last-known
5861
+ * skill list is retained across a failed probe).
5862
+ *
5863
+ * Routing uses this to tell a genuinely unknown agent apart from one whose
5864
+ * node is simply down: the first is a drop, the second is a deferral.
5865
+ */
5866
+ findAgentPeer(agentId: string): {
5867
+ peer: string;
5868
+ healthy: boolean;
5869
+ } | undefined;
5105
5870
  directory(): Array<{
5106
5871
  peer: string;
5107
5872
  peerUrl: string;
@@ -5228,12 +5993,20 @@ declare class AgentXDaemon {
5228
5993
  private workflowDispatcher?;
5229
5994
  private workflowStore?;
5230
5995
  private workflowRuns?;
5996
+ private wfHealth?;
5997
+ /** Shares the daemon's SQLite handle; absent when running without one. */
5998
+ private _assistant?;
5999
+ private assistantStore;
6000
+ /** Workflow health for the monitor. Cached for a minute: the dashboard
6001
+ * polls every 15s and dormancy does not change on that timescale. */
6002
+ private workflowHealth;
5231
6003
  private db;
5232
6004
  private loadedPlugins;
5233
6005
  private readonly agentMemory;
5234
6006
  private contacts;
5235
6007
  /** Persistent-claude process registry. Null when no agent has
5236
6008
  * persistentProcess: true (legacy spawn-per-task path). */
6009
+ private sessionMonitor?;
5237
6010
  private processRegistry;
5238
6011
  /** Unified observability bus. Publishers (workflow engine, mesh,
5239
6012
  * channels, signals) emit here; subscribers (SSE, CLI, board
@@ -5254,6 +6027,11 @@ declare class AgentXDaemon {
5254
6027
  * reload cron jobs + in-memory config. Channels / agents / mesh changes
5255
6028
  * still require a restart — we log a warning so the operator knows.
5256
6029
  */
6030
+ /** Bring up the typed-decision seat: register in-tree backends, open the
6031
+ * shadow store, and hand the runtime its config. Best-effort — a seat
6032
+ * that cannot record still answers, and a seat that cannot answer
6033
+ * returns null and leaves its call site's existing behaviour alone. */
6034
+ private initDecisions;
5257
6035
  private startConfigWatcher;
5258
6036
  /**
5259
6037
  * Re-read agentx.json, diff against the in-memory config, apply what we
@@ -5358,7 +6136,7 @@ declare class AgentXDaemon {
5358
6136
  private handleMemoryApi;
5359
6137
  private handleWorkflowEvent;
5360
6138
  /** Mesh-callable outbound send. A peer's workflow `action.send` invokes
5361
- * this when the channel lives on this node (e.g. clawd-server hosts
6139
+ * this when the channel lives on this node (e.g. peer-server hosts
5362
6140
  * whatsapp; macbook's workflow forwards here). Just unwraps to the local
5363
6141
  * router's outbound path so all the same per-account/per-bot resolution
5364
6142
  * applies. Authentication is currently the mesh token at the network
@@ -5368,20 +6146,13 @@ declare class AgentXDaemon {
5368
6146
  * every healthy mesh peer that hosts the channel — a channel's "true"
5369
6147
  * chat list is spread across whichever nodes are actually paired
5370
6148
  * (e.g. macbook has the channel enabled but WhatsApp Baileys is unpaired,
5371
- * while clawd-server is paired; macbook's list is empty but we still want
5372
- * the author to pick from clawd-server's cache). Dedup by `id`; the first
6149
+ * while peer-server is paired; macbook's list is empty but we still want
6150
+ * the author to pick from peer-server's cache). Dedup by `id`; the first
5373
6151
  * source with a given id wins.
5374
6152
  *
5375
6153
  * `sources` in the response tells the editor where the entries came from
5376
6154
  * so it can show that metadata alongside. */
5377
6155
  private handleChannelChats;
5378
- /** Replay a draft as an ad-hoc workflow. The draft itself stays in
5379
- * `_drafts/`; we register a copy as `_adhoc-replay-<draftId>-<ts>.yaml`
5380
- * in the active store, hot-reload, and fire it through the dispatcher.
5381
- * Input is sourced from a trace pulled out of the draft's
5382
- * `sourceTaskIds` — caller can override which trace via `taskId` in the
5383
- * body, or supply a payload directly via `input`. */
5384
- private handleWorkflowDraftReplay;
5385
6156
  /** Manual run endpoint used by `agentx workflow run <id>`. Only workflows
5386
6157
  * whose trigger node is `trigger.manual` are runnable here — any other
5387
6158
  * source expects a live event and shouldn't race with a manual kick. */
@@ -5712,6 +6483,13 @@ interface AgentResponse {
5712
6483
  * actually is, so rotation decisions must use it, never `usage`.
5713
6484
  * Undefined on non-streaming paths (result JSON has no per-call data). */
5714
6485
  contextTokens?: number;
6486
+ /** Agentic-loop iterations the provider took inside THIS user turn, from
6487
+ * the CLI result event's `num_turns`. Distinct from a conversation turn:
6488
+ * one user message can cost many of these when the agent chains tools.
6489
+ * Benchmarks need it to tell "JEV made the agent cheaper" apart from
6490
+ * "JEV made the agent do less work". Undefined when the provider does
6491
+ * not report it. */
6492
+ numTurns?: number;
5715
6493
  /** The model Claude actually billed for (from the CLI's init event). When
5716
6494
  * absent, cost reporting should fall back to the model override / agent
5717
6495
  * config. Knowing the billed model is what makes cache-aware pricing
@@ -5757,12 +6535,12 @@ declare function executeSdk(agent: AgentDef, task: AgentTask, apiKey: string, hi
5757
6535
  * lets the daemon's POST /chat?stream=true actually stream Claude/DeepSeek
5758
6536
  * tokens — without it, the orchestrator returned only after the agentic
5759
6537
  * loop finished and SSE clients saw `role` then `stop` with no content
5760
- * between (the failure mode that surfaced on the noqta-public smoke test
6538
+ * between (the failure mode that surfaced on the acme-public smoke test
5761
6539
  * after the tier switch).
5762
6540
  */
5763
6541
  /** Side-channel for reasoning/thinking chunks — distinct from
5764
6542
  * StreamCallback so callers can route them to a different UI lane
5765
- * (e.g. a collapsible thinking block on noqta.tn, a dimmed terminal
6543
+ * (e.g. a collapsible thinking block on example.com, a dimmed terminal
5766
6544
  * block in the dashboard) without polluting the visible response. */
5767
6545
  type ThinkingCallback = (text: string) => void;
5768
6546
  declare function executeOrchestrator(agent: AgentDef, task: AgentTask, apiKey?: string, historyContext?: string, onDelta?: StreamCallback, providerOpts?: {
@@ -5988,7 +6766,7 @@ interface SeededMessage {
5988
6766
  timestamp: string;
5989
6767
  externalId?: string;
5990
6768
  /** Optional channel-side account/bot identity that handled this message
5991
- * (e.g., Telegram accountId "noqta_cx_bot"). Captured by adapters that
6769
+ * (e.g., Telegram accountId "acme_cx_bot"). Captured by adapters that
5992
6770
  * shadow-log outbound, so seeded history preserves the audit trail of
5993
6771
  * which bot identity actually sent each line. Renderers may ignore it. */
5994
6772
  accountId?: string;
@@ -6214,6 +6992,15 @@ declare class SessionStore {
6214
6992
  * Check if a native CLI session is stale (idle too long for resume to be useful).
6215
6993
  * When stale, the resumed context will be too far behind — better to start fresh.
6216
6994
  */
6995
+ /**
6996
+ * How long since this session last did anything, in ms.
6997
+ *
6998
+ * Used to reason about whether the provider's prompt cache for it is
6999
+ * still warm — a cold cache changes which model is cheaper, because the
7000
+ * saving from a cached read only exists while the cache exists. Returns
7001
+ * null when there is no native session to resume.
7002
+ */
7003
+ sessionIdleMs(agentId: string, channel: string, chatId: string): number | null;
6217
7004
  isSessionStale(agentId: string, channel: string, chatId: string): boolean;
6218
7005
  /**
6219
7006
  * Build a summary of recent messages from OTHER sessions for the same agent today.
@@ -6429,6 +7216,30 @@ declare class WikiStore {
6429
7216
  * Search articles by keyword. Returns articles the agent can read.
6430
7217
  */
6431
7218
  search(query: string, agentId: string, maxResults?: number): WikiArticle[];
7219
+ /**
7220
+ * findRelevant, then re-ranked by the wiki-rerank seat.
7221
+ *
7222
+ * Recall comes from findRelevant rather than search() because
7223
+ * findRelevant is the function everything actually calls — search()
7224
+ * turned out to have no callers at all. Additive on purpose: the
7225
+ * synchronous findRelevant is untouched and its existing callers stay
7226
+ * as they are. Measured on the 12-query eval against this
7227
+ * wiki, re-ranking moves R@1 from 33.3% to 50.0% and R@3 from 41.7% to
7228
+ * 66.7%, for about $0.0005 and 550ms a query.
7229
+ *
7230
+ * Fail-open in every direction. Seat off, backend down, no key, fewer
7231
+ * than two candidates — all return BM25's own order, which is what the
7232
+ * caller would have got anyway.
7233
+ *
7234
+ * Note what this cannot do: it only reorders what BM25 shortlisted. In
7235
+ * the eval R@3 sat exactly on that ceiling, so every remaining miss was
7236
+ * an article BM25 never returned. Widening the shortlist does not fix
7237
+ * that — past 30 the extra candidates measurably diluted the ranking.
7238
+ */
7239
+ findRelevantReranked(query: string, agentId?: string, maxResults?: number, opts?: {
7240
+ shortlist?: number;
7241
+ excerptChars?: number;
7242
+ }): Promise<WikiArticle[]>;
6432
7243
  /**
6433
7244
  * Find articles relevant to a message (for context injection).
6434
7245
  *
@@ -6922,8 +7733,8 @@ declare const classificationSchema: z.ZodObject<{
6922
7733
  channel?: string | undefined;
6923
7734
  preview?: string | undefined;
6924
7735
  agentId?: string | undefined;
6925
- sender?: string | undefined;
6926
7736
  confidence?: number | undefined;
7737
+ sender?: string | undefined;
6927
7738
  }, {
6928
7739
  path: string[];
6929
7740
  status: "pending" | "approved" | "rejected";
@@ -6933,13 +7744,13 @@ declare const classificationSchema: z.ZodObject<{
6933
7744
  channel?: string | undefined;
6934
7745
  preview?: string | undefined;
6935
7746
  agentId?: string | undefined;
7747
+ confidence?: number | undefined;
6936
7748
  sender?: string | undefined;
6937
7749
  proposedAxes?: Record<string, Record<string, string>> | undefined;
6938
7750
  leaf?: {
6939
7751
  output?: string | undefined;
6940
7752
  input?: string | undefined;
6941
7753
  } | undefined;
6942
- confidence?: number | undefined;
6943
7754
  }>;
6944
7755
  type Classification = z.infer<typeof classificationSchema>;
6945
7756
  /** Row in the fingerprint → path snap cache. */
@@ -7142,7 +7953,7 @@ declare class GraphStore {
7142
7953
  * Commit a full classification path: for each path element that doesn't
7143
7954
  * yet exist, infer its schema level by matching the proposed axes against
7144
7955
  * the level's required axes (first match ≥ cursor wins — this handles
7145
- * paths that skip levels, like business → noqta where location is
7956
+ * paths that skip levels, like business → acme where location is
7146
7957
  * absent). Refreshes the node list between adds so callers in a loop
7147
7958
  * don't hit "Node id already exists" on the second iteration.
7148
7959
  */
@@ -7160,6 +7971,10 @@ declare class GraphStore {
7160
7971
  * state, not the original).
7161
7972
  */
7162
7973
  listPendingClassifications(limit?: number): Classification[];
7974
+ /** Every classification, newest-first, collapsed one row per message.
7975
+ * The human-label queue needs the whole population rather than one
7976
+ * status, because the rows worth checking are the auto-approved ones. */
7977
+ listAllClassifications(): Classification[];
7163
7978
  /** Same contract as listPendingClassifications but filtered to any status. */
7164
7979
  listByStatus(status: Classification["status"], limit?: number): Classification[];
7165
7980
  /**
@@ -7321,8 +8136,11 @@ declare class LandscapeBuilder {
7321
8136
  interface RunningTask {
7322
8137
  /** Unique id for this execution (timestamp-based). */
7323
8138
  id: string;
7324
- /** First 200 chars of the user message, for display. */
8139
+ /** First 200 chars of the user message, for dense lists. */
7325
8140
  messagePreview: string;
8141
+ /** The whole request. A task page shows what was actually asked, and the
8142
+ * preview cuts mid-sentence — or mid-JSON, which reads as a bug. */
8143
+ message: string;
7326
8144
  /** Origin channel (telegram, whatsapp, gitlab, api, cron, business, a2a, …). */
7327
8145
  channel: string;
7328
8146
  /** Group / chat / issue id from which the task arrived. */
@@ -7365,6 +8183,11 @@ declare class AgentRegistry {
7365
8183
  * prompt on every task. */
7366
8184
  readonly agentMemory: AgentMemory;
7367
8185
  private patternStore;
8186
+ /** Model to drop mechanical tasks onto, from
8187
+ * `decisions.routing.cheapModel`. Unset means no routing happens at
8188
+ * all — the feature is off until an operator names the model, so it
8189
+ * cannot silently downgrade a fleet that never asked for it. */
8190
+ private get cheapModel();
7368
8191
  private rateLimiter;
7369
8192
  private tokenTracker;
7370
8193
  private landscape?;
@@ -7450,9 +8273,9 @@ declare class AgentRegistry {
7450
8273
  * When `atMentionsOnly` is true, only `@`-prefixed mentions are considered.
7451
8274
  * This is used for messages originating from another bot (cross-daemon
7452
8275
  * Telegram cascades, for example) where we don't want bare-word matches
7453
- * like "nadia" in prose or "devops-mtgl" quoted in a reply to trigger
8276
+ * like "marketing" in prose or "devops-globex" quoted in a reply to trigger
7454
8277
  * agents spuriously. Intentional handoffs still work because agents
7455
- * write explicit `@noqta_X_bot` handles.
8278
+ * write explicit `@acme_X_bot` handles.
7456
8279
  */
7457
8280
  findByMention(text: string, opts?: {
7458
8281
  atMentionsOnly?: boolean;
@@ -7478,6 +8301,16 @@ declare class AgentRegistry {
7478
8301
  *
7479
8302
  * Errors are swallowed by design — memory continuity is best-effort,
7480
8303
  * it must never block or break the rotation it's hooked into. */
8304
+ /**
8305
+ * Ask the session-continuity seat whether to rotate before any
8306
+ * mechanical trigger fires. Returns true only for a confident,
8307
+ * active-mode early rotation.
8308
+ *
8309
+ * Never throws: askSeat is fail-open by contract, and everything else
8310
+ * here is a guarded read. Off, shadow, backend error and missing
8311
+ * history all return false, which is today's behaviour exactly.
8312
+ */
8313
+ private maybeRotateForContinuity;
7481
8314
  private captureRotationMemoAsync;
7482
8315
  /**
7483
8316
  * Build peer list for context engine.
@@ -7621,7 +8454,7 @@ declare class AgentRegistry {
7621
8454
  totalTokens: number;
7622
8455
  totalInput: number;
7623
8456
  totalOutput: number;
7624
- totalCacheRead: number;
8457
+ totalCacheRead: number; /** Runtime handover store — shared with MessageRouter via file on disk. */
7625
8458
  totalCacheCreate: number;
7626
8459
  cacheHitRatio: number;
7627
8460
  totalErrors: number;
@@ -7981,7 +8814,7 @@ declare const businessConfigSchema: z.ZodObject<{
7981
8814
  * existing agentx.json files validate without modification. */
7982
8815
  projects: z.ZodDefault<z.ZodArray<z.ZodObject<{
7983
8816
  /** Project identifier. For GitLab/GitHub: "owner/repo". For
7984
- * noqta-internal projects: a stable string. */
8817
+ * acme-internal projects: a stable string. */
7985
8818
  id: z.ZodString;
7986
8819
  /** AgentId of the PM for this project. Looked up by
7987
8820
  * `Organization.pmFor(project)` at dispatch time. */
@@ -8036,6 +8869,32 @@ declare const businessConfigSchema: z.ZodObject<{
8036
8869
  project?: string | undefined;
8037
8870
  displayName?: string | undefined;
8038
8871
  }>, "many">>;
8872
+ /** Overrides for derived clients. Keyed by client id; absent entries get
8873
+ * defaults, so this stays empty until you need a clock or an
8874
+ * authorization. */
8875
+ clients: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
8876
+ /** Display name. Defaults to the client id. */
8877
+ name: z.ZodOptional<z.ZodString>;
8878
+ /** "client" is someone who is waiting on you and can be let down; "own"
8879
+ * is your own product; "internal" is machinery with no external clock. */
8880
+ kind: z.ZodOptional<z.ZodEnum<["client", "internal", "own"]>>;
8881
+ /** How long a wait may last before it starts costing: "4h", "90m", "2d".
8882
+ * Unset means no external clock, so delay is flat. */
8883
+ respondWithin: z.ZodOptional<z.ZodString>;
8884
+ /** Capabilities an agent may exercise unattended. "*" means all. Ignored
8885
+ * for kind "client" — see mayProceedUnattended(). */
8886
+ standing: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
8887
+ }, "strip", z.ZodTypeAny, {
8888
+ standing: string[];
8889
+ name?: string | undefined;
8890
+ kind?: "client" | "internal" | "own" | undefined;
8891
+ respondWithin?: string | undefined;
8892
+ }, {
8893
+ name?: string | undefined;
8894
+ kind?: "client" | "internal" | "own" | undefined;
8895
+ respondWithin?: string | undefined;
8896
+ standing?: string[] | undefined;
8897
+ }>>>;
8039
8898
  /** Work-tick cadence in minutes during business hours. Default 15. */
8040
8899
  workTickMinutes: z.ZodDefault<z.ZodNumber>;
8041
8900
  /** Max queue depth for an idle agent before skipping the work tick (avoids piling up). */
@@ -8124,6 +8983,12 @@ declare const businessConfigSchema: z.ZodObject<{
8124
8983
  project?: string | undefined;
8125
8984
  displayName?: string | undefined;
8126
8985
  }[];
8986
+ clients: Record<string, {
8987
+ standing: string[];
8988
+ name?: string | undefined;
8989
+ kind?: "client" | "internal" | "own" | undefined;
8990
+ respondWithin?: string | undefined;
8991
+ }>;
8127
8992
  workTickMinutes: number;
8128
8993
  idleQueueThreshold: number;
8129
8994
  standup: {
@@ -8185,6 +9050,12 @@ declare const businessConfigSchema: z.ZodObject<{
8185
9050
  project?: string | undefined;
8186
9051
  displayName?: string | undefined;
8187
9052
  }[] | undefined;
9053
+ clients?: Record<string, {
9054
+ name?: string | undefined;
9055
+ kind?: "client" | "internal" | "own" | undefined;
9056
+ respondWithin?: string | undefined;
9057
+ standing?: string[] | undefined;
9058
+ }> | undefined;
8188
9059
  workTickMinutes?: number | undefined;
8189
9060
  idleQueueThreshold?: number | undefined;
8190
9061
  standup?: {
@@ -8523,11 +9394,27 @@ declare class MessageRouter {
8523
9394
  private inflight;
8524
9395
  /** In-flight mesh forwards (this node is awaiting a peer's response).
8525
9396
  * Counted so the daemon's shutdown drain can wait for these in addition
8526
- * to local agent tasks — otherwise a clawd restart mid-forward kills the
9397
+ * to local agent tasks — otherwise a peer restart mid-forward kills the
8527
9398
  * awaiter, the peer's response lands on a dead connection, and the
8528
9399
  * inflight-replay re-runs the task on the peer. */
8529
9400
  private activeMeshForwards;
8530
9401
  getActiveMeshForwardCount(): number;
9402
+ /** Messages addressed to an agent on a mesh peer that was unreachable at
9403
+ * the moment they arrived, keyed by peer name, replayed when the peer
9404
+ * comes back.
9405
+ *
9406
+ * Before this existed a peer flap was silently destructive: the routing
9407
+ * pipeline saw an agent that no healthy peer advertised, called it
9408
+ * `unknown_agent`, and dropped the message for good. The mesh recovers on
9409
+ * its own within a probe cycle (~60s), but nothing replayed what was lost
9410
+ * in between, so the person who @-mentioned the agent just watched it
9411
+ * ignore them. Deliberately in-memory: a daemon restart drops the queue,
9412
+ * which is the safe direction — a stale replay is worse than a miss.
9413
+ * Bounded by both age and count so a peer that never returns cannot grow
9414
+ * it without limit. */
9415
+ private deferredByPeer;
9416
+ private readonly MESH_DEFER_TTL_MS;
9417
+ private readonly MESH_DEFER_MAX_PER_PEER;
8531
9418
  constructor(registry: AgentRegistry, config: DaemonConfig, hooks?: HookRegistry, log?: (...args: unknown[]) => void);
8532
9419
  private loadDedupFromDisk;
8533
9420
  private scheduleDedupSave;
@@ -8648,7 +9535,7 @@ declare class MessageRouter {
8648
9535
  * Why a comment at all: this used to be ❌-only, on the reasoning that
8649
9536
  * transient failures would pollute the thread. In practice a reporter who
8650
9537
  * @-mentions a bot and gets 👀 then silence assumes the bot is ignoring
8651
- * them and keeps re-pinging — on noqta/minbar#46 that was 9 mentions over
9538
+ * them and keeps re-pinging — on acme/soylent#46 that was 9 mentions over
8652
9539
  * 74 minutes of upstream 529s, every one of them silently dropped. One
8653
9540
  * comment per outage is far cheaper than that. Nothing retries on its own,
8654
9541
  * so the text says plainly that a re-mention is what resumes it.
@@ -8678,6 +9565,27 @@ declare class MessageRouter {
8678
9565
  * Used when the channel adapter resolved the agent but it's not local.
8679
9566
  */
8680
9567
  private handleViaMeshByAgentId;
9568
+ /**
9569
+ * Hold a message addressed to an agent on an unreachable peer.
9570
+ *
9571
+ * Deduped by the same `<channel>:<accountId>:<id>` key the inbound dedupe
9572
+ * uses, because the upstream that delivered the message often redelivers it
9573
+ * while the peer is still down (GitLab retries its webhook), and we do not
9574
+ * want the agent to answer the same mention twice on recovery.
9575
+ */
9576
+ private deferForPeer;
9577
+ /**
9578
+ * Replay everything held for a peer that just came back.
9579
+ *
9580
+ * Runs sequentially: each entry is a real agent turn on the remote node,
9581
+ * and firing a backlog at it in parallel would spike a node that has only
9582
+ * just recovered. Entries older than the TTL are dropped rather than
9583
+ * answered — a reply to a 40-minute-old mention is noise.
9584
+ */
9585
+ private replayDeferred;
9586
+ /** Held-message counts by peer — surfaced to the daemon for /health and
9587
+ * the dashboard so a growing backlog is visible rather than inferred. */
9588
+ getDeferredMeshCounts(): Record<string, number>;
8681
9589
  /**
8682
9590
  * Route to a specific named mesh peer by agentId.
8683
9591
  * Used when preferNode is set on the incoming message.
@@ -8773,8 +9681,8 @@ declare class TelegramAdapter implements ChannelAdapter {
8773
9681
  private groupStore;
8774
9682
  /** Account IDs of bots currently active (member/administrator) in a group.
8775
9683
  * Used by the router to pick the correct bot when an agent has multiple
8776
- * Telegram accounts bound to it (e.g. pm-ksi → both @noqta_ksi_bot and
8777
- * @noqta_pm_ksi_bot) — the in-group account should win, otherwise messages
9684
+ * Telegram accounts bound to it (e.g. pm-initech → both @acme_initech_bot and
9685
+ * @acme_pm_initech_bot) — the in-group account should win, otherwise messages
8778
9686
  * to the absent bot get silently dropped by multi-account-dedup. */
8779
9687
  getGroupBotAccounts(groupId: string): string[];
8780
9688
  /**
@@ -9075,7 +9983,7 @@ declare class WhatsAppAdapter implements ChannelAdapter {
9075
9983
  * Baileys' HistoryMessage shape to the channel-agnostic SeededMessage
9076
9984
  * shape consumed by SessionStore on cold session create. Bounded by the
9077
9985
  * caller's maxMessages/maxChars; fromMe → role:agent. The chatId is the
9078
- * Baileys jid (e.g., "21694xxx@s.whatsapp.net" for DMs). */
9986
+ * Baileys jid (e.g., "1000000xxx@s.whatsapp.net" for DMs). */
9079
9987
  seedHistory(chatId: string, opts: {
9080
9988
  sinceISO?: string;
9081
9989
  maxMessages: number;
@@ -9094,6 +10002,9 @@ interface CronJobState {
9094
10002
  timezone: string;
9095
10003
  agent: string;
9096
10004
  prompt: string;
10005
+ /** Run this shell command instead of dispatching the agent. See the
10006
+ * cron schema in daemon/config.ts for why this exists. */
10007
+ command?: string;
9097
10008
  timeout: number;
9098
10009
  model?: string;
9099
10010
  /** Soft output-length cap appended to the prompt at invocation time.
@@ -9145,6 +10056,23 @@ declare class CronScheduler {
9145
10056
  setNotifyCallback(cb: CronNotifyCallback): void;
9146
10057
  start(): Promise<void>;
9147
10058
  stop(): Promise<void>;
10059
+ /** Node stores a timer delay in a 32-bit signed int. Anything larger is
10060
+ * silently coerced to 1ms — the timer fires IMMEDIATELY and only a
10061
+ * TimeoutOverflowWarning on stderr says why. ~24.8 days. */
10062
+ private static readonly MAX_TIMEOUT_MS;
10063
+ /**
10064
+ * Arm a timer for an absolute moment, however far away.
10065
+ *
10066
+ * A job scheduled further out than 24.8 days used to fire the instant
10067
+ * the daemon started, every restart, forever. A monthly accounting job
10068
+ * set for the 20th ran a month early on every deploy — and because the
10069
+ * only symptom was a warning about integers, it read as noise.
10070
+ *
10071
+ * Long waits are split into hops. Each hop recomputes the remaining time
10072
+ * from the TARGET rather than subtracting a constant, so the schedule
10073
+ * cannot drift across sleeps, clock adjustments or a slow hop.
10074
+ */
10075
+ private armTimer;
9148
10076
  private scheduleNext;
9149
10077
  private scheduleRetry;
9150
10078
  /**
@@ -9154,6 +10082,20 @@ declare class CronScheduler {
9154
10082
  * until the 1c per-source promotion lands.
9155
10083
  */
9156
10084
  private recordCronDecisionInLedger;
10085
+ /**
10086
+ * Run a cron whose work is a shell command, with no model involved.
10087
+ *
10088
+ * Failure handling deliberately mirrors the agent path — same
10089
+ * consecutiveErrors, same notify, same disable-after-three, same retry —
10090
+ * so an operator does not have to learn two sets of cron semantics
10091
+ * depending on how a job happens to be defined.
10092
+ *
10093
+ * Only the output TAIL is kept. The agent prompts this replaces all said
10094
+ * "report the exit code plus the last 10 lines", which was the right
10095
+ * instinct: a run record is read by a person after something broke, and
10096
+ * the end of the output is where the breakage is.
10097
+ */
10098
+ private executeCommandJob;
9157
10099
  private executeJob;
9158
10100
  /**
9159
10101
  * Detect cron jobs that should have fired while the daemon was down.
@@ -9196,6 +10138,15 @@ interface ProviderCapabilities {
9196
10138
  vision: boolean;
9197
10139
  thinking: boolean;
9198
10140
  maxContext: number;
10141
+ /** Can be made to return a value matching a schema, rather than prose the
10142
+ * caller has to parse. False does NOT mean "no structured output" — it
10143
+ * means no *guarantee*, so callers fall back to JSON-in-text plus a
10144
+ * correction round. The claude-code CLI on an OAuth credential is the
10145
+ * case that matters: ClaudeCodeProvider.generateRaw() throws there. */
10146
+ structuredOutput: boolean;
10147
+ /** Exposes per-token logprobs. The only source of a probability that is
10148
+ * the model's own posterior rather than a number it wrote out. */
10149
+ logprobs: boolean;
9199
10150
  }
9200
10151
  declare const PROVIDER_CAPABILITIES: Record<string, ProviderCapabilities>;
9201
10152
  /**