@rubytech/create-sitedesk-code 0.1.522 → 0.1.523

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 (338) hide show
  1. package/package.json +1 -1
  2. package/payload/platform/lib/graph-style/dist/index.d.ts.map +1 -1
  3. package/payload/platform/lib/graph-style/dist/index.js +28 -0
  4. package/payload/platform/lib/graph-style/dist/index.js.map +1 -1
  5. package/payload/platform/lib/graph-style/src/__tests__/caption-coverage.test.ts +7 -0
  6. package/payload/platform/lib/graph-style/src/index.ts +24 -0
  7. package/payload/platform/lib/graph-write/dist/__tests__/merge-on.test.d.ts.map +1 -0
  8. package/payload/platform/lib/graph-write/dist/__tests__/merge-on.test.js.map +1 -0
  9. package/payload/platform/lib/graph-write/dist/index.d.ts +16 -0
  10. package/payload/platform/lib/graph-write/dist/index.d.ts.map +1 -1
  11. package/payload/platform/lib/graph-write/dist/index.js +83 -6
  12. package/payload/platform/lib/graph-write/dist/index.js.map +1 -1
  13. package/payload/platform/lib/graph-write/src/index.ts +117 -10
  14. package/payload/platform/lib/routine-templates/dist/index.d.ts +151 -0
  15. package/payload/platform/lib/routine-templates/dist/index.d.ts.map +1 -0
  16. package/payload/platform/lib/routine-templates/dist/index.js +207 -0
  17. package/payload/platform/lib/routine-templates/dist/index.js.map +1 -0
  18. package/payload/platform/lib/routine-templates/dist/roster.d.ts +57 -0
  19. package/payload/platform/lib/routine-templates/dist/roster.d.ts.map +1 -0
  20. package/payload/platform/lib/routine-templates/dist/roster.js +182 -0
  21. package/payload/platform/lib/routine-templates/dist/roster.js.map +1 -0
  22. package/payload/platform/lib/routine-templates/dist/seed-cli.d.ts +2 -0
  23. package/payload/platform/lib/routine-templates/dist/seed-cli.d.ts.map +1 -0
  24. package/payload/platform/lib/routine-templates/dist/seed-cli.js +64 -0
  25. package/payload/platform/lib/routine-templates/dist/seed-cli.js.map +1 -0
  26. package/payload/platform/lib/routine-templates/package.json +6 -0
  27. package/payload/platform/lib/routine-templates/src/__tests__/roster.test.ts +170 -0
  28. package/payload/platform/lib/routine-templates/src/__tests__/seed.test.ts +298 -0
  29. package/payload/platform/lib/routine-templates/src/index.ts +299 -0
  30. package/payload/platform/lib/routine-templates/src/roster.ts +206 -0
  31. package/payload/platform/lib/routine-templates/src/seed-cli.ts +65 -0
  32. package/payload/platform/lib/routine-templates/tsconfig.json +9 -0
  33. package/payload/platform/lib/routine-templates/vitest.config.ts +9 -0
  34. package/payload/platform/neo4j/edge-annotations.json +2 -2
  35. package/payload/platform/neo4j/schema.cypher +25 -1
  36. package/payload/platform/package.json +3 -2
  37. package/payload/platform/plugins/admin/PLUGIN.md +2 -2
  38. package/payload/platform/plugins/admin/mcp/dist/index.js +39 -1
  39. package/payload/platform/plugins/admin/mcp/dist/index.js.map +1 -1
  40. package/payload/platform/plugins/admin/skills/platform-architecture/SKILL.md +277 -61
  41. package/payload/platform/plugins/admin/skills/whats-new/SKILL.md +6 -0
  42. package/payload/platform/plugins/docs/references/admin-ui.md +265 -59
  43. package/payload/platform/plugins/docs/references/memory-guide.md +11 -1
  44. package/payload/platform/plugins/graph/.claude-plugin/plugin.json +1 -1
  45. package/payload/platform/plugins/graph/PLUGIN.md +1 -1
  46. package/payload/platform/plugins/memory/PLUGIN.md +1 -1
  47. package/payload/platform/plugins/memory/mcp/dist/index.js +12 -5
  48. package/payload/platform/plugins/memory/mcp/dist/index.js.map +1 -1
  49. package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/phase-estate-census.test.d.ts +2 -0
  50. package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/phase-estate-census.test.d.ts.map +1 -0
  51. package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/phase-estate-census.test.js +197 -0
  52. package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/phase-estate-census.test.js.map +1 -0
  53. package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/schema-loader.test.js +55 -9
  54. package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/schema-loader.test.js.map +1 -1
  55. package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/schema-validator.test.js +96 -0
  56. package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/schema-validator.test.js.map +1 -1
  57. package/payload/platform/plugins/memory/mcp/dist/lib/dream-cycle/index.d.ts +7 -0
  58. package/payload/platform/plugins/memory/mcp/dist/lib/dream-cycle/index.d.ts.map +1 -1
  59. package/payload/platform/plugins/memory/mcp/dist/lib/dream-cycle/phase-estate-census.d.ts +29 -0
  60. package/payload/platform/plugins/memory/mcp/dist/lib/dream-cycle/phase-estate-census.d.ts.map +1 -0
  61. package/payload/platform/plugins/memory/mcp/dist/lib/dream-cycle/phase-estate-census.js +126 -0
  62. package/payload/platform/plugins/memory/mcp/dist/lib/dream-cycle/phase-estate-census.js.map +1 -0
  63. package/payload/platform/plugins/memory/mcp/dist/scripts/dream-cycle-sweep.js +7 -4
  64. package/payload/platform/plugins/memory/mcp/dist/scripts/dream-cycle-sweep.js.map +1 -1
  65. package/payload/platform/plugins/memory/mcp/dist/tools/memory-dream-run.d.ts +1 -0
  66. package/payload/platform/plugins/memory/mcp/dist/tools/memory-dream-run.d.ts.map +1 -1
  67. package/payload/platform/plugins/memory/mcp/dist/tools/memory-dream-run.js +18 -1
  68. package/payload/platform/plugins/memory/mcp/dist/tools/memory-dream-run.js.map +1 -1
  69. package/payload/platform/plugins/memory/mcp/dist/tools/memory-write.d.ts +7 -0
  70. package/payload/platform/plugins/memory/mcp/dist/tools/memory-write.d.ts.map +1 -1
  71. package/payload/platform/plugins/memory/mcp/dist/tools/memory-write.js +4 -3
  72. package/payload/platform/plugins/memory/mcp/dist/tools/memory-write.js.map +1 -1
  73. package/payload/platform/plugins/memory/mcp/vitest.config.ts +2 -0
  74. package/payload/platform/plugins/memory/references/schema-estate-agent.md +2 -2
  75. package/payload/platform/plugins/memory/skills/conversation-archive-enrich/SKILL.md +4 -4
  76. package/payload/platform/plugins/quickbooks/PLUGIN.md +10 -10
  77. package/payload/platform/plugins/scheduling/PLUGIN.md +49 -1
  78. package/payload/platform/plugins/scheduling/mcp/dist/index.js +48 -0
  79. package/payload/platform/plugins/scheduling/mcp/dist/index.js.map +1 -1
  80. package/payload/platform/plugins/scheduling/mcp/dist/lib/__tests__/notes-cap.test.d.ts +2 -0
  81. package/payload/platform/plugins/scheduling/mcp/dist/lib/__tests__/notes-cap.test.d.ts.map +1 -0
  82. package/payload/platform/plugins/scheduling/mcp/dist/lib/__tests__/notes-cap.test.js +78 -0
  83. package/payload/platform/plugins/scheduling/mcp/dist/lib/__tests__/notes-cap.test.js.map +1 -0
  84. package/payload/platform/plugins/scheduling/mcp/dist/lib/__tests__/routine-run.test.d.ts +2 -0
  85. package/payload/platform/plugins/scheduling/mcp/dist/lib/__tests__/routine-run.test.d.ts.map +1 -0
  86. package/payload/platform/plugins/scheduling/mcp/dist/lib/__tests__/routine-run.test.js +457 -0
  87. package/payload/platform/plugins/scheduling/mcp/dist/lib/__tests__/routine-run.test.js.map +1 -0
  88. package/payload/platform/plugins/scheduling/mcp/dist/lib/notes-cap.d.ts +35 -0
  89. package/payload/platform/plugins/scheduling/mcp/dist/lib/notes-cap.d.ts.map +1 -0
  90. package/payload/platform/plugins/scheduling/mcp/dist/lib/notes-cap.js +39 -0
  91. package/payload/platform/plugins/scheduling/mcp/dist/lib/notes-cap.js.map +1 -0
  92. package/payload/platform/plugins/scheduling/mcp/dist/lib/routine-run.d.ts +175 -0
  93. package/payload/platform/plugins/scheduling/mcp/dist/lib/routine-run.d.ts.map +1 -0
  94. package/payload/platform/plugins/scheduling/mcp/dist/lib/routine-run.js +533 -0
  95. package/payload/platform/plugins/scheduling/mcp/dist/lib/routine-run.js.map +1 -0
  96. package/payload/platform/plugins/scheduling/mcp/dist/scripts/__tests__/agent-turn-dispatch.test.js +123 -9
  97. package/payload/platform/plugins/scheduling/mcp/dist/scripts/__tests__/agent-turn-dispatch.test.js.map +1 -1
  98. package/payload/platform/plugins/scheduling/mcp/dist/scripts/__tests__/routine-roster-audit.test.d.ts +2 -0
  99. package/payload/platform/plugins/scheduling/mcp/dist/scripts/__tests__/routine-roster-audit.test.d.ts.map +1 -0
  100. package/payload/platform/plugins/scheduling/mcp/dist/scripts/__tests__/routine-roster-audit.test.js +189 -0
  101. package/payload/platform/plugins/scheduling/mcp/dist/scripts/__tests__/routine-roster-audit.test.js.map +1 -0
  102. package/payload/platform/plugins/scheduling/mcp/dist/scripts/__tests__/suspension-census.test.d.ts +2 -0
  103. package/payload/platform/plugins/scheduling/mcp/dist/scripts/__tests__/suspension-census.test.d.ts.map +1 -0
  104. package/payload/platform/plugins/scheduling/mcp/dist/scripts/__tests__/suspension-census.test.js +95 -0
  105. package/payload/platform/plugins/scheduling/mcp/dist/scripts/__tests__/suspension-census.test.js.map +1 -0
  106. package/payload/platform/plugins/scheduling/mcp/dist/scripts/__tests__/sweep-excludes-suspended.test.d.ts +2 -0
  107. package/payload/platform/plugins/scheduling/mcp/dist/scripts/__tests__/sweep-excludes-suspended.test.d.ts.map +1 -0
  108. package/payload/platform/plugins/scheduling/mcp/dist/scripts/__tests__/sweep-excludes-suspended.test.js +114 -0
  109. package/payload/platform/plugins/scheduling/mcp/dist/scripts/__tests__/sweep-excludes-suspended.test.js.map +1 -0
  110. package/payload/platform/plugins/scheduling/mcp/dist/scripts/agent-turn-dispatch.d.ts +109 -2
  111. package/payload/platform/plugins/scheduling/mcp/dist/scripts/agent-turn-dispatch.d.ts.map +1 -1
  112. package/payload/platform/plugins/scheduling/mcp/dist/scripts/agent-turn-dispatch.js +340 -9
  113. package/payload/platform/plugins/scheduling/mcp/dist/scripts/agent-turn-dispatch.js.map +1 -1
  114. package/payload/platform/plugins/scheduling/mcp/dist/scripts/check-due-events.d.ts +9 -1
  115. package/payload/platform/plugins/scheduling/mcp/dist/scripts/check-due-events.d.ts.map +1 -1
  116. package/payload/platform/plugins/scheduling/mcp/dist/scripts/check-due-events.js +210 -45
  117. package/payload/platform/plugins/scheduling/mcp/dist/scripts/check-due-events.js.map +1 -1
  118. package/payload/platform/plugins/scheduling/mcp/dist/scripts/reconcile-bookings.js +43 -1
  119. package/payload/platform/plugins/scheduling/mcp/dist/scripts/reconcile-bookings.js.map +1 -1
  120. package/payload/platform/plugins/scheduling/mcp/dist/tools/__tests__/schedule-get-agent.test.js +55 -7
  121. package/payload/platform/plugins/scheduling/mcp/dist/tools/__tests__/schedule-get-agent.test.js.map +1 -1
  122. package/payload/platform/plugins/scheduling/mcp/dist/tools/__tests__/schedule-list.test.js +45 -1
  123. package/payload/platform/plugins/scheduling/mcp/dist/tools/__tests__/schedule-list.test.js.map +1 -1
  124. package/payload/platform/plugins/scheduling/mcp/dist/tools/__tests__/schedule-runs.test.d.ts +2 -0
  125. package/payload/platform/plugins/scheduling/mcp/dist/tools/__tests__/schedule-runs.test.d.ts.map +1 -0
  126. package/payload/platform/plugins/scheduling/mcp/dist/tools/__tests__/schedule-runs.test.js +96 -0
  127. package/payload/platform/plugins/scheduling/mcp/dist/tools/__tests__/schedule-runs.test.js.map +1 -0
  128. package/payload/platform/plugins/scheduling/mcp/dist/tools/schedule-cancel.d.ts.map +1 -1
  129. package/payload/platform/plugins/scheduling/mcp/dist/tools/schedule-cancel.js +2 -1
  130. package/payload/platform/plugins/scheduling/mcp/dist/tools/schedule-cancel.js.map +1 -1
  131. package/payload/platform/plugins/scheduling/mcp/dist/tools/schedule-get.d.ts +5 -0
  132. package/payload/platform/plugins/scheduling/mcp/dist/tools/schedule-get.d.ts.map +1 -1
  133. package/payload/platform/plugins/scheduling/mcp/dist/tools/schedule-get.js +13 -0
  134. package/payload/platform/plugins/scheduling/mcp/dist/tools/schedule-get.js.map +1 -1
  135. package/payload/platform/plugins/scheduling/mcp/dist/tools/schedule-list.d.ts +4 -0
  136. package/payload/platform/plugins/scheduling/mcp/dist/tools/schedule-list.d.ts.map +1 -1
  137. package/payload/platform/plugins/scheduling/mcp/dist/tools/schedule-list.js +24 -3
  138. package/payload/platform/plugins/scheduling/mcp/dist/tools/schedule-list.js.map +1 -1
  139. package/payload/platform/plugins/scheduling/mcp/dist/tools/schedule-runs.d.ts +33 -0
  140. package/payload/platform/plugins/scheduling/mcp/dist/tools/schedule-runs.d.ts.map +1 -0
  141. package/payload/platform/plugins/scheduling/mcp/dist/tools/schedule-runs.js +51 -0
  142. package/payload/platform/plugins/scheduling/mcp/dist/tools/schedule-runs.js.map +1 -0
  143. package/payload/platform/plugins/scheduling/mcp/dist/tools/schedule-update.d.ts.map +1 -1
  144. package/payload/platform/plugins/scheduling/mcp/dist/tools/schedule-update.js +12 -2
  145. package/payload/platform/plugins/scheduling/mcp/dist/tools/schedule-update.js.map +1 -1
  146. package/payload/platform/plugins/whatsapp/references/channels-whatsapp.md +30 -2
  147. package/payload/platform/plugins/whatsapp/skills/connect-whatsapp/SKILL.md +1 -1
  148. package/payload/platform/scripts/check-specialist-tool-surface.mjs +92 -16
  149. package/payload/platform/scripts/seed-neo4j.sh +41 -0
  150. package/payload/platform/scripts/verify-skill-tool-surface.sh +91 -2
  151. package/payload/platform/services/claude-session-manager/dist/canonical-tool-names.generated.d.ts.map +1 -1
  152. package/payload/platform/services/claude-session-manager/dist/canonical-tool-names.generated.js +1 -0
  153. package/payload/platform/services/claude-session-manager/dist/canonical-tool-names.generated.js.map +1 -1
  154. package/payload/platform/templates/specialists/agents/librarian.md +1 -1
  155. package/payload/platform/templates/specialists/agents/personal-assistant.md +1 -1
  156. package/payload/server/{chunk-K7CJGZPU.js → chunk-VUXKXOJU.js} +342 -152
  157. package/payload/server/{chunk-UX2FRNO7.js → chunk-WT2PFGY4.js} +37 -265
  158. package/payload/server/{chunk-PXNY2TAP.js → chunk-XCR5D2G3.js} +239 -10
  159. package/payload/server/{manager-RKL7JZ4Y.js → manager-4TJK3YOY.js} +2 -2
  160. package/payload/server/maxy-edge.js +2 -2
  161. package/payload/server/public/activity.html +5 -5
  162. package/payload/server/public/agents.html +4 -4
  163. package/payload/server/public/assets/{AdminLoginScreens-zc2_qqh-.js → AdminLoginScreens-uknqh2Pm.js} +1 -1
  164. package/payload/server/public/assets/AdminLoginScreens-uknqh2Pm.js.br +0 -0
  165. package/payload/server/public/assets/AdminLoginScreens-uknqh2Pm.js.gz +0 -0
  166. package/payload/server/public/assets/AdminShell-GqtMImyQ.js +2 -0
  167. package/payload/server/public/assets/AdminShell-GqtMImyQ.js.br +0 -0
  168. package/payload/server/public/assets/AdminShell-GqtMImyQ.js.gz +0 -0
  169. package/payload/server/public/assets/{activity-DVgO8YuM.js → activity-B4KfMJqO.js} +1 -1
  170. package/payload/server/public/assets/activity-B4KfMJqO.js.br +0 -0
  171. package/payload/server/public/assets/activity-B4KfMJqO.js.gz +0 -0
  172. package/payload/server/public/assets/admin-DxCZeVw0.js +1 -0
  173. package/payload/server/public/assets/admin-DxCZeVw0.js.br +0 -0
  174. package/payload/server/public/assets/admin-DxCZeVw0.js.gz +0 -0
  175. package/payload/server/public/assets/agents-BtwBuO4G.js +1 -0
  176. package/payload/server/public/assets/agents-BtwBuO4G.js.br +0 -0
  177. package/payload/server/public/assets/agents-BtwBuO4G.js.gz +0 -0
  178. package/payload/server/public/assets/{browser-Mw7DY3ft.js → browser-B3hSzI3O.js} +1 -1
  179. package/payload/server/public/assets/browser-B3hSzI3O.js.br +0 -0
  180. package/payload/server/public/assets/browser-B3hSzI3O.js.gz +0 -0
  181. package/payload/server/public/assets/{calendar-B9gvL_1_.js → calendar-BggxXxhS.js} +1 -1
  182. package/payload/server/public/assets/calendar-BggxXxhS.js.br +0 -0
  183. package/payload/server/public/assets/calendar-BggxXxhS.js.gz +0 -0
  184. package/payload/server/public/assets/chat-flivHt0t.js +1 -0
  185. package/payload/server/public/assets/chat-flivHt0t.js.br +0 -0
  186. package/payload/server/public/assets/chat-flivHt0t.js.gz +0 -0
  187. package/payload/server/public/assets/chevron-left-nVRThX7f.js +1 -0
  188. package/payload/server/public/assets/chevron-right-CLqfrkRA.js +1 -0
  189. package/payload/server/public/assets/chevron-right-CLqfrkRA.js.br +0 -0
  190. package/payload/server/public/assets/clock-Dj3SRZKo.js +1 -0
  191. package/payload/server/public/assets/clock-Dj3SRZKo.js.br +0 -0
  192. package/payload/server/public/assets/clock-Dj3SRZKo.js.gz +0 -0
  193. package/payload/server/public/assets/data-Ckjkne54.js +1 -0
  194. package/payload/server/public/assets/data-Ckjkne54.js.br +3 -0
  195. package/payload/server/public/assets/data-Ckjkne54.js.gz +0 -0
  196. package/payload/server/public/assets/{file-text-dYBnXNEX.js → file-text-BKs9eyiw.js} +1 -1
  197. package/payload/server/public/assets/file-text-BKs9eyiw.js.br +0 -0
  198. package/payload/server/public/assets/file-text-BKs9eyiw.js.gz +0 -0
  199. package/payload/server/public/assets/{graph-CDyzd1Et.js → graph-DTi71NaZ.js} +3 -3
  200. package/payload/server/public/assets/graph-DTi71NaZ.js.br +0 -0
  201. package/payload/server/public/assets/graph-DTi71NaZ.js.gz +0 -0
  202. package/payload/server/public/assets/graph-labels-BT3S6e9H.js +1 -0
  203. package/payload/server/public/assets/graph-labels-BT3S6e9H.js.br +0 -0
  204. package/payload/server/public/assets/graph-labels-BT3S6e9H.js.gz +0 -0
  205. package/payload/server/public/assets/{maximize-2-M-iSaznd.js → maximize-2-zC94tsxY.js} +1 -1
  206. package/payload/server/public/assets/maximize-2-zC94tsxY.js.br +0 -0
  207. package/payload/server/public/assets/maximize-2-zC94tsxY.js.gz +0 -0
  208. package/payload/server/public/assets/operator-BtWNEMh-.js +1 -0
  209. package/payload/server/public/assets/operator-BtWNEMh-.js.br +0 -0
  210. package/payload/server/public/assets/operator-BtWNEMh-.js.gz +0 -0
  211. package/payload/server/public/assets/page-BFm91p0e.js +1 -0
  212. package/payload/server/public/assets/page-BFm91p0e.js.br +0 -0
  213. package/payload/server/public/assets/page-BFm91p0e.js.gz +0 -0
  214. package/payload/server/public/assets/{page-CZ-73FAk.js → page-Ccl0FazM.js} +3 -3
  215. package/payload/server/public/assets/page-Ccl0FazM.js.br +0 -0
  216. package/payload/server/public/assets/page-Ccl0FazM.js.gz +0 -0
  217. package/payload/server/public/assets/{public-CN-ltC8x.js → public-BpC6cn9S.js} +1 -1
  218. package/payload/server/public/assets/public-BpC6cn9S.js.br +0 -0
  219. package/payload/server/public/assets/public-BpC6cn9S.js.gz +0 -0
  220. package/payload/server/public/assets/{rotate-ccw-Buopsc22.js → rotate-ccw-BNcqbHkZ.js} +1 -1
  221. package/payload/server/public/assets/rotate-ccw-BNcqbHkZ.js.br +0 -0
  222. package/payload/server/public/assets/rotate-ccw-BNcqbHkZ.js.gz +0 -0
  223. package/payload/server/public/assets/routines-D5iia-XG.js +1 -0
  224. package/payload/server/public/assets/routines-D5iia-XG.js.br +0 -0
  225. package/payload/server/public/assets/routines-D5iia-XG.js.gz +0 -0
  226. package/payload/server/public/assets/{skills-DiiuVzDK.js → skills-COLAw_jt.js} +1 -1
  227. package/payload/server/public/assets/skills-COLAw_jt.js.br +0 -0
  228. package/payload/server/public/assets/skills-COLAw_jt.js.gz +0 -0
  229. package/payload/server/public/assets/tasks-CZDQI4nB.js +1 -0
  230. package/payload/server/public/assets/tasks-CZDQI4nB.js.br +0 -0
  231. package/payload/server/public/assets/tasks-CZDQI4nB.js.gz +0 -0
  232. package/payload/server/public/assets/{time-entry-format-BBokCF-D.js → time-entry-format-laTFzawg.js} +1 -1
  233. package/payload/server/public/assets/time-entry-format-laTFzawg.js.br +0 -0
  234. package/payload/server/public/assets/time-entry-format-laTFzawg.js.gz +0 -0
  235. package/payload/server/public/assets/{triangle-alert-C_AcpTW5.js → triangle-alert-DrwqhEog.js} +1 -1
  236. package/payload/server/public/assets/triangle-alert-DrwqhEog.js.br +0 -0
  237. package/payload/server/public/assets/triangle-alert-DrwqhEog.js.gz +0 -0
  238. package/payload/server/public/assets/{useCopyFeedback-TdimmPVR.js → useCopyFeedback-Cxme5GK6.js} +1 -1
  239. package/payload/server/public/assets/useCopyFeedback-Cxme5GK6.js.br +0 -0
  240. package/payload/server/public/assets/useCopyFeedback-Cxme5GK6.js.gz +0 -0
  241. package/payload/server/public/assets/useSubAccountSwitcher-B-K8y5a4.css +1 -0
  242. package/payload/server/public/assets/useSubAccountSwitcher-B-K8y5a4.css.br +0 -0
  243. package/payload/server/public/assets/useSubAccountSwitcher-B-K8y5a4.css.gz +0 -0
  244. package/payload/server/public/assets/useSubAccountSwitcher-C_1E11Dv.js +14 -0
  245. package/payload/server/public/assets/useSubAccountSwitcher-C_1E11Dv.js.br +0 -0
  246. package/payload/server/public/assets/useSubAccountSwitcher-C_1E11Dv.js.gz +0 -0
  247. package/payload/server/public/assets/{useVoiceRecorder-BT2738ZS.js → useVoiceRecorder-DUBpVa2T.js} +1 -1
  248. package/payload/server/public/assets/useVoiceRecorder-DUBpVa2T.js.br +0 -0
  249. package/payload/server/public/assets/useVoiceRecorder-DUBpVa2T.js.gz +0 -0
  250. package/payload/server/public/assets/{wrench-B51s5kGA.js → wrench-DWuxPnzF.js} +1 -1
  251. package/payload/server/public/assets/wrench-DWuxPnzF.js.br +0 -0
  252. package/payload/server/public/assets/wrench-DWuxPnzF.js.gz +0 -0
  253. package/payload/server/public/browser.html +4 -4
  254. package/payload/server/public/calendar.html +7 -7
  255. package/payload/server/public/chat.html +13 -13
  256. package/payload/server/public/data.html +11 -11
  257. package/payload/server/public/graph.html +9 -9
  258. package/payload/server/public/index.html +14 -14
  259. package/payload/server/public/operator.html +14 -14
  260. package/payload/server/public/public.html +13 -13
  261. package/payload/server/public/routines.html +6 -6
  262. package/payload/server/public/skills.html +5 -5
  263. package/payload/server/public/tasks.html +6 -6
  264. package/payload/server/server.js +5910 -5369
  265. package/payload/server/public/assets/AdminLoginScreens-zc2_qqh-.js.br +0 -0
  266. package/payload/server/public/assets/AdminLoginScreens-zc2_qqh-.js.gz +0 -0
  267. package/payload/server/public/assets/AdminShell-IGUdTx5q.js +0 -2
  268. package/payload/server/public/assets/AdminShell-IGUdTx5q.js.br +0 -0
  269. package/payload/server/public/assets/AdminShell-IGUdTx5q.js.gz +0 -0
  270. package/payload/server/public/assets/activity-DVgO8YuM.js.br +0 -0
  271. package/payload/server/public/assets/activity-DVgO8YuM.js.gz +0 -0
  272. package/payload/server/public/assets/admin-xtpM7fgl.js +0 -1
  273. package/payload/server/public/assets/admin-xtpM7fgl.js.br +0 -0
  274. package/payload/server/public/assets/admin-xtpM7fgl.js.gz +0 -0
  275. package/payload/server/public/assets/agents-P0nTIxo-.js +0 -1
  276. package/payload/server/public/assets/agents-P0nTIxo-.js.br +0 -0
  277. package/payload/server/public/assets/agents-P0nTIxo-.js.gz +0 -0
  278. package/payload/server/public/assets/browser-Mw7DY3ft.js.br +0 -0
  279. package/payload/server/public/assets/browser-Mw7DY3ft.js.gz +0 -0
  280. package/payload/server/public/assets/calendar-B9gvL_1_.js.br +0 -0
  281. package/payload/server/public/assets/calendar-B9gvL_1_.js.gz +0 -0
  282. package/payload/server/public/assets/chat-DBGqh4wg.js +0 -1
  283. package/payload/server/public/assets/chat-DBGqh4wg.js.br +0 -2
  284. package/payload/server/public/assets/chat-DBGqh4wg.js.gz +0 -0
  285. package/payload/server/public/assets/chevron-left-Bl4vpOM0.js +0 -1
  286. package/payload/server/public/assets/chevron-left-Bl4vpOM0.js.br +0 -0
  287. package/payload/server/public/assets/chevron-right-BExigCnp.js +0 -1
  288. package/payload/server/public/assets/chevron-right-BExigCnp.js.br +0 -0
  289. package/payload/server/public/assets/clock-D8TJvgJC.js +0 -1
  290. package/payload/server/public/assets/clock-D8TJvgJC.js.br +0 -0
  291. package/payload/server/public/assets/data-HfFSxaC2.js +0 -1
  292. package/payload/server/public/assets/data-HfFSxaC2.js.br +0 -0
  293. package/payload/server/public/assets/data-HfFSxaC2.js.gz +0 -0
  294. package/payload/server/public/assets/file-text-dYBnXNEX.js.br +0 -0
  295. package/payload/server/public/assets/file-text-dYBnXNEX.js.gz +0 -0
  296. package/payload/server/public/assets/graph-CDyzd1Et.js.br +0 -0
  297. package/payload/server/public/assets/graph-CDyzd1Et.js.gz +0 -0
  298. package/payload/server/public/assets/graph-labels-D1LkKiJr.js +0 -1
  299. package/payload/server/public/assets/graph-labels-D1LkKiJr.js.br +0 -0
  300. package/payload/server/public/assets/graph-labels-D1LkKiJr.js.gz +0 -0
  301. package/payload/server/public/assets/maximize-2-M-iSaznd.js.br +0 -0
  302. package/payload/server/public/assets/maximize-2-M-iSaznd.js.gz +0 -0
  303. package/payload/server/public/assets/operator-9jfCv1Fg.js +0 -1
  304. package/payload/server/public/assets/operator-9jfCv1Fg.js.br +0 -0
  305. package/payload/server/public/assets/operator-9jfCv1Fg.js.gz +0 -0
  306. package/payload/server/public/assets/page-CZ-73FAk.js.br +0 -0
  307. package/payload/server/public/assets/page-CZ-73FAk.js.gz +0 -0
  308. package/payload/server/public/assets/page-CjwSt7kx.js +0 -1
  309. package/payload/server/public/assets/page-CjwSt7kx.js.br +0 -0
  310. package/payload/server/public/assets/page-CjwSt7kx.js.gz +0 -0
  311. package/payload/server/public/assets/public-CN-ltC8x.js.br +0 -0
  312. package/payload/server/public/assets/public-CN-ltC8x.js.gz +0 -0
  313. package/payload/server/public/assets/rotate-ccw-Buopsc22.js.br +0 -0
  314. package/payload/server/public/assets/rotate-ccw-Buopsc22.js.gz +0 -0
  315. package/payload/server/public/assets/routines-C-yr8ddT.js +0 -1
  316. package/payload/server/public/assets/routines-C-yr8ddT.js.br +0 -0
  317. package/payload/server/public/assets/routines-C-yr8ddT.js.gz +0 -0
  318. package/payload/server/public/assets/skills-DiiuVzDK.js.br +0 -0
  319. package/payload/server/public/assets/skills-DiiuVzDK.js.gz +0 -0
  320. package/payload/server/public/assets/tasks-CnHIfn2_.js +0 -1
  321. package/payload/server/public/assets/tasks-CnHIfn2_.js.br +0 -0
  322. package/payload/server/public/assets/tasks-CnHIfn2_.js.gz +0 -0
  323. package/payload/server/public/assets/time-entry-format-BBokCF-D.js.br +0 -0
  324. package/payload/server/public/assets/time-entry-format-BBokCF-D.js.gz +0 -0
  325. package/payload/server/public/assets/triangle-alert-C_AcpTW5.js.br +0 -0
  326. package/payload/server/public/assets/triangle-alert-C_AcpTW5.js.gz +0 -0
  327. package/payload/server/public/assets/useCopyFeedback-TdimmPVR.js.br +0 -0
  328. package/payload/server/public/assets/useCopyFeedback-TdimmPVR.js.gz +0 -0
  329. package/payload/server/public/assets/useSubAccountSwitcher-BwHqV55p.js +0 -14
  330. package/payload/server/public/assets/useSubAccountSwitcher-BwHqV55p.js.br +0 -0
  331. package/payload/server/public/assets/useSubAccountSwitcher-BwHqV55p.js.gz +0 -0
  332. package/payload/server/public/assets/useSubAccountSwitcher-CsrPYqtm.css +0 -1
  333. package/payload/server/public/assets/useSubAccountSwitcher-CsrPYqtm.css.br +0 -0
  334. package/payload/server/public/assets/useSubAccountSwitcher-CsrPYqtm.css.gz +0 -0
  335. package/payload/server/public/assets/useVoiceRecorder-BT2738ZS.js.br +0 -0
  336. package/payload/server/public/assets/useVoiceRecorder-BT2738ZS.js.gz +0 -0
  337. package/payload/server/public/assets/wrench-B51s5kGA.js.br +0 -0
  338. package/payload/server/public/assets/wrench-B51s5kGA.js.gz +0 -0
