@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
@@ -16,11 +16,12 @@ input[type="checkbox"], input[type="radio"] {
16
16
  cursor: pointer; box-shadow: none;
17
17
  transition: background-color var(--dur-1) var(--ease-standard), border-color var(--dur-1) var(--ease-standard);
18
18
  }
19
- input[type="checkbox"] { border-radius: var(--radius-xs); color: var(--on-accent-fill, var(--on-accent)); }
19
+ input[type="checkbox"] { border-radius: var(--radius-xs); }
20
20
  input[type="radio"] { border-radius: var(--radius-full); }
21
21
  input[type="checkbox"]:hover:not(:disabled), input[type="radio"]:hover:not(:disabled) { border-color: var(--text-3); }
22
- /* On is the accent fill, as a switch's is. */
23
- input[type="checkbox"]:checked, input[type="checkbox"]:indeterminate { background: var(--accent-fill, var(--accent)); border-color: var(--accent-fill, var(--accent)); }
22
+ /* On fills with the ink and cuts the mark from it in the ink's contrast colour, as the desktop's
23
+ checkbox does (desktop/src/styles/controls.css); the blue fill belongs to the action alone (A1). */
24
+ input[type="checkbox"]:checked, input[type="checkbox"]:indeterminate { background: var(--accent); border-color: var(--accent); }
24
25
  input[type="checkbox"]::before {
25
26
  content: ""; width: 10px; height: 10px; background: currentColor;
26
27
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
@@ -34,16 +35,16 @@ input[type="checkbox"]:indeterminate::before {
34
35
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3.5' stroke-linecap='round'%3E%3Cpath d='M5 12h14'/%3E%3C/svg%3E");
35
36
  }
36
37
  input[type="radio"]::before {
37
- content: ""; width: 8px; height: 8px; border-radius: var(--radius-full); background: var(--accent-fill, var(--accent));
38
+ content: ""; width: 8px; height: 8px; border-radius: var(--radius-full); background: var(--accent);
38
39
  transform: scale(0); transition: transform var(--dur-1) var(--ease-standard);
39
40
  }
40
- input[type="radio"]:checked { border-color: var(--accent-fill, var(--accent)); }
41
+ input[type="radio"]:checked { border-color: var(--accent); }
41
42
  input[type="radio"]:checked::before { transform: scale(1); }
42
43
  /* Disabled takes the disabled ink for its edge and mark rather than fading the whole control. */
43
44
  input[type="checkbox"]:disabled, input[type="radio"]:disabled { cursor: default; border-color: var(--text-disabled); background: var(--bg-card); }
44
45
  input[type="checkbox"]:disabled:checked, input[type="checkbox"]:disabled:indeterminate { background: var(--text-disabled); border-color: var(--text-disabled); }
45
46
  input[type="radio"]:disabled::before { background: var(--text-disabled); }
46
- input[type="checkbox"]:focus-visible, input[type="radio"]:focus-visible { outline: 2px solid var(--focus, var(--accent)); outline-offset: 2px; box-shadow: none; }
47
+ input[type="checkbox"]:focus-visible, input[type="radio"]:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; box-shadow: none; }
47
48
 
48
49
  /* Number and search fields ---------------------------------------------------- */
49
50
  input[type="number"] { appearance: textfield; -moz-appearance: textfield; }
@@ -58,15 +59,19 @@ input[type="search"]::-webkit-search-cancel-button {
58
59
  input[type="search"]::-webkit-search-cancel-button:hover { background: var(--text); }
59
60
 
60
61
  /* Select ------------------------------------------------------------------------ */
61
- /* The closed select is the app's boxed field with its chevron (Lucide's, on the 1.5 stroke, in each
62
- appearance's muted ink); the list it opens is the panel below. */
62
+ /* The closed select is the app's boxed field with its chevron (Lucide's, on the 1.5 stroke); the list
63
+ it opens is the panel below. A native select draws no pseudo-element to mask, so the chevron is an
64
+ image, and an image cannot read a token: its stroke is the muted ink exactly as `--text-3` defines
65
+ it in each appearance, the ink colour at the token's alpha (dark #f5f5f5 at 60%, light #1c1c1c at
66
+ 66%), so it composites to the same neutral as every other muted glyph on any ground.
67
+ `test/graph-ui-theme.test.ts` holds the two strokes to the tokens. */
63
68
  select:not([multiple]) {
64
69
  appearance: none; -webkit-appearance: none; padding-right: 30px; cursor: pointer; text-overflow: ellipsis;
65
- background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%239a9aa4' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
70
+ background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23f5f5f5' stroke-opacity='.6' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
66
71
  background-repeat: no-repeat; background-position: right 10px center;
67
72
  }
68
73
  :root[data-theme='light'] select:not([multiple]) {
69
- background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%235c5d63' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
74
+ background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%231c1c1c' stroke-opacity='.66' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
70
75
  }
71
76
  select:not([multiple])[data-open="true"] { border-color: var(--text-3); }
72
77
  select:disabled { cursor: default; color: var(--text-disabled); }
@@ -74,19 +79,19 @@ select:disabled { cursor: default; color: var(--text-disabled); }
74
79
  /* The dropdown is the app's popover: 8px corners, a 4px inset, rows on the 4px radius at the row
75
80
  height that fill one ink tier under the pointer or the keys. Group labels are sentence case. */
76
81
  .select-panel {
77
- position: fixed; z-index: 400; min-width: 160px; max-width: min(420px, calc(100vw - 16px));
82
+ position: fixed; z-index: var(--z-menu); min-width: 160px; max-width: min(420px, calc(100vw - 16px));
78
83
  display: flex; flex-direction: column; overflow: hidden;
79
84
  background: var(--bg-input); border: 1px solid var(--border-strong); border-radius: var(--radius-md);
80
85
  box-shadow: var(--shadow-menu); padding: var(--space-1); color: var(--text);
81
86
  animation: controls-panel-in var(--dur-1) var(--ease-standard);
82
87
  }
83
- .select-list { overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
88
+ .select-list { overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
84
89
  .select-option {
85
90
  display: flex; align-items: center; gap: 8px; min-height: var(--row-height); padding: 0 8px; flex: 0 0 auto;
86
91
  border-radius: var(--radius-xs); cursor: pointer; color: var(--text); min-width: 0; white-space: nowrap;
87
92
  font-size: var(--type-row);
88
93
  }
89
- .select-option:hover, .select-option[data-active="true"] { background: var(--hover, var(--bg-hover)); }
94
+ .select-option:hover, .select-option[data-active="true"] { background: var(--hover); }
90
95
  .select-option[aria-disabled="true"] { color: var(--text-disabled); cursor: default; }
91
96
  .select-option[aria-disabled="true"]:hover { background: transparent; }
92
97
  .select-option-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
@@ -110,23 +115,26 @@ details > summary::before {
110
115
  details[open] > summary::before { transform: rotate(90deg); }
111
116
 
112
117
  /* Scrollbars and resize grip ------------------------------------------------- */
113
- /* Thin bars on the quiet ink, as in the desktop window; the rail keeps its own fade-in bars. */
114
- ::-webkit-scrollbar { width: 8px; height: 8px; }
115
- ::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: var(--radius-xs); }
116
- ::-webkit-scrollbar-thumb:hover { background: var(--text-3); }
118
+ /* The desktop window's bars (desktop/src/styles/primitives.css): a 6px thumb at 11% ink, 18% under the
119
+ pointer, on no track. The rail keeps its own fade-in bars on the same inks (style.css). */
120
+ ::-webkit-scrollbar { width: 6px; height: 6px; }
121
+ ::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--text) 11%, transparent); border-radius: var(--radius-full); }
122
+ ::-webkit-scrollbar-thumb:hover { background: color-mix(in srgb, var(--text) 18%, transparent); }
117
123
  ::-webkit-scrollbar-track, ::-webkit-scrollbar-corner { background: transparent; }
