@floless/app 0.127.5 → 0.128.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@floless/app",
3
- "version": "0.127.5",
3
+ "version": "0.128.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": {
@@ -1,562 +0,0 @@
1
- {
2
- "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://floless.app/schemas/steel.takeoff/v1",
4
- "title": "steel.takeoff/v1",
5
- "description": "Typed contract emitted by the steel-takeoff-us reader and rendered by the floless contract editor. The contract is the single source of truth; the editor is its view, the exporters (IFC/Tekla/viewer-3d) consume it, Approve bakes the .lock. A multi-plan container: each plan is one framing sheet. All coordinates are DISPLAY space; elevations are decimal inches. Confidential rasters ride inside as base64 and are never committed. Field reference: docs/superpowers/specs/2026-06-17-steel-takeoff-agent-guidance.md §3.",
6
- "type": "object",
7
- "required": ["type", "plans"],
8
- "additionalProperties": true,
9
- "properties": {
10
- "type": { "const": "steel.takeoff/v1", "description": "Renderer-registry discriminator." },
11
- "target_confidence": { "type": "number", "minimum": 0, "maximum": 100, "description": "User's per-read confidence target (%); overrides the app's target_confidence input default. The editor chip and the /score endpoint use it." },
12
- "active": { "type": "integer", "description": "Index into plans of the active sheet." },
13
- "palette": { "type": "array", "items": { "type": "string" }, "description": "Default per-index profile colours." },
14
- "weights": { "type": "object", "additionalProperties": { "type": ["number", "null"] }, "description": "profile -> plf (pounds per linear foot), from the AISC lookup. null for an unresolved profile (e.g. an unsized moment-frame mark) that has no weight yet." },
15
- "profile_colors": { "type": "object", "additionalProperties": { "type": "string" }, "description": "profile -> #hex user overrides." },
16
- "member_styles": { "type": "object", "additionalProperties": { "type": "object", "properties": { "weight": { "enum": ["thin", "med", "thick"] }, "dash": { "enum": ["solid", "dashed", "dotted", "dashdot"] } }, "additionalProperties": false }, "description": "Draft-only 2D display state (like prop_labels): member-type -> line {weight,dash}. Model-global. NOT baked into the lock / 3D scene / IFC / BOM." },
17
- "sheet_previews": { "type": "object", "additionalProperties": { "type": "string" }, "description": "sheet -> base64 JPEG full-sheet preview (title block excluded)." },
18
- "custom_details": { "type": "object", "additionalProperties": { "type": "string" }, "description": "user-created detail name -> base64 JPEG." },
19
- "moment_frames": { "type": "array", "description": "Moment-frame schedule from the frame-elevation sheets." },
20
- "read_notes": {
21
- "type": "array",
22
- "items": { "type": "string" },
23
- "description": "Plain-English notes the reader records about what it could NOT resolve — an ambiguous label, a member it cannot place, an unsupported brace topology. An unplaceable member has no work-points, so it cannot be a member at all (`wp` is required), and an `rfi` member with a resolved profile would still enter the BOM; a note here is the honest carrier. The reader rebuilds these from the source on every read (stale entries are dropped, not carried forward) and states them in its hand-off."
24
- },
25
- "detail_bubbles": {
26
- "type": "object",
27
- "additionalProperties": {
28
- "type": "object",
29
- "additionalProperties": { "$ref": "#/$defs/point2" }
30
- },
31
- "description": "sheet -> { detail number -> normalized [fx,fy] bubble anchor }."
32
- },
33
- "source": {
34
- "type": "object",
35
- "description": "Provenance: where this takeoff was read from.",
36
- "properties": {
37
- "name": { "type": "string" },
38
- "path": { "type": "string" },
39
- "sheet": { "type": "string" },
40
- "sha256": { "type": "string" },
41
- "read_at": { "type": "string" }
42
- },
43
- "additionalProperties": false
44
- },
45
- "plans": { "type": "array", "items": { "$ref": "#/$defs/plan" } },
46
- "filter": { "$ref": "#/$defs/filter", "description": "Layer/thickness/colour filter pre-stage. `sheets[]` holds per-framing-plan geometry; the facets + `mode` + on-flag selection are GLOBAL across sheets. The saved selection scopes which lines the reader binds profile labels to per sheet; replaces the length heuristic, fallback when absent. CONFIDENTIAL: each sheet's `page.bg_b64` is machine-local, never committed." },
47
- "connections": { "type": "array", "items": { "$ref": "#/$defs/connection" }, "description": "Vendor-neutral connection library: each row maps a connection type → the firm's design detail# → per-platform component ids. Member ends/columns reference a row by id via `ends[].conn` / `col.conn` (legacy `note`/`detail` = fallback when `conn` is empty)." },
48
- "joints": { "type": "array", "items": { "$ref": "#/$defs/joint" }, "description": "Placed connections (base plates, …) the connection engine expands into real 3D parts (plate/bolt/weld/cut) bound to their members. A joint may cite a `connections[]` row via `conn` for its type/detail identity; `params` carries the geometry settings (engine defaults when absent)." },
49
- "dims3d": { "type": "array", "items": { "$ref": "#/$defs/dim3" }, "description": "Draft-only 3D dimensions (editor annotations, model-global). World-scene mm. NOT baked into the lock / 3D scene / IFC / BOM." },
50
- "detail_placements": { "type": "array", "items": { "$ref": "#/$defs/detailPlacement" }, "description": "Draft-only placed 2D detail images (Slice 4 — insert a vectored detail into the model). Flat image planes the editor renders client-side against the model; metadata only — the image bytes live in custom_details. Model-global. NOT baked into the lock / 3D scene / IFC / BOM." },
51
- "views": { "type": "array", "description": "Draft-only saved views (Views Organizer, unlimited saved entries): each a named snapshot of the 3D viewpoint (camera + projection + display mode + clip boxes/planes + work area + the objects-list pane's persistent visibility/isolate state). F11-generated grid elevations and level plans also carry closed `generated` provenance so their cut depths remain editable. Editor state, model-global. NOT baked into the lock / 3D scene / IFC / BOM.", "items": { "type": "object", "additionalProperties": true, "required": ["id", "name"], "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "order": { "type": "number" }, "camera": { "type": "object", "additionalProperties": true }, "projection": { "enum": ["persp", "ortho"] }, "mode": { "enum": ["solid", "wire", "xray", "realistic", "shadowed"] }, "clips": { "type": "object", "additionalProperties": true }, "objects": { "type": "object", "additionalProperties": true }, "generated": { "oneOf": [{ "type": "object", "additionalProperties": false, "required": ["v", "kind", "sheet", "label", "at", "look", "ahead", "behind"], "properties": { "v": { "const": 1 }, "kind": { "enum": ["grid-x", "grid-y"] }, "sheet": { "type": "string" }, "label": { "type": "string" }, "at": { "type": "number" }, "look": { "enum": ["positive", "negative"] }, "ahead": { "type": "number", "exclusiveMinimum": 0 }, "behind": { "type": "number", "exclusiveMinimum": 0 } } }, { "type": "object", "additionalProperties": false, "required": ["v", "kind", "sheet", "label", "at", "look", "above", "below"], "properties": { "v": { "const": 1 }, "kind": { "const": "level" }, "sheet": { "type": "string" }, "label": { "type": "string" }, "at": { "type": "number" }, "look": { "const": "down" }, "above": { "type": "number", "exclusiveMinimum": 0 }, "below": { "type": "number", "exclusiveMinimum": 0 } } }] } } } },
52
- "prop_labels": {
53
- "type": "object",
54
- "additionalProperties": true,
55
- "description": "Draft-only display state (like dim_overlays): which member properties render as text-chip labels on the 2D/3D canvas, the anchor placement, and scope. Model-global. NOT baked into the lock / 3D scene / IFC / BOM.",
56
- "properties": {
57
- "props": { "type": "array", "items": { "type": "string" }, "description": "Checked property registry keys to show as labels (e.g. 'profile', 'tos_start')." },
58
- "placement": { "enum": ["start", "mid", "end"], "description": "Anchor point of the label stack on each member." },
59
- "selected_only": { "type": "boolean", "description": "When true, labels pin to `ids` (captured at check time); otherwise every member on the plan with a value is labeled." },
60
- "ids": { "type": "array", "items": { "type": "string" }, "description": "Member ids the labels pin to, used only when selected_only is true." }
61
- }
62
- }
63
- },
64
- "$defs": {
65
- "detailPlacement": {
66
- "type": "object",
67
- "required": ["id"],
68
- "properties": {
69
- "id": { "type": "string", "description": "Stable, sheet-unique placement id." },
70
- "detailName": { "type": "string", "description": "Key into custom_details for the image bytes." },
71
- "sheet": { "type": "string", "description": "Sheet the detail was placed against (targeting scope)." },
72
- "anchorId": { "type": ["string", "null"], "description": "Host member id the detail was dropped onto, or null (free placement)." },
73
- "pos": { "type": "array", "items": { "type": "number" }, "description": "World-scene mm [x,y,z] of the plane centre." },
74
- "u": { "type": "array", "items": { "type": "number" }, "description": "In-plane x-axis basis from the picked face." },
75
- "n": { "type": "array", "items": { "type": "number" }, "description": "Plane-normal basis from the picked face." },
76
- "rotZ": { "type": "number", "description": "In-plane rotation about the plane normal, degrees." },
77
- "size": { "type": "number", "description": "Plane width in mm (height follows the image aspect)." },
78
- "opacity": { "type": "number", "minimum": 0, "maximum": 1 }
79
- },
80
- "additionalProperties": true
81
- },
82
- "gridLine": {
83
- "type": "object",
84
- "required": ["id", "label", "a", "b"],
85
- "additionalProperties": true,
86
- "description": "One standalone structural grid/reference line, including skewed or partial lines that do not belong to the orthogonal X/Y spacing family.",
87
- "properties": {
88
- "id": { "type": "string", "description": "Stable id for editing and 3D snap provenance." },
89
- "label": { "type": "string", "description": "Bubble text shown at both ends." },
90
- "a": { "$ref": "#/$defs/point2", "description": "First endpoint in this plan's display space." },
91
- "b": { "$ref": "#/$defs/point2", "description": "Second endpoint in this plan's display space." }
92
- }
93
- },
94
- "grid": {
95
- "type": ["object", "null"],
96
- "required": ["origin"],
97
- "additionalProperties": true,
98
- "description": "Structural grid: X/Y are RELATIVE comma-separated spacing strings (for example \"0'-0\\\", 3*25'-0\\\", 20'-6 1/2\\\"\"; n*d repeats a bay), while Z is a comma-separated list of ABSOLUTE elevations. Spaces may occur inside a mixed fraction, so commas are required for fractional multi-value lists. web/grid-core.js is the parser/geometry source of truth.",
99
- "properties": {
100
- "on": { "type": "boolean", "description": "Grid visible (2D + 3D). Default true." },
101
- "origin": { "$ref": "#/$defs/point2", "description": "The [1,A] corner, display space (same space as member wp)." },
102
- "x": { "type": "string", "description": "Relative spacings along +X, comma-separated, e.g. \"0'-0\\\", 3*25'-0\\\"\"." },
103
- "y": { "type": "string", "description": "Relative spacings up the sheet, comma-separated, e.g. \"0'-0\\\", 4*30'-0\\\"\"." },
104
- "z": { "type": "string", "description": "Absolute level elevations, comma-separated, e.g. \"0'-0\\\", 16'-6\\\"\"." },
105
- "labels_x": { "type": "string", "description": "Whitespace-separated label overrides for X lines; blank = auto 1,2,3…" },
106
- "labels_y": { "type": "string", "description": "Whitespace-separated label overrides for Y lines; blank = auto A,B,C…" },
107
- "labels_z": { "type": "array", "items": { "type": "string", "maxLength": 40 }, "description": "Editable level labels aligned to the authored Z entries. Blank entries fall back to the canonical elevation." },
108
- "hidden_z": { "type": "array", "items": { "type": "number" }, "description": "Sparse list of canonical level elevations, in mm, whose grid plane and tag are hidden in 3D. Omitted levels remain visible." },
109
- "ext": { "type": "number", "description": "How far lines run past the outermost line, in mm. Default 5'." },
110
- "ends_x": { "type": "object", "description": "Per-line extent overrides for X lines: { \"<line index>\": [lo, hi] } display px along the line (a partial line like a 5.1 insert covering one wing). null / absent element = the auto full span. Set by dragging a bubble along its line." },
111
- "ends_y": { "type": "object", "description": "Per-line extent overrides for Y lines — same shape as ends_x." },
112
- "lines": { "type": "array", "items": { "$ref": "#/$defs/gridLine" }, "description": "Standalone free-angle grid/reference lines. Endpoints are display-space points, same as member work-points and dimensions." }
113
- }
114
- },
115
- "filter": {
116
- "type": "object",
117
- "additionalProperties": true,
118
- "description": "Steel filter pre-stage. Lines render as SVG paths over a dimmed page raster; text spans make profile labels pickable (and feed the label-binding step).",
119
- "properties": {
120
- "active": { "type": "integer", "description": "Index into `sheets` of the active framing plan (mirrors the top-level plans/active)." },
121
- "sheets": {
122
- "type": "array",
123
- "items": { "$ref": "#/$defs/filterSheet" },
124
- "description": "Per-sheet filter GEOMETRY — one entry per confirmed framing plan. The facets (layers/thicknesses/colors), `mode` and on-flag selection are GLOBAL (top-level here) and apply to every sheet."
125
- },
126
- "page": {
127
- "type": "object",
128
- "required": ["w", "h"],
129
- "description": "LEGACY pre-multisheet single-page geometry (now per-sheet in `sheets[]`). normalizeFilter wraps it into one sheet on load; the view migrates it into `sheets` on Save. When present, w and h are required and positive.",
130
- "properties": {
131
- "w": { "type": "number", "minimum": 1 },
132
- "h": { "type": "number", "minimum": 1 },
133
- "bg_b64": { "type": "string", "description": "Base64 JPEG of the page (title block excluded). CONFIDENTIAL — machine-local, stripped from the baked .flo (contract-bake.ts), never committed." },
134
- "rect": { "type": "array", "items": { "type": "number" }, "minItems": 4, "maxItems": 4, "description": "[x0,y0,x1,y1] in vector-frame coords: the region `bg_b64` was clipped to, so the viewer registers the raster to it (not the whole page). Absent = covers the steelBbox (legacy)." }
135
- }
136
- },
137
- "steelBbox": { "type": "array", "items": { "type": "number" }, "minItems": 4, "maxItems": 4, "description": "[x0,y0,x1,y1] of the steel linework, for Zoom-to-steel." },
138
- "mode": { "enum": ["", "thickness", "layer", "color", "thickness+layer", "thickness+color", "layer+color", "thickness+layer+color"], "description": "Active match dimensions, '+'-joined and AND-ed (canonical order: thickness, layer, color). Any combo of layer/thickness/color; \"\" = match nothing (all boxes unchecked — a valid saved state)." },
139
- "hide_title_block": { "type": "boolean" },
140
- "layers": {
141
- "type": "array",
142
- "items": {
143
- "type": "object",
144
- "required": ["name"],
145
- "additionalProperties": true,
146
- "properties": {
147
- "name": { "type": "string" },
148
- "count": { "type": "number" },
149
- "steel": { "type": "boolean", "description": "Heuristic steel layer — defaults ON at first load." },
150
- "drawable": { "type": "boolean", "description": "false = listed but not drawn (e.g. a text/title-block layer)." },
151
- "on": { "type": "boolean", "description": "Persisted selection state." }
152
- }
153
- }
154
- },
155
- "thicknesses": {
156
- "type": "array",
157
- "items": {
158
- "type": "object",
159
- "required": ["w"],
160
- "additionalProperties": true,
161
- "properties": {
162
- "w": { "type": "number", "description": "Stroke width in pt." },
163
- "count": { "type": "number" },
164
- "on": { "type": "boolean" }
165
- }
166
- }
167
- },
168
- "colors": {
169
- "type": "array",
170
- "items": {
171
- "type": "object",
172
- "required": ["hex"],
173
- "additionalProperties": true,
174
- "properties": {
175
- "hex": { "type": "string" },
176
- "count": { "type": "number" },
177
- "on": { "type": "boolean" }
178
- }
179
- }
180
- },
181
- "elements": {
182
- "type": "array",
183
- "description": "Every drawing element: lines (with an SVG path `d`), text spans (with `text`+`bbox`) and circles (`cx`/`cy`/`r` — grid bubbles, callout balloons), each tagged layer/thickness/colour.",
184
- "items": {
185
- "type": "object",
186
- "additionalProperties": true,
187
- "properties": {
188
- "kind": { "enum": ["line", "text", "circle"] },
189
- "layer": { "type": "string" },
190
- "w": { "type": "number" },
191
- "color": { "type": "string" },
192
- "d": { "type": "string", "description": "SVG path (line elements)." },
193
- "text": { "type": "string", "description": "Label text (text elements)." },
194
- "bbox": { "type": "array", "items": { "type": "number" }, "description": "[x0,y0,x1,y1] (text elements)." },
195
- "cx": { "type": "number", "description": "Circle centre X (circle elements)." },
196
- "cy": { "type": "number", "description": "Circle centre Y (circle elements)." },
197
- "r": { "type": "number", "description": "Circle radius (circle elements)." },
198
- "dashed": { "type": "boolean" }
199
- }
200
- }
201
- }
202
- }
203
- },
204
- "filterSheet": {
205
- "type": "object",
206
- "required": ["elements"],
207
- "additionalProperties": true,
208
- "description": "One framing plan's filter geometry. The dimmed `page.bg_b64` raster is CONFIDENTIAL — machine-local, stripped from the baked .flo (contract-bake.ts), never committed.",
209
- "properties": {
210
- "sheet": { "type": "string", "description": "Sheet number, e.g. S-201 — the switcher label." },
211
- "title": { "type": "string" },
212
- "page": {
213
- "type": "object",
214
- "required": ["w", "h"],
215
- "properties": {
216
- "w": { "type": "number", "minimum": 1 },
217
- "h": { "type": "number", "minimum": 1 },
218
- "bg_b64": { "type": "string", "description": "Base64 JPEG of this sheet (title block excluded). CONFIDENTIAL — stripped before bake, never committed." },
219
- "rect": { "type": "array", "items": { "type": "number" }, "minItems": 4, "maxItems": 4, "description": "[x0,y0,x1,y1] in the same vector-frame coords as element `d` paths: the region `bg_b64` was clipped to. The viewer registers the raster to THIS rect (not the whole page) so it aligns 1:1 with the linework. Absent = the raster covers the steelBbox (legacy)." }
220
- }
221
- },
222
- "steelBbox": { "type": "array", "items": { "type": "number" }, "minItems": 4, "maxItems": 4, "description": "[x0,y0,x1,y1] of this sheet's steel linework, for Zoom-to-steel." },
223
- "elements": {
224
- "type": "array",
225
- "description": "This sheet's drawing elements: lines (SVG path `d`), text spans (`text`+`bbox`) and circles (`cx`/`cy`/`r` — grid bubbles feed the editor's grid-from-drawing detector), each tagged layer/thickness/colour.",
226
- "items": {
227
- "type": "object",
228
- "additionalProperties": true,
229
- "properties": {
230
- "kind": { "enum": ["line", "text", "circle"] },
231
- "layer": { "type": "string" },
232
- "w": { "type": "number" },
233
- "color": { "type": "string" },
234
- "d": { "type": "string" },
235
- "text": { "type": "string" },
236
- "bbox": { "type": "array", "items": { "type": "number" } },
237
- "cx": { "type": "number" },
238
- "cy": { "type": "number" },
239
- "r": { "type": "number" },
240
- "dashed": { "type": "boolean" }
241
- }
242
- }
243
- }
244
- }
245
- },
246
- "connection": {
247
- "type": "object",
248
- "required": ["id", "type"],
249
- "additionalProperties": true,
250
- "description": "One connection-library row. `detail` is the firm's VENDOR-NEUTRAL design detail#; `targets` is an open map platform→component id (tekla/sds2/revit/…), never hardcoded to one platform. A row may also say what the detail BUILDS (`recipe`) and carry the notes that come with it (`notes`), which is what lets a detail bound to a member end become real connection geometry — see server/detail-recipes.ts.",
251
- "properties": {
252
- "id": { "type": "string", "description": "Stable row id, e.g. cx-moment-1." },
253
- "type": { "type": "string", "description": "moment | drag | shear | braced | pinned | fixed (free string allowed)." },
254
- "detail": { "type": "string", "description": "Design detail number, e.g. 50S504 — the firm's document, platform-neutral. Also the key an end's `detail` callout is matched against, on a NARROW normalisation (case/whitespace, and -/ treated alike); a callout matching two rows is refused as ambiguous rather than resolved to either." },
255
- "targets": { "type": "object", "additionalProperties": { "type": "string" }, "description": "platform → component id, e.g. { \"tekla\": \"146\" }. Open map; add sds2/revit freely." },
256
- "source": { "enum": ["company-rules", "user", "drawing"], "description": "Where the row came from (drives the connection confidence band)." },
257
- "recipe": { "$ref": "#/$defs/connectionRecipe", "description": "What this detail builds. Absent = the row is an identity/mapping only (its ends can still be annotated; they just can't be built from it)." },
258
- "notes": {
259
- "type": "array",
260
- "items": { "type": "object", "required": ["text"], "additionalProperties": true, "properties": {
261
- "text": { "type": "string", "description": "The note verbatim, e.g. \"All bolts 3/4\\\"Ø A325 UNO\"." },
262
- "source": { "type": "string", "description": "drawing | user | ai — where the note came from." }
263
- } },
264
- "description": "Everything else the detail says — the rules the detailing must follow. STORED, SURFACED and RELAYED to the terminal AI, never interpreted by the UI (turning a note into params is an AI read; floless does not call an LLM). Rendered escaped."
265
- },
266
- "image": { "type": "string", "description": "Optional `custom_details` key for this detail's figure. Explicit because the fallback (previewFor) parses S-### sheet names, which is a convention no project is required to follow." }
267
- }
268
- },
269
- "connectionRecipe": {
270
- "type": "object",
271
- "additionalProperties": true,
272
- "description": "A detail as a buildable thing: a TYPICAL arrangement (`kind` + `params`) plus a `schedule` that varies the numbers by member size. Real details work this way — a typical figure on the sheet, dimensions in a table beside it — so one row covers every size it is drawn for.",
273
- "properties": {
274
- "kind": { "type": "string", "description": "The joint kind this detail builds: base-plate | shear-plate (a new engine kind needs no schema change here). A base-plate resolves only at a column base and a shear-plate only at a beam end; the mismatch is refused." },
275
- "params": { "type": "object", "additionalProperties": true, "description": "The typical detail's geometry settings (mm), same vocabulary as `joint.params`. Sparse — engine defaults fill the rest at expansion time, never here." },
276
- "schedule": {
277
- "type": "array",
278
- "items": { "$ref": "#/$defs/connectionScheduleRow" },
279
- "description": "Per-size variation, merged OVER `params`. SPECIFICITY-ranked, not author-ordered, so a catch-all written first cannot kill the rows after it. If a schedule is present and a member's size matches no row, that end is REFUSED rather than quietly given the typical's numbers — the schedule exists because the numbers vary."
280
- }
281
- }
282
- },
283
- "connectionScheduleRow": {
284
- "type": "object",
285
- "additionalProperties": true,
286
- "description": "One schedule line: which members it covers, and what it changes for them.",
287
- "properties": {
288
- "match": {
289
- "type": "object",
290
- "additionalProperties": true,
291
- "description": "Matchers, ANDed. An EMPTY object is the catch-all. Ranked most-specific-first: profile → profilePrefix → depth → role → catch-all; a row carrying several ranks by its most specific one, and a tie inside a rank breaks on document order.",
292
- "properties": {
293
- "profile": { "type": "string", "description": "Exact designation, compared canonically (case / x-vs-× / spacing insensitive)." },
294
- "profilePrefix": { "type": "string", "description": "Designation prefix, e.g. \"W18\" — plain string matching, so it works on any naming system (metric, European, bespoke), tabulated or not." },
295
- "depth": {
296
- "type": "object", "required": ["unit"], "additionalProperties": true,
297
- "description": "Actual section depth range, inclusive. A designation with no tabulated depth FAILS this matcher rather than being assigned one — use profilePrefix for those.",
298
- "properties": {
299
- "min": { "type": "number" }, "max": { "type": "number" },
300
- "unit": { "enum": ["in", "mm"], "description": "REQUIRED — a bare number is not a measurement." }
301
- }
302
- },
303
- "role": { "enum": ["beam", "column"], "description": "Member role." }
304
- }
305
- },
306
- "params": { "type": "object", "additionalProperties": true, "description": "Overrides for the members this row covers — only the keys it names; everything else falls through to the typical." }
307
- }
308
- },
309
- "joint": {
310
- "type": "object",
311
- "required": ["id", "kind"],
312
- "additionalProperties": true,
313
- "description": "A placed connection the connection engine expands into real 3D parts. A parametric RECIPE kind (base-plate, shear-plate) derives all geometry from its `params` + the live member positions, so it moves/re-solves with its members. A 'custom' kind is an imported connection (read from IFC via AWARE's connection-reader) that carries its own opaque tessellated `geometry` and a `place` point — move / replace only, no per-dimension edit. Distinct from the `connections[]` library (vendor-neutral type/detail/targets identities a joint can cite). v1 kinds: base-plate, shear-plate, custom.",
314
- "properties": {
315
- "id": { "type": "string", "minLength": 1, "description": "Stable joint id, e.g. j-bp-1 / sp-b3-e0 / cx-<id>. NON-EMPTY, matching steel.model/v2: every connection part's scene id is derived as `${joint.id}:…`, so a blank id yields parts named `:plate` / `:rod0` and the joint is recorded as the positional `joint#<i>` instead — a specified connection that reaches neither the model, IFC nor Tekla, while the inventory gate still reports ok. `required` alone permitted \"\"." },
316
- "kind": { "type": "string", "description": "Connection kind: base-plate, shear-plate (parametric recipes the engine expands), or custom (imported IFC geometry). end-plate / cap-plate / … follow." },
317
- "main": { "type": "string", "description": "Id of the host member this joint hangs off. For a base-plate this is the column; for a shear-plate this is the SUPPORTED BEAM (the joint sits at one of the beam's ends — see `at`). Required for the recipe kinds; optional for 'custom' (an imported connection carries its own geometry rather than deriving it from a member)." },
318
- "secondaries": { "type": "array", "items": { "type": "string" }, "description": "Ids of the other members this joint binds — e.g. the SUPPORT a shear-plate frames into. Optional and inferred by geometry; the shear-plate engine does not require it (the fin plate is placed off the beam end + beam axis). Empty for a base-plate." },
319
- "at": { "type": "string", "description": "Where on the main member the joint sits (kind-dependent): base-plate = base; shear-plate = end0 | end1 — the beam end framing into the support (end0 ↔ ends[0]/start, end1 ↔ ends[1]/end)." },
320
- "conn": { "type": "string", "description": "Optional `connections[]` row id this joint cites for its type/detail identity (keeps the connection library + confidence scoring in play)." },
321
- "params": { "type": "object", "additionalProperties": true, "description": "Geometry settings (mm) with engine defaults; absent = all defaults. base-plate: plateWidth/plateDepth/thickness, boltCols/boltRows/boltDia/edgeDist, weldLeg, anchor kit, levelingNut. shear-plate: plateThickness, plateWidth (along the beam), plateHeight (vertical), boltCols/boltRows/boltDia/boltPitch/edgeDist, weldLeg, clearance (the erection gap so the beam clears the support, ~½–¾\"; pulls the beam box back), webSide (+1/-1 — which face of the beam web the plate laps), boltGrade (A325 | A490 — the AISC bolt length auto-sizes from the grip), stiffener (bool — a full-height stiffener on the far side of a girder web). Not used by 'custom'." },
322
- "source": { "enum": ["auto", "user"], "description": "auto = proposed by auto-detail from the takeoff; user = placed/edited by hand." },
323
- "verified": { "type": "boolean", "description": "True = a human confirmed this joint." },
324
- "name": { "type": "string", "description": "custom only: display label carried from the source IFC (e.g. \"COLUMN C102\")." },
325
- "place": { "$ref": "#/$defs/point3", "description": "custom only: the world-mm point the connection's LOCAL `geometry` is translated by — its placement in the model." },
326
- "geometry": { "type": "array", "items": { "$ref": "#/$defs/meshPart" }, "description": "custom only: imported mesh parts (one per plate/bolt/weld) in the connection's LOCAL mm frame (re-anchored at import from the reader's WORLD-mm output — the LOCAL frame is floless's own placement transform). Read once from IFC by AWARE's connection-reader `extract`, whose output is the source of truth for this mesh shape (see #/$defs/meshPart); opaque tessellated geometry (no per-dimension edit)." }
327
- },
328
- "allOf": [
329
- { "if": { "properties": { "kind": { "enum": ["base-plate", "shear-plate"] } } }, "then": { "required": ["main"] } },
330
- { "if": { "properties": { "kind": { "const": "custom" } } }, "then": { "required": ["geometry"] } }
331
- ]
332
- },
333
- "meshPart": {
334
- "type": "object",
335
- "required": ["positions", "indices"],
336
- "additionalProperties": true,
337
- "description": "One tessellated mesh part of a 'custom' connection (a plate / bolt / weld), in the connection's LOCAL mm frame: flat x,y,z position triples + 0-based triangle indices — AWARE's generic kind:\"mesh\" scene primitive. Shape is AWARE-owned: the source of truth is aware-aeco's connection-reader `extract` output (manifest.yaml + commands/extract.md). floless only consumes it — never hand-authored, never re-defined here.",
338
- "properties": {
339
- "id": { "type": "string", "description": "Source part id (the IFC element GlobalId)." },
340
- "role": { "type": "string", "description": "Hardware role from the source IFC: plate | bolt | weld." },
341
- "positions": { "type": "array", "items": { "type": "number" }, "description": "Flat x,y,z vertex coordinates (mm), local to the connection; length is a multiple of 3." },
342
- "indices": { "type": "array", "items": { "type": "number" }, "description": "0-based triangle vertex indices (triples) into positions." }
343
- }
344
- },
345
- "point2": {
346
- "type": "array",
347
- "items": { "type": "number" },
348
- "minItems": 2,
349
- "maxItems": 2,
350
- "description": "An [x,y] pair in display space (or [fx,fy] normalized for bubbles)."
351
- },
352
- "point3": {
353
- "type": "array",
354
- "items": { "type": "number" },
355
- "minItems": 3,
356
- "maxItems": 3,
357
- "description": "An [x,y,z] point in world-scene mm (Z-up), matching contract-to-scene output."
358
- },
359
- "plan": {
360
- "type": "object",
361
- "required": ["sheet", "members"],
362
- "additionalProperties": true,
363
- "properties": {
364
- "sheet": { "type": "string", "description": "Sheet number, e.g. S-202." },
365
- "title": { "type": "string" },
366
- "clip": {
367
- "type": "array",
368
- "items": { "type": "number" },
369
- "minItems": 4,
370
- "maxItems": 4,
371
- "description": "[x0,y0,x1,y1] display-space crop of the framing area."
372
- },
373
- "pt_per_ft": { "type": "number", "description": "Display points per foot (the drawing scale)." },
374
- "default_tos": { "type": "number", "description": "Default top-of-steel elevation in inches for blank ends on this plan." },
375
- "raster_b64": { "type": "string", "description": "Base64 raster of the framing area. CONFIDENTIAL — never committed." },
376
- "segments": { "type": "array", "items": { "$ref": "#/$defs/segment" } },
377
- "labels": { "type": "array", "items": { "$ref": "#/$defs/label" } },
378
- "details": { "type": "array", "items": { "$ref": "#/$defs/detail" } },
379
- "callouts": { "type": "array", "items": { "$ref": "#/$defs/callout" }, "description": "Drawing cross-references drawn ON this plan that point to another sheet (section cuts, elevation marks, detail refs). The editor renders a clickable bubble at each `disp` that jumps to the referenced sheet." },
380
- "tos_callouts": { "type": "array", "items": { "$ref": "#/$defs/tos_callout" } },
381
- "members": { "type": "array", "items": { "$ref": "#/$defs/member" } },
382
- "dims": { "type": "array", "items": { "$ref": "#/$defs/dim" }, "description": "Draft-only on-drawing dimensions (editor annotations). NOT baked into the lock / 3D / IFC / BOM." },
383
- "frame": { "$ref": "#/$defs/frame" },
384
- "grid": { "$ref": "#/$defs/grid", "description": "Structural grid lines. PER-PLAN — its origin/spacings live in this sheet's display space (like frame/dims). A plan REFERENCE the editor renders in 2D + 3D and snaps to — it never constrains members and is NOT baked into the lock / IFC / BOM." }
385
- }
386
- },
387
- "segment": {
388
- "type": "object",
389
- "required": ["id", "a", "b"],
390
- "additionalProperties": true,
391
- "properties": {
392
- "id": { "type": "string" },
393
- "a": { "$ref": "#/$defs/point2" },
394
- "b": { "$ref": "#/$defs/point2" },
395
- "o": { "enum": ["H", "V", "D"], "description": "Orientation: horizontal / vertical / diagonal." }
396
- }
397
- },
398
- "dim": {
399
- "type": "object",
400
- "required": ["id", "a", "b", "axis", "off"],
401
- "additionalProperties": true,
402
- "properties": {
403
- "id": { "type": "string" },
404
- "a": { "$ref": "#/$defs/point2", "description": "First snapped anchor, display space." },
405
- "b": { "$ref": "#/$defs/point2", "description": "Second snapped anchor, display space." },
406
- "axis": { "enum": ["free", "x", "y"], "description": "free = aligned distance hypot(b-a); x = along local-X; y = along local-Y. With no frame (rot 0) x/y are screen-horizontal/vertical." },
407
- "off": { "type": "number", "description": "Dimension-line offset: for axis x the dim-line Y; for axis y the dim-line X; for free the signed perpendicular distance from the a-b baseline. Stored in the dim's own (rot-rotated) frame." },
408
- "rot": { "type": "number", "description": "Local-frame bearing (radians) baked at creation; 0 = global axes. x/y measure along this rotated frame so resetting the plan frame never moves placed dims." },
409
- "aRef": { "$ref": "#/$defs/dimRef", "description": "F9 magnetic dim: OPTIONAL link from anchor a to a plain beam's work-point in THIS plan. When present the ref is authoritative and a is a cache reanchored from the member every render; editor-only, stripped before bake (contract-bake deletes each plan's whole dims array — never in the lock / 3D / IFC / BOM)." },
410
- "bRef": { "$ref": "#/$defs/dimRef", "description": "As aRef, for anchor b." },
411
- "pin": { "type": "boolean", "description": "F9 magnetic dim: false = the link is DORMANT (user unpinned it) — the refs are kept but the dim neither follows its members nor moves them on a value edit, until re-pinned. Absent/true = pinned (magnetic). Only meaningful alongside aRef/bRef; dropped by the sanitizer otherwise. Editor-only like the refs." }
412
- }
413
- },
414
- "dimRef": {
415
- "type": "object",
416
- "additionalProperties": false,
417
- "description": "One of TWO shapes (the in-house validator has no oneOf, so both keys are optional here; the editor's load-boundary sanitizer enforces the real invariant): a MEMBER ref {m, pt} or a GRID-LINE ref {g}.",
418
- "properties": {
419
- "m": { "type": "string", "description": "Member ref: a member id in the SAME plan the dim lives in. Beams and columns — never a brace (a ref to anything else is dropped at the load boundary / on reanchor). Pair with pt." },
420
- "pt": { "enum": ["a", "b", "mid"], "description": "Member ref: which of the member's DRAWN points the anchor tracks — a = start work-point, b = end work-point, mid = midpoint. A column resolves to its single plan point regardless." },
421
- "g": { "type": "string", "description": "Grid-line ref: the plan-local synthetic grid id ('gv:<i>' / 'gh:<i>' spacing lines, 'gl:<id>' free lines — the same ids the grid selection uses). The anchor is the grid line ∩ the dim's own offset row; index-based, so a respace/re-infer safe-freezes the dim." }
422
- }
423
- },
424
- "dim3": {
425
- "type": "object",
426
- "required": ["id", "a", "b", "axis"],
427
- "additionalProperties": true,
428
- "properties": {
429
- "id": { "type": "string" },
430
- "a": { "$ref": "#/$defs/point3", "description": "First snapped anchor, world-scene mm." },
431
- "b": { "$ref": "#/$defs/point3", "description": "Second snapped anchor, world-scene mm." },
432
- "axis": { "enum": ["free", "x", "y", "z"], "description": "free = 3D distance ‖b-a‖; x|y = the component along the local-frame X/Y (see axisDir) when a frame was active at placement, else the global world X/Y; z = the world-Z (elevation) component. The dim line is drawn along that direction for x|y|z." },
433
- "axisDir": { "type": "array", "items": { "type": "number" }, "minItems": 3, "maxItems": 3, "description": "Optional world direction an x|y measurement runs along, captured from the active local frame (frame3d) at placement; normalized on read. Absent/legacy, or a degenerate (zero/overflow) vector, or presence on z|free → the measurement falls back to the normal `axis` behavior (the world X/Y/Z component, or the full 3D distance for free). Editor-only like the whole dims3d array: stripped before bake, never in the lock / IFC / BOM." }
434
- }
435
- },
436
- "frame": {
437
- "type": ["object", "null"],
438
- "description": "Optional per-plan local coordinate frame for skewed framing. null/absent = global axes. Affects only editor ortho-snapping + X/Y dimensions; NOT baked into the lock / 3D / IFC / BOM.",
439
- "required": ["o", "u"],
440
- "additionalProperties": true,
441
- "properties": {
442
- "o": { "$ref": "#/$defs/point2", "description": "Frame origin, display space (glyph anchor)." },
443
- "u": { "$ref": "#/$defs/point2", "description": "Unit local-X direction [ux,uy], display space. Local-Y = [uy,-ux]." }
444
- }
445
- },
446
- "label": {
447
- "type": "object",
448
- "required": ["text", "disp"],
449
- "additionalProperties": true,
450
- "properties": {
451
- "text": { "type": "string" },
452
- "disp": { "$ref": "#/$defs/point2" }
453
- }
454
- },
455
- "detail": {
456
- "type": "object",
457
- "required": ["text"],
458
- "additionalProperties": true,
459
- "properties": {
460
- "text": { "type": "string", "description": "Callout, e.g. \"2-S-302\"." },
461
- "disp": { "$ref": "#/$defs/point2" }
462
- }
463
- },
464
- "callout": {
465
- "type": "object",
466
- "required": ["kind", "target"],
467
- "additionalProperties": true,
468
- "description": "A drawing cross-reference drawn ON this plan that points to another sheet — a section cut, an elevation mark, or a detail reference. Clicking its bubble in the editor jumps to the referenced sheet (a loaded plan → switch to it & frame it; otherwise the detail lightbox).",
469
- "properties": {
470
- "kind": { "enum": ["section", "elevation", "detail-ref"], "description": "section = a section cut symbol; elevation = an elevation / interior-elevation mark; detail-ref = a detail callout pointing to another sheet." },
471
- "text": { "type": "string", "description": "The mark as drawn, e.g. \"A\", \"A-A\", \"3/S-501\"." },
472
- "disp": { "$ref": "#/$defs/point2", "description": "Where the mark is drawn on THIS plan (display space) — the clickable hotspot anchor." },
473
- "target": {
474
- "type": "object",
475
- "additionalProperties": true,
476
- "description": "Where the mark points.",
477
- "properties": {
478
- "sheet": { "type": "string", "description": "Referenced sheet, e.g. S-301." },
479
- "number": { "type": "string", "description": "Detail / section number on that sheet, e.g. \"A\" or \"3\"." }
480
- }
481
- }
482
- }
483
- },
484
- "tos_callout": {
485
- "type": "object",
486
- "required": ["elev_in"],
487
- "additionalProperties": true,
488
- "properties": {
489
- "elev_in": { "type": "number", "description": "Top-of elevation in inches." },
490
- "type": { "enum": ["TOS", "TOD", "TOC"], "description": "Top of steel / deck / concrete." },
491
- "disp": { "$ref": "#/$defs/point2" }
492
- }
493
- },
494
- "member": {
495
- "type": "object",
496
- "required": ["id", "profile", "wp"],
497
- "additionalProperties": true,
498
- "properties": {
499
- "id": { "type": "string" },
500
- "profile": { "type": "string", "description": "AISC designation (e.g. W16X26) or an unresolved mark (e.g. MF). Empty string allowed for an unprofiled member." },
501
- "material": { "type": "string", "description": "ASTM material grade, e.g. A992 / A572-50 / A500. Absent = derive the default from the section family (W→A992, HSS→A500, plate/angle→A572/A36). Populated by the reader from the drawing's general-notes grade table (Slice 5b); the History semantic diff surfaces a change to it as the Material facet." },
502
- "wp": {
503
- "type": "array",
504
- "items": { "$ref": "#/$defs/point2" },
505
- "minItems": 2,
506
- "maxItems": 2,
507
- "description": "Work-point endpoints [[x,y],[x,y]] in display space."
508
- },
509
- "angle": { "enum": ["H", "V", "D"] },
510
- "role": { "enum": ["beam", "column"], "description": "Defaults to beam when absent." },
511
- "position": { "enum": ["top", "middle", "bottom"], "description": "Profile placement relative to the reference line (the work-line between the two work-points) — the section's depth position. top = line at the section top (steel hangs below); middle = line through the centroid; bottom = line at the section bottom. When absent the editor defaults a flat beam to top (line = top of steel), and a column, a VERTICAL brace (whatever its slope — its work-points sit on the column centre-lines) or a steep beam to middle." },
512
- "rfi": { "type": "boolean", "description": "True when the size is unresolved (excluded from the BOM)." },
513
- "mf": { "type": "boolean", "description": "Moment-frame member (persistent flag)." },
514
- "memberType": { "type": "string", "description": "Member category driving the legend (e.g. beam, ledger, brace). 'brace' is special: the member draws with the brace symbology and is excluded from every beam-only path (merge, reversed-beams, shear plates)." },
515
- "brace": {
516
- "type": "object",
517
- "description": "Brace symbology — present only when memberType is 'brace'. `floor` and `offset` are 2D-PLAN DISPLAY ONLY: the 3D bake, IFC and Tekla export always use the member's true wp + end TOS.",
518
- "properties": {
519
- "type": { "enum": ["lateral", "vertical"], "description": "vertical = diagonal frame bracing spanning two column centre-lines (symbol drawn offset). lateral = a kicker between beams (drawn at its true work-points, never offset)." },
520
- "floor": { "enum": ["above", "below"], "description": "Vertical braces only. above = continuous line; below = dashed line." },
521
- "offset": { "type": "number", "description": "Vertical braces only. Signed perpendicular distance (INCHES) from the work-point line to the DRAWN symbol line; a negative value draws it on the other side. Display-only — it never moves the work-points." },
522
- "lowerEnd": { "enum": [0, 1], "description": "Optional override of which work-point is the lower (double-arrowhead) end. Absent = derived from the ends' effective TOS (tie -> end 0)." }
523
- },
524
- "additionalProperties": false
525
- },
526
- "ends": {
527
- "type": "array",
528
- "items": { "$ref": "#/$defs/end" },
529
- "minItems": 2,
530
- "maxItems": 2,
531
- "description": "Per-end metadata (beam variant); index 0 and 1 match wp's two endpoints."
532
- },
533
- "col": { "$ref": "#/$defs/col" }
534
- }
535
- },
536
- "end": {
537
- "type": "object",
538
- "additionalProperties": true,
539
- "properties": {
540
- "tos": { "type": ["number", "null"], "description": "Top-of-steel elevation in inches at this end." },
541
- "note": { "type": "string", "description": "Connection note (e.g. moment, shear, braced)." },
542
- "tosDef": { "type": "boolean", "description": "True = follows the plan default; false = read from a drawing callout or set by hand." },
543
- "detail": { "type": "string", "description": "Connection detail reference, e.g. \"5-S504\"." },
544
- "conn": { "type": "string", "description": "Connection-library row id this end uses (references `connections[].id`). Empty = fall back to `note`/`detail`." },
545
- "connVerified": { "type": "boolean", "description": "True = a human confirmed this end's connection (scores Verified)." }
546
- }
547
- },
548
- "col": {
549
- "type": "object",
550
- "additionalProperties": true,
551
- "properties": {
552
- "bos": { "type": ["number", "null"], "description": "Bottom-of-steel elevation in inches." },
553
- "tos": { "type": ["number", "null"], "description": "Top-of-steel elevation in inches." },
554
- "note": { "type": "string" },
555
- "tosDef": { "type": "boolean", "description": "True = follows the plan default; false = read from a drawing callout or set by hand." },
556
- "detail": { "type": "string" },
557
- "conn": { "type": "string", "description": "Connection-library row id for this column's connection (references `connections[].id`)." },
558
- "connVerified": { "type": "boolean", "description": "True = a human confirmed this column's connection (scores Verified)." }
559
- }
560
- }
561
- }
562
- }