@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.
- package/autostart.mjs +169 -63
- package/cli-actions.mjs +8 -1
- package/desktop-shell.mjs +335 -0
- package/dist/floless-server.cjs +73121 -55759
- package/dist/schemas/steel.model.v2.schema.json +2 -1
- package/dist/skills/floless-app-onboarding/SKILL.md +13 -4
- package/dist/skills/floless-app-onboarding/references/floless-surfaces.md +3 -0
- package/dist/skills/floless-app-rfi/SKILL.md +4 -2
- package/dist/skills/floless-app-steel-takeoff/SKILL.md +21 -2
- package/dist/skills/floless-app-ui/SKILL.md +2 -2
- package/dist/skills/floless-app-workflows/SKILL.md +2 -2
- package/dist/templates/college-phase-exporter.flo +7 -2
- package/dist/templates/trimble-list-projects.flo +10 -2
- package/dist/web/agent-steps.js +2 -2
- package/dist/web/agents.js +50 -14
- package/dist/web/app.css +209 -11
- package/dist/web/app.js +99 -16
- package/dist/web/aware-update-client.js +14 -6
- package/dist/web/aware.js +583 -69
- package/dist/web/chat.css +12 -1
- package/dist/web/chat.js +627 -96
- package/dist/web/commands-drawing-check.js +3 -0
- package/dist/web/commands-filter.js +5 -5
- package/dist/web/commands-shell.js +283 -14
- package/dist/web/commands-steel.js +9 -2
- package/dist/web/commands-vector.js +69 -0
- package/dist/web/desktop-window.js +435 -0
- package/dist/web/drawing-check-editor.html +10 -0
- package/dist/web/drawing-check-editor.js +515 -187
- package/dist/web/failure-copy.js +33 -2
- package/dist/web/flo-3d.js +310 -0
- package/dist/web/flo-card.js +72 -0
- package/dist/web/guide.js +78 -10
- package/dist/web/index.html +90 -10
- package/dist/web/instructor.js +4 -1
- package/dist/web/leave-guard.js +347 -14
- package/dist/web/model-editor-steel-adapter.js +41 -1
- package/dist/web/model-viewport-toolbar.js +11 -0
- package/dist/web/pages.js +21 -14
- package/dist/web/panels.js +5 -2
- package/dist/web/pdf-view.js +421 -0
- package/dist/web/project-history.js +3 -2
- package/dist/web/project-modules.js +5 -3
- package/dist/web/project-reconciliation.js +1 -1
- package/dist/web/project-rfis.js +4 -2
- package/dist/web/project-workflows.js +8 -4
- package/dist/web/reference-geometry-worker.js +11 -2
- package/dist/web/renderers.js +6 -0
- package/dist/web/report-csp.js +68 -0
- package/dist/web/revit-editor.html +1 -0
- package/dist/web/revit-editor.js +37 -8
- package/dist/web/run-history.js +2 -3
- package/dist/web/shared-prefs.js +364 -0
- package/dist/web/steel-3d-flo.js +309 -0
- package/dist/web/steel-3d-view.js +159 -0
- package/dist/web/steel-editor.html +329 -47
- package/dist/web/steel-filter-flo.js +74 -18
- package/dist/web/steel-filter.html +22 -6
- package/dist/web/tab-signal.js +36 -1
- package/dist/web/tekla-editor.html +1 -0
- package/dist/web/terminal-requests.js +78 -0
- package/dist/web/tool-updates.js +160 -38
- package/dist/web/vector-3d.html +14 -3
- package/dist/web/vector-editor.html +60 -10
- package/dist/web/vendor/README.md +23 -0
- package/dist/web/vendor/pdfjs/LICENSE +177 -0
- package/dist/web/vendor/pdfjs/cmaps/78-EUC-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/78-EUC-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/78-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/78-RKSJ-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/78-RKSJ-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/78-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/78ms-RKSJ-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/78ms-RKSJ-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/83pv-RKSJ-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/90ms-RKSJ-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/90ms-RKSJ-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/90msp-RKSJ-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/90msp-RKSJ-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/90pv-RKSJ-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/90pv-RKSJ-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/Add-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/Add-RKSJ-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/Add-RKSJ-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/Add-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/Adobe-CNS1-0.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/Adobe-CNS1-1.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/Adobe-CNS1-2.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/Adobe-CNS1-3.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/Adobe-CNS1-4.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/Adobe-CNS1-5.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/Adobe-CNS1-6.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/Adobe-CNS1-UCS2.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/Adobe-GB1-0.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/Adobe-GB1-1.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/Adobe-GB1-2.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/Adobe-GB1-3.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/Adobe-GB1-4.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/Adobe-GB1-5.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/Adobe-GB1-UCS2.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/Adobe-Japan1-0.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/Adobe-Japan1-1.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/Adobe-Japan1-2.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/Adobe-Japan1-3.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/Adobe-Japan1-4.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/Adobe-Japan1-5.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/Adobe-Japan1-6.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/Adobe-Japan1-UCS2.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/Adobe-Korea1-0.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/Adobe-Korea1-1.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/Adobe-Korea1-2.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/Adobe-Korea1-UCS2.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/B5-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/B5-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/B5pc-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/B5pc-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/CNS-EUC-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/CNS-EUC-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/CNS1-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/CNS1-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/CNS2-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/CNS2-V.bcmap +3 -0
- package/dist/web/vendor/pdfjs/cmaps/ETHK-B5-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/ETHK-B5-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/ETen-B5-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/ETen-B5-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/ETenms-B5-H.bcmap +3 -0
- package/dist/web/vendor/pdfjs/cmaps/ETenms-B5-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/EUC-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/EUC-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/Ext-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/Ext-RKSJ-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/Ext-RKSJ-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/Ext-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/GB-EUC-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/GB-EUC-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/GB-H.bcmap +4 -0
- package/dist/web/vendor/pdfjs/cmaps/GB-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/GBK-EUC-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/GBK-EUC-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/GBK2K-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/GBK2K-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/GBKp-EUC-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/GBKp-EUC-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/GBT-EUC-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/GBT-EUC-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/GBT-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/GBT-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/GBTpc-EUC-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/GBTpc-EUC-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/GBpc-EUC-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/GBpc-EUC-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/HKdla-B5-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/HKdla-B5-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/HKdlb-B5-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/HKdlb-B5-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/HKgccs-B5-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/HKgccs-B5-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/HKm314-B5-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/HKm314-B5-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/HKm471-B5-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/HKm471-B5-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/HKscs-B5-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/HKscs-B5-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/Hankaku.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/Hiragana.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/KSC-EUC-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/KSC-EUC-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/KSC-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/KSC-Johab-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/KSC-Johab-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/KSC-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/KSCms-UHC-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/KSCms-UHC-HW-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/KSCms-UHC-HW-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/KSCms-UHC-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/KSCpc-EUC-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/KSCpc-EUC-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/Katakana.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/LICENSE +36 -0
- package/dist/web/vendor/pdfjs/cmaps/NWP-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/NWP-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/RKSJ-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/RKSJ-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/Roman.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniCNS-UCS2-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniCNS-UCS2-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniCNS-UTF16-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniCNS-UTF16-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniCNS-UTF32-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniCNS-UTF32-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniCNS-UTF8-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniCNS-UTF8-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniGB-UCS2-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniGB-UCS2-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniGB-UTF16-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniGB-UTF16-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniGB-UTF32-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniGB-UTF32-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniGB-UTF8-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniGB-UTF8-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniJIS-UCS2-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniJIS-UCS2-HW-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniJIS-UCS2-HW-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniJIS-UCS2-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniJIS-UTF16-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniJIS-UTF16-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniJIS-UTF32-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniJIS-UTF32-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniJIS-UTF8-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniJIS-UTF8-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniJIS2004-UTF16-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniJIS2004-UTF16-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniJIS2004-UTF32-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniJIS2004-UTF32-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniJIS2004-UTF8-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniJIS2004-UTF8-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniJISPro-UCS2-HW-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniJISPro-UCS2-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniJISPro-UTF8-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniJISX0213-UTF32-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniJISX0213-UTF32-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniJISX02132004-UTF32-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniJISX02132004-UTF32-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniKS-UCS2-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniKS-UCS2-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniKS-UTF16-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniKS-UTF16-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniKS-UTF32-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniKS-UTF32-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniKS-UTF8-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniKS-UTF8-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/WP-Symbol.bcmap +0 -0
- package/dist/web/vendor/pdfjs/iccs/CGATS001Compat-v2-micro.icc +0 -0
- package/dist/web/vendor/pdfjs/iccs/LICENSE +116 -0
- package/dist/web/vendor/pdfjs/pdf.min.mjs +28 -0
- package/dist/web/vendor/pdfjs/pdf.worker.mjs +64908 -0
- package/dist/web/vendor/pdfjs/standard_fonts/FoxitDingbats.pfb +0 -0
- package/dist/web/vendor/pdfjs/standard_fonts/FoxitFixed.pfb +0 -0
- package/dist/web/vendor/pdfjs/standard_fonts/FoxitFixedBold.pfb +0 -0
- package/dist/web/vendor/pdfjs/standard_fonts/FoxitFixedBoldItalic.pfb +0 -0
- package/dist/web/vendor/pdfjs/standard_fonts/FoxitFixedItalic.pfb +0 -0
- package/dist/web/vendor/pdfjs/standard_fonts/FoxitSerif.pfb +0 -0
- package/dist/web/vendor/pdfjs/standard_fonts/FoxitSerifBold.pfb +0 -0
- package/dist/web/vendor/pdfjs/standard_fonts/FoxitSerifBoldItalic.pfb +0 -0
- package/dist/web/vendor/pdfjs/standard_fonts/FoxitSerifItalic.pfb +0 -0
- package/dist/web/vendor/pdfjs/standard_fonts/FoxitSymbol.pfb +0 -0
- package/dist/web/vendor/pdfjs/standard_fonts/LICENSE_FOXIT +27 -0
- package/dist/web/vendor/pdfjs/standard_fonts/LICENSE_LIBERATION +363 -0
- package/dist/web/vendor/pdfjs/standard_fonts/LiberationSans-Bold.ttf +0 -0
- package/dist/web/vendor/pdfjs/standard_fonts/LiberationSans-BoldItalic.ttf +0 -0
- package/dist/web/vendor/pdfjs/standard_fonts/LiberationSans-Italic.ttf +0 -0
- package/dist/web/vendor/pdfjs/standard_fonts/LiberationSans-Regular.ttf +0 -0
- package/dist/web/vendor/pdfjs/wasm/LICENSE_JBIG2 +196 -0
- package/dist/web/vendor/pdfjs/wasm/LICENSE_OPENJPEG +39 -0
- package/dist/web/vendor/pdfjs/wasm/LICENSE_PDFJS_JBIG2 +13 -0
- package/dist/web/vendor/pdfjs/wasm/LICENSE_PDFJS_OPENJPEG +22 -0
- package/dist/web/vendor/pdfjs/wasm/LICENSE_PDFJS_QCMS +19 -0
- package/dist/web/vendor/pdfjs/wasm/LICENSE_QCMS +21 -0
- package/dist/web/vendor/pdfjs/wasm/jbig2.wasm +0 -0
- package/dist/web/vendor/pdfjs/wasm/jbig2_nowasm_fallback.js +15 -0
- package/dist/web/vendor/pdfjs/wasm/openjpeg.wasm +0 -0
- package/dist/web/vendor/pdfjs/wasm/openjpeg_nowasm_fallback.js +17 -0
- package/dist/web/vendor/pdfjs/wasm/qcms_bg.wasm +0 -0
- package/dist/web/workspace-root-management.js +1 -1
- package/dist/web/workspaces.js +792 -165
- package/home-env.mjs +28 -0
- package/install-path.mjs +59 -3
- package/launch-starting-page.mjs +35 -15
- package/launch.mjs +363 -51
- package/package.json +9 -8
- package/pin-home.mjs +6 -0
- package/post-update-marker.mjs +14 -0
- package/preferences-file.mjs +289 -0
- package/supervisor-lock.mjs +195 -0
package/dist/web/tool-updates.js
CHANGED
|
@@ -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
|
-
|
|
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' &&
|
|
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) + '|' +
|
|
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 (
|
|
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
|
-
//
|
|
184
|
-
if (
|
|
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
|
|
201
|
-
try { body = await call('/api/tool-updates/progress', 'GET', undefined, controller.signal); }
|
|
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 (
|
|
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 (
|
|
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
|
-
|
|
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
|
|
232
|
-
function markLost() {
|
|
233
|
-
if (
|
|
234
|
-
|
|
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
|
-
|
|
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
|
|
260
|
-
// up (it would otherwise hold every later one back for ever) and
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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.'
|
|
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
|
-
|
|
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
|
-
|
|
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',
|
|
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('
|
|
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
|
-
|
|
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
|
-
|
|
927
|
-
|
|
928
|
-
|
|
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
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
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;
|
package/dist/web/vector-3d.html
CHANGED
|
@@ -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(
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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`.
|