hivedesk 0.2.0 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1441) hide show
  1. package/CHANGELOG.md +111 -62
  2. package/FIRST-RUN.md +14 -20
  3. package/PROTOCOL.md +26 -6
  4. package/README.md +303 -233
  5. package/assets/banner-1.0-pt.png +0 -0
  6. package/assets/banner-1.0-pt.svg +6 -0
  7. package/assets/banner-1.0.png +0 -0
  8. package/assets/banner-1.0.svg +6 -0
  9. package/assets/banner.png +0 -0
  10. package/assets/banner.svg +1 -513
  11. package/assets/crew/designer.svg +1 -42
  12. package/assets/crew/dev.svg +1 -43
  13. package/assets/crew/mel.svg +1 -44
  14. package/assets/crew/qa.svg +1 -43
  15. package/assets/crew/writer.svg +1 -40
  16. package/assets/icons/1.0/achievements.svg +1 -0
  17. package/assets/icons/1.0/api.svg +1 -0
  18. package/assets/icons/1.0/auto-update.svg +1 -0
  19. package/assets/icons/1.0/city.svg +1 -0
  20. package/assets/icons/1.0/cli.svg +1 -0
  21. package/assets/icons/1.0/clipboard.svg +1 -0
  22. package/assets/icons/1.0/contact-sheet.svg +1 -0
  23. package/assets/icons/1.0/cpu-share.svg +1 -0
  24. package/assets/icons/1.0/crew.svg +1 -0
  25. package/assets/icons/1.0/data.svg +1 -0
  26. package/assets/icons/1.0/desktop.svg +1 -0
  27. package/assets/icons/1.0/editor.svg +1 -0
  28. package/assets/icons/1.0/extension.svg +1 -0
  29. package/assets/icons/1.0/file-send.svg +1 -0
  30. package/assets/icons/1.0/game.svg +1 -0
  31. package/assets/icons/1.0/git.svg +1 -0
  32. package/assets/icons/1.0/github.svg +1 -0
  33. package/assets/icons/1.0/gpu-share.svg +1 -0
  34. package/assets/icons/1.0/installer.svg +1 -0
  35. package/assets/icons/1.0/languages.svg +1 -0
  36. package/assets/icons/1.0/linkedin.svg +1 -0
  37. package/assets/icons/1.0/machines.svg +1 -0
  38. package/assets/icons/1.0/mobile.svg +1 -0
  39. package/assets/icons/1.0/models.svg +1 -0
  40. package/assets/icons/1.0/p2p-invite.svg +1 -0
  41. package/assets/icons/1.0/phone-remote.svg +1 -0
  42. package/assets/icons/1.0/playbooks.svg +1 -0
  43. package/assets/icons/1.0/pooled-models.svg +1 -0
  44. package/assets/icons/1.0/privacy.svg +1 -0
  45. package/assets/icons/1.0/profile.svg +1 -0
  46. package/assets/icons/1.0/question-card.svg +1 -0
  47. package/assets/icons/1.0/remote-desktop.svg +1 -0
  48. package/assets/icons/1.0/rotation.svg +1 -0
  49. package/assets/icons/1.0/security-audit.svg +1 -0
  50. package/assets/icons/1.0/sprite.svg +85 -0
  51. package/assets/icons/1.0/terminal.svg +1 -0
  52. package/assets/icons/1.0/tiles/achievements.svg +1 -0
  53. package/assets/icons/1.0/tiles/api.svg +1 -0
  54. package/assets/icons/1.0/tiles/auto-update.svg +1 -0
  55. package/assets/icons/1.0/tiles/city.svg +1 -0
  56. package/assets/icons/1.0/tiles/cli.svg +1 -0
  57. package/assets/icons/1.0/tiles/clipboard.svg +1 -0
  58. package/assets/icons/1.0/tiles/cpu-share.svg +1 -0
  59. package/assets/icons/1.0/tiles/crew.svg +1 -0
  60. package/assets/icons/1.0/tiles/data.svg +1 -0
  61. package/assets/icons/1.0/tiles/desktop.svg +1 -0
  62. package/assets/icons/1.0/tiles/editor.svg +1 -0
  63. package/assets/icons/1.0/tiles/extension.svg +1 -0
  64. package/assets/icons/1.0/tiles/file-send.svg +1 -0
  65. package/assets/icons/1.0/tiles/game.svg +1 -0
  66. package/assets/icons/1.0/tiles/git.svg +1 -0
  67. package/assets/icons/1.0/tiles/github.svg +1 -0
  68. package/assets/icons/1.0/tiles/gpu-share.svg +1 -0
  69. package/assets/icons/1.0/tiles/installer.svg +1 -0
  70. package/assets/icons/1.0/tiles/languages.svg +1 -0
  71. package/assets/icons/1.0/tiles/machines.svg +1 -0
  72. package/assets/icons/1.0/tiles/mobile.svg +1 -0
  73. package/assets/icons/1.0/tiles/models.svg +1 -0
  74. package/assets/icons/1.0/tiles/p2p-invite.svg +1 -0
  75. package/assets/icons/1.0/tiles/phone-remote.svg +1 -0
  76. package/assets/icons/1.0/tiles/playbooks.svg +1 -0
  77. package/assets/icons/1.0/tiles/pooled-models.svg +1 -0
  78. package/assets/icons/1.0/tiles/privacy.svg +1 -0
  79. package/assets/icons/1.0/tiles/profile.svg +1 -0
  80. package/assets/icons/1.0/tiles/question-card.svg +1 -0
  81. package/assets/icons/1.0/tiles/remote-desktop.svg +1 -0
  82. package/assets/icons/1.0/tiles/rotation.svg +1 -0
  83. package/assets/icons/1.0/tiles/security-audit.svg +1 -0
  84. package/assets/icons/1.0/tiles/terminal.svg +1 -0
  85. package/assets/icons/1.0/tiles/voice.svg +1 -0
  86. package/assets/icons/1.0/tiles/web.svg +1 -0
  87. package/assets/icons/1.0/voice.svg +1 -0
  88. package/assets/icons/1.0/web.svg +1 -0
  89. package/assets/icons/approval.svg +1 -1
  90. package/assets/icons/arrow.svg +1 -1
  91. package/assets/icons/chat.svg +1 -1
  92. package/assets/icons/check.svg +1 -1
  93. package/assets/icons/clock.svg +1 -1
  94. package/assets/icons/code.svg +1 -1
  95. package/assets/icons/compass.svg +1 -1
  96. package/assets/icons/contact-sheet.svg +1 -1
  97. package/assets/icons/copy.svg +1 -1
  98. package/assets/icons/cpu.svg +1 -1
  99. package/assets/icons/design.svg +1 -1
  100. package/assets/icons/download.svg +1 -1
  101. package/assets/icons/folder.svg +1 -1
  102. package/assets/icons/github-honey.svg +1 -1
  103. package/assets/icons/github.svg +1 -1
  104. package/assets/icons/globe.svg +1 -1
  105. package/assets/icons/gpu.svg +1 -1
  106. package/assets/icons/hire.svg +1 -1
  107. package/assets/icons/hive.svg +1 -1
  108. package/assets/icons/honey/approval.svg +1 -0
  109. package/assets/icons/honey/chat.svg +1 -0
  110. package/assets/icons/honey/code.svg +1 -0
  111. package/assets/icons/honey/design.svg +1 -0
  112. package/assets/icons/honey/github.svg +1 -0
  113. package/assets/icons/honey/globe.svg +1 -0
  114. package/assets/icons/honey/gpu.svg +1 -0
  115. package/assets/icons/honey/hire.svg +1 -0
  116. package/assets/icons/honey/hive.svg +1 -0
  117. package/assets/icons/honey/key.svg +1 -0
  118. package/assets/icons/honey/lend.svg +1 -0
  119. package/assets/icons/honey/lock.svg +1 -0
  120. package/assets/icons/honey/model.svg +1 -0
  121. package/assets/icons/honey/office.svg +1 -0
  122. package/assets/icons/honey/plan.svg +1 -0
  123. package/assets/icons/honey/playbook.svg +1 -0
  124. package/assets/icons/honey/qa.svg +1 -0
  125. package/assets/icons/honey/replay.svg +1 -0
  126. package/assets/icons/honey/sparkle.svg +1 -0
  127. package/assets/icons/honey/wand.svg +1 -0
  128. package/assets/icons/key.svg +1 -1
  129. package/assets/icons/lend.svg +1 -1
  130. package/assets/icons/linkedin-honey.svg +1 -1
  131. package/assets/icons/linkedin.svg +1 -1
  132. package/assets/icons/linux.svg +1 -1
  133. package/assets/icons/lock.svg +1 -1
  134. package/assets/icons/macos.svg +1 -1
  135. package/assets/icons/model.svg +1 -1
  136. package/assets/icons/npm.svg +1 -1
  137. package/assets/icons/office.svg +1 -1
  138. package/assets/icons/offline.svg +1 -1
  139. package/assets/icons/plan.svg +1 -1
  140. package/assets/icons/playbook.svg +1 -1
  141. package/assets/icons/preview.svg +1 -1
  142. package/assets/icons/qa.svg +1 -1
  143. package/assets/icons/queue.svg +1 -1
  144. package/assets/icons/replay.svg +1 -1
  145. package/assets/icons/search.svg +1 -0
  146. package/assets/icons/sparkle.svg +1 -1
  147. package/assets/icons/sprite.svg +12 -11
  148. package/assets/icons/star.svg +1 -1
  149. package/assets/icons/stop.svg +1 -1
  150. package/assets/icons/tag.svg +1 -1
  151. package/assets/icons/terminal.svg +1 -1
  152. package/assets/icons/wand.svg +1 -1
  153. package/assets/icons/windows.svg +1 -1
  154. package/assets/icons/words.svg +1 -1
  155. package/assets/icons/writer.svg +1 -1
  156. package/assets/icons/x.svg +1 -1
  157. package/assets/illustrations/1.0/hero-plain.svg +6 -0
  158. package/assets/illustrations/1.0/hero-pt.svg +6 -0
  159. package/assets/illustrations/1.0/hero.svg +6 -0
  160. package/assets/illustrations/1.0/how-it-works-pt.svg +6 -0
  161. package/assets/illustrations/1.0/how-it-works.svg +6 -0
  162. package/assets/illustrations/1.0/installers-pt.svg +6 -0
  163. package/assets/illustrations/1.0/installers.svg +6 -0
  164. package/assets/illustrations/1.0/p2p-gpu-pt.svg +6 -0
  165. package/assets/illustrations/1.0/p2p-gpu.svg +6 -0
  166. package/assets/illustrations/1.0/phone-remote.svg +6 -0
  167. package/assets/illustrations/1.0/remote-desktop-pt.svg +6 -0
  168. package/assets/illustrations/1.0/remote-desktop.svg +6 -0
  169. package/assets/illustrations/1.0/security.svg +6 -0
  170. package/assets/illustrations/1.0/voice-orb.svg +6 -0
  171. package/assets/illustrations/bee.svg +1 -27
  172. package/assets/illustrations/city-p2p-pt.svg +113 -0
  173. package/assets/illustrations/city-p2p.svg +113 -0
  174. package/assets/illustrations/crew.svg +1 -248
  175. package/assets/illustrations/first-run.svg +1 -48
  176. package/assets/illustrations/hardware.svg +1 -39
  177. package/assets/illustrations/hive-city.svg +1 -113
  178. package/assets/illustrations/lend.svg +1 -67
  179. package/assets/illustrations/privacy.svg +1 -39
  180. package/assets/illustrations/steps-pt.svg +1 -0
  181. package/assets/illustrations/steps.svg +1 -0
  182. package/assets/logo.svg +1 -13
  183. package/assets/mascot-dark.svg +1 -197
  184. package/assets/mascot.png +0 -0
  185. package/assets/mascot.svg +1 -194
  186. package/assets/mel-wave.svg +1 -205
  187. package/assets/og.svg +5 -254
  188. package/assets/screenshots/1.0/chat.webp +0 -0
  189. package/assets/screenshots/1.0/city-mobile.webp +0 -0
  190. package/assets/screenshots/1.0/city-room.webp +0 -0
  191. package/assets/screenshots/1.0/city.webp +0 -0
  192. package/assets/screenshots/1.0/editor.webp +0 -0
  193. package/assets/screenshots/1.0/machines.webp +0 -0
  194. package/assets/screenshots/1.0/office-mobile.webp +0 -0
  195. package/assets/screenshots/1.0/office.webp +0 -0
  196. package/assets/screenshots/1.0/profile.webp +0 -0
  197. package/assets/screenshots/1.0/remote.webp +0 -0
  198. package/assets/social-preview.png +0 -0
  199. package/assets/social-preview.svg +5 -254
  200. package/desktop/README.md +85 -10
  201. package/desktop/RELEASE.md +93 -0
  202. package/desktop/app/resources/icons/trayIconRemote.png +0 -0
  203. package/desktop/app/resources/icons/trayIconRemote@2x.png +0 -0
  204. package/desktop/controller.js +120 -5
  205. package/desktop/helpers/win-input.ps1 +426 -0
  206. package/desktop/i18n.json +480 -10
  207. package/desktop/icons/tray-remote.svg +5 -0
  208. package/desktop/installer/linux/hivedesk-linux-install.sh +124 -0
  209. package/desktop/installer/macos/Read me first.txt +36 -0
  210. package/desktop/installer/macos/background.html +43 -0
  211. package/desktop/installer/macos/background.png +0 -0
  212. package/desktop/installer/macos/background@2x.png +0 -0
  213. package/desktop/installer/macos/make-dmg.sh +59 -0
  214. package/desktop/installer/windows/Art.xaml +158 -0
  215. package/desktop/installer/windows/Core.cs +1019 -0
  216. package/desktop/installer/windows/Setup.cs +504 -0
  217. package/desktop/installer/windows/Theme.xaml +268 -0
  218. package/desktop/installer/windows/Ui.cs +1069 -0
  219. package/desktop/installer/windows/app.manifest +23 -0
  220. package/desktop/installer/windows/strings.json +1012 -0
  221. package/desktop/launcher/linux/hivedesk +5 -0
  222. package/desktop/launcher/windows/Launcher.cs +10 -0
  223. package/desktop/native.js +49 -0
  224. package/desktop/profile/avatars.json +147 -0
  225. package/desktop/profile/index.js +53 -0
  226. package/desktop/release-notes/1.0.0.json +12 -0
  227. package/desktop/scripts/build-setup.mjs +86 -0
  228. package/desktop/scripts/dmg-art.mjs +27 -0
  229. package/desktop/scripts/manifest.mjs +57 -0
  230. package/desktop/scripts/package.mjs +8 -2
  231. package/desktop/scripts/shell-screens.mjs +60 -0
  232. package/desktop/scripts/sign-release.mjs +79 -0
  233. package/desktop/scripts/update-keygen.mjs +48 -0
  234. package/desktop/shell.html +295 -1
  235. package/desktop/state.js +4 -2
  236. package/desktop/update/apply.js +268 -0
  237. package/desktop/update/download.js +114 -0
  238. package/desktop/update/guard.js +89 -0
  239. package/desktop/update/layout.js +52 -0
  240. package/desktop/update/manifest.js +120 -0
  241. package/desktop/update/pubkey.js +3 -0
  242. package/desktop/update/service.js +310 -0
  243. package/desktop/update/tar.js +65 -0
  244. package/desktop/update/version.js +43 -0
  245. package/desktop/zip.js +75 -1
  246. package/i18n/README.pt-BR.md +304 -208
  247. package/i18n/de.json +1553 -1
  248. package/i18n/en.json +1553 -1
  249. package/i18n/es.json +1553 -1
  250. package/i18n/fr.json +1553 -1
  251. package/i18n/it.json +1553 -1
  252. package/i18n/ja.json +1553 -1
  253. package/i18n/ko.json +1553 -1
  254. package/i18n/parts/city.de.json +312 -0
  255. package/i18n/parts/city.en.json +312 -0
  256. package/i18n/parts/city.es.json +312 -0
  257. package/i18n/parts/city.fr.json +312 -0
  258. package/i18n/parts/city.it.json +312 -0
  259. package/i18n/parts/city.ja.json +312 -0
  260. package/i18n/parts/city.ko.json +312 -0
  261. package/i18n/parts/city.pt-BR.json +312 -0
  262. package/i18n/parts/city.ru.json +312 -0
  263. package/i18n/parts/city.zh-CN.json +312 -0
  264. package/i18n/parts/design.de.json +132 -0
  265. package/i18n/parts/design.en.json +132 -0
  266. package/i18n/parts/design.es.json +132 -0
  267. package/i18n/parts/design.fr.json +132 -0
  268. package/i18n/parts/design.it.json +132 -0
  269. package/i18n/parts/design.ja.json +132 -0
  270. package/i18n/parts/design.ko.json +132 -0
  271. package/i18n/parts/design.pt-BR.json +132 -0
  272. package/i18n/parts/design.ru.json +132 -0
  273. package/i18n/parts/design.zh-CN.json +132 -0
  274. package/i18n/parts/domains.de.json +263 -0
  275. package/i18n/parts/domains.en.json +263 -0
  276. package/i18n/parts/domains.es.json +263 -0
  277. package/i18n/parts/domains.fr.json +263 -0
  278. package/i18n/parts/domains.it.json +263 -0
  279. package/i18n/parts/domains.ja.json +263 -0
  280. package/i18n/parts/domains.ko.json +263 -0
  281. package/i18n/parts/domains.pt-BR.json +263 -0
  282. package/i18n/parts/domains.ru.json +263 -0
  283. package/i18n/parts/domains.zh-CN.json +263 -0
  284. package/i18n/parts/s1-core.de.json +33 -0
  285. package/i18n/parts/s1-core.en.json +33 -0
  286. package/i18n/parts/s1-core.es.json +33 -0
  287. package/i18n/parts/s1-core.fr.json +33 -0
  288. package/i18n/parts/s1-core.it.json +33 -0
  289. package/i18n/parts/s1-core.ja.json +33 -0
  290. package/i18n/parts/s1-core.ko.json +33 -0
  291. package/i18n/parts/s1-core.pt-BR.json +33 -0
  292. package/i18n/parts/s1-core.ru.json +33 -0
  293. package/i18n/parts/s1-core.zh-CN.json +33 -0
  294. package/i18n/parts/s2-p2p.de.json +58 -0
  295. package/i18n/parts/s2-p2p.en.json +58 -0
  296. package/i18n/parts/s2-p2p.es.json +58 -0
  297. package/i18n/parts/s2-p2p.fr.json +58 -0
  298. package/i18n/parts/s2-p2p.it.json +58 -0
  299. package/i18n/parts/s2-p2p.ja.json +58 -0
  300. package/i18n/parts/s2-p2p.ko.json +58 -0
  301. package/i18n/parts/s2-p2p.pt-BR.json +58 -0
  302. package/i18n/parts/s2-p2p.ru.json +58 -0
  303. package/i18n/parts/s2-p2p.zh-CN.json +58 -0
  304. package/i18n/parts/s3-compute.de.json +63 -0
  305. package/i18n/parts/s3-compute.en.json +63 -0
  306. package/i18n/parts/s3-compute.es.json +63 -0
  307. package/i18n/parts/s3-compute.fr.json +63 -0
  308. package/i18n/parts/s3-compute.it.json +63 -0
  309. package/i18n/parts/s3-compute.ja.json +63 -0
  310. package/i18n/parts/s3-compute.ko.json +63 -0
  311. package/i18n/parts/s3-compute.pt-BR.json +63 -0
  312. package/i18n/parts/s3-compute.ru.json +63 -0
  313. package/i18n/parts/s3-compute.zh-CN.json +63 -0
  314. package/i18n/parts/s6-remote.de.json +169 -0
  315. package/i18n/parts/s6-remote.en.json +169 -0
  316. package/i18n/parts/s6-remote.es.json +169 -0
  317. package/i18n/parts/s6-remote.fr.json +169 -0
  318. package/i18n/parts/s6-remote.it.json +169 -0
  319. package/i18n/parts/s6-remote.ja.json +169 -0
  320. package/i18n/parts/s6-remote.ko.json +169 -0
  321. package/i18n/parts/s6-remote.pt-BR.json +169 -0
  322. package/i18n/parts/s6-remote.ru.json +169 -0
  323. package/i18n/parts/s6-remote.zh-CN.json +169 -0
  324. package/i18n/parts/s7-phone.de.json +41 -0
  325. package/i18n/parts/s7-phone.en.json +41 -0
  326. package/i18n/parts/s7-phone.es.json +41 -0
  327. package/i18n/parts/s7-phone.fr.json +41 -0
  328. package/i18n/parts/s7-phone.it.json +41 -0
  329. package/i18n/parts/s7-phone.ja.json +41 -0
  330. package/i18n/parts/s7-phone.ko.json +41 -0
  331. package/i18n/parts/s7-phone.pt-BR.json +41 -0
  332. package/i18n/parts/s7-phone.ru.json +41 -0
  333. package/i18n/parts/s7-phone.zh-CN.json +41 -0
  334. package/i18n/parts/voice.de.json +135 -0
  335. package/i18n/parts/voice.en.json +135 -0
  336. package/i18n/parts/voice.es.json +135 -0
  337. package/i18n/parts/voice.fr.json +135 -0
  338. package/i18n/parts/voice.it.json +135 -0
  339. package/i18n/parts/voice.ja.json +135 -0
  340. package/i18n/parts/voice.ko.json +135 -0
  341. package/i18n/parts/voice.pt-BR.json +135 -0
  342. package/i18n/parts/voice.ru.json +135 -0
  343. package/i18n/parts/voice.zh-CN.json +135 -0
  344. package/i18n/parts/workbench.de.json +331 -0
  345. package/i18n/parts/workbench.en.json +331 -0
  346. package/i18n/parts/workbench.es.json +331 -0
  347. package/i18n/parts/workbench.fr.json +331 -0
  348. package/i18n/parts/workbench.it.json +331 -0
  349. package/i18n/parts/workbench.ja.json +331 -0
  350. package/i18n/parts/workbench.ko.json +331 -0
  351. package/i18n/parts/workbench.pt-BR.json +331 -0
  352. package/i18n/parts/workbench.ru.json +331 -0
  353. package/i18n/parts/workbench.zh-CN.json +331 -0
  354. package/i18n/pt-BR.json +1553 -1
  355. package/i18n/ru.json +1553 -1
  356. package/i18n/zh-CN.json +1553 -1
  357. package/package.json +10 -2
  358. package/src/brain/catalog/catalog.json +15790 -0
  359. package/src/brain/catalog/commands.js +105 -0
  360. package/src/brain/catalog/consent.js +90 -0
  361. package/src/brain/catalog/estimate.js +90 -0
  362. package/src/brain/catalog/families.js +196 -0
  363. package/src/brain/catalog/index.js +127 -0
  364. package/src/brain/catalog/measured.js +27 -0
  365. package/src/brain/catalog/pool.js +137 -0
  366. package/src/brain/catalog/recommend.js +226 -0
  367. package/src/brain/catalog/refresh.mjs +166 -0
  368. package/src/brain/catalog/router.js +193 -0
  369. package/src/brain/hardware.js +144 -13
  370. package/src/brain/keys.js +3 -1
  371. package/src/brain/local.js +24 -2
  372. package/src/brain/manager.js +359 -61
  373. package/src/brain/models.js +71 -25
  374. package/src/brain/pool/index.js +208 -0
  375. package/src/brain/pool/lender.js +247 -0
  376. package/src/brain/pool/llama-release.json +86 -0
  377. package/src/brain/pool/p2p.js +264 -0
  378. package/src/brain/pool/refresh-release.mjs +53 -0
  379. package/src/brain/pool/release.js +94 -0
  380. package/src/brain/pool/session.js +76 -0
  381. package/src/brain/pool/tunnel.js +161 -0
  382. package/src/brain/rotation.js +289 -0
  383. package/src/brain/runtime.js +3 -1
  384. package/src/bus.js +10 -121
  385. package/src/changelog/index.js +9 -1
  386. package/src/city/demo.js +5 -3
  387. package/src/city/index.js +286 -46
  388. package/src/city/membership.js +347 -0
  389. package/src/city/state.js +156 -8
  390. package/src/cli.js +173 -34
  391. package/src/collab/index.js +10 -6
  392. package/src/collab/policy.js +48 -0
  393. package/src/compute/estimate.js +135 -0
  394. package/src/compute/index.js +295 -0
  395. package/src/compute/jobs-log.js +37 -0
  396. package/src/compute/probe.js +335 -0
  397. package/src/compute/requester.js +518 -0
  398. package/src/compute/scheduler.js +264 -0
  399. package/src/compute/share-cli.js +122 -0
  400. package/src/compute/share.js +178 -0
  401. package/src/compute/task-bridge.js +64 -0
  402. package/src/compute/types.js +114 -0
  403. package/src/compute/win-gpu.js +248 -0
  404. package/src/compute/wire.js +234 -0
  405. package/src/compute/worker.js +367 -0
  406. package/src/core/bus.js +254 -0
  407. package/src/core/city-report.js +52 -0
  408. package/src/core/deadline.js +78 -0
  409. package/src/core/demo.js +49 -0
  410. package/src/core/doctor-checks.js +61 -0
  411. package/src/core/events.js +116 -0
  412. package/src/core/log.js +147 -0
  413. package/src/core/migrate.js +145 -0
  414. package/src/core/origin.js +62 -0
  415. package/src/core/router.js +196 -0
  416. package/src/core/schema.js +73 -0
  417. package/src/core/shell.js +160 -0
  418. package/src/core/snapshots.js +58 -0
  419. package/src/core/store.js +130 -0
  420. package/src/crew/brief.js +2 -0
  421. package/src/crew/domains/attach.js +32 -0
  422. package/src/crew/domains/classify.js +176 -0
  423. package/src/crew/domains/flow.js +269 -0
  424. package/src/crew/domains/index.js +116 -0
  425. package/src/crew/domains/questions.js +551 -0
  426. package/src/crew/domains/security/advisories.json +35 -0
  427. package/src/crew/domains/security/fixes.js +98 -0
  428. package/src/crew/domains/security/scan.js +274 -0
  429. package/src/crew/domains/skeletons.js +77 -0
  430. package/src/crew/domains/templates/backend/README.md +27 -0
  431. package/src/crew/domains/templates/backend/package.json +12 -0
  432. package/src/crew/domains/templates/backend/src/app.js +70 -0
  433. package/src/crew/domains/templates/backend/src/server.js +61 -0
  434. package/src/crew/domains/templates/backend/test/api.test.js +47 -0
  435. package/src/crew/domains/templates/cli/README.md +18 -0
  436. package/src/crew/domains/templates/cli/bin/cli.js +48 -0
  437. package/src/crew/domains/templates/cli/package.json +12 -0
  438. package/src/crew/domains/templates/cli/src/lib.js +20 -0
  439. package/src/crew/domains/templates/cli/test/cli.test.js +43 -0
  440. package/src/crew/domains/templates/data/README.md +17 -0
  441. package/src/crew/domains/templates/data/bin/run.js +34 -0
  442. package/src/crew/domains/templates/data/data/sample.csv +7 -0
  443. package/src/crew/domains/templates/data/package.json +11 -0
  444. package/src/crew/domains/templates/data/src/csv.js +48 -0
  445. package/src/crew/domains/templates/data/src/report.js +39 -0
  446. package/src/crew/domains/templates/data/test/report.test.js +40 -0
  447. package/src/crew/domains/templates/desktop/README.md +17 -0
  448. package/src/crew/domains/templates/desktop/neutralino.config.json +34 -0
  449. package/src/crew/domains/templates/desktop/package.json +13 -0
  450. package/src/crew/domains/templates/desktop/resources/index.html +24 -0
  451. package/src/crew/domains/templates/desktop/resources/js/main.js +57 -0
  452. package/src/crew/domains/templates/desktop/resources/js/notes.js +25 -0
  453. package/src/crew/domains/templates/desktop/resources/styles.css +12 -0
  454. package/src/crew/domains/templates/desktop/test/notes.test.js +20 -0
  455. package/src/crew/domains/templates/extension/README.md +16 -0
  456. package/src/crew/domains/templates/extension/background.js +18 -0
  457. package/src/crew/domains/templates/extension/manifest.json +13 -0
  458. package/src/crew/domains/templates/extension/package.json +10 -0
  459. package/src/crew/domains/templates/extension/popup.css +11 -0
  460. package/src/crew/domains/templates/extension/popup.html +19 -0
  461. package/src/crew/domains/templates/extension/popup.js +34 -0
  462. package/src/crew/domains/templates/extension/src/notes.js +20 -0
  463. package/src/crew/domains/templates/extension/test/notes.test.js +25 -0
  464. package/src/crew/domains/templates/game/README.md +13 -0
  465. package/src/crew/domains/templates/game/index.html +18 -0
  466. package/src/crew/domains/templates/game/package.json +10 -0
  467. package/src/crew/domains/templates/game/src/game.js +58 -0
  468. package/src/crew/domains/templates/game/src/main.js +76 -0
  469. package/src/crew/domains/templates/game/style.css +9 -0
  470. package/src/crew/domains/templates/game/test/game.test.js +45 -0
  471. package/src/crew/domains/templates/mobile/README.md +25 -0
  472. package/src/crew/domains/templates/mobile/capacitor.config.json +8 -0
  473. package/src/crew/domains/templates/mobile/package.json +14 -0
  474. package/src/crew/domains/templates/mobile/test/store.test.js +27 -0
  475. package/src/crew/domains/templates/mobile/www/app.js +42 -0
  476. package/src/crew/domains/templates/mobile/www/icon.svg +1 -0
  477. package/src/crew/domains/templates/mobile/www/index.html +30 -0
  478. package/src/crew/domains/templates/mobile/www/manifest.webmanifest +12 -0
  479. package/src/crew/domains/templates/mobile/www/store.js +35 -0
  480. package/src/crew/domains/templates/mobile/www/style.css +42 -0
  481. package/src/crew/domains/templates/mobile/www/sw.js +16 -0
  482. package/src/crew/domains/text.js +34 -0
  483. package/src/crew/engine.js +283 -38
  484. package/src/crew/library/checks.js +574 -0
  485. package/src/crew/library/entries/app-types/appointment-booking.json +53 -0
  486. package/src/crew/library/entries/app-types/brick-breaker-game.json +50 -0
  487. package/src/crew/library/entries/app-types/budget-tracker-app.json +55 -0
  488. package/src/crew/library/entries/app-types/calculator-app.json +48 -0
  489. package/src/crew/library/entries/app-types/chat-ui-local.json +53 -0
  490. package/src/crew/library/entries/app-types/color-sequence-game.json +50 -0
  491. package/src/crew/library/entries/app-types/contact-book.json +52 -0
  492. package/src/crew/library/entries/app-types/countdown-to-date.json +53 -0
  493. package/src/crew/library/entries/app-types/crud-records-manager.json +56 -0
  494. package/src/crew/library/entries/app-types/currency-converter.json +50 -0
  495. package/src/crew/library/entries/app-types/dashboard-from-json.json +53 -0
  496. package/src/crew/library/entries/app-types/dice-roller.json +51 -0
  497. package/src/crew/library/entries/app-types/drawing-canvas.json +52 -0
  498. package/src/crew/library/entries/app-types/expense-splitter.json +54 -0
  499. package/src/crew/library/entries/app-types/flashcards-spaced-repetition.json +55 -0
  500. package/src/crew/library/entries/app-types/four-in-a-row-game.json +50 -0
  501. package/src/crew/library/entries/app-types/guess-the-number.json +50 -0
  502. package/src/crew/library/entries/app-types/habit-tracker.json +52 -0
  503. package/src/crew/library/entries/app-types/hangman-game.json +50 -0
  504. package/src/crew/library/entries/app-types/image-filters-canvas.json +49 -0
  505. package/src/crew/library/entries/app-types/inventory-tracker.json +53 -0
  506. package/src/crew/library/entries/app-types/kanban-board-app.json +53 -0
  507. package/src/crew/library/entries/app-types/loan-calculator.json +52 -0
  508. package/src/crew/library/entries/app-types/markdown-editor-preview.json +47 -0
  509. package/src/crew/library/entries/app-types/markdown-notes-app.json +53 -0
  510. package/src/crew/library/entries/app-types/maze-game.json +48 -0
  511. package/src/crew/library/entries/app-types/memory-card-game.json +52 -0
  512. package/src/crew/library/entries/app-types/metronome-web-audio.json +51 -0
  513. package/src/crew/library/entries/app-types/mines-grid-game.json +49 -0
  514. package/src/crew/library/entries/app-types/month-calendar.json +53 -0
  515. package/src/crew/library/entries/app-types/music-playlist-player.json +51 -0
  516. package/src/crew/library/entries/app-types/name-picker-wheel.json +52 -0
  517. package/src/crew/library/entries/app-types/password-generator.json +48 -0
  518. package/src/crew/library/entries/app-types/poll-voting.json +50 -0
  519. package/src/crew/library/entries/app-types/pomodoro-timer.json +54 -0
  520. package/src/crew/library/entries/app-types/quiz-app.json +53 -0
  521. package/src/crew/library/entries/app-types/reading-list.json +52 -0
  522. package/src/crew/library/entries/app-types/recipe-box.json +52 -0
  523. package/src/crew/library/entries/app-types/rock-paper-scissors.json +50 -0
  524. package/src/crew/library/entries/app-types/shopping-list.json +50 -0
  525. package/src/crew/library/entries/app-types/sliding-tiles-merge-game.json +51 -0
  526. package/src/crew/library/entries/app-types/snake-game.json +50 -0
  527. package/src/crew/library/entries/app-types/stopwatch-laps.json +50 -0
  528. package/src/crew/library/entries/app-types/sudoku-game.json +48 -0
  529. package/src/crew/library/entries/app-types/table-tennis-game.json +47 -0
  530. package/src/crew/library/entries/app-types/tap-to-fly-game.json +51 -0
  531. package/src/crew/library/entries/app-types/tic-tac-toe-game.json +49 -0
  532. package/src/crew/library/entries/app-types/time-tracker.json +51 -0
  533. package/src/crew/library/entries/app-types/tip-calculator.json +52 -0
  534. package/src/crew/library/entries/app-types/todo-list-app.json +52 -0
  535. package/src/crew/library/entries/app-types/typing-speed-test.json +51 -0
  536. package/src/crew/library/entries/app-types/unit-converter.json +52 -0
  537. package/src/crew/library/entries/app-types/weather-card-json.json +50 -0
  538. package/src/crew/library/entries/app-types/whack-a-mole-game.json +52 -0
  539. package/src/crew/library/entries/app-types/word-guess-game.json +51 -0
  540. package/src/crew/library/entries/backend/api-docs-markdown-contract.json +41 -0
  541. package/src/crew/library/entries/backend/api-etag-conditional-requests.json +41 -0
  542. package/src/crew/library/entries/backend/api-key-quotas-sliding-window.json +41 -0
  543. package/src/crew/library/entries/backend/api-resource-modeling.json +41 -0
  544. package/src/crew/library/entries/backend/api-tests-random-port.json +42 -0
  545. package/src/crew/library/entries/backend/api-versioning-policy.json +41 -0
  546. package/src/crew/library/entries/backend/config-environments-secret-files.json +41 -0
  547. package/src/crew/library/entries/backend/cors-policy-decisions.json +40 -0
  548. package/src/crew/library/entries/backend/health-readiness-endpoints.json +43 -0
  549. package/src/crew/library/entries/backend/http-error-class-handler.json +42 -0
  550. package/src/crew/library/entries/backend/in-process-job-queue.json +42 -0
  551. package/src/crew/library/entries/backend/json-body-reader-limits.json +41 -0
  552. package/src/crew/library/entries/backend/jwt-token-pitfalls.json +43 -0
  553. package/src/crew/library/entries/backend/keyset-pagination-filters.json +41 -0
  554. package/src/crew/library/entries/backend/legacy-password-hash-migration.json +42 -0
  555. package/src/crew/library/entries/backend/node-http-router-module.json +42 -0
  556. package/src/crew/library/entries/backend/request-id-async-context.json +40 -0
  557. package/src/crew/library/entries/backend/role-permission-checks.json +42 -0
  558. package/src/crew/library/entries/backend/route-input-schemas.json +40 -0
  559. package/src/crew/library/entries/backend/server-session-store.json +42 -0
  560. package/src/crew/library/entries/backend/shutdown-order-and-test.json +42 -0
  561. package/src/crew/library/entries/backend/sql-file-migrations.json +41 -0
  562. package/src/crew/library/entries/backend/sql-params-transactions.json +41 -0
  563. package/src/crew/library/entries/backend/upload-stream-to-disk.json +42 -0
  564. package/src/crew/library/entries/backend/webhook-receiver-hmac.json +42 -0
  565. package/src/crew/library/entries/data/accessible-chart-fallback.json +39 -0
  566. package/src/crew/library/entries/data/app-data-model-design.json +38 -0
  567. package/src/crew/library/entries/data/backup-restore-json.json +37 -0
  568. package/src/crew/library/entries/data/calendar-heatmap.json +41 -0
  569. package/src/crew/library/entries/data/csv-export-download.json +38 -0
  570. package/src/crew/library/entries/data/csv-parse-quoted.json +37 -0
  571. package/src/crew/library/entries/data/data-cleaning-normalize.json +37 -0
  572. package/src/crew/library/entries/data/dates-timezones-intl.json +37 -0
  573. package/src/crew/library/entries/data/dedupe-records.json +36 -0
  574. package/src/crew/library/entries/data/file-import-json-csv.json +42 -0
  575. package/src/crew/library/entries/data/form-validation-client.json +39 -0
  576. package/src/crew/library/entries/data/fuzzy-search-ranking.json +38 -0
  577. package/src/crew/library/entries/data/haversine-distance.json +39 -0
  578. package/src/crew/library/entries/data/histogram-binning.json +38 -0
  579. package/src/crew/library/entries/data/ids-random-uuid.json +36 -0
  580. package/src/crew/library/entries/data/intl-collator-sorting.json +37 -0
  581. package/src/crew/library/entries/data/join-merge-datasets.json +37 -0
  582. package/src/crew/library/entries/data/json-group-transform.json +38 -0
  583. package/src/crew/library/entries/data/list-search-filter-sort.json +39 -0
  584. package/src/crew/library/entries/data/localstorage-versioned-state.json +37 -0
  585. package/src/crew/library/entries/data/log-line-parsing.json +40 -0
  586. package/src/crew/library/entries/data/markdown-to-html-safe.json +36 -0
  587. package/src/crew/library/entries/data/money-integer-cents.json +38 -0
  588. package/src/crew/library/entries/data/nice-axis-ticks.json +36 -0
  589. package/src/crew/library/entries/data/number-currency-intl.json +37 -0
  590. package/src/crew/library/entries/data/offline-sync-queue.json +40 -0
  591. package/src/crew/library/entries/data/paginate-data.json +38 -0
  592. package/src/crew/library/entries/data/parse-date-strings.json +36 -0
  593. package/src/crew/library/entries/data/personal-data-minimization.json +41 -0
  594. package/src/crew/library/entries/data/pubsub-state-store.json +39 -0
  595. package/src/crew/library/entries/data/realistic-seed-data.json +40 -0
  596. package/src/crew/library/entries/data/schema-validation-handwritten.json +38 -0
  597. package/src/crew/library/entries/data/sparkline-inline.json +38 -0
  598. package/src/crew/library/entries/data/stats-summary-numbers.json +38 -0
  599. package/src/crew/library/entries/data/svg-bar-chart.json +39 -0
  600. package/src/crew/library/entries/data/svg-donut-chart.json +38 -0
  601. package/src/crew/library/entries/data/svg-line-chart.json +39 -0
  602. package/src/crew/library/entries/data/table-to-chart.json +37 -0
  603. package/src/crew/library/entries/data/undo-redo-history.json +36 -0
  604. package/src/crew/library/entries/data/validator-functions.json +37 -0
  605. package/src/crew/library/entries/design/brand-palette-from-one-color.json +38 -0
  606. package/src/crew/library/entries/design/breakpoint-strategy.json +38 -0
  607. package/src/crew/library/entries/design/button-hierarchy.json +38 -0
  608. package/src/crew/library/entries/design/color-palette-aa.json +39 -0
  609. package/src/crew/library/entries/design/corner-radius-system.json +35 -0
  610. package/src/crew/library/entries/design/dark-palette-design.json +37 -0
  611. package/src/crew/library/entries/design/dataviz-colors.json +37 -0
  612. package/src/crew/library/entries/design/design-consistency-audit.json +38 -0
  613. package/src/crew/library/entries/design/design-critique.json +36 -0
  614. package/src/crew/library/entries/design/design-tokens-css.json +37 -0
  615. package/src/crew/library/entries/design/elevation-shadows.json +37 -0
  616. package/src/crew/library/entries/design/error-offline-states-design.json +38 -0
  617. package/src/crew/library/entries/design/fluid-type-clamp.json +37 -0
  618. package/src/crew/library/entries/design/font-stack-pairing.json +38 -0
  619. package/src/crew/library/entries/design/form-design.json +38 -0
  620. package/src/crew/library/entries/design/header-logo-placement.json +38 -0
  621. package/src/crew/library/entries/design/icon-usage.json +37 -0
  622. package/src/crew/library/entries/design/image-aspect-ratio.json +38 -0
  623. package/src/crew/library/entries/design/layout-auto-fit-grid.json +37 -0
  624. package/src/crew/library/entries/design/layout-bento-grid.json +37 -0
  625. package/src/crew/library/entries/design/layout-centered-column.json +37 -0
  626. package/src/crew/library/entries/design/layout-holy-grail.json +38 -0
  627. package/src/crew/library/entries/design/layout-magazine.json +37 -0
  628. package/src/crew/library/entries/design/layout-sidebar-content.json +37 -0
  629. package/src/crew/library/entries/design/layout-split-hero.json +39 -0
  630. package/src/crew/library/entries/design/layout-sticky-footer.json +35 -0
  631. package/src/crew/library/entries/design/line-length-rhythm.json +39 -0
  632. package/src/crew/library/entries/design/loading-feedback.json +38 -0
  633. package/src/crew/library/entries/design/micro-interactions.json +38 -0
  634. package/src/crew/library/entries/design/mobile-nav-patterns.json +38 -0
  635. package/src/crew/library/entries/design/motion-reduced.json +38 -0
  636. package/src/crew/library/entries/design/multi-theme.json +38 -0
  637. package/src/crew/library/entries/design/semantic-color-tokens.json +38 -0
  638. package/src/crew/library/entries/design/spacing-scale.json +38 -0
  639. package/src/crew/library/entries/design/style-guide-page.json +40 -0
  640. package/src/crew/library/entries/design/touch-target-focus.json +36 -0
  641. package/src/crew/library/entries/design/typography-scale.json +38 -0
  642. package/src/crew/library/entries/design/ui-microcopy.json +36 -0
  643. package/src/crew/library/entries/design/visual-direction.json +37 -0
  644. package/src/crew/library/entries/design/visual-hierarchy.json +37 -0
  645. package/src/crew/library/entries/design/whitespace-grouping.json +37 -0
  646. package/src/crew/library/entries/design/wireframe-lofi.json +40 -0
  647. package/src/crew/library/entries/desktop/desktop-app-security.json +43 -0
  648. package/src/crew/library/entries/desktop/desktop-auto-update.json +40 -0
  649. package/src/crew/library/entries/desktop/desktop-background-tasks.json +39 -0
  650. package/src/crew/library/entries/desktop/desktop-clipboard-integration.json +38 -0
  651. package/src/crew/library/entries/desktop/desktop-command-palette-registry.json +39 -0
  652. package/src/crew/library/entries/desktop/desktop-file-drag-drop.json +38 -0
  653. package/src/crew/library/entries/desktop/desktop-global-hotkeys.json +38 -0
  654. package/src/crew/library/entries/desktop/desktop-high-dpi-scaling.json +41 -0
  655. package/src/crew/library/entries/desktop/desktop-keyboard-focus-a11y.json +40 -0
  656. package/src/crew/library/entries/desktop/desktop-local-logs-crash-reports.json +40 -0
  657. package/src/crew/library/entries/desktop/desktop-localization.json +40 -0
  658. package/src/crew/library/entries/desktop/desktop-menus-shortcuts.json +40 -0
  659. package/src/crew/library/entries/desktop/desktop-offline-local-data.json +40 -0
  660. package/src/crew/library/entries/desktop/desktop-open-save-dialogs.json +39 -0
  661. package/src/crew/library/entries/desktop/desktop-os-theme-follow.json +40 -0
  662. package/src/crew/library/entries/desktop/desktop-packaging-installers.json +42 -0
  663. package/src/crew/library/entries/desktop/desktop-print-pdf-export.json +39 -0
  664. package/src/crew/library/entries/desktop/desktop-safe-file-writes.json +40 -0
  665. package/src/crew/library/entries/desktop/desktop-settings-user-data.json +38 -0
  666. package/src/crew/library/entries/desktop/desktop-single-instance-windows.json +38 -0
  667. package/src/crew/library/entries/desktop/desktop-testing-node-test.json +39 -0
  668. package/src/crew/library/entries/desktop/desktop-tray-notifications.json +38 -0
  669. package/src/crew/library/entries/desktop/desktop-web-app-migration.json +41 -0
  670. package/src/crew/library/entries/desktop/desktop-window-state.json +38 -0
  671. package/src/crew/library/entries/desktop/neutralino-app-setup.json +39 -0
  672. package/src/crew/library/entries/devops/backup-restore-drill.json +41 -0
  673. package/src/crew/library/entries/devops/ci-matrix-os-runtime.json +38 -0
  674. package/src/crew/library/entries/devops/ci-secrets-environments.json +39 -0
  675. package/src/crew/library/entries/devops/ci-test-workflow.json +39 -0
  676. package/src/crew/library/entries/devops/compose-app-database.json +39 -0
  677. package/src/crew/library/entries/devops/containerfile-python-script.json +41 -0
  678. package/src/crew/library/entries/devops/cron-scheduled-tasks.json +38 -0
  679. package/src/crew/library/entries/devops/dependency-update-routine.json +39 -0
  680. package/src/crew/library/entries/devops/deploy-rollback-plan.json +39 -0
  681. package/src/crew/library/entries/devops/deploy-script-gotchas.json +39 -0
  682. package/src/crew/library/entries/devops/dockerfile-node-service.json +41 -0
  683. package/src/crew/library/entries/devops/dockerignore-small-images.json +37 -0
  684. package/src/crew/library/entries/devops/healthcheck-restart-policy.json +40 -0
  685. package/src/crew/library/entries/devops/incident-runbook.json +40 -0
  686. package/src/crew/library/entries/devops/infrastructure-as-code-basics.json +39 -0
  687. package/src/crew/library/entries/devops/log-rotation-setup.json +38 -0
  688. package/src/crew/library/entries/devops/make-targets-ci-parity.json +39 -0
  689. package/src/crew/library/entries/devops/release-pipeline-tags.json +38 -0
  690. package/src/crew/library/entries/devops/reverse-proxy-node-app.json +41 -0
  691. package/src/crew/library/entries/devops/semver-bump-decision.json +39 -0
  692. package/src/crew/library/entries/devops/static-site-deploy.json +38 -0
  693. package/src/crew/library/entries/devops/systemd-unit-hardening.json +38 -0
  694. package/src/crew/library/entries/devops/tls-certificate-renewal.json +39 -0
  695. package/src/crew/library/entries/devops/uptime-check-monitoring.json +38 -0
  696. package/src/crew/library/entries/devops/zero-downtime-deploy-systemd.json +38 -0
  697. package/src/crew/library/entries/games/arcade-physics-velocity-gravity.json +37 -0
  698. package/src/crew/library/entries/games/auto-pause-blur-visibility.json +36 -0
  699. package/src/crew/library/entries/games/camera-follow-scrolling.json +37 -0
  700. package/src/crew/library/entries/games/canvas-game-profiling.json +39 -0
  701. package/src/crew/library/entries/games/card-deck-shuffle-rules.json +38 -0
  702. package/src/crew/library/entries/games/collision-aabb-circle.json +38 -0
  703. package/src/crew/library/entries/games/difficulty-curve-wave-spawner.json +39 -0
  704. package/src/crew/library/entries/games/fixed-timestep-game-loop.json +37 -0
  705. package/src/crew/library/entries/games/game-audio-unlock-mixer.json +39 -0
  706. package/src/crew/library/entries/games/game-hud-accessibility.json +42 -0
  707. package/src/crew/library/entries/games/game-scene-state-machine.json +38 -0
  708. package/src/crew/library/entries/games/grid-pathfinding-a-star.json +38 -0
  709. package/src/crew/library/entries/games/high-score-table-storage.json +40 -0
  710. package/src/crew/library/entries/games/input-action-mapping-gamepad.json +37 -0
  711. package/src/crew/library/entries/games/local-multiplayer-hot-seat.json +39 -0
  712. package/src/crew/library/entries/games/offline-game-pwa.json +40 -0
  713. package/src/crew/library/entries/games/particle-effects-budget.json +38 -0
  714. package/src/crew/library/entries/games/platformer-jump-feel.json +38 -0
  715. package/src/crew/library/entries/games/puzzle-undo-move-stack.json +38 -0
  716. package/src/crew/library/entries/games/seeded-procedural-generation.json +38 -0
  717. package/src/crew/library/entries/games/sprite-sheet-animation.json +38 -0
  718. package/src/crew/library/entries/games/tile-map-json-levels.json +40 -0
  719. package/src/crew/library/entries/games/top-down-shooter-basics.json +39 -0
  720. package/src/crew/library/entries/games/turn-based-rules-engine-tests.json +39 -0
  721. package/src/crew/library/entries/games/virtual-joystick-touch-controls.json +40 -0
  722. package/src/crew/library/entries/git-docs/api-reference-docs.json +39 -0
  723. package/src/crew/library/entries/git-docs/architecture-decision-record.json +39 -0
  724. package/src/crew/library/entries/git-docs/atomic-commits.json +36 -0
  725. package/src/crew/library/entries/git-docs/branching-workflow.json +38 -0
  726. package/src/crew/library/entries/git-docs/bug-report.json +38 -0
  727. package/src/crew/library/entries/git-docs/changelog-entry.json +37 -0
  728. package/src/crew/library/entries/git-docs/cli-help-text.json +38 -0
  729. package/src/crew/library/entries/git-docs/code-comments.json +37 -0
  730. package/src/crew/library/entries/git-docs/commit-message.json +36 -0
  731. package/src/crew/library/entries/git-docs/config-reference-docs.json +40 -0
  732. package/src/crew/library/entries/git-docs/contributing-guide.json +40 -0
  733. package/src/crew/library/entries/git-docs/docstrings-public-api.json +38 -0
  734. package/src/crew/library/entries/git-docs/faq-doc.json +36 -0
  735. package/src/crew/library/entries/git-docs/feature-request.json +37 -0
  736. package/src/crew/library/entries/git-docs/getting-started-tutorial.json +39 -0
  737. package/src/crew/library/entries/git-docs/git-bisect.json +38 -0
  738. package/src/crew/library/entries/git-docs/git-recover-mistakes.json +36 -0
  739. package/src/crew/library/entries/git-docs/gitignore-setup.json +35 -0
  740. package/src/crew/library/entries/git-docs/license-options.json +36 -0
  741. package/src/crew/library/entries/git-docs/merge-conflicts.json +38 -0
  742. package/src/crew/library/entries/git-docs/migration-guide.json +39 -0
  743. package/src/crew/library/entries/git-docs/pr-description.json +37 -0
  744. package/src/crew/library/entries/git-docs/readme-cli.json +39 -0
  745. package/src/crew/library/entries/git-docs/readme-library-api.json +40 -0
  746. package/src/crew/library/entries/git-docs/readme-project.json +40 -0
  747. package/src/crew/library/entries/git-docs/release-notes.json +37 -0
  748. package/src/crew/library/entries/git-docs/release-tag-semver.json +37 -0
  749. package/src/crew/library/entries/git-docs/review-reply.json +35 -0
  750. package/src/crew/library/entries/git-docs/security-policy.json +37 -0
  751. package/src/crew/library/entries/git-docs/troubleshooting-guide.json +38 -0
  752. package/src/crew/library/entries/mobile/capacitor-camera-geolocation-plugins.json +39 -0
  753. package/src/crew/library/entries/mobile/capacitor-project-setup.json +42 -0
  754. package/src/crew/library/entries/mobile/mobile-app-lifecycle-events.json +39 -0
  755. package/src/crew/library/entries/mobile/mobile-auth-secure-token-storage.json +41 -0
  756. package/src/crew/library/entries/mobile/mobile-camera-photo-upload.json +40 -0
  757. package/src/crew/library/entries/mobile/mobile-deep-links-app-links.json +41 -0
  758. package/src/crew/library/entries/mobile/mobile-form-keyboards-autofill.json +41 -0
  759. package/src/crew/library/entries/mobile/mobile-haptics-vibration.json +39 -0
  760. package/src/crew/library/entries/mobile/mobile-indexeddb-storage-wrapper.json +39 -0
  761. package/src/crew/library/entries/mobile/mobile-manifest-icon-set.json +41 -0
  762. package/src/crew/library/entries/mobile/mobile-media-for-phones.json +41 -0
  763. package/src/crew/library/entries/mobile/mobile-offline-cache-strategies.json +40 -0
  764. package/src/crew/library/entries/mobile/mobile-offline-location-maps.json +41 -0
  765. package/src/crew/library/entries/mobile/mobile-outbox-resume-sync.json +41 -0
  766. package/src/crew/library/entries/mobile/mobile-push-notifications-limits.json +40 -0
  767. package/src/crew/library/entries/mobile/mobile-pwa-app-shell.json +41 -0
  768. package/src/crew/library/entries/mobile/mobile-safe-area-insets.json +41 -0
  769. package/src/crew/library/entries/mobile/mobile-small-screen-device-testing.json +39 -0
  770. package/src/crew/library/entries/mobile/mobile-startup-performance-budget.json +41 -0
  771. package/src/crew/library/entries/mobile/mobile-store-release-checklist.json +41 -0
  772. package/src/crew/library/entries/mobile/mobile-system-theme-bars.json +40 -0
  773. package/src/crew/library/entries/mobile/mobile-tab-bar-back-button.json +40 -0
  774. package/src/crew/library/entries/mobile/mobile-touch-gestures.json +40 -0
  775. package/src/crew/library/entries/mobile/mobile-touch-screen-reader-a11y.json +41 -0
  776. package/src/crew/library/entries/mobile/mobile-web-bundle-versioning.json +40 -0
  777. package/src/crew/library/entries/planning/acceptance-criteria.json +34 -0
  778. package/src/crew/library/entries/planning/change-request-midjob.json +34 -0
  779. package/src/crew/library/entries/planning/clarifying-questions.json +34 -0
  780. package/src/crew/library/entries/planning/decision-log.json +35 -0
  781. package/src/crew/library/entries/planning/definition-of-done.json +33 -0
  782. package/src/crew/library/entries/planning/estimate-tasks.json +35 -0
  783. package/src/crew/library/entries/planning/identify-risks.json +34 -0
  784. package/src/crew/library/entries/planning/milestones.json +34 -0
  785. package/src/crew/library/entries/planning/one-task-per-file.json +33 -0
  786. package/src/crew/library/entries/planning/order-by-dependencies.json +33 -0
  787. package/src/crew/library/entries/planning/plan-accessibility.json +34 -0
  788. package/src/crew/library/entries/planning/plan-browser-game.json +35 -0
  789. package/src/crew/library/entries/planning/plan-bug-investigation.json +36 -0
  790. package/src/crew/library/entries/planning/plan-data-migration.json +35 -0
  791. package/src/crew/library/entries/planning/plan-documentation.json +34 -0
  792. package/src/crew/library/entries/planning/plan-for-small-models.json +34 -0
  793. package/src/crew/library/entries/planning/plan-multi-page-site.json +34 -0
  794. package/src/crew/library/entries/planning/plan-safe-refactor.json +34 -0
  795. package/src/crew/library/entries/planning/plan-small-api.json +34 -0
  796. package/src/crew/library/entries/planning/plan-tests.json +34 -0
  797. package/src/crew/library/entries/planning/prioritize-must-should-could.json +34 -0
  798. package/src/crew/library/entries/planning/recover-failed-task.json +36 -0
  799. package/src/crew/library/entries/planning/requirements-from-conversation.json +34 -0
  800. package/src/crew/library/entries/planning/review-plan-before-work.json +35 -0
  801. package/src/crew/library/entries/planning/scope-first-version.json +34 -0
  802. package/src/crew/library/entries/planning/split-into-tasks.json +35 -0
  803. package/src/crew/library/entries/planning/staff-the-crew.json +35 -0
  804. package/src/crew/library/entries/planning/success-measures.json +34 -0
  805. package/src/crew/library/entries/planning/timebox-work.json +33 -0
  806. package/src/crew/library/entries/planning/tradeoff-table.json +33 -0
  807. package/src/crew/library/entries/planning/user-stories.json +34 -0
  808. package/src/crew/library/entries/planning/vague-request-assumptions.json +33 -0
  809. package/src/crew/library/entries/practices/accessibility-audit.json +43 -0
  810. package/src/crew/library/entries/practices/accessible-names-labels.json +40 -0
  811. package/src/crew/library/entries/practices/add-jsdoc-types.json +36 -0
  812. package/src/crew/library/entries/practices/add-unit-tests.json +38 -0
  813. package/src/crew/library/entries/practices/algorithm-performance.json +38 -0
  814. package/src/crew/library/entries/practices/api-error-format.json +37 -0
  815. package/src/crew/library/entries/practices/async-race-condition.json +37 -0
  816. package/src/crew/library/entries/practices/boundary-validation.json +38 -0
  817. package/src/crew/library/entries/practices/bug-fix-from-error.json +39 -0
  818. package/src/crew/library/entries/practices/clean-console-warnings.json +38 -0
  819. package/src/crew/library/entries/practices/color-contrast-fix.json +38 -0
  820. package/src/crew/library/entries/practices/config-management.json +39 -0
  821. package/src/crew/library/entries/practices/consistent-code-style.json +38 -0
  822. package/src/crew/library/entries/practices/content-security-policy.json +38 -0
  823. package/src/crew/library/entries/practices/css-layout-overflow.json +41 -0
  824. package/src/crew/library/entries/practices/dark-mode.json +39 -0
  825. package/src/crew/library/entries/practices/data-format-migration.json +37 -0
  826. package/src/crew/library/entries/practices/debounce-throttle.json +35 -0
  827. package/src/crew/library/entries/practices/debug-failing-test.json +37 -0
  828. package/src/crew/library/entries/practices/deprecation-compat.json +37 -0
  829. package/src/crew/library/entries/practices/dom-batching-reflow.json +36 -0
  830. package/src/crew/library/entries/practices/edge-case-tests.json +36 -0
  831. package/src/crew/library/entries/practices/error-handling-strategy.json +38 -0
  832. package/src/crew/library/entries/practices/event-listener-not-firing.json +34 -0
  833. package/src/crew/library/entries/practices/feature-flags.json +37 -0
  834. package/src/crew/library/entries/practices/file-upload-handling.json +39 -0
  835. package/src/crew/library/entries/practices/focus-management.json +36 -0
  836. package/src/crew/library/entries/practices/graceful-shutdown.json +36 -0
  837. package/src/crew/library/entries/practices/http-caching-headers.json +36 -0
  838. package/src/crew/library/entries/practices/i18n-setup.json +38 -0
  839. package/src/crew/library/entries/practices/injection-risks.json +37 -0
  840. package/src/crew/library/entries/practices/keyboard-navigation-fix.json +37 -0
  841. package/src/crew/library/entries/practices/log-levels-redaction.json +37 -0
  842. package/src/crew/library/entries/practices/memory-leak-fix.json +36 -0
  843. package/src/crew/library/entries/practices/minimal-dependencies.json +39 -0
  844. package/src/crew/library/entries/practices/minimal-reproduction.json +35 -0
  845. package/src/crew/library/entries/practices/modernize-legacy-js.json +39 -0
  846. package/src/crew/library/entries/practices/money-float-precision.json +36 -0
  847. package/src/crew/library/entries/practices/not-a-function-error.json +36 -0
  848. package/src/crew/library/entries/practices/null-undefined-access.json +35 -0
  849. package/src/crew/library/entries/practices/off-by-one-errors.json +37 -0
  850. package/src/crew/library/entries/practices/page-load-performance.json +39 -0
  851. package/src/crew/library/entries/practices/password-session-basics.json +37 -0
  852. package/src/crew/library/entries/practices/plurals-number-date-format.json +36 -0
  853. package/src/crew/library/entries/practices/progressive-enhancement.json +37 -0
  854. package/src/crew/library/entries/practices/refactor-extract-function.json +35 -0
  855. package/src/crew/library/entries/practices/remove-dead-code.json +35 -0
  856. package/src/crew/library/entries/practices/rename-for-clarity.json +35 -0
  857. package/src/crew/library/entries/practices/responsive-fix-375.json +40 -0
  858. package/src/crew/library/entries/practices/responsive-images-srcset.json +38 -0
  859. package/src/crew/library/entries/practices/rest-api-conventions.json +39 -0
  860. package/src/crew/library/entries/practices/retry-backoff.json +37 -0
  861. package/src/crew/library/entries/practices/rtl-support.json +37 -0
  862. package/src/crew/library/entries/practices/secrets-handling.json +37 -0
  863. package/src/crew/library/entries/practices/security-review-xss.json +40 -0
  864. package/src/crew/library/entries/practices/seo-basics.json +42 -0
  865. package/src/crew/library/entries/practices/shared-mutation-bug.json +35 -0
  866. package/src/crew/library/entries/practices/sitemap-robots.json +38 -0
  867. package/src/crew/library/entries/practices/split-large-file.json +38 -0
  868. package/src/crew/library/entries/practices/structured-data-jsonld.json +35 -0
  869. package/src/crew/library/entries/practices/structured-logging.json +37 -0
  870. package/src/crew/library/entries/practices/test-dom-logic-split.json +37 -0
  871. package/src/crew/library/entries/practices/timeouts-abort.json +35 -0
  872. package/src/crew/library/entries/practices/user-facing-error-messages.json +36 -0
  873. package/src/crew/library/entries/practices/z-index-stacking.json +36 -0
  874. package/src/crew/library/entries/review-qa/bug-repro-triage.json +35 -0
  875. package/src/crew/library/entries/review-qa/cross-browser-standards.json +36 -0
  876. package/src/crew/library/entries/review-qa/edge-cases-dates-timezones.json +37 -0
  877. package/src/crew/library/entries/review-qa/edge-cases-empty-huge-data.json +35 -0
  878. package/src/crew/library/entries/review-qa/edge-cases-inputs.json +34 -0
  879. package/src/crew/library/entries/review-qa/edge-cases-numbers-money.json +37 -0
  880. package/src/crew/library/entries/review-qa/edge-cases-unicode.json +37 -0
  881. package/src/crew/library/entries/review-qa/exploratory-charter.json +35 -0
  882. package/src/crew/library/entries/review-qa/form-e2e-check.json +37 -0
  883. package/src/crew/library/entries/review-qa/game-logic-check.json +37 -0
  884. package/src/crew/library/entries/review-qa/keyboard-only-qa.json +36 -0
  885. package/src/crew/library/entries/review-qa/link-asset-check.json +36 -0
  886. package/src/crew/library/entries/review-qa/performance-budget-check.json +37 -0
  887. package/src/crew/library/entries/review-qa/persistence-reload-check.json +37 -0
  888. package/src/crew/library/entries/review-qa/regression-checklist.json +35 -0
  889. package/src/crew/library/entries/review-qa/release-signoff.json +40 -0
  890. package/src/crew/library/entries/review-qa/responsive-qa-breakpoints.json +37 -0
  891. package/src/crew/library/entries/review-qa/review-a11y-pass.json +39 -0
  892. package/src/crew/library/entries/review-qa/review-copy.json +36 -0
  893. package/src/crew/library/entries/review-qa/review-css.json +39 -0
  894. package/src/crew/library/entries/review-qa/review-data-migration.json +36 -0
  895. package/src/crew/library/entries/review-qa/review-dependencies.json +37 -0
  896. package/src/crew/library/entries/review-qa/review-error-handling.json +37 -0
  897. package/src/crew/library/entries/review-qa/review-html.json +40 -0
  898. package/src/crew/library/entries/review-qa/review-i18n.json +37 -0
  899. package/src/crew/library/entries/review-qa/review-javascript.json +39 -0
  900. package/src/crew/library/entries/review-qa/review-logging.json +36 -0
  901. package/src/crew/library/entries/review-qa/review-node-server.json +39 -0
  902. package/src/crew/library/entries/review-qa/review-performance-pass.json +39 -0
  903. package/src/crew/library/entries/review-qa/review-pr-scope.json +35 -0
  904. package/src/crew/library/entries/review-qa/review-python.json +39 -0
  905. package/src/crew/library/entries/review-qa/review-security-pass.json +39 -0
  906. package/src/crew/library/entries/review-qa/review-test-quality.json +36 -0
  907. package/src/crew/library/entries/review-qa/screen-reader-smoke.json +36 -0
  908. package/src/crew/library/entries/review-qa/severity-triage.json +36 -0
  909. package/src/crew/library/entries/review-qa/smoke-test-release.json +35 -0
  910. package/src/crew/library/entries/review-qa/test-plan-api.json +36 -0
  911. package/src/crew/library/entries/review-qa/test-plan-form.json +35 -0
  912. package/src/crew/library/entries/review-qa/test-plan-game.json +35 -0
  913. package/src/crew/library/entries/review-qa/test-plan-web-page.json +35 -0
  914. package/src/crew/library/entries/review-qa/verify-acceptance-criteria.json +35 -0
  915. package/src/crew/library/entries/review-qa/visual-qa-spacing.json +36 -0
  916. package/src/crew/library/entries/roles/architect-architecture-review.json +37 -0
  917. package/src/crew/library/entries/roles/architect-constraints-check.json +37 -0
  918. package/src/crew/library/entries/roles/architect-data-flow-sketch.json +38 -0
  919. package/src/crew/library/entries/roles/architect-interface-contracts.json +38 -0
  920. package/src/crew/library/entries/roles/architect-static-site-structure.json +37 -0
  921. package/src/crew/library/entries/roles/designer-design-qa-pass.json +36 -0
  922. package/src/crew/library/entries/roles/designer-look-from-brief.json +37 -0
  923. package/src/crew/library/entries/roles/designer-polish-existing-page.json +36 -0
  924. package/src/crew/library/entries/roles/designer-token-handoff.json +37 -0
  925. package/src/crew/library/entries/roles/designer-visual-spec.json +37 -0
  926. package/src/crew/library/entries/roles/developer-few-turns.json +36 -0
  927. package/src/crew/library/entries/roles/developer-read-before-edit.json +36 -0
  928. package/src/crew/library/entries/roles/developer-self-check.json +37 -0
  929. package/src/crew/library/entries/roles/developer-test-mjs.json +38 -0
  930. package/src/crew/library/entries/roles/developer-unclear-spec.json +35 -0
  931. package/src/crew/library/entries/roles/ops-backup-rollback.json +36 -0
  932. package/src/crew/library/entries/roles/ops-environment-check.json +35 -0
  933. package/src/crew/library/entries/roles/ops-log-triage.json +36 -0
  934. package/src/crew/library/entries/roles/ops-release-checklist.json +39 -0
  935. package/src/crew/library/entries/roles/ops-safe-commands.json +35 -0
  936. package/src/crew/library/entries/roles/qa-automatic-check-results.json +35 -0
  937. package/src/crew/library/entries/roles/qa-check-acceptance-criteria.json +36 -0
  938. package/src/crew/library/entries/roles/qa-findings-format.json +34 -0
  939. package/src/crew/library/entries/roles/qa-recheck-fixes.json +36 -0
  940. package/src/crew/library/entries/roles/qa-severity-calibration.json +36 -0
  941. package/src/crew/library/entries/roles/reviewer-constructive-comments.json +34 -0
  942. package/src/crew/library/entries/roles/reviewer-diff-review.json +36 -0
  943. package/src/crew/library/entries/roles/reviewer-fix-round.json +36 -0
  944. package/src/crew/library/entries/roles/reviewer-scope-creep.json +35 -0
  945. package/src/crew/library/entries/roles/reviewer-verdict-rules.json +35 -0
  946. package/src/crew/library/entries/roles/writer-copy-from-brief.json +37 -0
  947. package/src/crew/library/entries/roles/writer-docs-voice.json +36 -0
  948. package/src/crew/library/entries/roles/writer-edit-for-clarity.json +37 -0
  949. package/src/crew/library/entries/roles/writer-microcopy.json +39 -0
  950. package/src/crew/library/entries/roles/writer-translation-ready.json +36 -0
  951. package/src/crew/library/entries/security/auth-session-review.json +39 -0
  952. package/src/crew/library/entries/security/command-injection-review.json +39 -0
  953. package/src/crew/library/entries/security/cookie-flags-audit.json +40 -0
  954. package/src/crew/library/entries/security/csp-static-site-meta.json +41 -0
  955. package/src/crew/library/entries/security/csrf-protection.json +41 -0
  956. package/src/crew/library/entries/security/dependency-advisory-offline.json +41 -0
  957. package/src/crew/library/entries/security/extension-permission-review.json +41 -0
  958. package/src/crew/library/entries/security/idor-access-review.json +41 -0
  959. package/src/crew/library/entries/security/input-validation-review.json +38 -0
  960. package/src/crew/library/entries/security/log-leak-audit.json +40 -0
  961. package/src/crew/library/entries/security/password-storage-audit.json +40 -0
  962. package/src/crew/library/entries/security/path-traversal-review.json +41 -0
  963. package/src/crew/library/entries/security/secret-scan-rotate.json +40 -0
  964. package/src/crew/library/entries/security/security-audit-report.json +43 -0
  965. package/src/crew/library/entries/security/security-fix-triage.json +41 -0
  966. package/src/crew/library/entries/security/security-headers-checklist.json +40 -0
  967. package/src/crew/library/entries/security/sql-injection-review.json +40 -0
  968. package/src/crew/library/entries/security/ssrf-url-fetcher.json +41 -0
  969. package/src/crew/library/entries/security/threat-model-small-app.json +41 -0
  970. package/src/crew/library/entries/security/tls-verification-on.json +40 -0
  971. package/src/crew/library/entries/security/unsafe-deserialization.json +40 -0
  972. package/src/crew/library/entries/security/upload-attack-review.json +39 -0
  973. package/src/crew/library/entries/security/weak-crypto-audit.json +40 -0
  974. package/src/crew/library/entries/security/webview-bridge-hardening.json +42 -0
  975. package/src/crew/library/entries/security/xss-context-encoding.json +41 -0
  976. package/src/crew/library/entries/stacks/browser-es-modules.json +40 -0
  977. package/src/crew/library/entries/stacks/canvas-2d-animation-loop.json +38 -0
  978. package/src/crew/library/entries/stacks/config-ini-yaml-parsing.json +37 -0
  979. package/src/crew/library/entries/stacks/css-custom-properties-theme.json +43 -0
  980. package/src/crew/library/entries/stacks/css-grid-flex-layout.json +43 -0
  981. package/src/crew/library/entries/stacks/dom-event-delegation.json +39 -0
  982. package/src/crew/library/entries/stacks/drag-drop-reorder-api.json +38 -0
  983. package/src/crew/library/entries/stacks/env-config-module.json +38 -0
  984. package/src/crew/library/entries/stacks/fetch-timeout-abort.json +38 -0
  985. package/src/crew/library/entries/stacks/geolocation-permission.json +37 -0
  986. package/src/crew/library/entries/stacks/html-semantic-skeleton.json +51 -0
  987. package/src/crew/library/entries/stacks/indexeddb-wrapper.json +36 -0
  988. package/src/crew/library/entries/stacks/intersection-observer-uses.json +36 -0
  989. package/src/crew/library/entries/stacks/json-file-database.json +40 -0
  990. package/src/crew/library/entries/stacks/json-schema-format.json +38 -0
  991. package/src/crew/library/entries/stacks/makefile-task-runner.json +37 -0
  992. package/src/crew/library/entries/stacks/node-child-process.json +40 -0
  993. package/src/crew/library/entries/stacks/node-cli-parseargs.json +40 -0
  994. package/src/crew/library/entries/stacks/node-cors-preflight.json +38 -0
  995. package/src/crew/library/entries/stacks/node-file-watcher.json +40 -0
  996. package/src/crew/library/entries/stacks/node-folder-batch-script.json +42 -0
  997. package/src/crew/library/entries/stacks/node-http-crud-api.json +45 -0
  998. package/src/crew/library/entries/stacks/node-rate-limit.json +40 -0
  999. package/src/crew/library/entries/stacks/node-readline-prompts.json +39 -0
  1000. package/src/crew/library/entries/stacks/node-scheduled-jobs.json +39 -0
  1001. package/src/crew/library/entries/stacks/node-server-sent-events.json +39 -0
  1002. package/src/crew/library/entries/stacks/node-static-file-server.json +41 -0
  1003. package/src/crew/library/entries/stacks/node-streams-large-files.json +39 -0
  1004. package/src/crew/library/entries/stacks/node-test-suite.json +40 -0
  1005. package/src/crew/library/entries/stacks/package-json-scripts.json +37 -0
  1006. package/src/crew/library/entries/stacks/password-hashing-scrypt.json +40 -0
  1007. package/src/crew/library/entries/stacks/pwa-manifest-install.json +40 -0
  1008. package/src/crew/library/entries/stacks/python-argparse-cli.json +39 -0
  1009. package/src/crew/library/entries/stacks/python-csv-module.json +41 -0
  1010. package/src/crew/library/entries/stacks/python-dataclasses-models.json +39 -0
  1011. package/src/crew/library/entries/stacks/python-http-server-api.json +38 -0
  1012. package/src/crew/library/entries/stacks/python-logging-setup.json +39 -0
  1013. package/src/crew/library/entries/stacks/python-pathlib-files.json +41 -0
  1014. package/src/crew/library/entries/stacks/python-re-text-processing.json +39 -0
  1015. package/src/crew/library/entries/stacks/python-unittest-suite.json +40 -0
  1016. package/src/crew/library/entries/stacks/python-urllib-client.json +40 -0
  1017. package/src/crew/library/entries/stacks/python-venv-setup-notes.json +42 -0
  1018. package/src/crew/library/entries/stacks/regex-writing-testing.json +37 -0
  1019. package/src/crew/library/entries/stacks/service-worker-offline.json +36 -0
  1020. package/src/crew/library/entries/stacks/shell-script-strict.json +38 -0
  1021. package/src/crew/library/entries/stacks/sql-portable-queries.json +39 -0
  1022. package/src/crew/library/entries/stacks/svg-icons-handwritten.json +39 -0
  1023. package/src/crew/library/entries/stacks/web-audio-sounds.json +37 -0
  1024. package/src/crew/library/entries/stacks/web-component-custom-element.json +38 -0
  1025. package/src/crew/library/entries/stacks/web-worker-offload.json +36 -0
  1026. package/src/crew/library/entries/tools/cli-batch-plan-dry-run.json +38 -0
  1027. package/src/crew/library/entries/tools/cli-color-no-color.json +38 -0
  1028. package/src/crew/library/entries/tools/cli-config-precedence.json +39 -0
  1029. package/src/crew/library/entries/tools/cli-cross-platform-paths.json +38 -0
  1030. package/src/crew/library/entries/tools/cli-exit-codes-stderr.json +39 -0
  1031. package/src/crew/library/entries/tools/cli-help-from-option-table.json +39 -0
  1032. package/src/crew/library/entries/tools/cli-package-bin-shebang.json +40 -0
  1033. package/src/crew/library/entries/tools/cli-progress-output.json +38 -0
  1034. package/src/crew/library/entries/tools/cli-prompts-noninteractive.json +38 -0
  1035. package/src/crew/library/entries/tools/cli-stdin-pipes.json +39 -0
  1036. package/src/crew/library/entries/tools/cli-subcommands-parseargs.json +39 -0
  1037. package/src/crew/library/entries/tools/cli-tests-spawn-binary.json +39 -0
  1038. package/src/crew/library/entries/tools/ext-content-scripts-isolation.json +39 -0
  1039. package/src/crew/library/entries/tools/ext-context-menu-items.json +37 -0
  1040. package/src/crew/library/entries/tools/ext-csp-no-remote-code.json +39 -0
  1041. package/src/crew/library/entries/tools/ext-keyboard-commands.json +37 -0
  1042. package/src/crew/library/entries/tools/ext-logic-node-tests.json +39 -0
  1043. package/src/crew/library/entries/tools/ext-messaging.json +38 -0
  1044. package/src/crew/library/entries/tools/ext-minimal-permissions.json +38 -0
  1045. package/src/crew/library/entries/tools/ext-mv3-skeleton.json +38 -0
  1046. package/src/crew/library/entries/tools/ext-options-page.json +40 -0
  1047. package/src/crew/library/entries/tools/ext-popup-ui.json +41 -0
  1048. package/src/crew/library/entries/tools/ext-storage-quotas.json +39 -0
  1049. package/src/crew/library/entries/tools/ext-store-review-checklist.json +39 -0
  1050. package/src/crew/library/entries/tools/python-cli-argparse-tests.json +40 -0
  1051. package/src/crew/library/entries/ui-components/accordion-disclosure.json +42 -0
  1052. package/src/crew/library/entries/ui-components/alert-banner.json +41 -0
  1053. package/src/crew/library/entries/ui-components/announcement-bar.json +41 -0
  1054. package/src/crew/library/entries/ui-components/avatar-badge.json +40 -0
  1055. package/src/crew/library/entries/ui-components/back-to-top-button.json +38 -0
  1056. package/src/crew/library/entries/ui-components/breadcrumb-trail.json +38 -0
  1057. package/src/crew/library/entries/ui-components/card-grid.json +41 -0
  1058. package/src/crew/library/entries/ui-components/carousel-accessible.json +40 -0
  1059. package/src/crew/library/entries/ui-components/combobox-autocomplete.json +40 -0
  1060. package/src/crew/library/entries/ui-components/command-palette.json +41 -0
  1061. package/src/crew/library/entries/ui-components/comment-thread.json +42 -0
  1062. package/src/crew/library/entries/ui-components/contact-card-vcard.json +41 -0
  1063. package/src/crew/library/entries/ui-components/context-menu.json +37 -0
  1064. package/src/crew/library/entries/ui-components/cookie-consent-banner.json +43 -0
  1065. package/src/crew/library/entries/ui-components/copy-to-clipboard-button.json +38 -0
  1066. package/src/crew/library/entries/ui-components/date-time-inputs.json +39 -0
  1067. package/src/crew/library/entries/ui-components/dropdown-menu-button.json +40 -0
  1068. package/src/crew/library/entries/ui-components/empty-state.json +41 -0
  1069. package/src/crew/library/entries/ui-components/faq-section-jsonld.json +37 -0
  1070. package/src/crew/library/entries/ui-components/file-upload-dropzone.json +42 -0
  1071. package/src/crew/library/entries/ui-components/form-layout-grid.json +42 -0
  1072. package/src/crew/library/entries/ui-components/hero-section.json +43 -0
  1073. package/src/crew/library/entries/ui-components/image-gallery-lightbox.json +41 -0
  1074. package/src/crew/library/entries/ui-components/inline-validation-field.json +44 -0
  1075. package/src/crew/library/entries/ui-components/keyboard-shortcuts-dialog.json +39 -0
  1076. package/src/crew/library/entries/ui-components/load-more-list.json +40 -0
  1077. package/src/crew/library/entries/ui-components/modal-dialog.json +42 -0
  1078. package/src/crew/library/entries/ui-components/multi-step-form-wizard.json +42 -0
  1079. package/src/crew/library/entries/ui-components/navbar-responsive.json +44 -0
  1080. package/src/crew/library/entries/ui-components/notification-center.json +40 -0
  1081. package/src/crew/library/entries/ui-components/off-canvas-drawer.json +42 -0
  1082. package/src/crew/library/entries/ui-components/pagination-nav.json +39 -0
  1083. package/src/crew/library/entries/ui-components/popover-panel.json +39 -0
  1084. package/src/crew/library/entries/ui-components/progress-bar-spinner.json +39 -0
  1085. package/src/crew/library/entries/ui-components/quantity-stepper-input.json +41 -0
  1086. package/src/crew/library/entries/ui-components/radio-cards-checkbox-group.json +40 -0
  1087. package/src/crew/library/entries/ui-components/range-slider-input.json +39 -0
  1088. package/src/crew/library/entries/ui-components/share-button-fallback.json +39 -0
  1089. package/src/crew/library/entries/ui-components/sidebar-nav-collapsible.json +43 -0
  1090. package/src/crew/library/entries/ui-components/site-footer.json +43 -0
  1091. package/src/crew/library/entries/ui-components/skeleton-loader.json +38 -0
  1092. package/src/crew/library/entries/ui-components/sortable-data-table.json +42 -0
  1093. package/src/crew/library/entries/ui-components/star-rating-input.json +39 -0
  1094. package/src/crew/library/entries/ui-components/stats-counter-strip.json +40 -0
  1095. package/src/crew/library/entries/ui-components/sticky-mobile-cta-bar.json +41 -0
  1096. package/src/crew/library/entries/ui-components/tabs-widget.json +41 -0
  1097. package/src/crew/library/entries/ui-components/tag-chips-input.json +42 -0
  1098. package/src/crew/library/entries/ui-components/testimonials-block.json +40 -0
  1099. package/src/crew/library/entries/ui-components/toast-notifications.json +41 -0
  1100. package/src/crew/library/entries/ui-components/toggle-switch.json +38 -0
  1101. package/src/crew/library/entries/ui-components/toolbar-buttons.json +41 -0
  1102. package/src/crew/library/entries/ui-components/tooltip-hint.json +39 -0
  1103. package/src/crew/library/entries/ui-components/tree-view.json +39 -0
  1104. package/src/crew/library/entries/ui-components/vertical-timeline.json +39 -0
  1105. package/src/crew/library/entries/ui-components/video-embed-responsive.json +40 -0
  1106. package/src/crew/library/entries/web-pages/about-page.json +48 -0
  1107. package/src/crew/library/entries/web-pages/agency-services-page.json +49 -0
  1108. package/src/crew/library/entries/web-pages/animal-adoption-site.json +49 -0
  1109. package/src/crew/library/entries/web-pages/app-promo-page.json +49 -0
  1110. package/src/crew/library/entries/web-pages/bakery-site.json +50 -0
  1111. package/src/crew/library/entries/web-pages/band-music-site.json +50 -0
  1112. package/src/crew/library/entries/web-pages/blog-home.json +47 -0
  1113. package/src/crew/library/entries/web-pages/blog-post.json +49 -0
  1114. package/src/crew/library/entries/web-pages/cafe-site.json +49 -0
  1115. package/src/crew/library/entries/web-pages/careers-page.json +47 -0
  1116. package/src/crew/library/entries/web-pages/clinic-site.json +50 -0
  1117. package/src/crew/library/entries/web-pages/community-club-site.json +47 -0
  1118. package/src/crew/library/entries/web-pages/contact-page.json +49 -0
  1119. package/src/crew/library/entries/web-pages/course-page.json +50 -0
  1120. package/src/crew/library/entries/web-pages/docs-site.json +50 -0
  1121. package/src/crew/library/entries/web-pages/event-page.json +50 -0
  1122. package/src/crew/library/entries/web-pages/gym-fitness-site.json +50 -0
  1123. package/src/crew/library/entries/web-pages/help-center-page.json +46 -0
  1124. package/src/crew/library/entries/web-pages/hotel-stay-site.json +51 -0
  1125. package/src/crew/library/entries/web-pages/html-email.json +40 -0
  1126. package/src/crew/library/entries/web-pages/landing-page.json +49 -0
  1127. package/src/crew/library/entries/web-pages/legal-policy-page.json +46 -0
  1128. package/src/crew/library/entries/web-pages/link-in-bio-page.json +47 -0
  1129. package/src/crew/library/entries/web-pages/maintenance-page.json +44 -0
  1130. package/src/crew/library/entries/web-pages/multi-page-site.json +49 -0
  1131. package/src/crew/library/entries/web-pages/newsletter-archive-page.json +49 -0
  1132. package/src/crew/library/entries/web-pages/nonprofit-donation-page.json +50 -0
  1133. package/src/crew/library/entries/web-pages/not-found-404.json +45 -0
  1134. package/src/crew/library/entries/web-pages/one-page-scroll-site.json +47 -0
  1135. package/src/crew/library/entries/web-pages/podcast-site.json +48 -0
  1136. package/src/crew/library/entries/web-pages/portfolio-creative.json +48 -0
  1137. package/src/crew/library/entries/web-pages/portfolio-developer.json +50 -0
  1138. package/src/crew/library/entries/web-pages/pricing-page.json +48 -0
  1139. package/src/crew/library/entries/web-pages/printable-page.json +47 -0
  1140. package/src/crew/library/entries/web-pages/product-detail-page.json +50 -0
  1141. package/src/crew/library/entries/web-pages/product-updates-page.json +45 -0
  1142. package/src/crew/library/entries/web-pages/qr-menu-page.json +47 -0
  1143. package/src/crew/library/entries/web-pages/real-estate-listing.json +51 -0
  1144. package/src/crew/library/entries/web-pages/recipe-page.json +47 -0
  1145. package/src/crew/library/entries/web-pages/restaurant-site.json +50 -0
  1146. package/src/crew/library/entries/web-pages/resume-page.json +48 -0
  1147. package/src/crew/library/entries/web-pages/salon-booking-site.json +52 -0
  1148. package/src/crew/library/entries/web-pages/sign-in-page.json +50 -0
  1149. package/src/crew/library/entries/web-pages/status-page.json +49 -0
  1150. package/src/crew/library/entries/web-pages/store-catalog.json +50 -0
  1151. package/src/crew/library/entries/web-pages/store-locator-page.json +47 -0
  1152. package/src/crew/library/entries/web-pages/thank-you-page.json +46 -0
  1153. package/src/crew/library/entries/web-pages/trades-business-site.json +50 -0
  1154. package/src/crew/library/entries/web-pages/travel-guide-page.json +48 -0
  1155. package/src/crew/library/entries/web-pages/waitlist-page.json +50 -0
  1156. package/src/crew/library/entries/web-pages/wedding-site.json +50 -0
  1157. package/src/crew/library/hook.js +295 -0
  1158. package/src/crew/library/index.js +245 -0
  1159. package/src/crew/library/select.js +366 -0
  1160. package/src/crew/planner.js +17 -12
  1161. package/src/crew/prompts/index.js +10 -4
  1162. package/src/crew/prompts/roles.js +51 -0
  1163. package/src/crew/say.js +41 -0
  1164. package/src/crew/scheduler.js +25 -4
  1165. package/src/crew/talk.js +192 -0
  1166. package/src/crew/worker.js +5 -1
  1167. package/src/crew/workers.js +16 -0
  1168. package/src/demo.js +11 -4
  1169. package/src/doctor.js +6 -1
  1170. package/src/extensions/create.js +3 -1
  1171. package/src/extensions/index.js +11 -5
  1172. package/src/extensions/sandbox.js +81 -56
  1173. package/src/github/git.js +114 -1
  1174. package/src/github/index.js +7 -2
  1175. package/src/index.js +179 -19
  1176. package/src/lend/guard.js +115 -7
  1177. package/src/lend/index.js +82 -12
  1178. package/src/lend/share.js +73 -0
  1179. package/src/p2p/audit.js +147 -0
  1180. package/src/p2p/caps.js +193 -0
  1181. package/src/p2p/city-port.js +92 -0
  1182. package/src/p2p/cli.js +300 -0
  1183. package/src/p2p/compute-link.js +101 -0
  1184. package/src/p2p/doctor.js +233 -0
  1185. package/src/p2p/encoding.js +50 -0
  1186. package/src/p2p/engine.js +268 -0
  1187. package/src/p2p/handshake.js +339 -0
  1188. package/src/p2p/identity.js +195 -0
  1189. package/src/p2p/invites.js +170 -0
  1190. package/src/p2p/keyfile.js +119 -0
  1191. package/src/p2p/messages.js +184 -0
  1192. package/src/p2p/node.js +926 -0
  1193. package/src/p2p/peers.js +209 -0
  1194. package/src/p2p/pool-port.js +119 -0
  1195. package/src/p2p/primitives.js +129 -0
  1196. package/src/p2p/remote-port.js +265 -0
  1197. package/src/p2p/session.js +282 -0
  1198. package/src/p2p/transport/base.js +70 -0
  1199. package/src/p2p/transport/browser-pipe.js +85 -0
  1200. package/src/p2p/transport/index.js +7 -0
  1201. package/src/p2p/transport/inproc.js +57 -0
  1202. package/src/p2p/transport/ws-lan.js +88 -0
  1203. package/src/p2p/workbench-port.js +116 -0
  1204. package/src/phone/hub.js +621 -0
  1205. package/src/phone/index.js +85 -0
  1206. package/src/phone/pipe.js +79 -0
  1207. package/src/phone/port.js +187 -0
  1208. package/src/phone/store.js +123 -0
  1209. package/src/phone/view.js +140 -0
  1210. package/src/profile/index.js +203 -0
  1211. package/src/profile/sanitize.js +39 -0
  1212. package/src/remote/address.js +96 -0
  1213. package/src/remote/clipnative.js +119 -0
  1214. package/src/remote/clipsync.js +412 -0
  1215. package/src/remote/desk.js +874 -0
  1216. package/src/remote/helper.js +126 -0
  1217. package/src/remote/index.js +242 -0
  1218. package/src/remote/keys.js +86 -0
  1219. package/src/remote/policy.js +135 -0
  1220. package/src/remote/port.js +61 -0
  1221. package/src/remote/transfer.js +412 -0
  1222. package/src/remote/types.js +35 -0
  1223. package/src/remote/unattended.js +99 -0
  1224. package/src/remote/x11.js +140 -0
  1225. package/src/replay/reduce.js +25 -3
  1226. package/src/server.js +83 -19
  1227. package/src/tasks/commands.js +46 -0
  1228. package/src/tasks/crew-executor.js +134 -0
  1229. package/src/tasks/engine.js +469 -0
  1230. package/src/tasks/state.js +421 -0
  1231. package/src/tools/approvals.js +12 -3
  1232. package/src/tools/index.js +54 -6
  1233. package/src/tools/run.js +10 -1
  1234. package/src/tools/workspace.js +14 -1
  1235. package/src/voice/catalog.js +111 -0
  1236. package/src/voice/index.js +275 -0
  1237. package/src/voice/piper.js +47 -0
  1238. package/src/voice/reply.js +97 -0
  1239. package/src/voice/store.js +149 -0
  1240. package/src/voice/wav.js +59 -0
  1241. package/src/voice/whisper.js +140 -0
  1242. package/src/workbench/docs.js +185 -0
  1243. package/src/workbench/fs.js +214 -0
  1244. package/src/workbench/glob.js +102 -0
  1245. package/src/workbench/index.js +569 -0
  1246. package/src/workbench/match.js +103 -0
  1247. package/src/workbench/origin.js +85 -0
  1248. package/src/workbench/pty.js +223 -0
  1249. package/src/workbench/scm.js +159 -0
  1250. package/src/workbench/search-worker.js +52 -0
  1251. package/src/workbench/search.js +216 -0
  1252. package/src/workbench/settings.js +131 -0
  1253. package/src/workbench/share.js +228 -0
  1254. package/src/workbench/walk.js +57 -0
  1255. package/themes/mel.hivedesk-theme.json +24 -24
  1256. package/ui/changelog/changelog.css +4 -4
  1257. package/ui/city/activity.js +140 -0
  1258. package/ui/city/city.css +274 -131
  1259. package/ui/city/city.js +260 -90
  1260. package/ui/city/collab.js +4 -1
  1261. package/ui/city/compute.js +272 -0
  1262. package/ui/city/hub.js +91 -0
  1263. package/ui/city/layout.js +5 -5
  1264. package/ui/city/machines.js +135 -0
  1265. package/ui/city/model.js +29 -6
  1266. package/ui/city/onboarding.js +122 -0
  1267. package/ui/city/panels.js +394 -0
  1268. package/ui/city/peers.js +164 -0
  1269. package/ui/city/roles.js +10 -0
  1270. package/ui/city/scene.js +685 -869
  1271. package/ui/city/strings.js +32 -0
  1272. package/ui/css/hive.css +308 -376
  1273. package/ui/css/polish.css +85 -98
  1274. package/ui/css/tokens.css +160 -0
  1275. package/ui/css/voice.css +35 -0
  1276. package/ui/editor/editor.css +17 -17
  1277. package/ui/editor/monaco.js +48 -51
  1278. package/ui/editor/register.js +22 -9
  1279. package/ui/editor/vendor/ts/VENDORED.txt +3 -0
  1280. package/ui/editor/vendor/ts/tsMode.js +20 -0
  1281. package/ui/editor/vendor/ts/tsWorker.js +51328 -0
  1282. package/ui/favicon.svg +1 -1
  1283. package/ui/github/github.css +4 -4
  1284. package/ui/index.html +3 -2
  1285. package/ui/js/actions.js +6 -3
  1286. package/ui/js/art.js +113 -0
  1287. package/ui/js/bees.js +60 -137
  1288. package/ui/js/fx.js +9 -62
  1289. package/ui/js/main.js +28 -0
  1290. package/ui/js/onboarding-gate.js +21 -0
  1291. package/ui/js/store.js +5 -0
  1292. package/ui/js/topbar.js +1 -1
  1293. package/ui/js/tour.js +15 -1
  1294. package/ui/js/voice/audio.js +82 -0
  1295. package/ui/js/voice/capture-worklet.js +25 -0
  1296. package/ui/js/voice/conversation.js +177 -0
  1297. package/ui/js/voice/engines.js +64 -0
  1298. package/ui/js/voice/index.js +587 -164
  1299. package/ui/js/voice/intents.js +21 -3
  1300. package/ui/js/voice/mic.js +69 -0
  1301. package/ui/js/voice/questions.js +110 -0
  1302. package/ui/js/voice/sentences.js +59 -0
  1303. package/ui/js/voice/session.js +222 -21
  1304. package/ui/js/voice/speaker.js +129 -0
  1305. package/ui/js/voice/turn.js +107 -0
  1306. package/ui/js/voice/vad.js +70 -0
  1307. package/ui/js/voice/wake.js +41 -0
  1308. package/ui/js/widgets/activity.js +66 -0
  1309. package/ui/js/widgets/approvals.js +3 -0
  1310. package/ui/js/widgets/brief.js +9 -6
  1311. package/ui/js/widgets/chat.js +43 -7
  1312. package/ui/js/widgets/library-strings.js +173 -0
  1313. package/ui/js/widgets/library-used.js +118 -0
  1314. package/ui/js/widgets/library.js +143 -0
  1315. package/ui/js/widgets/machines.js +31 -0
  1316. package/ui/js/widgets/providers.js +1 -1
  1317. package/ui/js/widgets/question.js +295 -0
  1318. package/ui/js/widgets/settings.js +14 -1
  1319. package/ui/lend/collab/client.js +1 -1
  1320. package/ui/lend/collab/roles.js +19 -16
  1321. package/ui/lend/core/bridge.js +18 -5
  1322. package/ui/lend/core/frames.js +20 -0
  1323. package/ui/lend/core/p2p-pipe.js +213 -0
  1324. package/ui/lend/core/pairing.js +4 -2
  1325. package/ui/lend/index.html +1 -0
  1326. package/ui/lend/join-window.js +9 -0
  1327. package/ui/lend/lend-screen.js +14 -1
  1328. package/ui/lend/lend.css +23 -7
  1329. package/ui/lend/p2p-model.js +103 -0
  1330. package/ui/lend/p2p-screen.js +228 -0
  1331. package/ui/lend/p2p-text.js +86 -0
  1332. package/ui/manifest.webmanifest +2 -2
  1333. package/ui/models/index.js +304 -0
  1334. package/ui/models/models.css +112 -0
  1335. package/ui/models/strings/de.json +232 -0
  1336. package/ui/models/strings/en.json +232 -0
  1337. package/ui/models/strings/es.json +232 -0
  1338. package/ui/models/strings/fr.json +232 -0
  1339. package/ui/models/strings/it.json +232 -0
  1340. package/ui/models/strings/ja.json +232 -0
  1341. package/ui/models/strings/ko.json +232 -0
  1342. package/ui/models/strings/pt-BR.json +232 -0
  1343. package/ui/models/strings/ru.json +232 -0
  1344. package/ui/models/strings/zh-CN.json +232 -0
  1345. package/ui/models/t.js +41 -0
  1346. package/ui/models/window.js +432 -0
  1347. package/ui/office/office.css +89 -91
  1348. package/ui/office/office.js +48 -23
  1349. package/ui/office/popout.js +1 -1
  1350. package/ui/office/scene.js +472 -779
  1351. package/ui/offline.html +5 -5
  1352. package/ui/phone/bridge.js +39 -0
  1353. package/ui/phone/core/client.js +240 -0
  1354. package/ui/phone/core/connect.js +195 -0
  1355. package/ui/phone/core/crypto.js +211 -0
  1356. package/ui/phone/core/grants.js +45 -0
  1357. package/ui/phone/core/handshake.js +353 -0
  1358. package/ui/phone/core/invite.js +55 -0
  1359. package/ui/phone/core/messages.js +85 -0
  1360. package/ui/phone/core/session.js +160 -0
  1361. package/ui/phone/desktop.js +244 -0
  1362. package/ui/phone/phone.css +36 -0
  1363. package/ui/phone/strings.js +45 -0
  1364. package/ui/profile/achievements.js +96 -0
  1365. package/ui/profile/avatars.js +68 -0
  1366. package/ui/profile/profile.css +53 -0
  1367. package/ui/profile/stats.js +148 -0
  1368. package/ui/profile/ui.js +207 -0
  1369. package/ui/remote/abr.js +73 -0
  1370. package/ui/remote/common.js +107 -0
  1371. package/ui/remote/digits.js +20 -0
  1372. package/ui/remote/home.js +148 -0
  1373. package/ui/remote/host.js +259 -0
  1374. package/ui/remote/index.js +107 -0
  1375. package/ui/remote/media.js +180 -0
  1376. package/ui/remote/pipes.js +64 -0
  1377. package/ui/remote/pointer.js +67 -0
  1378. package/ui/remote/remote.css +88 -0
  1379. package/ui/remote/strings.js +173 -0
  1380. package/ui/remote/viewer.js +267 -0
  1381. package/ui/themes/core.js +21 -21
  1382. package/ui/themes/themes.css +19 -19
  1383. package/ui/widget.css +13 -16
  1384. package/ui/widget.html +3 -2
  1385. package/ui/widget.js +2 -2
  1386. package/ui/workbench/commands.js +141 -0
  1387. package/ui/workbench/dialogs.js +107 -0
  1388. package/ui/workbench/editors.js +911 -0
  1389. package/ui/workbench/explorer.js +419 -0
  1390. package/ui/workbench/layout.js +203 -0
  1391. package/ui/workbench/models.js +105 -0
  1392. package/ui/workbench/net.js +26 -0
  1393. package/ui/workbench/problems.js +94 -0
  1394. package/ui/workbench/quick.js +98 -0
  1395. package/ui/workbench/scmview.js +190 -0
  1396. package/ui/workbench/searchview.js +215 -0
  1397. package/ui/workbench/session.js +162 -0
  1398. package/ui/workbench/settingsview.js +89 -0
  1399. package/ui/workbench/strings.js +26 -0
  1400. package/ui/workbench/terminal.js +314 -0
  1401. package/ui/workbench/theme.js +153 -0
  1402. package/ui/workbench/util.js +128 -0
  1403. package/ui/workbench/vendor/xterm/LICENSE +21 -0
  1404. package/ui/workbench/vendor/xterm/VENDORED.txt +3 -0
  1405. package/ui/workbench/vendor/xterm/addon-fit.js +2 -0
  1406. package/ui/workbench/vendor/xterm/xterm.css +218 -0
  1407. package/ui/workbench/vendor/xterm/xterm.js +2 -0
  1408. package/ui/workbench/workbench.css +388 -0
  1409. package/ui/workbench/workbench.js +712 -0
  1410. package/ui/screenshots/city-agent-card-1440.png +0 -0
  1411. package/ui/screenshots/city-agent-card-1920.png +0 -0
  1412. package/ui/screenshots/city-bridge-gpu-borrow-1440.png +0 -0
  1413. package/ui/screenshots/city-bridge-gpu-borrow-1920.png +0 -0
  1414. package/ui/screenshots/city-friend-rising-1440.png +0 -0
  1415. package/ui/screenshots/city-friend-rising-1920.png +0 -0
  1416. package/ui/screenshots/city-overview-1440.png +0 -0
  1417. package/ui/screenshots/city-overview-1920.png +0 -0
  1418. package/ui/screenshots/city-review-room-1440.png +0 -0
  1419. package/ui/screenshots/city-review-room-1920.png +0 -0
  1420. package/ui/screenshots/hive-1440-de.png +0 -0
  1421. package/ui/screenshots/hive-1440-ja.png +0 -0
  1422. package/ui/screenshots/hive-1440-job-running.png +0 -0
  1423. package/ui/screenshots/hive-1440-model-download.png +0 -0
  1424. package/ui/screenshots/hive-1440-pt-BR.png +0 -0
  1425. package/ui/screenshots/hive-1440-tooltip.png +0 -0
  1426. package/ui/screenshots/hive-1440-tour-step1.png +0 -0
  1427. package/ui/screenshots/hive-1440-tour-step5.png +0 -0
  1428. package/ui/screenshots/hive-1920-context-menu.png +0 -0
  1429. package/ui/screenshots/hive-1920-desktop-menu.png +0 -0
  1430. package/ui/screenshots/hive-1920-hire.png +0 -0
  1431. package/ui/screenshots/hive-1920-job-running.png +0 -0
  1432. package/ui/screenshots/hive-1920-palette.png +0 -0
  1433. package/ui/screenshots/hive-1920-replay.png +0 -0
  1434. package/ui/screenshots/hive-375-phone.png +0 -0
  1435. package/ui/screenshots/office-1440-approval.png +0 -0
  1436. package/ui/screenshots/office-1440-celebrate.png +0 -0
  1437. package/ui/screenshots/office-1440-working.png +0 -0
  1438. package/ui/screenshots/office-1920-approval.png +0 -0
  1439. package/ui/screenshots/office-1920-celebrate.png +0 -0
  1440. package/ui/screenshots/office-1920-working.png +0 -0
  1441. package/ui/screenshots/office-widget.png +0 -0
