@andorra-labs/code 0.1.15 → 0.1.16

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 (100) hide show
  1. package/dist/src/agent-definitions.js +29 -6
  2. package/dist/src/agent-execution.js +4 -2
  3. package/dist/src/agent-mcp.d.ts +1 -1
  4. package/dist/src/agent-mcp.js +13 -9
  5. package/dist/src/app-server/protocol.d.ts +4 -1
  6. package/dist/src/app-server/protocol.js +1 -1
  7. package/dist/src/app-server.d.ts +107 -0
  8. package/dist/src/app-server.js +893 -22
  9. package/dist/src/auth/deployment.js +2 -2
  10. package/dist/src/browser-runner.js +1 -0
  11. package/dist/src/browser-ui/style.css +3 -3
  12. package/dist/src/browser-ui/tokens.css +27 -16
  13. package/dist/src/claude-provider.js +3 -1
  14. package/dist/src/cli.js +22 -8
  15. package/dist/src/codex-errors.js +4 -1
  16. package/dist/src/command-screens.js +5 -3
  17. package/dist/src/commands.d.ts +2 -1
  18. package/dist/src/compaction-phrases.d.ts +4 -0
  19. package/dist/src/compaction-phrases.js +20 -0
  20. package/dist/src/context-compaction.js +2 -1
  21. package/dist/src/decision/DecisionManager.js +3 -2
  22. package/dist/src/decision/requestPhrases.d.ts +4 -0
  23. package/dist/src/decision/requestPhrases.js +23 -0
  24. package/dist/src/github-inbox.d.ts +55 -0
  25. package/dist/src/github-inbox.js +153 -0
  26. package/dist/src/graph-health.js +7 -3
  27. package/dist/src/graph-provider-portability.js +32 -10
  28. package/dist/src/graph-quota.d.ts +29 -2
  29. package/dist/src/graph-quota.js +68 -10
  30. package/dist/src/graph-runner.js +24 -7
  31. package/dist/src/graph-server.d.ts +1 -1
  32. package/dist/src/graph-server.js +9 -7
  33. package/dist/src/graph-ui/app.js +110 -33
  34. package/dist/src/graph-ui/controls.css +1 -0
  35. package/dist/src/graph-ui/embed.js +2 -2
  36. package/dist/src/graph-ui/icons.js +1 -0
  37. package/dist/src/graph-ui/index.html +1 -1
  38. package/dist/src/graph-ui/manager.css +1 -1
  39. package/dist/src/graph-ui/manager.js +2 -2
  40. package/dist/src/graph-ui/sidebar.js +30 -0
  41. package/dist/src/graph-ui/studio-canvas.js +26 -13
  42. package/dist/src/graph-ui/studio.css +15 -7
  43. package/dist/src/graph-ui/studio.js +11 -4
  44. package/dist/src/graph-ui/style.css +77 -45
  45. package/dist/src/graph-ui/theme.js +3 -36
  46. package/dist/src/graph-ui/tokens.css +27 -19
  47. package/dist/src/graphs.js +4 -3
  48. package/dist/src/membership.d.ts +20 -1
  49. package/dist/src/membership.js +29 -4
  50. package/dist/src/model-metadata.d.ts +1 -1
  51. package/dist/src/model-metadata.js +4 -2
  52. package/dist/src/plan-pass.d.ts +59 -0
  53. package/dist/src/plan-pass.js +165 -0
  54. package/dist/src/provider-engine.js +3 -0
  55. package/dist/src/providers.d.ts +17 -0
  56. package/dist/src/providers.js +68 -19
  57. package/dist/src/pull-request-checks.d.ts +26 -0
  58. package/dist/src/pull-request-checks.js +56 -0
  59. package/dist/src/pull-request-conversation.d.ts +134 -0
  60. package/dist/src/pull-request-conversation.js +221 -0
  61. package/dist/src/pull-request-create.d.ts +175 -0
  62. package/dist/src/pull-request-create.js +392 -0
  63. package/dist/src/pull-request-details.d.ts +242 -0
  64. package/dist/src/pull-request-details.js +614 -0
  65. package/dist/src/pull-request-edit.d.ts +23 -0
  66. package/dist/src/pull-request-edit.js +91 -0
  67. package/dist/src/pull-request-logs.d.ts +76 -0
  68. package/dist/src/pull-request-logs.js +172 -0
  69. package/dist/src/pull-request-merge.d.ts +112 -0
  70. package/dist/src/pull-request-merge.js +258 -0
  71. package/dist/src/pull-request-review.d.ts +137 -0
  72. package/dist/src/pull-request-review.js +401 -0
  73. package/dist/src/pull-requests.d.ts +43 -2
  74. package/dist/src/pull-requests.js +112 -21
  75. package/dist/src/react-runtime.js +37 -4
  76. package/dist/src/remote/engine-pool.js +16 -4
  77. package/dist/src/run-control.d.ts +10 -0
  78. package/dist/src/run-control.js +24 -0
  79. package/dist/src/run-progress.d.ts +10 -0
  80. package/dist/src/run-progress.js +122 -0
  81. package/dist/src/run-records.d.ts +2 -2
  82. package/dist/src/runtime.d.ts +5 -1
  83. package/dist/src/runtime.js +14 -2
  84. package/dist/src/subagent-run.js +1 -0
  85. package/dist/src/telemetry/capture-core.d.ts +17 -0
  86. package/dist/src/telemetry/capture-core.js +59 -1
  87. package/dist/src/telemetry/classify.d.ts +3 -1
  88. package/dist/src/telemetry/classify.js +37 -0
  89. package/dist/src/telemetry/emitter.d.ts +2 -0
  90. package/dist/src/telemetry/emitter.js +42 -5
  91. package/dist/src/telemetry/schema.d.ts +22 -0
  92. package/dist/src/telemetry/schema.js +68 -1
  93. package/dist/src/telemetry/surface.d.ts +1 -0
  94. package/dist/src/telemetry/uploader.d.ts +6 -1
  95. package/dist/src/telemetry/uploader.js +22 -3
  96. package/dist/src/terminal-ui.js +1 -1
  97. package/dist/src/transcript.js +8 -2
  98. package/dist/src/types.d.ts +7 -0
  99. package/dist/src/usage-analytics.js +18 -10
  100. package/package.json +1 -1
@@ -10,6 +10,12 @@
10
10
  return e;
11
11
  };
12
12
  const svg = tag => document.createElementNS('http://www.w3.org/2000/svg', tag);
13
+ // The card footprint app.js uses, with its defaults where the canvas runs without it.
14
+ const CARD_WIDTH = typeof NODE_WIDTH === 'number' ? NODE_WIDTH : 210;
15
+ const cardHeight = node => (typeof nodeHeight === 'function' ? nodeHeight(node) : 68);
16
+ const MAP_WIDTH = 120, MAP_HEIGHT = 80;
17
+ // An SVG element has no hidden property; the attribute is what the stylesheet's [hidden] rule reads.
18
+ const showMap = (map, shown) => { if (map.hasAttribute?.('hidden') === shown) { if (shown) map.removeAttribute('hidden'); else map.setAttribute('hidden', ''); } };
13
19
  let copied = null, pasteOffset = 0, viewport;
