@floless/app 0.168.0 → 0.170.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/cli-actions.mjs +8 -1
- package/dist/floless-server.cjs +125533 -99597
- package/dist/schemas/drawing-check.profile.v1.schema.json +12 -2
- package/dist/schemas/steel.model.v2.schema.json +2 -1
- package/dist/skills/floless-app-knowledge/SKILL.md +43 -13
- package/dist/skills/floless-app-new-workflow/SKILL.md +8 -1
- package/dist/skills/floless-app-rfi/SKILL.md +4 -2
- package/dist/skills/floless-app-routines/SKILL.md +2 -2
- package/dist/skills/floless-app-routines/references/routines-api.md +20 -8
- package/dist/skills/floless-app-steel-model/SKILL.md +8 -5
- package/dist/skills/floless-app-steel-takeoff/SKILL.md +31 -1
- package/dist/skills/floless-app-workflows/SKILL.md +22 -3
- package/dist/skills/floless-app-workflows/references/agent-steps.md +40 -6
- package/dist/skills/floless-app-workflows/references/exec-contract.md +27 -0
- package/dist/skills/floless-app-workflows/references/script-runner.md +105 -0
- package/dist/templates/college-phase-exporter.flo +7 -2
- package/dist/templates/trimble-list-projects.flo +10 -2
- package/dist/web/agent-steps.js +90 -19
- package/dist/web/agents.js +77 -31
- package/dist/web/app.css +267 -4
- package/dist/web/app.js +71 -7
- package/dist/web/aware-update-client.js +4 -4
- package/dist/web/aware.js +1277 -219
- package/dist/web/chat.css +10 -0
- package/dist/web/chat.js +407 -117
- package/dist/web/checkpoint-standard.js +5 -3
- package/dist/web/commands-drawing-check.js +4 -0
- package/dist/web/commands-shell.js +551 -15
- package/dist/web/commands-steel.js +68 -2
- package/dist/web/commands-vector.js +69 -0
- package/dist/web/drawing-check-editor.html +10 -0
- package/dist/web/drawing-check-editor.js +821 -237
- package/dist/web/failure-copy.js +50 -2
- package/dist/web/filter-ai-proposal.js +11 -8
- package/dist/web/flo-3d.js +310 -0
- package/dist/web/flo-card.js +72 -0
- package/dist/web/guide.js +33 -24
- package/dist/web/index.html +95 -5
- package/dist/web/instructor.js +102 -15
- package/dist/web/left-pane.js +4 -1
- package/dist/web/local-discovery.js +8 -7
- package/dist/web/missed-routines.js +239 -0
- package/dist/web/model-editor-steel-adapter.js +41 -1
- package/dist/web/model-measure.js +6 -0
- package/dist/web/model-spatial-panel.js +19 -4
- package/dist/web/model-spatial-tools.js +3 -3
- package/dist/web/model-viewport-revit-adapter.js +3 -3
- package/dist/web/model-viewport-toolbar.js +11 -0
- package/dist/web/origin-rule.js +155 -0
- package/dist/web/pages.js +17 -14
- package/dist/web/panels.js +1 -1
- package/dist/web/project-access.js +1 -1
- package/dist/web/project-history.js +2 -2
- package/dist/web/project-modules.js +5 -5
- package/dist/web/project-reconciliation.js +1 -1
- package/dist/web/project-rfis.js +8 -3
- package/dist/web/project-workflows.js +8 -6
- package/dist/web/renderers.js +6 -0
- package/dist/web/report-csp.js +68 -0
- package/dist/web/revit-editor.js +22 -8
- package/dist/web/run-history.js +14 -4
- package/dist/web/steel-3d-core.js +39 -9
- package/dist/web/steel-3d-flo.js +331 -0
- package/dist/web/steel-3d-view.js +164 -0
- package/dist/web/steel-ai-marks.js +3 -1
- package/dist/web/steel-editor.html +583 -129
- package/dist/web/steel-environments.js +297 -0
- package/dist/web/steel-filter.html +3 -2
- package/dist/web/steel-model-v2-client-validation.js +8 -1
- package/dist/web/steel-model-v2-commands.js +23 -9
- package/dist/web/steel-model-v2-projection.js +1 -1
- package/dist/web/step-rename.js +3 -2
- package/dist/web/terminal-requests.js +79 -1
- package/dist/web/tool-updates.js +9 -7
- package/dist/web/vector-3d.html +1 -1
- package/dist/web/vector-editor.html +50 -8
- package/dist/web/workspace-root-management.js +1 -1
- package/dist/web/workspaces.js +2334 -253
- package/launch.mjs +5 -0
- package/package.json +11 -8
package/dist/web/vector-3d.html
CHANGED
|
@@ -253,7 +253,7 @@ function boot(v3d) {
|
|
|
253
253
|
// Reconstructing only reads the stored drawing, so the shared sentence may offer a retry.
|
|
254
254
|
function sceneFailureText(e) {
|
|
255
255
|
const action = 'reconstruct the drawing in 3D';
|
|
256
|
-
const said = e && e.body
|
|
256
|
+
const said = personText(e && e.body);
|
|
257
257
|
if (said) return 'Couldn’t ' + action + '. ' + (/[.!?]$/.test(said) ? said : said + '.');
|
|
258
258
|
return failureCopy(e, { action: action, retrySafe: true }).text;
|
|
259
259
|
}
|
|
@@ -180,6 +180,7 @@
|
|
|
180
180
|
/* Save conflict — the drawing moved under us. NOT .err: the user's document is fine, so it takes the
|
|
181
181
|
existing cyan "non-default, click to act" chip rather than the red failure colour. */
|
|
182
182
|
#saveStat.conflict{color:var(--cyan);border:1px solid var(--cyan);background:var(--cyan-soft);border-radius:4px;padding:1px 6px;cursor:pointer}
|
|
183
|
+
#saveStat.conflict:focus-visible{outline:2px solid var(--cyan);outline-offset:2px}
|
|
183
184
|
/* Weak-trace review list (inner scroll box — inherits the themed scrollbar rules above). */
|
|
184
185
|
#weakList{max-height:280px;overflow:auto;display:flex;flex-direction:column;gap:2px;margin-top:4px}
|
|
185
186
|
.wrow{display:flex;align-items:center;gap:6px;padding:4px 6px;border-radius:6px;font-size:12px}
|
|
@@ -257,9 +258,10 @@
|
|
|
257
258
|
<script src="commands-vector.js"></script>
|
|
258
259
|
<script src="instructor-reporter.js"></script>
|
|
259
260
|
<script>window.InstructorReporter.mount({ surface: 'vector-editor' });</script>
|
|
260
|
-
<!-- An Esc this page leaves unused closes the shell's editor overlay (#1571).
|
|
261
|
+
<!-- An Esc this page leaves unused closes the shell's editor overlay (#1571). While the save-conflict bar or its
|
|
262
|
+
overwrite question is up, Esc is theirs (#3143): it closes the question, then the bar, never the editor. -->
|
|
261
263
|
<script src="overlay-escape.js"></script>
|
|
262
|
-
<script>window.OverlayEscape.mount();</script>
|
|
264
|
+
<script>window.OverlayEscape.mount({ idle: function () { return !document.getElementById('conflictConfirm') && !document.getElementById('conflictBanner'); } });</script>
|
|
263
265
|
<script>
|
|
264
266
|
(function () {
|
|
265
267
|
'use strict';
|
|
@@ -457,13 +459,19 @@
|
|
|
457
459
|
function setSaved(state) {
|
|
458
460
|
if (!editable) return;
|
|
459
461
|
const el = $('saveStat'); el.hidden = false; el.classList.remove('dirty', 'err', 'conflict');
|
|
460
|
-
el.removeAttribute('data-tip'); el.onclick = null;
|
|
462
|
+
el.removeAttribute('data-tip'); el.onclick = null; el.onkeydown = null;
|
|
463
|
+
for (const a of ['data-command-id', 'role', 'tabindex', 'aria-label']) el.removeAttribute(a);
|
|
461
464
|
if (state === 'dirty') { el.classList.add('dirty'); el.textContent = 'Saving…'; }
|
|
462
465
|
else if (state === 'err') { el.classList.add('err'); el.textContent = 'Save failed'; }
|
|
463
466
|
else if (state === 'conflict') {
|
|
464
467
|
el.classList.add('conflict'); el.textContent = 'Save conflict';
|
|
465
468
|
el.dataset.tip = 'Someone else saved changes to this drawing since you opened it. Your edits are still here — click to choose what to do.';
|
|
466
469
|
el.onclick = () => showConflictBanner(); // the chip never acts on its own; it re-opens the banner
|
|
470
|
+
// A control only while it is this — and a keyboard one: Esc hides the bar, and this is the way back to it.
|
|
471
|
+
el.setAttribute('data-command-id', 'vector.save-conflict');
|
|
472
|
+
el.setAttribute('role', 'button'); el.tabIndex = 0;
|
|
473
|
+
el.setAttribute('aria-label', 'Save conflict: show what you can do');
|
|
474
|
+
el.onkeydown = (e) => { if (e.key === 'Enter' || e.key === ' ') { e.preventDefault(); showConflictBanner(); } };
|
|
467
475
|
}
|
|
468
476
|
else el.textContent = 'Saved';
|
|
469
477
|
}
|
|
@@ -545,11 +553,15 @@
|
|
|
545
553
|
b.textContent = text; return b;
|
|
546
554
|
};
|
|
547
555
|
const reload = mk('↻ Reload', true); reload.onclick = () => location.reload();
|
|
556
|
+
reload.setAttribute('data-command-id', 'vector.conflict-reload');
|
|
548
557
|
const dismiss = mk('✕', false); dismiss.onclick = () => bar.remove();
|
|
558
|
+
dismiss.setAttribute('data-command-id', 'vector.conflict-dismiss');
|
|
559
|
+
dismiss.setAttribute('aria-label', 'Hide this message');
|
|
549
560
|
if (allowOverwrite === false) {
|
|
550
561
|
bar.append(msg, reload, dismiss);
|
|
551
562
|
} else {
|
|
552
563
|
const over = mk('Save mine anyway', false);
|
|
564
|
+
over.setAttribute('data-command-id', 'vector.conflict-save-mine');
|
|
553
565
|
over.dataset.tip = 'Replace the version someone else saved with what you have here';
|
|
554
566
|
over.onclick = () => confirmOverwrite();
|
|
555
567
|
bar.append(msg, reload, over, dismiss);
|
|
@@ -565,29 +577,59 @@
|
|
|
565
577
|
* clobber it with one stray click.
|
|
566
578
|
*/
|
|
567
579
|
function confirmOverwrite() {
|
|
580
|
+
if ($('conflictConfirm')) return;
|
|
581
|
+
const opener = document.activeElement;
|
|
568
582
|
const back = document.createElement('div');
|
|
583
|
+
back.id = 'conflictConfirm';
|
|
584
|
+
back.setAttribute('role', 'dialog'); back.setAttribute('aria-modal', 'true'); back.setAttribute('aria-labelledby', 'vcfTitle'); back.setAttribute('aria-describedby', 'vcfBody');
|
|
569
585
|
back.style.cssText = 'position:fixed;inset:0;z-index:60;display:flex;align-items:center;justify-content:center';
|
|
570
586
|
const shade = document.createElement('div');
|
|
571
587
|
shade.style.cssText = 'position:absolute;inset:0;background:rgba(2,8,23,.62)';
|
|
572
588
|
const panel = document.createElement('div');
|
|
573
589
|
panel.style.cssText = 'position:relative;background:var(--panel,#0f172a);border:1px solid var(--line,#1e293b);'
|
|
574
590
|
+ 'border-radius:10px;width:min(520px,92vw);box-shadow:0 20px 60px rgba(0,0,0,.6)';
|
|
575
|
-
panel.innerHTML = '<div style="padding:14px 16px;border-bottom:1px solid var(--line,#1e293b);font-weight:600">Overwrite the other changes?</div>'
|
|
576
|
-
+ '<div style="padding:14px 16px;line-height:1.5">Someone else saved a version of this drawing after you opened yours. '
|
|
591
|
+
panel.innerHTML = '<div id=vcfTitle style="padding:14px 16px;border-bottom:1px solid var(--line,#1e293b);font-weight:600">Overwrite the other changes?</div>'
|
|
592
|
+
+ '<div id=vcfBody style="padding:14px 16px;line-height:1.5">Someone else saved a version of this drawing after you opened yours. '
|
|
577
593
|
+ 'Saving now replaces their version with what you see here — their changes will be gone for good.</div>'
|
|
578
594
|
+ '<div style="padding:12px 16px;display:flex;gap:8px;justify-content:flex-end;border-top:1px solid var(--line,#1e293b)">'
|
|
579
|
-
+ '<button id=vcfCancel>Cancel</button>'
|
|
580
|
-
+ '<button id=vcfGo style="background:#7f1d1d;border-color:#991b1b;color:#fecaca">Overwrite and save</button></div>';
|
|
595
|
+
+ '<button data-command-id="vector.overwrite-cancel" id=vcfCancel>Cancel</button>'
|
|
596
|
+
+ '<button data-command-id="vector.overwrite-save" id=vcfGo style="background:#7f1d1d;border-color:#991b1b;color:#fecaca">Overwrite and save</button></div>';
|
|
581
597
|
back.append(shade, panel);
|
|
582
598
|
document.body.appendChild(back);
|
|
583
|
-
|
|
599
|
+
// Back to the control that asked, so a keyboard user lands where they were — not on the page itself.
|
|
600
|
+
const close = () => { back.remove(); if (opener && opener.isConnected && typeof opener.focus === 'function') opener.focus(); };
|
|
601
|
+
back.__close = close;
|
|
584
602
|
shade.onclick = close;
|
|
585
603
|
panel.querySelector('#vcfCancel').onclick = close;
|
|
586
604
|
panel.querySelector('#vcfGo').onclick = async () => {
|
|
587
605
|
close(); conflicted = false; await doPut(true);
|
|
588
606
|
const bar = document.getElementById('conflictBanner'); if (bar) bar.remove();
|
|
589
607
|
};
|
|
608
|
+
// Tab stays on the question's two buttons: behind it is an editor whose edits are not saved.
|
|
609
|
+
back.addEventListener('keydown', (e) => {
|
|
610
|
+
if (e.key !== 'Tab') return;
|
|
611
|
+
const btns = [panel.querySelector('#vcfCancel'), panel.querySelector('#vcfGo')];
|
|
612
|
+
const at = btns.indexOf(document.activeElement);
|
|
613
|
+
e.preventDefault();
|
|
614
|
+
btns[(at + (e.shiftKey ? btns.length - 1 : 1)) % btns.length].focus();
|
|
615
|
+
});
|
|
616
|
+
panel.querySelector('#vcfCancel').focus(); // the safe answer is the one Enter presses
|
|
590
617
|
}
|
|
618
|
+
// Esc closes the topmost of the two (#3143): the overwrite question first, then the bar. Either way the press is
|
|
619
|
+
// marked used (preventDefault, the forwarder's contract), so it never also closes the shell's editor overlay over
|
|
620
|
+
// edits that are not saved. With both gone, the next Esc goes up — and Close asks about the conflict.
|
|
621
|
+
window.addEventListener('keydown', (e) => {
|
|
622
|
+
if (e.key !== 'Escape' || e.defaultPrevented) return;
|
|
623
|
+
const ask = $('conflictConfirm'); const bar = $('conflictBanner');
|
|
624
|
+
if (!ask && !bar) return;
|
|
625
|
+
e.preventDefault();
|
|
626
|
+
if (ask) { ask.__close(); return; }
|
|
627
|
+
const hadFocus = bar.contains(document.activeElement);
|
|
628
|
+
bar.remove();
|
|
629
|
+
// Focus would fall to the page; the chip that brings the bar back is the nearer place to land.
|
|
630
|
+
const chip = $('saveStat');
|
|
631
|
+
if (hadFocus && chip && chip.getAttribute('role') === 'button') chip.focus();
|
|
632
|
+
});
|
|
591
633
|
let pendingWrites = 0; // queued or in-flight PUTs — contractSaveState() reads 'saving' until they settle
|
|
592
634
|
function persistServer() {
|
|
593
635
|
if (!editable || !C) return Promise.resolve(true);
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
const response = await fetch(path, { credentials: 'same-origin', headers: { 'content-type': 'application/json' },
|
|
53
53
|
...(body === undefined ? {} : { method: 'POST', body: JSON.stringify(body) }) });
|
|
54
54
|
const result = await response.json();
|
|
55
|
-
if (!response.ok || result.ok === false) throw new Error(result
|
|
55
|
+
if (!response.ok || result.ok === false) throw new Error(personText(result) || 'FloLess could not review this directory. Try again.');
|
|
56
56
|
return result;
|
|
57
57
|
}
|
|
58
58
|
function button(action, text, command, attrs = '', row = null) {
|