@floless/app 0.155.2 → 0.156.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 (38) hide show
  1. package/cli-actions.mjs +376 -0
  2. package/dist/floless-server.cjs +100135 -86559
  3. package/dist/skills/floless-app-actions/SKILL.md +137 -0
  4. package/dist/skills/floless-app-approval/SKILL.md +8 -5
  5. package/dist/skills/floless-app-bridge/SKILL.md +12 -9
  6. package/dist/skills/floless-app-knowledge/SKILL.md +30 -13
  7. package/dist/skills/floless-app-new-workflow/SKILL.md +4 -4
  8. package/dist/skills/floless-app-onboarding/SKILL.md +1 -1
  9. package/dist/skills/floless-app-onboarding/references/aware-runtime.md +4 -4
  10. package/dist/skills/floless-app-queue/SKILL.md +10 -6
  11. package/dist/skills/floless-app-report-issue/SKILL.md +13 -10
  12. package/dist/skills/floless-app-rfi/SKILL.md +59 -68
  13. package/dist/skills/floless-app-routines/SKILL.md +19 -14
  14. package/dist/skills/floless-app-routines/references/routines-api.md +8 -2
  15. package/dist/skills/floless-app-workflows/SKILL.md +5 -4
  16. package/dist/web/agent-steps.js +933 -0
  17. package/dist/web/agents.js +5 -0
  18. package/dist/web/app.css +205 -3
  19. package/dist/web/app.js +1 -0
  20. package/dist/web/aware.js +584 -44
  21. package/dist/web/chat.css +9 -0
  22. package/dist/web/chat.js +195 -13
  23. package/dist/web/commands-shell.js +288 -1
  24. package/dist/web/index.html +52 -1
  25. package/dist/web/instructor.js +4 -2
  26. package/dist/web/leave-guard.js +4 -2
  27. package/dist/web/left-pane.js +8 -3
  28. package/dist/web/model-revit-module.js +15 -0
  29. package/dist/web/model-viewport-revit-adapter.js +3 -1
  30. package/dist/web/pages.js +27 -3
  31. package/dist/web/panels.js +3 -3
  32. package/dist/web/project-reconciliation.js +357 -0
  33. package/dist/web/revit-editor.js +116 -27
  34. package/dist/web/terminal-requests.js +541 -0
  35. package/dist/web/tool-updates.js +147 -13
  36. package/dist/web/workspaces.js +213 -12
  37. package/launch.mjs +80 -2
  38. package/package.json +1 -1
@@ -329,7 +329,7 @@
329
329
 
330
330
  def('menu.tool-updates', {
331
331
  label: 'Tool updates',
332
- actsOn: 'Opens Approve updated workflows: what new tool versions mean for your approved workflows, and a check for new ones',
332
+ actsOn: 'Opens Tool updates: which approved workflows a new tool version affects, what to do about each, and a check for new ones',
333
333
  group: 'In the ≡ menu',
334
334
  persistence: 'none',
335
335
  interaction: 'dialog',
@@ -2218,6 +2218,76 @@
2218
2218
  group: 'On an agent', persistence: 'none', interaction: 'dialog', risk: [], guidance: 'on-demand',
2219
2219
  why: 'Each run is an ordinary AI Chat conversation you can watch and answer. Nothing starts until you confirm.',
2220
2220
  });