@@ -110,13 +110,95 @@ The route (`server/routes/admin/routines.ts`) is account-scoped like `calendar.t
110
110
  | `GET /api/admin/routines` | Lists automation Events: `recurrence IS NOT NULL OR agentChannel IS NOT NULL OR actionPlugin IS NOT NULL`. Keyed by the `eventId` property. |
111
111
  | `GET /api/admin/routines/:eventId` | One routine, same automation+account guard. |
112
112
  | `PATCH /api/admin/routines/:eventId` | Edits `agentPrompt` and/or `recurrence`. Cron validation and the timezone-aware `nextRun` recompute copy the scheduling plugin's `schedule-update` tool. An invalid cron is rejected 400 with no write. Only creation and deletion stay agent-only (`schedule-event`/`schedule-cancel`). |
113
+ | `POST /api/admin/routines/:eventId/suspend` | Writes `eventStatus = 'suspended'` on a routine currently `'scheduled'`. 404s otherwise, so a second suspend is not a silent no-op. |
114
+ | `POST /api/admin/routines/:eventId/resume` | Returns a suspended routine to `'scheduled'`. 404s if it is not suspended, 409s if it cannot be resumed. |
115
+ | `POST /api/admin/routines/suspend-all` | Suspends every routine currently `'scheduled'` and marks each one. Returns the count. |
116
+ | `POST /api/admin/routines/resume-all` | Resumes only the routines `suspend-all` marked. Returns `restored` and a `refused` list. |
117
+
118
+ **Suspension is the reversible stop.** Before it, the only way to stop a routine
119
+ from the dashboard was to delete it. A suspended routine keeps its schedule, its
120
+ instruction and its history; it simply stops being selected. The enforcement is
121
+ not a new guard: all four `eventStatus = 'scheduled'` predicates in
122
+ `check-due-events.ts` are equalities, so any other status is excluded by
123
+ construction, and `'suspended'` is the literal the shipped roster already seeds
124
+ with.
125
+
126
+ The status write lives on dedicated routes rather than on `PATCH`, which admits
127
+ only `agentPrompt` and `recurrence` and 400s on anything else. Widening `PATCH`
128
+ would put a free-form status on the edit path.
129
+
130
+ **Resume schedules forward and never backfills.** For a recurring routine
131
+ `nextRun` is recomputed from the cron in the routine's own timezone; the stored
132
+ value is deliberately not restored, because the sweep selects `nextRun <= now`
133
+ and a stale one fires on the next tick. A one-time routine has no cron to
134
+ advance, so resuming one whose date has passed is refused (409) with the date
135
+ named — resuming it would run it immediately, for a window the operator did not
136
+ choose. A one-time routine still in the future resumes with its date untouched.
137
+
138
+ **Suspend-all acts on exactly the dispatchable set**, so the number on the
139
+ control is the number of routines that could have fired; rows already due,
140
+ cancelled or suspended are untouched and a deliberately cancelled routine is
141
+ never re-armed. Each row it stops is marked, and resume-all selects only marked
142
+ rows — a routine suspended one at a time carries no mark and stays suspended,
143
+ which is what makes resume-all safe to press. The seeded roster is unmarked by
144
+ construction, so resume-all never enables it.
113
145
 
114
146
  Observability rides `[admin:routines]`: `op=list accountId=<8> count=<n>`,
115
- `op=get id=<8> found=<bool>`, and `op=patch id=<8> fields=<…> outcome=ok|rejected
116
- reason=<invalid-cron|not-found> nextRun=<…> cron=<serialized>`. A `count=0` while
117
- routines exist for the account is the account-scope-miss signature; the logged
118
- `cron=` on `outcome=ok` confirms the persisted expression without opening the
119
- graph.
147
+ `op=get id=<8> found=<bool>`, `op=patch id=<8> fields=<…> outcome=ok|rejected
148
+ reason=<invalid-cron|not-found> nextRun=<…> cron=<serialized>`, and
149
+ `op=suspend|resume id=<8> scope=<one|all> outcome=<applied|refused|failed>` with
150
+ `count=`/`restored=` and, on a refusal, `reason=<not-scheduled|not-suspended|
151
+ past-one-time|invalid-cron>`. A `count=0` while routines exist for the account is
152
+ the account-scope-miss signature; the logged `cron=` on `outcome=ok` confirms the
153
+ persisted expression without opening the graph.
154
+
155
+ Two scheduler-side lines close the loop, because a suspend that the sweep ignores
156
+ looks identical to a healthy routine until it fires. `[schedule-sweep]
157
+ op=skip-suspended account=<8> count=<n>` is emitted every sweep for every local
158
+ account including zero, filtered to automation rows by the same predicate the
159
+ routes and the census use, so all three count one set. Nothing else in the sweep
160
+ ever mentions a suspended row, so without this line the whole class is invisible
161
+ there and a suspension that stopped holding would look exactly like one that
162
+ still holds. `[schedule-audit] op=suspension-census acct=<8> routines=<n>
163
+ dispatchable=<n> suspended=<n> due=<n> cancelled=<n> completed=<n> other=<n>` is
164
+ the standing reconciliation: the named buckets are the whole shipped status enum
165
+ plus `suspended`, so they sum to `routines` by construction and `other` above
166
+ zero means a routine carries a status the system does not handle — nothing else
167
+ would say so. `completed` gets its own bucket even though no code path writes it
168
+ today, because `schedule-update` takes `eventStatus` as an unvalidated string and
169
+ one completed routine would otherwise pin `other` above zero forever and kill the
170
+ alarm.
171
+
172
+ **The shipped roster.** Every account starts with ten routines — `start-of-day`,
173
+ `inbound-check`, `end-of-day`, `appointment-reminder`, `commitment-chase`,
174
+ `calendar-reconcile`, `contact-reconcile`, `crm-reconcile`, `finance-reconcile`,
175
+ `weekly-digest` — seeded `eventStatus:'suspended'` with `nextRun` NULL and no
176
+ channel or destination, so `/routines` is a catalogue to enable rather than a
177
+ blank page. The list query applies no status filter and `AUTOMATION_WHERE`
178
+ admits them on `recurrence IS NOT NULL`, so they render with no change here.
179
+ They cannot fire: every dispatch query in `check-due-events.ts` selects
180
+ `eventStatus = 'scheduled'`, and the recurring one additionally requires
181
+ `nextRun IS NOT NULL`.
182
+
183
+ Enabling one is `schedule-update {eventId, eventStatus:'scheduled', recurrence,
184
+ timezone}` — all four arguments. `eventStatus` on its own does not touch
185
+ `nextRun`, so the row would read enabled and never fire; omitting `timezone`
186
+ recomputes `nextRun` in the server's zone rather than the operator's, so it
187
+ fires at the wrong hour and still looks healthy. Binding a channel and a
188
+ destination is separate and equally required: `chooseDispatchMode` returns
189
+ `{kind:'none'}` unless `agentChannel`, `agentDestination` and `agentPrompt` are
190
+ all present, and a destination cannot be seeded because
191
+ `validateAgentDestination` is fail-closed against the account's
192
+ `whatsapp.adminPhones` / `telegram.adminUsers`, both empty on a fresh install.
193
+
194
+ The seed re-runs on every upgrade and never writes `eventStatus`,
195
+ `agentChannel`, `agentDestination`, `recurrence` or `timezone` on a row that
196
+ already exists, so an upgrade cannot re-suspend an enabled routine, unbind a
197
+ bound destination or reset a retimed cron. Three standing checks ride the
198
+ scheduling heartbeat and report on every tick including zero:
199
+ `[schedule-audit] op=roster` (a seed that never ran or ran short),
200
+ `op=dispatch-mode-none` (a routine that fires and delivers nothing) and
201
+ `op=null-timezone` (a routine that fires at the box's hour).
120
202
 
121
203
  ### Skills
122
204
 
@@ -171,7 +253,9 @@ both `kind: 'specialist'` and differ only by origin.
171
253
  `agent-builder`). The specialist modal shows the model, tools, the owning
172
254
  plugin's skills, and the system-prompt body. Specialists are authored, edited,
173
255
  and deleted through chat (`agent-builder` / `specialist-management`), so the
174
- specialist modal offers no delete or open-agent link.
256
+ specialist modal offers no delete or open-agent link. **These are the only
257
+ agents that can be switched off from this page**, and the route enforces that
258
+ rather than relying on the UI to withhold the control.
175
259
  - **Shipped specialists** (`origin: 'shipped'`) — the union of
176
260
  `<accountDir>/specialists/agents/`, `<accountDir>/specialists/agents-disabled/`
177
261
  and `PLATFORM_ROOT/templates/specialists/agents/`, in that precedence order.
@@ -179,22 +263,27 @@ both `kind: 'specialist'` and differ only by origin.
179
263
  a disabled agent still appears there through its bundled-template row. The
180
264
  route once walked only the account plugins tree, so the twelve
181
265
  highest-capability agents on the box were the ones the operator could not see.
182
- These are the only agents that can be disabled, and the route enforces that
183
- rather than relying on the UI to withhold the control.
266
+ **A shipped agent cannot be switched off here.** It is part of the product, so
267
+ disabling one breaks a capability the operator did not author and cannot
268
+ repair, and it is not what runs unattended: an agent runs only when something
269
+ dispatches it, an inbound message is operator-initiated, so the only autonomous
270
+ path is the scheduler. The modal says so and points at the routines instead.
184
271
  **A file in the LIVE directory whose name also exists under
185
272
  `<accountDir>/plugins/*/agents/` is excluded from this set.** `agent-builder`
186
273
  copies the authored file into `specialists/agents/` because presence there is
187
274
  what makes an agent dispatchable, so the live directory says nothing about who
188
275
  wrote the agent and every activated user-created specialist used to render
189
276
  twice, the second time as Shipped. The account plugin tree is the authorship
190
- evidence and its row wins, which is also why `disable` refuses a slug present
191
- under `plugins/*/agents/`: quarantine exists to stop provisioning re-delivering
192
- a file, and provisioning never writes that tree. Both gates read filenames off
193
- disk, so a plugin file whose frontmatter does not parse still suppresses its
194
- live twin it is authored either way, and `specialistsSkipped` is what reports
195
- the parse failure. The exclusion applies to the live copy only: a copy found in
196
- quarantine is operator state, keeps its Shipped row and its `disabled:true`,
197
- and is therefore still switchable back on. Each exclusion logs
277
+ evidence and its row wins; it is the same discriminator `disable` requires.
278
+ Both gates read filenames off disk, so a plugin file whose frontmatter does not
279
+ parse still suppresses its live twin it is authored either way, and
280
+ `specialistsSkipped` is what reports the parse failure. **The exclusion covers
281
+ both account directories, live and quarantine.** It was live-only while only a
282
+ shipped agent could be quarantined; now that an authored specialist can be
283
+ switched off, its specialist row carries the plugin, the skills, the detail
284
+ route and its own disabled state, so a second row from the shipped walk would
285
+ be a duplicate with none of that. The bundled templates are never deduped: a
286
+ bundled name is shipped by definition. Each exclusion logs
198
287
  `op=list-shipped-dedup file=<name>` and the count rides `op=list` and the
199
288
  response as `deduped`.
200
289
 
@@ -222,35 +311,137 @@ no class is dashed and uncoloured rather than painted as if it were understood.
222
311
  Badge colours come from the shared semantic status set: `-solid` with white text
223
312
  for the badge, `-tint` with `-textOnTint` for a chip, never white.
224
313
 
314
+ **No tool name on a card.** The card renders the badge word and the plugin (or,
315
+ for a public agent, its status). It does not render `riskiestTool`: a qualified
316
+ tool symbol tells the person reading this dashboard nothing the badge word did
317
+ not. `riskiestTool` stays on the wire and on the `op=risk` line as a diagnostic,
318
+ so a wrong class is still traceable to the tool that set it without re-deriving
319
+ the classification.
320
+
321
+ **Combination rules.** The per-tool max answers "what is the worst single thing
322
+ this agent can do". It cannot answer "what can it do in sequence", which is the
323
+ question the person reading the dashboard is actually asking: an agent that
324
+ reads a customer record and an agent that emails a stranger are both red, and so
325
+ is the one that does both. Four rules in `server/lib/agent-risk.ts` run *after*
326
+ the max. A rule fires when **every** risk class it names is present among the
327
+ resolved tools and its own class is not below the class the max produced; the
328
+ first match in table order wins and supplies the sentence the modal renders.
329
+
330
+ | Rule | Fires when the agent holds | Class | What the operator reads |
331
+ |---|---|---|---|
332
+ | `changes-and-sends` | a `write_local` tool and an `external` tool | red | It can change your records and also send messages out, so a wrong change can reach someone outside the business. |
333
+ | `reads-and-sends` | a `read` tool and an `external` tool | red | It can read what is held on this device and also send things out of it, so anything it reads can leave. |
334
+ | `changes-and-runs` | a `write_local` tool and an `exec` tool | red | It can change files on this device and run commands, so a mistake is not confined to one file. |
335
+ | `reads-and-runs` | a `read` tool and an `exec` tool | red | It can read what is held on this device and run commands on it. |
336
+
337
+ The order is the priority order: reaching outside the business outranks running
338
+ a command inside it, and changing something outranks reading it. A rule may only
339
+ **raise** a class, never lower one, and because `exec` and `external` both
340
+ saturate at red today every rule is itself red — so on the shipped fleet the
341
+ rules change no colour and their whole product is the named hazard in words. A
342
+ rule whose class sat below the derived one would be skipped rather than applied,
343
+ so a softer sentence can never be attached to a harder class.
344
+
345
+ With no rule matched the sentence comes from the class itself: green says it can
346
+ only read, amber says it can change what is held here and nothing reaches
347
+ outside, red says it can run commands or reach services outside. The three
348
+ forced-red paths carry their own sentences instead, because none of them derived
349
+ a capability: a tool with no risk class on this install, an agent with no
350
+ `tools:` line at all, and a plugin registry that failed to load.
351
+
352
+ Of the four rules, three fire on the twelve shipped specialists
353
+ (`changes-and-sends`, `changes-and-runs`, `reads-and-runs`) and `reads-and-sends`
354
+ fires on none of them, which is what the `op=rule-census` line exists to report
355
+ across real accounts.
356
+
225
357
  **Disable.** `<accountDir>/specialists/agents/` is the live dispatchable set —
226
358
  `spawn-context.ts` reads it to build the spawn manifest — so disabling **moves**
227
- the agent file to `<accountDir>/specialists/agents-disabled/` and records the
228
- basename in a 0600 `<accountDir>/agents-disabled.json`. A flag alone would leave
229
- the agent running while the card claimed otherwise.
230
-
231
- The file is moved, never deleted: a premium `--` agent and an operator-edited
232
- override each exist only in the account dir, so deleting one and later restoring
233
- from the bundled template would hand back a different agent than the operator
234
- switched off. A disabled agent stays listed, marked `Disabled`, because an agent
235
- that vanished from the surface that disabled it could never be switched back on.
236
-
237
- `provision-account-dir.sh` re-reads the store after its core-specialist recopy
238
- and removes anything named in it, so an upgrade does not silently re-deliver a
239
- disabled agent. An unreadable store withholds nothing and says so: a corrupt
240
- file is not evidence that an agent was disabled.
241
-
242
- Disabling also reconciles the admin's routing prose. `agents/admin/AGENTS.md`
243
- carries one `- **specialists:<name>**:` line per dispatchable specialist, and
359
+ the agent file to `<accountDir>/specialists/agents-disabled/`. A flag alone would
360
+ leave the agent running while the card claimed otherwise. `agent-builder` copies
361
+ an authored specialist into that same live directory, because presence there is
362
+ what makes it dispatchable, so the same move applies to it.
363
+
364
+ The file is moved, never deleted: an authored specialist's activated copy can
365
+ carry operator edits its plugin-tree original does not, so deleting one and later
366
+ restoring "the original" would hand back a different agent than the operator
367
+ switched off. A disabled agent stays listed, because an agent that vanished from
368
+ the surface that disabled it could never be switched back on.
369
+
370
+ **Authorisation is drawn in both states.** Every specialist card carries a
371
+ `Live` or `Stood down` pill, and the header above the list reads
372
+ `<n> agents · <n> stood down`, derived from the same rows the cards render.
373
+ Drawing only the disabled half made a live agent indistinguishable from a pill
374
+ that failed to render, and left the operator counting cards to answer how much
375
+ of the fleet was switched off. Public agents carry no pill: they have no disable
376
+ path, so `Live` there would assert something the surface never derived.
377
+
378
+ **The disable confirm names what stops.** Before the confirm it reads
379
+ `Stop this agent being dispatched?` plus the skills that run through the agent
380
+ and the fact that nothing can hand it work until it is switched back on. It does
381
+ **not** name the routines that dispatch the agent, and cannot: a routine
382
+ `:Event` stores `agentChannel`, `agentDestination` and `agentPrompt`, never an
383
+ agent, so there is nothing on disk to join against. A shipped agent's detail
384
+ also carries no skills, because a shipped specialist owns no skills directory, so
385
+ today the skills clause appears only on a plugin-backed specialist. The
386
+ shipped-agent sentence is a different thing and does not conflict: it names
387
+ suspending routines as the general way to stop unattended dispatch, which is
388
+ true of every shipped agent, rather than claiming this one's routines can be
389
+ listed.
390
+
391
+ Three cases, no more. Authored with a live copy → moved to quarantine. Authored
392
+ with no live copy → refused 409: it is not in the dispatchable set, so there is
393
+ nothing to switch off and recording one would claim work that did not happen.
394
+ Not authored → refused 404, naming the routines as what stops it instead.
395
+
396
+ **Enable is deliberately not symmetric, and takes no authorship check.** An
397
+ install that disabled a shipped agent before the gate was inverted holds it in
398
+ the quarantine directory and names it in `agents-disabled.json`; requiring
399
+ authorship on enable would strand it there with no route back through the
400
+ product. So enable serves both classes: a quarantined authored specialist, and a
401
+ shipped agent disabled under the old rule (whether it was moved, or was
402
+ bundled-only and recorded in the store alone).
403
+
404
+ **Nothing writes `agents-disabled.json` any more.** That 0600 store exists only
405
+ to stop the next provisioning run re-delivering a withheld shipped file —
406
+ `provision-account-dir.sh` re-reads it after its core-specialist recopy and
407
+ removes anything named in it — and shipped disable is now refused, so no new
408
+ entry can be created. An authored specialist needs no entry either: provisioning
409
+ never writes the account plugin tree, so the quarantined file is its whole state.
410
+ The store is now read-and-clear: the listing reads it for shipped rows and enable
411
+ clears entries from it, rewriting it whole and re-applying 0600 explicitly
412
+ (`writeFileSync`'s `mode` applies only on creation, and nothing creates this file
413
+ now). An unreadable store withholds nothing and says so: a corrupt file is not
414
+ evidence that an agent was disabled.
415
+
416
+ Both routes reconcile the admin's routing prose. `agents/admin/AGENTS.md` carries
417
+ one `- **specialists:<name>**:` line per dispatchable specialist, and
244
418
  `agents-md-bootstrap.sh` used to only ever append, so a disabled agent stayed
245
419
  advertised and the admin dispatched to a file that was no longer there. The
246
- script now withholds a line for every name in the store, and both routes exec it
247
- after the move, so the prose is right immediately rather than after the next
420
+ script withholds a line for every name in the store and both routes exec it after
421
+ the move, so the prose is right immediately rather than after the next
248
422
  provisioning run. It emits `[agents-md] op=specialist-lines account=<id8>
