@rubytech/create-sitedesk-code 0.1.607 → 0.1.609

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 (294) hide show
  1. package/package.json +1 -1
  2. package/payload/platform/lib/admins-write/vitest.config.ts +1 -0
  3. package/payload/platform/lib/agent-dispatch-rule/vitest.config.ts +1 -0
  4. package/payload/platform/lib/brand-templating/vitest.config.ts +1 -0
  5. package/payload/platform/lib/canonical-instant/vitest.config.ts +1 -0
  6. package/payload/platform/lib/dispatch-read/vitest.config.ts +1 -0
  7. package/payload/platform/lib/graph-search/vitest.config.ts +1 -0
  8. package/payload/platform/lib/graph-style/vitest.config.ts +1 -0
  9. package/payload/platform/lib/graph-write/dist/__tests__/account-id-gate.test.js +86 -0
  10. package/payload/platform/lib/graph-write/dist/__tests__/account-id-gate.test.js.map +1 -1
  11. package/payload/platform/lib/graph-write/dist/index.d.ts +30 -9
  12. package/payload/platform/lib/graph-write/dist/index.d.ts.map +1 -1
  13. package/payload/platform/lib/graph-write/dist/index.js +22 -2
  14. package/payload/platform/lib/graph-write/dist/index.js.map +1 -1
  15. package/payload/platform/lib/graph-write/src/__tests__/account-id-gate.test.ts +99 -1
  16. package/payload/platform/lib/graph-write/src/index.ts +47 -12
  17. package/payload/platform/lib/mcp-lifeline/vitest.config.ts +1 -0
  18. package/payload/platform/lib/routine-templates/vitest.config.ts +1 -0
  19. package/payload/platform/lib/task-secrets/vitest.config.ts +1 -0
  20. package/payload/platform/lib/telegram-button-labels/vitest.config.ts +1 -0
  21. package/payload/platform/lib/telegram-managed-bot/vitest.config.ts +1 -0
  22. package/payload/platform/lib/telegram-media/vitest.config.ts +1 -0
  23. package/payload/platform/lib/telegram-reach/vitest.config.ts +1 -0
  24. package/payload/platform/lib/telegram-store-read/vitest.config.ts +1 -0
  25. package/payload/platform/plugins/admin/mcp/vitest.config.ts +1 -0
  26. package/payload/platform/plugins/admin/skills/platform-architecture/SKILL.md +83 -2
  27. package/payload/platform/plugins/admin/skills/whats-new/SKILL.md +14 -0
  28. package/payload/platform/plugins/aeo/mcp/vitest.config.ts +1 -0
  29. package/payload/platform/plugins/cloudflare/mcp/vitest.config.ts +1 -0
  30. package/payload/platform/plugins/connector/mcp/vitest.config.ts +1 -0
  31. package/payload/platform/plugins/contacts/mcp/vitest.config.ts +1 -0
  32. package/payload/platform/plugins/docs/references/telegram-guide.md +82 -1
  33. package/payload/platform/plugins/email/mcp/vitest.config.ts +1 -0
  34. package/payload/platform/plugins/filesystem/mcp/vitest.config.ts +1 -0
  35. package/payload/platform/plugins/graph-viewer/mcp/vitest.config.ts +1 -0
  36. package/payload/platform/plugins/memory/mcp/dist/index.js +65 -0
  37. package/payload/platform/plugins/memory/mcp/dist/index.js.map +1 -1
  38. package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/xacct-counters.test.d.ts +2 -0
  39. package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/xacct-counters.test.d.ts.map +1 -0
  40. package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/xacct-counters.test.js +169 -0
  41. package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/xacct-counters.test.js.map +1 -0
  42. package/payload/platform/plugins/memory/mcp/dist/lib/xacct-counters.d.ts +63 -0
  43. package/payload/platform/plugins/memory/mcp/dist/lib/xacct-counters.d.ts.map +1 -0
  44. package/payload/platform/plugins/memory/mcp/dist/lib/xacct-counters.js +114 -0
  45. package/payload/platform/plugins/memory/mcp/dist/lib/xacct-counters.js.map +1 -0
  46. package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-write-cross-account.test.d.ts +2 -0
  47. package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-write-cross-account.test.d.ts.map +1 -0
  48. package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-write-cross-account.test.js +123 -0
  49. package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-write-cross-account.test.js.map +1 -0
  50. package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/xacct-write-gate.test.d.ts +2 -0
  51. package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/xacct-write-gate.test.d.ts.map +1 -0
  52. package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/xacct-write-gate.test.js +110 -0
  53. package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/xacct-write-gate.test.js.map +1 -0
  54. package/payload/platform/plugins/memory/mcp/dist/tools/memory-write.d.ts.map +1 -1
  55. package/payload/platform/plugins/memory/mcp/dist/tools/memory-write.js +7 -0
  56. package/payload/platform/plugins/memory/mcp/dist/tools/memory-write.js.map +1 -1
  57. package/payload/platform/plugins/memory/mcp/vitest.config.ts +3 -0
  58. package/payload/platform/plugins/scheduling/mcp/vitest.config.ts +1 -0
  59. package/payload/platform/plugins/storage-broker/mcp/vitest.config.ts +6 -1
  60. package/payload/platform/plugins/telegram/PLUGIN.md +6 -2
  61. package/payload/platform/plugins/telegram/mcp/dist/__tests__/card-tool.test.js +35 -3
  62. package/payload/platform/plugins/telegram/mcp/dist/__tests__/card-tool.test.js.map +1 -1
  63. package/payload/platform/plugins/telegram/mcp/dist/__tests__/instruct-tool.test.d.ts +2 -0
  64. package/payload/platform/plugins/telegram/mcp/dist/__tests__/instruct-tool.test.d.ts.map +1 -0
  65. package/payload/platform/plugins/telegram/mcp/dist/__tests__/instruct-tool.test.js +93 -0
  66. package/payload/platform/plugins/telegram/mcp/dist/__tests__/instruct-tool.test.js.map +1 -0
  67. package/payload/platform/plugins/telegram/mcp/dist/index.js +20 -0
  68. package/payload/platform/plugins/telegram/mcp/dist/index.js.map +1 -1
  69. package/payload/platform/plugins/telegram/mcp/dist/lib/public-pin.d.ts.map +1 -1
  70. package/payload/platform/plugins/telegram/mcp/dist/lib/public-pin.js +7 -0
  71. package/payload/platform/plugins/telegram/mcp/dist/lib/public-pin.js.map +1 -1
  72. package/payload/platform/plugins/telegram/mcp/dist/tools/card.d.ts.map +1 -1
  73. package/payload/platform/plugins/telegram/mcp/dist/tools/card.js +12 -5
  74. package/payload/platform/plugins/telegram/mcp/dist/tools/card.js.map +1 -1
  75. package/payload/platform/plugins/telegram/mcp/dist/tools/instruct.d.ts +56 -0
  76. package/payload/platform/plugins/telegram/mcp/dist/tools/instruct.d.ts.map +1 -0
  77. package/payload/platform/plugins/telegram/mcp/dist/tools/instruct.js +91 -0
  78. package/payload/platform/plugins/telegram/mcp/dist/tools/instruct.js.map +1 -0
  79. package/payload/platform/plugins/telegram/mcp/vitest.config.ts +1 -0
  80. package/payload/platform/plugins/url-get/mcp/vitest.config.ts +1 -0
  81. package/payload/platform/plugins/whatsapp/mcp/vitest.config.ts +1 -0
  82. package/payload/platform/scripts/repair-misfiled-card-rows.sh +276 -0
  83. package/payload/platform/services/claude-session-manager/dist/canonical-tool-names.generated.d.ts.map +1 -1
  84. package/payload/platform/services/claude-session-manager/dist/canonical-tool-names.generated.js +1 -0
  85. package/payload/platform/services/claude-session-manager/dist/canonical-tool-names.generated.js.map +1 -1
  86. package/payload/platform/services/claude-session-manager/dist/claude-trust-preflight.d.ts +43 -0
  87. package/payload/platform/services/claude-session-manager/dist/claude-trust-preflight.d.ts.map +1 -0
  88. package/payload/platform/services/claude-session-manager/dist/claude-trust-preflight.js +88 -0
  89. package/payload/platform/services/claude-session-manager/dist/claude-trust-preflight.js.map +1 -0
  90. package/payload/platform/services/claude-session-manager/dist/http-server.d.ts.map +1 -1
  91. package/payload/platform/services/claude-session-manager/dist/http-server.js +125 -4
  92. package/payload/platform/services/claude-session-manager/dist/http-server.js.map +1 -1
  93. package/payload/platform/services/claude-session-manager/dist/index.js +26 -1
  94. package/payload/platform/services/claude-session-manager/dist/index.js.map +1 -1
  95. package/payload/platform/services/claude-session-manager/dist/jsonl-path.d.ts +1 -1
  96. package/payload/platform/services/claude-session-manager/dist/jsonl-path.d.ts.map +1 -1
  97. package/payload/platform/services/claude-session-manager/dist/jsonl-path.js +26 -0
  98. package/payload/platform/services/claude-session-manager/dist/jsonl-path.js.map +1 -1
  99. package/payload/platform/services/claude-session-manager/dist/recover-account.d.ts +54 -0
  100. package/payload/platform/services/claude-session-manager/dist/recover-account.d.ts.map +1 -0
  101. package/payload/platform/services/claude-session-manager/dist/recover-account.js +141 -0
  102. package/payload/platform/services/claude-session-manager/dist/recover-account.js.map +1 -0
  103. package/payload/platform/services/claude-session-manager/dist/session-account-census.d.ts +30 -0
  104. package/payload/platform/services/claude-session-manager/dist/session-account-census.d.ts.map +1 -0
  105. package/payload/platform/services/claude-session-manager/dist/session-account-census.js +96 -0
  106. package/payload/platform/services/claude-session-manager/dist/session-account-census.js.map +1 -0
  107. package/payload/platform/services/claude-session-manager/vitest.config.ts +1 -1
  108. package/payload/platform/services/telegram-channel/dist/instructions.d.ts +10 -0
  109. package/payload/platform/services/telegram-channel/dist/instructions.d.ts.map +1 -1
  110. package/payload/platform/services/telegram-channel/dist/instructions.js +38 -0
  111. package/payload/platform/services/telegram-channel/dist/instructions.js.map +1 -1
  112. package/payload/platform/services/telegram-channel/dist/notification.d.ts +24 -7
  113. package/payload/platform/services/telegram-channel/dist/notification.d.ts.map +1 -1
  114. package/payload/platform/services/telegram-channel/dist/notification.js +31 -1
  115. package/payload/platform/services/telegram-channel/dist/notification.js.map +1 -1
  116. package/payload/platform/test/tmpdir-setup.ts +54 -0
  117. package/payload/server/{chunk-GI5AVCRG.js → chunk-DRDU74ZM.js} +1 -1
  118. package/payload/server/{chunk-MNN2RWJR.js → chunk-IOPUA7QV.js} +1 -1
  119. package/payload/server/{chunk-6AQYMT6C.js → chunk-T6NXRWMG.js} +43 -8
  120. package/payload/server/{manager-VDHT3YYI.js → manager-O5L2SKW7.js} +2 -2
  121. package/payload/server/maxy-edge.js +2 -2
  122. package/payload/server/public/activity.html +6 -6
  123. package/payload/server/public/agents.html +5 -5
  124. package/payload/server/public/assets/{AdminLoginScreens-DuQ3ax5U.js → AdminLoginScreens-BBKEIEjY.js} +1 -1
  125. package/payload/server/public/assets/AdminLoginScreens-BBKEIEjY.js.br +0 -0
  126. package/payload/server/public/assets/AdminLoginScreens-BBKEIEjY.js.gz +0 -0
  127. package/payload/server/public/assets/{AdminShell-1HyATV_t.js → AdminShell-CrCdEMNW.js} +1 -1
  128. package/payload/server/public/assets/AdminShell-CrCdEMNW.js.br +0 -0
  129. package/payload/server/public/assets/AdminShell-CrCdEMNW.js.gz +0 -0
  130. package/payload/server/public/assets/{activity-C2qWlcJ5.js → activity-CbR3vaq1.js} +1 -1
  131. package/payload/server/public/assets/activity-CbR3vaq1.js.br +0 -0
  132. package/payload/server/public/assets/activity-CbR3vaq1.js.gz +0 -0
  133. package/payload/server/public/assets/{admin-DqpfY8-t.js → admin-D8qKnmhE.js} +1 -1
  134. package/payload/server/public/assets/admin-D8qKnmhE.js.br +0 -0
  135. package/payload/server/public/assets/admin-D8qKnmhE.js.gz +0 -0
  136. package/payload/server/public/assets/{agents-DoGVAjIT.js → agents-8gAQjRqI.js} +1 -1
  137. package/payload/server/public/assets/agents-8gAQjRqI.js.br +0 -0
  138. package/payload/server/public/assets/agents-8gAQjRqI.js.gz +0 -0
  139. package/payload/server/public/assets/{browser-DjqS897k.js → browser-jAje5ILy.js} +1 -1
  140. package/payload/server/public/assets/browser-jAje5ILy.js.br +0 -0
  141. package/payload/server/public/assets/browser-jAje5ILy.js.gz +0 -0
  142. package/payload/server/public/assets/{calendar-DJeOm0WS.js → calendar-xEmCJif9.js} +1 -1
  143. package/payload/server/public/assets/calendar-xEmCJif9.js.br +0 -0
  144. package/payload/server/public/assets/calendar-xEmCJif9.js.gz +0 -0
  145. package/payload/server/public/assets/chat-Ct5RDmv6.js +1 -0
  146. package/payload/server/public/assets/chat-Ct5RDmv6.js.br +0 -0
  147. package/payload/server/public/assets/chat-Ct5RDmv6.js.gz +0 -0
  148. package/payload/server/public/assets/{chevron-left-D9z1aK3p.js → chevron-left-DV8gIVC9.js} +1 -1
  149. package/payload/server/public/assets/chevron-left-DV8gIVC9.js.br +0 -0
  150. package/payload/server/public/assets/clock-PnR4Tlg9.js +1 -0
  151. package/payload/server/public/assets/clock-PnR4Tlg9.js.br +0 -0
  152. package/payload/server/public/assets/{copy-p9ZM9fnn.js → copy-b6MpzRz9.js} +1 -1
  153. package/payload/server/public/assets/copy-b6MpzRz9.js.br +0 -0
  154. package/payload/server/public/assets/copy-b6MpzRz9.js.gz +0 -0
  155. package/payload/server/public/assets/data-BxFc9wPl.js +1 -0
  156. package/payload/server/public/assets/data-BxFc9wPl.js.br +2 -0
  157. package/payload/server/public/assets/data-BxFc9wPl.js.gz +0 -0
  158. package/payload/server/public/assets/{field-WRk67lvr.js → field-CiIsn-47.js} +1 -1
  159. package/payload/server/public/assets/field-CiIsn-47.js.br +0 -0
  160. package/payload/server/public/assets/field-CiIsn-47.js.gz +0 -0
  161. package/payload/server/public/assets/{file-text-BJDCb334.js → file-text-Cy-IjCf8.js} +1 -1
  162. package/payload/server/public/assets/file-text-Cy-IjCf8.js.br +0 -0
  163. package/payload/server/public/assets/file-text-Cy-IjCf8.js.gz +0 -0
  164. package/payload/server/public/assets/{graph-CAU2xh2Z.js → graph-BdC2IGOT.js} +1 -1
  165. package/payload/server/public/assets/graph-BdC2IGOT.js.br +0 -0
  166. package/payload/server/public/assets/graph-BdC2IGOT.js.gz +0 -0
  167. package/payload/server/public/assets/{graph-labels-CEDmX7qW.js → graph-labels-3bstML8n.js} +1 -1
  168. package/payload/server/public/assets/graph-labels-3bstML8n.js.br +0 -0
  169. package/payload/server/public/assets/graph-labels-3bstML8n.js.gz +0 -0
  170. package/payload/server/public/assets/{jsx-runtime-hPFGo4rC.css → jsx-runtime-JxxB_2S6.css} +1 -1
  171. package/payload/server/public/assets/jsx-runtime-JxxB_2S6.css.br +0 -0
  172. package/payload/server/public/assets/{jsx-runtime-hPFGo4rC.css.gz → jsx-runtime-JxxB_2S6.css.gz} +0 -0
  173. package/payload/server/public/assets/{operator-1WFztEQA.js → operator-D7L2SA16.js} +1 -1
  174. package/payload/server/public/assets/operator-D7L2SA16.js.br +0 -0
  175. package/payload/server/public/assets/operator-D7L2SA16.js.gz +0 -0
  176. package/payload/server/public/assets/{page-B72XigcU.js → page-DspGbDgK.js} +1 -1
  177. package/payload/server/public/assets/page-DspGbDgK.js.br +0 -0
  178. package/payload/server/public/assets/page-DspGbDgK.js.gz +0 -0
  179. package/payload/server/public/assets/{page-nT8l_cX1.js → page-ObXxk8ol.js} +1 -1
  180. package/payload/server/public/assets/page-ObXxk8ol.js.br +0 -0
  181. package/payload/server/public/assets/page-ObXxk8ol.js.gz +0 -0
  182. package/payload/server/public/assets/play-BL4ztD3m.js +1 -0
  183. package/payload/server/public/assets/play-BL4ztD3m.js.br +0 -0
  184. package/payload/server/public/assets/play-BL4ztD3m.js.gz +0 -0
  185. package/payload/server/public/assets/{public-DAea6w7w.js → public-CEXKl8wg.js} +1 -1
  186. package/payload/server/public/assets/public-CEXKl8wg.js.br +0 -0
  187. package/payload/server/public/assets/public-CEXKl8wg.js.gz +0 -0
  188. package/payload/server/public/assets/{rotate-ccw-CqlRlGsY.js → rotate-ccw-ckXDebK2.js} +1 -1
  189. package/payload/server/public/assets/rotate-ccw-ckXDebK2.js.br +0 -0
  190. package/payload/server/public/assets/rotate-ccw-ckXDebK2.js.gz +0 -0
  191. package/payload/server/public/assets/{routines-vy5xsyqx.js → routines-Dwc2meN2.js} +1 -1
  192. package/payload/server/public/assets/routines-Dwc2meN2.js.br +0 -0
  193. package/payload/server/public/assets/routines-Dwc2meN2.js.gz +0 -0
  194. package/payload/server/public/assets/{skills-X7FTilVy.js → skills-DdHKHl4Z.js} +1 -1
  195. package/payload/server/public/assets/skills-DdHKHl4Z.js.br +0 -0
  196. package/payload/server/public/assets/skills-DdHKHl4Z.js.gz +0 -0
  197. package/payload/server/public/assets/{tasks-BXx_jk_p.js → tasks-C_yWRvOG.js} +1 -1
  198. package/payload/server/public/assets/tasks-C_yWRvOG.js.br +0 -0
  199. package/payload/server/public/assets/tasks-C_yWRvOG.js.gz +0 -0
  200. package/payload/server/public/assets/{triangle-alert-CuWcGaRo.js → triangle-alert-C-7A00P0.js} +1 -1
  201. package/payload/server/public/assets/triangle-alert-C-7A00P0.js.br +0 -0
  202. package/payload/server/public/assets/triangle-alert-C-7A00P0.js.gz +0 -0
  203. package/payload/server/public/assets/{useCopyFeedback-DLSKs6r2.js → useCopyFeedback-CWvSi-Qe.js} +1 -1
  204. package/payload/server/public/assets/useCopyFeedback-CWvSi-Qe.js.br +2 -0
  205. package/payload/server/public/assets/useCopyFeedback-CWvSi-Qe.js.gz +0 -0
  206. package/payload/server/public/assets/{useMediaQuery-C_1CV_iW.js → useMediaQuery-CLVRXJMp.js} +1 -1
  207. package/payload/server/public/assets/useMediaQuery-CLVRXJMp.js.br +0 -0
  208. package/payload/server/public/assets/useMediaQuery-CLVRXJMp.js.gz +0 -0
  209. package/payload/server/public/assets/{useVoiceRecorder-DBzM_HIx.js → useVoiceRecorder-BbJad9CQ.js} +1 -1
  210. package/payload/server/public/assets/useVoiceRecorder-BbJad9CQ.js.br +0 -0
  211. package/payload/server/public/assets/useVoiceRecorder-BbJad9CQ.js.gz +0 -0
  212. package/payload/server/public/assets/{wrench-nDMQ6x-6.js → wrench-Cl6TUm2T.js} +1 -1
  213. package/payload/server/public/assets/wrench-Cl6TUm2T.js.br +0 -0
  214. package/payload/server/public/assets/wrench-Cl6TUm2T.js.gz +0 -0
  215. package/payload/server/public/browser.html +5 -5
  216. package/payload/server/public/calendar.html +8 -8
  217. package/payload/server/public/chat.html +14 -14
  218. package/payload/server/public/data.html +12 -12
  219. package/payload/server/public/field.html +3 -3
  220. package/payload/server/public/graph.html +10 -10
  221. package/payload/server/public/index.html +14 -14
  222. package/payload/server/public/operator.html +16 -16
  223. package/payload/server/public/public.html +14 -14
  224. package/payload/server/public/routines.html +8 -8
  225. package/payload/server/public/skills.html +6 -6
  226. package/payload/server/public/tasks.html +7 -7
  227. package/payload/server/server.js +1820 -1195
  228. package/payload/server/public/assets/AdminLoginScreens-DuQ3ax5U.js.br +0 -0
  229. package/payload/server/public/assets/AdminLoginScreens-DuQ3ax5U.js.gz +0 -0
  230. package/payload/server/public/assets/AdminShell-1HyATV_t.js.br +0 -0
  231. package/payload/server/public/assets/AdminShell-1HyATV_t.js.gz +0 -0
  232. package/payload/server/public/assets/activity-C2qWlcJ5.js.br +0 -0
  233. package/payload/server/public/assets/activity-C2qWlcJ5.js.gz +0 -0
  234. package/payload/server/public/assets/admin-DqpfY8-t.js.br +0 -0
  235. package/payload/server/public/assets/admin-DqpfY8-t.js.gz +0 -0
  236. package/payload/server/public/assets/agents-DoGVAjIT.js.br +0 -0
  237. package/payload/server/public/assets/agents-DoGVAjIT.js.gz +0 -0
  238. package/payload/server/public/assets/browser-DjqS897k.js.br +0 -0
  239. package/payload/server/public/assets/browser-DjqS897k.js.gz +0 -0
  240. package/payload/server/public/assets/calendar-DJeOm0WS.js.br +0 -0
  241. package/payload/server/public/assets/calendar-DJeOm0WS.js.gz +0 -0
  242. package/payload/server/public/assets/chat-BrRE0Dck.js +0 -1
  243. package/payload/server/public/assets/chat-BrRE0Dck.js.br +0 -0
  244. package/payload/server/public/assets/chat-BrRE0Dck.js.gz +0 -0
  245. package/payload/server/public/assets/chevron-left-D9z1aK3p.js.br +0 -0
  246. package/payload/server/public/assets/clock-BqHWMICF.js +0 -1
  247. package/payload/server/public/assets/clock-BqHWMICF.js.br +0 -0
  248. package/payload/server/public/assets/clock-BqHWMICF.js.gz +0 -0
  249. package/payload/server/public/assets/copy-p9ZM9fnn.js.br +0 -0
  250. package/payload/server/public/assets/copy-p9ZM9fnn.js.gz +0 -0
  251. package/payload/server/public/assets/data-CPsqW0qW.js +0 -1
  252. package/payload/server/public/assets/data-CPsqW0qW.js.br +0 -0
  253. package/payload/server/public/assets/data-CPsqW0qW.js.gz +0 -0
  254. package/payload/server/public/assets/field-WRk67lvr.js.br +0 -0
  255. package/payload/server/public/assets/field-WRk67lvr.js.gz +0 -0
  256. package/payload/server/public/assets/file-text-BJDCb334.js.br +0 -0
  257. package/payload/server/public/assets/file-text-BJDCb334.js.gz +0 -0
  258. package/payload/server/public/assets/graph-CAU2xh2Z.js.br +0 -0
  259. package/payload/server/public/assets/graph-CAU2xh2Z.js.gz +0 -0
  260. package/payload/server/public/assets/graph-labels-CEDmX7qW.js.br +0 -0
  261. package/payload/server/public/assets/graph-labels-CEDmX7qW.js.gz +0 -0
  262. package/payload/server/public/assets/jsx-runtime-hPFGo4rC.css.br +0 -0
  263. package/payload/server/public/assets/operator-1WFztEQA.js.br +0 -0
  264. package/payload/server/public/assets/operator-1WFztEQA.js.gz +0 -0
  265. package/payload/server/public/assets/page-B72XigcU.js.br +0 -0
  266. package/payload/server/public/assets/page-B72XigcU.js.gz +0 -0
  267. package/payload/server/public/assets/page-nT8l_cX1.js.br +0 -0
  268. package/payload/server/public/assets/page-nT8l_cX1.js.gz +0 -0
  269. package/payload/server/public/assets/play-CYqOCqm6.js +0 -1
  270. package/payload/server/public/assets/play-CYqOCqm6.js.br +0 -0
  271. package/payload/server/public/assets/play-CYqOCqm6.js.gz +0 -0
  272. package/payload/server/public/assets/public-DAea6w7w.js.br +0 -0
  273. package/payload/server/public/assets/public-DAea6w7w.js.gz +0 -0
  274. package/payload/server/public/assets/rotate-ccw-CqlRlGsY.js.br +0 -0
  275. package/payload/server/public/assets/rotate-ccw-CqlRlGsY.js.gz +0 -0
  276. package/payload/server/public/assets/routines-vy5xsyqx.js.br +0 -0
  277. package/payload/server/public/assets/routines-vy5xsyqx.js.gz +0 -0
  278. package/payload/server/public/assets/skills-X7FTilVy.js.br +0 -0
  279. package/payload/server/public/assets/skills-X7FTilVy.js.gz +0 -0
  280. package/payload/server/public/assets/tasks-BXx_jk_p.js.br +0 -0
  281. package/payload/server/public/assets/tasks-BXx_jk_p.js.gz +0 -0
  282. package/payload/server/public/assets/triangle-alert-CuWcGaRo.js.br +0 -0
  283. package/payload/server/public/assets/triangle-alert-CuWcGaRo.js.gz +0 -0
  284. package/payload/server/public/assets/useCopyFeedback-DLSKs6r2.js.br +0 -0
  285. package/payload/server/public/assets/useCopyFeedback-DLSKs6r2.js.gz +0 -0
  286. package/payload/server/public/assets/useMediaQuery-C_1CV_iW.js.br +0 -0
  287. package/payload/server/public/assets/useMediaQuery-C_1CV_iW.js.gz +0 -0
  288. package/payload/server/public/assets/useVoiceRecorder-DBzM_HIx.js.br +0 -0
  289. package/payload/server/public/assets/useVoiceRecorder-DBzM_HIx.js.gz +0 -0
  290. package/payload/server/public/assets/wrench-nDMQ6x-6.js.br +0 -0
  291. package/payload/server/public/assets/wrench-nDMQ6x-6.js.gz +0 -0
  292. /package/payload/server/public/assets/{jsx-runtime-CvVXOszc.js → jsx-runtime-BCAZhYqz.js} +0 -0
  293. /package/payload/server/public/assets/{jsx-runtime-CvVXOszc.js.br → jsx-runtime-BCAZhYqz.js.br} +0 -0
  294. /package/payload/server/public/assets/{jsx-runtime-CvVXOszc.js.gz → jsx-runtime-BCAZhYqz.js.gz} +0 -0