118
124
  ::-webkit-resizer {
119
125
  background: linear-gradient(135deg, transparent 0 58%, var(--text-3) 58% 64%, transparent 64% 76%, var(--text-3) 76% 82%, transparent 82%);
120
126
  }
121
127
 
122
128
  /* Tooltips and validation bubbles ---------------------------------------------- */
129
+ /* The desktop's bubble (desktop/src/styles/controls.css `.app-tooltip`): the raised surface, the strong
130
+ hairline, the menu shadow, on the tooltip layer. */
123
131
  .app-tooltip {
124
- position: fixed; left: 0; top: 0; z-index: 1000;
132
+ position: fixed; left: 0; top: 0; z-index: var(--z-tooltip);
125
133
  width: max-content; max-width: min(320px, calc(100vw - 16px));
126
- padding: 5px 9px; border-radius: var(--row-radius);
134
+ padding: var(--space-1) var(--space-2); border-radius: var(--radius-sm);
127
135
  background: var(--bg-input); color: var(--text); border: 1px solid var(--border-strong);
128
136
  box-shadow: var(--shadow-menu);
129
- font-family: var(--font-ui); font-size: var(--type-xs); font-weight: var(--weight-regular); line-height: 1.45;
137
+ font-family: var(--font-ui); font-size: var(--type-xs); font-weight: var(--weight-regular); line-height: var(--leading-xs);
130
138
  white-space: pre-line; overflow-wrap: anywhere; text-align: left;
131
139
  pointer-events: none; user-select: none; -webkit-user-select: none;
132
140
  opacity: 0; transform: translateY(-2px);
@@ -134,6 +142,19 @@ details[open] > summary::before { transform: rotate(90deg); }
134
142
  }
135
143
  .app-tooltip[data-placement="above"] { transform: translateY(2px); }
136
144
  .app-tooltip[data-visible="true"] { opacity: 1; transform: none; }
