@andorra-labs/code 0.1.10 → 0.1.12

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 (238) hide show
  1. package/README.md +31 -205
  2. package/THIRD_PARTY_NOTICES.md +30 -0
  3. package/dist/src/agent-execution.js +50 -2
  4. package/dist/src/agent-mcp.js +5 -0
  5. package/dist/src/app-server/protocol.d.ts +9 -1
  6. package/dist/src/app-server/protocol.js +1 -1
  7. package/dist/src/app-server.d.ts +49 -1
  8. package/dist/src/app-server.js +353 -64
  9. package/dist/src/automation-service.js +1 -1
  10. package/dist/src/browser-panel-tool.d.ts +24 -3
  11. package/dist/src/browser-panel-tool.js +80 -6
  12. package/dist/src/browser-runner.js +3 -1
  13. package/dist/src/browser-session.d.ts +8 -0
  14. package/dist/src/browser-session.js +27 -1
  15. package/dist/src/browser-ui/app.js +237 -15
  16. package/dist/src/browser-ui/index.html +5 -5
  17. package/dist/src/browser-ui/style.css +110 -65
  18. package/dist/src/browser-ui/tokens.css +27 -26
  19. package/dist/src/browser-view.d.ts +16 -0
  20. package/dist/src/browser-view.js +38 -2
  21. package/dist/src/claude-provider.js +15 -2
  22. package/dist/src/cli.d.ts +2 -1
  23. package/dist/src/cli.js +175 -43
  24. package/dist/src/code-intelligence/CodeIntelligenceManager.js +1 -1
  25. package/dist/src/codex-provider.js +6 -3
  26. package/dist/src/coding-tools.d.ts +26 -1
  27. package/dist/src/coding-tools.js +104 -33
  28. package/dist/src/command-screens.js +1 -1
  29. package/dist/src/commands.js +1 -1
  30. package/dist/src/completion-gates.d.ts +42 -7
  31. package/dist/src/completion-gates.js +55 -9
  32. package/dist/src/completion.d.ts +51 -1
  33. package/dist/src/completion.js +164 -5
  34. package/dist/src/config.d.ts +1 -0
  35. package/dist/src/config.js +2 -0
  36. package/dist/src/dashboard-view.js +2 -2
  37. package/dist/src/deadline.js +4 -0
  38. package/dist/src/decision/PreparedSteps.js +1 -1
  39. package/dist/src/delegation-changes.js +19 -2
  40. package/dist/src/diff-preview.d.ts +1 -0
  41. package/dist/src/diff-preview.js +12 -3
  42. package/dist/src/engine-streams.d.ts +22 -0
  43. package/dist/src/engine-streams.js +16 -0
  44. package/dist/src/extensions.js +17 -6
  45. package/dist/src/file-read-key.d.ts +8 -0
  46. package/dist/src/file-read-key.js +12 -0
  47. package/dist/src/graph-editor-session.js +2 -1
  48. package/dist/src/graph-health.d.ts +21 -0
  49. package/dist/src/graph-health.js +46 -0
  50. package/dist/src/graph-manager-chat.d.ts +52 -3
  51. package/dist/src/graph-manager-chat.js +62 -17
  52. package/dist/src/graph-runner.js +62 -5
  53. package/dist/src/graph-server.d.ts +1 -1
  54. package/dist/src/graph-server.js +48 -27
  55. package/dist/src/graph-sync.d.ts +8 -0
  56. package/dist/src/graph-sync.js +54 -3
  57. package/dist/src/graph-tool.js +1 -1
  58. package/dist/src/graph-ui/app.js +362 -123
  59. package/dist/src/graph-ui/controls.css +95 -22
  60. package/dist/src/graph-ui/controls.js +31 -1
  61. package/dist/src/graph-ui/embed.js +62 -13
  62. package/dist/src/graph-ui/icons.js +7 -0
  63. package/dist/src/graph-ui/index.html +4 -4
  64. package/dist/src/graph-ui/manager-state.js +143 -5
  65. package/dist/src/graph-ui/manager.css +21 -20
  66. package/dist/src/graph-ui/manager.js +337 -75
  67. package/dist/src/graph-ui/model-picker.js +279 -0
  68. package/dist/src/graph-ui/provider-glyphs/alibaba-cloud.png +0 -0
  69. package/dist/src/graph-ui/provider-glyphs/anthropic.png +0 -0
  70. package/dist/src/graph-ui/provider-glyphs/aws-bedrock.png +0 -0
  71. package/dist/src/graph-ui/provider-glyphs/claude.png +0 -0
  72. package/dist/src/graph-ui/provider-glyphs/deepseek.png +0 -0
  73. package/dist/src/graph-ui/provider-glyphs/fireworks.png +0 -0
  74. package/dist/src/graph-ui/provider-glyphs/kimi.png +0 -0
  75. package/dist/src/graph-ui/provider-glyphs/minimax.png +0 -0
  76. package/dist/src/graph-ui/provider-glyphs/openai.png +0 -0
  77. package/dist/src/graph-ui/provider-glyphs/opencode.png +0 -0
  78. package/dist/src/graph-ui/provider-glyphs/openrouter.png +0 -0
  79. package/dist/src/graph-ui/provider-glyphs/xai.png +0 -0
  80. package/dist/src/graph-ui/provider-glyphs/xiaomi-mimo.png +0 -0
  81. package/dist/src/graph-ui/provider-glyphs/zai.png +0 -0
  82. package/dist/src/graph-ui/skill-picker.js +1 -1
  83. package/dist/src/graph-ui/studio-canvas.js +8 -8
  84. package/dist/src/graph-ui/studio.css +18 -15
  85. package/dist/src/graph-ui/studio.js +92 -35
  86. package/dist/src/graph-ui/style.css +122 -79
  87. package/dist/src/graph-ui/theme.js +2 -2
  88. package/dist/src/graph-ui/tokens.css +33 -29
  89. package/dist/src/graphs.d.ts +5 -2
  90. package/dist/src/graphs.js +10 -9
  91. package/dist/src/mcp.d.ts +52 -14
  92. package/dist/src/mcp.js +285 -128
  93. package/dist/src/membership-errors.d.ts +7 -1
  94. package/dist/src/membership-errors.js +9 -3
  95. package/dist/src/memory/ProjectMemory.d.ts +77 -0
  96. package/dist/src/memory/ProjectMemory.js +310 -0
  97. package/dist/src/memory/index.d.ts +1 -0
  98. package/dist/src/memory/index.js +1 -0
  99. package/dist/src/opencode-provider.js +5 -6
  100. package/dist/src/package-name.d.ts +3 -0
  101. package/dist/src/package-name.js +3 -0
  102. package/dist/src/provider-engine.js +2 -2
  103. package/dist/src/pull-requests.d.ts +42 -6
  104. package/dist/src/pull-requests.js +11 -3
  105. package/dist/src/qa/runtime/PtyManager.js +2 -1
  106. package/dist/src/react-runtime.js +137 -22
  107. package/dist/src/read-document-doc.d.ts +20 -0
  108. package/dist/src/read-document-doc.js +524 -0
  109. package/dist/src/read-document-docx.d.ts +21 -0
  110. package/dist/src/read-document-docx.js +584 -0
  111. package/dist/src/read-document-text.d.ts +29 -0
  112. package/dist/src/read-document-text.js +67 -0
  113. package/dist/src/read-document-tool.d.ts +48 -0
  114. package/dist/src/read-document-tool.js +162 -0
  115. package/dist/src/read-document.d.ts +78 -0
  116. package/dist/src/read-document.js +353 -0
  117. package/dist/src/read-image.d.ts +29 -2
  118. package/dist/src/read-image.js +42 -17
  119. package/dist/src/remote/cert.d.ts +1 -1
  120. package/dist/src/remote/cert.js +2 -7
  121. package/dist/src/remote/client.js +1 -1
  122. package/dist/src/remote/pem.d.ts +6 -0
  123. package/dist/src/remote/pem.js +11 -0
  124. package/dist/src/run-records.js +49 -10
  125. package/dist/src/runtime.d.ts +21 -0
  126. package/dist/src/runtime.js +10 -1
  127. package/dist/src/session-changes.d.ts +6 -1
  128. package/dist/src/session-changes.js +13 -5
  129. package/dist/src/sessions.d.ts +3 -1
  130. package/dist/src/sessions.js +5 -3
  131. package/dist/src/side-panel.d.ts +6 -1
  132. package/dist/src/side-panel.js +12 -10
  133. package/dist/src/sign-in-detection.d.ts +82 -0
  134. package/dist/src/sign-in-detection.js +197 -0
  135. package/dist/src/sign-in-offer.d.ts +35 -0
  136. package/dist/src/sign-in-offer.js +116 -0
  137. package/dist/src/skills/bundled/create-skill/SKILL.md +1 -1
  138. package/dist/src/skills/bundled/diagram/SKILL.md +1 -1
  139. package/dist/src/skills/bundled/graph-manager/SKILL.md +59 -7
  140. package/dist/src/skills/bundled/graph-manager/patterns.md +27 -0
  141. package/dist/src/skills/bundled/provenance.json +4 -4
  142. package/dist/src/skills/runtime-skills.d.ts +6 -0
  143. package/dist/src/skills/runtime-skills.js +16 -3
  144. package/dist/src/stall-recovery.d.ts +6 -2
  145. package/dist/src/stall-recovery.js +7 -2
  146. package/dist/src/stray-files.d.ts +14 -0
  147. package/dist/src/stray-files.js +81 -0
  148. package/dist/src/subagent-run.js +6 -1
  149. package/dist/src/terminal-ui.d.ts +1 -1
  150. package/dist/src/terminal-ui.js +11 -5
  151. package/dist/src/time-limit.d.ts +53 -0
  152. package/dist/src/time-limit.js +79 -0
  153. package/dist/src/tool-activity.js +1 -1
  154. package/dist/src/tool-schema-compatibility.d.ts +7 -2
  155. package/dist/src/tool-schema-compatibility.js +8 -4
  156. package/dist/src/tools.js +92 -7
  157. package/dist/src/transcript.d.ts +5 -0
  158. package/dist/src/transcript.js +12 -4
  159. package/dist/src/types.d.ts +8 -0
  160. package/dist/src/untracked-file-removal.d.ts +3 -0
  161. package/dist/src/untracked-file-removal.js +125 -0
  162. package/dist/src/update-check.js +1 -1
  163. package/dist/src/update.d.ts +11 -1
  164. package/dist/src/update.js +27 -5
  165. package/dist/src/usage-analytics.d.ts +3 -1
  166. package/dist/src/usage-analytics.js +16 -2
  167. package/dist/src/workspace-git-metadata.d.ts +15 -0
  168. package/dist/src/workspace-git-metadata.js +50 -1
  169. package/dist/src/workspace-instructions.js +1 -1
  170. package/package.json +6 -26
  171. package/docs/README.md +0 -36
  172. package/docs/agents/README.md +0 -62
  173. package/docs/agents/install-for-agents.md +0 -56
  174. package/docs/agents/mcp-server.md +0 -212
  175. package/docs/agents/subagent-mode.md +0 -149
  176. package/docs/concepts/README.md +0 -47
  177. package/docs/concepts/jev-actionable-routing.md +0 -113
  178. package/docs/concepts/jev-decision-thresholds.md +0 -412
  179. package/docs/concepts/jev-efficiency.md +0 -217
  180. package/docs/concepts/jev-eval-2026-11-01.md +0 -78
  181. package/docs/concepts/limits.md +0 -52
  182. package/docs/concepts/memory.md +0 -10
  183. package/docs/concepts/security.md +0 -50
  184. package/docs/concepts/workspace-instructions.md +0 -29
  185. package/docs/getting-started/README.md +0 -82
  186. package/docs/getting-started/accounts.md +0 -78
  187. package/docs/getting-started/configure-providers.md +0 -132
  188. package/docs/guides/README.md +0 -13
  189. package/docs/guides/browser.md +0 -39
  190. package/docs/guides/desktop-app.md +0 -414
  191. package/docs/guides/extensions.md +0 -102
  192. package/docs/guides/graph-builder.md +0 -116
  193. package/docs/guides/headless.md +0 -46
  194. package/docs/guides/tui.md +0 -75
  195. package/docs/guides/update.md +0 -70
  196. package/docs/guides/web-search.md +0 -51
  197. package/docs/guides/windows-code-signing.md +0 -319
  198. package/docs/llms.txt +0 -45
  199. package/docs/reference/README.md +0 -7
  200. package/docs/reference/cli.md +0 -76
  201. package/docs/reference/config.md +0 -91
  202. package/docs/reference/slash-commands.md +0 -59
  203. package/docs/superpowers/plans/2026-11-01-claude-console-sign-in.md +0 -111
  204. package/docs/superpowers/plans/2026-11-01-jev-node-opt-in.md +0 -910
  205. package/docs/superpowers/plans/2026-11-02-workflow-pane.md +0 -398
  206. package/docs/superpowers/plans/2026-11-06-graph-soft-delete.md +0 -125
  207. package/docs/superpowers/plans/2026-11-09-orchestrator-delegation.md +0 -295
  208. package/docs/superpowers/plans/2026-11-13-graph-manager-chat.md +0 -203
  209. package/docs/superpowers/plans/2026-11-14-jev-fair-use-pricing.md +0 -79
  210. package/docs/superpowers/specs/2026-10-31-work-line-summary-design.md +0 -50
  211. package/docs/superpowers/specs/2026-11-01-claude-console-sign-in-design.md +0 -176
  212. package/docs/superpowers/specs/2026-11-01-jev-node-opt-in-design.md +0 -164
  213. package/docs/superpowers/specs/2026-11-01-pr-section-design.md +0 -111
  214. package/docs/superpowers/specs/2026-11-02-workflow-pane-design.md +0 -130
  215. package/docs/superpowers/specs/2026-11-06-bundled-skills-design.md +0 -206
  216. package/docs/superpowers/specs/2026-11-09-orchestrator-delegation-design.md +0 -291
  217. package/docs/superpowers/specs/2026-11-13-graph-manager-chat-design.md +0 -182
  218. package/docs/superpowers/specs/2026-11-14-jev-fair-use-pricing-design.md +0 -156
  219. package/scripts/jev-efficiency-eval.mjs +0 -187
  220. package/scripts/jev-efficiency-live.mjs +0 -193
  221. package/scripts/zcode-engine-replay.mjs +0 -223
  222. package/tests/agent-centric-mcp-test-plan.md +0 -208
  223. package/tests/analytics-settings-test-plan.md +0 -165
  224. package/tests/browser-cli-smoke.mjs +0 -276
  225. package/tests/browser-test-plan.md +0 -280
  226. package/tests/chat-side-panel-test-plan.md +0 -309
  227. package/tests/decision-engine-test-plan.md +0 -163
  228. package/tests/default-active-jev-test-plan.md +0 -85
  229. package/tests/harness-extensions-test-plan.md +0 -113
  230. package/tests/jev-all-decisions-test-plan.md +0 -156
  231. package/tests/jev-efficiency/criteria.json +0 -158
  232. package/tests/jev-efficiency/workloads.mjs +0 -242
  233. package/tests/jev-efficiency-test-plan.md +0 -198
  234. package/tests/permissions-sandbox-probe.mjs +0 -74
  235. package/tests/permissions-test-plan.md +0 -191
  236. package/tests/product-telemetry-test-plan.md +0 -536
  237. package/tests/thinking-stream-preview-test-plan.md +0 -136
  238. package/tests/zcode-react-engine-test-plan.md +0 -396