2221
+ // #2241: an Agent as a workflow step. None of these edits a workflow: each puts a drafted request, with the exact step
2222
+ // FloLess wrote, into AI Chat's message box for the person to read and send.
2223
+ def('shell.agents-add-step', {
2224
+ label: 'Add an Agent step', actsOn: 'Asks AI Chat to add this saved agent to a workflow as a step: the request is drafted in the chat box and sent only when you send it',
2225
+ group: 'On an agent', persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand',
2226
+ why: 'The step’s answer is written by an AI and can differ each run. FloLess writes the step itself, so the AI copies it instead of retyping it.',
2227
+ });
2228
+ def('shell.agent-step-add', {
2229
+ label: 'Add an Agent step', actsOn: 'Opens the list of your saved agents, then drafts a request in AI Chat to add the one you pick to this workflow as a step',
2230
+ group: 'On the workflow canvas', persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand',
2231
+ why: 'Nothing in the workflow changes until you send the request and approve the result.',
2232
+ });
2233
+ def('shell.agent-step-choose', {
2234
+ label: 'Use agent as a step', actsOn: 'Drafts a request in AI Chat to add the agent {instance} to this workflow as a step', anyInstance: 'an agent',
2235
+ group: 'On the workflow canvas', persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand',
2236
+ });
2237
+ def('shell.agent-step-open-agents', {
2238
+ label: 'Open the Agents page', actsOn: 'Opens the Agents page, where you create a saved agent', group: 'On the workflow canvas',
2239
+ persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand',
2240
+ });
2241
+ // #2241 S4: the confirmation dialog a workflow with an AI step opens at Approve or Run.
2242
+ def('shell.agent-consent-tick', {
2243
+ label: 'I understand the AI step', actsOn: 'Confirms that this workflow has an AI step whose answer may differ each run. Only you can tick it',
2244
+ group: 'In the AI step confirmation', persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand',
2245
+ why: 'Nothing else in the workflow becomes non-deterministic: only the answer of the AI step can differ from run to run.',
2246
+ });
2247
+ def('shell.agent-consent-approve', {
2248
+ label: 'Approve workflow', actsOn: 'Records your confirmation and approves this workflow exactly as you reviewed it (from Run: confirms, then runs)',
2249
+ group: 'In the AI step confirmation', persistence: 'approved', interaction: 'instant', risk: ['costs-time'], guidance: 'on-demand',
2250
+ why: 'The record keeps who confirmed, when, and which steps. If the AI step is added to or changed later, you are asked again.',
2251
+ });
2252
+ def('shell.agent-consent-more', {
2253
+ label: 'Show full instructions', actsOn: 'Shows or hides the full instructions of the AI step, read only',
2254
+ group: 'In the AI step confirmation', persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand',
2255
+ });
2256
+ def('shell.agent-consent-remove', {
2257
+ label: 'Remove the AI step', actsOn: 'Drafts a request in AI Chat to remove the AI step from this workflow. Nothing changes until you send it',
2258
+ group: 'In the AI step confirmation', persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand',
2259
+ });
2260
+ def('shell.agent-step-update', {
2261
+ label: 'Ask the AI to update the Agent step', actsOn: 'Drafts a request in AI Chat to update, replace or remove this Agent step. Nothing changes until you send it',
2262
+ group: 'In the node Inspect panel', persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand',
2263
+ });
2264
+ def('shell.agent-step-keep', {
2265
+ label: 'Keep this revision', actsOn: 'Keeps the Agent step on the revision it uses now and hides this notice until the agent changes again',
2266
+ group: 'In the node Inspect panel', persistence: 'local', interaction: 'instant', risk: [], guidance: 'on-demand',
2267
+ });
2268
+ def('shell.agent-step-open-agent', {
2269
+ label: 'Open the agent', actsOn: 'Opens the saved agent this step uses, on the Agents page', group: 'In the node Inspect panel',
2270
+ persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand',
2271
+ });
2272
+ // #2241 S5: how the last run's AI steps went, and the card a run shows when it waits for the person before a change.
2273
+ def('shell.agent-run-toggle', {
2274
+ label: 'Last run: AI steps', actsOn: 'Shows or hides how the AI steps of the last run went, and the questions they left for you',
2275
+ group: 'On the workflow canvas', persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand',
2276
+ why: 'Each AI answer is labelled AI-produced because it can differ each run. Questions for you lists what the AI could not settle and any change that was not made.',
2277
+ });
2278
+ def('shell.agent-run-open-agent', {
2279
+ label: 'Open the Agent’s runs', actsOn: 'Opens the agent that answered this step, on the Agents page, where its runs and conversations are listed',
2280
+ group: 'On the workflow canvas', persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand',
2281
+ });
2282
+ def('shell.agent-gate-approve', {
2283
+ label: 'Approve change', actsOn: 'Lets the waiting workflow make the change shown on the card, with exactly the values shown. Only you can press it',
2284
+ group: 'On the workflow canvas', persistence: 'external', interaction: 'instant', risk: ['destructive'], guidance: 'on-demand',
2285
+ why: 'The workflow waits for you before it changes anything in a design program. The record keeps that you approved it.',
2286
+ });
2287
+ def('shell.agent-gate-skip', {
2288
+ label: 'Skip this change', actsOn: 'Tells the waiting workflow not to make the change. The rest of the run goes on and the record says the change was not made',
2289
+ group: 'On the workflow canvas', persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand',
2290
+ });
2221
2291
  // #2035: a routine can run this agent on a schedule, with nobody watching.
2222
2292
  def('shell.agents-schedule', {
2223
2293
  label: 'Schedule agent', actsOn: 'Opens a new routine that runs this agent on a schedule (saves your changes first)',
@@ -2751,6 +2821,58 @@
2751
2821
  anyInstance: 'the finished suggestion on the card',
2752
2822
  group: 'In AI Chat', persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand',
2753
2823
  });
