@floless/app 0.158.0 → 0.160.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 +140655 -117708
- package/dist/schemas/drawing-check.profile.v1.schema.json +33 -1
- package/dist/schemas/steel.model.v2.schema.json +1 -0
- package/dist/skills/floless-app-actions/SKILL.md +23 -5
- package/dist/skills/floless-app-bridge/SKILL.md +5 -3
- package/dist/skills/floless-app-onboarding/SKILL.md +69 -5
- package/dist/skills/floless-app-onboarding/references/floless-surfaces.md +8 -6
- package/dist/skills/floless-app-queue/SKILL.md +3 -1
- package/dist/skills/floless-app-rfi/SKILL.md +29 -1
- package/dist/skills/floless-app-steel-model/SKILL.md +11 -5
- package/dist/skills/floless-app-steel-takeoff/SKILL.md +28 -8
- package/dist/skills/floless-app-workflows/SKILL.md +6 -3
- package/dist/web/agents.js +12 -5
- package/dist/web/app.css +266 -159
- package/dist/web/app.js +23 -51
- package/dist/web/aware.js +533 -546
- package/dist/web/chat-question-card.js +24 -1
- package/dist/web/chat.css +170 -48
- package/dist/web/chat.js +1406 -208
- package/dist/web/commands-shell.js +1104 -177
- package/dist/web/commands-steel.js +2 -0
- package/dist/web/drawing-check-editor.html +10 -0
- package/dist/web/drawing-check-editor.js +44 -0
- package/dist/web/guide.js +12 -2
- package/dist/web/index.html +62 -48
- package/dist/web/instructor.js +33 -12
- package/dist/web/pages.js +186 -31
- package/dist/web/panels.js +19 -1
- package/dist/web/project-access.js +67 -8
- package/dist/web/project-modules.js +474 -0
- package/dist/web/project-rfis.js +715 -0
- package/dist/web/project-workflows.js +506 -0
- package/dist/web/run-history.js +198 -0
- package/dist/web/run-page-view.js +12 -2
- package/dist/web/steel-3d-core.js +75 -1
- package/dist/web/steel-3d-view.js +8 -38
- package/dist/web/steel-editor.html +263 -59
- package/dist/web/steel-model-v2-projection.js +7 -0
- package/dist/web/workspace-root-recovery.js +119 -0
- package/dist/web/workspaces.js +493 -161
- package/launch-starting-page.mjs +5 -2
- package/launch.mjs +136 -78
- package/package.json +6 -1
|
@@ -255,6 +255,13 @@ export function projectMember(member, plan, session = null) {
|
|
|
255
255
|
`patchMembers` path re-projects a row without asking presence at all, so a flag that came from the caller
|
|
256
256
|
would be lost on the first drag. Set only when true, so every other row keeps exactly the shape it had. */
|
|
257
257
|
if (member.role === 'column') {
|
|
258
|
+
// NO `reach` ARGUMENT ON PURPOSE, and it must stay that way or be fixed properly. `below` and
|
|
259
|
+
// `far-below` both set the same flag here, so which side of the reach a column falls on cannot
|
|
260
|
+
// change this outcome — the default is not load-bearing. The moment anyone distinguishes the two,
|
|
261
|
+
// this call starts silently using the imperial 304.8 and ignoring BOTH the project's stored reach
|
|
262
|
+
// and its metric default, which is the split-brain `memberPresence` avoids by passing
|
|
263
|
+
// `columnBelowReachOf(model)`. Threading the model in here needs a signature change this change
|
|
264
|
+
// did not warrant: #2670.
|
|
258
265
|
const relation = columnCutRelation(member.from?.z, member.to?.z, plan.elevation_mm);
|
|
259
266
|
if (relation === 'below' || relation === 'far-below') projected.belowCut = true;
|
|
260
267
|
}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
/* The chooser points to chat's existing recovery controls; it never ends a reply or switches a folder. */
|
|
2
|
+
(() => {
|
|
3
|
+
const modal = document.getElementById('workspace-root-modal');
|
|
4
|
+
if (!modal) return;
|
|
5
|
+
const section = document.createElement('section');
|
|
6
|
+
section.className = 'workspace-root-management workspace-root-recovery';
|
|
7
|
+
section.setAttribute('aria-label', 'Replies to check before switching folders');
|
|
8
|
+
modal.querySelector('#workspace-root-status').after(section);
|
|
9
|
+
let data = null, problem = '', reading = false, sequence = 0, navigation = 0;
|
|
10
|
+
let shown = modal.classList.contains('show');
|
|
11
|
+
const root = () => window.flolessWorkspaceRoot?.current()?.root;
|
|
12
|
+
const sameRoot = (a, b) => !!a && !!b && a.rootId === b.rootId && a.generation === b.generation;
|
|
13
|
+
const esc = value => String(value ?? '').replace(/[&<>"']/g, c => ({ '&': '&', '<': '<', '>': '>', '"': '"', "'": ''' }[c]));
|
|
14
|
+
function availability() {
|
|
15
|
+
const reload = section.querySelector('[data-recovery-reload]');
|
|
16
|
+
if (reload) {
|
|
17
|
+
reload.setAttribute('aria-disabled', String(reading));
|
|
18
|
+
if (reading) {
|
|
19
|
+
reload.setAttribute('aria-busy', 'true');
|
|
20
|
+
reload.setAttribute('data-blocked-reason', 'FloLess is reading the recorded replies.');
|
|
21
|
+
} else { reload.removeAttribute('aria-busy'); reload.removeAttribute('data-blocked-reason'); }
|
|
22
|
+
}
|
|
23
|
+
const busy = reading || window.flolessWorkspaceRoot?.isBusy?.();
|
|
24
|
+
for (const button of section.querySelectorAll('[data-recovery-open]')) {
|
|
25
|
+
button.setAttribute('aria-disabled', String(!!busy));
|
|
26
|
+
if (busy) {
|
|
27
|
+
button.setAttribute('aria-busy', 'true');
|
|
28
|
+
button.setAttribute('data-blocked-reason', reading ? 'FloLess is reading the recorded replies.' : 'A folder choice or review is in progress. Let it finish before opening a conversation.');
|
|
29
|
+
} else { button.removeAttribute('aria-busy'); button.removeAttribute('data-blocked-reason'); }
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
function render() {
|
|
33
|
+
const focused = section.contains(document.activeElement);
|
|
34
|
+
const key = focused ? document.activeElement?.getAttribute('data-recovery-chat') : null;
|
|
35
|
+
section.setAttribute('aria-busy', String(reading));
|
|
36
|
+
let html = '<h3 tabindex="-1">Replies to check before switching folders</h3>';
|
|
37
|
+
html += '<p class="workspace-root-management-note">Open a conversation to check its reply and use its recovery controls. Afterwards, reopen this chooser and choose the folder again.</p>';
|
|
38
|
+
html += reading ? '<p class="workspace-root-management-message" role="status">Reading recorded replies…</p>' : '';
|
|
39
|
+
if (problem) html += `<p class="workspace-root-error" role="alert">${esc(problem)}</p>`;
|
|
40
|
+
if (data) {
|
|
41
|
+
if (data.startupWarning) html += '<p class="workspace-root-management-note">FloLess did not finish checking replies from before it restarted. These are the records it can read now; open a conversation to check it.</p>';
|
|
42
|
+
if (data.unreadableCount || data.ownershipUnavailable) html += '<p class="workspace-root-management-note">Some recorded replies could not be read. Reconnect or restore this directory if it is unavailable, then reload this list. Other replies are listed below.</p>';
|
|
43
|
+
if (data.protectedCount) html += '<p class="workspace-root-management-note">A recorded reply belongs to another account’s Guide. Sign in as the account that started that Guide to recover its reply.</p>';
|
|
44
|
+
if (data.replies.length) {
|
|
45
|
+
html += '<div class="workspace-root-management-list">';
|
|
46
|
+
data.replies.forEach((reply, index) => {
|
|
47
|
+
const owner = reply.owner.kind === 'workspace' ? 'Workspace conversation' : reply.owner.kind === 'workflow' ? 'Workflow conversation' : 'Project conversation';
|
|
48
|
+
const time = new Date(reply.startedAt);
|
|
49
|
+
html += `<div class="workspace-root-management-row"><div style="overflow-wrap:anywhere"><strong>${esc(reply.title)}</strong><br>` +
|
|
50
|
+
`<span class="workspace-root-management-state">${owner}${reply.archived ? ' · Archived' : ''} · Reply started ${esc(Number.isFinite(time.getTime()) ? time.toLocaleString() : 'at an unknown time')}<br>${esc(reply.state)}</span></div>` +
|
|
51
|
+
`<button type="button" data-recovery-open="${index}" data-recovery-chat="${esc(reply.chatId)}" data-command-id="shell.workspace-root-recovery-open#${esc(reply.chatId)}" data-command-instance-label="${esc(reply.title)}">Open conversation</button></div>`;
|
|
52
|
+
});
|
|
53
|
+
html += '</div>';
|
|
54
|
+
} else if (!data.protectedCount && !data.unreadableCount && !data.ownershipUnavailable) html += '<p class="workspace-root-management-note">No replies to show. Choose the folder again to check whether it can switch.</p>';
|
|
55
|
+
if (data.otherWork.length) html += '<p class="workspace-root-management-note">Other recorded work: ' + data.otherWork.map(row => esc(row.label)).join(' · ') + '.</p>';
|
|
56
|
+
if (data.recordedCount) html += '<p class="workspace-root-management-note">Some records may clear when you choose the folder again. This list does not guarantee the directory can switch.</p>';
|
|
57
|
+
}
|
|
58
|
+
html += '<button type="button" data-recovery-reload data-command-id="shell.workspace-root-recovery-reload">Reload replies</button>';
|
|
59
|
+
section.innerHTML = html;
|
|
60
|
+
availability();
|
|
61
|
+
if (focused) (key === null ? section.querySelector('[data-recovery-reload]') : [...section.querySelectorAll('[data-recovery-chat]')].find(button => button.dataset.recoveryChat === key) || section.querySelector('h3'))?.focus();
|
|
62
|
+
}
|
|
63
|
+
async function session() {
|
|
64
|
+
const response = await fetch('/api/chat/session', { credentials: 'same-origin' });
|
|
65
|
+
if (!response.ok) throw new Error('FloLess could not open a local chat session. Close this chooser and open it again.');
|
|
66
|
+
}
|
|
67
|
+
async function load() {
|
|
68
|
+
const mine = ++sequence, captured = root();
|
|
69
|
+
reading = true; problem = ''; render();
|
|
70
|
+
try {
|
|
71
|
+
await session();
|
|
72
|
+
let response = await fetch('/api/chat/recovery', { credentials: 'same-origin' });
|
|
73
|
+
if (response.status === 401) { await session(); response = await fetch('/api/chat/recovery', { credentials: 'same-origin' }); }
|
|
74
|
+
if (!response.ok) throw new Error('FloLess could not read the recorded replies. Reconnect or restore this directory if it is unavailable, then reload this list.');
|
|
75
|
+
const next = await response.json();
|
|
76
|
+
if (mine !== sequence || !shown || !sameRoot(captured, root())) return;
|
|
77
|
+
if (!sameRoot(next.root, captured) || !Array.isArray(next.replies) || !Array.isArray(next.otherWork)) throw new Error('The Workspace directory changed. Reload this list before opening a conversation.');
|
|
78
|
+
data = next;
|
|
79
|
+
} catch (error) { if (mine === sequence && shown && sameRoot(captured, root())) problem = error.message; }
|
|
80
|
+
finally { if (mine === sequence) { reading = false; render(); } }
|
|
81
|
+
}
|
|
82
|
+
section.addEventListener('click', async event => {
|
|
83
|
+
const button = event.target.closest('[data-recovery-open], [data-recovery-reload]');
|
|
84
|
+
if (!button || reading) return;
|
|
85
|
+
if (button.hasAttribute('data-recovery-reload')) { void load(); return; }
|
|
86
|
+
const captured = root(), reply = data?.replies[Number(button.dataset.recoveryOpen)];
|
|
87
|
+
if (!reply || !sameRoot(data.root, captured)) { problem = 'The Workspace directory changed. Reload this list first.'; render(); return; }
|
|
88
|
+
if (window.flolessWorkspaceRoot?.isBusy?.()) { problem = 'A folder choice or review is in progress. Let it finish before opening a conversation.'; render(); return; }
|
|
89
|
+
const open = window.flolessChat?.openConversationIn;
|
|
90
|
+
if (typeof open !== 'function') { problem = 'AI Chat is not ready. Close this chooser, then open AI Chat and try again.'; render(); return; }
|
|
91
|
+
if (!window.flolessWorkspaceRoot?.close?.()) { problem = 'A folder choice or review is in progress. Let it finish, then try again.'; render(); return; }
|
|
92
|
+
const mine = ++navigation;
|
|
93
|
+
try {
|
|
94
|
+
const opened = await open({ owner: reply.owner, label: reply.title }, reply.chatId);
|
|
95
|
+
if (mine !== navigation || !sameRoot(captured, root()) || modal.classList.contains('show')) return;
|
|
96
|
+
if (!opened) throw new Error('FloLess could not open that conversation. Reload this list and try again.');
|
|
97
|
+
const recovery = document.getElementById('chat-recovery-stop');
|
|
98
|
+
(recovery && !recovery.hidden ? recovery : document.getElementById('chat-input'))?.focus();
|
|
99
|
+
} catch (error) {
|
|
100
|
+
if (mine !== navigation || !sameRoot(captured, root())) return;
|
|
101
|
+
await window.flolessWorkspaceRoot.open();
|
|
102
|
+
problem = error.message; render();
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
new MutationObserver(records => {
|
|
106
|
+
const open = modal.classList.contains('show');
|
|
107
|
+
if (open !== shown) {
|
|
108
|
+
shown = open; sequence += 1; reading = false;
|
|
109
|
+
if (open) { navigation += 1; data = null; void load(); }
|
|
110
|
+
}
|
|
111
|
+
if (records.some(record => !section.contains(record.target) && record.target !== section)) availability();
|
|
112
|
+
}).observe(modal, { attributes: true, subtree: true, attributeFilter: ['class', 'aria-busy'] });
|
|
113
|
+
window.addEventListener('floless:workspace-root-state', () => {
|
|
114
|
+
if (data && !sameRoot(data.root, root())) { navigation += 1; data = null; }
|
|
115
|
+
if (shown) void load();
|
|
116
|
+
});
|
|
117
|
+
render();
|
|
118
|
+
if (shown) void load();
|
|
119
|
+
})();
|