@@ -1,13 +1,15 @@
1
- // The Office: an isometric honeycomb office floor drawn on one canvas.
2
- // Every pose comes from the engine state (worker.status, tasks, queue) and every effect
3
- // (hand offs, speech bubbles, test results, confetti) from a real engine event.
4
- // Shared by the full Office mode and the mini widget.
1
+ // The Office: the crew's floor as a refined isometric room drawn on one canvas
2
+ // (docs/1.0/DESIGN.md, section 6). Every pose comes from the engine state (worker.status, tasks,
3
+ // queue) and every effect (hand offs, speech bubbles, check marks, success pulses) from a real
4
+ // engine event. Shared by the full Office mode and the mini widget. Colors come from the theme
5
+ // tokens through ui/js/art.js.
5
6
 
6
7
  import { beeSvg } from '/js/bees.js';
8
+ import { hub } from '/city/hub.js';
9
+ import { artTokens, worldPalette, statusColor, tone, mixHex, alpha, shade, rgb } from '/js/art.js';
7
10
 
8
- const FONT = '"Segoe UI Variable Text","Segoe UI",system-ui,-apple-system,sans-serif';
9
- const MONO = 'ui-monospace,"Cascadia Code",Consolas,monospace';
10
- const OUT = '#24160C';
11
+ const FONT = '"Inter","Segoe UI Variable Text","Segoe UI",system-ui,-apple-system,sans-serif';
12
+ const MONO = '"JetBrains Mono","Cascadia Mono","Cascadia Code",ui-monospace,Consolas,monospace';
11
13
 