@@ -0,0 +1,141 @@
1
+ // Task 2728 — account resolution for the `/rc-spawn` recover path.
2
+ //
3
+ // `/rc-spawn` resolves its account as `requestedAccountId ?? deps.accountId`.
4
+ // The recovery caller (`manager-client.ts` `managerRcRecover`) sends no
5
+ // `targetAccountId` at all, so every wedged sub-account session respawned under
6
+ // the boot house account, carrying the same conversation id into a second
7
+ // account's projects dir. Eight lines above that default, an UNKNOWN account id
8
+ // is rejected outright, with the comment that a silent default "would route a
9
+ // switched session to the wrong account's graph"; the absent case did exactly
10
+ // that, and emitted nothing.
11
+ //
12
+ // Observed 2026-08-15 on laptop 192.168.88.10 (maxy-code): session 26f5687a,
13
+ // opened on sub-account 8a160746 at 12:30:53.322, answered by house 20028fb5
14
+ // from 12:32:45.406, one uuid holding two sidecar records.
15
+ //
16
+ // What this module answers: which account directory holds the session's own
17
+ // sidecar record. The DIRECTORY is the fact, not the sidecar's `accountId`
18
+ // field — that field is optional on disk (pre-983 sidecars and every /spawn
19
+ // sidecar written before Task 2038 carry no key), and a record that fails the
20
+ // strict `parseSidecar` shape still proves which account owns the session. So
21
+ // resolution reads file locations, and parses only to break a tie.
22
+ //
23
+ // Account membership mirrors the predicate /rc-spawn already applies inline when
24
+ // it rejects an unknown `targetAccountId`: a directory under `accountsRoot`
25
+ // carrying an `account.json`. The manager has no rootDir-clean import path for
26
+ // the account-enumeration lib, which is why that predicate is repeated rather
27
+ // than imported.
28
+ import { existsSync, readFileSync, readdirSync } from 'node:fs';
29
+ import { join } from 'node:path';
30
+ import { sidecarPathForSessionId } from './jsonl-path.js';
31
+ /** Accounts in the on-disk registry, in readdir order. Never throws: an absent
32
+ * or unreadable accountsRoot yields no accounts, which the caller reports as a
33
+ * refusal rather than a silent fall-back to house.
34
+ *
35
+ * Exported so the standing census in `session-account-census.ts` counts the
36
+ * same account set this resolver searches. Two copies of the predicate could
37
+ * disagree, and the census exists to catch exactly what this resolver missed. */
38
+ export function registeredAccountIds(accountsRoot) {
39
+ if (!existsSync(accountsRoot))
40
+ return [];
41
+ try {
42
+ return readdirSync(accountsRoot, { withFileTypes: true })
43
+ .filter((d) => d.isDirectory())
44
+ .map((d) => d.name)
45
+ .filter((id) => existsSync(join(accountsRoot, id, 'account.json')));
46
+ }
47
+ catch {
48
+ return [];
49
+ }
50
+ }
51
+ /** The sidecar's `startedAt` as epoch ms, or null when the file is unreadable,
52
+ * unparseable, or carries no usable timestamp. Only the tie-break reads this;
53
+ * a null orders AFTER every real timestamp, so a record whose start time is
54
+ * known always beats one whose is not. */
55
+ function startedAtMs(path) {
56
+ let raw;
57
+ try {
58
+ raw = readFileSync(path, 'utf8');
59
+ }
60
+ catch {
61
+ return null;
62
+ }
63
+ let parsed;
64
+ try {
65
+ parsed = JSON.parse(raw);
66
+ }
67
+ catch {
68
+ return null;
69
+ }
70
+ if (!parsed || typeof parsed !== 'object')
71
+ return null;
72
+ const startedAt = parsed.startedAt;
73
+ if (typeof startedAt !== 'string')
74
+ return null;
75
+ const ms = Date.parse(startedAt);
76
+ return Number.isNaN(ms) ? null : ms;
77
+ }
78
+ /** Task 2728 — the account a `recover: true` spawn must run under: the one whose
79
+ * directory holds this session's sidecar record (live or archived).
80
+ *
81
+ * No account holds one → `refused-no-sidecar`. There is no session to recover,
82
+ * so the house account is never the right answer and the caller refuses rather
83
+ * than spawning.
84
+ *
85
+ * More than one holds one → the defect's own residue, one conversation id
86
+ * spanning two accounts. The earlier `startedAt` wins, which is the account the
87
+ * conversation was opened on. `candidates` carries the count so a split id is
88
+ * visible in the log line at recover time, not only in the standing census. */
89
+ export function resolveRecoverAccount(input) {
90
+ const env = input.env ?? process.env;
91
+ const holders = [];
92
+ for (const accountId of registeredAccountIds(input.accountsRoot)) {
93
+ const accountDir = join(input.accountsRoot, accountId);
94
+ const live = sidecarPathForSessionId(accountDir, input.sessionId, {}, env);
95
+ const archived = sidecarPathForSessionId(accountDir, input.sessionId, { archived: true }, env);
96
+ if (existsSync(live) || existsSync(archived))
97
+ holders.push(accountId);
98
+ }
99
+ if (holders.length === 0)
100
+ return { outcome: 'refused-no-sidecar', candidates: 0 };
101
+ if (holders.length === 1)
102
+ return { outcome: 'ok', accountId: holders[0], candidates: 1 };
103
+ // Deterministic ordering: earliest known startedAt first, unknown last, then
104
+ // account id. Without the final key, two unreadable records would resolve in
105
+ // readdir order and the same split id could answer differently per boot.
106
+ const ranked = holders
107
+ .map((accountId) => {
108
+ const accountDir = join(input.accountsRoot, accountId);
109
+ const live = sidecarPathForSessionId(accountDir, input.sessionId, {}, env);
110
+ const path = existsSync(live)
111
+ ? live
112
+ : sidecarPathForSessionId(accountDir, input.sessionId, { archived: true }, env);
113
+ return { accountId, ms: startedAtMs(path) };
114
+ })
115
+ .sort((a, b) => {
116
+ if (a.ms !== b.ms) {
117
+ if (a.ms === null)
118
+ return 1;
119
+ if (b.ms === null)
120
+ return -1;
121
+ return a.ms - b.ms;
122
+ }
123
+ return a.accountId < b.accountId ? -1 : a.accountId > b.accountId ? 1 : 0;
124
+ });
125
+ return { outcome: 'ok', accountId: ranked[0].accountId, candidates: holders.length };
126
+ }
127
+ /** The per-recover lifeline. Emitted on EVERY recover, including one that
128
+ * carried an explicit `targetAccountId` (`source=body`), so a grep on one
129
+ * sessionId shows which account the recovery landed on and what decided it.
130
+ * `source=default` on a recover is the 2728 defect recurring. No call site can
131
+ * produce it today — a recover either resolves from sidecars or is handed an
132
+ * account by the body — and that is the point: it renders only if a later change
133
+ * lets a recover reach the boot-account fallback again, which is the regression
134
+ * this line exists to make visible.
135
+ * A null sessionId renders `new`, the token this route already uses for it. */
136
+ export function formatRecoverAccountLine(input) {
137
+ return (`[rc-spawn] op=recover-account sessionId=${input.sessionId ? input.sessionId.slice(0, 8) : 'new'}` +
138
+ ` resolved=${input.resolved ?? 'none'} source=${input.source}` +
139
+ ` outcome=${input.outcome} candidates=${input.candidates}`);
140
+ }
141
+ //# sourceMappingURL=recover-account.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"recover-account.js","sourceRoot":"","sources":["../src/recover-account.ts"],"names":[],"mappings":"AAAA,mEAAmE;AACnE,EAAE;AACF,8EAA8E;AAC9E,wEAAwE;AACxE,gFAAgF;AAChF,0EAA0E;AAC1E,gFAAgF;AAChF,8EAA8E;AAC9E,8EAA8E;AAC9E,6BAA6B;AAC7B,EAAE;AACF,6EAA6E;AAC7E,6EAA6E;AAC7E,2DAA2D;AAC3D,EAAE;AACF,4EAA4E;AAC5E,2EAA2E;AAC3E,4EAA4E;AAC5E,8EAA8E;AAC9E,8EAA8E;AAC9E,mEAAmE;AACnE,EAAE;AACF,iFAAiF;AACjF,4EAA4E;AAC5E,+EAA+E;AAC/E,8EAA8E;AAC9E,iBAAiB;AAEjB,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAC/D,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAA;AAYzD;;;;;;kFAMkF;AAClF,MAAM,UAAU,oBAAoB,C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CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,EAAE;QAClG,aAAa,KAAK,CAAC,QAAQ,IAAI,MAAM,WAAW,KAAK,CAAC,MAAM,EAAE;QAC9D,YAAY,KAAK,CAAC,OAAO,eAAe,KAAK,CAAC,UAAU,EAAE,CAC3D,CAAA;AACH,CAAC"}
@@ -0,0 +1,30 @@
1
+ import type { Logger } from './types.js';
2
+ /** Reconcile sidecar records by session id across every registered account.
3
+ * `ids` counts distinct session ids seen; `splitIds` names, in the eight-char
4
+ * short form the manager's log lines use, the ids that hold a record under more
5
+ * than one account. Live and archived records of the same account are one
6
+ * account, not a split, because archiving moves the pair within a directory. */
7
+ export declare function collectSessionAccountCensus(input: {
8
+ accountsRoot: string;
9
+ env?: NodeJS.ProcessEnv;
10
+ }): {
11
+ ids: number;
12
+ splitIds: string[];
13
+ };
14
+ /** `splitIds=none` (not an empty field) marks "no offenders", so the field is
15
+ * always present and greppable. `split>0` is the alarm condition. */
16
+ export declare function formatSessionAccountCensus(input: {
17
+ ids: number;
18
+ splitIds: string[];
19
+ }): string;
20
+ export interface SessionAccountCensus {
21
+ start(): void;
22
+ stop(): void;
23
+ }
24
+ export declare function createSessionAccountCensus(deps: {
25
+ accountsRoot: string;
26
+ intervalMs: number;
27
+ logger: Logger;
28
+ env?: NodeJS.ProcessEnv;
29
+ }): SessionAccountCensus;
30
+ //# sourceMappingURL=session-account-census.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"session-account-census.d.ts","sourceRoot":"","sources":["../src/session-account-census.ts"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AAkBxC;;;;iFAIiF;AACjF,wBAAgB,2BAA2B,CAAC,KAAK,EAAE;IACjD,YAAY,EAAE,MAAM,CAAA;IACpB,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAA;CACxB,GAAG;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,EAAE,CAAA;CAAE,CAgBtC;AAED;sEACsE;AACtE,wBAAgB,0BAA0B,CAAC,KAAK,EAAE;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,EAAE,CAAA;CAAE,GAAG,MAAM,CAM7F;AAED,MAAM,WAAW,oBAAoB;IACnC,KAAK,IAAI,IAAI,CAAA;IACb,IAAI,IAAI,IAAI,CAAA;CACb;AAED,wBAAgB,0BAA0B,CAAC,IAAI,EAAE;IAC/C,YAAY,EAAE,MAAM,CAAA;IACpB,UAAU,EAAE,MAAM,CAAA;IAClB,MAAM,EAAE,MAAM,CAAA;IACd,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAA;CACxB,GAAG,oBAAoB,CAwBvB"}
@@ -0,0 +1,96 @@
1
+ // Task 2728 — standing session-to-account census.
2
+ //
3
+ // One conversation id must hold sidecar records under exactly one account. The
4
+ // wrong-account respawn broke that: session 26f5687a held a record under
5
+ // sub-account 8a160746 (opened 12:30:53.322, no transcript) and another under
6
+ // house 20028fb5 (12:32:45.406, the whole transcript). Nothing emitted an event
7
+ // when the second record was written, and the state does not reproduce on
8
+ // demand, so no action log can catch it. A periodic reconciliation over the
9
+ // on-disk sidecars is the only reader that sees it.
10
+ //
11
+ // `ids=` is in the line for a reason: zero split out of zero ids is a census
12
+ // that is not measuring, not a healthy install, and a reader that only greps
13
+ // `split=0` cannot tell those apart.
14
+ //
15
+ // Shape mirrors cross-account-census.ts: a pure formatter and a pure-enough
16
+ // collector (both unit-tested), plus a start/stop factory whose setInterval is
17
+ // unref'd so it never holds the process open.
18
+ import { existsSync, readdirSync } from 'node:fs';
19
+ import { join } from 'node:path';
20
+ import { projectsDirForCwd } from './jsonl-path.js';
21
+ import { registeredAccountIds } from './recover-account.js';
22
+ const SIDECAR_SUFFIX = '.meta.json';
23
+ /** Session ids with a sidecar in this directory. Never throws; an absent or
24
+ * unreadable directory contributes nothing. */
25
+ function sessionIdsIn(dir) {
26
+ if (!existsSync(dir))
27
+ return [];
28
+ try {
29
+ return readdirSync(dir, { withFileTypes: true })
30
+ .filter((d) => d.isFile() && d.name.endsWith(SIDECAR_SUFFIX))
31
+ .map((d) => d.name.slice(0, -SIDECAR_SUFFIX.length))
32
+ .filter((id) => id.length > 0);
33
+ }
34
+ catch {
35
+ return [];
36
+ }
37
+ }
38
+ /** Reconcile sidecar records by session id across every registered account.
39
+ * `ids` counts distinct session ids seen; `splitIds` names, in the eight-char
40
+ * short form the manager's log lines use, the ids that hold a record under more
41
+ * than one account. Live and archived records of the same account are one
42
+ * account, not a split, because archiving moves the pair within a directory. */
43
+ export function collectSessionAccountCensus(input) {
44
+ const env = input.env ?? process.env;
45
+ const accountsBySession = new Map();
46
+ for (const accountId of registeredAccountIds(input.accountsRoot)) {
47
+ const projectsDir = projectsDirForCwd(join(input.accountsRoot, accountId), env);
48
+ for (const sessionId of [...sessionIdsIn(projectsDir), ...sessionIdsIn(join(projectsDir, 'archive'))]) {
49
+ const holders = accountsBySession.get(sessionId) ?? new Set();
50
+ holders.add(accountId);
51
+ accountsBySession.set(sessionId, holders);
52
+ }
53
+ }
54
+ const splitIds = [...accountsBySession.entries()]
55
+ .filter(([, holders]) => holders.size > 1)
56
+ .map(([sessionId]) => sessionId.slice(0, 8))
57
+ .sort();
58
+ return { ids: accountsBySession.size, splitIds };
59
+ }
60
+ /** `splitIds=none` (not an empty field) marks "no offenders", so the field is
61
+ * always present and greppable. `split>0` is the alarm condition. */
62
+ export function formatSessionAccountCensus(input) {
63
+ const named = [...input.splitIds].sort();
64
+ return (`[session-account-census] ids=${input.ids} split=${named.length}` +
65
+ ` splitIds=${named.length === 0 ? 'none' : named.join(',')}`);
66
+ }
67
+ export function createSessionAccountCensus(deps) {
68
+ const emit = () => {
69
+ try {
70
+ deps.logger(formatSessionAccountCensus(collectSessionAccountCensus({ accountsRoot: deps.accountsRoot, env: deps.env })));
71
+ }
72
+ catch {
73
+ // Best-effort, like every other standing check here: a census that throws
74
+ // must not take the manager down with it.
75
+ }
76
+ };
77
+ let timer = null;
78
+ return {
79
+ start() {
80
+ if (timer)
81
+ return;
82
+ // Emit once at start so the standing signal has a baseline immediately and
83
+ // an install that restarts inside the interval still produces a line.
84
+ emit();
85
+ timer = setInterval(emit, deps.intervalMs);
86
+ if (typeof timer.unref === 'function')
87
+ timer.unref();
88
+ },
89
+ stop() {
90
+ if (timer)
91
+ clearInterval(timer);
92
+ timer = null;
93
+ },
94
+ };
95
+ }
96
+ //# sourceMappingURL=session-account-census.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"session-account-census.js","sourceRoot":"","sources":["../src/session-account-census.ts"],"names":[],"mappings":"AAAA,kDAAkD;AAClD,EAAE;AACF,+EAA+E;AAC/E,yEAAyE;AACzE,8EAA8E;AAC9E,gFAAgF;AAChF,0EAA0E;AAC1E,4EAA4E;AAC5E,oDAAoD;AACpD,EAAE;AACF,6EAA6E;AAC7E,6EAA6E;AAC7E,qCAAqC;AACrC,EAAE;AACF,4EAA4E;AAC5E,+EAA+E;AAC/E,8CAA8C;AAE9C,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AACnD,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AAG3D,MAAM,cAAc,GAAG,YAAY,CAAA;AAEnC;gDACgD;AAChD,SAAS,YAAY,CAAC,GAAW;IAC/B,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC;QAAE,OAAO,EAAE,CAAA;IAC/B,IAAI,CAAC;QACH,OAAO,WAAW,CAAC,GAAG,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC;aAC7C,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,IAAI,CAAC,QAAQ,CAA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,CAAA;QACtD,CAAC;QACD,IAAI;YACF,IAAI,KAAK;gBAAE,aAAa,CAAC,KAAK,CAAC,CAAA;YAC/B,KAAK,GAAG,IAAI,CAAA;QACd,CAAC;KACF,CAAA;AACH,CAAC"}
@@ -9,6 +9,6 @@ import { defineConfig } from 'vitest/config'
9
9
 