14
20
  let snapButton;
15
21
  try { state.studioSnap = localStorage.getItem('andorra-studio-snap') === 'true'; }
@@ -32,8 +38,8 @@
32
38
  const positions = nodes.map(node => position(node, Object.keys(state.graph.nodes).indexOf(node.id)));
33
39
  const x = Math.min(...positions.map(p => p.x)) - 20;
34
40
  const y = Math.min(...positions.map(p => p.y)) - 37;
35
- const w = Math.max(...positions.map(p => p.x + 210)) - x + 20;
36
- const h = Math.max(...nodes.map((node, i) => positions[i].y + 94 + outcomes(node).length * 25)) - y + 20;
41
+ const w = Math.max(...positions.map(p => p.x + CARD_WIDTH)) - x + 20;
42
+ const h = Math.max(...nodes.map((node, i) => positions[i].y + cardHeight(node))) - y + 20;
37
43
  const box = make('div', undefined, 'studio-group');
38
44
  Object.assign(box.style, { left: x + 'px', top: y + 'px', width: w + 'px', height: h + 'px' });
39
45
  const title = make('button', group.name, 'studio-group-title');
@@ -61,19 +67,19 @@
61
67
  if (!map) return;
62
68
  map.replaceChildren();
63
69
  const nodes = Object.values(state.graph?.nodes || {});
64
- if (!nodes.length) return;
65
- const points = nodes.map((n, i) => ({ ...position(n, i), h: 94 + outcomes(n).length * 25 }));
66
- const minX = Math.min(...points.map(p => p.x)) - 100, maxX = Math.max(...points.map(p => p.x + 210)) + 100;
70
+ if (!nodes.length) { showMap(map, false); studio.viewport = undefined; viewport = undefined; return; }
71
+ const points = nodes.map((n, i) => ({ ...position(n, i), h: cardHeight(n) }));
72
+ const minX = Math.min(...points.map(p => p.x)) - 100, maxX = Math.max(...points.map(p => p.x + CARD_WIDTH)) + 100;
67
73
  const minY = Math.min(...points.map(p => p.y)) - 100, maxY = Math.max(...points.map(p => p.y + p.h)) + 100;
68
74
  const width = Math.max(1, maxX - minX), height = Math.max(1, maxY - minY);
69
- const scale = Math.min(160 / width, 100 / height);
70
- const startX = (160 - width * scale) / 2, startY = (100 - height * scale) / 2;
75
+ const scale = Math.min(MAP_WIDTH / width, MAP_HEIGHT / height);
76
+ const startX = (MAP_WIDTH - width * scale) / 2, startY = (MAP_HEIGHT - height * scale) / 2;
71
77
  const toMap = (x, y) => ({ x: startX + (x - minX) * scale, y: startY + (y - minY) * scale });