145
+ /* One line: the name, then the shortcut as a key chip (C7). It never wraps. */
146
+ .app-tooltip[data-kind="line"] {
147
+ display: flex; align-items: center; gap: var(--space-2); white-space: nowrap; overflow: hidden;
148
+ max-width: min(480px, calc(100vw - 16px));
149
+ }
150
+ .app-tooltip-kbd { margin-left: auto; }
151
+ /* A key as a chip, the desktop's `.kbd` (desktop/src/styles/primitives.css). */
152
+ .kbd {
153
+ display: inline-flex; align-items: center; flex: none; height: 18px; min-width: 0; padding: 0 var(--space-1);
154
+ border: 0; border-radius: var(--radius-xs); background: var(--bg-control); color: var(--text-2);
155
+ font: inherit; font-family: var(--font-ui); font-size: var(--type-xs); line-height: 1; letter-spacing: 0;
156
+ font-variant-numeric: tabular-nums; white-space: nowrap;
157
+ }
137
158
  .app-tooltip[data-variant="invalid"] {
138
159
  display: flex; align-items: flex-start; gap: 6px;
139
160
  color: var(--err-text); border-color: color-mix(in srgb, var(--err) 55%, var(--border-strong));
@@ -147,8 +168,8 @@ details[open] > summary::before { transform: rotate(90deg); }
147
168
  /* Question dialogs ------------------------------------------------------------ */
148
169
  .ask-dialog { width: min(440px, calc(100vw - 40px)); }
149
170
  .ask-dialog-body { padding: var(--space-5) var(--space-5) var(--space-4); display: flex; flex-direction: column; gap: 8px; }
150
- .ask-dialog-title { margin: 0; font-size: var(--type-section); font-weight: var(--weight-strong); overflow-wrap: anywhere; }
151
- .ask-dialog-message { margin: 0; color: var(--text-2); font-size: var(--type-sm); line-height: 1.5; white-space: pre-line; overflow-wrap: anywhere; }
171
+ .ask-dialog-title { margin: 0; font-size: var(--type-section); line-height: var(--leading-md); font-weight: var(--weight-strong); overflow-wrap: anywhere; }
172
+ .ask-dialog-message { margin: 0; color: var(--text-2); font-size: var(--type-sm); line-height: var(--leading-sm); white-space: pre-line; overflow-wrap: anywhere; }
152
173
  .ask-dialog-form { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
153
174
  .ask-dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: var(--space-3); }
154
175
  /* A destructive question confirms with the ordinary primary button, whose label names the action;
@@ -129,6 +129,18 @@
129
129
  // ------------------------------------------------------------------ Tooltips
130
130
 
131
131
  const tipText = element => (element.getAttribute(STASH) ?? element.getAttribute('title') ?? element.getAttribute('data-tip') ?? '').trim();
132
+ // One bubble, one line (C7), as the desktop's (desktop/src/engine/tooltips.ts): a title that ends in
133
+ // a chord in parentheses — "Undo (Ctrl/Cmd+Z)" — is drawn as the name and a key chip. The editor's
134
+ // titles name both platforms' modifier; the chip names this platform's alone, the way the window's
135
+ // own tooltips do (⌘Z on macOS, Ctrl+Z elsewhere).
136
+ const SHORTCUT = /^(.*\S)\s+\(((?:(?:Ctrl\/Cmd|Ctrl|Alt|Shift|Cmd|Option)\+)*(?:[⌘⌥⇧⌃]+)?(?:[A-Z0-9,.\/]|Enter|Esc|Escape|Tab|Space|Delete|Backspace|F\d{1,2}))\)$/;
137
+ const macintosh = () => /Macintosh|Mac OS X/i.test(typeof navigator === 'undefined' ? '' : navigator.userAgent || '');
138
+ function tooltipShortcut(text, mac = macintosh()) {
139
+ const match = SHORTCUT.exec(text);
140
+ if (!match) return { name: text };
141
+ const chord = mac ? match[2].replace(/(?:Ctrl\/Cmd|Cmd)\+/g, '⌘') : match[2].replace(/Ctrl\/Cmd\+/g, 'Ctrl+');
142
+ return { name: match[1], shortcut: chord };
143
+ }
132
144
  function tipAnchor(target) {
133
145
  if (!target || typeof target.closest !== 'function') return null;
134
146
  const anchor = target.closest(`[title], [data-tip], [${STASH}]`);
@@ -149,7 +161,13 @@
149
161
  node.dataset.variant = variant;
150
162
  node.setAttribute('role', variant === 'invalid' ? 'alert' : 'tooltip');
151
163
  }
152
- node.textContent = text;
164
+ const { name, shortcut } = variant === 'tip' ? tooltipShortcut(text) : { name: text };
165
+ if (shortcut === undefined) { node.textContent = text; delete node.dataset.kind; }
166
+ else {
167
+ const kbd = make('kbd', 'kbd app-tooltip-kbd', shortcut);
168
+ node.replaceChildren(make('span', undefined, name), kbd);
169
+ node.dataset.kind = 'line';
170
+ }
153
171
  node.dataset.visible = 'false';
154
172
  // A modal dialog is drawn in the top layer, over anything on the body: a bubble for a field
155
173
  // inside one has to live inside it to be seen.
@@ -633,6 +651,17 @@
633
651
  return { element: zone, input, file: () => chosen, focus: () => browse.focus() };
634
652
  }
635
653
 
654
+ // One focus treatment, keyboard only (ADR 0022): a text field matches :focus-visible on a click as
655
+ // well, so the page records how focus last arrived and style.css draws a field's halo for the
656
+ // keyboard alone. Tab is the key that walks focus; any press of the pointer hands it back.
657
+ function installFocusSource() {
658
+ const root = document.documentElement;
659
+ if (!root?.dataset) return;
660
+ document.addEventListener('pointerdown', () => { root.dataset.focusVia = 'pointer'; }, true);
661
+ document.addEventListener('keydown', event => { if (event.key === 'Tab') delete root.dataset.focusVia; }, true);
662
+ }
663
+
664
+ installFocusSource();
636
665
  installTooltips();
637
666
  installSelects();
638
667
  installDialogExits();
@@ -645,5 +674,6 @@
645
674
  refreshSelect,
646
675
  leave,
647
676
  closeDialog,
677
+ tooltipShortcut,
648
678
  });
649
679
  })();
@@ -104,10 +104,10 @@
104
104
  return;
105
105
  }
106
106
  if (!visibilityAvailable) {
107
- section.append(part('p', 'Project visibility is unavailable until the connected engine provides a stable signed-in account ID. This graph remains visible in every project.', 'help'));
107
+ section.append(part('p', 'Project visibility is unavailable until Andorra Code can read your signed-in account. This graph remains visible in every project.', 'help'));
108
108
  return;
109
109
  }
110
- section.append(part('p', 'Choose the project folders where this graph appears in the desktop New Task and session Graph pickers. This choice stays on this desktop; it is not saved in the graph.', 'help'));
110
+ section.append(part('p', 'Choose the project folders where this graph appears in the desktop New Task and task Graph pickers. This choice stays on this desktop; it is not saved in the graph.', 'help'));
111
111
  const allowed = visibilityChoices.get(id);
112
112
  if (allowed === undefined) {
113
113
  section.append(part('p', 'Loading project assignment…', 'help'));
@@ -149,11 +149,46 @@
149
149
  }
150
150
  }
151
151
 
152
- // The desktop window's own controls (Back, Reload, notifications) render in the editor's toolbar
153
- // rather than in a second header above it. The host names which apply; the editor owns their
154
- // labels and only ever reports which one was chosen.
152
+ // The desktop window's own controls (Back, Reload) render in the editor's toolbar rather than in a
153
+ // second header above it. The host names which apply; the editor owns their labels and only ever
154
+ // reports which one was chosen. `notifications` is drawn only for an older desktop that still asks
155
+ // for it: a current one raises the editor's notification through its own setting (P-ATN-08).
155
156
  const HOST_ACTIONS = new Set(['back', 'reload', 'notifications']);
156
157
  let hostChrome = false;
158
+ // Framed in the desktop window, the editor's top row is the window's: the host names the room its
159
+ // window controls take at either end, and whether a press on the row's blank space moves the window
160
+ // (the app draws its own caption rows there). The caption is the toolbar, and on macOS also the
161
+ // rail's blank row under the traffic lights (style.css `.rail-caption`). The rule is the desktop's
162
+ // caption rule (desktop/src/components/windowChrome.ts): a control, the title's text and anything
163
+ // focusable keep the press for themselves.
164
+ let captionMoves = false;
165
+ const CAPTION_CONTROL = 'button, input, select, textarea, a, label, summary, [contenteditable], [role], [tabindex], .graph-heading strong, .graph-heading span, .menu-list';
166
+ const captionPress = event => {
167
+ const target = event.target && event.target.nodeType === 1 ? event.target : event.target?.parentElement;
168
+ if (!captionMoves || event.button !== 0 || !target || typeof target.closest !== 'function') return false;
169
+ const caption = target.closest('.chrome, .rail-caption');
170
+ return !!caption && !target.closest(CAPTION_CONTROL);
171
+ };
172
+ window.addEventListener('mousedown', event => {
173
+ if (event.detail !== 1 || !captionPress(event)) return;
174
+ event.preventDefault();
175
+ emit({ type: 'andorra.graph.window', action: 'drag' });
176
+ });
177
+ window.addEventListener('dblclick', event => {
178
+ if (captionPress(event)) emit({ type: 'andorra.graph.window', action: 'maximize' });
179
+ });
180
+ const inset = value => (typeof value === 'number' && Number.isFinite(value) ? Math.min(240, Math.max(0, Math.round(value))) : 0);
181
+ function applyInsets(insets) {
182
+ const root = document.documentElement;
183
+ if (!root?.style) return;
184
+ const left = inset(insets?.left), right = inset(insets?.right);
185
+ // The right inset pads the toolbar (style.css); the left one is a corner the rail keeps clear,
186
+ // a row of the toolbar's height whatever its width, so only its presence is passed on.
187
+ root.style.setProperty('--host-inset-right', `${right}px`);
188
+ if (left || right) root.setAttribute('data-host-insets', ''); else root.removeAttribute('data-host-insets');
189
+ // The traffic lights' corner is over the rail: it keeps a caption row clear above its lists.
190
+ if (left) root.setAttribute('data-host-corner', ''); else root.removeAttribute('data-host-corner');
191
+ }
157
192
  const hostAction = action => emit({ type: 'andorra.graph.host.action', action });
158
193
  // Exporting through the host writes the file to the user's Downloads folder and reveals it. Only
159
194
  // the graph or Agent id crosses the frame; the host fetches the definition from the engine itself.
@@ -176,15 +211,27 @@
176
211
  const busy = data.busy === true;
177
212
  const first = !hostChrome;
178
213
  hostChrome = true;
214
+ captionMoves = data.caption === true;
215
+ applyInsets(data.insets);
179
216
  const slot = document.getElementById?.('host-chrome');
180
217
  if (slot) {
181
218
  slot.replaceChildren();
182
219
  if (actions.includes('back')) {
220
+ // The editor hides the desktop's sidebar, so Back carries how many tasks need the person's
221
+ // input there (P-ATN-03): the host's figure and words, drawn as the desktop's ink count pill.
222
+ const count = Number.isInteger(data.attention?.count) && data.attention.count > 0 ? Math.min(999, data.attention.count) : 0;
223
+ const words = count && typeof data.attention.label === 'string' ? data.attention.label.slice(0, 80) : '';
183
224
  const back = part('button', undefined, 'ghost btn-small');
184
225
  back.type = 'button'; back.disabled = busy;
185
- back.setAttribute('aria-label', 'Back to Graphs settings'); back.title = 'Back to Graphs settings';
226
+ back.setAttribute('aria-label', words ? `Back to Graphs — ${words}` : 'Back to Graphs');
227
+ back.title = words ? `Back to Graphs · ${words}` : 'Back to Graphs';
186
228
  const mark = icon('arrow-left'); if (mark) back.append(mark);
187
229
  back.append(part('span', 'Graphs'));
230
+ if (count) {
231
+ const pill = part('span', count > 99 ? '99+' : String(count), 'attention-count');
232
+ pill.setAttribute('aria-hidden', 'true');
233
+ back.append(pill);
234
+ }
188
235
  back.onclick = () => hostAction('back');
189
236
  slot.append(back);
190
237
  }
@@ -204,7 +251,9 @@
204
251
  }
205
252
 
206
253
  window.AndorraEmbed = {
207
- ready() { emit({ type: 'andorra.graph.ready', hostChrome: true }); },
254
+ // `caption`: this editor applies the host's insets and forwards caption presses, so the host may
255
+ // drop its own caption band and let the toolbar be the window's top row.
256
+ ready() { emit({ type: 'andorra.graph.ready', hostChrome: true, caption: true }); },
208
257
  hostChrome() { return hostChrome; },
209
258
  openProviderSettings() { if (hostChrome) hostAction('providers'); },
210
259
  exportGraph(graphId) {
@@ -17,6 +17,8 @@
17
17
  globalThis.AndorraIcons = (() => {
18
18
  const GLYPHS = {
19
19
  'arrow-left': '<path d="m12 19-7-7 7-7"/><path d="M19 12H5"/>',
20
+ 'chevron-right': '<path d="m9 18 6-6-6-6"/>',
21
+ lock: '<rect width="18" height="11" x="3" y="11" rx="2" ry="2"/><path d="M7 11V7a5 5 0 0 1 10 0v4"/>',
20
22
  undo: '<path d="M9 14 4 9l5-5"/><path d="M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11"/>',
21
23
  redo: '<path d="m15 14 5-5-5-5"/><path d="M20 9H9.5A5.5 5.5 0 0 0 4 14.5A5.5 5.5 0 0 0 9.5 20H13"/>',
22
24
  'zoom-in': '<circle cx="11" cy="11" r="8"/><line x1="21" x2="16.65" y1="21" y2="16.65"/><line x1="11" x2="11" y1="8" y2="14"/><line x1="8" x2="14" y1="11" y2="11"/>',
@@ -55,6 +57,9 @@ globalThis.AndorraIcons = (() => {
55
57
  terminal: '<polyline points="4 17 10 11 4 5"/><line x1="12" x2="20" y1="19" y2="19"/>',
56
58
  approval: '<path d="M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2"/><circle cx="9" cy="7" r="4"/><polyline points="16 11 18 13 22 9"/>',
57
59
  flag: '<path d="M4 15s1-1 4-1 5 2 8 2 4-1 4-1V3s-1 1-4 1-5-2-8-2-4 1-4 1z"/><line x1="4" x2="4" y1="22" y2="15"/>',
60
+ // The empty states' marks: a list with no match, and no graph open (Lucide's "workflow" glyph).
61
+ search: '<circle cx="11" cy="11" r="8"/><path d="m21 21-4.3-4.3"/>',
62
+ graph: '<rect width="8" height="8" x="3" y="3" rx="2"/><path d="M7 11v4a2 2 0 0 0 2 2h4"/><rect width="8" height="8" x="13" y="13" rx="2"/>',
58
63
  };
59
64
 
60
65
  /** The glyph a node type is drawn with. */
@@ -1,7 +1,7 @@
1
1
  <!doctype html>
2
2
  <html lang="en">
3
- <head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Graph studio - Andorra Code</title><link rel="icon" type="image/png" href="/andorra-logo.png"><link rel="stylesheet" href="/tokens.css"><link rel="stylesheet" href="/style.css"><link rel="stylesheet" href="/library.css"><link rel="stylesheet" href="/studio.css"><link rel="stylesheet" href="/controls.css"><link rel="stylesheet" href="/manager.css"><script src="/theme.js"></script></head>
3
+ <head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Graph Editor · Andorra Code</title><link rel="icon" type="image/png" href="/andorra-logo.png"><link rel="stylesheet" href="/tokens.css"><link rel="stylesheet" href="/style.css"><link rel="stylesheet" href="/library.css"><link rel="stylesheet" href="/studio.css"><link rel="stylesheet" href="/controls.css"><link rel="stylesheet" href="/manager.css"><script src="/theme.js"></script></head>
4
4
  <body>
5
- <aside class="rail" id="library-rail"><div id="rail-resize" role="separator" aria-label="Resize library sidebar" aria-orientation="vertical" aria-controls="library-rail" tabindex="0"></div><div class="rail-body" tabindex="0" aria-label="Graph and node library"><div class="section-label">Your graphs <button id="new-graph" aria-label="Create graph" title="Create graph" data-icon="plus"></button></div><input id="search" type="search" placeholder="Find a graph" aria-label="Find a graph"><nav id="graphs" aria-label="Graphs" tabindex="0"></nav><div class="section-label library-label">Node library</div><input id="node-search" type="search" placeholder="Search nodes..." aria-label="Search nodes"><nav id="node-library" aria-label="Node library"></nav><p class="hint">Drag a node onto the canvas, or select it and press Enter to add it. Connect each outcome to one or more destinations.</p></div><footer class="rail-footer">Your account <span id="sync-status" role="status">Saved locally; cloud sync pending</span></footer></aside>
6
- <main><header class="chrome"><div id="host-chrome" class="host-chrome" hidden></div><div class="graph-heading"><strong id="graph-title">Graph studio</strong><span id="revision">Loading graphs...</span><span id="host-notice" class="chip chip-accent" role="status" hidden></span></div><div class="chrome-actions" id="chrome-actions"><button id="toggle-inspector" class="icon-button" aria-expanded="true" aria-label="Inspector" title="Show or hide the inspector" data-icon="panel-right"></button><div class="menu" id="more-wrap"><button id="more" class="icon-button" aria-haspopup="menu" aria-expanded="false" aria-controls="more-menu" aria-label="More actions" title="More actions" data-icon="more"></button><div id="more-menu" class="menu-list" role="menu" aria-label="More actions" hidden><button id="duplicate" type="button" role="menuitem" data-icon="copy">Duplicate</button></div></div><div class="manager-anchor" hidden><button id="graph-manager" class="btn-small studio-secondary" type="button" aria-label="Graph Manager" aria-expanded="false" aria-controls="manager-panel" title="Build or change this graph with Graph Manager" data-icon="bot" hidden><span>Graph Manager</span></button><div id="manager-tip" class="manager-tip" role="note" hidden><span>Let Graph Manager build this graph with you.</span><button id="manager-tip-close" type="button" class="icon-button" aria-label="Dismiss" title="Dismiss" data-icon="x"></button></div></div><button id="save" class="primary btn-small">Save Revision</button></div></header><div class="workspace"><section id="canvas" aria-label="Graph canvas"><div id="scene"><svg id="edges" aria-label="Graph connections"></svg><div id="nodes"></div></div><div id="empty">Create a graph to get started.</div><div id="canvas-hint" class="canvas-hint" role="note"><span id="canvas-hint-text">Drag or scroll to pan · Pinch or Ctrl/Cmd+scroll to zoom</span><button id="canvas-hint-close" type="button" class="icon-button" aria-label="Dismiss canvas tips" title="Dismiss" data-icon="x"></button></div><div class="canvas-toolbar" role="toolbar" aria-label="Canvas controls"><button id="undo" aria-label="Undo" title="Undo (Ctrl/Cmd+Z)" data-icon="undo"></button><button id="redo" aria-label="Redo" title="Redo (Ctrl/Cmd+Y)" data-icon="redo"></button><span class="toolbar-divider" aria-hidden="true"></span><button id="zoom-out" aria-label="Zoom out" title="Zoom out" data-icon="zoom-out"></button><output id="zoom" aria-label="Zoom level">100%</output><button id="zoom-in" aria-label="Zoom in" title="Zoom in" data-icon="zoom-in"></button><button id="fit" aria-label="Fit graph" title="Fit graph" data-icon="fit"></button><button id="layout" aria-label="Arrange" title="Arrange nodes" data-icon="arrange"></button></div></section><aside id="inspector"><div id="resize" role="separator" aria-label="Resize inspector" aria-orientation="vertical" tabindex="0"></div><header class="panel-header"><strong id="inspector-title">Graph settings</strong><button id="graph-settings" class="btn-small" title="Show the graph's own settings">Graph Settings</button></header><div id="inspector-body"></div></aside><aside id="manager-panel" aria-label="Graph Manager" hidden><div id="manager-resize" role="separator" aria-label="Resize Graph Manager" aria-orientation="vertical" tabindex="0"></div><header class="panel-header"><strong>Graph Manager</strong><span class="manager-header-actions"><button id="manager-new-chat" type="button" class="btn-small" title="Start a new conversation. The current one stays in your history.">New Chat</button><button id="manager-close" type="button" class="icon-button" aria-label="Close Graph Manager" title="Close" data-icon="x"></button></span></header><div class="manager-models"><select id="manager-provider" aria-label="Graph Manager provider"></select><select id="manager-model" aria-label="Graph Manager model"></select></div><div id="manager-notices"></div><div id="manager-transcript" role="log" aria-label="Graph Manager conversation" tabindex="0"></div><footer class="manager-composer"><textarea id="manager-input" rows="3" placeholder="Ask Graph Manager to build or change this graph" aria-label="Message Graph Manager"></textarea><div class="manager-composer-actions"><span id="manager-run-state" role="status"></span><button id="manager-stop" type="button" class="btn-small" hidden>Stop</button><button id="manager-send" type="button" class="primary btn-small">Send</button></div></footer></aside></div><footer class="status"><span id="status" role="status" aria-live="polite">Connecting to your workspace...</span><span class="status-actions"><button id="theme-toggle" type="button" hidden>Light</button><button id="export">Export JSON</button></span></footer></main>
5
+ <aside class="rail" id="library-rail"><div id="rail-resize" role="separator" aria-label="Resize library sidebar" aria-orientation="vertical" aria-controls="library-rail" tabindex="0"></div><div class="rail-caption" aria-hidden="true"></div><div class="rail-body" tabindex="0" aria-label="Graph and step library"><div class="section-label">Your graphs <button id="new-graph" aria-label="Create graph" title="Create graph" data-icon="plus"></button></div><div class="rail-search"><input id="search" type="search" placeholder="Find a graph" aria-label="Find a graph"></div><nav id="graphs" aria-label="Graphs" tabindex="0"></nav><div class="section-label library-label">Step library</div><div class="rail-search"><input id="node-search" type="search" placeholder="Search steps…" aria-label="Search steps"></div><nav id="node-library" aria-label="Step library"></nav><p class="hint">Drag a step onto the canvas, or select it and press Enter to add it. Connect each outcome to one or more destinations.</p></div><footer class="rail-footer">Your account <span id="sync-status" role="status">Saved locally; cloud sync pending</span></footer></aside>
6
+ <main><header class="chrome"><div id="host-chrome" class="host-chrome" hidden></div><div class="graph-heading"><strong id="graph-title">Graph Editor</strong><span id="revision">Loading graphs…</span><span id="host-notice" class="chip chip-accent" role="status" hidden></span></div><div class="chrome-actions" id="chrome-actions"><button id="toggle-inspector" class="icon-button" aria-expanded="true" aria-label="Inspector" title="Show or hide the inspector" data-icon="panel-right"></button><div class="menu" id="more-wrap"><button id="more" class="icon-button" aria-haspopup="menu" aria-expanded="false" aria-controls="more-menu" aria-label="More actions" title="More actions" data-icon="more"></button><div id="more-menu" class="menu-list" role="menu" aria-label="More actions" hidden><button id="duplicate" type="button" role="menuitem" data-icon="copy">Duplicate</button></div></div><div class="manager-anchor" hidden><button id="graph-manager" class="btn-small studio-secondary" type="button" aria-label="Graph Manager" aria-expanded="false" aria-controls="manager-panel" title="Build or change this graph with Graph Manager" data-icon="bot" hidden><span>Graph Manager</span></button><div id="manager-tip" class="manager-tip" role="note" hidden><span>Let Graph Manager build this graph with you.</span><button id="manager-tip-close" type="button" class="icon-button" aria-label="Dismiss" title="Dismiss" data-icon="x"></button></div></div><button id="save" class="primary btn-small">Save</button></div></header><div class="workspace"><section id="canvas" aria-label="Graph canvas"><div id="scene"><svg id="edges" aria-label="Graph connections"></svg><div id="nodes"></div></div><div id="empty"><div class="empty-state"><span class="empty-state-icon" data-icon="graph"></span><p class="empty-state-title">No graph open</p><p class="empty-state-line">Create a graph to get started.</p><div class="empty-state-action"><button id="empty-create" type="button" class="primary btn-small">Create Graph</button></div></div></div><div id="canvas-hint" class="canvas-hint" role="note"><span id="canvas-hint-text">Drag or scroll to pan · Pinch or Ctrl/Cmd+scroll to zoom</span><button id="canvas-hint-close" type="button" class="icon-button" aria-label="Dismiss canvas tips" title="Dismiss" data-icon="x"></button></div><div class="canvas-toolbar" role="toolbar" aria-label="Canvas controls"><button id="undo" aria-label="Undo" title="Undo (Ctrl/Cmd+Z)" data-icon="undo"></button><button id="redo" aria-label="Redo" title="Redo (Ctrl/Cmd+Y)" data-icon="redo"></button><span class="toolbar-divider" aria-hidden="true"></span><button id="zoom-out" aria-label="Zoom out" title="Zoom out" data-icon="zoom-out"></button><output id="zoom" aria-label="Zoom level">100%</output><button id="zoom-in" aria-label="Zoom in" title="Zoom in" data-icon="zoom-in"></button><button id="fit" aria-label="Fit graph" title="Fit graph" data-icon="fit"></button><button id="layout" aria-label="Arrange" title="Arrange steps" data-icon="arrange"></button></div></section><aside id="inspector"><div id="resize" role="separator" aria-label="Resize inspector" aria-orientation="vertical" tabindex="0"></div><header class="panel-header"><strong id="inspector-title">Graph settings</strong><button id="graph-settings" class="btn-small" title="Show the graph's own settings">Graph Settings</button></header><div id="inspector-body"></div></aside><aside id="manager-panel" aria-label="Graph Manager" hidden><div id="manager-resize" role="separator" aria-label="Resize Graph Manager" aria-orientation="vertical" tabindex="0"></div><header class="panel-header"><strong>Graph Manager</strong><span class="manager-header-actions"><button id="manager-new-chat" type="button" class="btn-small" title="Start a new conversation. The current one stays in your history.">New Chat</button><button id="manager-close" type="button" class="icon-button" aria-label="Close Graph Manager" title="Close" data-icon="x"></button></span></header><div class="manager-models"><select id="manager-provider" aria-label="Graph Manager provider"></select><select id="manager-model" aria-label="Graph Manager model"></select></div><div id="manager-notices"></div><div id="manager-transcript" role="log" aria-label="Graph Manager conversation" tabindex="0"></div><footer class="manager-composer"><textarea id="manager-input" rows="3" placeholder="Ask Graph Manager to build or change this graph" aria-label="Message Graph Manager"></textarea><div class="manager-composer-actions"><span id="manager-run-state" role="status"></span><button id="manager-stop" type="button" class="btn-small" hidden>Stop</button><button id="manager-send" type="button" class="primary btn-small">Send</button></div></footer></aside></div><footer class="status"><span id="status" role="status" aria-live="polite">Connecting to your workspace…</span><span class="status-actions"><button id="theme-toggle" type="button" hidden>Light</button><button id="export">Export JSON</button></span></footer></main>
7
7
  <script src="/compat.js" defer></script><script src="/icons.js" defer></script><script src="/controls.js" defer></script><script src="/skill-picker.js" defer></script><script src="/edge-router.js" defer></script><script src="/drafts.js" defer></script><script src="/app.js" defer></script><script src="/manager-markdown.js" defer></script><script src="/manager-state.js" defer></script><script src="/manager.js" defer></script><script src="/embed.js" defer></script><script src="/sidebar.js" defer></script><script src="/studio.js" defer></script><script src="/studio-canvas.js" defer></script></body></html>
@@ -156,7 +156,7 @@ globalThis.AndorraManagerState = (() => {
156
156
  }
157
157
 
158
158
  /** Graph actions that change the draft; the summary counts them as edits. */
159
- const EDITS = new Set(['Set node', 'Edit node', 'Remove node', 'Connect', 'Remove connection', 'Edit graph']);
159
+ const EDITS = new Set(['Set step', 'Edit step', 'Remove step', 'Connect', 'Remove connection', 'Edit graph']);
160
160
  const plural = (count, one, many) => `${count} ${count === 1 ? one : many}`;
161
161
  /**
162
162
  * What a settled stretch did, in one sentence: `Thought for 12s, made 5 edits, ran 3 other steps`.
@@ -167,7 +167,7 @@ globalThis.AndorraManagerState = (() => {
167
167
  const parts = [];
168
168
  if (thoughts.length) parts.push(thoughtLabel(thoughts.reduce((sum, entry) => sum + (typeof entry.durationMs === 'number' ? entry.durationMs : 0), 0)).toLowerCase());
169
169
  const edits = tools.filter(entry => EDITS.has(entry.verb)).length;
170
- const saves = tools.filter(entry => entry.verb === 'Save revision' && entry.status === 'done').length;
170
+ const saves = tools.filter(entry => entry.verb === 'Save version' && entry.status === 'done').length;
171
171
  // A save that failed or was denied is a step like any other, not a save.
172
172
  const other = tools.length - edits - saves;
173
173
  if (edits) parts.push(`made ${plural(edits, 'edit', 'edits')}`);
@@ -6,11 +6,11 @@
6
6
  /* The button's first-run tip hangs under it, over the toolbar's edge and clear of the canvas tips
7
7
  (those sit at the canvas's top left). */
8
8
  .manager-anchor { position: relative; display: flex; }
9
- #graph-manager[aria-expanded="true"] { background: var(--selected, var(--accent-soft)); }
9
+ #graph-manager[aria-expanded="true"] { background: var(--selected); }
10
10
  .manager-tip {
11
- position: absolute; z-index: 20; top: calc(100% + var(--space-2)); right: 0; width: max-content; max-width: 280px;
11
+ position: absolute; z-index: var(--z-menu); top: calc(100% + var(--space-2)); right: 0; width: max-content; max-width: 280px;
12
12
  display: flex; align-items: center; gap: var(--space-2); padding: var(--space-2) var(--space-2) var(--space-2) var(--space-3);
13
- color: var(--text); font-size: var(--type-xs); line-height: 1.45; white-space: normal;
13
+ color: var(--text); font-size: var(--type-xs); line-height: var(--leading-xs); white-space: normal;
14
14
  background: var(--bg-input); border: 1px solid var(--border-strong); border-radius: var(--radius-md); box-shadow: var(--shadow-menu);
15
15
  }
16
16
  .manager-tip .icon-button { flex: none; min-width: 24px; width: 24px; min-height: 24px; height: 24px; border-radius: var(--radius-sm); }
@@ -18,7 +18,7 @@
18
18
  /* The panel is a flex sibling of the canvas and the inspector: opening it narrows the canvas. */
19
19
  #manager-panel {
20
20
  width: var(--manager-panel, 380px); max-width: 60%; flex-shrink: 0; min-height: 0; border-left: 1px solid var(--border);
21
- background: var(--bg-surface); display: flex; flex-direction: column; position: relative; z-index: 3;
21
+ background: var(--bg-surface); display: flex; flex-direction: column; position: relative; z-index: var(--z-raised);
22
22
  }
23
23
  #manager-resize { position: absolute; left: -4px; top: 0; bottom: 0; width: 7px; cursor: col-resize; }
24
24
  #manager-resize:focus-visible { outline: none; background: var(--accent-ring); }
@@ -32,7 +32,7 @@
32
32
  .manager-notice {
33
33
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2);
34
34
  padding: var(--space-2) var(--space-4); border-bottom: 1px solid var(--border);
35
- background: var(--bg-card); color: var(--text); font-size: var(--type-xs); line-height: 1.45;
35
+ background: var(--bg-card); color: var(--text); font-size: var(--type-xs); line-height: var(--leading-xs);
36
36
  }