@@ -57,6 +57,174 @@
57
57
  // The page's static controls name their glyph with a placeholder; each takes its icon here, once.
58
58
  for (const slot of document.querySelectorAll('[data-icon]')) slot.replaceWith(icon(slot.dataset.icon, Number(slot.dataset.size) || 16));
59
59
  function text(value) { return typeof value === 'string' ? value : value == null ? '' : JSON.stringify(value, null, 2); }
60
+ // Words a person reads, with their inline code set as code: a `span` between single backticks
61
+ // becomes a <code> element holding the span as text. Nothing else is interpreted — no markup is
62
+ // parsed, so the words stay literal text however they were written — and a value with no code
63
+ // span is one text node, as before.
64
+ function prose(tag, className, value) {
65
+ const el = element(tag, className); const source = String(value ?? '');
66
+ const parts = source.split(/`([^`\n]+)`/);
67
+ if (parts.length === 1) { el.textContent = source; return el; }
68
+ parts.forEach((part, index) => { if (index % 2) el.append(element('code', '', part)); else if (part) el.append(part); });
69
+ return el;
70
+ }
71
+ // Inline code, as CommonMark reads it: a run of n backticks opens a span that the next run of exactly
72
+ // n closes, so ``a`b`` holds a backtick and a run with no partner is literal text. One space just
73
+ // inside both ends is padding and is dropped; a line break inside a span reads as a space.
74
+ function codeSpans(source) {
75
+ const tokens = []; let text = '', at = 0;
76
+ const runEnd = from => { let end = from; while (source[end] === '`') end++; return end; };
77
+ while (at < source.length) {
78
+ if (source[at] !== '`') { text += source[at++]; continue; }
79
+ const open = runEnd(at), ticks = open - at;
80
+ let close = -1;
81
+ for (let scan = source.indexOf('`', open); scan >= 0; scan = source.indexOf('`', runEnd(scan))) {
82
+ if (runEnd(scan) - scan === ticks) { close = scan; break; }
83
+ }
84
+ if (close < 0) { text += source.slice(at, open); at = open; continue; }
85
+ if (text) { tokens.push(text); text = ''; }
86
+ let code = source.slice(open, close).replace(/\n/g, ' ');
87
+ if (code.length > 2 && code[0] === ' ' && code.at(-1) === ' ' && code.trim()) code = code.slice(1, -1);
88
+ tokens.push({ code });
89
+ at = close + ticks;
90
+ }
91
+ if (text) tokens.push(text);
92
+ return tokens;
93
+ }
94
+ // A span of an answer's text: its code spans set as code and **bold** as strong, each holding its words
95
+ // as text. Bold pairs its markers in order, outside code spans; a marker left without a partner stays
96
+ // as typed, as do underscores and single asterisks.
97
+ function inline(el, source) {
98
+ const pieces = [];
99
+ for (const token of codeSpans(String(source))) {
100
+ if (typeof token !== 'string') pieces.push(token);
101
+ else for (const part of token.split(/(\*\*)/)) if (part) pieces.push(part === '**' ? { marker: true } : part);
102
+ }
103
+ let pairs = pieces.filter(piece => piece.marker).length & ~1, target = el;
104
+ for (const piece of pieces) {
105
+ if (piece.marker && pairs > 0) {
106
+ pairs--;
107
+ if (target === el) { target = element('strong'); el.append(target); } else target = el;
108
+ } else if (piece.marker) target.append('**');
109
+ else if (typeof piece === 'string') target.append(piece);
110
+ else target.append(element('code', '', piece.code));
111
+ }
112
+ return el;
113
+ }
114
+ // An answer's Markdown, the subset a run's summary uses: headings, bullet and numbered lists, fenced
115
+ // code, paragraphs, and inline code and bold. Each block is an element built here with its words set
116
+ // as text (`inline`), so no markup in an answer is ever parsed as HTML, and anything else — tables,
117
+ // links, quotes — stays as the literal text it was written as.
118
+ //
119
+ // The structure is CommonMark's container model: a list item's content — its first line and every
120
+ // line that belongs to it, with the item's indentation removed — is a document of its own, read by
121
+ // the same block parser. So whatever an answer can open with, an item can too, on its first line or
122
+ // later: a fence (`- ```js`), a heading, a nested list (`- - x`), a paragraph. The block rules:
123
+ // - a fence is three or more backticks or tildes; only a bare line of the same character, at least as
124
+ // long, closes it (a four-backtick block can show a three-backtick example), and a fence left open
125
+ // runs to the end of the document it is in;
126
+ // - a line belongs to an item when it is indented to the item's text, or when it is a plain line
127
+ // that continues the item's paragraph (lazy continuation); a blank line keeps the item open only
128
+ // if the next line is indented under it, and a blank line between two items keeps one list.
129
+ const MD_FENCE = /^( {0,3})(`{3,}|~{3,})(.*)$/;
130
+ const MD_HEADING = /^ {0,3}(#{1,6})(?:[ \t]+(.*?))?(?:[ \t]+#+)?[ \t]*$/;
131
+ const MD_ITEM = /^( {0,3})([-*+]|\d{1,9}[.)])(?:( +)(.*))?$/;
132
+ const mdIndent = line => line.length - line.trimStart().length;
133
+ const mdFence = line => { const open = MD_FENCE.exec(line); return open && !(open[2][0] === '`' && open[3].includes('`')) ? open : null; };
134
+ const mdBlank = line => !line.trim();
135
+ const mdStartsBlock = line => !!mdFence(line) || MD_HEADING.test(line) || MD_ITEM.test(line);
136
+ /** Whether a fence opened in these lines is still open at their end. */
137
+ function mdFenceOpen(lines) {
138
+ let open = null;
139
+ for (const line of lines) {
140
+ if (open) { if (new RegExp(`^ {0,3}\\${open.mark}{${open.length},}[ \\t]*$`).test(line)) open = null; }
141
+ else { const fence = mdFence(line); if (fence) open = { mark: fence[2][0], length: fence[2].length }; }
142
+ }
143
+ return !!open;
144
+ }
145
+ /** Read `lines` as a document into `container`. In an item (`bare`) a paragraph is the item's own text
146
+ * rather than a <p>, as a list item's text is in the desktop's transcript. */
147
+ function mdBlocks(container, lines, bare) {
148
+ let paragraph = [], tail = 'none';
149
+ const place = node => { container.append(node); tail = 'block'; };
150
+ const flush = () => {
151
+ if (!paragraph.length) return;
152
+ const text = paragraph.join('\n'); paragraph = [];
153
+ if (!bare) { place(inline(element('p'), text)); return; }
154
+ if (tail === 'text') container.append('\n\n');
155
+ inline(container, text); tail = 'text';
156
+ };
157
+ for (let index = 0; index < lines.length;) {
158
+ const line = lines[index];
159
+ if (mdBlank(line)) { flush(); index++; continue; }
160
+ const fence = mdFence(line);
161
+ if (fence) {
162
+ flush();
163
+ const mark = fence[2][0], length = fence[2].length, pad = fence[1].length, code = [];
164
+ const closes = new RegExp(`^ {0,3}\\${mark}{${length},}[ \\t]*$`);
165
+ for (index++; index < lines.length && !closes.test(lines[index]); index++) code.push(lines[index].slice(Math.min(pad, mdIndent(lines[index]))));
166
+ index++;
167
+ const pre = element('pre'); pre.append(element('code', '', code.join('\n'))); place(pre);
168
+ continue;
169
+ }
170
+ const heading = MD_HEADING.exec(line);
171
+ if (heading) {
172
+ flush();
173
+ const level = heading[1].length, title = inline(element('div', 'markdown-heading'), heading[2] ?? '');
174
+ title.setAttribute('role', 'heading'); title.setAttribute('aria-level', String(level)); title.dataset.level = String(Math.min(level, 4));
175
+ place(title); index++;
176
+ continue;
177
+ }
178
+ if (MD_ITEM.test(line)) { flush(); index = mdList(lines, index, place); continue; }
179
+ paragraph.push(line.trim()); index++;
180
+ }
181
+ flush();
182
+ }
183
+ /** Read the list starting at `lines[start]`; return the index after it. */
184
+ function mdList(lines, start, place) {
185
+ const first = MD_ITEM.exec(lines[start]);
186
+ const ordered = /\d/.test(first[2]), kind = ordered ? first[2].slice(-1) : first[2];
187
+ const list = element(ordered ? 'ol' : 'ul');
188
+ if (ordered && parseInt(first[2], 10) !== 1) list.start = parseInt(first[2], 10);
189
+ place(list);
190
+ let index = start;
191
+ while (index < lines.length) {
192
+ const item = MD_ITEM.exec(lines[index]);
193
+ if (!item || (/\d/.test(item[2]) ? item[2].slice(-1) : item[2]) !== kind || /\d/.test(item[2]) !== ordered) break;
194
+ // The item's text starts one to four spaces after its marker; more than four is one space and the
195
+ // rest is text. Its content is that text and every following line that belongs to it.
196
+ const gap = item[3]?.length ?? 1, wide = gap > 4;
197
+ const column = item[1].length + item[2].length + (wide ? 1 : gap);
198
+ const content = [wide ? item[3].slice(1) + (item[4] ?? '') : item[4] ?? ''];
199
+ for (index++; index < lines.length; index++) {
200
+ const line = lines[index];
201
+ if (mdBlank(line)) {
202
+ // A blank line stays in the item only if the next text is indented under it.
203
+ let next = index; while (next < lines.length && mdBlank(lines[next])) next++;
204
+ if (next < lines.length && mdIndent(lines[next]) >= column) { for (; index < next; index++) content.push(''); index--; continue; }
205
+ break;
206
+ }
207
+ if (mdIndent(line) >= column) { content.push(line.slice(column)); continue; }
208
+ // A plain line right after the item's paragraph continues it (lazy continuation).
209
+ const previous = content.at(-1);
210
+ if (previous && !mdBlank(previous) && !mdStartsBlock(line) && !mdFenceOpen(content) && !MD_HEADING.test(previous) && !MD_FENCE.test(previous)) { content.push(line); continue; }
211
+ break;
212
+ }
213
+ const li = element('li'); mdBlocks(li, content, true); list.append(li);
214
+ // Blank lines between two items of the list keep it one list.
215
+ let next = index; while (next < lines.length && mdBlank(lines[next])) next++;
216
+ const sibling = next < lines.length && MD_ITEM.exec(lines[next]);
217
+ if (!sibling || (/\d/.test(sibling[2]) ? sibling[2].slice(-1) : sibling[2]) !== kind) break;
218
+ index = next;
219
+ }
220
+ return index;
221
+ }
222
+ function markdown(className, value) {
223
+ const root = element('div', className ? `${className} markdown` : 'markdown');
224
+ const lines = String(value ?? '').replace(/\r\n?/g, '\n').split('\n').map(line => line.replace(/^\t+/, tabs => ' '.repeat(tabs.length)));
225
+ mdBlocks(root, lines, false);
226
+ return root;
227
+ }
60
228
  function error(value, id = 'error', source = 'action') {
61
229
  if (id === 'error') globalErrorSource = value ? source : null;
62
230
  $(id).textContent = value || ''; $(id).hidden = !value;
@@ -159,7 +327,7 @@
159
327
  const sessionRow = s => {
160
328
  // The status mark, always in the row's fixed 16px leading slot so the names keep one edge.
161
329
  const kind = statusMark(s, unread);
162
- const row = element('button', `session-row${s.id === selectedId ? ' active' : ''}${kind ? ` row-${kind}` : ''}`); row.setAttribute('aria-current', s.id === selectedId ? 'page' : 'false'); row.title = `${s.name || 'Untitled task'} · ${s.status || 'idle'} · Right-click for actions`;
330
+ const row = element('button', `session-row${s.id === selectedId ? ' active' : ''}${kind ? ` row-${kind}` : ''}`); row.setAttribute('aria-current', s.id === selectedId ? 'page' : 'false'); row.title = `${s.name || 'Untitled task'} · ${statusWord(s)} · Right-click for actions`;
163
331
  const mark = element('span', `mark${kind ? ` ${kind}` : ''}`); if (kind) mark.append(element('span', 'sr-only', MARK_LABELS[kind]));
164
332
  const timestamp = element('time', '', age(s.updatedAt)); timestamp.dateTime = s.updatedAt || ''; row.append(mark, element('span', 'name', s.name || 'Untitled task'), timestamp); row.onclick = () => select(s.id);
165
333
  // From the keyboard the menu opens under the row: the menu key and Shift+F10 are taken here, and a
@@ -347,15 +515,27 @@
347
515
  // ring), and a finished run not opened since it changed (a small muted dot). Anything else draws
348
516
  // the empty slot.
349
517
  const MARK_LABELS = { waiting: 'Needs your input', running: 'Running', failed: 'Failed', stopped: 'Stopped', unread: 'Finished, not yet opened' };
350
- function statusMark(s, unread) {
518
+ // Where a session stands, in the one set of words every surface here uses — the title strip's
519
+ // badge, a row's tooltip, the marks above. The engine's own status (`awaiting_input`,
520
+ // `infrastructure_error`, `succeeded`…) is an identifier and is never shown. A session with no run
521
+ // yet, or one in a state this page does not know, is Ready.
522
+ const STATUS_WORDS = { waiting: 'Needs your input', running: 'Running', failed: 'Failed', stopped: 'Stopped', finished: 'Finished' };
523
+ function statusKind(s) {
351
524
  const status = String(s?.status || '');
352
525
  if (s?.pending || ['waiting', 'awaiting_input', 'awaiting-input', 'needs_clarification'].includes(status)) return 'waiting';
353
526
  if (running(s)) return 'running';
354
527
  if (['error', 'failed', 'infrastructure_error', 'exhausted'].includes(status)) return 'failed';
355
528
  if (['cancelled', 'interrupted', 'disconnected', 'stopped'].includes(status)) return 'stopped';
356
- if (unread.has(s.id)) return 'unread';
529
+ if (['succeeded', 'completed'].includes(status)) return 'finished';
357
530
  return '';
358
531
  }
532
+ function statusWord(s) { return STATUS_WORDS[statusKind(s)] || 'Ready'; }
533
+ function statusMark(s, unread) {
534
+ const kind = statusKind(s);
535
+ // A finished run carries a mark only until it is opened: the record below says which are unread.
536
+ if (kind === 'finished' || !kind) return unread.has(s.id) ? 'unread' : '';
537
+ return kind;
538
+ }
359
539
  // What this browser has seen of each session: the stamp it carried when it was last on screen. A
360
540
  // session met for the first time is taken as read at that moment, so opening the workspace does not
361
541
  // flag every finished session in the history window; a later finish moves its stamp past the record
@@ -385,7 +565,29 @@
385
565
  }
386
566
  function message(role, value, target = $('conversation')) {
387
567
  if (!value) return;
388
- const item = element('article', `message ${role}`); item.append(element('div', 'message-label', role === 'user' ? 'You' : 'Andorra'), element('div', 'body', value)); target.append(item);
568
+ // A person's words stay as written; Andorra's answer is Markdown, drawn in its safe subset.
569
+ const item = element('article', `message ${role}`); item.append(element('div', 'message-label', role === 'user' ? 'You' : 'Andorra'), role === 'user' ? prose('div', 'body', value) : markdown('body', value)); target.append(item);
570
+ }
571
+ // The words for what a run recorded, shared by the conversation's notes and the Activity log. An
572
+ // event's type (`graph.node.started`, `session.prompt`…) is an identifier and is never shown: a type
573
+ // this table does not name yet still reads as words, its parts with the product's own nouns.
574
+ const KIND_WORDS = {
575
+ 'graph.started': 'Graph started', 'graph.completed': 'Graph finished', 'graph.stopped': 'Graph stopped',
576
+ 'graph.node.started': 'Step started', 'graph.node.completed': 'Step finished', 'graph.node.failed': 'Step failed',
577
+ 'graph.todos.updated': 'Plan updated', 'agent.modifier.todos.updated': 'Plan updated',
578
+ 'node.tool.started': 'Tool started', 'node.tool.completed': 'Tool finished', 'node.tool.failed': 'Tool failed',
579
+ 'node.model.response': 'Model response', 'agent.message': 'Message', 'node.assistant.message': 'Message', 'assistant.message': 'Message', 'agent.assistant.text': 'Message',
580
+ 'subagent.started': 'Subagent started', 'subagent.completed': 'Subagent finished', 'browser.notice': 'Notice',
581
+ 'session.prompt': 'Prompt', 'session.started': 'Task started', 'session.reopened': 'Task reopened', 'session.resumed': 'Task resumed', 'session.ended': 'Task ended', 'session.context': 'Context',
582
+ 'run.started': 'Run started', 'run.finished': 'Run finished', 'run.steered': 'Direction added',
583
+ 'model.request': 'Model request', 'model.response': 'Model response', 'model.error': 'Model error',
584
+ };
585
+ const KIND_NOUNS = { graph: 'graph', node: 'step', session: 'task', todos: 'plan' };
586
+ function kindWords(type) {
587
+ const kind = String(type || '');
588
+ if (Object.hasOwn(KIND_WORDS, kind)) return KIND_WORDS[kind];
589
+ const words = kind.split(/[._-]+/).filter(Boolean).map(part => KIND_NOUNS[part.toLowerCase()] || part.toLowerCase()).join(' ');
590
+ return words ? words[0].toUpperCase() + words.slice(1) : 'Event';
389
591
  }
390
592
  function renderConversation(s) {
391
593
  const key = JSON.stringify([s?.id, s?.history, s?.events, s?.status, s?.prompt]);
@@ -427,7 +629,7 @@
427
629
  } else if (/text.*delta|delta.*text/.test(event.type)) { group.stream += text(data.delta || data.text); }
428
630
  else if (event.type === 'browser.notice') activity.append(element('div', 'event-note', text(data.message)));
429
631
  else if (event.type === 'node.model.response' || event.type === 'agent.message' || event.type === 'node.assistant.message' || event.type === 'assistant.message' || event.type === 'agent.assistant.text') { if (data.text || data.content) { const value = text(data.text || data.content); if (!completionSummaries.has(value)) message('assistant', value, activity); group.stream = ''; } }
430
- else if (/failed|error|retry|subagent\.(started|completed)|graph.node.started/.test(event.type)) activity.append(element('div', 'event-note', text(data.reason || data.message || data.nodeName || `${event.type.replaceAll('.', ' ')}${data.role ? ` · ${data.role}` : ''}`)));
632
+ else if (/failed|error|retry|subagent\.(started|completed)|graph.node.started/.test(event.type)) { const detail = text(data.reason || data.message || data.nodeName || data.nodeId || data.role); activity.append(element('div', 'event-note', `${kindWords(event.type)}${detail ? ` · ${detail}` : ''}`)); }
431
633
  }
432
634
  for (const group of activities.values()) if (group.stream && !completionSummaries.has(group.stream)) message('assistant', group.stream, group.body);
433
635
  // Associate each run's activity with its saved turn rather than replaying all
@@ -441,7 +643,7 @@
441
643
  const completion = turn.completion || outcome?.completion;
442
644
  const summary = text(completion?.summary) || (typeof outcome === 'string' ? outcome : text(outcome?.summary || outcome?.reason));
443
645
  const tests = Array.isArray(completion?.tests) ? completion.tests : [];
444
- message('assistant', [summary, tests.length ? `Tests\n${tests.map(result => `- ${text(result)}`).join('\n')}` : ''].filter(Boolean).join('\n\n'));
646
+ message('assistant', [summary, tests.length ? `### Tests\n${tests.map(result => `- ${text(result)}`).join('\n')}` : ''].filter(Boolean).join('\n\n'));
445
647
  }