72
78
  for (const [i, node] of nodes.entries()) {
73
79
  const p = toMap(points[i].x, points[i].y);
74
80
  const rect = svg('rect');
75
81
  for (const [key, value] of Object.entries({
76
- x: p.x, y: p.y, width: Math.max(4, 210 * scale),
82
+ x: p.x, y: p.y, width: Math.max(4, CARD_WIDTH * scale),
77
83
  height: Math.max(3, points[i].h * scale), rx: 2,
78
84
  })) rect.setAttribute(key, String(value));
79
85
  rect.setAttribute('class', node.type === 'end' ? 'studio-minimap-end' : 'studio-minimap-node');
@@ -85,6 +91,10 @@
85
91
  studio.viewport = () => {
86
92
  if (!viewport) return;
87
93
  const canvas = byId('canvas');
94
+ // The minimap earns its place only while the graph runs past the visible canvas.
95
+ const inside = (minX + 100) * state.zoom + state.x >= 0 && (maxX - 100) * state.zoom + state.x <= canvas.clientWidth
96
+ && (minY + 100) * state.zoom + state.y >= 0 && (maxY - 100) * state.zoom + state.y <= canvas.clientHeight;
97
+ showMap(map, !inside);
88
98
  const left = -state.x / state.zoom, top = -state.y / state.zoom;
89
99
  const start = toMap(left, top);
90
100
  for (const [key, value] of Object.entries({
@@ -97,8 +107,8 @@
97
107
  map.onclick = event => {
98
108
  event.preventDefault(); event.stopPropagation();
99
109
  const rect = map.getBoundingClientRect();
100
- const centerX = minX + ((event.clientX - rect.left) * (160 / rect.width) - startX) / scale;
101
- const centerY = minY + ((event.clientY - rect.top) * (100 / rect.height) - startY) / scale;
110
+ const centerX = minX + ((event.clientX - rect.left) * (MAP_WIDTH / rect.width) - startX) / scale;
111
+ const centerY = minY + ((event.clientY - rect.top) * (MAP_HEIGHT / rect.height) - startY) / scale;
102
112
  state.x = byId('canvas').clientWidth / 2 - centerX * state.zoom;
103
113
  state.y = byId('canvas').clientHeight / 2 - centerY * state.zoom;
104
114
  transform();
@@ -174,7 +184,7 @@
174
184
  }
175
185
  if (!state.graph?.nodes[sourceId] || !outcomes(state.graph.nodes[sourceId]).includes(outcome)) return;
176
186
  if (state.graph.edges.some(edge => edge.source === sourceId && edge.target === targetId && (edge.outcome || 'completed') === outcome)) {
177
- status('This connection already exists. Click its line to edit it.'); return;
187
+ status('This connection already exists. Click its line to edit it.', 'notice'); return;
178
188
  }
179
189
  mutate(() => {
180
190
  const edge = { id: 'edge-' + crypto.randomUUID().slice(0, 8), source: sourceId, target: targetId, outcome };
@@ -232,7 +242,7 @@
232
242
  if (Math.abs(last.x - start.x) < 5 && Math.abs(last.y - start.y) < 5) return;
233
243
  const picked = Object.values(state.graph?.nodes || {}).filter(node => {
234
244
  const p = position(node, Object.keys(state.graph.nodes).indexOf(node.id));
235
- return p.x < right && p.x + 210 > left && p.y < bottom && p.y + 94 + outcomes(node).length * 25 > top;
245
+ return p.x < right && p.x + CARD_WIDTH > left && p.y < bottom && p.y + cardHeight(node) > top;
236
246
  });
237
247
  clearSelection();
238
248
  state.selectedIds = picked.map(node => node.id); state.selected = state.selectedIds.at(-1) || null;
@@ -401,7 +411,7 @@
401
411
  refreshSnap();
402
412
  const canvas = byId('canvas');
403
413
  const map = svg('svg');
404
- map.id = 'studio-minimap'; map.setAttribute('viewBox', '0 0 160 100');
414
+ map.id = 'studio-minimap'; map.setAttribute('viewBox', `0 0 ${MAP_WIDTH} ${MAP_HEIGHT}`); showMap(map, false);
405
415
  map.setAttribute('role', 'img'); map.setAttribute('aria-label', 'Graph minimap. Click to center on an area.');
406
416
  canvas.append(map);
407
417
  }
@@ -418,4 +428,7 @@
418
428
  marquee();
419
429
  installKeyboard();
420
430
  studio.canvas();
431
+ // Opening the inspector or the Graph Manager, or resizing the window, changes what fits: re-decide the minimap.
432
+ const canvasElement = byId('canvas');
433
+ if (canvasElement && typeof ResizeObserver === 'function') new ResizeObserver(() => studio.viewport?.()).observe(canvasElement);
421
434
  })();
@@ -1,4 +1,12 @@
1
- .studio-secondary[aria-pressed="true"] { background: var(--selected); }
1
+ /* Test, Runs and Graph Manager are quiet ghost actions; Save is the header's only filled button. */
2
+ .chrome-actions .studio-secondary {
3
+ gap: 6px; padding: 0 var(--space-2); background: transparent; color: var(--text-2);
4
+ font-size: var(--type-xs); font-weight: var(--weight-strong);
5
+ }
6
+ .chrome-actions .studio-secondary:hover:not(:disabled) { background: var(--hover); color: var(--text); }
7
+ .chrome-actions .studio-secondary:active:not(:disabled) { background: var(--pressed); }
8
+ .chrome-actions .studio-secondary > svg.icon { color: inherit; }
9
+ .studio-secondary:is([aria-pressed="true"], [aria-expanded="true"]) { background: var(--selected); color: var(--text); }
2
10
 
3
11
  .studio-dialog {
4
12
  width: min(620px, calc(100vw - 40px)); max-height: min(84dvh, 860px);
@@ -64,13 +72,13 @@
64
72
  #canvas .studio-wire-preview { position: absolute; top: 0; left: 0; pointer-events: none; z-index: var(--z-raised); }
65
73
  #canvas .studio-marquee { position: absolute; border: 1px solid var(--accent); background: var(--accent-soft); border-radius: var(--radius-xs); pointer-events: none; z-index: var(--z-raised); }
66
74
 
75
+ /* Shown only while the graph runs past the canvas (studio-canvas.js); flat, like the canvas it maps. */
67
76
  #studio-minimap {
68
- position: absolute; bottom: var(--space-4); right: var(--space-4); width: 160px; height: 100px;
69
- border: 1px solid var(--border); background: var(--bg-input); border-radius: var(--card-radius);
70
- box-shadow: var(--shadow-menu); z-index: var(--z-raised); cursor: crosshair; overflow: hidden;
77
+ position: absolute; bottom: var(--space-4); right: var(--space-4); width: 120px; height: 80px;
78
+ border: 1px solid var(--border); background: var(--bg-card-solid); border-radius: var(--radius-md);
79
+ z-index: var(--z-raised); cursor: crosshair; overflow: hidden;
71
80
  }
72
- #studio-minimap .studio-minimap-node { fill: var(--border-strong); stroke: none; rx: 2px; }
73
- #studio-minimap .studio-minimap-end { fill: var(--text-3); stroke: none; rx: 2px; opacity: .6; }
81
+ #studio-minimap :is(.studio-minimap-node, .studio-minimap-end) { fill: var(--text-3); stroke: none; rx: 2px; opacity: .4; }
74
82
  #studio-minimap .studio-minimap-viewport { fill: transparent; fill: color-mix(in srgb, var(--accent) 10%, transparent); stroke: var(--border-strong); stroke-width: 1; rx: 3px; vector-effect: non-scaling-stroke; pointer-events: none; }
75
83
 
76
84
  .node.studio-node-preview { box-shadow: var(--lift-2), 0 0 0 2px var(--warn); }
@@ -88,7 +96,7 @@
88
96
  .studio-run-head strong { display: none; }
89
97
  }
90
98
  @media (max-width: 760px) {
91
- #studio-minimap { width: 115px; height: 72px; right: 8px; bottom: 8px; }
99
+ #studio-minimap { width: 96px; height: 64px; right: 8px; bottom: 8px; }
92
100
  .studio-run-panel { flex-basis: 180px; height: 180px; }
93
101
  .studio-dialog-body { padding: var(--space-3); }
94
102
  }
@@ -636,7 +636,9 @@
636
636
  function initialize() {
637
637
  const chrome = document.querySelector('.chrome');
638
638
  if (!chrome) return;
639
- const actions = $studio('chrome-actions'), toggle = $studio('toggle-inspector'), menu = $studio('more-menu');
639
+ // Test and Runs lead the quiet group of ghost actions, ahead of Graph Manager, "…" and the panel toggle.
640
+ const actions = $studio('chrome-actions'), menu = $studio('more-menu');
641
+ const lead = actions?.querySelector?.('.manager-anchor') || $studio('more-wrap') || $studio('toggle-inspector');
640
642
  for (const [name, icon, handler, title] of [
641
643
  ['Test', 'flask', openTest, 'Preview routes with mock outcomes. Nothing runs.'],
642
644
  ['Runs', 'activity', async () => { await toggleDebugger(); refreshRunsButton(); }, 'Show or hide the run timeline'],
@@ -646,13 +648,18 @@
646
648
  button.replaceChildren(element('span', name));
647
649
  const mark = glyph(icon); if (mark) button.prepend(mark);
648
650
  if (name === 'Runs') { runsButton = button; refreshRunsButton(); }
649
- if (actions && toggle) actions.insertBefore(button, toggle); else chrome.append(button);
651
+ if (actions && lead) actions.insertBefore(button, lead); else chrome.append(button);
650
652
  }
651
653
  if (menu) {
654
+ // Duplicate, Templates, Import, Export JSON, History: Export JSON is static markup so app.js can wire it first.
655
+ const exportItem = $studio('export');
652
656
  for (const [name, icon, handler] of [
653
657
  ['Templates', 'template', openTemplates], ['Import', 'upload', openImport],
654
658
  ['History', 'history', openHistory],
655
- ]) menu.append(menuItem(name, icon, handler));
659
+ ]) {
660
+ const item = menuItem(name, icon, handler);
661
+ if (name !== 'History' && exportItem?.parentElement === menu) menu.insertBefore(item, exportItem); else menu.append(item);
662
+ }
656
663
  installMenu();
657
664
  }
658
665
 
@@ -671,7 +678,7 @@
671
678
  head.append(select, action('Refresh', refreshRunList, 'btn-small'), action('Close', async () => { await toggleDebugger(); refreshRunsButton(); }, 'btn-small'), info);
672
679
  const log = element('div', undefined, 'studio-run-log'); log.id = 'studio-run-log';
673
680
  panel.append(head, log);
674
- main.insertBefore(panel, main.querySelector('.status'));
681
+ main.insertBefore(panel, main.querySelector('#status'));
675
682
  }
676
683
  function heading() {
677
684
  if (currentId() !== lastGraph) {
@@ -27,11 +27,10 @@ button {
27
27
  border: 1px solid transparent; background: var(--bg-control); color: var(--text);
28
28
  font-size: var(--type-sm); font-weight: var(--weight-strong); white-space: nowrap;
29
29
  user-select: none; -webkit-user-select: none;
30
- transition: background-color var(--dur-1) var(--ease-standard),
31
- border-color var(--dur-1) var(--ease-standard), color var(--dur-1) var(--ease-standard);
32
30
  }
31
+ /* Buttons answer hover at once and a press with a deeper fill, as the desktop's do. */
33
32
  button:hover:not(:disabled) { background: var(--bg-control-hover); }
34
- button:active:not(:disabled) { transform: scale(.99); }
33
+ button:active:not(:disabled) { background: var(--bg-raised); }
35
34
  button:disabled { color: var(--text-disabled); }
36
35
  .btn-small { min-height: var(--control-height); padding: 0 var(--space-3); border-radius: var(--radius-sm); font-size: var(--type-xs); }
37
36
 
@@ -64,9 +63,8 @@ input, select, textarea {
64
63
  transition: border-color var(--dur-1) var(--ease-standard), box-shadow var(--dur-1) var(--ease-standard);
65
64
  }
66
65
  input:hover, select:hover, textarea:hover { border-color: var(--text-3); }
67
- input:focus, select:focus, textarea:focus { outline: none; }
68
- input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; border-color: var(--border-strong); box-shadow: 0 0 0 2px var(--accent-ring); }
69
- :root[data-focus-via="pointer"] :is(input, select, textarea):focus-visible { box-shadow: none; }
66
+ /* Flat focus: a field brightens its edge instead of growing a halo. */
67
+ input:focus, select:focus, textarea:focus { outline: none; border-color: color-mix(in srgb, var(--text) 26%, transparent); box-shadow: none; }
70
68
  input::placeholder, textarea::placeholder { color: var(--text-3); }
71
69
  textarea { resize: vertical; min-height: 140px; line-height: var(--leading-sm); }
72
70
 
@@ -112,10 +110,8 @@ textarea { resize: vertical; min-height: 140px; line-height: var(--leading-sm);
112
110
  -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='1.5' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.6-3.6'/%3E%3C/svg%3E") center / contain no-repeat;
113
111
  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='1.5' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.6-3.6'/%3E%3C/svg%3E") center / contain no-repeat;
114
112
  }
115
- .rail input[type="search"] { padding-left: 30px; border-color: transparent; background-color: var(--rail-wash); }
116
- .rail input[type="search"]:hover { border-color: var(--border-strong); }
117
- .rail input[type="search"]:focus { background-color: var(--bg-input); }
118
- .rail input[type="search"]:focus-visible { border-color: var(--border-strong); }
113
+ /* One field style: the rail's searches are the inspector's fields with a search glyph. */
114
+ .rail input[type="search"] { padding-left: 30px; }
119
115
 
120
116
  #graphs { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1px; }
121
117
  .graph-drafts-head {
@@ -144,9 +140,7 @@ textarea { resize: vertical; min-height: 140px; line-height: var(--leading-sm);
144
140
  .graph-row.active, .graph-row.active:hover:not(:disabled), .graph-row.active:focus-visible { background: var(--selected); color: var(--text); }
145
141
  .graph-row span { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
146
142
  .graph-row small { color: var(--text-3); font-size: var(--type-xs); flex-shrink: 0; }
147
- .graph-row.locked { cursor: not-allowed; }
148
- .graph-row.locked span { color: var(--text-3); }
149
- .graph-row.locked:hover:not(:disabled) { background: transparent; color: var(--text-2); }
143
+ .graph-row.locked span { color: var(--text-2); }
150
144
  .graph-row.locked small { display: inline-flex; align-items: center; gap: 4px; }
151
145
  .graph-row[draggable="true"] { cursor: grab; }
152
146
  .graph-row[draggable="true"]:active:not(:disabled) { cursor: grabbing; }
@@ -200,6 +194,7 @@ main { display: flex; flex: 1; min-width: 0; flex-direction: column; }
200
194
  .graph-heading .chip { align-self: center; }
201
195
  .chrome-actions { display: flex; align-items: center; gap: var(--space-1); flex: none; }
202
196
  .chrome-actions > .primary { margin-left: var(--space-1); }
197
+ .save-state { flex: none; margin-left: var(--space-1); padding: 0 var(--space-2); font-size: var(--type-xs); line-height: var(--leading-xs); color: var(--text-3); white-space: nowrap; }
203
198
  .host-chrome { display: flex; align-items: center; gap: var(--space-1); flex: none; padding-right: var(--space-2); border-right: 1px solid var(--border); }
204
199
  .attention-count {
205
200
  display: inline-flex; align-items: center; justify-content: center; flex: none; box-sizing: border-box;
@@ -246,13 +241,15 @@ main { display: flex; flex: 1; min-width: 0; flex-direction: column; }
246
241
  #nodes { position: absolute; }
247
242
 
248
243
  .node {
249
- position: absolute; width: 210px; min-height: 94px; padding: var(--space-3) var(--space-3) 0 18px;
244
+ position: absolute; width: 210px; min-height: 68px; padding: var(--space-3) var(--space-4) var(--space-3) 18px;
250
245
  border: 1px solid var(--border); border-radius: var(--card-radius);
251
246
  background: var(--bg-input); box-shadow: var(--lift-2);
252
247
  text-align: left; cursor: grab; user-select: none; touch-action: none;
248
+ --port-y: 33px; /* from the padding edge: 34px from the card's top, the middle of a one-outcome card (app.js PORT_Y) */
253
249
  }
254
250
  .node.dragging { z-index: 1; cursor: grabbing; }
255
- .node.selected { border-color: var(--accent); box-shadow: var(--lift-3), 0 0 0 1px var(--accent); }
251
+ /* Selection is a soft ring, never a hard outline. */
252
+ .node.selected { border-color: color-mix(in srgb, var(--text) 40%, transparent); box-shadow: var(--lift-2), 0 0 0 3px var(--selected); }
256
253
  .node.node-error { border-color: var(--err); box-shadow: var(--lift-2), 0 0 0 1px var(--err); }
257
254
  .node.node-error-pulse { animation: node-error-flash var(--dur-3) var(--ease-standard) 1; }
258
255
  @keyframes node-error-flash { 50% { box-shadow: var(--lift-2), 0 0 0 2px var(--err); } }
@@ -261,29 +258,41 @@ main { display: flex; flex: 1; min-width: 0; flex-direction: column; }
261
258
  .node b { display: block; min-width: 0; flex: 1; font-weight: var(--weight-strong); font-size: var(--type-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
262
259
  .node small { display: block; color: var(--text-3); font-size: var(--type-xs); margin-top: 6px; padding-left: 24px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
263
260
  .node .node-start { flex: none; min-height: 18px; padding: 0 6px; }
264
- .node > small:last-of-type { margin-bottom: var(--space-3); }
265
- .node.end { padding-bottom: var(--space-3); }
261
+ /* The input sits on the left edge level with a single outcome on the right (mid-height of a one-outcome card),
262
+ at the same height on every card, so steps placed in a row join in straight lines. */
266
263
  .node:before {
267
264
  content: ""; position: absolute; width: 8px; height: 8px; border-radius: var(--radius-full);
268
- background: var(--bg-input); border: 1px solid var(--border-strong); top: 44px; left: -5px;
265
+ background: var(--bg-input); border: 1px solid var(--border-strong); top: calc(var(--port-y) - 4px); left: -5px;
269
266
  }
270
267
  .node:after { display: none; }
271
268
 
272
269
  .output-port {
273
- height: 25px; display: block; position: relative; width: calc(100% + 30px); margin-left: -18px;
274
- text-align: right; border: 0; border-top: 1px solid var(--border); border-radius: 0;
275
- padding: var(--space-1) 15px; background: transparent; font-size: var(--type-xs); font-weight: var(--weight-regular); line-height: var(--leading-xs); color: var(--text-3); min-height: 0;
276
- overflow: hidden; text-overflow: ellipsis;
277
- }
278
- .output-port[data-connected] { color: transparent; }
279
- .output-port[data-connected]:hover, .output-port[data-connected]:focus-visible { color: var(--text-2); }
280
- .output-port:last-child { border-radius: 0 0 var(--card-radius) var(--card-radius); }
270
+ display: block; position: relative; min-height: 0; border: 0; border-radius: 0;
271
+ background: transparent; font-size: var(--type-xs); font-weight: var(--weight-regular); line-height: var(--leading-xs); color: var(--text-3);
272
+ }
281
273
  .output-port:after {
282
- content: ''; position: absolute; right: -4px; top: 9px; width: 8px; height: 8px;
274
+ content: ''; position: absolute; width: 8px; height: 8px;
283
275
  background: var(--bg-input); border: 1px solid var(--border-strong); border-radius: var(--radius-full);
276
+ transition: transform var(--dur-1) var(--ease-standard);
284
277
  }
285
278
  .output-port[data-connected]:after { background: var(--text-3); border-color: var(--text-3); }
286
- .node .output-port:hover:not(:disabled) { background: var(--hover); }
279
+ /* One outcome: a dot on the right edge at mid-height, no footer band. Its name is the tooltip. */
280
+ .node.ports-solo > .output-port {
281
+ position: absolute; top: calc(var(--port-y) - 9px); right: -9px; width: 18px; height: 18px; padding: 0;
282
+ border-radius: var(--radius-full); color: transparent; font-size: 0; overflow: visible;
283
+ }
284
+ .node.ports-solo > .output-port:after { top: 5px; right: 5px; }
285
+ .node.ports-solo > .output-port:hover:not(:disabled) { background: transparent; }
286
+ .node.ports-solo > .output-port:hover:after, .node.ports-solo > .output-port:focus-visible:after { transform: scale(1.3); border-color: var(--text-2); }
287
+ /* Several outcomes: labelled rows, each with its dot on the right edge. */
288
+ .node.ports-many { padding-bottom: var(--space-1); }
289
+ .node.ports-many > .output-port {
290
+ width: calc(100% + 18px + var(--space-4)); height: var(--space-5); margin-left: -18px; padding: 0 15px;
291
+ text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
292
+ }
293
+ .node.ports-many > .output-port:first-of-type { margin-top: var(--space-1); }
294
+ .node.ports-many > .output-port:after { right: -4px; top: 50%; margin-top: -4px; }
295
+ .node.ports-many > .output-port:hover:not(:disabled), .node.ports-many > .output-port:focus-visible { background: var(--hover); color: var(--text-2); }
287
296
 
288
297
  .canvas-toolbar {
289
298
  position: absolute; z-index: var(--z-raised); bottom: var(--space-4); left: 50%; transform: translateX(-50%);
@@ -416,7 +425,7 @@ textarea[data-skill-chips='true'] { position: relative; z-index: 1; background:
416
425
  .validation { font-size: var(--type-xs); line-height: var(--leading-xs); padding-left: 18px; color: var(--err-text); }
417
426
  .valid { display: flex; align-items: center; gap: var(--space-2); margin: 0; color: var(--text-2); font-size: var(--type-xs); }
418
427
  .valid.ok::before { content: ''; flex: none; width: 6px; height: 6px; border-radius: var(--radius-full); background: var(--ok); }
419
- .graph-meta { margin: calc(-1 * var(--space-1)) 0 var(--space-3); color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; user-select: text; -webkit-user-select: text; }
428
+ .graph-meta { margin: calc(-1 * var(--space-1)) 0 var(--space-3); font-size: var(--type-xs); line-height: var(--leading-xs); color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
420
429
  .danger { color: var(--err-text); }
421
430
 
422
431
  .actions { display: flex; gap: var(--space-2); flex-wrap: wrap; }
@@ -424,19 +433,22 @@ textarea[data-skill-chips='true'] { position: relative; z-index: 1; background:
424
433
  .cycle-help { padding: var(--space-3); border: 1px solid var(--border); background: var(--bg-card); border-radius: var(--btn-radius); margin-bottom: var(--space-3); }
425
434
  .cycle-help p { font-size: var(--type-xs); line-height: var(--leading-xs); }
426
435
 
427
- .status {
428
- height: 32px; flex-shrink: 0; display: flex; align-items: center; justify-content: space-between;
429
- gap: var(--space-4); border-top: 1px solid var(--border); padding: 0 var(--space-2) 0 var(--space-3); font-size: var(--type-xs);
430
- color: var(--text-3); background: var(--bg-surface);
436
+ /* No status bar: messages reach screen readers through a hidden live region; errors and notices are toasts. */
437
+ .visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
438
+ .toasts {
439
+ position: fixed; z-index: var(--z-toast); top: calc(var(--chrome-height) + var(--space-3)); right: var(--space-4);
440
+ display: flex; flex-direction: column; align-items: flex-end; gap: var(--space-2); max-width: min(420px, calc(100vw - 2 * var(--space-4))); pointer-events: none;
431
441
  }
432
- .status button {
433
- border: 0; background: transparent; font-size: var(--type-xs); font-weight: var(--weight-regular); height: 24px; min-height: 0; padding: 0 var(--space-2);
434
- border-radius: var(--radius-sm); color: var(--text-3);
442
+ .toast {
443
+ display: flex; align-items: flex-start; gap: var(--space-2); pointer-events: auto;
444
+ padding: var(--space-1) var(--space-1) var(--space-1) var(--space-3); border: 1px solid var(--border-strong); border-radius: var(--radius-md);
445
+ background: var(--bg-input); color: var(--text); box-shadow: var(--shadow-panel); font-size: var(--type-sm);
446
+ transform-origin: 100% 0; animation: toast-in var(--dur-2) var(--ease-out);
435
447
  }
436
- .status button:hover:not(:disabled) { background: var(--hover); color: var(--text); }
437
- .status.error { color: var(--err-text); }
438
- #status { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
439
- .status-actions { display: flex; gap: var(--space-1); align-items: center; }
448
+ .toast[data-tone="error"]::before { content: ''; flex: none; width: 6px; height: 6px; margin-top: 10px; border-radius: var(--radius-full); background: var(--err); }
449
+ .toast-text { flex: 1; min-width: 0; padding: 3px 0; line-height: var(--leading-sm); overflow-wrap: anywhere; }
450
+ .toast .toast-close { flex: none; min-width: 24px; width: 24px; min-height: 24px; height: 24px; border-radius: var(--radius-sm); color: var(--text-3); }
451
+ @keyframes toast-in { from { opacity: 0; translate: 0 calc(-1 * var(--pop-distance)); scale: var(--pop-scale); } }
440
452
 
441
453
  .edge-caption { font-size: var(--type-xs); font-weight: var(--weight-strong); paint-order: stroke; stroke: var(--canvas-bg); stroke-width: 5px; stroke-linejoin: round; }
442
454
  .edge-pill text { font-family: var(--font-ui); font-size: var(--type-xs); font-weight: var(--weight-strong); }
@@ -462,14 +474,30 @@ textarea[data-skill-chips='true'] { position: relative; z-index: 1; background:
462
474
  #graphs { max-height: clamp(150px, 42vh, 420px); overflow-x: hidden; overflow-y: auto; }
463
475
  @media (forced-colors: active) { .rail-body, #graphs { scrollbar-color: auto; } }
464
476
 
477
+ #toggle-library { display: none; }
465
478
  @media (max-width: 1180px) {
479
+ .graph-heading > span:not(.chip) { display: none; }
480
+ }
481
+ /* Narrow: the library folds behind the header's toggle and opens over the canvas; the inspector is an
482
+ overlay shown only while something is selected (app.js), and the canvas controls centre on what stays visible. */
483
+ @media (max-width: 1100px) {
484
+ #toggle-library { display: inline-flex; }
485
+ .rail {
486
+ position: fixed; z-index: var(--z-chrome); top: calc(var(--chrome-height) + 1px); bottom: 0; left: 0;
487
+ box-shadow: var(--shadow-panel);
488
+ }
489
+ :root[data-host-corner] .rail-caption { display: none; }
490
+ /* With the library folded over the canvas, the header itself sits under the window's traffic lights. */
491
+ :root[data-host-corner] .chrome { padding-left: 78px; }
492
+ body.library-collapsed .rail { display: none; }
466
493
  #inspector {
467
- position: absolute; top: 0; right: 0; bottom: 0; width: min(var(--panel), calc(100% - 24px));
494
+ position: absolute; top: 0; right: 0; bottom: 0; width: min(320px, calc(100% - 24px));
468
495
  box-shadow: var(--shadow-panel);
469
496
  }
470
- .graph-heading > span:not(.chip) { display: none; }
497
+ .workspace:has(> #inspector:not(.hidden)) .canvas-toolbar { left: calc((100% - min(320px, calc(100% - 24px))) / 2); }
498
+ .workspace:has(> #inspector:not(.hidden)) #studio-minimap { display: none; }
471
499
  }
472
- @media (min-width: 1181px) { #inspector { width: var(--panel); } }
500
+ @media (min-width: 1101px) { #inspector { width: var(--panel); } }
473
501
 
474
502
  @media (max-width: 760px) {
475
503
  .rail { width: 180px; }
@@ -477,12 +505,16 @@ textarea[data-skill-chips='true'] { position: relative; z-index: 1; background:
477
505
  .chrome-actions .studio-secondary { padding: 0 var(--space-2); }
478
506
  .chrome-actions .studio-secondary > span { display: none; }
479
507
  .graph-heading { font-size: var(--type-xs); }
480
- .canvas-toolbar { bottom: var(--space-2); left: var(--space-2); transform: none; gap: 0; }
508
+ .canvas-toolbar, .workspace:has(> #inspector:not(.hidden)) .canvas-toolbar { bottom: var(--space-2); left: var(--space-2); transform: none; gap: 0; }
481
509
  .rail-body { padding: var(--space-2) 6px; }
482
510
  .rail-footer { padding: 10px; }
483
511
  }
484
512
 
513
+ /* Press states: rows, menu items, ghost and icon buttons take --pressed; the primary its pressed blue. */
514
+ :is(.ghost, .icon-button, .graph-row, .library-item, .library-more, .menu-list > button, .canvas-toolbar button,
515
+ .section-label button, .graph-drafts-clear, .graph-drafts-toggle, .info-tip > button):active:not(:disabled) { background: var(--pressed); }
516
+ .primary:active:not(:disabled) { background: var(--accent-fill-pressed); border-color: var(--accent-fill-pressed); }
517
+
485
518
  @media (prefers-reduced-motion: reduce) {
486
519
  * { scroll-behavior: auto !important; transition-duration: var(--dur-1) !important; animation: none !important; }
487
- button:active:not(:disabled) { transform: none; }
488
520
  }
@@ -1,54 +1,22 @@
1
1
  (() => {
2
2
  'use strict';
3
- const STORAGE = 'andorra.graph.theme';
3
+ // The editor has no appearance control of its own: framed in the desktop app it takes the host's
4
+ // appearance (embed.js passes it to set()); standalone it follows the operating system.
4
5
  const root = document.documentElement;
5
6
  const embedded = typeof window !== 'undefined' && !!window.parent && window.parent !== window;
6
7
 
7
- const readChoice = () => {
8
- try {
9
- const value = localStorage.getItem(STORAGE);
10
- return value === 'dark' || value === 'light' ? value : undefined;
11
- } catch { return undefined; }
12
- };
13
- const writeChoice = value => {
14
- try { localStorage.setItem(STORAGE, value); } catch { }
15
- };
16
-
17
- let choice = embedded ? undefined : readChoice();
8
+ let choice;
18
9
  const media = typeof matchMedia === 'function' ? matchMedia('(prefers-color-scheme: dark)') : undefined;
19
10
  const system = () => (media && !media.matches ? 'light' : 'dark');
20
11
  const resolved = () => choice ?? system();
21
12
 
22
13
  const paint = theme => {
23
14
  if (root.dataset.theme !== theme) root.dataset.theme = theme;
24
- const toggle = document.getElementById('theme-toggle');
25
- if (toggle) {
26
- toggle.hidden = embedded;
27
- toggle.textContent = theme === 'dark' ? 'Light' : 'Dark';
28
- toggle.setAttribute('aria-label', theme === 'dark'
29
- ? 'Switch the Graph Editor to the light appearance'
30
- : 'Switch the Graph Editor to the dark appearance');
31
- }
32
15
  document.dispatchEvent(new CustomEvent('andorra:themechange', { detail: theme }));
33
16
  };
34
17
 
35
18
  paint(resolved());
36
19
 
37
- const wire = () => {
38
- const toggle = document.getElementById('theme-toggle');
39
- if (!toggle) return;
40
- toggle.onclick = () => {
41
- const next = resolved() === 'dark' ? 'light' : 'dark';
42
- choice = next;
43
- writeChoice(next);
44
- paint(next);
45
- };
46
- paint(resolved());
47
- };
48
-
49
- if (document.readyState === 'loading') document.addEventListener('DOMContentLoaded', wire);
50
- else wire();
51
-
52
20
  const followSystem = () => { if (choice === undefined) paint(resolved()); };
53
21
  if (media && typeof media.addEventListener === 'function') media.addEventListener('change', followSystem);
54
22
  else if (media && typeof media.addListener === 'function') media.addListener(followSystem);
@@ -57,7 +25,6 @@
57
25
  set: theme => {
58
26
  if (theme !== 'dark' && theme !== 'light') return;
59
27
  choice = theme;
60
- writeChoice(theme);
61
28
  paint(theme);
62
29
  },
63
30
  resolved,
@@ -4,12 +4,14 @@
4
4
  */
5
5
 
6
6
  :root {
7
- --rail-width: 232px;
8
- --rail-task-indent: 28px;
9
- --chrome-height: 36px;
7
+ --rail-width: 252px;
8
+ --rail-task-indent: 12px;
9
+ --chrome-height: 44px;
10
10
  --reading-measure: 792px;
11
11
  --settings-measure: 880px;
12
- --row-height: 28px;
12
+ --group-radius: 10px;
13
+ --settings-page-measure: 680px;
14
+ --row-height: 30px;
13
15
  --row-radius: 6px;
14
16
  --control-height: 28px;
15
17
  --btn-height: 32px;
@@ -26,17 +28,17 @@
26
28
  --type-section: 15px;
27
29
  --type-hint: 12px;
28
30
  --type-h1: 17px;
29
- --weight-regular: 400; --weight-strong: 500;
31
+ --weight-regular: 400; --weight-strong: 500; --weight-title: 600;
30
32
  --leading-xs: 16px; --leading-sm: 18px; --leading-md: 20px; --leading-prose: 22px; --leading-lg: 24px;
31
33
  --leading-code: 18px;
32
34
  --tracking-sm: -0.08px; --tracking-title: -0.01em; --tracking-code: .06em;
33
35
  --type-prose: 14px; --weight-prose: 400; --weight-prose-strong: 600; --weight-prose-bold: 500;
34
- --text-prose: color-mix(in srgb, var(--text) 80%, var(--bg-surface));
36
+ --text-prose: var(--text);
35
37
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 24px; --space-6: 32px;
36
38
  --input-height: 32px;
37
39
  --input-radius: 8px;
38
40
 
39
- --bg-rail: #101010; --bg-app: #141414; --bg-surface: #191919; --bg-input: #1f1f1f;
41
+ --bg-rail: #181818; --bg-app: #141414; --bg-surface: #141414; --bg-input: #212121;
40
42
  --text: #f5f5f5; --text-2: rgba(245,245,245,.74); --text-3: rgba(245,245,245,.60); --shimmer-dim: 40%;
41
43
  --text-disabled: rgba(245,245,245,.36);
42
44
  --border: rgba(245,245,245,.08); --border-strong: rgba(245,245,245,.12);
@@ -44,16 +46,20 @@
44
46
  --bg-control: rgba(245,245,245,.08); --bg-control-hover: rgba(245,245,245,.14);
45
47
  --bg-raised: rgba(245,245,245,.16);
46
48
  --bg-card-solid: color-mix(in srgb, var(--text) 6%, var(--bg-surface));
47
- --switch-off: var(--text-disabled);
48
- --hover: color-mix(in srgb, var(--text) 7%, transparent);
49
- --selected: color-mix(in srgb, var(--text) 12%, transparent);
49
+ --bg-group: color-mix(in srgb, var(--text) 4%, var(--bg-surface));
50
+ --bg-bubble: var(--bg-input);
51
+ --switch-off: color-mix(in srgb, var(--text) 18%, transparent); --switch-on: #3fa266; --switch-knob: #ffffff;
52
+ --hover: color-mix(in srgb, var(--text) 5%, transparent);
53
+ --selected: color-mix(in srgb, var(--text) 8%, transparent);
54
+ --pressed: color-mix(in srgb, var(--text) 10%, transparent);
50
55
  --bg-hover: var(--hover);
51
56
  --accent: #ececec; --accent-soft: rgba(245,245,245,.16); --on-accent: #141414;
52
57
  --accent-hover: #ffffff; --accent-ring: rgba(245,245,245,.36);
53
- --accent-fill: #1372da; --accent-fill-hover: #2a7fdd; --on-accent-fill: #f5f5f5;
58
+ --accent-fill: #1372da; --accent-fill-hover: #2a7fdd; --accent-fill-pressed: #0f63c2; --on-accent-fill: #f5f5f5;
54
59
  --accent-text: #71aeff; --focus: #1f87fc;
60
+ --status-waiting: #518cce;
55
61
  --ok: #2f9e6a; --err: #e5484d; --warn: #c9c9c9; --caution: #d9a520; --caution-text: #f2c94c;
56
- --ok-text: #7cc79a; --err-text: #f47174; --warn-text: #ececec; --merged-text: #bba4f2; --draft-text: #f0a35e;
62
+ --ok-text: #7cc79a; --err-text: #f47174; --warn-text: #ececec; --merged-text: #bba4f2;
57
63
  --skill: #aab8ff; --skill-wash: rgba(120,140,255,.18);
58
64
  --ok-wash: rgba(47,158,106,.14); --err-wash: rgba(229,72,77,.14); --merged-wash: rgba(142,110,224,.14);
59
65
  --add-wash: rgba(47,158,106,.16); --del-wash: rgba(229,72,77,.16);
@@ -83,6 +89,7 @@
83
89
  --pop-distance: 4px; --pop-scale: .98;
84
90
  --loop-spin: 1s; --loop-shimmer: 1.8s; --loop-breathe: 2.4s;
85
91
  --delay-hover-intent: 150ms;
92
+ --delay-startup-status: 800ms;
86
93
 
87
94
  color-scheme: dark;
88
95
  }
@@ -90,17 +97,21 @@
90
97
  :root[data-theme="light"] {
91
98
  --bg-rail: #f5f5f5; --bg-app: #ffffff; --bg-surface: #ffffff; --bg-input: #ffffff;
92
99
  --text: #1c1c1c; --text-2: rgba(28,28,28,.74); --text-3: rgba(28,28,28,.66); --shimmer-dim: 34%; --text-disabled: rgba(28,28,28,.36);
93
- --border: rgba(28,28,28,.08); --border-strong: rgba(28,28,28,.12);
100
+ --border: rgba(28,28,28,.10); --border-strong: rgba(28,28,28,.14);
94
101
  --bg-card: rgba(28,28,28,.06);
95
102
  --bg-control: rgba(28,28,28,.08); --bg-control-hover: rgba(28,28,28,.14);
96
103
  --bg-raised: #ffffff;
97
- --switch-off: color-mix(in srgb, var(--text) 50%, transparent);
104
+ --switch-off: color-mix(in srgb, var(--text) 50%, transparent); --switch-on: #2f9e6a;
105
+ --bg-group: rgba(28,28,28,.035); --bg-bubble: #f5f5f5;
106
+ --hover: color-mix(in srgb, var(--text) 6%, transparent); --selected: color-mix(in srgb, var(--text) 10%, transparent);
107
+ --pressed: color-mix(in srgb, var(--text) 13%, transparent);
98
108
  --accent: #1c1c1c; --accent-soft: rgba(28,28,28,.16); --on-accent: #ffffff;
99
109
  --accent-hover: #333333; --accent-ring: rgba(28,28,28,.48);
100
- --accent-fill: #1680f3; --accent-fill-hover: #1776dd; --on-accent-fill: #ffffff;
110
+ --accent-fill: #1680f3; --accent-fill-hover: #1776dd; --accent-fill-pressed: #1468c8; --on-accent-fill: #ffffff;
101
111
  --accent-text: #0b6dd3; --focus: #1680f3;
112
+ --status-waiting: #2f6fbd;
102
113
  --ok: #3d7a5c; --err: #d13438; --warn: #45464b; --caution: #b8860b; --caution-text: #8a6100;
103
- --ok-text: #36704f; --err-text: #c4262e; --warn-text: #1c1c1c; --merged-text: #6a4fc4; --draft-text: #b35a0e;
114
+ --ok-text: #36704f; --err-text: #c4262e; --warn-text: #1c1c1c; --merged-text: #6a4fc4;
104
115
  --skill: #3b4fc4; --skill-wash: rgba(59,79,196,.10);
105
116
  --ok-wash: rgba(61,122,92,.08); --err-wash: rgba(209,52,56,.08); --merged-wash: rgba(106,79,196,.08);
106
117
  --add-wash: rgba(61,122,92,.14); --del-wash: rgba(209,52,56,.13);
@@ -148,11 +159,8 @@
148
159
 
149
160
  --canvas-bg: var(--bg-surface);
150
161
  --canvas-dot: color-mix(in srgb, var(--text) 12%, var(--canvas-bg));
151
-
152
- --skill: #aab8ff; --skill-wash: rgba(120,140,255,.18);
153
162
  }
154
163
 
155
164
  :root[data-theme='light'] {
156
165
  --canvas-dot: color-mix(in srgb, var(--text) 14%, var(--canvas-bg));
157
- --skill: #3b4fc4; --skill-wash: rgba(59,79,196,.10);
158
166
  }
@@ -6,6 +6,7 @@ import { acquireSaveLock, archiveUnpublishedSnapshot, removeLockedFolder, SaveLo
6
6
  import { validateMappingConstants, validateMappings, validateSchema, validateValue, schemaAt, nodeOutputSchema } from './handoffs.js';
7
7
  import { CANONICAL_CODING_TOOLS, canonicalToolName, canonicalizeToolList, toolNameMatches } from './tool-names.js';
8
8
  import { DEFAULT_AGENT_GRAPH } from './default-graph.js';
9
+ import { findProviderById, providerModelId } from './providers.js';
9
10
  export const GRAPH_TOOLS = [...CANONICAL_CODING_TOOLS, 'NativeExec', 'AsyncProcess', 'PowerShellFast', 'ShellMetrics', 'read_file', 'list_files', 'search_files', 'write_file', 'edit_file', 'read', 'write', 'edit', 'find', 'grep', 'ls', 'powershell', 'bash', 'shell', 'git_read', 'read_artifact', 'write_artifact', 'repo_explore', 'memory_search', 'set_timer', 'pull_request', 'graphs', 'qa.terminal', 'qa.browser', 'qa.browser_session', 'browser.solve_captcha', 'web_search', 'read_skill_resource', 'browser.panel', 'browser.incognito', 'browser.extensions'];
10
11
  export const QA_TOOL_NAMES = ['qa.terminal', 'qa.browser'];
11
12
  export const RETIRED_GRAPH_TOOLS = new Set(['qa.inspect_project', 'qa.status', 'qa.fast', 'qa.deep', 'qa.test', 'qa.security']);
@@ -326,15 +327,15 @@ function modelRef(value, label, options) {
326
327
  fail(`${label}: provider must be a configured provider id`);
327
328
  if (value.model !== undefined && (typeof value.model !== 'string' || !value.model.trim() || value.model.length > 500))
328
329
  fail(`${label}: model must be a nonempty model reference`);
329
- if (options.providers && !options.allowMissingProviders && value.provider && !options.providers.some(p => p.id === value.provider))
330
+ if (options.providers && !options.allowMissingProviders && value.provider && !findProviderById(options.providers, value.provider))
330
331
  fail(`${label}: unknown model profile; configure provider ${value.provider} with andorra and open /providers first`);
331
332
  }
332
333
  function subagentModelRef(value, label, options) {
333
334
  modelRef(value, label, options);
334
335
  if (options.providers && !options.allowMissingProviders && value.model !== undefined && !value.provider)
335
336
  fail(`${label}: select a configured provider profile for this subagent model`);
336
- const profile = options.providers?.find(p => p.id === value.provider);
337
- if (!options.allowMissingProviders && profile && value.model !== undefined && ![profile.model, ...(profile.models ?? [])].includes(value.model))
337
+ const profile = options.providers ? findProviderById(options.providers, value.provider) : undefined;
338
+ if (!options.allowMissingProviders && profile && value.model !== undefined && providerModelId({ model: profile.model ?? '', models: profile.models }, value.model) === undefined)
338
339
  fail(`${label}: unknown subagent model profile; configure an additional provider profile for model ${value.model} with andorra and open /providers`);
339
340
  }
340
341
  function objectSchema(schema, label) {