37
37
  .manager-notice > span:first-child { flex: 1 1 160px; min-width: 0; overflow-wrap: anywhere; }
38
38
  .manager-notice-actions { display: flex; gap: var(--space-1); flex: none; }
@@ -41,7 +41,7 @@
41
41
 
42
42
  #manager-transcript {
43
43
  flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; gap: var(--space-3);
44
- padding: var(--space-4); font-size: var(--type-sm); line-height: 1.55;
44
+ padding: var(--space-4); font-size: var(--type-sm); line-height: var(--leading-sm);
45
45
  }
46
46
  #manager-transcript:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--accent-ring); }
47
47
  .manager-empty { margin: 0; }
@@ -52,28 +52,28 @@
52
52
  reply as prose, and its work as flat gray lines between them. */
53
53
  .manager-user-body {
54
54
  background: var(--bg-input); border: 1px solid var(--border); border-radius: var(--card-radius);
55
- padding: var(--space-2) var(--space-3); white-space: pre-wrap; color: var(--text); line-height: 1.55;
55
+ padding: var(--space-2) var(--space-3); white-space: pre-wrap; color: var(--text); line-height: var(--leading-sm);
56
56
  }
57
57
  .manager-assistant { color: var(--text); }
58
58
 
59
59
  /* Markdown in the reply, after the app's `.md` rules. */