2824
+ def('shell.chat-page-open', {
2825
+ label: 'Open a Page the AI saved', actsOn: 'Opens {instance} in the Page viewer beside the chat',
2826
+ anyInstance: 'the Page on the card',
2827
+ group: 'In AI Chat', persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand',
2828
+ why: 'A Page is a document the AI made from this conversation, such as a chart or a report. It is marked as made by AI, and every version is kept.',
2829
+ });
2830
+ def('shell.chat-page-open-original', {
2831
+ label: 'Open the Page a new one is based on', actsOn: 'Opens {instance}, the Page the AI was asked to change and left as it is',
2832
+ anyInstance: 'the original Page',
2833
+ group: 'In AI Chat', persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand',
2834
+ why: 'The AI only adds versions to Pages this conversation made. Asked to change another one, it saves a new Page based on it instead.',
2835
+ });
2836
+ // #2248: a request made from the terminal (`floless-app do`). The person answers it here; the terminal cannot.
2837
+ def('shell.terminal-request-review', {
2838
+ label: 'Review a request from your terminal', actsOn: 'Opens what your terminal asked FloLess to do; nothing runs until you choose',
2839
+ group: 'In the terminal requests dialog', persistence: 'none', interaction: 'dialog', risk: [], guidance: 'on-demand',
2840
+ });
2841
+ def('shell.terminal-request-later', {
2842
+ label: 'Decide later', actsOn: 'Hides the notice; the request from your terminal keeps waiting until it expires',
2843
+ group: 'In the terminal requests dialog', persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand',
2844
+ });
2845
+ def('shell.terminal-request-confirm', {
2846
+ label: 'Do what your terminal asked', actsOn: 'Does “{instance}” now, as your terminal asked; FloLess first checks that nothing changed since it asked',
2847
+ anyInstance: 'the request on the card',
2848
+ group: 'In the terminal requests dialog', persistence: 'external', interaction: 'instant', risk: ['destructive', 'costs-time'], guidance: 'on-demand',
2849
+ why: 'A terminal (you, or an AI working there) can ask for a real run or a change, but only your click here does it. If the approved version changed meanwhile, you are shown the new one first.',
2850
+ });
2851
+ def('shell.terminal-request-not-now', {
2852
+ label: 'Set the terminal’s request aside', actsOn: 'Sets “{instance}” aside; nothing runs, and the terminal is told you said not now',
2853
+ anyInstance: 'the request on the card',
2854
+ group: 'In the terminal requests dialog', persistence: 'external', interaction: 'instant', risk: [], guidance: 'on-demand',
2855
+ });
2856
+ def('shell.terminal-request-stop', {
2857
+ label: 'Stop the run your terminal asked for', actsOn: 'Asks “{instance}” to stop; work already sent to the host may remain',
2858
+ anyInstance: 'the running request',
2859
+ group: 'In the terminal requests dialog', persistence: 'external', interaction: 'instant', risk: [], guidance: 'on-demand',
2860
+ });
2861
+ def('shell.terminal-request-open', {
2862
+ label: 'Open the screen for a step only you can do', actsOn: 'Opens the screen for “{instance}”, which you do yourself; nothing runs from here',
2863
+ anyInstance: 'the step on the card',
2864
+ group: 'In the terminal requests dialog', persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand',
2865
+ why: 'Approving, sealing or issuing is always a person’s decision, so a terminal can only point you to where it is done.',
2866
+ });
2867
+ def('shell.terminal-request-view', {
2868
+ label: 'View what a finished request made', actsOn: 'Opens what “{instance}” made, such as a run’s report; nothing runs again',
2869
+ anyInstance: 'the finished request on the card',
2870
+ group: 'In the terminal requests dialog', persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand',
2871
+ });
2872
+ def('shell.terminal-request-close', {
2873
+ label: 'Close the terminal’s requests', actsOn: 'Closes this list; requests still waiting stay waiting until they expire',
2874
+ group: 'In the terminal requests dialog', persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand',
2875
+ });
2754
2876
  def('shell.chat-connection-check-allow-chat', {
2755
2877
  label: 'Approve this connection check for this conversation', actsOn: 'Allows this connection check of {instance}, and every identical later one in this conversation, without asking again until you revoke it',
2756
2878
  anyInstance: 'the tool on the card',
@@ -3218,6 +3340,25 @@
3218
3340
  guidance: 'on-demand',
3219
3341
  });
3220
3342
 
3343
+ def('shell.tool-updates-review-compile', {
3344
+ label: 'Review bulk compile',
3345
+ actsOn: 'Shows unchanged workflows whose older approvals can be refreshed together, with the consequences to review first',
3346
+ group: 'In the FloLess dialogs', persistence: 'none', interaction: 'dialog', risk: [], guidance: 'on-demand',
3347
+ why: 'Opening the review changes nothing. You confirm compilation separately after reviewing the workflows and warning.',
3348
+ });
3349
+ def('shell.tool-updates-confirm-compile', {
3350
+ label: 'Compile and approve workflows',
3351
+ actsOn: 'Compiles the reviewed workflows one at a time and records fresh approvals with the tools installed when each compiles',
3352
+ group: 'In the FloLess dialogs', persistence: 'approved', interaction: 'instant', risk: ['costs-time'], guidance: 'on-demand',
3353
+ why: 'Future results may change. It does not request a manual run; automation enabled during the batch can use the new approvals. Changed items need another review.',
3354
+ });
3355
+ def('shell.tool-updates-back', {
3356
+ label: 'Back to workflow updates',
3357
+ actsOn: 'Returns to the workflow update list without compiling or approving the reviewed workflows',
3358
+ group: 'In the FloLess dialogs', persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand',
3359
+ why: 'Back keeps this dialog open. Escape closes the dialog without approving anything.',
3360
+ });
3361
+
3221
3362
  def('shell.tool-updates-show-workflows', {
3222
3363
  label: 'Show or hide the workflows in a group',
3223
3364
  actsOn: 'Opens or closes the list of workflows under one reason in the tool update dialog',
@@ -3719,6 +3860,75 @@
3719
3860
  guidance: 'on-demand',
3720
3861
  });
3721
3862
 
