@floless/app 0.167.0 → 0.169.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 (277) hide show
  1. package/autostart.mjs +169 -63
  2. package/cli-actions.mjs +8 -1
  3. package/desktop-shell.mjs +335 -0
  4. package/dist/floless-server.cjs +73121 -55759
  5. package/dist/schemas/steel.model.v2.schema.json +2 -1
  6. package/dist/skills/floless-app-onboarding/SKILL.md +13 -4
  7. package/dist/skills/floless-app-onboarding/references/floless-surfaces.md +3 -0
  8. package/dist/skills/floless-app-rfi/SKILL.md +4 -2
  9. package/dist/skills/floless-app-steel-takeoff/SKILL.md +21 -2
  10. package/dist/skills/floless-app-ui/SKILL.md +2 -2
  11. package/dist/skills/floless-app-workflows/SKILL.md +2 -2
  12. package/dist/templates/college-phase-exporter.flo +7 -2
  13. package/dist/templates/trimble-list-projects.flo +10 -2
  14. package/dist/web/agent-steps.js +2 -2
  15. package/dist/web/agents.js +50 -14
  16. package/dist/web/app.css +209 -11
  17. package/dist/web/app.js +99 -16
  18. package/dist/web/aware-update-client.js +14 -6
  19. package/dist/web/aware.js +583 -69
  20. package/dist/web/chat.css +12 -1
  21. package/dist/web/chat.js +627 -96
  22. package/dist/web/commands-drawing-check.js +3 -0
  23. package/dist/web/commands-filter.js +5 -5
  24. package/dist/web/commands-shell.js +283 -14
  25. package/dist/web/commands-steel.js +9 -2
  26. package/dist/web/commands-vector.js +69 -0
  27. package/dist/web/desktop-window.js +435 -0
  28. package/dist/web/drawing-check-editor.html +10 -0
  29. package/dist/web/drawing-check-editor.js +515 -187
  30. package/dist/web/failure-copy.js +33 -2
  31. package/dist/web/flo-3d.js +310 -0
  32. package/dist/web/flo-card.js +72 -0
  33. package/dist/web/guide.js +78 -10
  34. package/dist/web/index.html +90 -10
  35. package/dist/web/instructor.js +4 -1
  36. package/dist/web/leave-guard.js +347 -14
  37. package/dist/web/model-editor-steel-adapter.js +41 -1
  38. package/dist/web/model-viewport-toolbar.js +11 -0
  39. package/dist/web/pages.js +21 -14
  40. package/dist/web/panels.js +5 -2
  41. package/dist/web/pdf-view.js +421 -0
  42. package/dist/web/project-history.js +3 -2
  43. package/dist/web/project-modules.js +5 -3
  44. package/dist/web/project-reconciliation.js +1 -1
  45. package/dist/web/project-rfis.js +4 -2
  46. package/dist/web/project-workflows.js +8 -4
  47. package/dist/web/reference-geometry-worker.js +11 -2
  48. package/dist/web/renderers.js +6 -0
  49. package/dist/web/report-csp.js +68 -0
  50. package/dist/web/revit-editor.html +1 -0
  51. package/dist/web/revit-editor.js +37 -8
  52. package/dist/web/run-history.js +2 -3
  53. package/dist/web/shared-prefs.js +364 -0
  54. package/dist/web/steel-3d-flo.js +309 -0
  55. package/dist/web/steel-3d-view.js +159 -0
  56. package/dist/web/steel-editor.html +329 -47
  57. package/dist/web/steel-filter-flo.js +74 -18
  58. package/dist/web/steel-filter.html +22 -6
  59. package/dist/web/tab-signal.js +36 -1
  60. package/dist/web/tekla-editor.html +1 -0
  61. package/dist/web/terminal-requests.js +78 -0
  62. package/dist/web/tool-updates.js +160 -38
  63. package/dist/web/vector-3d.html +14 -3
  64. package/dist/web/vector-editor.html +60 -10
  65. package/dist/web/vendor/README.md +23 -0
  66. package/dist/web/vendor/pdfjs/LICENSE +177 -0
  67. package/dist/web/vendor/pdfjs/cmaps/78-EUC-H.bcmap +0 -0
  68. package/dist/web/vendor/pdfjs/cmaps/78-EUC-V.bcmap +0 -0
  69. package/dist/web/vendor/pdfjs/cmaps/78-H.bcmap +0 -0
  70. package/dist/web/vendor/pdfjs/cmaps/78-RKSJ-H.bcmap +0 -0
  71. package/dist/web/vendor/pdfjs/cmaps/78-RKSJ-V.bcmap +0 -0
  72. package/dist/web/vendor/pdfjs/cmaps/78-V.bcmap +0 -0
  73. package/dist/web/vendor/pdfjs/cmaps/78ms-RKSJ-H.bcmap +0 -0
  74. package/dist/web/vendor/pdfjs/cmaps/78ms-RKSJ-V.bcmap +0 -0
  75. package/dist/web/vendor/pdfjs/cmaps/83pv-RKSJ-H.bcmap +0 -0
  76. package/dist/web/vendor/pdfjs/cmaps/90ms-RKSJ-H.bcmap +0 -0
  77. package/dist/web/vendor/pdfjs/cmaps/90ms-RKSJ-V.bcmap +0 -0
  78. package/dist/web/vendor/pdfjs/cmaps/90msp-RKSJ-H.bcmap +0 -0
  79. package/dist/web/vendor/pdfjs/cmaps/90msp-RKSJ-V.bcmap +0 -0
  80. package/dist/web/vendor/pdfjs/cmaps/90pv-RKSJ-H.bcmap +0 -0
  81. package/dist/web/vendor/pdfjs/cmaps/90pv-RKSJ-V.bcmap +0 -0
  82. package/dist/web/vendor/pdfjs/cmaps/Add-H.bcmap +0 -0
  83. package/dist/web/vendor/pdfjs/cmaps/Add-RKSJ-H.bcmap +0 -0
  84. package/dist/web/vendor/pdfjs/cmaps/Add-RKSJ-V.bcmap +0 -0
  85. package/dist/web/vendor/pdfjs/cmaps/Add-V.bcmap +0 -0
  86. package/dist/web/vendor/pdfjs/cmaps/Adobe-CNS1-0.bcmap +0 -0
  87. package/dist/web/vendor/pdfjs/cmaps/Adobe-CNS1-1.bcmap +0 -0
  88. package/dist/web/vendor/pdfjs/cmaps/Adobe-CNS1-2.bcmap +0 -0
  89. package/dist/web/vendor/pdfjs/cmaps/Adobe-CNS1-3.bcmap +0 -0
  90. package/dist/web/vendor/pdfjs/cmaps/Adobe-CNS1-4.bcmap +0 -0
  91. package/dist/web/vendor/pdfjs/cmaps/Adobe-CNS1-5.bcmap +0 -0
  92. package/dist/web/vendor/pdfjs/cmaps/Adobe-CNS1-6.bcmap +0 -0
  93. package/dist/web/vendor/pdfjs/cmaps/Adobe-CNS1-UCS2.bcmap +0 -0
  94. package/dist/web/vendor/pdfjs/cmaps/Adobe-GB1-0.bcmap +0 -0
  95. package/dist/web/vendor/pdfjs/cmaps/Adobe-GB1-1.bcmap +0 -0
  96. package/dist/web/vendor/pdfjs/cmaps/Adobe-GB1-2.bcmap +0 -0
  97. package/dist/web/vendor/pdfjs/cmaps/Adobe-GB1-3.bcmap +0 -0
  98. package/dist/web/vendor/pdfjs/cmaps/Adobe-GB1-4.bcmap +0 -0
  99. package/dist/web/vendor/pdfjs/cmaps/Adobe-GB1-5.bcmap +0 -0
  100. package/dist/web/vendor/pdfjs/cmaps/Adobe-GB1-UCS2.bcmap +0 -0
  101. package/dist/web/vendor/pdfjs/cmaps/Adobe-Japan1-0.bcmap +0 -0
  102. package/dist/web/vendor/pdfjs/cmaps/Adobe-Japan1-1.bcmap +0 -0
  103. package/dist/web/vendor/pdfjs/cmaps/Adobe-Japan1-2.bcmap +0 -0
  104. package/dist/web/vendor/pdfjs/cmaps/Adobe-Japan1-3.bcmap +0 -0
  105. package/dist/web/vendor/pdfjs/cmaps/Adobe-Japan1-4.bcmap +0 -0
  106. package/dist/web/vendor/pdfjs/cmaps/Adobe-Japan1-5.bcmap +0 -0
  107. package/dist/web/vendor/pdfjs/cmaps/Adobe-Japan1-6.bcmap +0 -0
  108. package/dist/web/vendor/pdfjs/cmaps/Adobe-Japan1-UCS2.bcmap +0 -0
  109. package/dist/web/vendor/pdfjs/cmaps/Adobe-Korea1-0.bcmap +0 -0
  110. package/dist/web/vendor/pdfjs/cmaps/Adobe-Korea1-1.bcmap +0 -0
  111. package/dist/web/vendor/pdfjs/cmaps/Adobe-Korea1-2.bcmap +0 -0
  112. package/dist/web/vendor/pdfjs/cmaps/Adobe-Korea1-UCS2.bcmap +0 -0
  113. package/dist/web/vendor/pdfjs/cmaps/B5-H.bcmap +0 -0
  114. package/dist/web/vendor/pdfjs/cmaps/B5-V.bcmap +0 -0
  115. package/dist/web/vendor/pdfjs/cmaps/B5pc-H.bcmap +0 -0
  116. package/dist/web/vendor/pdfjs/cmaps/B5pc-V.bcmap +0 -0
  117. package/dist/web/vendor/pdfjs/cmaps/CNS-EUC-H.bcmap +0 -0
  118. package/dist/web/vendor/pdfjs/cmaps/CNS-EUC-V.bcmap +0 -0
  119. package/dist/web/vendor/pdfjs/cmaps/CNS1-H.bcmap +0 -0
  120. package/dist/web/vendor/pdfjs/cmaps/CNS1-V.bcmap +0 -0
  121. package/dist/web/vendor/pdfjs/cmaps/CNS2-H.bcmap +0 -0
  122. package/dist/web/vendor/pdfjs/cmaps/CNS2-V.bcmap +3 -0
  123. package/dist/web/vendor/pdfjs/cmaps/ETHK-B5-H.bcmap +0 -0
  124. package/dist/web/vendor/pdfjs/cmaps/ETHK-B5-V.bcmap +0 -0
  125. package/dist/web/vendor/pdfjs/cmaps/ETen-B5-H.bcmap +0 -0
  126. package/dist/web/vendor/pdfjs/cmaps/ETen-B5-V.bcmap +0 -0
  127. package/dist/web/vendor/pdfjs/cmaps/ETenms-B5-H.bcmap +3 -0
  128. package/dist/web/vendor/pdfjs/cmaps/ETenms-B5-V.bcmap +0 -0
  129. package/dist/web/vendor/pdfjs/cmaps/EUC-H.bcmap +0 -0
  130. package/dist/web/vendor/pdfjs/cmaps/EUC-V.bcmap +0 -0
  131. package/dist/web/vendor/pdfjs/cmaps/Ext-H.bcmap +0 -0
  132. package/dist/web/vendor/pdfjs/cmaps/Ext-RKSJ-H.bcmap +0 -0
  133. package/dist/web/vendor/pdfjs/cmaps/Ext-RKSJ-V.bcmap +0 -0
  134. package/dist/web/vendor/pdfjs/cmaps/Ext-V.bcmap +0 -0
  135. package/dist/web/vendor/pdfjs/cmaps/GB-EUC-H.bcmap +0 -0
  136. package/dist/web/vendor/pdfjs/cmaps/GB-EUC-V.bcmap +0 -0
  137. package/dist/web/vendor/pdfjs/cmaps/GB-H.bcmap +4 -0
  138. package/dist/web/vendor/pdfjs/cmaps/GB-V.bcmap +0 -0
  139. package/dist/web/vendor/pdfjs/cmaps/GBK-EUC-H.bcmap +0 -0
  140. package/dist/web/vendor/pdfjs/cmaps/GBK-EUC-V.bcmap +0 -0
  141. package/dist/web/vendor/pdfjs/cmaps/GBK2K-H.bcmap +0 -0
  142. package/dist/web/vendor/pdfjs/cmaps/GBK2K-V.bcmap +0 -0
  143. package/dist/web/vendor/pdfjs/cmaps/GBKp-EUC-H.bcmap +0 -0
  144. package/dist/web/vendor/pdfjs/cmaps/GBKp-EUC-V.bcmap +0 -0
  145. package/dist/web/vendor/pdfjs/cmaps/GBT-EUC-H.bcmap +0 -0
  146. package/dist/web/vendor/pdfjs/cmaps/GBT-EUC-V.bcmap +0 -0
  147. package/dist/web/vendor/pdfjs/cmaps/GBT-H.bcmap +0 -0
  148. package/dist/web/vendor/pdfjs/cmaps/GBT-V.bcmap +0 -0
  149. package/dist/web/vendor/pdfjs/cmaps/GBTpc-EUC-H.bcmap +0 -0
  150. package/dist/web/vendor/pdfjs/cmaps/GBTpc-EUC-V.bcmap +0 -0
  151. package/dist/web/vendor/pdfjs/cmaps/GBpc-EUC-H.bcmap +0 -0
  152. package/dist/web/vendor/pdfjs/cmaps/GBpc-EUC-V.bcmap +0 -0
  153. package/dist/web/vendor/pdfjs/cmaps/H.bcmap +0 -0
  154. package/dist/web/vendor/pdfjs/cmaps/HKdla-B5-H.bcmap +0 -0
  155. package/dist/web/vendor/pdfjs/cmaps/HKdla-B5-V.bcmap +0 -0
  156. package/dist/web/vendor/pdfjs/cmaps/HKdlb-B5-H.bcmap +0 -0
  157. package/dist/web/vendor/pdfjs/cmaps/HKdlb-B5-V.bcmap +0 -0
  158. package/dist/web/vendor/pdfjs/cmaps/HKgccs-B5-H.bcmap +0 -0
  159. package/dist/web/vendor/pdfjs/cmaps/HKgccs-B5-V.bcmap +0 -0
  160. package/dist/web/vendor/pdfjs/cmaps/HKm314-B5-H.bcmap +0 -0
  161. package/dist/web/vendor/pdfjs/cmaps/HKm314-B5-V.bcmap +0 -0
  162. package/dist/web/vendor/pdfjs/cmaps/HKm471-B5-H.bcmap +0 -0
  163. package/dist/web/vendor/pdfjs/cmaps/HKm471-B5-V.bcmap +0 -0
  164. package/dist/web/vendor/pdfjs/cmaps/HKscs-B5-H.bcmap +0 -0
  165. package/dist/web/vendor/pdfjs/cmaps/HKscs-B5-V.bcmap +0 -0
  166. package/dist/web/vendor/pdfjs/cmaps/Hankaku.bcmap +0 -0
  167. package/dist/web/vendor/pdfjs/cmaps/Hiragana.bcmap +0 -0
  168. package/dist/web/vendor/pdfjs/cmaps/KSC-EUC-H.bcmap +0 -0
  169. package/dist/web/vendor/pdfjs/cmaps/KSC-EUC-V.bcmap +0 -0
  170. package/dist/web/vendor/pdfjs/cmaps/KSC-H.bcmap +0 -0
  171. package/dist/web/vendor/pdfjs/cmaps/KSC-Johab-H.bcmap +0 -0
  172. package/dist/web/vendor/pdfjs/cmaps/KSC-Johab-V.bcmap +0 -0
  173. package/dist/web/vendor/pdfjs/cmaps/KSC-V.bcmap +0 -0
  174. package/dist/web/vendor/pdfjs/cmaps/KSCms-UHC-H.bcmap +0 -0
  175. package/dist/web/vendor/pdfjs/cmaps/KSCms-UHC-HW-H.bcmap +0 -0
  176. package/dist/web/vendor/pdfjs/cmaps/KSCms-UHC-HW-V.bcmap +0 -0
  177. package/dist/web/vendor/pdfjs/cmaps/KSCms-UHC-V.bcmap +0 -0
  178. package/dist/web/vendor/pdfjs/cmaps/KSCpc-EUC-H.bcmap +0 -0
  179. package/dist/web/vendor/pdfjs/cmaps/KSCpc-EUC-V.bcmap +0 -0
  180. package/dist/web/vendor/pdfjs/cmaps/Katakana.bcmap +0 -0
  181. package/dist/web/vendor/pdfjs/cmaps/LICENSE +36 -0
  182. package/dist/web/vendor/pdfjs/cmaps/NWP-H.bcmap +0 -0
  183. package/dist/web/vendor/pdfjs/cmaps/NWP-V.bcmap +0 -0
  184. package/dist/web/vendor/pdfjs/cmaps/RKSJ-H.bcmap +0 -0
  185. package/dist/web/vendor/pdfjs/cmaps/RKSJ-V.bcmap +0 -0
  186. package/dist/web/vendor/pdfjs/cmaps/Roman.bcmap +0 -0
  187. package/dist/web/vendor/pdfjs/cmaps/UniCNS-UCS2-H.bcmap +0 -0
  188. package/dist/web/vendor/pdfjs/cmaps/UniCNS-UCS2-V.bcmap +0 -0
  189. package/dist/web/vendor/pdfjs/cmaps/UniCNS-UTF16-H.bcmap +0 -0
  190. package/dist/web/vendor/pdfjs/cmaps/UniCNS-UTF16-V.bcmap +0 -0
  191. package/dist/web/vendor/pdfjs/cmaps/UniCNS-UTF32-H.bcmap +0 -0
  192. package/dist/web/vendor/pdfjs/cmaps/UniCNS-UTF32-V.bcmap +0 -0
  193. package/dist/web/vendor/pdfjs/cmaps/UniCNS-UTF8-H.bcmap +0 -0
  194. package/dist/web/vendor/pdfjs/cmaps/UniCNS-UTF8-V.bcmap +0 -0
  195. package/dist/web/vendor/pdfjs/cmaps/UniGB-UCS2-H.bcmap +0 -0
  196. package/dist/web/vendor/pdfjs/cmaps/UniGB-UCS2-V.bcmap +0 -0
  197. package/dist/web/vendor/pdfjs/cmaps/UniGB-UTF16-H.bcmap +0 -0
  198. package/dist/web/vendor/pdfjs/cmaps/UniGB-UTF16-V.bcmap +0 -0
  199. package/dist/web/vendor/pdfjs/cmaps/UniGB-UTF32-H.bcmap +0 -0
  200. package/dist/web/vendor/pdfjs/cmaps/UniGB-UTF32-V.bcmap +0 -0
  201. package/dist/web/vendor/pdfjs/cmaps/UniGB-UTF8-H.bcmap +0 -0
  202. package/dist/web/vendor/pdfjs/cmaps/UniGB-UTF8-V.bcmap +0 -0
  203. package/dist/web/vendor/pdfjs/cmaps/UniJIS-UCS2-H.bcmap +0 -0
  204. package/dist/web/vendor/pdfjs/cmaps/UniJIS-UCS2-HW-H.bcmap +0 -0
  205. package/dist/web/vendor/pdfjs/cmaps/UniJIS-UCS2-HW-V.bcmap +0 -0
  206. package/dist/web/vendor/pdfjs/cmaps/UniJIS-UCS2-V.bcmap +0 -0
  207. package/dist/web/vendor/pdfjs/cmaps/UniJIS-UTF16-H.bcmap +0 -0
  208. package/dist/web/vendor/pdfjs/cmaps/UniJIS-UTF16-V.bcmap +0 -0
  209. package/dist/web/vendor/pdfjs/cmaps/UniJIS-UTF32-H.bcmap +0 -0
  210. package/dist/web/vendor/pdfjs/cmaps/UniJIS-UTF32-V.bcmap +0 -0
  211. package/dist/web/vendor/pdfjs/cmaps/UniJIS-UTF8-H.bcmap +0 -0
  212. package/dist/web/vendor/pdfjs/cmaps/UniJIS-UTF8-V.bcmap +0 -0
  213. package/dist/web/vendor/pdfjs/cmaps/UniJIS2004-UTF16-H.bcmap +0 -0
  214. package/dist/web/vendor/pdfjs/cmaps/UniJIS2004-UTF16-V.bcmap +0 -0
  215. package/dist/web/vendor/pdfjs/cmaps/UniJIS2004-UTF32-H.bcmap +0 -0
  216. package/dist/web/vendor/pdfjs/cmaps/UniJIS2004-UTF32-V.bcmap +0 -0
  217. package/dist/web/vendor/pdfjs/cmaps/UniJIS2004-UTF8-H.bcmap +0 -0
  218. package/dist/web/vendor/pdfjs/cmaps/UniJIS2004-UTF8-V.bcmap +0 -0
  219. package/dist/web/vendor/pdfjs/cmaps/UniJISPro-UCS2-HW-V.bcmap +0 -0
  220. package/dist/web/vendor/pdfjs/cmaps/UniJISPro-UCS2-V.bcmap +0 -0
  221. package/dist/web/vendor/pdfjs/cmaps/UniJISPro-UTF8-V.bcmap +0 -0
  222. package/dist/web/vendor/pdfjs/cmaps/UniJISX0213-UTF32-H.bcmap +0 -0
  223. package/dist/web/vendor/pdfjs/cmaps/UniJISX0213-UTF32-V.bcmap +0 -0
  224. package/dist/web/vendor/pdfjs/cmaps/UniJISX02132004-UTF32-H.bcmap +0 -0
  225. package/dist/web/vendor/pdfjs/cmaps/UniJISX02132004-UTF32-V.bcmap +0 -0
  226. package/dist/web/vendor/pdfjs/cmaps/UniKS-UCS2-H.bcmap +0 -0
  227. package/dist/web/vendor/pdfjs/cmaps/UniKS-UCS2-V.bcmap +0 -0
  228. package/dist/web/vendor/pdfjs/cmaps/UniKS-UTF16-H.bcmap +0 -0
  229. package/dist/web/vendor/pdfjs/cmaps/UniKS-UTF16-V.bcmap +0 -0
  230. package/dist/web/vendor/pdfjs/cmaps/UniKS-UTF32-H.bcmap +0 -0
  231. package/dist/web/vendor/pdfjs/cmaps/UniKS-UTF32-V.bcmap +0 -0
  232. package/dist/web/vendor/pdfjs/cmaps/UniKS-UTF8-H.bcmap +0 -0
  233. package/dist/web/vendor/pdfjs/cmaps/UniKS-UTF8-V.bcmap +0 -0
  234. package/dist/web/vendor/pdfjs/cmaps/V.bcmap +0 -0
  235. package/dist/web/vendor/pdfjs/cmaps/WP-Symbol.bcmap +0 -0
  236. package/dist/web/vendor/pdfjs/iccs/CGATS001Compat-v2-micro.icc +0 -0
  237. package/dist/web/vendor/pdfjs/iccs/LICENSE +116 -0
  238. package/dist/web/vendor/pdfjs/pdf.min.mjs +28 -0
  239. package/dist/web/vendor/pdfjs/pdf.worker.mjs +64908 -0
  240. package/dist/web/vendor/pdfjs/standard_fonts/FoxitDingbats.pfb +0 -0
  241. package/dist/web/vendor/pdfjs/standard_fonts/FoxitFixed.pfb +0 -0
  242. package/dist/web/vendor/pdfjs/standard_fonts/FoxitFixedBold.pfb +0 -0
  243. package/dist/web/vendor/pdfjs/standard_fonts/FoxitFixedBoldItalic.pfb +0 -0
  244. package/dist/web/vendor/pdfjs/standard_fonts/FoxitFixedItalic.pfb +0 -0
  245. package/dist/web/vendor/pdfjs/standard_fonts/FoxitSerif.pfb +0 -0
  246. package/dist/web/vendor/pdfjs/standard_fonts/FoxitSerifBold.pfb +0 -0
  247. package/dist/web/vendor/pdfjs/standard_fonts/FoxitSerifBoldItalic.pfb +0 -0
  248. package/dist/web/vendor/pdfjs/standard_fonts/FoxitSerifItalic.pfb +0 -0
  249. package/dist/web/vendor/pdfjs/standard_fonts/FoxitSymbol.pfb +0 -0
  250. package/dist/web/vendor/pdfjs/standard_fonts/LICENSE_FOXIT +27 -0
  251. package/dist/web/vendor/pdfjs/standard_fonts/LICENSE_LIBERATION +363 -0
  252. package/dist/web/vendor/pdfjs/standard_fonts/LiberationSans-Bold.ttf +0 -0
  253. package/dist/web/vendor/pdfjs/standard_fonts/LiberationSans-BoldItalic.ttf +0 -0
  254. package/dist/web/vendor/pdfjs/standard_fonts/LiberationSans-Italic.ttf +0 -0
  255. package/dist/web/vendor/pdfjs/standard_fonts/LiberationSans-Regular.ttf +0 -0
  256. package/dist/web/vendor/pdfjs/wasm/LICENSE_JBIG2 +196 -0
  257. package/dist/web/vendor/pdfjs/wasm/LICENSE_OPENJPEG +39 -0
  258. package/dist/web/vendor/pdfjs/wasm/LICENSE_PDFJS_JBIG2 +13 -0
  259. package/dist/web/vendor/pdfjs/wasm/LICENSE_PDFJS_OPENJPEG +22 -0
  260. package/dist/web/vendor/pdfjs/wasm/LICENSE_PDFJS_QCMS +19 -0
  261. package/dist/web/vendor/pdfjs/wasm/LICENSE_QCMS +21 -0
  262. package/dist/web/vendor/pdfjs/wasm/jbig2.wasm +0 -0
  263. package/dist/web/vendor/pdfjs/wasm/jbig2_nowasm_fallback.js +15 -0
  264. package/dist/web/vendor/pdfjs/wasm/openjpeg.wasm +0 -0
  265. package/dist/web/vendor/pdfjs/wasm/openjpeg_nowasm_fallback.js +17 -0
  266. package/dist/web/vendor/pdfjs/wasm/qcms_bg.wasm +0 -0
  267. package/dist/web/workspace-root-management.js +1 -1
  268. package/dist/web/workspaces.js +792 -165
  269. package/home-env.mjs +28 -0
  270. package/install-path.mjs +59 -3
  271. package/launch-starting-page.mjs +35 -15
  272. package/launch.mjs +363 -51
  273. package/package.json +9 -8
  274. package/pin-home.mjs +6 -0
  275. package/post-update-marker.mjs +14 -0
  276. package/preferences-file.mjs +289 -0
  277. package/supervisor-lock.mjs +195 -0
