aegisone 1.0.42 → 1.0.44

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 (78) hide show
  1. package/README.md +2 -2
  2. package/package.json +1 -1
  3. package/scripts/predist.mjs +1 -1
  4. package/src/doctor.js +1 -1
  5. package/vendor/cli/README.md +5 -5
  6. package/vendor/cli/package.json +2 -2
  7. package/vendor/cli/src/chatflow.js +1 -1
  8. package/vendor/cli/src/commands.js +2 -2
  9. package/vendor/cli/src/deps.js +1 -1
  10. package/vendor/cli/src/limits.js +1 -1
  11. package/vendor/cli/src/permissions.js +4 -0
  12. package/vendor/cli/src/provenance.lock.json +2 -2
  13. package/vendor/cli/vendor/desktop/lib/local/check-command.js +3 -0
  14. package/vendor/cli/vendor/desktop/lib/local/engine.js +1 -1
  15. package/vendor/cli/vendor/desktop/lib/local/integrity.js +1 -1
  16. package/vendor/cli/vendor/desktop/lib/local/perm-store.js +7 -2
  17. package/vendor/cli/vendor/desktop/lib/local/prompt.js +1 -1
  18. package/vendor/cli/vendor/desktop/lib/local/repeat-guard.js +3 -0
  19. package/vendor/cli/vendor/desktop/lib/local/tools.js +186 -2
  20. package/vendor/cli/vendor/desktop/lib/local/verify-stop.js +3 -0
  21. package/vendor/cli/vendor/desktop/lib/settings.js +1 -1
  22. package/vendor/cli/vendor/desktop/main.js +802 -54
  23. package/vendor/desktop/README.md +3 -3
  24. package/vendor/desktop/bin/aegis.js +1 -1
  25. package/vendor/desktop/lib/avatar/events.js +1 -1
  26. package/vendor/desktop/lib/avatar/persona.js +1 -1
  27. package/vendor/desktop/lib/avatar/store.js +1 -1
  28. package/vendor/desktop/lib/local/check-command.js +3 -0
  29. package/vendor/desktop/lib/local/cli-face.js +3 -0
  30. package/vendor/desktop/lib/local/engine.js +1 -1
  31. package/vendor/desktop/lib/local/integrity.js +1 -1
  32. package/vendor/desktop/lib/local/perm-store.js +7 -2
  33. package/vendor/desktop/lib/local/prompt.js +1 -1
  34. package/vendor/desktop/lib/local/repeat-guard.js +3 -0
  35. package/vendor/desktop/lib/local/tools.js +186 -2
  36. package/vendor/desktop/lib/local/verify-stop.js +3 -0
  37. package/vendor/desktop/lib/settings.js +1 -1
  38. package/vendor/desktop/lib/sync/persist-gate.js +1 -1
  39. package/vendor/desktop/lib/sync/sessions.js +1 -1
  40. package/vendor/desktop/main.js +802 -54
  41. package/vendor/desktop/package.json +8 -4
  42. package/vendor/desktop/preload.js +1 -1
  43. package/vendor/desktop/renderer/app.js +3 -3
  44. package/vendor/desktop/renderer/avatar/pane.js +1 -1
  45. package/vendor/desktop/renderer/avatar/parts.js +1 -1
  46. package/vendor/desktop/renderer/commands.js +3 -0
  47. package/vendor/desktop/renderer/composer-triggers.js +3 -0
  48. package/vendor/desktop/renderer/find-in-conversation.js +3 -0
  49. package/vendor/desktop/renderer/fonts/fonts.css +42 -0
  50. package/vendor/desktop/renderer/fonts/ubuntu-vf-italic.woff2 +0 -0
  51. package/vendor/desktop/renderer/fonts/ubuntu-vf.woff2 +0 -0
  52. package/vendor/desktop/renderer/index.html +941 -484
  53. package/vendor/desktop/renderer/library.js +3 -0
  54. package/vendor/desktop/renderer/nav-history.js +3 -0
  55. package/vendor/desktop/renderer/palette-filter.js +3 -0
  56. package/vendor/desktop/renderer/shortcuts.js +3 -0
  57. package/vendor/desktop/renderer/style.css +2602 -380
  58. package/vendor/desktop/renderer/transcript-view.js +1 -1
  59. package/vendor/desktop/renderer/welcome-rows.js +3 -0
  60. package/vendor/desktop/vendor/faces/cli/README.md +5 -5
  61. package/vendor/desktop/vendor/faces/cli/package.json +2 -2
  62. package/vendor/desktop/vendor/faces/cli/src/chatflow.js +1 -1
  63. package/vendor/desktop/vendor/faces/cli/src/commands.js +2 -2
  64. package/vendor/desktop/vendor/faces/cli/src/deps.js +1 -1
  65. package/vendor/desktop/vendor/faces/cli/src/limits.js +1 -1
  66. package/vendor/desktop/vendor/faces/cli/src/permissions.js +1 -1
  67. package/vendor/desktop/vendor/faces/cli/src/provenance.lock.json +2 -2
  68. package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/local/check-command.js +3 -0
  69. package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/local/engine.js +1 -1
  70. package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/local/integrity.js +1 -1
  71. package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/local/perm-store.js +1 -1
  72. package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/local/prompt.js +1 -1
  73. package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/local/repeat-guard.js +3 -0
  74. package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/local/tools.js +1 -1
  75. package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/local/verify-stop.js +3 -0
  76. package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/settings.js +1 -1
  77. package/vendor/desktop/vendor/faces/cli/vendor/desktop/main.js +3 -3
  78. package/vendor/desktop/vendor/sandbox/provenance.json +7 -7
@@ -17,14 +17,19 @@
17
17
  http-equiv="Content-Security-Policy"
18
18
  content="default-src 'none'; script-src 'self'; style-src 'self'; font-src 'self'; img-src 'self' data:"
19
19
  />
20
- <title>AEGIS Desktop</title>
20
+ <title>aegis one</title>
21
21
  <link rel="stylesheet" href="fonts/fonts.css" />
22
22
  <link rel="stylesheet" href="style.css" />
23
23
  <link rel="stylesheet" href="fingerprint.css" />
24
+ <link rel="stylesheet" href="avatar/avatar.css" />
24
25
  </head>
25
- <body>
26
+ <body data-aegis-theme="default">
26
27
  <header class="topbar">
27
- <h1>AEGIS <span class="accent">Desktop</span></h1>
28
+ <!-- The wordmark must match `productName` in package.json and the document
29
+ title ("aegis one"). It read "AEGIS Desktop" after the product rename,
30
+ which contradicted the window title, the macOS app menu and the
31
+ installer — visible in the same window, on the first line of the app. -->
32
+ <h1>AEGIS <span class="accent">One</span></h1>
28
33
  <div class="conn">
29
34
  <span class="dot" id="conn-dot"></span>
30
35
  <span id="conn-text">connecting…</span>
@@ -40,13 +45,47 @@
40
45
  existing conversations, in here, where they can read and continue them.
41
46
  Opening the sheet is a dry scan (read-only, nothing copied); the copy
42
47
  only happens from the sheet's own button, which names the count. -->
48
+ <div class="topbar-actions">
43
49
  <button
44
50
  type="button"
45
51
  id="import-session-btn"
46
- class="ghost-btn toolbar-import"
52
+ class="tb-btn tb-ghost toolbar-import"
47
53
  title="Import sessions &amp; memory from other AI tools"
