@floless/app 0.150.0 → 0.151.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.
@@ -0,0 +1,207 @@
1
+ # FloLess surfaces — what each one is, where it lives, when to use it
2
+
3
+ The map behind Arc B of Terminal mode (B1→B9), and the Guide's reference for "where is …" and "how
4
+ do I …". Point the person at the real thing on their screen (FloLess at `http://127.0.0.1:4317`) and,
5
+ where useful, at their live state. Keep each section short; check in before moving on.
6
+
7
+ Ground rules for describing any of it:
8
+ - FloLess is a **window**: it shows AWARE's state, starts `aware` verbs, and relays what the person
9
+ wants to the AI provider they chose. It never composes a workflow or calls an AI on its own.
10
+ - If something below is not on the person's screen, their build may be older — say so plainly and use
11
+ what is there. The **Instructor's `?`** (B7) lists every control on the screen they are on.
12
+ - When you name a control, use its on-screen label.
13
+
14
+ ---
15
+
16
+ ## B1 · The shape of the window
17
+
18
+ - **Header:** three top tabs — **Workspaces** (projects: drawings, model, exports), **Workflows**
19
+ (build, approve and run a process), **Agents** (checks you hand over). Ctrl+1 / Ctrl+2 / Ctrl+3.
20
+ The **≡** menu holds everything else (B6, B8).
21
+ - **Left:** **AI Chat** — the conversation for whatever is in view (B2). In a project, the left panel
22
+ also has the **Model** section; either can be folded or moved.
23
+ - **Centre:** the page for the tab you're on — the project's steps, the workflow canvas, or an agent.
24
+ - **Right (Workflows):** **Inspect**, the details of the selected node.
25
+ - **Instructor strip** (above the footer): narrates what you're doing and explains any control (B7).
26
+ - **Footer:** **Report an issue**; counts of **tools**, **workflows**, **templates** and **requests**
27
+ (click requests to open Requests, B4); the AWARE and FloLess versions with their update pills (B8).
28
+
29
+ ---
30
+
31
+ ## B2 · AI Chat
32
+
33
+ The person's AI, working inside FloLess. Each project, workflow and the workspace itself keeps its own
34
+ conversations, with dated history (**Conversation history**, **New conversation**, rename, archive).
35
+
36
+ - **Provider:** one of the two AI providers FloLess hosts, chosen when the conversation starts and fixed for its lifetime; it
37
+ answers from the person's own signed-in subscription. **Chat settings** shows the provider and
38
+ account, model, effort, file access, connected accounts, and where conversation data goes: project
39
+ files, chat history, attachments and Knowledge stay on this computer; messages, images and relevant
40
+ file content go to that provider for processing; connected services are contacted when used. It is
41
+ not an offline or on-device AI — never describe it as one.
42
+ - **Access** (how far the AI may go with files):
43
+ - **Read only** — the AI's file tools can't change files. The workspace conversation starts here.
44
+ - **Auto** — the AI approves safe steps itself and asks for the rest. Project and workflow
45
+ conversations start here.
46
+ - **Working folder write** — may change files inside the project or workflow folder, under the AI's
47
+ usual approvals (in the workspace conversation this shows as *Make changes (asks first)*).
48
+ - **Full access** — may change files without asking. Offered only inside a project or workflow.
49
+ - **Scope:** **Conversation scope** shows the home folder and lets the person add other projects or
50
+ workflows the conversation may work on. Scope adds places; it does not limit what can be read.
51
+ - **Approval cards:** when the AI wants to do something that needs a yes, a card asks — **Approve
52
+ once**, **Approve for this request**, **Allow … for this chat**, or **Deny**. Each allowance can be
53
+ revoked from the same conversation.
54
+ - **Connected accounts and connectors:** **Connected accounts** shows which FloLess integrations this
55
+ conversation uses. **Use my connectors in this chat** turns the connectors the person added
56
+ to their own AI provider (mail, Teams, …) on or off for this conversation only.
57
+ - **Cards from the AI:** the AI can propose — never perform — a connection (**Connect a suggested
58
+ service**, **Check it works** with a receipt of what was read), a new workflow (**Create workflow**),
59
+ or a scope addition (**Approve scope addition**). The person's click does it.
60
+ - **The Guide:** a built-in conversation that, with the person's consent, takes a read-only look at
61
+ this computer, briefs them on what they seem to work on, and suggests next moves as buttons. Reached
62
+ from the ≡ menu (**Guide**) or **Ask the Guide** on an empty Workspaces or Workflows page. It only
63
+ reads; every change is a button the person presses.
64
+
65
+ ---
66
+
67
+ ## B3 · Workspaces and projects
68
+
69
+ - **Workspace directory** (≡ menu): the one folder on this computer where FloLess keeps projects and
70
+ workflows. Everything else hangs off it; with none chosen, start here.
71
+ - **Projects:** one job in one place. Start one from the project list — for example a steel model from
72
+ drawings, a Trace of a drawing, a read-only Tekla or Revit Parser project, or a Drawing Checker
73
+ client profile (the cards on the list show what this build offers). **Import project** restores an
74
+ exported or zipped one.
75
+ - **Project steps** (tabs inside a project): **Knowledge** (the project's reference documents; also
76
+ **Company knowledge** shared across projects), **Drawing Filter** (which sheets and views a read
77
+ uses), **Model** (the native model, with the Model section on the left), **Exports** (files produced
78
+ from the approved model, or sent to a CAD application), **History** (approved versions and
79
+ checkpoints).
80
+ - **Approval:** changes to a project wait until a person approves them (**Approve the changes**,
81
+ leave pending, or discard). The AI never approves. Depth: **floless-app-approval**.
82
+ - **Knowledge** makes the plan smart: the AI reads it while building a workflow and cites the page.
83
+ At run time it is only looked up and cited, never reasoned over. A "Knowledge Base updated since
84
+ this was built" note is informational; it never blocks Run.
85
+
86
+ ---
87
+
88
+ ## B4 · Workflows and the gate
89
+
90
+ A workflow is a FloLess `.flo` file — steps (nodes) and the links between them — that runs on AWARE.
91
+
92
+ - **Workflows page:** cards for every workflow, searchable; **New workflow** starts one (name it,
93
+ choose where it belongs, then the AI builds it with you — depth: **floless-app-new-workflow**). A
94
+ draft that hasn't compiled shows **Compile** and **Ask AI to fix**.
95
+ - **Canvas:** the open workflow's steps. Click a node to inspect it; **Fit to window**, zoom, find.
96
+ The **workflow picker** switches workflows (Ctrl+O). For a published workflow, a small beacon in the
97
+ header ("New here? See what this workflow does and how to run it.") walks through that one workflow.
98
+ - **Set inputs:** the values this workflow runs with (**Save inputs**).
99
+ - **The gate — Compile → Approve → Run:**
100
+ - **Compile** freezes the current `.flo` into its `.lock`, the approved version. That is the
101
+ approval.
102
+ - **Run workflow** executes the approved `.lock` against the live host (Tekla, Revit, …); nodes
103
+ show progress on the canvas, and a report opens in the viewer.
104
+ - After any edit, **Run stays off until you Compile again** — the `.flo` no longer matches what
105
+ was approved. This is AWARE's own rule, and it is what makes runs repeatable.
106
+ - **Simulate** checks the workflow hangs together by stubbing every node — it never touches the
107
+ host, so it proves shape, not results. Only a real Run proves it works.
108
+ - **Inspect** (right panel): **Description** (plain English — what the node does), **Skill**,
109
+ **Code** (an `exec` node's C#), **Execution** (the live trace). **Tweak this node** asks the AI to
110
+ change just that node. **Debug this node** re-runs an `exec` node with the debugger.
111
+ - **Templates:** **★** a node (or a command in Tools) to save it as a Template, reusable in any
112
+ workflow; the AI reuses a saved Template instead of rebuilding that logic.
113
+ - **Requests** (footer count): work queued for an AI — a tweak, a drawing read, a question. Each can
114
+ be **Start in AI Chat**, **Start this request in the background**, **Discuss this request**, or
115
+ copied for a terminal AI. Depth: **floless-app-queue**, **floless-app-bridge**.
116
+ - **Dashboard** (≡ → Switch to Dashboard): a panel view the person can customise with their own
117
+ cards, tables and buttons.
118
+ Depth: **floless-app-ui**.
119
+
120
+ ---
121
+
122
+ ## B5 · Agents and Routines
123
+
124
+ - **Agents** (top tab) are responsibilities handed over: a name, **What should it do?** (plain
125
+ English — the first message of every run), and the projects and workflows it works on. Several
126
+ projects run **each separately** or **compared**. **Can change files** off means its runs only read
127
+ and report; on, they run in Auto. **Run agent** shows exactly what will start, then starts ordinary
128
+ AI Chat conversations you can open and follow. **Schedule agent** opens a routine for it.
129
+ "Agents" in FloLess means these; the installable AWARE capabilities are called **tools** (B6).
130
+ - **Routines** (≡ menu, Ctrl+R) make something run on its own, on this computer:
131
+ - what runs: a **workflow**, or an **agent**;
132
+ - when: a **schedule** (every few minutes or hours, daily, weekdays, chosen days, or a cron
133
+ expression for power users) or, for workflows, a **trigger** (when something happens, such as a
134
+ model change or a file appearing).
135
+ - A routine that starts an agent runs with **nobody watching**: steps that would need a yes are
136
+ declined and listed on that run under **Questions for you**, to answer or redo by hand.
137
+ Depth: **floless-app-routines**.
138
+
139
+ ---
140
+
141
+ ## B6 · Tools, Discover, Graft, Bake, Integrations
142
+
143
+ - **Tools** (≡ menu, Ctrl+G): the library of AWARE tools this computer can reach — install, check,
144
+ update; **★** a command to save it as a Template. A workflow missing a tool shows **Install or check a tool**
145
+ / **Install all missing tools**.
146
+ - **Discover local tools** (≡ menu, or inside Tools): looks at installed apps and file names in
147
+ folders the person chooses (**Scan this computer**). Finding something does not connect or test it;
148
+ each result offers the next step (**Open in Graft**, **Connect a service**, **Check it works**).
149
+ - **Graft** (≡ menu "Graft into tool", or in Tools): turns software the person already owns — a .NET
150
+ DLL or folder of them, an OpenAPI spec, a NuGet or npm package, a COM component, a command-line
151
+ program — into a tool workflows can use. A preview of the discovered commands comes first.
152
+ - **Bake** (≡ menu "Bake into tool"): packages a proven workflow as a tool, its inputs becoming the
153
+ tool's parameters, so other workflows can call it as one step.
154
+ - **Integrations** (≡ menu, Ctrl+I): connects FloLess to outside services and lets the person choose
155
+ which account FloLess uses for each. FloLess never switches accounts on its own; secrets never pass
156
+ through the AI.
157
+ - The arc: **Graft your software → use it in a workflow → Bake the workflow → reuse it everywhere.**
158
+
159
+ ---
160
+
161
+ ## B7 · Help where you are
162
+
163
+ - **Instructor strip:** narrates what is happening on this screen. **`?`** or **F1** explains the
164
+ control under focus; with nothing selected it opens **All commands** — every command in FloLess,
165
+ this screen first, searchable. That list is the most reliable answer to "is there a button for …?".
166
+ - **Ask AI now:** starts a read-only AI Chat conversation about whatever the Instructor is explaining
167
+ (**More ways to ask** to pick the provider, or queue and copy it for a terminal AI).
168
+ - **The Guide** (B2) for the bigger "what should I do next?" questions.
169
+ - The Instructor can be collapsed, or turned off in the ≡ menu.
170
+
171
+ ---
172
+
173
+ ## B8 · Keeping current
174
+
175
+ - The footer shows the AWARE version and the FloLess version. **Update AWARE** and **Update
176
+ FloLess** pills appear when newer ones exist; if the AWARE pill isn't there, the terminal path
177
+ always works (`npm i -g @aware-aeco/cli@latest`, Arc A2).
178
+ - **Tool updates** (≡ menu, or the footer pill): new tool versions and what they mean for approved
179
+ workflows — **Approve updated workflows** moves them over, recorded as the person's approval.
180
+ **Automatic tool updates** decides whether small read-only fixes may carry an approval over.
181
+ - A workflow whose approved tool version is gone offers **Reinstall the approved version**, so it runs
182
+ exactly as approved.
183
+
184
+ ---
185
+
186
+ ## B9 · The skills, and the everyday loop
187
+
188
+ FloLess ships skills to the person's AI so it can act for them. The main ones:
189
+ - **floless-app-new-workflow** — build a workflow from scratch, step by step.
190
+ - **floless-app-workflows** — author, change and run `.flo` workflows (inputs, `exec` nodes, reports).
191
+ - **floless-app-routines** — routines on a live trigger.
192
+ - **floless-app-steel-model** / **floless-app-steel-takeoff** — a steel drawing set into a model.
193
+ - **floless-app-knowledge**, **floless-app-approval**, **floless-app-rfi** — a project's knowledge,
194
+ approvals and RFIs.
195
+ - **floless-app-queue**, **floless-app-bridge** — pick up queued Requests.
196
+ - **floless-app-report-issue** — report a problem to the FloLess team.
197
+
198
+ **The everyday loop:** open a workflow → set its inputs → **Compile** → **Run workflow** → read the
199
+ result. Change → Compile → Run.
200
+
201
+ **Habits that keep it trustworthy:**
202
+ - Compile after every edit; Run waits for a fresh approval on purpose.
203
+ - Trust a real Run, not a clean Compile or a Simulate.
204
+ - Tweak one node rather than rebuilding.
205
+ - Once a workflow is solid, make it a Routine; once a check repeats, make it an Agent.
206
+ - Reuse: Templates for nodes, Bake for proven workflows, Graft for your own software.
207
+ - Ask the AI to build and change things; watch, approve and run in FloLess.
@@ -258,7 +258,9 @@
258
258
  }
