@floless/app 0.169.0 → 0.171.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (87) hide show
  1. package/dist/floless-server.cjs +65531 -43728
  2. package/dist/schemas/drawing-check.profile.v1.schema.json +12 -2
  3. package/dist/schemas/steel.model.v2.schema.json +196 -4
  4. package/dist/skills/floless-app-bridge/SKILL.md +3 -3
  5. package/dist/skills/floless-app-knowledge/SKILL.md +46 -15
  6. package/dist/skills/floless-app-new-workflow/SKILL.md +8 -1
  7. package/dist/skills/floless-app-onboarding/SKILL.md +5 -4
  8. package/dist/skills/floless-app-onboarding/references/floless-surfaces.md +0 -3
  9. package/dist/skills/floless-app-queue/SKILL.md +2 -3
  10. package/dist/skills/floless-app-report-issue/SKILL.md +2 -2
  11. package/dist/skills/floless-app-routines/SKILL.md +2 -2
  12. package/dist/skills/floless-app-routines/references/routines-api.md +20 -8
  13. package/dist/skills/floless-app-steel-model/SKILL.md +42 -39
  14. package/dist/skills/floless-app-steel-model/references/custom-connections.md +47 -0
  15. package/dist/skills/floless-app-steel-model/references/custom-sections.md +32 -0
  16. package/dist/skills/floless-app-steel-takeoff/SKILL.md +31 -1
  17. package/dist/skills/floless-app-ui/SKILL.md +71 -126
  18. package/dist/skills/floless-app-workflows/SKILL.md +22 -3
  19. package/dist/skills/floless-app-workflows/references/agent-steps.md +40 -6
  20. package/dist/skills/floless-app-workflows/references/exec-contract.md +27 -0
  21. package/dist/skills/floless-app-workflows/references/script-runner.md +105 -0
  22. package/dist/web/add-ons.js +407 -0
  23. package/dist/web/agent-steps.js +89 -18
  24. package/dist/web/agents.js +32 -22
  25. package/dist/web/analytics.js +1 -1
  26. package/dist/web/app.css +331 -190
  27. package/dist/web/app.js +33 -13
  28. package/dist/web/aware.js +926 -218
  29. package/dist/web/chat.css +6 -1
  30. package/dist/web/chat.js +316 -112
  31. package/dist/web/checkpoint-standard.js +5 -3
  32. package/dist/web/commands-drawing-check.js +1 -0
  33. package/dist/web/commands-filter.js +23 -0
  34. package/dist/web/commands-shell.js +479 -78
  35. package/dist/web/commands-steel.js +69 -2
  36. package/dist/web/commands-tekla-parser.js +23 -0
  37. package/dist/web/connections.js +14 -3
  38. package/dist/web/drawing-check-editor.js +352 -88
  39. package/dist/web/failure-copy.js +33 -2
  40. package/dist/web/filter-ai-proposal.js +11 -8
  41. package/dist/web/flo-3d.js +1 -1
  42. package/dist/web/guide.js +36 -29
  43. package/dist/web/index.html +98 -57
  44. package/dist/web/instructor.js +101 -17
  45. package/dist/web/kb-categories.js +64 -7
  46. package/dist/web/left-pane.js +4 -1
  47. package/dist/web/local-discovery.js +8 -7
  48. package/dist/web/missed-routines.js +239 -0
  49. package/dist/web/model-change-findings.js +430 -0
  50. package/dist/web/model-change-review.js +414 -0
  51. package/dist/web/model-editor-steel-adapter.js +2 -2
  52. package/dist/web/model-measure.js +6 -0
  53. package/dist/web/model-spatial-panel.js +19 -4
  54. package/dist/web/model-spatial-tools.js +3 -3
  55. package/dist/web/model-viewport-revit-adapter.js +3 -3
  56. package/dist/web/origin-rule.js +155 -0
  57. package/dist/web/project-access.js +1 -1
  58. package/dist/web/project-history.js +7 -1
  59. package/dist/web/project-modules.js +2 -2
  60. package/dist/web/project-rfis.js +6 -1
  61. package/dist/web/project-workflows.js +2 -2
  62. package/dist/web/revit-editor.css +85 -0
  63. package/dist/web/revit-editor.js +58 -9
  64. package/dist/web/run-history.js +12 -1
  65. package/dist/web/sha256-sync.js +62 -0
  66. package/dist/web/steel-3d-core.js +46 -9
  67. package/dist/web/steel-3d-flo.js +153 -7
  68. package/dist/web/steel-3d-view.js +33 -5
  69. package/dist/web/steel-ai-marks.js +3 -1
  70. package/dist/web/steel-custom-connection.js +161 -0
  71. package/dist/web/steel-custom-sections.js +1796 -0
  72. package/dist/web/steel-editor.html +732 -161
  73. package/dist/web/steel-environments.js +297 -0
  74. package/dist/web/steel-filter-usage.js +299 -0
  75. package/dist/web/steel-filter.html +104 -6
  76. package/dist/web/steel-model-v2-client-validation.js +11 -1
  77. package/dist/web/steel-model-v2-commands.js +116 -13
  78. package/dist/web/steel-model-v2-projection.js +1 -1
  79. package/dist/web/steel-read-confidence.js +1 -56
  80. package/dist/web/step-rename.js +3 -2
  81. package/dist/web/tekla-editor.html +1 -0
  82. package/dist/web/terminal-requests.js +1 -1
  83. package/dist/web/tool-updates.js +7 -6
  84. package/dist/web/workspaces.js +1968 -138
  85. package/launch.mjs +87 -9
  86. package/package.json +4 -1
  87. package/dist/web/panels.js +0 -831
