@andorra-labs/code 0.1.10 → 0.1.11
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.
- package/README.md +28 -208
- package/THIRD_PARTY_NOTICES.md +15 -0
- package/dist/src/agent-execution.js +36 -0
- package/dist/src/app-server/protocol.d.ts +1 -0
- package/dist/src/app-server.d.ts +34 -1
- package/dist/src/app-server.js +264 -54
- package/dist/src/automation-service.js +1 -1
- package/dist/src/browser-session.d.ts +8 -0
- package/dist/src/browser-session.js +27 -1
- package/dist/src/browser-ui/app.js +237 -15
- package/dist/src/browser-ui/index.html +5 -5
- package/dist/src/browser-ui/style.css +110 -65
- package/dist/src/browser-ui/tokens.css +27 -26
- package/dist/src/coding-tools.d.ts +24 -0
- package/dist/src/coding-tools.js +71 -8
- package/dist/src/command-screens.js +1 -1
- package/dist/src/commands.js +1 -1
- package/dist/src/completion-gates.d.ts +42 -7
- package/dist/src/completion-gates.js +55 -9
- package/dist/src/completion.d.ts +8 -0
- package/dist/src/completion.js +19 -1
- package/dist/src/dashboard-view.js +2 -2
- package/dist/src/deadline.js +4 -0
- package/dist/src/graph-manager-chat.js +13 -13
- package/dist/src/graph-runner.js +39 -2
- package/dist/src/graph-server.js +9 -9
- package/dist/src/graph-sync.d.ts +8 -0
- package/dist/src/graph-sync.js +54 -3
- package/dist/src/graph-tool.js +1 -1
- package/dist/src/graph-ui/app.js +262 -93
- package/dist/src/graph-ui/controls.css +43 -22
- package/dist/src/graph-ui/controls.js +31 -1
- package/dist/src/graph-ui/embed.js +62 -13
- package/dist/src/graph-ui/icons.js +4 -0
- package/dist/src/graph-ui/index.html +3 -3
- package/dist/src/graph-ui/manager-state.js +2 -2
- package/dist/src/graph-ui/manager.css +19 -18
- package/dist/src/graph-ui/manager.js +11 -11
- package/dist/src/graph-ui/skill-picker.js +1 -1
- package/dist/src/graph-ui/studio-canvas.js +8 -8
- package/dist/src/graph-ui/studio.css +18 -15
- package/dist/src/graph-ui/studio.js +92 -35
- package/dist/src/graph-ui/style.css +122 -79
- package/dist/src/graph-ui/theme.js +2 -2
- package/dist/src/graph-ui/tokens.css +33 -29
- package/dist/src/graphs.d.ts +3 -2
- package/dist/src/graphs.js +3 -2
- package/dist/src/membership-errors.d.ts +7 -1
- package/dist/src/membership-errors.js +9 -3
- package/dist/src/pull-requests.d.ts +42 -6
- package/dist/src/pull-requests.js +11 -3
- package/dist/src/react-runtime.js +121 -14
- package/dist/src/read-document-doc.d.ts +20 -0
- package/dist/src/read-document-doc.js +524 -0
- package/dist/src/read-document-docx.d.ts +21 -0
- package/dist/src/read-document-docx.js +584 -0
- package/dist/src/read-document-text.d.ts +29 -0
- package/dist/src/read-document-text.js +67 -0
- package/dist/src/read-document-tool.d.ts +48 -0
- package/dist/src/read-document-tool.js +162 -0
- package/dist/src/read-document.d.ts +78 -0
- package/dist/src/read-document.js +353 -0
- package/dist/src/read-image.d.ts +29 -2
- package/dist/src/read-image.js +42 -17
- package/dist/src/runtime.d.ts +19 -0
- package/dist/src/runtime.js +10 -1
- package/dist/src/session-changes.d.ts +6 -1
- package/dist/src/session-changes.js +13 -5
- package/dist/src/side-panel.d.ts +6 -1
- package/dist/src/side-panel.js +12 -10
- package/dist/src/skills/bundled/create-skill/SKILL.md +1 -1
- package/dist/src/skills/bundled/diagram/SKILL.md +1 -1
- package/dist/src/skills/bundled/graph-manager/SKILL.md +37 -3
- package/dist/src/skills/bundled/graph-manager/patterns.md +27 -0
- package/dist/src/skills/bundled/provenance.json +4 -4
- package/dist/src/skills/runtime-skills.js +3 -3
- package/dist/src/stall-recovery.d.ts +6 -2
- package/dist/src/stall-recovery.js +7 -2
- package/dist/src/terminal-ui.js +2 -2
- package/dist/src/time-limit.d.ts +53 -0
- package/dist/src/time-limit.js +79 -0
- package/dist/src/tools.js +92 -7
- package/dist/src/transcript.js +1 -1
- package/dist/src/types.d.ts +6 -0
- package/dist/src/usage-analytics.d.ts +3 -1
- package/dist/src/usage-analytics.js +16 -2
- package/package.json +6 -26
- package/docs/README.md +0 -36
- package/docs/agents/README.md +0 -62
- package/docs/agents/install-for-agents.md +0 -56
- package/docs/agents/mcp-server.md +0 -212
- package/docs/agents/subagent-mode.md +0 -149
- package/docs/concepts/README.md +0 -47
- package/docs/concepts/jev-actionable-routing.md +0 -113
- package/docs/concepts/jev-decision-thresholds.md +0 -412
- package/docs/concepts/jev-efficiency.md +0 -217
- package/docs/concepts/jev-eval-2026-11-01.md +0 -78
- package/docs/concepts/limits.md +0 -52
- package/docs/concepts/memory.md +0 -10
- package/docs/concepts/security.md +0 -50
- package/docs/concepts/workspace-instructions.md +0 -29
- package/docs/getting-started/README.md +0 -82
- package/docs/getting-started/accounts.md +0 -78
- package/docs/getting-started/configure-providers.md +0 -132
- package/docs/guides/README.md +0 -13
- package/docs/guides/browser.md +0 -39
- package/docs/guides/desktop-app.md +0 -414
- package/docs/guides/extensions.md +0 -102
- package/docs/guides/graph-builder.md +0 -116
- package/docs/guides/headless.md +0 -46
- package/docs/guides/tui.md +0 -75
- package/docs/guides/update.md +0 -70
- package/docs/guides/web-search.md +0 -51
- package/docs/guides/windows-code-signing.md +0 -319
- package/docs/llms.txt +0 -45
- package/docs/reference/README.md +0 -7
- package/docs/reference/cli.md +0 -76
- package/docs/reference/config.md +0 -91
- package/docs/reference/slash-commands.md +0 -59
- package/docs/superpowers/plans/2026-11-01-claude-console-sign-in.md +0 -111
- package/docs/superpowers/plans/2026-11-01-jev-node-opt-in.md +0 -910
- package/docs/superpowers/plans/2026-11-02-workflow-pane.md +0 -398
- package/docs/superpowers/plans/2026-11-06-graph-soft-delete.md +0 -125
- package/docs/superpowers/plans/2026-11-09-orchestrator-delegation.md +0 -295
- package/docs/superpowers/plans/2026-11-13-graph-manager-chat.md +0 -203
- package/docs/superpowers/plans/2026-11-14-jev-fair-use-pricing.md +0 -79
- package/docs/superpowers/specs/2026-10-31-work-line-summary-design.md +0 -50
- package/docs/superpowers/specs/2026-11-01-claude-console-sign-in-design.md +0 -176
- package/docs/superpowers/specs/2026-11-01-jev-node-opt-in-design.md +0 -164
- package/docs/superpowers/specs/2026-11-01-pr-section-design.md +0 -111
- package/docs/superpowers/specs/2026-11-02-workflow-pane-design.md +0 -130
- package/docs/superpowers/specs/2026-11-06-bundled-skills-design.md +0 -206
- package/docs/superpowers/specs/2026-11-09-orchestrator-delegation-design.md +0 -291
- package/docs/superpowers/specs/2026-11-13-graph-manager-chat-design.md +0 -182
- package/docs/superpowers/specs/2026-11-14-jev-fair-use-pricing-design.md +0 -156
- package/scripts/jev-efficiency-eval.mjs +0 -187
- package/scripts/jev-efficiency-live.mjs +0 -193
- package/scripts/zcode-engine-replay.mjs +0 -223
- package/tests/agent-centric-mcp-test-plan.md +0 -208
- package/tests/analytics-settings-test-plan.md +0 -165
- package/tests/browser-cli-smoke.mjs +0 -276
- package/tests/browser-test-plan.md +0 -280
- package/tests/chat-side-panel-test-plan.md +0 -309
- package/tests/decision-engine-test-plan.md +0 -163
- package/tests/default-active-jev-test-plan.md +0 -85
- package/tests/harness-extensions-test-plan.md +0 -113
- package/tests/jev-all-decisions-test-plan.md +0 -156
- package/tests/jev-efficiency/criteria.json +0 -158
- package/tests/jev-efficiency/workloads.mjs +0 -242
- package/tests/jev-efficiency-test-plan.md +0 -198
- package/tests/permissions-sandbox-probe.mjs +0 -74
- package/tests/permissions-test-plan.md +0 -191
- package/tests/product-telemetry-test-plan.md +0 -536
- package/tests/thinking-stream-preview-test-plan.md +0 -136
- package/tests/zcode-react-engine-test-plan.md +0 -396
|
@@ -57,7 +57,7 @@ async function status(directory) {
|
|
|
57
57
|
const live = await contact(directory, 'status');
|
|
58
58
|
const registered = await installed(directory);
|
|
59
59
|
return { running: !!live, installed: registered, installSupported: process.platform === 'win32', ...(live ? { pid: live.pid } : {}),
|
|
60
|
-
detail: live ? 'Background scheduler is running. The computer must stay awake and signed in.' : registered ? 'Start at sign-in is installed; the background scheduler is stopped.' : 'Background scheduler is stopped. App-open schedules still run while Andorra is open.' };
|
|
60
|
+
detail: live ? 'Background scheduler is running. The computer must stay awake and signed in.' : registered ? 'Start at sign-in is installed; the background scheduler is stopped.' : 'Background scheduler is stopped. App-open schedules still run while Andorra Code is open.' };
|
|
61
61
|
}
|
|
62
62
|
/** Authenticated loopback control avoids signalling an unrelated process after PID reuse. */
|
|
63
63
|
export async function runAutomationDaemon(directory = configDirectory(), externalSignal) {
|
|
@@ -6,6 +6,14 @@ export declare function isBrowserToolName(name: string): boolean;
|
|
|
6
6
|
/** Project telemetry before any event consumer can persist a browser input. */
|
|
7
7
|
export declare function browserEventArguments(args: unknown): unknown;
|
|
8
8
|
export declare function disposeBrowserSessions(identity?: object): Promise<void>;
|
|
9
|
+
/**
|
|
10
|
+
* Said when no channel has anything to launch. A container or server image often has no browser
|
|
11
|
+
* at all, and "install Chrome/Edge" sent agents off to install one mid-task; the useful answer is
|
|
12
|
+
* to stop calling browser tools and reach the page another way.
|
|
13
|
+
*/
|
|
14
|
+
export declare const MISSING_BROWSER_MESSAGE = "Browser unavailable: no Chromium, Chrome or Edge is installed in this environment, so browser tools cannot run here. Do not call them again in this run. Fetch pages with curl or a script instead, and say in your summary that no browser check was possible. Only if the task itself needs a real browser, install one with `npx playwright-core install --with-deps chromium`.";
|
|
15
|
+
/** Forget a remembered "no browser" result; for tests and for a caller that just installed one. */
|
|
16
|
+
export declare function resetBrowserAvailability(): void;
|
|
9
17
|
/**
|
|
10
18
|
* Reserve one screenshot against the image budget every browser tool in this
|
|
11
19
|
* agent tool batch shares. The reservation is a fixed estimate; `commit` trims
|
|
@@ -147,6 +147,9 @@ export async function disposeBrowserSessions(identity) {
|
|
|
147
147
|
}
|
|
148
148
|
/** Headless isolated profile; never attaches to the user's existing browser. */
|
|
149
149
|
async function launch(signal) {
|
|
150
|
+
if (missingBrowser && Date.now() < missingBrowser.until)
|
|
151
|
+
throw new Error(missingBrowser.message);
|
|
152
|
+
missingBrowser = undefined;
|
|
150
153
|
const specifier = 'playwright-core';
|
|
151
154
|
const { chromium } = await import(specifier);
|
|
152
155
|
const failures = [];
|
|
@@ -183,8 +186,31 @@ async function launch(signal) {
|
|
|
183
186
|
failures.push((error instanceof Error ? error.message : String(error)).split('\n')[0]);
|
|
184
187
|
}
|
|
185
188
|
}
|
|
186
|
-
|
|
189
|
+
const detail = failures.join('; ').slice(0, 1000);
|
|
190
|
+
if (failures.length && failures.every(noBrowserInstalled)) {
|
|
191
|
+
// Nothing to launch is a fact about the machine, not about this call: remember it so the next
|
|
192
|
+
// call answers at once instead of trying three channels again, and tell the model what to do
|
|
193
|
+
// in its place. The memory is short, so a browser installed during the run is still found.
|
|
194
|
+
missingBrowser = { until: Date.now() + MISSING_BROWSER_MEMORY_MS, message: `${MISSING_BROWSER_MESSAGE} ${detail}` };
|
|
195
|
+
throw new Error(missingBrowser.message);
|
|
196
|
+
}
|
|
197
|
+
throw new Error(`Browser unavailable: install Chrome/Edge or the Chromium version required by playwright-core. ${detail}`);
|
|
198
|
+
}
|
|
199
|
+
/** How long a "no browser is installed" result is reused before the machine is asked again. */
|
|
200
|
+
const MISSING_BROWSER_MEMORY_MS = 60_000;
|
|
201
|
+
/**
|
|
202
|
+
* Said when no channel has anything to launch. A container or server image often has no browser
|
|
203
|
+
* at all, and "install Chrome/Edge" sent agents off to install one mid-task; the useful answer is
|
|
204
|
+
* to stop calling browser tools and reach the page another way.
|
|
205
|
+
*/
|
|
206
|
+
export const MISSING_BROWSER_MESSAGE = 'Browser unavailable: no Chromium, Chrome or Edge is installed in this environment, so browser tools cannot run here. Do not call them again in this run. Fetch pages with curl or a script instead, and say in your summary that no browser check was possible. Only if the task itself needs a real browser, install one with `npx playwright-core install --with-deps chromium`.';
|
|
207
|
+
let missingBrowser;
|
|
208
|
+
/** Playwright's wording for a channel or bundled build that is not on disk. */
|
|
209
|
+
function noBrowserInstalled(failure) {
|
|
210
|
+
return /Executable doesn't exist|is not found at|distribution '[^']+' is not found|Failed to find|ENOENT/i.test(failure);
|
|
187
211
|
}
|
|
212
|
+
/** Forget a remembered "no browser" result; for tests and for a caller that just installed one. */
|
|
213
|
+
export function resetBrowserAvailability() { missingBrowser = undefined; }
|
|
188
214
|
class BrowserOperationTimeoutError extends Error {
|
|
189
215
|
}
|
|
190
216
|
/** Own late transport settlement without awaiting an unresponsive browser close. */
|
|
@@ -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
|
|
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
|
-
|
|
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 (
|
|
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
|
-
|
|
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))
|
|
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 ?
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
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(
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
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
|
|
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"
|
|
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="
|
|
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"
|
|
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>
|