249
- kept=<n> withheld=<comma-list|none|store-unreadable>`. `system-status` reads the
250
- same store, so a disabled agent reports `disabled (operator)` rather than
423
+ kept=<n> withheld=<comma-list|none|store-unreadable>`. Note the reach, because it is not
424
+ symmetric: the script skips every `--` filename as out of scope, and its prune is
425
+ keyed on a store basename (`acme--helper`) while the routing line is keyed on the
426
+ frontmatter name (`helper`) that the activation path in `specialist-management`
427
+ wrote. So the bootstrap can neither remove nor restore an authored specialist's
428
+ line, and before this change that did not matter because that class could not be
429
+ disabled at all. It is now the only class that can be, so the route makes a
430
+ second, targeted pass for it, reading the name from whichever copy of the file
431
+ exists after the move and emitting `op=agents-md-authored`. Without it the admin
432
+ would keep advertising a specialist whose file is quarantined and dispatch would
433
+ fail inside the turn, which is the defect the bootstrap's prune was written to
434
+ prevent, on the one class it does not reach. `system-status` reads the same store, so a shipped agent
435
+ disabled under the old rule reports `disabled (operator)` rather than
251
436
  `missing file`, and the header counts the two separately
252
437
  (`<n> registered, missing=<x> disabled=<y>`).