12
14
  // World: x runs to the lower right, y to the lower left, z is up. One unit is one floor tile.
13
15
  const RX = 14;
@@ -27,49 +29,16 @@ const NOTE_H = 0.3;
27
29
  const COLS = ['To do', 'Doing', 'Done'];
28
30
  const COL_OF = { pending: 0, ready: 0, blocked: 0, running: 1, review: 1, failed: 1, done: 2, skipped: 2 };
29
31
  const ACTIVE = new Set(['refining', 'awaiting_brief', 'planning', 'running']);
30
- const KIND = { mel: 'mel', dev: 'dev', designer: 'designer', qa: 'qa', writer: 'writer' };
31
-
32
- const GLYPHS = {
33
- dev: ['{ }', '</>', '=>', '( )', ';', '01', 'fn', '[ ]', '++', '&&'],
34
- designer: ['#', 'px', 'rem', ':root', 'rgb', 'em'],
35
- writer: ['Aa', '##', 'md', 'abc', '...', 'txt'],
36
- qa: ['ok?', 'assert', '==', '!', 'test'],
37
- mel: ['plan', '1.', '2.', '3.'],
38
- hired: ['{ }', 'Aa', '01', '=>'],
39
- };
40
-
41
- /* ---------- small math and color helpers ---------- */
32
+
33
+ /* ---------- small math helpers ---------- */
42
34
  const clamp = (v, a = 0, b = 1) => (v < a ? a : v > b ? b : v);
