@songsid/agend 2.4.0-beta.10 → 2.4.0-beta.12

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 (298) hide show
  1. package/dist/accounts-view.d.ts +29 -0
  2. package/dist/accounts-view.js +2 -14
  3. package/dist/accounts-view.js.map +1 -1
  4. package/dist/agent-endpoint.d.ts +1 -0
  5. package/dist/agent-endpoint.js +4 -2
  6. package/dist/agent-endpoint.js.map +1 -1
  7. package/dist/auth-api.d.ts +2 -0
  8. package/dist/auth-api.js +29 -2
  9. package/dist/auth-api.js.map +1 -1
  10. package/dist/backend/claude-code.js +35 -9
  11. package/dist/backend/claude-code.js.map +1 -1
  12. package/dist/backend/codex-precaution.d.ts +7 -0
  13. package/dist/backend/codex-precaution.js +102 -0
  14. package/dist/backend/codex-precaution.js.map +1 -0
  15. package/dist/backend/codex.d.ts +1 -0
  16. package/dist/backend/codex.js +18 -0
  17. package/dist/backend/codex.js.map +1 -1
  18. package/dist/backend/grok.js +21 -6
  19. package/dist/backend/grok.js.map +1 -1
  20. package/dist/backend/types.d.ts +9 -1
  21. package/dist/backend/types.js.map +1 -1
  22. package/dist/build-provenance.json +1 -1
  23. package/dist/channel/mcp-server.js +1 -1
  24. package/dist/channel/mcp-server.js.map +1 -1
  25. package/dist/channel/mcp-tools.js +3 -1
  26. package/dist/channel/mcp-tools.js.map +1 -1
  27. package/dist/claude-install-kind.d.ts +19 -0
  28. package/dist/claude-install-kind.js +54 -0
  29. package/dist/claude-install-kind.js.map +1 -0
  30. package/dist/cli-audited.js +3 -3
  31. package/dist/cli-audited.js.map +1 -1
  32. package/dist/daemon.d.ts +5 -0
  33. package/dist/daemon.js +22 -4
  34. package/dist/daemon.js.map +1 -1
  35. package/dist/event-log.d.ts +12 -0
  36. package/dist/event-log.js +40 -0
  37. package/dist/event-log.js.map +1 -1
  38. package/dist/fleet-manager.d.ts +122 -2
  39. package/dist/fleet-manager.js +482 -27
  40. package/dist/fleet-manager.js.map +1 -1
  41. package/dist/general-knowledge/skills/hub/SKILL.md +38 -6
  42. package/dist/general-knowledge/skills/web-dashboard/SKILL.md +16 -1
  43. package/dist/hub/admin-dashboard.js +3 -3
  44. package/dist/hub/admin-dashboard.js.map +1 -1
  45. package/dist/hub/agent-catalog-model.d.ts +276 -0
  46. package/dist/hub/agent-catalog-model.js +49 -0
  47. package/dist/hub/agent-catalog-model.js.map +1 -0
  48. package/dist/hub/agent-catalog.d.ts +137 -0
  49. package/dist/hub/agent-catalog.js +118 -0
  50. package/dist/hub/agent-catalog.js.map +1 -0
  51. package/dist/hub/agent-intro-model.d.ts +38 -0
  52. package/dist/hub/agent-intro-model.js +14 -0
  53. package/dist/hub/agent-intro-model.js.map +1 -0
  54. package/dist/hub/agent-intro-tool.d.ts +35 -0
  55. package/dist/hub/agent-intro-tool.js +83 -0
  56. package/dist/hub/agent-intro-tool.js.map +1 -0
  57. package/dist/hub/agent-intro.d.ts +31 -0
  58. package/dist/hub/agent-intro.js +51 -0
  59. package/dist/hub/agent-intro.js.map +1 -0
  60. package/dist/hub/catalog.d.ts +4 -2
  61. package/dist/hub/catalog.js +19 -3
  62. package/dist/hub/catalog.js.map +1 -1
  63. package/dist/hub/client.d.ts +3 -0
  64. package/dist/hub/client.js +47 -1
  65. package/dist/hub/client.js.map +1 -1
  66. package/dist/hub/compose/member.d.ts +19 -5
  67. package/dist/hub/compose/member.js +94 -13
  68. package/dist/hub/compose/member.js.map +1 -1
  69. package/dist/hub/compose/server.d.ts +5 -0
  70. package/dist/hub/compose/server.js +6 -1
  71. package/dist/hub/compose/server.js.map +1 -1
  72. package/dist/hub/execution/service.d.ts +1 -1
  73. package/dist/hub/execution/service.js +1 -0
  74. package/dist/hub/execution/service.js.map +1 -1
  75. package/dist/hub/http/compose.d.ts +3 -0
  76. package/dist/hub/http/compose.js +122 -15
  77. package/dist/hub/http/compose.js.map +1 -1
  78. package/dist/hub/http/schema.js +15 -0
  79. package/dist/hub/http/schema.js.map +1 -1
  80. package/dist/hub/mcp/tools.js +2 -1
  81. package/dist/hub/mcp/tools.js.map +1 -1
  82. package/dist/hub/member/agent-catalog.d.ts +28 -0
  83. package/dist/hub/member/agent-catalog.js +80 -0
  84. package/dist/hub/member/agent-catalog.js.map +1 -0
  85. package/dist/hub/member/agent-intro.d.ts +28 -0
  86. package/dist/hub/member/agent-intro.js +66 -0
  87. package/dist/hub/member/agent-intro.js.map +1 -0
  88. package/dist/hub/member/exposure-api.d.ts +3 -3
  89. package/dist/hub/member/exposure-api.js +4 -4
  90. package/dist/hub/member/exposure-api.js.map +1 -1
  91. package/dist/hub/member/exposures.d.ts +12 -4
  92. package/dist/hub/member/exposures.js +27 -13
  93. package/dist/hub/member/exposures.js.map +1 -1
  94. package/dist/hub/member/room-ask.d.ts +14 -1
  95. package/dist/hub/member/room-ask.js +76 -10
  96. package/dist/hub/member/room-ask.js.map +1 -1
  97. package/dist/hub/member/room-context-budget.d.ts +5 -0
  98. package/dist/hub/member/room-context-budget.js +34 -0
  99. package/dist/hub/member/room-context-budget.js.map +1 -0
  100. package/dist/hub/member/room-notification.d.ts +1 -1
  101. package/dist/hub/member/room-post.d.ts +6 -3
  102. package/dist/hub/member/room-post.js +9 -3
  103. package/dist/hub/member/room-post.js.map +1 -1
  104. package/dist/hub/member/sharing-journal.d.ts +252 -0
  105. package/dist/hub/member/sharing-journal.js +212 -0
  106. package/dist/hub/member/sharing-journal.js.map +1 -0
  107. package/dist/hub/member/sharing-link.d.ts +25 -0
  108. package/dist/hub/member/sharing-link.js +68 -0
  109. package/dist/hub/member/sharing-link.js.map +1 -0
  110. package/dist/hub/member/sharing-result.d.ts +6 -0
  111. package/dist/hub/member/sharing-result.js +46 -0
  112. package/dist/hub/member/sharing-result.js.map +1 -0
  113. package/dist/hub/member/sharing.d.ts +37 -0
  114. package/dist/hub/member/sharing.js +181 -0
  115. package/dist/hub/member/sharing.js.map +1 -0
  116. package/dist/hub/personal/owner-host.d.ts +6 -0
  117. package/dist/hub/personal/owner-host.js +4 -2
  118. package/dist/hub/personal/owner-host.js.map +1 -1
  119. package/dist/hub/protocol.d.ts +398 -4
  120. package/dist/hub/protocol.js +13 -5
  121. package/dist/hub/protocol.js.map +1 -1
  122. package/dist/hub/room-answer-status-model.d.ts +3 -0
  123. package/dist/hub/room-answer-status-model.js +4 -0
  124. package/dist/hub/room-answer-status-model.js.map +1 -0
  125. package/dist/hub/room-brief-model.d.ts +30 -0
  126. package/dist/hub/room-brief-model.js +37 -0
  127. package/dist/hub/room-brief-model.js.map +1 -0
  128. package/dist/hub/room-context-model.d.ts +2 -0
  129. package/dist/hub/room-context-model.js +2 -2
  130. package/dist/hub/room-context-model.js.map +1 -1
  131. package/dist/hub/room-members-model.d.ts +63 -0
  132. package/dist/hub/room-members-model.js +7 -0
  133. package/dist/hub/room-members-model.js.map +1 -0
  134. package/dist/hub/rooms/agents.d.ts +1 -0
  135. package/dist/hub/rooms/agents.js +62 -11
  136. package/dist/hub/rooms/agents.js.map +1 -1
  137. package/dist/hub/rooms/brief.d.ts +18 -0
  138. package/dist/hub/rooms/brief.js +39 -0
  139. package/dist/hub/rooms/brief.js.map +1 -0
  140. package/dist/hub/rooms/direct-view.d.ts +5 -1
  141. package/dist/hub/rooms/direct-view.js +2 -2
  142. package/dist/hub/rooms/direct-view.js.map +1 -1
  143. package/dist/hub/rooms/members-page.d.ts +33 -0
  144. package/dist/hub/rooms/members-page.js +37 -0
  145. package/dist/hub/rooms/members-page.js.map +1 -0
  146. package/dist/hub/rooms/purpose.d.ts +7 -0
  147. package/dist/hub/rooms/purpose.js +14 -0
  148. package/dist/hub/rooms/purpose.js.map +1 -0
  149. package/dist/hub/rooms/service.d.ts +43 -0
  150. package/dist/hub/rooms/service.js +80 -22
  151. package/dist/hub/rooms/service.js.map +1 -1
  152. package/dist/hub/rooms/types.d.ts +6 -1
  153. package/dist/hub/rooms.d.ts +1 -0
  154. package/dist/hub/rooms.js +9 -4
  155. package/dist/hub/rooms.js.map +1 -1
  156. package/dist/hub/runtime.d.ts +1 -1
  157. package/dist/hub/server.js +49 -1
  158. package/dist/hub/server.js.map +1 -1
  159. package/dist/hub/sharing-previous-access.d.ts +22 -0
  160. package/dist/hub/sharing-previous-access.js +93 -0
  161. package/dist/hub/sharing-previous-access.js.map +1 -0
  162. package/dist/hub/sharing-requests.d.ts +171 -0
  163. package/dist/hub/sharing-requests.js +311 -0
  164. package/dist/hub/sharing-requests.js.map +1 -0
  165. package/dist/hub/sharing-retention.d.ts +47 -0
  166. package/dist/hub/sharing-retention.js +83 -0
  167. package/dist/hub/sharing-retention.js.map +1 -0
  168. package/dist/hub/sharing-withdrawal.d.ts +14 -0
  169. package/dist/hub/sharing-withdrawal.js +28 -0
  170. package/dist/hub/sharing-withdrawal.js.map +1 -0
  171. package/dist/hub/types.d.ts +13 -5
  172. package/dist/hub-page-sharing-settings.d.ts +6 -0
  173. package/dist/hub-page-sharing-settings.js +19 -0
  174. package/dist/hub-page-sharing-settings.js.map +1 -0
  175. package/dist/hub-room-reply-warning.d.ts +2 -0
  176. package/dist/hub-room-reply-warning.js +16 -0
  177. package/dist/hub-room-reply-warning.js.map +1 -0
  178. package/dist/hub-sharing-notice.d.ts +43 -0
  179. package/dist/hub-sharing-notice.js +34 -0
  180. package/dist/hub-sharing-notice.js.map +1 -0
  181. package/dist/instance-lifecycle.d.ts +15 -0
  182. package/dist/instance-lifecycle.js +36 -1
  183. package/dist/instance-lifecycle.js.map +1 -1
  184. package/dist/locale.js +78 -0
  185. package/dist/locale.js.map +1 -1
  186. package/dist/login-controller.d.ts +26 -0
  187. package/dist/login-controller.js +72 -2
  188. package/dist/login-controller.js.map +1 -1
  189. package/dist/login-flows.js +1 -1
  190. package/dist/login-flows.js.map +1 -1
  191. package/dist/native-mcp.js +1 -1
  192. package/dist/native-mcp.js.map +1 -1
  193. package/dist/needs-you-hub.js +1 -1
  194. package/dist/needs-you-hub.js.map +1 -1
  195. package/dist/needs-you.d.ts +8 -1
  196. package/dist/needs-you.js +6 -0
  197. package/dist/needs-you.js.map +1 -1
  198. package/dist/office-share-page.js +1 -1
  199. package/dist/office-share-page.js.map +1 -1
  200. package/dist/outbound-handlers.d.ts +2 -1
  201. package/dist/outbound-handlers.js +17 -4
  202. package/dist/outbound-handlers.js.map +1 -1
  203. package/dist/outbound-schemas.d.ts +10 -0
  204. package/dist/outbound-schemas.js +3 -1
  205. package/dist/outbound-schemas.js.map +1 -1
  206. package/dist/public-web-gateway.js +9 -3
  207. package/dist/public-web-gateway.js.map +1 -1
  208. package/dist/remote-card-answer.d.ts +1 -1
  209. package/dist/remote-card-answer.js +8 -1
  210. package/dist/remote-card-answer.js.map +1 -1
  211. package/dist/remote-card-prompt.js +1 -1
  212. package/dist/remote-card-prompt.js.map +1 -1
  213. package/dist/restart-progress.d.ts +6 -0
  214. package/dist/restart-progress.js +5 -0
  215. package/dist/restart-progress.js.map +1 -1
  216. package/dist/settings-api.d.ts +1 -0
  217. package/dist/settings-api.js +84 -10
  218. package/dist/settings-api.js.map +1 -1
  219. package/dist/settings-baseline.d.ts +3 -0
  220. package/dist/settings-baseline.js +2 -2
  221. package/dist/settings-baseline.js.map +1 -1
  222. package/dist/settings-change.js +1 -0
  223. package/dist/settings-change.js.map +1 -1
  224. package/dist/settings-effect.d.ts +3 -0
  225. package/dist/settings-effect.js +33 -2
  226. package/dist/settings-effect.js.map +1 -1
  227. package/dist/tool-permissions.js +3 -3
  228. package/dist/tool-permissions.js.map +1 -1
  229. package/dist/ui/chat-quote.js +3 -261
  230. package/dist/ui/fleet-office-card.js +8 -4
  231. package/dist/ui/fleet-office-pack.d.ts +1 -0
  232. package/dist/ui/fleet-office-pack.js +6 -2
  233. package/dist/ui/fleet-office-play.js +84 -0
  234. package/dist/ui/fleet-office-store.js +23 -0
  235. package/dist/ui/fleet-office-zones.js +5 -1
  236. package/dist/ui/fleet-office.js +78 -8
  237. package/dist/ui/host-install.js +77 -3
  238. package/dist/ui/hub-agent-intro.js +35 -0
  239. package/dist/ui/hub-attachments.js +81 -3
  240. package/dist/ui/hub-chat-strings.js +4 -4
  241. package/dist/ui/hub-client.js +16 -1
  242. package/dist/ui/hub-grant-picker.js +25 -11
  243. package/dist/ui/hub-group-strings.js +3 -3
  244. package/dist/ui/hub-intro-notice.js +16 -0
  245. package/dist/ui/hub-my-agents-model.js +42 -0
  246. package/dist/ui/hub-my-agents-strings.js +18 -0
  247. package/dist/ui/hub-my-agents.js +144 -0
  248. package/dist/ui/hub-owner-strings.js +5 -5
  249. package/dist/ui/hub-personal-agent.js +5 -4
  250. package/dist/ui/hub-room-composer.js +37 -6
  251. package/dist/ui/hub-room-list.js +4 -3
  252. package/dist/ui/hub-room-members.js +5 -2
  253. package/dist/ui/hub-room-new.js +8 -5
  254. package/dist/ui/hub-room-purpose.js +19 -0
  255. package/dist/ui/hub-room-search.js +1 -1
  256. package/dist/ui/hub-room-settings.js +9 -0
  257. package/dist/ui/hub-room-strings.js +6 -4
  258. package/dist/ui/hub-room-thread.js +70 -17
  259. package/dist/ui/hub-strings.js +5 -5
  260. package/dist/ui/hub-welcome.js +6 -6
  261. package/dist/ui/notice-hub-sharing.js +81 -0
  262. package/dist/ui/panel-chat.js +19 -5
  263. package/dist/ui/panel-hub.js +77 -29
  264. package/dist/ui/panel-notices.js +2 -1
  265. package/dist/ui/settings-hub-connection.js +2 -2
  266. package/dist/ui/settings-hub-page-sharing.js +52 -0
  267. package/dist/ui/settings-hub.js +4 -2
  268. package/dist/ui/settings-registry.js +1 -0
  269. package/dist/ui/shared/app-i18n.js +2 -2
  270. package/dist/ui/shared/app-shell.js +14 -2
  271. package/dist/ui/shared/app-store.js +6 -2
  272. package/dist/ui/shared/app.js +3 -1
  273. package/dist/ui/shared/chat-msg-actions.js +3 -1
  274. package/dist/ui/shared/chat-quote.js +261 -0
  275. package/dist/ui/shared/hub-chat.css +31 -0
  276. package/dist/ui/shared/hub-my-agents.css +35 -0
  277. package/dist/ui/shared/hub-rooms-u2.css +5 -0
  278. package/dist/ui/shared/module-warm.d.ts +3 -0
  279. package/dist/ui/shared/module-warm.js +39 -0
  280. package/dist/web-api.d.ts +21 -5
  281. package/dist/web-api.js +138 -7
  282. package/dist/web-api.js.map +1 -1
  283. package/dist/web-asset-version.d.ts +65 -0
  284. package/dist/web-asset-version.js +259 -0
  285. package/dist/web-asset-version.js.map +1 -0
  286. package/dist/web-host-guard.js +3 -1
  287. package/dist/web-host-guard.js.map +1 -1
  288. package/dist/web-host-install.d.ts +30 -3
  289. package/dist/web-host-install.js +50 -4
  290. package/dist/web-host-install.js.map +1 -1
  291. package/dist/web-notices.d.ts +17 -0
  292. package/dist/web-notices.js +47 -6
  293. package/dist/web-notices.js.map +1 -1
  294. package/dist/web-terminal.d.ts +5 -0
  295. package/dist/web-terminal.js +11 -0
  296. package/dist/web-terminal.js.map +1 -1
  297. package/launcher/agend-install.cjs +48 -7
  298. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"tool-permissions.js","sourceRoot":"","sources":["../src/tool-permissions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAI/C,yFAAyF;AACzF,MAAM,MAAM,GAAsB;IAChC,qBAAqB;IACrB,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,qBAAqB,EAAE,YAAY;IACrE,4EAA4E;IAC5E,0EAA0E;IAC1E,4EAA4E;IAC5E,2EAA2E;IAC3E,0EAA0E;IAC1E,gDAAgD;IAChD,eAAe,EAAE,eAAe,EAAE,kBAAkB,EAAE,mBAAmB;IACzE,kBAAkB,EAAE,eAAe,EAAE,qBAAqB,EAAE,WAAW,EAAE,eAAe,EAAE,iBAAiB;IAC3G,4DAA4D;IAC5D,gBAAgB,EAAE,mBAAmB,EAAE,YAAY,EAAE,aAAa;IAClE,kBAAkB,EAAE,kBAAkB,EAAE,WAAW,EAAE,YAAY,EAAE,mBAAmB,EAAE,oBAAoB;IAC5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C;QAC7D,OAAO,sBAAsB,CAAC,OAAO,EAAE,IAAI,EAAE,MAAM,EACjD,QAAQ,CAAC,MAAM,KAAK,MAAM;YACxB,CAAC,CAAC,mCAAmC,QAAQ,CAAC,MAAM,GAAG;YACvD,CAAC,CAAC,sBAAsB,QAAQ,CAAC,MAAM,eAAe,CAAC,CAAC;IAC9D,CAAC;IACD,IAAI,EAAE,KAAK,QAAQ,IAAI,SAAS,IAAI,SAAS,KAAK,MAAM,EAAE,CAAC;QACzD,OAAO,sBAAsB,CAAC,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,yBAAyB,SAAS,GAAG,CAAC,CAAC;IAC9F,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED,+FAA+F;AAC/F,SAAS,sBAAsB,CAAC,OAAoB,EAAE,IAAY,EAAE,MAAc,EAAE,SAAiB;IACnG,OAAO,GAAG,IAAI,wBAAwB,OAAO,6DAA6D;UACtG,yBAAyB,MAAM,yCAAyC,SAAS,IAAI;UACrF,sFAAsF;UACtF,yCAAyC,CAAC;AAChD,CAAC"}