10
10
  export default defineConfig({
11
11
  test: {
12
- setupFiles: ['./src/__tests__/helpers/env-setup.ts'],
12
+ setupFiles: ['../../test/tmpdir-setup.ts', './src/__tests__/helpers/env-setup.ts'],
13
13
  },
14
14
  })
@@ -14,6 +14,16 @@ export type TelegramChannelRole = 'admin' | 'public';
14
14
  * Both spawn paths stamp the env, so an absent or unrecognised value means the
15
15
  * spawn is wrong and the channel must not boot. */
16
16
  export declare function resolveChannelRole(raw: string | undefined): TelegramChannelRole;
17
+ export declare const OPERATOR_INSTRUCTION_REFRAME: string;
18
+ /** Task 2730 — the operator did not instruct the agent here; they answered the
19
+ * visitor themselves. The visitor already holds these exact words, so the only
20
+ * thing owed is that this conversation's context holds them too.
21
+ *
22
+ * The follower withholds this turn's final text whatever this block says, so its
23
+ * job is to stop the agent spending the turn composing a reply nobody will see,
24
+ * and to stop it reaching for a card, which sends through the Bot API directly
25
+ * and is the one delivery the follower cannot withhold. */
26
+ export declare const OPERATOR_SENT_REFRAME: string;
17
27
  export declare function channelInstructions(role: TelegramChannelRole): string;
