@floless/app 0.153.0 → 0.155.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 +51767 -38222
- package/dist/schemas/revit.model.v1.schema.json +5 -0
- package/dist/schemas/steel.model.v2.schema.json +19 -5
- package/dist/skills/floless-app-new-workflow/SKILL.md +8 -2
- package/dist/skills/floless-app-onboarding/SKILL.md +31 -19
- package/dist/skills/floless-app-onboarding/references/floless-surfaces.md +20 -11
- package/dist/skills/floless-app-queue/SKILL.md +23 -4
- package/dist/skills/floless-app-steel-model/SKILL.md +23 -2
- package/dist/skills/floless-app-steel-takeoff/SKILL.md +158 -65
- package/dist/skills/floless-app-workflows/SKILL.md +23 -5
- package/dist/skills/floless-app-workflows/references/blender-exec.md +183 -0
- package/dist/skills/floless-app-workflows/references/dev-server-and-run-trace.md +27 -12
- package/dist/templates/blender-construction-sequence.flo +96 -0
- package/dist/web/agents.js +33 -13
- package/dist/web/app.css +331 -34
- package/dist/web/app.js +12 -1
- package/dist/web/aware.js +1167 -137
- package/dist/web/chat-question-card.js +477 -0
- package/dist/web/chat.css +237 -25
- package/dist/web/chat.js +2156 -889
- package/dist/web/commands-shell.js +578 -21
- package/dist/web/commands-steel.js +105 -4
- package/dist/web/guide.js +217 -16
- package/dist/web/index.html +104 -10
- package/dist/web/instructor.js +10 -9
- package/dist/web/left-pane.js +43 -6
- package/dist/web/media-player.js +234 -0
- package/dist/web/model-editor-contract.js +2 -0
- package/dist/web/model-editor-revit-adapter.js +1 -0
- package/dist/web/model-editor-steel-adapter.js +89 -1
- package/dist/web/model-panel-bridge.js +16 -2
- package/dist/web/model-view-query.js +590 -0
- package/dist/web/model-viewport-revit-adapter.js +15 -1
- package/dist/web/model-viewport-toolbar.js +5 -2
- package/dist/web/pages.js +592 -0
- package/dist/web/panels.js +2 -1
- package/dist/web/revit-editor.js +182 -16
- package/dist/web/run-progress.js +193 -0
- package/dist/web/run-strip.js +173 -0
- package/dist/web/steel-3d-core.js +70 -0
- package/dist/web/steel-editor.html +2751 -219
- package/dist/web/steel-frames-core.js +958 -0
- package/dist/web/steel-last-seen.js +315 -0
- package/dist/web/steel-marks-core.js +530 -0
- package/dist/web/steel-model-slim.js +95 -0
- package/dist/web/steel-model-v2-client-validation.js +14 -2
- package/dist/web/steel-model-v2-commands.js +258 -27
- package/dist/web/steel-model-v2-projection.js +78 -18
- package/dist/web/steel-read-confidence.js +11 -2
- package/dist/web/tekla-structural-grid-adapter.js +7 -1
- package/dist/web/tool-updates.js +141 -33
- package/dist/web/workspaces.js +446 -30
- package/package.json +3 -2
|
@@ -7,7 +7,7 @@ description: >-
|
|
|
7
7
|
two-phase Drawing Filter process: first prepare and save the deterministic Filter, then read only the
|
|
8
8
|
selected evidence into model-global members, registered plan views, observations, and revision history.
|
|
9
9
|
metadata:
|
|
10
|
-
version: 0.
|
|
10
|
+
version: 0.70.0
|
|
11
11
|
---
|
|
12
12
|
|
|
13
13
|
# Steel Takeoff — read drawings into `steel.model/v2`
|
|
@@ -34,7 +34,9 @@ and “ETag” in the visible list. FloLess refuses a saved checklist that uses
|
|
|
34
34
|
a versioned format name such as `steel.model/v2`; the refusal names every such word and the item or
|
|
35
35
|
summary it is in, so replace exactly those and save once more. Say “drawing
|
|
36
36
|
lines the user kept,” “draft 3D model,” “line up the plans,” “attach the callout,” or “check that every
|
|
37
|
-
drawing item was handled.”
|
|
37
|
+
drawing item was handled.” Carry the marks as one visible item: “Record the section, detail and elevation
|
|
38
|
+
marks on each sheet and the sheet each one points to.” Carry the moment frames as one visible item too:
|
|
39
|
+
“Record each moment frame and its girder sizes from the frame elevations.” Familiar drawing and steel terms are fine. Whenever work is active, keep
|
|
38
40
|
exactly one unchecked item marked **NOW**. As soon as its work is verified, preserve its original wording
|
|
39
41
|
and render it as `- [x] ~~<original task text>~~`, then move **NOW** to the next item. Cross
|
|
40
42
|
items out one by one, never as an unverified batch. Mark inferred or not-yet-checked results
|
|
@@ -1046,69 +1048,34 @@ schedules and cross-references before anything is modelled. Drawing truth wins,
|
|
|
1046
1048
|
does not hold on the sheet in front of you is telling you this set is drafted differently, not that
|
|
1047
1049
|
the sheet is wrong — find the discriminator that does hold, and say in the read which one you used.
|
|
1048
1050
|
|
|
1049
|
-
**Judge a band by label association, never by how it renders.**
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
the
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
within tolerance AND separated by a gap small enough to be a drafting break rather than a bay — and
|
|
1078
|
-
**stop only at evidence that the member TERMINATES there** — a second member mark naming a different
|
|
1079
|
-
section, a splice or end-connection callout, or a change of section. The test is a member boundary,
|
|
1080
|
-
not the presence of something at that point.
|
|
1081
|
-
|
|
1082
|
-
Two things are deliberately **not** boundaries on their own. A **grid line crossing** is not —
|
|
1083
|
-
members run continuous through grid lines constantly, and splitting on one manufactures a joint the
|
|
1084
|
-
drawing never showed. A **column or support symbol** is not either: a beam very often runs continuous
|
|
1085
|
-
*over* its support, and the symbol itself may interrupt the drawn line where no joint exists.
|
|
1086
|
-
A support is a reason to **investigate** whether the member terminates there, never a reason to split
|
|
1087
|
-
by itself.
|
|
1088
|
-
|
|
1089
|
-
**Where the set cannot settle it, the run is UNRESOLVED — not two members, and not one.** Splitting
|
|
1090
|
-
on an ambiguous gap asserts a joint nobody drew and distorts every length and quantity downstream;
|
|
1091
|
-
merging across one asserts a continuity nobody drew and reads as a single member with a fabricated
|
|
1092
|
-
length. Both are fabrication, and neither is the safe default. Say what the drawing shows, mark the
|
|
1093
|
-
run unresolved, and raise an RFI.
|
|
1094
|
-
|
|
1095
|
-
**Follow the LEADER, not the label's angle.** A profile mark drawn on an angled leader is naming
|
|
1096
|
-
whatever that leader points AT — characteristically a column, because a column is a small symbol with
|
|
1097
|
-
no room to letter a mark across it. So read the leader's far end: the mark belongs to the thing it
|
|
1098
|
-
lands on. This is the reliable instrument, and it is what makes the next rule work.
|
|
1099
|
-
|
|
1100
|
-
**Beware of taking the label's rotation as the evidence.** It is common for beam marks to lie along
|
|
1101
|
-
their member's axis and for column marks to sit at a diagonal — but that diagonal is a *consequence*
|
|
1102
|
-
of the leader being angled, not the reason the mark is a column. Used as a cheap first sort it costs
|
|
1103
|
-
nothing; used as the discriminator it fails silently on any set that letters its column marks
|
|
1104
|
-
straight, because the column path below keys off the split and yields *zero* columns rather than an
|
|
1105
|
-
error. **Verify the split partitions on the sheet in front of you**, and where it does not, fall back
|
|
1106
|
-
to what the drawing states outright: the leader's target, the column schedule, the grid-intersection
|
|
1107
|
-
symbol, or the mark's own prefix.
|
|
1108
|
-
|
|
1109
|
-
This sorts **MARKS**, and only to decide which extraction path to run. It is never the source of a
|
|
1110
|
-
member's `role` or `memberType` — those stay authored facts read off the drawing, never inferred from
|
|
1111
|
-
geometry or from how a label is rotated (see "Model-global members").
|
|
1051
|
+
**Judge a band by label association, never by how it renders.** Grid lines, walls and stair enclosures
|
|
1052
|
+
alone can look structural. For each profile mark, find a parallel **member-scale** run near its text
|
|
1053
|
+
rotation, within a small **scale-relative** distance (a few model feet converted through the sheet's
|
|
1054
|
+
`mm_per_px`, never a fixed paper distance from another drawing). Record its band; marks must resolve
|
|
1055
|
+
consistently to one band across the sheet. A nearby stub is not a member: mark unresolved and raise
|
|
1056
|
+
an RFI rather than adopting its band. Heavier bands are only a hypothesis: measure it per sheet,
|
|
1057
|
+
never carry a weight across from another sheet; a light band is **not** proof of no steel: coincident
|
|
1058
|
+
members, such as an edge beam on a slab edge, share that line's band. Confirm both directions by marks.
|
|
1059
|
+
|
|
1060
|
+
**Merge collinear runs before association.** Fragmented beams otherwise fail length/proximity filters.
|
|
1061
|
+
Only join fragments that are collinear within tolerance AND separated by a
|
|
1062
|
+
gap small enough to be a drafting break rather than a bay;
|
|
1063
|
+
**stop only at evidence that the member TERMINATES there**: a second mark naming another section,
|
|
1064
|
+
splice, end-connection callout or section change.
|
|
1065
|
+
A **grid line crossing** is not — members run continuous through grid lines.
|
|
1066
|
+
A **column or support symbol** is not either:
|
|
1067
|
+
members can run over supports, whose symbols interrupt lines without a joint. Investigate, never
|
|
1068
|
+
split on a support alone.
|
|
1069
|
+
**Where the set cannot settle it, the run is UNRESOLVED — not two members, and not one.**
|
|
1070
|
+
State the drawn facts and raise an RFI; neither an invented joint nor continuity is safe.
|
|
1071
|
+
|
|
1072
|
+
**Follow the LEADER, not the label's angle.** Read its far end: the mark belongs to the thing it
|
|
1073
|
+
lands on, commonly a small column symbol. Diagonal column lettering reflects the leader angle;
|
|
1074
|
+
straight lettering would make an angle-only split silently miss every column. Use rotation only
|
|
1075
|
+
as a first sort. **Verify the split partitions on the sheet in front of you**; otherwise use the
|
|
1076
|
+
leader's target, column schedule, grid-intersection symbol or mark prefix. This sorts **MARKS** into
|
|
1077
|
+
extraction paths only, never the source of a member's `role` or `memberType`:
|
|
1078
|
+
those stay authored facts read off the drawing, never inferred from geometry or lettering.
|
|
1112
1079
|
|
|
1113
1080
|
**Columns are usually not lines.** On a plan a column typically appears as a small footprint symbol
|
|
1114
1081
|
— its shape follows the section (a square or rectangle for HSS and W, a circle for pipe) and it sits
|
|
@@ -1116,6 +1083,36 @@ far below any member-scale length filter, so a run-based extraction finds no col
|
|
|
1116
1083
|
them on their own path, keyed off whichever discriminator you confirmed above, and take the section
|
|
1117
1084
|
from the mark or the column schedule rather than from the symbol's shape.
|
|
1118
1085
|
|
|
1086
|
+
**Read every column's drawn section orientation before writing it, including skew columns.** Never
|
|
1087
|
+
silently default: profile/centre alone do not prove flange direction.
|
|
1088
|
+
|
|
1089
|
+
1. Read both W flange strokes and their web; record two source points along a **flange width tangent**,
|
|
1090
|
+
not web/leader/lettering/beam lines. Attach sheet, grid/location, source locator and explanation to
|
|
1091
|
+
the observation. A rectangle or moment-frame line cannot supply rotation; follow detail/section
|
|
1092
|
+
callouts for schematic symbols. Read rectangular HSS width/depth with its note; square/round
|
|
1093
|
+
symmetry is not W evidence. Angle/channel toe/web facing needs separate evidence.
|
|
1094
|
+
2. Map both points with existing `sheetPxToWorld` (`web/steel-plan-transform.js`) and subtract: this
|
|
1095
|
+
handles fitted scale/rotation and display-Y reflection once. Never negate Y again or use pixel
|
|
1096
|
+
angles. Warn/correct mirrored or unproven registration; do not guess. Project the world tangent
|
|
1097
|
+
perpendicular to the member axis as `f`; degenerate/illegible evidence follows step 5.
|
|
1098
|
+
3. Store columns base-to-top. Use `partFrame` (`web/steel-3d-core.js`) on authored reference endpoints
|
|
1099
|
+
before offsets: Global up `[0,0,1]`, seed `[1,0,0]`; `positionBasis` up
|
|
1100
|
+
`cross(positionBasis.x, positionBasis.y)`, seed `positionBasis.x`. Width=`frame.y`, depth=`frame.z`,
|
|
1101
|
+
axis=`frame.x`; degrees=`atan2(dot(f, frame.z), dot(f, frame.y))`, the existing re-expression rule.
|
|
1102
|
+
For plumb Global: flange width along X/Y/37 degrees counter-clockwise from X means `rot: 0`/90/37.
|
|
1103
|
+
The flange face normal is perpendicular: zero faces +/-Y. Only W may fold 180-degree equivalents.
|
|
1104
|
+
4. Write explicit `rot`, including `rot: 0`, with source prose. After bake, measure actual non-square
|
|
1105
|
+
W flange edges/normals against registered direction (W permits antiparallel), using its actual
|
|
1106
|
+
basis; no square envelope or screenshot-only proof. Check named faces/offsets: roll moves off-centre
|
|
1107
|
+
steel. Check every column, including default/quarter-turn/skew where drawn; counts/sizes/export
|
|
1108
|
+
success do not prove orientation.
|
|
1109
|
+
5. Warn with sheet/grid/location, conflicting or illegible symbol/note and source link.
|
|
1110
|
+
Offer **fix it now**, **raise an RFI**, or **proceed on a stated assumption**; default to source resolution while
|
|
1111
|
+
others continue. Unattended: retain known prior orientation or state provisional placement and batch
|
|
1112
|
+
questions. Record assumption/low confidence in observation and summary;
|
|
1113
|
+
never claim assumed roll is verified or zero is drawing truth. Continue provisionally; dependent connections/fit claims
|
|
1114
|
+
carry that assumption until confirmed.
|
|
1115
|
+
|
|
1119
1116
|
**Decide whether a diagonal on a plan is a member or a reference to one — both happen.** Bracing is
|
|
1120
1117
|
commonly shown on a plan as a braced-frame-below symbol while the brace itself is detailed on an
|
|
1121
1118
|
elevation, and modelling that symbol would place a member read off the wrong sheet, at the wrong
|
|
@@ -1484,6 +1481,94 @@ Never rewrite old evidence. A re-read mints a new observation with `provenance:
|
|
|
1484
1481
|
`supersedes: ["old-observation-id"]`. Rebind, supersede, or archive the old observation through its
|
|
1485
1482
|
binding. A split may bind one observation to both survivors; deletion archives it with no member ids.
|
|
1486
1483
|
|
|
1484
|
+
### Record what every view shows
|
|
1485
|
+
|
|
1486
|
+
A reference marker the read resolves is also a mark drawn on its sheet, and the editor can offer a jump
|
|
1487
|
+
from it only when the model records it. Record the marks in the same pass that writes `references[]`:
|
|
1488
|
+
write one entry in that view's `callouts[]` for every `references[]` row, on **every** view that carries
|
|
1489
|
+
marks. That includes elevation views, section views and detail sheets that are views, not only the
|
|
1490
|
+
framing plans. Skipping the elevations and sections leaves the sheet-to-sheet chain broken at the second
|
|
1491
|
+
hop.
|
|
1492
|
+
|
|
1493
|
+
Each callout is `{ kind, text, disp, target, elementId }`:
|
|
1494
|
+
|
|
1495
|
+
- `elementId` — the marker's Filter element id, the same id the `references[]` row carries.
|
|
1496
|
+
- `text` — what the marker reads, as printed (`3/S-501`, `A/S-301`).
|
|
1497
|
+
- `kind` — read it from the symbol: `detail` for a detail circle, `section` for a section flag,
|
|
1498
|
+
`elevation` for an elevation marker. When the symbol cannot be told apart, ask; never default it.
|
|
1499
|
+
- `disp` — `[x, y]`, the centre of that Filter element's bbox, in the same display coordinates the view's
|
|
1500
|
+
own `labels` use.
|
|
1501
|
+
- `target` — `{ "sheet": <the sheet of the row's targetPageId>, "number": <the detail number from the text> }`.
|
|
1502
|
+
Add `"outsideSet": true` exactly when that `references[]` row's status is `missing`; `sheet` is then the
|
|
1503
|
+
sheet name as printed on the marker, and the editor tells the person that sheet is not in the set. A
|
|
1504
|
+
`resolved` row never carries `outsideSet`.
|
|
1505
|
+
|
|
1506
|
+
Start from the current model and copy every callout it already has forward untouched. A re-read adds
|
|
1507
|
+
callouts; it does not rewrite or drop the ones the model holds. Where a marker already has a callout at
|
|
1508
|
+
the same spot, write nothing new for it.
|
|
1509
|
+
|
|
1510
|
+
Leave out what the drawing does not support. Do not write `details[]`, which is the legacy shape and has
|
|
1511
|
+
no target. Do not write `sheet_previews`, which the server owns. Write `detail_bubbles` only when
|
|
1512
|
+
the read has a bubble position as page-normalized coordinates on that sheet; with no such coordinates,
|
|
1513
|
+
leave `detail_bubbles` alone rather than guessing a position. Entries the server cannot take (a missing
|
|
1514
|
+
kind or position, a text too long to print) are left out of the review and listed with the reason, so
|
|
1515
|
+
write each one completely rather than relying on that.
|
|
1516
|
+
|
|
1517
|
+
### Record the moment-frame schedule
|
|
1518
|
+
|
|
1519
|
+
The Frame Elevations draw each moment frame with its girder size at every floor level and its columns.
|
|
1520
|
+
The editor offers those girder sizes on the right sheet only when the model records them, so write the
|
|
1521
|
+
schedule into the model's root `moment_frames[]`: one row for each frame the drawings show. Read it from
|
|
1522
|
+
the frame elevation views, the same views the callouts above are recorded on.
|
|
1523
|
+
|
|
1524
|
+
Each row is `{ grid, span, girders, columns, source }`:
|
|
1525
|
+
|
|
1526
|
+
- `grid` — the grid line the frame stands on, as printed (`H`).
|
|
1527
|
+
- `span` — the two grid lines it spans, `["2", "3"]`, both written as text.
|
|
1528
|
+
- `girders` — one `{ level, sizes, elevationMm }` per floor level the frame draws. `level` is the name
|
|
1529
|
+
exactly as the drawing prints it (`Roof`, `2nd floor`, `3rd floor`). Record every level the drawing
|
|
1530
|
+
shows, however many, and do not rename them to a fixed pair. `sizes` is each girder designation drawn at
|
|
1531
|
+
that level (`["W24X68"]`). Add `elevationMm` only when the drawing states that level's elevation.
|
|
1532
|
+
- `columns` — the column designations drawn for the frame.
|
|
1533
|
+
- `source` — `{ "sheet": <the frame elevation sheet the row was read from> }`.
|
|
1534
|
+
|
|
1535
|
+
Leave out what the drawing does not give. Do not write `id` or `origin`, which the server stamps. Do not
|
|
1536
|
+
write `views` on a level: the person links each sheet to its level in Frames…, and a read never does.
|
|
1537
|
+
Do not write the old `roof` and `second` lists; write `girders`.
|
|
1538
|
+
|
|
1539
|
+
Start from the current model and copy every frame it already has forward untouched. A re-read adds
|
|
1540
|
+
frames; it never rewrites or drops a frame the model holds, and a frame is told apart by its grid line and
|
|
1541
|
+
its span. A frame the model already has that the read gives differently is shown to the person and left as
|
|
1542
|
+
it is. When the drawing set has no frame elevations or no frame schedule, say so in the summary and write
|
|
1543
|
+
no rows. The person can add every frame by hand in Frames…, and the review shows what the read adds.
|
|
1544
|
+
|
|
1545
|
+
### Show every member on every view that draws it
|
|
1546
|
+
|
|
1547
|
+
The editor draws a member on a plan only when the model says that plan shows it. It will place a column
|
|
1548
|
+
from the plan's floor level when the level passes through the column or the column ends just under it, but
|
|
1549
|
+
that is a fallback and not a record. Bind every member to every view it is drawn on, including COL BELOW
|
|
1550
|
+
columns: the column drawn under the floor, as a hollow square at the end of a beam or labelled `COL BELOW`,
|
|
1551
|
+
is on that framing plan even though the floor level does not pass through it.
|
|
1552
|
+
|
|
1553
|
+
For each member symbol a plan view draws, do one of these:
|
|
1554
|
+
|
|
1555
|
+
- Add an observation on that view and bind it to the member the model already has. This is the preferred
|
|
1556
|
+
record, and the evidence rules above apply to it unchanged. Do not make a second member for a column
|
|
1557
|
+
that exists.
|
|
1558
|
+
- When the symbol has no selectable Filter element, add the member's id to that view's `memberRefs[]`.
|
|
1559
|
+
|
|
1560
|
+
A view's `elevation_mm` is the one the person settled on the read setup card, and none for a view they
|
|
1561
|
+
answered "no single level". Do not add, change or take one here, and never from a callout. If a view has
|
|
1562
|
+
none and the drawing states a level, ask for it on the setup card (or the plan-elevation proposal outside
|
|
1563
|
+
AI Chat). The editor then asks the person for a level: a view without one draws only the members bound to
|
|
1564
|
+
it, and the editor tells the person so.
|
|
1565
|
+
|
|
1566
|
+
When a symbol cannot be matched to exactly one model column, ask rather than guess: name the sheet and
|
|
1567
|
+
where the symbol is, and offer the columns it could be. Never bind it to the nearest column, and never
|
|
1568
|
+
leave the symbol unrecorded without saying so. Carry every existing `memberRefs` entry forward and never
|
|
1569
|
+
drop one: a placement the person made by hand sits in that list, and a list that comes back shorter takes
|
|
1570
|
+
it off the sheet.
|
|
1571
|
+
|
|
1487
1572
|
### Literal endpoints and server-owned centerline normalization
|
|
1488
1573
|
|
|
1489
1574
|
Record each selected drawing segment exactly as printed. A beam or brace line that stops at a support
|
|
@@ -1633,4 +1718,12 @@ refetch, re-compose, and re-audit; never force the stale candidate through.
|
|
|
1633
1718
|
- **Selected evidence only.** Every new or reader-changed member traces to a selected Filter element.
|
|
1634
1719
|
- **No fabricated certainty.** Unknown elevations and unresolved profiles remain explicit.
|
|
1635
1720
|
- **No silent overwrite.** Respect request ids, ledger heads, ETags, staging, and confirmation.
|
|
1721
|
+
- **Never delete a callout the model already has.** A re-read adds marks to a view; it copies the ones
|
|
1722
|
+
already recorded forward untouched.
|
|
1723
|
+
- **Never invent a frame.** The moment-frame schedule comes only from frame elevations the drawings show;
|
|
1724
|
+
a frame, a level or a girder size the drawing does not give is left out, and a missing schedule is
|
|
1725
|
+
reported instead of filled in. A frame the model already has is never removed or rewritten by a read.
|
|
1726
|
+
- **Do not rely on the floor level to place columns.** A column a sheet draws is bound to that sheet, the
|
|
1727
|
+
COL BELOW ones included. The level is a fallback the editor applies, and a sheet with no level draws
|
|
1728
|
+
only what is bound to it.
|
|
1636
1729
|
- **No secrets in artifacts.** Never bake source rasters, credentials, absolute paths, or private notes.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: floless-app-workflows
|
|
3
|
-
description: This skill should be used when building, modifying, or reasoning about FloLess .flo workflows for floless.app — especially reusable apps that take inputs (e.g. a phase number) and run across different Tekla models, exec nodes that run Roslyn C# against the live model, the in-app HTML Viewer, the Code tab, or "Debug in VS". Covers the exec contract, the install→validate→compile→run loop, app inputs templating, reading approved Workspace project data and immutable approved Revit model snapshots through the floless-workspace REST seam plus its themed pickers, and the server seams (aware-adapter, app-reader, index).
|
|
3
|
+
description: This skill should be used when building, modifying, or reasoning about FloLess .flo workflows for floless.app — especially reusable apps that take inputs (e.g. a phase number) and run across different Tekla models, exec nodes that run Roslyn C# against the live model, Blender animations of a building (blender/exec Python rendered headlessly — construction sequence, fly-through, sun study), the in-app HTML Viewer, the Code tab, or "Debug in VS". Covers the exec contract, the install→validate→compile→run loop, app inputs templating, reading approved Workspace project data and immutable approved Revit model snapshots through the floless-workspace REST seam plus its themed pickers, and the server seams (aware-adapter, app-reader, index).
|
|
4
4
|
metadata:
|
|
5
|
-
version: 0.
|
|
5
|
+
version: 0.7.0
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# Building reusable .flo workflows in floless.app
|
|
@@ -166,6 +166,21 @@ Two rules that bite immediately:
|
|
|
166
166
|
whatever the node returns.
|
|
167
167
|
- **No `System.Net`** (so no `WebUtility.HtmlEncode`) — escape with a manual lambda.
|
|
168
168
|
|
|
169
|
+
## Building animations: `blender/exec` (Python, rendered headlessly)
|
|
170
|
+
|
|
171
|
+
When someone asks for an animation of their building (a construction sequence, a fly-through, a sun
|
|
172
|
+
study, an exploded view, a highlight of what changed), author a `blender/exec` node: Python defining
|
|
173
|
+
`run(ctx)`, written once and approved, which AWARE renders in Blender with nobody pressing anything.
|
|
174
|
+
Read `references/blender-exec.md` for the node, the `ctx` contract, complete recipes and the time
|
|
175
|
+
budget. Three rules that bite immediately:
|
|
176
|
+
- **`code` is a literal block.** A templated `code` is refused, because code supplied at run time was
|
|
177
|
+
never approved. Data goes in `args`.
|
|
178
|
+
- **Wire `output-dir: '{{ inputs.output-dir }}'`.** FloLess gives each run its own folder, which is
|
|
179
|
+
what lets the finished video play inside FloLess.
|
|
180
|
+
- **Tell the person how long it will take before it runs.** A draft frame takes about 1–2 s on a
|
|
181
|
+
typical model, and a production (Cycles) frame takes about a minute. FloLess shows each frame as it
|
|
182
|
+
renders, so a long render never looks stuck.
|
|
183
|
+
|
|
169
184
|
## Every node's Description must be plain English (HARD guardrail)
|
|
170
185
|
|
|
171
186
|
The Inspect → **Description** tab is written **for non-coders**: it must always say, in plain
|
|
@@ -510,7 +525,8 @@ declares `capabilities.runtime-model-extraction: true`, and which extracts but n
|
|
|
510
525
|
debug})` talks to the bridge directly (resolves `~/.aware/bridges`, injects the debugger when
|
|
511
526
|
`debug`). Nothing else touches raw `aware`/bridge argv. **`run()` serializes through a single
|
|
512
527
|
promise-chain run lock** — manual (UI) runs and scheduled (routine) runs share it, since the host
|
|
513
|
-
bridge does one exec at a time
|
|
528
|
+
bridge does one exec at a time. Manual cancellation owns a request UUID and its queued or
|
|
529
|
+
running ticket; it never cancels whichever unrelated run happens to be active.
|
|
514
530
|
- `server/routines.ts` + `/api/routines` (in `index.ts`) — `.flo` runs on a trigger. Two `kind`s
|
|
515
531
|
share the store (`~/.floless/routines.json`) and the **⏱ Routines** panel:
|
|
516
532
|
- **`schedule`** — a time-trigger; the in-server scheduler fires due routines through
|
|
@@ -535,8 +551,10 @@ declares `capabilities.runtime-model-extraction: true`, and which extracts but n
|
|
|
535
551
|
canvas isn't littered with false write-mode badges.
|
|
536
552
|
- `server/index.ts` — routes. `/api/run` accepts `inputs` and returns `report` via
|
|
537
553
|
`extractReportHtml(events)` (scans the trace for `data.result.html`); it surfaces a user Stop
|
|
538
|
-
in-band as `{ cancelled:true }`.
|
|
539
|
-
|
|
554
|
+
in-band as `{ cancelled:true }`. Manual callers generate a fresh UUID before dispatch and pass
|
|
555
|
+
`runRequestId` in `/api/run`; `/api/run/stop` accepts `{runRequestId}` and cancels only that
|
|
556
|
+
request's queued or running ticket (including its process tree). A Stop without this identity
|
|
557
|
+
does not stop anything. `/api/debug-node` resolves `{{ inputs.x }}` in `config.args` and dispatches
|
|
540
558
|
via `execTekla(..., {debug:true})`.
|
|
541
559
|
|
|
542
560
|
## Keeping this skill current (self-learning)
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
# Building animations: the `blender/exec` node
|
|
2
|
+
|
|
3
|
+
A person asks AI Chat for "an animation of this building going up storey by storey", a fly-through,
|
|
4
|
+
a sun study, or an exploded connection. You author it **once**, as Python in a `blender/exec` node of
|
|
5
|
+
a FloLess `.flo`. The person approves it, and AWARE renders it headlessly in Blender on every run,
|
|
6
|
+
running exactly the approved code. Knowledge makes the plan smart; the run never improvises.
|
|
7
|
+
|
|
8
|
+
Needs AWARE with the `blender` agent **0.2.0 or later** (the first with `exec`) and Blender on the
|
|
9
|
+
machine (4.2 LTS or 5.x). FloLess checks both before an animation runs. If either is missing, it
|
|
10
|
+
says which and offers the update rather than failing the run.
|
|
11
|
+
|
|
12
|
+
## When to use `exec` and when the fixed commands are enough
|
|
13
|
+
|
|
14
|
+
| The ask | Use |
|
|
15
|
+
|---|---|
|
|
16
|
+
| One picture of the model from a named angle | `blender/render.still` (no code) |
|
|
17
|
+
| A plain 360° spin | `blender/render.turntable` (no code) |
|
|
18
|
+
| Anything that **changes over time** or **picks elements**: construction sequence, fly-through on a path, sun study, exploded view, highlighting what changed | `blender/exec` |
|
|
19
|
+
|
|
20
|
+
Prefer the fixed commands when they fit, because they need no code review.
|
|
21
|
+
|
|
22
|
+
## The node
|
|
23
|
+
|
|
24
|
+
```yaml
|
|
25
|
+
nodes:
|
|
26
|
+
- id: animate
|
|
27
|
+
agent: blender
|
|
28
|
+
command: exec
|
|
29
|
+
inputs:
|
|
30
|
+
ifc-path: '{{ inputs.ifc-path }}' # or blend-path: a staged .blend; or neither = empty scene
|
|
31
|
+
preset: realistic # clay | realistic | section-style (applied when ifc-path stages)
|
|
32
|
+
output-dir: '{{ inputs.output-dir }}' # wire it exactly like this: FloLess provisions it per run
|
|
33
|
+
timeout-seconds: 3600 # from your estimate (see "Time budget")
|
|
34
|
+
args: # DATA for the code — never code
|
|
35
|
+
seconds: 12
|
|
36
|
+
fps: 24
|
|
37
|
+
code: |
|
|
38
|
+
# Builds the model up storey by storey, lowest first, and renders it as an MP4 video.
|
|
39
|
+
# Each storey appears over half a second, with the camera fixed on a three-quarter view.
|
|
40
|
+
def run(ctx):
|
|
41
|
+
...
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Rules:
|
|
45
|
+
- **`code` must be a literal block.** AWARE refuses a templated `code` (`E_APP_INPUT_MUST_BE_LITERAL`):
|
|
46
|
+
code supplied at run time was never approved. Everything that varies goes in `args`, and `args` may
|
|
47
|
+
use templates.
|
|
48
|
+
- **Open `code` with a plain-English `#` comment.** It is the node's Description in Inspect, and the
|
|
49
|
+
`verify:flo` guard fails a published workflow without one. Use `# ` (hash, then a space), with one
|
|
50
|
+
or two sentences a detailer would understand. Never describe the Python.
|
|
51
|
+
- Declare the app input `output-dir` (a string) and wire it as `'{{ inputs.output-dir }}'`. FloLess
|
|
52
|
+
fills it with a private per-run folder, which is what lets the finished video **play inside FloLess**.
|
|
53
|
+
A file written anywhere else still gets Open/Reveal, but no inline player.
|
|
54
|
+
- The node is `mode: write` and cannot be overridden. A dry run never starts Blender.
|
|
55
|
+
|
|
56
|
+
## `run(ctx)`, the contract
|
|
57
|
+
|
|
58
|
+
`run(ctx)` is called once, after the scene is staged. Return a small JSON-able summary of up to
|
|
59
|
+
256 KiB. Larger results fail with `result-too-large`: write a file and register it instead.
|
|
60
|
+
|
|
61
|
+
| `ctx.` | What it does |
|
|
62
|
+
|---|---|
|
|
63
|
+
| `args` | the node's `args` (a dict) |
|
|
64
|
+
| `output_dir` | the real path to write into |
|
|
65
|
+
| `scene` | `bpy.context.scene` |
|
|
66
|
+
| `elements()` | `[(obj, {guid, name, class, material, storey})]` for every imported IFC element (staging helpers excluded) |
|
|
67
|
+
| `frame(direction)` | fits the camera to the model: `hero` (three-quarter), `iso`, `front`, `back`, `left`, `right`, `top` |
|
|
68
|
+
| `apply_look(preset)` / `environment(name)` / `ground(on)` | the same looks, HDRI lighting (`studio`, `city`, `sunset`, …) and soft floor the fixed renders use |
|
|
69
|
+
| `progress(phase, done, total, message)` | your own progress line, for long non-render work |
|
|
70
|
+
| `plan_passes(n)` | declare how many `render_*` calls follow, so progress reads "pass 2 of 3" |
|
|
71
|
+
| `render_animation(path, quality='draft')` | renders `scene.frame_start..frame_end` to H.264 MP4, **reports every frame as it is written**, and verifies and registers the file |
|
|
72
|
+
| `render_still(path, quality='draft')` | one PNG, verified and registered |
|
|
73
|
+
| `add_output(path, kind)` | registers another file you wrote (`video`, `image`, `blend`, `file`) |
|
|
74
|
+
|
|
75
|
+
`quality='draft'` is EEVEE and the default; use it for animations. `production` is Cycles, which takes
|
|
76
|
+
minutes per frame. Use it only for stills, or warn the person about the time first (see below).
|
|
77
|
+
|
|
78
|
+
Errors come back as plain messages. An exception reports the line in **your** code, with
|
|
79
|
+
`code: exec-error`.
|
|
80
|
+
|
|
81
|
+
## Recipes
|
|
82
|
+
|
|
83
|
+
Each recipe is a complete `run(ctx)` you can adapt. All of them set the frame range before rendering,
|
|
84
|
+
because `render_animation` renders exactly `frame_start..frame_end`.
|
|
85
|
+
|
|
86
|
+
### Construction sequence: storey by storey (or by erection order)
|
|
87
|
+
|
|
88
|
+
```python
|
|
89
|
+
# Builds the model up storey by storey, lowest first, and renders it as a video.
|
|
90
|
+
def run(ctx):
|
|
91
|
+
fps = int(ctx.args.get("fps", 24))
|
|
92
|
+
step = int(fps * float(ctx.args.get("seconds_per_group", 0.5)))
|
|
93
|
+
els = ctx.elements()
|
|
94
|
+
# Order storeys by height, not by name: names are free text ("Level 1", "GF", "T.O. Steel").
|
|
95
|
+
groups = {}
|
|
96
|
+
for obj, p in els:
|
|
97
|
+
groups.setdefault(p["storey"] or "(no storey)", []).append(obj)
|
|
98
|
+
def low(objs):
|
|
99
|
+
return min(min((obj.matrix_world @ v.co).z for v in obj.data.vertices) for obj in objs)
|
|
100
|
+
order = sorted(groups, key=lambda k: low(groups[k]))
|
|
101
|
+
s = ctx.scene
|
|
102
|
+
s.render.fps = fps
|
|
103
|
+
s.frame_start = 1
|
|
104
|
+
s.frame_end = step * len(order) + fps # one extra second on the finished model
|
|
105
|
+
for i, key in enumerate(order):
|
|
106
|
+
appear = 1 + i * step
|
|
107
|
+
for obj in groups[key]:
|
|
108
|
+
for hidden, f in ((True, 1), (True, appear - 1), (False, appear)):
|
|
109
|
+
obj.hide_render = hidden
|
|
110
|
+
obj.keyframe_insert("hide_render", frame=max(1, f))
|
|
111
|
+
ctx.frame("hero")
|
|
112
|
+
ctx.render_animation("construction-sequence.mp4")
|
|
113
|
+
return {"groups": order, "frames": s.frame_end}
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
For **erection order**, group by a property the model carries (a phase or sequence number in the
|
|
117
|
+
element name, or a value passed in `args` that maps GUID to step) instead of `storey`. If the model
|
|
118
|
+
carries no such data, ask the person. Never invent an order.
|
|
119
|
+
|
|
120
|
+
### Fly-through: the camera on a path
|
|
121
|
+
|
|
122
|
+
```python
|
|
123
|
+
# Flies the camera once around the building at eye height, then up to an overview.
|
|
124
|
+
import math
|
|
125
|
+
def run(ctx):
|
|
126
|
+
s = ctx.scene
|
|
127
|
+
s.frame_start, s.frame_end = 1, int(ctx.args.get("frames", 240))
|
|
128
|
+
receipt = ctx.frame("hero")
|
|
129
|
+
cam = s.camera
|
|
130
|
+
cx, cy, cz = receipt["centre"]; r = receipt["distance"]
|
|
131
|
+
for f in range(s.frame_start, s.frame_end + 1, 10):
|
|
132
|
+
t = (f - s.frame_start) / (s.frame_end - s.frame_start)
|
|
133
|
+
a = 2 * math.pi * t
|
|
134
|
+
cam.location = (cx + r * math.cos(a), cy + r * math.sin(a), cz + r * (0.15 + 0.6 * t))
|
|
135
|
+
cam.keyframe_insert("location", frame=f)
|
|
136
|
+
track = cam.constraints.new("TRACK_TO")
|
|
137
|
+
import bpy
|
|
138
|
+
target = bpy.data.objects.new("aware-target", None); s.collection.objects.link(target)
|
|
139
|
+
target.location = (cx, cy, cz); track.target = target
|
|
140
|
+
ctx.render_animation("fly-through.mp4")
|
|
141
|
+
return {"frames": s.frame_end}
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
Check the actual keys of `ctx.frame()`'s receipt with a short run first. Don't guess field names: print
|
|
145
|
+
the receipt in a first iteration.
|
|
146
|
+
|
|
147
|
+
### Sun study: shadows across a day
|
|
148
|
+
|
|
149
|
+
Key a sun lamp's rotation over the frame range (for example 08:00 to 18:00, one frame per 10 minutes),
|
|
150
|
+
with `ctx.environment("gradient")` so the HDRI does not fight the sun. If the person gives a site
|
|
151
|
+
latitude and date, compute the sun's elevation and azimuth from them in `args`. If they don't, ask.
|
|
152
|
+
Never assume a site.
|
|
153
|
+
|
|
154
|
+
### Exploded view
|
|
155
|
+
|
|
156
|
+
Move each element outward from the model centre along its own centre direction, keyed from 0 to a
|
|
157
|
+
factor over the range. Keep `ground(False)`, because the floor reads wrong under floating parts.
|
|
158
|
+
|
|
159
|
+
### Highlight what changed
|
|
160
|
+
|
|
161
|
+
Pass the changed GUIDs in `args` (from a revision comparison the person ran), give those elements an
|
|
162
|
+
accent material and the rest `clay`, and render a still or a short turntable. Read the GUID list from
|
|
163
|
+
`args`; never hard-code it in `code`, or every new revision would need a new approval.
|
|
164
|
+
|
|
165
|
+
## Time budget: tell the person before it runs
|
|
166
|
+
|
|
167
|
+
Each frame is one render. On the steel demo (209 members, 1920×1080), measured draft frames take about
|
|
168
|
+
1.3–1.9 s, so 288 frames take about 6–9 minutes. A production (Cycles) frame takes 50–115 s, so
|
|
169
|
+
240 production frames take **hours**.
|
|
170
|
+
|
|
171
|
+
- Before running, state the estimate in plain words: *"About 240 frames at draft quality, roughly 5–8
|
|
172
|
+
minutes. You can keep working; FloLess shows each frame as it renders."*
|
|
173
|
+
- Set `timeout-seconds` to about twice the high end of your estimate. A timeout shows as a warning
|
|
174
|
+
with the choice to run again with a longer budget.
|
|
175
|
+
- Production animation is allowed: nothing refuses. Warn first with the hours figure and the draft
|
|
176
|
+
alternative, and let the person choose.
|
|
177
|
+
|
|
178
|
+
## Verify before you hand it over
|
|
179
|
+
|
|
180
|
+
1. `aware app validate`, then compile.
|
|
181
|
+
2. Run it **for real** through FloLess (never `--simulate`; a simulated run renders nothing). Watch the
|
|
182
|
+
strip count frames, then open the MP4.
|
|
183
|
+
3. Check the receipt: `outputs[0].verified` is `true`, and `frames` equals your frame range.
|
|
@@ -88,8 +88,9 @@ machine via a `self_test:true` watch fixture — no Tekla, no `--simulate`:
|
|
|
88
88
|
|
|
89
89
|
### Driving the licensed dev server + Playwright (what actually works here)
|
|
90
90
|
|
|
91
|
-
- **The installed SEA server usually already holds :4317** (
|
|
92
|
-
|
|
91
|
+
- **The installed SEA server usually already holds :4317** (it is a different, older build than
|
|
92
|
+
your checkout — it may lack routes yours has, so don't read a 404 there as a bug in your code;
|
|
93
|
+
on current builds `/api/license/status` is the ungated liveness probe). Don't fight it: `index.ts` honors `PORT`, so run the dev server on a free port —
|
|
93
94
|
`PORT=4318 FLOLESS_LICENSE_DIR="$LOCALAPPDATA/FlolessApp-data" npx tsx main.ts --serve` (from
|
|
94
95
|
`server/`, background). Without the license dir it serves the **sign-in gate** (the workspace
|
|
95
96
|
chrome is absent) — assert a stable workspace element like `document.getElementById('run-btn')`
|
|
@@ -113,13 +114,27 @@ machine via a `self_test:true` watch fixture — no Tekla, no `--simulate`:
|
|
|
113
114
|
|
|
114
115
|
## Stop / cancel an in-flight run
|
|
115
116
|
|
|
116
|
-
`aware app run` blocks
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
117
|
+
`aware app run` blocks. Each finite manual caller must generate a fresh UUID before dispatch:
|
|
118
|
+
|
|
119
|
+
```javascript
|
|
120
|
+
const runRequestId = crypto.randomUUID();
|
|
121
|
+
const runBody = { id: appId, inputs, runRequestId };
|
|
122
|
+
// POST /api/run with runBody. Keep this identity for the corresponding Stop:
|
|
123
|
+
const stopBody = { runRequestId }; // POST /api/run/stop
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
- The server registers ownership before awaiting admission or the shared run lock. Stop targets
|
|
127
|
+
this request's queued or running ticket; it never falls back to another active run. A legacy
|
|
128
|
+
identity-less Run can complete, but identity-less Stop does not stop anything.
|
|
129
|
+
- Read the Stop answer: `accepted:true` confirms a stop request; `accepted:false,pending:true`
|
|
130
|
+
is provisional when Run registration has not been observed; a finishing answer means the
|
|
131
|
+
result is already being completed. None of these answers replaces the original Run outcome.
|
|
132
|
+
- `aware-adapter.ts` cancels the owned ticket. On Windows it kills the **whole process tree**
|
|
133
|
+
with `taskkill /pid <pid> /T /F`; a bare `child.kill()` can orphan the bridge.
|
|
134
|
+
- The original `/api/run` answer's `cancelled:true` determines cancellation. `api()` preserves
|
|
135
|
+
the structured error body. Do not infer cancellation from a local click or a lost Stop
|
|
136
|
+
acknowledgement, and do not hold a completed Run result while waiting indefinitely for Stop.
|
|
137
|
+
Already-dispatched host work may remain after cancellation.
|
|
138
|
+
- Manual trace events carry request and AWARE run identities. The browser admits only events
|
|
139
|
+
belonging to the current request; late events cannot revive a stopped canvas. Scheduled runs
|
|
140
|
+
and foreground trigger sessions retain their own separate ownership and stop paths.
|