@@ -1,261 +1,3 @@
1
- // M-2789 (the user, 11-09): answer a long, multi-part message passage by passage. Select text in ONE message of the thread
2
- // → a small 「引用」 pill → the passage goes into the composer as a Markdown quote ("> …") at the caret, on its own lines,
3
- // the caret left on the next line for the answer. Repeatable: quote, answer, quote the next passage, answer…
4
- //
5
- // - Desktop: the pill is anchored to where the selection ends (a pointer at the exact spot), below that line — clear of
6
- // the browser's own menu above a selection (Edge's mini menu sits there, and a page can't turn it off; M-2872) — and
7
- // above it only when there is no room below in the thread's visible box. After a quote the composer takes the focus.
8
- // - Phone (a coarse pointer): the pill 「引用選取的文字」 docks above the composer's whole box inside the 16-px gutter — clear
9
- // of the system's own copy toolbar (above a selection) and of the finger — or at the top of the thread when the
10
- // passage sits there. The keyboard does NOT open after a quote (the user's choice): more passages can be selected;
11
- // the composer's own scroller shows the caret and the newest quote.
12
- // - No pill for a selection across messages, outside the thread, or on a page that can't send; no keyboard shortcut
13
- // (the user's choice). The whole-message Reply (#2272) is unchanged, and so is the browser's menu on selected text.
14
- // - What is sent is the composer's text as typed: the agent reads the "> " lines as written; the web renders them as
15
- // blockquotes (chat-render.js); Discord's mirror shows them as quotes, Telegram's as the same plain lines.
16
- //
17
- // Its own words and drawing (a page that loaded an older chat-strings.js or ui-icons.js still draws it), CSSOM only
18
- // (no style attribute: #1300), the shared popover look (.msg-menu) with the shared border and shadow tokens.
19
- import { register, t } from "/assets/app-i18n.js";
20
-
21
- register("chatQuote", {
22
- en: { quote: "Quote", quotePhone: "Quote selection", label: "Quote the selected text in your message" },
23
- "zh-TW": { quote: "引用", quotePhone: "引用選取的文字", label: "把選取的文字引用到你的訊息裡" },
24
- });
25
- const tq = (k) => t(`chatQuote.${k}`);
26
-
27
- /**
28
- * Where the person's caret was in the composer when it last lost the focus — what a quote goes in at. A field's own
29
- * selectionStart can't be trusted after the page's selection moved into the thread (Chrome resets it), so it is kept
30
- * here, with the text it belongs to (a caret for another text is no caret).
31
- */
32
- const remembered = new WeakMap();
33
- export function composerCaret(field, value) {
34
- if (!field) return value.length;
35
- const r = remembered.get(field);
36
- if (r && r.value === value) return r.caret;
37
- const doc = field.ownerDocument;
38
- if (doc && doc.activeElement === field && field.value === value) return field.selectionStart ?? value.length;
39
- return value.length;
40
- }
41
-
42
- /** The passage as Markdown quote lines: each line "> line" (an empty one "> " keeps the quote one block). */
43
- export function quoteBlock(text) {
44
- const lines = String(text ?? "").replace(/\r\n?/g, "\n").replace(/ /g, " ").split("\n").map((l) => l.replace(/\s+$/, ""));
45
- while (lines.length && !lines[0].trim()) lines.shift();
46
- while (lines.length && !lines[lines.length - 1].trim()) lines.pop();
47
- // A run of empty lines inside the passage becomes one quoted empty line.
48
- const out = [];
49
- for (const l of lines) { if (!l.trim() && out.length && out[out.length - 1] === ">") continue; out.push(l.trim() ? `> ${l}` : ">"); }
50
- return out.join("\n");
51
- }
52
-
53
- /**
54
- * Put the passage into `value` at `caret`, on its own lines: a blank line before it when text precedes on the line or
55
- * just above, the caret on the line after it (for the answer), and a line break before any text that follows.
56
- * Returns { value, caret }, or null for a passage with nothing to quote.
57
- */
58
- export function insertQuote(value, caret, text) {
59
- const block = quoteBlock(text);
60
- if (!block) return null;
61
- const v = String(value ?? "");
62
- const at = Math.max(0, Math.min(Number.isInteger(caret) ? caret : v.length, v.length));
63
- const before = v.slice(0, at), after = v.slice(at);
64
- const lead = !before ? "" : before.endsWith("\n\n") ? "" : before.endsWith("\n") ? "\n" : "\n\n";
65
- const head = before + lead + block + "\n";
66
- // Text after the caret starts its own line below the answer's (its leading spaces dropped with the break).
67
- const tail = after && !after.startsWith("\n") ? "\n" + after.replace(/^[ \t]+/, "") : after;
68
- return { value: head + tail, caret: head.length };
69
- }
70
-
71
- /** The selected passage when it lies inside one message's text of `list`, else null. { text, el, rects }. */
72
- export function selectedPassage(list, sel) {
73
- if (!sel || sel.isCollapsed || !sel.rangeCount) return null;
74
- const text = String(sel.toString() || "");
75
- if (!text.trim()) return null;
76
- const msg = (n) => { const e = n && (n.nodeType === 1 ? n : n.parentElement); return e && e.closest ? e.closest(".msg[data-key]") : null; };
77
- // The message's own words, not its header (sender, time) or its action strip.
78
- const inBody = (n) => { const e = n && (n.nodeType === 1 ? n : n.parentElement); return !!(e && e.closest && e.closest(".body, .md") && !e.closest(".meta, .msg-actions")); };
79
- // Every range of the selection (a browser may keep several: #3555 review P3) in the same message's words — what is
80
- // quoted is the whole selection's text.
81
- const range = sel.getRangeAt(0), a = msg(range.startContainer);
82
- if (!a || !list.contains(a)) return null;
83
- for (let i = 0; i < sel.rangeCount; i++) {
84
- const rg = sel.getRangeAt(i);
85
- if (msg(rg.startContainer) !== a || msg(rg.endContainer) !== a || !inBody(rg.startContainer) || !inBody(rg.endContainer)) return null;
86
- }
87
- return { text, el: a, range };
88
- }
89
-
90
- /**
91
- * Where the composer's caret sits, in px from the top of its text (a mirror of the field's text box up to the caret).
92
- * Used to show the caret without focusing the field (a phone: the keyboard stays down).
93
- */
94
- export function caretTop(field, pos) {
95
- const doc = field.ownerDocument, win = doc.defaultView;
96
- if (!win || !win.getComputedStyle) return 0;
97
- const cs = win.getComputedStyle(field);
98
- const m = doc.createElement("div");
99
- for (const p of ["box-sizing", "width", "padding-top", "padding-right", "padding-bottom", "padding-left", "border-top-width", "border-right-width",
100
- "border-bottom-width", "border-left-width", "font-family", "font-size", "font-weight", "font-style", "line-height", "letter-spacing", "word-spacing", "tab-size"]) {
101
- m.style.setProperty(p, cs.getPropertyValue(p));
102
- }
103
- for (const [k, v] of [["position", "absolute"], ["visibility", "hidden"], ["top", "0"], ["left", "-9999px"], ["white-space", "pre-wrap"], ["overflow-wrap", "break-word"], ["height", "auto"]]) m.style.setProperty(k, v);
104
- m.textContent = field.value.slice(0, pos);
105
- const mark = doc.createElement("span"); mark.textContent = "​"; m.append(mark);
106
- doc.body.append(m);
107
- const y = mark.offsetTop, h = mark.offsetHeight;
108
- m.remove();
109
- return { y, h };
110
- }
111
-
112
- /** Scroll the field's own scroller so the caret (and the lines just above it: the newest quote) are in view. */
113
- export function showCaret(field, pos) {
114
- // At the end (the usual case: the newest quote is the last thing in the box): the bottom.
115
- if (pos >= field.value.length) { field.scrollTop = field.scrollHeight; return; }
116
- const c = caretTop(field, pos);
117
- if (!c || typeof c !== "object") { field.scrollTop = field.scrollHeight; return; }
118
- const view = field.clientHeight;
119
- if (c.y + c.h > field.scrollTop + view) field.scrollTop = Math.max(0, c.y + c.h - view + 4);
120
- else if (c.y < field.scrollTop) field.scrollTop = Math.max(0, c.y - 4);
121
- }
122
-
123
- // The quote mark: two marks on the shared 24-px grid, 2-px stroke, currentColor (as ui-icons.js draws).
124
- const ICON = "M4 11h5v6H4v-6zm0 0c0-3 1.5-5 4-6M14 11h5v6h-5v-6zm0 0c0-3 1.5-5 4-6";
125
- function iconEl(doc) {
126
- const NS = "http://www.w3.org/2000/svg";
127
- const svg = doc.createElementNS(NS, "svg");
128
- for (const [k, v] of [["class", "icon"], ["width", "16"], ["height", "16"], ["viewBox", "0 0 24 24"], ["fill", "none"], ["stroke", "currentColor"], ["stroke-width", "2"],
129
- ["stroke-linecap", "round"], ["stroke-linejoin", "round"], ["aria-hidden", "true"], ["focusable", "false"]]) svg.setAttribute(k, v);
130
- const p = doc.createElementNS(NS, "path"); p.setAttribute("d", ICON); svg.append(p);
131
- return svg;
132
- }
133
-
134
- const overlap = (a, z) => Math.max(0, Math.min(a.right, z.right) - Math.max(a.left, z.left)) * Math.max(0, Math.min(a.bottom, z.bottom) - Math.max(a.top, z.top));
135
-
136
- /**
137
- * Install the pill on `list` (the thread element). `deps`:
138
- * field() → the composer's text field (marked data-touched once it has had the focus: its caret is the person's);
139
- * canQuote() → boolean (a page that can send); insert(text) (the composer's side: see panel-chat.js);
140
- * phone() → boolean (a coarse pointer); composerBox() → the composer's whole box (Element) or null; threadBox() → Element.
141
- * Returns a function that removes everything.
142
- */
143
- export function installQuoteSelection(list, deps) {
144
- const doc = list.ownerDocument, win = doc.defaultView;
145
- let pop = null, timer = null, down = false, current = null, drawnFor = "";
146
-
147
- function hide() {
148
- current = null; drawnFor = "";
149
- if (!pop) return;
150
- pop.remove(); pop = null;
151
- }
152
- function place(passage) {
153
- const phone = !!deps.phone?.();
154
- if (!pop) {
155
- pop = doc.createElement("div");
156
- pop.className = "msg-menu quote-pop";
157
- pop.setAttribute("role", "toolbar"); pop.setAttribute("data-trust", "menu"); pop.setAttribute("aria-label", tq("label"));
158
- const b = doc.createElement("button");
159
- b.type = "button"; b.className = "menu-item quote-pick";
160
- b.append(iconEl(doc));
161
- const span = doc.createElement("span"); b.append(span);
162
- // A press on the pill must not collapse the selection it is about (mousedown's default does, pointerdown's
163
- // preventDefault alone doesn't); the passage is the one the pill was drawn for, whatever the selection did since.
164
- b.addEventListener("pointerdown", (e) => { e.preventDefault(); });
165
- b.addEventListener("mousedown", (e) => { e.preventDefault(); });
166
- b.addEventListener("click", (e) => { e.preventDefault(); const text = drawnFor; hide(); if (text) { deps.insert(text); doc.getSelection?.()?.removeAllRanges?.(); } });
167
- pop.append(b);
168
- doc.body.append(pop);
169
- }
170
- pop.classList.toggle("is-phone", phone);
171
- const label = pop.querySelector(".quote-pick span"); label.textContent = tq(phone ? "quotePhone" : "quote");
172
- for (const old of pop.querySelectorAll(".quote-other")) old.remove();
173
- for (const target of deps.targets?.() || []) {
174
- const b = doc.createElement("button"); b.type = "button"; b.className = "menu-item quote-pick quote-other";
175
- b.append(iconEl(doc));
176
- const span = doc.createElement("span"); span.textContent = target.label; b.append(span); b.title = target.label;
177
- b.addEventListener("pointerdown", e => e.preventDefault()); b.addEventListener("mousedown", e => e.preventDefault());
178
- b.addEventListener("click", e => { e.preventDefault(); const text = drawnFor; hide(); if (text) target.insert(text); });
179
- pop.append(b);
180
- }
181
- pop.querySelector(".quote-tip")?.remove();
182
- const pr = pop.getBoundingClientRect();
183
- const vw = win?.innerWidth ?? 1024;
184
- const rects = [...(passage.range.getClientRects?.() ?? [])].filter((x) => x.width > 0);
185
- if (!rects.length) { hide(); return; }
186
- const last = rects[rects.length - 1];
187
- let left, top, tip = null;
188
- if (!phone) {
189
- // Room is the thread's visible box (the chat scroller, above the composer), within the window.
190
- const th = deps.threadBox?.()?.getBoundingClientRect?.();
191
- const vh = win?.innerHeight ?? 800;
192
- const box = th && th.bottom > th.top ? th : { top: 0, bottom: vh };
193
- const floor = Math.min(vh, box.bottom) - 4, ceil = Math.max(0, box.top) + 4;
194
- left = Math.max(8, Math.min(last.right - pr.width / 2, vw - pr.width - 8));
195
- const aboveTop = last.top - pr.height - 10, belowTop = last.bottom + 10;
196
- // Below unless it would run out of the box and above fits (with no room either side, below).
197
- const under = belowTop + pr.height <= floor || aboveTop < ceil;
198
- top = under ? belowTop : aboveTop;
199
- tip = { side: under ? "up" : "down", x: Math.max(10, Math.min(last.right - left - 5, pr.width - 20)) };
200
- } else {
201
- const box = deps.composerBox?.()?.getBoundingClientRect?.();
202
- left = Math.max(16, vw - 16 - pr.width);
203
- top = box ? box.top - pr.height - 12 : (win?.innerHeight ?? 800) - pr.height - 120;
204
- const at = { left, right: left + pr.width, top: top - 8, bottom: top + pr.height + 8 };
205
- if (rects.some((q) => overlap(at, q) > 0)) {
206
- const th = deps.threadBox?.()?.getBoundingClientRect?.();
207
- top = Math.max(th ? th.top : 0, 0) + 12;
208
- }
209
- }
210
- if (tip) {
211
- const s = doc.createElement("span"); s.className = `quote-tip ${tip.side}`; s.setAttribute("aria-hidden", "true");
212
- s.style.setProperty("left", `${tip.x}px`);
213
- pop.append(s);
214
- }
215
- pop.style.setProperty("left", `${Math.round(left)}px`);
216
- pop.style.setProperty("top", `${Math.round(top)}px`);
217
- }
218
- function check() {
219
- timer = null;
220
- if (down || deps.canQuote?.() === false) { hide(); return; }
221
- const passage = selectedPassage(list, doc.getSelection?.());
222
- if (!passage) { hide(); return; }
223
- current = passage; drawnFor = passage.text;
224
- place(passage);
225
- }
226
- function soon() { if (timer) clearTimeout(timer); timer = setTimeout(check, 120); }
227
- const onSelection = () => soon();
228
- const onDown = (e) => { if (pop && pop.contains(e.target)) return; down = true; hide(); };
229
- // A gesture the browser took over (a touch scroll: pointerdown → pointercancel, no pointerup — #3555 review P2-1)
230
- // ends the press as a pointerup does; the selection then decides.
231
- const onUp = () => { if (!down) return; down = false; soon(); };
232
- const onKey = (e) => { if (e.key === "Escape" && pop) { hide(); } };
233
- const onScroll = () => { if (pop && current) place(current); };
234
- const onFocusIn = (e) => { const f = deps.field?.(); if (f && e.target === f) f.dataset.touched = "1"; };
235
- // The caret as the person leaves it: kept on every move inside the composer and when it loses the focus.
236
- const keep = (e) => { const f = deps.field?.(); if (f && e.target === f) remembered.set(f, { value: f.value, caret: f.selectionStart ?? f.value.length }); };
237
- const KEEP = ["focusout", "input", "keyup", "mouseup", "select"];
238
- doc.addEventListener("focusin", onFocusIn);
239
- for (const k of KEEP) doc.addEventListener(k, keep, true);
240
- doc.addEventListener("selectionchange", onSelection);
241
- list.addEventListener("pointerdown", onDown);
242
- doc.addEventListener("pointerup", onUp);
243
- doc.addEventListener("pointercancel", onUp);
244
- doc.addEventListener("keydown", onKey);
245
- win?.addEventListener("scroll", onScroll, true);
246
- win?.addEventListener("resize", onScroll);
247
- return () => {
248
- if (timer) clearTimeout(timer);
249
- hide();
250
- doc.removeEventListener("focusin", onFocusIn);
251
- for (const k of KEEP) doc.removeEventListener(k, keep, true);
252
- doc.removeEventListener("selectionchange", onSelection);
253
- list.removeEventListener("pointerdown", onDown);
254
- doc.removeEventListener("pointerup", onUp);
255
- doc.removeEventListener("pointercancel", onUp);
256
- doc.removeEventListener("keydown", onKey);
257
- win?.removeEventListener("scroll", onScroll, true);
258
- win?.removeEventListener("resize", onScroll);
259
- };
260
- }
261
- installQuoteSelection.workspaceVersion = 1;
1
+ // M-3311 (2): this module moved to /assets/chat-quote.js (src/ui/shared/), shared by the fleet and the Hub (a Hub conversation
2
+ // quotes a selected passage too). A tab opened before the move still imports it from here: the same module (one instance), re-exported.
3
+ export * from "/assets/chat-quote.js";
@@ -26,12 +26,12 @@ import { badgeText, fixedOf, tierOf, titleOf, tokens, xpOf } from "./fleet-offic
26
26
  register("ocard", {
27
27
  en: {
28
28
  card: "{0}'s card", level: "Lv {0}", work: "{0} work tokens", estimated: "estimated", toNext: "{0} to Lv {1}", office: "Office", model: "Model", backend: "Backend",
29
- today: "Today", todayN: "{0} work tokens · {1} requests", firstSeen: "First seen", day: "Day {0}", now: "Now", find: "Find in office", chat: "Chat",
29
+ today: "Today", todayN: "{0} work tokens · {1} requests", firstSeen: "First seen", day: "Day {0}", now: "Now", find: "Find in office", chat: "Chat", pat: "Pat", feed: "Feed", tell: "Tell {0} (with their next message)", tellNote: "Off: only you see it. On: a line like “[Office] <your name> patted your head ×3” rides the next message they get anyway — it never wakes them.",
30
30
  close: "Close", xp: "Progress to Lv {0}",
31
31
  },
32
32
  "zh-TW": {
33
33
  card: "{0} 的名片", level: "Lv {0}", work: "{0} 工作 token", estimated: "估算", toNext: "再 {0} 到 Lv {1}", office: "辦公室", model: "模型", backend: "後端",
34
- today: "今天", todayN: "{0} 工作 token · {1} 次請求", firstSeen: "首次出現", day: "第 {0} 天", now: "現在", find: "在辦公室找他", chat: "聊天",
34
+ today: "今天", todayN: "{0} 工作 token · {1} 次請求", firstSeen: "首次出現", day: "第 {0} 天", now: "現在", find: "在辦公室找他", chat: "聊天", pat: "摸頭", feed: "餵點心", tell: "讓 {0} 知道(隨下一則訊息)", tellNote: "關閉:只有你看得到。開啟:下一則本來就會送給它的訊息會附上一行,例如「[Office] <你的名字> patted your head ×3」,不會叫醒它。",
35
35
  close: "關閉", xp: "升到 Lv {0} 的進度",
36
36
  },
37
37
  });