@@ -94,7 +94,12 @@
94
94
  var CLOCK_AFTER_SECONDS = 10; // quick steps stay quiet; a slow one starts showing how long it has taken
95
95
  var MARKS = { done: '✓', problem: '!' };
96
96
  var progress = null; // the server's progress record ({steps, since}) for the check running now (null before its first answer)
97
- var lostContact = false; // the last ask for them got no answer: the clock then says nothing it cannot back
97
+ // #3081: how the last ask for them went. 'slow': an ask has had no answer for a while, which is FloLess being busy with
98
+ // other work (measured: its server can be held for seconds by work elsewhere), not proof it is gone. 'lost': the ask
99
+ // could not reach FloLess at all, or what came back was not the answer. Either way the clock says nothing it cannot back.
100
+ var contact = 'ok';
101
+ var waitingSince = 0; // when the first ask of a slow spell was sent
102
+ var lostBy = null; // the outcome that last made contact lost
98
103
  var paintedSteps = null;
99
104
  var announced = null;
100
105
  var announcedProblems = {};
@@ -104,7 +109,9 @@
104
109
  var pollSentAt = 0;
105
110
  var pollController = null;
106
111
  var watchGeneration = 0; // bumped whenever watching stops: an answer to an older ask belongs to nothing now
107
- var POLL_PATIENCE_MS = 6000;
112
+ var POLL_PATIENCE_MS = 6000; // an ask unanswered this long is called slow
113
+ var POLL_GIVE_UP_MS = 30000; // and is given up after this long and asked again, still slow
114
+ var SLOW_CEILING_MS = 90000; // a slow spell with no answer at all for this long is taken as lost contact: a hung FloLess is not "busy"
108
115
 