60
- .markdown { white-space: normal; line-height: 1.65; }
60
+ .markdown { white-space: normal; line-height: var(--leading-prose); }
61
61
  .markdown > * + * { margin-top: 10px; }
62
62
  .markdown > :first-child { margin-top: 0; }
63
63
  .markdown p, .markdown ul, .markdown ol, .markdown pre, .markdown blockquote { margin-bottom: 0; }
64
64
  .markdown p { margin: 0; }
65
- .markdown :is(h3, h4, h5, h6, h7, h8) { margin: 16px 0 4px; font-size: var(--type-sm); font-weight: var(--weight-strong); line-height: 1.3; }
66
- .markdown h3 { font-size: var(--type-md); }
65
+ .markdown :is(h3, h4, h5, h6, h7, h8) { margin: 16px 0 4px; font-size: var(--type-sm); font-weight: var(--weight-strong); line-height: var(--leading-sm); }
66
+ .markdown h3 { font-size: var(--type-md); line-height: var(--leading-md); }
67
67
  .markdown > :is(h3, h4, h5, h6, h7, h8):first-child { margin-top: 0; }
68
68
  .markdown ul, .markdown ol { padding-left: 1.4em; margin-top: 6px; }
69
69
  .markdown li + li { margin-top: 2px; }
70
70
  .markdown li > :is(ul, ol) { margin-top: 2px; }
