@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
|
@@ -387,7 +387,8 @@
|
|
|
387
387
|
"properties": {
|
|
388
388
|
"low": { "type": "number" },
|
|
389
389
|
"high": { "type": "number" },
|
|
390
|
-
"observations": { "type": "integer", "minimum": 1 }
|
|
390
|
+
"observations": { "type": "integer", "minimum": 1 },
|
|
391
|
+
"evidenceDigest": { "type": "string", "pattern": "^[0-9a-f]{64}$", "description": "#2628: the drawn evidence the person saw on the card when they answered (sha256, domain floless:drawn-height-evidence/v1). Absent on an answer given before it was recorded: the drawings it was given against are then not known, and an end whose drawings disagree is asked again." }
|
|
391
392
|
}
|
|
392
393
|
},
|
|
393
394
|
"proposal": {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: floless-app-onboarding
|
|
3
3
|
description: Onboards a person into FloLess and the AWARE runtime underneath it, in four modes. Guide mode (the main one) runs inside FloLess AI Chat as the built-in Guide, whose first turn carries a JSON block of facts FloLess collected (apps, running, recentFiles, accounts, floless) — it briefs the person on what they seem to work on, then onboards them from their own situation, offering every next move as a button (floless_suggest_next_move, floless_connection_propose); the looks FloLess starts stay read only, and later it changes something only when the person asks and the chat's Access allows it. Terminal mode is the re-runnable guided tour for an AI in an external terminal (AWARE first, then the FloLess surfaces). Instructor focused mode answers one queued guide request about a single control. Project kickoff mode sets up a General project the person just created, from a project-kickoff request whose first turn carries a kickoff facts block (project, companyLibrary, projectKnowledge, modules, nextSteps) - one question on the question tool, company knowledge first (offered), then project knowledge, connections and at most two next steps, every change a card the person confirms. Use it when the Guide conversation or a project kickoff starts, and on asks like "what can FloLess do for me", "how do I", "onboard me", "get me started", "I'm new to FloLess or AWARE", "give me the guided tour", "walk me through floless.app", "what can AWARE do", "show me the agents", or "/floless-app-onboarding" - for the whole tour or one section.
|
|
4
4
|
metadata:
|
|
5
|
-
version: 0.5.
|
|
5
|
+
version: 0.5.8
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# Onboarding a person into FloLess + AWARE
|
|
@@ -55,7 +55,8 @@ What the block can hold (any section may be capped — it says how many were lef
|
|
|
55
55
|
- **recentFiles** — recently used work files with their folders, newest first. If the person did not
|
|
56
56
|
share file names, there are only **counts per file type** — never guess names from counts.
|
|
57
57
|
- **accounts** — services connected to FloLess and their status (names only).
|
|
58
|
-
- **floless** — what FloLess already holds here: projects, workflows, agents,
|
|
58
|
+
- **floless** — what FloLess already holds here: projects (each `{ id, name }`), workflows (each by its id), agents,
|
|
59
|
+
routines, installed tools.
|
|
59
60
|
|
|
60
61
|
### First reply: a short briefing
|
|
61
62
|
|
|
@@ -95,7 +96,13 @@ person confirms in FloLess's own flow:
|
|
|
95
96
|
what it makes, where the result goes. Pressing it again opens the same workflow; it never makes a second one.
|
|
96
97
|
- `create-agent` (`name`, `instructions`) — opens the Agents page with a draft.
|
|
97
98
|
- `create-routine` (`workflowId` or `agentId`) — opens the Routines editor; the person picks the schedule there.
|
|
98
|
-
- `open` (`page`) — opens one FloLess page: `workspaces`, `workflows`, `agents`, `routines`, `tools`, `discover` (Discover Local Tools), `integrations` or `requests`.
|
|
99
|
+
- `open` (`page`) — opens one FloLess page: `workspaces`, `workflows`, `agents`, `routines`, `tools`, `discover` (Discover Local Tools), `integrations` or `requests`.
|
|
100
|
+
- `open` (`projectId`, optional `step`: `model` or `history`) — opens that one project, at that step when the
|
|
101
|
+
suggestion is about it ("review its model", "look at its History"). `open` (`workflowId`) — opens that one workflow.
|
|
102
|
+
**Whenever a suggestion is about one project or workflow, open that one** — never only the Workspaces or Workflows
|
|
103
|
+
page, which leaves the person to find what you already named. Take the id from the facts (`floless.projects[].id`,
|
|
104
|
+
`floless.workflows`), never from a name: two projects can share a name. Use the bare `workspaces` / `workflows` page
|
|
105
|
+
only to browse or create. Knowledge lives inside a project: open that project and say which step in words.
|
|
99
106
|
Always give `why`: one short sentence tied to what you saw ("you open the same BOM spreadsheet every
|
|
100
107
|
Monday").
|
|
101
108
|
- `floless_connection_propose` (`target`, `why`) — for connecting a tool or service; its card opens
|
|
@@ -139,7 +146,9 @@ saying what it looked at; you do not need to repeat that.
|
|
|
139
146
|
you ask permission for to be declined. It always runs Read only, whatever Access the chat has.
|
|
140
147
|
- **Keep it short:** two to four lines on what they seem to be working on (what is open, what they
|
|
141
148
|
touched recently), then at most three next moves as buttons (`floless_suggest_next_move`, or
|
|
142
|
-
`floless_connection_propose` for a connection). Same kinds and fields as above, nothing else.
|
|
149
|
+
`floless_connection_propose` for a connection). Same kinds and fields as above, nothing else. A move about one
|
|
150
|
+
project or workflow you named ("review the newly listed project's model") opens that one, by its
|
|
151
|
+
`projectId` (and `step`) or `workflowId`, never only the landing page.
|
|
143
152
|
- If the facts are thin or a part could not be read, say so in one line rather than guessing.
|
|
144
153
|
- If the person later asks how to change it: the Guide conversation's settings in AI Chat hold the
|
|
145
154
|
**Morning briefing** switch, its time and days, and **Pause for a week**; turning the Guide off also
|
|
@@ -5,6 +5,9 @@ do I …". Point the person at the real thing on their screen (FloLess at `http:
|
|
|
5
5
|
where useful, at their live state. Keep each section short; check in before moving on.
|
|
6
6
|
|
|
7
7
|
Ground rules for describing any of it:
|
|
8
|
+
- FloLess opens in its **own window** on a new install (an install that was in use before keeps its browser tab).
|
|
9
|
+
Either way it is the same page: the ≡ menu's **Open FloLess in Window | Browser** switches, and *Open in browser*
|
|
10
|
+
is always one click away. Say "the FloLess window" unless you know they use the tab.
|
|
8
11
|
- FloLess is a **window**: it shows AWARE's state, starts `aware` verbs, and relays what the person
|
|
9
12
|
wants to the AI provider they chose. It never composes a workflow or calls an AI on its own.
|
|
10
13
|
- If something below is not on the person's screen, their build may be older — say so plainly and use
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: floless-app-rfi
|
|
3
3
|
description: File, send, and manage RFIs on a floless.app project from the terminal. Use when the user asks to raise an RFI, send it through the connected Gmail account, record a manual send, chase one, record an answer that came back from the engineer, mark an answer as applied, close or reopen an RFI, or asks what questions are still outstanding on a project. Also use when a size the AI could not work out is one the user cannot answer either, so the question has to become a durable record instead of a message that scrolls away.
|
|
4
4
|
metadata:
|
|
5
|
-
version: 0.
|
|
5
|
+
version: 0.10.0
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# File and manage a project's RFIs
|
|
@@ -244,7 +244,9 @@ never work around a version or provenance refusal.
|
|
|
244
244
|
Before the irreversible call, show the exact single recipient and ask the user to confirm this send.
|
|
245
245
|
`rfis.deliver` is `destructive`, so the person confirms it on a card in FloLess and nothing is sent
|
|
246
246
|
before they do. You supply only the recipient and the current record revision. The server owns the
|
|
247
|
-
subject and complete body
|
|
247
|
+
subject and complete body. That body is the row's `text`; for a height RFI the drawings now contradict,
|
|
248
|
+
it also carries the same "Now:" line(s) the row shows (one per affected occurrence of a grouped RFI),
|
|
249
|
+
composed by the server from the current model when it sends. Never paste them in yourself:
|
|
248
250
|
|
|
249
251
|
```
|
|
250
252
|
floless-app do rfis.deliver --input '{"projectId":"<projectId>","rfiId":"<rfiId>","recordRevision":<from the row you just read>,"to":"engineer@example.com"}' --json
|
|
@@ -7,7 +7,7 @@ description: >-
|
|
|
7
7
|
two-phase Drawing Filter process: first prepare and save the deterministic Filter, then read only the
|
|
8
8
|
selected evidence into model-global members, registered plan views, observations, and revision history.
|
|
9
9
|
metadata:
|
|
10
|
-
version: 0.
|
|
10
|
+
version: 0.98.0
|
|
11
11
|
---
|
|
12
12
|
|
|
13
13
|
## Shared height study: server-owned reader claims
|
|
@@ -229,7 +229,8 @@ third of the layers. Nobody can tick one, and saving the Filter again changes no
|
|
|
229
229
|
Lettering DRAWN as linework on a `notRead` layer was withheld with the rest of it, so a label missing
|
|
230
230
|
from the text elements is not proof the sheet lacks it. Once the Filter is saved, read it and the
|
|
231
231
|
withheld linework off the page picture (`GET …/steel-manifest/pages/<pageId>/picture`, `part=0` for
|
|
232
|
-
the whole sheet, `1..9` for enlarged tiles; a `404` names its own fallback, so follow it).
|
|
232
|
+
the whole sheet, `1..9` for enlarged tiles; a `404` names its own fallback, so follow it). In AI
|
|
233
|
+
Chat, `floless_evidence_read` takes `part` on an enlarged sheet: ask for the one tile you need. The
|
|
233
234
|
picture is context for grids, dimensions and annotation only: members still come from elements the
|
|
234
235
|
saved selection keeps.
|
|
235
236
|
- A `scaleProposals` refusal saying the sheet names **no grid family** is usually this same withholding,
|
|
@@ -275,6 +276,23 @@ Every audit response carries **`audit.rfis`**: the questions this read could not
|
|
|
275
276
|
derives them from what you stated - you cannot author one, merge two, or leave one out. They are there
|
|
276
277
|
whether the read was refused or went through.
|
|
277
278
|
|
|
279
|
+
**A row carrying `drawnHeights` is a drawing conflict:** the drawings now give that end a different
|
|
280
|
+
height than the model holds (a person's earlier answer included, when the drawings changed since or it
|
|
281
|
+
never recorded which drawings it was given against), and its question says both. It is the person's;
|
|
282
|
+
never settle it yourself. **In a precise read, ask it on a height card** like any other height of a
|
|
283
|
+
member already in the model, after auditing: the server puts what this audit found on the drawings on the
|
|
284
|
+
card beside the held height, and records with the person's answer which drawings they saw, so the end is
|
|
285
|
+
not asked again until the drawings change. The exception is a card that could read only some of the end's
|
|
286
|
+
drawn heights: its answer acknowledges none of them, so the next audit raises the end again until every
|
|
287
|
+
drawn height can be read. Within this read, never re-ask an end the person already answered unless its
|
|
288
|
+
readings changed. Ask it on the card **even when `rfiAnnotations` says its RFI
|
|
289
|
+
is filed** (`open`, `sent` or `answered`): never file that RFI again or re-ask it as an RFI; tell the
|
|
290
|
+
person the RFI stays the record and the card asks what height the model keeps. A card asked before any
|
|
291
|
+
audit of this read says the end is unchecked, and its answer acknowledges no drawings. **In a Quick read,
|
|
292
|
+
file it as an RFI**; never settle it. The model keeps its height until a person changes it; recording an
|
|
293
|
+
RFI's answer does not change it. If the endpoint check says some ends' drawn heights could not be
|
|
294
|
+
checked, say how many; never say the heights agree with the drawings.
|
|
295
|
+
|
|
278
296
|
The response also carries the response-only sibling **`rfiAnnotations`**, which checks those exact
|
|
279
297
|
questions against the project's durable RFI list without changing the signed audit. Read it before
|
|
280
298
|
asking anything:
|
|
@@ -724,6 +742,7 @@ In a Quick read:
|
|
|
724
742
|
these rows. The server answers 409 with what is wrong and you fix exactly that:
|
|
725
743
|
`quick-read-selection-incomplete` (neither), `quick-read-decided-and-filed` (both),
|
|
726
744
|
`quick-read-recommendation-stale` (the facts changed: audit again and update it),
|
|
745
|
+
`quick-read-drawn-height-settled` (a `drawnHeights` row was settled: file it in `gaps` instead),
|
|
727
746
|
`quick-question-generation-gone` (audit again), `quick-read-selection-too-large` (shorten `proposed`
|
|
728
747
|
and `tried`, never drop a question). `quick-read-set-too-large` is a stop: end the run as `needs-you`,
|
|
729
748
|
"this drawing set raises more questions than one read can file; read the set in parts". The RFIs are
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: floless-app-ui
|
|
3
3
|
description: This skill should be used when the user wants to customize the floless.app Dashboard — add, change, rearrange, or remove custom panels (stat cards, data tables, report buttons, run buttons) — or when picking up queued 'ui-customize' requests from the floless.app Customize box. Use it when the user says things like "add a panel showing last night's BOM run", "pin a run button to my dashboard", "apply my dashboard change", "customize my floless dashboard", "pick up my floless UI request", after they type into the Dashboard's Customize box, OR when they paste a message beginning with a `[floless-request type=ui-customize id=…]` marker (a request copied from the Dashboard — resolve it via /api/requests, don't run it verbatim). It edits ~/.floless/ui/extensions.json (the declarative UI descriptor), validates with the AWARE ui agent, and the app re-renders live.
|
|
4
4
|
metadata:
|
|
5
|
-
version: 0.1.
|
|
5
|
+
version: 0.1.2
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# floless.app Custom Panels — the dashboard descriptor
|
|
@@ -13,7 +13,7 @@ description; floless.app renders it** with its own design system. You never writ
|
|
|
13
13
|
CSS, or JS — and never need to: every string in the descriptor is escaped at render time,
|
|
14
14
|
so markup would show up as literal text.
|
|
15
15
|
|
|
16
|
-
The file is watched: the moment you write it, the open browser re-renders the Dashboard.
|
|
16
|
+
The file is watched: the moment you write it, the open FloLess window or browser tab re-renders the Dashboard.
|
|
17
17
|
No compile, no approve, no restart.
|
|
18
18
|
|
|
19
19
|
## Picking up a queued request
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: floless-app-workflows
|
|
3
3
|
description: This skill should be used when building, modifying, or reasoning about FloLess .flo workflows for floless.app — especially reusable apps that take inputs (e.g. a phase number) and run across different models from any source (Tekla, Revit, Rhino, SketchUp, an IFC file, the FloLess steel model, a Workspace project), exec nodes that run code against a live host model (e.g. Roslyn C# in Tekla), Blender animations of a building (blender/exec Python rendered headlessly — construction sequence, fly-through, sun study), the in-app HTML Viewer, the Code tab, or "Debug in VS". Covers the exec contract, the install→validate→compile→run loop, app inputs templating, reading approved Workspace project data and immutable approved Revit model snapshots through the floless-workspace REST seam plus its themed pickers, and the server seams (aware-adapter, app-reader, index).
|
|
4
4
|
metadata:
|
|
5
|
-
version: 0.8.
|
|
5
|
+
version: 0.8.9
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# Building reusable .flo workflows in floless.app
|
|
@@ -11,7 +11,7 @@ metadata:
|
|
|
11
11
|
|
|
12
12
|
floless.app is a **thin web UI over the `aware` CLI**. It owns **no engine and no LLM**.
|
|
13
13
|
Every capability is either `aware <verb>` (shelled through one adapter) or reading AWARE
|
|
14
|
-
state off disk. The browser is just the
|
|
14
|
+
state off disk. The FloLess window (or browser tab) is just the display. Never make the UI compose workflows or call
|
|
15
15
|
an LLM — it renders AWARE state, triggers `aware` verbs, and relays user intent.
|
|
16
16
|
|
|
17
17
|
The deliverable floless.app produces is a **reusable FloLess `.flo` app** (which runs on AWARE): one that declares
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
app: college-phase-exporter
|
|
2
|
-
version: 0.3.
|
|
2
|
+
version: 0.3.1
|
|
3
3
|
publisher: floless
|
|
4
4
|
update-mode: source-only
|
|
5
5
|
changelog:
|
|
6
|
+
- version: 0.3.1
|
|
7
|
+
summary: Works with the current Trimble Connect tool.
|
|
8
|
+
changes:
|
|
9
|
+
- Asks for Trimble Connect 0.5, the version a current install has. The upload step works as before.
|
|
10
|
+
- It needs AWARE 0.159.0 or newer. If the footer offers an AWARE update, install it before updating this workflow.
|
|
6
11
|
- version: 0.3.0
|
|
7
12
|
summary: Works with the current Microsoft 365 tool by leaving out the three Microsoft 365 steps it does not offer yet.
|
|
8
13
|
changes:
|
|
@@ -25,7 +30,7 @@ description: |
|
|
|
25
30
|
exposes-as-agent: false
|
|
26
31
|
requires:
|
|
27
32
|
- tekla@0.1.x
|
|
28
|
-
- trimble-connect@0.
|
|
33
|
+
- trimble-connect@0.5.x
|
|
29
34
|
- html-report@0.2.x
|
|
30
35
|
- file@1.0.x
|
|
31
36
|
requires-permissions:
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
app: trimble-list-projects
|
|
2
|
-
version: 0.1.
|
|
2
|
+
version: 0.1.1
|
|
3
|
+
changelog:
|
|
4
|
+
- version: 0.1.1
|
|
5
|
+
summary: Works with the current Trimble Connect tool.
|
|
6
|
+
changes:
|
|
7
|
+
- Asks for Trimble Connect 0.5, the version a current install has. The project list works as before.
|
|
8
|
+
- It needs AWARE 0.159.0 or newer. If the footer offers an AWARE update, install it before updating this workflow.
|
|
3
9
|
display-name: Trimble — list my projects
|
|
4
10
|
description: |
|
|
5
11
|
Lists the Trimble Connect projects you can access (read-only) and renders them
|
|
@@ -9,7 +15,7 @@ description: |
|
|
|
9
15
|
in-app Viewer shows. Foundation demo for Trimble workflow support.
|
|
10
16
|
exposes-as-agent: false
|
|
11
17
|
requires:
|
|
12
|
-
- trimble-connect@0.
|
|
18
|
+
- trimble-connect@0.5.x
|
|
13
19
|
- html-report@0.2.x
|
|
14
20
|
requires-permissions:
|
|
15
21
|
network:
|
|
@@ -25,11 +31,13 @@ nodes:
|
|
|
25
31
|
- id: projects
|
|
26
32
|
agent: trimble-connect
|
|
27
33
|
command: list-projects
|
|
34
|
+
description: Asks Trimble Connect for the projects you can access, up to 100 of them.
|
|
28
35
|
config:
|
|
29
36
|
top: 100
|
|
30
37
|
- id: report
|
|
31
38
|
agent: html-report
|
|
32
39
|
command: render
|
|
40
|
+
description: Turns the project list into a table in an HTML report, most recently changed first.
|
|
33
41
|
config:
|
|
34
42
|
data: '{{ projects.body }}'
|
|
35
43
|
title: My Trimble Connect projects
|
package/dist/web/agent-steps.js
CHANGED
|
@@ -403,7 +403,7 @@
|
|
|
403
403
|
return;
|
|
404
404
|
}
|
|
405
405
|
if (!body || body.code !== 'needs-confirmation') {
|
|
406
|
-
model.context.toast(body
|
|
406
|
+
model.context.toast(personText(body) || failureCopy({ status: response.status, body }, { action: 'save the wait' }).text, 'warn');
|
|
407
407
|
return;
|
|
408
408
|
}
|
|
409
409
|
} catch { model.context.toast('FloLess couldn’t save the wait. Check that FloLess is running and try again.', 'warn'); return; }
|
|
@@ -481,7 +481,7 @@
|
|
|
481
481
|
let body = null;
|
|
482
482
|
try { body = await response.json(); } catch { body = null; }
|
|
483
483
|
if (!response.ok || !body || body.ok !== true) {
|
|
484
|
-
throw Object.assign(new Error(
|
|
484
|
+
throw Object.assign(new Error(personText(body) || 'FloLess could not load the Agent’s step just now. Try again.'), { code: typeof body?.code === 'string' ? body.code : '' });
|
|
485
485
|
}
|
|
486
486
|
return body;
|
|
487
487
|
}
|
package/dist/web/agents.js
CHANGED
|
@@ -136,7 +136,7 @@
|
|
|
136
136
|
if (!body?.error) console.warn(`[agents] ${path} answered ${response.status} with no explanation`);
|
|
137
137
|
// #2868: with no sentence from the server, the shared failure copy names the kind of failure (busy, signed out, an
|
|
138
138
|
// answer that was not FloLess's) instead of "try again, restart FloLess", which fixes none of them.
|
|
139
|
-
const failure = new Error(body
|
|
139
|
+
const failure = new Error(personText(body) || failureCopy({ status: response.status, body: body || { code: 'response-unreadable' } }).text);
|
|
140
140
|
failure.code = body?.code || null; failure.body = body; failure.status = response.status;
|
|
141
141
|
throw failure;
|
|
142
142
|
}
|
|
@@ -285,7 +285,7 @@
|
|
|
285
285
|
// Default scope is where you came from (#1337, 2026-10-02): the project or workflow you last had open.
|
|
286
286
|
const scope = [];
|
|
287
287
|
let lastProject = null;
|
|
288
|
-
try { lastProject = localStorage.getItem('floless:last-project'); } catch { /* private mode */ }
|
|
288
|
+
try { lastProject = window.flolessPrefs ? window.flolessPrefs.get('lastProject') : localStorage.getItem('floless:last-project'); } catch { /* private mode */ }
|
|
289
289
|
const project = lastProject && state.options?.projects.find((p) => p.id === lastProject);
|
|
290
290
|
if (project) scope.push({ kind: 'project', projectId: project.id, projectUuid: project.uuid });
|
|
291
291
|
return { name: '', instructions: '', scope, mode: 'separate', allowChanges: false };
|
|
@@ -359,37 +359,58 @@
|
|
|
359
359
|
if (saveBtn) saveBtn.disabled = false;
|
|
360
360
|
}
|
|
361
361
|
|
|
362
|
+
/** True only when the draft was saved and the person is still on its page, so a caller may go on with it. */
|
|
362
363
|
async function save() {
|
|
363
|
-
|
|
364
|
+
const saved = await saveDraft();
|
|
365
|
+
return saved.ok && saved.here;
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
/**
|
|
369
|
+
* #3148: the answer belongs to the page that sent it: if the person opened another page meanwhile, it is said in a
|
|
370
|
+
* toast by the agent's name and never painted onto that page. `agent` is what the server saved, either way.
|
|
371
|
+
*/
|
|
372
|
+
async function saveDraft() {
|
|
373
|
+
if (state.saving) return { ok: false };
|
|
364
374
|
const draft = state.draft;
|
|
365
375
|
if (!draft.name.trim()) {
|
|
366
376
|
state.banner = { text: 'Give the agent a name before you save it.' };
|
|
367
377
|
paint(); $surface.querySelector('#ag-name')?.focus();
|
|
368
|
-
return false;
|
|
378
|
+
return { ok: false };
|
|
369
379
|
}
|
|
380
|
+
const generation = state.pageGeneration;
|
|
381
|
+
const here = () => state.view === 'page' && state.pageGeneration === generation;
|
|
382
|
+
const created = !state.agent;
|
|
370
383
|
state.saving = true; paint();
|
|
371
384
|
try {
|
|
372
385
|
const body = state.agent
|
|
373
386
|
? await api(`/api/chat/agents/${encodeURIComponent(state.agent.agentId)}`, { method: 'PUT', body: { agent: draft, revision: state.agent.revision } })
|
|
374
387
|
: await api('/api/chat/agents', { method: 'POST', body: draft });
|
|
375
|
-
|
|
388
|
+
if (!here()) {
|
|
389
|
+
toast(created ? `Agent “${body.agent.name}” created.` : `Agent “${body.agent.name}” saved.`, 'ok');
|
|
390
|
+
return { ok: true, here: false, agent: body.agent };
|
|
391
|
+
}
|
|
376
392
|
state.agent = body.agent; state.draft = draftOf(body.agent); state.dirty = false; state.banner = null;
|
|
377
393
|
toast(created ? `Agent “${body.agent.name}” created.` : 'Agent saved.', 'ok');
|
|
378
394
|
if (created) void loadRuns();
|
|
379
|
-
return true;
|
|
395
|
+
return { ok: true, here: true, agent: body.agent };
|
|
380
396
|
} catch (error) {
|
|
381
|
-
if (
|
|
397
|
+
if (!here()) toast(`Couldn’t save “${draft.name.trim()}”. ${error.message}`, 'err');
|
|
398
|
+
else if (error.code === 'agent-revision-stale' && error.body?.agent) {
|
|
382
399
|
const current = error.body.agent;
|
|
383
400
|
state.banner = { text: error.message, action: { label: 'Load the current version', commandId: 'shell.agents-reload', run: () => {
|
|
384
401
|
state.agent = current; state.draft = draftOf(current); state.dirty = false; state.banner = null; paint();
|
|
385
402
|
} } };
|
|
386
403
|
} else state.banner = { text: error.message };
|
|
387
|
-
return false;
|
|
404
|
+
return { ok: false };
|
|
388
405
|
} finally { state.saving = false; paint(); }
|
|
389
406
|
}
|
|
390
407
|
|
|
391
408
|
async function setArchived(archived) {
|
|
392
409
|
if (!state.agent) return;
|
|
410
|
+
const { agentId } = state.agent;
|
|
411
|
+
let { name, revision } = state.agent;
|
|
412
|
+
// #3148: the answer belongs to this agent: if the person opened another one meanwhile, it is not painted onto that page.
|
|
413
|
+
const stillHere = () => state.view === 'page' && state.agent?.agentId === agentId;
|
|
393
414
|
if (archived) {
|
|
394
415
|
// Unsaved edits are the person's to keep or drop, never lost by an Archive that only asked about archiving.
|
|
395
416
|
const dirty = state.dirty;
|
|
@@ -408,14 +429,29 @@
|
|
|
408
429
|
],
|
|
409
430
|
});
|
|
410
431
|
if (choice !== 'archive' && choice !== 'discard' && choice !== 'save') return;
|
|
411
|
-
if (choice === 'save'
|
|
432
|
+
if (choice === 'save') {
|
|
433
|
+
if (!stillHere()) {
|
|
434
|
+
// Another agent's page was opened while this one asked: its unsaved edits are no longer on screen to save.
|
|
435
|
+
toast(`“${name}” wasn’t saved or archived, because another agent was opened before you chose. Open it again to archive it.`, 'warn');
|
|
436
|
+
return;
|
|
437
|
+
}
|
|
438
|
+
const saved = await saveDraft();
|
|
439
|
+
if (!saved.ok) return; // a save that failed says why and keeps the edits
|
|
440
|
+
({ name, revision } = saved.agent);
|
|
441
|
+
}
|
|
412
442
|
}
|
|
413
443
|
try {
|
|
414
|
-
const body = await api(`/api/chat/agents/${encodeURIComponent(
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
444
|
+
const body = await api(`/api/chat/agents/${encodeURIComponent(agentId)}/archive`, { method: 'POST', body: { archived, revision } });
|
|
445
|
+
if (stillHere()) {
|
|
446
|
+
state.agent = body.agent; state.draft = draftOf(body.agent); state.dirty = false; state.banner = null;
|
|
447
|
+
toast(archived ? 'Agent archived.' : 'Agent restored.', 'ok');
|
|
448
|
+
} else toast(archived ? `Agent “${name}” archived.` : `Agent “${name}” restored.`, 'ok');
|
|
449
|
+
} catch (error) {
|
|
450
|
+
if (stillHere()) state.banner = { text: error.message };
|
|
451
|
+
else toast(`Couldn’t ${archived ? 'archive' : 'restore'} “${name}”. ${error.message}`, 'err');
|
|
452
|
+
}
|
|
453
|
+
paint();
|
|
454
|
+
if (!stillHere()) void loadAgents();
|
|
419
455
|
}
|
|
420
456
|
|
|
421
457
|
/**
|