259
259
 
260
260
  function draftOf(agent) {
261
- return { name: agent.name, instructions: agent.instructions, scope: agent.scope.map((s) => ({ ...s })), mode: agent.mode, allowChanges: agent.allowChanges };
261
+ // `provider` is not edited on this page, but a save must not wipe one stored by another surface.
262
+ return { name: agent.name, instructions: agent.instructions, scope: agent.scope.map((s) => ({ ...s })), mode: agent.mode, allowChanges: agent.allowChanges,
263
+ provider: agent.provider ?? null };
262
264
  }
263
265
 
264
266
  // ── navigation ───────────────────────────────────────────────────────────────────────────────────────────────
@@ -290,19 +292,26 @@
290
292
  async function openAgent(agentId) {
291
293
  if (!(await confirmLeave())) return;
292
294
  if (!state.options) await loadOptions();
293
- state.pageGeneration += 1;
294
- state.view = 'page'; state.banner = null; state.pickerOpen = false; state.runs = []; state.runsKey = null;
295
+ const generation = ++state.pageGeneration;
296
+ // The page view is entered only once its draft exists (#2035 QA): a list load running alongside (opening the tab
297
+ // and an agent at once, as the Routines "Agent" button does) would otherwise paint a page with no draft.
298
+ state.banner = null; state.pickerOpen = false; state.runs = []; state.runsKey = null;
295
299
  if (state.selected || state.chatScope) { state.selected = null; state.chatScope = null; notifyChatScope(); }
296
300
  if (agentId) {
297
301
  try {
298
302
  const body = await api(`/api/chat/agents/${encodeURIComponent(agentId)}`);
299
- state.agent = body.agent; state.draft = draftOf(body.agent); state.dirty = false;
300
- } catch (error) { toast(error.message, 'warn'); state.view = 'list'; await loadAgents(); return; }
303
+ // Opening another agent meanwhile wins: an older, slower answer never replaces the newer page.
304
+ if (generation !== state.pageGeneration) return;
305
+ state.agent = body.agent; state.draft = draftOf(body.agent); state.dirty = false; state.view = 'page';
306
+ } catch (error) {
307
+ if (generation !== state.pageGeneration) return; // a newer page was opened meanwhile: this answer is stale either way
308
+ toast(error.message, 'warn'); state.view = 'list'; await loadAgents(); return;
309
+ }
301
310
  paint();
302
311
  $surface.querySelector('#ag-name')?.focus();
303
312
  await loadRuns();
304
313
  } else {
305
- state.agent = null; state.draft = blankDraft(); state.dirty = false;
314
+ state.agent = null; state.draft = blankDraft(); state.dirty = false; state.view = 'page';
306
315
  paint();
307
316
  $surface.querySelector('#ag-name')?.focus();
308
317
  }
