aegisone 1.0.43 → 1.0.45

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 (52) hide show
  1. package/README.md +2 -2
  2. package/package.json +1 -1
  3. package/src/doctor.js +1 -1
  4. package/vendor/cli/README.md +5 -5
  5. package/vendor/cli/package.json +2 -2
  6. package/vendor/cli/src/deps.js +1 -1
  7. package/vendor/cli/vendor/desktop/lib/local/engine.js +1 -1
  8. package/vendor/cli/vendor/desktop/lib/local/integrity.js +1 -1
  9. package/vendor/cli/vendor/desktop/lib/local/prompt.js +1 -1
  10. package/vendor/cli/vendor/desktop/lib/local/tools.js +1 -1
  11. package/vendor/cli/vendor/desktop/lib/settings.js +1 -1
  12. package/vendor/cli/vendor/desktop/main.js +669 -22
  13. package/vendor/cli/vendor/mcp/server.js +1 -1
  14. package/vendor/desktop/README.md +3 -3
  15. package/vendor/desktop/bin/aegis.js +1 -1
  16. package/vendor/desktop/lib/avatar/events.js +1 -1
  17. package/vendor/desktop/lib/avatar/persona.js +1 -1
  18. package/vendor/desktop/lib/avatar/store.js +1 -1
  19. package/vendor/desktop/lib/local/cli-face.js +3 -0
  20. package/vendor/desktop/lib/local/engine.js +1 -1
  21. package/vendor/desktop/lib/local/integrity.js +1 -1
  22. package/vendor/desktop/lib/local/prompt.js +1 -1
  23. package/vendor/desktop/lib/local/tools.js +1 -1
  24. package/vendor/desktop/lib/settings.js +1 -1
  25. package/vendor/desktop/main.js +669 -22
  26. package/vendor/desktop/package.json +7 -4
  27. package/vendor/desktop/preload.js +1 -1
  28. package/vendor/desktop/renderer/app.js +3 -3
  29. package/vendor/desktop/renderer/avatar/pane.js +1 -1
  30. package/vendor/desktop/renderer/avatar/parts.js +1 -1
  31. package/vendor/desktop/renderer/commands.js +3 -0
  32. package/vendor/desktop/renderer/composer-triggers.js +3 -0
  33. package/vendor/desktop/renderer/find-in-conversation.js +3 -0
  34. package/vendor/desktop/renderer/fonts/fonts.css +42 -0
  35. package/vendor/desktop/renderer/fonts/ubuntu-vf-italic.woff2 +0 -0
  36. package/vendor/desktop/renderer/fonts/ubuntu-vf.woff2 +0 -0
  37. package/vendor/desktop/renderer/index.html +924 -489
  38. package/vendor/desktop/renderer/nav-history.js +3 -0
  39. package/vendor/desktop/renderer/palette-filter.js +3 -0
  40. package/vendor/desktop/renderer/shortcuts.js +3 -0
  41. package/vendor/desktop/renderer/style.css +2482 -402
  42. package/vendor/desktop/renderer/transcript-view.js +1 -1
  43. package/vendor/desktop/renderer/welcome-rows.js +3 -0
  44. package/vendor/desktop/vendor/faces/cli/README.md +5 -5
  45. package/vendor/desktop/vendor/faces/cli/package.json +2 -2
  46. package/vendor/desktop/vendor/faces/cli/src/deps.js +1 -1
  47. package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/local/engine.js +1 -1
  48. package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/local/integrity.js +1 -1
  49. package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/local/prompt.js +1 -1
  50. package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/settings.js +1 -1
  51. package/vendor/desktop/vendor/faces/cli/vendor/desktop/main.js +3 -3
  52. package/vendor/desktop/vendor/faces/cli/vendor/mcp/server.js +1 -1
@@ -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>
@@ -338,6 +872,12 @@
338
872
  <h2>Today</h2>
339
873
  <p class="companion-line" id="companion-text"></p>
340
874
  <div class="companion-row">
875
+ <!-- Only shown when companionActionTarget() has a real destination for
876
+ this message's id (app.js renderCompanion) — an 'action' message
877
+ that names a place gets a one-click way there, not just the name
878
+ of the place. Hidden in markup so the card never reflows on first
879
+ paint, same reason companion-dismiss is always present. -->
880
+ <button type="button" id="companion-go" class="ghost-btn" hidden></button>
341
881
  <button type="button" id="companion-dismiss" class="ghost-btn">Got it</button>
342
882
  </div>
343
883
  </section>
@@ -347,7 +887,7 @@
347
887
  <label
348
888
  class="flow-toggle"
349
889
  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."
890
+ 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
891
  >
352
892
  <input type="checkbox" id="quick-launcher-enabled" />
353
893
  <span>enable global shortcut</span>
@@ -452,492 +992,298 @@
452
992
  </div>
453
993
  </section>