253
438
 
439
+ Observability rides `[admin/agents] op=disable|enable accountId=<8> slug=<s>
440
+ origin=<specialist|shipped> eligible=<bool> outcome=<applied|refused|failed>`
441
+ with `reason=<not-user-created|not-dispatchable|not-disabled>` on a refusal.
442
+ `eligible=false outcome=refused` is what proves the gate is live rather than
443
+ merely re-labelled in the UI.
444
+
254
445
  **Account scope.** The route (`server/routes/admin/agents.ts`) never infers an
255
446
  account from device state. The two reads resolve from the caller's admin session
256
447
  (`requireAdminSession` + the shared `accountDirForSession` in
@@ -264,10 +455,10 @@ explicit `?plugin=` parameter, not inferred from `--` in the slug.
264
455
 
265
456
  | Route | Behaviour |
266
457
  |-------|-----------|
267
- | `GET /api/admin/agents` | Session-scoped. Lists the session account's public `agents/*/` dirs (never the `admin` agent), its user-created specialists from `plugins/*/agents/*.md`, and its shipped specialists, each row tagged `kind` and `origin` and carrying `risk`, `riskiestTool`, `unresolved` and `disabled`. A live-directory candidate whose filename also exists under `plugins/*/agents/` is dropped and counted, so an activated user-created agent is listed once. Returns `{agents, accountId, skipped, specialistsSkipped, shippedSkipped, deduped, riskSurfaceFailed}`. 401 when the session maps to no account. |
268
- | `GET /api/admin/agents/:slug` | Session-scoped. Without `?plugin=` or `?origin=`, returns a public agent's config fields + four owned docs + a `present` map (a missing or unreadable doc is `''`/`present.<role>=false`, never a 500). With `?plugin=`, that plugin's user-created specialist; with `?origin=shipped`, the shipped one. Both specialist shapes add `{risk, riskiestTool, unresolved, byTool, disabled}`, where `byTool` is one class per declared tool. Selection is explicit rather than inferred, because a premium file and a user-created specialist under a plugin of the same name produce the same slug. Unknown 404s, 401 as above. |
269
- | `POST /api/admin/agents/:slug/disable?accountId=` | Shipped agents only, enforced here: a slug present in none of the three shipped directories 404s, and so does a slug present under `plugins/*/agents/` (a user-created specialist, `reason=user-created-specialist`), because its activated copy in the live directory would otherwise pass the shipped test. Moves the file from `specialists/agents/` to `specialists/agents-disabled/` and records the basename in the 0600 store. Returns `{ok, moved}`; `moved:false` means the agent existed only as a bundled template, so nothing was there to move and the store entry is what stops the next provisioning run delivering it. The store is read strictly before anything moves, so an unreadable store 500s with the file untouched rather than rewriting the file whole from an empty set and dropping every other disabled agent. Returns `routingReconciled`, which is `false` when the AGENTS.md reconcile threw: the move and the store write already happened, so the request is not failed, and the caller is told rather than left assuming the prose is correct. Same `accountId` contract as delete. |
270
- | `POST /api/admin/agents/:slug/enable?accountId=` | Covers both of disable's outcomes. Returns `{ok, restored}`: a quarantined file moves back (`restored:true`); a bundled-only agent has nothing to move, so clearing the store entry is the whole job (`restored:false`), which is what stops provisioning withholding it. Treating that second case as "nothing to restore" made disable a one-way door. 404 only when neither directory nor store knows the agent. Carries the same `routingReconciled` field; the restored file is what puts the routing line back. |
458
+ | `GET /api/admin/agents` | Session-scoped. Lists the session account's public `agents/*/` dirs (never the `admin` agent), its user-created specialists from `plugins/*/agents/*.md`, and its shipped specialists, each row tagged `kind` and `origin` and carrying `risk`, `riskiestTool`, `riskRule`, `riskReason`, `unresolved` and `disabled`. A live-directory candidate whose filename also exists under `plugins/*/agents/` is dropped and counted, so an activated user-created agent is listed once. Returns `{agents, accountId, skipped, specialistsSkipped, shippedSkipped, deduped, riskSurfaceFailed}`. 401 when the session maps to no account. |
459
+ | `GET /api/admin/agents/:slug` | Session-scoped. Without `?plugin=` or `?origin=`, returns a public agent's config fields + four owned docs + a `present` map (a missing or unreadable doc is `''`/`present.<role>=false`, never a 500). With `?plugin=`, that plugin's user-created specialist; with `?origin=shipped`, the shipped one. Both specialist shapes add `{risk, riskiestTool, riskRule, riskReason, unresolved, byTool, disabled}`, where `byTool` is one class per declared tool. Selection is explicit rather than inferred, because a premium file and a user-created specialist under a plugin of the same name produce the same slug. Unknown 404s, 401 as above. |
460
+ | `POST /api/admin/agents/:slug/disable?accountId=` | Agents the operator authored only, enforced here rather than left to the UI: a slug NOT present under `plugins/*/agents/` 404s (`reason=not-user-created`), and the message names suspending the routines as what stops a shipped agent instead. An authored slug with no copy in `specialists/agents/` 409s (`reason=not-dispatchable`): it is already not dispatchable, so there is nothing to move and nothing to record. Otherwise it moves the file from `specialists/agents/` to `specialists/agents-disabled/` and returns `{ok, moved:true}` the only outcome, since the two other cases refuse. It writes NO store entry: `agents-disabled.json` exists to stop provisioning re-delivering a withheld shipped file, and provisioning never writes the account plugin tree. Returns `routingReconciled`, false when either AGENTS.md pass threw; the move already happened and already stopped dispatch, so the request is not failed and the caller is told rather than left assuming the prose is right. Same `accountId` contract as delete. |
461
+ | `POST /api/admin/agents/:slug/enable?accountId=` | Takes NO authorship check, and that asymmetry with disable is deliberate: an install that switched a shipped agent off under the old gate must still reach this route, or inverting the gate strands it. For an authored slug the quarantined file is the whole state — 404 when it is absent, `restored:true` when it moves back, and the store is never touched. For a shipped slug it covers both of the old disable's outcomes: a quarantined file moves back (`restored:true`), and a bundled-only agent has nothing to move so clearing the store entry is the whole job (`restored:false`), which is what stops provisioning withholding it. 404 only when neither the quarantine directory nor the store knows the slug. The store is read strictly first, because this is the read half of a read-modify-write that rewrites the file whole, and it is written back only when an entry was actually removed — so enabling never creates a store an account did not have. |
271
462
  | `DELETE /api/admin/agents/:slug?accountId=` | Public agents only, on the named validated account. Removes the dir after `deleteAgentProjection`; refuses the `admin` slug (403) and a missing/unknown `accountId` (400) with no write. Loud-fail: a graph-cleanup throw aborts the file removal. |
272
463
  | `POST /api/admin/agents/:slug/project?accountId=` | Re-projects the named account's on-disk agent into the graph. Same `accountId` contract as delete. |
273
464
 
@@ -301,25 +492,40 @@ Agents page survived undiagnosed on a multi-account install.
301
492
  does not add up is visible without reproducing anything. The over-exclusion to
302
493
  watch for is a `deduped` line naming a file that is also a bundled or premium
303
494
  agent: the authored file then hides a genuinely shipped one.
304
- - `op=classify account=<id8> agent=<name> origin=<shipped|public|specialist>
305
- risk=<green|amber|red> riskiestTool=<tool> tools=<n> unresolved=<comma-list|none>
306
- disabled=<bool>` — one line per classified agent per listing, so it fires on
307
- every page load. `riskiestTool` makes a wrong class diagnosable without
308
- re-deriving it. Its value is the FULL canonical tool name, while the card
309
- renders only the segment after the plugin prefix. One load
310
- showing `riskiest tool: memory-update` on the card and
311
- `riskiestTool=mcp__plugin_memory_memory__memory-update` on this line is the
312
- confirmation that both derive from one value.
313
- **A non-empty `unresolved=` is the one to act on**: the agent
495
+ - `[agents] op=risk account=<id8> slug=<name> origin=<shipped|public|specialist>
496
+ class=<green|amber|red> rule=<id|none> riskiestTool=<tool> tools=<n>
497
+ unresolved=<n> unresolvedTools=<comma-list|none> disabled=<bool>` — one line
498
+ per classified agent per listing, so it fires on every page load.
499
+ **`rule=` is the field that proves the combination table is live**: a
500
+ mis-specified rule emits nothing of its own and is otherwise indistinguishable
501
+ from an absent one. `riskiestTool` makes a wrong class diagnosable without
502
+ re-deriving it; its value is the FULL canonical tool name and it is no longer
503
+ rendered anywhere, so this line is where it is read.
504
+ **A non-zero `unresolved=` is the one to act on**: the agent
314
505
  is forced red, and the cause is that the built-in table or the registry
315
- mapping has drifted, not that the agent changed.
316
- - `op=risk-surface status=load-failed reason=<msg>` the plugin registry did
317
- not parse, so every row is forced red and the listing returns
318
- `riskSurfaceFailed: true`. Without the forced red, every plugin tool would
319
- land in `unresolved` and a registry outage would read as agent drift across
320
- every card at once; without the response field, a red row would be
321
- indistinguishable from a genuinely dangerous agent, because nothing resolved
322
- so `unresolved` is empty and the per-tool explanation cannot fire.
506
+ mapping has drifted, not that the agent changed. `unresolvedTools=` says which.
507
+ - `[agents] op=rule-census account=<id8> rules=<n> classified=<n> fired=<n>
508
+ never=<comma-list|none>` one line per listing, not per agent.
509
+ **This is the standing check.** A rule that never fires produces no evidence of
510
+ its own, so nothing except this line would ever say so; a rule id permanently
511
+ in `never` across every account is dead or wrong. `fired + never` always equals
512
+ `rules`. Read `never` only when `classified` is non-zero: an account with no
513
+ specialists puts every rule in `never` and would otherwise be
514
+ indistinguishable from a table that was never wired. Today `reads-and-sends`
515
+ sits in `never` on an install whose agents are all shipped, which is expected
516
+ and not a fault.
517
+ - `op=risk-surface status=load-failed reason=<msg>`, emitted with
518
+ `[agents] op=risk-surface-failed reason=registry-unreadable detail=<msg>` — the
519
+ plugin registry did not parse, so every row is forced red and the listing
520
+ returns `riskSurfaceFailed: true`. Both lines say the same thing; the second is
521
+ the greppable shape, so one pattern (`\[agents\] op=(risk|rule-census|risk-surface-failed)`)
522
+ covers the per-agent lines, the census and the outage that forced them. Without
523
+ the forced red, every plugin tool would land in `unresolved` and a registry
524
+ outage would read as agent drift across every card at once; without the
525
+ response field, a red row would be indistinguishable from a genuinely dangerous
526
+ agent, because nothing resolved so `unresolved` is empty and the per-tool
527
+ explanation cannot fire. Every row's reason then says the registry is the
528
+ cause rather than asserting a capability the derivation never produced.
323
529
  - `op=disabled-store status=parse-failed reason=<msg>` — the listing then treats
324
530
  every agent as enabled, which is what they actually are. A read surface shows
325
531
  the true dispatchable set rather than a comforting one.
@@ -144,12 +144,22 @@ Every new node in {{productName}}'s graph is created with at least one connectio
144
144
 
145
145
  Every node also carries a provenance stamp — which agent wrote it, in which session, via which tool. You never see these fields, but they are how operators trace unusual growth back to the code path that produced it, and why your graph stays clean over time.
146
146
 
147
- **Two write surfaces, one substrate.** General agents write through schema-aware helpers — {{productName}} can record a new contact, a new commitment, a new preference without ever typing a database query, and the helper enforces the connection-and-provenance rule above structurally. The graph-steward role (the specialist {{productName}} dispatches when you ask for graph hygiene — "merge those two duplicate contacts," "wire those four tasks to the meeting," "rename the legacy label across the graph") additionally has a raw Cypher write tool for the multi-step operations the helpers cannot express. The steward role internalises the same connection-and-provenance discipline in its prompt; a post-write audit emits a warning on every breach so the same rules apply to both surfaces. Both paths feed the same hourly orphan trend and the same forensic provenance fields — read-side, you cannot tell the two apart, and that is the point.
147
+ **Two write surfaces, one substrate.** General agents write through schema-aware helpers — {{productName}} can record a new contact, a new commitment, a new preference without ever typing a database query, and the helper enforces the connection-and-provenance rule above structurally. The librarian (the specialist {{productName}} dispatches for ingest and graph hygiene — "merge those two duplicate contacts," "wire those four tasks to the meeting," "import this archive") additionally has a raw Cypher write tool, scoped to executing templates other tools emit, for the multi-step operations the helpers cannot express. The steward role internalises the same connection-and-provenance discipline in its prompt; a post-write audit emits a warning on every breach so the same rules apply to both surfaces. Both paths feed the same hourly orphan trend and the same forensic provenance fields — read-side, you cannot tell the two apart, and that is the point.
148
148
 
149
149
  ## Vertical schemas
150
150
 
151
151
  On top of the base graph, each brand boots one optional **vertical** — an extra set of entity types tailored to a trade. The vertical is named by `brand.json#vertical` and defined in a `schema-<name>.md` reference; the memory plugin loads it at startup and validates every write against base + the active vertical. Real Agent boots `schema-estate-agent` (Listing, Property, Viewing, Offer). SiteDesk boots `schema-construction`, the canonical JobLogic-derived field-service ontology, which adds the service-delivery entities — `Job`, `Customer`, `Site`, `Asset`, `Visit`, `Quote`, `QuoteLine`, `Valuation`, `VariationNote`, `JobCost`, `Part`, `PurchaseOrder`, `Invoice`, `InboundInvoice`, `PpmContract`, `WhatsAppGroup` (with `Engineer` and `Supplier` as additional labels on `Person`/`Organization`) — grounded in real builder job folders so a job's customer, site, quote, valuations, variations, costs, and received supplier invoices all hang off one `Job` node. The default SiteDesk brand boots no vertical (base graph only).
152
152
 
153
+ ### Estate agents: a listing needs no photo, a property needs no listing
154
+
155
+ Two things {{productName}} used to refuse, and no longer does.
156
+
157
+ **A listing can be recorded before it has a photo.** You take the instruction on Monday and the photographer comes on Thursday. The listing exists as a business fact for those three days, so {{productName}} records it as soon as you tell it about it, with the photo and the live page link added whenever they arrive. The same applies to the link: a property's page does not exist until the site is published.
158
+
159
+ **A property can be recorded before it has a listing.** A property you have valued, or been asked to appraise, or are holding off-market is a real property. {{productName}} records it as the property itself, with no marketing attached, and the listing hangs off it later — the same property can be listed for sale, withdrawn, and re-listed to let without ever becoming three properties.
160
+
161
+ Neither gap is forgotten. Once a day {{productName}} counts the listings visible to the public that still have no photo, and the properties that still have no listing, so a gap that should have closed by now can be seen rather than guessed at. If a public listing genuinely has no photo, its property card is shown as text without one rather than with a broken image.
162
+
153
163
  ## Public-facing summaries for customer-readable subjects
154
164
 
155
165
  Some entities in your graph are knowable by people outside your team — companies you work with, projects you've delivered, the business itself. For those entities ({{productName}} treats `:Organization`, `:Concept`, `:Project`, and `:LocalBusiness` this way), {{productName}} maintains two summaries: a private one only you and your specialist agents see, and a customer-facing public one your public agents are allowed to surface.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "graph",
3
- "description": "Raw Neo4j Cypher proxy. Wraps the upstream `mcp-neo4j-cypher` server (spawned under uvx by `platform/lib/graph-mcp`) under the stable `maxy-graph` namespace, so its tools register as `maxy-graph-read_neo4j_cypher`, `maxy-graph-get_neo4j_schema`, and `maxy-graph-write_neo4j_cypher`. The read and schema tools are admin-allowlisted for schema checks and read-only queries; the write tool is specialist-only (database-operator / librarian execute operator-confirmed `mergeCypher` templates through it, never hand-authored Cypher). The shim validates write Cypher against the live schema, stamps provenance, and rejects unknown labels/edges. Account isolation is per-brand Neo4j; the shim adds no query-layer tenant filter.",
3
+ "description": "Raw Neo4j Cypher proxy. Wraps the upstream `mcp-neo4j-cypher` server (spawned under uvx by `platform/lib/graph-mcp`) under the stable `maxy-graph` namespace, so its tools register as `maxy-graph-read_neo4j_cypher`, `maxy-graph-get_neo4j_schema`, and `maxy-graph-write_neo4j_cypher`. The read and schema tools are admin-allowlisted for schema checks and read-only queries; the write tool is specialist-only: the `librarian` executes operator-confirmed `mergeCypher` templates through it, never hand-authored Cypher. `database-operator` does not hold it: that specialist is scoped to the wrapped writers and stays narrow. The shim validates write Cypher against the live schema, stamps provenance, and rejects unknown labels/edges. Account isolation is per-brand Neo4j; the shim adds no query-layer tenant filter.",
4
4
  "version": "0.1.0",
5
5
  "author": {
6
6
  "name": "Rubytech LLC"
@@ -27,7 +27,7 @@ mcp:
27
27
  SESSION_ID: ${SESSION_ID}
28
28
  NEO4J_URI: ${NEO4J_URI}
29
29
  NEO4J_PASSWORD: ${NEO4J_PASSWORD}
30
- description: "Raw Neo4j Cypher proxy. Wraps the upstream `mcp-neo4j-cypher` server (spawned under uvx by `platform/lib/graph-mcp`) under the stable `maxy-graph` namespace, so its tools register as `maxy-graph-read_neo4j_cypher`, `maxy-graph-get_neo4j_schema`, and `maxy-graph-write_neo4j_cypher`. The read and schema tools are admin-allowlisted for schema checks and read-only queries; the write tool is specialist-only (database-operator / librarian execute operator-confirmed `mergeCypher` templates through it, never hand-authored Cypher). The shim validates write Cypher against the live schema, stamps provenance, and rejects unknown labels/edges. Account isolation is per-brand Neo4j; the shim adds no query-layer tenant filter."
30
+ description: "Raw Neo4j Cypher proxy. Wraps the upstream `mcp-neo4j-cypher` server (spawned under uvx by `platform/lib/graph-mcp`) under the stable `maxy-graph` namespace, so its tools register as `maxy-graph-read_neo4j_cypher`, `maxy-graph-get_neo4j_schema`, and `maxy-graph-write_neo4j_cypher`. The read and schema tools are admin-allowlisted for schema checks and read-only queries; the write tool is specialist-only: the `librarian` executes operator-confirmed `mergeCypher` templates through it, never hand-authored Cypher. `database-operator` does not hold it: that specialist is scoped to the wrapped writers and stays narrow. The shim validates write Cypher against the live schema, stamps provenance, and rejects unknown labels/edges. Account isolation is per-brand Neo4j; the shim adds no query-layer tenant filter."
31
31
  ---
32
32
 
33
33
  # graph
@@ -33,7 +33,7 @@ tools:
33
33
  riskClass: write_local
34
34
  - name: kd-classify
35
35
  publicAllowlist: false
36
- adminAllowlist: false
36
+ adminAllowlist: true
37
37
  riskClass: write_local
38
38
  - name: memory-ingest-extract
39
39
  publicAllowlist: false
@@ -882,8 +882,13 @@ if (!readOnly) {
882
882
  .string()
883
883
  .optional()
884
884
  .describe("Active Task elementId for autonomous-workflow writes. When set, an inbound :PRODUCED edge from this Task is composed into relationships before the write. Task must share the same accountId; mismatch is rejected. Omit for direct conversation asks — the platform composes the edge from the active conversation instead."),
885
+ mergeOn: z
886
+ .array(z.string())
887
+ .min(1)
888
+ .optional()
889
+ .describe("Natural-key properties for an idempotent write. When set, the node and its relationships MERGE on accountId plus these properties, so re-writing the same row updates it in place instead of creating a duplicate. Every named property must also appear in `properties`; accountId is always part of the key and must not be named here. Omit for a plain create."),
885
890
  targetAccountId: z.string().optional().describe(XACCT_DESC),
886
- }, async ({ labels, properties, scope, relationships, producedByTaskId, targetAccountId }) => {
891
+ }, async ({ labels, properties, scope, relationships, producedByTaskId, mergeOn, targetAccountId }) => {
887
892
  const scoped = resolveToolAccount("memory-write", targetAccountId);
888
893
  if ("reject" in scoped)
889
894
  return scoped.reject;
@@ -902,6 +907,7 @@ if (!readOnly) {
902
907
  },
903
908
  validator,
904
909
  producedByTaskId,
910
+ mergeOn,
905
911
  });
906
912
  return {
907
913
  content: [
@@ -2635,14 +2641,15 @@ lifelineTool(server, "image-fetch", [
2635
2641
  // ===================================================================
2636
2642
  // Report MCP tools (Task 332) are registered earlier in this file.
2637
2643
  // Dream-run calls the same writer in-process for the per-run :Report.
2638
- lifelineTool(server, "memory-dream-run", "Operator-initiated dream-cycle: graph-hygiene sweep across seven phases " +
2644
+ lifelineTool(server, "memory-dream-run", "Operator-initiated dream-cycle: graph-hygiene sweep across eight phases " +
2639
2645
  "(orphan detection, stale compiled-truth, edges to :Trashed targets, citation audit on :TimelineEvent, " +
2640
- "prune compiled-truth revisions, materialise :BACKLINKS edges, tag normalisation). " +
2646
+ "prune compiled-truth revisions, materialise :BACKLINKS edges, tag normalisation, estate-agent census). " +
2641
2647
  "Writes a :Report node at the end. Failure of any phase logs and continues. " +
2642
2648
  "Pass phases=[4] to run only the citation audit (e.g. after a bulk ingest), phases=[5] for revision prune only, " +
2643
- "or phases=[6,7] for backlink/tag maintenance only.", {
2649
+ "phases=[6,7] for backlink/tag maintenance only, or phases=[8] for the estate-agent census alone " +
2650
+ "(public listings with no image, properties with no listing; skips on non-estate accounts).", {
2644
2651
  operatorId: z.string().optional().describe("Identifier of the operator who triggered the run; appears in the report and log line."),
2645
- phases: z.array(z.number().int().min(1).max(7)).optional().describe("Subset of phases to run. Default [1,2,3,4,5,6,7]. Order is fixed."),
2652
+ phases: z.array(z.number().int().min(1).max(8)).optional().describe("Subset of phases to run. Default [1,2,3,4,5,6,7,8]. Order is fixed."),
2646
2653
  maxEventsPerRun: z.number().int().positive().optional().describe("Phase 4 cap on :TimelineEvent rows scanned per run. Default 200."),
2647
2654
  targetAccountId: z.string().optional().describe(XACCT_DESC),
2648
2655
  }, async ({ operatorId, phases, maxEventsPerRun, targetAccountId }) => {