109
116
  function checkInFlight() { return checking || !!(view && view.checking); }
110
117
  function isOpen() { return $modal.classList.contains('show'); }
@@ -124,11 +131,17 @@
124
131
  var clock = $progress.querySelector('.tool-updates-step-clock');
125
132
  if (!clock) return;
126
133
  // Hidden without a start time from the server, and while the server is not answering.
127
- var seconds = progress && typeof progress.since === 'number' && !lostContact ? Math.max(0, Math.floor((Date.now() - progress.since) / 1000)) : -1;
134
+ var seconds = progress && typeof progress.since === 'number' && contact === 'ok' ? Math.max(0, Math.floor((Date.now() - progress.since) / 1000)) : -1;
128
135
  clock.hidden = seconds < CLOCK_AFTER_SECONDS;
129
136
  if (!clock.hidden) clock.textContent = elapsedText(seconds);
130
137
  }
131
138
 
139
+ /** The slow line's own count of how long FloLess has not answered, ticked in place like the clock. */
140
+ function paintWaited() {
141
+ var waited = $progress.querySelector('.tool-updates-progress-waited');
142
+ if (waited) waited.textContent = elapsedText(Math.max(0, Math.floor((Date.now() - waitingSince) / 1000)));
143
+ }
144
+
132
145
  // What a screen reader hears: a step that did not do all it set out to, once; and the active step, when it or the item
