@andorra-labs/code 0.1.8 → 0.1.10

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 (187) hide show
  1. package/THIRD_PARTY_NOTICES.md +2 -1
  2. package/dist/src/account-presentation.d.ts +11 -0
  3. package/dist/src/account-presentation.js +29 -2
  4. package/dist/src/agent-execution.js +57 -4
  5. package/dist/src/agent-mcp.d.ts +12 -0
  6. package/dist/src/agent-mcp.js +81 -2
  7. package/dist/src/app-server/protocol.d.ts +120 -1
  8. package/dist/src/app-server/protocol.js +8 -1
  9. package/dist/src/app-server/reasoning.d.ts +0 -8
  10. package/dist/src/app-server/reasoning.js +15 -28
  11. package/dist/src/app-server.d.ts +32 -0
  12. package/dist/src/app-server.js +214 -21
  13. package/dist/src/auth/AuthManager.d.ts +15 -0
  14. package/dist/src/auth/AuthManager.js +66 -7
  15. package/dist/src/auth/index.d.ts +1 -1
  16. package/dist/src/auth/index.js +1 -1
  17. package/dist/src/auth/store.d.ts +17 -1
  18. package/dist/src/auth/store.js +25 -2
  19. package/dist/src/browser-runner.js +1 -2
  20. package/dist/src/browser-server.js +10 -2
  21. package/dist/src/browser-session.js +6 -2
  22. package/dist/src/browser-stealth.d.ts +29 -0
  23. package/dist/src/browser-stealth.js +166 -0
  24. package/dist/src/browser-ui/app.js +123 -28
  25. package/dist/src/browser-ui/icons/chevron-right.svg +8 -0
  26. package/dist/src/browser-ui/index.html +8 -8
  27. package/dist/src/browser-ui/style.css +199 -171
  28. package/dist/src/browser-ui/tokens.css +198 -0
  29. package/dist/src/browser-view.d.ts +57 -9
  30. package/dist/src/browser-view.js +187 -36
  31. package/dist/src/cli.js +31 -9
  32. package/dist/src/coding-tools.js +9 -5
  33. package/dist/src/command-screens.js +4 -4
  34. package/dist/src/commands.d.ts +1 -1
  35. package/dist/src/commands.js +3 -2
  36. package/dist/src/completion-gates.d.ts +35 -0
  37. package/dist/src/completion-gates.js +25 -0
  38. package/dist/src/completion.d.ts +7 -1
  39. package/dist/src/completion.js +37 -4
  40. package/dist/src/config.d.ts +1 -1
  41. package/dist/src/config.js +2 -2
  42. package/dist/src/context-budget.d.ts +11 -0
  43. package/dist/src/context-budget.js +13 -0
  44. package/dist/src/decision/DecisionEngine.d.ts +5 -1
  45. package/dist/src/decision/DecisionManager.d.ts +1 -0
  46. package/dist/src/decision/DecisionManager.js +14 -3
  47. package/dist/src/decision/FactContinuations.d.ts +6 -0
  48. package/dist/src/decision/FactContinuations.js +9 -1
  49. package/dist/src/decision/FactServiceGate.js +1 -1
  50. package/dist/src/decision/checks.js +1 -1
  51. package/dist/src/decision/hostedSkills.d.ts +37 -0
  52. package/dist/src/decision/hostedSkills.js +64 -0
  53. package/dist/src/decision/providers/AndorraDecisionProvider.d.ts +10 -2
  54. package/dist/src/decision/providers/AndorraDecisionProvider.js +121 -10
  55. package/dist/src/default-graph.d.ts +11 -0
  56. package/dist/src/default-graph.js +20 -0
  57. package/dist/src/duration.d.ts +13 -2
  58. package/dist/src/duration.js +27 -3
  59. package/dist/src/file-diff.d.ts +105 -0
  60. package/dist/src/file-diff.js +244 -0
  61. package/dist/src/graph-manager-chat.d.ts +302 -0
  62. package/dist/src/graph-manager-chat.js +940 -0
  63. package/dist/src/graph-runner.js +6 -0
  64. package/dist/src/graph-server.d.ts +9 -0
  65. package/dist/src/graph-server.js +171 -20
  66. package/dist/src/graph-studio-features.js +2 -2
  67. package/dist/src/graph-sync.js +5 -2
  68. package/dist/src/graph-ui/app.js +369 -183
  69. package/dist/src/graph-ui/controls.css +55 -32
  70. package/dist/src/graph-ui/controls.js +85 -9
  71. package/dist/src/graph-ui/edge-router.js +114 -13
  72. package/dist/src/graph-ui/embed.js +32 -17
  73. package/dist/src/graph-ui/icons.js +1 -0
  74. package/dist/src/graph-ui/index.html +4 -4
  75. package/dist/src/graph-ui/library.css +4 -10
  76. package/dist/src/graph-ui/manager-markdown.js +155 -0
  77. package/dist/src/graph-ui/manager-state.js +191 -0
  78. package/dist/src/graph-ui/manager.css +161 -0
  79. package/dist/src/graph-ui/manager.js +700 -0
  80. package/dist/src/graph-ui/skill-picker.js +6 -6
  81. package/dist/src/graph-ui/studio-canvas.js +17 -15
  82. package/dist/src/graph-ui/studio.css +24 -23
  83. package/dist/src/graph-ui/studio.js +69 -48
  84. package/dist/src/graph-ui/style.css +128 -93
  85. package/dist/src/graph-ui/theme.js +2 -2
  86. package/dist/src/graph-ui/tokens.css +217 -151
  87. package/dist/src/graphs.d.ts +76 -2
  88. package/dist/src/graphs.js +172 -9
  89. package/dist/src/hardened-runtime.js +8 -2
  90. package/dist/src/mcp.d.ts +75 -0
  91. package/dist/src/mcp.js +240 -8
  92. package/dist/src/membership-errors.d.ts +14 -0
  93. package/dist/src/membership-errors.js +24 -1
  94. package/dist/src/membership.d.ts +20 -0
  95. package/dist/src/membership.js +45 -16
  96. package/dist/src/palette.d.ts +25 -8
  97. package/dist/src/palette.js +26 -8
  98. package/dist/src/provider-engine.d.ts +4 -4
  99. package/dist/src/provider-engine.js +39 -22
  100. package/dist/src/provider-keys.d.ts +5 -1
  101. package/dist/src/provider-keys.js +7 -3
  102. package/dist/src/provider-settings.d.ts +4 -1
  103. package/dist/src/provider-settings.js +46 -5
  104. package/dist/src/providers.d.ts +24 -0
  105. package/dist/src/providers.js +47 -2
  106. package/dist/src/qa/guidance.d.ts +26 -0
  107. package/dist/src/qa/guidance.js +46 -0
  108. package/dist/src/qa/index.d.ts +1 -8
  109. package/dist/src/qa/index.js +1 -16
  110. package/dist/src/qa/profile/QaProfile.d.ts +5 -1
  111. package/dist/src/qa/profile/QaProfile.js +6 -2
  112. package/dist/src/qa/runtime/ProcessManager.d.ts +20 -2
  113. package/dist/src/qa/runtime/ProcessManager.js +69 -13
  114. package/dist/src/qa/tools.d.ts +19 -1
  115. package/dist/src/qa/tools.js +20 -145
  116. package/dist/src/react-runtime.d.ts +11 -0
  117. package/dist/src/react-runtime.js +203 -53
  118. package/dist/src/remote/engine-pool.js +21 -6
  119. package/dist/src/run-progress.d.ts +6 -0
  120. package/dist/src/run-progress.js +7 -0
  121. package/dist/src/runtime.d.ts +8 -0
  122. package/dist/src/screen-selection.d.ts +38 -0
  123. package/dist/src/screen-selection.js +103 -0
  124. package/dist/src/session-changes.d.ts +117 -0
  125. package/dist/src/session-changes.js +796 -0
  126. package/dist/src/session-skills.d.ts +75 -0
  127. package/dist/src/session-skills.js +151 -0
  128. package/dist/src/side-panel.d.ts +1 -1
  129. package/dist/src/side-panel.js +6 -12
  130. package/dist/src/skill-commands.js +1 -1
  131. package/dist/src/skills/bundled/control-browser/SKILL.md +9 -1
  132. package/dist/src/skills/bundled/graph-manager/SKILL.md +8 -0
  133. package/dist/src/skills/bundled/provenance.json +3 -3
  134. package/dist/src/skills/bundled/web-gui-tester/SKILL.md +1 -1
  135. package/dist/src/stall-recovery.d.ts +33 -0
  136. package/dist/src/stall-recovery.js +83 -0
  137. package/dist/src/subagent-run.js +1 -2
  138. package/dist/src/telemetry/schema.d.ts +1 -1
  139. package/dist/src/telemetry/schema.js +1 -2
  140. package/dist/src/terminal-ui.d.ts +66 -22
  141. package/dist/src/terminal-ui.js +327 -92
  142. package/dist/src/tool-diff-stats.d.ts +9 -0
  143. package/dist/src/tool-diff-stats.js +20 -0
  144. package/dist/src/tool-names.d.ts +1 -1
  145. package/dist/src/tool-result-filter.js +1 -1
  146. package/dist/src/tools.js +26 -2
  147. package/dist/src/transcript.d.ts +11 -0
  148. package/dist/src/transcript.js +23 -3
  149. package/dist/src/types.d.ts +24 -4
  150. package/dist/src/usage-analytics.d.ts +7 -0
  151. package/dist/src/usage-analytics.js +55 -15
  152. package/docs/concepts/README.md +1 -1
  153. package/docs/concepts/limits.md +9 -0
  154. package/docs/guides/desktop-app.md +1 -1
  155. package/docs/guides/graph-builder.md +16 -1
  156. package/docs/guides/tui.md +9 -9
  157. package/docs/reference/slash-commands.md +2 -1
  158. package/docs/superpowers/plans/2026-11-13-graph-manager-chat.md +203 -0
  159. package/docs/superpowers/plans/2026-11-14-jev-fair-use-pricing.md +79 -0
  160. package/docs/superpowers/specs/2026-11-13-graph-manager-chat-design.md +182 -0
  161. package/docs/superpowers/specs/2026-11-14-jev-fair-use-pricing-design.md +156 -0
  162. package/package.json +1 -1
  163. package/tests/chat-side-panel-test-plan.md +1 -1
  164. package/dist/src/qa/api/http-runner.d.ts +0 -3
  165. package/dist/src/qa/api/http-runner.js +0 -47
  166. package/dist/src/qa/git/ChangeDetector.d.ts +0 -26
  167. package/dist/src/qa/git/ChangeDetector.js +0 -177
  168. package/dist/src/qa/git/DiffReviewer.d.ts +0 -28
  169. package/dist/src/qa/git/DiffReviewer.js +0 -115
  170. package/dist/src/qa/orchestrator/ChangeClassifier.d.ts +0 -14
  171. package/dist/src/qa/orchestrator/ChangeClassifier.js +0 -28
  172. package/dist/src/qa/orchestrator/MergeGate.d.ts +0 -14
  173. package/dist/src/qa/orchestrator/MergeGate.js +0 -40
  174. package/dist/src/qa/orchestrator/QaOrchestrator.d.ts +0 -79
  175. package/dist/src/qa/orchestrator/QaOrchestrator.js +0 -373
  176. package/dist/src/qa/runners/CommandRunner.d.ts +0 -22
  177. package/dist/src/qa/runners/CommandRunner.js +0 -96
  178. package/dist/src/qa/runners/TestRunner.d.ts +0 -21
  179. package/dist/src/qa/runners/TestRunner.js +0 -66
  180. package/dist/src/qa/runtime/RuntimeSmoke.d.ts +0 -11
  181. package/dist/src/qa/runtime/RuntimeSmoke.js +0 -78
  182. package/dist/src/qa/runtime-detect.d.ts +0 -10
  183. package/dist/src/qa/runtime-detect.js +0 -72
  184. package/dist/src/qa/security/DependencyScanner.d.ts +0 -19
  185. package/dist/src/qa/security/DependencyScanner.js +0 -167
  186. package/dist/src/qa/security/SecretScanner.d.ts +0 -3
  187. package/dist/src/qa/security/SecretScanner.js +0 -55
