@floless/app 0.153.0 → 0.155.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/dist/floless-server.cjs +51767 -38222
  2. package/dist/schemas/revit.model.v1.schema.json +5 -0
  3. package/dist/schemas/steel.model.v2.schema.json +19 -5
  4. package/dist/skills/floless-app-new-workflow/SKILL.md +8 -2
  5. package/dist/skills/floless-app-onboarding/SKILL.md +31 -19
  6. package/dist/skills/floless-app-onboarding/references/floless-surfaces.md +20 -11
  7. package/dist/skills/floless-app-queue/SKILL.md +23 -4
  8. package/dist/skills/floless-app-steel-model/SKILL.md +23 -2
  9. package/dist/skills/floless-app-steel-takeoff/SKILL.md +158 -65
  10. package/dist/skills/floless-app-workflows/SKILL.md +23 -5
  11. package/dist/skills/floless-app-workflows/references/blender-exec.md +183 -0
  12. package/dist/skills/floless-app-workflows/references/dev-server-and-run-trace.md +27 -12
  13. package/dist/templates/blender-construction-sequence.flo +96 -0
  14. package/dist/web/agents.js +33 -13
  15. package/dist/web/app.css +331 -34
  16. package/dist/web/app.js +12 -1
  17. package/dist/web/aware.js +1167 -137
  18. package/dist/web/chat-question-card.js +477 -0
  19. package/dist/web/chat.css +237 -25
  20. package/dist/web/chat.js +2156 -889
  21. package/dist/web/commands-shell.js +578 -21
  22. package/dist/web/commands-steel.js +105 -4
  23. package/dist/web/guide.js +217 -16
  24. package/dist/web/index.html +104 -10
  25. package/dist/web/instructor.js +10 -9
  26. package/dist/web/left-pane.js +43 -6
  27. package/dist/web/media-player.js +234 -0
  28. package/dist/web/model-editor-contract.js +2 -0
  29. package/dist/web/model-editor-revit-adapter.js +1 -0
  30. package/dist/web/model-editor-steel-adapter.js +89 -1
  31. package/dist/web/model-panel-bridge.js +16 -2
  32. package/dist/web/model-view-query.js +590 -0
  33. package/dist/web/model-viewport-revit-adapter.js +15 -1
  34. package/dist/web/model-viewport-toolbar.js +5 -2
  35. package/dist/web/pages.js +592 -0
  36. package/dist/web/panels.js +2 -1
  37. package/dist/web/revit-editor.js +182 -16
  38. package/dist/web/run-progress.js +193 -0
  39. package/dist/web/run-strip.js +173 -0
  40. package/dist/web/steel-3d-core.js +70 -0
  41. package/dist/web/steel-editor.html +2751 -219
  42. package/dist/web/steel-frames-core.js +958 -0
  43. package/dist/web/steel-last-seen.js +315 -0
  44. package/dist/web/steel-marks-core.js +530 -0
  45. package/dist/web/steel-model-slim.js +95 -0
  46. package/dist/web/steel-model-v2-client-validation.js +14 -2
  47. package/dist/web/steel-model-v2-commands.js +258 -27
  48. package/dist/web/steel-model-v2-projection.js +78 -18
  49. package/dist/web/steel-read-confidence.js +11 -2
  50. package/dist/web/tekla-structural-grid-adapter.js +7 -1
  51. package/dist/web/tool-updates.js +141 -33
  52. package/dist/web/workspaces.js +446 -30
  53. package/package.json +3 -2
