@andorra-labs/code 0.1.9 → 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.
Files changed (212) hide show
  1. package/README.md +28 -208
  2. package/THIRD_PARTY_NOTICES.md +15 -0
  3. package/dist/src/agent-execution.js +56 -0
  4. package/dist/src/app-server/protocol.d.ts +109 -1
  5. package/dist/src/app-server/protocol.js +8 -1
  6. package/dist/src/app-server.d.ts +59 -1
  7. package/dist/src/app-server.js +418 -63
  8. package/dist/src/auth/index.d.ts +1 -1
  9. package/dist/src/auth/index.js +1 -1
  10. package/dist/src/auth/store.d.ts +17 -1
  11. package/dist/src/auth/store.js +25 -2
  12. package/dist/src/automation-service.js +1 -1
  13. package/dist/src/browser-session.d.ts +8 -0
  14. package/dist/src/browser-session.js +27 -1
  15. package/dist/src/browser-ui/app.js +255 -33
  16. package/dist/src/browser-ui/index.html +9 -9
  17. package/dist/src/browser-ui/style.css +110 -65
  18. package/dist/src/browser-ui/tokens.css +27 -26
  19. package/dist/src/cli.js +10 -5
  20. package/dist/src/coding-tools.d.ts +24 -0
  21. package/dist/src/coding-tools.js +71 -8
  22. package/dist/src/command-screens.js +1 -1
  23. package/dist/src/commands.d.ts +1 -1
  24. package/dist/src/commands.js +2 -2
  25. package/dist/src/completion-gates.d.ts +42 -7
  26. package/dist/src/completion-gates.js +55 -9
  27. package/dist/src/completion.d.ts +9 -1
  28. package/dist/src/completion.js +20 -2
  29. package/dist/src/dashboard-view.js +2 -2
  30. package/dist/src/deadline.js +4 -0
  31. package/dist/src/decision/checks.js +1 -1
  32. package/dist/src/file-diff.d.ts +105 -0
  33. package/dist/src/file-diff.js +244 -0
  34. package/dist/src/graph-manager-chat.js +4 -4
  35. package/dist/src/graph-runner.js +39 -2
  36. package/dist/src/graph-sync.d.ts +8 -0
  37. package/dist/src/graph-sync.js +54 -3
  38. package/dist/src/graph-tool.js +1 -1
  39. package/dist/src/graph-ui/app.js +303 -129
  40. package/dist/src/graph-ui/controls.css +43 -22
  41. package/dist/src/graph-ui/controls.js +31 -1
  42. package/dist/src/graph-ui/embed.js +56 -7
  43. package/dist/src/graph-ui/icons.js +5 -0
  44. package/dist/src/graph-ui/index.html +3 -3
  45. package/dist/src/graph-ui/manager-state.js +2 -2
  46. package/dist/src/graph-ui/manager.css +19 -18
  47. package/dist/src/graph-ui/manager.js +5 -5
  48. package/dist/src/graph-ui/skill-picker.js +5 -5
  49. package/dist/src/graph-ui/studio-canvas.js +16 -16
  50. package/dist/src/graph-ui/studio.css +18 -15
  51. package/dist/src/graph-ui/studio.js +99 -42
  52. package/dist/src/graph-ui/style.css +125 -80
  53. package/dist/src/graph-ui/theme.js +2 -2
  54. package/dist/src/graph-ui/tokens.css +33 -29
  55. package/dist/src/graphs.d.ts +10 -3
  56. package/dist/src/graphs.js +15 -4
  57. package/dist/src/mcp.d.ts +75 -0
  58. package/dist/src/mcp.js +240 -8
  59. package/dist/src/membership-errors.d.ts +7 -1
  60. package/dist/src/membership-errors.js +9 -3
  61. package/dist/src/provider-keys.d.ts +5 -1
  62. package/dist/src/provider-keys.js +7 -3
  63. package/dist/src/provider-settings.d.ts +4 -1
  64. package/dist/src/provider-settings.js +46 -5
  65. package/dist/src/pull-requests.d.ts +42 -6
  66. package/dist/src/pull-requests.js +11 -3
  67. package/dist/src/qa/guidance.js +6 -19
  68. package/dist/src/qa/index.d.ts +0 -2
  69. package/dist/src/qa/index.js +0 -2
  70. package/dist/src/qa/profile/QaProfile.d.ts +5 -1
  71. package/dist/src/qa/profile/QaProfile.js +6 -2
  72. package/dist/src/qa/tools.d.ts +19 -1
  73. package/dist/src/qa/tools.js +20 -145
  74. package/dist/src/react-runtime.js +134 -16
  75. package/dist/src/read-document-doc.d.ts +20 -0
  76. package/dist/src/read-document-doc.js +524 -0
  77. package/dist/src/read-document-docx.d.ts +21 -0
  78. package/dist/src/read-document-docx.js +584 -0
  79. package/dist/src/read-document-text.d.ts +29 -0
  80. package/dist/src/read-document-text.js +67 -0
  81. package/dist/src/read-document-tool.d.ts +48 -0
  82. package/dist/src/read-document-tool.js +162 -0
  83. package/dist/src/read-document.d.ts +78 -0
  84. package/dist/src/read-document.js +353 -0
  85. package/dist/src/read-image.d.ts +29 -2
  86. package/dist/src/read-image.js +42 -17
  87. package/dist/src/remote/engine-pool.js +18 -6
  88. package/dist/src/runtime.d.ts +19 -0
  89. package/dist/src/runtime.js +10 -1
  90. package/dist/src/screen-selection.d.ts +38 -0
  91. package/dist/src/screen-selection.js +103 -0
  92. package/dist/src/session-changes.d.ts +122 -0
  93. package/dist/src/session-changes.js +804 -0
  94. package/dist/src/side-panel.d.ts +6 -1
  95. package/dist/src/side-panel.js +12 -10
  96. package/dist/src/skills/bundled/create-skill/SKILL.md +1 -1
  97. package/dist/src/skills/bundled/diagram/SKILL.md +1 -1
  98. package/dist/src/skills/bundled/graph-manager/SKILL.md +37 -3
  99. package/dist/src/skills/bundled/graph-manager/patterns.md +27 -0
  100. package/dist/src/skills/bundled/provenance.json +4 -4
  101. package/dist/src/skills/runtime-skills.js +3 -3
  102. package/dist/src/stall-recovery.d.ts +15 -0
  103. package/dist/src/stall-recovery.js +17 -0
  104. package/dist/src/telemetry/schema.d.ts +1 -1
  105. package/dist/src/telemetry/schema.js +1 -2
  106. package/dist/src/terminal-ui.d.ts +64 -20
  107. package/dist/src/terminal-ui.js +312 -82
  108. package/dist/src/time-limit.d.ts +53 -0
  109. package/dist/src/time-limit.js +79 -0
  110. package/dist/src/tool-diff-stats.d.ts +9 -0
  111. package/dist/src/tool-diff-stats.js +20 -0
  112. package/dist/src/tool-names.d.ts +1 -1
  113. package/dist/src/tool-result-filter.js +1 -1
  114. package/dist/src/tools.js +118 -9
  115. package/dist/src/transcript.d.ts +11 -0
  116. package/dist/src/transcript.js +15 -3
  117. package/dist/src/types.d.ts +12 -0
  118. package/dist/src/usage-analytics.d.ts +3 -1
  119. package/dist/src/usage-analytics.js +16 -2
  120. package/package.json +6 -26
  121. package/dist/src/qa/api/http-runner.d.ts +0 -3
  122. package/dist/src/qa/api/http-runner.js +0 -47
  123. package/dist/src/qa/git/ChangeDetector.d.ts +0 -26
  124. package/dist/src/qa/git/ChangeDetector.js +0 -177
  125. package/dist/src/qa/git/DiffReviewer.d.ts +0 -28
  126. package/dist/src/qa/git/DiffReviewer.js +0 -115
  127. package/dist/src/qa/orchestrator/ChangeClassifier.d.ts +0 -14
  128. package/dist/src/qa/orchestrator/ChangeClassifier.js +0 -28
  129. package/dist/src/qa/orchestrator/MergeGate.d.ts +0 -14
  130. package/dist/src/qa/orchestrator/MergeGate.js +0 -40
  131. package/dist/src/qa/orchestrator/QaOrchestrator.d.ts +0 -79
  132. package/dist/src/qa/orchestrator/QaOrchestrator.js +0 -373
  133. package/dist/src/qa/runners/CommandRunner.d.ts +0 -22
  134. package/dist/src/qa/runners/CommandRunner.js +0 -96
  135. package/dist/src/qa/runners/TestRunner.d.ts +0 -21
  136. package/dist/src/qa/runners/TestRunner.js +0 -66
  137. package/dist/src/qa/runtime/RuntimeSmoke.d.ts +0 -11
  138. package/dist/src/qa/runtime/RuntimeSmoke.js +0 -78
  139. package/dist/src/qa/runtime-detect.d.ts +0 -10
  140. package/dist/src/qa/runtime-detect.js +0 -72
  141. package/dist/src/qa/security/DependencyScanner.d.ts +0 -19
  142. package/dist/src/qa/security/DependencyScanner.js +0 -167
  143. package/dist/src/qa/security/SecretScanner.d.ts +0 -3
  144. package/dist/src/qa/security/SecretScanner.js +0 -55
  145. package/docs/README.md +0 -36
  146. package/docs/agents/README.md +0 -62
  147. package/docs/agents/install-for-agents.md +0 -56
  148. package/docs/agents/mcp-server.md +0 -212
  149. package/docs/agents/subagent-mode.md +0 -149
  150. package/docs/concepts/README.md +0 -47
  151. package/docs/concepts/jev-actionable-routing.md +0 -113
  152. package/docs/concepts/jev-decision-thresholds.md +0 -412
  153. package/docs/concepts/jev-efficiency.md +0 -217
  154. package/docs/concepts/jev-eval-2026-11-01.md +0 -78
  155. package/docs/concepts/limits.md +0 -52
  156. package/docs/concepts/memory.md +0 -10
  157. package/docs/concepts/security.md +0 -50
  158. package/docs/concepts/workspace-instructions.md +0 -29
  159. package/docs/getting-started/README.md +0 -82
  160. package/docs/getting-started/accounts.md +0 -78
  161. package/docs/getting-started/configure-providers.md +0 -132
  162. package/docs/guides/README.md +0 -13
  163. package/docs/guides/browser.md +0 -39
  164. package/docs/guides/desktop-app.md +0 -414
  165. package/docs/guides/extensions.md +0 -102
  166. package/docs/guides/graph-builder.md +0 -116
  167. package/docs/guides/headless.md +0 -46
  168. package/docs/guides/tui.md +0 -75
  169. package/docs/guides/update.md +0 -70
  170. package/docs/guides/web-search.md +0 -51
  171. package/docs/guides/windows-code-signing.md +0 -319
  172. package/docs/llms.txt +0 -45
  173. package/docs/reference/README.md +0 -7
  174. package/docs/reference/cli.md +0 -76
  175. package/docs/reference/config.md +0 -91
  176. package/docs/reference/slash-commands.md +0 -59
  177. package/docs/superpowers/plans/2026-11-01-claude-console-sign-in.md +0 -111
  178. package/docs/superpowers/plans/2026-11-01-jev-node-opt-in.md +0 -910
  179. package/docs/superpowers/plans/2026-11-02-workflow-pane.md +0 -398
  180. package/docs/superpowers/plans/2026-11-06-graph-soft-delete.md +0 -125
  181. package/docs/superpowers/plans/2026-11-09-orchestrator-delegation.md +0 -295
  182. package/docs/superpowers/plans/2026-11-13-graph-manager-chat.md +0 -203
  183. package/docs/superpowers/plans/2026-11-14-jev-fair-use-pricing.md +0 -79
  184. package/docs/superpowers/specs/2026-10-31-work-line-summary-design.md +0 -50
  185. package/docs/superpowers/specs/2026-11-01-claude-console-sign-in-design.md +0 -176
  186. package/docs/superpowers/specs/2026-11-01-jev-node-opt-in-design.md +0 -164
  187. package/docs/superpowers/specs/2026-11-01-pr-section-design.md +0 -111
  188. package/docs/superpowers/specs/2026-11-02-workflow-pane-design.md +0 -130
  189. package/docs/superpowers/specs/2026-11-06-bundled-skills-design.md +0 -206
  190. package/docs/superpowers/specs/2026-11-09-orchestrator-delegation-design.md +0 -291
  191. package/docs/superpowers/specs/2026-11-13-graph-manager-chat-design.md +0 -182
  192. package/docs/superpowers/specs/2026-11-14-jev-fair-use-pricing-design.md +0 -156
  193. package/scripts/jev-efficiency-eval.mjs +0 -187
  194. package/scripts/jev-efficiency-live.mjs +0 -193
  195. package/scripts/zcode-engine-replay.mjs +0 -223
  196. package/tests/agent-centric-mcp-test-plan.md +0 -208
  197. package/tests/analytics-settings-test-plan.md +0 -165
  198. package/tests/browser-cli-smoke.mjs +0 -276
  199. package/tests/browser-test-plan.md +0 -280
  200. package/tests/chat-side-panel-test-plan.md +0 -309
  201. package/tests/decision-engine-test-plan.md +0 -163
  202. package/tests/default-active-jev-test-plan.md +0 -85
  203. package/tests/harness-extensions-test-plan.md +0 -113
  204. package/tests/jev-all-decisions-test-plan.md +0 -156
  205. package/tests/jev-efficiency/criteria.json +0 -158
  206. package/tests/jev-efficiency/workloads.mjs +0 -242
  207. package/tests/jev-efficiency-test-plan.md +0 -198
  208. package/tests/permissions-sandbox-probe.mjs +0 -74
  209. package/tests/permissions-test-plan.md +0 -191
  210. package/tests/product-telemetry-test-plan.md +0 -536
  211. package/tests/thinking-stream-preview-test-plan.md +0 -136
  212. package/tests/zcode-react-engine-test-plan.md +0 -396