446
648
  if (s.prompt) {
447
649
  message('user', s.prompt);
@@ -455,14 +657,16 @@
455
657
  container.append(group.disclosure);
456
658
  }
457
659
  if (!container.childElementCount) container.append(element('p', 'muted', 'This task is ready. Send a prompt to begin.'));
458
- if (running(s)) container.append(element('div', 'event-note', s.pending ? 'Waiting for your input…' : 'Andorra is working…'));
660
+ // The run waiting on the person says the one phrase its card and badge say (P-ATN-07).
661
+ if (running(s)) container.append(element('div', 'event-note', s.pending ? 'Needs your input' : 'Andorra is working…'));
459
662
  container.scrollTop = atBottom ? container.scrollHeight : oldScroll;
460
663
  }
461
664
  function renderPending(s) {
462
665
  const pending = s?.pending; const key = JSON.stringify([s?.id, pending]);
463
666
  if (key === pendingKey) return; pendingKey = key;
464
667
  const panel = $('pending'); panel.hidden = !pending; panel.replaceChildren(); if (!pending) return;
465
- panel.append(element('h3', '', pending.kind === 'approval' ? 'Approval needed' : 'Andorra needs your input'), element('p', '', pending.question || pending.message));
668
+ // One phrase for a run waiting on the person, whatever it asks (P-ATN-07): the question says what.
669
+ panel.append(element('h3', '', 'Needs your input'), prose('p', '', pending.question || pending.message));
466
670
  const form = element('form');
467
671
  const answer = async value => answerSession(s, pending, value);
468
672
  if (pending.kind === 'approval') {
@@ -490,7 +694,7 @@
490
694
  function render() {
491
695
  const s = current(); renderProjects(); renderConversation(s); renderPending(s); renderControls();
492
696
  $('session-title').textContent = s?.name || 'Your workspace'; $('workspace-path').textContent = s?.workspace || ''; $('workspace-path').title = s?.workspace || '';
493
- $('run-status').textContent = s?.pending ? 'Input needed' : s?.status || 'Ready';
697
+ $('run-status').textContent = statusWord(s);
494
698
  const todos = s?.todos || []; $('todos').replaceChildren();
495
699
  // A to-do is a plain line in every state — the marker and the ink say where it stands; only the
496
700
  // approval card above the composer is a card.
@@ -557,8 +761,17 @@
557
761
  catch (e) { error(e.message); }
558
762
  finally { if (themeSaving === saving) { themeSaving = null; refresh(); } }
559
763
  };
764
+ // The toast: one notice at a time, its own close button, and Escape when nothing else claims the key.
560
765
  let toastTimer;
561
- function toast(value) { clearTimeout(toastTimer); $('toast').textContent = value; $('toast').hidden = false; toastTimer = setTimeout(() => { $('toast').hidden = true; }, 2500); }
766
+ function toast(value) { clearTimeout(toastTimer); $('toast-text').textContent = value; $('toast').hidden = false; toastTimer = setTimeout(hideToast, 2500); }
767
+ function hideToast() {
768
+ clearTimeout(toastTimer); if ($('toast').hidden) return;
769
+ // The close button is about to vanish: a keyboard user who pressed it keeps a place on the page.
770
+ const hadFocus = $('toast').contains(document.activeElement);
771
+ $('toast').hidden = true;
772
+ if (hadFocus) $('conversation').focus();
773
+ }
774
+ $('toast-close').onclick = hideToast;
562
775
  // The session menu: the desktop rail's right-click actions. It belongs to a session id, not a row, because
563
776
  // the sidebar re-renders on every poll that changes it.
564
777
  let menu = null;
@@ -604,8 +817,15 @@
604
817
  }
605
818
  document.addEventListener('pointerdown', e => { if (menu && !menu.el.contains(e.target)) closeMenu(false); }, true);
606
819
  // Escape is the way out of a drag as of everything else here: the carried group goes back, the
607
- // landing line and any refresh that queued itself mid-drag go with it.
608
- document.addEventListener('keydown', e => { if (e.key === 'Escape' && projectDragId !== null) endProjectDrag(); });
820
+ // landing line and any refresh that queued itself mid-drag go with it. With no drag it dismisses the
821
+ // toast, unless an open menu or dialog, or a field with text in it (a search box clears itself on
822
+ // Escape), has claimed the key.
823
+ document.addEventListener('keydown', e => {
824
+ if (e.key !== 'Escape' || e.isComposing) return;
825
+ if (projectDragId !== null) { endProjectDrag(); return; }
826
+ const field = e.target instanceof HTMLInputElement && e.target.value !== '';
827
+ if (!e.defaultPrevented && !menu && !field && !document.querySelector('dialog[open]')) hideToast();
828
+ });
609
829
  addEventListener('blur', () => closeMenu(false)); addEventListener('resize', () => closeMenu(false));
610
830
  $('projects').addEventListener('scroll', () => closeMenu(false));
611
831
  let renaming = null, deleting = null;
@@ -632,10 +852,12 @@
632
852
  let trajectory = null, trajectoryGeneration = 0;
633
853
  function recordSummary(record) {
634
854
  const data = record.data || {}, event = data.event || {}, detail = event.data || {};
635
- if (data.oversized) return [record.type, `${Math.round(data.bytes / 1024)} KB — too large to show here; download the log to read it`];
636
- const kind = record.type === 'runtime.event' ? event.type || 'event' : record.type;
855
+ if (data.oversized) return [kindWords(record.type), `${Math.round(data.bytes / 1024)} KB — too large to show here; download the log to read it`];
856
+ const kind = kindWords(record.type === 'runtime.event' ? event.type : record.type);
637
857
  const duration = Number.isFinite(data.durationMs) ? ` · ${(data.durationMs / 1000).toFixed(1)}s` : '';
638
- const first = [data.task, detail.name, detail.nodeName, detail.message, detail.reason, detail.text, detail.content, data.model && `${data.model}${duration}`, data.status, data.error?.message || data.error]
858
+ // A run's own status is the engine's identifier; the log names it with the page's status words.
859
+ const status = typeof data.status === 'string' && data.status ? STATUS_WORDS[statusKind({ status: data.status })] ?? data.status : undefined;
860
+ const first = [data.task, detail.name, detail.nodeName, detail.nodeId, detail.message, detail.reason, detail.text, detail.content, data.model && `${data.model}${duration}`, status, data.error?.message || data.error]
639
861
  .find(value => typeof value === 'string' && value.trim());
640
862
  return [kind, first ? first.trim().split('\n')[0].slice(0, 200) : ''];
641
863
  }
@@ -1,13 +1,13 @@
1
1
  <!doctype html>
2
2
  <html lang="en">
3
- <head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><meta name="color-scheme" content="dark light"><title>Andorra Code — Workspace</title><link rel="icon" type="image/png" href="/andorra-logo.png"><link rel="stylesheet" href="/tokens.css"><link rel="stylesheet" href="/style.css"><script src="/app.js" defer></script></head>
3
+ <head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><meta name="color-scheme" content="dark light"><title>Workspace · Andorra Code</title><link rel="icon" type="image/png" href="/andorra-logo.png"><link rel="stylesheet" href="/tokens.css"><link rel="stylesheet" href="/style.css"><script src="/app.js" defer></script></head>
4
4
  <body>
5
- <aside class="sidebar"><header class="brand"><img class="brand-mark" src="/andorra-logo.png" alt=""><div>Andorra Code<small>Workspace</small></div></header><button class="new-session" id="new-session"><i data-icon="plus"></i>New Task</button><label class="search"><span class="sr-only">Search projects and tasks</span><input id="search" type="search" placeholder="Search tasks…"></label><div class="section-label">Projects <span id="session-count"></span></div><nav id="projects" aria-label="Projects and tasks"></nav><footer class="sidebar-footer"><span id="connection" role="status">Connecting…</span><button id="settings" aria-label="Open settings"><i data-icon="settings"></i>Settings</button></footer></aside>
6
- <main><header class="topbar"><div class="session-heading"><strong id="session-title">Your workspace</strong><span id="workspace-path"></span></div><span id="run-status" class="badge">Ready</span><button id="toggle-progress" aria-expanded="true" aria-controls="progress-panel">Progress</button><button id="theme" class="icon-button" aria-label="Switch to light theme"><i data-icon="sun-moon"></i></button></header><div class="work-area"><section class="chat"><div id="conversation" class="conversation" tabindex="0" aria-label="Conversation"><div class="welcome"><img class="welcome-mark" src="/andorra-logo.png" alt=""><h1>A place for your work</h1><p>Select a task or open a project to start.</p></div></div><section id="pending" class="pending-card" aria-label="Your input is needed" hidden></section><div class="composer-wrap"><form id="composer" class="composer"><label class="sr-only" for="prompt">Prompt or direction for this task</label><textarea id="prompt" placeholder="Ask Andorra to work on your project…" rows="3"></textarea><div class="composer-footer"><span id="composer-hint">Enter to send · Shift+Enter for a new line</span><div><button id="cancel" type="button" hidden>Stop Run</button><button id="send" class="primary" type="submit" disabled><span id="send-label">Send</span><i data-icon="arrow-up"></i></button></div></div></form><div id="error" class="error" role="alert" hidden></div></div></section><aside class="progress-panel" id="progress-panel"><header><strong>Progress</strong><span id="todo-count">0/0</span></header><ol id="todos"></ol><p id="progress-empty" class="muted">The agent’s plan will appear here as it works.</p><div class="run-details" id="run-details"></div></aside></div></main>
7
- <dialog id="new-dialog"><form id="new-form"><header><h2>Open a project</h2><button type="button" class="icon-button" data-close="new-dialog" aria-label="Close"><i data-icon="x"></i></button></header><p>Create a task in a folder on this computer. Existing CLI projects appear automatically.</p><label>Project folder<input id="new-workspace" required placeholder="C:\Users\you\projects\my-project" autocomplete="off"></label><div id="new-error" class="error" role="alert" hidden></div><footer><button type="button" data-close="new-dialog">Cancel</button><button type="submit" class="primary">Create Task</button></footer></form></dialog>
5
+ <aside class="sidebar"><header class="brand"><img class="brand-mark" src="/andorra-logo.png" alt=""><div>Andorra Code<small>Workspace</small></div></header><button class="new-session" id="new-session"><i data-icon="plus"></i>New Task</button><label class="search"><span class="sr-only">Search projects and tasks</span><input id="search" type="search" placeholder="Search tasks…"></label><div class="section-label">Projects <span id="session-count"></span></div><nav id="projects" aria-label="Projects and tasks"></nav><footer class="sidebar-footer"><span id="connection" role="status">Connecting…</span><button id="settings" aria-label="Open settings"><i data-icon="settings"></i><span class="button-label">Settings</span></button></footer></aside>
6
+ <main><header class="topbar"><div class="session-heading"><strong id="session-title">Your workspace</strong><span id="workspace-path"></span></div><span id="run-status" class="badge">Ready</span><button id="toggle-progress" aria-expanded="true" aria-controls="progress-panel">Progress</button><button id="theme" class="icon-button" aria-label="Switch to light theme"><i data-icon="sun-moon"></i></button></header><div class="work-area"><section class="chat"><div id="conversation" class="conversation" tabindex="0" aria-label="Conversation"><div class="welcome"><img class="welcome-mark" src="/andorra-logo.png" alt=""><h1>A place for your work</h1><p>Select a task or open a project to start.</p></div></div><section id="pending" class="pending-card" aria-label="Your input is needed" hidden></section><div class="composer-wrap"><form id="composer" class="composer"><label class="sr-only" for="prompt">Prompt or direction for this task</label><textarea id="prompt" placeholder="Ask Andorra to work on your project…" rows="3"></textarea><div class="composer-footer"><span id="composer-hint">Enter to send · Shift+Enter for a new line</span><div><button id="cancel" type="button" hidden>Stop Run</button><button id="send" type="submit" disabled><span id="send-label">Send</span><i data-icon="arrow-up"></i></button></div></div></form><div id="error" class="error" role="alert" hidden></div></div></section><aside class="progress-panel" id="progress-panel"><header><strong>Progress</strong><span id="todo-count">0/0</span></header><ol id="todos"></ol><p id="progress-empty" class="muted">The agent’s plan will appear here as it works.</p><div class="run-details" id="run-details"></div></aside></div></main>
7
+ <dialog id="new-dialog"><form id="new-form"><header><h2>Open a project</h2><button type="button" class="icon-button" data-close="new-dialog" aria-label="Close"><i data-icon="x"></i></button></header><p>Create a task in a folder on this computer. Existing CLI projects appear automatically.</p><label>Project folder<input id="new-workspace" required placeholder="~/projects/my-project" autocomplete="off"></label><div id="new-error" class="error" role="alert" hidden></div><footer><button type="button" data-close="new-dialog">Cancel</button><button type="submit" class="primary">Create Task</button></footer></form></dialog>
8
8
  <dialog id="settings-dialog"><form id="settings-form"><header><h2>Workspace settings</h2><button type="button" class="icon-button" data-close="settings-dialog" aria-label="Close"><i data-icon="x"></i></button></header><label for="max-age">Show tasks active in the last</label><input id="max-age" type="number" min="0" max="36500" step="1" required aria-describedby="max-age-help"><span class="muted" id="max-age-help">days. Use 0 to show all history. Hidden tasks remain saved.</span><label for="theme-setting">Appearance</label><select id="theme-setting"><option value="system">System default</option><option value="light">Light</option><option value="dark">Dark</option></select><div id="settings-error" class="error" role="alert" hidden></div><footer><button type="button" data-close="settings-dialog">Cancel</button><button type="submit" class="primary">Save Settings</button></footer></form></dialog>
9
9
  <dialog id="rename-dialog"><form id="rename-form"><header><h2>Rename task</h2><button type="button" class="icon-button" data-close="rename-dialog" aria-label="Close"><i data-icon="x"></i></button></header><label for="rename-name">Name</label><input id="rename-name" required maxlength="200" autocomplete="off"><div id="rename-error" class="error" role="alert" hidden></div><footer><button type="button" data-close="rename-dialog">Cancel</button><button type="submit" class="primary">Rename</button></footer></form></dialog>
10
10
  <dialog id="delete-dialog"><form id="delete-form"><header><h2>Delete task</h2><button type="button" class="icon-button" data-close="delete-dialog" aria-label="Close"><i data-icon="x"></i></button></header><p id="delete-text"></p><div id="delete-error" class="error" role="alert" hidden></div><footer><button type="button" data-close="delete-dialog">Cancel</button><button type="submit" class="primary">Delete</button></footer></form></dialog>
11
11
  <dialog id="trajectory-dialog" class="trajectory-dialog" aria-labelledby="trajectory-title"><header><div class="trajectory-heading"><h2 id="trajectory-title">Activity</h2><span id="trajectory-meta"></span></div><div class="trajectory-actions"><div id="trajectory-sources" role="group" aria-label="Log"></div><button id="trajectory-download" type="button">Download .jsonl</button><button type="button" class="icon-button" data-close="trajectory-dialog" aria-label="Close"><i data-icon="x"></i></button></div></header><ol id="trajectory-records" class="trajectory-records" aria-label="Activity entries"></ol><p id="trajectory-empty" class="muted" hidden></p><div id="trajectory-error" class="error" role="alert" hidden></div><footer><button id="trajectory-more" type="button" hidden>Load More</button></footer></dialog>
12
- <div id="toast" class="toast" role="status" aria-live="polite" hidden></div>
12
+ <div id="toast-region" role="status" aria-live="polite"><div id="toast" class="toast" hidden><span id="toast-text"></span><button id="toast-close" type="button" class="icon-button" aria-label="Dismiss"><i data-icon="x"></i></button></div></div>
13
13
  </body></html>