@floless/app 0.167.0 → 0.168.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/desktop-shell.mjs +335 -0
- package/dist/floless-server.cjs +14518 -11361
- 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-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/web/agents.js +1 -1
- package/dist/web/app.css +165 -8
- package/dist/web/app.js +53 -13
- package/dist/web/aware-update-client.js +13 -5
- package/dist/web/aware.js +183 -39
- package/dist/web/chat.css +2 -1
- package/dist/web/chat.js +410 -80
- package/dist/web/commands-filter.js +5 -5
- package/dist/web/commands-shell.js +172 -10
- package/dist/web/commands-steel.js +1 -1
- package/dist/web/desktop-window.js +435 -0
- package/dist/web/drawing-check-editor.js +18 -10
- package/dist/web/failure-copy.js +14 -1
- package/dist/web/guide.js +75 -9
- package/dist/web/index.html +64 -6
- package/dist/web/instructor.js +1 -1
- package/dist/web/leave-guard.js +347 -14
- package/dist/web/pages.js +5 -1
- package/dist/web/panels.js +5 -2
- package/dist/web/pdf-view.js +421 -0
- package/dist/web/project-history.js +2 -1
- package/dist/web/project-modules.js +3 -1
- package/dist/web/project-rfis.js +3 -1
- package/dist/web/project-workflows.js +4 -2
- package/dist/web/reference-geometry-worker.js +11 -2
- package/dist/web/revit-editor.html +1 -0
- package/dist/web/revit-editor.js +37 -8
- package/dist/web/shared-prefs.js +364 -0
- package/dist/web/steel-editor.html +204 -43
- 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/tool-updates.js +159 -38
- package/dist/web/vector-3d.html +14 -3
- package/dist/web/vector-editor.html +10 -2
- 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/workspaces.js +167 -26
- package/home-env.mjs +28 -0
- package/install-path.mjs +59 -3
- package/launch-starting-page.mjs +35 -15
- package/launch.mjs +358 -51
- package/package.json +2 -1
- 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,31 @@
|
|
|
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 error = new Error(body.error || callFailureText({ status: res.status, body: body }, readOnly));
|
|
289
347
|
error.body = body;
|
|
348
|
+
error.status = res.status;
|
|
349
|
+
error.serverText = Boolean(body.error) && body.code !== 'response-unreadable';
|
|
290
350
|
throw error;
|
|
291
351
|
}
|
|
292
352
|
return body;
|
|
293
353
|
}
|
|
294
354
|
|
|
355
|
+
// The person's sentence for a failed request the server explained no further (web/failure-copy.js, loaded first).
|
|
356
|
+
function callFailureText(error, retrySafe) {
|
|
357
|
+
if (typeof failureCopy === 'function') return failureCopy(error, { retrySafe: retrySafe }).text;
|
|
358
|
+
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.';
|
|
359
|
+
}
|
|
360
|
+
|
|
295
361
|
// #2013: AWARE's cleanup of unused tool versions, as the server words it (agent-store-cleanup.ts).
|
|
296
362
|
function cleanupNeeds() {
|
|
297
363
|
var c = view && view.cleanup;
|
|
@@ -320,10 +386,15 @@
|
|
|
320
386
|
var text;
|
|
321
387
|
var state = 'offer';
|
|
322
388
|
var more = '';
|
|
389
|
+
var reviewed = 0;
|
|
323
390
|
if (templateUpdates.length) {
|
|
324
391
|
// One-click update (owner ruling 2026-11-02): the pill counts workflows with an update the person can apply, and only
|
|
325
392
|
// those. Tool approvals and cleanup are a dot here and a section in the dialog.
|
|
393
|
+
// #3081: an update reviewed in AI Chat (a Steel Model) is counted, and the pill says it is a review, not a click.
|
|
394
|
+
reviewed = templateUpdates.filter(function (u) { return !!u.sourceUpdate; }).length;
|
|
326
395
|
text = plural(templateUpdates.length, 'workflow update', 'workflow updates');
|
|
396
|
+
if (reviewed === templateUpdates.length) text += ' to review';
|
|
397
|
+
else if (reviewed) text += ' (' + reviewed + ' to review)';
|
|
327
398
|
if (offers.length || needCount || cleanup.length) more = 'Tool updates also wait for you in this list.';
|
|
328
399
|
} else if (offers.length) {
|
|
329
400
|
text = plural(offers.length, 'workflow update', 'workflow updates');
|
|
@@ -355,7 +426,9 @@
|
|
|
355
426
|
$pill.textContent = text;
|
|
356
427
|
$pill.setAttribute('data-state', state);
|
|
357
428
|
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.'
|
|
429
|
+
var tip = !templateUpdates.length ? PILL_TIP : !reviewed ? 'Newer versions of your workflows from FloLess. Open to update them in one click.'
|
|
430
|
+
: reviewed === templateUpdates.length ? 'Newer versions of your workflows from FloLess. Open to review them in AI Chat: nothing changes until you send the request.'
|
|
431
|
+
: 'Newer versions of your workflows from FloLess. Open to update them; the ones marked to review are reviewed in AI Chat first.';
|
|
359
432
|
if (more) tip += ' ' + more;
|
|
360
433
|
$pill.setAttribute('data-tip', firstCheck ? 'The first workflow check is still running. The total is not known yet.' : !checking ? tip : state === 'checking'
|
|
361
434
|
? 'Still checking for tool updates. Open to watch it.' : tip + (/\.$/.test(tip) ? ' ' : '. ') + 'A check is also running.');
|
|
@@ -511,7 +584,14 @@
|
|
|
511
584
|
$live.textContent = body.sentence || (ok ? 'Removed from the list.' : 'Nothing was removed from the list. Try again.');
|
|
512
585
|
} catch (error) {
|
|
513
586
|
if (error.body) applyCleanup(ticket, error.body.cleanup);
|
|
514
|
-
|
|
587
|
+
// #3097: "Nothing was removed" is the server's claim, so it follows only the server's own reason. A lost or
|
|
588
|
+
// unexplained answer may follow a removal that went through, so it asks the person to check the list instead.
|
|
589
|
+
console.warn('forget folder failed', error);
|
|
590
|
+
$live.textContent = error.serverText
|
|
591
|
+
? error.message + ' Nothing was removed from the list.'
|
|
592
|
+
: (typeof failureCopy === 'function'
|
|
593
|
+
? failureCopy(error, { action: 'remove it from the list', unsure: 'Check whether it is still listed before trying again.' }).text
|
|
594
|
+
: 'Couldn’t remove it from the list. Check whether it is still listed before trying again.');
|
|
515
595
|
} finally {
|
|
516
596
|
forgetting = null;
|
|
517
597
|
paint();
|
|
@@ -791,10 +871,15 @@
|
|
|
791
871
|
var toolsHost = $body;
|
|
792
872
|
if (rows.length) {
|
|
793
873
|
$title.textContent = 'Workflow updates';
|
|
794
|
-
|
|
874
|
+
// #3081: a Steel Model is reviewed in AI Chat, never applied by its click here; the intro says so when one is listed.
|
|
875
|
+
var reviewRows = rows.filter(function (u) { return !!u.sourceUpdate; }).length;
|
|
876
|
+
if ($sub) $sub.textContent = !reviewRows ? 'Newer versions of your workflows from FloLess. Each one updates when you click it.'
|
|
877
|
+
: 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.'
|
|
878
|
+
: '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
879
|
var bundled = el('div', 'tool-updates-section wf-upd-section');
|
|
796
880
|
var head = el('div', 'wf-upd-head');
|
|
797
|
-
head.appendChild(el('div', 'tool-updates-section-head',
|
|
881
|
+
head.appendChild(el('div', 'tool-updates-section-head', reviewRows === rows.length
|
|
882
|
+
? 'Each review keeps your data. Nothing changes until you send the request.' : 'Each update keeps your data and saves a backup first'));
|
|
798
883
|
// The count is exactly what the click updates (an offer being worked on, or one the person changed, is not counted).
|
|
799
884
|
var plain = typeof bridge?.updateAllCount === 'function' ? bridge.updateAllCount() : templateUpdates.filter(function (u) { return !u.hasChanges; }).length;
|
|
800
885
|
if (plain >= 2 && typeof bridge?.updateAllWorkflows === 'function') {
|
|
@@ -828,7 +913,7 @@
|
|
|
828
913
|
toolsHost.appendChild(el('div', 'tool-updates-summary', view.sentence));
|
|
829
914
|
}
|
|
830
915
|
if (results) {
|
|
831
|
-
var done = section('
|
|
916
|
+
var done = section('Tool approvals', results.length);
|
|
832
917
|
done.querySelector('.tool-updates-section-head').id = 'tool-updates-results-head';
|
|
833
918
|
done.querySelector('.tool-updates-section-head').tabIndex = -1;
|
|
834
919
|
results.forEach(function (r) { done.appendChild(resultRow(r)); });
|
|
@@ -877,7 +962,13 @@
|
|
|
877
962
|
$check.hidden = !!results || !(view && view.supported);
|
|
878
963
|
// "Not now" would read as cancelling the check, which closing the dialog does not do.
|
|
879
964
|
var anyDone = rows.some(function (u) { var r = document.querySelector('[data-template-update="' + u.id + '"]'); return r && r.getAttribute('data-state') !== 'idle'; });
|
|
880
|
-
|
|
965
|
+
// #3081: Done would say everything listed is finished. While anything still waits (a workflow update, a tool approval,
|
|
966
|
+
// something that needs the person, or an approval that did not go through) it is Close.
|
|
967
|
+
var stillWaiting = workflowUpdatesWaiting();
|
|
968
|
+
var unfinished = (results || []).some(function (r) { return r.outcome !== 'moved' && r.outcome !== 'compiled'; });
|
|
969
|
+
var nothingWaits = !(stillWaiting.apply + stillWaiting.review) && !(!results && offers.length) && !needsYou && !unfinished;
|
|
970
|
+
$cancel.textContent = (results || anyDone) && nothingWaits ? 'Done'
|
|
971
|
+
: checkInFlight() || results || anyDone ? 'Close' : 'Not now';
|
|
881
972
|
}
|
|
882
973
|
|
|
883
974
|
/** A control that cannot be used right now says why (Instructor reads data-blocked-reason only while it is disabled). */
|
|
@@ -922,17 +1013,36 @@
|
|
|
922
1013
|
|
|
923
1014
|
async function refreshTemplates() {
|
|
924
1015
|
var ticket = ++templateTicket;
|
|
1016
|
+
var bridge = window.flolessBridge;
|
|
925
1017
|
try {
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
1018
|
+
// #3081: one read feeds this pill and both update dialogs, so a count never disagrees with the rows under it. The
|
|
1019
|
+
// page's own read is only for a page without the workflow screen (it has no rows to keep in step).
|
|
1020
|
+
var list;
|
|
1021
|
+
if (typeof bridge?.refreshWorkflowUpdates === 'function') {
|
|
1022
|
+
list = await bridge.refreshWorkflowUpdates();
|
|
1023
|
+
if (!list) throw new Error('the workflow update offers could not be read');
|
|
1024
|
+
} else {
|
|
1025
|
+
var templates = await call('/api/workflows/updates');
|
|
1026
|
+
list = templates?.ok === true && Array.isArray(templates.updates) ? templates.updates : null;
|
|
1027
|
+
}
|
|
1028
|
+
if (list && ticket === templateTicket) {
|
|
1029
|
+
templateUpdates = list;
|
|
929
1030
|
paintPill();
|
|
930
1031
|
}
|
|
931
1032
|
} catch (error) {
|
|
1033
|
+
console.warn('workflow update offers unavailable', error);
|
|
932
1034
|
if (isOpen()) $live.textContent = 'FloLess could not check bundled workflow files just now. Reopen this review to try again.';
|
|
933
1035
|
}
|
|
934
1036
|
}
|
|
935
1037
|
|
|
1038
|
+
/** #3081: the workflow updates still waiting in the list, split into what a click applies and what is reviewed in AI Chat. */
|
|
1039
|
+
function workflowUpdatesWaiting() {
|
|
1040
|
+
var bridge = window.flolessBridge;
|
|
1041
|
+
if (typeof bridge?.workflowUpdatesWaiting === 'function') return bridge.workflowUpdatesWaiting();
|
|
1042
|
+
var review = templateUpdates.filter(function (u) { return !!u.sourceUpdate; }).length;
|
|
1043
|
+
return { apply: templateUpdates.length - review, review: review };
|
|
1044
|
+
}
|
|
1045
|
+
|
|
936
1046
|
async function compileReviewed() {
|
|
937
1047
|
if (!compileSelection || approving) return;
|
|
938
1048
|
var selected = compileSelection;
|
|
@@ -1131,9 +1241,11 @@
|
|
|
1131
1241
|
if (body.ok) {
|
|
1132
1242
|
results = body.results || [];
|
|
1133
1243
|
var moved = results.filter(function (r) { return r.outcome === 'moved'; }).length;
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1244
|
+
// #3081: tool approvals and workflow updates are different work on (often) different workflows: say each apart,
|
|
1245
|
+
// so "3 done" is never read as the 3 workflow updates still in the list.
|
|
1246
|
+
$live.textContent = (moved === results.length
|
|
1247
|
+
? plural(moved, 'tool approval', 'tool approvals') + ' done. ' + (moved === 1 ? 'That workflow now runs' : 'Those workflows now run') + ' on the new tool versions.'
|
|
1248
|
+
: moved + ' of ' + plural(results.length, 'tool approval', 'tool approvals') + ' done. The others say why below.') + waitingSentence();
|
|
1137
1249
|
} else {
|
|
1138
1250
|
$live.textContent = body.sentence || body.error || 'Nothing was moved. Review it again.';
|
|
1139
1251
|
}
|
|
@@ -1152,6 +1264,15 @@
|
|
|
1152
1264
|
}
|
|
1153
1265
|
});
|
|
1154
1266
|
|
|
1267
|
+
/** After tool approvals: the workflow updates that still wait in the list, or nothing when none do. */
|
|
1268
|
+
function waitingSentence() {
|
|
1269
|
+
var w = workflowUpdatesWaiting();
|
|
1270
|
+
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.';
|
|
1271
|
+
if (w.review) return ' ' + plural(w.review, 'workflow update still needs', 'workflow updates still need') + ' review in AI Chat.';
|
|
1272
|
+
if (w.apply) return ' ' + plural(w.apply, 'workflow update still waits', 'workflow updates still wait') + ' in the list.';
|
|
1273
|
+
return '';
|
|
1274
|
+
}
|
|
1275
|
+
|
|
1155
1276
|
// The ≡ menu's "Tool updates…" — the way in when the pill has nothing to show (to check for new versions now).
|
|
1156
1277
|
if (typeof window.handleMenuAction === 'function') {
|
|
1157
1278
|
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 = e && e.body && typeof e.body.error === 'string' ? e.body.error.trim() : '';
|
|
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;
|
|
@@ -252,6 +252,7 @@
|
|
|
252
252
|
The reporter tells the shell which surface is on screen (so the `?` sheet can put this
|
|
253
253
|
screen's commands first) and forwards `?`/F1 up, because a keydown inside an iframe never
|
|
254
254
|
reaches the shell's own handler. This surface arms nothing, so its snapshot is just its identity — see commands-vector.js. -->
|
|
255
|
+
<script src="failure-copy.js"></script>
|
|
255
256
|
<script src="commands.js"></script>
|
|
256
257
|
<script src="commands-vector.js"></script>
|
|
257
258
|
<script src="instructor-reporter.js"></script>
|
|
@@ -780,12 +781,19 @@
|
|
|
780
781
|
if (!r.ok) {
|
|
781
782
|
// 404 with no contract yet is expected state for a fresh Workspaces project — show the friendly empty-state message
|
|
782
783
|
if (r.status === 404) return null;
|
|
783
|
-
|
|
784
|
+
return r.json().catch(() => null).then((body) => {
|
|
785
|
+
throw Object.assign(new Error('drawing read failed'), { status: r.status, body: body || {} });
|
|
786
|
+
});
|
|
784
787
|
}
|
|
785
788
|
return r.json();
|
|
786
789
|
})
|
|
787
790
|
.then(load)
|
|
788
|
-
|
|
791
|
+
// #3097: what could not be done, why and what to do, from the shared copy (failure-copy.js). The status and any
|
|
792
|
+
// exception text go to the console, never on screen. Loading only reads, so a retry may be offered.
|
|
793
|
+
.catch((e) => {
|
|
794
|
+
console.error('vector-editor: the drawing could not be loaded', e && e.status, e);
|
|
795
|
+
showState(failureCopy(e, { action: 'load the drawing', retrySafe: true }).text);
|
|
796
|
+
})
|
|
789
797
|
.finally(() => clearTimeout(timer));
|
|
790
798
|
|
|
791
799
|
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`.
|