@@ -1,3 +1,4 @@
1
+ import { type FileDiff } from './file-diff.js';
1
2
  export interface LineDiffStats {
2
3
  linesAdded: number;
3
4
  linesRemoved: number;
@@ -22,3 +23,11 @@ export declare function fileDiffTarget(name: string, args: Record<string, unknow
22
23
  export declare function readFileSnapshot(target: string): Promise<string | null | undefined>;
23
24
  /** The added/removed line counts for a snapshot pair; nothing when either half was unmeasurable. */
24
25
  export declare function diffLineStats(before: string | null | undefined, after: string | null | undefined): LineDiffStats | undefined;
26
+ /** Diff lines a completed call's event carries: a row shows the start and says how many more there are. */
27
+ export declare const CALL_DIFF_LINES = 200;
28
+ /**
29
+ * One call's change to its file as numbered hunks, for the `fileDiff` of its `node.tool.completed` event: what
30
+ * the file held before the call against what it holds after, so a Write over an existing file shows the lines
31
+ * it really changed and every line carries its number. Nothing for a call that changed nothing.
32
+ */
33
+ export declare function callFileDiff(before: string | null, after: string | null): Pick<FileDiff, 'hunks' | 'hiddenLines'> | undefined;
@@ -1,6 +1,7 @@
1
1
  import * as fs from 'node:fs/promises';
2
2
  import * as path from 'node:path';
3
3
  import { canonicalCodingToolName } from './tool-names.js';
4
+ import { textDiff } from './file-diff.js';
4
5
  /**
5
6
  * The line counts behind a successful file mutation, reported on its `node.tool.completed` event.
6
7
  *
@@ -120,3 +121,22 @@ function countDiff(oldLines, newLines) {
120
121
  const common = previous[midOld.length];
121
122
  return [midNew.length - common, midOld.length - common];
122
123
  }
124
+ /** Diff lines a completed call's event carries: a row shows the start and says how many more there are. */
125
+ export const CALL_DIFF_LINES = 200;
126
+ /** Characters of diff text a completed call's event carries, so one minified line cannot fill the journal. */
127
+ const CALL_DIFF_CHARS = 24_000;
128
+ const CALL_DIFF_LINE_CHARS = 400;
129
+ /**
130
+ * One call's change to its file as numbered hunks, for the `fileDiff` of its `node.tool.completed` event: what
131
+ * the file held before the call against what it holds after, so a Write over an existing file shows the lines
132
+ * it really changed and every line carries its number. Nothing for a call that changed nothing.
133
+ */
134
+ export function callFileDiff(before, after) {
135
+ // A NUL byte is a binary file read as text: its "lines" are not something a reader can check.
136
+ if (before?.includes('\0') || after?.includes('\0'))
137
+ return undefined;
138
+ const diff = textDiff(before ?? '', after ?? '', { maxLines: CALL_DIFF_LINES, maxChars: CALL_DIFF_CHARS, lineChars: CALL_DIFF_LINE_CHARS });
139
+ if (diff.coarse || !diff.hunks.length)
140
+ return undefined;
141
+ return { hunks: diff.hunks, hiddenLines: diff.hiddenLines };
142
+ }
@@ -13,7 +13,7 @@ export declare function toolNameMatches(configured: string, actual: string): boo
13
13
  export declare function canonicalizeToolList(names: readonly string[] | undefined): string[] | undefined;
14
14
  /**
15
15
  * Rewrites the tool names one provider request sees and restores Andorra's names on everything
16
- * that comes back. Canonical Andorra tool names use dots (`qa.fast`, `browser.panel`), while
16
+ * that comes back. Canonical Andorra tool names use dots (`qa.terminal`, `browser.panel`), while
17
17
  * strict providers validate `function.name` against `^[a-zA-Z0-9_-]+$` and reject the whole
18
18
  * request with an HTTP 400. The provider-side names are a pure transport encoding: journals,
19
19
  * the executor and the desktop keep the canonical spellings.
@@ -16,7 +16,7 @@
16
16
  * @module tool-result-filter
17
17
  */
18
18
  import { canonicalToolName } from './tool-names.js';
19
- const SHELL_TOOLS = new Set(['Bash', 'PowerShell', 'NativeExec', 'AsyncProcess', 'PowerShellFast', 'ShellMetrics', 'shell', 'bash', 'powershell', 'qa.test', 'qa.fast', 'qa.deep', 'qa.terminal', 'qa.status']);
19
+ const SHELL_TOOLS = new Set(['Bash', 'PowerShell', 'NativeExec', 'AsyncProcess', 'PowerShellFast', 'ShellMetrics', 'shell', 'bash', 'powershell', 'qa.terminal']);
20
20
  const SEARCH_TOOLS = new Set(['Grep', 'grep', 'search_files']);
21
21
  const LISTING_TOOLS = new Set(['Glob', 'find', 'ls', 'list_files']);
22
22
  /** A shell command that prints source or a patch is a read, whatever its size. */
package/dist/src/tools.js CHANGED
@@ -265,6 +265,10 @@ async function atomicWrite(context, name, content, expectedContent) {
265
265
  const resolved = await safePath(context, name, true);
266
266
  await mutationPermission(context, name);
267
267
  assertMutationPermission(context);
268
+ // The review record (Keep / Undo) notes the folders this write will create before any is made. Its lock
269
+ // is held from just before the rename until the write is recorded (see the rename below). It never fails
270
+ // the write: a recorder that cannot keep the file answers nothing.
271
+ const recording = await context.fileChanges?.beforeWrite(resolved).catch(() => undefined);
268
272
  await mkdir(path.dirname(resolved), { recursive: true });
269
273
  if (!samePath(await safePath(context, name, true), resolved))
270
274
  throw new Error('File path changed before write; retry');
@@ -303,8 +307,28 @@ async function atomicWrite(context, name, content, expectedContent) {
303
307
  context.signal.throwIfAborted();
304
308
  await mutationPermission(context, name);
305
309
  assertMutationPermission(context);
306
- await rename(temporary, resolved);
307
- created = false;
310
+ // From here to the record the session's review lock is held, so a Keep or Undo can neither run between
311
+ // the freshness check and the rename nor overwrite the write before it is recorded. Nothing in the window
312
+ // waits on a person. A lock that cannot be taken leaves the write unrecorded rather than failing it.
313
+ const locked = recording ? await recording.begin().then(() => true, () => false) : false;
314
+ try {
315
+ // Re-checked inside the window: an Undo that finished just before it may have restored the file.
316
+ if (locked && expectedContent !== undefined && await read(context, name) !== expectedContent)
317
+ throw new Error('File changed while writing; retry');
318
+ // Taking the lock can wait behind an Undo or another write, and a stop or a live permission change in
319
+ // that wait still decides: both are checked again with nothing awaited between them and the rename.
320
+ context.signal.throwIfAborted();
321
+ assertMutationPermission(context);
322
+ await rename(temporary, resolved);
323
+ created = false;
324
+ }
325
+ catch (error) {
326
+ if (locked)
327
+ await recording.abort().catch(() => { });
328
+ throw error;
329
+ }
330
+ if (locked)
331
+ await recording.commit().catch(() => { });
308
332
  }
309
333
  finally {
310
334
  if (created) {
@@ -24,6 +24,17 @@ export interface TranscriptEntry {
24
24
  * @returns a paint color: a palette index or an SGR parameter string.
25
25
  */
26
26
  export declare function transcriptColor(text: string): number | string;
27
+ /**
28
+ * Render an agent's answer on its own: markdown drawn the way a live message is, with a
29
+ * collapsed code block's full text as `detail` for Ctrl+O.
30
+ *
31
+ * A resumed session replays its saved answers through this, so a restored conversation reads
32
+ * the same as it did when the answers were first printed instead of showing raw `**` and `##`.
33
+ * Only outer blank lines are stripped; leading spaces can be a fenced block's indentation.
34
+ * @param summary - the answer's markdown source.
35
+ * @returns the rendered entry.
36
+ */
37
+ export declare function formatAnswer(summary: string): TranscriptEntry;
27
38
  export interface RunResultView {
28
39
  id: string;
29
40
  status: string;
@@ -93,6 +93,19 @@ export function transcriptColor(text) {
93
93
  return GRAY;
94
94
  return DIM;
95
95
  }
96
+ /**
97
+ * Render an agent's answer on its own: markdown drawn the way a live message is, with a
98
+ * collapsed code block's full text as `detail` for Ctrl+O.
99
+ *
100
+ * A resumed session replays its saved answers through this, so a restored conversation reads
101
+ * the same as it did when the answers were first printed instead of showing raw `**` and `##`.
102
+ * Only outer blank lines are stripped; leading spaces can be a fenced block's indentation.
103
+ * @param summary - the answer's markdown source.
104
+ * @returns the rendered entry.
105
+ */
106
+ export function formatAnswer(summary) {
107
+ return renderMarkdown(clean(summary).replace(/^(?:[ \t]*\n)+/, '').replace(/\s+$/, ''));
108
+ }
96
109
  /**
97
110
  * Render a finished run for the transcript: the completion summary as rendered markdown, the
98
111
  * checks the agent reports under their own heading, and the run line last.
@@ -105,8 +118,7 @@ export function transcriptColor(text) {
105
118
  * shows the whole answer in place.
106
119
  */
107
120
  export function formatRunResult(result) {
108
- const summary = clean(result.summary).replace(/^(?:[ \t]*\n)+/, '').replace(/\s+$/, '');
109
- const rendered = renderMarkdown(summary);
121
+ const rendered = formatAnswer(result.summary);
110
122
  const checks = (result.tests ?? []).map(check => line(check)).filter(Boolean);
111
123
  const trailer = [
112
124
  ...(checks.length ? ['', `${HEADING_PREFIX} Checks`, ...checks.map(check => ` • ${check}`)] : []),
@@ -122,12 +134,16 @@ export function formatEvent(event) {
122
134
  // Decision calls have their own actor; originating graph names and provider payloads stay private.
123
135
  if (event.type === 'decision.requested')
124
136
  return { text: '• [Jev] Evaluating context needs' };
137
+ if (event.type === 'decision.skills_truncated')
138
+ return typeof data.text === 'string' && data.text ? { text: ` ⚠ ${data.text}` } : undefined;
125
139
  if (event.type === 'decision.completed')
126
140
  return { text: ` └ [Jev] Decisions received${formatDurationSuffix({ durationMs: data.latencyMs })}` };
127
141
  if (event.type === 'decision.fallback' && data.reason !== 'low_confidence') {
128
142
  const reasons = {
129
143
  authentication_required: 'Sign in required', decision_daily_limit_reached: 'Daily quota reached',
144
+ decision_window_limit_reached: '30-day Jev limit reached',
130
145
  decision_service_unavailable: 'Service unavailable', invalid_response: 'Invalid response',
146
+ decision_protocol_unsupported: 'Request not accepted by the service',
131
147
  decision_input_too_large: 'Context exceeds hosted size limits; evaluation skipped locally',
132
148
  timeout: 'Request timed out', cancelled: 'Request cancelled',
133
149
  };
@@ -194,7 +210,11 @@ export function formatEvent(event) {
194
210
  ...(shortened ? { detail: indent(output) + suffix } : {}) };
195
211
  }
196
212
  if (event.type === 'agent.turn.continued')
197
- return { text: `? ${actor}Continuing: graph stop hook requested more work or a structured handoff.` };
213
+ return { text: data.toolCallDropped === true
214
+ ? `? ${actor}Continuing: the reply's tool call never arrived, likely a tool this node does not have; the next reply must call one of its tools.`
215
+ : data.forcedToolCall === true
216
+ ? `? ${actor}Continuing: the reply had no tool call or handoff; the next reply must call one of this node's tools.`
217
+ : `? ${actor}Continuing: graph stop hook requested more work or a structured handoff.` };
198
218
  if (event.type === 'agent.completion.rejected')
199
219
  return { text: `• ${actor}Retrying: ${data.reason === 'truncatedResponse' ? 'model response was truncated; no tools executed' : data.reason === 'outputTokenLimit' ? 'output token limit reached; continuing the response' : data.reason === 'duplicateToolCallIds' ? 'model reused a tool-call ID; no tools executed' : 'model response did not meet the completion contract'}.` };
200
220
  if (event.type === 'subagent.started')
@@ -90,13 +90,27 @@ export interface GenerateRequest {
90
90
  /** Explicit bounded auxiliary output (for example semantic summaries); absent for ordinary inference. */
91
91
  maxTokens?: number;
92
92
  /**
93
- * How many trailing messages are run snapshots rewritten between turns (todo list, widget
94
- * values, post-tool guidance). A provider that caches only up to explicit breakpoints places
95
- * its conversation breakpoint on the last committed message in front of them, so the next
96
- * request can reuse the cached history even though the snapshots moved or changed.
93
+ * How many trailing messages are rewritten before the next request: post-tool guidance, or
94
+ * a message added for this one request. A provider that caches only up to explicit
95
+ * breakpoints places its conversation breakpoint on the last committed message in front of
96
+ * them, so the next request can reuse the cached history even though they change. Run
97
+ * snapshots (todo list, widget values) are not counted: once sent they are committed history.
97
98
  */
98
99
  mutableTail?: number;
100
+ /**
101
+ * Require a tool call in this one response. Sent where the protocol has it (OpenAI-compatible
102
+ * `tool_choice: "required"`; Anthropic `{ type: "any" }` while thinking is off) and ignored by
103
+ * every other adapter. A server that rejects the field is asked again without it, so a provider
104
+ * that cannot honor it answers the request as if it had never been set.
105
+ */
106
+ toolChoice?: 'required';
99
107
  context?: ModelRequestContext;
108
+ /**
109
+ * The input this request would cost, anchored to the last provider-measured input. Lazy, so an
110
+ * ordinary turn never pays for it: a wrapper that answers the request without calling the model
111
+ * (a Jev bypass) reads it to journal what the skipped call would have sent.
112
+ */
113
+ estimateInputTokens?: () => number;
100
114
  onRetry?: (retry: ModelRetry) => void | Promise<void>;
101
115
  onRequest?: () => void;
102
116
  /**
@@ -250,6 +264,12 @@ export interface ToolContext {
250
264
  sessionScope?: string;
251
265
  /** The session's pull request backing `pull_request`; absent means the tool reports itself unavailable. */
252
266
  pullRequests?: import('./pull-requests.js').PullRequestControl;
267
+ /**
268
+ * Where the run's file writes are reported for review (Keep / Undo). Every agent write to a workspace
269
+ * file reports its path just before it lands and again once it has; a subagent's context inherits the
270
+ * recorder. Absent where no session keeps a review record, which writes exactly as before.
271
+ */
272
+ fileChanges?: import('./session-changes.js').FileChangeRecorder;
253
273
  }
254
274
  export type ToolFamily = 'filesystem-read' | 'filesystem-write' | 'code-search' | 'codegraph' | 'git' | 'shell' | 'qa' | 'memory' | 'web' | 'browser' | 'subagents' | 'artifact';
255
275
  export interface Tool extends ToolSchema {
@@ -8,6 +8,8 @@ export interface UsageModelRow {
8
8
  outputTokens: number;
9
9
  cacheRead: number;
10
10
  savedInputEstimate: number;
11
+ /** Estimated output of the bypassed calls: the run/node's mean measured output per call. */
12
+ savedOutputEstimate: number;
11
13
  bypassedTurns: number;
12
14
  }
13
15
  export interface UsageDayRow {
@@ -16,6 +18,7 @@ export interface UsageDayRow {
16
18
  outputTokens: number;
17
19
  cacheRead: number;
18
20
  savedInputEstimate: number;
21
+ savedOutputEstimate: number;
19
22
  bypassedTurns: number;
20
23
  models: UsageModelRow[];
21
24
  }
@@ -25,14 +28,18 @@ export interface UsageAnalytics {
25
28
  /**
26
29
  * `jevInputTokens`/`jevOutputTokens` are the measured tokens of the run/nodes Jev was enabled on
27
30
  * — the only usage a bypass could have replaced, and so the base of the avoidance rate.
31
+ * `contextEstimatedTurns` counts the bypasses whose input came from the journaled context size
32
+ * rather than the last-measured-input fallback.
28
33
  */
29
34
  totals: {
30
35
  inputTokens: number;
31
36
  outputTokens: number;
32
37
  cacheRead: number;
33
38
  savedInputEstimate: number;
39
+ savedOutputEstimate: number;
34
40
  bypassedTurns: number;
35
41
  unestimatedTurns: number;
42
+ contextEstimatedTurns: number;
36
43
  jevInputTokens: number;
37
44
  jevOutputTokens: number;
38
45
  };
@@ -2,8 +2,12 @@
2
2
  * Local Usage dashboard accounting from trajectory JSONL.
3
3
  *
4
4
  * Model usage is provider-reported and counted once per model.response. A Jev bypass has no
5
- * provider usage: estimate its input only when the same run/node has a preceding measured
6
- * response. This is a counterfactual estimate, never billed or actually saved tokens.
5
+ * provider usage, so the call it skipped is estimated: its input is the context the runtime would
6
+ * have sent, journaled on the event as `estimatedInputTokens` (anchored to the node's last measured
7
+ * request), and its output is the mean output of that run/node's measured calls so far. A bypass
8
+ * journaled before the runtime recorded the context falls back to the node's last measured input,
9
+ * and one with neither is counted as unestimated. This is a counterfactual estimate, never billed
10
+ * or actually saved tokens.
7
11
  * Measured tokens are also totalled for the run/nodes Jev was enabled on — the ones that journaled
8
12
  * a `decision.*` event — so the avoidance rate is taken over usage Jev could have affected and a
9
13
  * node without Jev does not dilute it.
@@ -34,8 +38,8 @@ const dateOf = (time) => {
34
38
  return Number.isFinite(instant.getTime()) ? instant.toISOString().slice(0, 10) : undefined;
35
39
  };
36
40
  const keyOf = (providerId, model) => JSON.stringify([providerId, model]);
37
- const emptyModel = (providerId, provider, model) => ({ providerId, provider, model, inputTokens: 0, outputTokens: 0, cacheRead: 0, savedInputEstimate: 0, bypassedTurns: 0 });
38
- const emptyDay = (date) => ({ date, inputTokens: 0, outputTokens: 0, cacheRead: 0, savedInputEstimate: 0, bypassedTurns: 0, models: [] });
41
+ const emptyModel = (providerId, provider, model) => ({ providerId, provider, model, inputTokens: 0, outputTokens: 0, cacheRead: 0, savedInputEstimate: 0, savedOutputEstimate: 0, bypassedTurns: 0 });
42
+ const emptyDay = (date) => ({ date, inputTokens: 0, outputTokens: 0, cacheRead: 0, savedInputEstimate: 0, savedOutputEstimate: 0, bypassedTurns: 0, models: [] });
39
43
  /** A streaming collector, also usable with synthetic records in regression tests. */
40
44
  export function createUsageCollector(windowDays, now = new Date(), resolveProvider = provider => provider) {
41
45
  if (![7, 30, 365].includes(windowDays))
@@ -46,10 +50,13 @@ export function createUsageCollector(windowDays, now = new Date(), resolveProvid
46
50
  const days = new Map();
47
51
  const models = new Map();
48
52
  const baselines = new Map();
53
+ /** Every measured call's output per run/node, including those before the window: the output estimate. */
54
+ const outputs = new Map();
49
55
  /** In-window measured tokens per run/node, and the run/nodes a `decision.*` event named. */
50
56
  const nodeTokens = new Map();
51
57
  const jevNodes = new Set();
52
58
  let unestimatedTurns = 0;
59
+ let contextEstimatedTurns = 0;
53
60
  const dayFor = (date) => {
54
61
  let day = days.get(date);
55
62
  if (!day) {
@@ -87,8 +94,13 @@ export function createUsageCollector(windowDays, now = new Date(), resolveProvid
87
94
  const cache = Math.min(input, nonnegative(usage?.cacheRead) ?? 0);
88
95
  const identity = JSON.stringify([item.runId, item.nodeId]);
89
96
  // Keep an observed baseline even when it predates the displayed date range.
90
- if (typeof item.runId === 'string' && typeof item.nodeId === 'string')
97
+ if (typeof item.runId === 'string' && typeof item.nodeId === 'string') {
91
98
  baselines.set(identity, { providerId, model, inputTokens: input });
99
+ const history = outputs.get(identity) ?? { tokens: 0, calls: 0 };
100
+ history.tokens += output;
101
+ history.calls++;
102
+ outputs.set(identity, history);
103
+ }
92
104
  if (date < cutoff)
93
105
  return;
94
106
  const day = dayFor(date);
@@ -118,19 +130,32 @@ export function createUsageCollector(windowDays, now = new Date(), resolveProvid
118
130
  jevNodes.add(JSON.stringify([data.runId, data.nodeId]));
119
131
  if (event.type !== 'decision.turn_bypassed')
120
132
  return;
121
- const baseline = typeof data?.runId === 'string' && typeof data.nodeId === 'string'
122
- ? baselines.get(JSON.stringify([data.runId, data.nodeId])) : undefined;
133
+ const identity = typeof data?.runId === 'string' && typeof data.nodeId === 'string' ? JSON.stringify([data.runId, data.nodeId]) : undefined;
134
+ const baseline = identity === undefined ? undefined : baselines.get(identity);
135
+ const history = identity === undefined ? undefined : outputs.get(identity);
123
136
  if (date < cutoff)
124
137
  return;
125
138
  const day = dayFor(date);
126
139
  day.row.bypassedTurns++;
127
- if (!baseline) {
140
+ // The context the skipped call would have sent; a zero reading is no reading.
141
+ const journaled = nonnegative(data?.estimatedInputTokens) || undefined;
142
+ const input = journaled ?? baseline?.inputTokens;
143
+ if (input === undefined) {
128
144
  unestimatedTurns++;
129
145
  return;
130
146
  }
131
- day.row.savedInputEstimate += baseline.inputTokens;
132
- for (const target of [modelFor(day.models, baseline.providerId, baseline.model), modelFor(models, baseline.providerId, baseline.model)]) {
133
- target.savedInputEstimate += baseline.inputTokens;
147
+ if (journaled !== undefined)
148
+ contextEstimatedTurns++;
149
+ const output = history?.calls ? Math.round(history.tokens / history.calls) : 0;
150
+ // The call would have gone where the event says; an older event names neither, and the node's
151
+ // last measured call is the best record of where it was going.
152
+ const providerId = typeof data?.providerId === 'string' && data.providerId ? data.providerId : baseline?.providerId ?? 'unknown';
153
+ const model = typeof data?.model === 'string' && data.model ? data.model : baseline?.model ?? 'unknown';
154
+ day.row.savedInputEstimate += input;
155
+ day.row.savedOutputEstimate += output;
156
+ for (const target of [modelFor(day.models, providerId, model), modelFor(models, providerId, model)]) {
157
+ target.savedInputEstimate += input;
158
+ target.savedOutputEstimate += output;
134
159
  target.bypassedTurns++;
135
160
  }
136
161
  };
@@ -147,8 +172,10 @@ export function createUsageCollector(windowDays, now = new Date(), resolveProvid
147
172
  outputTokens: orderedModels.reduce((sum, row) => sum + row.outputTokens, 0),
148
173
  cacheRead: orderedModels.reduce((sum, row) => sum + row.cacheRead, 0),
149
174
  savedInputEstimate: orderedModels.reduce((sum, row) => sum + row.savedInputEstimate, 0),
175
+ savedOutputEstimate: orderedModels.reduce((sum, row) => sum + row.savedOutputEstimate, 0),
150
176
  bypassedTurns: orderedDays.reduce((sum, day) => sum + day.bypassedTurns, 0),
151
177
  unestimatedTurns,
178
+ contextEstimatedTurns,
152
179
  jevInputTokens: 0,
153
180
  jevOutputTokens: 0,
154
181
  };
@@ -170,8 +197,11 @@ const MAX_CACHE_BYTES = 64 * 1024 * 1024;
170
197
  const MAX_CACHE_RECORDS = 500_000;
171
198
  /** Retained records across the whole home; past this, further files are excluded, not read. */
172
199
  const MAX_CACHE_RECORDS_TOTAL = 250_000;
173
- /** 2: files are re-read once to capture the `j` markers version 1 never stored. */
174
- const CACHE_VERSION = 2;
200
+ /**
201
+ * 2: files are re-read once to capture the `j` markers version 1 never stored.
202
+ * 3: and again for the bypass accounting fields (`i`, `p`, `m` on `b`) version 2 never stored.
203
+ */
204
+ const CACHE_VERSION = 3;
175
205
  const NAME_PATTERN = /^[a-zA-Z0-9_-]{1,64}\.jsonl$/;
176
206
  /** The largest window the collector accepts; files older than its bound are never replayed. */
177
207
  const MAX_WINDOW_DAYS = 365;
@@ -215,10 +245,14 @@ const slimOf = (record) => {
215
245
  if (event.type !== 'decision.turn_bypassed')
216
246
  return typeof data?.runId === 'string' && typeof data.nodeId === 'string'
217
247
  ? { k: 'j', t: item.time, r: data.runId, n: data.nodeId } : undefined;
248
+ const wouldSend = nonnegative(data?.estimatedInputTokens);
218
249
  return {
219
250
  k: 'b', t: item.time,
220
251
  ...(typeof data?.runId === 'string' ? { r: data.runId } : {}),
221
252
  ...(typeof data?.nodeId === 'string' ? { n: data.nodeId } : {}),
253
+ ...(wouldSend ? { i: wouldSend } : {}),
254
+ ...(typeof data?.providerId === 'string' && data.providerId ? { p: data.providerId } : {}),
255
+ ...(typeof data?.model === 'string' && data.model ? { m: data.model } : {}),
222
256
  };
223
257
  };
224
258
  /** Rebuild a collector-shaped record from its slim capture; absent optional fields stay absent. */
@@ -231,7 +265,12 @@ const replayOf = (slim) => slim.k === 'r'
231
265
  : {
232
266
  type: 'runtime.event', time: slim.t,
233
267
  // The collector reads a marker's run and node only, so one type stands in for all of them.
234
- event: { type: slim.k === 'b' ? 'decision.turn_bypassed' : 'decision.ready', data: { ...(slim.r === undefined ? {} : { runId: slim.r }), ...(slim.n === undefined ? {} : { nodeId: slim.n }) } },
268
+ event: { type: slim.k === 'b' ? 'decision.turn_bypassed' : 'decision.ready', data: {
269
+ ...(slim.r === undefined ? {} : { runId: slim.r }), ...(slim.n === undefined ? {} : { nodeId: slim.n }),
270
+ ...(slim.k === 'b' && slim.i !== undefined ? { estimatedInputTokens: slim.i } : {}),
271
+ ...(slim.k === 'b' && slim.p !== undefined ? { providerId: slim.p } : {}),
272
+ ...(slim.k === 'b' && slim.m !== undefined ? { model: slim.m } : {}),
273
+ } },
235
274
  };
236
275
  /**
237
276
  * Validate one loaded slim record. Anything malformed is dropped rather than trusted: the cache is
@@ -247,7 +286,8 @@ const validSlim = (value) => {
247
286
  if (item.n !== undefined && typeof item.n !== 'string')
248
287
  return false;
249
288
  if (item.k === 'b')
250
- return true;
289
+ return (item.i === undefined || nonnegative(item.i) !== undefined)
290
+ && (item.p === undefined || typeof item.p === 'string') && (item.m === undefined || typeof item.m === 'string');
251
291
  if (item.k === 'j')
252
292
  return typeof item.r === 'string' && typeof item.n === 'string';
253
293
  if (item.k !== 'r')
@@ -36,7 +36,7 @@ Edges carry explicit input mappings — `$source.output.field` or `$run.input.ta
36
36
 
37
37
  ### Revisions
38
38
 
39
- Saved graphs are immutable revisions. A published revision is never rewritten: a pinned run keeps describing the graph it started with, and editing produces the next revision. Selecting `default` always runs the single Andorra Agent harness, signed in or not; the Orchestrator → Andorra Agent workflow is the paid `:andorra` graph, and older bundled default revisions (1–5) remain available for compatibility.
39
+ Saved graphs are immutable revisions. A published revision is never rewritten: a pinned run keeps describing the graph it started with, and editing produces the next revision. Selecting `default` always runs the single Andorra Agent harness, signed in or not; the Orchestrator → Andorra Agent workflow is the paid `:andorra` graph, and older bundled default revisions (1–6) remain available for compatibility. Graph Studio shows `default` at its latest revision (7), the same single Andorra Agent that Default runs; revision 6 is the Orchestrator workflow the `:andorra` preset uses.
40
40
 
41
41
  ## How a task actually runs
42
42
 
@@ -30,6 +30,15 @@ A graph carries its own `limits` block, and its `maxNodeVisits` is the ceiling o
30
30
 
31
31
  A graph or node limit can tighten whatever the configuration sets but never loosen it.
32
32
 
33
+ ## Checks on the completion that ends a run
34
+
35
+ An agent ends its node by calling `complete_agent`. When that completion ends the run (a root agent whose outcome leads straight to an End node) and the agent has acted (it ran at least one tool or wrote the plan), the host checks two things before accepting it:
36
+
37
+ - **A written summary.** The summary is the answer you read. A completion that carries only `outcome` and `output` is sent back for one.
38
+ - **A finished plan.** If the run's todo list still has an item that is not completed, the completion is sent back. The agent finishes the work, corrects the list, or leaves the item open and names it under `## Not done`.
39
+
40
+ Each check sends a completion back at most twice, then lets it through and records the waiver (`agent.completion.gate.waived` in the run log). On the last iteration `maxIterations` allows, both checks are waived at once, because a completion sent back there would end the run with no answer. These checks are separate from `maxCompletionRepairs`: they never spend a repair and never fail a run. Not checked: a subagent, an Orchestrator (its `delivered` outcome has its own checks), a node that hands off to another node, one iteration or copy of a loop or parallel modifier, and a node that answers without running any tool, such as a classifier or a structured step whose output is its product.
41
+
33
42
  ## Request-level bounds
34
43
 
35
44
  - **File reads** return at most 2,000 lines per call, truncate any single displayed line beyond 2,000 characters, and always stay inside the 24,000-character tool-output budget — a page with long lines stops at the last whole line that fits. A longer file is read by following the `Use offset=N to continue` line each page reports until the whole file has been read; `Write` and `Edit` accept an existing file only after that complete read, so an agent that stops half-way is told which lines are still unread. Those offsets are only suggested while the file still matches the last read; a file that changed means reading it again. The window is fixed, not a configuration key.
@@ -33,7 +33,7 @@ macOS and Linux bundles have no installer step.
33
33
  **The check at startup (every platform).** Before the window starts an engine it reads the
34
34
  installed CLI's `package.json` (it does not run it). A missing CLI, or one from another version,
35
35
  stops at the startup screen with the reason and the command that fixes it, for example
36
- `npm install -g @andorra-labs/code@0.1.8`; **Check again** retries after you run it. This is what
36
+ `npm install -g @andorra-labs/code@0.1.10`; **Check again** retries after you run it. This is what
37
37
  you see after an in-app update on macOS or Linux, where nothing installs the new CLI for you, and
38
38
  after updating or removing the CLI by hand. An `andorra` launcher on `PATH` whose package cannot
39
39
  be located is started without a version check.
@@ -83,11 +83,26 @@ Select **Do not inherit skills** on a node to keep that node's skill context ind
83
83
  - The **Agents** section lists built-in presets first and saved variants after, all at one level. **Copy** on any Agent row creates a new Agent starting from that row's settings under a name you choose.
84
84
  - Library changes save independently of graph revisions and do not change nodes already on the canvas. Save a selected node as a named variant from the Agent inspector.
85
85
  - Select a node or connection and press Delete to remove it, then Undo to restore. Delete inside a text field edits text. Deleting every remaining node is prevented so the draft retains a start.
86
- - Connections use orthogonal routes around node cards and indicate direction with arrowheads. Separate overlapping cards when their ports are enclosed by another card. If a return edge creates an unbounded cycle, the inspector explains it and offers a finite visit limit.
86
+ - Connections use orthogonal routes around node cards and indicate direction with arrowheads. Every connection is the same neutral line whatever its outcome; the outcome rides it as a label, and hovering or selecting a connection traces it. Separate overlapping cards when their ports are enclosed by another card. If a return edge creates an unbounded cycle, the inspector explains it and offers a finite visit limit.
87
+ - Move around the canvas by dragging its background or scrolling (two fingers on a trackpad; Shift + mouse wheel scrolls sideways). Pinch, or hold Ctrl (Cmd on macOS) while scrolling, to zoom about the pointer. The dot grid moves and scales with the cards, and with **Snap to grid** on a dragged card lands on a dot. Zoom in, Zoom out, Fit graph and Arrange ease the view to where it is going.
88
+ - Inside the desktop client, the window's own shortcuts work while the editor has focus: Ctrl/Cmd+K opens the command palette, Ctrl/Cmd+N starts a new task and Ctrl/Cmd+, opens Settings (each saves the graph draft first when it leaves the editor).
87
89
  - Ctrl-click (Cmd-click on macOS) matching node types to select several nodes. Under Output Node, select their shared outcome and use Route all N to, then click the destination.
88
90
 
89
91
  Schema versions 1/2 remain executable with their original semantics; opening them in the editor adds an Orchestrator before the existing entry, and saving creates a version 3+ revision without rewriting history.
90
92
 
93
+ ## Graph Manager
94
+
95
+ Graph Manager is an assistant that sits beside the graph you have open and builds or changes it with you. It is the same graph-design skill an agent uses in a regular task, placed next to the canvas.
96
+
97
+ - **Opening it.** A **Graph Manager** button is in the toolbar, beside **Save Revision**, whenever a graph is open. Click it to open a chat panel on the right; the canvas narrows to make room. Drag the panel's left edge to resize it. The first time you create a new graph, a tip beside the button reminds you it is there; close the tip or open the panel and it does not come back.
98
+ - **Choosing a provider and model.** The two selects at the top of the panel choose the provider and model Graph Manager itself runs on. They start on your last choice, or on the model of the graph's first agent. Graph Manager also uses that model for new agent nodes unless you ask for another. A change applies from your next message.
99
+ - **What it sees.** Every message carries the open graph's name and id and the canvas exactly as it is on your screen, including edits you have not saved. You can change something by hand and ask about it straight away. A very large graph cannot be sent; the panel says so and nothing is started.
100
+ - **Approvals.** Graph Manager asks before anything lasting happens. Publishing a revision, deleting a graph and restoring a graph each show a card with **Approve** and **Deny**, and nothing is saved until you approve. It does not connect your MCP servers. **Stop** ends what it is doing.
101
+ - **When it saves.** If the canvas has not changed since your message, the new revision opens in place. If you edited the canvas in the meantime, or the message came from another window, a bar asks "Graph Manager saved revision N. Load it?" and your edits stay until you click **Load**. Nothing on the canvas is replaced without that click.
102
+ - **The bundled preset.** The built-in default graph cannot be changed, so there Graph Manager creates a new graph based on what you see and a bar offers to open it: "Graph Manager created <name>. Open it?". The preset stays open until you click **Open**; the conversation then continues on the new graph.
103
+ - **Conversations.** One conversation is shared by every window of the same editor, and a reload brings it back. **New Chat** starts a fresh one. Opening another graph offers to start a new chat about it and keeps the current one until you agree.
104
+ - **Where it runs.** Graph Manager works in a folder of its own, `<home>/graph-manager/workspace` (`<home>` is `~/.andorracode`, or `ANDORRACODE_HOME`). Its sessions are named `Graph Manager: <graph name>` and are filed under that folder, so they stay out of your projects' task lists. It runs on a separate engine that stops with the editor, and after ten minutes with the panel closed and nothing pending, so a task you have running elsewhere is not held up.
105
+
91
106
  ## Cloud backup and draft recovery
92
107
 
93
108
  For paid accounts, the graph builder saves revisions and drafts locally, then automatically synchronizes them to your Andorra account. The sidebar reports cloud status separately from local save success; connection failures retain the local queue and retry every 30 seconds while the builder is open. Open the Graph Builder to refresh cloud graphs on another installation; in the desktop app, opening a task's graph list does the same, so a graph saved on another machine is listed there without opening the builder first.
@@ -3,7 +3,7 @@
3
3
  The default `andorra` command opens a full-screen terminal UI: a welcome panel, conversation and tool transcript, a bordered input composer, and a live status bar. While a task runs, the transcript shows public assistant progress, tool actions, and compact result previews.
4
4
 
5
5
  - Press **Ctrl+O** to expand or collapse tool and approval details.
6
- - Scroll with Page Up/Page Down, or with the mouse wheel/trackpad while a run streams or a screen is open. Select text by dragging, as in any terminal program.
6
+ - Scroll with the mouse wheel/trackpad or Page Up/Page Down, in every state. Select text by dragging; releasing the button copies it.
7
7
  - File proposals show numbered green additions and red removals; edit numbers are relative to the replaced snippets. Errors are red and tool headings are cyan. Approval prompts retain the full arguments in expandable details.
8
8
  - Updates appear after each model response; token-by-token streaming is not supported. `--json` remains machine-readable and does not include display formatting.
9
9
  - Text wraps at word boundaries where possible; tokens wider than the terminal still split safely.
@@ -24,17 +24,17 @@ Type `/` as the first character to open command suggestions. Typing filters the
24
24
 
25
25
  ## Mouse, selection and scrolling
26
26
 
27
- Andorra never captures the mouse. Drag-to-select, double-click word selection and your terminal's copy shortcut work in every state — at the idle prompt, while a run streams, and while a selection or settings screen is open — with no Shift or Option bypass to remember. The composer additionally has its own keyboard selection (Shift with an arrow, Home or End; Ctrl+C copies, Ctrl+X cuts).
27
+ Andorra holds the mouse for the whole session, so the wheel is always a wheel:
28
28
 
29
- What the wheel does depends on where you are:
29
+ - **The wheel scrolls** the transcript at the idle prompt, while a run streams, and while an approval or clarification question is open. On a selection, settings or usage screen it scrolls the screen or moves the highlight. Page Up/Page Down scroll from the keyboard.
30
+ - **Up/Down recall input history** at the prompt, or move the caret inside a multi-line draft. They never scroll there. While a run streams with nothing typed they scroll the transcript, because there is no history to recall.
31
+ - **Dragging selects text** on the screen and draws it in reverse video. Releasing the button copies the selection to the clipboard; the highlight stays until the next key, click or wheel tick. Double-click copies the word under the pointer. A drag that starts in the conversation stays out of the side panel.
32
+ - **The copy** goes to the system clipboard, and falls back to an OSC 52 sequence that asks the terminal to set its clipboard. Over SSH only the OSC 52 path is used, since the system clipboard there belongs to the remote machine. A terminal that ignores OSC 52 copies nothing over SSH; use its own selection there.
33
+ - **Your terminal's own selection** is still available through its bypass: Shift+drag in Windows Terminal, GNOME Terminal and most others, Option+drag in iTerm2 and Terminal.app. Right-click and middle-click are swallowed; paste with the terminal's paste shortcut.
30
34
 
31
- - **While a run streams** with no question on screen, the wheel scrolls the transcript. Up/Down and Page Up/Page Down do the same from the keyboard. If you have started typing a steer, Up/Down move inside that draft instead; the wheel and Page Up/Page Down still scroll.
32
- - **On a selection, settings or usage screen**, the wheel scrolls the screen or moves the highlight, like Up/Down.
33
- - **At the resting prompt**, and while an approval or clarification question is open, the wheel does nothing. Up/Down recall input history there, and Page Up/Page Down scroll the transcript.
35
+ The mouse is held because of how terminals report an uncaptured wheel in a full-screen program: under *alternate scroll mode* they send the same bytes as the Up and Down keys. Windows Terminal, GNOME Terminal and iTerm2 have that mode on by default, so an uncaptured wheel either recalls the previous prompt on every tick or has to be switched off, which left it doing nothing at the idle prompt. A selection is taken from the rows as drawn, so text that wrapped on screen is copied with a line break at each wrap, and a drag does not scroll the transcript past the edge of the screen. The composer additionally has its own keyboard selection (Shift with an arrow, Home or End; Ctrl+C copies, Ctrl+X cuts).
34
36
 
35
- The reason for the resting-prompt exception is how terminals report an uncaptured wheel in a full-screen program: under *alternate scroll mode* they send the same bytes as the Up and Down keys. Windows Terminal, GNOME Terminal and iTerm2 have that mode on by default, which once made the wheel recall the previous prompt. Andorra therefore switches the mode on only in the states above, where Up/Down cannot reach history, and off everywhere else. A terminal that ignores the mode request and always translates the wheel will still recall history on wheel-up at the prompt; a terminal that never translates it has an inert wheel during runs, where Page Up/Page Down and the arrow keys still work.
36
-
37
- Collapsed long-prompt boxes expand and collapse with Ctrl+O, and the live reasoning preview toggles with Ctrl+Y. Dragging works while a task runs: the screen redraws eight times a second for its animation, but only the rows whose text actually changed are rewritten, so an unchanged row is never refreshed out from under your selection. Rows that do change — the animated indicator and counters — may move your selection with them, as in any terminal.
37
+ Collapsed long-prompt boxes expand and collapse with Ctrl+O, and the live reasoning preview toggles with Ctrl+Y; neither reacts to a click. Dragging works while a task runs. The selection is held in screen positions, so when the rows under it change (the animated indicator, the counters, new output) the highlight covers the new text, and what is copied is what is on screen when the button is released.
38
38
 
39
39
  ## Selection screens
40
40
 
@@ -25,7 +25,8 @@ Slash commands run inside the interactive TUI. Type `/` as the first character t
25
25
  | `/yolo <on\|off>` | Turn session-wide Full Access (host files and network) on or off. Never persisted. Without an argument it reports the current state and changes nothing. |
26
26
  | `/tools` | List available coding tools and the approval policy. |
27
27
  | `/skills` | List, install, enable, disable or remove skills. See [Extensions](../guides/extensions.md). |
28
- | `/<skillname> [args]` | Apply an enabled imported skill; qualify duplicate names by catalog ID. |
28
+ | `/<skillname> [args]` | Apply an enabled imported skill; qualify duplicate names by catalog ID. The skill stays active for every later message in the session until you pause it, remove it, or invoke another skill (which replaces it). In the desktop app the Plan card shows it with Pause, Resume and Remove. |
29
+ | `/skill [on\|off\|remove]` | Show the session's active skill, pause it (`off`), resume it (`on`) or end it (`remove`). Changes apply from the next message. `/clear` also ends it. A skill named `skill` stays reachable as `/skill::skill`. |
29
30
  | `/plugins` | List, install, enable, disable or remove plugins. See [Extensions](../guides/extensions.md). |
30
31
  | `/mcp` | Add, edit, enable, disable or delete MCP servers. See [Extensions](../guides/extensions.md). |
31
32
  | `/logout` | Sign out of your Andorra account on this machine (same as `/auth logout`). Run `/login` afterwards to sign in, or to switch to another account. |