133
146
  // it is on changes. Never the clock, never a repeat.
134
147
  function announce(steps) {
@@ -151,12 +164,17 @@
151
164
 
152
165
  function paintProgress() {
153
166
  var steps = progress && Array.isArray(progress.steps) ? progress.steps : [];
154
- var signature = JSON.stringify(steps) + '|' + lostContact;
167
+ var signature = JSON.stringify(steps) + '|' + contact;
155
168
  // Rebuilt only when what it shows changes; the clock beside the active step ticks in place.
156
169
  if (signature !== paintedSteps || !$progress.firstChild) {
157
170
  $progress.textContent = '';
158
171
  $progress.appendChild(el('div', 'tool-updates-progress-head', 'Checking for updates…'));
159
- if (lostContact) $progress.appendChild(el('div', 'tool-updates-progress-lost', 'Lost contact with FloLess. Still trying…'));
172
+ if (contact === 'lost') $progress.appendChild(el('div', 'tool-updates-progress-lost', 'Lost contact with FloLess. Still trying…'));
173
+ if (contact === 'slow') {
174
+ var slow = el('div', 'tool-updates-progress-slow');
175
+ slow.append('FloLess hasn’t answered for ', el('span', 'tool-updates-progress-waited'), '. It is probably busy with other work, so this check is waiting. You can keep watching or close this dialog. What the check finds shows at the bottom of the screen.');
176
+ $progress.appendChild(slow);
177
+ }
160
178
  if (steps.length) {
161
179
  var list = el('ol', 'tool-updates-steps');
162
180
  list.setAttribute('role', 'list');
@@ -180,12 +198,13 @@
180
198
  });
181
199
  $progress.appendChild(list);
182
200
  }
183
- // Not while contact is lost: the page cannot say then that the check keeps going.
184
- if (!lostContact) $progress.appendChild(el('div', 'tool-updates-progress-hint', 'You can close this dialog. The check keeps going, and what it finds shows at the bottom of the screen.'));
201
+ // Only while FloLess answers: the page cannot say otherwise that the check keeps going (the slow line says it its own way).
202
+ if (contact === 'ok') $progress.appendChild(el('div', 'tool-updates-progress-hint', 'You can close this dialog. The check keeps going, and what it finds shows at the bottom of the screen.'));
185
203
  paintedSteps = signature;
186
204
  }
187
205
  announce(steps);
188
206
  paintClock();
207
+ paintWaited();
189
208
  }
190
209
 
191
210
  /** One ask at a time: an older answer can never arrive after, and undo, a newer one. */
@@ -196,18 +215,30 @@
196
215
  var generation = watchGeneration;
197
216
  var controller = new AbortController();
198
217
  pollController = controller;
218
+ var sentAt = pollSentAt;
199
219
  var body = null;
200
- var failed = false;
201
- try { body = await call('/api/tool-updates/progress', 'GET', undefined, controller.signal); } catch (error) { failed = true; }
220
+ var outcome = 'answered';
221
+ try { body = await call('/api/tool-updates/progress', 'GET', undefined, controller.signal); }
222
+ catch (error) {
223
+ // Given up by the page after waiting (below) is still a slow FloLess. Anything else is no contact: the request could
224
+ // not reach it (refused, or the connection dropped), or it answered with an error instead of the progress.
225
+ outcome = controller.signal.aborted ? 'given-up' : error && error.body ? 'error-answer' : 'unreachable';
226
+ }
202
227
  // A 200 that is not the answer (a truncated or foreign body) is no contact either.
203
- if (!failed && (!body || body.ok !== true || typeof body.checking !== 'boolean')) failed = true;
228
+ if (outcome === 'answered' && (!body || body.ok !== true || typeof body.checking !== 'boolean')) outcome = 'not-the-answer';
204
229
  if (pollController === controller) { pollController = null; polling = false; }
205
230
  // An answer to an ask from before the dialog was closed (or the check ended) belongs to nothing now.
206
231
  if (generation !== watchGeneration || !checkRunning()) return;