@@ -383,6 +392,49 @@
383
392
  return stored === 'codex' || stored === 'claude' ? stored : 'claude';
384
393
  }
385
394
 
395
+ /** #2035: open the Routines editor with this agent chosen. */
396
+ async function scheduleAgent() {
397
+ if (state.dirty || !state.agent) {
398
+ const saved = await save();
399
+ if (!saved) return;
400
+ }
401
+ if (!window.flolessRoutines?.editForAgent) {
402
+ state.banner = { text: 'Routines aren’t ready yet. Try again in a moment.' };
403
+ paint();
404
+ return;
405
+ }
406
+ await window.flolessRoutines.editForAgent(state.agent.agentId, $surface.querySelector('#ag-schedule'));
407
+ }
408
+
409
+ // #2035: what each recorded decline became, in the person's words.
410
+ const DECLINE_LABEL = { declined: 'Declined', 'not-sent': 'Stopped before it was answered' };
411
+
412
+ /** The steps a routine-started run declined because nobody was watching: the "Questions for you" list. */
413
+ function questionsFor(run, target, label) {
414
+ const d = target.declines;
415
+ if (!d) return null;
416
+ const total = d.list.length + d.moreDeclined + d.moreNotSent;
417
+ if (!total) return null;
418
+ const declined = d.list.filter((entry) => entry.state === 'declined').length + d.moreDeclined;
419
+ const working = target.live === 'working' || target.live === 'starting';
420
+ const details = el('details', { class: 'ag-questions' },
421
+ el('summary', { 'data-command-id': `shell.agents-run-questions#${label}`, 'data-command-instance-label': label, text: `Questions for you (${total})` }));
422
+ details.append(el('p', { class: 'ag-help', text: declined === 0
423
+ ? `${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.`
424
+ : declined === 1
425
+ ? 'One step was declined because nobody was watching. Run the agent by hand to do it with you watching.'
426
+ : `${declined} steps were declined because nobody was watching. Run the agent by hand to do them with you watching.` }));
427
+ const list = el('ul', { class: 'ag-question-list' });
428
+ for (const entry of d.list) {
429
+ const status = DECLINE_LABEL[entry.state] || (working ? 'Being declined' : 'Could not confirm whether it was answered');
430
+ list.append(el('li', {}, el('span', { class: 'ag-state', text: status }), el('span', { class: 'ag-question-text', text: entry.summary })));
431
+ }
432
+ details.append(list);
433
+ const more = d.moreDeclined + d.moreNotSent;
434
+ 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).` }));
435
+ return details;
436
+ }
437
+
386
438
  async function openRunSheet() {
387
439
  if (state.dirty || !state.agent) {
388
440
  const saved = await save();
@@ -464,7 +516,7 @@
464
516
  if (preview.providerMessage) modal.append(el('p', { class: 'ag-run-issue', role: 'status', text: preview.providerMessage }));
465
517
  if (preview.conversations.length) {
466
518
  modal.append(el('p', { class: 'ag-run-line', text: preview.allowChanges
467
- ? 'Can change files: yes, in the project or workflow each conversation is homed in. A file edit anywhere else asks you first; commands follow your Claude or Codex approval settings.'
519
+ ? 'Can change files: yes, in Auto — in the project or workflow each conversation is homed in, the AI does safe work by itself and checks risky steps first. Claude still asks you before an edit anywhere else; Codex’s own review may approve one and notes each decision in the conversation.'
468
520
  : 'Can change files: no — it reads and reports.' }));
469
521
  if (preview.conversations.length > preview.maxActive) modal.append(el('p', { class: 'ag-run-line', text: `Up to ${preview.maxActive} run at a time; the rest wait their turn.` }));
470
522
  modal.append(el('p', { class: 'ag-note', text: isolationNote(preview.mode, preview.allowChanges) }));
@@ -496,7 +548,7 @@
496
548
  function isolationNote(mode, allowChanges) {
497
549
  const where = mode === 'compare' ? 'This run is told only about these projects' : 'Each run is told only about its own project';
498
550
  const change = allowChanges
499
- ? '; it may change files in the project or workflow its conversation is homed in, and a file edit anywhere else asks you first'
551
+ ? '; it may change files in the project or workflow its conversation is homed in, working in Auto'
500
552
  : ' and only reads';
501
553
  return `${where}${change}. This is not a lock: the AI on this computer can still open other folders you can open.`;
502
554
  }
@@ -594,7 +646,7 @@
594
646
  wrap.append(head);
595
647
  if (!state.showArchived) {
596
648
  wrap.append(el('div', { class: 'ws-create-grid' },
597
- el('div', { class: 'ws-card ws-create ag-create', role: 'button', tabindex: '0', 'data-ag-new': '1', 'data-command-id': 'shell.agents-new' },
649
+ el('div', { class: 'ws-card ws-create ws-card-create ag-create', role: 'button', tabindex: '0', 'data-ag-new': '1', 'data-command-id': 'shell.agents-new' },
598
650
  el('div', { class: 'ws-thumb', 'aria-hidden': 'true', text: '+' }),
599
651
  el('div', { class: 'ws-body' }, el('div', {},
600
652
  el('div', { class: 'ws-name', text: 'New agent' }),
@@ -640,6 +692,10 @@
640
692
  el('button', { type: 'button', id: 'ag-save', 'data-command-id': 'shell.agents-save', disabled: state.saving || (!state.dirty && Boolean(state.agent)),
641
693
  'data-blocked-reason': state.saving ? 'Saving now.' : !state.dirty && state.agent ? 'Nothing has changed since you last saved.' : null,
642
694
  text: state.saving ? 'Saving…' : state.agent ? 'Save' : 'Create', onclick: () => void save() }),
695
+ // #2035: a routine can run this agent on a schedule, with nobody watching (saves first, like Run).
696
+ el('button', { type: 'button', id: 'ag-schedule', 'data-command-id': 'shell.agents-schedule', text: 'Schedule…',
697
+ 'data-tip': state.dirty || !state.agent ? 'Saves your changes, then opens a new routine that runs this agent' : 'Opens a new routine that runs this agent on a schedule',
698
+ onclick: () => void scheduleAgent() }),
643
699
  el('button', { type: 'button', id: 'ag-run', class: 'primary', 'data-command-id': 'shell.agents-run', text: 'Run…',
644
700
  'data-tip': state.dirty || !state.agent ? 'Saves your changes, then shows what will start' : 'Shows exactly what will start before anything runs',
645
701
  onclick: () => void openRunSheet() }),
@@ -709,7 +765,7 @@
709
765
  el('div', {},
710
766
  el('div', { class: 'ag-label', id: 'ag-allow-label', text: 'Can change files' }),
711
767
  el('p', { class: 'ag-help', text: draft.allowChanges
712
- ? 'On: it may change files in the project or workflow its conversation is homed in. A file edit anywhere else asks you first; commands follow your Claude or Codex approval settings.'
768
+ ? 'On: it works in Auto, like AI Chat — safe changes in the project or workflow its conversation is homed in go ahead by themselves, and risky steps are checked first. Claude asks you before an edit anywhere else; Codex’s own review may approve one and notes each decision. When a routine runs it with nobody watching, anything that would ask you is declined and listed for you.'
713
769
  : 'Off: it only reads and reports.' }))));
714
770
  page.append(el('p', { class: 'ag-note', text: isolationNote(draft.mode, draft.allowChanges) }));
715
771
 
@@ -799,7 +855,12 @@
799
855
  }
800
856
  for (const run of state.runs) {
801
857
  const group = el('div', { class: 'ag-run' });
802
- group.append(el('div', { class: 'ag-run-meta', text: `${timeText(run.startedAt)} · ${run.provider === 'codex' ? 'Codex' : 'Claude'} · ${run.allowChanges ? 'can change files' : 'read only'}${run.mode === 'compare' ? ' · compare' : ''}` }));
858
+ const origin = run.startedBy ? `Started by routine “${run.startedBy.routineName}” · ` : '';
859
+ group.append(el('div', { class: 'ag-run-meta', text: `${origin}${timeText(run.startedAt)} · ${run.provider === 'codex' ? 'Codex' : 'Claude'} · ${run.allowChanges ? 'can change files' : 'read only'}${run.mode === 'compare' ? ' · compare' : ''}` }));
860
+ // #2035: FloLess sees what it declined, not what Claude's own safety check held back by itself.
861
+ if (run.startedBy && run.provider === 'claude' && run.allowChanges) {
862
+ group.append(el('p', { class: 'ag-help', text: 'Claude’s own safety check may also have held steps back; those appear only in its reply.' }));
863
+ }
803
864
  for (const target of run.targets) {
804
865
  const selected = state.selected?.runId === run.runId && state.selected?.index === target.index;
805
866
  const canOpen = Boolean(target.chatId) && !['stale', 'skipped', 'unreadable'].includes(target.live);
@@ -808,7 +869,8 @@
808
869
  const info = el('div', { class: 'ag-target-info' },
809
870
  el('span', { class: 'ag-target-name', text: label }),
810
871
  el('span', { class: `ag-state${LIVE_TONE[target.live] ? ` tone-${LIVE_TONE[target.live]}` : ''}`, text: LIVE_LABEL[target.live] || target.live }),
811
- target.message ? el('span', { class: 'ag-target-msg', text: target.message }) : null);
872
+ target.message ? el('span', { class: 'ag-target-msg', text: target.message }) : null,
873
+ questionsFor(run, target, label));
812
874
  row.append(info);
813
875
  const actions = el('div', { class: 'ag-target-actions' });
814
876
  if (canOpen) {
@@ -879,6 +941,40 @@
879
941
  if (state.chatScope) return { owner: state.chatScope.owner, label: state.chatScope.label, chatId: state.chatScope.chatId };
880
942
  return { owner: { kind: 'workspace' }, label: state.view === 'page' && state.agent ? `Agents · ${state.agent.name}` : 'All projects and workflows' };
881
943
  },
944
+ /** #2035: the Routines editor lists this folder's agents through the same chat session as this page. */
945
+ async list() {
946
+ const body = await api('/api/chat/agents');
947
+ return body.agents || [];
948
+ },
949
+ /** #2035: a routine's history row asks how the agent run it started is going. */
950
+ async runs(agentId) {
951
+ return api(`/api/chat/agents/${encodeURIComponent(agentId)}/runs`);
952
+ },
953
+ /** #2035: a routine fire ended; an open agent page reads its runs again so the run it started shows up. */
954
+ refreshRuns() {
955
+ if (state.open && state.view === 'page' && state.agent) void loadRuns();
956
+ },
957
+ /**
958
+ * #2046: a Guide suggestion — a new agent's page with its name and instructions filled in. Nothing is saved until the
959
+ * person reviews it and presses Save.
960
+ */
961
+ async newDraft(prefill = {}) {
962
+ await window.flolessWorkspaces?.setMode?.('agents');
963
+ if (!state.open) return false;
964
+ await openAgent(null);
965
+ if (state.view !== 'page' || state.agent || !state.draft) return false;
966
+ if (typeof prefill.name === 'string') state.draft.name = prefill.name.slice(0, 120);
967
+ if (typeof prefill.instructions === 'string') state.draft.instructions = prefill.instructions.slice(0, 2000);
968
+ state.dirty = true;
969
+ paint();
970
+ $surface.querySelector('#ag-name')?.focus();
971
+ return true;
972
+ },
973
+ /** #2035: open an agent's page (its runs are listed there), from the Routines list. */
974
+ async open(agentId) {
975
+ await window.flolessWorkspaces?.setMode?.('agents');
976
+ if (state.open) await openAgent(agentId);
977
+ },
882
978
  /** For AI Chat's context line: which Agents surface is on screen. */
883
979
  surface: () => (state.view === 'page' ? 'agent-page' : 'agent-list'),
884
980
  };
package/dist/web/app.css CHANGED
@@ -980,27 +980,9 @@
980
980
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
981
981
  margin-top: 14px; padding: 11px 14px;
982
982
  background: var(--accent-soft); border: 1px solid var(--accent-dim); border-radius: 6px;
983
- /* Lets .onb-tour-manual take its own row when the clipboard was refused. It also lets the hint and
984
- button stack once the row is too narrow for both, which the old nowrap squeezed instead. */
983
+ /* Lets the hint and button stack once the row is too narrow for both. */
985
984
  flex-wrap: wrap;
986
985
  }
987
- /* The clipboard-refused fallback: the prompt itself, on screen and selectable, because the message
988
- tells the user to copy it manually and nothing else on either surface holds it. Themed like the
989
- app's other read-only technical values (mono on surface-2) — never a native white control, and
990
- with its own scrollbar themed because a textarea is a scroll container too. */
991
- .onb-tour-manual {
992
- display: block; width: 100%; flex-basis: 100%; margin-top: 10px; box-sizing: border-box;
993
- background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: 4px;
994
- color: var(--text); font-family: var(--mono); font-size: 11px; line-height: 1.5; padding: 7px 9px;
995
- /* resize:vertical, not none: two rows fits the prompt with very little margin, and a font
996
- fallback or a user minimum-font-size pushes it to a third — which would otherwise scroll behind
997
- a scrollbar with no way to open the box up. */
998
- resize: vertical; scrollbar-width: thin; scrollbar-color: var(--text-dim) transparent;
999
- }
1000
- .onb-tour-manual::-webkit-scrollbar { width: 9px; }
1001
- .onb-tour-manual::-webkit-scrollbar-thumb { background: var(--text-dim); border-radius: 9px; }
1002
- .onb-tour-manual::-webkit-scrollbar-track { background: transparent; }
1003
- .onb-tour-manual:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
1004
986
  .onb-tour-hint { flex: 1; font-size: 11px; color: var(--text-dim); font-style: italic; line-height: 1.45; }
1005
987
  .onb-tour-btn {
1006
988
  flex: none; background: var(--accent); color: #ffffff; border: 1px solid var(--accent);
@@ -3341,6 +3323,11 @@
3341
3323
  .rtn-time-sep { color: var(--text-dim); font-family: var(--mono); padding: 8px 0; }
3342
3324
  #rtn-cron { font-family: var(--mono); letter-spacing: 0.02em; }
3343
3325
  .rtn-cron-hint { margin-top: 7px; font-size: 10.5px; color: var(--text-dim); line-height: 1.55; }
3326
+ /* #2035: an inline text action in a routine hint (e.g. "Create one on the Agents page"). */
3327
+ .rtn-agent-ai { margin-top: 8px; }
3328
+ .rtn-link { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
3329
+ .rtn-link:hover { color: var(--accent-bright); }
3330
+ .rtn-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
3344
3331
  .rtn-cron-hint code { font-family: var(--mono); color: var(--text-muted); background: var(--surface-2); padding: 0 3px; border-radius: 3px; }
3345
3332
  .rtn-enabled-field { margin-top: 6px; margin-bottom: 0; }
3346
3333
  #rtn-inputs .modal-field:last-child { margin-bottom: 0; }
@@ -5756,6 +5743,9 @@ body.mode-workspaces #menu .menu-item[data-action="bake"] { display:none; }
5756
5743
  .wf-card .wf-card-nodes { font-family:var(--mono); font-size:10px; color:var(--text-dim); }
5757
5744
  .wf-card:focus-visible, .wf-create:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
5758
5745
  .wf-group-label { margin:16px 0 8px; color:var(--text-dim); font-size:10px; letter-spacing:.1em; text-transform:uppercase; }
5746
+ .ws-card.wf-card-archived { cursor:default; }
5747
+ .wf-card-archived .wf-draft-actions { justify-content:flex-start; }
5748
+ .wf-card-archived button:disabled { opacity:.6; cursor:progress; }
5759
5749
 
5760
5750
  /* Local discovery shares the approved dark shell palette and dialog spacing. */
5761
5751
  .modal.local-discovery { width: 700px; max-height: min(86vh, 760px); display:flex; flex-direction:column; }
@@ -5988,6 +5978,13 @@ body.mode-workspaces #menu .menu-item[data-action="bake"] { display:none; }
5988
5978
  plan once a user-authored workspace app appears), at which point the string stops being ours. */
5989
5979
  .ws-card .ws-meta { display:block; font-size:11px; color:var(--text-muted); margin-top:4px; }
5990
5980
  .ws-card .ws-meta:not(.ws-meta-app) { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
5981
+ /* Create-card instructions need two lines. Reclaim one 11px prose line from the decorative
5982
+ thumbnail so the create row and the cards below it keep their existing positions. */
5983
+ .ws-card.ws-card-create .ws-thumb { height:calc(88px - 16.5px); }
5984
+ .ws-card.ws-card-create .ws-body > div { min-width:0; }
5985
+ .ws-card.ws-card-create .ws-meta { display:-webkit-box; -webkit-box-orient:vertical;
5986
+ -webkit-line-clamp:2; white-space:normal; overflow-wrap:break-word; text-overflow:clip;
5987
+ line-height:1.5; min-height:3em; }
5991
5988
  .ws-card .ws-meta .t { font-family:var(--mono); font-size:10px; color:var(--text-dim); }
5992
5989
  /* The "type · workflow · time" line.
5993
5990
  *
@@ -6077,9 +6074,29 @@ body.mode-workspaces #menu .menu-item[data-action="bake"] { display:none; }
6077
6074
  .ws-seed:hover { background:var(--accent-soft); border-color:var(--accent); }
6078
6075
  .ws-seed:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
6079
6076
  .ws-seed .ws-seed-icon { font-size:24px; color:var(--accent); line-height:1; }
6080
- /* Drop-a-drawing seed card: a click-to-pick + drag/drop target. .drag-over lights it up
6077
+ /* The descriptor's outline drawing (WORKSPACE_APPS `cardIcon`): the same outline style as .menu-icon svg
6078
+ (no fill, currentColor, round caps and joins), sized for the card. */
6079
+ .ws-seed .ws-seed-icon svg { display:block; width:28px; height:28px; fill:none; stroke:currentColor;
6080
+ stroke-width:1.6; stroke-linecap:round; stroke-linejoin:round; }
6081
+ /* Drop-a-file seed card: a click-to-pick + drag/drop target. .drag-over lights it up
6081
6082
  while a file hovers (same intent as the editor's .canvas-drop-target.active). */
6082
6083
  .ws-seed-drop.drag-over { background:var(--accent-soft); border-color:var(--accent); border-style:solid; }
6084
+ /* While files are dragged over the window (#ws-landing[data-file-drag]): every card that takes a file
6085
+ brightens its dashed border, and every card that takes none fades (it still answers a drop with a warning).
6086
+ The card under the pointer keeps the stronger solid .drag-over state above, and its icon lifts. */
6087
+ .ws-seed, .ws-seed .ws-seed-icon { transition:border-color var(--dur-fast) var(--ease),
6088
+ background-color var(--dur-fast) var(--ease), opacity var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease); }
6089
+ #ws-landing[data-file-drag] .ws-seed-drop { border-color:var(--accent); }
6090
+ #ws-landing[data-file-drag] .ws-seed:not(.ws-seed-drop) { opacity:.55; }
6091
+ .ws-seed-drop.drag-over .ws-seed-icon { transform:translateY(-2px); }
6092
+ @media (prefers-reduced-motion: reduce) {
6093
+ .ws-seed, .ws-seed .ws-seed-icon { transition:none; }
6094
+ .ws-seed-drop.drag-over .ws-seed-icon { transform:none; }
6095
+ }
6096
+ /* "Click or drop …" — the always-visible cue that the card also takes a dropped file. --text-muted
6097
+ (AA at rest in both themes), not --text-dim, which falls short of AA in both: it is an instruction. */
6098
+ .ws-seed .ws-seed-hint { font-size:11px; font-weight:500; color:var(--text-muted); line-height:1.35;
6099
+ max-width:220px; text-wrap:balance; }
6083
6100
  .ws-seed .ws-seed-headline { font-size:12.5px; font-weight:600; color:var(--text); line-height:1.35; }
6084
6101
  /* overflow-wrap:anywhere so a setup remedy naming a long folder path (no break at "\") wraps inside the
6085
6102
  column instead of overflowing it; `anywhere`, unlike `break-word`, also shrinks the min-content width. */
@@ -7341,6 +7358,16 @@ body.mode-agents #menu .menu-item[data-action="bake"] { display:none; }
7341
7358
  .ag-act.ag-quiet { background:transparent; color:var(--text-muted); }
7342
7359
  .ag-act.ag-quiet:hover { color:var(--text); }
7343
7360
  .ag-act[aria-pressed="true"] { border-color:var(--accent); color:var(--accent-bright); }
7361
+ /* #2035: "Questions for you" — the steps a routine-started run declined because nobody was watching. A notice, not an error. */
7362
+ .ag-questions { flex-basis:100%; margin-top:4px; border-left:2px solid color-mix(in srgb, var(--warn) 55%, var(--border-strong)); padding:2px 0 2px 10px; }
7363
+ .ag-questions > summary { font-size:12px; color:var(--text); cursor:pointer; user-select:none; list-style:none; border-radius:3px; }
7364
+ .ag-questions > summary::-webkit-details-marker { display:none; }
7365
+ .ag-questions > summary::before { content:'▸'; margin-right:6px; color:var(--text-dim); }
7366
+ .ag-questions[open] > summary::before { content:'▾'; }
7367
+ .ag-questions > summary:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
7368
+ .ag-question-list { list-style:none; margin:4px 0 6px; padding:0; display:flex; flex-direction:column; gap:5px; }
7369
+ .ag-question-list li { display:flex; flex-wrap:wrap; align-items:baseline; gap:4px 8px; font-size:12px; line-height:1.45; color:var(--text-muted); }
7370
+ .ag-question-text { color:var(--text); overflow-wrap:anywhere; }
7344
7371
 
7345
7372
  /* Run confirm sheet */
7346
7373
  .modal.ag-run-sheet { width:520px; max-height:min(86vh, 720px); overflow-y:auto; }
@@ -7352,3 +7379,54 @@ body.mode-agents #menu .menu-item[data-action="bake"] { display:none; }
7352
7379
  .ag-run-skipped p + p { margin-top:4px; }
7353
7380
  .ag-run-field { display:flex; align-items:center; gap:10px; margin:12px 0 4px; }
7354
7381
  .ag-run-label { font-size:12px; color:var(--text-muted); min-width:24px; }
7382
+
7383
+ /* #2046 — the Guide's question (web/guide.js). Built on .modal; the body is the one scroll region and the buttons never
7384
+ scroll away. The preview has its own themed inner scroll. Existing tokens only, both themes. */
7385
+ #guide-agent-modal .guide-dialog { width: 580px; max-width: 92vw; max-height: 86vh; display: flex; flex-direction: column; }
7386
+ #guide-agent-modal .modal-title:focus { outline: none; }
7387
+ #guide-agent-modal .modal-title:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
7388
+ .guide-body, .guide-preview-scroll {
7389
+ min-height: 0; overflow-y: auto; padding-right: 2px;
7390
+ scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent;
7391
+ }
7392
+ .guide-body::-webkit-scrollbar, .guide-preview-scroll::-webkit-scrollbar { width: 7px; }
7393
+ .guide-body::-webkit-scrollbar-thumb, .guide-preview-scroll::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 5px; }
7394
+ .guide-body::-webkit-scrollbar-track, .guide-preview-scroll::-webkit-scrollbar-track { background: transparent; }
7395
+ .guide-body { display: flex; flex-direction: column; gap: 12px; font-size: 12px; line-height: 1.5; color: var(--text); }
7396
+ .guide-heading { margin: 0 0 4px; font-size: 12px; font-weight: 600; color: var(--text); }
7397
+ .guide-copy { margin: 0; }
7398
+ .guide-block ul, .guide-preview-list { margin: 0; padding-left: 18px; }
7399
+ .guide-block li + li, .guide-preview-list li + li { margin-top: 2px; }
7400
+ .guide-callout { padding: 8px 10px; border: 1px solid var(--border-strong); border-radius: 6px; background: var(--surface-2); }
7401
+ .guide-switch { display: flex; align-items: flex-start; gap: 10px; }
7402
+ .guide-switch .rtn-toggle { margin-top: 2px; }
7403
+ .guide-switch-label { font-weight: 600; cursor: pointer; }
7404
+ .guide-switch-help { color: var(--text-muted); }
7405
+ .guide-provider-group { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
7406
+ .guide-provider-option { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
7407
+ .guide-preview { display: flex; flex-direction: column; gap: 6px; }
7408
+ .guide-preview-summary { margin: 0; color: var(--text-muted); }
7409
+ .guide-preview-loading { margin: 0; display: flex; align-items: center; gap: 8px; color: var(--text-muted); }
7410
+ .guide-preview-scroll { max-height: 40vh; margin-top: 6px; padding: 6px 8px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface-2); }
7411
+ .guide-preview-scroll:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
7412
+ .guide-preview-section + .guide-preview-section { margin-top: 4px; }
7413
+ .guide-preview-disclosure > summary, .guide-preview-section > summary {
7414
+ cursor: pointer; list-style: none; display: flex; align-items: center; gap: 6px; border-radius: 4px;
7415
+ }
7416
+ .guide-preview-disclosure > summary { color: var(--accent); }
7417
+ .guide-preview-disclosure > summary::-webkit-details-marker, .guide-preview-section > summary::-webkit-details-marker { display: none; }
7418
+ .guide-preview-disclosure > summary::before, .guide-preview-section > summary::before {
7419
+ content: "▸"; color: var(--text-dim); font-size: 10px; transition: transform 0.15s; display: inline-block;
7420
+ }
7421
+ .guide-preview-disclosure[open] > summary::before, .guide-preview-section[open] > summary::before { transform: rotate(90deg); }
7422
+ .guide-preview-disclosure > summary:focus-visible, .guide-preview-section > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
7423
+ .guide-preview-section > ul, .guide-preview-section > p { margin: 4px 0 4px 16px; overflow-wrap: anywhere; }
7424
+ .guide-preview-empty, .guide-preview-cut, .guide-preview-foot { color: var(--text-muted); }
7425
+ .guide-preview-foot { margin: 6px 0 0; }
7426
+ .guide-preview-problem { color: var(--text); }
7427
+ .guide-banner { margin: 0; padding: 8px 10px; border: 1px solid var(--accent); border-radius: 6px; background: var(--surface-2); }
7428
+ .guide-foot { margin: 8px 0 0; font-size: 11px; color: var(--text-muted); }
7429
+ .guide-foot:empty { display: none; }
7430
+ @media (prefers-reduced-motion: reduce) {
7431
+ .guide-preview-disclosure > summary::before, .guide-preview-section > summary::before { transition: none; }
7432
+ }