@@ -78,9 +78,9 @@ export function cardModel({ node, lv, levels, share = false, state, now, where }
78
78
  /**
79
79
  * The card. `model`: cardModel's; `avatar(canvas)`: draws the person's idle frame on it; `sheet`: a bottom sheet (a
80
80
  * phone); `place(el)`: the page positions the popover (beside the person, following them); `onChat` (none on a share
81
- * link), `onFind`, `onClose`.
81
+ * link), `onFind`, `onClose`; M-3293: `onReact(kind)` — Pat and Feed (only where play is on; none on a share link).
82
82
  */
83
- export function OfficeCard({ model: m, avatar, sheet, place, onChat, onFind, onClose }) {
83
+ export function OfficeCard({ model: m, avatar, sheet, place, onChat, onFind, onClose, onReact = null, tell = null }) {
84
84
  const box = useRef(null), canvas = useRef(null), swipe = useRef(null);
85
85
  useEffect(() => { if (canvas.current && avatar) avatar(canvas.current); });
86
86
  useEffect(() => { place && place(box.current); });
@@ -108,7 +108,11 @@ export function OfficeCard({ model: m, avatar, sheet, place, onChat, onFind, onC
108
108
  </div>` : null}
109
109
  <dl class="oo-card-rows">${m.rows.map(([k, v]) => html`<div><dt>${k}</dt><dd>${v}</dd></div>`)}</dl>
110
110
  ${m.now ? html`<div class="oo-card-now"><span class="muted">${tc("now")}:</span> ${m.now}</div>` : null}
111
+ ${tell ? html`<label class="check oo-card-tell" title=${tc("tellNote")}><input type="checkbox" checked=${tell.on} onChange=${(e) => tell.set(e.target.checked)} />
112
+ <span>${tc("tell", m.name)}</span></label>` : null}
111
113
  <div class="oo-card-actions">
114
+ ${onReact ? html`<button type="button" class="btn btn-sm btn-ghost oo-card-pat" onClick=${() => onReact("pat")}>${tc("pat")}</button>
115
+ <button type="button" class="btn btn-sm btn-ghost oo-card-feed" onClick=${() => onReact("feed")}>${tc("feed")}</button>` : null}
112
116
  ${onFind ? html`<button type="button" class="btn btn-sm btn-ghost oo-card-find" onClick=${onFind}>${tc("find")}</button>` : null}
113
117
  ${onChat ? html`<button type="button" class="btn btn-sm btn-primary oo-card-chat" onClick=${onChat}>${tc("chat")}</button>` : null}
114
118
  </div>
@@ -51,6 +51,7 @@ export interface LayoutOverrides {
51
51
  export const LOGICAL: { w: number; h: number };
52
52
  export const CHAR_DEPTH: number;
53
53
  export const PACK_STATES: string[];
54
+ export const BUBBLE_KEYS: string[];
54
55
  export function own<T = unknown>(o: unknown, k: unknown): T | undefined;
55
56
  export function inherited(k: unknown): boolean;
56
57
  export function matteOk(v: unknown): v is string;
@@ -103,7 +103,9 @@
103
103
  // "byInstance": { "atlas": "fox" }, optional: an instance name → its character set
104
104
  // "props": { "task": STRIP, "send": STRIP, "report": STRIP, "broadcast": STRIP }, optional traffic items
105
105
  // "bubbles": { "en": { "working": ["On it."] }, "zh-TW": { … } } optional: short lines per state (≤ 12 a state,
106
- // ≤ 40 characters each), in place of the page's own
106
+ // ≤ 40 characters each), in place of the page's own; M-3293:
107
+ // also "pat" and "feed" (what a person says to a pat or a feed in
108
+ // the Office; none: the page's own words)
107
109
  // "bubblesByInstance": { "atlas": { "en": { "idle": ["Coffee?"] } } }
108
110
  // optional (#3681): an instance's own lines, as "bubbles" (names
109
111
  // checked like byInstance's, ≤ 500). A person's line for a state
@@ -177,6 +179,8 @@ export const LOGICAL = { w: 1280, h: 720 };
177
179
  /** The people's depth: furniture below it is drawn under them, the rest over them. */
178
180
  export const CHAR_DEPTH = 1000;
179
181
  export const PACK_STATES = ["needs", "crashed", "stuck", "working", "idle", "paused", "stopped", "missing"];
182
+ /** M-3293 (#4119): what a bubbles table may name — the states, and the Office's two reactions (a pat, a feed). */
183
+ export const BUBBLE_KEYS = [...PACK_STATES, "pat", "feed"];
180
184
  const POSES = ["working", "idle", "paused", "needs", "walk", "walkDown", "walkUp", "walkSide"], PROPS = ["task", "send", "report", "broadcast"];
181
185
  /** A character set's strips: its poses, and what its people send (#2562). */
182
186
  const SET_STRIPS = [...POSES, "prop"];
@@ -298,7 +302,7 @@ function bubblesOf(v, at) {
298
302
  out[lang] = {};
299
303
  for (const [s, lines] of Object.entries(table)) {
300
304
  const here = `${at}.${lang}.${s}`;
301
- if (!PACK_STATES.includes(s)) throw new Refused(here, "a state");
305
+ if (!BUBBLE_KEYS.includes(s)) throw new Refused(here, "a state, pat or feed");
302
306
  out[lang][s] = list(lines, LIMIT.lines, here).map((l, i) => {
303
307
  if (typeof l !== "string" || !l.trim() || [...l].length > LIMIT.line || /[\u0000-\u001f\u007f]/.test(l)) throw new Refused(`${here}[${i}]`, `1–${LIMIT.line} characters`);
304
308
  return l.trim();
@@ -0,0 +1,84 @@
1
+ // M-3293 (#4119, the light version): play in the Office — pick a person up and drop them anywhere (they walk back to their
2
+ // seat along the usual route), and pat or feed them (a few hearts rising over the head and a speech bubble). The
3
+ // viewer's own: never stored on the host, never in a share link, never sent to an agent (no request at all), no
4
+ // tokens. Pure — fleet-office.js wires it to the pointer, the walkers and the scene.
5
+ //
6
+ // Who may play: a single zones office on the dashboard itself (not All offices, not a share link's page, not while Edit
7
+ // layout is open), with the viewer's "Drag and pat" on (per device, on by default) — and never with reduced motion.
8
+
9
+ /**
10
+ * LONG_MS: a touch held this long without moving picks a person up (a finger that moves first pans, as before); SLOP:
11
+ * a mouse picks up once it moves this far (CSS px) — a press that never moves is a click (their card). REACT_MS: a
12
+ * pat's or a feed's hearts and words last this long; HEARTS of them, rising RISE units.
13
+ */
14
+ export const PLAY = { LONG_MS: 450, SLOP: 6, REACT_MS: 1800, HEARTS: 3, RISE: 26 };
15
+ export const PLAY_KINDS = ["pat", "feed"];
16
+
17
+ /** Whether the viewer may play here: their toggle on, motion allowed, a single zones office of their own dashboard. */
18
+ export function playAllowed({ on, still, zones, overview, layout, shared }) {
19
+ return !!on && !still && !!zones && !overview && !layout && !shared;
20
+ }
21
+
22
+ /**
23
+ * The pick-up of one pointer: `down(id, type, x, y, t, name)` on a person (`name`; none: nothing to pick up) — a mouse
24
+ * is "maybe" until it moves SLOP, a touch "press" until LONG_MS (`tick(t)`) or a move past SLOP first ("pan": the view's
25
+ * own drag). Once "held", `move` carries them (`x`, `y` in the view's units; `px` the pointer's travel in CSS px decides
26
+ * the slop). `up(id)` → { name, at } when they were held (dropped there), else null (a click, or a pan).
27
+ */
28
+ export function createHold({ longMs = PLAY.LONG_MS, slop = PLAY.SLOP } = {}) {
29
+ let s = null;
30
+ return {
31
+ down(id, type, x, y, t, name, cx = 0, cy = 0) {
32
+ s = name ? { id, type, cx, cy, t0: t, name, state: type === "touch" ? "press" : "maybe", at: { x, y } } : null;
33
+ return s ? s.state : null;
34
+ },
35
+ move(id, x, y, t, cx = 0, cy = 0) {
36
+ if (!s || s.id !== id) return null;
37
+ const far = Math.hypot(cx - s.cx, cy - s.cy) > slop;
38
+ if (s.state === "maybe" && far) s.state = "held";
39
+ else if (s.state === "press") { if (t - s.t0 >= longMs) s.state = "held"; else if (far) s.state = "pan"; }
40
+ if (s.state === "held") s.at = { x, y };
41
+ return s.state;
42
+ },
43
+ tick(t) { if (s && s.state === "press" && t - s.t0 >= longMs) s.state = "held"; return s ? s.state : null; },
44
+ up(id) {
45
+ if (!s || s.id !== id) return null;
46
+ const r = s.state === "held" ? { name: s.name, at: { ...s.at } } : null;
47
+ s = null;
48
+ return r;
49
+ },
50
+ cancel() { s = null; },
51
+ held() { return s && s.state === "held" ? { name: s.name, at: { ...s.at } } : null; },
52
+ state() { return s ? s.state : null; },
53
+ };
54
+ }
55
+
56
+ const WORDS = {
57
+ en: { pat: "♪ Thanks!", feed: "Yum!" },
58
+ "zh-TW": { pat: "♪ 謝謝!", feed: "好吃!" },
59
+ };
60
+ /** What a person says to a pat or a feed, in the page's language (English otherwise). */
61
+ export const reactWords = (kind, lang) => (WORDS[lang] || WORDS.en)[kind] || "";
62
+
63
+ /**
64
+ * A reaction `r` ({ kind, t0 }) at `t`: its hearts — HEARTS of them over the head (dx, dy from the head, alpha), each
65
+ * a little after the one before, rising and fading — and its words; null once it is over (or not started).
66
+ */
67
+ export function reactionAt(r, t, lang = "en") {
68
+ if (!r || !PLAY_KINDS.includes(r.kind)) return null;
69
+ const f = (t - r.t0) / PLAY.REACT_MS;
70
+ if (f < 0 || f >= 1) return null;
71
+ const hearts = [];
72
+ for (let i = 0; i < PLAY.HEARTS; i++) {
73
+ const g = Math.min(1, Math.max(0, (f - i * 0.12) / (1 - (PLAY.HEARTS - 1) * 0.12)));
74
+ if (g <= 0) continue;
75
+ hearts.push({ dx: (i - (PLAY.HEARTS - 1) / 2) * 9, dy: -10 - g * PLAY.RISE, alpha: 1 - g });
76
+ }
77
+ return { f, hearts, say: reactWords(r.kind, lang) };
78
+ }
79
+
80
+ /** Reactions still showing at `t` (a Map name → { kind, t0 }), the rest dropped; whether any is left. */
81
+ export function pruneReactions(map, t) {
82
+ for (const [n, r] of [...map]) if (t - r.t0 >= PLAY.REACT_MS || t < r.t0) map.delete(n);
83
+ return map.size > 0;
84
+ }
@@ -22,6 +22,11 @@ import { levelsOk } from "./fleet-office-levels.js";
22
22
  import { checkLevels } from "./fleet-office-pack.js";
23
23
 
24
24
  const CHOICE_KEY = "agend_org_office", FILTER_KEY = "agend_org_office_filter", SKIN_KEY = "agend_org_office_skin", ASLEEP_KEY = "agend_org_office_hide_asleep", NIGHT_KEY = "agend_org_office_night";
25
+ /** M-3293: "Drag and pat" here (default: on; reduced motion turns it off whatever this says). */
26
+ const PLAY_KEY = "agend_org_office_play";
27
+ /** M-3293: the agents told about their pats and feeds, from this device (a list of names; default: none). */
28
+ const TELL_KEY = "agend_org_office_tell";
29
+ const TELL_MAX = 200;
25
30
  /** #2554: "0" when All offices leaves the lobby tile out (default: shown). */
26
31
  const LOBBY_KEY = "agend_org_office_lobby";
27
32
  /** #2946: whether the key to the items in the air is open here (default: folded). */
@@ -214,6 +219,24 @@ export function createOfficeStore({ fetch: get = globalThis.fetch, storage } = {
214
219
  /** #2568: whether the idle go to bed at night (00:00–06:00 on this device's clock) here (default: off). */
215
220
  nightOn: () => read(NIGHT_KEY) === "1",
216
221
  saveNightOn: (v) => write(NIGHT_KEY, v ? "1" : "0"),
222
+ /** M-3293: whether a person can be picked up, patted and fed here (default: on). */
223
+ playOn: () => read(PLAY_KEY) !== "0",
224
+ savePlayOn: (v) => write(PLAY_KEY, v ? "1" : "0"),
225
+ /** M-3293: whether `name` is told (with its next real message) about this device's pats and feeds (default: no). */
226
+ tellOn: (name) => { try { const l = JSON.parse(read(TELL_KEY) || "[]"); return Array.isArray(l) && l.includes(name); } catch { return false; } },
227
+ saveTell: (name, v) => {
228
+ let l = [];
229
+ try { const x = JSON.parse(read(TELL_KEY) || "[]"); if (Array.isArray(x)) l = x.filter((n) => typeof n === "string" && n !== name); } catch { /* none */ }
230
+ write(TELL_KEY, JSON.stringify((v ? [...l, name] : l).slice(-TELL_MAX)));
231
+ },
232
+ /** M-3293: tell `instance` about a pat or a feed (only when tellOn says so: the caller asks). { ok, queued } or { ok: false }. */
233
+ async tell(instance, kind) {
234
+ try {
235
+ const r = await get("/ui/office-tell", { method: "POST", headers, body: JSON.stringify({ instance, kind }) });
236
+ const d = await r.json().catch(() => ({}));
237
+ return r.ok ? { ok: true, queued: d.queued === true } : { ok: false, status: r.status };
238
+ } catch { return { ok: false, status: 0 }; }
239
+ },
217
240
  /** #2554: whether All offices shows the lobby tile (the instances in no stored office) here (default: shown). */
218
241
  lobbyTile: () => read(LOBBY_KEY) !== "0",
219
242
  /** #2946: whether the key to the items carried between desks is open here (default: folded). */
@@ -491,6 +491,9 @@ export function createWalkers() {
491
491
  }
492
492
  },
493
493
  at(name, now) { const w = by.get(name); return w ? posAt(w, now) : null; },
494
+ /** M-3293: `name` set down at `at` (picked up and carried, or just dropped): standing there, no walk; the next sync
495
+ * walks them from there to their target along the graph, as any walk. */
496
+ place(name, at) { by.set(name, { pts: null, to: { x: at.x, y: at.y } }); },
494
497
  moving(now) { for (const w of by.values()) if (posAt(w, now).walking) return true; return false; },
495
498
  };
496
499
  }
@@ -568,11 +571,12 @@ const QUIET_IN_CROWD = new Set(["idle", "paused", "stopped", "starting", "queued
568
571
  /**
569
572
  * The bubbles a frame may show (#2513): in an area over capacity (`over`), none for idle or asleep people and at most
570
573
  * CROWD_BUBBLES, the highest ranked first (bubbleRank); elsewhere all of them. `items`: { area, state, shown, key, … }.
574
+ * M-3293: one with `keep` (the words to a pat or a feed: an answer to what the viewer just did) is always kept.
571
575
  */
572
576
  export function thinBubbles(items, over) {
573
577
  const byArea = new Map(), out = [];
574
578
  for (const it of items) {
575
- if (!over || !over.has(it.area)) { out.push(it); continue; }
579
+ if (!over || !over.has(it.area) || it.keep) { out.push(it); continue; }
576
580
  if (QUIET_IN_CROWD.has(it.state)) continue;
577
581
  if (!byArea.has(it.area)) byArea.set(it.area, []);
578
582
  byArea.get(it.area).push(it);