207
- if (failed) {
208
- markLost();
232
+ if (outcome === 'given-up') {
233
+ if (contact === 'slow' && Date.now() - waitingSince > SLOW_CEILING_MS) markLost('no-answer', Date.now() - waitingSince);
234
+ paintProgress();
235
+ return;
236
+ }
237
+ if (outcome !== 'answered') {
238
+ markLost(outcome, Date.now() - sentAt);
209
239
  } else {
210
- lostContact = false;
240
+ if (contact === 'slow') console.info('tool update progress answered again', { waitedMs: Date.now() - waitingSince, lastAskMs: Date.now() - sentAt });
241
+ contact = 'ok';
211
242
  // Shown, never applied: this is not the view (the view's ticket order belongs to the requests above). A pass that
212
243
  // is queued behind another has no steps yet: the old ones go with it rather than freeze with a running clock.
213
244
  if (body.checking) {
@@ -228,10 +259,31 @@
228
259
  paintProgress();
229
260
  }
230
261
 
231
- /** The server is not answering: warn once per episode, whichever way the page found out. */
232
- function markLost() {
233
- if (!lostContact) console.warn('tool update progress unavailable');
234
- lostContact = true;
262
+ /** The ask could not reach FloLess, or what came back was not the answer: warn once per episode, with what happened. */
263
+ function markLost(outcome, elapsedMs) {
264
+ if (contact !== 'lost') {
265
+ console.warn('tool update progress unavailable', { outcome: outcome, elapsedMs: elapsedMs, step: activeStep() });
266
+ $announce.textContent = 'Lost contact with FloLess. Still trying.';
267
+ }
268
+ contact = 'lost';
269
+ lostBy = outcome;
270
+ }
271
+
272
+ /**
273
+ * An ask has had no answer for POLL_PATIENCE_MS: FloLess is slow, which is not proof it is gone. Said once per spell, with
274
+ * how long and on which step, so a report can be matched to the server's own log of what held it.
275
+ */
276
+ function markSlow() {
277
+ waitingSince = pollSentAt;
278
+ console.warn('tool update progress delayed', { waitedMs: Date.now() - pollSentAt, step: activeStep() });
279
+ contact = 'slow';
280
+ $announce.textContent = 'FloLess is slow to answer. The check is waiting for it.'; // once per spell; the count ticks silently
281
+ }
282
+
283
+ function activeStep() {
284
+ var steps = progress && Array.isArray(progress.steps) ? progress.steps : [];
285
+ var active = steps.filter(function (step) { return step.state === 'active'; })[0];
286
+ return active ? active.label : null;
235
287
  }
236
288
 
237
289
  function stopWatching() {
@@ -240,7 +292,7 @@
240
292
  if (pollController) { pollController.abort(); pollController = null; }
241
293
  polling = false;
242
294
  progress = null;
243
- lostContact = false;
295
+ contact = 'ok';
244
296
  paintedSteps = null;
245
297
  announcedProblems = {};
246
298
  $progress.textContent = '';
@@ -256,13 +308,14 @@
256
308
  paintProgress();
257
309
  if (watchTimer) return;
258
310
  watchTimer = setInterval(function () {
259
- // An ask that has not come back for a while is the server not answering, not a slow step: say so, give that ask
260
- // up (it would otherwise hold every later one back for ever) and ask again on the next tick.
261
- if (polling && Date.now() - pollSentAt > POLL_PATIENCE_MS) {
262
- if (!lostContact) { markLost(); paintProgress(); }
263
- if (pollController) pollController.abort();
264
- }
311
+ // An ask that has not come back for a while is FloLess being slow: say so and keep waiting for that answer. Only
312
+ // much later is the ask given up (it would otherwise hold every later one back for ever) and asked again, still slow.
313
+ // A refused or wrong answer earlier does not make an ask that is merely unanswered "lost": FloLess took this one, so
314
+ // it is slow. Only lost contact that came from waiting too long (the ceiling below) stays lost while asks go unanswered.
315
+ if (polling && Date.now() - pollSentAt > POLL_PATIENCE_MS && (contact === 'ok' || (contact === 'lost' && lostBy !== 'no-answer'))) { markSlow(); paintProgress(); }
316
+ if (polling && Date.now() - pollSentAt > POLL_GIVE_UP_MS && pollController) pollController.abort();
265
317
  paintClock();
318
+ paintWaited();
266
319
  void pollProgress();
267
320
  }, 1000);
268
321
  void pollProgress();
@@ -280,18 +333,32 @@
280
333
  async function call(path, method, payload, signal) {
281
334
  await globalThis.flolessStartupAdmission?.admit(path, { method, signal });
282
335
  var res = await fetch(path, { method: method || 'GET', headers: { 'content-type': 'application/json' }, body: payload, signal: signal });
336
+ var readOnly = !method || /^(GET|HEAD)$/i.test(method);
283
337
  var body = await res.json().catch(function (error) {
284
338
  if (error && error.name === 'AbortError') throw error; // the page gave this request up: not "an unreadable answer"
285
- return { ok: false, error: 'FloLess received an unreadable answer (HTTP ' + res.status + ').' };
339
+ // #3097: no status number in anything a person may read; the code says what happened to the code that reads it.
340
+ return { ok: false, code: 'response-unreadable', error: readOnly
341
+ ? 'FloLess sent an answer this window couldn’t read. Reload this window, then try again.'
342
+ : 'FloLess sent an answer this window couldn’t read, so it can’t tell whether that went through. Reload this window and check before trying again.' };
286
343
  });
287
344
  if (!res.ok && body.ok !== true && !body.results) {
288
- var error = new Error(body.error || ('HTTP ' + res.status));
345
+ // The server's own words when it gave some; otherwise the shared failure sentence, never "HTTP 500".
346
+ var said = typeof personText === 'function' ? personText(body) : '';
347
+ var error = new Error(said || callFailureText({ status: res.status, body: body }, readOnly));
289
348
  error.body = body;
349
+ error.status = res.status;
350
+ error.serverText = Boolean(said) && body.code !== 'response-unreadable';
290
351
  throw error;
291
352
  }
292
353
  return body;
293
354
  }
294
355
 
356
+ // The person's sentence for a failed request the server explained no further (web/failure-copy.js, loaded first).
357
+ function callFailureText(error, retrySafe) {
358
+ if (typeof failureCopy === 'function') return failureCopy(error, { retrySafe: retrySafe }).text;
359
+ return 'Couldn’t finish that, and FloLess couldn’t tell why. If it keeps happening, use Report an issue at the bottom of the window.';
360
+ }
361
+
295
362
  // #2013: AWARE's cleanup of unused tool versions, as the server words it (agent-store-cleanup.ts).
296
363
  function cleanupNeeds() {
297
364
  var c = view && view.cleanup;
@@ -320,10 +387,15 @@
320
387
  var text;
321
388
  var state = 'offer';
322
389
  var more = '';
390
+ var reviewed = 0;
323
391
  if (templateUpdates.length) {
324
392
  // One-click update (owner ruling 2026-11-02): the pill counts workflows with an update the person can apply, and only
325
393
  // those. Tool approvals and cleanup are a dot here and a section in the dialog.
394
+ // #3081: an update reviewed in AI Chat (a Steel Model) is counted, and the pill says it is a review, not a click.
395
+ reviewed = templateUpdates.filter(function (u) { return !!u.sourceUpdate; }).length;
326
396
  text = plural(templateUpdates.length, 'workflow update', 'workflow updates');
397
+ if (reviewed === templateUpdates.length) text += ' to review';
398
+ else if (reviewed) text += ' (' + reviewed + ' to review)';
327
399
  if (offers.length || needCount || cleanup.length) more = 'Tool updates also wait for you in this list.';
328
400
  } else if (offers.length) {
329
401
  text = plural(offers.length, 'workflow update', 'workflow updates');
@@ -355,7 +427,9 @@
355
427
  $pill.textContent = text;
356
428
  $pill.setAttribute('data-state', state);
357
429
  if (more) $pill.setAttribute('data-more', ''); else $pill.removeAttribute('data-more');
358
- var tip = templateUpdates.length ? 'Newer versions of your workflows from FloLess. Open to update them in one click.' : PILL_TIP;
430
+ var tip = !templateUpdates.length ? PILL_TIP : !reviewed ? 'Newer versions of your workflows from FloLess. Open to update them in one click.'
431
+ : reviewed === templateUpdates.length ? 'Newer versions of your workflows from FloLess. Open to review them in AI Chat: nothing changes until you send the request.'
432
+ : 'Newer versions of your workflows from FloLess. Open to update them; the ones marked to review are reviewed in AI Chat first.';
359
433
  if (more) tip += ' ' + more;
360
434
  $pill.setAttribute('data-tip', firstCheck ? 'The first workflow check is still running. The total is not known yet.' : !checking ? tip : state === 'checking'
361
435
  ? 'Still checking for tool updates. Open to watch it.' : tip + (/\.$/.test(tip) ? ' ' : '. ') + 'A check is also running.');
@@ -511,7 +585,14 @@
511
585
  $live.textContent = body.sentence || (ok ? 'Removed from the list.' : 'Nothing was removed from the list. Try again.');
512
586
  } catch (error) {
513
587
  if (error.body) applyCleanup(ticket, error.body.cleanup);
514
- $live.textContent = error.message + ' Nothing was removed from the list.';
588
+ // #3097: "Nothing was removed" is the server's claim, so it follows only the server's own reason. A lost or
589
+ // unexplained answer may follow a removal that went through, so it asks the person to check the list instead.
590
+ console.warn('forget folder failed', error);
591
+ $live.textContent = error.serverText
592
+ ? error.message + ' Nothing was removed from the list.'
593
+ : (typeof failureCopy === 'function'
594
+ ? failureCopy(error, { action: 'remove it from the list', unsure: 'Check whether it is still listed before trying again.' }).text
595
+ : 'Couldn’t remove it from the list. Check whether it is still listed before trying again.');
515
596
  } finally {
516
597
  forgetting = null;
517
598
  paint();
@@ -791,10 +872,15 @@
791
872
  var toolsHost = $body;
792
873
  if (rows.length) {
793
874
  $title.textContent = 'Workflow updates';
794
- if ($sub) $sub.textContent = 'Newer versions of your workflows from FloLess. Each one updates when you click it.';
875
+ // #3081: a Steel Model is reviewed in AI Chat, never applied by its click here; the intro says so when one is listed.
876
+ var reviewRows = rows.filter(function (u) { return !!u.sourceUpdate; }).length;
877
+ if ($sub) $sub.textContent = !reviewRows ? 'Newer versions of your workflows from FloLess. Each one updates when you click it.'
878
+ : reviewRows === rows.length ? 'Newer versions of your workflows from FloLess. Each one is reviewed in AI Chat, and nothing changes until you send the request there.'
879
+ : 'Newer versions of your workflows from FloLess. Some update when you click them. The ones marked Review in AI Chat change only after you send the request there.';
795
880
  var bundled = el('div', 'tool-updates-section wf-upd-section');
796
881
  var head = el('div', 'wf-upd-head');
797
- head.appendChild(el('div', 'tool-updates-section-head', 'Each update keeps your data and saves a backup first'));
882
+ head.appendChild(el('div', 'tool-updates-section-head', reviewRows === rows.length
883
+ ? 'Each review keeps your data. Nothing changes until you send the request.' : 'Each update keeps your data and saves a backup first'));
798
884
  // The count is exactly what the click updates (an offer being worked on, or one the person changed, is not counted).
799
885
  var plain = typeof bridge?.updateAllCount === 'function' ? bridge.updateAllCount() : templateUpdates.filter(function (u) { return !u.hasChanges; }).length;
800
886
  if (plain >= 2 && typeof bridge?.updateAllWorkflows === 'function') {
@@ -828,7 +914,7 @@
828
914
  toolsHost.appendChild(el('div', 'tool-updates-summary', view.sentence));
829
915
  }
830
916
  if (results) {
831
- var done = section('Results', results.length);
917
+ var done = section('Tool approvals', results.length);
832
918
  done.querySelector('.tool-updates-section-head').id = 'tool-updates-results-head';
833
919
  done.querySelector('.tool-updates-section-head').tabIndex = -1;
834
920
  results.forEach(function (r) { done.appendChild(resultRow(r)); });
@@ -877,7 +963,13 @@
877
963
  $check.hidden = !!results || !(view && view.supported);
878
964
  // "Not now" would read as cancelling the check, which closing the dialog does not do.
879
965
  var anyDone = rows.some(function (u) { var r = document.querySelector('[data-template-update="' + u.id + '"]'); return r && r.getAttribute('data-state') !== 'idle'; });
880
- $cancel.textContent = results || anyDone ? 'Done' : checkInFlight() ? 'Close' : 'Not now';
966
+ // #3081: Done would say everything listed is finished. While anything still waits (a workflow update, a tool approval,
967
+ // something that needs the person, or an approval that did not go through) it is Close.
968
+ var stillWaiting = workflowUpdatesWaiting();
969
+ var unfinished = (results || []).some(function (r) { return r.outcome !== 'moved' && r.outcome !== 'compiled'; });
970
+ var nothingWaits = !(stillWaiting.apply + stillWaiting.review) && !(!results && offers.length) && !needsYou && !unfinished;
971
+ $cancel.textContent = (results || anyDone) && nothingWaits ? 'Done'
972
+ : checkInFlight() || results || anyDone ? 'Close' : 'Not now';
881
973
  }
882
974
 
883
975
  /** A control that cannot be used right now says why (Instructor reads data-blocked-reason only while it is disabled). */
@@ -922,17 +1014,36 @@
922
1014
 
923
1015
  async function refreshTemplates() {
924
1016
  var ticket = ++templateTicket;
1017
+ var bridge = window.flolessBridge;
925
1018
  try {
926
- var templates = await call('/api/workflows/updates');
927
- if (ticket === templateTicket && templates?.ok === true && Array.isArray(templates.updates)) {
928
- templateUpdates = templates.updates;
1019
+ // #3081: one read feeds this pill and both update dialogs, so a count never disagrees with the rows under it. The
1020
+ // page's own read is only for a page without the workflow screen (it has no rows to keep in step).
1021
+ var list;
1022
+ if (typeof bridge?.refreshWorkflowUpdates === 'function') {
1023
+ list = await bridge.refreshWorkflowUpdates();
1024
+ if (!list) throw new Error('the workflow update offers could not be read');
1025
+ } else {
1026
+ var templates = await call('/api/workflows/updates');
1027
+ list = templates?.ok === true && Array.isArray(templates.updates) ? templates.updates : null;
1028
+ }
1029
+ if (list && ticket === templateTicket) {
1030
+ templateUpdates = list;
929
1031
  paintPill();
930
1032
  }
931
1033
  } catch (error) {
1034
+ console.warn('workflow update offers unavailable', error);
932
1035
  if (isOpen()) $live.textContent = 'FloLess could not check bundled workflow files just now. Reopen this review to try again.';
933
1036
  }
934
1037
  }
935
1038
 
1039
+ /** #3081: the workflow updates still waiting in the list, split into what a click applies and what is reviewed in AI Chat. */
1040
+ function workflowUpdatesWaiting() {
1041
+ var bridge = window.flolessBridge;
1042
+ if (typeof bridge?.workflowUpdatesWaiting === 'function') return bridge.workflowUpdatesWaiting();
1043
+ var review = templateUpdates.filter(function (u) { return !!u.sourceUpdate; }).length;
1044
+ return { apply: templateUpdates.length - review, review: review };
1045
+ }
1046
+
936
1047
  async function compileReviewed() {
937
1048
  if (!compileSelection || approving) return;
938
1049
  var selected = compileSelection;
@@ -1131,9 +1242,11 @@
1131
1242
  if (body.ok) {
1132
1243
  results = body.results || [];
1133
1244
  var moved = results.filter(function (r) { return r.outcome === 'moved'; }).length;
1134
- $live.textContent = moved === results.length
1135
- ? plural(moved, 'workflow now runs', 'workflows now run') + ' on the new tool versions.'
1136
- : moved + ' of ' + results.length + ' moved. The others say why below.';
1245
+ // #3081: tool approvals and workflow updates are different work on (often) different workflows: say each apart,
1246
+ // so "3 done" is never read as the 3 workflow updates still in the list.
1247
+ $live.textContent = (moved === results.length
1248
+ ? plural(moved, 'tool approval', 'tool approvals') + ' done. ' + (moved === 1 ? 'That workflow now runs' : 'Those workflows now run') + ' on the new tool versions.'
1249
+ : moved + ' of ' + plural(results.length, 'tool approval', 'tool approvals') + ' done. The others say why below.') + waitingSentence();
1137
1250
  } else {
1138
1251
  $live.textContent = body.sentence || body.error || 'Nothing was moved. Review it again.';
1139
1252
  }
@@ -1152,6 +1265,15 @@
1152
1265
  }
1153
1266
  });
1154
1267
 
1268
+ /** After tool approvals: the workflow updates that still wait in the list, or nothing when none do. */
1269
+ function waitingSentence() {
1270
+ var w = workflowUpdatesWaiting();
1271
+ if (w.apply && w.review) return ' ' + plural(w.apply + w.review, 'workflow update still waits', 'workflow updates still wait') + ' in the list: ' + w.apply + ' to update, ' + w.review + ' to review in AI Chat.';
1272
+ if (w.review) return ' ' + plural(w.review, 'workflow update still needs', 'workflow updates still need') + ' review in AI Chat.';
1273
+ if (w.apply) return ' ' + plural(w.apply, 'workflow update still waits', 'workflow updates still wait') + ' in the list.';
1274
+ return '';
1275
+ }
1276
+
1155
1277
  // The ≡ menu's "Tool updates…" — the way in when the pill has nothing to show (to check for new versions now).
1156
1278
  if (typeof window.handleMenuAction === 'function') {
1157
1279
  var previousMenuAction = window.handleMenuAction;
@@ -215,6 +215,7 @@
215
215
  The reporter tells the shell which surface is on screen (so the `?` sheet can put this
216
216
  screen's commands first) and forwards `?`/F1 up, because a keydown inside an iframe never
217
217
  reaches the shell's own handler. A read-only viewer: nothing here can be armed — see commands-vector3d.js. -->
218
+ <script src="failure-copy.js"></script>
218
219
  <script src="commands.js"></script>
219
220
  <script src="commands-vector3d.js"></script>
220
221
  <script src="instructor-reporter.js"></script>
@@ -249,6 +250,13 @@ function boot(v3d) {
249
250
  $('state').querySelector('.spin').style.display = spinning ? '' : 'none';
250
251
  }
251
252
  function hideState() { $('state').classList.remove('show'); }
253
+ // Reconstructing only reads the stored drawing, so the shared sentence may offer a retry.
254
+ function sceneFailureText(e) {
255
+ const action = 'reconstruct the drawing in 3D';
256
+ const said = personText(e && e.body);
257
+ if (said) return 'Couldn’t ' + action + '. ' + (/[.!?]$/.test(said) ? said : said + '.');
258
+ return failureCopy(e, { action: action, retrySafe: true }).text;
259
+ }
252
260
 
253
261
  // The read-only host api: the module's editing/dim/snap hooks are inert here — a viewer never
254
262
  // mutates the contract. fetchScene serves the one scene this page already loaded.
@@ -346,10 +354,13 @@ function boot(v3d) {
346
354
  const r = await fetch('/api/contract/' + encodeURIComponent(app) + '/scene', {
347
355
  method: 'POST', headers: { 'content-type': 'application/json' }, body: '{}',
348
356
  });
349
- out = await r.json();
350
- if (!r.ok || !out.ok) throw new Error(out.error || ('HTTP ' + r.status));
357
+ out = await r.json().catch(() => null);
358
+ if (!r.ok || !out || !out.ok) throw Object.assign(new Error('scene reconstruction failed'), { status: r.status, body: out || {} });
351
359
  } catch (e) {
352
- showState(document.createTextNode('Could not reconstruct the drawing (' + e.message + ').'), false);
360
+ // #3097: the server's own sentence when it wrote one, else the shared one (failure-copy.js): what could not be
361
+ // done, why, and what to do. The status and any exception text go to the console, never on screen.
362
+ console.error('vector-3d: scene reconstruction failed', e && e.status, e);
363
+ showState(document.createTextNode(sceneFailureText(e)), false);
353
364
  return;
354
365
  }
355
366
  scene = out.scene;
@@ -180,6 +180,7 @@
180
180
  /* Save conflict — the drawing moved under us. NOT .err: the user's document is fine, so it takes the
181
181
  existing cyan "non-default, click to act" chip rather than the red failure colour. */
182
182
  #saveStat.conflict{color:var(--cyan);border:1px solid var(--cyan);background:var(--cyan-soft);border-radius:4px;padding:1px 6px;cursor:pointer}
183
+ #saveStat.conflict:focus-visible{outline:2px solid var(--cyan);outline-offset:2px}
183
184
  /* Weak-trace review list (inner scroll box — inherits the themed scrollbar rules above). */
184
185
  #weakList{max-height:280px;overflow:auto;display:flex;flex-direction:column;gap:2px;margin-top:4px}
185
186
  .wrow{display:flex;align-items:center;gap:6px;padding:4px 6px;border-radius:6px;font-size:12px}
@@ -252,13 +253,15 @@
252
253
  The reporter tells the shell which surface is on screen (so the `?` sheet can put this
253
254
  screen's commands first) and forwards `?`/F1 up, because a keydown inside an iframe never
254
255
  reaches the shell's own handler. This surface arms nothing, so its snapshot is just its identity — see commands-vector.js. -->
256
+ <script src="failure-copy.js"></script>
255
257
  <script src="commands.js"></script>
256
258
  <script src="commands-vector.js"></script>
257
259
  <script src="instructor-reporter.js"></script>
258
260
  <script>window.InstructorReporter.mount({ surface: 'vector-editor' });</script>
259
- <!-- An Esc this page leaves unused closes the shell's editor overlay (#1571). -->
261
+ <!-- An Esc this page leaves unused closes the shell's editor overlay (#1571). While the save-conflict bar or its
262
+ overwrite question is up, Esc is theirs (#3143): it closes the question, then the bar, never the editor. -->
260
263
  <script src="overlay-escape.js"></script>
261
- <script>window.OverlayEscape.mount();</script>
264
+ <script>window.OverlayEscape.mount({ idle: function () { return !document.getElementById('conflictConfirm') && !document.getElementById('conflictBanner'); } });</script>
262
265
  <script>
263
266
  (function () {
264
267
  'use strict';
@@ -456,13 +459,19 @@
456
459
  function setSaved(state) {
457
460
  if (!editable) return;
458
461
  const el = $('saveStat'); el.hidden = false; el.classList.remove('dirty', 'err', 'conflict');
459
- el.removeAttribute('data-tip'); el.onclick = null;
462
+ el.removeAttribute('data-tip'); el.onclick = null; el.onkeydown = null;
463
+ for (const a of ['data-command-id', 'role', 'tabindex', 'aria-label']) el.removeAttribute(a);
460
464
  if (state === 'dirty') { el.classList.add('dirty'); el.textContent = 'Saving…'; }
461
465
  else if (state === 'err') { el.classList.add('err'); el.textContent = 'Save failed'; }
462
466
  else if (state === 'conflict') {
463
467
  el.classList.add('conflict'); el.textContent = 'Save conflict';
464
468
  el.dataset.tip = 'Someone else saved changes to this drawing since you opened it. Your edits are still here — click to choose what to do.';
465
469
  el.onclick = () => showConflictBanner(); // the chip never acts on its own; it re-opens the banner
470
+ // A control only while it is this — and a keyboard one: Esc hides the bar, and this is the way back to it.
471
+ el.setAttribute('data-command-id', 'vector.save-conflict');
472
+ el.setAttribute('role', 'button'); el.tabIndex = 0;
473
+ el.setAttribute('aria-label', 'Save conflict: show what you can do');
474
+ el.onkeydown = (e) => { if (e.key === 'Enter' || e.key === ' ') { e.preventDefault(); showConflictBanner(); } };
466
475
  }
467
476
  else el.textContent = 'Saved';
468
477
  }
@@ -544,11 +553,15 @@
544
553
  b.textContent = text; return b;
545
554
  };
546
555
  const reload = mk('↻ Reload', true); reload.onclick = () => location.reload();
556
+ reload.setAttribute('data-command-id', 'vector.conflict-reload');
547
557
  const dismiss = mk('✕', false); dismiss.onclick = () => bar.remove();
558
+ dismiss.setAttribute('data-command-id', 'vector.conflict-dismiss');
559
+ dismiss.setAttribute('aria-label', 'Hide this message');
548
560
  if (allowOverwrite === false) {
549
561
  bar.append(msg, reload, dismiss);
550
562
  } else {
551
563
  const over = mk('Save mine anyway', false);
564
+ over.setAttribute('data-command-id', 'vector.conflict-save-mine');
552
565
  over.dataset.tip = 'Replace the version someone else saved with what you have here';
553
566
  over.onclick = () => confirmOverwrite();
554
567
  bar.append(msg, reload, over, dismiss);
@@ -564,29 +577,59 @@
564
577
  * clobber it with one stray click.
565
578
  */
566
579
  function confirmOverwrite() {
580
+ if ($('conflictConfirm')) return;
581
+ const opener = document.activeElement;
567
582
  const back = document.createElement('div');
583
+ back.id = 'conflictConfirm';
584
+ back.setAttribute('role', 'dialog'); back.setAttribute('aria-modal', 'true'); back.setAttribute('aria-labelledby', 'vcfTitle'); back.setAttribute('aria-describedby', 'vcfBody');
568
585
  back.style.cssText = 'position:fixed;inset:0;z-index:60;display:flex;align-items:center;justify-content:center';
569
586
  const shade = document.createElement('div');
570
587
  shade.style.cssText = 'position:absolute;inset:0;background:rgba(2,8,23,.62)';
571
588
  const panel = document.createElement('div');
572
589
  panel.style.cssText = 'position:relative;background:var(--panel,#0f172a);border:1px solid var(--line,#1e293b);'
573
590
  + 'border-radius:10px;width:min(520px,92vw);box-shadow:0 20px 60px rgba(0,0,0,.6)';
574
- panel.innerHTML = '<div style="padding:14px 16px;border-bottom:1px solid var(--line,#1e293b);font-weight:600">Overwrite the other changes?</div>'
575
- + '<div style="padding:14px 16px;line-height:1.5">Someone else saved a version of this drawing after you opened yours. '
591
+ panel.innerHTML = '<div id=vcfTitle style="padding:14px 16px;border-bottom:1px solid var(--line,#1e293b);font-weight:600">Overwrite the other changes?</div>'
592
+ + '<div id=vcfBody style="padding:14px 16px;line-height:1.5">Someone else saved a version of this drawing after you opened yours. '
576
593
  + 'Saving now replaces their version with what you see here — their changes will be gone for good.</div>'
577
594
  + '<div style="padding:12px 16px;display:flex;gap:8px;justify-content:flex-end;border-top:1px solid var(--line,#1e293b)">'
578
- + '<button id=vcfCancel>Cancel</button>'
579
- + '<button id=vcfGo style="background:#7f1d1d;border-color:#991b1b;color:#fecaca">Overwrite and save</button></div>';
595
+ + '<button data-command-id="vector.overwrite-cancel" id=vcfCancel>Cancel</button>'
596
+ + '<button data-command-id="vector.overwrite-save" id=vcfGo style="background:#7f1d1d;border-color:#991b1b;color:#fecaca">Overwrite and save</button></div>';
580
597
  back.append(shade, panel);
581
598
  document.body.appendChild(back);
582
- const close = () => back.remove();
599
+ // Back to the control that asked, so a keyboard user lands where they were — not on the page itself.
600
+ const close = () => { back.remove(); if (opener && opener.isConnected && typeof opener.focus === 'function') opener.focus(); };
601
+ back.__close = close;
583
602
  shade.onclick = close;
584
603
  panel.querySelector('#vcfCancel').onclick = close;
585
604
  panel.querySelector('#vcfGo').onclick = async () => {
586
605
  close(); conflicted = false; await doPut(true);
587
606
  const bar = document.getElementById('conflictBanner'); if (bar) bar.remove();
588
607
  };
608
+ // Tab stays on the question's two buttons: behind it is an editor whose edits are not saved.
609
+ back.addEventListener('keydown', (e) => {
610
+ if (e.key !== 'Tab') return;
611
+ const btns = [panel.querySelector('#vcfCancel'), panel.querySelector('#vcfGo')];
612
+ const at = btns.indexOf(document.activeElement);
613
+ e.preventDefault();
614
+ btns[(at + (e.shiftKey ? btns.length - 1 : 1)) % btns.length].focus();
615
+ });
616
+ panel.querySelector('#vcfCancel').focus(); // the safe answer is the one Enter presses
589
617
  }
618
+ // Esc closes the topmost of the two (#3143): the overwrite question first, then the bar. Either way the press is
619
+ // marked used (preventDefault, the forwarder's contract), so it never also closes the shell's editor overlay over
620
+ // edits that are not saved. With both gone, the next Esc goes up — and Close asks about the conflict.
621
+ window.addEventListener('keydown', (e) => {
622
+ if (e.key !== 'Escape' || e.defaultPrevented) return;
623
+ const ask = $('conflictConfirm'); const bar = $('conflictBanner');
624
+ if (!ask && !bar) return;
625
+ e.preventDefault();
626
+ if (ask) { ask.__close(); return; }
627
+ const hadFocus = bar.contains(document.activeElement);
628
+ bar.remove();
629
+ // Focus would fall to the page; the chip that brings the bar back is the nearer place to land.
630
+ const chip = $('saveStat');
631
+ if (hadFocus && chip && chip.getAttribute('role') === 'button') chip.focus();
632
+ });
590
633
  let pendingWrites = 0; // queued or in-flight PUTs — contractSaveState() reads 'saving' until they settle
591
634
  function persistServer() {
592
635
  if (!editable || !C) return Promise.resolve(true);
@@ -780,12 +823,19 @@
780
823
  if (!r.ok) {
781
824
  // 404 with no contract yet is expected state for a fresh Workspaces project — show the friendly empty-state message
782
825
  if (r.status === 404) return null;
783
- throw new Error('HTTP ' + r.status);
826
+ return r.json().catch(() => null).then((body) => {
827
+ throw Object.assign(new Error('drawing read failed'), { status: r.status, body: body || {} });
828
+ });
784
829
  }
785
830
  return r.json();
786
831
  })
787
832
  .then(load)
788
- .catch((e) => showState(e.name === 'AbortError' ? 'Loading timed out — is the server reachable?' : ('Could not load the drawing (' + e.message + ').')))
833
+ // #3097: what could not be done, why and what to do, from the shared copy (failure-copy.js). The status and any
834
+ // exception text go to the console, never on screen. Loading only reads, so a retry may be offered.
835
+ .catch((e) => {
836
+ console.error('vector-editor: the drawing could not be loaded', e && e.status, e);
837
+ showState(failureCopy(e, { action: 'load the drawing', retrySafe: true }).text);
838
+ })
789
839
  .finally(() => clearTimeout(timer));
790
840
 
791
841
  window.addEventListener('resize', () => { if (sheet) syncZoom(); });
@@ -29,3 +29,26 @@ npx esbuild entry.js --bundle --format=esm --external:three --legal-comments=non
29
29
  ```
30
30
 
31
31
  They ship to users via `server/build/bundle.mjs` (`cpSync(web → dist/web)`).
32
+
33
+ ## pdf.js (`pdfjs/`) — FloLess's own PDF viewer (#3018)
34
+
35
+ | Path | Source (`pdfjs-dist`) | Version |
36
+ |------|-----------------------|---------|
37
+ | `pdfjs/pdf.min.mjs` | `build/pdf.min.mjs` | **6.4.299** |
38
+ | `pdfjs/pdf.worker.mjs` | `build/pdf.worker.mjs` (the unminified worker: the minified one carries raw control bytes in string literals, which `verify:no-raw-control-chars` rightly rejects) | **6.4.299** |
39
+ | `pdfjs/cmaps/`, `pdfjs/standard_fonts/`, `pdfjs/iccs/` | the package's folders of the same names, whole | **6.4.299** |
40
+ | `pdfjs/wasm/` | `wasm/openjpeg*`, `wasm/jbig2*`, `wasm/qcms_bg.wasm` and their licences — **not** `quickjs-eval.*`, which only PDF scripting uses, and FloLess runs none | **6.4.299** |
41
+ | `pdfjs/LICENSE` | the package's Apache-2.0 licence | |
42
+
43
+ `web/pdf-view.js` imports `pdf.min.mjs` the first time a PDF is shown (a dynamic `import()`), points
44
+ `GlobalWorkerOptions.workerSrc` at the worker, and passes the `cmaps/`, `standard_fonts/`, `wasm/` and `iccs/`
45
+ folders to `getDocument`. These are FloLess's own static files; the PDF itself is only ever the bytes the
46
+ caller hands over (`data`, never `url`).
47
+
48
+ **Trust boundary.** A PDF is untrusted input drawn in the app's own page, not in a sandboxed frame. What keeps that
49
+ safe is what is left out, not an option that sandboxes it: no scripting (no `pdf.sandbox`, no quickjs), no XFA,
50
+ no annotation layer (so no links a PDF could use to navigate FloLess), and every resource URL is FloLess's own.
51
+ pdf.js 6 has no `eval`/`new Function` font path at all. Keep it current for its parser fixes.
52
+
53
+ To update: `npm pack pdfjs-dist@<ver>`, copy the same files at the same paths, bump this table, and check the
54
+ worker still passes `npm --prefix server run verify:no-raw-control-chars`.