71
- .markdown code { font-family: var(--font-mono); font-size: 0.92em; padding: 1px 4px; border-radius: var(--radius-xs); background: var(--bg-input); border: 1px solid var(--border); }
71
+ .markdown code { font-family: var(--font-mono); font-size: var(--type-xs); padding: 1px 4px; border-radius: var(--radius-xs); background: var(--bg-input); border: 1px solid var(--border); }
72
72
  .markdown pre { margin: 10px 0 0; padding: var(--space-2) var(--space-3); background: var(--bg-input); border: 1px solid var(--border); border-radius: var(--radius-md); overflow: auto; max-height: 360px; }
73
- .markdown pre code { padding: 0; border: 0; background: none; font-size: var(--type-xs); line-height: 1.55; white-space: pre; }
73
+ .markdown pre code { padding: 0; border: 0; background: none; font-size: var(--type-xs); line-height: var(--leading-code); white-space: pre; }
74
74
  .markdown blockquote { margin: 10px 0 0; padding-left: var(--space-3); border-left: 2px solid var(--border-strong); color: var(--text-2); }
75
75
  .markdown hr { border: 0; border-top: 1px solid var(--border); margin: 12px 0; }
76
- .markdown a { color: var(--accent-text, var(--accent)); text-decoration: underline; text-underline-offset: 2px; }
76
+ .markdown a { color: var(--accent-text); text-decoration: underline; text-underline-offset: 2px; }
77
77
  .markdown-table { overflow: auto; }
