@floless/app 0.123.2 → 0.124.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 +600 -317
- package/dist/schemas/steel.model.v2.schema.json +10 -0
- package/dist/skills/floless-app-approval/SKILL.md +7 -1
- package/dist/skills/floless-app-steel-takeoff/SKILL.md +21 -3
- package/dist/web/app.js +3 -3
- package/dist/web/aware.js +37 -5
- package/dist/web/index.html +2 -2
- package/dist/web/steel-3d-view.js +345 -14
- package/dist/web/steel-editor.html +745 -21
- package/dist/web/steel-filter.html +64 -8
- package/dist/web/vector-editor.html +15 -1
- package/dist/web/workspaces.js +324 -4
- package/package.json +1 -1
|
@@ -68,6 +68,16 @@
|
|
|
68
68
|
"override": { "type": ["string", "null"], "description": "Set only when the user overrode a file that LIES about its units." }
|
|
69
69
|
}
|
|
70
70
|
},
|
|
71
|
+
"filter": {
|
|
72
|
+
"type": "object",
|
|
73
|
+
"additionalProperties": false,
|
|
74
|
+
"minProperties": 1,
|
|
75
|
+
"description": "The SUBSET of the file this reference was read from — ABSENT means the whole file. Stored so a re-read reproduces the same reference: without it, \"Reload its geometry\" would silently replace one storey with the whole building, from the one action a user takes when something already looks wrong. An empty list is never stored, and neither is an empty object: the reader treats an empty list as selecting NOTHING, so \"no filter\" is this key being absent. The two filters INTERSECT — storeys L1 plus type IFCBEAM means the beams on L1, not both sets.",
|
|
76
|
+
"properties": {
|
|
77
|
+
"storeys": { "type": "array", "minItems": 1, "items": { "type": "string", "minLength": 1 }, "description": "Storey names as `probe` reported them. Matched case-insensitively by the reader." },
|
|
78
|
+
"ifcTypes": { "type": "array", "minItems": 1, "items": { "type": "string", "minLength": 1 }, "description": "IFC entity names, e.g. IFCBEAM. Subtypes are included, so a supertype does not select nothing." }
|
|
79
|
+
}
|
|
80
|
+
},
|
|
71
81
|
"display": {
|
|
72
82
|
"type": "object",
|
|
73
83
|
"additionalProperties": false,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: floless-app-approval
|
|
3
3
|
description: Review and act on FloLess Workspace approval state through the local server API. Use when the user asks what changed or is pending, wants to approve selected changes, leave changes pending, discard a change, inspect approved history or saved checkpoints, start from an older approved version, resume or move saved work forward, or export the latest approved version, an older version, the working DRAFT, or a checkpoint DRAFT.
|
|
4
4
|
metadata:
|
|
5
|
-
version: 0.
|
|
5
|
+
version: 0.2.0
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# FloLess Workspace approval
|
|
@@ -24,6 +24,12 @@ This is informational telemetry, not proof of identity.
|
|
|
24
24
|
## Review and approve
|
|
25
25
|
|
|
26
26
|
1. Fetch `GET /api/projects/:id/approval-review`.
|
|
27
|
+
**If the body has `reviewable: false`, there is nothing to review.** Report its `message` to the
|
|
28
|
+
user and stop — do not present a review and do not submit one. The route answers 200 for the two
|
|
29
|
+
states that are a standing condition of the project rather than a fault (`reason: "no-contract"`,
|
|
30
|
+
nothing read in yet; `reason: "no-incarnation"`, a project too old to carry the identity approval
|
|
31
|
+
proves against). Such a body has no `summary`, no `groups`, and no `reviewId`, so presenting it
|
|
32
|
+
would tell the user "nothing needs approval" about a project that cannot be approved at all.
|
|
27
33
|
2. Present the server's baseline/head, summary, cautions, and every change ID with its headline and
|
|
28
34
|
detail. If `moveForward` is present, state its old base, current approved head, and every reported
|
|
29
35
|
overlap. Do this before any mutation, even when this AI authored the changes.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: floless-app-steel-takeoff
|
|
3
3
|
description: Read a structural steel drawing into an editable steel.takeoff/v1 contract in floless.app — the "Steel Takeoff" reader. Triggers on a pending floless `rebake` request for the `steel-model` app (queued from its "Re-read & re-bake ▸" button), or asks like "read this framing plan into a takeoff", "turn this structural drawing into a takeoff", "bake my drawing into steel-model", "extract members from this PDF". Teaches the host AI to READ a steel drawing (PDF/image) with its own vision at COMPOSE time, build a steel.takeoff/v1 contract (members + profiles + elevations + weights from AISC lookup), write it to the contract store, and hand control to the editor — no model in the run path, no API key.
|
|
4
4
|
metadata:
|
|
5
|
-
version: 0.16.
|
|
5
|
+
version: 0.16.1
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# Steel Takeoff — read a drawing into a steel.takeoff/v1 contract
|
|
@@ -300,8 +300,12 @@ native/display coords):
|
|
|
300
300
|
(**title block excluded** — CONFIDENTIAL, machine-local, never committed). **`page.rect` = the exact
|
|
301
301
|
clip `[x0,y0,x1,y1]` you rendered `bg_b64` from, in the SAME display-space coords as the element `d`
|
|
302
302
|
paths** — the viewer registers the raster to `rect` (not the whole page), so it aligns 1:1 with the
|
|
303
|
-
linework. `w`/`h` stay the full display-space page size (the vectors' coordinate frame).
|
|
304
|
-
|
|
303
|
+
linework. `w`/`h` stay the full display-space page size (the vectors' coordinate frame). Pass that
|
|
304
|
+
same display-space rect to `page.get_pixmap(clip=…)` **unchanged** — do NOT run it back through
|
|
305
|
+
`page.derotation_matrix` on the theory that PyMuPDF wants native coords. `get_pixmap` is the one
|
|
306
|
+
exception to that habit, and derotating its clip renders the wrong region of the sheet (see
|
|
307
|
+
"Hard-won gotchas" below). `steelBbox` = the bbox of this sheet's steel-layer elements
|
|
308
|
+
(Zoom-to-steel).
|
|
305
309
|
4. **Global facets (union across sheets)** — aggregate distinct `layers` / `thicknesses` / `colors`
|
|
306
310
|
with a summed `count` each, ACROSS all sheets, into the top-level `filter.layers/thicknesses/colors`
|
|
307
311
|
(NOT per-sheet). Round each element's `w` and the facet `w` the **same** way (matching is
|
|
@@ -836,6 +840,20 @@ Follow the methodology condensed here (full detail + every gotcha in
|
|
|
836
840
|
- **Pages may be rotated (e.g. 270°).** Work entirely in display space via
|
|
837
841
|
`page.rotation_matrix`. Never mix native/display coords — this is the single biggest source of
|
|
838
842
|
misplaced members.
|
|
843
|
+
- **`page.get_pixmap(clip=…)` is the ONE call that wants the rect already in DISPLAY space — do
|
|
844
|
+
NOT derotate it first.** Every *extraction* (`get_drawings()`, `get_text()`, `search_for()`)
|
|
845
|
+
hands back **native** coordinates you push through `page.rotation_matrix` to reach display space,
|
|
846
|
+
so "always transform" becomes muscle memory — and it is wrong here. `clip` is interpreted in the
|
|
847
|
+
same rotated frame as PyMuPDF's `Page.rect` attribute and the element `d`/`bbox`/`cx,cy` coords you
|
|
848
|
+
already hold, so the display-space crop goes in **verbatim**; that same rect is also what you write
|
|
849
|
+
into the sheet entry's `page.rect` field (step 3 above). Running it through `derotation_matrix`
|
|
850
|
+
first silently renders a *different region* of the sheet. At 90°/270° that usually swaps the crop's
|
|
851
|
+
width and height, so an
|
|
852
|
+
**exact** expected-dimensions assert often does catch it — but at 180°, or on a square or
|
|
853
|
+
symmetrically-clipped region, the pixel size comes back plausible, so dimensions alone cannot
|
|
854
|
+
reliably rule it out. The symptom is a `bg_b64` backdrop shifted and rescaled under
|
|
855
|
+
correctly-placed linework; the check that always settles it is a pixel-diff of the crop against the
|
|
856
|
+
same region of a full-page render.
|
|
839
857
|
- **When a subagent reports a POSITION — the scan-only fallback of step 4 — it must be normalized
|
|
840
858
|
fractions, one pass, no sub-cropping.** Pixel coords from a subagent collapse after downscaling.
|
|
841
859
|
The live-text and montage branches of step 4 are exempt: neither asks a reader for a position at
|
package/dist/web/app.js
CHANGED
|
@@ -244,7 +244,7 @@ function renderTopology() {
|
|
|
244
244
|
function renderLinearTopology(p) {
|
|
245
245
|
const ports = computePorts(p);
|
|
246
246
|
p.nodes.forEach((id, i) => {
|
|
247
|
-
if (i > 0) $topology.appendChild(wireEl(
|
|
247
|
+
if (i > 0) $topology.appendChild(wireEl(p.wires[i - 1]));
|
|
248
248
|
$topology.appendChild(cardEl(id, ports[id]));
|
|
249
249
|
});
|
|
250
250
|
}
|
|
@@ -395,12 +395,12 @@ function cardEl(id, ports) {
|
|
|
395
395
|
return div;
|
|
396
396
|
}
|
|
397
397
|
|
|
398
|
-
function wireEl(
|
|
398
|
+
function wireEl(label) {
|
|
399
399
|
const wrap = document.createElement('div');
|
|
400
400
|
wrap.className = 'wire-wrap';
|
|
401
401
|
wrap.innerHTML = `
|
|
402
402
|
<div class="wire-label">${label || ''}</div>
|
|
403
|
-
<div class="wire"
|
|
403
|
+
<div class="wire"><div class="pulse"></div></div>
|
|
404
404
|
`;
|
|
405
405
|
return wrap;
|
|
406
406
|
}
|
package/dist/web/aware.js
CHANGED
|
@@ -3254,7 +3254,7 @@
|
|
|
3254
3254
|
: sel ? sel.label + (sel.meta ? ` (${sel.meta})` : '') : (f.placeholder || 'Select…');
|
|
3255
3255
|
const rows = opts.map((o) =>
|
|
3256
3256
|
`<div class="wf-option${isOn(o) ? ' selected' : ''}" role="option" data-id="${escapeAttr(String(o.value))}" data-search="${escapeAttr(String(o.search || o.label).toLowerCase())}" tabindex="-1" aria-selected="${isOn(o) ? 'true' : 'false'}"><span class="wf-option-name">${escapeHtml(o.label)}</span>${o.meta ? `<span class="wf-option-meta">${escapeHtml(o.meta)}</span>` : ''}</div>`).join('');
|
|
3257
|
-
ctl = `<div class="wf-combo fm-select"
|
|
3257
|
+
ctl = `<div class="wf-combo fm-select">
|
|
3258
3258
|
<input type="hidden" data-fm="${escapeHtml(f.name)}" value="${escapeAttr(val)}">
|
|
3259
3259
|
<button type="button" class="wf-trigger fm-select-trigger" aria-haspopup="listbox" aria-expanded="false"${disabled ? ' disabled' : ''}>
|
|
3260
3260
|
<span class="wf-trigger-label fm-select-label"${sel ? '' : ' data-empty="1"'}>${escapeHtml(trigLabel)}</span>
|
|
@@ -6361,7 +6361,29 @@
|
|
|
6361
6361
|
function connectSse() {
|
|
6362
6362
|
const es = new EventSource('/api/events');
|
|
6363
6363
|
let reloadTimer = null;
|
|
6364
|
-
|
|
6364
|
+
let everOpened = false;
|
|
6365
|
+
es.onopen = () => {
|
|
6366
|
+
setServerStatus(true);
|
|
6367
|
+
// A RECONNECT MEANS WE MISSED WHATEVER HAPPENED WHILE WE WERE GONE — and this catches up the
|
|
6368
|
+
// PROJECT half of that, not every arm below (workflow imports, contract writes and the rest
|
|
6369
|
+
// still heal on their next event or a reload). These events are
|
|
6370
|
+
// at-most-once — no `Last-Event-ID`, no replay, and `sse.ts` silently drops a client whose
|
|
6371
|
+
// write throws (backpressure, a slept laptop, AV closing the socket) — so a project renamed
|
|
6372
|
+
// or archived during the gap would leave the Workspaces tab addressing a retired id forever,
|
|
6373
|
+
// with the status dot back to green telling the user everything is fine. Re-announce on
|
|
6374
|
+
// reconnect only (never the first connect, which has nothing to catch up on) and carry NO
|
|
6375
|
+
// payload: workspaces.js answers an empty event by re-reading the live set, which is exactly
|
|
6376
|
+
// the catch-up question. (Found by review.)
|
|
6377
|
+
if (everOpened) {
|
|
6378
|
+
window.dispatchEvent(new CustomEvent('floless:projects-changed', { detail: {} }));
|
|
6379
|
+
// The SAME catch-up for the other half a live `projects-changed` drives (see that arm): the
|
|
6380
|
+
// open workflow's publication availability turns on project state, so a gap leaves the card
|
|
6381
|
+
// asserting a state that may no longer hold. Re-asking for Workspaces but not for Workflows
|
|
6382
|
+
// would fix one stale surface and leave its sibling. (Found by review round 2.)
|
|
6383
|
+
if (currentId) refreshCurrentWorkflowAvailability().catch(reportErr);
|
|
6384
|
+
}
|
|
6385
|
+
everOpened = true;
|
|
6386
|
+
};
|
|
6365
6387
|
es.onmessage = (e) => {
|
|
6366
6388
|
let m;
|
|
6367
6389
|
try { m = JSON.parse(e.data); } catch { return; }
|
|
@@ -6392,9 +6414,19 @@
|
|
|
6392
6414
|
// RE-APPLIED rather than merely left behind. Nothing self-healed until the user switched
|
|
6393
6415
|
// workflows. Re-read the payload rather than guess at the new state.
|
|
6394
6416
|
if (m.appId === currentId) refreshCurrentWorkflowAvailability().catch(reportErr);
|
|
6395
|
-
} else if (m.type === 'projects-changed'
|
|
6396
|
-
|
|
6397
|
-
|
|
6417
|
+
} else if (m.type === 'projects-changed') {
|
|
6418
|
+
// Relayed as a DOM event for the same reason apps-changed is (see that arm below):
|
|
6419
|
+
// workspaces.js owns the project view and is the only listener. It reconciles the project it
|
|
6420
|
+
// has OPEN when another tab — or the terminal AI — renames or archives it; a rename mints a
|
|
6421
|
+
// new project id, and its step frames carry the old one in `?project=`.
|
|
6422
|
+
//
|
|
6423
|
+
// Relayed UNGATED, unlike the availability refresh under it: `appId` scopes the event to a
|
|
6424
|
+
// workflow, and the open PROJECT is a different question — its app need not be the workflow
|
|
6425
|
+
// this tab happens to be showing.
|
|
6426
|
+
window.dispatchEvent(new CustomEvent('floless:projects-changed', { detail: m }));
|
|
6427
|
+
if (typeof m.appId !== 'string' || m.appId === currentId) {
|
|
6428
|
+
refreshCurrentWorkflowAvailability().catch(reportErr);
|
|
6429
|
+
}
|
|
6398
6430
|
} else if (m.type === 'trace' && m.id === currentId) {
|
|
6399
6431
|
pushTrace(m.event);
|
|
6400
6432
|
if (state.currentTab === 'execution') renderInspect();
|
package/dist/web/index.html
CHANGED
|
@@ -876,7 +876,7 @@
|
|
|
876
876
|
<label>Days</label>
|
|
877
877
|
<div class="rtn-days" id="rtn-days"></div>
|
|
878
878
|
</div>
|
|
879
|
-
<div class="modal-field" data-sched="daily weekdays weekly"
|
|
879
|
+
<div class="modal-field" data-sched="daily weekdays weekly">
|
|
880
880
|
<label for="rtn-hour">At (local time)</label>
|
|
881
881
|
<div class="rtn-time">
|
|
882
882
|
<select id="rtn-hour" aria-label="Hour"></select>
|
|
@@ -973,7 +973,7 @@
|
|
|
973
973
|
<div class="modal-title" id="graft-title">Graft into agent</div>
|
|
974
974
|
<div class="modal-sub" id="graft-sub">Point at a DLL, package, or API spec — AWARE reads it and builds an agent you can drop into any workflow.</div>
|
|
975
975
|
<div id="graft-body"></div>
|
|
976
|
-
<div class="modal-actions"
|
|
976
|
+
<div class="modal-actions">
|
|
977
977
|
<button id="graft-back" style="margin-right:auto;" hidden>‹ Back</button>
|
|
978
978
|
<button id="graft-cancel">Cancel</button>
|
|
979
979
|
<button id="graft-primary" class="primary" disabled>Introspect</button>
|