@@ -13,6 +13,11 @@ import type { TodoItem } from './todos.js';
13
13
  * A row carries styled segments rather than one color so a single row can pair a label with
14
14
  * a value in a semantic color (`+120` green beside `-8` red) the way the reference panel
15
15
  * does. Callers that only care about the text use {@link panelRowText}.
16
+ *
17
+ * Hue means state here as in the window: green for lines added (and a clean tree), red for lines
18
+ * removed and failures, and only where there is something to report - a zero count is gray.
19
+ * Progress, a step that was visited and a terminal that is running are neutral: the accent for
20
+ * what is live, a quiet gray for what is done.
16
21
  */
17
22
  /** The working-tree summary the Git section reports. Produced by `git-summary.ts`. */
18
23
  export interface PanelChanges {
@@ -132,7 +137,7 @@ export declare function panelDuration(milliseconds: number): string;
132
137
  /**
133
138
  * The panel's rows, top to bottom, for a terminal of `columns` x `height`.
134
139
  *
135
- * Sections are anchored: Git tools, Node, Progress and the plan read from the top, while the
140
+ * Sections are anchored: Git tools, Step, Progress and the plan read from the top, while the
136
141
  * terminal list and the graph zoom are held against the bottom - the reader asked for the graph
137
142
  * section to be at the bottom of the panel - with whatever rows the top sections leave as blank
138
143
  * space between them, so a tall terminal does not park the zoom in the middle of the screen.
@@ -105,9 +105,9 @@ function gitSection(data, width) {
105
105
  body.push(pair(label, [{ text: 'clean', color: STATUS.ok }], width));
106
106
  else
107
107
  body.push(pair(label, [
108
- { text: `+${count(changes.insertions)}`, color: STATUS.added },
108
+ { text: `+${count(changes.insertions)}`, color: changes.insertions ? STATUS.added : GRAY },
109
109
  { text: ' ' },
110
- { text: `-${count(changes.deletions)}`, color: STATUS.error },
110
+ { text: `-${count(changes.deletions)}`, color: changes.deletions ? STATUS.error : GRAY },
111
111
  ], width));
112
112
  if (changes?.isGit) {
113
113
  // The summary's own read names the branch, so the row and the counts always describe the
@@ -130,7 +130,7 @@ function nodeSection(data, width) {
130
130
  const entry = data.graph ? data.graph.nodes[data.graph.entry]?.name ?? data.graph.entry : undefined;
131
131
  if (entry)
132
132
  body.push(row({ text: clip(`entry: ${entry}`, width), color: FAINT }));
133
- return [heading('Node', width), ...body];
133
+ return [heading('Step', width), ...body];
134
134
  }
135
135
  const [focus, ...rest] = data.nodes;
136
136
  body.push(row({ text: '● ', color: accentSgr() }, { text: clip(focus.name, width - 2), color: WHITE }));
@@ -143,7 +143,7 @@ function nodeSection(data, width) {
143
143
  // follower nodes are worth one line together, not one line each.
144
144
  if (rest.length)
145
145
  body.push(row({ text: clip(` +${rest.length} more running: ${rest.map(node => node.name).join(', ')}`, width), color: FAINT }));
146
- return [heading('Node', width), ...body];
146
+ return [heading('Step', width), ...body];
147
147
  }
148
148
  function progressSection(data, width) {
149
149
  const total = data.todos.length;
@@ -162,7 +162,9 @@ function progressSection(data, width) {
162
162
  const filled = share >= 1 ? barWidth : share > 0 ? Math.max(1, Math.min(barWidth, Math.floor(share * barWidth))) : 0;
163
163
  return [
164
164
  heading('Progress', width),
165
- row({ text: '█'.repeat(filled), color: STATUS.ok }, { text: '░'.repeat(barWidth - filled), color: FAINT }, { text: ' ' }, { text: label, color: GRAY }),
165
+ // Progress is neutral, as the window draws it: the accent fill on a faint track. Green is a
166
+ // passed check, and a plan two-thirds done has passed nothing yet.
167
+ row({ text: '█'.repeat(filled), color: accentSgr() }, { text: '░'.repeat(barWidth - filled), color: FAINT }, { text: ' ' }, { text: label, color: GRAY }),
166
168
  row({ text: clip(`${done} done · ${active} active · ${waiting} waiting`, width), color: GRAY }),
167
169
  ];
168
170
  }
@@ -234,19 +236,19 @@ function terminalSection(data, width) {
234
236
  // long test-runner invocation must lose its own tail, not the elapsed time a reader is
235
237
  // watching while the row keeps repainting for it.
236
238
  const life = clip(`${session.id} · ${session.command}`, Math.max(1, width - 2 - stringWidth(age)));
237
- return row({ text: session.running ? '● ' : '○ ', color: session.running ? STATUS.ok : FAINT }, { text: life, color: session.running ? GRAY : FAINT }, { text: age, color: session.running ? GRAY : FAINT });
239
+ return row({ text: session.running ? '● ' : '○ ', color: session.running ? accentSgr() : FAINT }, { text: life, color: session.running ? GRAY : FAINT }, { text: age, color: session.running ? GRAY : FAINT });
238
240
  });
239
241
  if (ordered.length > body.length)
240
242
  body.push(row({ text: ` +${ordered.length - body.length} more`, color: FAINT }));
241
243
  return [heading('Terminals', width), ...body];
242
244
  }
243
- const MARK = (visited, active, id) => active.has(id) ? { glyph: '●', color: accentSgr() } : visited.has(id) ? { glyph: '✓', color: STATUS.ok } : { glyph: '○', color: FAINT };
245
+ const MARK = (visited, active, id) => active.has(id) ? { glyph: '●', color: accentSgr() } : visited.has(id) ? { glyph: '✓', color: SUBTLE } : { glyph: '○', color: FAINT };
244
246
  /**
245
247
  * The zoomed view of the graph section the run is in: what leads into the current node and
246
248
  * what it hands off to, with every node marked as visited, current, or not yet reached.
247
249
  *
248
250
  * Only a custom graph gets this: the built-in harness is a single agent node, and a zoom of
249
- * it would say nothing a `Node` row does not already say. Neighbours are capped so a hub node
251
+ * it would say nothing a `Step` row does not already say. Neighbours are capped so a hub node
250
252
  * cannot push the panel's other sections off the screen.
251
253
  */
252
254
  function graphSection(data, width) {
@@ -279,7 +281,7 @@ function graphSection(data, width) {
279
281
  const focusGlyph = active.has(focus) || visited.has(focus) || stopped ? '●' : '○';
280
282
  // A run that stopped on a node it had visited earlier is a stopped position, not a completed
281
283
  // one: the bold stopped marker outranks the historical visit.
282
- const focusColor = active.has(focus) ? accentSgr() : stopped ? ATTENTION : visited.has(focus) ? STATUS.ok : FAINT;
284
+ const focusColor = active.has(focus) ? accentSgr() : stopped ? ATTENTION : visited.has(focus) ? SUBTLE : FAINT;
283
285
  body.push(row({ text: `${focusGlyph} `, color: focusColor }, { text: clip(focusOf(focus), width - 2), color: active.has(focus) ? WHITE : GRAY }));
284
286
  // Distinct routes are distinct rows even when they lead to the same node: a QA node can hand off
285
287
  // to one End through `pass` and through `fail`, and collapsing them by target would hide one.
@@ -301,7 +303,7 @@ function graphSection(data, width) {
301
303
  /**
302
304
  * The panel's rows, top to bottom, for a terminal of `columns` x `height`.
303
305
  *
304
- * Sections are anchored: Git tools, Node, Progress and the plan read from the top, while the
306
+ * Sections are anchored: Git tools, Step, Progress and the plan read from the top, while the
305
307
  * terminal list and the graph zoom are held against the bottom - the reader asked for the graph
306
308
  * section to be at the bottom of the panel - with whatever rows the top sections leave as blank
307
309
  * space between them, so a tall terminal does not park the zoom in the middle of the screen.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: create-skill
3
- description: "Write a new Andorra Code skill: a SKILL.md that tells an agent how to do a recurring task. Use when the user wants to capture a workflow, checklist or house style as a reusable /command, or asks how to make a skill."
3
+ description: "Write a new Andorra Code skill: a SKILL.md that tells an agent how to do a recurring task. Use when the user wants to capture a process, checklist or house style as a reusable /command, or asks how to make a skill."
4
4
  ---
5
5
 
6
6
  # Create a skill
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: diagram
3
- description: "Draw a UML-style diagram in a reply instead of hand-typed arrows. Use when about to describe or explain a graph, workflow, routing, state machine, call sequence, data model or code structure to the user, including when reviewing an Andorra graph."
3
+ description: "Draw a UML-style diagram in a reply instead of hand-typed arrows. Use when about to describe or explain a graph, process, routing, state machine, call sequence, data model or code structure to the user, including when reviewing an Andorra graph."
4
4
  ---
5
5
 
6
6
  # Explain with a diagram
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: graph-manager
3
- description: "Design, create, edit, delete or restore Andorra Code graphs (multi-agent workflows) from the user's requirements, through Andorra's graph tools. Use when the user wants a new workflow, wants to change how an existing graph routes work, or wants a graph removed or brought back."
3
+ description: "Design, create, edit, delete or restore Andorra Code graphs (multi-agent pipelines) through Andorra's graph tools. Use when the user wants a new graph (one that reviews or fixes pull requests included), wants to change how a graph routes work, or wants a graph removed or restored."
4
4
  ---
5
5
 
6
6
  # Manage graphs
@@ -41,6 +41,9 @@ Ask until you can answer each of these:
41
41
  - Which provider and model each agent uses: list them with `andorra_providers_list` and use those ids only.
42
42
  - What each agent may touch (read only, write files, run shell, open pull requests).
43
43
  - What input a run needs beyond the task text.
44
+ - When the workflow opens, reviews or fixes pull requests: which agent owns the PR and its review comments.
45
+ Build it with the "Pull request with review fixes" pattern in `patterns.md`: that agent switches Auto-fix on
46
+ itself and loops on the reviews, and the graph's entry stays where it is.
44
47
 
45
48
  Then sketch the nodes and routes. When the `diagram` skill is in your catalog, load it and draw the sketch
46
49
  as a state diagram instead; do the same whenever you describe or review an existing graph for the user.
@@ -71,6 +74,26 @@ only what the request needs: `andorra_graph_node_patch` for a node's instruction
71
74
  `andorra_graph_node_remove` / `andorra_graph_edge_remove` to take parts out (the entry node cannot be removed
72
75
  until another node is the entry).
73
76
 
77
+ **Adding an outcome to a node that already routes.** A node's outcomes name the conditions it routes on, and
78
+ the names stop fitting once the node branches. Before adding the new outcome, read the node's existing
79
+ outcomes, their written criteria and the routes they drive, and decide what each one now means beside the new
80
+ one:
81
+
82
+ - A lone `completed` (or another catch-all such as `done` or `next`) no longer says anything once a second
83
+ outcome exists. Rename it for the kind of work it actually routes: an Orchestrator that sent everything to
84
+ the Software Engineer as `completed` and now also sends releases to a Release Manager has `implement` and
85
+ `release`, not `completed` and `release`.
86
+ - Rewrite each existing criterion so the outcomes are mutually exclusive and together cover every case the
87
+ node can meet; a criterion written when the node had one exit usually claims everything.
88
+ - Keep a name that still fits; rename only where the new branch made it vague or overlapping.
89
+
90
+ To apply a rename, switch the node to `completion: { mode: "outcomes", outcomes: [...], criteria: {...} }`
91
+ with `andorra_graph_node_patch`, then `andorra_graph_edge_upsert` every route that used the old name with the
92
+ new `outcome` and the edge's existing `id` (an upsert without the id adds a second edge and leaves the old
93
+ one on a port the node no longer has). Also update anything else that names the
94
+ old outcome: a loop modifier's `until.outcome` on that node, and the node's instruction if it tells the agent
95
+ which outcome to report. Name the renames when you show the user what changed.
96
+
74
97
  The built-in `default` graph cannot be edited: create a new graph with the shape you want instead.
75
98
 
76
99
  **Place every node.** A node's `position` (`{x, y}`) is the top-left corner of its card on the editor's
@@ -85,7 +108,16 @@ and the upsert reply's `placed` says where it went.
85
108
 
86
109
  1. `andorra_graph_validate` and fix every issue it reports; `errors.md` in this skill maps each code to its
87
110
  fix. Do not publish around an issue.
88
- 2. Show the user what changed: nodes added, removed or changed, and routes.
111
+ 2. Describe the change to the user in chat, in plain words, before publishing. Outside Full Access, publishing
112
+ asks the user to approve or deny, and that prompt shows only the raw call; under Full Access it publishes
113
+ without a prompt, so do not promise one. Either way this description is what the user verifies against:
114
+ - the graph's name and id, and the revision it replaces;
115
+ - each node added, removed or changed, and for a changed node what it now does differently (instruction,
116
+ model, capabilities, completion outcomes), not just that it changed;
117
+ - each route added or removed, and any change to the entry or the limits;
118
+ - what a run of the graph will now do that it did not before, including anything the user did not ask for
119
+ that the change brings with it;
120
+ - the updated diagram, when the `diagram` skill is available.
89
121
  3. `andorra_graph_publish`. A `REVISION_CONFLICT` means someone saved a newer revision: begin a new edit draft
90
122
  from the latest, reapply your changes, validate and publish again.
91
123
  4. If the user stops partway, `andorra_graph_discard` the draft.
@@ -96,7 +128,9 @@ Deleting is a soft delete: the graph leaves every list and new runs refuse it, b
96
128
  it can be restored.
97
129
 
98
130
  1. Read the graph's latest `revision` (`andorra_graph_get` or `andorra_graphs_list`).
99
- 2. Ask the user in chat to confirm deleting that graph, naming it. Do not delete without a clear yes.
131
+ 2. Ask the user in chat to confirm deleting that graph, naming it and saying what it does, which revision is
132
+ the latest, and that new runs will refuse it. Do not delete without a clear yes. Before a restore, say the
133
+ same about the graph that comes back.
100
134
  3. `andorra_graph_delete` with `id`, `expectedRevision` and `confirm` set to the same `id`.
101
135
  - `GRAPH_IN_USE`: an automation runs this graph; tell the user which ones and stop.
102
136
  - A free account's deleted graph still counts as its one custom graph; it can be restored, not replaced.
@@ -67,6 +67,33 @@ check (loop modifier) --pass--> done
67
67
  `pass` or runs out of attempts. It exposes only the `pass` port; use it when the same agent fixes and
68
68
  rechecks its own work.
69
69
 
70
+ ## Pull request with review fixes (Auto-fix)
71
+
72
+ ```
73
+ orchestrator --completed--> pr-owner --completed--> done
74
+ ```
75
+
76
+ Use this whenever the workflow opens a pull request, reviews one, or answers its review comments.
77
+
78
+ - One agent owns the PR end to end: it opens or attaches the PR, switches Auto-fix on itself (the `pull_request`
79
+ tool, `action: "attach"` or `"update"` with `autoFix: true`), and fixes the review comments. Auto-fix prompts
80
+ go back to the node that switched Auto-fix on (or, when none did, to the node that attached the PR), not to
81
+ the graph's entry. So that call belongs in the PR owner's instruction, never in an Orchestrator or planner
82
+ that hands the work on.
83
+ - Do not move the entry, demote an Orchestrator, or add edges back into the owner to steer Auto-fix there. A
84
+ prompt is never routed through the graph's edges; it is addressed to the node.
85
+ - The owner's instruction is a loop it runs itself: push the fix, resolve the threads it fixed, reply to the
86
+ findings it disputes, then wait for the next review. If the `pull_request` tool offers an `await_review`
87
+ action, call it and repeat until it reports the PR merged or closed (or the round cap below): the agent keeps
88
+ its whole conversation, and waiting costs no tokens. Without that action, end the turn once the round is
89
+ pushed; Auto-fix wakes this same node with the next comments, continuing its attempt when it stopped short.
90
+ - Never wait with `sleep`, a shell polling loop, or `set_timer` (timers are for reminders the user asked for).
91
+ Waiting inside a tool call is the only wait that does not hold the model.
92
+ - Give the owner shell, file-write and network access (it runs `git` and `gh`), and a `limits.wallTimeMs` with
93
+ room for several fix rounds: a 15-minute ceiling stops it in the middle of a fix.
94
+ - Put the exit rule in its instruction: stop when the PR is merged or closed (Auto-fix then switches itself
95
+ off), when the reviewer signs off, or after a fixed number of rounds the user chose.
96
+
70
97
  ## Single agent with a human approval
71
98
 
72
99
  ```
@@ -689,7 +689,7 @@
689
689
  {
690
690
  "source": "src/skills/bundled/create-skill/SKILL.md",
691
691
  "asset": "create-skill/SKILL.md",
692
- "sha256": "d3dbb7565597460d3114bb934eb5d9b8112fc2e52849c6ee1b67fea745a68436"
692
+ "sha256": "fd25af06f9545e27d2db3ba34c0d912574b27b1f04c61399c27f078d5e6cf5b0"
693
693
  },
694
694
  {
695
695
  "source": "src/skills/bundled/manage-skills/SKILL.md",
@@ -714,7 +714,7 @@
714
714
  {
715
715
  "source": "src/skills/bundled/graph-manager/SKILL.md",
716
716
  "asset": "graph-manager/SKILL.md",
717
- "sha256": "ffd7ce9f4cb088f35e666941fafb2ece2fab805bb96e70e40c93af530332f2b1"
717
+ "sha256": "06019dce82a2ea72f4121f37111481f8bdd63d39b2d1ac1ab479405424cc7708"
718
718
  },
719
719
  {
720
720
  "source": "src/skills/bundled/graph-manager/errors.md",
@@ -724,12 +724,12 @@
724
724
  {
725
725
  "source": "src/skills/bundled/graph-manager/patterns.md",
726
726
  "asset": "graph-manager/patterns.md",
727
- "sha256": "c80a27c1af42d99ae48fb16b0c9727ae5f977cedfb7258966d76d5a4e2f0c9c3"
727
+ "sha256": "bf57e2421697360cc293109b5eaa84ecff0d93fc5dcd957a34d8173ca91b1e2c"
728
728
  },
729
729
  {
730
730
  "source": "src/skills/bundled/diagram/SKILL.md",
731
731
  "asset": "diagram/SKILL.md",
732
- "sha256": "369b04625432bc0a3f302eba0c9ce0ca7fe9455a5b4c27d105bd393520ae0c8d"
732
+ "sha256": "2840d736a0001ca82dc002056648ac2b73bdc3f6ce3f710a3d1832a548bbd4dc"
733
733
  }
734
734
  ],
735
735
  "additionalCopyright": [
@@ -22,14 +22,14 @@ const bundled = [
22
22
  { id: 'andorra:control-browser', path: 'control-browser/SKILL.md', description: 'Use the available persistent browser runtime to navigate, inspect and interact with web pages.', source: 'bundled', requiredTools: ['qa.browser_session'] },
23
23
  // Andorra's own setup skills: written for the agent, typeable as /name, loaded on matching requests.
24
24
  { id: 'andorra:manage-mcp', path: 'manage-mcp/SKILL.md', description: "Add, change, test, turn off or remove an MCP server in Andorra Code. Use when the user wants to connect a tool server (GitHub, a database, a browser, an internal API), asks why an MCP server's tools are missing, or wants one disconnected.", source: 'bundled' },
25
- { id: 'andorra:create-skill', path: 'create-skill/SKILL.md', description: "Write a new Andorra Code skill: a SKILL.md that tells an agent how to do a recurring task. Use when the user wants to capture a workflow, checklist or house style as a reusable /command, or asks how to make a skill.", source: 'bundled', loadWhen: 'before writing a new skill or turning something into one' },
25
+ { id: 'andorra:create-skill', path: 'create-skill/SKILL.md', description: "Write a new Andorra Code skill: a SKILL.md that tells an agent how to do a recurring task. Use when the user wants to capture a process, checklist or house style as a reusable /command, or asks how to make a skill.", source: 'bundled', loadWhen: 'before writing a new skill or turning something into one' },
26
26
  { id: 'andorra:manage-skills', path: 'manage-skills/SKILL.md', description: "List, install, turn on or off, and remove Andorra Code skills and plugins. Use when the user asks what skills they have, wants to add a skill from GitHub or a folder, disable one, or clean up skills they no longer use.", source: 'bundled', loadWhen: 'before installing, copying, listing, turning on or off, or removing a skill or plugin' },
27
27
  { id: 'andorra:create-agent', path: 'create-agent/SKILL.md', description: "Design a reusable Andorra Code Agent (a role with its own instructions, model, capabilities and input/output contract) and produce a file the user imports into their Agent library. Use when the user wants a custom reviewer, tester, researcher or other role to reuse across graphs.", source: 'bundled' },
28
28
  { id: 'andorra:doctor', path: 'doctor/SKILL.md', description: "Check that Andorra Code is set up and healthy: Node, sign-in, configuration, providers, MCP servers, disk space. Use when something does not work (no models, tools missing, sign-in errors, tasks failing at start) or the user asks to check their setup.", source: 'bundled' },
29
29
  { id: 'andorra:write-instructions', path: 'write-instructions/SKILL.md', description: "Create or improve a repository's agent instructions (ANDORRA.md or AGENTS.md): build and test commands, conventions, and rules agents must follow. Use when the user wants agents to work the way their team does, or asks to set up or tighten project instructions.", source: 'bundled' },
30
- { id: 'andorra:graph-manager', path: 'graph-manager/SKILL.md', description: "Design, create, edit, delete or restore Andorra Code graphs (multi-agent workflows) from the user's requirements, through Andorra's graph MCP tools. Use when the user wants a new workflow, wants to change how an existing graph routes work, or wants a graph removed or brought back.", source: 'bundled' },
30
+ { id: 'andorra:graph-manager', path: 'graph-manager/SKILL.md', description: "Design, create, edit, delete or restore Andorra Code graphs (multi-agent pipelines) from the user's requirements, through Andorra's graph tools. Use when the user wants a new graph, wants to change how an existing graph routes work, or wants a graph removed or brought back.", source: 'bundled' },
31
31
  // Loaded by the agent on its own when a reply has a shape to show; the desktop transcript draws the fence it writes.
32
- { id: 'andorra:diagram', path: 'diagram/SKILL.md', description: "Draw a UML-style diagram in a reply instead of hand-typed arrows. Use when about to describe or explain a graph, workflow, routing, state machine, call sequence, data model or code structure to the user, including when reviewing an Andorra graph.", source: 'bundled', loadWhen: 'before describing or explaining a graph, workflow, state machine, call sequence or code structure to the user' },
32
+ { id: 'andorra:diagram', path: 'diagram/SKILL.md', description: "Draw a UML-style diagram in a reply instead of hand-typed arrows. Use when about to describe or explain a graph, process, routing, state machine, call sequence, data model or code structure to the user, including when reviewing an Andorra graph.", source: 'bundled', loadWhen: 'before describing or explaining a graph, workflow, state machine, call sequence or code structure to the user' },
33
33
  ];
34
34
  /** Andorra's own skills, as registered: what a person can type and the agent can load by id. */
35
35
  export function bundledSkillCatalog() {
@@ -14,6 +14,21 @@ export declare function unavailableHistoryTools(messages: readonly Message[], av
14
14
  export declare function suspectedDroppedToolCall(response: Pick<ModelResponse, 'text' | 'toolCalls' | 'usage' | 'reasoningContent'>): boolean;
15
15
  /** The sentence telling the model which earlier tools this node lacks; empty when there are none. */
16
16
  export declare function unavailableToolsSentence(unavailable: readonly string[]): string;
17
+ /**
18
+ * The way out of a stalled turn for a node that is waiting on the user, not on more work.
19
+ *
20
+ * A reply that asks the user for something (a login, an approval, an answer) is text with no tool
21
+ * call, which is exactly what a stall looks like, and "call complete_agent when the requirements
22
+ * are finished" reads as a ban on handing off before they are. A live run asked the user to sign in
23
+ * twice, was sent back both times, and started the interactive login itself instead; the user never
24
+ * saw either request. A node without `ask_user` (a headless run, a delegated child, a later graph
25
+ * stage) asks through its handoff: the summary is what the user reads, and their next message
26
+ * continues the conversation. A node that has the tool is pointed at it first by
27
+ * {@link ASK_USER_GUIDANCE}, because a question it asks that way pauses the run for the answer.
28
+ */
29
+ export declare const USER_BLOCKED_GUIDANCE = "The exception is work that cannot continue without the user: a question only they can answer, or a login, approval or other action only they can perform. Do not work around it or retry it. Call complete_agent alone now (with a blocked outcome if one is declared) and put the question or the exact action needed first in the summary, followed by what is done and what remains; the user reads the summary and answers in their next message.";
30
+ /** Added for a node that has `ask_user`: a question belongs in that tool, not in a reply or a handoff. */
31
+ export declare const ASK_USER_GUIDANCE = "If your reply asked the user a question, call ask_user with that question now instead: a question written in a reply does not pause the run, and the tool waits for their answer.";
17
32
  /** The continuation sent after a graph-node turn that ended without a tool call or a handoff. */
18
33
  export declare function stalledTurnGuidance(input: {
19
34
  dropped: boolean;
@@ -57,6 +57,21 @@ export function unavailableToolsSentence(unavailable) {
57
57
  return '';
58
58
  return `Earlier turns in this conversation called ${list(unavailable)}, which this node does not have: a call to any of them is discarded before it runs, so reach the same goal with the tools you are offered, or hand off with complete_agent and name what blocked you.`;
59
59
  }
60
+ /**
61
+ * The way out of a stalled turn for a node that is waiting on the user, not on more work.
62
+ *
63
+ * A reply that asks the user for something (a login, an approval, an answer) is text with no tool
64
+ * call, which is exactly what a stall looks like, and "call complete_agent when the requirements
65
+ * are finished" reads as a ban on handing off before they are. A live run asked the user to sign in
66
+ * twice, was sent back both times, and started the interactive login itself instead; the user never
67
+ * saw either request. A node without `ask_user` (a headless run, a delegated child, a later graph
68
+ * stage) asks through its handoff: the summary is what the user reads, and their next message
69
+ * continues the conversation. A node that has the tool is pointed at it first by
70
+ * {@link ASK_USER_GUIDANCE}, because a question it asks that way pauses the run for the answer.
71
+ */
72
+ export const USER_BLOCKED_GUIDANCE = 'The exception is work that cannot continue without the user: a question only they can answer, or a login, approval or other action only they can perform. Do not work around it or retry it. Call complete_agent alone now (with a blocked outcome if one is declared) and put the question or the exact action needed first in the summary, followed by what is done and what remains; the user reads the summary and answers in their next message.';
73
+ /** Added for a node that has `ask_user`: a question belongs in that tool, not in a reply or a handoff. */
74
+ export const ASK_USER_GUIDANCE = 'If your reply asked the user a question, call ask_user with that question now instead: a question written in a reply does not pause the run, and the tool waits for their answer.';
60
75
  /** The continuation sent after a graph-node turn that ended without a tool call or a handoff. */
61
76
  export function stalledTurnGuidance(input) {
62
77
  const parts = [
@@ -66,6 +81,8 @@ export function stalledTurnGuidance(input) {
66
81
  input.available.length ? `This node's tools are: ${list(input.available)}.` : '',
67
82
  unavailableToolsSentence(input.unavailable),
68
83
  'Your next response must call one of this node\'s tools. A progress update does not hand off this graph node. When its requirements and verification are finished, call complete_agent alone with the declared outcome and output.',
84
+ input.available.includes('ask_user') ? ASK_USER_GUIDANCE : '',
85
+ USER_BLOCKED_GUIDANCE,
69
86
  ];
70
87
  return parts.filter(Boolean).join(' ');
71
88
  }
@@ -35,7 +35,7 @@ export type TelemetryLanguage = typeof TELEMETRY_LANGUAGES[number];
35
35
  export declare const TELEMETRY_FRAMEWORKS: readonly ["react", "vue", "angular", "svelte", "nextjs", "nestjs", "express", "fastapi", "django", "flask", "spring", "rails", "laravel", "dotnet", "actix", "axum", "gin", "flutter", "electron", "tauri", "other"];
36
36
  export type TelemetryFramework = typeof TELEMETRY_FRAMEWORKS[number];
37
37
  /** Product-owned tool names, plus the three buckets user- or server-named tools collapse into. */
38
- export declare const TELEMETRY_TOOL_NAMES: readonly ["Read", "Write", "Edit", "Glob", "Grep", "Bash", "PowerShell", "git_read", "read_artifact", "write_artifact", "repo_explore", "memory_search", "set_timer", "pull_request", "read_skill_resource", "ask_user", "spawn_subagent", "qa.browser", "qa.browser_session", "qa.deep", "qa.fast", "qa.inspect_project", "qa.security", "qa.status", "qa.terminal", "qa.test", "browser.panel", "browser.incognito", "browser.solve_captcha", "web_search", "mcp", "plugin", "other"];
38
+ export declare const TELEMETRY_TOOL_NAMES: readonly ["Read", "Write", "Edit", "Glob", "Grep", "Bash", "PowerShell", "git_read", "read_artifact", "write_artifact", "repo_explore", "memory_search", "set_timer", "pull_request", "read_skill_resource", "ask_user", "spawn_subagent", "qa.browser", "qa.browser_session", "qa.terminal", "browser.panel", "browser.incognito", "browser.solve_captcha", "web_search", "mcp", "plugin", "other"];
39
39
  export type TelemetryToolName = typeof TELEMETRY_TOOL_NAMES[number];
40
40
  /**
41
41
  * Public model ids a run may name. Provider configuration accepts a user-supplied string of up to
@@ -48,8 +48,7 @@ export const TELEMETRY_TOOL_NAMES = [
48
48
  // The QA tools are product-owned names in GRAPH_TOOLS; each stays distinguishable so feature
49
49
  // usage can be attributed to it rather than to the `other` bucket. The panel browser tool
50
50
  // rides the same browser capability and stays attributable the same way.
51
- 'qa.browser', 'qa.browser_session', 'qa.deep', 'qa.fast', 'qa.inspect_project', 'qa.security',
52
- 'qa.status', 'qa.terminal', 'qa.test',
51
+ 'qa.browser', 'qa.browser_session', 'qa.terminal',
53
52
  'browser.panel', 'browser.incognito',
54
53
  'browser.solve_captcha', 'web_search',
55
54
  'mcp', 'plugin', 'other',
@@ -19,6 +19,12 @@ export interface TerminalStatus {
19
19
  inputTokens?: number;
20
20
  outputTokens?: number;
21
21
  requests?: number;
22
+ /**
23
+ * The activity is a background check (the startup graph-model check), not a task: the welcome
24
+ * card names it, but no working clock runs and the composer keeps its idle layout. Any later
25
+ * activity that does not repeat the flag clears it.
26
+ */
27
+ backgroundActivity?: boolean;
22
28
  contextWindow?: number;
23
29
  /** Input tokens reported for the most recent model request; live context-window use. */
24
30
  contextUsed?: number;
@@ -252,19 +258,20 @@ export declare class TerminalUI extends EventEmitter {
252
258
  private todoOffset;
253
259
  private todoPageSize;
254
260
  private scroll;
255
- /** Whether a run is streaming: with no prompt pending, the wheel may scroll the transcript. */
261
+ /** Whether a run is streaming. */
256
262
  private runActive;
257
263
  /**
258
- * Whether alternate scroll mode (?1007) is currently armed.
264
+ * The drag selection over the drawn frame, in screen cells.
259
265
  *
260
- * The app never takes mouse reporting, so the terminal keeps drag-to-select and its
261
- * clipboard in every state. In the alternate screen a terminal instead turns the wheel
262
- * into Up/Down sequences when alternate scroll is on — byte-identical to the arrow keys,
263
- * and on by default in Windows Terminal, VTE and iTerm2 — so the app arms that mode only
264
- * where Up/Down cannot recall history: while a screen is open, or while a run streams with
265
- * no question pending. At the resting prompt it is switched off and the wheel is inert.
266
+ * The app holds mouse reporting for the whole session so the wheel arrives as a wheel report
267
+ * and never as the Up/Down bytes that recall input history. Holding the mouse takes the drag
268
+ * away from the terminal, so the app draws the selection itself and copies it on release.
266
269
  */
267
- private alternateScroll;
270
+ private selection?;
271
+ /** The last left press, kept to recognize a double-click on the same cell. */
272
+ private lastPress?;
273
+ /** The frame as composed, before the selection highlight is laid over it. */
274
+ private frame;
268
275
  /**
269
276
  * Live reasoning preview state. `thinkingActive` marks a stream in progress; the text
270
277
  * is the bounded tail the preview renders from.
@@ -299,6 +306,17 @@ export declare class TerminalUI extends EventEmitter {
299
306
  private completion?;
300
307
  private dismissedCompletion?;
301
308
  private incoming;
309
+ /**
310
+ * Raw bytes not yet decoded to `incoming`.
311
+ *
312
+ * Legacy mouse reports are framed here, on bytes, before UTF-8 decoding: their payload
313
+ * is three value-plus-32 bytes that the decoder would buffer while an incomplete
314
+ * sequence (column 192, row 128 ends in E0 A0) and collapse when the pair forms a
315
+ * valid one (column 162, row 128 encodes as C2 A0), so no string-domain measurement
316
+ * can see a report in time without risking the keystroke that follows it.
317
+ */
318
+ private rawIncoming;
319
+ private rawTimer?;
302
320
  private pasting;
303
321
  private paste;
304
322
  private pasteQuestion?;
@@ -579,20 +597,29 @@ export declare class TerminalUI extends EventEmitter {
579
597
  /** The last nonempty line of the retained reasoning, flattened for one row. */
580
598
  private thinkingTail;
581
599
  private updateWorkingClock;
582
- /**
583
- * Recompute whether the wheel may act: alternate scroll mode is armed while a screen is
584
- * open, or while a run streams with no question pending, and off everywhere else.
585
- *
586
- * Only transitions write anything. Entering the alternate screen resets the flag first
587
- * (`start`), because that screen begins with the mode explicitly switched off.
588
- */
589
- private updateAlternateScroll;
590
600
  close(): void;
591
601
  private finishQuestion;
592
602
  private onEnd;
593
603
  private onResize;
594
604
  private onData;
595
- /** Drain the decoded stream: paste markers and ordinary keys. */
605
+ /**
606
+ * Frame legacy X10 mouse reports on the raw byte stream before UTF-8 decoding.
607
+ *
608
+ * A terminal with mouse tracking but without the SGR encoding of mode 1006 answers capture
609
+ * with ESC[M plus three raw payload bytes (button, then coordinates, each offset by
610
+ * 32). Those bytes are framed here rather than in the decoded string because decoding
611
+ * buffers an incomplete trailing sequence and collapses a complete pair into one
612
+ * character, so a string-domain match could only see a report late, consuming the
613
+ * keystroke that follows it. A report split across reads holds the buffer for the
614
+ * input burst, the same grace a lone Escape gets; a burst that elapses with an
615
+ * incomplete prefix hands the bytes to the key parser as if they were typed. Inside a
616
+ * bracketed paste the bytes are text, so once the decoded stream opens a paste the
617
+ * remainder is handed over untouched.
618
+ */
619
+ private consumeRaw;
620
+ private feedRaw;
621
+ private armRawTimer;
622
+ /** Drain the decoded stream: paste markers, SGR mouse reports and ordinary keys. */
596
623
  private consumeIncoming;
597
624
  /**
598
625
  * The effective disclosure state of one prompt box.
@@ -602,10 +629,27 @@ export declare class TerminalUI extends EventEmitter {
602
629
  * either state.
603
630
  */
604
631
  private promptExpanded;
632
+ /**
633
+ * Act on one mouse report: the wheel scrolls, and a left drag selects text on the screen.
634
+ *
635
+ * The selection lives in screen cells over the frame as drawn. Releasing the button copies
636
+ * it; the highlight stays until the next key, click or wheel tick so the reader can see what
637
+ * was taken. A press and release on one cell selects nothing, and a second press on the same
638
+ * cell within the double-click window takes the word under it. Other buttons are swallowed,
639
+ * so no click reaches the composer as text.
640
+ * @param button - the report's button code, modifiers and motion bit included.
641
+ * @param pressed - false for a release.
642
+ * @param column - 1-based screen column.
643
+ * @param row - 1-based screen row.
644
+ */
645
+ private mouse;
646
+ /** Copy the screen selection; over SSH only the terminal's clipboard is the reader's own. */
647
+ private copyScreenSelection;
648
+ /** Lay the selection highlight over a composed frame. */
649
+ private withSelection;
605
650
  /**
606
651
  * Scroll the transcript (or the active screen). Positive `direction` scrolls up (toward
607
- * older output), which is what an Up key means — typed, or sent by the wheel under
608
- * alternate scroll mode.
652
+ * older output), which is what a wheel-up report and an Up key during a run both mean.
609
653
  */
610
654
  private scrollBy;
611
655
  private normalData;