@floless/app 0.124.1 → 0.125.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.
@@ -54611,7 +54611,7 @@ function appVersion() {
54611
54611
  return resolveVersion({
54612
54612
  isSea: isSea2(),
54613
54613
  sqVersionXml: readSqVersionXml(),
54614
- define: true ? "0.124.1" : void 0,
54614
+ define: true ? "0.125.0" : void 0,
54615
54615
  pkgVersion: readPkgVersion()
54616
54616
  });
54617
54617
  }
@@ -54627,7 +54627,7 @@ function resolveChannel(s) {
54627
54627
  function appChannel() {
54628
54628
  return resolveChannel({
54629
54629
  isSea: isSea2(),
54630
- define: true ? "0.124.1" : void 0,
54630
+ define: true ? "0.125.0" : void 0,
54631
54631
  // argv[1] is the entry the runtime actually loaded (…/dist/floless-server.cjs), which is what
54632
54632
  // carries the npx cache prefix. Absent under the SEA exe, which never reaches the npx branch.
54633
54633
  modulePath: process.argv[1]
@@ -61568,15 +61568,26 @@ function materializeMembers(v1, boot, regs) {
61568
61568
  const coincidentXY = Math.hypot(from.x - to.x, from.y - to.y) <= MODEL_V2_TOL.DEDUP_MM;
61569
61569
  const zeroHeight = za !== null && zb !== null && Math.abs(zb - za) <= MODEL_V2_TOL.CUT_PLANE_MM;
61570
61570
  const marker = role === "column" && zeroHeight && coincidentXY;
61571
- if (role === "column" && zeroHeight && !coincidentXY) {
61571
+ if (role === "column" && !coincidentXY) {
61572
61572
  const spanMm = Math.hypot(from.x - to.x, from.y - to.y);
61573
- issues.push({
61574
- code: "column-zero-height",
61575
- severity: "decision",
61576
- sheet,
61577
- path,
61578
- message: `column "${v1Id}" reads with its base and its top at the same elevation, so it has no height \u2014 but it spans ${spanMm.toFixed(0)} mm in plan, so it is not a foundation footprint and is kept as a member rather than turned into evidence. A column of zero height cannot be built: confirm the reading, or give it a real top elevation, before commit`
61579
- });
61573
+ const spanTxt = spanMm.toFixed(spanMm < 10 ? 1 : 0);
61574
+ if (zeroHeight) {
61575
+ issues.push({
61576
+ code: "column-zero-height",
61577
+ severity: "decision",
61578
+ sheet,
61579
+ path,
61580
+ message: `column "${v1Id}" reads with its base and its top at the same elevation, so it has no height \u2014 but it spans ${spanTxt} mm in plan, so it is not a foundation footprint and is kept as a member rather than turned into evidence. A column of zero height cannot be built: confirm the reading, or give it a real top elevation, before commit`
61581
+ });
61582
+ } else {
61583
+ issues.push({
61584
+ code: "column-plan-offset",
61585
+ severity: "decision",
61586
+ sheet,
61587
+ path,
61588
+ message: `column "${v1Id}" has its two ends ${spanTxt} mm apart in plan, so it does not stand over a single point the way a column must. Usually that means a beam or brace was read as a column; less often it is a genuine raking column. Confirm which this is, or correct the member, before commit`
61589
+ });
61590
+ }
61580
61591
  }
61581
61592
  members.push({ sheet, v1Id, v1Index: mi, role, from, to, kind: marker ? "footprint-marker" : "physical", fromKind, toKind, ends, raw: m });
61582
61593
  });
@@ -61586,7 +61597,7 @@ function materializeMembers(v1, boot, regs) {
61586
61597
  var memberKey = (m) => JSON.stringify([m.sheet, m.v1Id]);
61587
61598
  var zOf = (e) => "known" in e ? e.known : null;
61588
61599
  var same = (a, b) => JSON.stringify(a ?? null) === JSON.stringify(b ?? null);
61589
- var MEMBER_FIELDS = ["material", "rot", "position", "section", "bf", "mf", "rfi", "verified"];
61600
+ var MEMBER_FIELDS = ["material", "rot", "position", "positionH", "section", "bf", "mf", "rfi", "verified"];
61590
61601
  var END_FIELDS = ["conn", "connVerified", "note", "detail"];
61591
61602
  function crossingDistance(marker, span) {
61592
61603
  const mz = zOf(marker.from.z), lo = zOf(span.from.z), hi = zOf(span.to.z);
@@ -61805,6 +61816,7 @@ var DISPOSITIONS = {
61805
61816
  material: "copied",
61806
61817
  memberType: "copied",
61807
61818
  position: "copied",
61819
+ positionH: "copied",
61808
61820
  rot: "copied",
61809
61821
  section: "copied",
61810
61822
  bf: "copied",
@@ -61971,6 +61983,8 @@ function previewMigration(v1, ctx) {
61971
61983
  if (isObj2(r.brace)) out.brace = clone(r.brace);
61972
61984
  const position = enumOr(r.position, ["top", "middle", "bottom"], `$.members[${m.sheet}/${m.v1Id}].position`, issues, m.sheet);
61973
61985
  if (position) out.position = position;
61986
+ const positionH = enumOr(r.positionH, ["left", "middle", "right"], `$.members[${m.sheet}/${m.v1Id}].positionH`, issues, m.sheet);
61987
+ if (positionH) out.positionH = positionH;
61974
61988
  const ends = m.ends.map((e) => {
61975
61989
  const o = {};
61976
61990
  for (const k of ["note", "detail"]) if (str2(e[k])) o[k] = str2(e[k]);
@@ -64296,6 +64310,7 @@ var REGISTRY = /* @__PURE__ */ new Map([
64296
64310
  ["$.members[].memberType", { disposition: "propose" }],
64297
64311
  ["$.members[].rot", { disposition: "propose" }],
64298
64312
  ["$.members[].position", { disposition: "propose" }],
64313
+ ["$.members[].positionH", { disposition: "propose" }],
64299
64314
  ["$.members[].from", { disposition: "propose" }],
64300
64315
  ["$.members[].to", { disposition: "propose" }],
64301
64316
  ["$.members[].section", { disposition: "propose" }],
@@ -65427,12 +65442,14 @@ function inferSupport(beam, end, memberGeo) {
65427
65442
  best = m;
65428
65443
  }
65429
65444
  }
65430
- return best && supportReaches(end, best) ? best : void 0;
65445
+ return best && supportReaches(end, best, latSlack(beam)) ? best : void 0;
65431
65446
  }
65432
- function supportReaches(end, support) {
65447
+ function supportReaches(end, support, latSlackMm = 0) {
65433
65448
  if (!finite3(support.from) || !finite3(support.to) || !support.dims) return false;
65434
- return distPointSeg(end, support.from, support.to) <= Math.max(support.dims.w, support.dims.d);
65449
+ const slack = isFinite(latSlackMm) ? Math.abs(latSlackMm) : 0;
65450
+ return distPointSeg(end, support.from, support.to) <= Math.max(support.dims.w, support.dims.d) + slack;
65435
65451
  }
65452
+ var latSlack = (m) => m && typeof m.latOffset === "number" && isFinite(m.latOffset) ? Math.abs(m.latOffset) : 0;
65436
65453
  function flangeThk(profile, d) {
65437
65454
  return profileKind(profile) === "I" ? Math.min(d * 0.5, Math.max(d * 0.1, 6)) : d / 2;
65438
65455
  }
@@ -66043,7 +66060,7 @@ function expandJoints(joints, memberGeo) {
66043
66060
  return;
66044
66061
  }
66045
66062
  const beamEnd = j.at === "end1" ? beam.to : beam.from;
66046
- if (nativeSupport && !supportReaches(beamEnd, nativeSupport)) {
66063
+ if (nativeSupport && !supportReaches(beamEnd, nativeSupport, latSlack(beam))) {
66047
66064
  skipped.push(j.id);
66048
66065
  return;
66049
66066
  }
@@ -66091,7 +66108,7 @@ function expandJoints(joints, memberGeo) {
66091
66108
  refuseBrace("named-support-unusable", { supportId: nativeSupport.id });
66092
66109
  return;
66093
66110
  }
66094
- if (nativeSupport && !supportReaches(braceEnd, nativeSupport)) {
66111
+ if (nativeSupport && !supportReaches(braceEnd, nativeSupport, latSlack(braceMember))) {
66095
66112
  refuseBrace("named-support-out-of-reach", { supportId: nativeSupport.id });
66096
66113
  return;
66097
66114
  }
@@ -67449,6 +67466,24 @@ function depthPosition(explicit, dzMm, horizMm, isVerticalBrace = false) {
67449
67466
  if (isVerticalBrace) return "middle";
67450
67467
  return dzMm > horizMm * 0.5774 ? "middle" : "top";
67451
67468
  }
67469
+ function planePosition(explicit) {
67470
+ return explicit === "left" || explicit === "right" ? explicit : "middle";
67471
+ }
67472
+ function lateralHalfExtent(dims, rotDeg, round) {
67473
+ if (round) return dims.w / 2;
67474
+ const th = (typeof rotDeg === "number" && isFinite(rotDeg) ? rotDeg : 0) * Math.PI / 180;
67475
+ return Math.abs(dims.w / 2 * Math.cos(th)) + Math.abs(dims.d / 2 * Math.sin(th));
67476
+ }
67477
+ var NO_PLANE_OFFSET = { dx: 0, dy: 0, signed: 0 };
67478
+ function planeOffset(positionH, ax, ay, bx, by, dims, rotDeg, standardSection) {
67479
+ const pos2 = planePosition(positionH);
67480
+ if (pos2 === "middle" || !standardSection) return NO_PLANE_OFFSET;
67481
+ const planLen = Math.hypot(bx - ax, by - ay);
67482
+ if (!(planLen >= DEGENERATE_MM)) return NO_PLANE_OFFSET;
67483
+ const half = lateralHalfExtent(dims, rotDeg, dims.round === true);
67484
+ const signed = pos2 === "left" ? -half : half;
67485
+ return { dx: -(by - ay) / planLen * signed, dy: (bx - ax) / planLen * signed, signed };
67486
+ }
67452
67487
  function contractWithExportScopedMemberIds(contract) {
67453
67488
  const occurrences = /* @__PURE__ */ new Map();
67454
67489
  (contract.plans ?? []).forEach((plan, planIndex) => {
@@ -67516,26 +67551,26 @@ function profileDimsIn(profile) {
67516
67551
  const nums = m[2].split("X").map(parseDim).filter((n) => n != null);
67517
67552
  if (nums.length === 0) return null;
67518
67553
  if ((prefix === "HSS" || prefix === "TUBE" || prefix === "L") && nums.length >= 3) {
67519
- return { d: nums[0], w: nums[1], approx: false };
67554
+ return { d: nums[0], w: nums[1], approx: false, round: false };
67520
67555
  }
67521
67556
  if (prefix === "HSS" || prefix === "PIPE") {
67522
67557
  const dia = nums[0];
67523
- return { d: dia, w: dia, approx: false };
67558
+ return { d: dia, w: dia, approx: false, round: true };
67524
67559
  }
67525
67560
  if (/^(W|S|M|HP|C|MC|WT|ST|MT)$/.test(prefix)) {
67526
67561
  const actual = sectionDimsIn(p);
67527
- if (actual) return { d: actual.d, w: actual.bf, approx: false };
67562
+ if (actual) return { d: actual.d, w: actual.bf, approx: false, round: false };
67528
67563
  const d = nums[0];
67529
67564
  const bf = BF_IN[p.replace(/\s+/g, "")];
67530
- if (bf !== void 0) return { d, w: bf, approx: false };
67565
+ if (bf !== void 0) return { d, w: bf, approx: false, round: false };
67531
67566
  const ratio = prefix === "C" || prefix === "MC" ? 0.28 : 0.42;
67532
- return { d, w: d * ratio, approx: true };
67567
+ return { d, w: d * ratio, approx: true, round: false };
67533
67568
  }
67534
67569
  return null;
67535
67570
  }
67536
67571
  function profileDims(profile) {
67537
67572
  const din = profileDimsIn(profile);
67538
- return din ? { w: din.w * IN_TO_MM2, d: din.d * IN_TO_MM2, approx: din.approx } : null;
67573
+ return din ? { w: din.w * IN_TO_MM2, d: din.d * IN_TO_MM2, approx: din.approx, round: din.round } : null;
67539
67574
  }
67540
67575
  var SCENE_DEFAULT_PAL = ["#60a5fa", "#94a3b8", "#f59e0b", "#34d399", "#f472b6", "#a78bfa", "#fb7185", "#22d3ee", "#facc15", "#4ade80"];
67541
67576
  function pickColor(profile, idx, contract) {
@@ -67647,7 +67682,8 @@ function contractToScene(contractInput) {
67647
67682
  const defaultTosMm = (plan.default_tos ?? 0) * IN_TO_MM2;
67648
67683
  for (const m of plan.members ?? []) {
67649
67684
  const explicit = m.section && typeof m.section.w === "number" && m.section.w > 0 && typeof m.section.d === "number" && m.section.d > 0 ? { w: m.section.w, d: m.section.d, approx: false } : null;
67650
- const dims = profileDims(m.profile) ?? explicit;
67685
+ const stdDims = profileDims(m.profile);
67686
+ const dims = stdDims ?? explicit;
67651
67687
  if (!dims || !Array.isArray(m.wp) || m.wp.length < 2) {
67652
67688
  skipped.push(m.id);
67653
67689
  continue;
@@ -67665,6 +67701,7 @@ function contractToScene(contractInput) {
67665
67701
  let workFrom;
67666
67702
  let workTo;
67667
67703
  let posOffset = 0;
67704
+ let lat = NO_PLANE_OFFSET;
67668
67705
  if (m.role === "column") {
67669
67706
  const bos = m.col?.bos != null ? m.col.bos * IN_TO_MM2 : 0;
67670
67707
  const tos = m.col?.tos != null ? m.col.tos * IN_TO_MM2 : defaultTosMm;
@@ -67675,13 +67712,14 @@ function contractToScene(contractInput) {
67675
67712
  } else {
67676
67713
  const z0 = m.ends?.[0]?.tos != null ? m.ends[0].tos * IN_TO_MM2 : defaultTosMm;
67677
67714
  const z1 = m.ends?.[1]?.tos != null ? m.ends[1].tos * IN_TO_MM2 : defaultTosMm;
67678
- workFrom = [ax, ay, z0];
67679
- workTo = [bx, by, z1];
67680
67715
  const pos2 = depthPosition(m.position, Math.abs(z1 - z0), Math.hypot(bx - ax, by - ay), mIsBrace && m.brace?.type === "vertical");
67681
67716
  const zoff = pos2 === "top" ? -dims.d / 2 : pos2 === "bottom" ? dims.d / 2 : 0;
67682
67717
  posOffset = zoff;
67683
- from = [ax, ay, z0 + zoff];
67684
- to = [bx, by, z1 + zoff];
67718
+ lat = planeOffset(m.positionH, ax, ay, bx, by, dims, m.rot, stdDims !== null);
67719
+ workFrom = [ax + lat.dx, ay + lat.dy, z0];
67720
+ workTo = [bx + lat.dx, by + lat.dy, z1];
67721
+ from = [ax + lat.dx, ay + lat.dy, z0 + zoff];
67722
+ to = [bx + lat.dx, by + lat.dy, z1 + zoff];
67685
67723
  }
67686
67724
  if (m.role === "column" && Math.abs(to[2] - from[2]) < 1) {
67687
67725
  skipped.push(m.id);
@@ -67691,7 +67729,7 @@ function contractToScene(contractInput) {
67691
67729
  skipped.push(m.id);
67692
67730
  continue;
67693
67731
  }
67694
- memberGeo.set(m.id, { id: m.id, role: m.role === "column" ? "column" : "beam", from: workFrom, to: workTo, dims: { w: dims.w, d: dims.d }, profile, posOffset, isBrace: mIsBrace, ...typeof m.rot === "number" ? { rot: -m.rot } : {} });
67732
+ memberGeo.set(m.id, { id: m.id, role: m.role === "column" ? "column" : "beam", from: workFrom, to: workTo, dims: { w: dims.w, d: dims.d }, profile, posOffset, isBrace: mIsBrace, ...lat.signed ? { latOffset: lat.signed } : {}, ...typeof m.rot === "number" ? { rot: -m.rot } : {} });
67695
67733
  const role = mIsBrace ? "brace" : m.role === "column" ? "column" : "beam";
67696
67734
  const material = m.material && m.material.trim() || inferMaterial(profile);
67697
67735
  elements.push({
@@ -68039,7 +68077,8 @@ function sceneFromModel(view) {
68039
68077
  for (const vm of view.members) {
68040
68078
  const m = vm.raw;
68041
68079
  const explicit = m.section && typeof m.section.w === "number" && m.section.w > 0 && typeof m.section.d === "number" && m.section.d > 0 ? { w: m.section.w, d: m.section.d, approx: false } : null;
68042
- const dims = profileDims(m.profile) ?? explicit;
68080
+ const stdDims = profileDims(m.profile);
68081
+ const dims = stdDims ?? explicit;
68043
68082
  if (!dims) {
68044
68083
  skipped.push(m.id);
68045
68084
  continue;
@@ -68062,19 +68101,21 @@ function sceneFromModel(view) {
68062
68101
  let workFrom;
68063
68102
  let workTo;
68064
68103
  let posOffset = 0;
68104
+ let lat = NO_PLANE_OFFSET;
68065
68105
  if (m.role === "column") {
68066
68106
  from = [ax, ay, z0];
68067
68107
  to = [bx, by, z1];
68068
68108
  workFrom = from;
68069
68109
  workTo = to;
68070
68110
  } else {
68071
- workFrom = [ax, ay, z0];
68072
- workTo = [bx, by, z1];
68073
68111
  const pos2 = depthPosition(m.position, Math.abs(z1 - z0), Math.hypot(bx - ax, by - ay), mIsBrace && braceType === "vertical");
68074
68112
  const zoff = pos2 === "top" ? -dims.d / 2 : pos2 === "bottom" ? dims.d / 2 : 0;
68075
68113
  posOffset = zoff;
68076
- from = [ax, ay, z0 + zoff];
68077
- to = [bx, by, z1 + zoff];
68114
+ lat = planeOffset(m.positionH, ax, ay, bx, by, dims, m.rot, stdDims !== null);
68115
+ workFrom = [ax + lat.dx, ay + lat.dy, z0];
68116
+ workTo = [bx + lat.dx, by + lat.dy, z1];
68117
+ from = [ax + lat.dx, ay + lat.dy, z0 + zoff];
68118
+ to = [bx + lat.dx, by + lat.dy, z1 + zoff];
68078
68119
  }
68079
68120
  if (Math.hypot(workTo[0] - workFrom[0], workTo[1] - workFrom[1], workTo[2] - workFrom[2]) < DEGENERATE_MM) {
68080
68121
  skipped.push(m.id);
@@ -68089,6 +68130,7 @@ function sceneFromModel(view) {
68089
68130
  profile,
68090
68131
  posOffset,
68091
68132
  isBrace: mIsBrace,
68133
+ ...lat.signed ? { latOffset: lat.signed } : {},
68092
68134
  ...typeof m.rot === "number" ? { rot: m.rot } : {}
68093
68135
  });
68094
68136
  const role = mIsBrace ? "brace" : m.role === "column" ? "column" : "beam";
@@ -85370,11 +85412,24 @@ async function startServer() {
85370
85412
  if (getProject(r.project)?.app !== r.appId) return void 0;
85371
85413
  return storedContractType(r.appId, r.project, memo);
85372
85414
  };
85373
- const requestView2 = (r) => r === null ? null : { ...r, appTemplateId: r.appId ? resolveTemplateId(r.appId) : void 0, contractType: requestContractType(r) };
85415
+ const requestProjectName = (r, memo) => {
85416
+ if (!r.project) return void 0;
85417
+ if (memo?.has(r.project)) return memo.get(r.project);
85418
+ const name = getProject(r.project)?.name;
85419
+ memo?.set(r.project, name);
85420
+ return name;
85421
+ };
85422
+ const requestView2 = (r) => r === null ? null : { ...r, appTemplateId: r.appId ? resolveTemplateId(r.appId) : void 0, contractType: requestContractType(r), projectName: requestProjectName(r) };
85374
85423
  const requestViews = (list) => {
85375
85424
  const root5 = templateIdResolver();
85376
85425
  const typeMemo = /* @__PURE__ */ new Map();
85377
- return list.map((r) => ({ ...r, appTemplateId: r.appId ? root5(r.appId) : void 0, contractType: requestContractType(r, typeMemo) }));
85426
+ const nameMemo = /* @__PURE__ */ new Map();
85427
+ return list.map((r) => ({
85428
+ ...r,
85429
+ appTemplateId: r.appId ? root5(r.appId) : void 0,
85430
+ contractType: requestContractType(r, typeMemo),
85431
+ projectName: requestProjectName(r, nameMemo)
85432
+ }));
85378
85433
  };
85379
85434
  app.get("/api/projects", async () => ({ ok: true, projects: projectViews(listProjects()) }));
85380
85435
  app.post(
@@ -160,6 +160,7 @@
160
160
  "role": { "enum": ["beam", "column"], "description": "Authored role. Defaults to beam when absent. NOT derived from geometry." },
161
161
  "memberType": { "type": "string", "description": "Member category driving the legend (beam, ledger, brace, …). 'brace' is excluded from every beam-only path." },
162
162
  "position": { "enum": ["top", "middle", "bottom"], "description": "Profile placement relative to the work-line — the section's depth position." },
163
+ "positionH": { "enum": ["left", "middle", "right"], "description": "Profile placement ACROSS the work-line — the section's plan position, the horizontal companion to `position`. Named for where the LINE sits on the section, exactly as `position` is: left = the section's left face is on the line (so the steel is to its right), right = the mirror, middle = centred (the default, and what every member did before this field existed). Left/right are read looking from `from` to `to` with Z up — the same sense as reading the plan from above. Absent = middle. Ignored for a member with no plan direction (a plumb column or brace has no left or right) and for one with no resolved AISC designation (a CUSTOM / traced `section` box, whose section axes the viewer does not align to the plan). A width the section tables did not supply — a per-series ratio estimate — is NOT ignored: the member is already drawn and exported at that width, so flushing to the face it actually has is self-consistent, and the editor says the width is estimated." },
163
164
  "rot": { "type": "number", "description": "Section rotation about the member axis, degrees. Present on real v1 contracts but never declared by the v1 schema — enumerated here so migration cannot silently drop it." },
164
165
  "section": {
165
166
  "type": "object",
@@ -2,7 +2,7 @@
2
2
  name: floless-app-bridge
3
3
  description: This skill should be used when the user is driving the floless.app web UI (the local prompt-native front door at http://127.0.0.1:4317) and wants the terminal AI to act on what they did there — picking up queued Tweak requests, "use this template" requests, or the context of a node they selected/edited on the canvas. Use it when the user says things like "apply the tweak I just queued", "I clicked Tweak on the bom node — make that change", "pick up my floless request", "what queued requests are pending", or after they double-click/Tweak a node in the UI. ALSO use it the moment the user pastes a message that begins with a `[floless-request type=… id=…]` marker — that is a request copied from the FloLess Dashboard, NOT a literal instruction to run; resolve it via the API. It reads the floless.app local API, applies the change to the app's .flo, recompiles, and clears the request. Workspace approval, pending model changes, history/checkpoints, and export-source choices belong to floless-app-approval instead.
4
4
  metadata:
5
- version: 0.2.0
5
+ version: 0.3.0
6
6
  ---
7
7
 
8
8
  # floless.app ↔ terminal bridge
@@ -35,10 +35,13 @@ a literal instruction**:
35
35
 
36
36
  1. **Resolve it from the API, not the pasted text.** `GET /api/requests` and find the entry whose
37
37
  `id` matches the marker — that JSON is authoritative; the pasted line is only a summary.
38
- 2. **Apply it with the skill the marker names** (`ui-customize` → `floless-app-ui`;
39
- `tweak` / `use-template` → `floless-app-workflows`; `rebake` → `floless-app-rebake`). Use the
40
- **port from the marker** if it isn't 4317.
41
- 3. **`DELETE /api/requests/<id>`** when done.
38
+ 2. **Apply it with the skill the marker names.** The marker carries the routing, so you never have to
39
+ guess it — but the full type→skill table (all of them, with a plain-English line each) is in
40
+ **`floless-app-queue`** §2 if the marker is truncated or absent. Use the **port from the marker**
41
+ if it isn't 4317.
42
+ 3. **Finish it the way its type is finished** — for most types that is `DELETE /api/requests/<id>`,
43
+ but **two are lifecycle-owned and must NOT be deleted**. See "Clearing a request" below; the marker's
44
+ own wording tells you which kind you have.
42
45
 
43
46
  Do **not** run the pasted line as a shell command, and do **not** report a "missing file/path" as
44
47
  a bug — a path like `~/.floless/ui/extensions.json` is *created by the skill's own flow*, so its
@@ -53,8 +56,8 @@ running, the user starts it from the repo: `cd server && npm run dev` (or `npm r
53
56
 
54
57
  | Call | Purpose |
55
58
  |---|---|
56
- | `GET /api/requests` | List pending UI requests → `{ ok, requests: [...] }` |
57
- | `DELETE /api/requests/:id` | **Clear** a request once you've handled it |
59
+ | `GET /api/requests` | List the queued UI requests → `{ ok, requests: [...] }`. No status filter — a `failed` or `staged` row comes back with the `pending` ones |
60
+ | `DELETE /api/requests/:id` | **Clear** a request once you've handled it — for every type except the lifecycle-owned ones below |
58
61
  | `GET /api/app/:id` | The app's normalized topology + source + lock (selected-node context) |
59
62
  | `POST /api/tweak` | (UI uses this to enqueue; you usually only read/clear) |
60
63
 
@@ -72,6 +75,12 @@ running, the user starts it from the repo: `cd server && npm run dev` (or `npm r
72
75
  "template": { "name": "…", "node": { "agent": "tekla", "command": "…", "config": {…} } } }
73
76
  ```
74
77
 
78
+ Those are the two this skill authors directly. **The Dashboard queues several more**, each handled by
79
+ its own skill — deliberately not listed here, because a second copy of that list is how the first one
80
+ went stale. For the full set with a plain-English line and an owning skill each, read
81
+ **`floless-app-queue`** §2; for the field shapes, the `FlolessRequest` interface in
82
+ `server/floless-store.ts`, which is where the type union is actually declared.
83
+
75
84
  The **selected-node context** you need is carried *in the request* (`appId` + `nodeId`), so you do
76
85
  not need the UI's live selection — read that node's current source from the `.flo` to understand
77
86
  what to change.
@@ -80,14 +89,15 @@ what to change.
80
89
 
81
90
  ```dot
82
91
  digraph { "GET /api/requests" -> "for each pending" -> "read app .flo + node" ->
83
- "apply change (edit .flo)" -> "recompile + reinstall" -> "DELETE /api/requests/:id" }
92
+ "apply change (edit .flo)" -> "recompile + reinstall" -> "resolve it (DELETE, or its lifecycle POST)" }
84
93
  ```
85
94
 
86
95
  1. **Pull**: `curl -s http://127.0.0.1:4317/api/requests` → take the `pending` ones (oldest first).
87
96
  Summarize them for the user before acting on anything destructive. **When several are queued and
88
97
  the user wants to choose which to apply (not just the oldest), use the `floless-app-queue` skill** —
89
98
  it lists the queue in plain English and asks which to process, then routes each pick to the owning
90
- authoring skill (`floless-app-workflows` / `-tweak-contract` / `-ui` / `-rebake`).
99
+ authoring skill. Its §2 table is where the whole type→skill routing is written out in prose (the
100
+ authority itself is `REQUEST_SKILL` in `web/aware.js`, which that table restates).
91
101
  2. **Locate the app source.** The editable `.flo` is the repo copy `demos/<appId>/<appId>.flo`
92
102
  (preferred — it's version-controlled); the installed copy is `~/.aware/apps/<appId>/<appId>.flo`.
93
103
  Edit the **repo** copy. `GET /api/app/<appId>` returns the parsed nodes + each node's
@@ -101,15 +111,35 @@ digraph { "GET /api/requests" -> "for each pending" -> "read app .flo + node" ->
101
111
  4. **Recompile** so the UI's Run gate re-arms (it's gated on the lock's source-hash):
102
112
  reinstall from the dir + `aware app compile <appId>` from `~/.aware/apps` (full loop +
103
113
  gotchas live in `floless-app-workflows`).
104
- 5. **Clear the request** so it leaves the UI's queue:
105
- `curl -s -X DELETE http://127.0.0.1:4317/api/requests/<id>`. The UI's "requests" badge updates
106
- live over SSE.
114
+ 5. **Clear the request** so it leaves the UI's queue — see below; the verb depends on the type.
107
115
  6. **Verify** with a real run (the `verify`/Playwright standing rule) before reporting done.
108
116
 
117
+ ## Clearing a request — the verb depends on the type
118
+
119
+ For most types, clearing is the `DELETE`:
120
+
121
+ ```bash
122
+ curl -s -X DELETE http://127.0.0.1:4317/api/requests/<id> # the UI's "requests" badge updates live over SSE
123
+ ```
124
+
125
+ **These types are LIFECYCLE-OWNED, and a `DELETE` breaks them rather than completing them.** They are
126
+ resolved by their own POST, and the marker the Dashboard copies says so in its own wording:
127
+
128
+ | `type` | What resolves it | What a stray `DELETE` costs |
129
+ |---|---|---|
130
+ | `revision-read` | `POST /api/projects/<project>/revision-read` (that POST clears it), or `POST /api/projects/<project>/revision-requests/<id>/fail` when the set can't be read — that one marks the row `failed` rather than removing it, so the count staying up is the error card, not a leak. A `steel.model/v2` project answers **202 and stages** instead, leaving the request open until the user confirms it in the app; nothing shipped sets that state yet, so expect it rather than look for it. | the completion POST is refused **400** and the finished read is thrown away |
131
+ | `knowledge-organize` | `POST /api/projects/<project>/knowledge/requests/<id>/finish` (or `…/fail`) — after claiming the pass with `…/start` | the lock you took at `…/start` is only reclaimable after `LOCK_STALE_MS` (**10 minutes**), and the leftover `organize.json` leaves the Knowledge pane showing "Organizing…" with Organize **disabled indefinitely** |
132
+
133
+ This is the same per-type rule the UI encodes in `markedInstruction()`'s `clears` branch
134
+ (`web/aware.js`) — and the reason `clearAllRequests()` there refuses to include an organize in its
135
+ bulk clear. `floless-app-queue` §4 carries the same table.
136
+
109
137
  ## Guardrails
110
138
 
111
139
  - **You are the brain, the UI is not.** Never ask the UI to compose or mutate the `.flo`; it only
112
140
  queues intent. All authoring happens here, through the `.flo` + `aware` CLI.
113
141
  - Edit the **repo** `demos/<appId>/` source (tracked), then recompile into `~/.aware/apps/`.
114
- - Always **clear** a request after handling it, so the user's "requests" count reflects reality.
142
+ - Always **resolve** a request after handling it, so the user's "requests" count reflects reality —
143
+ by `DELETE` for most types, by the lifecycle POST for `revision-read` and `knowledge-organize`.
144
+ Never `DELETE` a lifecycle-owned one: it does not finish it, it strands it.
115
145
  - Don't invent node/command names — verify against the app's existing nodes (`GET /api/app/:id`).
@@ -2,7 +2,7 @@
2
2
  name: floless-app-queue
3
3
  description: This skill should be used when the user has MULTIPLE floless.app requests queued from the Dashboard and wants to see them and choose which to process, rather than the AI just picking up the oldest one. Use it when the user says things like "what's in my floless queue", "list my queued floless requests", "show me the pending requests and let me pick", "I queued a few tweaks — which should I apply?", "let me choose what to process", or "pick from the floless queue". It lists the pending requests from GET /api/requests in plain language (type, which app/node/project, the instruction), asks the user which one(s) to apply, then hands each chosen request to the owning skill (floless-app-workflows / -tweak-contract / -ui / -rebake / -onboarding / -new-workflow / -steel-takeoff / -vectorize / -knowledge) which applies it and clears it. It is the interactive picker that sits in front of floless-app-bridge (which is the actual pull-apply-clear engine).
4
4
  metadata:
5
- version: 0.2.0
5
+ version: 0.2.1
6
6
  ---
7
7
 
8
8
  # floless.app queue picker
@@ -83,7 +83,7 @@ current `.flo`/contract/panel, apply the change, recompile if needed — **and c
83
83
  curl -s -X DELETE http://127.0.0.1:4317/api/requests/<id> # the UI's "requests" badge updates live over SSE
84
84
  ```
85
85
 
86
- **Two types are LIFECYCLE-OWNED — never `DELETE` them.** They are resolved by their own POST, so a
86
+ **These types are LIFECYCLE-OWNED — never `DELETE` them.** They are resolved by their own POST, so a
87
87
  `DELETE` doesn't complete them, it breaks them:
88
88
 
89
89
  | `type` | What resolves it | What a stray `DELETE` costs |
@@ -2,7 +2,7 @@
2
2
  name: floless-app-steel-takeoff
3
3
  description: Read a structural steel drawing into an editable steel.takeoff/v1 contract in floless.app — the "Steel Takeoff" reader. Triggers on a pending floless `rebake` request for the `steel-model` app (queued from its "Re-read & re-bake ▸" button), or asks like "read this framing plan into a takeoff", "turn this structural drawing into a takeoff", "bake my drawing into steel-model", "extract members from this PDF". Teaches the host AI to READ a steel drawing (PDF/image) with its own vision at COMPOSE time, build a steel.takeoff/v1 contract (members + profiles + elevations + weights from AISC lookup), write it to the contract store, and hand control to the editor — no model in the run path, no API key.
4
4
  metadata:
5
- version: 0.16.1
5
+ version: 0.16.2
6
6
  ---
7
7
 
8
8
  # Steel Takeoff — read a drawing into a steel.takeoff/v1 contract
@@ -1171,7 +1171,7 @@ Important optional fields:
1171
1171
  {
1172
1172
  "id": "c1",
1173
1173
  "profile": "HSS6X6X3/8",
1174
- "wp": [[x,y0],[x,y1]],
1174
+ "wp": [[x,y],[x,y]], // BOTH work points are the SAME plan point — a column is a dot in plan
1175
1175
  "angle": "V",
1176
1176
  "role": "column",
1177
1177
  "rot": 0,
@@ -1205,7 +1205,14 @@ Key field rules:
1205
1205
  - **Endpoint direction (canonical order).** `wp[0]`/`ends[0]` is the member's **START** (drawn as a
1206
1206
  **yellow** dot in the editor); `wp[1]`/`ends[1]` is the **END** (drawn **magenta**). Always emit
1207
1207
  endpoints in a consistent direction so start/end read the same across the whole takeoff:
1208
- - **Columns** — bottom → top (start at the lower elevation): `wp`/`col` go `bos` (start) → `tos` (end).
1208
+ - **Columns** — bottom → top (start at the lower elevation): `col` goes `bos` (start) → `tos` (end).
1209
+ **A column's TWO WORK POINTS ARE THE SAME PLAN POINT** — `wp: [[x,y],[x,y]]`. The rise lives in
1210
+ `col.bos`/`col.tos` and nowhere else; `wp` says only *where the column stands*, and a column stands
1211
+ over one point. Emitting two different plan points describes a member that travels sideways as it
1212
+ rises, which no column can do — it is what a beam or a brace read as a column looks like, and the
1213
+ conversion to the model now stops and asks about every one of them (`column-plan-offset`). If the
1214
+ line you are reading really does run across the plan, it is a **beam** (`role: "beam"`, with
1215
+ `memberType: "brace"` if it braces), not a column with two points.
1209
1216
  - **Beams** in plan — **left → right** (start = smaller X); for a vertical-in-plan run, **bottom → up**
1210
1217
  (start = the lower end on the sheet, i.e. the **larger** display-Y since display Y grows downward).
1211
1218
  This is the on-screen reading direction (→ or ↑). It costs nothing to get right at authoring time and
package/dist/web/app.css CHANGED
@@ -536,13 +536,17 @@
536
536
  .onb-foot { font-size: 12px; color: var(--text-muted); margin-top: 16px; line-height: 1.5; }
537
537
  /* Quiet secondary first-run action — an inline text button, NOT a second filled
538
538
  button, so "Start the guided tour" stays the dominant primary. Existing tokens only. */
539
- .onb-build-btn {
539
+ /* .ws-empty-tour-btn (the Workspaces first-run tour link, #598) rides on this selector rather than
540
+ copying its declarations: it is the same tier — a quiet inline text action that must stay
541
+ subordinate to a nearby primary — and one rule is what stops the two drifting apart. */
542
+ .onb-build-btn, .ws-empty-tour-btn {
540
543
  background: none; border: none; padding: 0; cursor: pointer;
541
544
  font-family: var(--ui); font-size: 12px; font-weight: 600; color: var(--accent);
542
545
  letter-spacing: 0.01em;
543
546
  }
544
- .onb-build-btn:hover { color: var(--accent-bright); text-decoration: underline; }
545
- .onb-build-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
547
+ .onb-build-btn:hover, .ws-empty-tour-btn:hover { color: var(--accent-bright); text-decoration: underline; }
548
+ .onb-build-btn:focus-visible, .ws-empty-tour-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
549
+ .onb-build-btn:disabled, .ws-empty-tour-btn:disabled { cursor: default; text-decoration: none; }
546
550
  /* "Start the guided tour" — the primary first-run action (copies the onboarding launch prompt).
547
551
  Accent-soft region + filled-accent button mirror the .agent-card.selected / #run-btn primary
548
552
  tier; all tokens existing (locked baseline — no new fonts/colors). */
@@ -550,7 +554,27 @@
550
554
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
551
555
  margin-top: 14px; padding: 11px 14px;
552
556
  background: var(--accent-soft); border: 1px solid var(--accent-dim); border-radius: 6px;
553
- }
557
+ /* Lets .onb-tour-manual take its own row when the clipboard was refused. It also lets the hint and
558
+ button stack once the row is too narrow for both, which the old nowrap squeezed instead. */
559
+ flex-wrap: wrap;
560
+ }
561
+ /* The clipboard-refused fallback: the prompt itself, on screen and selectable, because the message
562
+ tells the user to copy it manually and nothing else on either surface holds it. Themed like the
563
+ app's other read-only technical values (mono on surface-2) — never a native white control, and
564
+ with its own scrollbar themed because a textarea is a scroll container too. */
565
+ .onb-tour-manual {
566
+ display: block; width: 100%; flex-basis: 100%; margin-top: 10px; box-sizing: border-box;
567
+ background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: 4px;
568
+ color: var(--text); font-family: var(--mono); font-size: 11px; line-height: 1.5; padding: 7px 9px;
569
+ /* resize:vertical, not none: two rows fits the prompt with very little margin, and a font
570
+ fallback or a user minimum-font-size pushes it to a third — which would otherwise scroll behind
571
+ a scrollbar with no way to open the box up. */
572
+ resize: vertical; scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent;
573
+ }
574
+ .onb-tour-manual::-webkit-scrollbar { width: 9px; }
575
+ .onb-tour-manual::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 9px; }
576
+ .onb-tour-manual::-webkit-scrollbar-track { background: transparent; }
577
+ .onb-tour-manual:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
554
578
  .onb-tour-hint { flex: 1; font-size: 11px; color: var(--text-dim); font-style: italic; line-height: 1.45; }
555
579
  .onb-tour-btn {
556
580
  flex: none; background: var(--accent); color: #ffffff; border: 1px solid var(--accent);
@@ -1760,8 +1784,40 @@
1760
1784
  #tooltip[hidden] { display: none; }
1761
1785
 
1762
1786
  /* ========== REQUESTS WINDOW ========== */
1763
- .modal.requests { width: 580px; max-width: 92vw; }
1764
- .requests-list { display: flex; flex-direction: column; gap: 8px; max-height: 52vh; overflow-y: auto; margin: 4px 0 2px; }
1787
+ /* Column layout with a viewport cap, mirroring #form-modal (#125): .modal declares no
1788
+ max-height and .modal-backdrop centres without overflow, so an over-tall modal is clipped at
1789
+ the TOP and its title becomes unreachable. The scope row + search box added ~90px of FIXED
1790
+ chrome above the list, which moves that threshold up by exactly that much — the list has to
1791
+ flex against the cap instead of carrying its own 52vh. */
1792
+ .modal.requests { width: 580px; max-width: 92vw; max-height: 86vh; display: flex; flex-direction: column; }
1793
+ /* Scope filter — the shared .tabs underline language, minus the uppercasing: this tab is
1794
+ labelled with a REAL name (an app id like `steel-model`, a project like "Cedar Mill
1795
+ Warehouse"), and uppercasing those misreads them. Long names ellipsize; the full name
1796
+ is on the tab's data-tip. */
1797
+ .req-scope { margin: 2px 0 12px; }
1798
+ /* `hidden` is a no-op without this. The UA's [hidden]{display:none} loses to .tabs{display:flex}
1799
+ on specificity, so `$scope.hidden = true` left the row on screen showing its UNRENDERED
1800
+ markup — a blank first tab and the literal "All" placeholder from index.html — whenever there
1801
+ was no scope to name (the Workspaces landing, or no workflow open). */
1802
+ .req-scope[hidden] { display: none; }
1803
+ /* The tab is a flex row, NOT one ellipsizing line, because the count is the trailing child:
1804
+ `text-overflow: ellipsis` clips the END, so a long project name would truncate away the very
1805
+ number that tells you how many requests the filter is hiding. The NAME ellipsizes; the count
1806
+ never shrinks. */
1807
+ .req-scope button { text-transform: none; letter-spacing: 0; font-size: 12px; padding: 8px 10px;
1808
+ min-width: 0; display: flex; align-items: baseline; justify-content: center; gap: 5px; }
1809
+ .req-scope button[data-reqscope="all"] { flex: 0 0 auto; }
1810
+ .req-scope .req-scope-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
1811
+ .req-scope .req-scope-n { color: var(--text-muted); font-variant-numeric: tabular-nums; flex: 0 0 auto; }
1812
+ .req-scope button.active .req-scope-n { color: var(--accent-dim); }
1813
+ .req-search { margin-bottom: 10px; flex: 0 0 auto; }
1814
+ /* Flexes against .modal.requests' 86vh cap rather than declaring its own 52vh — see the note
1815
+ there. min-height:0 is what lets a flex child actually shrink and scroll. */
1816
+ .requests-list { display: flex; flex-direction: column; gap: 8px; flex: 1 1 auto; min-height: 0; overflow-y: auto; margin: 4px 0 2px;
1817
+ scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
1818
+ .requests-list::-webkit-scrollbar { width: 7px; }
1819
+ .requests-list::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 7px; }
1820
+ .requests-list::-webkit-scrollbar-track { background: transparent; }
1765
1821
  .req-item {
1766
1822
  display: flex; gap: 10px; align-items: flex-start;
1767
1823
  padding: 10px 12px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface-2);
@@ -1769,6 +1825,12 @@
1769
1825
  .req-info { flex: 1; min-width: 0; }
1770
1826
  .req-head { font-size: 12px; color: var(--text-dim); display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
1771
1827
  .req-head code { font-family: var(--mono); color: var(--text-muted); }
1828
+ /* WHICH project or workflow this request is about — the row's subject, so it reads as a name
1829
+ rather than the muted mono identifier the app id used to be rendered as. One treatment for
1830
+ both: "Cedar Mill Warehouse" and `steel-model` answer the same question here, and setting
1831
+ names in prose and ids in mono would split one column into two visual languages.
1832
+ Truncates rather than pushing the timestamp off the row. */
1833
+ .req-owner { color: var(--text-muted); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
1772
1834
  .req-time { font-family: var(--mono); font-size: 9.5px; color: var(--text-muted); letter-spacing: 0; flex-shrink: 0; margin-left: auto; }
1773
1835
  .req-type {
1774
1836
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em;
@@ -1778,10 +1840,31 @@
1778
1840
  .req-type-tweak { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, transparent); }
1779
1841
  .req-instruction {
1780
1842
  font-size: 12px; color: var(--text); line-height: 1.45; word-break: break-word;
1781
- /* Clamp long instructions so one verbose request can't dominate the list — the
1782
- full text is always one click away via the copy button. */
1783
- display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
1784
- }
1843
+ /* Readable in full, in place. This used to be a 3-line -webkit-line-clamp, which cut every
1844
+ instruction mid-sentence ("…KEEP its ETag — the…") with no way to read the rest without
1845
+ copying it out. A max-height + own scroller caps how much of the list one verbose request
1846
+ can eat while still letting you read all of it here.
1847
+ Nested-scroll note: overscroll-behavior is deliberately left at `auto` so reaching the end
1848
+ of an instruction CHAINS the wheel back to .requests-list — `contain` would trap the wheel
1849
+ inside a row. Rows short enough to fit never become scrollers at all. */
1850
+ max-height: 90px; overflow-y: auto;
1851
+ scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent;
1852
+ }
1853
+ .req-instruction::-webkit-scrollbar { width: 7px; }
1854
+ .req-instruction::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 6px; }
1855
+ .req-instruction::-webkit-scrollbar-track { background: transparent; }
1856
+ /* The search hit, highlighted where it sits — in the instruction AND in the name, since a query
1857
+ often matches the project rather than the wording. With several near-identical queued tweaks,
1858
+ "which one matched?" is otherwise guesswork. Tinted text, not a block highlight: a filled
1859
+ swatch would out-shout the accent language of the rest of the modal. */
1860
+ .req-item mark { background: color-mix(in srgb, var(--accent) 22%, transparent);
1861
+ color: var(--text); border-radius: 2px; padding: 0 1px; }
1862
+ /* "Show all" inside the scoped-empty state — a link, not a button: it's an aside inside a
1863
+ sentence, and a second bordered control here would compete with the scope tabs it defers to.
1864
+ Accent (not --err) on hover: switching scope is the opposite of destructive. */
1865
+ .req-showall { background: none; border: none; padding: 0; font: inherit; font-style: inherit;
1866
+ color: var(--text-dim); text-decoration: underline; cursor: pointer; }
1867
+ .req-showall:hover { color: var(--accent); }
1785
1868
  .req-actions { display: flex; gap: 4px; flex-shrink: 0; }
1786
1869
  .req-copy, .req-del {
1787
1870
  /* flex-center the glyph; padding:0 overrides the global button padding (7px 12px)
@@ -4055,7 +4138,11 @@ body.mode-workspaces #menu .menu-item[data-action="bake"] { display:none; }
4055
4138
  max-width:22ch; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
4056
4139
  font-family:var(--mono); font-size:10px; color:var(--text-dim);
4057
4140
  }
4058
- .ws-empty-note { color:var(--text-dim); font-size:12px; margin-top:10px; }
4141
+ .ws-empty-note { color:var(--text-dim); font-size:12px; margin-top:10px; line-height:1.55; max-width:640px; }
4142
+ /* First-run tour link (#598) — its own line so the prose above stays prose, but no box, no fill and
4143
+ no accent region: the create cards above are the primary action and this must not compete with
4144
+ them. Styling comes from .onb-build-btn's rule (see the .onb-* block); only the spacing is here. */
4145
+ .ws-empty-tour { margin-top:8px; }
4059
4146
  /* A FAILED load, not an empty workspace. Same inline-banner recipe as .hist-empty / .hd-warn below
4060
4147
  (surface-2 + a left rail) so it reads as a sibling of the app's other status banners, railed in
4061
4148
  --warn: a list that wouldn't load is "needs attention", not the definite operation failure --err