@floless/app 0.170.0 → 0.171.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.
Files changed (53) hide show
  1. package/dist/floless-server.cjs +33000 -22928
  2. package/dist/schemas/steel.model.v2.schema.json +194 -3
  3. package/dist/skills/floless-app-bridge/SKILL.md +3 -3
  4. package/dist/skills/floless-app-knowledge/SKILL.md +4 -3
  5. package/dist/skills/floless-app-onboarding/SKILL.md +5 -4
  6. package/dist/skills/floless-app-onboarding/references/floless-surfaces.md +0 -3
  7. package/dist/skills/floless-app-queue/SKILL.md +2 -3
  8. package/dist/skills/floless-app-report-issue/SKILL.md +2 -2
  9. package/dist/skills/floless-app-steel-model/SKILL.md +35 -35
  10. package/dist/skills/floless-app-steel-model/references/custom-connections.md +47 -0
  11. package/dist/skills/floless-app-steel-model/references/custom-sections.md +32 -0
  12. package/dist/skills/floless-app-ui/SKILL.md +71 -126
  13. package/dist/web/add-ons.js +407 -0
  14. package/dist/web/analytics.js +1 -1
  15. package/dist/web/app.css +108 -189
  16. package/dist/web/app.js +11 -12
  17. package/dist/web/aware.js +49 -29
  18. package/dist/web/chat.css +6 -1
  19. package/dist/web/chat.js +133 -18
  20. package/dist/web/commands-filter.js +23 -0
  21. package/dist/web/commands-shell.js +39 -67
  22. package/dist/web/commands-steel.js +9 -1
  23. package/dist/web/commands-tekla-parser.js +23 -0
  24. package/dist/web/connections.js +14 -3
  25. package/dist/web/failure-copy.js +1 -0
  26. package/dist/web/guide.js +3 -3
  27. package/dist/web/index.html +29 -56
  28. package/dist/web/instructor.js +2 -2
  29. package/dist/web/kb-categories.js +64 -7
  30. package/dist/web/model-change-findings.js +430 -0
  31. package/dist/web/model-change-review.js +414 -0
  32. package/dist/web/model-editor-steel-adapter.js +2 -2
  33. package/dist/web/project-history.js +7 -1
  34. package/dist/web/revit-editor.css +85 -0
  35. package/dist/web/revit-editor.js +36 -1
  36. package/dist/web/sha256-sync.js +62 -0
  37. package/dist/web/steel-3d-core.js +7 -0
  38. package/dist/web/steel-3d-flo.js +127 -3
  39. package/dist/web/steel-3d-view.js +25 -2
  40. package/dist/web/steel-custom-connection.js +161 -0
  41. package/dist/web/steel-custom-sections.js +1796 -0
  42. package/dist/web/steel-editor.html +279 -41
  43. package/dist/web/steel-filter-usage.js +299 -0
  44. package/dist/web/steel-filter.html +101 -4
  45. package/dist/web/steel-model-v2-client-validation.js +3 -0
  46. package/dist/web/steel-model-v2-commands.js +95 -6
  47. package/dist/web/steel-model-v2-projection.js +1 -1
  48. package/dist/web/steel-read-confidence.js +1 -56
  49. package/dist/web/tekla-editor.html +1 -0
  50. package/dist/web/workspaces.js +263 -28
  51. package/launch.mjs +87 -9
  52. package/package.json +1 -1
  53. package/dist/web/panels.js +0 -831