454
994
 
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
- <!-- The library filter. It narrows the rows already loaded in this
490
- pane; View > Search sessions… (Cmd/Ctrl+K) is the ranked search
491
- over the WHOLE store, including threads this list has not loaded.
492
- Two different questions, so two different boxes — see
493
- renderer/library.js for why the pane's one is local. -->
494
- <div class="library-bar">
495
- <input
496
- type="search"
497
- id="sessions-filter"
498
- class="library-filter"
499
- placeholder="Filter conversations…"
500
- autocomplete="off"
501
- spellcheck="false"
502
- aria-controls="sessions-list"
503
- aria-label="Filter conversations"
504
- />
505
- <span class="library-count" id="sessions-count"></span>
506
- </div>
507
- <ul class="sessions-list library-list" id="sessions-list"></ul>
508
- <p class="hint" id="sessions-hint"></p>
509
- <p class="hint" id="sync-status"></p>
510
- </section>
511
-
512
- <section class="card" id="pane-memory" role="tabpanel" aria-labelledby="tab-memory" hidden>
513
- <!-- The heading is the click target for the full memory inspector.
514
- The button lives *inside* the h2 (not the reverse) because a
515
- <button> may only contain phrasing content, and <h2> is not. -->
516
- <h2>
517
- <button
518
- type="button"
519
- class="card-title-btn"
520
- id="memory-open"
521
- title="Open the memory inspector — every entry with its source and tags"
522
- >
523
- <span>Memory</span>
524
- <span class="ctb-expand" aria-hidden="true">⤢</span>
525
- </button>
526
- </h2>
527
- <!-- The box below the heading is the *quick* surface: search, save,
528
- import. It is omitted (renderMemoryResults) when memory holds
529
- nothing above IMPORTANCE_FLOOR, because a panel that lists four
530
- low-salience scraps is noise in a column the user reads every
531
- turn. The heading's button still opens the full inspector, so
532
- nothing becomes unreachable when the box is gone. -->
533
- <p class="hint" id="memory-quiet" hidden>
534
- Nothing above importance <span id="memory-quiet-floor">5</span> yet.
535
- </p>
536
- <div id="memory-box">
537
- <form id="memory-search-form" class="memory-search">
538
- <input
539
- type="text"
540
- id="memory-query"
541
- placeholder="Search memory…"
542
- autocomplete="off"
543
- />
544
- <button type="submit" id="memory-search-btn">Search</button>
545
- </form>
546
- <ul class="memory-results" id="memory-results"></ul>
547
- <textarea
548
- id="memory-entry"
549
- rows="2"
550
- placeholder="Save a note to memory…"
551
- ></textarea>
552
- <button type="button" id="memory-save-btn" class="btn-block">Save to memory</button>
553
- <button type="button" id="memory-import-btn" class="btn-block">
554
- Import from other AI tools…
555
- </button>
556
- </div>
557
- <p class="hint" id="memory-hint"></p>
558
- </section>
559
-
560
- <section class="card" id="queue-card" hidden>
561
- <!-- HIDDEN ON PURPOSE (user request): the queue is a background worker
562
- now, not a panel on the desktop. The card stays in the document
563
- ONLY so the ids app.js and its tests already resolve keep existing —
564
- `renderQueueState()`, `loadAutoState()` and the queue model pickers
565
- paint into these nodes, and an absent node turns a paint into a
566
- throw. Nothing here is visible, focusable or tab-reachable while
567
- `hidden` is set, and no affordance offers to un-hide it.
568
-
569
- The worker itself runs from the main process (desktop/lib/auto.js):
570
- it drains pending tasks on its own cadence and seals a quiet
571
- session, both switched on by default (settings.js
572
- `__autoDrain`/`__autoMint`), so queueing a task and walking away is
573
- the normal path. Turning either off is a settings-store write, not
574
- a click on this card.
575
-
576
- The list below is state, not a transcript: the worker's own output
577
- arrives on queue:progress and is shown as a status line and each
578
- task's outcome. Nothing from a drain enters the chat thread. -->
579
- <h2>Autonomous queue</h2>
580
- <textarea
581
- id="queue-task"
582
- rows="2"
583
- placeholder="Queue a task to run unattended…"
584
- ></textarea>
585
- <!-- Which backend this task runs on — the same three classes
586
- (window.models.listClasses()) and the same per-class model list
587
- (listModels(cls)) the chat composer's #class-select/#model-select
588
- use. Aegis Cloud can leave the model on "server default"; byok and
589
- local tasks must name one (autonomous.js modelRefusal refuses a
590
- blank at the door for those two). -->
591
- <div class="api-key-row">
592
- <select id="queue-class-select" title="Which backend this task runs on."></select>
593
- <select id="queue-model-select" title="The model for the picked class."></select>
594
- </div>
595
- <input
596
- type="text"
597
- id="queue-model-input"
598
- placeholder="model tag — e.g. llama3.2:3b"
599
- autocomplete="off"
600
- hidden
601
- />
602
- <p class="hint" id="queue-model-hint"></p>
603
- <div class="api-key-row">
604
- <input
605
- type="text"
606
- id="queue-cwd"
607
- placeholder="/path/to/repo"
608
- autocomplete="off"
609
- title="The directory the task's tool loop runs in. Must already exist."
610
- />
611
- <button type="button" id="queue-enqueue" class="ghost-btn">Queue</button>
612
- </div>
613
- <label
614
- class="flow-toggle"
615
- for="queue-commit"
616
- title="Commit the paths this task's own tool calls wrote, once it finishes. Anything else dirty in that checkout is left alone."
617
- >
618
- <input type="checkbox" id="queue-commit" />
619
- <span>commit what the task changes</span>
620
- </label>
621
- <div class="api-key-row">
622
- <button type="button" id="queue-drain" class="ghost-btn">Run one</button>
623
- <button type="button" id="queue-proceed" class="ghost-btn">Drain all</button>
624
- <button type="button" id="queue-stop" class="ghost-btn" hidden>Stop</button>
625
- </div>
626
- <!-- Fan-out (Phase 4 of docs/upgrade-conversion-plan.md). The fan-out is
627
- the Pro multiplier: pool_brain spawns `workers` reasoning workers
628
- plus a synthesis pass and re-sends the task context to each, where
629
- the identical task single-pass is one turn. Main enforces the
630
- ceiling — free gets one worker per task — and refuses a request it
631
- is not entitled to, naming what Pro adds (the cloud drain that
632
- survives app close) rather than only the limit. app.js paints this
633
- control from the entitlement main sends, and disables it for free
634
- with the reason ON SCREEN (#queue-hint) BEFORE any refusal. -->
635
- <label
636
- class="flow-toggle"
637
- for="queue-fanout"
638
- title="Fan this task out across pooled reasoning workers (roughly workers+1 reasoning calls). Pro only — the free tier runs one worker per task."
639
- >
640
- <input type="checkbox" id="queue-fanout" />
641
- <span id="queue-fanout-label">fan out this task</span>
642
- </label>
643
- <p class="hint" id="queue-boundary"></p>
644
- <!-- The auto-drain switch. NOT a hidden timer: it is the persisted
645
- settings.js `__autoDrain` namespace, off in a default install, read
646
- by desktop/lib/auto.js on EVERY tick — so unchecking it stops the
647
- very next one. A drain spends a real model on a real checkout, so
648
- the switch that authorises one unattended is visible here and stays
649
- visible while it is armed (the label carries the state). The
650
- interval is the timer's cadence, clamped in settings.js; the select
651
- is disabled while the switch is off so a pick can never read as an
652
- armed timer. -->
653
- <label
654
- class="flow-toggle"
655
- for="queue-auto"
656
- 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."
657
- >
658
- <input type="checkbox" id="queue-auto" />
659
- <span id="queue-auto-label">drain automatically</span>
660
- </label>
661
- <div class="api-key-row">
662
- <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.">
663
- <option value="30000">every 30s</option>
664
- <option value="60000" selected>every minute</option>
665
- <option value="300000">every 5 minutes</option>
666
- <option value="900000">every 15 minutes</option>
667
- </select>
668
- </div>
669
- <p class="hint" id="queue-auto-hint"></p>
670
- <ul class="sessions-list" id="queue-list"></ul>
671
- <p class="hint" id="queue-hint"></p>
672
- <div class="queue-upgrade" id="queue-upgrade"></div>
673
- </section>
674
-
675
- <section class="card" id="authorship-card" hidden>
676
- <!-- HIDDEN ON PURPOSE (user request): sealing is a background worker
677
- now. The authorship panel is still reachable — ⌘/Ctrl-K style menu
678
- paths and `window.aegisFingerprint` are unchanged — but this entry
679
- card no longer sits on the desktop and never prompts for a click.
680
- Kept in the document for the same reason as the queue card above:
681
- `fp-card-status` is painted by renderer/fingerprint.js and
682
- `fp-open` is the panel's own open seam, and an absent node is a
683
- silent no-op in one and a thrown paint in the other.
684
-
685
- φ(α) — the authorship key and the sealed session records.
686
- The heading is the click target for the full panel, exactly like
687
- the Memory card (a <button> may only hold phrasing content, so the
688
- button goes inside the h2, never around it).
689
-
690
- Everything on this card is driven by desktop/renderer/fingerprint.js
691
- over the IPC surface preload.js:171-183 already exposes; app.js only
692
- mounts it. Nothing here ever receives the key itself — the state
693
- line shows the derived 12-hex tag. -->
694
- <h2>
695
- <button
696
- type="button"
697
- class="card-title-btn"
698
- id="fp-open"
699
- title="Open the authorship panel — key, sealed records, and the Drive vault"
700
- >
701
- <span>Authorship</span>
702
- <span class="ctb-expand" aria-hidden="true">⤢</span>
703
- </button>
704
- </h2>
705
- <p class="hint" id="fp-card-status">checking…</p>
706
- <!-- One-click seal, the same action as the panel's. `-card` suffix
707
- because ids are document-global: two nodes sharing `fp-seal` would
708
- leave whichever the browser returned second permanently unbound. -->
709
- <button type="button" id="fp-seal-card" class="btn-block">Seal this session</button>
710
- <p class="hint" id="fp-card-hint">
711
- A sealed record proves which key wrote a session, and can carry a
712
- behaviour digest of the code it touched.
713
- </p>
714
- </section>
715
- </aside>
716
-
717
- <section class="chat">
718
- <!-- Inert template: cloned into #messages by renderWelcome() so the
719
- welcome markup lives in exactly one place and survives the
720
- innerHTML clears in newChat()/openSession(). -->
721
- <template id="welcome-template">
722
- <div class="chat-welcome" id="chat-welcome">
723
- <div class="chat-greeting-row">
724
- <!-- Decorative mark, drawn in CSS (desktop/renderer/style.css
725
- .chat-welcome .glyph) rather than this element's content —
726
- the shape is a mask-image, not text, see that rule for why.
727
- "Hello" already carries the row's meaning. -->
728
- <div class="glyph" aria-hidden="true"></div>
729
- <div class="title" id="chat-greeting">Hello</div>
730
- </div>
731
- <div class="sub" id="welcome-tagline">Your intent, AI automated.</div>
732
- <!-- One line, chosen from what this process actually knows about THIS
733
- install — never a menu of canned topics. The five generic pills
734
- that used to sit here ("Write code", "Explain a concept", …) were
735
- the same list on every machine for every user: a topic menu is
736
- not a welcome, it is a form to fill in. The line below is built
737
- by welcomePersonalize() in app.js from the same fact-gated rules
738
- as the sidebar's daily message (renderer/companion.js): an
739
- update that is downloaded and waiting, a missing key with the one
740
- concrete step, or memory entries this account already holds. When
741
- no fact is present it rotates one true tip, seeded by the day;
742
- when there is nothing to say at all it stays hidden rather than
743
- guessing. `hidden` is in the markup so a render that never runs
744
- shows nothing instead of an empty box. -->
745
- <p class="sub welcome-personal" id="welcome-personal" hidden></p>
746
- <!-- Why AEGIS Desktop, and the ONE reason to pay.
747
- Phase 3 of docs/upgrade-conversion-plan.md. This block used to
748
- carry four competing bullets (local, your key, does the work,
749
- open client) and priced none of them — a feature list where an
750
- offer belongs, whose only money line was "free tier to start,
751
- then upgrade", i.e. it pitched free in the offer slot. It is now
752
- the single paid promise plus the honesty line, with the two
753
- routes demoted to one primary CTA (#welcome-cloud) and one
754
- secondary link (#welcome-byok).
995
+ <!-- Companion: the persona customization pane. This is the card the old
996
+ "Customizations" rail row pointed at, and the reason that row could
997
+ go — every customization surface is here in Settings. The pane is
998
+ BUILT FROM THE MANIFEST (renderer/avatar/pane.js): the controls are
999
+ generated from parts.js and persona.js's limits, so a new outfit is
1000
+ a manifest entry, not a hunk of HTML. Mounted empty on purpose —
1001
+ `#avatar-pane-mount` is filled by mountAvatarPane() in app.js, which
1002
+ is also where main's stored persona arrives. -->
1003
+ <section class="card" id="appearance-card">
1004
+ <h2>Appearance</h2>
1005
+ <!-- Text size (parity pass 2, Phase C). Antigravity treats this as a
1006
+ user preference — every size in its ramp is multiplied by
1007
+ --app-font-scale — and we had no equivalent at all, so 12px labels
1008
+ were a constant the only lever on which was zooming the whole
1009
+ window and shrinking everything else with them.
1010
+
1011
+ A <select> of five steps rather than a slider: the headroom is
1012
+ 0.85-1.3 and the useful choices are few, so snapping beats a
1013
+ control that spends its time between two readable sizes. -->
1014
+ <label class="field-row" for="font-scale-select">
1015
+ <span>text size</span>
1016
+ <select id="font-scale-select">
1017
+ <option value="0.85">small</option>
1018
+ <option value="0.92">compact</option>
1019
+ <option value="1" selected>default</option>
1020
+ <option value="1.12">large</option>
1021
+ <option value="1.3">largest</option>
1022
+ </select>
1023
+ </label>
1024
+ <p class="hint" id="font-scale-hint"></p>
1025
+ <!-- Accent skin. The reference's accent is `#007acc` (VS Code's); teal
1026
+ is ours, so this is an OPTION rather than a new default — picking
1027
+ `cobalt` matches the reference, `default` keeps the teal, and the
1028
+ named-skin form means the focus rings and hover mixes derive from
1029
+ whatever is picked instead of being left behind at the old colour. -->
1030
+ <label class="field-row" for="accent-select">
1031
+ <span>accent</span>
1032
+ <select id="accent-select">
1033
+ <option value="default" selected>teal (default)</option>
1034
+ <option value="cobalt">cobalt (Antigravity)</option>
1035
+ <option value="amber">amber</option>
1036
+ </select>
1037
+ </label>
1038
+ <p class="hint" id="accent-hint"></p>
1039
+ </section>
755
1040
 
756
- THE SENTENCE IS LOAD-BEARING. "The autonomous queue keeps
757
- running after you close the laptop." is the same promise every
758
- other paid surface repeats (app.js PAID_PROMISE), and the honesty
759
- line is the same one the free path states (app.js FREE_HONESTY);
760
- desktop/test/renderer-welcome.test.mjs fails if the three drift
761
- apart or if the four-bullet list comes back.
1041
+ <section class="card" id="persona-card">
1042
+ <h2>Companion</h2>
1043
+ <p class="hint">
1044
+ How the companion looks, sounds and addresses you. Changes here are
1045
+ previewed as you make them and saved when the status line says so.
1046
+ </p>
1047
+ <div id="avatar-pane-mount"></div>
1048
+ </section>
762
1049
 
763
- The genuinely-free facts — exec/write/edit against your real
764
- working tree, repos and keys on this disk, a local model server
765
- with no account, an open-source client — are NOT reasons to pay, so they
766
- moved into the free path copy below instead of standing in the
767
- offer.
1050
+ <!-- The rail's "Automations" button lands here, on a page of its own.
1051
+ This WAS hidden ("the queue is a background worker now, not a panel
1052
+ on the desktop"), reachable by no affordance — but the rail needed a
1053
+ real destination of its own, and the queue IS the automation: a
1054
+ prompt, queued instead of sent, that a background worker drains
1055
+ unattended.
1056
+
1057
+ It was then a card inside #settings-view, reached by scrolling, which
1058
+ made the row named "Automations" open Settings. It now has
1059
+ #automations-view to itself, a sibling of #settings-view and
1060
+ #chat-canvas, so the form is a page rather than something to hunt
1061
+ for three sections down. The card keeps its id and `.card` class:
1062
+ revealSidebarCard() resolves `closest('section.card')`, and
1063
+ desktop/test/auto.test.mjs pins the id in ELEMENT_IDS.
1064
+
1065
+ The worker itself runs from the main process (desktop/lib/auto.js):
1066
+ it drains pending tasks on its own cadence and seals a quiet
1067
+ session, both switched on by default (settings.js
1068
+ `__autoDrain`/`__autoMint`), so queueing a task and walking away is
1069
+ the normal path. Turning either off is a settings-store write, not
1070
+ a click on this card.
1071
+
1072
+ The list below is state, not a transcript: the worker's own output
1073
+ arrives on queue:progress and is shown as a status line and each
1074
+ task's outcome. Nothing from a drain enters the chat thread. -->
1075
+ </div><!-- /#settings-view -->
1076
+
1077
+ <!-- Automations is its OWN page in the canvas, not a card scrolled to
1078
+ inside Settings. The rail row named "Automations" was landing on a
1079
+ card buried three sections down a settings page, which read as the
1080
+ row having opened Settings rather than a destination of its own.
1081
+
1082
+ The card keeps its id and its class: `revealSidebarCard()` resolves
1083
+ `closest('section.card')`, and desktop/test/auto.test.mjs pins
1084
+ `queueCard: 'queue-card'` in ELEMENT_IDS as the thing the rail row
1085
+ reaches. What changed is the container it lives in — this view,
1086
+ toggled by showAutomationsView() exactly the way #settings-view is
1087
+ toggled by showSettingsView(). -->
1088
+ <div id="automations-view" hidden>
1089
+ <div class="settings-view-header">
1090
+ <button type="button" class="settings-back" id="automations-back">&larr; Back to conversations</button>
1091
+ </div>
1092
+ <section class="card" id="queue-card">
1093
+ <h2>Automations</h2>
1094
+ <p class="hint">
1095
+ A prompt, same as the composer's — but queued instead of sent. A
1096
+ background worker drains it unattended, in the checkout you name
1097
+ below, on its own cadence; nothing it does lands in this chat thread.
1098
+ </p>
768
1099
 
769
- Both controls are real: #welcome-byok switches the provider class
770
- to byok and drops the user on the Provider settings card,
771
- #welcome-cloud focuses the AEGIS key field in the Status card.
772
- The whole block is hidden once a key is configured or the user
773
- dismisses it (applyWelcomeConnect() in app.js) — a welcome panel
774
- that reappears on every New chat is an ad, not a welcome. -->
775
- <div class="welcome-connect" id="welcome-connect" hidden>
776
- <div class="wc-why">
777
- <div class="wc-why-title">Why AEGIS Desktop</div>
778
- <ul class="wc-why-list">
779
- <li class="wc-offer">
780
- <b>The autonomous queue keeps running after you close the
781
- laptop.</b> The cloud drain is what makes that true: the job
782
- survives app close and reboot, runs on pooled models with
783
- fan-out workers, and carries memory from one task to the next.
784
- </li>
785
- <li class="wc-honest">
786
- Everything on your machine is free, permanently. The cloud
787
- drain is what you pay for.
788
- </li>
789
- </ul>
790
- </div>
791
- <div class="wc-honest-line" id="welcome-cap">
792
- Free, permanently: everything on this machine — exec, write, edit,
793
- your own key, and the queue draining while this window is open, one
794
- worker per task. Pro is the cloud drain: it keeps running after you
795
- close the laptop, fans a task out across workers, and carries
796
- memory from one task to the next.
797
- </div>
798
- <!-- The ask, written as an example instead of described as a
799
- benefit — and the unlock, said out loud. "Autonomously" is the
800
- word the queue actually matches (queue.js / autonomous.js treat
801
- a task with the fan-out flag as the multi-worker one), so the
802
- user is shown the sentence to type, not a feature name to
803
- decode. #welcome-unlock names BOTH ways through the wall
804
- because there are two: a paid plan, or a funded Token Bank —
805
- operator-controlled (aegis1 `add_funds`), which is the lever
806
- the entitlement gate reads (`desktop/lib/local/entitlement.js`
807
- `entitled = pro || banked`). Saying only "Pro" would send a
808
- banked account to the wrong checkout. -->
809
- <div class="wc-honest-line wc-howto" id="welcome-unlock">
810
- <b>How to unlock the fan-out:</b> paying accounts get it — Pro, or
811
- any Token Bank balance. Free accounts still drain the queue, one
812
- worker per task, while this window is open.
813
- </div>
814
- <div class="wc-paths">
815
- <!-- Phase 4A: ONE primary CTA, and it is the paid promise. It goes
816
- through the Phase 1 helper's destination —
817
- /go/upgrade?s=desktop&c=welcome_cloud (aegis1 GO_TARGETS +
818
- SIGNUP_SOURCES own the utm_* mapping, so `s`/`c` are the wire
819
- names here and utm_* must NOT be appended). The href below is
820
- the same URL app.js's subscribeUrl('welcome_cloud') builds,
821
- and renderWelcome() re-points the anchor at that helper on
822
- every paint; desktop/test/renderer-welcome.test.mjs asserts the
823
- two agree, so this literal cannot drift into a dead link.
824
- The free paths are demoted underneath it: the key connect and
825
- BYOK are secondary links, not co-equal pitches. -->
826
- <a
827
- class="wc-path wc-path-primary"
828
- id="welcome-upgrade"
829
- href="https://aegiscloud.org/go/upgrade?s=desktop&amp;c=welcome_cloud"
830
- target="_blank"
831
- rel="noreferrer noopener"
832
- >
833
- <span class="wc-ic" aria-hidden="true">✦</span>
834
- <span class="wc-body">
835
- <span class="wc-name">Pro: the cloud drain</span>
836
- <span class="wc-desc">
837
- Write it in the message: <code>Do X autonomously</code> —
838
- Pro keeps draining that task after you close the laptop,
839
- and fans it across workers.
840
- </span>
841
- </span>
842
- <span class="wc-go">See what Pro covers →</span>
843
- </a>
844
- <div class="wc-secondary">
845
- <button type="button" class="wc-link" id="welcome-cloud">
846
- Connect AEGIS Cloud — I already have a key →
847
- </button>
848
- <span class="wc-note" id="welcome-cloud-note">
849
- Connect it here and the same queue runs on pooled models right
850
- away, free, while this window is open.
851
- </span>
852
- <button type="button" class="wc-link" id="welcome-byok">
853
- Bring your own key →
854
- </button>
855
- <span class="wc-note" id="welcome-byok-note"></span>
856
- <button type="button" class="wc-skip" id="welcome-dismiss">
857
- Don't show this again
858
- </button>
859
- </div>
860
- </div>
1100
+ <div class="auto-form">
1101
+ <label class="pt-field" for="queue-task">
1102
+ <span>task</span>
1103
+ <textarea
1104
+ id="queue-task"
1105
+ rows="3"
1106
+ placeholder="Queue a task to run unattended…"
1107
+ ></textarea>
1108
+ </label>
1109
+
1110
+ <!-- Which backend this task runs on — the same three classes
1111
+ (window.models.listClasses()) and the same per-class model list
1112
+ (listModels(cls)) the chat composer's #class-select/#model-select
1113
+ use. Aegis Cloud can leave the model on "server default"; byok and
1114
+ local tasks must name one (autonomous.js modelRefusal refuses a
1115
+ blank at the door for those two). -->
1116
+ <div class="pt-toolbar">
1117
+ <label class="pt-field" for="queue-class-select">
1118
+ <span>provider</span>
1119
+ <select id="queue-class-select" title="Which backend this task runs on."></select>
1120
+ </label>
1121
+ <label class="pt-field" for="queue-model-select">
1122
+ <span>model</span>
1123
+ <select id="queue-model-select" title="The model for the picked class."></select>
1124
+ </label>
861
1125
  </div>
862
- <div class="hints">
863
- Enter to send · Shift+Enter for a newline · the discovery lane adds
864
- two extra paths to every answer
1126
+ <label class="pt-field" for="queue-model-input" id="queue-model-field">
1127
+ <span>model tag</span>
1128
+ <input
1129
+ type="text"
1130
+ id="queue-model-input"
1131
+ placeholder="e.g. llama3.2:3b"
1132
+ autocomplete="off"
1133
+ spellcheck="false"
1134
+ hidden
1135
+ />
1136
+ </label>
1137
+ <p class="hint" id="queue-model-hint"></p>
1138
+
1139
+ <label class="pt-field" for="queue-cwd">
1140
+ <span>checkout</span>
1141
+ <input
1142
+ type="text"
1143
+ id="queue-cwd"
1144
+ placeholder="/path/to/repo"
1145
+ autocomplete="off"
1146
+ spellcheck="false"
1147
+ title="The directory the task's tool loop runs in. Must already exist."
1148
+ />
1149
+ </label>
1150
+
1151
+ <div class="auto-actions">
1152
+ <button type="button" id="queue-enqueue" class="ghost-btn">Queue task</button>
1153
+ <button type="button" id="queue-drain" class="ghost-btn">Run one</button>
1154
+ <button type="button" id="queue-proceed" class="ghost-btn">Drain all</button>
1155
+ <button type="button" id="queue-stop" class="ghost-btn danger" hidden>Stop</button>
865
1156
  </div>
866
1157
  </div>
867
- </template>
868
- <div class="messages" id="messages" aria-live="polite"></div>
869
- <!-- Whole-window drop veil. Shown by the dragenter/dragleave counter in
870
- app.js (body.is-dropping), never hit-testable itself: the drop still
871
- lands on the window handler. -->
872
- <div class="drop-veil" id="drop-veil" aria-hidden="true">
873
- <div class="drop-veil-label">Drop to attach — files, pictures, or a path</div>
874
- </div>
875
- <form class="composer" id="composer">
876
- <!-- Files dragged onto the window land here. The row is populated by
877
- renderAttachments() in app.js and is empty (and collapsed) until
878
- something is dropped — see ATTACH in app.js for why the drop
879
- target is the whole window but the chips live in the composer. -->
880
- <div class="attach-row" id="attach-row" hidden></div>
881
- <!-- Capability warning for staged attachments: a picture dropped on a
882
- destination that cannot receive pixels (PRO is a child process fed
883
- text) says so here BEFORE the turn, instead of the file silently
884
- arriving as a path. Populated by renderAttachments(). -->
885
- <div class="attach-note" id="attach-note" hidden></div>
886
- <textarea
887
- id="prompt"
888
- rows="2"
889
- placeholder="Message AEGIS… (Enter to send, Shift+Enter for a newline, or drop a file)"
890
- ></textarea>
891
- <!-- The composer's control row: every switch that changes what this
892
- send will do lives INSIDE the composer box, on one line under the
893
- input, so the whole thing reads as one object with one focus ring.
894
- Before this, the discovery toggle sat in a side rail and the tool
895
- mode sat in a strip underneath the form — three surfaces around
896
- one text field, and the mode chip (which changes whether tools run
897
- unattended) was the furthest from the thing it governs. -->
898
- <div class="composer-row">
899
- <!-- Which provider answers the next send. This is the one place in
900
- the window where that fact is shown: messages used to carry an
901
- author line (`You` / `AEGIS`), and `AEGIS` was wrong on every
902
- byok and local turn — the reply came from Anthropic or from a
903
- localhost daemon. Painted by provider-mark.js from the picker
904
- selection via updateBudgetControls(), so it cannot disagree
905
- with the model actually selected above. -->
906
- <span class="provider-mark-slot" id="provider-mark"></span>
1158
+
1159
+ <!-- Past this line a control can spend money with nobody watching. -->
1160
+ <h3 class="auto-group-title">Unattended</h3>
1161
+ <div class="auto-toggles">
907
1162
  <label
908
1163
  class="flow-toggle"
909
- for="explore-toggle"
910
- 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)."
1164
+ for="queue-commit"
1165
+ title="Commit the paths this task's own tool calls wrote, once it finishes. Anything else dirty in that checkout is left alone."
911
1166
  >
912
- <!-- Unchecked in the markup on purpose: the lane bills two extra
913
- model calls per turn, so it is opt-in. app.js only ticks this
914
- when the user has explicitly saved 'on' (aegis.explore). -->
915
- <input type="checkbox" id="explore-toggle" />
916
- <span>discovery lane</span>
1167
+ <input type="checkbox" id="queue-commit" />
1168
+ <span>commit what the task changes</span>
917
1169
  </label>
918
- <!-- Mode chip: the same switch as Settings → Tool approvals, hoisted
919
- next to the input so the current mode is readable while typing
920
- and one click from the other. Painted from
921
- renderConfirmMode()/renderAutoModeChip() in app.js, so the two
922
- cannot disagree. type="button" so it never submits the form. -->
923
- <button
924
- type="button"
925
- id="auto-mode-toggle"
926
- class="mode-chip"
927
- aria-pressed="false"
928
- title="Auto mode lets the agent run exec, writeFile and editFile without asking. Click to switch, or set it in Settings → Tool approvals."
1170
+ <!-- Fan-out (Phase 4 of docs/upgrade-conversion-plan.md). The fan-out
1171
+ is the Pro multiplier: pool_brain spawns `workers` reasoning
1172
+ workers plus a synthesis pass and re-sends the task context to
1173
+ each, where the identical task single-pass is one turn. Main
1174
+ enforces the ceiling — free gets one worker per task — and refuses
1175
+ a request it is not entitled to, naming what Pro adds (the cloud
1176
+ drain that survives app close) rather than only the limit. app.js
1177
+ paints this control from the entitlement main sends, and disables
1178
+ it for free with the reason ON SCREEN (#queue-hint) BEFORE any
1179
+ refusal. -->
1180
+ <label
1181
+ class="flow-toggle"
1182
+ for="queue-fanout"
1183
+ title="Fan this task out across pooled reasoning workers (roughly workers+1 reasoning calls). Pro only — the free tier runs one worker per task."
929
1184
  >
930
- <span class="mode-dot" aria-hidden="true">●</span>
931
- <span id="auto-mode-label">ask before tools</span>
932
- </button>
933
- <span class="hint" id="auto-mode-hint"></span>
934
- <span class="composer-spacer"></span>
935
- <button type="submit" id="send">Send</button>
1185
+ <input type="checkbox" id="queue-fanout" />
1186
+ <span id="queue-fanout-label">fan out this task</span>
1187
+ </label>
936
1188
  </div>
937
- </form>
938
- </section>
1189
+ <p class="hint" id="queue-boundary"></p>
1190
+
1191
+ <!-- The auto-drain switch. NOT a hidden timer: it is the persisted
1192
+ settings.js `__autoDrain` namespace, off in a default install, read
1193
+ by desktop/lib/auto.js on EVERY tick — so unchecking it stops the
1194
+ very next one. A drain spends a real model on a real checkout, so
1195
+ the switch that authorises one unattended is visible here and stays
1196
+ visible while it is armed (the label carries the state). The
1197
+ interval is the timer's cadence, clamped in settings.js; the select
1198
+ is disabled while the switch is off so a pick can never read as an
1199
+ armed timer. -->
1200
+ <div class="auto-cadence">
1201
+ <label
1202
+ class="flow-toggle"
1203
+ for="queue-auto"
1204
+ 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."
1205
+ >
1206
+ <input type="checkbox" id="queue-auto" />
1207
+ <span id="queue-auto-label">drain automatically</span>
1208
+ </label>
1209
+ <label class="pt-field auto-cadence-interval" for="queue-auto-interval">
1210
+ <span>cadence</span>
1211
+ <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.">
1212
+ <option value="30000">every 30s</option>
1213
+ <option value="60000" selected>every minute</option>
1214
+ <option value="300000">every 5 minutes</option>
1215
+ <option value="900000">every 15 minutes</option>
1216
+ </select>
1217
+ </label>
1218
+ </div>
1219
+ <p class="hint" id="queue-auto-hint"></p>
1220
+
1221
+ <h3 class="auto-group-title">Queued</h3>
1222
+ <!-- One card per task (.queue-list/.queue-task), not the Sessions
1223
+ library's compact .sessions-list rows: a queued task has a prompt
1224
+ to read in full, a status, a shape and a cwd, and nothing to open. -->
1225
+ <ul class="queue-list" id="queue-list"></ul>
1226
+ <p class="hint" id="queue-hint"></p>
1227
+ <div class="queue-upgrade" id="queue-upgrade"></div>
1228
+ </section>
1229
+ </div><!-- /#automations-view -->
939
1230
  </main>
940
1231
 
1232
+ <!-- The ⌘P command palette.
1233
+
1234
+ It is a front-end for handlers that already exist (see commands.js), not
1235
+ a second implementation of them: every row dispatches to the same
1236
+ function its toolbar button or menu item calls. Sits outside <main> so
1237
+ it overlays the whole window including the topbar, matching the other
1238
+ sheets (.memory-overlay).
1239
+
1240
+ WHY ⌘P AND NOT ⌘K. ⌘K is already session search (View > Search), which
1241
+ users have muscle memory for. Taking it for a palette would either
1242
+ break that chord or make the palette secretly mean "search", and this
1243
+ palette is a superset of reach, not a rename of one destination.
1244
+
1245
+ The list is built by app.js from commands.js, filtered through
1246
+ palette-filter.js. `role="listbox"` with `aria-activedescendant` keeps
1247
+ the highlight announced without moving DOM focus off the input, so
1248
+ typing never loses the caret. -->
1249
+ <div class="palette-overlay" id="palette-overlay" hidden>
1250
+ <div class="memory-backdrop" id="palette-backdrop"></div>
1251
+ <div
1252
+ class="palette-panel"
1253
+ role="dialog"
1254
+ aria-modal="true"
1255
+ aria-labelledby="palette-label"
1256
+ >
1257
+ <label class="palette-field" for="palette-input">
1258
+ <span class="palette-label" id="palette-label">Command palette</span>
1259
+ <input
1260
+ type="text"
1261
+ id="palette-input"
1262
+ placeholder="Type a command…"
1263
+ autocomplete="off"
1264
+ role="combobox"
1265
+ aria-expanded="true"
1266
+ aria-controls="palette-list"
1267
+ aria-autocomplete="list"
1268
+ />
1269
+ </label>
1270
+ <ul
1271
+ class="palette-list"
1272
+ id="palette-list"
1273
+ role="listbox"
1274
+ aria-labelledby="palette-label"
1275
+ ></ul>
1276
+ <!-- Printed by app.js when nothing matches, and hidden otherwise: an
1277
+ empty list with no explanation reads as a broken palette. -->
1278
+ <p class="palette-empty" id="palette-empty" hidden>No matching command.</p>
1279
+ <footer class="palette-foot">
1280
+ <span class="palette-key"><kbd>&uarr;</kbd><kbd>&darr;</kbd> navigate</span>
1281
+ <span class="palette-key"><kbd>&crarr;</kbd> run</span>
1282
+ <span class="palette-key"><kbd>esc</kbd> close</span>
1283
+ </footer>
1284
+ </div>
1285
+ </div>
1286
+
941
1287
  <!-- Memory inspector: full-viewport translucent overlay opened from the
942
1288
  sidebar Memory heading. Markup is static and populated by
943
1289
  renderMemoryOverlay() — this renderer runs under CSP `script-src 'self'`,
@@ -1126,6 +1472,34 @@
1126
1472
  </div>
1127
1473
  </div>
1128
1474
 
1475
+ <!-- Keyboard shortcuts — the sheet the ⌘P palette's "Keyboard shortcuts" row
1476
+ opens. The rows are NOT written here: renderer/shortcuts.js holds the
1477
+ table and app.js paints it, because a list copied into markup drifts from
1478
+ main.js's accelerators the first time one of them changes. Not to be
1479
+ confused with #keys-overlay above, which is about KEYS (the AEGIS key and
1480
+ the BYOK key) — this one is about KEYBINDINGS. The structure is the memory
1481
+ sheet's on purpose: one translucent layer, one Escape policy. -->
1482
+ <div class="memory-overlay shortcuts-overlay" id="shortcuts-overlay" hidden>
1483
+ <div class="memory-backdrop" id="shortcuts-backdrop"></div>
1484
+ <div
1485
+ class="memory-panel"
1486
+ role="dialog"
1487
+ aria-modal="true"
1488
+ aria-labelledby="shortcuts-panel-title"
1489
+ >
1490
+ <header class="memory-panel-head">
1491
+ <h2 id="shortcuts-panel-title">Keyboard shortcuts</h2>
1492
+ <span class="memory-count" id="shortcuts-count"></span>
1493
+ <div class="spacer"></div>
1494
+ <button type="button" id="shortcuts-close" class="ghost-btn" title="Close (Esc)">
1495
+ Close
1496
+ </button>
1497
+ </header>
1498
+
1499
+ <div class="memory-scroll" id="shortcuts-body"></div>
1500
+ </div>
1501
+ </div>
1502
+
1129
1503
  <!-- φ(α) panel. Same sheet as the memory inspector (the classes are shared on
1130
1504
  purpose: one translucent layer, one Escape policy). Every control is
1131
1505
  bound in fingerprint.js, which is also where these ids are declared — a
@@ -1277,7 +1651,7 @@
1277
1651
  <!-- The two-key pop-up. Same sheet as the memory inspector and the φ(α)
1278
1652
  panel (the classes are shared on purpose: one translucent layer, one
1279
1653
  Escape policy), and it exists because the app and the CLI are one engine
1280
- over one store: AEGIS Desktop reads the very `aegis:<...>` account key
1654
+ over one store: aegis one reads the very `aegis:<...>` account key
1281
1655
  and the very `byok:<provider>` rows `aegiscode` on the command line
1282
1656
  writes, so BOTH keys are what make BOTH surfaces run.
1283
1657
 
@@ -1306,7 +1680,7 @@
1306
1680
  </header>
1307
1681
 
1308
1682
  <p class="hint" id="keys-lead">
1309
- AEGIS Desktop and the <code>aegiscode</code> CLI are the same engine over
1683
+ aegis one and the <code>aegiscode</code> CLI are the same engine over
1310
1684
  the same store on this disk. Two keys turn on both: the AEGIS account key
1311
1685
  (your bill, and the pooled models) and your own provider key (BYOK). Add
1312
1686
  both and either surface runs — until then, a turn on the missing one is
@@ -1360,6 +1734,40 @@
1360
1734
  </div>
1361
1735
  </div>
1362
1736
 
1737
+ <!-- First-run sign-in gate, styled after the Antigravity/Gemini desktop
1738
+ apps' own "Welcome to …" screen: full-bleed, one glyph, one decision.
1739
+ Shown once per profile (app.js: ONBOARDING_SEEN_KEY) — dismissing it
1740
+ by any path (Google, API key, Skip) is permanent. It does not gate
1741
+ anything functional: auto-provision still mints an anonymous device
1742
+ key in the background regardless of what happens here. -->
1743
+ <div class="onboard-overlay" id="onboard-overlay" hidden>
1744
+ <div class="onboard-card">
1745
+ <div class="onboard-glyph" aria-hidden="true">Æ</div>
1746
+ <h1 class="onboard-title">Welcome to aegis one</h1>
1747
+ <p class="onboard-sub">
1748
+ Sign in to sync memory, sessions and billing across every machine
1749
+ you run AEGIS on.
1750
+ </p>
1751
+
1752
+ <button type="button" class="onboard-btn onboard-btn-google" id="onboard-google">
1753
+ <svg class="onboard-g-icon" viewBox="0 0 48 48" width="18" height="18" aria-hidden="true">
1754
+ <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"/>
1755
+ <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"/>
1756
+ <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"/>
1757
+ <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"/>
1758
+ </svg>
1759
+ <span>Continue with Google</span>
1760
+ </button>
1761
+ <button type="button" class="onboard-btn onboard-btn-key" id="onboard-apikey">
1762
+ Continue with an API key
1763
+ </button>
1764
+
1765
+ <p class="onboard-status" id="onboard-status" role="status"></p>
1766
+
1767
+ <button type="button" class="onboard-skip" id="onboard-skip">Skip for now</button>
1768
+ </div>
1769
+ </div>
1770
+
1363
1771
  <script src="providers.js"></script>
1364
1772
  <!-- Must load before provider-toolbar.js: that script reads
1365
1773
  window.aegisProviderMark into a top-level `const` at parse time (the
@@ -1372,6 +1780,7 @@
1372
1780
  <script src="provider-mark.js"></script>
1373
1781
  <script src="provider-toolbar.js"></script>
1374
1782
  <script src="companion.js"></script>
1783
+ <script src="welcome-rows.js"></script>
1375
1784
  <script src="budget.js"></script>
1376
1785
  <script src="usage.js"></script>
1377
1786
  <script src="stream-policy.js"></script>
@@ -1388,6 +1797,32 @@
1388
1797
  and composes its overlay into the Escape policy, and the orphan check in
1389
1798
  test/renderer-wiring.test.mjs fails if this tag goes missing. -->
1390
1799
  <script src="fingerprint.js"></script>
1800
+ <!-- The avatar's shared modules, in dependency order: the two `lib/` halves
1801
+ are the SAME files the Node tests require(), now publishing a global for
1802
+ this sandboxed window (see the tail of each). parts.js reads both,
1803
+ pane.js reads parts, and app.js mounts the pane. -->
1804
+ <script src="../lib/avatar/persona.js"></script>
1805
+ <script src="../lib/avatar/events.js"></script>
1806
+ <script src="avatar/parts.js"></script>
1807
+ <script src="avatar/pane.js"></script>
1808
+ <!-- The ⌘P palette's two pure halves, before app.js which consumes them:
1809
+ commands.js is the catalog (data only), palette-filter.js is the ranking.
1810
+ Both publish a global and both are require()d by the Node tests, so the
1811
+ rows the test ranks are the rows the palette shows. -->
1812
+ <script src="commands.js"></script>
1813
+ <script src="palette-filter.js"></script>
1814
+ <!-- ⌘F's matching half. Pure positions, no DOM — see the module header for
1815
+ why the transcript is highlighted through ranges rather than by
1816
+ rewriting rendered markdown. -->
1817
+ <script src="shortcuts.js"></script>
1818
+ <script src="find-in-conversation.js"></script>
1819
+ <!-- The `/` and `@` menus' pure half: trigger detection and one ranking rule,
1820
+ shared with the palette so the two menus cannot disagree. -->
1821
+ <script src="composer-triggers.js"></script>
1822
+ <!-- View > Go Back / Go Forward's stack. Pure: entries are `{kind, id}`, never
1823
+ DOM nodes, so the Node test drives the whole thing without a window. Loaded
1824
+ ahead of app.js because app.js calls createHistory() at module scope. -->
1825
+ <script src="nav-history.js"></script>
1391
1826
  <script src="app.js"></script>
1392
1827
  </body>
1393
1828
  </html>