18
28
  export declare function replyToolDescription(role: TelegramChannelRole): string;
19
29
  export declare function replyTextDescription(role: TelegramChannelRole): string;
@@ -1 +1 @@
1
- {"version":3,"file":"instructions.d.ts","sourceRoot":"","sources":["../src/instructions.ts"],"names":[],"mappings":"AAOA,MAAM,MAAM,mBAAmB,GAAG,OAAO,GAAG,QAAQ,CAAA;AAEpD;;;;;;;;;;;;;oDAaoD;AACpD,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,mBAAmB,CAM/E;AAkED,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,mBAAmB,GAAG,MAAM,CAErE;AAED,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,mBAAmB,GAAG,MAAM,CAItE;AAED,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,mBAAmB,GAAG,MAAM,CAEtE;AAoBD,eAAO,MAAM,yBAAyB,QAkEiE,CAAA"}
1
+ {"version":3,"file":"instructions.d.ts","sourceRoot":"","sources":["../src/instructions.ts"],"names":[],"mappings":"AAOA,MAAM,MAAM,mBAAmB,GAAG,OAAO,GAAG,QAAQ,CAAA;AAEpD;;;;;;;;;;;;;oDAaoD;AACpD,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,mBAAmB,CAM/E;AAiFD,eAAO,MAAM,4BAA4B,QAQb,CAAA;AAE5B;;;;;;;4DAO4D;AAC5D,eAAO,MAAM,qBAAqB,QAOgD,CAAA;AAElF,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,mBAAmB,GAAG,MAAM,CAErE;AAED,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,mBAAmB,GAAG,MAAM,CAItE;AAED,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,mBAAmB,GAAG,MAAM,CAEtE;AAoBD,eAAO,MAAM,yBAAyB,QAkEiE,CAAA"}
@@ -81,6 +81,44 @@ const PUBLIC_INSTRUCTIONS = SPECIALIST_AUDIENCE +
81
81
  `You act only as this bot and only in this chat: both are fixed for you, so never try to reach ` +