48
- >Import session</button>
49
- <button type="button" id="new-chat" class="ghost-btn">New chat</button>
54
+ aria-label="Import sessions and memory from other AI tools"
55
+ ><svg class="tb-icon" viewBox="0 0 16 16" width="18" height="18" aria-hidden="true" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M8 2.5v6.5" /><path d="M5 6.5 8 9.5l3-3" /><path d="M2.5 11v1.25a1.75 1.75 0 0 0 1.75 1.75h7.5A1.75 1.75 0 0 0 13.5 12.25V11" /></svg><span class="tb-label">Import</span></button>
56
+ <!-- The terminal face. `aegiscode/one` is ONE artifact with two faces —
57
+ this window, and the `aegiscode` terminal — and before this chip the
58
+ terminal was reachable only by leaving the app and typing the command,
59
+ so an install that shipped a CLI had no on-screen evidence of it. It
60
+ sits in the topbar beside New chat for the same reason Import session
61
+ does: it is a thing you reach for on the way to a conversation, not a
62
+ setting. Painted from aegis.openCliFace() (main.js
63
+ createCliFaceDispatch), which opens the packaged
64
+ resources/faces/cli/** entry under Electron-as-Node in the host's
65
+ terminal emulator. `(cli)` is the label the parenthetical promises:
66
+ the OTHER face of this program, not a separate download. -->
67
+ <button
68
+ type="button"
69
+ id="open-cli-face"
70
+ class="tb-btn tb-ghost toolbar-cli"
71
+ title="Open the terminal face of this same install (aegiscode) in a terminal window"
72
+ aria-label="Open the terminal face (CLI)"
73
+ ><svg class="tb-icon" viewBox="0 0 16 16" width="18" height="18" aria-hidden="true" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M3.25 4.5 6.75 8l-3.5 3.5" /><path d="M8.75 11.5h4" /></svg><span class="tb-label">CLI</span></button>
74
+ <span class="tb-sep" aria-hidden="true"></span>
75
+ <button type="button" id="new-chat" class="tb-btn tb-primary" title="Start a new conversation (Cmd/Ctrl+N)" aria-label="New message"><svg class="tb-icon" viewBox="0 0 16 16" width="18" height="18" aria-hidden="true" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M8 3.25v9.5" /><path d="M3.25 8h9.5" /></svg><span class="tb-label">New message</span></button>
76
+ </div>
77
+ <!-- Minimize / maximize / close. frame:false (main.js) removed the OS title
78
+ bar and its buttons on every platform, including macOS's traffic
79
+ lights, so this is the only place left to draw them — far right, where
80
+ every platform's own title bar puts them.
81
+
82
+ These are NOT drawable from here any more. main.js uses
83
+ `titleBarStyle: 'hidden'` with `titleBarOverlay`, so the OS draws its
84
+ own minimize/maximize/close over this strip: real hit targets,
85
+ double-click-to-maximize and accessibility come for free, and a
86
+ hand-drawn copy of a system button reads as a drawing of one. The
87
+ overlay is recoloured to `--surface` at `height: 35` (main.js) to match
88
+ `.topbar`'s measured height, so the two read as a single bar. -->
50
89
  </header>
51
90
 
52
91
  <div class="update-banner" id="update-banner" role="status" hidden>
@@ -59,15 +98,510 @@
59
98
  </div>
60
99
  </div>
61
100
 
62
- <div class="update-banner account-banner" id="account-banner" role="alert" hidden>
63
- <span id="account-banner-text"></span>
64
- <div class="update-banner-actions">
65
- <button type="button" id="account-retry-btn" class="ghost-btn">Retry account setup</button>
66
- </div>
67
- </div>
101
+ <div class="update-banner account-banner" id="account-banner" role="alert" hidden>
102
+ <span id="account-banner-text"></span>
103
+ <div class="update-banner-actions">
104
+ <button type="button" id="account-retry-btn" class="ghost-btn">Retry account setup</button>
105
+ </div>
106
+ </div>
107
+
108
+ <main>
109
+ <aside class="side" id="side">
110
+ <!-- Antigravity-style rail nav: real destinations. Settings is a page in
111
+ the canvas, toggled by showSettingsView(). "Automations" is its OWN
112
+ page (#automations-view) holding #queue-card — it used to open
113
+ Settings and scroll, which read as the row having gone to the wrong
114
+ place. There is deliberately no "Customizations" row: every
115
+ customization surface (Tool approvals, plan mode, the Rules list, the
116
+ sandbox posture) already lives inside #settings-view, so a rail row
117
+ was a second doorway to the same place — reach it via Settings
118
+ below.
119
+ There is deliberately no "New Conversation" row either: starting a
120
+ thread belongs to the WINDOW's topbar (`#new-chat`), which is the
121
+ one strip that is always on screen. A second copy in the sidebar sat
122
+ 45px under the first and made the same action look like two. -->
123
+ <nav class="rail-nav" aria-label="Primary">
124
+ <button type="button" class="rail-item" id="rail-automations">
125
+ <span class="rail-icon" aria-hidden="true"><svg viewBox="0 0 16 16" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M13.2 8A5.2 5.2 0 1 1 8 2.8"/><path d="M6.1 0.9 8 2.8 6.1 4.7"/></svg></span> Automations
126
+ </button>
127
+ </nav>
128
+
129
+ <!-- The scroll container. Rail nav above and the Settings entry below
130
+ (`.rail-footer`) stay fixed; this is the one thing that scrolls —
131
+ see `.side-scroll` in style.css for why `.side` itself gave up
132
+ `overflow-y` to this child. -->
133
+ <div class="side-scroll" id="side-scroll">
134
+
135
+ <!-- Providers, approvals, the key, the quick launcher — everything
136
+ that used to sit inline in the sidebar at all times now lives
137
+ here instead, reached through Automations/Settings rather than
138
+ always on screen. Hidden by default; app.js's
139
+ showSettingsView()/showConversationsView() are the only things
140
+ that flip it, and they always show exactly one of this or
141
+ #conversations-view. -->
142
+
143
+ <div id="conversations-view">
144
+ <!-- Sessions and Memory are panes behind one strip now, not two
145
+ always-on cards stacked in the column. `role=tab`/`aria-selected`
146
+ rather than styled buttons: the strip has to be a real tablist for
147
+ a screen reader to announce which pane is up. The Memory tab ships
148
+ `hidden` because its usefulness is not known until the first memory
149
+ read answers — renderMemoryResults() un-hides it only when there is
150
+ something above the importance floor to show. -->
151
+ <!-- Antigravity names this section "Projects"; ours holds conversations
152
+ (and, behind the Memory tab, saved memory) rather than project
153
+ folders, so the label says what the list actually is instead of
154
+ borrowing a word that would mean something else here. -->
155
+ <h2 class="rail-section-label">Conversations</h2>
156
+ <div class="pane-tabs" id="pane-tabs" role="tablist" aria-label="Sidebar sections">
157
+ <button
158
+ type="button"
159
+ class="pane-tab"
160
+ id="tab-sessions"
161
+ role="tab"
162
+ aria-selected="true"
163
+ aria-controls="pane-sessions"
164
+ >Sessions</button>
165
+ <button
166
+ type="button"
167
+ class="pane-tab"
168
+ id="tab-memory"
169
+ role="tab"
170
+ aria-selected="false"
171
+ aria-controls="pane-memory"
172
+ hidden
173
+ >Memory</button>
174
+ </div>
175
+
176
+ <section class="card" id="pane-sessions" role="tabpanel" aria-labelledby="tab-sessions">
177
+ <!-- No <h2> here: the tab above already names this pane, and the strip
178
+ is what a reader orients by. A second heading repeating "Sessions"
179
+ one line below the tab spends a line to say nothing new. -->
180
+ <button type="button" id="sessions-refresh" class="ghost-btn">Refresh</button>
181
+ <button type="button" id="sync-now" class="ghost-btn">Sync now</button>
182
+ <button type="button" id="sessions-export" class="ghost-btn">Export</button>
183
+ <!-- The library filter. It narrows the rows already loaded in this
184
+ pane; View > Search sessions… (Cmd/Ctrl+K) is the ranked search
185
+ over the WHOLE store, including threads this list has not loaded.
186
+ Two different questions, so two different boxes — see
187
+ renderer/library.js for why the pane's one is local. -->
188
+ <div class="library-bar">
189
+ <input
190
+ type="search"
191
+ id="sessions-filter"
192
+ class="library-filter"
193
+ placeholder="Filter conversations…"
194
+ autocomplete="off"
195
+ spellcheck="false"
196
+ aria-controls="sessions-list"
197
+ aria-label="Filter conversations"
198
+ />
199
+ <span class="library-count" id="sessions-count"></span>
200
+ </div>
201
+ <ul class="sessions-list library-list" id="sessions-list"></ul>
202
+ <p class="hint" id="sessions-hint"></p>
203
+ <p class="hint" id="sync-status"></p>
204
+ </section>
205
+
206
+ <section class="card" id="pane-memory" role="tabpanel" aria-labelledby="tab-memory" hidden>
207
+ <!-- The heading is the click target for the full memory inspector.
208
+ The button lives *inside* the h2 (not the reverse) because a
209
+ <button> may only contain phrasing content, and <h2> is not. -->
210
+ <h2>
211
+ <button
212
+ type="button"
213
+ class="card-title-btn"
214
+ id="memory-open"
215
+ title="Open the memory inspector — every entry with its source and tags"
216
+ >
217
+ <span>Memory</span>
218
+ <span class="ctb-expand" aria-hidden="true">⤢</span>
219
+ </button>
220
+ </h2>
221
+ <!-- The box below the heading is the *quick* surface: search and save.
222
+ Import is NOT here — it lives in the window's topbar (`Import
223
+ session`), which imports memory AND sessions from one sheet, so
224
+ the card's own copy was a third doorway to the same scan. It is
225
+ omitted (renderMemoryResults) when memory holds
226
+ nothing above IMPORTANCE_FLOOR, because a panel that lists four
227
+ low-salience scraps is noise in a column the user reads every
228
+ turn. The heading's button still opens the full inspector, so
229
+ nothing becomes unreachable when the box is gone. -->
230
+ <p class="hint" id="memory-quiet" hidden>
231
+ Nothing above importance <span id="memory-quiet-floor">5</span> yet.
232
+ </p>
233
+ <div id="memory-box">
234
+ <form id="memory-search-form" class="memory-search">
235
+ <input
236
+ type="text"
237
+ id="memory-query"
238
+ placeholder="Search memory…"
239
+ autocomplete="off"
240
+ />
241
+ <button type="submit" id="memory-search-btn">Search</button>
242
+ </form>
243
+ <ul class="memory-results" id="memory-results"></ul>
244
+ <textarea
245
+ id="memory-entry"
246
+ rows="2"
247
+ placeholder="Save a note to memory…"
248
+ ></textarea>
249
+ <button type="button" id="memory-save-btn" class="btn-block">Save to memory</button>
250
+ </div>
251
+ <p class="hint" id="memory-hint"></p>
252
+ </section>
253
+ </div><!-- /#conversations-view -->
254
+
255
+
256
+ <section class="card" id="authorship-card" hidden>
257
+ <!-- HIDDEN ON PURPOSE (user request): sealing is a background worker
258
+ now. The authorship panel is still reachable — ⌘/Ctrl-K style menu
259
+ paths and `window.aegisFingerprint` are unchanged — but this entry
260
+ card no longer sits on the desktop and never prompts for a click.
261
+ Kept in the document for the same reason as the queue card above:
262
+ `fp-card-status` is painted by renderer/fingerprint.js and
263
+ `fp-open` is the panel's own open seam, and an absent node is a
264
+ silent no-op in one and a thrown paint in the other.
265
+
266
+ φ(α) — the authorship key and the sealed session records.
267
+ The heading is the click target for the full panel, exactly like
268
+ the Memory card (a <button> may only hold phrasing content, so the
269
+ button goes inside the h2, never around it).
270
+
271
+ Everything on this card is driven by desktop/renderer/fingerprint.js
272
+ over the IPC surface preload.js:171-183 already exposes; app.js only
273
+ mounts it. Nothing here ever receives the key itself — the state
274
+ line shows the derived 12-hex tag. -->
275
+ <h2>
276
+ <button
277
+ type="button"
278
+ class="card-title-btn"
279
+ id="fp-open"
280
+ title="Open the authorship panel — key, sealed records, and the Drive vault"
281
+ >
282
+ <span>Authorship</span>
283
+ <span class="ctb-expand" aria-hidden="true">⤢</span>
284
+ </button>
285
+ </h2>
286
+ <p class="hint" id="fp-card-status">checking…</p>
287
+ <!-- One-click seal, the same action as the panel's. `-card` suffix
288
+ because ids are document-global: two nodes sharing `fp-seal` would
289
+ leave whichever the browser returned second permanently unbound. -->
290
+ <button type="button" id="fp-seal-card" class="btn-block">Seal this session</button>
291
+ <p class="hint" id="fp-card-hint">
292
+ A sealed record proves which key wrote a session, and can carry a
293
+ behaviour digest of the code it touched.
294
+ </p>
295
+ </section>
296
+ </div><!-- /.side-scroll -->
297
+
298
+ <!-- Pinned below the scroll area, Antigravity-style: the one entry that
299
+ is always reachable regardless of scroll position or which view
300
+ (Conversations/Settings) is open. -->
301
+ <div class="rail-footer">
302
+ <button type="button" class="rail-item" id="rail-settings">
303
+ <span class="rail-icon" aria-hidden="true"><svg viewBox="0 0 16 16" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><circle cx="8" cy="8" r="2.1"/><path d="M8 3.1v1.3M8 11.6v1.3M12.9 8h-1.3M4.4 8H3.1M11.46 4.54l-.91.91M5.45 10.55l-.91.91M11.46 11.46l-.91-.91M5.45 5.45l-.91-.91"/></svg></span> Settings
304
+ </button>
305
+ </div>
306
+ </aside>
307
+
308
+ <section class="chat" id="chat-canvas">
309
+ <!-- ⌘F find bar (Phase 5). Distinct from ⌘K, which searches sessions and
310
+ memory across the whole install: this searches the ONE conversation
311
+ on screen, in place, and reports positions rather than sessions. It
312
+ is absolutely positioned over the transcript instead of taking a row
313
+ out of the column, so opening it never reflows the prose the user is
314
+ trying to read. `hidden` until the chord fires — an empty find bar on
315
+ boot would be chrome nothing asked for. -->
316
+ <div class="find-bar" id="find-bar" role="search" hidden>
317
+ <label class="find-field" for="find-input">
318
+ <span class="find-label" id="find-label">Find in conversation</span>
319
+ <input
320
+ type="text"
321
+ id="find-input"
322
+ placeholder="Find in conversation…"
323
+ autocomplete="off"
324
+ spellcheck="false"
325
+ />
326
+ </label>
327
+ <span class="find-count" id="find-count" aria-live="polite">0 of 0</span>
328
+ <button type="button" class="find-step" id="find-prev" title="Previous match (Shift+Enter)" aria-label="Previous match">&#8593;</button>
329
+ <button type="button" class="find-step" id="find-next" title="Next match (Enter)" aria-label="Next match">&#8595;</button>
330
+ <button type="button" class="find-close" id="find-close" title="Close (Esc)" aria-label="Close find">&#10005;</button>
331
+ </div>
332
+ <!-- Inert template: cloned into #messages by renderWelcome() so the
333
+ welcome markup lives in exactly one place and survives the
334
+ innerHTML clears in newChat()/openSession(). -->
335
+ <template id="welcome-template">
336
+ <div class="chat-welcome" id="chat-welcome">
337
+ <div class="chat-greeting-row">
338
+ <!-- Decorative mark, drawn in CSS (desktop/renderer/style.css
339
+ .chat-welcome .glyph) rather than this element's content —
340
+ the shape is a mask-image, not text, see that rule for why.
341
+ "Hello" already carries the row's meaning. -->
342
+ <div class="glyph" aria-hidden="true"></div>
343
+ <div class="title" id="chat-greeting">Hello</div>
344
+ </div>
345
+ <div class="sub" id="welcome-tagline">Your intent, AI automated.</div>
346
+ <!-- One line, chosen from what this process actually knows about THIS
347
+ install — never a menu of canned topics. The five generic pills
348
+ that used to sit here ("Write code", "Explain a concept", …) were
349
+ the same list on every machine for every user: a topic menu is
350
+ not a welcome, it is a form to fill in. The line below is built
351
+ by welcomePersonalize() in app.js from the same fact-gated rules
352
+ as the sidebar's daily message (renderer/companion.js): an
353
+ update that is downloaded and waiting, a missing key with the one
354
+ concrete step, or memory entries this account already holds. When
355
+ no fact is present it rotates one true tip, seeded by the day;
356
+ when there is nothing to say at all it stays hidden rather than
357
+ guessing. `hidden` is in the markup so a render that never runs
358
+ shows nothing instead of an empty box. -->
359
+ <p class="sub welcome-personal" id="welcome-personal" hidden></p>
360
+ <!-- Suggestion rows: doors into surfaces this install already has,
361
+ chosen from facts this process actually holds — never a canned
362
+ prompt. The five generic topic pills that used to sit here were
363
+ removed on purpose (see the .welcome-personal comment above and
364
+ the "topic menu that is gone" section of
365
+ desktop/test/renderer-welcome.test.mjs), and a row that TYPES a
366
+ starter sentence would be the same menu under a new class name.
367
+ So each row calls a real handler instead (update restart, the
368
+ session sheet, the memory inspector, the CLI face), which is
369
+ also the only version of this affordance that cannot go stale.
370
+ Built by renderWelcomeRows() in app.js from
371
+ renderer/welcome-rows.js — empty and hidden in the markup, so a
372
+ render that never runs shows nothing rather than a stray box. -->
373
+ <div class="welcome-rows" id="welcome-rows" hidden></div>
374
+ <!-- Why aegis one, and the ONE reason to pay.
375
+ Phase 3 of docs/upgrade-conversion-plan.md. This block used to
376
+ carry four competing bullets (local, your key, does the work,
377
+ open client) and priced none of them — a feature list where an
378
+ offer belongs, whose only money line was "free tier to start,
379
+ then upgrade", i.e. it pitched free in the offer slot. It is now
380
+ the single paid promise plus the honesty line, with the two
381
+ routes demoted to one primary CTA (#welcome-cloud) and one
382
+ secondary link (#welcome-byok).
383
+
384
+ THE SENTENCE IS LOAD-BEARING. "The autonomous queue keeps
385
+ running after you close the laptop." is the same promise every
386
+ other paid surface repeats (app.js PAID_PROMISE), and the honesty
387
+ line is the same one the free path states (app.js FREE_HONESTY);
388
+ desktop/test/renderer-welcome.test.mjs fails if the three drift
389
+ apart or if the four-bullet list comes back.
390
+
391
+ The genuinely-free facts — exec/write/edit against your real
392
+ working tree, repos and keys on this disk, a local model server
393
+ with no account, an open-source client — are NOT reasons to pay, so they
394
+ moved into the free path copy below instead of standing in the
395
+ offer.
396
+
397
+ Both controls are real: #welcome-byok switches the provider class
398
+ to byok and drops the user on the Provider settings card,
399
+ #welcome-cloud focuses the AEGIS key field in the Status card.
400
+ The whole block is hidden once a key is configured or the user
401
+ dismisses it (applyWelcomeConnect() in app.js) — a welcome panel
402
+ that reappears on every New chat is an ad, not a welcome. -->
403
+ <div class="welcome-connect" id="welcome-connect" hidden>
404
+ <div class="wc-why">
405
+ <div class="wc-why-title">Why aegis one</div>
406
+ <ul class="wc-why-list">
407
+ <li class="wc-offer">
408
+ <b>The autonomous queue keeps running after you close the
409
+ laptop.</b> The cloud drain is what makes that true: the job
410
+ survives app close and reboot, runs on pooled models with
411
+ fan-out workers, and carries memory from one task to the next.
412
+ </li>
413
+ <li class="wc-honest">
414
+ Everything on your machine is free, permanently. The cloud
415
+ drain is what you pay for.
416
+ </li>
417
+ </ul>
418
+ </div>
419
+ <div class="wc-honest-line" id="welcome-cap">
420
+ Free, permanently: everything on this machine — exec, write, edit,
421
+ your own key, and the queue draining while this window is open, one
422
+ worker per task. Pro is the cloud drain: it keeps running after you
423
+ close the laptop, fans a task out across workers, and carries
424
+ memory from one task to the next.
425
+ </div>
426
+ <!-- The ask, written as an example instead of described as a
427
+ benefit — and the unlock, said out loud. "Autonomously" is the
428
+ word the queue actually matches (queue.js / autonomous.js treat
429
+ a task with the fan-out flag as the multi-worker one), so the
430
+ user is shown the sentence to type, not a feature name to
431
+ decode. #welcome-unlock names BOTH ways through the wall
432
+ because there are two: a paid plan, or a funded Token Bank —
433
+ operator-controlled (aegis1 `add_funds`), which is the lever
434
+ the entitlement gate reads (`desktop/lib/local/entitlement.js`
435
+ `entitled = pro || banked`). Saying only "Pro" would send a
436
+ banked account to the wrong checkout. -->
437
+ <div class="wc-honest-line wc-howto" id="welcome-unlock">
438
+ <b>How to unlock the fan-out:</b> paying accounts get it — Pro, or
439
+ any Token Bank balance. Free accounts still drain the queue, one
440
+ worker per task, while this window is open.
441
+ </div>
442
+ <div class="wc-paths">
443
+ <!-- Phase 4A: ONE primary CTA, and it is the paid promise. It goes
444
+ through the Phase 1 helper's destination —
445
+ /go/upgrade?s=desktop&c=welcome_cloud (aegis1 GO_TARGETS +
446
+ SIGNUP_SOURCES own the utm_* mapping, so `s`/`c` are the wire
447
+ names here and utm_* must NOT be appended). The href below is
448
+ the same URL app.js's subscribeUrl('welcome_cloud') builds,
449
+ and renderWelcome() re-points the anchor at that helper on
450
+ every paint; desktop/test/renderer-welcome.test.mjs asserts the
451
+ two agree, so this literal cannot drift into a dead link.
452
+ The free paths are demoted underneath it: the key connect and
453
+ BYOK are secondary links, not co-equal pitches. -->
454
+ <a
455
+ class="wc-path wc-path-primary"
456
+ id="welcome-upgrade"
457
+ href="https://aegiscloud.org/go/upgrade?s=desktop&amp;c=welcome_cloud"
458
+ target="_blank"
459
+ rel="noreferrer noopener"
460
+ >
461
+ <span class="wc-ic" aria-hidden="true">✦</span>
462
+ <span class="wc-body">
463
+ <span class="wc-name">Pro: the cloud drain</span>
464
+ <span class="wc-desc">
465
+ Write it in the message: <code>Do X autonomously</code> —
466
+ Pro keeps draining that task after you close the laptop,
467
+ and fans it across workers.
468
+ </span>
469
+ </span>
470
+ <span class="wc-go">See what Pro covers →</span>
471
+ </a>
472
+ <div class="wc-secondary">
473
+ <button type="button" class="wc-link" id="welcome-cloud">
474
+ Connect AEGIS Cloud — I already have a key →
475
+ </button>
476
+ <span class="wc-note" id="welcome-cloud-note">
477
+ Connect it here and the same queue runs on pooled models right
478
+ away, free, while this window is open.
479
+ </span>
480
+ <button type="button" class="wc-link" id="welcome-byok">
481
+ Bring your own key →
482
+ </button>
483
+ <span class="wc-note" id="welcome-byok-note"></span>
484
+ <button type="button" class="wc-skip" id="welcome-dismiss">
485
+ Don't show this again
486
+ </button>
487
+ </div>
488
+ </div>
489
+ </div>
490
+ <div class="hints">
491
+ Enter to send · Shift+Enter for a newline · the discovery lane adds
492
+ two extra paths to every answer
493
+ </div>
494
+ </div>
495
+ </template>
496
+ <div class="messages" id="messages" aria-live="polite"></div>
497
+ <!-- Scroll-to-bottom pill (parity pass 2, Phase F). Appears only when the
498
+ transcript is scrolled up, so a long answer arriving while the reader
499
+ is above it doesn't silently stream out of view. Sits inside
500
+ .chat-canvas so it floats over the bottom of the transcript instead
501
+ of pushing the composer, and it is `hidden` at boot: an affordance
502
+ for a condition that hasn't happened yet. -->
503
+ <button
504
+ class="scroll-bottom"
505
+ id="scroll-bottom"
506
+ type="button"
507
+ hidden
508
+ aria-label="Scroll to the newest message"
509
+ >
510
+ <svg viewBox="0 0 16 16" width="14" height="14" aria-hidden="true" fill="none"
511
+ stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round">
512
+ <path d="M8 3v10M4 9l4 4 4-4" />
513
+ </svg>
514
+ </button>
515
+ <!-- Whole-window drop veil. Shown by the dragenter/dragleave counter in
516
+ app.js (body.is-dropping), never hit-testable itself: the drop still
517
+ lands on the window handler. -->
518
+ <div class="drop-veil" id="drop-veil" aria-hidden="true">
519
+ <div class="drop-veil-label">Drop to attach — files, pictures, or a path</div>
520
+ </div>
521
+ <!-- The `/` and `@` completion menus (Phase 6).
522
+
523
+ They float ABOVE the composer rather than inside it: a list that grew
524
+ the form would push the transcript up on every keystroke — the same
525
+ jitter the find bar avoids by being absolute. Positioned by
526
+ .composer-menu, which takes its offsets from the composer's box.
527
+
528
+ Both menus share one element. They never appear at once (a token is
529
+ either a slash token or an at-token), and two lists that could both
530
+ be up is a state with no correct Escape target. -->
531
+ <div class="composer-menu" id="composer-menu" hidden>
532
+ <ul class="composer-menu-list" id="composer-menu-list" role="listbox"></ul>
533
+ <p class="composer-menu-hint" id="composer-menu-hint" hidden></p>
534
+ </div>
535
+ <form class="composer" id="composer">
536
+ <!-- Files dragged onto the window land here. The row is populated by
537
+ renderAttachments() in app.js and is empty (and collapsed) until
538
+ something is dropped — see ATTACH in app.js for why the drop
539
+ target is the whole window but the chips live in the composer. -->
540
+ <div class="attach-row" id="attach-row" hidden></div>
541
+ <!-- Capability warning for staged attachments: a picture dropped on a
542
+ destination that cannot receive pixels (PRO is a child process fed
543
+ text) says so here BEFORE the turn, instead of the file silently
544
+ arriving as a path. Populated by renderAttachments(). -->
545
+ <div class="attach-note" id="attach-note" hidden></div>
546
+ <textarea
547
+ id="prompt"
548
+ rows="2"
549
+ placeholder="Message AEGIS… (Enter to send, Shift+Enter for a newline, or drop a file)"
550
+ ></textarea>
551
+ <!-- The composer's control row: every switch that changes what this
552
+ send will do lives INSIDE the composer box, on one line under the
553
+ input, so the whole thing reads as one object with one focus ring.
554
+ Before this, the discovery toggle sat in a side rail and the tool
555
+ mode sat in a strip underneath the form — three surfaces around
556
+ one text field, and the mode chip (which changes whether tools run
557
+ unattended) was the furthest from the thing it governs. -->
558
+ <div class="composer-row">
559
+ <!-- Which provider answers the next send. This is the one place in
560
+ the window where that fact is shown: messages used to carry an
561
+ author line (`You` / `AEGIS`), and `AEGIS` was wrong on every
562
+ byok and local turn — the reply came from Anthropic or from a
563
+ localhost daemon. Painted by provider-mark.js from the picker
564
+ selection via updateBudgetControls(), so it cannot disagree
565
+ with the model actually selected above. -->
566
+ <span class="provider-mark-slot" id="provider-mark"></span>
567
+ <label
568
+ class="flow-toggle"
569
+ for="explore-toggle"
570
+ title="Optional, off by default. After every answer, send the AI down two extra paths — an alternative angle and an unexpected discovery — shown as a horizontal discovery lane. This costs two extra model calls per turn (roughly 3× the tokens of a plain reply)."
571
+ >
572
+ <!-- Unchecked in the markup on purpose: the lane bills two extra
573
+ model calls per turn, so it is opt-in. app.js only ticks this
574
+ when the user has explicitly saved 'on' (aegis.explore). -->
575
+ <input type="checkbox" id="explore-toggle" />
576
+ <span>discovery lane</span>
577
+ </label>
578
+ <!-- Mode chip: the same switch as Settings → Tool approvals, hoisted
579
+ next to the input so the current mode is readable while typing
580
+ and one click from the other. Painted from
581
+ renderConfirmMode()/renderAutoModeChip() in app.js, so the two
582
+ cannot disagree. type="button" so it never submits the form. -->
583
+ <button
584
+ type="button"
585
+ id="auto-mode-toggle"
586
+ class="mode-chip"
587
+ aria-pressed="false"
588
+ title="Auto mode lets the agent run exec, writeFile and editFile without asking. Click to switch, or set it in Settings → Tool approvals."
589
+ >
590
+ <span class="mode-dot" aria-hidden="true">●</span>
591
+ <span id="auto-mode-label">ask before tools</span>
592
+ </button>
593
+ <span class="hint" id="auto-mode-hint"></span>
594
+ <span class="composer-spacer"></span>
595
+ <button type="submit" id="send">Send</button>
596
+ </div>
597
+ </form>
598
+ </section>
599
+
600
+ <div id="settings-view" hidden>
601
+ <div class="settings-view-header">
602
+ <button type="button" class="settings-back" id="settings-back">&larr; Back to conversations</button>
603
+ </div>
68
604
 
69
- <main>
70
- <aside class="side">
71
605
  <section class="card">
72
606
  <h2>Status</h2>
73
607
  <dl>
@@ -347,7 +881,7 @@
347
881
  <label
348
882
  class="flow-toggle"
349
883
  for="quick-launcher-enabled"
350
- title="Register a systemwide keyboard shortcut that opens a small always-on-top prompt window from anywhere on the desktop, even when AEGIS Desktop isn't focused. Packaged builds always have it on; this toggle is for a dev run."
884
+ title="Register a systemwide keyboard shortcut that opens a small always-on-top prompt window from anywhere on the desktop, even when aegis one isn't focused. Packaged builds always have it on; this toggle is for a dev run."
351
885
  >
352
886
  <input type="checkbox" id="quick-launcher-enabled" />
353
887
  <span>enable global shortcut</span>
@@ -452,474 +986,298 @@
452
986
  </div>
453
987
  </section>
454
988
 
455
- <!-- Sessions and Memory are panes behind one strip now, not two
456
- always-on cards stacked in the column. `role=tab`/`aria-selected`
457
- rather than styled buttons: the strip has to be a real tablist for
458
- a screen reader to announce which pane is up. The Memory tab ships
459
- `hidden` because its usefulness is not known until the first memory
460
- read answers — renderMemoryResults() un-hides it only when there is
461
- something above the importance floor to show. -->
462
- <div class="pane-tabs" id="pane-tabs" role="tablist" aria-label="Sidebar sections">
463
- <button
464
- type="button"
465
- class="pane-tab"
466
- id="tab-sessions"
467
- role="tab"
468
- aria-selected="true"
469
- aria-controls="pane-sessions"
470
- >Sessions</button>
471
- <button
472
- type="button"
473
- class="pane-tab"
474
- id="tab-memory"
475
- role="tab"
476
- aria-selected="false"
477
- aria-controls="pane-memory"
478
- hidden
479
- >Memory</button>
480
- </div>
481
-
482
- <section class="card" id="pane-sessions" role="tabpanel" aria-labelledby="tab-sessions">
483
- <!-- No <h2> here: the tab above already names this pane, and the strip
484
- is what a reader orients by. A second heading repeating "Sessions"
485
- one line below the tab spends a line to say nothing new. -->
486
- <button type="button" id="sessions-refresh" class="ghost-btn">Refresh</button>
487
- <button type="button" id="sync-now" class="ghost-btn">Sync now</button>
488
- <button type="button" id="sessions-export" class="ghost-btn">Export</button>
489
- <ul class="sessions-list" id="sessions-list"></ul>
490
- <p class="hint" id="sessions-hint"></p>
491
- <p class="hint" id="sync-status"></p>
492
- </section>
493
-
494
- <section class="card" id="pane-memory" role="tabpanel" aria-labelledby="tab-memory" hidden>
495
- <!-- The heading is the click target for the full memory inspector.
496
- The button lives *inside* the h2 (not the reverse) because a
497
- <button> may only contain phrasing content, and <h2> is not. -->
498
- <h2>
499
- <button
500
- type="button"
501
- class="card-title-btn"
502
- id="memory-open"
503
- title="Open the memory inspector — every entry with its source and tags"
504
- >
505
- <span>Memory</span>
506
- <span class="ctb-expand" aria-hidden="true">⤢</span>
507
- </button>
508
- </h2>
509
- <!-- The box below the heading is the *quick* surface: search, save,
510
- import. It is omitted (renderMemoryResults) when memory holds
511
- nothing above IMPORTANCE_FLOOR, because a panel that lists four
512
- low-salience scraps is noise in a column the user reads every
513
- turn. The heading's button still opens the full inspector, so
514
- nothing becomes unreachable when the box is gone. -->
515
- <p class="hint" id="memory-quiet" hidden>
516
- Nothing above importance <span id="memory-quiet-floor">5</span> yet.
517
- </p>
518
- <div id="memory-box">
519
- <form id="memory-search-form" class="memory-search">
520
- <input
521
- type="text"
522
- id="memory-query"
523
- placeholder="Search memory…"
524
- autocomplete="off"
525
- />
526
- <button type="submit" id="memory-search-btn">Search</button>
527
- </form>
528
- <ul class="memory-results" id="memory-results"></ul>
529
- <textarea
530
- id="memory-entry"
531
- rows="2"
532
- placeholder="Save a note to memory…"
533
- ></textarea>
534
- <button type="button" id="memory-save-btn" class="btn-block">Save to memory</button>
535
- <button type="button" id="memory-import-btn" class="btn-block">
536
- Import from other AI tools…
537
- </button>
538
- </div>
539
- <p class="hint" id="memory-hint"></p>
540
- </section>
541
-
542
- <section class="card" id="queue-card" hidden>
543
- <!-- HIDDEN ON PURPOSE (user request): the queue is a background worker
544
- now, not a panel on the desktop. The card stays in the document
545
- ONLY so the ids app.js and its tests already resolve keep existing —
546
- `renderQueueState()`, `loadAutoState()` and the queue model pickers
547
- paint into these nodes, and an absent node turns a paint into a
548
- throw. Nothing here is visible, focusable or tab-reachable while
549
- `hidden` is set, and no affordance offers to un-hide it.
550
-
551
- The worker itself runs from the main process (desktop/lib/auto.js):
552
- it drains pending tasks on its own cadence and seals a quiet
553
- session, both switched on by default (settings.js
554
- `__autoDrain`/`__autoMint`), so queueing a task and walking away is
555
- the normal path. Turning either off is a settings-store write, not
556
- a click on this card.
557
-
558
- The list below is state, not a transcript: the worker's own output
559
- arrives on queue:progress and is shown as a status line and each
560
- task's outcome. Nothing from a drain enters the chat thread. -->
561
- <h2>Autonomous queue</h2>
562
- <textarea
563
- id="queue-task"
564
- rows="2"
565
- placeholder="Queue a task to run unattended…"
566
- ></textarea>
567
- <!-- Which backend this task runs on — the same three classes
568
- (window.models.listClasses()) and the same per-class model list
569
- (listModels(cls)) the chat composer's #class-select/#model-select
570
- use. Aegis Cloud can leave the model on "server default"; byok and
571
- local tasks must name one (autonomous.js modelRefusal refuses a
572
- blank at the door for those two). -->
573
- <div class="api-key-row">
574
- <select id="queue-class-select" title="Which backend this task runs on."></select>
575
- <select id="queue-model-select" title="The model for the picked class."></select>
576
- </div>
577
- <input
578
- type="text"
579
- id="queue-model-input"
580
- placeholder="model tag — e.g. llama3.2:3b"
581
- autocomplete="off"
582
- hidden
583
- />
584
- <p class="hint" id="queue-model-hint"></p>
585
- <div class="api-key-row">
586
- <input
587
- type="text"
588
- id="queue-cwd"
589
- placeholder="/path/to/repo"
590
- autocomplete="off"
591
- title="The directory the task's tool loop runs in. Must already exist."
592
- />
593
- <button type="button" id="queue-enqueue" class="ghost-btn">Queue</button>
594
- </div>
595
- <label
596
- class="flow-toggle"
597
- for="queue-commit"
598
- title="Commit the paths this task's own tool calls wrote, once it finishes. Anything else dirty in that checkout is left alone."
599
- >
600
- <input type="checkbox" id="queue-commit" />
601
- <span>commit what the task changes</span>
602
- </label>
603
- <div class="api-key-row">
604
- <button type="button" id="queue-drain" class="ghost-btn">Run one</button>
605
- <button type="button" id="queue-proceed" class="ghost-btn">Drain all</button>
606
- <button type="button" id="queue-stop" class="ghost-btn" hidden>Stop</button>
607
- </div>
608
- <!-- Fan-out (Phase 4 of docs/upgrade-conversion-plan.md). The fan-out is
609
- the Pro multiplier: pool_brain spawns `workers` reasoning workers
610
- plus a synthesis pass and re-sends the task context to each, where
611
- the identical task single-pass is one turn. Main enforces the
612
- ceiling — free gets one worker per task — and refuses a request it
613
- is not entitled to, naming what Pro adds (the cloud drain that
614
- survives app close) rather than only the limit. app.js paints this
615
- control from the entitlement main sends, and disables it for free
616
- with the reason ON SCREEN (#queue-hint) BEFORE any refusal. -->
617
- <label
618
- class="flow-toggle"
619
- for="queue-fanout"
620
- title="Fan this task out across pooled reasoning workers (roughly workers+1 reasoning calls). Pro only — the free tier runs one worker per task."
621
- >
622
- <input type="checkbox" id="queue-fanout" />
623
- <span id="queue-fanout-label">fan out this task</span>
624
- </label>
625
- <p class="hint" id="queue-boundary"></p>
626
- <!-- The auto-drain switch. NOT a hidden timer: it is the persisted
627
- settings.js `__autoDrain` namespace, off in a default install, read
628
- by desktop/lib/auto.js on EVERY tick — so unchecking it stops the
629
- very next one. A drain spends a real model on a real checkout, so
630
- the switch that authorises one unattended is visible here and stays
631
- visible while it is armed (the label carries the state). The
632
- interval is the timer's cadence, clamped in settings.js; the select
633
- is disabled while the switch is off so a pick can never read as an
634
- armed timer. -->
635
- <label
636
- class="flow-toggle"
637
- for="queue-auto"
638
- title="Drain pending tasks on a timer, with no click. On by default (this switch only turns it off). Each drain runs a full tool loop on a real model in the task's own checkout — the timer only ever drains tasks already in this queue, and main.js refuses the tick if another host (the CLI, a systemd worker) holds the lock."
639
- >
640
- <input type="checkbox" id="queue-auto" />
641
- <span id="queue-auto-label">drain automatically</span>
642
- </label>
643
- <div class="api-key-row">
644
- <select id="queue-auto-interval" title="How often the timer checks the queue. It drains nothing while the queue is empty, and nothing at boot: the first tick is one interval after the switch is armed.">
645
- <option value="30000">every 30s</option>
646
- <option value="60000" selected>every minute</option>
647
- <option value="300000">every 5 minutes</option>
648
- <option value="900000">every 15 minutes</option>
989
+ <!-- Companion: the persona customization pane. This is the card the old
990
+ "Customizations" rail row pointed at, and the reason that row could
991
+ go — every customization surface is here in Settings. The pane is
992
+ BUILT FROM THE MANIFEST (renderer/avatar/pane.js): the controls are
993
+ generated from parts.js and persona.js's limits, so a new outfit is
994
+ a manifest entry, not a hunk of HTML. Mounted empty on purpose —
995
+ `#avatar-pane-mount` is filled by mountAvatarPane() in app.js, which
996
+ is also where main's stored persona arrives. -->
997
+ <section class="card" id="appearance-card">
998
+ <h2>Appearance</h2>
999
+ <!-- Text size (parity pass 2, Phase C). Antigravity treats this as a
1000
+ user preference — every size in its ramp is multiplied by
1001
+ --app-font-scale — and we had no equivalent at all, so 12px labels
1002
+ were a constant the only lever on which was zooming the whole
1003
+ window and shrinking everything else with them.
1004
+
1005
+ A <select> of five steps rather than a slider: the headroom is
1006
+ 0.85-1.3 and the useful choices are few, so snapping beats a
1007
+ control that spends its time between two readable sizes. -->
1008
+ <label class="field-row" for="font-scale-select">
1009
+ <span>text size</span>
1010
+ <select id="font-scale-select">
1011
+ <option value="0.85">small</option>
1012
+ <option value="0.92">compact</option>
1013
+ <option value="1" selected>default</option>
1014
+ <option value="1.12">large</option>
1015
+ <option value="1.3">largest</option>
649
1016
  </select>
650
- </div>
651
- <p class="hint" id="queue-auto-hint"></p>
652
- <ul class="sessions-list" id="queue-list"></ul>
653
- <p class="hint" id="queue-hint"></p>
654
- <div class="queue-upgrade" id="queue-upgrade"></div>
655
- </section>
656
-
657
- <section class="card" id="authorship-card" hidden>
658
- <!-- HIDDEN ON PURPOSE (user request): sealing is a background worker
659
- now. The authorship panel is still reachable — ⌘/Ctrl-K style menu
660
- paths and `window.aegisFingerprint` are unchanged — but this entry
661
- card no longer sits on the desktop and never prompts for a click.
662
- Kept in the document for the same reason as the queue card above:
663
- `fp-card-status` is painted by renderer/fingerprint.js and
664
- `fp-open` is the panel's own open seam, and an absent node is a
665
- silent no-op in one and a thrown paint in the other.
666
-
667
- φ(α) — the authorship key and the sealed session records.
668
- The heading is the click target for the full panel, exactly like
669
- the Memory card (a <button> may only hold phrasing content, so the
670
- button goes inside the h2, never around it).
671
-
672
- Everything on this card is driven by desktop/renderer/fingerprint.js
673
- over the IPC surface preload.js:171-183 already exposes; app.js only
674
- mounts it. Nothing here ever receives the key itself — the state
675
- line shows the derived 12-hex tag. -->
676
- <h2>
677
- <button
678
- type="button"
679
- class="card-title-btn"
680
- id="fp-open"
681
- title="Open the authorship panel — key, sealed records, and the Drive vault"
682
- >
683
- <span>Authorship</span>
684
- <span class="ctb-expand" aria-hidden="true">⤢</span>
685
- </button>
686
- </h2>
687
- <p class="hint" id="fp-card-status">checking…</p>
688
- <!-- One-click seal, the same action as the panel's. `-card` suffix
689
- because ids are document-global: two nodes sharing `fp-seal` would
690
- leave whichever the browser returned second permanently unbound. -->
691
- <button type="button" id="fp-seal-card" class="btn-block">Seal this session</button>
692
- <p class="hint" id="fp-card-hint">
693
- A sealed record proves which key wrote a session, and can carry a
694
- behaviour digest of the code it touched.
695
- </p>
696
- </section>
697
- </aside>
698
-
699
- <section class="chat">
700
- <!-- Inert template: cloned into #messages by renderWelcome() so the
701
- welcome markup lives in exactly one place and survives the
702
- innerHTML clears in newChat()/openSession(). -->
703
- <template id="welcome-template">
704
- <div class="chat-welcome" id="chat-welcome">
705
- <div class="chat-greeting-row">
706
- <!-- Decorative mark, drawn in CSS (desktop/renderer/style.css
707
- .chat-welcome .glyph) rather than this element's content —
708
- the shape is a mask-image, not text, see that rule for why.
709
- "Hello" already carries the row's meaning. -->
710
- <div class="glyph" aria-hidden="true"></div>
711
- <div class="title" id="chat-greeting">Hello</div>
712
- </div>
713
- <div class="sub" id="welcome-tagline">Your intent, AI automated.</div>
714
- <!-- One line, chosen from what this process actually knows about THIS
715
- install — never a menu of canned topics. The five generic pills
716
- that used to sit here ("Write code", "Explain a concept", …) were
717
- the same list on every machine for every user: a topic menu is
718
- not a welcome, it is a form to fill in. The line below is built
719
- by welcomePersonalize() in app.js from the same fact-gated rules
720
- as the sidebar's daily message (renderer/companion.js): an
721
- update that is downloaded and waiting, a missing key with the one
722
- concrete step, or memory entries this account already holds. When
723
- no fact is present it rotates one true tip, seeded by the day;
724
- when there is nothing to say at all it stays hidden rather than
725
- guessing. `hidden` is in the markup so a render that never runs
726
- shows nothing instead of an empty box. -->
727
- <p class="sub welcome-personal" id="welcome-personal" hidden></p>
728
- <!-- Why AEGIS Desktop, and the ONE reason to pay.
729
- Phase 3 of docs/upgrade-conversion-plan.md. This block used to
730
- carry four competing bullets (local, your key, does the work,
731
- open client) and priced none of them — a feature list where an
732
- offer belongs, whose only money line was "free tier to start,
733
- then upgrade", i.e. it pitched free in the offer slot. It is now
734
- the single paid promise plus the honesty line, with the two
735
- routes demoted to one primary CTA (#welcome-cloud) and one
736
- secondary link (#welcome-byok).
1017
+ </label>
1018
+ <p class="hint" id="font-scale-hint"></p>
1019
+ <!-- Accent skin. The reference's accent is `#007acc` (VS Code's); teal
1020
+ is ours, so this is an OPTION rather than a new default — picking
1021
+ `cobalt` matches the reference, `default` keeps the teal, and the
1022
+ named-skin form means the focus rings and hover mixes derive from
1023
+ whatever is picked instead of being left behind at the old colour. -->
1024
+ <label class="field-row" for="accent-select">
1025
+ <span>accent</span>
1026
+ <select id="accent-select">
1027
+ <option value="default" selected>teal (default)</option>
1028
+ <option value="cobalt">cobalt (Antigravity)</option>
1029
+ <option value="amber">amber</option>
1030
+ </select>
1031
+ </label>
1032
+ <p class="hint" id="accent-hint"></p>
1033
+ </section>
737
1034
 
738
- THE SENTENCE IS LOAD-BEARING. "The autonomous queue keeps
739
- running after you close the laptop." is the same promise every
740
- other paid surface repeats (app.js PAID_PROMISE), and the honesty
741
- line is the same one the free path states (app.js FREE_HONESTY);
742
- desktop/test/renderer-welcome.test.mjs fails if the three drift
743
- apart or if the four-bullet list comes back.
1035
+ <section class="card" id="persona-card">
1036
+ <h2>Companion</h2>
1037
+ <p class="hint">
1038
+ How the companion looks, sounds and addresses you. Changes here are
1039
+ previewed as you make them and saved when the status line says so.
1040
+ </p>
1041
+ <div id="avatar-pane-mount"></div>
1042
+ </section>
744
1043
 
745
- The genuinely-free facts — exec/write/edit against your real
746
- working tree, repos and keys on this disk, a local model server
747
- with no account, an open-source client — are NOT reasons to pay, so they
748
- moved into the free path copy below instead of standing in the
749
- offer.
1044
+ <!-- The rail's "Automations" button lands here, on a page of its own.
1045
+ This WAS hidden ("the queue is a background worker now, not a panel
1046
+ on the desktop"), reachable by no affordance — but the rail needed a
1047
+ real destination of its own, and the queue IS the automation: a
1048
+ prompt, queued instead of sent, that a background worker drains
1049
+ unattended.
1050
+
1051
+ It was then a card inside #settings-view, reached by scrolling, which
1052
+ made the row named "Automations" open Settings. It now has
1053
+ #automations-view to itself, a sibling of #settings-view and
1054
+ #chat-canvas, so the form is a page rather than something to hunt
1055
+ for three sections down. The card keeps its id and `.card` class:
1056
+ revealSidebarCard() resolves `closest('section.card')`, and
1057
+ desktop/test/auto.test.mjs pins the id in ELEMENT_IDS.
1058
+
1059
+ The worker itself runs from the main process (desktop/lib/auto.js):
1060
+ it drains pending tasks on its own cadence and seals a quiet
1061
+ session, both switched on by default (settings.js
1062
+ `__autoDrain`/`__autoMint`), so queueing a task and walking away is
1063
+ the normal path. Turning either off is a settings-store write, not
1064
+ a click on this card.
1065
+
1066
+ The list below is state, not a transcript: the worker's own output
1067
+ arrives on queue:progress and is shown as a status line and each
1068
+ task's outcome. Nothing from a drain enters the chat thread. -->
1069
+ </div><!-- /#settings-view -->
1070
+
1071
+ <!-- Automations is its OWN page in the canvas, not a card scrolled to
1072
+ inside Settings. The rail row named "Automations" was landing on a
1073
+ card buried three sections down a settings page, which read as the
1074
+ row having opened Settings rather than a destination of its own.
1075
+
1076
+ The card keeps its id and its class: `revealSidebarCard()` resolves
1077
+ `closest('section.card')`, and desktop/test/auto.test.mjs pins
1078
+ `queueCard: 'queue-card'` in ELEMENT_IDS as the thing the rail row
1079
+ reaches. What changed is the container it lives in — this view,
1080
+ toggled by showAutomationsView() exactly the way #settings-view is
1081
+ toggled by showSettingsView(). -->
1082
+ <div id="automations-view" hidden>
1083
+ <div class="settings-view-header">
1084
+ <button type="button" class="settings-back" id="automations-back">&larr; Back to conversations</button>
1085
+ </div>
1086
+ <section class="card" id="queue-card">
1087
+ <h2>Automations</h2>
1088
+ <p class="hint">
1089
+ A prompt, same as the composer's — but queued instead of sent. A
1090
+ background worker drains it unattended, in the checkout you name
1091
+ below, on its own cadence; nothing it does lands in this chat thread.
1092
+ </p>
750
1093
 
751
- Both controls are real: #welcome-byok switches the provider class
752
- to byok and drops the user on the Provider settings card,
753
- #welcome-cloud focuses the AEGIS key field in the Status card.
754
- The whole block is hidden once a key is configured or the user
755
- dismisses it (applyWelcomeConnect() in app.js) — a welcome panel
756
- that reappears on every New chat is an ad, not a welcome. -->
757
- <div class="welcome-connect" id="welcome-connect" hidden>
758
- <div class="wc-why">
759
- <div class="wc-why-title">Why AEGIS Desktop</div>
760
- <ul class="wc-why-list">
761
- <li class="wc-offer">
762
- <b>The autonomous queue keeps running after you close the
763
- laptop.</b> The cloud drain is what makes that true: the job
764
- survives app close and reboot, runs on pooled models with
765
- fan-out workers, and carries memory from one task to the next.
766
- </li>
767
- <li class="wc-honest">
768
- Everything on your machine is free, permanently. The cloud
769
- drain is what you pay for.
770
- </li>
771
- </ul>
772
- </div>
773
- <div class="wc-honest-line" id="welcome-cap">
774
- Free, permanently: everything on this machine — exec, write, edit,
775
- your own key, and the queue draining while this window is open, one
776
- worker per task. Pro is the cloud drain: it keeps running after you
777
- close the laptop, fans a task out across workers, and carries
778
- memory from one task to the next.
779
- </div>
780
- <!-- The ask, written as an example instead of described as a
781
- benefit — and the unlock, said out loud. "Autonomously" is the
782
- word the queue actually matches (queue.js / autonomous.js treat
783
- a task with the fan-out flag as the multi-worker one), so the
784
- user is shown the sentence to type, not a feature name to
785
- decode. #welcome-unlock names BOTH ways through the wall
786
- because there are two: a paid plan, or a funded Token Bank —
787
- operator-controlled (aegis1 `add_funds`), which is the lever
788
- the entitlement gate reads (`desktop/lib/local/entitlement.js`
789
- `entitled = pro || banked`). Saying only "Pro" would send a
790
- banked account to the wrong checkout. -->
791
- <div class="wc-honest-line wc-howto" id="welcome-unlock">
792
- <b>How to unlock the fan-out:</b> paying accounts get it — Pro, or
793
- any Token Bank balance. Free accounts still drain the queue, one
794
- worker per task, while this window is open.
795
- </div>
796
- <div class="wc-paths">
797
- <!-- Phase 4A: ONE primary CTA, and it is the paid promise. It goes
798
- through the Phase 1 helper's destination —
799
- /go/upgrade?s=desktop&c=welcome_cloud (aegis1 GO_TARGETS +
800
- SIGNUP_SOURCES own the utm_* mapping, so `s`/`c` are the wire
801
- names here and utm_* must NOT be appended). The href below is
802
- the same URL app.js's subscribeUrl('welcome_cloud') builds,
803
- and renderWelcome() re-points the anchor at that helper on
804
- every paint; desktop/test/renderer-welcome.test.mjs asserts the
805
- two agree, so this literal cannot drift into a dead link.
806
- The free paths are demoted underneath it: the key connect and
807
- BYOK are secondary links, not co-equal pitches. -->
808
- <a
809
- class="wc-path wc-path-primary"
810
- id="welcome-upgrade"
811
- href="https://aegiscloud.org/go/upgrade?s=desktop&amp;c=welcome_cloud"
812
- target="_blank"
813
- rel="noreferrer noopener"
814
- >
815
- <span class="wc-ic" aria-hidden="true">✦</span>
816
- <span class="wc-body">
817
- <span class="wc-name">Pro: the cloud drain</span>
818
- <span class="wc-desc">
819
- Write it in the message: <code>Do X autonomously</code> —
820
- Pro keeps draining that task after you close the laptop,
821
- and fans it across workers.
822
- </span>
823
- </span>
824
- <span class="wc-go">See what Pro covers →</span>
825
- </a>
826
- <div class="wc-secondary">
827
- <button type="button" class="wc-link" id="welcome-cloud">
828
- Connect AEGIS Cloud — I already have a key →
829
- </button>
830
- <span class="wc-note" id="welcome-cloud-note">
831
- Connect it here and the same queue runs on pooled models right
832
- away, free, while this window is open.
833
- </span>
834
- <button type="button" class="wc-link" id="welcome-byok">
835
- Bring your own key →
836
- </button>
837
- <span class="wc-note" id="welcome-byok-note"></span>
838
- <button type="button" class="wc-skip" id="welcome-dismiss">
839
- Don't show this again
840
- </button>
841
- </div>
842
- </div>
1094
+ <div class="auto-form">
1095
+ <label class="pt-field" for="queue-task">
1096
+ <span>task</span>
1097
+ <textarea
1098
+ id="queue-task"
1099
+ rows="3"
1100
+ placeholder="Queue a task to run unattended…"
1101
+ ></textarea>
1102
+ </label>
1103
+
1104
+ <!-- Which backend this task runs on — the same three classes
1105
+ (window.models.listClasses()) and the same per-class model list
1106
+ (listModels(cls)) the chat composer's #class-select/#model-select
1107
+ use. Aegis Cloud can leave the model on "server default"; byok and
1108
+ local tasks must name one (autonomous.js modelRefusal refuses a
1109
+ blank at the door for those two). -->
1110
+ <div class="pt-toolbar">
1111
+ <label class="pt-field" for="queue-class-select">
1112
+ <span>provider</span>
1113
+ <select id="queue-class-select" title="Which backend this task runs on."></select>
1114
+ </label>
1115
+ <label class="pt-field" for="queue-model-select">
1116
+ <span>model</span>
1117
+ <select id="queue-model-select" title="The model for the picked class."></select>
1118
+ </label>
843
1119
  </div>
844
- <div class="hints">
845
- Enter to send · Shift+Enter for a newline · the discovery lane adds
846
- two extra paths to every answer
1120
+ <label class="pt-field" for="queue-model-input" id="queue-model-field">
1121
+ <span>model tag</span>
1122
+ <input
1123
+ type="text"
1124
+ id="queue-model-input"
1125
+ placeholder="e.g. llama3.2:3b"
1126
+ autocomplete="off"
1127
+ spellcheck="false"
1128
+ hidden
1129
+ />
1130
+ </label>
1131
+ <p class="hint" id="queue-model-hint"></p>
1132
+
1133
+ <label class="pt-field" for="queue-cwd">
1134
+ <span>checkout</span>
1135
+ <input
1136
+ type="text"
1137
+ id="queue-cwd"
1138
+ placeholder="/path/to/repo"
1139
+ autocomplete="off"
1140
+ spellcheck="false"
1141
+ title="The directory the task's tool loop runs in. Must already exist."
1142
+ />
1143
+ </label>
1144
+
1145
+ <div class="auto-actions">
1146
+ <button type="button" id="queue-enqueue" class="ghost-btn">Queue task</button>
1147
+ <button type="button" id="queue-drain" class="ghost-btn">Run one</button>
1148
+ <button type="button" id="queue-proceed" class="ghost-btn">Drain all</button>
1149
+ <button type="button" id="queue-stop" class="ghost-btn danger" hidden>Stop</button>
847
1150
  </div>
848
1151
  </div>
849
- </template>
850
- <div class="messages" id="messages" aria-live="polite"></div>
851
- <!-- Whole-window drop veil. Shown by the dragenter/dragleave counter in
852
- app.js (body.is-dropping), never hit-testable itself: the drop still
853
- lands on the window handler. -->
854
- <div class="drop-veil" id="drop-veil" aria-hidden="true">
855
- <div class="drop-veil-label">Drop to attach — files, pictures, or a path</div>
856
- </div>
857
- <form class="composer" id="composer">
858
- <!-- Files dragged onto the window land here. The row is populated by
859
- renderAttachments() in app.js and is empty (and collapsed) until
860
- something is dropped — see ATTACH in app.js for why the drop
861
- target is the whole window but the chips live in the composer. -->
862
- <div class="attach-row" id="attach-row" hidden></div>
863
- <!-- Capability warning for staged attachments: a picture dropped on a
864
- destination that cannot receive pixels (PRO is a child process fed
865
- text) says so here BEFORE the turn, instead of the file silently
866
- arriving as a path. Populated by renderAttachments(). -->
867
- <div class="attach-note" id="attach-note" hidden></div>
868
- <textarea
869
- id="prompt"
870
- rows="2"
871
- placeholder="Message AEGIS… (Enter to send, Shift+Enter for a newline, or drop a file)"
872
- ></textarea>
873
- <!-- The composer's control row: every switch that changes what this
874
- send will do lives INSIDE the composer box, on one line under the
875
- input, so the whole thing reads as one object with one focus ring.
876
- Before this, the discovery toggle sat in a side rail and the tool
877
- mode sat in a strip underneath the form — three surfaces around
878
- one text field, and the mode chip (which changes whether tools run
879
- unattended) was the furthest from the thing it governs. -->
880
- <div class="composer-row">
881
- <!-- Which provider answers the next send. This is the one place in
882
- the window where that fact is shown: messages used to carry an
883
- author line (`You` / `AEGIS`), and `AEGIS` was wrong on every
884
- byok and local turn — the reply came from Anthropic or from a
885
- localhost daemon. Painted by provider-mark.js from the picker
886
- selection via updateBudgetControls(), so it cannot disagree
887
- with the model actually selected above. -->
888
- <span class="provider-mark-slot" id="provider-mark"></span>
1152
+
1153
+ <!-- Past this line a control can spend money with nobody watching. -->
1154
+ <h3 class="auto-group-title">Unattended</h3>
1155
+ <div class="auto-toggles">
889
1156
  <label
890
1157
  class="flow-toggle"
891
- for="explore-toggle"
892
- title="Optional, off by default. After every answer, send the AI down two extra paths — an alternative angle and an unexpected discovery — shown as a horizontal discovery lane. This costs two extra model calls per turn (roughly 3× the tokens of a plain reply)."
1158
+ for="queue-commit"
1159
+ title="Commit the paths this task's own tool calls wrote, once it finishes. Anything else dirty in that checkout is left alone."
893
1160
  >
894
- <!-- Unchecked in the markup on purpose: the lane bills two extra
895
- model calls per turn, so it is opt-in. app.js only ticks this
896
- when the user has explicitly saved 'on' (aegis.explore). -->
897
- <input type="checkbox" id="explore-toggle" />
898
- <span>discovery lane</span>
1161
+ <input type="checkbox" id="queue-commit" />
1162
+ <span>commit what the task changes</span>
899
1163
  </label>
900
- <!-- Mode chip: the same switch as Settings → Tool approvals, hoisted
901
- next to the input so the current mode is readable while typing
902
- and one click from the other. Painted from
903
- renderConfirmMode()/renderAutoModeChip() in app.js, so the two
904
- cannot disagree. type="button" so it never submits the form. -->
905
- <button
906
- type="button"
907
- id="auto-mode-toggle"
908
- class="mode-chip"
909
- aria-pressed="false"
910
- title="Auto mode lets the agent run exec, writeFile and editFile without asking. Click to switch, or set it in Settings → Tool approvals."
1164
+ <!-- Fan-out (Phase 4 of docs/upgrade-conversion-plan.md). The fan-out
1165
+ is the Pro multiplier: pool_brain spawns `workers` reasoning
1166
+ workers plus a synthesis pass and re-sends the task context to
1167
+ each, where the identical task single-pass is one turn. Main
1168
+ enforces the ceiling — free gets one worker per task — and refuses
1169
+ a request it is not entitled to, naming what Pro adds (the cloud
1170
+ drain that survives app close) rather than only the limit. app.js
1171
+ paints this control from the entitlement main sends, and disables
1172
+ it for free with the reason ON SCREEN (#queue-hint) BEFORE any
1173
+ refusal. -->
1174
+ <label
1175
+ class="flow-toggle"
1176
+ for="queue-fanout"
1177
+ title="Fan this task out across pooled reasoning workers (roughly workers+1 reasoning calls). Pro only — the free tier runs one worker per task."
911
1178
  >
912
- <span class="mode-dot" aria-hidden="true">●</span>
913
- <span id="auto-mode-label">ask before tools</span>
914
- </button>
915
- <span class="hint" id="auto-mode-hint"></span>
916
- <span class="composer-spacer"></span>
917
- <button type="submit" id="send">Send</button>
1179
+ <input type="checkbox" id="queue-fanout" />
1180
+ <span id="queue-fanout-label">fan out this task</span>
1181
+ </label>
918
1182
  </div>
919
- </form>
920
- </section>
1183
+ <p class="hint" id="queue-boundary"></p>
1184
+
1185
+ <!-- The auto-drain switch. NOT a hidden timer: it is the persisted
1186
+ settings.js `__autoDrain` namespace, off in a default install, read
1187
+ by desktop/lib/auto.js on EVERY tick — so unchecking it stops the
1188
+ very next one. A drain spends a real model on a real checkout, so
1189
+ the switch that authorises one unattended is visible here and stays
1190
+ visible while it is armed (the label carries the state). The
1191
+ interval is the timer's cadence, clamped in settings.js; the select
1192
+ is disabled while the switch is off so a pick can never read as an
1193
+ armed timer. -->
1194
+ <div class="auto-cadence">
1195
+ <label
1196
+ class="flow-toggle"
1197
+ for="queue-auto"
1198
+ title="Drain pending tasks on a timer, with no click. On by default (this switch only turns it off). Each drain runs a full tool loop on a real model in the task's own checkout — the timer only ever drains tasks already in this queue, and main.js refuses the tick if another host (the CLI, a systemd worker) holds the lock."
1199
+ >
1200
+ <input type="checkbox" id="queue-auto" />
1201
+ <span id="queue-auto-label">drain automatically</span>
1202
+ </label>
1203
+ <label class="pt-field auto-cadence-interval" for="queue-auto-interval">
1204
+ <span>cadence</span>
1205
+ <select id="queue-auto-interval" title="How often the timer checks the queue. It drains nothing while the queue is empty, and nothing at boot: the first tick is one interval after the switch is armed.">
1206
+ <option value="30000">every 30s</option>
1207
+ <option value="60000" selected>every minute</option>
1208
+ <option value="300000">every 5 minutes</option>
1209
+ <option value="900000">every 15 minutes</option>
1210
+ </select>
1211
+ </label>
1212
+ </div>
1213
+ <p class="hint" id="queue-auto-hint"></p>
1214
+
1215
+ <h3 class="auto-group-title">Queued</h3>
1216
+ <!-- One card per task (.queue-list/.queue-task), not the Sessions
1217
+ library's compact .sessions-list rows: a queued task has a prompt
1218
+ to read in full, a status, a shape and a cwd, and nothing to open. -->
1219
+ <ul class="queue-list" id="queue-list"></ul>
1220
+ <p class="hint" id="queue-hint"></p>
1221
+ <div class="queue-upgrade" id="queue-upgrade"></div>
1222
+ </section>
1223
+ </div><!-- /#automations-view -->
921
1224
  </main>
922
1225
 
1226
+ <!-- The ⌘P command palette.
1227
+
1228
+ It is a front-end for handlers that already exist (see commands.js), not
1229
+ a second implementation of them: every row dispatches to the same
1230
+ function its toolbar button or menu item calls. Sits outside <main> so
1231
+ it overlays the whole window including the topbar, matching the other
1232
+ sheets (.memory-overlay).
1233
+
1234
+ WHY ⌘P AND NOT ⌘K. ⌘K is already session search (View > Search), which
1235
+ users have muscle memory for. Taking it for a palette would either
1236
+ break that chord or make the palette secretly mean "search", and this
1237
+ palette is a superset of reach, not a rename of one destination.
1238
+
1239
+ The list is built by app.js from commands.js, filtered through
1240
+ palette-filter.js. `role="listbox"` with `aria-activedescendant` keeps
1241
+ the highlight announced without moving DOM focus off the input, so
1242
+ typing never loses the caret. -->
1243
+ <div class="palette-overlay" id="palette-overlay" hidden>
1244
+ <div class="memory-backdrop" id="palette-backdrop"></div>
1245
+ <div
1246
+ class="palette-panel"
1247
+ role="dialog"
1248
+ aria-modal="true"
1249
+ aria-labelledby="palette-label"
1250
+ >
1251
+ <label class="palette-field" for="palette-input">
1252
+ <span class="palette-label" id="palette-label">Command palette</span>
1253
+ <input
1254
+ type="text"
1255
+ id="palette-input"
1256
+ placeholder="Type a command…"
1257
+ autocomplete="off"
1258
+ role="combobox"
1259
+ aria-expanded="true"
1260
+ aria-controls="palette-list"
1261
+ aria-autocomplete="list"
1262
+ />
1263
+ </label>
1264
+ <ul
1265
+ class="palette-list"
1266
+ id="palette-list"
1267
+ role="listbox"
1268
+ aria-labelledby="palette-label"
1269
+ ></ul>
1270
+ <!-- Printed by app.js when nothing matches, and hidden otherwise: an
1271
+ empty list with no explanation reads as a broken palette. -->
1272
+ <p class="palette-empty" id="palette-empty" hidden>No matching command.</p>
1273
+ <footer class="palette-foot">
1274
+ <span class="palette-key"><kbd>&uarr;</kbd><kbd>&darr;</kbd> navigate</span>
1275
+ <span class="palette-key"><kbd>&crarr;</kbd> run</span>
1276
+ <span class="palette-key"><kbd>esc</kbd> close</span>
1277
+ </footer>
1278
+ </div>
1279
+ </div>
1280
+
923
1281
  <!-- Memory inspector: full-viewport translucent overlay opened from the
924
1282
  sidebar Memory heading. Markup is static and populated by
925
1283
  renderMemoryOverlay() — this renderer runs under CSP `script-src 'self'`,
@@ -971,18 +1329,27 @@
971
1329
  </div>
972
1330
  </div>
973
1331
 
974
- <!-- Session search (View > Search sessions…, Cmd/Ctrl+K).
975
-
976
- This sheet is what that menu item now opens. It used to open the memory
977
- inspector below — the label, the accelerator and the sheet all named
978
- different things, and nothing in the app searched conversations at all.
979
- Static markup populated by renderSessionSearch() (app.js); no inline
980
- handlers, because this renderer runs under `script-src 'self'`.
981
-
982
- The ranking is main.js's `searchSessions` channel over
983
- client/session-search.js — the SAME module the terminal's /resume picker
984
- filters with, so the two faces cannot disagree about which conversation
985
- matches. -->
1332
+ <!-- Search (View > Search, Cmd/Ctrl+K; Cmd/Ctrl+Shift+K opens it scoped to
1333
+ memory). ONE sheet over BOTH stores.
1334
+
1335
+ This surface has been wrong twice, in opposite directions. It once said
1336
+ "Search…" and opened the memory inspector, so nothing in the app searched
1337
+ conversations. It then searched sessions only, with memory on a parallel
1338
+ sheet and a second accelerator — one verb, two surfaces. Now one query box
1339
+ answers from both, drawn as two SECTIONS (Sessions, Memory) with a single
1340
+ flat cursor order across them: Up/Down walks through both without
1341
+ stopping at a header.
1342
+
1343
+ Sections, not one ranked column, because the two rankings are not
1344
+ comparable — client/session-search.js scores titles/cwd/messages, while
1345
+ memory ranks by SQLite FTS5 `rank` and carries a `scope` a session hit
1346
+ has no equivalent of. Merging them into one score would invent a
1347
+ cross-type weighting nothing can validate. Each section ranks internally,
1348
+ so relevance ordering still holds; what goes away is the uncalibrated
1349
+ comparison between the two.
1350
+
1351
+ Static markup populated by renderSessionResults() (app.js); no inline
1352
+ handlers, because this renderer runs under `script-src 'self'`. -->
986
1353
  <div class="memory-overlay session-overlay" id="session-overlay" hidden>
987
1354
  <div class="memory-backdrop" id="session-backdrop"></div>
988
1355
  <div
@@ -992,7 +1359,7 @@
992
1359
  aria-labelledby="session-panel-title"
993
1360
  >
994
1361
  <header class="memory-panel-head">
995
- <h2 id="session-panel-title">Sessions</h2>
1362
+ <h2 id="session-panel-title">Search</h2>
996
1363
  <span class="memory-count" id="session-count"></span>
997
1364
  <div class="spacer"></div>
998
1365
  <button type="button" id="session-close" class="ghost-btn" title="Close (Esc)">
@@ -1004,7 +1371,7 @@
1004
1371
  <input
1005
1372
  type="text"
1006
1373
  id="session-query"
1007
- placeholder="Search sessions by title, path or anything you typed…"
1374
+ placeholder="Search sessions and memory…"
1008
1375
  autocomplete="off"
1009
1376
  aria-controls="session-list"
1010
1377
  />
@@ -1099,6 +1466,34 @@
1099
1466
  </div>
1100
1467
  </div>
1101
1468
 
1469
+ <!-- Keyboard shortcuts — the sheet the ⌘P palette's "Keyboard shortcuts" row
1470
+ opens. The rows are NOT written here: renderer/shortcuts.js holds the
1471
+ table and app.js paints it, because a list copied into markup drifts from
1472
+ main.js's accelerators the first time one of them changes. Not to be
1473
+ confused with #keys-overlay above, which is about KEYS (the AEGIS key and
1474
+ the BYOK key) — this one is about KEYBINDINGS. The structure is the memory
1475
+ sheet's on purpose: one translucent layer, one Escape policy. -->
1476
+ <div class="memory-overlay shortcuts-overlay" id="shortcuts-overlay" hidden>
1477
+ <div class="memory-backdrop" id="shortcuts-backdrop"></div>
1478
+ <div
1479
+ class="memory-panel"
1480
+ role="dialog"
1481
+ aria-modal="true"
1482
+ aria-labelledby="shortcuts-panel-title"
1483
+ >
1484
+ <header class="memory-panel-head">
1485
+ <h2 id="shortcuts-panel-title">Keyboard shortcuts</h2>
1486
+ <span class="memory-count" id="shortcuts-count"></span>
1487
+ <div class="spacer"></div>
1488
+ <button type="button" id="shortcuts-close" class="ghost-btn" title="Close (Esc)">
1489
+ Close
1490
+ </button>
1491
+ </header>
1492
+
1493
+ <div class="memory-scroll" id="shortcuts-body"></div>
1494
+ </div>
1495
+ </div>
1496
+
1102
1497
  <!-- φ(α) panel. Same sheet as the memory inspector (the classes are shared on
1103
1498
  purpose: one translucent layer, one Escape policy). Every control is
1104
1499
  bound in fingerprint.js, which is also where these ids are declared — a
@@ -1250,7 +1645,7 @@
1250
1645
  <!-- The two-key pop-up. Same sheet as the memory inspector and the φ(α)
1251
1646
  panel (the classes are shared on purpose: one translucent layer, one
1252
1647
  Escape policy), and it exists because the app and the CLI are one engine
1253
- over one store: AEGIS Desktop reads the very `aegis:<...>` account key
1648
+ over one store: aegis one reads the very `aegis:<...>` account key
1254
1649
  and the very `byok:<provider>` rows `aegiscode` on the command line
1255
1650
  writes, so BOTH keys are what make BOTH surfaces run.
1256
1651
 
@@ -1279,7 +1674,7 @@
1279
1674
  </header>
1280
1675
 
1281
1676
  <p class="hint" id="keys-lead">
1282
- AEGIS Desktop and the <code>aegiscode</code> CLI are the same engine over
1677
+ aegis one and the <code>aegiscode</code> CLI are the same engine over
1283
1678
  the same store on this disk. Two keys turn on both: the AEGIS account key
1284
1679
  (your bill, and the pooled models) and your own provider key (BYOK). Add
1285
1680
  both and either surface runs — until then, a turn on the missing one is
@@ -1333,6 +1728,40 @@
1333
1728
  </div>
1334
1729
  </div>
1335
1730
 
1731
+ <!-- First-run sign-in gate, styled after the Antigravity/Gemini desktop
1732
+ apps' own "Welcome to …" screen: full-bleed, one glyph, one decision.
1733
+ Shown once per profile (app.js: ONBOARDING_SEEN_KEY) — dismissing it
1734
+ by any path (Google, API key, Skip) is permanent. It does not gate
1735
+ anything functional: auto-provision still mints an anonymous device
1736
+ key in the background regardless of what happens here. -->
1737
+ <div class="onboard-overlay" id="onboard-overlay" hidden>
1738
+ <div class="onboard-card">
1739
+ <div class="onboard-glyph" aria-hidden="true">Æ</div>
1740
+ <h1 class="onboard-title">Welcome to aegis one</h1>
1741
+ <p class="onboard-sub">
1742
+ Sign in to sync memory, sessions and billing across every machine
1743
+ you run AEGIS on.
1744
+ </p>
1745
+
1746
+ <button type="button" class="onboard-btn onboard-btn-google" id="onboard-google">
1747
+ <svg class="onboard-g-icon" viewBox="0 0 48 48" width="18" height="18" aria-hidden="true">
1748
+ <path fill="#FFC107" d="M43.6 20.5H42V20H24v8h11.3C33.7 32.9 29.3 36 24 36c-6.6 0-12-5.4-12-12s5.4-12 12-12c3.1 0 5.8 1.1 8 3l5.7-5.7C34.6 6.5 29.6 4 24 4 12.9 4 4 12.9 4 24s8.9 20 20 20 20-8.9 20-20c0-1.3-.1-2.7-.4-3.5z"/>
1749
+ <path fill="#FF3D00" d="M6.3 14.7l6.6 4.8C14.6 16 19 13 24 13c3.1 0 5.8 1.1 8 3l5.7-5.7C34.6 6.5 29.6 4 24 4 16.3 4 9.6 8.3 6.3 14.7z"/>
1750
+ <path fill="#4CAF50" d="M24 44c5.2 0 9.9-2 13.4-5.2l-6.2-5.2C29.2 35.1 26.7 36 24 36c-5.3 0-9.7-3.1-11.3-7.6l-6.5 5C9.5 39.6 16.2 44 24 44z"/>
1751
+ <path fill="#1976D2" d="M43.6 20.5H42V20H24v8h11.3c-.8 2.3-2.3 4.3-4.1 5.6l6.2 5.2C40.9 36.6 44 30.9 44 24c0-1.3-.1-2.7-.4-3.5z"/>
1752
+ </svg>
1753
+ <span>Continue with Google</span>
1754
+ </button>
1755
+ <button type="button" class="onboard-btn onboard-btn-key" id="onboard-apikey">
1756
+ Continue with an API key
1757
+ </button>
1758
+
1759
+ <p class="onboard-status" id="onboard-status" role="status"></p>
1760
+
1761
+ <button type="button" class="onboard-skip" id="onboard-skip">Skip for now</button>
1762
+ </div>
1763
+ </div>
1764
+
1336
1765
  <script src="providers.js"></script>
1337
1766
  <!-- Must load before provider-toolbar.js: that script reads
1338
1767
  window.aegisProviderMark into a top-level `const` at parse time (the
@@ -1345,6 +1774,7 @@
1345
1774
  <script src="provider-mark.js"></script>
1346
1775
  <script src="provider-toolbar.js"></script>
1347
1776
  <script src="companion.js"></script>
1777
+ <script src="welcome-rows.js"></script>
1348
1778
  <script src="budget.js"></script>
1349
1779
  <script src="usage.js"></script>
1350
1780
  <script src="stream-policy.js"></script>
@@ -1352,6 +1782,7 @@
1352
1782
  <script src="diff.js"></script>
1353
1783
  <script src="diffview.js"></script>
1354
1784
  <script src="filepreview.js"></script>
1785
+ <script src="library.js"></script>
1355
1786
  <script src="vendor/marked.umd.js"></script>
1356
1787
  <script src="vendor/purify.min.js"></script>
1357
1788
  <script src="vendor/aegis-highlight.js"></script>
@@ -1360,6 +1791,32 @@
1360
1791
  and composes its overlay into the Escape policy, and the orphan check in
1361
1792
  test/renderer-wiring.test.mjs fails if this tag goes missing. -->
1362
1793
  <script src="fingerprint.js"></script>
1794
+ <!-- The avatar's shared modules, in dependency order: the two `lib/` halves
1795
+ are the SAME files the Node tests require(), now publishing a global for
1796
+ this sandboxed window (see the tail of each). parts.js reads both,
1797
+ pane.js reads parts, and app.js mounts the pane. -->
1798
+ <script src="../lib/avatar/persona.js"></script>
1799
+ <script src="../lib/avatar/events.js"></script>
1800
+ <script src="avatar/parts.js"></script>
1801
+ <script src="avatar/pane.js"></script>
1802
+ <!-- The ⌘P palette's two pure halves, before app.js which consumes them:
1803
+ commands.js is the catalog (data only), palette-filter.js is the ranking.
1804
+ Both publish a global and both are require()d by the Node tests, so the
1805
+ rows the test ranks are the rows the palette shows. -->
1806
+ <script src="commands.js"></script>
1807
+ <script src="palette-filter.js"></script>
1808
+ <!-- ⌘F's matching half. Pure positions, no DOM — see the module header for
1809
+ why the transcript is highlighted through ranges rather than by
1810
+ rewriting rendered markdown. -->
1811
+ <script src="shortcuts.js"></script>
1812
+ <script src="find-in-conversation.js"></script>
1813
+ <!-- The `/` and `@` menus' pure half: trigger detection and one ranking rule,
1814
+ shared with the palette so the two menus cannot disagree. -->
1815
+ <script src="composer-triggers.js"></script>
1816
+ <!-- View > Go Back / Go Forward's stack. Pure: entries are `{kind, id}`, never
1817
+ DOM nodes, so the Node test drives the whole thing without a window. Loaded
1818
+ ahead of app.js because app.js calls createHistory() at module scope. -->
1819
+ <script src="nav-history.js"></script>
1363
1820
  <script src="app.js"></script>
1364
1821
  </body>
1365
1822
  </html>