43
35
  const lerp = (a, b, t) => a + (b - a) * t;
44
36
  const easeInOut = (t) => (t < 0.5 ? 4 * t * t * t : 1 - Math.pow(-2 * t + 2, 3) / 2);
45
37
  const easeOut = (t) => 1 - Math.pow(1 - t, 3);
46
- const easeOutBack = (t) => { const c1 = 1.70158; const c3 = c1 + 1; return 1 + c3 * Math.pow(t - 1, 3) + c1 * Math.pow(t - 1, 2); };
47
38
  const rnd = (a, b) => a + Math.random() * (b - a);
48
39
  const pick = (arr) => arr[(Math.random() * arr.length) | 0];
49
40
 
50
- function rgb(hex) {
51
- const m = /^#?([0-9a-f]{6})$/i.exec(hex || '');
52
- const v = m ? parseInt(m[1], 16) : 0xffb531;
53
- return [v >> 16, (v >> 8) & 255, v & 255];
54
- }
55
- function mixHex(a, b, t) {
56
- const A = rgb(a); const B = rgb(b);
57
- const c = A.map((x, i) => Math.round(lerp(x, B[i], t)));
58
- return `#${((1 << 24) | (c[0] << 16) | (c[1] << 8) | c[2]).toString(16).slice(1)}`;
59
- }
60
- function alpha(hex, a) { const [r, g, b] = rgb(hex); return `rgba(${r},${g},${b},${a})`; }
61
- const shade = (hex, t) => (t < 0 ? mixHex(hex, '#000000', -t) : mixHex(hex, '#ffffff', t));
62
-
63
41
  /* ---------- day and night ---------- */
64
- const DAY = {
65
- floorA: '#8C6743', floorB: '#835F3D', floorC: '#946E48', grout: '#634629', rug: '#E8A93A',
66
- slabL: '#4B3625', slabR: '#3A2A1C', wallL: '#F0E3C9', wallR: '#E2D1B2', wainL: '#B98A5B', wainR: '#A67A4E',
67
- trim: '#7A5636', comb: '#C9A979', deskTop: '#ECD6AA', deskL: '#D2B07A', deskR: '#B99560', panel: '#94724A',
68
- board: '#FBF6EA', frame: '#7A5636', bg0: '#1A1511', bg1: '#0E0C0A',
69
- };
70
- const NIGHT_TINT = '#141A2B';
71
- const DUSK_TINT = '#FF9A55';
72
-
73
42
  /** 0 at noon, 1 at night. */