@@ -0,0 +1,47 @@
1
+ # Custom connections (a detail no connection type models)
2
+
3
+ Stage 7 option (c), the default when no available connection type models a detail. A custom connection is
4
+ a `steel.connection/v1` definition: plates, bolt groups, welds, cuts and trims, each anchored to a named
5
+ face of a member the connection is bound to, never placed in world coordinates. The engine expands it the
6
+ same way every time, and FloLess labels the result "AI-assisted connection". Work in this order:
7
+
8
+ 1. **Compose the definition from the topology** you read in stage 7: which member's end the connection
9
+ sits at (the role with `end: true`), which faces bear, which plies each bolt group clamps (head side
10
+ first), which edges are welded. Every number the drawing states is a pinned param. Record where it came
11
+ from in `provenance` (`assisted: "ai"`, `source`, `evidence.sheetId`/`detailRef`).
12
+ 2. **Fill only what a detailing rule governs**: the minimum weld leg for the thinner ply, the minimum edge
13
+ distance, the standard hole size and the bolt length from grip. Write them as the rule
14
+ (`minWeldLeg(...)`, `minEdge(...)`, `holeDia(...)`, `boltLength(...)`) or record the value in
15
+ `provenance.assumptions` with its `basis: "rule-minimum"` and its clause. **Never guess a value that
16
+ sets the connection's shape or size**: the plate outline, a thickness, the bolt count, the bolt
17
+ positions, or which faces bear. If the drawing lacks one, stop and fall back to the question (a),
18
+ naming the missing value, as a detailer would raise an RFI for an undimensioned plate.
19
+ 3. **Run `steel.check-connection-definition`** with the definition and the member each role is bound to.
20
+ It builds the connection without saving anything and returns the parts, the rule values with their
21
+ clauses, every fit check and the expansion `identity`.
22
+ 4. **Apply only a clean fit** with `steel.apply-connection-definition` (a card the person confirms). It
23
+ builds nothing while any fit check is not met.
24
+ 5. **Otherwise fall back to (a)**, and name the failing check the way the check names it ("Parts clear of
25
+ each other and of the members: the gusset runs 4.8 mm into the angle leg"). Offer the person the choice
26
+ to keep it built anyway. **That choice is theirs alone.** Pass `acceptFailedFit` (each failing check
27
+ with the `identity` the check gave) only after they asked for it on that card. The connection is then
28
+ labelled "fit not met" everywhere it shows. Never mark a custom connection checked or reviewed.
29
+ Sign-off is the person's.
30
+
31
+ The signals of a forced fit in stage 7 apply to custom connections too, and stage 8 still applies in full.
32
+ The check measures the generic facts (bearing, head and nut bearing, grip, bolt length, edge distance, weld
33
+ line, clash), but you still read them and look at the result.
34
+
35
+ **The label.** The person can turn the "AI-assisted connection" label off for one connection or the whole
36
+ model (`steel.set-ai-assisted-label`). That hides only the visible label: FloLess's record and the export's
37
+ `meta.provenance` keep the fact. Never turn it off for them unasked.
38
+
39
+ ## In a Quick read
40
+
41
+ Build it the same way and record `{ channel: "unmodelled-detail", sheetId, detailRef }` with `chosen`
42
+ "built as a custom connection" and `value: { jointId, defId, version, identity, fit: [] }` from the check
43
+ and the apply. Each rule-minimum value you filled is also a `{ channel: "connection", jointId, covers }`
44
+ decision naming its clause. When a shape or size value is missing, or the fit check fails, nothing is
45
+ built: record the decision with option (a) "left unbuilt but recorded", leave `jointId` out of `value` and
46
+ list the failing check ids in `fit`. **Never pass `acceptFailedFit` in a Quick read**: keeping a failed fit
47
+ built is only the person's choice, in Make precise.
@@ -0,0 +1,32 @@
1
+ # Custom sections (a section no catalogue lists)
2
+
3
+ When a drawing calls for a section that no catalogue row describes — a welded plate girder, a built-up
4
+ I of stated plates, a tapered plate — make it a **custom section** instead of forcing the nearest
5
+ catalogue size (a near size is dimensionally wrong, and every weight and export built on it is too).
6
+
7
+ - **Evaluate first, then place.** `steel.evaluate-custom-section` takes a definition
8
+ (`{kind: "floless.section-profile", kindVersion: 1, id: "<add-on-id>/<name>@1", payload}`) and the
9
+ parameter values in mm, and answers the evaluated outline, area, mass per metre with its density basis,
10
+ and whether an IFC file can carry the shape. It writes nothing; show the person the section and the
11
+ numbers. Then `steel.place-custom-section` puts it on the members in ONE save (give the model tag from
12
+ `steel.read-model`). The payload lists `parameters` (name, label, `unit: "mm"`, optional min/max),
13
+ an `outline` of corner formulas (numbers, parameter names, `+ - * /`, brackets, `min`, `max`), an
14
+ optional `designation` template such as `"WI{d}x{bf}"`, and, for an I, `export.canonical`
15
+ `{shape: "i", d, bf, tw, tf}` so IFC carries it as a real I-section.
16
+ - **Ids never change meaning.** A definition id is bound to its content. A different definition under an
17
+ id the model already uses is refused with the next free id to use (`…@2`): use that; never reuse the id.
18
+ - **The section is the member's, not its name.** Two sections may share a designation; FloLess keys
19
+ every bill, group and merge on the section itself and labels the two apart. Typing a catalogue profile
20
+ over a custom member takes it off the custom section.
21
+ - **Mass is area × density**, from the member's material: structural steel 7850 kg/m³, stainless 8000,
22
+ aluminium 2700. An unrecognised material is weighed as steel and said to be an assumption.
23
+ - **A section FloLess cannot check is never swapped.** One made by a newer FloLess (an unknown kind or
24
+ version), or whose stored shape no longer matches its recipe, is drawn as a labelled placeholder and
25
+ left out of quantities and exports. Say so, and offer the two ways forward: fix the definition, or the
26
+ person proceeds on the stored shape as an assumption (`steel.custom-section-assumption`, which they
27
+ choose — the export and bill then name it as an assumption).
28
+ - **IFC.** A custom I goes out as a real I-section with its own dimensions. A shape IFC has no section
29
+ for asks first: leave those members out, or send each as its bounding box, named in the file as an
30
+ assumption. Ask the person; pass their choice and the question's key back to `steel.export-ifc`.
31
+ - **Connections on a custom section are not modelled yet.** A connection naming one is reported as not
32
+ built; say so rather than claiming it fits, and check clash and placement by hand as stages 7-8 require.
@@ -1,131 +1,76 @@
1
1
  ---
2
2
  name: floless-app-ui
3
- description: This skill should be used when the user wants to customize the floless.app Dashboard — add, change, rearrange, or remove custom panels (stat cards, data tables, report buttons, run buttons) — or when picking up queued 'ui-customize' requests from the floless.app Customize box. Use it when the user says things like "add a panel showing last night's BOM run", "pin a run button to my dashboard", "apply my dashboard change", "customize my floless dashboard", "pick up my floless UI request", after they type into the Dashboard's Customize box, OR when they paste a message beginning with a `[floless-request type=ui-customize id=…]` marker (a request copied from the Dashboard — resolve it via /api/requests, don't run it verbatim). It edits ~/.floless/ui/extensions.json (the declarative UI descriptor), validates with the AWARE ui agent, and the app re-renders live.
3
+ description: This skill should be used when the user wants to extend or customize FloLess itself — "make an add-on", "add a custom profile", "add my own section/shape", "write a script that runs inside FloLess", "add a toolbar button", "connect FloLess to a program it doesn't support", "build me a plugin", "customize FloLess", "open My add-ons" — and when someone asks for the old Dashboard ("add a panel to my dashboard", "customize my dashboard", "pin a run button") or pastes an old `[floless-request type=ui-customize …]` marker. FloLess add-ons (definitions such as custom profiles, sandboxed scripts, connectors and toolbar buttons, managed in ≡ → My add-ons) are being built under floless.app #3296 and none of it ships yet, so this skill says that plainly and routes the ask to what exists today — a workflow, a Page, or a skill. It is the seed of the add-on authoring skill and will grow into it as add-ons ship.
4
4
  metadata:
5
- version: 0.1.2
5
+ version: 0.2.0
6
6
  ---
7
7
 
8
- # floless.app Custom Panels — the dashboard descriptor
9
-
10
- floless.app's Dashboard view renders **`~/.floless/ui/extensions.json`** — one declarative
11
- JSON document describing the user's custom panels. **You (the terminal AI) compose the
12
- description; floless.app renders it** with its own design system. You never write HTML,
13
- CSS, or JS — and never need to: every string in the descriptor is escaped at render time,
14
- so markup would show up as literal text.
15
-
16
- The file is watched: the moment you write it, the open FloLess window or browser tab re-renders the Dashboard.
17
- No compile, no approve, no restart.
18
-
19
- ## Picking up a queued request
20
-
21
- When the user types into the Dashboard's **Customize box**, floless.app queues a request:
22
-
23
- ```sh
24
- curl -s http://127.0.0.1:4317/api/requests # → { ok, requests: [...] }
25
- ```
26
-
27
- ```jsonc
28
- // type "ui-customize" — a dashboard change in plain English. No appId (it's
29
- // workspace-level); panelId optionally scopes it to one existing panel.
30
- { "id": "uuid", "type": "ui-customize", "status": "pending",
31
- "instruction": "show last night's BOM run as a table with a re-run button",
32
- "panelId": null }
33
- ```
34
-
35
- Workflow: read the request → edit `extensions.json` (below) → validate → **delete the
36
- processed request** (`curl -s -X DELETE http://127.0.0.1:4317/api/requests/<id>`).
37
- The request files also live at `~/.floless/requests/*.json` if the server is down.
38
-
39
- ## The descriptor schema (v1)
40
-
41
- Authoritative sources — read them, don't guess field names:
42
-
43
- ```sh
44
- aware agent describe ui # the agent's commands
45
- aware agent skill ui descriptor-authoring.md # the full authoring guide
46
- aware agent invoke ui catalog --json # machine-readable block contracts
47
- ```
48
-
49
- Shape: `{ "version": 1, "panels": [ { "id", "slot", "title", "blocks": [...] } ] }`
50
-
51
- - `id` — unique, `[a-z0-9-]+` (floless.app keys panels by it).
52
- - `slot` — floless.app honors **`"dashboard"`** (the Dashboard grid) and
53
- **`"inspect-tab"`** (an extra tab in the right Inspect column, after Execution).
54
- Anything else falls back to the Dashboard.
55
- - `blocks` — ordered; order is the layout. Types floless.app renders:
56
- - `stat` `{label, value, hint?}` — a KPI card. Consecutive stats become one strip;
57
- lead a panel with 2–4. Values are LITERALS — write the number/text yourself.
58
- - `table` `{source, columns?, sort?, "sort-desc"?}` — a data table fed by a
59
- floless-resolved `source` (below). Columns/sort mirror html-report (#210).
60
- - `text` `{content}` — escaped prose; blank lines separate paragraphs.
61
- - `report` `{source, title?}` — a "View report" button opening the run's HTML
62
- report in the app's sandboxed viewer.
63
- - `action` `{label, "action-id", inputs?}` — a button. floless.app wires ONLY
64
- `"action-id": "run-app:<appId>"` (runs that installed workflow with `inputs`,
65
- respecting the compile/lock gate). Other action-ids render inert.
66
- - An unknown `type` renders as a friendly placeholder — never an error — so
67
- composing for a newer FloLess degrades safely.
68
-
69
- ## Source strings the floless server resolves
70
-
71
- `table.source` / `report.source` bind data BY NAME; floless.app resolves these:
72
-
73
- | source | payload |
74
- |---|---|
75
- | `last-run-output:<appId>` | the app's latest run trace → `{appId, runId, status, rows, html}` — `table` uses the rows, `report` uses the html |
76
- | `last-run-status:<appId>` | `{appId, status, finishedAt, runId}` of the latest run |
77
- | `routine-status:<routineId-or-appId>` | `{id, name, workflow, kind, enabled, nextFireAt, lastRun, broken}` from the user's routines |
78
-
79
- `<appId>` is an installed app id (`aware app list`). An unresolvable source renders a
80
- quiet "no data yet" placeholder — the descriptor outlives any one run, so binding to an
81
- app that hasn't run yet is fine.
82
-
83
- ## Worked example
84
-
85
- ```json
86
- {
87
- "version": 1,
88
- "panels": [
89
- {
90
- "id": "morning-bom",
91
- "slot": "dashboard",
92
- "title": "Morning BOM",
93
- "blocks": [
94
- { "type": "stat", "label": "Scope", "value": "Phase 2", "hint": "live Tekla model" },
95
- { "type": "table", "source": "last-run-output:tekla-bom-by-phase",
96
- "columns": ["profile", "qty"], "sort": "qty", "sort-desc": true },
97
- { "type": "report", "source": "last-run-output:tekla-bom-by-phase", "title": "Full BOM report" },
98
- { "type": "action", "label": "Re-run BOM", "action-id": "run-app:tekla-bom-by-phase",
99
- "inputs": { "phase": 2 } }
100
- ]
101
- }
102
- ]
103
- }
104
- ```
105
-
106
- ## Write → validate → done
107
-
108
- 1. **Edit atomically**: write to `~/.floless/ui/extensions.json.tmp`, then rename over
109
- `~/.floless/ui/extensions.json` (the watcher fires once, on a complete file). Create
110
- `~/.floless/ui/` if missing. Edit the EXISTING file when the user is changing/adding —
111
- read it first; replace it wholesale only when they ask to start over.
112
- 2. **Validate** (the check, before or right after writing):
113
- ```sh
114
- aware agent invoke ui validate --inputs '{"descriptor": { ...the json... }}' --json
115
- # or, for a large descriptor: --inputs @args.json where args.json = {"descriptor": …}
116
- ```
117
- Fix `errors` (the UI falls back to the default view on an invalid file and shows a
118
- warning); review `warnings` (typos surface as unknown-field warnings).
119
- 3. **Delete the processed request** if you picked one up from `/api/requests`.
120
- 4. Nothing else — the app re-renders live and shows a "Customized" badge.
121
-
122
- ## Guardrails
123
-
124
- - **Never write raw HTML/markup into descriptor strings** — it renders as literal text
125
- by design. Describe; don't mark up.
126
- - Every write is recorded in the app's undo timeline (`~/.floless/ui/timeline.json`,
127
- newest 20 states), and the user has multi-level **Undo / Redo** and **Reset to default**
128
- in the app — so be bold composing, but never destructive: don't delete panels the user
129
- didn't ask to remove, and prefer editing the existing document over regenerating it.
130
- - The UI renders; AWARE runs; you compose. Don't put computed values in `stat` blocks
131
- that a `source`-bound block could keep live — a stale hand-written number misleads.
8
+ # Extending FloLess — add-ons (coming) and what to use today
9
+
10
+ People ask to make FloLess their own: a custom steel profile, a little tool that runs inside the
11
+ model editor, a button that does their usual three steps, a link to a program FloLess does not
12
+ connect to. FloLess's answer to all of that is **add-ons**. This skill is where the AI learns to
13
+ author them. Today it does one thing well: it tells the person where that stands, and builds what
14
+ they asked for with the pieces FloLess already has.
15
+
16
+ ## Where add-ons stand
17
+
18
+ **None of this ships yet. Never tell the person it does, and never write files that pretend to be an
19
+ add-on.** FloLess add-ons are being built under floless.app #3296 (design:
20
+ `docs/superpowers/specs/2026-11-07-add-ons-design.md` in the floless.app repo). When they land, an
21
+ add-on will be a folder the AI writes from the chat, made of any of:
22
+
23
+ - **Definitions** — new things in a model, such as a custom profile, that travel inside the model so
24
+ it still opens without the add-on;
25
+ - **Scripts** — small tools the AI writes, running sandboxed inside FloLess and reaching it only
26
+ through a narrow, versioned add-on API;
27
+ - **Connectors** — an AWARE agent for a program FloLess does not support, so a workflow can use it;
28
+ - **Toolbar buttons** — one click that starts a script, opens a Page, runs a workflow or asks the AI.
29
+
30
+ They will be managed in one place, **≡ → My add-ons**. Every add-on arrives **off**, is labelled
31
+ **unreviewed**, and only a person turns it on, after seeing in plain English what it can reach. The
32
+ AI may make and change an add-on; it never turns one on.
33
+
34
+ Until that ships there is no `~/.floless/add-ons/` folder to write, no My add-ons screen, and no
35
+ add-on API. Say so in one sentence, then move on to what you can build now.
36
+
37
+ ## What to use today
38
+
39
+ Most add-on ideas already have a home. Pick the one that fits, say why in one line, and build it:
40
+
41
+ | The person wants… | Use today | How |
42
+ |---|---|---|
43
+ | A repeatable process: read something, change a model, make a report, send it somewhere | **A workflow** | `floless-app-new-workflow` to build one from scratch; `floless-app-workflows` to change one |
44
+ | Something to look at and keep: a chart, a table, a summary, a small dashboard | **A Page** | `pages.create` (see `floless-app-actions`, "Pages") — FloLess keeps, versions and opens it |
45
+ | It to run on a timer or whenever the model changes | **A routine** on a workflow | `floless-app-routines` |
46
+ | The AI to know how they work: their conventions, their checks, their wording | **A skill**, or the project's Knowledge | write a skill for their terminal AI; for project facts use `floless-app-knowledge` |
47
+ | A program FloLess does not connect to | **An AWARE agent**, used as a workflow step | `aware build agent`, then a workflow that calls it (`floless-app-workflows`) |
48
+ | A custom profile, a script inside the editor, a toolbar button | **Not yet possible** | say it is coming with add-ons (#3296); offer the nearest workflow or Page, or note the idea for them |
49
+
50
+ Do not invent a stand-in for the parts that do not exist: no hand-edited files under `~/.floless/`,
51
+ no extra buttons patched into FloLess's pages, no "add-on" folder FloLess will never read.
52
+
53
+ ## The old Dashboard is gone
54
+
55
+ FloLess used to have a hidden Custom Panels Dashboard (`~/.floless/ui/extensions.json`). It was
56
+ removed (floless.app #3296, slice S0) because nobody used it. If someone asks for a dashboard panel,
57
+ or pastes an old `[floless-request type=ui-customize …]` marker:
58
+
59
+ 1. Tell them in one sentence that the Dashboard was removed, and that the same thing is now a Page.
60
+ 2. Offer to make it as a **Page** (`pages.create`): a table of their latest runs, a status card, a
61
+ chart. A Page is kept and versioned, and it opens in FloLess's sealed viewer.
62
+ 3. For "a button that runs my workflow", the workflow itself is the button: point them to it in the
63
+ Workflows tab, or set up a routine if they want it to run on its own.
64
+
65
+ An old `ui-customize` request can still sit in the queue: FloLess no longer acts on that type, but it
66
+ still lists it and lets it be cleared. Find it with `requests.list` (match the marker's id) to read
67
+ what was asked, offer the Page as above, and then clear it with `requests.clear`. That is a
68
+ confirmed deletion, so the person confirms it on the card. Never leave it pending once its ask has
69
+ been answered or turned down.
70
+
71
+ ## When add-ons ship
72
+
73
+ This skill becomes the add-on authoring skill: the manifest, the definitions, the script API and its
74
+ grants, connectors, buttons, versions, and how to ask the person to turn an add-on on. Until then,
75
+ keep every answer to what exists today, and keep the person's idea: if they describe an add-on they
76
+ want, write it down in plain English so it is ready when the time comes.