@@ -0,0 +1,96 @@
1
+ app: blender-construction-sequence
2
+ version: 0.1.0
3
+ display-name: Construction Sequence Animation
4
+ publisher: floless
5
+ description: |
6
+ Turn a building model into a construction-sequence video: the structure goes up storey by storey,
7
+ lowest first, seen from a three-quarter view, rendered by Blender on this computer with nobody
8
+ pressing anything. Point it at any IFC — exported from Tekla, Revit, or a FloLess steel model — and
9
+ run it. FloLess shows each frame as it renders, so a long render never looks stuck, and the finished
10
+ video plays right inside FloLess. Needs Blender (a free download from blender.org); if a run cannot
11
+ finish because something is missing, FloLess tells you which piece to install or update.
12
+ exposes-as-agent: false
13
+ # Workflow changelog (FloLess-published). Newest first; the app shows entries newer than the installed
14
+ # version when offering an update. Plain-English — it surfaces to the user.
15
+ changelog:
16
+ - version: 0.1.0
17
+ summary: Make a storey-by-storey construction video of any building model, rendered in Blender
18
+ inputs:
19
+ ifc-path:
20
+ type: string
21
+ widget: file
22
+ accept: [ifc]
23
+ description: The building model to animate, as an IFC file.
24
+ output-dir:
25
+ type: string
26
+ description: Where the video is saved. Leave it empty and FloLess keeps it for you, so it plays inside the app.
27
+ seconds-per-storey:
28
+ type: number
29
+ default: 0.6
30
+ description: How long each storey takes to appear, in seconds.
31
+ requires:
32
+ - blender@0.2.x
33
+ requires-permissions:
34
+ filesystem:
35
+ - read: '{{ inputs.ifc-path }}'
36
+ - write: '{{ inputs.output-dir }}'
37
+ layout: linear
38
+ nodes:
39
+ - id: animate
40
+ agent: blender
41
+ command: exec
42
+ safety: { transaction-group: render, snapshot: false }
43
+ inputs:
44
+ ifc-path: '{{ inputs.ifc-path }}'
45
+ preset: realistic
46
+ output-dir: '{{ inputs.output-dir }}'
47
+ timeout-seconds: 3600
48
+ args:
49
+ seconds-per-storey: '{{ inputs.seconds-per-storey }}'
50
+ fps: 24
51
+ code: |
52
+ # Builds the model up storey by storey, lowest storey first, and renders it as a video seen from a
53
+ # three-quarter view. Each storey appears in turn, then the finished building holds for a second.
54
+ def run(ctx):
55
+ fps = int(ctx.args.get("fps", 24))
56
+ try:
57
+ per = float(ctx.args.get("seconds-per-storey", 0.6))
58
+ except (TypeError, ValueError):
59
+ per = 0.6
60
+ step = max(1, int(round(fps * per)))
61
+ groups = {}
62
+ for obj, props in ctx.elements():
63
+ groups.setdefault(props["storey"] or "(no storey)", []).append(obj)
64
+ if not groups:
65
+ return {"storeys": [], "note": "the model had no elements to animate"}
66
+
67
+ # Order storeys by height, never by name: names are free text ("Level 1", "GF", "T.O. Steel").
68
+ def lowest(objs):
69
+ best = None
70
+ for obj in objs:
71
+ for corner in obj.bound_box:
72
+ z = (obj.matrix_world @ __import__("mathutils").Vector(corner)).z
73
+ best = z if best is None or z < best else best
74
+ return best if best is not None else 0.0
75
+
76
+ order = sorted(groups, key=lambda key: lowest(groups[key]))
77
+ scene = ctx.scene
78
+ scene.render.fps = fps
79
+ scene.render.resolution_x, scene.render.resolution_y = 1280, 720
80
+ scene.frame_start = 1
81
+ scene.frame_end = step * len(order) + fps
82
+ for index, key in enumerate(order):
83
+ appear = 1 + index * step
84
+ for obj in groups[key]:
85
+ obj.hide_render = index > 0
86
+ obj.keyframe_insert("hide_render", frame=1)
87
+ if index > 0:
88
+ obj.keyframe_insert("hide_render", frame=appear - 1)
89
+ obj.hide_render = False
90
+ obj.keyframe_insert("hide_render", frame=appear)
91
+ ctx.ground(True)
92
+ ctx.environment("studio")
93
+ ctx.frame("hero")
94
+ ctx.plan_passes(1)
95
+ video = ctx.render_animation("construction-sequence.mp4")
96
+ return {"storeys": order, "frames": scene.frame_end, "video": video.get("path")}
@@ -455,32 +455,52 @@
455
455
  await window.flolessRoutines.editForAgent(state.agent.agentId, $surface.querySelector('#ag-schedule'));
456
456
  }
457
457
 
458
- // #2035: what each recorded decline became, in the person's words.
459
- const DECLINE_LABEL = { declined: 'Declined', 'not-sent': 'Stopped before it was answered' };
458
+ // #2035: what each recorded decline became, in the person's words. #2223 review #16: a question the AI asked is not a
459
+ // step anything declined — the AI went on without the person's answer — so it is never labelled or counted as declined.
460
+ const DECLINE_LABEL = { declined: 'Declined', 'not-sent': 'Stopped before it was answered', assumed: 'Went on without your answer' };
461
+ // T2-5: a question (`question: true`, in every state) is labelled as a question, never as a step.
462
+ const QUESTION_LABEL = { assumed: 'Went on without your answer', 'not-sent': 'Stopped before the AI could go on' };
463
+ const isQuestion = (entry) => entry.question === true || entry.state === 'assumed';
460
464
 