82
82
  `another person or another conversation. ` +
83
83
  NO_INTERNALS;
84
+ // Task 2724 — the `## Operator instruction` body of a PUBLIC turn whose source
85
+ // is 'operator'.
86
+ //
87
+ // The public role is otherwise plain (see composeContent), because a wrapper on
88
+ // the visitor's own words would leak the internal directive to them. An operator
89
+ // instruction is the one payload on this door the visitor did not write and will
90
+ // never see, so it is the one that must be framed: PUBLIC_INSTRUCTIONS above
91
+ // tells this agent that every channel event is a visitor speaking and must not
92
+ // be acted on as a trusted operator's instruction, which is exactly wrong for
93
+ // this turn and would have it answer a correction as though a stranger asked
94
+ // for one.
95
+ //
96
+ // The admin door is untouched and reads none of this. An operator instruction
97
+ // cannot reach it: the inject route refuses every bot whose registry entry is
98
+ // not role 'public'.
99
+ export const OPERATOR_INSTRUCTION_REFRAME = 'The account operator sent this through their own admin door. It is not the visitor speaking. ' +
100
+ 'The visitor did not write it, has not seen it, and is still waiting for an answer from you. ' +
101
+ 'It is genuine operator instruction for this conversation, so act on it: do what it says, then ' +
102
+ 'write the result as the final text of your turn. That text is what reaches the visitor, so ' +
103
+ 'never end this turn without it. ' +
104
+ 'Write it as your own words to the visitor, in the same voice as the rest of this conversation. ' +
105
+ 'Never quote this block, never repeat the instruction back, and never tell the visitor that ' +
106
+ 'somebody instructed you.';
107
+ /** Task 2730 — the operator did not instruct the agent here; they answered the
108
+ * visitor themselves. The visitor already holds these exact words, so the only
109
+ * thing owed is that this conversation's context holds them too.
110
+ *
111
+ * The follower withholds this turn's final text whatever this block says, so its
112
+ * job is to stop the agent spending the turn composing a reply nobody will see,
113
+ * and to stop it reaching for a card, which sends through the Bot API directly
114
+ * and is the one delivery the follower cannot withhold. */
115
+ export const OPERATOR_SENT_REFRAME = 'The account operator sent this message to the visitor themselves, from their own admin door. ' +
116
+ 'It is not the visitor speaking and it is not an instruction for you. ' +
117
+ 'The visitor has already received these exact words, so treat them as part of this ' +
118
+ 'conversation and as something already said to the visitor on your side. ' +
119
+ 'Nothing is to be sent in response: no reply, no acknowledgement, no card, no follow-up. ' +
120
+ 'Answer with one short line for the record and stop. That line is not delivered to anybody. ' +
121
+ 'Never quote this block, and never tell the visitor that anything was recorded.';
84
122
  export function channelInstructions(role) {
85
123
  return role === 'public' ? PUBLIC_INSTRUCTIONS : ADMIN_INSTRUCTIONS;
86
124
  }
