@floless/app 0.160.0 → 0.161.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/dist/floless-server.cjs +111146 -105703
- package/dist/schemas/steel.model.v2.schema.json +23 -0
- package/dist/skills/floless-app-rfi/SKILL.md +18 -5
- package/dist/skills/floless-app-steel-takeoff/SKILL.md +417 -261
- package/dist/templates/steel-model.flo +6 -2
- package/dist/templates/viewer-3d-demo.flo +8 -2
- package/dist/web/app.css +163 -14
- package/dist/web/aware.js +152 -32
- package/dist/web/chat-question-card.js +3 -0
- package/dist/web/chat.css +56 -3
- package/dist/web/chat.js +940 -143
- package/dist/web/commands-drawing-check.js +1 -0
- package/dist/web/commands-filter.js +11 -0
- package/dist/web/commands-shell.js +372 -14
- package/dist/web/commands-steel.js +40 -38
- package/dist/web/drawing-check-editor.js +76 -3
- package/dist/web/index.html +45 -1
- package/dist/web/instructor.js +4 -2
- package/dist/web/pages.js +43 -12
- package/dist/web/project-history.js +349 -0
- package/dist/web/project-reconciliation.js +1 -0
- package/dist/web/project-rfis.js +260 -21
- package/dist/web/startup-admission.js +53 -7
- package/dist/web/steel-3d-core.js +115 -6
- package/dist/web/steel-3d-view.js +61 -5
- package/dist/web/steel-editor.html +439 -118
- package/dist/web/steel-filter.html +139 -0
- package/dist/web/steel-model-v2-commands.js +3 -3
- package/dist/web/steel-model-v2-projection.js +132 -4
- package/dist/web/steel-plan-transform.js +78 -0
- package/dist/web/tool-updates.js +5 -0
- package/dist/web/workspaces.js +1308 -117
- package/launch.mjs +36 -5
- package/package.json +6 -4
package/launch.mjs
CHANGED
|
@@ -629,9 +629,9 @@ export async function cmdRestart() {
|
|
|
629
629
|
}
|
|
630
630
|
|
|
631
631
|
// Read a JSON API endpoint on the local server.
|
|
632
|
-
function apiJson(path, method = 'GET') {
|
|
632
|
+
function apiJson(path, method = 'GET', timeoutMs = 5000) {
|
|
633
633
|
return new Promise((resolve, reject) => {
|
|
634
|
-
const req = http.request(`http://127.0.0.1:${PORT}${path}`, { method, timeout:
|
|
634
|
+
const req = http.request(`http://127.0.0.1:${PORT}${path}`, { method, timeout: timeoutMs }, (res) => {
|
|
635
635
|
let body = '';
|
|
636
636
|
res.on('data', (c) => (body += c));
|
|
637
637
|
res.on('end', () => { try { resolve(JSON.parse(body || '{}')); } catch { resolve({}); } });
|
|
@@ -649,16 +649,47 @@ export async function cmdLogin() {
|
|
|
649
649
|
if (!(await ping())) {
|
|
650
650
|
if (!(await ensureServerUp())) { process.exitCode = 1; return; }
|
|
651
651
|
}
|
|
652
|
-
|
|
653
|
-
|
|
652
|
+
// #2786: the server registers the sign-in with floless.io before it opens the page (up to 15 s), so wait longer.
|
|
653
|
+
const started = await apiJson('/api/license/start', 'POST', 30000).catch(() => ({}));
|
|
654
|
+
if (!started.signInUrl) {
|
|
655
|
+
log(started.code === 'sign-in-could-not-start'
|
|
656
|
+
? started.error // already says to try again in a moment
|
|
657
|
+
: 'FloLess could not confirm that the sign-in started. If no sign-in page opened, run "floless login" again.');
|
|
658
|
+
process.exitCode = 1;
|
|
659
|
+
return;
|
|
660
|
+
}
|
|
661
|
+
log(`opening sign-in in your browser: ${started.signInUrl}`);
|
|
654
662
|
log('waiting for sign-in to complete…');
|
|
655
|
-
|
|
663
|
+
// The server watches the sign-in for its whole window and says how it ended (signIn), so wait as long as it does.
|
|
664
|
+
const deadline = Date.now() + 17 * 60_000;
|
|
665
|
+
let lockedAfterSignIn = 0;
|
|
656
666
|
while (Date.now() < deadline) {
|
|
657
667
|
const s = await apiJson('/api/license/status').catch(() => ({}));
|
|
658
668
|
if (s.state === 'valid' || s.state === 'offline-grace') { log('signed in — subscription active'); return; }
|
|
659
669
|
if (s.state === 'expired') { log(`signed in, but the subscription is expired — subscribe at ${s.signInUrl ?? 'floless.io'}`); return; }
|
|
670
|
+
// signIn names the latest sign-in: this one, or a newer one started elsewhere, which is followed the same way.
|
|
671
|
+
const ended = !s.state ? null : !s.signIn ? 'stopped' : s.signIn.state === 'refused' || s.signIn.state === 'expired' ? s.signIn.state : null;
|
|
672
|
+
if (ended) {
|
|
673
|
+
log({
|
|
674
|
+
refused: 'FloLess did not receive this sign-in from floless.io, so you are still signed out. Run "floless login" to start a new sign-in.',
|
|
675
|
+
expired: 'This sign-in expired before it was finished, so you are still signed out. Run "floless login" to start a new sign-in.',
|
|
676
|
+
stopped: 'FloLess is no longer waiting for this sign-in, so you are still signed out. Run "floless login" to start a new sign-in.',
|
|
677
|
+
}[ended]);
|
|
678
|
+
process.exitCode = 1;
|
|
679
|
+
return;
|
|
680
|
+
}
|
|
681
|
+
// Signed in, but FloLess is still locked: the first licence check after a sign-in can take a moment, so give it a
|
|
682
|
+
// few polls, then say what is known. Only the server's reason may name a cause.
|
|
683
|
+
if (s.signIn?.state === 'done' && (s.reason === 'no-subscription' || ++lockedAfterSignIn >= 3)) {
|
|
684
|
+
log(s.reason === 'no-subscription'
|
|
685
|
+
? `signed in, but this account has no active subscription — subscribe at ${s.signInUrl ?? 'floless.io'}`
|
|
686
|
+
: 'signed in, but FloLess could not confirm a subscription for this account yet — open FloLess to see what it needs');
|
|
687
|
+
process.exitCode = 1;
|
|
688
|
+
return;
|
|
689
|
+
}
|
|
660
690
|
await new Promise((r) => setTimeout(r, 2000));
|
|
661
691
|
}
|
|
692
|
+
process.exitCode = 1;
|
|
662
693
|
log('sign-in timed out — run "floless login" again to retry');
|
|
663
694
|
}
|
|
664
695
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@floless/app",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.161.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": {
|
|
@@ -22,9 +22,9 @@
|
|
|
22
22
|
"app:stop": "node launch.mjs stop",
|
|
23
23
|
"app:restart": "node launch.mjs restart",
|
|
24
24
|
"test": "node build/run-tests.mjs",
|
|
25
|
-
"test:steel-inspector": "
|
|
26
|
-
"test:drawing-identify": "
|
|
27
|
-
"test:drawing-check": "
|
|
25
|
+
"test:steel-inspector": "node build/run-required-tests.mjs steel-filter-inspector.required.ts",
|
|
26
|
+
"test:drawing-identify": "node build/run-required-tests.mjs drawing-identify.required.ts",
|
|
27
|
+
"test:drawing-check": "node build/run-required-tests.mjs drawing-check.required.ts",
|
|
28
28
|
"test:project-import-pdf": "node build/run-required-tests.mjs projects-store.test.ts rfi-import.test.ts",
|
|
29
29
|
"test:platform": "node build/run-tests.mjs --platform-only",
|
|
30
30
|
"test:clock-skew": "node build/run-clock-skew-tests.mjs",
|
|
@@ -44,11 +44,13 @@
|
|
|
44
44
|
"verify:flo-naming": "node build/verify-flo-naming.mjs",
|
|
45
45
|
"verify:forward-merge": "node build/verify-forward-merge.mjs",
|
|
46
46
|
"verify:no-title": "node build/verify-no-title.mjs",
|
|
47
|
+
"verify:web-syntax": "node build/verify-web-syntax.mjs",
|
|
47
48
|
"verify:no-wallclock-asserts": "node build/verify-no-wallclock-asserts.mjs",
|
|
48
49
|
"verify:windows-hide": "node build/verify-windows-hide.mjs",
|
|
49
50
|
"verify:css-vars": "node build/verify-css-vars.mjs",
|
|
50
51
|
"verify:runtime-pins": "node build/verify-runtime-pins.mjs",
|
|
51
52
|
"verify:rvt-registry-pins": "node build/verify-rvt-registry-pins.mjs",
|
|
53
|
+
"verify:builtin-agent-pins": "node build/verify-builtin-agent-pins.mjs",
|
|
52
54
|
"verify:native-steel": "node build/verify-native-steel.mjs",
|
|
53
55
|
"verify:no-native-select": "node build/verify-no-native-select.mjs",
|
|
54
56
|
"verify:scrollbars": "node build/verify-scrollbars.mjs",
|