461
- /** The steps a routine-started run declined because nobody was watching: the "Questions for you" list. */
465
+ /** The steps a routine-started run declined, and the questions it asked, because nobody was watching: "Questions for you". */
462
466
  function questionsFor(run, target, label) {
463
467
  const d = target.declines;
464
468
  if (!d) return null;
465
- const total = d.list.length + d.moreDeclined + d.moreNotSent;
469
+ // `moreAssumed` is absent on a run recorded before questions were told apart.
470
+ const moreAssumed = d.moreAssumed || 0;
471
+ const moreQuestionsNotSent = d.moreQuestionsNotSent || 0;
472
+ const total = d.list.length + d.moreDeclined + d.moreNotSent + moreAssumed + moreQuestionsNotSent;
466
473
  if (!total) return null;
467
- const declined = d.list.filter((entry) => entry.state === 'declined').length + d.moreDeclined;
474
+ const asked = d.list.filter(isQuestion).length + moreAssumed + moreQuestionsNotSent;
475
+ const steps = total - asked;
476
+ const declined = d.list.filter((entry) => !isQuestion(entry) && entry.state === 'declined').length + d.moreDeclined;
468
477
  const working = target.live === 'working' || target.live === 'starting';
469
478
  const details = el('details', { class: 'ag-questions' },
470
479
  el('summary', { 'data-command-id': `shell.agents-run-questions#${label}`, 'data-command-instance-label': label, text: `Questions for you (${total})` }));
471
- details.append(el('p', { class: 'ag-help', text: declined === 0
472
- ? `${total === 1 ? 'One step' : `${total} steps`} needed your approval while nobody was watching; none ${total === 1 ? 'was' : 'were'} confirmed as declined. Run the agent by hand to do ${total === 1 ? 'it' : 'them'} with you watching.`
473
- : declined === 1
474
- ? 'One step was declined because nobody was watching. Run the agent by hand to do it with you watching.'
475
- : `${declined} steps were declined because nobody was watching. Run the agent by hand to do them with you watching.` }));
480
+ if (steps) {
481
+ details.append(el('p', { class: 'ag-help', text: declined === 0
482
+ ? `${steps === 1 ? 'One step' : `${steps} steps`} needed your approval while nobody was watching; none ${steps === 1 ? 'was' : 'were'} confirmed as declined. Run the agent by hand to do ${steps === 1 ? 'it' : 'them'} with you watching.`
483
+ : declined === 1
484
+ ? 'One step was declined because nobody was watching. Run the agent by hand to do it with you watching.'
485
+ : `${declined} steps were declined because nobody was watching. Run the agent by hand to do them with you watching.` }));
486
+ }
487
+ if (asked) {
488
+ details.append(el('p', { class: 'ag-help', text: asked === 1
489
+ ? 'The AI asked one question while nobody was watching, so nobody answered it. If your answer changes what it should do, run the agent again by hand.'
490
+ : `The AI asked ${asked} questions while nobody was watching, so nobody answered them. If your answers change what it should do, run the agent again by hand.` }));
491
+ }
476
492
  const list = el('ul', { class: 'ag-question-list' });
477
493
  for (const entry of d.list) {
478
- const status = DECLINE_LABEL[entry.state] || (working ? 'Being declined' : 'Could not confirm whether it was answered');
494
+ const status = isQuestion(entry)
495
+ ? QUESTION_LABEL[entry.state] || (working ? 'Telling the AI to go on' : 'Could not confirm whether the AI went on')
496
+ : DECLINE_LABEL[entry.state] || (working ? 'Being declined' : 'Could not confirm whether it was answered');
479
497
  list.append(el('li', {}, el('span', { class: 'ag-state', text: status }), el('span', { class: 'ag-question-text', text: entry.summary })));
480
498
  }
481
499
  details.append(list);
482
- const more = d.moreDeclined + d.moreNotSent;
483
- if (more) details.append(el('p', { class: 'ag-help', text: `…and ${more} more not listed here (${d.moreDeclined} declined, ${d.moreNotSent} stopped before they were answered).` }));
500
+ const more = d.moreDeclined + d.moreNotSent + moreAssumed + moreQuestionsNotSent;
501
+ if (more) {
502
+ details.append(el('p', { class: 'ag-help', text: `…and ${more} more not listed here (${d.moreDeclined} declined, ${d.moreNotSent} stopped before they were answered${moreAssumed ? `, ${moreAssumed} went on without your answer` : ''}${moreQuestionsNotSent ? `, ${moreQuestionsNotSent} stopped before the AI could go on` : ''}).` }));
503
+ }
484
504
  return details;
485
505
  }
486
506