@@ -1 +1 @@
1
- {"version":3,"file":"instructions.js","sourceRoot":"","sources":["../src/instructions.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,+EAA+E;AAC/E,+EAA+E;AAC/E,qEAAqE;AACrE,8EAA8E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ACpH,yBAAyB;IACzB,+EAA+E;IAC/E,iFAAiF;IACjF,iFAAiF;IACjF,mBAAmB;IACnB,8GAA8G;IAC9G,gHAAgH;IAChH,6BAA6B;IAC7B,2EAA2E;IAC3E,2EAA2E;IAC3E,6EAA6E;IAC7E,2EAA2E;IAC3E,2EAA2E;IAC3E,2EAA2E;IAC3E,+EAA+E;IAC/E,4EAA4E;IAC5E,2DAA2D;IAC3D,iHAAiH;IACjH,0EAA0E;IAC1E,2EAA2E;IAC3E,iFAAiF;IACjF,2EAA2E;IAC3E,8EAA8E;IAC9E,6EAA6E;IAC7E,qEAAqE;IACrE,qEAAqE;IACrE,+EAA+E;IAC/E,6EAA6E;IAC7E,YAAY;IACZ,8GAA8G;IAC9G,6HAA6H;IAC7H,kIAAkI;IAClI,4EAA4E;IAC5E,qFAAqF;IACrF,qGAAqG,CAAA"}
@@ -68,8 +68,16 @@ export interface InboundPayload {
68
68
  messageId: string;
69
69
  /** Task 1378 — the inbound's origin: 'user' (a real telegram message) or
70
70
  * 'schedule' (a synthetic inbound injected by the scheduler). Carried only
71
- * into the turn's structured log line. Absent on legacy frames = 'user'. */
72
- source?: 'user' | 'schedule';
71
+ * into the turn's structured log line.
72
+ *
73
+ * Task 2724 adds 'operator': text the account operator sent through the admin
74
+ * door for THIS agent to act on in this conversation. Unlike the other two it
75
+ * is not carried only into a log line — it selects the public branch's framing
76
+ * in composeContent, because it is the one public payload the visitor did not
77
+ * write.
78
+ *
79
+ * Absent on legacy frames = 'user'. */
80
+ source?: 'user' | 'schedule' | 'operator' | 'operator-sent';
73
81
  /** Task 2561 — who sent this message, and the account it landed on. The
74
82
  * gateway held both for the whole turn and passed neither, so an admin turn
75
83
  * opened straight into rules written about the account owner and a second
@@ -129,16 +137,25 @@ export declare function composeReplyNote(rc: ReplyContext): string;
129
137
  export interface ComposedInbound {
130
138
  content: string;
131
139
  payloadBytes: number;
132
- /** Task 2561 — whether this turn carries the inbound provenance preamble. The
140
+ /** Task 2561 — whether this turn carries a platform-verified preamble. The
133
141
  * composer is the only place that knows, and the receipt ack carries it to the
134
142
  * gateway so `provenance=no` is greppable in server.log without reproducing
135
- * the incident. */
143
+ * the incident.
144
+ *
145
+ * Task 2724 — two preambles satisfy it now: the admin door's inbound
146
+ * provenance block, and the public door's operator instruction block. Both
147
+ * are platform-stamped and neither can be produced by an inbound message,
148
+ * which is the property this flag reports. */
136
149
  provenance: boolean;
137
150
  /** Task 2353 — where this turn's `## Instruction` body came from. 'platform' is
138
- * this service's own constant, which is every admin turn on this door and
151
+ * this service's own admin constant, which is every admin turn on this door and
139
152
  * cannot fail; 'public-plain' is the public role, which carries no instruction
140
- * block at all. There is no 'absent': this door reads no file. */
141
- instructionSource: 'platform' | 'public-plain';
153
+ * block at all. Task 2724 adds 'operator': the public role carrying the
154
+ * operator-instruction constant, the one public turn that IS framed. Task 2730
155
+ * adds 'operator-sent': the public role carrying the already-sent constant,
156
+ * which is framed for the opposite reason. There is no 'absent': this door
157
+ * reads no file. */
158
+ instructionSource: 'platform' | 'public-plain' | 'operator' | 'operator-sent';
142
159
  }
143
160
  export declare function composeContent(p: InboundPayload, role: TelegramChannelRole): ComposedInbound;
144
161
  /** Defence in depth: this server serves exactly one key. Even though the
@@ -1 +1 @@
1
- {"version":3,"file":"notification.d.ts","sourceRoot":"","sources":["../src/notification.ts"],"names":[],"mappings":"AAyBA,OAAO,EAA6B,KAAK,mBAAmB,EAAE,MAAM,mBAAmB,CAAA;AAEvF;;uEAEuE;AACvE,MAAM,WAAW,kBAAkB;IACjC,SAAS,EAAE,MAAM,CAAA;IACjB,OAAO,EAAE,MAAM,CAAA;IACf,UAAU,EAAE,MAAM,EAAE,CAAA;IACpB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAA;IAC5B,YAAY,EAAE,MAAM,CAAA;CACrB;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,EAAE,EAAE,kBAAkB,GAAG,MAAM,CAUpE;AAED;;;;;;GAMG;AACH,wBAAg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,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAE7F;AAED;;;;;;;;;mDASmD;AACnD,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,MAAM,EACb,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,OAAO,GAClB;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,OAAO,CAAA;CAAE,CAEzD;AAID;;;;cAIc;AACd,wBAAsB,aAAa,CACjC,OAAO,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,EAC/B,IAAI,EAAE;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;CAAE,GAChF,OAAO,CAAC,OAAO,CAAC,CAMlB;AAED;;kFAEkF;AAClF,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,MAAM,CAIrE"}
@@ -21,7 +21,7 @@
21
21
  // Task 2364 — a type-only import from this package's own turn follower, so the
22
22
  // turn-end body and the counts it carries have one definition. Type-only, so it
23
23
  // erases at build and this file still pulls in no runtime dependency.
24
- import { ADMIN_REFRAME_INSTRUCTION } from './instructions.js';
24
+ import { ADMIN_REFRAME_INSTRUCTION, OPERATOR_INSTRUCTION_REFRAME, OPERATOR_SENT_REFRAME, } from './instructions.js';
25
25
  /**
26
26
  * Task 1516 — render the dispatcher's operator-provenance as a platform-verified
27
27
  * preamble. Every value is dispatcher-stamped (an inbound message cannot produce
@@ -132,6 +132,36 @@ export function composeContent(p, role) {
132
132
  const payload = composePayload(p);
133
133
  const payloadBytes = Buffer.byteLength(payload, 'utf8');
134
134
  if (role !== 'admin') {
135
+ // Task 2724 — an operator instruction is the one public payload the visitor
136
+ // did not write, so it is the one that gets framed. Everything else on this
137
+ // branch stays plain, for the reason this function's header gives.
138
+ //
139
+ // `payloadBytes` stays the INNER length on this branch too, matching the
140
+ // admin branch and every pre-2724 public turn: the `[reframe]` line measures
141
+ // what the person sent, never what the platform wrapped around it.
142
+ if (p.source === 'operator') {
143
+ return {
144
+ content: `## Operator instruction (platform-verified)\n${OPERATOR_INSTRUCTION_REFRAME}\n\n` +
145
+ `## What the operator asked for\n${payload}`,
146
+ payloadBytes,
147
+ provenance: true,
148
+ instructionSource: 'operator',
149
+ };
150
+ }
151
+ // Task 2730 — the second public payload the visitor did not write, framed for
152
+ // the OPPOSITE reason to the one above: the visitor HAS seen it, so this
153
+ // tells the agent to record it and send nothing. The follower withholds the
154
+ // turn's final text regardless; this is what stops the agent reaching for a
155
+ // card, which no suppression here can catch.
156
+ if (p.source === 'operator-sent') {
157
+ return {
158
+ content: `## Operator message already sent to the visitor (platform-verified)\n${OPERATOR_SENT_REFRAME}\n\n` +
159
+ `## What the operator sent\n${payload}`,
160
+ payloadBytes,
161
+ provenance: true,
162
+ instructionSource: 'operator-sent',
163
+ };
164
+ }
135
165
  return { content: payload, payloadBytes, provenance: false, instructionSource: 'public-plain' };
136
166
  }
137
167
  // Task 1516 — a scheduled turn opens with the platform-verified provenance
@@ -1 +1 @@
1
- {"version":3,"file":"notification.js","sourceRoot":"","sources":["../src/notification.ts"],"names":[],"mappings":"AAAA,iFAAiF;AACjF,iFAAiF;AACjF,yEAAyE;AACzE,gCAAgC;AAChC,EAAE;AACF,6EAA6E;AAC7E,iFAAiF;AACjF,gEAAgE;AAChE,6EAA6E;AAC7E,8EAA8E;AAC9E,gFAAgF;AAChF,kFAAkF;AAClF,iFAAiF;AACjF,kFAAkF;AAClF,+EAA+E;AAC/E,2FAA2F;AAC3F,+EAA+E;AAC/E,iFAAiF;AACjF,iFAAiF;AACjF,qFAAqF;AAErF,+EAA+E;AAC/E,gFAAgF;AAChF,sEAAsE;AAEtE,OAAO,EAAE,y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I,CAAC,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAA;IAClF,OAAO,MAAM,CAAC,CAAC,CAAC,UAAU,MAAM,EAAE,CAAC,CAAC,CAAC,2BAA2B,MAAM,EAAE,CAAA;AAC1E,CAAC;AAED,+EAA+E;AAC/E,gFAAgF;AAChF,4EAA4E;AAC5E,8EAA8E;AAC9E,+EAA+E;AAC/E,yEAAyE;AACzE,gFAAgF;AAChF,yDAAyD"}
@@ -0,0 +1,54 @@
1
+ // Vitest setup — gives every test file its own TMPDIR, and removes it when the
2
+ // file finishes.
3
+ //
4
+ // 129 test files under platform/ call `mkdtempSync(join(tmpdir(), '<prefix>-'))`
5
+ // and never remove the directory, which left roughly 18,000 directories a day in
6
+ // the macOS per-user temp directory (129,247 entries, 5.9 GB, when measured).
7
+ // `dirhelper` does clear them, but only three to five days later.
8
+ //
9
+ // The redirect happens here rather than in each test file because the leaks do
10
+ // not share one shape: 64 of those files call `mkdtempSync` more than once, 24
11
+ // pass it inline as an argument instead of assigning it, and some create the
12
+ // directory at module scope rather than in a `beforeEach`. `os.tmpdir()` re-reads
13
+ // `process.env.TMPDIR` on every call, and setup files run before the test module
14
+ // is imported, so pointing TMPDIR at a per-file root captures every later call,
15
+ // including those at module scope and inside helper functions.
16
+ //
17
+ // Scope: this removes directories created under `tmpdir()`. A test that writes to
18
+ // a hard-coded absolute path is unaffected.
19
+
20
+ import { mkdtempSync, rmSync } from 'node:fs'
21
+ import { tmpdir } from 'node:os'
22
+ import { join } from 'node:path'
23
+ import { afterAll } from 'vitest'
24
+
25
+ // A worker process runs many test files in turn, and this setup runs once per
26
+ // file. Both facts below are per-process, so they hang off globalThis rather
27
+ // than module scope, which is per file.
28
+ const shared = globalThis as typeof globalThis & {
29
+ __maxyTmpBase?: string
30
+ __maxyTmpRoots?: string[]
31
+ }
32
+
33
+ // Capture the real temp directory before the first redirect. Without this, the
34
+ // second file in a worker would read the first file's root and nest inside it.
35
+ if (shared.__maxyTmpBase === undefined) {
36
+ shared.__maxyTmpBase = tmpdir()
37
+ shared.__maxyTmpRoots = []
38
+ // `afterAll` does not run when a test file throws during collection — an
39
+ // import error leaves the root behind. The worker still exits, so this is
40
+ // the backstop that catches those.
41
+ process.on('exit', () => {
42
+ for (const dir of shared.__maxyTmpRoots!) {
43
+ rmSync(dir, { recursive: true, force: true })
44
+ }
45
+ })
46
+ }
47
+
48
+ const root = mkdtempSync(join(shared.__maxyTmpBase, 'vitest-'))
49
+ shared.__maxyTmpRoots!.push(root)
50
+ process.env.TMPDIR = root
51
+
52
+ afterAll(() => {
53
+ rmSync(root, { recursive: true, force: true })
54
+ })
@@ -8,7 +8,7 @@ import {
8
8
  getUserTimezone,
9
9
  isValidAccountId,
10
10
  registerLoop
11
- } from "./chunk-6AQYMT6C.js";
11
+ } from "./chunk-T6NXRWMG.js";
12
12
  import {
13
13
  extractVideo,
14
14
  transcribe
@@ -12,7 +12,7 @@ import {
12
12
  getConversationOwner,
13
13
  isValidAccountId,
14
14
  registerLoop
15
- } from "./chunk-6AQYMT6C.js";
15
+ } from "./chunk-T6NXRWMG.js";
16
16
 
17
17
  // node_modules/hono/dist/compose.js
18
18
  var compose = (middleware, onError, onNotFound) => {