74
43
  export function nightFactor(h) {
75
44
  if (h >= 8 && h <= 16.5) return 0;
@@ -128,7 +97,7 @@ export class OfficeScene {
128
97
  this.noteHits = [];
129
98
  this.highlight = null;
130
99
  this.dragTask = null;
131
- this.stars = Array.from({ length: 26 }, (_, i) => ({ u: ((i * 73) % 97) / 97, t: ((i * 41) % 61) / 61, r: 0.6 + ((i * 7) % 5) / 5, ph: i }));
100
+ this.stars = Array.from({ length: 18 }, (_, i) => ({ u: ((i * 73) % 97) / 97, t: ((i * 41) % 61) / 61, r: 0.6 + ((i * 7) % 5) / 5, ph: i }));
132
101
  this.palAt = -1;
133
102
  }
134
103
 
@@ -161,7 +130,7 @@ export class OfficeScene {
161
130
  const height = span * this.b + (WALL + SLAB) * this.c;
162
131
  this.ox = pad.l + (w - pad.l - pad.r - width) / 2 + RY * a;
163
132
  this.oy = pad.t + (h - pad.t - pad.b - height) / 2 + WALL * this.c;
164
- this.k = (a * 1.45) / 64; // bee sprite scale: px per SVG unit
133
+ this.k = (a * 1.25) / 64; // bee sprite scale: px per SVG unit
165
134
  this.buildPaths();
166
135
  this.bgGrad = null;
167
136
  if (!this.running) this.draw();
@@ -173,7 +142,7 @@ export class OfficeScene {
173
142
  /* ---------- state sync ---------- */
174
143
  reduced() { return this.reducedFn(); }
175
144
 
176
- /** Creates and removes actors to match the crew. `animate` builds new desks with a little show. */
145
+ /** Creates and removes actors to match the crew. `animate` walks new hires in through the door. */
177
146
  syncCrew(animate = false) {
178
147
  const s = this.getState();
179
148
  const seen = new Set();
@@ -205,15 +174,15 @@ export class OfficeScene {
205
174
  id: w.id, w, isMel, slot, desk, home,
206
175
  pos: { ...home }, mode: 'idle', modeSince: this.now, pending: null, pendingSince: 0,
207
176
  status: 'idle', idleSince: this.now - 60000, route: [], seg: null, item: null,
208
- bubble: null, badge: null, hopAt: -9, squashAt: -9, blinkAt: this.now + rnd(1, 4), ph: Math.random() * 6.28,
177
+ bubble: null, badge: null, hopAt: -9, squashAt: -9, ph: Math.random() * 6.28,
209
178
  nextGlyph: 0, nextZ: 0, nextBubble: 0, alpha: 1, fadeAt: -9, build: animate ? this.now : -9, leaving: false,
210
179
  level: 1, sx: 0, sy: 0,
211
180
  };
212
181
  if (animate && !this.reduced()) {
213
182
  a.pos = { ...DOOR };
214
183
  a.alpha = 0;
215
- a.fadeAt = this.now + 1.4;
216
- a.route.push({ to: { ...home }, dur: 1.6, lift: 0.9, delay: 1.5 });
184
+ a.fadeAt = this.now + 0.6;
185
+ a.route.push({ to: { ...home }, dur: 1.4, lift: 0.5, delay: 0.7 });
217
186
  this.sound('build');
218
187
  }
219
188
  this.actors.set(w.id, a);
@@ -223,7 +192,7 @@ export class OfficeScene {
223
192
  removeActor(a, animate) {
224
193
  if (!animate || this.reduced()) { this.actors.delete(a.id); this.slotOf.delete(a.id); return; }
225
194
  a.leaving = true;
226
- a.route = [{ to: { ...DOOR }, dur: 1.4, lift: 0.8, after: () => { this.actors.delete(a.id); this.slotOf.delete(a.id); } }];
195
+ a.route = [{ to: { ...DOOR }, dur: 1.2, lift: 0.5, after: () => { this.actors.delete(a.id); this.slotOf.delete(a.id); } }];
227
196
  a.seg = null;
228
197
  }
229
198
 
@@ -244,7 +213,6 @@ export class OfficeScene {
244
213
  handle(ev) {
245
214
  const d = ev.data || {};
246
215
  const s = this.getState();
247
- const reduced = this.reduced();
248
216
  switch (ev.type) {
249
217
  case 'crew.hired': case 'crew.updated': case 'crew.fired':
250
218
  this.syncCrew(true);
@@ -271,7 +239,7 @@ export class OfficeScene {
271
239
  case 'brief.approved': {
272
240
  this.briefWait = null; this.briefWrite = null;
273
241
  const mel = this.actors.get('mel');
274
- if (mel) { this.sparkle(mel, 8); this.sound('pop'); }
242
+ if (mel) { this.pulse(mel, 'ok'); this.sound('pop'); }
275
243
  if (d.by !== 'auto') this.melReact('nod');
276
244
  break;
277
245
  }
@@ -284,31 +252,29 @@ export class OfficeScene {
284
252
  case 'job.planned':
285
253
  case 'task.added':
286
254
  this.layoutNotes(false);
287
- if (ev.type === 'task.added' && d.task?.kind === 'fix') {
288
- // QA walks the issue over to whoever fixes it.
289
- const t = s.tasks[d.task.id];
290
- if (t) this.handoff('qa', t.assignee, 'bad');
291
- }
292
255
  break;
256
+ case 'task.handoff': {
257
+ // The task engine says who handed what to whom (PLAN section 10): the bee carries it over.
258
+ const from = d.from || d.fromAgent || d.fromWorker;
259
+ const to = d.to || d.toAgent || d.toWorker;
260
+ if (from && to && from !== to) this.handoff(from, to, d.kind === 'fix' || d.reason === 'rejected' ? 'bad' : 'parcel');
261
+ break;
262
+ }
293
263
  case 'task.status': {
294
264
  this.layoutNotes(false);
295
265
  const t = s.tasks[d.taskId];
296
266
  if (!t) break;
297
267
  const a = this.actors.get(t.assignee);
298
268
  if (d.status === 'done' && a) {
299
- this.honeyJar(a);
300
- this.sparkle(a, 10);
301
- a.hopAt = this.now;
302
- const next = Object.values(s.tasks).filter((x) => x.jobId === t.jobId && (x.dependsOn || []).includes(t.id) && x.assignee !== t.assignee && !['done', 'skipped'].includes(x.status));
303
- const to = [...new Set(next.map((x) => x.assignee))].slice(0, 2);
304
- for (const id of to) this.handoff(t.assignee, id, 'parcel');
269
+ // quiet success: a check mark and one short pulse; the count in the HUD goes up
270
+ a.badge = { kind: 'ok', at: this.now, until: this.now + 1.8 };
271
+ this.pulse(a, 'ok');
272
+ this.opts.onHoney?.();
305
273
  const lv = levelOf(s, t.assignee);
306
- if (lv > (this.levelSeen.get(t.assignee) || 1)) {
274
+ if (lv != null && lv > (this.levelSeen.get(t.assignee) || 1)) {
275
+ // the level is a quiet badge in the name tag, never a burst
307
276
  this.levelSeen.set(t.assignee, lv);
308
277
  a.level = lv;
309
- this.label(a, `Level ${lv}!`, '#FFD072', 1.2);
310
- this.sparkle(a, 14);
311
- this.sound('level');
312
278
  }
313
279
  }
314
280
  if (d.status === 'failed' && a) { a.badge = { kind: 'bad', at: this.now, until: this.now + 3 }; this.sound('fail'); }
@@ -324,10 +290,7 @@ export class OfficeScene {
324
290
  this.calls.set(d.callId, { workerId: d.workerId, tool: d.tool });
325
291
  const a = this.actors.get(d.workerId);
326
292
  if (!a) break;
327
- if (d.tool === 'write_file' || d.tool === 'edit_file') {
328
- for (let i = 0; i < (reduced ? 0 : 6); i++) this.glyph(a, true);
329
- this.sound('type');
330
- }
293
+ if (d.tool === 'write_file' || d.tool === 'edit_file') { a.wroteAt = this.now; this.sound('type'); }
331
294
  break;
332
295
  }
333
296
  case 'tool.result': {
@@ -336,11 +299,13 @@ export class OfficeScene {
336
299
  if (!c) break;
337
300
  const a = this.actors.get(c.workerId);
338
301
  if (!a) break;
339
- if (c.tool === 'check') {
340
- const txt = typeof d.result === 'string' ? d.result : JSON.stringify(d.result || '');
341
- const ok = d.ok && !/issues found/i.test(txt);
342
- a.badge = { kind: ok ? 'ok' : 'bad', at: this.now, until: this.now + 2.6 };
343
- this.sound(ok ? 'pass' : 'fail');
302
+ if (c.tool === 'check' && typeof d.passed === 'boolean') {
303
+ // tool.result.passed: the structured verdict of the checks. Without it no mark is shown.
304
+ a.badge = { kind: d.passed ? 'ok' : 'bad', at: this.now, until: this.now + 2.6 };
305
+ this.sound(d.passed ? 'pass' : 'fail');
306
+ } else if (c.tool === 'check' && !d.ok) {
307
+ a.badge = { kind: 'bad', at: this.now, until: this.now + 2.6 };
308
+ this.sound('fail');
344
309
  }
345
310
  break;
346
311
  }
@@ -354,14 +319,14 @@ export class OfficeScene {
354
319
  const a = this.actors.get('qa') || this.actors.get(s.tasks[d.taskId]?.assignee);
355
320
  if (a) {
356
321
  a.badge = { kind: d.passed ? 'ok' : 'bad', at: this.now, until: this.now + 3.4, big: true };
357
- if (d.passed) this.sparkle(a, 10);
322
+ if (d.passed) this.pulse(a, 'ok');
358
323
  this.sound(d.passed ? 'pass' : 'fail');
359
324
  }
360
325
  break;
361
326
  }
362
327
  case 'file.changed': {
363
328
  const a = this.actors.get(d.workerId);
364
- if (a) this.label(a, `${d.op === 'create' ? '+ ' : ''}${String(d.path || '').split('/').pop()}`, '#BFE3C6', 0.8);
329
+ if (a) this.label(a, `${d.op === 'create' ? '+ ' : ''}${String(d.path || '').split('/').pop()}`, artTokens().text2, 1.2);
365
330
  break;
366
331
  }
367
332
  case 'approval.requested': {
@@ -387,17 +352,12 @@ export class OfficeScene {
387
352
  }
388
353
 
389
354
  /* ---------- effects ---------- */
355
+ /** A finished job: one calm success pulse on every bee. No confetti, no burst. */
390
356
  celebrate() {
391
357
  this.celebrateAt = this.now;
392
- this.celebrateUntil = this.now + 6.5;
358
+ this.celebrateUntil = this.now + 0.6;
393
359
  this.sound('confetti');
394
- if (this.reduced()) return;
395
- const n = this.mini ? 40 : 150;
396
- const colors = ['#FFB531', '#FFD072', '#7DC49B', '#86A9D6', '#FF7AB6', '#F2E9DA', '#E57B6E'];
397
- for (let i = 0; i < n; i++) {
398
- this.spawn({ kind: 'confetti', x: rnd(this.w * 0.1, this.w * 0.9), y: rnd(-80, this.h * 0.15), vx: rnd(-40, 40), vy: rnd(10, 120), g: 140, life: rnd(3.2, 5.5), rot: rnd(0, 6.28), vr: rnd(-6, 6), size: rnd(5, 9), color: pick(colors), hex: Math.random() < 0.5 });
399
- }
400
- for (const a of this.actors.values()) this.sparkle(a, 8);
360
+ for (const a of this.actors.values()) this.pulse(a, 'ok');
401
361
  }
402
362
 
403
363
  /** Mel answers what the user does: a nod on approve, a curious tilt on a new request. */
@@ -405,9 +365,9 @@ export class OfficeScene {
405
365
  const mel = this.actors.get('mel');
406
366
  if (!mel) return;
407
367
  mel.react = { kind, at: this.now };
408
- if (kind === 'nod') { this.sparkle(mel, 6); mel.bubble = { text: pick(['Thanks! On it.', 'Approved. Back to work.', 'Great, moving on.']), at: this.now, until: this.now + 2.6 }; }
409
- if (kind === 'curious') mel.bubble = { text: pick(['Ooh, a new request!', 'Interesting. Let me look.', 'A new job? Let me read it.']), at: this.now, until: this.now + 2.8 };
410
- if (kind === 'shake') mel.bubble = { text: 'Okay, we will skip that.', at: this.now, until: this.now + 2.6 };
368
+ if (kind === 'nod') mel.bubble = { text: pick(['Thanks. On it.', 'Approved. Back to work.', 'Noted, moving on.']), at: this.now, until: this.now + 2.6 };
369
+ if (kind === 'curious') mel.bubble = { text: pick(['A new request. Reading it.', 'New job. Let me look.']), at: this.now, until: this.now + 2.8 };
370
+ if (kind === 'shake') mel.bubble = { text: 'Okay, we skip that.', at: this.now, until: this.now + 2.6 };
411
371
  mel.idleSince = this.now;
412
372
  }
413
373
 
@@ -416,10 +376,11 @@ export class OfficeScene {
416
376
  const b = this.actors.get(toId);
417
377
  if (!a || !b || a === b || a.leaving) return;
418
378
  const spot = this.visitSpot(b);
419
- const color = item === 'bad' ? '#E57B6E' : a.w.color;
379
+ const T = artTokens();
380
+ const color = item === 'bad' ? T.bad : a.w.color;
420
381
  a.route.push(
421
- { to: spot, dur: null, lift: 0.9, item, color, hold: 0.75, onArrive: () => { b.hopAt = this.now; this.sparkle(b, 6); this.sound('pop'); }, dropItem: true },
422
- { to: 'home', dur: null, lift: 0.7 },
382
+ { to: spot, dur: null, lift: 0.5, item, color, hold: 0.5, onArrive: () => { this.pulse(b, 'info'); this.sound('pop'); }, dropItem: true },
383
+ { to: 'home', dur: null, lift: 0.4 },
423
384
  );
424
385
  }
425
386
 
@@ -428,34 +389,23 @@ export class OfficeScene {
428
389
  return { x: b.desk.x + DW / 2 + 0.15, y: b.desk.y + DD + 0.55, z: 1.0 };
429
390
  }
430
391
 
431
- honeyJar(a) {
432
- const target = this.opts.honeyTarget?.();
433
- if (this.reduced() || !target) { this.opts.onHoney?.(); return; }
434
- this.spawn({ kind: 'jar', x0: a.sx, y0: a.sy - 30, x1: target.x, y1: target.y, t: 0, life: 1.25, max: 1.25, done: () => this.opts.onHoney?.() });
435
- }
392
+ /** Kept for the HUD counter hook: a finished task counts at once, nothing flies. */
393
+ honeyJar() { this.opts.onHoney?.(); }
436
394
 
437
395
  label(a, text, color, life = 1.4) {
438
396
  if (this.mini) return;
439
- this.spawn({ kind: 'label', x: a.sx + rnd(-6, 6), y: a.sy - 52 * this.k * 0.9, vy: -22, text, color, life, max: life });
440
- }
441
-
442
- sparkle(a, n) {
443
- for (let i = 0; i < n; i++) this.spawn({ kind: 'spark', x: a.sx + rnd(-26, 26) * this.k * 1.4, y: a.sy + rnd(-30, 10) * this.k * 1.4, vx: rnd(-30, 30), vy: rnd(-60, -10), g: 40, life: rnd(0.5, 1.1), size: rnd(2, 4.5), color: pick(['#FFD072', '#FFFFFF', a.w.color]) });
397
+ this.spawn({ kind: 'label', x: a.sx, y: a.sy - 46 * this.k, vy: -10, text, color, life, max: life });
444
398
  }
445
399
 
446
- glyph(a, burst = false) {
447
- const kind = KIND[a.id] || 'hired';
448
- const base = this.P(a.desk ? a.desk.x + 0.75 : a.pos.x, a.desk ? a.desk.y + 0.3 : a.pos.y, a.desk ? DH + 0.55 : a.pos.z);
449
- if (kind === 'designer' && Math.random() < 0.5) {
450
- this.spawn({ kind: 'dot', x: base[0] + rnd(-14, 14), y: base[1], vx: rnd(-14, 14), vy: rnd(-48, -28), life: rnd(1, 1.6), size: rnd(2.5, 4.5), color: pick(['#FF7AB6', '#6CC4FF', '#FFD072', '#7DC49B']) });
451
- return;
452
- }
453
- this.spawn({ kind: 'glyph', x: base[0] + rnd(-16, 16), y: base[1] - rnd(0, 6), vx: rnd(-10, 10), vy: burst ? rnd(-70, -40) : rnd(-46, -30), life: rnd(1.1, 1.7), text: pick(GLYPHS[kind]), color: a.w.color || '#FFD072', size: this.mini ? 6 : Math.max(9, this.a * 0.2) });
400
+ /** A short ring that grows and fades at the bee's feet: the one shot feedback (at most 400 ms). */
401
+ pulse(a, kind = 'ok') {
402
+ if (this.reduced()) return;
403
+ this.spawn({ kind: 'pulse', id: a.id, tone: kind, life: 0.4, max: 0.4 });
454
404
  }
455
405
 
456
406
  spawn(p) {
457
407
  if (this.reduced() && p.kind !== 'jar') return;
458
- if (this.parts.length > 320) this.parts.shift();
408
+ if (this.parts.length > 120) this.parts.shift();
459
409
  p.age = 0;
460
410
  if (p.max == null) p.max = p.life;
461
411
  this.parts.push(p);
@@ -531,17 +481,18 @@ export class OfficeScene {
531
481
  const job = this.melQueue.shift();
532
482
  const n = job.note;
533
483
  if (this.reduced()) { n.state = 'free'; n.alpha = 1; n.pop = this.now; n.u = n.tu; n.t = n.tt; return; }
484
+ const T = artTokens();
534
485
  if (job.type === 'place') {
535
- mel.route.push({ to: this.notePoint(n, n.tu, n.tt), dur: 0.45 * speed, lift: 0.12, item: 'note', color: n.task?.assignee ? this.actors.get(n.task.assignee)?.w.color : '#FFB531', hold: 0.12 * speed,
486
+ mel.route.push({ to: this.notePoint(n, n.tu, n.tt), dur: 0.45 * speed, lift: 0.08, item: 'note', color: n.task?.assignee ? this.actors.get(n.task.assignee)?.w.color : T.accent, hold: 0.12 * speed,
536
487
  onArrive: () => { n.state = 'free'; n.u = n.tu; n.t = n.tt; n.alpha = 1; n.pop = this.now; this.sound('stick'); }, dropItem: true });
537
488
  } else {
538
489
  mel.route.push(
539
- { to: this.notePoint(n), dur: 0.5 * speed, lift: 0.15, hold: 0.12 * speed, onArrive: () => { n.state = 'carried'; this.sound('peel'); } },
540
- { to: () => this.notePoint(n, n.tu, n.tt), dur: 0.7 * speed, lift: 0.3, item: 'note', color: '#FFE08A', hold: 0.15 * speed,
490
+ { to: this.notePoint(n), dur: 0.5 * speed, lift: 0.1, hold: 0.12 * speed, onArrive: () => { n.state = 'carried'; this.sound('peel'); } },
491
+ { to: () => this.notePoint(n, n.tu, n.tt), dur: 0.7 * speed, lift: 0.2, item: 'note', color: T.accent, hold: 0.15 * speed,
541
492
  onArrive: () => { n.state = 'free'; n.u = n.tu; n.t = n.tt; n.pop = this.now; this.sound('stick'); }, dropItem: true },
542
493
  );
543
494
  }
544
- if (!this.melQueue.length) mel.route.push({ to: 'home', dur: null, lift: 0.25, delay: 0.3 });
495
+ if (!this.melQueue.length) mel.route.push({ to: 'home', dur: null, lift: 0.15, delay: 0.3 });
545
496
  }
546
497
 
547
498
  /* ---------- per frame update ---------- */
@@ -562,7 +513,7 @@ export class OfficeScene {
562
513
 
563
514
  isCalm() {
564
515
  if (this.parts.length || this.melQueue.length || this.now < this.celebrateUntil) return false;
565
- for (const a of this.actors.values()) if (a.seg || a.route.length || (a.mode !== 'sleep' && a.mode !== 'idle' && a.mode !== 'paused')) return false;
516
+ for (const a of this.actors.values()) if (a.seg || a.route.length || a.badge || (a.mode !== 'sleep' && a.mode !== 'idle' && a.mode !== 'paused')) return false;
566
517
  return true;
567
518
  }
568
519
 
@@ -574,18 +525,17 @@ export class OfficeScene {
574
525
  this.briefWaiting = !!this.briefWait || (s.jobs || []).some((j) => j.status === 'awaiting_brief');
575
526
  this.briefWriting = !!this.briefWrite || (s.jobs || []).some((j) => j.status === 'refining');
576
527
  this.pumpMel();
577
- // with nothing to do, Mel chats now and then so the office never feels frozen
528
+ // with nothing to do, Mel says something useful now and then
578
529
  const mel = this.actors.get('mel');
579
530
  if (mel && !jobRunning && !this.mini && !mel.seg && !mel.bubble) {
580
531
  if (!this.nextIdleTalk) this.nextIdleTalk = now + 6;
581
532
  if (now > this.nextIdleTalk) {
582
533
  const lines = (s.jobs || []).length
583
- ? ['Nice work today, crew.', 'Board is clear. What is next?', 'I could use another job.', 'Honey stocks look good.']
584
- : ['Quiet day. Want to build something?', 'Type a request in the box above.', 'The crew is ready when you are.', 'A landing page? A small app? Just ask.'];
534
+ ? ['Board is clear. What is next?', 'The crew is free for another job.', 'Everything on the board is done.']
535
+ : ['Type a request in the box above.', 'The crew is ready when you are.', 'A landing page or a small app: just ask.'];
585
536
  mel.bubble = { text: pick(lines), at: now, until: now + 4 };
586
537
  mel.idleSince = now;
587
- mel.react = { kind: 'curious', at: now };
588
- this.nextIdleTalk = now + rnd(24, 34);
538
+ this.nextIdleTalk = now + rnd(28, 40);
589
539
  }
590
540
  }
591
541
  let typing = 0;
@@ -614,11 +564,11 @@ export class OfficeScene {
614
564
  a.route.shift();
615
565
  const to = typeof next.to === 'function' ? next.to() : next.to === 'home' ? { ...a.home } : next.to;
616
566
  const dist = Math.hypot(to.x - a.pos.x, to.y - a.pos.y);
617
- const dur = reduced ? 0 : next.dur ?? clamp(0.55 + dist * 0.12, 0.6, 2.2);
618
- a.seg = { ...next, from: { ...a.pos }, to, t0: now, dur, lift: (next.lift ?? 0.8) + dist * 0.05 };
567
+ const dur = reduced ? 0 : next.dur ?? clamp(0.6 + dist * 0.12, 0.6, 2);
568
+ a.seg = { ...next, from: { ...a.pos }, to, t0: now, dur, lift: (next.lift ?? 0.5) + dist * 0.03 };
619
569
  a.item = next.item || null;
620
570
  a.itemColor = next.color;
621
- if (dur > 0) { a.squashAt = now; this.sound('whoosh'); }
571
+ if (dur > 0) this.sound('whoosh');
622
572
  else a.fadeAt = now;
623
573
  }
624
574
  }
@@ -632,7 +582,6 @@ export class OfficeScene {
632
582
  a.flyU = u;
633
583
  if (u >= 1 && !g.arrived) {
634
584
  g.arrived = now;
635
- a.squashAt = now;
636
585
  g.onArrive?.();
637
586
  if (g.dropItem) a.item = null;
638
587
  }
@@ -643,32 +592,18 @@ export class OfficeScene {
643
592
  }
644
593
  if (a.seg && a.seg.dur && !a.seg.arrived) flying++;
645
594
  } else {
646
- // drift home smoothly
647
- const hx = a.mode === 'plan' && a.isMel ? a.home.x + Math.sin(now * 0.7) * 1.3 : a.home.x;
595
+ // glide home smoothly
596
+ const hx = a.mode === 'plan' && a.isMel ? a.home.x + Math.sin(now * 0.5) * 0.9 : a.home.x;
648
597
  const k = 1 - Math.pow(0.002, dt);
649
598
  a.pos.x = lerp(a.pos.x, hx, k);
650
599
  a.pos.y = lerp(a.pos.y, a.home.y, k);
651
- a.pos.z = lerp(a.pos.z, a.home.z + (a.mode === 'sleep' || a.mode === 'paused' ? -0.2 : 0), k);
600
+ a.pos.z = lerp(a.pos.z, a.home.z + (a.mode === 'sleep' || a.mode === 'paused' ? -0.12 : 0), k);
652
601
  a.flyU = null;
653
602
  }
654
603
 
655
- if (a.fadeAt > 0) a.alpha = clamp((now - a.fadeAt) / 0.35);
604
+ if (a.fadeAt > 0) a.alpha = clamp((now - a.fadeAt) / 0.25);
656
605
  if (a.leaving && a.seg) a.alpha = 1 - clamp((now - a.seg.t0) / (a.seg.dur || 0.3));
657
-
658
- // ambient effects by mode
659
- if (!reduced && !a.seg) {
660
- if (a.mode === 'type') {
661
- typing++;
662
- if (now > a.nextGlyph) { this.glyph(a); a.nextGlyph = now + rnd(0.12, 0.26); }
663
- } else if (a.mode === 'sleep' || a.mode === 'paused') {
664
- if (now > a.nextZ) { this.spawn({ kind: 'z', x: a.sx + 10 * this.k * 1.3, y: a.sy - 18 * this.k * 1.3, vx: rnd(8, 16), vy: -16, life: 2.2, size: this.mini ? 6 : Math.max(9, this.a * 0.2) }); a.nextZ = now + 1.1; }
665
- } else if (a.mode === 'test') {
666
- if (now > a.nextGlyph) { this.spawn({ kind: 'bubble', x: a.sx + rnd(-8, 8) + 30 * this.k, y: a.sy - 52 * this.k, vx: rnd(-6, 6), vy: rnd(-34, -20), life: rnd(0.7, 1.2), size: rnd(1.5, 3.2), color: '#7DC49B' }); a.nextGlyph = now + rnd(0.08, 0.2); }
667
- } else if (a.mode === 'plan') {
668
- if (now > a.nextGlyph) { this.glyph(a); a.nextGlyph = now + rnd(0.3, 0.5); }
669
- } else if (a.mode === 'celebrate' && Math.random() < dt * 3) this.sparkle(a, 1);
670
- }
671
- if (now > a.blinkAt + 0.14) a.blinkAt = now + rnd(2.2, 5.5);
606
+ if (a.mode === 'type') typing++;
672
607
  if (a.bubble && now > a.bubble.until) a.bubble = null;
673
608
  if (a.badge && now > a.badge.until) a.badge = null;
674
609
  }
@@ -689,9 +624,7 @@ export class OfficeScene {
689
624
  const p = this.parts[i];
690
625
  p.age += dt;
691
626
  if (p.age >= p.max) { this.parts.splice(i, 1); p.done?.(); continue; }
692
- if (p.kind === 'jar') continue;
693
627
  p.vy += (p.g || 0) * dt;
694
- if (p.kind === 'confetti') { p.vx *= 1 - dt * 0.6; p.vy = Math.min(p.vy, 150); p.rot += p.vr * dt; p.x += Math.sin(p.age * 3 + p.rot) * 12 * dt; }
695
628
  p.x += (p.vx || 0) * dt;
696
629
  p.y += (p.vy || 0) * dt;
697
630
  }
@@ -699,7 +632,6 @@ export class OfficeScene {
699
632
 
700
633
  targetMode(a, st, jobRunning) {
701
634
  if (a.leaving) return 'fly';
702
- if (this.now < this.celebrateUntil) return 'celebrate';
703
635
  if (a.w.paused) return 'paused';
704
636
  if (a.isMel && st.status === 'idle') {
705
637
  if (this.briefWaiting) return 'stuck';
@@ -726,68 +658,38 @@ export class OfficeScene {
726
658
  /* ---------- drawing ---------- */
727
659
  palette() {
728
660
  const h = this.hourFn();
729
- const key = Math.round(h * 12);
661
+ const T = artTokens();
662
+ const key = `${Math.round(h * 12)}|${T.bg}|${T.accent}|${T.scheme}`;
730
663
  if (key === this.palAt && this.pal) return this.pal;
731
664
  this.palAt = key;
732
665
  const night = nightFactor(h);
733
666
  const gold = goldenFactor(h) * (1 - night * 0.6);
734
- const out = { night, gold, hour: h };
735
- for (const [k, v] of Object.entries(DAY)) {
736
- if (k === 'bg0' || k === 'bg1') { out[k] = v; continue; }
737
- let c = mixHex(v, NIGHT_TINT, night * 0.52);
738
- if (gold) c = mixHex(c, DUSK_TINT, gold * 0.1);
739
- out[k] = c;
740
- }
741
- this.pal = out;
742
- this.combLeft = null;
743
- return out;
667
+ const W = worldPalette(night);
668
+ this.pal = { ...W, night, gold, hour: h };
669
+ this.bgGrad = null;
670
+ return this.pal;
744
671
  }
745
672
 
746
673
  buildPaths() {
747
- // hexagon floor tiles, three soft shades, in floor units
674
+ // hexagon floor grid in floor units (hairlines only: the honeycomb stays, quietly)
748
675
  const r = 0.44;
749
676
  const hw = Math.sqrt(3) * r;
750
677
  const vh = 1.5 * r;
751
- const fill = [new Path2D(), new Path2D(), new Path2D()];
752
- const grout = new Path2D();
678
+ const grid = new Path2D();
753
679
  for (let row = -1; row * vh < RY + r; row++) {
754
680
  for (let col = -1; col * hw < RX + hw; col++) {
755
681
  const cx = col * hw + (row & 1 ? hw / 2 : 0);
756
682
  const cy = row * vh;
757
- const q = col - (row - (row & 1)) / 2;
758
- const shadeIdx = (((q - row) % 3) + 3) % 3;
759
- const path = new Path2D();
760
683
  for (let i = 0; i < 6; i++) {
761
684
  const ang = (Math.PI / 180) * (60 * i - 30);
762
685
  const px = cx + r * Math.cos(ang);
763
686
  const py = cy + r * Math.sin(ang);
764
- if (i === 0) path.moveTo(px, py); else path.lineTo(px, py);
687
+ if (i === 0) grid.moveTo(px, py); else grid.lineTo(px, py);
765
688
  }
766
- path.closePath();
767
- fill[shadeIdx].addPath(path);
768
- grout.addPath(path);
689
+ grid.closePath();
769
690
  }
770
691
  }
771
- this.floorFill = fill;
772
- this.floorGrout = grout;
773
- // honeycomb wallpaper (wall units, t grows downward)
774
- const wr = 0.2;
775
- const comb = new Path2D();
776
- const whw = Math.sqrt(3) * wr;
777
- for (let row = 0; row * 1.5 * wr < WALL; row++) {
778
- for (let col = -1; col * whw < Math.max(RX, RY) + 1; col++) {
779
- const cx = col * whw + (row & 1 ? whw / 2 : 0);
780
- const cy = row * 1.5 * wr;
781
- for (let i = 0; i < 6; i++) {
782
- const ang = (Math.PI / 180) * (60 * i - 30);
783
- const px = cx + wr * 0.9 * Math.cos(ang);
784
- const py = cy + wr * 0.9 * Math.sin(ang);
785
- if (i === 0) comb.moveTo(px, py); else comb.lineTo(px, py);
786
- }
787
- comb.closePath();
788
- }
789
- }
790
- this.comb = comb;
692
+ this.floorGrout = grid;
791
693
  }
792
694
 
793
695
  base() { this.ctx.setTransform(this.dpr, 0, 0, this.dpr, 0, 0); }
@@ -807,7 +709,7 @@ export class OfficeScene {
807
709
  if (stroke) { ctx.strokeStyle = stroke; ctx.lineWidth = lw; ctx.stroke(); }
808
710
  }
809
711
 
810
- box(x, y, z, dx, dy, dz, top, left, right, edge = 'rgba(36,22,12,.32)') {
712
+ box(x, y, z, dx, dy, dz, top, left, right, edge = 'rgba(0,0,0,.28)') {
811
713
  const P = (X, Y, Z) => this.P(X, Y, Z);
812
714
  this.poly([P(x, y + dy, z), P(x + dx, y + dy, z), P(x + dx, y + dy, z + dz), P(x, y + dy, z + dz)], left, edge);
813
715
  this.poly([P(x + dx, y, z), P(x + dx, y + dy, z), P(x + dx, y + dy, z + dz), P(x + dx, y, z + dz)], right, edge);
@@ -827,9 +729,8 @@ export class OfficeScene {
827
729
  ctx.ellipse(bx, ty, rx, ry, 0, Math.PI, 0, true);
828
730
  ctx.closePath();
829
731
  ctx.fill();
830
- ctx.strokeStyle = 'rgba(36,22,12,.35)'; ctx.lineWidth = 1; ctx.stroke();
831
732
  ctx.fillStyle = top;
832
- ctx.beginPath(); ctx.ellipse(bx, ty, rx, ry, 0, 0, Math.PI * 2); ctx.fill(); ctx.stroke();
733
+ ctx.beginPath(); ctx.ellipse(bx, ty, rx, ry, 0, 0, Math.PI * 2); ctx.fill();
833
734
  }
834
735
 
835
736
  draw() {
@@ -838,10 +739,10 @@ export class OfficeScene {
838
739
  const ctx = this.ctx;
839
740
  const pal = this.palette();
840
741
  this.base();
841
- // backdrop
742
+ // backdrop: the graphite void
842
743
  if (!this.bgGrad) {
843
- const g = ctx.createRadialGradient(this.w * 0.5, this.h * 0.42, 10, this.w * 0.5, this.h * 0.5, Math.max(this.w, this.h) * 0.75);
844
- g.addColorStop(0, '#221B15'); g.addColorStop(1, '#0C0A08');
744
+ const g = ctx.createRadialGradient(this.w * 0.5, this.h * 0.4, 10, this.w * 0.5, this.h * 0.5, Math.max(this.w, this.h) * 0.75);
745
+ g.addColorStop(0, pal.void0); g.addColorStop(1, pal.void1);
845
746
  this.bgGrad = g;
846
747
  }
847
748
  ctx.fillStyle = this.bgGrad;
@@ -860,9 +761,7 @@ export class OfficeScene {
860
761
  }
861
762
  list.push({ k: MEL_HOME.x + MEL_HOME.y - 0.05, f: () => this.drawPodium(pal) });
862
763
  list.push({ k: 0.6 + 9.3, f: () => this.drawPlant(0.6, 9.3, 1.0) });
863
- list.push({ k: 13.4 + 0.65, f: () => this.drawPlant(13.4, 0.65, 0.9) });
864
- list.push({ k: 13.3 + 4.9, f: () => this.drawPlant(13.3, 4.9, 1.15) });
865
- list.push({ k: 13.1 + 9.1, f: () => this.drawCooler(13.1, 9.1, pal) });
764
+ list.push({ k: 13.3 + 4.9, f: () => this.drawPlant(13.3, 4.9, 1.1) });
866
765
  list.push({ k: 0.4 + 1.2, f: () => this.drawShelfUnit(pal) });
867
766
  list.sort((p, q) => p.k - q.k);
868
767
  for (const it of list) it.f();
@@ -874,67 +773,49 @@ export class OfficeScene {
874
773
 
875
774
  drawRoom(pal) {
876
775
  const ctx = this.ctx;
776
+ const T = pal.T;
877
777
  const P = (x, y, z) => this.P(x, y, z);
878
- // floor slab
879
- this.poly([P(-0.16, RY, 0), P(RX, RY, 0), P(RX, RY, -SLAB), P(-0.16, RY, -SLAB)], pal.slabL, 'rgba(0,0,0,.35)');
880
- this.poly([P(RX, -0.16, 0), P(RX, RY, 0), P(RX, RY, -SLAB), P(RX, -0.16, -SLAB)], pal.slabR, 'rgba(0,0,0,.35)');
881
- // floor tiles
778
+ // floor slab: two crisp faces
779
+ this.poly([P(-0.16, RY, 0), P(RX, RY, 0), P(RX, RY, -SLAB), P(-0.16, RY, -SLAB)], pal.sideA);
780
+ this.poly([P(RX, -0.16, 0), P(RX, RY, 0), P(RX, RY, -SLAB), P(RX, -0.16, -SLAB)], pal.sideB);
781
+ this.poly([P(-0.16, RY, 0), P(RX, RY, 0)], null, alpha(T.text, 0.08));
782
+ // floor with a hairline honeycomb grid and the team zone
882
783
  this.floorT();
883
784
  ctx.save();
884
785
  ctx.beginPath(); ctx.rect(0, 0, RX, RY); ctx.clip();
885
- ctx.fillStyle = pal.floorA; ctx.fill(this.floorFill[0]);
886
- ctx.fillStyle = pal.floorB; ctx.fill(this.floorFill[1]);
887
- ctx.fillStyle = pal.floorC; ctx.fill(this.floorFill[2]);
888
- ctx.strokeStyle = pal.grout; ctx.lineWidth = 0.035; ctx.stroke(this.floorGrout);
889
- // honey rug under the crew
890
- ctx.beginPath();
891
- hexPath(ctx, 6.6, 5.5, 4.2);
892
- ctx.fillStyle = alpha(pal.rug, 0.16); ctx.fill();
893
- ctx.lineWidth = 0.06; ctx.strokeStyle = alpha(pal.rug, 0.38); ctx.stroke();
894
- ctx.beginPath(); hexPath(ctx, 6.6, 5.5, 3.85);
895
- ctx.lineWidth = 0.025; ctx.setLineDash([0.12, 0.1]); ctx.stroke(); ctx.setLineDash([]);
896
- // daylight from the windows
786
+ ctx.fillStyle = pal.floor; ctx.fillRect(0, 0, RX, RY);
787
+ ctx.strokeStyle = pal.floorLine; ctx.lineWidth = 0.018; ctx.stroke(this.floorGrout);
788
+ ctx.beginPath(); hexPath(ctx, 6.6, 5.5, 4.2);
789
+ ctx.fillStyle = alpha(T.accent, 0.025); ctx.fill();
790
+ ctx.lineWidth = 0.025; ctx.strokeStyle = alpha(T.accent, 0.28); ctx.stroke();
791
+ // soft daylight through the windows
897
792
  if (pal.night < 0.85) {
898
- const al = (1 - pal.night) * 0.13 + pal.gold * 0.05;
899
- ctx.fillStyle = pal.gold > 0.3 ? `rgba(255,190,120,${al})` : `rgba(255,240,200,${al})`;
793
+ const al = (1 - pal.night) * 0.05;
794
+ ctx.fillStyle = alpha(T.text, al);
900
795
  for (const [y0, y1] of [[2.2, 4.0], [5.6, 7.4]]) {
901
796
  ctx.beginPath(); ctx.moveTo(0, y0); ctx.lineTo(0, y1); ctx.lineTo(2.6, y1 + 1.5); ctx.lineTo(2.6, y0 + 1.5); ctx.closePath(); ctx.fill();
902
797
  }
903
798
  }
904
799
  ctx.restore();
905
800
  this.base();
906
- // walls
801
+ // walls: graphite planes with a thin base rule and a soft shade into the corner
907
802
  this.poly([P(0, 0, 0), P(0, RY, 0), P(0, RY, WALL), P(0, 0, WALL)], pal.wallL);
908
803
  this.poly([P(0, 0, 0), P(RX, 0, 0), P(RX, 0, WALL), P(0, 0, WALL)], pal.wallR);
909
- // honeycomb wallpaper, a soft wainscot and the trim
910
804
  for (const side of ['L', 'R']) {
911
805
  if (side === 'L') this.leftT(); else this.rightT();
912
- ctx.save();
913
- ctx.beginPath(); ctx.rect(0, 0, side === 'L' ? RY : RX, WALL - 0.8); ctx.clip();
914
- ctx.strokeStyle = alpha(pal.comb, 0.55); ctx.lineWidth = 0.012; ctx.stroke(this.comb);
915
- ctx.restore();
916
- ctx.fillStyle = side === 'L' ? pal.wainL : pal.wainR;
917
- ctx.fillRect(0, WALL - 0.8, side === 'L' ? RY : RX, 0.8);
918
- ctx.fillStyle = pal.trim;
919
- ctx.fillRect(0, WALL - 0.84, side === 'L' ? RY : RX, 0.06);
920
- ctx.fillRect(0, WALL - 0.1, side === 'L' ? RY : RX, 0.1);
921
- // vertical wainscot boards
922
- ctx.strokeStyle = 'rgba(36,22,12,.13)'; ctx.lineWidth = 0.02;
923
- ctx.beginPath();
924
- for (let u = 0.5; u < (side === 'L' ? RY : RX); u += 0.5) { ctx.moveTo(u, WALL - 0.78); ctx.lineTo(u, WALL - 0.1); }
925
- ctx.stroke();
926
- // a soft shade toward the corner
806
+ const len = side === 'L' ? RY : RX;
807
+ ctx.fillStyle = alpha(T.text, 0.035); ctx.fillRect(0, WALL - 0.12, len, 0.12);
927
808
  const g = ctx.createLinearGradient(side === 'L' ? RY : 0, 0, side === 'L' ? RY - 2.5 : 2.5, 0);
928
- g.addColorStop(0, 'rgba(36,22,12,.22)'); g.addColorStop(1, 'rgba(36,22,12,0)');
929
- ctx.fillStyle = g; ctx.fillRect(0, 0, side === 'L' ? RY : RX, WALL);
809
+ g.addColorStop(0, 'rgba(0,0,0,.18)'); g.addColorStop(1, 'rgba(0,0,0,0)');
810
+ ctx.fillStyle = g; ctx.fillRect(0, 0, len, WALL);
930
811
  }
931
812
  this.base();
932
- // wall caps and ends, so the room reads as a little diorama
933
- const T = 0.16;
934
- this.poly([P(0, 0, WALL), P(0, RY, WALL), P(-T, RY, WALL), P(-T, -T, WALL), P(RX, -T, WALL), P(RX, 0, WALL)], shade(pal.trim, 0.25), 'rgba(36,22,12,.5)');
935
- this.poly([P(-T, RY, 0), P(0, RY, 0), P(0, RY, WALL), P(-T, RY, WALL)], shade(pal.trim, -0.1), 'rgba(36,22,12,.5)');
936
- this.poly([P(RX, -T, 0), P(RX, 0, 0), P(RX, 0, WALL), P(RX, -T, WALL)], shade(pal.trim, -0.25), 'rgba(36,22,12,.5)');
937
- this.poly([P(0, 0, 0), P(0, 0, WALL)], null, 'rgba(36,22,12,.25)');
813
+ // wall caps and ends
814
+ const Tt = 0.12;
815
+ this.poly([P(0, 0, WALL), P(0, RY, WALL), P(-Tt, RY, WALL), P(-Tt, -Tt, WALL), P(RX, -Tt, WALL), P(RX, 0, WALL)], pal.cap);
816
+ this.poly([P(-Tt, RY, 0), P(0, RY, 0), P(0, RY, WALL), P(-Tt, RY, WALL)], pal.capSide);
817
+ this.poly([P(RX, -Tt, 0), P(RX, 0, 0), P(RX, 0, WALL), P(RX, -Tt, WALL)], shade(pal.capSide, -0.15));
818
+ this.poly([P(0, 0, 0), P(0, 0, WALL)], null, 'rgba(0,0,0,.25)');
938
819
 
939
820
  this.drawWindows(pal);
940
821
  this.drawDoor(pal);
@@ -944,62 +825,34 @@ export class OfficeScene {
944
825
 
945
826
  drawWindows(pal) {
946
827
  const ctx = this.ctx;
947
- const h = pal.hour;
828
+ const T = pal.T;
948
829
  const night = pal.night;
949
- const top = mixHex(mixHex('#78B9E6', '#0B1430', night), '#4A3F7E', pal.gold * 0.7);
950
- const bot = mixHex(mixHex('#D6EEF8', '#1E2B4E', night), '#F5A766', pal.gold * 0.85);
951
830
  this.leftT();
952
831
  for (const [u0, u1] of [[2.6, 4.4], [6.0, 7.8]]) {
953
832
  const t0 = WALL - 2.28; const t1 = WALL - 0.98;
954
833
  ctx.save();
955
834
  ctx.beginPath(); ctx.rect(u0, t0, u1 - u0, t1 - t0); ctx.clip();
956
835
  const g = ctx.createLinearGradient(0, t0, 0, t1);
957
- g.addColorStop(0, top); g.addColorStop(1, bot);
836
+ g.addColorStop(0, pal.glassTop); g.addColorStop(1, pal.glassBot);
958
837
  ctx.fillStyle = g; ctx.fillRect(u0, t0, u1 - u0, t1 - t0);
959
- if (night > 0.4) {
960
- ctx.fillStyle = `rgba(255,255,240,${(night - 0.4) * 1.4})`;
961
- for (const s of this.stars) {
962
- const tw = 0.6 + 0.4 * Math.sin(this.now * 1.5 + s.ph);
963
- ctx.globalAlpha = tw;
964
- ctx.fillRect(u0 + s.u * (u1 - u0), t0 + s.t * (t1 - t0) * 0.75, 0.025 * s.r, 0.025 * s.r);
965
- }
966
- ctx.globalAlpha = 1;
967
- }
968
- if (u0 > 5) {
969
- // sun or moon, its height follows the clock
970
- const arc = night > 0.5 ? (((h + 24 - 19) % 24) / 11) : clamp((h - 6) / 13);
971
- const cy = t0 + 0.3 + Math.abs(arc - 0.5) * 1.6;
972
- const cx = u0 + 0.5 + arc * 0.8;
973
- if (night > 0.5) {
974
- ctx.fillStyle = '#F4EBCF'; ctx.beginPath(); ctx.arc(cx, cy, 0.17, 0, 6.28); ctx.fill();
975
- ctx.fillStyle = top; ctx.beginPath(); ctx.arc(cx + 0.07, cy - 0.04, 0.15, 0, 6.28); ctx.fill();
976
- } else {
977
- ctx.fillStyle = 'rgba(255,236,170,.35)'; ctx.beginPath(); ctx.arc(cx, cy, 0.32, 0, 6.28); ctx.fill();
978
- ctx.fillStyle = pal.gold > 0.3 ? '#FFC072' : '#FFF1B8'; ctx.beginPath(); ctx.arc(cx, cy, 0.19, 0, 6.28); ctx.fill();
979
- }
980
- }
981
- // drifting clouds (or a faint mist at night)
982
- ctx.fillStyle = night > 0.5 ? 'rgba(160,170,210,.12)' : 'rgba(255,255,255,.75)';
983
- const span = u1 - u0 + 1.2;
984
- for (let i = 0; i < 2; i++) {
985
- const cx = u0 - 0.6 + ((this.now * 0.03 + i * 0.55 + u0) % 1) * span;
986
- const cy = t0 + 0.45 + i * 0.38;
987
- ctx.beginPath(); ctx.ellipse(cx, cy, 0.3, 0.08, 0, 0, 6.28); ctx.ellipse(cx + 0.18, cy - 0.06, 0.16, 0.09, 0, 0, 6.28); ctx.fill();
988
- }
989
- // a hint of the city skyline
990
- ctx.fillStyle = mixHex('#5E6B86', '#0A0F1E', night);
838
+ // a distant skyline, lit windows at night
839
+ ctx.fillStyle = mixHex(pal.glassBot, T.bg, 0.5);
991
840
  for (let i = 0; i < 7; i++) { const bw = 0.22 + ((i * 37) % 5) * 0.03; const bh = 0.12 + ((i * 53) % 7) * 0.05; ctx.fillRect(u0 + i * 0.27, t1 - bh, bw, bh); }
992
841
  if (night > 0.5) {
993
- ctx.fillStyle = 'rgba(255,208,114,.8)';
994
- for (let i = 0; i < 9; i++) ctx.fillRect(u0 + 0.06 + ((i * 29) % 17) * 0.1, t1 - 0.05 - ((i * 13) % 5) * 0.05, 0.03, 0.025);
842
+ ctx.fillStyle = alpha(T.accent2, 0.55);
843
+ for (let i = 0; i < 7; i++) ctx.fillRect(u0 + 0.06 + ((i * 29) % 17) * 0.1, t1 - 0.05 - ((i * 13) % 5) * 0.05, 0.025, 0.02);
844
+ ctx.fillStyle = alpha(T.text, (night - 0.5) * 0.6);
845
+ for (const s of this.stars) ctx.fillRect(u0 + s.u * (u1 - u0), t0 + s.t * (t1 - t0) * 0.6, 0.016 * s.r, 0.016 * s.r);
995
846
  }
847
+ // one diagonal reflection
848
+ ctx.fillStyle = pal.glassHi;
849
+ ctx.beginPath(); ctx.moveTo(u0 + 0.2, t0); ctx.lineTo(u0 + 0.55, t0); ctx.lineTo(u0 + 0.15, t1); ctx.lineTo(u0 - 0.2, t1); ctx.closePath(); ctx.fill();
996
850
  ctx.restore();
997
- // frame and mullions
998
- ctx.strokeStyle = shade(pal.trim, 0.1); ctx.lineWidth = 0.07;
851
+ // a thin frame and one mullion
852
+ ctx.strokeStyle = pal.cap; ctx.lineWidth = 0.035;
999
853
  ctx.strokeRect(u0, t0, u1 - u0, t1 - t0);
1000
- ctx.lineWidth = 0.04;
1001
- ctx.beginPath(); ctx.moveTo((u0 + u1) / 2, t0); ctx.lineTo((u0 + u1) / 2, t1); ctx.moveTo(u0, (t0 + t1) / 2); ctx.lineTo(u1, (t0 + t1) / 2); ctx.stroke();
1002
- ctx.fillStyle = shade(pal.trim, 0.2); ctx.fillRect(u0 - 0.08, t1, u1 - u0 + 0.16, 0.07);
854
+ ctx.lineWidth = 0.02;
855
+ ctx.beginPath(); ctx.moveTo((u0 + u1) / 2, t0); ctx.lineTo((u0 + u1) / 2, t1); ctx.stroke();
1003
856
  }
1004
857
  this.base();
1005
858
  }
@@ -1008,124 +861,109 @@ export class OfficeScene {
1008
861
  const ctx = this.ctx;
1009
862
  this.rightT();
1010
863
  const u0 = 11.9; const u1 = 13.0; const t0 = WALL - 2.05;
1011
- ctx.fillStyle = shade(pal.trim, 0.05); ctx.fillRect(u0 - 0.06, t0 - 0.06, u1 - u0 + 0.12, WALL - t0 + 0.06);
1012
- ctx.fillStyle = mixHex('#C98F4E', NIGHT_TINT, pal.night * 0.45); ctx.fillRect(u0, t0, u1 - u0, WALL - t0);
1013
- // a hexagon window in the door
1014
- ctx.fillStyle = mixHex('#FFE7A8', '#2B3352', pal.night);
1015
- ctx.beginPath(); hexPath(ctx, (u0 + u1) / 2, t0 + 0.5, 0.22); ctx.fill();
1016
- ctx.strokeStyle = OUT; ctx.lineWidth = 0.025; ctx.stroke();
1017
- ctx.fillStyle = '#FFD072'; ctx.beginPath(); ctx.arc(u1 - 0.14, t0 + 1.1, 0.04, 0, 6.28); ctx.fill();
1018
- ctx.strokeStyle = 'rgba(36,22,12,.25)'; ctx.lineWidth = 0.02; ctx.strokeRect(u0 + 0.12, t0 + 0.9, u1 - u0 - 0.24, 0.9);
864
+ ctx.fillStyle = pal.cap; ctx.fillRect(u0 - 0.04, t0 - 0.04, u1 - u0 + 0.08, WALL - t0 + 0.04);
865
+ ctx.fillStyle = shade(pal.wallR, -0.25); ctx.fillRect(u0, t0, u1 - u0, WALL - t0);
866
+ // a slim glass slit and the handle
867
+ ctx.fillStyle = pal.glassTop; ctx.fillRect(u0 + 0.16, t0 + 0.16, 0.08, 1.2);
868
+ ctx.fillStyle = pal.metal; ctx.fillRect(u1 - 0.2, t0 + 1.0, 0.04, 0.22);
1019
869
  this.base();
1020
870
  }
1021
871
 
1022
872
  drawClock(pal) {
1023
873
  const ctx = this.ctx;
874
+ const T = pal.T;
1024
875
  this.rightT();
1025
- const cu = 8.25; const ct = 0.78; const r = 0.34;
1026
- ctx.fillStyle = shade(pal.trim, -0.1); ctx.beginPath(); ctx.arc(cu, ct, r + 0.05, 0, 6.28); ctx.fill();
1027
- ctx.fillStyle = '#FFF8EA'; ctx.beginPath(); ctx.arc(cu, ct, r, 0, 6.28); ctx.fill();
1028
- ctx.strokeStyle = OUT; ctx.lineWidth = 0.02;
876
+ const cu = 8.25; const ct = 0.78; const r = 0.3;
877
+ ctx.fillStyle = pal.screen; ctx.beginPath(); ctx.arc(cu, ct, r, 0, 6.28); ctx.fill();
878
+ ctx.strokeStyle = alpha(T.text, 0.18); ctx.lineWidth = 0.015; ctx.stroke();
879
+ ctx.strokeStyle = alpha(T.text, 0.4); ctx.lineWidth = 0.015;
1029
880
  for (let i = 0; i < 12; i++) {
1030
881
  const an = (i / 12) * 6.283;
1031
- ctx.beginPath(); ctx.moveTo(cu + Math.sin(an) * r * 0.82, ct - Math.cos(an) * r * 0.82); ctx.lineTo(cu + Math.sin(an) * r * 0.92, ct - Math.cos(an) * r * 0.92); ctx.stroke();
882
+ ctx.beginPath(); ctx.moveTo(cu + Math.sin(an) * r * 0.8, ct - Math.cos(an) * r * 0.8); ctx.lineTo(cu + Math.sin(an) * r * 0.9, ct - Math.cos(an) * r * 0.9); ctx.stroke();
1032
883
  }
1033
884
  const h = pal.hour;
1034
885
  const mins = (h % 1) * 60;
1035
886
  const ha = ((h % 12) / 12) * 6.283;
1036
887
  const ma = (mins / 60) * 6.283;
1037
888
  ctx.lineCap = 'round';
1038
- ctx.lineWidth = 0.045; ctx.beginPath(); ctx.moveTo(cu, ct); ctx.lineTo(cu + Math.sin(ha) * r * 0.5, ct - Math.cos(ha) * r * 0.5); ctx.stroke();
1039
- ctx.lineWidth = 0.03; ctx.beginPath(); ctx.moveTo(cu, ct); ctx.lineTo(cu + Math.sin(ma) * r * 0.75, ct - Math.cos(ma) * r * 0.75); ctx.stroke();
889
+ ctx.strokeStyle = T.text;
890
+ ctx.lineWidth = 0.03; ctx.beginPath(); ctx.moveTo(cu, ct); ctx.lineTo(cu + Math.sin(ha) * r * 0.48, ct - Math.cos(ha) * r * 0.48); ctx.stroke();
891
+ ctx.lineWidth = 0.02; ctx.beginPath(); ctx.moveTo(cu, ct); ctx.lineTo(cu + Math.sin(ma) * r * 0.72, ct - Math.cos(ma) * r * 0.72); ctx.stroke();
1040
892
  ctx.lineCap = 'butt';
1041
- ctx.fillStyle = '#E8951E'; ctx.beginPath(); ctx.arc(cu, ct, 0.035, 0, 6.28); ctx.fill();
893
+ ctx.fillStyle = T.accent; ctx.beginPath(); ctx.arc(cu, ct, 0.025, 0, 6.28); ctx.fill();
1042
894
  this.base();
1043
895
  }
1044
896
 
1045
- /** A wall shelf that fills with honey jars as tasks get done. */
897
+ /** A small wall display with the number of finished tasks (it replaced the honey shelf). */
1046
898
  drawHoneyShelf(pal) {
1047
899
  const ctx = this.ctx;
1048
- const s = this.getState();
1049
- const done = Object.values(s.tasks || {}).filter((t) => t.status === 'done').length;
900
+ const T = pal.T;
901
+ const done = doneCount(this.getState());
1050
902
  this.rightT();
1051
- const u0 = 9.15; const u1 = 11.45; const t = 1.42;
1052
- for (let row = 0; row < 2; row++) {
1053
- const ty = t + row * 0.5;
1054
- ctx.fillStyle = shade(pal.trim, 0.1); ctx.fillRect(u0, ty, u1 - u0, 0.06);
1055
- ctx.fillStyle = 'rgba(36,22,12,.2)'; ctx.fillRect(u0, ty + 0.06, u1 - u0, 0.04);
1056
- const n = clamp(done - row * 8, 0, 8);
1057
- for (let i = 0; i < n; i++) {
1058
- const cx = u0 + 0.16 + i * 0.27;
1059
- ctx.fillStyle = '#F3A42A'; roundRect(ctx, cx - 0.09, ty - 0.24, 0.18, 0.24, 0.05); ctx.fill();
1060
- ctx.fillStyle = '#FFD072'; ctx.fillRect(cx - 0.06, ty - 0.17, 0.04, 0.12);
1061
- ctx.fillStyle = '#7A4A1E'; ctx.fillRect(cx - 0.1, ty - 0.29, 0.2, 0.06);
1062
- }
1063
- }
1064
- ctx.fillStyle = alpha(pal.trim, 0.9);
1065
- ctx.font = `700 13px ${FONT}`;
903
+ const u0 = 9.15; const u1 = 11.45; const t0 = 0.6; const t1 = 1.55;
904
+ ctx.fillStyle = pal.screen; ctx.fillRect(u0, t0, u1 - u0, t1 - t0);
905
+ ctx.strokeStyle = alpha(T.text, 0.12); ctx.lineWidth = 0.012; ctx.strokeRect(u0, t0, u1 - u0, t1 - t0);
906
+ ctx.fillStyle = T.ok; ctx.fillRect(u0, t0, 0.03, t1 - t0);
1066
907
  this.rightT(100);
1067
- ctx.fillStyle = 'rgba(36,22,12,.55)';
1068
- ctx.font = `700 12px ${FONT}`;
1069
- ctx.fillText(done > 16 ? `HONEY ${done}` : 'HONEY', u0 * 100, (t - 0.42) * 100);
908
+ ctx.fillStyle = alpha(T.text, 0.5); ctx.font = `600 11px ${FONT}`;
909
+ ctx.fillText('TASKS DONE', (u0 + 0.14) * 100, (t0 + 0.24) * 100);
910
+ ctx.fillStyle = T.text; ctx.font = `600 40px ${MONO}`;
911
+ ctx.fillText(String(done), (u0 + 0.12) * 100, (t1 - 0.18) * 100);
1070
912
  this.base();
1071
913
  }
1072
914
 
1073
915
  drawBoard(pal) {
1074
916
  const ctx = this.ctx;
917
+ const T = pal.T;
1075
918
  const { u0, u1, t0, t1 } = BOARD;
1076
919
  this.rightT();
1077
- // frame and cork
1078
- ctx.fillStyle = 'rgba(36,22,12,.25)'; ctx.fillRect(u0 + 0.06, t0 + 0.08, u1 - u0, t1 - t0);
1079
- ctx.fillStyle = pal.frame; ctx.fillRect(u0 - 0.07, t0 - 0.07, u1 - u0 + 0.14, t1 - t0 + 0.14);
920
+ // the kanban as a wall display
921
+ ctx.fillStyle = 'rgba(0,0,0,.25)'; ctx.fillRect(u0 + 0.04, t0 + 0.05, u1 - u0, t1 - t0);
1080
922
  ctx.fillStyle = pal.board; ctx.fillRect(u0, t0, u1 - u0, t1 - t0);
923
+ ctx.strokeStyle = alpha(T.text, 0.12); ctx.lineWidth = 0.012; ctx.strokeRect(u0, t0, u1 - u0, t1 - t0);
1081
924
  const cw = (u1 - u0 - 0.16) / 3;
1082
- ctx.strokeStyle = 'rgba(36,22,12,.14)'; ctx.lineWidth = 0.02;
925
+ ctx.strokeStyle = alpha(T.text, 0.07); ctx.lineWidth = 0.012;
1083
926
  ctx.beginPath();
1084
927
  for (let c = 1; c < 3; c++) { const x = u0 + 0.08 + c * cw; ctx.moveTo(x, t0 + 0.08); ctx.lineTo(x, t1 - 0.06); }
1085
928
  ctx.moveTo(u0 + 0.08, t0 + 0.36); ctx.lineTo(u1 - 0.08, t0 + 0.36);
1086
929
  ctx.stroke();
1087
- // marker tray
1088
- ctx.fillStyle = shade(pal.frame, 0.15); ctx.fillRect(u0 + 0.5, t1 + 0.06, 1.4, 0.07);
1089
- ctx.fillStyle = '#E57B6E'; ctx.fillRect(u0 + 0.62, t1 + 0.02, 0.28, 0.05);
1090
- ctx.fillStyle = '#86A9D6'; ctx.fillRect(u0 + 1.0, t1 + 0.02, 0.28, 0.05);
1091
- // column titles
930
+ // column titles with counts
1092
931
  this.rightT(100);
1093
- ctx.font = `750 ${this.mini ? 20 : 16}px ${FONT}`;
932
+ ctx.font = `600 ${this.mini ? 18 : 13}px ${FONT}`;
1094
933
  ctx.textBaseline = 'middle';
1095
934
  const counts = [0, 0, 0];
1096
935
  for (const n of this.notes.values()) if (!n.gone) counts[n.col]++;
1097
936
  COLS.forEach((name, c) => {
1098
937
  const x = (u0 + 0.08 + c * cw + 0.1) * 100;
1099
- ctx.fillStyle = ['#8C6A3E', '#C77A14', '#3F8A5E'][c];
1100
- ctx.fillText(name.toUpperCase(), x, (t0 + 0.2) * 100);
1101
- ctx.fillStyle = 'rgba(36,22,12,.4)';
1102
- ctx.fillText(String(counts[c]), (u0 + 0.08 + (c + 1) * cw - 0.2) * 100, (t0 + 0.2) * 100);
938
+ ctx.fillStyle = [T.muted, T.accent, T.ok][c];
939
+ ctx.fillRect(x, (t0 + 0.2) * 100 - 4, 8, 8);
940
+ ctx.fillStyle = alpha(T.text, 0.7);
941
+ ctx.fillText(name.toUpperCase(), x + 14, (t0 + 0.2) * 100);
942
+ ctx.fillStyle = alpha(T.text, 0.4);
943
+ ctx.font = `500 ${this.mini ? 18 : 13}px ${MONO}`;
944
+ ctx.textAlign = 'right';
945
+ ctx.fillText(String(counts[c]), (u0 + 0.08 + (c + 1) * cw - 0.12) * 100, (t0 + 0.2) * 100);
946
+ ctx.textAlign = 'left';
947
+ ctx.font = `600 ${this.mini ? 18 : 13}px ${FONT}`;
1103
948
  });
1104
949
  ctx.textBaseline = 'alphabetic';
1105
- // an empty board says so, with a little doodle
950
+ // an empty board says so, plainly
1106
951
  let live = 0;
1107
952
  for (const n of this.notes.values()) if (!n.gone) live++;
1108
953
  if (!live && !this.mini) {
1109
954
  const cu = (u0 + u1) / 2; const ct = (t0 + t1) / 2 + 0.15;
1110
- this.rightT();
1111
- ctx.strokeStyle = 'rgba(122,86,54,.45)'; ctx.lineWidth = 0.025; ctx.setLineDash([0.08, 0.06]);
1112
- ctx.beginPath(); hexPath(ctx, cu - 1.25, ct - 0.05, 0.28); ctx.stroke(); ctx.setLineDash([]);
1113
- // a doodled bee on a loop
1114
- const bx = cu - 1.25 + Math.cos(this.now * 0.9) * 0.05; const by = ct - 0.05 + Math.sin(this.now * 1.3) * 0.03;
1115
- ctx.fillStyle = '#F3A42A'; ctx.beginPath(); ctx.ellipse(bx, by, 0.11, 0.08, 0, 0, 6.28); ctx.fill();
1116
- ctx.fillStyle = '#2B1D12'; ctx.fillRect(bx - 0.02, by - 0.08, 0.03, 0.16);
1117
- ctx.fillStyle = 'rgba(255,255,255,.85)'; ctx.beginPath(); ctx.ellipse(bx - 0.03, by - 0.11, 0.06, 0.035, -0.5, 0, 6.28); ctx.fill();
1118
- this.rightT(100);
1119
- ctx.fillStyle = 'rgba(43,29,18,.62)'; ctx.font = `700 19px ${FONT}`;
1120
- ctx.fillText('Nothing on the board yet', (cu - 0.8) * 100, (ct - 0.08) * 100);
1121
- ctx.fillStyle = 'rgba(43,29,18,.42)'; ctx.font = `600 14px ${FONT}`;
1122
- ctx.fillText('Ask the crew in the box above', (cu - 0.8) * 100, (ct + 0.16) * 100);
955
+ ctx.textAlign = 'center';
956
+ ctx.fillStyle = alpha(T.text, 0.62); ctx.font = `600 17px ${FONT}`;
957
+ ctx.fillText('Nothing on the board yet', cu * 100, (ct - 0.06) * 100);
958
+ ctx.fillStyle = alpha(T.text, 0.38); ctx.font = `400 13px ${FONT}`;
959
+ ctx.fillText('Ask the crew in the box above', cu * 100, (ct + 0.16) * 100);
960
+ ctx.textAlign = 'left';
1123
961
  }
1124
962
  // the notes
1125
963
  this.noteHits = [];
1126
964
  for (const n of this.notes.values()) {
1127
965
  if (n.state === 'hidden' || n.state === 'carried') continue;
1128
- const fade = n.gone ? 1 - clamp((this.now - n.gone) / 0.5) : 1;
966
+ const fade = n.gone ? 1 - clamp((this.now - n.gone) / 0.25) : 1;
1129
967
  if (fade <= 0) continue;
1130
968
  this.drawNote(n, fade);
1131
969
  }
@@ -1134,33 +972,29 @@ export class OfficeScene {
1134
972
 
1135
973
  drawNote(n, fade) {
1136
974
  const ctx = this.ctx;
975
+ const T = artTokens();
1137
976
  const t = n.task || {};
1138
- const pop = this.reduced() ? 1 : easeOutBack(clamp((this.now - n.pop) / 0.35));
1139
- const sc = 0.6 + 0.4 * pop;
977
+ const appear = this.reduced() ? 1 : easeOut(clamp((this.now - n.pop) / 0.2));
1140
978
  const w = n.w; const hgt = NOTE_H;
1141
979
  const cx = n.u + w / 2; const cy = n.t + hgt / 2;
1142
980
  this.rightT();
1143
981
  ctx.save();
1144
- ctx.globalAlpha = fade * (this.reduced() ? clamp((this.now - n.pop) / 0.3, 0.2, 1) : 1);
982
+ ctx.globalAlpha = fade * appear;
1145
983
  ctx.translate(cx, cy);
1146
- ctx.scale(sc, sc);
1147
- ctx.rotate(((hash(n.id) % 7) - 3) * 0.012);
1148
984
  const failed = t.status === 'failed' || t.status === 'blocked';
1149
- const color = failed ? '#F6B3A8' : t.status === 'done' ? '#C6E8CD' : t.status === 'skipped' ? '#DDD5C8' : n.col === 1 ? '#FFD488' : '#FFEB9C';
1150
- ctx.fillStyle = 'rgba(36,22,12,.18)'; ctx.fillRect(-w / 2 + 0.03, -hgt / 2 + 0.04, w, hgt);
1151
- ctx.fillStyle = color; ctx.fillRect(-w / 2, -hgt / 2, w, hgt);
1152
- const a = this.actors.get(t.assignee);
1153
- ctx.fillStyle = a?.w.color || '#FFB531'; ctx.fillRect(-w / 2, -hgt / 2, 0.05, hgt);
1154
- if (this.highlight === n.id || this.dragTask === n.id) { ctx.strokeStyle = '#E8951E'; ctx.lineWidth = 0.035; ctx.strokeRect(-w / 2 - 0.02, -hgt / 2 - 0.02, w + 0.04, hgt + 0.04); }
985
+ const rule = failed ? T.bad : t.status === 'done' ? T.ok : t.status === 'skipped' ? T.faint : n.col === 1 ? T.accent : T.muted;
986
+ ctx.fillStyle = this.pal?.card || T.panel3; ctx.fillRect(-w / 2, -hgt / 2, w, hgt);
987
+ ctx.fillStyle = rule; ctx.fillRect(-w / 2, -hgt / 2, 0.035, hgt);
988
+ if (this.highlight === n.id || this.dragTask === n.id) { ctx.strokeStyle = T.accent; ctx.lineWidth = 0.02; ctx.strokeRect(-w / 2, -hgt / 2, w, hgt); }
1155
989
  ctx.scale(0.01, 0.01);
1156
990
  if (!this.mini) {
1157
- ctx.fillStyle = '#2B1D12';
1158
- ctx.font = `650 16px ${FONT}`;
991
+ ctx.fillStyle = t.status === 'done' ? alpha(T.text, 0.6) : T.text;
992
+ ctx.font = `500 14px ${FONT}`;
1159
993
  const right = t.status === 'done' || failed ? 0.2 : 0.06;
1160
- const line = wrap(ctx, t.title || '', (w - 0.12 - right) * 100, 1)[0] || '';
1161
- ctx.fillText(line, (-w / 2 + 0.07) * 100, 0.07 * 100);
1162
- if (t.status === 'done') { ctx.fillStyle = '#3F8A5E'; ctx.font = `800 17px ${FONT}`; ctx.fillText('✓', (w / 2 - 0.17) * 100, 0.07 * 100); }
1163
- if (failed) { ctx.fillStyle = '#B4473A'; ctx.font = `800 17px ${FONT}`; ctx.fillText('!', (w / 2 - 0.12) * 100, 0.07 * 100); }
994
+ const line = wrap(ctx, t.title || '', (w - 0.14 - right) * 100, 1)[0] || '';
995
+ ctx.fillText(line, (-w / 2 + 0.09) * 100, 0.05 * 100);
996
+ if (t.status === 'done') { ctx.strokeStyle = T.ok; ctx.lineWidth = 2.4; ctx.lineCap = 'round'; ctx.beginPath(); ctx.moveTo((w / 2 - 0.17) * 100, 0); ctx.lineTo((w / 2 - 0.13) * 100, 4); ctx.lineTo((w / 2 - 0.06) * 100, -4); ctx.stroke(); ctx.lineCap = 'butt'; }
997
+ if (failed) { ctx.fillStyle = T.bad; ctx.font = `700 15px ${FONT}`; ctx.fillText('!', (w / 2 - 0.11) * 100, 0.06 * 100); }
1164
998
  }
1165
999
  ctx.restore();
1166
1000
  // hit box in screen space for the DOM layer
@@ -1174,23 +1008,24 @@ export class OfficeScene {
1174
1008
  this.floorT();
1175
1009
  for (const a of this.actors.values()) {
1176
1010
  const z = Math.max(0, a.pos.z);
1177
- const r = clamp(0.36 - z * 0.06, 0.14, 0.34);
1178
- ctx.fillStyle = `rgba(20,12,6,${0.32 * a.alpha * clamp(1.4 - z * 0.25, 0.25, 1)})`;
1011
+ const r = clamp(0.32 - z * 0.05, 0.14, 0.3);
1012
+ ctx.fillStyle = `rgba(0,0,0,${0.3 * a.alpha * clamp(1.4 - z * 0.25, 0.25, 1)})`;
1179
1013
  ctx.beginPath(); ctx.ellipse(a.pos.x, a.pos.y, r, r, 0, 0, 6.28); ctx.fill();
1180
1014
  }
1181
1015
  // desk shadows
1182
1016
  for (const a of this.actors.values()) {
1183
1017
  if (!a.desk) continue;
1184
- ctx.fillStyle = 'rgba(20,12,6,.22)';
1185
- ctx.fillRect(a.desk.x + 0.12, a.desk.y + 0.12, DW, DD);
1018
+ ctx.fillStyle = 'rgba(0,0,0,.2)';
1019
+ ctx.fillRect(a.desk.x + 0.08, a.desk.y + 0.08, DW, DD);
1186
1020
  }
1187
1021
  this.base();
1188
1022
  }
1189
1023
 
1190
1024
  drawPodium(pal) {
1191
1025
  const ctx = this.ctx;
1026
+ const T = pal.T;
1192
1027
  const x = MEL_HOME.x; const y = MEL_HOME.y;
1193
- // a hexagon prism with a little lectern top
1028
+ // a hexagon podium with an amber rim
1194
1029
  const r = 0.42; const hgt = 0.62;
1195
1030
  const ring = [];
1196
1031
  for (let i = 0; i < 6; i++) { const an = (Math.PI / 3) * i + Math.PI / 6; ring.push([x + r * Math.cos(an), y + r * Math.sin(an)]); }
@@ -1198,136 +1033,85 @@ export class OfficeScene {
1198
1033
  const p = ring[i]; const q = ring[(i + 1) % 6];
1199
1034
  const nx = (p[0] + q[0]) / 2 - x; const ny = (p[1] + q[1]) / 2 - y;
1200
1035
  if (nx + ny <= 0.01) continue;
1201
- this.poly([this.P(p[0], p[1], 0), this.P(q[0], q[1], 0), this.P(q[0], q[1], hgt), this.P(p[0], p[1], hgt)], nx > ny ? pal.deskR : pal.deskL, 'rgba(36,22,12,.35)');
1036
+ this.poly([this.P(p[0], p[1], 0), this.P(q[0], q[1], 0), this.P(q[0], q[1], hgt), this.P(p[0], p[1], hgt)], nx > ny ? pal.deskR : pal.deskL);
1202
1037
  }
1203
- this.poly(ring.map((p) => this.P(p[0], p[1], hgt)), pal.deskTop, 'rgba(36,22,12,.35)');
1204
- ctx.fillStyle = '#E8951E';
1205
- const c = this.P(x, y, hgt);
1206
- ctx.beginPath(); ctx.ellipse(c[0], c[1], this.a * 0.22, this.a * 0.11, 0, 0, 6.28); ctx.fill();
1038
+ this.poly(ring.map((p) => this.P(p[0], p[1], hgt)), pal.deskTop, alpha(T.accent, 0.55), 1);
1039
+ void ctx;
1207
1040
  }
1208
1041
 
1209
1042
  drawDesk(a, pal) {
1210
1043
  const ctx = this.ctx;
1044
+ const T = pal.T;
1211
1045
  const { x, y } = a.desk;
1212
1046
  let sc = 1;
1213
1047
  if (a.build > 0) {
1214
- const u = clamp((this.now - a.build) / 1.3);
1215
- sc = u < 0.25 ? 0 : easeOutBack((u - 0.25) / 0.75);
1216
- if (u < 1 && Math.random() < 0.5 && !this.reduced()) {
1217
- const c = this.P(x + DW / 2, y + DD / 2, 0.2);
1218
- this.spawn({ kind: 'puff', x: c[0] + rnd(-40, 40) * this.a / 60, y: c[1] + rnd(-6, 10), vx: rnd(-20, 20), vy: rnd(-20, -4), life: rnd(0.6, 1), size: rnd(6, 14) * this.a / 60 });
1219
- }
1048
+ const u = clamp((this.now - a.build) / 0.5);
1049
+ sc = easeOut(u);
1220
1050
  if (u >= 1) a.build = -9;
1221
- if (sc <= 0) return;
1222
1051
  }
1223
1052
  const fade = a.leaving ? clamp(1 - (a.seg ? (this.now - a.seg.t0) / 1.2 : 1)) : 1;
1224
- const base = this.P(x + DW / 2, y + DD, 0);
1225
1053
  ctx.save();
1226
- ctx.globalAlpha = fade;
1227
- if (sc !== 1) { ctx.translate(base[0], base[1]); ctx.scale(1 / Math.max(0.4, sc) * Math.min(1, sc + 0.3), sc); ctx.translate(-base[0], -base[1]); }
1228
- // legs and modesty panel
1229
- this.box(x + 0.05, y + 0.08, 0, 0.08, DD - 0.16, DH - 0.06, pal.panel, shade(pal.panel, -0.1), shade(pal.panel, -0.2));
1230
- this.box(x + DW - 0.13, y + 0.08, 0, 0.08, DD - 0.16, DH - 0.06, pal.panel, shade(pal.panel, -0.1), shade(pal.panel, -0.2));
1231
- this.box(x + 0.13, y + 0.1, 0.12, DW - 0.26, 0.05, DH - 0.2, pal.panel, shade(pal.panel, -0.18), shade(pal.panel, -0.25));
1232
- // top
1233
- this.box(x, y, DH - 0.06, DW, DD, 0.07, pal.deskTop, pal.deskL, pal.deskR);
1234
- const z = DH + 0.01;
1235
- const kind = KIND[a.id] || 'hired';
1236
- const col = a.w.color || '#FFB531';
1054
+ ctx.globalAlpha = fade * sc;
1055
+ // a clean workstation: two slim legs, a slab top
1056
+ this.box(x + 0.06, y + 0.1, 0, 0.06, DD - 0.2, DH - 0.06, pal.leg, pal.leg, shade(pal.leg, -0.2));
1057
+ this.box(x + DW - 0.12, y + 0.1, 0, 0.06, DD - 0.2, DH - 0.06, pal.leg, pal.leg, shade(pal.leg, -0.2));
1058
+ this.box(x, y, DH - 0.06, DW, DD, 0.06, pal.deskTop, pal.deskL, pal.deskR, 'rgba(0,0,0,.2)');
1059
+ const z = DH;
1060
+ const col = tone(a.w.color || T.accent);
1237
1061
  const active = ['type', 'test', 'read', 'wait', 'stuck'].includes(a.mode);
1238
- // laptop: base, then the lid that faces the bee
1239
- const lx = x + 0.42; const ly = y + 0.24;
1240
- this.box(lx, ly, z, 0.74, 0.46, 0.035, '#D8D2C6', '#B9B2A5', '#A39C90');
1241
- this.box(lx, ly - 0.02, z + 0.035, 0.74, 0.04, 0.46, '#C9C2B6', '#CFC8BC', '#9F988C');
1242
- const lid = [this.P(lx, ly + 0.02, z + 0.035), this.P(lx + 0.74, ly + 0.02, z + 0.035), this.P(lx + 0.74, ly + 0.02, z + 0.495), this.P(lx, ly + 0.02, z + 0.495)];
1243
- const lc = this.P(lx + 0.37, ly + 0.02, z + 0.27);
1244
- ctx.save();
1245
- ctx.beginPath();
1246
- hexScreen(ctx, lc[0], lc[1], this.a * 0.09);
1247
- ctx.fillStyle = active ? col : shade(col, -0.35);
1248
- if (active && !this.mini) { ctx.shadowColor = col; ctx.shadowBlur = 10; }
1249
- ctx.fill();
1250
- ctx.restore();
1251
- void lid;
1252
- // the lamp
1253
- const lpx = x + 0.2; const lpy = y + 0.25;
1254
- this.cyl(lpx, lpy, z, 0.07, 0.03, '#4A3A2B', '#5A4836');
1255
- const s0 = this.P(lpx, lpy, z + 0.03); const s1 = this.P(lpx, lpy, z + 0.55);
1256
- ctx.strokeStyle = '#4A3A2B'; ctx.lineWidth = Math.max(1, this.a * 0.03); ctx.beginPath(); ctx.moveTo(s0[0], s0[1]); ctx.lineTo(s1[0], s1[1]); ctx.stroke();
1257
- const shadeW = this.a * 0.2;
1258
- ctx.fillStyle = pal.night > 0.3 ? '#FFE3A1' : '#F0B54A';
1259
- ctx.beginPath(); ctx.moveTo(s1[0] - shadeW * 0.45, s1[1] - this.a * 0.12); ctx.lineTo(s1[0] + shadeW * 0.45, s1[1] - this.a * 0.12); ctx.lineTo(s1[0] + shadeW, s1[1] + this.a * 0.04); ctx.lineTo(s1[0] - shadeW, s1[1] + this.a * 0.04); ctx.closePath(); ctx.fill();
1260
- ctx.strokeStyle = 'rgba(36,22,12,.5)'; ctx.lineWidth = 1; ctx.stroke();
1261
- a.lampAt = [s1[0], s1[1] + this.a * 0.04];
1262
- // role props at the front corner
1263
- const px = x + DW - 0.42; const py = y + DD - 0.3;
1264
- if (kind === 'dev') {
1265
- this.cyl(px, py, z, 0.1, 0.18, '#F2E9DA', '#3B2414');
1266
- const d = this.P(px - 0.55, py + 0.06, z + 0.08);
1267
- ctx.fillStyle = '#FFD23F'; ctx.beginPath(); ctx.ellipse(d[0], d[1], this.a * 0.1, this.a * 0.07, 0, 0, 6.28); ctx.fill();
1268
- ctx.beginPath(); ctx.arc(d[0] - this.a * 0.05, d[1] - this.a * 0.08, this.a * 0.055, 0, 6.28); ctx.fill();
1269
- ctx.fillStyle = '#F08A24'; ctx.beginPath(); ctx.moveTo(d[0] - this.a * 0.1, d[1] - this.a * 0.09); ctx.lineTo(d[0] - this.a * 0.16, d[1] - this.a * 0.07); ctx.lineTo(d[0] - this.a * 0.1, d[1] - this.a * 0.05); ctx.fill();
1270
- } else if (kind === 'designer') {
1271
- this.box(px - 0.45, py - 0.12, z, 0.5, 0.34, 0.02, '#2C2620', '#221D18', '#1A1612');
1272
- ['#FF7AB6', '#6CC4FF', '#FFD072', '#7DC49B'].forEach((c, i) => { const p = this.P(px - 0.38 + i * 0.11, py + 0.05, z + 0.025); ctx.fillStyle = c; ctx.beginPath(); ctx.ellipse(p[0], p[1], this.a * 0.04, this.a * 0.022, 0, 0, 6.28); ctx.fill(); });
1273
- this.cyl(px + 0.18, py - 0.05, z, 0.09, 0.2, '#86A9D6', '#3E5E86');
1274
- } else if (kind === 'qa') {
1275
- this.box(px - 0.5, py - 0.08, z, 0.55, 0.16, 0.08, '#8C6A3E', '#7A5A33', '#6B4E2C');
1276
- ['#7DC49B', '#FFB531', '#86A9D6'].forEach((c, i) => this.cyl(px - 0.42 + i * 0.17, py, z + 0.08, 0.045, 0.26, alpha(c, 0.85), '#F2E9DA'));
1277
- } else if (kind === 'writer') {
1278
- for (let i = 0; i < 4; i++) this.box(px - 0.5 + i * 0.015, py - 0.16 - i * 0.01, z + i * 0.03, 0.42, 0.3, 0.03, '#FFFDF6', '#E9E1D2', '#D9D0C0');
1279
- this.cyl(px + 0.15, py - 0.05, z, 0.08, 0.2, '#B9895A', '#3B2414');
1280
- } else {
1281
- this.cyl(px, py - 0.04, z, 0.11, 0.17, '#C46A3A', '#4A2E1A');
1282
- const leaf = this.P(px, py - 0.04, z + 0.28);
1283
- ctx.fillStyle = '#5FA36F';
1284
- for (let i = 0; i < 5; i++) { ctx.beginPath(); ctx.ellipse(leaf[0] + Math.cos(i * 1.3) * this.a * 0.07, leaf[1] - Math.abs(Math.sin(i * 1.3)) * this.a * 0.06, this.a * 0.06, this.a * 0.025, i * 1.3, 0, 6.28); ctx.fill(); }
1062
+ // the monitor: a thin slab facing the bee, its screen line lit in the agent color while it works
1063
+ const mx = x + 0.45; const my = y + 0.32; const mw = 0.9; const mh = 0.5;
1064
+ this.box(mx + mw / 2 - 0.05, my + 0.05, z, 0.1, 0.1, 0.12, pal.metal, pal.leg, pal.leg, null);
1065
+ this.box(mx, my, z + 0.12, mw, 0.04, mh, pal.screen, pal.screen, shade(pal.screen, -0.2), 'rgba(0,0,0,.35)');
1066
+ const s0 = this.P(mx + 0.06, my, z + 0.18); const s1 = this.P(mx + mw - 0.06, my, z + 0.18);
1067
+ ctx.strokeStyle = active ? col : alpha(T.text, 0.12); ctx.lineWidth = Math.max(1, this.a * 0.02);
1068
+ ctx.beginPath(); ctx.moveTo(s0[0], s0[1]); ctx.lineTo(s1[0], s1[1]); ctx.stroke();
1069
+ if (active) {
1070
+ // two code lines on the screen
1071
+ for (const [k, len] of [[0.36, 0.55], [0.28, 0.35]]) {
1072
+ const p0 = this.P(mx + 0.1, my, z + 0.12 + mh * (k + 0.2)); const p1 = this.P(mx + 0.1 + mw * len, my, z + 0.12 + mh * (k + 0.2));
1073
+ ctx.strokeStyle = alpha(col, 0.55); ctx.lineWidth = Math.max(0.8, this.a * 0.012);
1074
+ ctx.beginPath(); ctx.moveTo(p0[0], p0[1]); ctx.lineTo(p1[0], p1[1]); ctx.stroke();
1075
+ }
1285
1076
  }
1077
+ a.lampAt = this.P(mx + mw / 2, my, z + 0.4);
1286
1078
  ctx.restore();
1287
1079
  }
1288
1080
 
1289
1081
  drawChair(a, pal) {
1290
1082
  if (!a.desk) return;
1291
- const x = a.home.x - 0.25; const y = a.home.y - 0.32;
1292
- this.cyl(x + 0.25, y + 0.2, 0.02, 0.05, 0.42, '#3A2F25', '#3A2F25');
1293
- this.box(x, y - 0.05, 0.42, 0.5, 0.5, 0.08, shade(a.w.color, -0.2), shade(a.w.color, -0.4), shade(a.w.color, -0.5));
1294
- this.box(x, y - 0.1, 0.5, 0.5, 0.07, 0.62, shade(a.w.color, -0.25), shade(a.w.color, -0.35), shade(a.w.color, -0.5));
1295
- void pal;
1083
+ const x = a.home.x - 0.22; const y = a.home.y - 0.3;
1084
+ this.cyl(x + 0.22, y + 0.2, 0.02, 0.04, 0.4, pal.leg, pal.leg);
1085
+ this.box(x, y - 0.04, 0.42, 0.44, 0.44, 0.06, pal.partL, pal.partR, shade(pal.partR, -0.2), null);
1086
+ this.box(x, y - 0.08, 0.48, 0.44, 0.05, 0.5, pal.partL, pal.partL, shade(pal.partR, -0.25), null);
1296
1087
  }
1297
1088
 
1089
+ /** A minimal planter: a dark box and a faceted low poly crown. */
1298
1090
  drawPlant(x, y, s) {
1299
1091
  const ctx = this.ctx;
1300
- this.cyl(x, y, 0, 0.2 * s, 0.32 * s, '#C46A3A', '#4A2E1A');
1301
- const c = this.P(x, y, 0.32 * s);
1302
- const t = this.reduced() ? 0 : Math.sin(this.now * 0.8 + x) * 0.04;
1303
- for (let i = 0; i < 7; i++) {
1304
- const an = -Math.PI / 2 + (i - 3) * 0.42 + t;
1305
- const len = this.a * (0.42 + (i % 3) * 0.1) * s;
1306
- ctx.fillStyle = i % 2 ? '#4E8F5E' : '#63A874';
1307
- ctx.beginPath();
1308
- ctx.ellipse(c[0] + Math.cos(an) * len * 0.5, c[1] + Math.sin(an) * len * 0.5, len * 0.5, len * 0.16, an, 0, 6.28);
1309
- ctx.fill();
1310
- }
1092
+ const pal = this.pal;
1093
+ this.box(x - 0.18 * s, y - 0.18 * s, 0, 0.36 * s, 0.36 * s, 0.34 * s, pal.capSide, pal.leg, shade(pal.leg, -0.2), null);
1094
+ const b = this.P(x, y, 0.34 * s); const t = this.P(x, y, 1.15 * s);
1095
+ const w = this.a * 0.3 * s;
1096
+ ctx.fillStyle = pal.tree;
1097
+ ctx.beginPath(); ctx.moveTo(t[0], t[1]); ctx.lineTo(b[0] + w, b[1] - w * 0.2); ctx.lineTo(b[0], b[1] + w * 0.25); ctx.closePath(); ctx.fill();
1098
+ ctx.fillStyle = pal.treeB;
1099
+ ctx.beginPath(); ctx.moveTo(t[0], t[1]); ctx.lineTo(b[0] - w, b[1] - w * 0.2); ctx.lineTo(b[0], b[1] + w * 0.25); ctx.closePath(); ctx.fill();
1311
1100
  }
1312
1101
 
1313
- drawCooler(x, y, pal) {
1314
- const ctx = this.ctx;
1315
- this.box(x - 0.22, y - 0.22, 0, 0.44, 0.44, 0.9, pal.wallL, shade(pal.wallL, -0.1), shade(pal.wallL, -0.22));
1316
- this.cyl(x, y, 0.9, 0.17, 0.42, 'rgba(255,190,70,.85)', '#FFD072');
1317
- const s = this.P(x + 0.22, y + 0.05, 0.6);
1318
- ctx.fillStyle = '#7A4A1E'; ctx.fillRect(s[0] - 2, s[1] - 2, 5, 4);
1319
- }
1102
+ drawCooler() { /* removed in 1.0: no decorative props without meaning */ }
1320
1103
 
1321
1104
  drawShelfUnit(pal) {
1322
- // a bookshelf against the left wall near the back
1105
+ // a storage rack against the left wall near the back, neutral spines
1323
1106
  const x = 0.02; const y = 0.55;
1324
- this.box(x, y, 0, 0.42, 1.3, 1.75, pal.deskTop, pal.panel, shade(pal.panel, -0.2));
1325
- const colors = ['#E57B6E', '#86A9D6', '#FFD072', '#7DC49B', '#C9A0E8', '#F2E9DA'];
1107
+ this.box(x, y, 0, 0.42, 1.3, 1.75, pal.capSide, pal.leg, shade(pal.leg, -0.2), null);
1108
+ const T = pal.T;
1109
+ const spines = [pal.partL, pal.part, mixHex(pal.partL, T.info, 0.2), pal.partR, mixHex(pal.partL, T.accent, 0.18)];
1326
1110
  for (let row = 0; row < 3; row++) {
1327
1111
  const zz = 0.12 + row * 0.55;
1328
1112
  for (let i = 0; i < 5; i++) {
1329
1113
  const yy = y + 0.12 + i * 0.22;
1330
- this.poly([this.P(x + 0.42, yy, zz), this.P(x + 0.42, yy + 0.16, zz), this.P(x + 0.42, yy + 0.16, zz + 0.32 + ((i + row) % 3) * 0.05), this.P(x + 0.42, yy, zz + 0.32 + ((i + row) % 3) * 0.05)], colors[(i * 2 + row) % colors.length], 'rgba(36,22,12,.3)');
1114
+ this.poly([this.P(x + 0.42, yy, zz), this.P(x + 0.42, yy + 0.16, zz), this.P(x + 0.42, yy + 0.16, zz + 0.32 + ((i + row) % 3) * 0.05), this.P(x + 0.42, yy, zz + 0.32 + ((i + row) % 3) * 0.05)], spines[(i * 2 + row) % spines.length]);
1331
1115
  }
1332
1116
  }
1333
1117
  }
@@ -1337,123 +1121,70 @@ export class OfficeScene {
1337
1121
  const now = this.now;
1338
1122
  const reduced = this.reduced();
1339
1123
  const k = this.k;
1340
- let bob = 0; let tilt = 0; let sx = 1; let sy = 1; let wingRate = 22; let wingAmp = 0.28; let eyes = false; let jx = 0;
1124
+ const T = artTokens();
1125
+ let hover = 0;
1126
+ let wingAmp = 0.12;
1127
+ let wingRate = 18;
1341
1128
  const m = a.seg ? 'fly' : a.mode;
1342
1129
  if (!reduced) {
1343
1130
  switch (m) {
1344
- case 'fly': {
1345
- wingRate = 46; wingAmp = 0.55;
1346
- const u = a.flyU ?? 0;
1347
- const st = Math.sin(Math.PI * u) * 0.1;
1348
- sy = 1 + st; sx = 1 - st * 0.6;
1349
- tilt = (a.seg && a.seg.to.x - a.seg.from.x - (a.seg.to.y - a.seg.from.y) > 0 ? 0.12 : -0.12) * Math.sin(Math.PI * u);
1350
- break;
1351
- }
1352
- case 'type': bob = Math.sin(now * 16 + a.ph) * 0.018; wingRate = 26; break;
1353
- case 'plan': bob = Math.sin(now * 3 + a.ph) * 0.05; break;
1354
- case 'wait': {
1355
- // foot tapping: a short dip on every beat
1356
- const beat = (now * 2.2 + a.ph) % 1;
1357
- bob = beat < 0.2 ? -Math.sin((beat / 0.2) * Math.PI) * 0.05 : 0;
1358
- if (beat < 0.2) { sy = 0.96; sx = 1.03; }
1359
- wingRate = 14; wingAmp = 0.18;
1360
- break;
1361
- }
1362
- case 'stuck': bob = -0.04 + Math.sin(now * 1.4 + a.ph) * 0.02; tilt = Math.sin(now * 1.3) * 0.07; wingRate = 8; wingAmp = 0.12; break;
1363
- case 'sleep': case 'paused': bob = Math.sin(now * 1.1 + a.ph) * 0.012; tilt = 0.24; eyes = true; wingRate = 0; wingAmp = 0; sy = 1 + Math.sin(now * 1.1 + a.ph) * 0.015; break;
1364
- case 'error': jx = (now % 2 < 0.4) ? Math.sin(now * 60) * 1.6 : 0; bob = Math.sin(now * 2) * 0.02; break;
1365
- case 'celebrate': {
1366
- const hop = Math.abs(Math.sin((now - this.celebrateAt) * 5.5 + a.ph));
1367
- bob = hop * 0.42;
1368
- if (hop < 0.2) { sy = 0.86; sx = 1.12; } else { sy = 1.06; sx = 0.96; }
1369
- sx *= Math.cos((now - this.celebrateAt) * 3 + a.ph) > -0.2 ? 1 : -1;
1370
- wingRate = 40; wingAmp = 0.5;
1371
- break;
1372
- }
1373
- case 'test': bob = Math.sin(now * 5 + a.ph) * 0.03; break;
1374
- case 'read': bob = Math.sin(now * 2 + a.ph) * 0.03; tilt = Math.sin(now * 1.2) * 0.05; break;
1375
- default: bob = Math.sin(now * 2.2 + a.ph) * 0.05;
1131
+ case 'fly': wingAmp = 0.22; wingRate = 30; break;
1132
+ case 'sleep': case 'paused': wingAmp = 0; hover = 0; break;
1133
+ case 'type': case 'test': case 'read': hover = Math.sin(now * 2.4 + a.ph) * 0.012; break;
1134
+ default: hover = Math.sin(now * 1.6 + a.ph) * 0.02;
1376
1135
  }
1377
- // landing and take off squash, a hop when someone hands over a task
1378
- const sq = now - a.squashAt;
1379
- if (sq < 0.5) { const d = Math.exp(-sq * 9) * Math.cos(sq * 22) * 0.16; sy *= 1 - d; sx *= 1 + d * 0.8; }
1380
- const hp = now - a.hopAt;
1381
- if (hp < 0.6) { bob += Math.sin((hp / 0.6) * Math.PI) * 0.3; }
1382
- } else if (m === 'sleep' || m === 'paused') { tilt = 0.18; eyes = true; wingAmp = 0; }
1383
- else { wingAmp = 0.2; wingRate = 0; }
1384
- if (now >= a.blinkAt && now < a.blinkAt + 0.13) eyes = true;
1385
- // Mel's reactions to what the user does
1386
- if (a.react && !reduced) {
1387
- const rt = now - a.react.at;
1388
- if (rt > 1.4) a.react = null;
1389
- else if (a.react.kind === 'nod') { const n = Math.sin(rt * 14) * Math.exp(-rt * 2.2); bob += n * 0.05; sy *= 1 - Math.max(0, n) * 0.06; tilt += 0; }
1390
- else if (a.react.kind === 'curious') { tilt += Math.sin(Math.min(1, rt * 3) * Math.PI / 2) * 0.22 * (1 - clamp((rt - 1) / 0.4)); bob += 0.06 * Math.sin(Math.min(1, rt * 4) * Math.PI); }
1391
- else if (a.react.kind === 'shake') { tilt += Math.sin(rt * 16) * 0.12 * Math.exp(-rt * 2.5); }
1392
- } else if (a.react && reduced && now - a.react.at > 1.4) a.react = null;
1393
- // ease between poses so a change of state never snaps
1394
- if (!reduced) {
1395
- const kk = 1 - Math.pow(0.0004, Math.min(0.05, now - (a.lastPoseAt || now)));
1396
- a.tiltS = lerp(a.tiltS ?? tilt, tilt, a.seg ? 1 : kk);
1397
- a.bobS = lerp(a.bobS ?? bob, bob, Math.abs(bob - (a.bobS ?? bob)) > 0.12 ? kk : 1);
1398
- tilt = a.tiltS; bob = a.bobS;
1399
- }
1400
- a.lastPoseAt = now;
1401
-
1402
- const p = this.P(a.pos.x, a.pos.y, a.pos.z + bob);
1136
+ } else wingAmp = 0;
1137
+ const p = this.P(a.pos.x, a.pos.y, a.pos.z + hover);
1403
1138
  a.sx = p[0]; a.sy = p[1];
1139
+ const ground = this.P(a.pos.x, a.pos.y, 0);
1140
+ // the status ring under the unit
1141
+ const sc = statusColor(m === 'fly' ? 'idle' : m, T);
1142
+ const sleep = m === 'sleep' || m === 'paused';
1143
+ const pulsing = (m === 'plan' || m === 'type') && !reduced;
1144
+ const ringA = sleep ? 0.45 : pulsing ? 0.55 + 0.35 * (0.5 + 0.5 * Math.sin(now * 3.4 + a.ph)) : 0.85;
1145
+ ctx.save();
1146
+ ctx.globalAlpha = a.alpha * ringA;
1147
+ ctx.strokeStyle = sc; ctx.lineWidth = Math.max(1.2, k * 2.2);
1148
+ if (sleep) ctx.setLineDash([3, 3]);
1149
+ // on the floor under the unit, like a selection ring
1150
+ ctx.beginPath(); ctx.ellipse(ground[0], ground[1], 18 * k, 7.5 * k, 0, 0, 6.28); ctx.stroke();
1151
+ ctx.restore();
1404
1152
  const img = this.sprite(a.w);
1405
1153
  ctx.save();
1406
- ctx.globalAlpha = a.alpha * (m === 'paused' ? 0.7 : 1);
1407
- ctx.translate(p[0] + jx, p[1]);
1408
- // anchor: SVG point (32, 44) sits on the world point; squash around the bottom (32, 72)
1409
- ctx.translate(0, 28 * k);
1410
- ctx.rotate(tilt);
1411
- ctx.scale(sx, sy);
1412
- ctx.translate(-32 * k, -72 * k);
1413
- // wings behind the body
1414
- const flap = wingRate ? Math.sin(now * wingRate + a.ph) * wingAmp : -0.25;
1415
- ctx.fillStyle = 'rgba(255,253,245,.62)';
1416
- ctx.strokeStyle = 'rgba(36,22,12,.5)';
1417
- ctx.lineWidth = Math.max(0.6, k * 1);
1418
- for (const [wx, dir] of [[13.5, -1], [50.5, 1]]) {
1154
+ ctx.globalAlpha = a.alpha * (m === 'paused' ? 0.6 : 1);
1155
+ ctx.translate(p[0], p[1]);
1156
+ // anchor: SVG point (32, 44) sits on the world point
1157
+ ctx.translate(-32 * k, -44 * k);
1158
+ // translucent wings behind the body, a low flutter
1159
+ const flap = wingAmp ? Math.sin(now * wingRate + a.ph) * wingAmp : 0;
1160
+ ctx.fillStyle = alpha(T.text, 0.12);
1161
+ ctx.strokeStyle = alpha(T.text, 0.42);
1162
+ ctx.lineWidth = Math.max(0.6, k);
1163
+ for (const [wx, dir] of [[19, -1], [45, 1]]) {
1419
1164
  ctx.save();
1420
- ctx.translate((wx + dir * -6) * k, 30 * k);
1421
- ctx.rotate(dir * (0.56 - flap));
1422
- ctx.beginPath(); ctx.ellipse(dir * 7 * k, -4 * k, 10.5 * k, 6 * k * (1 - Math.abs(flap) * 0.35), 0, 0, 6.28);
1165
+ ctx.translate(wx * k, 27 * k);
1166
+ ctx.rotate(dir * (0.42 - flap));
1167
+ ctx.beginPath(); ctx.ellipse(dir * 4 * k, -2 * k, 11 * k, 5.4 * k, 0, 0, 6.28);
1423
1168
  ctx.fill(); ctx.stroke();
1424
1169
  ctx.restore();
1425
1170
  }
1426
1171
  if (img) ctx.drawImage(img, -4 * k, -2 * k, 72 * k, 76 * k);
1427
- else { ctx.fillStyle = a.w.color || '#FFB531'; ctx.beginPath(); ctx.arc(32 * k, 32 * k, 17 * k, 0, 6.28); ctx.fill(); }
1428
- if (eyes) {
1429
- ctx.fillStyle = '#FCC041';
1430
- ctx.strokeStyle = OUT; ctx.lineWidth = Math.max(0.8, 1.3 * k); ctx.lineCap = 'round';
1431
- for (const ex of [25.6, 38.4]) {
1432
- ctx.beginPath(); ctx.ellipse(ex * k, 31.6 * k, 4.3 * k, 5.1 * k, 0, 0, 6.28); ctx.fill();
1433
- ctx.beginPath(); ctx.moveTo((ex - 3) * k, 32 * k); ctx.quadraticCurveTo(ex * k, 34.8 * k, (ex + 3) * k, 32 * k); ctx.stroke();
1434
- }
1435
- ctx.lineCap = 'butt';
1436
- }
1437
- if (m === 'stuck' && !this.mini) {
1438
- // worried brows
1439
- ctx.strokeStyle = OUT; ctx.lineWidth = Math.max(0.8, 1.2 * k);
1440
- ctx.beginPath(); ctx.moveTo(22 * k, 24 * k); ctx.lineTo(28 * k, 26 * k); ctx.moveTo(42 * k, 24 * k); ctx.lineTo(36 * k, 26 * k); ctx.stroke();
1441
- }
1172
+ else { ctx.fillStyle = tone(a.w.color || T.accent); ctx.beginPath(); ctx.arc(32 * k, 40 * k, 14 * k, 0, 6.28); ctx.fill(); }
1442
1173
  ctx.restore();
1443
1174
  // the thing in its hands
1444
1175
  if (a.item) {
1445
- const hx = p[0]; const hy = p[1] + 26 * k;
1446
- if (a.item === 'note' || a.item === 'bad') drawNoteIcon(ctx, hx, hy, 15 * k * 1.25, a.item === 'bad' ? '#F6B3A8' : '#FFE08A', a.itemColor);
1447
- else drawParcel(ctx, hx, hy, 15 * k * 1.25, a.itemColor || '#FFB531');
1176
+ const hx = p[0]; const hy = p[1] + 18 * k;
1177
+ if (a.item === 'note' || a.item === 'bad') drawNoteIcon(ctx, hx, hy, 15 * k * 1.25, null, a.item === 'bad' ? T.bad : a.itemColor);
1178
+ else drawParcel(ctx, hx, hy, 14 * k * 1.25, a.itemColor || T.accent);
1448
1179
  }
1449
1180
  // the hit box for the DOM layer
1450
- this.hits.push({ id: a.id, x: p[0] - 26 * k, y: p[1] - 38 * k, w: 52 * k, h: 66 * k });
1181
+ this.hits.push({ id: a.id, x: p[0] - 26 * k, y: p[1] - 40 * k, w: 52 * k, h: 70 * k });
1451
1182
  }
1452
1183
 
1453
1184
  sprite(w) {
1454
1185
  const px = Math.max(16, Math.round(this.k * 72 * this.dpr));
1455
1186
  const key = `${w.color}|${w.role}|${w.name}|${px}`;
1456
- let sp = this.sprites.get(w.id);
1187
+ const sp = this.sprites.get(w.id);
1457
1188
  if (sp && sp.key === key) return sp.ready ? sp.img : sp.prev;
1458
1189
  const img = new Image();
1459
1190
  const svg = beeSvg(w, { title: '' })
@@ -1467,148 +1198,94 @@ export class OfficeScene {
1467
1198
  }
1468
1199
 
1469
1200
  drawLights(pal) {
1470
- if (pal.night < 0.25) return;
1471
1201
  const ctx = this.ctx;
1472
1202
  ctx.save();
1473
1203
  ctx.globalCompositeOperation = 'lighter';
1474
- const al = (pal.night - 0.2) * 0.32;
1204
+ // screens throw a faint light on busy units, a little more at night
1475
1205
  for (const a of this.actors.values()) {
1476
- if (!a.lampAt) continue;
1206
+ if (!['type', 'test', 'read'].includes(a.mode) || a.seg || !a.lampAt) continue;
1207
+ const r = this.a * 0.7;
1208
+ const [r0, g0, b0] = rgb(tone(a.w.color || pal.T.accent));
1477
1209
  const [x, y] = a.lampAt;
1478
- const r = this.a * 1.5;
1479
- const g = ctx.createRadialGradient(x, y + this.a * 0.25, 2, x, y + this.a * 0.25, r);
1480
- g.addColorStop(0, `rgba(255,190,90,${al})`); g.addColorStop(1, 'rgba(255,190,90,0)');
1481
- ctx.fillStyle = g; ctx.fillRect(x - r, y - r, r * 2, r * 2.2);
1482
- }
1483
- // screens glow on the faces of busy bees
1484
- for (const a of this.actors.values()) {
1485
- if (!['type', 'test', 'read'].includes(a.mode) || a.seg) continue;
1486
- const r = this.a * 0.6;
1487
- const [r0, g0, b0] = rgb(a.w.color);
1488
- const g = ctx.createRadialGradient(a.sx, a.sy + this.a * 0.2, 1, a.sx, a.sy + this.a * 0.2, r);
1489
- g.addColorStop(0, `rgba(${r0},${g0},${b0},${0.12 + pal.night * 0.1})`); g.addColorStop(1, `rgba(${r0},${g0},${b0},0)`);
1490
- ctx.fillStyle = g; ctx.fillRect(a.sx - r, a.sy - r * 0.8, r * 2, r * 2);
1210
+ const g = ctx.createRadialGradient(x, y, 1, x, y, r);
1211
+ g.addColorStop(0, `rgba(${r0},${g0},${b0},${0.06 + pal.night * 0.06})`); g.addColorStop(1, `rgba(${r0},${g0},${b0},0)`);
1212
+ ctx.fillStyle = g; ctx.fillRect(x - r, y - r, r * 2, r * 2);
1491
1213
  }
1492
1214
  ctx.restore();
1493
1215
  }
1494
1216
 
1495
- /** Bubbles, status icons, badges and name tags: always on top, never darkened. */
1217
+ /** Tags, bubbles, check marks and the waiting state: always on top, never darkened. */
1496
1218
  drawOverlay() {
1497
1219
  const ctx = this.ctx;
1498
1220
  const now = this.now;
1499
1221
  const k = this.k;
1500
1222
  const reduced = this.reduced();
1501
1223
  const s = this.getState();
1502
- // name tags first, so bubbles sit on top of them
1224
+ const T = artTokens();
1225
+ // info tags first, so bubbles sit on top of them
1503
1226
  if (!this.mini) {
1504
1227
  for (const a of this.actors.values()) {
1505
1228
  const at = a.desk ? this.P(a.desk.x + DW, a.desk.y + DD, 0) : this.P(MEL_HOME.x + 0.42, MEL_HOME.y + 0.42, 0);
1506
- drawNameTag(ctx, at[0], at[1] + 6, a.w.name, levelOf(s, a.id), a.w.color, this.highlight === a.id, Math.max(10, Math.min(12.5, this.a * 0.2)));
1229
+ const on = this.highlight === a.id;
1230
+ const t = a.taskId && s.tasks?.[a.taskId];
1231
+ drawNameTag(ctx, at[0], at[1] + 6, a.w.name, levelOf(s, a.id), a.w.color, on, Math.max(10.5, Math.min(12, this.a * 0.2)),
1232
+ { status: statusColor(a.seg ? 'idle' : a.mode, T), role: a.w.role, task: t?.title || '' });
1507
1233
  }
1508
1234
  }
1509
1235
  for (const a of this.actors.values()) {
1510
- const headY = a.sy - 34 * k;
1511
- const ix = a.sx + 22 * k;
1512
- const iy = headY - 6 * k;
1513
- const pop = reduced ? clamp((now - a.modeSince) / 0.25) : easeOutBack(clamp((now - a.modeSince) / 0.35));
1514
- const sz = (this.mini ? 9 : Math.max(14, Math.min(27, this.a * 0.42))) * (reduced ? 1 : Math.max(0.01, pop));
1515
- ctx.globalAlpha = a.alpha * (reduced ? pop : 1);
1236
+ const headY = a.sy - 40 * k;
1516
1237
  const m = a.seg ? 'fly' : a.mode;
1517
- const wob = reduced ? 0 : Math.sin(now * 3 + a.ph) * 2;
1518
- if (a.react && a.react.kind === 'curious' && now - a.react.at < 1.4) iconQuestion(ctx, ix, iy + wob, Math.max(13, Math.min(22, this.a * 0.34)));
1519
- else if (m === 'wait') iconClock(ctx, ix, iy + wob, sz, reduced ? 0 : now);
1520
- else if (m === 'stuck') {
1521
- // waiting for the user: a big grey cloud and a soft amber pulse around the bee
1522
- const pulse = reduced ? 0.5 : (Math.sin(now * 4) + 1) / 2;
1523
- ctx.strokeStyle = `rgba(232,180,92,${0.35 + pulse * 0.4})`; ctx.lineWidth = 2.5;
1524
- ctx.beginPath(); ctx.ellipse(a.sx, a.sy + 30 * k, (30 + pulse * 5) * k, (12 + pulse * 2) * k, 0, 0, 6.28); ctx.stroke();
1525
- iconCloud(ctx, a.sx, headY - sz * 1.3 + wob, sz * 1.9, reduced ? 0 : now);
1526
- if (!this.mini) drawPill(ctx, a.sx, headY - sz * 2.75 + wob, a.isMel ? 'Check the brief' : 'Needs your OK', '#E8B45C', Math.max(10, Math.min(12, this.a * 0.19)));
1527
- }
1528
- else if (m === 'paused') iconPause(ctx, ix, iy, sz);
1529
- else if (m === 'error') iconBang(ctx, ix, iy + wob, sz);
1530
- else if (m === 'test') iconFlask(ctx, ix, iy + wob, sz, reduced ? 0 : now);
1531
- else if (m === 'read') iconMag(ctx, ix, iy + wob, sz, reduced ? 0 : now);
1532
- else if (m === 'celebrate') iconJar(ctx, a.sx, headY - sz * 0.8 - (reduced ? 0 : Math.abs(Math.sin(now * 4 + a.ph)) * 6), sz * 1.1);
1533
- else if (m === 'plan') iconDots(ctx, ix, iy + wob, sz, reduced ? 0 : now);
1238
+ ctx.globalAlpha = a.alpha;
1239
+ if (m === 'stuck' && !this.mini) {
1240
+ // waiting for the user: a calm warn chip over the unit
1241
+ drawPill(ctx, a.sx, headY - 4, a.isMel ? 'Check the brief' : 'Needs your OK', T.warn, Math.max(10.5, Math.min(12, this.a * 0.19)));
1242
+ } else if (m === 'error') iconBang(ctx, a.sx + 20 * k, headY + 6 * k, Math.max(12, Math.min(18, this.a * 0.3)));
1534
1243
  if (a.badge) {
1535
1244
  const age = now - a.badge.at;
1536
- const pop = reduced ? 1 : easeOutBack(clamp(age / 0.3));
1537
- const fade = clamp((a.badge.until - now) / 0.4);
1538
- const bs = sz * (a.badge.big ? 1.5 : 1.15) * pop;
1245
+ const fade = clamp((a.badge.until - now) / 0.3) * (reduced ? 1 : easeOut(clamp(age / 0.2)));
1246
+ const bs = Math.max(12, Math.min(20, this.a * 0.3)) * (a.badge.big ? 1.2 : 1);
1539
1247
  ctx.globalAlpha = fade * a.alpha;
1540
- (a.badge.kind === 'ok' ? iconCheck : iconX)(ctx, a.sx - 22 * k, headY - 4 * k - (reduced ? 0 : age * 4), bs);
1248
+ (a.badge.kind === 'ok' ? iconCheck : iconX)(ctx, a.sx - 20 * k, headY + 8 * k - (reduced ? 0 : Math.min(age, 0.4) * 10), bs);
1541
1249
  }
1542
1250
  ctx.globalAlpha = 1;
1543
1251
  if (a.bubble && !this.mini) {
1544
1252
  const age = now - a.bubble.at;
1545
- const fade = Math.min(clamp(age / 0.2), clamp((a.bubble.until - now) / 0.35));
1253
+ const fade = Math.min(clamp(age / 0.2), clamp((a.bubble.until - now) / 0.25));
1546
1254
  ctx.globalAlpha = fade;
1547
- drawBubble(ctx, a.sx, headY - 10 * k - (m === 'stuck' ? sz * 3.3 : 0), a.bubble.text, Math.max(11, Math.min(13, this.a * 0.21)), this.w, a.w.color);
1255
+ drawBubble(ctx, a.sx, headY - (m === 'stuck' ? 26 : 2), a.bubble.text, Math.max(11, Math.min(12.5, this.a * 0.2)), this.w, a.w.color);
1548
1256
  ctx.globalAlpha = 1;
1549
1257
  }
1550
- if (this.highlight === a.id && !this.mini) {
1551
- ctx.strokeStyle = 'rgba(255,208,114,.9)'; ctx.lineWidth = 2; ctx.setLineDash([4, 4]);
1552
- ctx.beginPath(); ctx.ellipse(a.sx, a.sy + 30 * k, 26 * k, 10 * k, 0, 0, 6.28); ctx.stroke(); ctx.setLineDash([]);
1553
- }
1554
1258
  }
1555
1259
  // carried notes ride with Mel
1556
1260
  const mel = this.actors.get('mel');
1557
- if (mel) for (const n of this.notes.values()) if (n.state === 'carried') drawNoteIcon(ctx, mel.sx - 4, mel.sy + 22 * k, 16 * k * 1.3, '#FFE08A', this.actors.get(n.task?.assignee)?.w.color);
1261
+ if (mel) for (const n of this.notes.values()) if (n.state === 'carried') drawNoteIcon(ctx, mel.sx - 4, mel.sy + 18 * k, 16 * k * 1.3, null, this.actors.get(n.task?.assignee)?.w.color || T.accent);
1558
1262
  }
1559
1263
 
1560
1264
  drawParticles() {
1561
1265
  const ctx = this.ctx;
1266
+ const T = artTokens();
1562
1267
  for (const p of this.parts) {
1563
1268
  const life = 1 - p.age / p.max;
1564
- ctx.globalAlpha = clamp(life * 1.6);
1565
1269
  switch (p.kind) {
1566
- case 'glyph':
1567
- ctx.font = `700 ${p.size}px ${MONO}`;
1568
- ctx.fillStyle = p.color;
1569
- ctx.fillText(p.text, p.x, p.y);
1570
- break;
1571
- case 'z':
1572
- ctx.font = `800 ${p.size * (1 + p.age * 0.3)}px ${FONT}`;
1573
- ctx.fillStyle = '#E8DDF7';
1574
- ctx.fillText('z', p.x, p.y);
1575
- break;
1576
- case 'dot': case 'bubble':
1577
- ctx.fillStyle = p.color; ctx.beginPath(); ctx.arc(p.x, p.y, p.size, 0, 6.28); ctx.fill();
1578
- if (p.kind === 'bubble') { ctx.strokeStyle = 'rgba(255,255,255,.6)'; ctx.lineWidth = 1; ctx.stroke(); }
1579
- break;
1580
- case 'spark': {
1581
- ctx.fillStyle = p.color;
1582
- const r = p.size * (0.6 + life * 0.6);
1583
- ctx.beginPath(); ctx.moveTo(p.x, p.y - r * 2); ctx.lineTo(p.x + r * 0.5, p.y - r * 0.5); ctx.lineTo(p.x + r * 2, p.y); ctx.lineTo(p.x + r * 0.5, p.y + r * 0.5); ctx.lineTo(p.x, p.y + r * 2); ctx.lineTo(p.x - r * 0.5, p.y + r * 0.5); ctx.lineTo(p.x - r * 2, p.y); ctx.lineTo(p.x - r * 0.5, p.y - r * 0.5); ctx.closePath(); ctx.fill();
1270
+ case 'pulse': {
1271
+ const a = this.actors.get(p.id);
1272
+ if (!a) break;
1273
+ const u = easeOut(p.age / p.max);
1274
+ ctx.globalAlpha = (1 - u) * 0.8 * a.alpha;
1275
+ ctx.strokeStyle = p.tone === 'info' ? T.info : T.ok; ctx.lineWidth = 1.5;
1276
+ const g = this.P(a.pos.x, a.pos.y, 0);
1277
+ ctx.beginPath(); ctx.ellipse(g[0], g[1], (18 + u * 12) * this.k, (7.5 + u * 5) * this.k, 0, 0, 6.28); ctx.stroke();
1584
1278
  break;
1585
1279
  }
1586
- case 'puff':
1587
- ctx.fillStyle = 'rgba(242,233,218,.5)'; ctx.beginPath(); ctx.arc(p.x, p.y, p.size * (1 + p.age * 1.5), 0, 6.28); ctx.fill();
1588
- break;
1589
- case 'confetti':
1590
- ctx.save(); ctx.translate(p.x, p.y); ctx.rotate(p.rot); ctx.scale(1, Math.abs(Math.cos(p.rot * 1.3)) * 0.8 + 0.2);
1591
- ctx.fillStyle = p.color;
1592
- if (p.hex) { ctx.beginPath(); hexScreen(ctx, 0, 0, p.size * 0.55); ctx.fill(); } else ctx.fillRect(-p.size / 2, -p.size / 4, p.size, p.size / 2);
1593
- ctx.restore();
1594
- break;
1595
1280
  case 'label': {
1596
- ctx.font = `700 ${Math.max(10, this.a * 0.19)}px ${FONT}`;
1281
+ ctx.globalAlpha = clamp(life * 3);
1282
+ ctx.font = `500 ${Math.max(10, Math.min(11.5, this.a * 0.18))}px ${MONO}`;
1597
1283
  const tw = ctx.measureText(p.text).width;
1598
- ctx.fillStyle = 'rgba(20,16,12,.82)';
1599
- roundRect(ctx, p.x - tw / 2 - 6, p.y - 12, tw + 12, 18, 9); ctx.fill();
1284
+ ctx.fillStyle = alpha(T.panel, 0.9);
1285
+ roundRect(ctx, p.x - tw / 2 - 6, p.y - 12, tw + 12, 17, 4); ctx.fill();
1600
1286
  ctx.fillStyle = p.color; ctx.textAlign = 'center'; ctx.fillText(p.text, p.x, p.y + 1); ctx.textAlign = 'left';
1601
1287
  break;
1602
1288
  }
1603
- case 'jar': {
1604
- const u = easeInOut(clamp(p.age / p.max));
1605
- const cx = (p.x0 + p.x1) / 2; const cy = Math.min(p.y0, p.y1) - 120;
1606
- const x = (1 - u) * (1 - u) * p.x0 + 2 * (1 - u) * u * cx + u * u * p.x1;
1607
- const y = (1 - u) * (1 - u) * p.y0 + 2 * (1 - u) * u * cy + u * u * p.y1;
1608
- ctx.globalAlpha = 1;
1609
- iconJar(ctx, x, y, 18 - u * 6);
1610
- break;
1611
- }
1612
1289
  default: break;
1613
1290
  }
1614
1291
  }
@@ -1618,10 +1295,12 @@ export class OfficeScene {
1618
1295
  }
1619
1296
 
1620
1297
  /* ---------- state helpers ---------- */
1298
+ /** The agent's level from the City (xp the engine counts), or null when the engine has no city. */
1621
1299
  export function levelOf(s, id) {
1622
- let n = 0;
1623
- for (const t of Object.values(s.tasks || {})) if (t.assignee === id && t.status === 'done') n++;
1624
- return 1 + Math.floor(Math.sqrt(n));
1300
+ const agents = hub.view?.()?.agents || s?.city?.agents;
1301
+ if (!agents) return null;
1302
+ const a = agents[id] || Object.values(agents).find((x) => x.workerId === id && !x.retired);
1303
+ return a ? a.level || 1 : null;
1625
1304
  }
1626
1305
 
1627
1306
  export function doneCount(s) {
@@ -1637,8 +1316,6 @@ function cleanText(text) {
1637
1316
  return t;
1638
1317
  }
1639
1318
 
1640
- function hash(s) { let h = 0; for (let i = 0; i < s.length; i++) h = (h * 31 + s.charCodeAt(i)) | 0; return Math.abs(h); }
1641
-
1642
1319
  function wrap(ctx, text, maxW, maxLines) {
1643
1320
  const words = String(text).split(/\s+/);
1644
1321
  const lines = [];
@@ -1660,7 +1337,7 @@ function wrap(ctx, text, maxW, maxLines) {
1660
1337
  return lines;
1661
1338
  }
1662
1339
 
1663
- /* ---------- drawing helpers (screen space) ---------- */
1340
+ /* ---------- drawing helpers (screen space), shared with the City ---------- */
1664
1341
  function roundRect(ctx, x, y, w, h, r) {
1665
1342
  ctx.beginPath();
1666
1343
  ctx.moveTo(x + r, y);
@@ -1688,159 +1365,175 @@ function hexScreen(ctx, cx, cy, r) {
1688
1365
  ctx.closePath();
1689
1366
  }
1690
1367
 
1691
- function drawNameTag(ctx, x, y, name, level, color, on, fs) {
1692
- ctx.font = `650 ${fs}px ${FONT}`;
1693
- const tw = ctx.measureText(name).width;
1694
- const bw = fs * 1.9;
1695
- const w = tw + bw + 14;
1696
- const h = fs + 9;
1697
- const x0 = x - w / 2;
1698
- ctx.fillStyle = on ? 'rgba(48,38,28,.95)' : 'rgba(20,16,12,.78)';
1699
- roundRect(ctx, x0, y, w, h, h / 2); ctx.fill();
1700
- ctx.strokeStyle = on ? 'rgba(255,208,114,.8)' : 'rgba(242,233,218,.12)'; ctx.lineWidth = 1; ctx.stroke();
1701
- // level hex
1702
- ctx.fillStyle = color || '#FFB531';
1703
- ctx.beginPath(); hexScreen(ctx, x0 + h / 2 + 1, y + h / 2, h / 2 - 2); ctx.fill();
1704
- ctx.fillStyle = '#1A1206';
1705
- ctx.font = `800 ${fs * 0.78}px ${FONT}`;
1706
- ctx.textAlign = 'center';
1707
- ctx.fillText(String(level), x0 + h / 2 + 1, y + h / 2 + fs * 0.28);
1708
- ctx.textAlign = 'left';
1709
- ctx.font = `650 ${fs}px ${FONT}`;
1710
- ctx.fillStyle = '#F2E9DA';
1711
- ctx.fillText(name, x0 + h + 4, y + h / 2 + fs * 0.36);
1368
+ /**
1369
+ * The compact info tag under an agent: a status dot, the name and a quiet level badge. Hovered or
1370
+ * selected (`on`) with `more`, it expands to the role and the current task.
1371
+ * @param {{ status?: string, role?: string, task?: string }} [more]
1372
+ */
1373
+ function drawNameTag(ctx, x, y, name, level, color, on, fs, more) {
1374
+ const T = artTokens();
1375
+ const lv = level != null ? `L${level}` : '';
1376
+ ctx.font = `600 ${fs}px ${FONT}`;
1377
+ const nw = ctx.measureText(name).width;
1378
+ ctx.font = `500 ${fs * 0.82}px ${MONO}`;
1379
+ const lw = lv ? ctx.measureText(lv).width + 6 : 0;
1380
+ const h = Math.round(fs + 8);
1381
+ const lines = [];
1382
+ if (on && more) {
1383
+ ctx.font = `400 ${fs * 0.92}px ${FONT}`;
1384
+ if (more.role) lines.push(wrap(ctx, more.role, 200, 1)[0] || '');
1385
+ if (more.task) lines.push(wrap(ctx, more.task, 200, 1)[0] || '');
1386
+ }
1387
+ ctx.font = `400 ${fs * 0.92}px ${FONT}`;
1388
+ const extraW = Math.max(0, ...lines.map((l) => ctx.measureText(l).width));
1389
+ const w = Math.max(nw + lw + fs + 14, extraW + 18);
1390
+ const H = h + lines.length * (fs + 4) + (lines.length ? 4 : 0);
1391
+ const x0 = Math.round(x - w / 2);
1392
+ ctx.fillStyle = alpha(T.panel, on ? 0.96 : 0.82);
1393
+ roundRect(ctx, x0, y, w, H, 4); ctx.fill();
1394
+ ctx.strokeStyle = on ? alpha(T.accent, 0.7) : alpha(T.text, 0.1); ctx.lineWidth = 1; ctx.stroke();
1395
+ // status dot (the ring color), then the name and the level
1396
+ ctx.fillStyle = more?.status || tone(color || T.accent);
1397
+ ctx.beginPath(); ctx.arc(x0 + 9, y + h / 2, Math.max(2.5, fs * 0.24), 0, 6.28); ctx.fill();
1398
+ ctx.font = `600 ${fs}px ${FONT}`;
1399
+ ctx.fillStyle = T.text;
1400
+ ctx.fillText(name, x0 + 16, y + h / 2 + fs * 0.36);
1401
+ if (lv) {
1402
+ ctx.font = `500 ${fs * 0.82}px ${MONO}`;
1403
+ ctx.fillStyle = T.muted;
1404
+ ctx.fillText(lv, x0 + 16 + nw + 6, y + h / 2 + fs * 0.32);
1405
+ }
1406
+ if (lines.length) {
1407
+ ctx.font = `400 ${fs * 0.92}px ${FONT}`;
1408
+ lines.forEach((l, i) => {
1409
+ ctx.fillStyle = i === 0 && more.role ? T.muted : T.text2;
1410
+ ctx.fillText(l, x0 + 9, y + h + 2 + (i + 1) * (fs + 4) - 4);
1411
+ });
1412
+ }
1712
1413
  }
1713
1414
 
1714
1415
  function drawBubble(ctx, x, y, text, fs, W, color) {
1715
- ctx.font = `500 ${fs}px ${FONT}`;
1716
- const maxW = Math.min(230, W * 0.3);
1416
+ const T = artTokens();
1417
+ ctx.font = `400 ${fs}px ${FONT}`;
1418
+ const maxW = Math.min(240, W * 0.3);
1717
1419
  const lines = wrap(ctx, text, maxW, 2);
1718
1420
  const tw = Math.max(...lines.map((l) => ctx.measureText(l).width));
1719
- const pw = tw + 20; const ph = lines.length * (fs + 4) + 12;
1421
+ const pw = tw + 20; const ph = lines.length * (fs + 5) + 12;
1720
1422
  let bx = x - pw / 2;
1721
1423
  bx = Math.max(6, Math.min(W - pw - 6, bx));
1722
- const by = y - ph - 10;
1723
- ctx.fillStyle = 'rgba(0,0,0,.25)';
1724
- roundRect(ctx, bx + 1, by + 3, pw, ph, 10); ctx.fill();
1725
- ctx.fillStyle = '#FFF8EA';
1726
- roundRect(ctx, bx, by, pw, ph, 10); ctx.fill();
1727
- ctx.beginPath(); ctx.moveTo(x - 7, by + ph - 1); ctx.lineTo(x, by + ph + 9); ctx.lineTo(x + 5, by + ph - 1); ctx.closePath(); ctx.fill();
1728
- ctx.fillStyle = color || '#FFB531';
1729
- ctx.fillRect(bx + 8, by, Math.min(pw - 16, 28), 2.5);
1730
- ctx.fillStyle = '#2A1D12';
1731
- lines.forEach((l, i) => ctx.fillText(l, bx + 10, by + 8 + fs * 0.9 + i * (fs + 4)));
1424
+ const by = y - ph - 8;
1425
+ ctx.fillStyle = alpha(T.panel2, 0.96);
1426
+ roundRect(ctx, bx, by, pw, ph, 6); ctx.fill();
1427
+ ctx.strokeStyle = alpha(T.text, 0.12); ctx.lineWidth = 1; ctx.stroke();
1428
+ ctx.beginPath(); ctx.moveTo(x - 5, by + ph - 0.5); ctx.lineTo(x, by + ph + 6); ctx.lineTo(x + 5, by + ph - 0.5); ctx.closePath();
1429
+ ctx.fillStyle = alpha(T.panel2, 0.96); ctx.fill();
1430
+ ctx.fillStyle = tone(color || T.accent);
1431
+ ctx.fillRect(bx, by + 6, 2, ph - 12);
1432
+ ctx.fillStyle = T.text;
1433
+ lines.forEach((l, i) => ctx.fillText(l, bx + 11, by + 6 + fs * 0.92 + i * (fs + 5)));
1732
1434
  }
1733
1435
 
1734
- function circleIcon(ctx, x, y, s, fill) {
1735
- ctx.fillStyle = 'rgba(0,0,0,.25)'; ctx.beginPath(); ctx.arc(x + 1, y + 2, s / 2, 0, 6.28); ctx.fill();
1736
- ctx.fillStyle = fill; ctx.beginPath(); ctx.arc(x, y, s / 2, 0, 6.28); ctx.fill();
1737
- ctx.strokeStyle = OUT; ctx.lineWidth = Math.max(1, s * 0.07); ctx.stroke();
1436
+ /** A round status chip: panel fill, a hairline in the tone, a glyph drawn by `glyph`. */
1437
+ function circleIcon(ctx, x, y, s, toneColor) {
1438
+ const T = artTokens();
1439
+ ctx.fillStyle = alpha(T.panel2, 0.96); ctx.beginPath(); ctx.arc(x, y, s / 2, 0, 6.28); ctx.fill();
1440
+ ctx.strokeStyle = alpha(toneColor, 0.75); ctx.lineWidth = 1; ctx.stroke();
1738
1441
  }
1739
- function iconClock(ctx, x, y, s, t) {
1740
- circleIcon(ctx, x, y, s, '#FFF8EA');
1741
- ctx.strokeStyle = OUT; ctx.lineCap = 'round'; ctx.lineWidth = Math.max(1.2, s * 0.09);
1742
- const a1 = t * 6; const a2 = t * 0.5;
1743
- ctx.beginPath(); ctx.moveTo(x, y); ctx.lineTo(x + Math.sin(a1) * s * 0.33, y - Math.cos(a1) * s * 0.33); ctx.moveTo(x, y); ctx.lineTo(x + Math.sin(a2) * s * 0.22, y - Math.cos(a2) * s * 0.22); ctx.stroke();
1442
+ function iconClock(ctx, x, y, s) {
1443
+ const T = artTokens();
1444
+ circleIcon(ctx, x, y, s, T.warn);
1445
+ ctx.strokeStyle = T.warn; ctx.lineCap = 'round'; ctx.lineWidth = Math.max(1.2, s * 0.08);
1446
+ ctx.beginPath(); ctx.moveTo(x, y - s * 0.24); ctx.lineTo(x, y); ctx.lineTo(x + s * 0.18, y + s * 0.1); ctx.stroke();
1744
1447
  ctx.lineCap = 'butt';
1745
- ctx.fillStyle = '#E8951E'; ctx.fillRect(x - s * 0.12, y - s * 0.66, s * 0.24, s * 0.12);
1746
- }
1747
- function iconCloud(ctx, x, y, s, t) {
1748
- ctx.fillStyle = '#9AA3B5';
1749
- ctx.strokeStyle = OUT; ctx.lineWidth = Math.max(1, s * 0.06);
1750
- ctx.beginPath();
1751
- ctx.arc(x - s * 0.3, y, s * 0.26, Math.PI * 0.5, Math.PI * 1.5);
1752
- ctx.arc(x - s * 0.05, y - s * 0.2, s * 0.3, Math.PI * 1.05, Math.PI * 1.9);
1753
- ctx.arc(x + s * 0.3, y - s * 0.02, s * 0.24, Math.PI * 1.3, Math.PI * 0.5);
1754
- ctx.closePath(); ctx.fill(); ctx.stroke();
1755
- ctx.fillStyle = '#F2E9DA'; ctx.font = `800 ${s * 0.42}px ${FONT}`; ctx.textAlign = 'center'; ctx.fillText('?', x, y + s * 0.08); ctx.textAlign = 'left';
1756
- ctx.strokeStyle = '#86A9D6'; ctx.lineWidth = Math.max(1, s * 0.06); ctx.lineCap = 'round';
1757
- for (let i = 0; i < 3; i++) {
1758
- const ph = ((t * 1.6 + i / 3) % 1);
1759
- const dx = x - s * 0.25 + i * s * 0.25; const dy = y + s * 0.3 + ph * s * 0.45;
1760
- ctx.globalAlpha = 1 - ph;
1761
- ctx.beginPath(); ctx.moveTo(dx, dy); ctx.lineTo(dx - s * 0.04, dy + s * 0.1); ctx.stroke();
1762
- }
1763
- ctx.globalAlpha = 1; ctx.lineCap = 'butt';
1764
1448
  }
1765
1449
  function iconCheck(ctx, x, y, s) {
1766
- circleIcon(ctx, x, y, s, '#5DB27E');
1767
- ctx.strokeStyle = '#fff'; ctx.lineWidth = Math.max(1.6, s * 0.13); ctx.lineCap = 'round'; ctx.lineJoin = 'round';
1768
- ctx.beginPath(); ctx.moveTo(x - s * 0.22, y); ctx.lineTo(x - s * 0.05, y + s * 0.17); ctx.lineTo(x + s * 0.24, y - s * 0.16); ctx.stroke();
1450
+ const T = artTokens();
1451
+ circleIcon(ctx, x, y, s, T.ok);
1452
+ ctx.strokeStyle = T.ok; ctx.lineWidth = Math.max(1.4, s * 0.1); ctx.lineCap = 'round'; ctx.lineJoin = 'round';
1453
+ ctx.beginPath(); ctx.moveTo(x - s * 0.2, y + s * 0.01); ctx.lineTo(x - s * 0.05, y + s * 0.15); ctx.lineTo(x + s * 0.21, y - s * 0.13); ctx.stroke();
1769
1454
  ctx.lineCap = 'butt'; ctx.lineJoin = 'miter';
1770
1455
  }
1771
1456
  function iconX(ctx, x, y, s) {
1772
- circleIcon(ctx, x, y, s, '#D9614F');
1773
- ctx.strokeStyle = '#fff'; ctx.lineWidth = Math.max(1.6, s * 0.13); ctx.lineCap = 'round';
1774
- ctx.beginPath(); ctx.moveTo(x - s * 0.17, y - s * 0.17); ctx.lineTo(x + s * 0.17, y + s * 0.17); ctx.moveTo(x + s * 0.17, y - s * 0.17); ctx.lineTo(x - s * 0.17, y + s * 0.17); ctx.stroke();
1457
+ const T = artTokens();
1458
+ circleIcon(ctx, x, y, s, T.bad);
1459
+ ctx.strokeStyle = T.bad; ctx.lineWidth = Math.max(1.4, s * 0.1); ctx.lineCap = 'round';
1460
+ ctx.beginPath(); ctx.moveTo(x - s * 0.14, y - s * 0.14); ctx.lineTo(x + s * 0.14, y + s * 0.14); ctx.moveTo(x + s * 0.14, y - s * 0.14); ctx.lineTo(x - s * 0.14, y + s * 0.14); ctx.stroke();
1775
1461
  ctx.lineCap = 'butt';
1776
1462
  }
1463
+ /** A small chip: a dot in the tone and the text, on dark glass. `y` is the text baseline. */
1777
1464
  function drawPill(ctx, x, y, text, color, fs) {
1778
- ctx.font = `750 ${fs}px ${FONT}`;
1465
+ const T = artTokens();
1466
+ ctx.font = `500 ${fs}px ${FONT}`;
1779
1467
  const tw = ctx.measureText(text).width;
1780
- ctx.fillStyle = 'rgba(20,16,12,.88)';
1781
- roundRect(ctx, x - tw / 2 - 8, y - fs - 2, tw + 16, fs + 9, (fs + 9) / 2); ctx.fill();
1782
- ctx.strokeStyle = color; ctx.lineWidth = 1; ctx.stroke();
1783
- ctx.fillStyle = color; ctx.textAlign = 'center'; ctx.fillText(text, x, y + 1); ctx.textAlign = 'left';
1468
+ const w = tw + 24; const h = fs + 9;
1469
+ const x0 = Math.round(x - w / 2); const y0 = Math.round(y - fs - 2);
1470
+ ctx.fillStyle = alpha(T.panel, 0.92);
1471
+ roundRect(ctx, x0, y0, w, h, 4); ctx.fill();
1472
+ ctx.strokeStyle = alpha(color, 0.5); ctx.lineWidth = 1; ctx.stroke();
1473
+ ctx.fillStyle = color; ctx.beginPath(); ctx.arc(x0 + 9, y0 + h / 2, 2.6, 0, 6.28); ctx.fill();
1474
+ ctx.fillStyle = T.text; ctx.fillText(text, x0 + 16, y0 + h / 2 + fs * 0.35);
1784
1475
  }
1785
1476
  function iconQuestion(ctx, x, y, s) {
1786
- circleIcon(ctx, x, y, s, '#86A9D6');
1787
- ctx.fillStyle = '#fff'; ctx.font = `900 ${s * 0.62}px ${FONT}`; ctx.textAlign = 'center'; ctx.fillText('?', x, y + s * 0.22); ctx.textAlign = 'left';
1477
+ const T = artTokens();
1478
+ circleIcon(ctx, x, y, s, T.info);
1479
+ ctx.fillStyle = T.info; ctx.font = `600 ${s * 0.56}px ${FONT}`; ctx.textAlign = 'center'; ctx.fillText('?', x, y + s * 0.2); ctx.textAlign = 'left';
1788
1480
  }
1789
1481
  function iconPause(ctx, x, y, s) {
1790
- circleIcon(ctx, x, y, s, '#CFC4B3');
1791
- ctx.fillStyle = OUT; ctx.fillRect(x - s * 0.17, y - s * 0.2, s * 0.12, s * 0.4); ctx.fillRect(x + s * 0.05, y - s * 0.2, s * 0.12, s * 0.4);
1482
+ const T = artTokens();
1483
+ circleIcon(ctx, x, y, s, T.muted);
1484
+ ctx.fillStyle = T.muted; ctx.fillRect(x - s * 0.15, y - s * 0.18, s * 0.1, s * 0.36); ctx.fillRect(x + s * 0.05, y - s * 0.18, s * 0.1, s * 0.36);
1792
1485
  }
1793
1486
  function iconBang(ctx, x, y, s) {
1794
- circleIcon(ctx, x, y, s, '#E57B6E');
1795
- ctx.fillStyle = '#fff'; ctx.font = `900 ${s * 0.62}px ${FONT}`; ctx.textAlign = 'center'; ctx.fillText('!', x, y + s * 0.22); ctx.textAlign = 'left';
1487
+ const T = artTokens();
1488
+ circleIcon(ctx, x, y, s, T.bad);
1489
+ ctx.fillStyle = T.bad; ctx.font = `700 ${s * 0.56}px ${FONT}`; ctx.textAlign = 'center'; ctx.fillText('!', x, y + s * 0.2); ctx.textAlign = 'left';
1796
1490
  }
1797
- function iconFlask(ctx, x, y, s, t) {
1798
- circleIcon(ctx, x, y, s, '#F2E9DA');
1799
- ctx.fillStyle = '#7DC49B';
1800
- ctx.beginPath(); ctx.moveTo(x - s * 0.08, y - s * 0.24); ctx.lineTo(x + s * 0.08, y - s * 0.24); ctx.lineTo(x + s * 0.08, y - s * 0.05); ctx.lineTo(x + s * 0.24, y + s * 0.22); ctx.lineTo(x - s * 0.24, y + s * 0.22); ctx.lineTo(x - s * 0.08, y - s * 0.05); ctx.closePath();
1801
- ctx.strokeStyle = OUT; ctx.lineWidth = Math.max(1, s * 0.06); ctx.fill(); ctx.stroke();
1802
- ctx.fillStyle = '#fff'; ctx.beginPath(); ctx.arc(x - s * 0.04, y + s * 0.1 - ((t * 2) % 1) * s * 0.12, s * 0.04, 0, 6.28); ctx.fill();
1491
+ function iconFlask(ctx, x, y, s) {
1492
+ const T = artTokens();
1493
+ circleIcon(ctx, x, y, s, T.ok);
1494
+ ctx.strokeStyle = T.ok; ctx.lineWidth = Math.max(1.2, s * 0.08); ctx.lineJoin = 'round';
1495
+ ctx.beginPath(); ctx.moveTo(x - s * 0.07, y - s * 0.22); ctx.lineTo(x - s * 0.07, y - s * 0.04); ctx.lineTo(x - s * 0.2, y + s * 0.2); ctx.lineTo(x + s * 0.2, y + s * 0.2); ctx.lineTo(x + s * 0.07, y - s * 0.04); ctx.lineTo(x + s * 0.07, y - s * 0.22); ctx.stroke();
1496
+ ctx.lineJoin = 'miter';
1803
1497
  }
1804
- function iconMag(ctx, x, y, s, t) {
1805
- circleIcon(ctx, x, y, s, '#F2E9DA');
1806
- const dx = Math.sin(t * 2.4) * s * 0.06;
1807
- ctx.strokeStyle = OUT; ctx.lineWidth = Math.max(1.2, s * 0.08);
1808
- ctx.beginPath(); ctx.arc(x - s * 0.06 + dx, y - s * 0.06, s * 0.16, 0, 6.28); ctx.stroke();
1809
- ctx.beginPath(); ctx.moveTo(x + s * 0.06 + dx, y + s * 0.06); ctx.lineTo(x + s * 0.22 + dx, y + s * 0.22); ctx.stroke();
1498
+ function iconMag(ctx, x, y, s) {
1499
+ const T = artTokens();
1500
+ circleIcon(ctx, x, y, s, T.info);
1501
+ ctx.strokeStyle = T.info; ctx.lineWidth = Math.max(1.2, s * 0.08); ctx.lineCap = 'round';
1502
+ ctx.beginPath(); ctx.arc(x - s * 0.05, y - s * 0.05, s * 0.15, 0, 6.28); ctx.stroke();
1503
+ ctx.beginPath(); ctx.moveTo(x + s * 0.06, y + s * 0.06); ctx.lineTo(x + s * 0.2, y + s * 0.2); ctx.stroke();
1504
+ ctx.lineCap = 'butt';
1810
1505
  }
1811
1506
  function iconDots(ctx, x, y, s, t) {
1812
- ctx.fillStyle = '#FFF8EA';
1813
- roundRect(ctx, x - s * 0.55, y - s * 0.35, s * 1.1, s * 0.7, s * 0.35); ctx.fill();
1814
- ctx.strokeStyle = OUT; ctx.lineWidth = Math.max(1, s * 0.06); ctx.stroke();
1507
+ const T = artTokens();
1508
+ ctx.fillStyle = alpha(T.panel2, 0.96);
1509
+ roundRect(ctx, x - s * 0.5, y - s * 0.3, s, s * 0.6, s * 0.3); ctx.fill();
1510
+ ctx.strokeStyle = alpha(T.accent, 0.6); ctx.lineWidth = 1; ctx.stroke();
1815
1511
  for (let i = 0; i < 3; i++) {
1816
- const on = Math.floor(t * 3) % 3 === i;
1817
- ctx.fillStyle = on ? '#E8951E' : '#8C8172';
1818
- ctx.beginPath(); ctx.arc(x - s * 0.25 + i * s * 0.25, y, s * (on ? 0.09 : 0.07), 0, 6.28); ctx.fill();
1512
+ const on = Math.floor(t * 2) % 3 === i;
1513
+ ctx.fillStyle = on ? T.accent : T.muted;
1514
+ ctx.beginPath(); ctx.arc(x - s * 0.22 + i * s * 0.22, y, s * 0.06, 0, 6.28); ctx.fill();
1819
1515
  }
1820
1516
  }
1821
- export function iconJar(ctx, x, y, s) {
1822
- ctx.fillStyle = 'rgba(0,0,0,.25)'; roundRect(ctx, x - s * 0.36 + 1, y - s * 0.3 + 2, s * 0.72, s * 0.78, s * 0.2); ctx.fill();
1823
- ctx.fillStyle = '#F3A42A'; roundRect(ctx, x - s * 0.36, y - s * 0.3, s * 0.72, s * 0.78, s * 0.2); ctx.fill();
1824
- ctx.strokeStyle = OUT; ctx.lineWidth = Math.max(1, s * 0.06); ctx.stroke();
1825
- ctx.fillStyle = '#FFD072'; roundRect(ctx, x - s * 0.24, y - s * 0.16, s * 0.12, s * 0.45, s * 0.06); ctx.fill();
1826
- ctx.fillStyle = '#7A4A1E'; roundRect(ctx, x - s * 0.42, y - s * 0.46, s * 0.84, s * 0.2, s * 0.06); ctx.fill(); ctx.stroke();
1827
- ctx.fillStyle = '#FFF1CF'; ctx.beginPath(); hexScreen(ctx, x + s * 0.06, y + s * 0.1, s * 0.15); ctx.fill();
1828
- }
1517
+ /** Kept for older callers: a finished task, drawn as a quiet check chip (no jars in 1.0). */
1518
+ export function iconJar(ctx, x, y, s) { iconCheck(ctx, x, y, s); }
1519
+ /** A compute packet: a small hexagon outline in the link or agent color. */
1829
1520
  function drawParcel(ctx, x, y, s, color) {
1830
- ctx.fillStyle = 'rgba(0,0,0,.25)'; ctx.fillRect(x - s * 0.5 + 1, y - s * 0.35 + 2, s, s * 0.7);
1831
- ctx.fillStyle = '#D7A86A'; ctx.fillRect(x - s * 0.5, y - s * 0.35, s, s * 0.7);
1832
- ctx.strokeStyle = OUT; ctx.lineWidth = Math.max(1, s * 0.06); ctx.strokeRect(x - s * 0.5, y - s * 0.35, s, s * 0.7);
1833
- ctx.fillStyle = color; ctx.fillRect(x - s * 0.08, y - s * 0.35, s * 0.16, s * 0.7); ctx.fillRect(x - s * 0.5, y - s * 0.06, s, s * 0.12);
1834
- ctx.beginPath(); ctx.ellipse(x - s * 0.14, y - s * 0.42, s * 0.14, s * 0.08, -0.5, 0, 6.28); ctx.ellipse(x + s * 0.14, y - s * 0.42, s * 0.14, s * 0.08, 0.5, 0, 6.28); ctx.fill();
1521
+ const T = artTokens();
1522
+ ctx.fillStyle = alpha(T.panel2, 0.95); ctx.beginPath(); hexScreen(ctx, x, y, s * 0.42); ctx.fill();
1523
+ ctx.strokeStyle = color || T.link; ctx.lineWidth = 1.2; ctx.stroke();
1524
+ ctx.fillStyle = color || T.link; ctx.beginPath(); hexScreen(ctx, x, y, s * 0.16); ctx.fill();
1835
1525
  }
1526
+ /** A task card in flight: a dark card with a colored rule. `fill` is ignored (kept for older callers). */
1836
1527
  function drawNoteIcon(ctx, x, y, s, fill, strip) {
1837
- ctx.save(); ctx.translate(x, y); ctx.rotate(-0.12);
1838
- ctx.fillStyle = 'rgba(0,0,0,.25)'; ctx.fillRect(-s * 0.5 + 1, -s * 0.4 + 2, s, s * 0.8);
1839
- ctx.fillStyle = fill; ctx.fillRect(-s * 0.5, -s * 0.4, s, s * 0.8);
1840
- ctx.fillStyle = strip || '#FFB531'; ctx.fillRect(-s * 0.5, -s * 0.4, s, s * 0.14);
1841
- ctx.fillStyle = 'rgba(43,29,18,.45)'; ctx.fillRect(-s * 0.36, -s * 0.12, s * 0.7, s * 0.07); ctx.fillRect(-s * 0.36, s * 0.04, s * 0.5, s * 0.07);
1528
+ const T = artTokens();
1529
+ void fill;
1530
+ ctx.save(); ctx.translate(Math.round(x), Math.round(y));
1531
+ ctx.fillStyle = alpha(T.panel3, 0.97); roundRect(ctx, -s * 0.5, -s * 0.34, s, s * 0.68, 2); ctx.fill();
1532
+ ctx.strokeStyle = alpha(T.text, 0.14); ctx.lineWidth = 1; ctx.stroke();
1533
+ ctx.fillStyle = strip || T.accent; ctx.fillRect(-s * 0.5, -s * 0.34, Math.max(1.5, s * 0.08), s * 0.68);
1534
+ ctx.fillStyle = alpha(T.text, 0.45); ctx.fillRect(-s * 0.28, -s * 0.12, s * 0.62, Math.max(1, s * 0.06)); ctx.fillRect(-s * 0.28, s * 0.06, s * 0.42, Math.max(1, s * 0.06));
1842
1535
  ctx.restore();
1843
1536
  }
1844
1537
 
1845
- // Shared with the City scene (ui/city/scene.js), which reuses the Office art.
1846
- export { roundRect, hexPath, hexScreen, wrap, drawNameTag, drawBubble, drawPill, iconClock, iconCheck, iconX, iconDots, iconMag, iconFlask, iconQuestion, iconPause, drawNoteIcon, drawParcel, mixHex, shade, alpha, rgb, goldenFactor };
1538
+ // Shared with the City scene (ui/city/scene.js), which reuses the Office kit.
1539
+ export { roundRect, hexPath, hexScreen, wrap, drawNameTag, drawBubble, drawPill, iconClock, iconCheck, iconX, iconDots, iconMag, iconFlask, iconQuestion, iconPause, iconBang, drawNoteIcon, drawParcel, mixHex, shade, alpha, rgb, goldenFactor };