3863
+ /* ── first-run setup card (#2381) ──────────────────────────────────────────
3864
+ The blocking card shown while AWARE is set up, and its "Install Node.js for me" route when
3865
+ setup found no Node.js. The server owns the install; these only ask, show and follow it. */
3866
+
3867
+ def('shell.setup-retry', {
3868
+ label: 'Try setup again',
3869
+ actsOn: 'Checks again for Node.js and AWARE, and carries on setting AWARE up',
3870
+ group: 'On the setup card',
3871
+ persistence: 'external',
3872
+ interaction: 'instant',
3873
+ risk: ['costs-time'],
3874
+ guidance: 'on-demand',
3875
+ why: 'Use it after installing Node.js yourself: FloLess looks again without needing a restart.',
3876
+ });
3877
+
3878
+ def('shell.setup-node-install', {
3879
+ label: 'Install Node.js for me',
3880
+ actsOn: 'Shows the exact install command and asks before anything runs',
3881
+ group: 'On the setup card',
3882
+ persistence: 'none',
3883
+ interaction: 'dialog',
3884
+ risk: [],
3885
+ guidance: 'on-demand',
3886
+ why: 'AWARE runs on Node.js. This step only shows what FloLess would run; nothing is installed until you choose Install.',
3887
+ });
3888
+
3889
+ def('shell.setup-node-install-confirm', {
3890
+ label: 'Install Node.js',
3891
+ actsOn: 'Installs Node.js on this computer with the command shown, then carries on setting AWARE up',
3892
+ group: 'On the setup card',
3893
+ persistence: 'external',
3894
+ interaction: 'instant',
3895
+ // destructive like its AI Chat twin updates.install-node: it installs system software for everyone
3896
+ // on this computer and accepts licence terms, which is more than merely slow.
3897
+ risk: ['destructive', 'costs-time'],
3898
+ guidance: 'on-demand',
3899
+ why: 'Windows asks for permission first. The install is for everyone on this computer.',
3900
+ });
3901
+
3902
+ def('shell.setup-node-install-cancel', {
3903
+ label: 'Cancel the Node.js install',
3904
+ actsOn: 'Goes back without installing anything',
3905
+ group: 'On the setup card',
3906
+ persistence: 'none',
3907
+ interaction: 'instant',
3908
+ risk: [],
3909
+ guidance: 'on-demand',
3910
+ });
3911
+
3912
+ def('shell.setup-node-install-copy', {
3913
+ label: 'Copy the install command',
3914
+ actsOn: 'Copies the command shown to the clipboard, to run it yourself',
3915
+ group: 'On the setup card',
3916
+ persistence: 'none',
3917
+ interaction: 'instant',
3918
+ risk: [],
3919
+ guidance: 'on-demand',
3920
+ });
3921
+
3922
+ def('shell.setup-node-download', {
3923
+ label: 'Download Node.js from nodejs.org',
3924
+ actsOn: 'Opens the Node.js download page in your browser',
3925
+ group: 'On the setup card',
3926
+ persistence: 'none',
3927
+ interaction: 'instant',
3928
+ risk: [],
3929
+ guidance: 'on-demand',
3930
+ });
3931
+
3722
3932
  /* ── updates ────────────────────────────────────────────────────────────── */
3723
3933
 
3724
3934
  def('shell.aware-update-apply', {
@@ -3857,6 +4067,31 @@
3857
4067
  guidance: 'on-demand',
3858
4068
  });
3859
4069
 
4070
+ // #2262 slice 3a: every successful real run's report is also a version of the workflow's Page.
4071
+ def('shell.report-page-open', {
4072
+ label: 'Open this report in Pages',
4073
+ actsOn: 'Opens the version of {instance}’s Page that this report became; nothing runs again',
4074
+ anyInstance: 'the workflow shown in the report viewer',
4075
+ group: 'In the report viewer',
4076
+ persistence: 'none',
4077
+ interaction: 'dialog',
4078
+ risk: [],
4079
+ guidance: 'on-demand',
4080
+ why: 'Each successful run of a workflow adds its report to that workflow’s Page, keeping the last twenty, so earlier reports stay available after FloLess restarts.',
4081
+ });
4082
+
4083
+ def('shell.report-latest-page-open', {
4084
+ label: 'Open the latest saved report',
4085
+ actsOn: 'Opens the newest version of {instance}’s Page when this window has no report of its own yet; nothing runs',
4086
+ anyInstance: 'the workflow shown in the report viewer',
4087
+ group: 'In the report viewer',
4088
+ persistence: 'none',
4089
+ interaction: 'dialog',
4090
+ risk: [],
4091
+ guidance: 'on-demand',
4092
+ why: 'After a reload or restart the viewer no longer holds the last report, but the workflow’s Page still does.',
4093
+ });
4094
+
3860
4095
  def('shell.report-watch', {
3861
4096
  label: 'Watch video',
3862
4097
  actsOn: 'Plays the video this run rendered alongside the report',
@@ -4166,6 +4401,58 @@
4166
4401
  label: 'Review stopping use of this directory', actsOn: 'Shows {instance} and explains which checks will stop while its identity remains reserved',
4167
4402
  group: 'In the Workspace directory dialog', persistence: 'none', interaction: 'dialog', risk: [], guidance: 'on-demand',
4168
4403
  });