78
78
  .markdown table { border-collapse: collapse; font-size: var(--type-xs); }
79
79
  .markdown :is(th, td) { border: 1px solid var(--border); padding: 3px 8px; text-align: left; vertical-align: top; }
@@ -86,7 +86,7 @@
86
86
  .manager-fold-head {
87
87
  display: flex; align-items: baseline; justify-content: flex-start; gap: 8px; width: 100%; min-width: 0; padding: 1px 2px;
88
88
  background: transparent; border: 0; border-radius: 0; appearance: none; -webkit-appearance: none;
89
- min-height: 0; height: auto; text-align: left; font: inherit; font-size: var(--type-xs); font-weight: var(--weight-regular); line-height: 1.6;
89
+ min-height: 0; height: auto; text-align: left; font: inherit; font-size: var(--type-xs); font-weight: var(--weight-regular); line-height: var(--leading-xs);
90
90
  color: var(--text-2); box-shadow: none;
91
91
  }
92
92
  button.manager-fold-head { cursor: pointer; }
@@ -114,21 +114,22 @@ button.manager-fold-head::after {
114
114
  .manager-preview-tail > span { direction: ltr; unicode-bidi: isolate; }
115
115
  .manager-row-duration { margin-left: auto; order: 2; flex-shrink: 0; min-width: 6ch; text-align: right; color: var(--text-3); font-family: var(--font-mono); font-size: var(--type-xs); }
116
116
  .manager-status-glyph { order: 1; flex: none; font-family: var(--font-mono); color: var(--text-3); }
117
- .manager-fold:is([data-status="running"], [data-status="thinking"]) > .manager-fold-head .manager-status-glyph { color: var(--accent); animation: manager-pulse 1.4s var(--ease-standard) infinite; }
117
+ .manager-fold:is([data-status="running"], [data-status="thinking"]) > .manager-fold-head .manager-status-glyph { color: var(--accent); animation: manager-pulse var(--loop-breathe) var(--ease-in-out) infinite; }
118
118
  .manager-fold[data-status="failed"] > .manager-fold-head .manager-status-glyph { color: var(--err-text); }
119
119
  .manager-fold:is([data-status="running"], [data-status="thinking"]) > .manager-fold-head :is(.manager-activity-name, .manager-activity-verb) { color: var(--text); }
120
120
  @keyframes manager-pulse { 50% { opacity: 0.35; } }
121
121
  @media (prefers-reduced-motion: reduce) { .manager-status-glyph { animation: none !important; } }
122
122
  .manager-activity-text {
123
- white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text-2); font-size: var(--type-xs); line-height: 1.6;
124
- max-height: calc(10 * 1.6em); overflow: auto; padding-left: 2px; user-select: text; -webkit-user-select: text;
123
+ white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text-2); font-size: var(--type-xs); line-height: var(--leading-xs);
124
+ max-height: calc(10 * var(--leading-xs)); overflow: auto; padding-left: 2px; user-select: text; -webkit-user-select: text;
125
125
  }