package/launch.mjs CHANGED
@@ -402,7 +402,12 @@ export async function startAndOpen({
402
402
  export async function cmdOpen({ marker = consumePostUpdateMarker, healthy = ping, ensure = ensureServerUp,
403
403
  startOpen = (deps) => startAndOpen(deps), say = log, open = openBrowser, client = undefined, shell = null,
404
404
  restore = restoreWindows, updating = updateInProgress, peekMarker = peekPostUpdateMarker,
405
- shellInstalled = () => shellInfo().installed, preferred = resolveClientForOpen } = {}) {
405
+ shellInstalled = () => shellInfo().installed, preferred = resolveClientForOpen,
406
+ // #3379: the post-update relaunch's own pieces. `claimWindows` takes the windows the update closed; `windowFor` is the
407
+ // FloLess window that shows them; `supervisor` brings back the watchdog the update stopped; `slowWait` is the headless
408
+ // wait for a tab-only person.
409
+ claimWindows = claimRestore, windowFor = (windows) => windowClient({ say, windows }), supervisor = ensureSupervisor,
410
+ slowWait = postUpdateWait } = {}) {
406
411
  // The window (desktop shell) is a second client beside the browser tab, never a replacement for it: when it is not
407
412
  // installed, or shows nothing, the tab opens instead and the log says why. `client` is 'window' for
408
413
  // `FlolessApp.exe window` / floless://window (whatever is stored); a plain `open` follows the person's stored choice
@@ -447,14 +452,54 @@ export async function cmdOpen({ marker = consumePostUpdateMarker, healthy = ping
447
452
  }
448
453
  }
449
454
  if (postUpdate) {
450
- if (!serving && !(await ensure())) { process.exitCode = 1; return; }
451
- // The update is over: lift the admission hold, or every `window` launch would wait out its 10-minute expiry.
452
- endUpdate();
453
- // The update closed the FloLess window first (so its leave guard could run); reopen what was open. Tab-only
454
- // people have no list, so nothing changes for them: their tab reloads itself onto the new build.
455
- if (await restore({ say })) { say('post-update relaunch — server up; reopened the FloLess window'); return; }
456
- say('post-update relaunch — server up; the existing tab reconnects via its health poll (no new tab)');
457
- return;
455
+ // How the start ended (startAndOpen's answer, or 'ready'/'not-ready' for the headless wait): it decides below whether
456
+ // the supervisor may come back while the server is not answering.
457
+ let outcome = serving ? 'ready' : null;
458
+ let renew = null;
459
+ try {
460
+ if (serving) {
461
+ endUpdate();
462
+ // The update closed the FloLess window first (so its leave guard could run); reopen what was open. Tab-only
463
+ // people have no list, so nothing changes for them: their tab reloads itself onto the new build.
464
+ if (await restore({ say })) { say('post-update relaunch — server up; reopened the FloLess window'); return; }
465
+ say('post-update relaunch — server up; the existing tab reconnects via its health poll (no new tab)');
466
+ return;
467
+ }
468
+ // #3379: the new build's server is still starting. The update hold stays on until that start is over: there is no
469
+ // server-side single-instance lock, so a launch admitted now (a click on the FloLess icon during a slow first start)
470
+ // would see nothing listening yet and start a second server on the same home. Held launches join the restore list
471
+ // and are opened below once the server answers. The hold is renewed while the start lasts (its 10-minute expiry is
472
+ // shorter than the 15-minute wait), so a crashed launcher still lets it lapse within 10 minutes.
473
+ try {
474
+ beginUpdate();
475
+ renew = setInterval(() => { try { beginUpdate(); } catch { /* the next renewal tries again; the expiry is the backstop */ } }, UPDATE_HOLD_RENEW_MS);
476
+ renew.unref?.();
477
+ } catch (error) {
478
+ say(`could not keep the update hold while the server starts (${error?.code ?? error?.message ?? error}); a FloLess launch meanwhile is not held`);
479
+ }
480
+ // The window the update closed comes back NOW, on its starting screen, and turns into the app once the server
481
+ // answers, however long that takes: a slow first start must never look as if FloLess vanished. This is the ordinary
482
+ // slow-start path, so it also falls back to the browser's starting page when no window can be shown, and says
483
+ // plainly if the server stops.
484
+ const windows = claimWindows();
485
+ if (windows.length) {
486
+ say('post-update relaunch — reopening the FloLess window on its starting screen while the server starts');
487
+ outcome = await startOpen(shellInstalled() ? { shell: windowFor(windows) } : {});
488
+ return;
489
+ }
490
+ // Tab-only (or nothing was open): the existing tab shows that FloLess is starting and reconnects by its own health
491
+ // poll. Start the server headless and wait as long as a slow start may take, so the supervisor below comes back too.
492
+ // The wait's own answer is kept: a server that stopped gets its supervisor back below, one still starting does not.
493
+ let waited = null;
494
+ outcome = (await ensure({ wait: async (attempt) => (waited = await slowWait(attempt)) })) ? 'ready' : (waited ?? 'not-ready');
495
+ if (outcome !== 'ready') { process.exitCode = 1; return; }
496
+ say('post-update relaunch — server up; the existing tab reconnects via its health poll (no new tab)');
497
+ return;
498
+ } finally {
499
+ if (renew) clearInterval(renew);
500
+ if (!serving) endUpdate(); // the start is over, answered or not: the next launch goes through normally
501
+ await finishPostUpdate({ startedHere: !serving, outcome, healthy, supervisor, restore, say });
502
+ }
458
503
  }
459
504
  if (!serving) { await startOpen(win ? { shell: win } : {}); return; }
460
505
  if (win && (await win.show('ready')) === 'shown') { log('opened the FloLess window'); return; }
@@ -493,6 +538,39 @@ export function windowClient({ say = log, launch = launchShell, windows = ['/']
493
538
  };
494
539
  }
495
540
 
541
+ /** The post-update headless wait (#3379): as long as a slow first start may take, never the bounded 36 s of a plain start. */
542
+ export function postUpdateWait(attempt, options = {}) { return waitForServerAttempt(attempt, { ...options, timeoutMs: GIVE_UP_MS }); }
543
+
544
+ /** How often the post-update relaunch renews the update hold while the new server starts (#3379). */
545
+ export const UPDATE_HOLD_RENEW_MS = 60_000;
546
+
547
+ /**
548
+ * The end of a post-update relaunch (#3379). The update stopped the supervisor so it could not re-lock the install folder;
549
+ * bring it back, or nothing keeps the server alive (or reopens a stranded window) until the next sign-in. It comes back
550
+ * once the server answers, or when the server stopped (nothing is starting, so it cannot start a second one, and it is
551
+ * what restarts the server). While the server may still be starting it stays off, and the log says so: it would see
552
+ * nothing listening and start a second server. Launches held during the start are opened once the server answers.
553
+ * Each step runs on its own, so one failing never skips the other.
554
+ */
555
+ export async function finishPostUpdate({ startedHere, outcome, healthy, supervisor, restore, say }) {
556
+ let up = false;
557
+ try { up = await healthy(); } catch { up = false; }
558
+ if (up || outcome === 'stopped') {
559
+ try { supervisor({ say }); } catch (error) { say(`could not start the FloLess supervisor (${error?.message ?? error})`); }
560
+ } else {
561
+ say('post-update relaunch — the server is not answering yet, so the supervisor was not restarted; it comes back with '
562
+ + 'the next FloLess launch or sign-in');
563
+ }
564
+ if (!startedHere) return;
565
+ if (!up) {
566
+ say('post-update relaunch — anything asked for while FloLess was starting stays in the restore list for the supervisor');
567
+ return;
568
+ }
569
+ try {
570
+ if (await restore({ say })) say('post-update relaunch — opened what was asked for while FloLess was starting');
571
+ } catch (error) { say(`could not open what was asked for while FloLess was starting (${error?.message ?? error})`); }
572
+ }
573
+
496
574
  /** `FlolessApp.exe window` / floless://window: open the FloLess window whatever the stored preference says. */
497
575
  export async function cmdWindow(deps = {}) { return cmdOpen({ ...deps, client: 'window' }); }
498
576
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@floless/app",
3
- "version": "0.169.0",
3
+ "version": "0.171.0",
4
4
  "type": "module",
5
5
  "description": "Thin localhost host for floless.app — serves web/ and shells the aware CLI. No engine, no LLM.",
6
6
  "bin": {
@@ -41,9 +41,12 @@
41
41
  "verify:flo": "node build/verify-flo-descriptions.mjs",
42
42
  "verify:aisc": "node build/verify-aisc-table.mjs",
43
43
  "verify:uk-catalog": "node build/verify-uk-catalog-weights.mjs",
44
+ "verify:eu-catalog": "node build/verify-eu-catalog-weights.mjs",
44
45
  "verify:flo-naming": "node build/verify-flo-naming.mjs",
45
46
  "verify:forward-merge": "node build/verify-forward-merge.mjs",
46
47
  "verify:no-title": "node build/verify-no-title.mjs",
48
+ "verify:no-environment-id-compare": "node build/verify-no-environment-id-compare.mjs",
49
+ "verify:module-template-compare": "node build/verify-module-template-compare.mjs",
47
50
  "verify:electron-support": "node build/verify-electron-support.mjs",
48
51
  "verify:web-syntax": "node build/verify-web-syntax.mjs",
49
52
  "verify:no-wallclock-asserts": "node build/verify-no-wallclock-asserts.mjs",