4404
+ def('shell.project-folders-review', {
4405
+ label: 'Review project folders', actsOn: 'Opens the list of outside folders and unavailable projects awaiting your decision',
4406
+ group: 'In the project list', persistence: 'none', interaction: 'dialog', risk: [], guidance: 'on-demand',
4407
+ });
4408
+ def('shell.project-folders-check', {
4409
+ label: 'Check project folders', actsOn: 'Inspects folders in the current Workspace directory without adding or changing project registrations',
4410
+ group: 'In the Workspace directory dialog', persistence: 'none', interaction: 'instant', risk: ['costs-time'], guidance: 'on-demand',
4411
+ });
4412
+ def('shell.project-folder-recovery-retry', {
4413
+ label: 'Retry folder recovery', actsOn: 'Retries the interrupted folder change for {instance} from its saved recovery record and reports whether it completed, was cancelled, or still needs your help',
4414
+ group: 'In the Workspace directory dialog', persistence: 'working', interaction: 'instant', risk: ['costs-time'], guidance: 'on-demand',
4415
+ });
4416
+ def('shell.project-candidate-review', {
4417
+ label: 'Review project folder', actsOn: 'Shows the fresh folder details and available import or recovery choices for {instance}',
4418
+ group: 'In the Workspace directory dialog', persistence: 'none', interaction: 'dialog', risk: [], guidance: 'on-demand',
4419
+ });
4420
+ def('shell.project-registration-locate', {
4421
+ label: 'Locate project folder', actsOn: 'Opens the folder chooser for {instance}; choosing a folder starts a review and does not change ownership',
4422
+ group: 'In the Workspace directory dialog', persistence: 'none', interaction: 'dialog', risk: [], guidance: 'on-demand',
4423
+ });
4424
+ def('shell.project-registration-review', {
4425
+ label: 'Review unavailable project', actsOn: 'Opens folder recovery for {instance} while retaining its last known project details and unsaved editor work',
4426
+ group: 'In the project list', persistence: 'none', interaction: 'dialog', risk: [], guidance: 'on-demand',
4427
+ });
4428
+ def('shell.project-candidate-name', {
4429
+ label: 'Imported project name', actsOn: 'Edits the name for the separate project imported from {instance}',
4430
+ group: 'In the Workspace directory dialog', persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand',
4431
+ });
4432
+ def('shell.project-candidate-import', {
4433
+ label: 'Import as a new project', actsOn: 'Imports {instance} as a separate project with a new identity and reports which data was carried',
4434
+ group: 'In the Workspace directory dialog', persistence: 'working', interaction: 'instant', risk: ['costs-time'], guidance: 'on-demand',
4435
+ });
4436
+ def('shell.project-registration-reconcile', {
4437
+ label: 'Use folder for existing project', actsOn: 'Records the reviewed folder for {instance} in the current Workspace directory without approving its contents',
4438
+ group: 'In the Workspace directory dialog', persistence: 'working', interaction: 'instant', risk: ['costs-time'], guidance: 'on-demand',
4439
+ });
4440
+ def('shell.project-reconciliation-acknowledge', {
4441
+ label: 'Confirm this folder was moved', actsOn: 'Records your interpretation of the ambiguous location of {instance}; does not claim FloLess proved the move',
4442
+ group: 'In the Workspace directory dialog', persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand',
4443
+ });
4444
+ def('shell.project-candidate-show', {
4445
+ label: 'Show project folder', actsOn: 'Opens {instance} in the file browser without importing it',
4446
+ group: 'In the Workspace directory dialog', persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand',
4447
+ });
4448
+ def('shell.project-candidate-retry', {
4449
+ label: 'Check this folder again', actsOn: 'Rechecks the current details of {instance} before a new review',
4450
+ group: 'In the Workspace directory dialog', persistence: 'none', interaction: 'instant', risk: ['costs-time'], guidance: 'on-demand',
4451
+ });
4452
+ def('shell.project-folder-leave', {
4453
+ label: 'Leave folder for later', actsOn: 'Returns to the folder list while keeping this folder visible for a future review',
4454
+ group: 'In the Workspace directory dialog', persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand',
4455
+ });
4169
4456
  def('shell.workspace-root-destination', {
4170
4457
  label: 'Choose the directory to switch to', actsOn: 'Selects {instance} as the destination without switching yet',
4171
4458
  group: 'In the Workspace directory dialog', persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand',
@@ -91,6 +91,8 @@
91
91
  <!-- Shown only when the OPEN workflow is forked (user-owned, off the update channel). Purely
92
92
  informational (the badge of ownership); the picker row carries the same "yours" cue. -->
93
93
  <span id="wf-forked" class="wf-forked-pill" hidden role="status" data-tip="You forked this workflow — it no longer receives FloLess updates. You are responsible for verifying its output.">yours · off updates</span>
94
+ <!-- #2241: the open workflow has a step answered by an AI Agent. Text only; the tip says exactly what varies. -->
95
+ <span id="wf-agent-step" class="wf-forked-pill wf-ai-pill" hidden role="status"></span>
94
96
  <!-- Agents (⊞) and Routines (⏱) buttons moved into the ≡ menu in #149
95
97
  (Ctrl+G / Ctrl+R); the toolbar keeps only the run-critical controls. -->
96
98
  <span class="ctl-sep" aria-hidden="true"></span>
@@ -385,8 +387,18 @@
385
387
  ("Rendering frame 143 of 240"), elapsed time, a real bar, and Stop. Painted by web/run-strip.js from
386
388
  aware.js; appears only once a run has lasted 2 s or reports progress, so quick runs never flash it. -->
387
389
  <div class="run-strip" id="run-strip" role="group" aria-label="Run progress" hidden></div>
390
+ <!-- #2241 S5: how the last run went for its AI steps - each answer labelled AI-produced, and the batched "Questions for you".
391
+ Hidden unless the last run had an AI step. Filled by web/agent-steps.js from GET /api/latest-run/:id. -->
392
+ <details class="as-run" id="as-run" hidden>
393
+ <summary id="as-run-sum" data-command-id="shell.agent-run-toggle"></summary>
394
+ <div class="as-run-body" id="as-run-body"></div>
395
+ </details>
388
396
  <div class="topology" id="topology"></div>
389
397
  <div class="canvas-toolbar">
398
+ <!-- #2241: shown only while Agents as workflow steps is on (web/agent-steps.js). It asks AI Chat to add the step; it edits nothing itself. -->
399
+ <div class="toolbar-group as-add-group" id="as-add-group" hidden>
400
+ <button data-command-id="shell.agent-step-add" class="tb-btn tb-text" id="as-add" type="button" aria-haspopup="listbox" aria-expanded="false" data-tip="Add an Agent step… It asks AI Chat to add the step. Nothing changes until you send the request.">+ Agent step</button>
401
+ </div>
390
402
  <div class="toolbar-group">
391
403
  <button data-command-id="canvas.zoom#out" class="tb-btn" id="zoom-out" data-tip="Zoom out">−</button>
392
404
  <button data-command-id="canvas.zoom#back to 100%" class="tb-btn tb-pct" id="zoom-reset" data-tip="Reset to 100%">100%</button>
@@ -434,6 +446,7 @@
434
446
  <!-- The announcer stays outside the bounded visual region so it is mounted before the first
435
447
  update. The region itself is named for keyboard users whenever its content scrolls. -->
436
448
  <span class="sr-only wsg-live" id="ws-stage-guidance-live" role="status" aria-live="polite" aria-atomic="true"></span>
449
+ <div class="ws-project-location-warning" id="ws-project-location-warning" role="status" aria-live="polite" hidden></div>
437
450
  <div class="ws-stage-guidance" id="ws-stage-guidance" role="region" aria-label="Drawing read progress" hidden></div>
438
451
  <!-- Revision-read status card, ABOVE the filter iframe (chrome around it, never inside — the
439
452
  filter owns its own layout). Shown only on Drawings, and only when there is one. -->
@@ -694,6 +707,40 @@
694
707
  </div>
695
708
  </div>
696
709
 
710
+ <!-- Held change (#2241, S5): a run stopped at a confirmation step and waits for the person. Not a modal: the canvas stays usable.
711
+ Filled by web/agent-steps.js from GET /api/chat/agent-steps/gates; the buttons post the person's decision. -->
712
+ <section class="as-gate" id="as-gate" role="region" aria-label="Waiting for your approval" tabindex="-1" hidden>
713
+ <div class="as-gate-live" id="as-gate-live" aria-live="assertive"></div>
714
+ <div class="as-gate-label" id="as-gate-label">Values that will be used</div>
715
+ <pre class="as-gate-values" id="as-gate-values" tabindex="0" aria-labelledby="as-gate-label"></pre>
716
+ <div class="as-gate-time" id="as-gate-time"></div>
717
+ <div class="as-gate-error" id="as-gate-error" role="alert" hidden></div>
718
+ <div class="as-gate-actions">
719
+ <button type="button" id="as-gate-skip" class="as-btn" data-command-id="shell.agent-gate-skip">Skip this change</button>
720
+ <button type="button" id="as-gate-approve" class="as-btn primary" data-command-id="shell.agent-gate-approve">Approve change</button>
721
+ </div>
722
+ <div class="as-gate-queue" id="as-gate-queue">This run holds the queue; other runs wait.</div>
723
+ </section>
724
+
725
+ <!-- Agent step confirmation (#2241, S4). Opened by Approve and Run when a workflow has an AI step nobody has confirmed (or that
726
+ changed since). One tick-box; the server records who, when and exactly which steps. Filled by web/agent-steps.js. -->
727
+ <div class="modal-backdrop" id="agent-consent-modal" role="dialog" aria-modal="true" aria-labelledby="ac-title" aria-describedby="ac-sub ac-warning">
728
+ <div class="modal ac-dialog">
729
+ <div class="modal-title" id="ac-title" tabindex="-1">This workflow includes an AI step</div>
730
+ <div class="modal-sub" id="ac-sub"></div>
731
+ <div class="ac-body" id="ac-body"></div>
732
+ <div class="ac-warning" id="ac-warning" hidden></div>
733
+ <label class="modal-check"><input type="checkbox" id="ac-tick" data-command-id="shell.agent-consent-tick" aria-label="I understand that this workflow has an AI step whose answer may differ each run" aria-describedby="ac-hint"><span id="ac-tick-label"></span></label>
734
+ <div class="ac-hint" id="ac-hint">Tick the box to continue.</div>
735
+ <div class="ac-error" id="ac-error" role="alert" hidden></div>
736
+ <div class="modal-actions">
737
+ <button data-command-id="shell.dialog-cancel#the AI step confirmation" id="ac-cancel">Cancel</button>
738
+ <button data-command-id="shell.agent-consent-remove" id="ac-remove" data-tip="Asks AI Chat to draft the change. Nothing is edited until you send it and approve the result.">Remove the AI step</button>
739
+ <button data-command-id="shell.agent-consent-approve" id="ac-ok" class="primary" aria-disabled="true" aria-describedby="ac-hint">Approve workflow</button>
740
+ </div>
741
+ </div>
742
+ </div>
743
+
697
744
  <!-- AWARE runtime + installed-host-bridge upgrade. One dedicated surface is
698
745
  shared by the footer pill and Workspaces recovery actions. Progress comes
699
746
  from the server transaction; this UI never infers installer completion. -->
@@ -761,7 +808,7 @@
761
808
  aria-labelledby="tool-updates-title" aria-describedby="tool-updates-sub" aria-busy="false">
762
809
  <div class="modal tool-updates-dialog" tabindex="-1">
763
810
  <div class="modal-title" id="tool-updates-title" tabindex="-1">Approve updated workflows</div>
764
- <div class="modal-sub" id="tool-updates-sub">Your workflows keep running on the tool versions you approved until you approve a change.</div>
811
+ <div class="modal-sub" id="tool-updates-sub">Nothing changes until you act: your workflows keep running on the tool versions you approved.</div>
765
812
  <div class="tool-updates-body" id="tool-updates-body"></div>
766
813
  <div class="tool-updates-live" id="tool-updates-live" role="status" aria-live="polite" aria-atomic="true"></div>
767
814
  <div class="tool-updates-progress" id="tool-updates-progress" hidden></div>
@@ -1094,6 +1141,7 @@
1094
1141
  <button data-command-id="shell.report-watch" id="report-watch" type="button" class="ghost" hidden data-tip="Play the video this run rendered">▶ Watch video</button>
1095
1142
  <button data-command-id="shell.report-open-file" id="report-open-file" class="ghost" hidden data-tip="Open the saved file in its default app">⧉ Open file</button>
1096
1143
  <button data-command-id="shell.report-reveal-file" id="report-reveal-file" class="ghost" hidden data-tip="Show the saved file in its folder">▤ Reveal in folder</button>
1144
+ <button data-command-id="shell.report-page-open#this workflow" id="report-page" type="button" class="ghost" hidden data-tip="Every successful run of this workflow adds this report to the workflow's Page, keeping the last twenty">Open in Pages</button>
1097
1145
  <button data-command-id="shell.report-open" id="report-open" class="ghost" data-tip="Open the report in a new browser tab">↗ Open</button>
1098
1146
  <button data-command-id="shell.dialog-close#the report" id="report-close" data-tip="Close">×</button>
1099
1147
  </div>
@@ -1895,6 +1943,7 @@
1895
1943
  <script src="commands.js"></script>
1896
1944
  <script src="app.js"></script>
1897
1945
  <script src="workspace-root-management.js"></script>
1946
+ <script src="project-reconciliation.js"></script>
1898
1947
  <script src="parser-setup-recovery.js"></script>
1899
1948
  <script src="renderers.js"></script>
1900
1949
  <script src="aware-update-client.js"></script>
@@ -1904,6 +1953,7 @@
1904
1953
  <script src="run-progress.js"></script>
1905
1954
  <script src="run-strip.js"></script>
1906
1955
  <script src="media-player.js"></script>
1956
+ <script src="agent-steps.js"></script>
1907
1957
  <script src="aware.js"></script>
1908
1958
  <script src="tool-updates.js"></script>
1909
1959
  <script src="panels.js"></script>
@@ -1912,6 +1962,7 @@
1912
1962
  <script src="left-pane.js"></script>
1913
1963
  <script src="chat-question-card.js"></script>
1914
1964
  <script src="chat.js"></script>
1965
+ <script src="terminal-requests.js"></script>
1915
1966
  <script src="agents.js"></script>
1916
1967
  <script src="pages.js"></script>
1917
1968
  <script src="guide.js"></script>
@@ -861,14 +861,16 @@
861
861
  // The Informed by row sits at the top of the canvas column, so it is read right after the canvas.
862
862
  // #1998: the approval notices sit above the canvas with the Informed by row.
863
863
  'In the Needs you notice', 'In the morning briefing notice', 'In the Approval carried over row',
864
- 'In the Informed by row', 'In the run progress strip', 'In Set inputs',
864
+ 'In the Informed by row', 'In the run progress strip', 'In Set inputs', 'In the AI step confirmation',
865
865
  'At the left edge of the workspace', 'At the edge of the left or Inspect panel', 'In the left panel', 'Between AI Chat and Model', 'In the Model section of the left panel', 'In the Grid object in the Model section',
866
866
  'In AI Chat', 'In AI Chat history', 'In AI Chat settings', 'In the node Inspect panel', 'In the Instructor strip',
867
867
  'In the ≡ menu', 'In the account menu', 'In the footer',
868
868
  'In the contract editor', 'In the report viewer', 'In the Page viewer', 'In the video player', 'In the Knowledge Base viewer', 'In the guide',
869
- 'In the Tools library', 'In Discover local tools', 'In the requests list', 'In the revision review', 'In the run request dialog', 'In the Integrations dialog', 'In the Routines dialog', 'In the Automatic tool updates dialog',
869
+ 'In the Tools library', 'In Discover local tools', 'In the requests list', 'In the revision review', 'In the run request dialog', 'In the Integrations dialog', 'In the Routines dialog', 'In the Automatic tool updates dialog', 'In the terminal requests dialog',
870
870
  'In the Report an issue dialog', 'In the Build a tool dialog', 'In the Bake dialog', 'In the CAD send review',
871
871
  'In the FloLess dialogs', 'On the FloLess has stopped screen',
872
+ // #2381: the first-run setup card, which covers the whole window until AWARE is ready.
873
+ 'On the setup card',
872
874
  /* the steel editor — read top-left down, then the menus, then the dialogs.
873
875
  The ⋯ menu is six groups rather than one because it is six accordion
874
876
  sections on screen: a single 'In the ⋯ menu' would have been about thirty
@@ -498,14 +498,16 @@
498
498
  return { ok: false, message: body && STOP_REFUSALS[body.code] && body.error ? body.error : null };
499
499
  }
500
500
 
501
+ /** Resolves true once FloLess has stopped; false when nothing was stopped (the person cancelled, or a stop is already under way). */
501
502
  async function stopApp() {
502
- if (stopping || window.__flolessStopped) return;
503
+ if (stopping || window.__flolessStopped) return false;
503
504
  stopping = true;
504
505
  try {
505
506
  var go = await confirm({ action: 'stop', returnFocus: document.getElementById('menu-btn'), commit: requestStop });
506
- if (!go) return;
507
+ if (!go) return false;
507
508
  quiesce();
508
509
  renderStopped();
510
+ return true;
509
511
  } finally {
510
512
  if (!window.__flolessStopped) stopping = false;
511
513
  }
@@ -933,11 +933,13 @@
933
933
  if (gridControl) { row.setAttribute('aria-expanded', 'true'); gridControl.hidden = false; }
934
934
  const sequence = ++revealSequence;
935
935
  const generation = state.generation;
936
- const revision = state.revision;
937
936
  const schedule = window.requestAnimationFrame || ((callback) => callback());
938
937
  const center = (attempt = 0) => schedule(() => {
939
938
  const liveIds = Array.isArray(state.snapshot?.selectedIds) ? state.snapshot.selectedIds : [];
940
- if (sequence !== revealSequence || generation !== state.generation || revision !== state.revision
939
+ // Not the message revision: any later message bumps it, an action's answer included, and that dropped the scroll
940
+ // while the line below still said the row was centred. The row is looked up again here, so what matters is that
941
+ // the selection is still this one.
942
+ if (sequence !== revealSequence || generation !== state.generation
941
943
  || !state.followSelection || state.snapshot?.selectionOrigin !== 'viewport'
942
944
  || liveIds.length !== 1 || liveIds[0] !== selectedId) return;
943
945
  if (!shown('model') || sections.model.hidden) { pendingRevealId = selectedId; return; }
@@ -957,7 +959,10 @@
957
959
  const top = Math.max(0, Math.min(maxTop, target));
958
960
  const reducedMotion = typeof window.matchMedia === 'function'
959
961
  && window.matchMedia('(prefers-reduced-motion: reduce)').matches;
960
- modelContent.scrollTo?.({ top, left: Number(modelContent.scrollLeft) || 0, behavior: reducedMotion ? 'auto' : 'smooth' });
962
+ // A row more than two screens away is jumped to. Gliding past hundreds of rows shows nothing useful, and a long
963
+ // glide is still running when the tree repaints after the pick, which stops it short of the row (Take 5: 19,000 px).
964
+ const far = Math.abs(top - currentTop) > viewportHeight * 2;
965
+ modelContent.scrollTo?.({ top, left: Number(modelContent.scrollLeft) || 0, behavior: reducedMotion || far ? 'auto' : 'smooth' });
961
966
  pendingRevealId = null;
962
967
  status.textContent = `${liveRow.querySelector('.row-label')?.textContent || 'Selected object'} centred in Model tree.`;
963
968
  });
@@ -133,6 +133,21 @@ export function teklaNoSnapshotCopy(state) {
133
133
  };
134
134
  }
135
135
 
136
+ /**
137
+ * #2355: copy for a failed request whose answer carries a sentence written for a person (`userMessage`,
138
+ * which the server sets only from copy authored for people: its module-refusal table, and a few read
139
+ * failures), or null, which keeps the generic "could not be opened" copy. The sentence is shown as the
140
+ * server wrote it, under a title that names no cause, so the page never guesses one. `refused` marks a
141
+ * module refusal (the code is `model_module_unavailable`: in `error` on the Revit route, `code` on the
142
+ * Tekla one), which is a state the page shows rather than a fault.
143
+ */
144
+ export function modelFailureCopy(body) {
145
+ const sentence = typeof body?.userMessage === 'string' ? body.userMessage.trim() : '';
146
+ if (!sentence) return null;
147
+ const refused = body.error === 'model_module_unavailable' || body.code === 'model_module_unavailable';
148
+ return { kind: refused ? 'refused' : 'unavailable', title: 'Model unavailable', body: sentence, refused };
149
+ }
150
+
136
151
  const SVG_NS = 'http://www.w3.org/2000/svg';
137
152
  /**
138
153
  * Render the no-model state into the viewport's status overlay: a muted outline cube, a title and
@@ -1330,7 +1330,9 @@ export function createRevitViewport({ canvas, onSelect = () => {}, onOutlineBuil
1330
1330
  projection: () => controller.cameraState().projection, displayMode: () => controller.displayMode(),
1331
1331
  lightingState: () => ({ ...lighting }), setLighting: (value) => ({ ...applyLighting(value) }),
1332
1332
  gridLevels: () => adapter.gridLevels(),
1333
- setGridHiddenLevels: (values) => adapter.setGridHiddenLevels(values),
1333
+ // Republished, so the toolbar sees the hidden grid levels as a visibility filter (Show all enabled) and the editor's
1334
+ // subscribers hear about the change. An internal refresh, not counted as the person hiding objects.
1335
+ setGridHiddenLevels: (values) => { adapter.setGridHiddenLevels(values); controller.reportVisibility(undefined, { intentional: false }); },
1334
1336
  realisticState,
1335
1337
  outlineState: () => ({
1336
1338
  mode, meshes: ownedMeshes.length,