126
126
  .manager-activity-text:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--accent-ring); border-radius: var(--radius-xs); }
127
127
  .manager-activity-command { font-family: var(--font-mono); font-size: var(--type-xs); color: var(--text-2); white-space: pre-wrap; overflow-wrap: anywhere; padding-left: 2px; user-select: text; -webkit-user-select: text; }
128
128
  .manager-activity-reason { font-size: var(--type-xs); color: var(--err-text); white-space: pre-wrap; overflow-wrap: anywhere; padding-left: 2px; }
129
129
  .manager-activity-note { font-size: var(--type-xs); color: var(--text-3); padding-left: 2px; }
130
130
 
131
- .manager-saved { color: var(--ok-text); font-size: var(--type-xs); }
131
+ /* A saved or deleted graph is a step done, not a check passed: the muted ink, never green (P-LNT-06). */
132
+ .manager-saved { color: var(--text-2); font-size: var(--type-xs); }
132
133
  .manager-row.manager-error { color: var(--err-text); font-size: var(--type-xs); white-space: pre-wrap; }
133
134
  .manager-card {
134
135
  display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-3);
@@ -15,7 +15,7 @@ globalThis.AndorraManager = (() => {
15
15
  try { return window.localStorage; } catch { return undefined; }
16
16
  }
17
17
 
18
- const RUN_LABELS = { starting: 'Starting...', working: 'Working...', awaiting: 'Waiting for you' };
18
+ const RUN_LABELS = { starting: 'Starting…', working: 'Working…', awaiting: 'Waiting for you' };
19
19
  const MIN_WIDTH = 300, MAX_WIDTH = 640;
20
20
 
21
21
  let open = false;
@@ -346,7 +346,7 @@ globalThis.AndorraManager = (() => {
346
346
  sentCanvas = JSON.stringify(state.graph);
347
347
  beforeLastMessage = null; unsureCanvas = false;
348
348
  offeredRevision = null;
349
- status(`Graph Manager saved revision ${state.graph.revision}`);
349
+ status(`Graph Manager saved version ${state.graph.revision}`);
350
350
  renderNotices();
351
351
  return true;
352
352
  }
@@ -524,7 +524,7 @@ globalThis.AndorraManager = (() => {
524
524
  if (entry.type === 'graph.saved') {
525
525
  // A save of another graph than the conversation's own names it.
526
526
  const other = entry.graphId !== chatGraphId && entry.graphId !== state.graph?.id;
527
- return node('div', other ? `Saved ${entry.name || entry.graphId}, revision ${entry.revision}` : `Saved revision ${entry.revision}`, 'manager-row manager-saved');
527
+ return node('div', other ? `Saved ${entry.name || entry.graphId}, version ${entry.revision}` : `Saved version ${entry.revision}`, 'manager-row manager-saved');
528
528
  }
529
529
  if (entry.type === 'graph.deleted') {
530
530
  const other = entry.graphId !== chatGraphId && entry.graphId !== state.graph?.id;
@@ -637,7 +637,7 @@ globalThis.AndorraManager = (() => {
637
637
  }
638
638
  if (offeredRevision !== null && state.graph) {
639
639
  const id = state.graph.id;
640
- bars.push(notice('manager-load', `Graph Manager saved revision ${offeredRevision}. Load it?`, [
640
+ bars.push(notice('manager-load', `Graph Manager saved version ${offeredRevision}. Load it?`, [
641
641
  control('Load', () => { void loadRevision(id); }, 'btn-small primary'),
642
642
  control('Not now', () => { offeredRevision = null; renderNotices(); }),
643
643
  ]));
@@ -657,7 +657,7 @@ globalThis.AndorraManager = (() => {
657
657
  notices.replaceChildren(...bars);
658
658
  }
659
659
  function renderRunState() {
660
- runLabel.textContent = RUN_LABELS[runState] || (open && source && !connected ? 'Connecting...' : '');
660
+ runLabel.textContent = RUN_LABELS[runState] || (open && source && !connected ? 'Connecting…' : '');
661
661
  stopButton.hidden = runState === 'idle';
662
662
  }
663
663
  function render() { renderTranscript(); renderNotices(); renderRunState(); startTicker(); }
@@ -72,9 +72,9 @@
72
72
  }
73
73
 
74
74
  function problemText({ name, state }) {
75
- if (state === 'disabled') return `/${name} is turned off in Skills settings. The node still runs, without it.`;
76
- if (state === 'unavailable') return `/${name} is installed but cannot be loaded; repair it in Skills settings. The node still runs, without it.`;
77
- return `Skill /${name} not found on this machine. The node still runs, without it.`;
75
+ if (state === 'disabled') return `/${name} is turned off in Skills settings. The step still runs, without it.`;
76
+ if (state === 'unavailable') return `/${name} is installed but cannot be loaded; repair it in Skills settings. The step still runs, without it.`;
77
+ return `Skill /${name} not found on this machine. The step still runs, without it.`;
78
78
  }
79
79
 
80
80
  function matching(skills, query) {
@@ -201,8 +201,8 @@
201
201
  }
202
202
  if (!found.length) {
203
203
  const text = !value ? `Skills could not be loaded${cache.error ? `: ${cache.error}` : ''}. A /name you type still runs.`
204
- : !value.skills.length ? 'No skills are installed on this machine. A /name you type is kept, and the node runs without a skill it cannot find.'
205
- : `No skill on this machine matches /${query.text}. You can keep it; the node runs without a skill it cannot find.`;
204
+ : !value.skills.length ? 'No skills are installed on this machine. A /name you type is kept, and the step runs without a skill it cannot find.'
205
+ : `No skill on this machine matches /${query.text}. You can keep it; the step runs without a skill it cannot find.`;
206
206
  list.append(el('p', text, 'help skill-picker-empty'));
207
207
  }
208
208
  panel.append(el('div', found.length ? 'Up/Down to choose, Enter to insert, Esc to close' : 'Esc to close', 'skill-picker-hint'));