@andorra-labs/code 0.1.8 → 0.1.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (187) hide show
  1. package/THIRD_PARTY_NOTICES.md +2 -1
  2. package/dist/src/account-presentation.d.ts +11 -0
  3. package/dist/src/account-presentation.js +29 -2
  4. package/dist/src/agent-execution.js +57 -4
  5. package/dist/src/agent-mcp.d.ts +12 -0
  6. package/dist/src/agent-mcp.js +81 -2
  7. package/dist/src/app-server/protocol.d.ts +120 -1
  8. package/dist/src/app-server/protocol.js +8 -1
  9. package/dist/src/app-server/reasoning.d.ts +0 -8
  10. package/dist/src/app-server/reasoning.js +15 -28
  11. package/dist/src/app-server.d.ts +32 -0
  12. package/dist/src/app-server.js +214 -21
  13. package/dist/src/auth/AuthManager.d.ts +15 -0
  14. package/dist/src/auth/AuthManager.js +66 -7
  15. package/dist/src/auth/index.d.ts +1 -1
  16. package/dist/src/auth/index.js +1 -1
  17. package/dist/src/auth/store.d.ts +17 -1
  18. package/dist/src/auth/store.js +25 -2
  19. package/dist/src/browser-runner.js +1 -2
  20. package/dist/src/browser-server.js +10 -2
  21. package/dist/src/browser-session.js +6 -2
  22. package/dist/src/browser-stealth.d.ts +29 -0
  23. package/dist/src/browser-stealth.js +166 -0
  24. package/dist/src/browser-ui/app.js +123 -28
  25. package/dist/src/browser-ui/icons/chevron-right.svg +8 -0
  26. package/dist/src/browser-ui/index.html +8 -8
  27. package/dist/src/browser-ui/style.css +199 -171
  28. package/dist/src/browser-ui/tokens.css +198 -0
  29. package/dist/src/browser-view.d.ts +57 -9
  30. package/dist/src/browser-view.js +187 -36
  31. package/dist/src/cli.js +31 -9
  32. package/dist/src/coding-tools.js +9 -5
  33. package/dist/src/command-screens.js +4 -4
  34. package/dist/src/commands.d.ts +1 -1
  35. package/dist/src/commands.js +3 -2
  36. package/dist/src/completion-gates.d.ts +35 -0
  37. package/dist/src/completion-gates.js +25 -0
  38. package/dist/src/completion.d.ts +7 -1
  39. package/dist/src/completion.js +37 -4
  40. package/dist/src/config.d.ts +1 -1
  41. package/dist/src/config.js +2 -2
  42. package/dist/src/context-budget.d.ts +11 -0
  43. package/dist/src/context-budget.js +13 -0
  44. package/dist/src/decision/DecisionEngine.d.ts +5 -1
  45. package/dist/src/decision/DecisionManager.d.ts +1 -0
  46. package/dist/src/decision/DecisionManager.js +14 -3
  47. package/dist/src/decision/FactContinuations.d.ts +6 -0
  48. package/dist/src/decision/FactContinuations.js +9 -1
  49. package/dist/src/decision/FactServiceGate.js +1 -1
  50. package/dist/src/decision/checks.js +1 -1
  51. package/dist/src/decision/hostedSkills.d.ts +37 -0
  52. package/dist/src/decision/hostedSkills.js +64 -0
  53. package/dist/src/decision/providers/AndorraDecisionProvider.d.ts +10 -2
  54. package/dist/src/decision/providers/AndorraDecisionProvider.js +121 -10
  55. package/dist/src/default-graph.d.ts +11 -0
  56. package/dist/src/default-graph.js +20 -0
  57. package/dist/src/duration.d.ts +13 -2
  58. package/dist/src/duration.js +27 -3
  59. package/dist/src/file-diff.d.ts +105 -0
  60. package/dist/src/file-diff.js +244 -0
  61. package/dist/src/graph-manager-chat.d.ts +302 -0
  62. package/dist/src/graph-manager-chat.js +940 -0
  63. package/dist/src/graph-runner.js +6 -0
  64. package/dist/src/graph-server.d.ts +9 -0
  65. package/dist/src/graph-server.js +171 -20
  66. package/dist/src/graph-studio-features.js +2 -2
  67. package/dist/src/graph-sync.js +5 -2
  68. package/dist/src/graph-ui/app.js +369 -183
  69. package/dist/src/graph-ui/controls.css +55 -32
  70. package/dist/src/graph-ui/controls.js +85 -9
  71. package/dist/src/graph-ui/edge-router.js +114 -13
  72. package/dist/src/graph-ui/embed.js +32 -17
  73. package/dist/src/graph-ui/icons.js +1 -0
  74. package/dist/src/graph-ui/index.html +4 -4
  75. package/dist/src/graph-ui/library.css +4 -10
  76. package/dist/src/graph-ui/manager-markdown.js +155 -0
  77. package/dist/src/graph-ui/manager-state.js +191 -0
  78. package/dist/src/graph-ui/manager.css +161 -0
  79. package/dist/src/graph-ui/manager.js +700 -0
  80. package/dist/src/graph-ui/skill-picker.js +6 -6
  81. package/dist/src/graph-ui/studio-canvas.js +17 -15
  82. package/dist/src/graph-ui/studio.css +24 -23
  83. package/dist/src/graph-ui/studio.js +69 -48
  84. package/dist/src/graph-ui/style.css +128 -93
  85. package/dist/src/graph-ui/theme.js +2 -2
  86. package/dist/src/graph-ui/tokens.css +217 -151
  87. package/dist/src/graphs.d.ts +76 -2
  88. package/dist/src/graphs.js +172 -9
  89. package/dist/src/hardened-runtime.js +8 -2
  90. package/dist/src/mcp.d.ts +75 -0
  91. package/dist/src/mcp.js +240 -8
  92. package/dist/src/membership-errors.d.ts +14 -0
  93. package/dist/src/membership-errors.js +24 -1
  94. package/dist/src/membership.d.ts +20 -0
  95. package/dist/src/membership.js +45 -16
  96. package/dist/src/palette.d.ts +25 -8
  97. package/dist/src/palette.js +26 -8
  98. package/dist/src/provider-engine.d.ts +4 -4
  99. package/dist/src/provider-engine.js +39 -22
  100. package/dist/src/provider-keys.d.ts +5 -1
  101. package/dist/src/provider-keys.js +7 -3
  102. package/dist/src/provider-settings.d.ts +4 -1
  103. package/dist/src/provider-settings.js +46 -5
  104. package/dist/src/providers.d.ts +24 -0
  105. package/dist/src/providers.js +47 -2
  106. package/dist/src/qa/guidance.d.ts +26 -0
  107. package/dist/src/qa/guidance.js +46 -0
  108. package/dist/src/qa/index.d.ts +1 -8
  109. package/dist/src/qa/index.js +1 -16
  110. package/dist/src/qa/profile/QaProfile.d.ts +5 -1
  111. package/dist/src/qa/profile/QaProfile.js +6 -2
  112. package/dist/src/qa/runtime/ProcessManager.d.ts +20 -2
  113. package/dist/src/qa/runtime/ProcessManager.js +69 -13
  114. package/dist/src/qa/tools.d.ts +19 -1
  115. package/dist/src/qa/tools.js +20 -145
  116. package/dist/src/react-runtime.d.ts +11 -0
  117. package/dist/src/react-runtime.js +203 -53
  118. package/dist/src/remote/engine-pool.js +21 -6
  119. package/dist/src/run-progress.d.ts +6 -0
  120. package/dist/src/run-progress.js +7 -0
  121. package/dist/src/runtime.d.ts +8 -0
  122. package/dist/src/screen-selection.d.ts +38 -0
  123. package/dist/src/screen-selection.js +103 -0
  124. package/dist/src/session-changes.d.ts +117 -0
  125. package/dist/src/session-changes.js +796 -0
  126. package/dist/src/session-skills.d.ts +75 -0
  127. package/dist/src/session-skills.js +151 -0
  128. package/dist/src/side-panel.d.ts +1 -1
  129. package/dist/src/side-panel.js +6 -12
  130. package/dist/src/skill-commands.js +1 -1
  131. package/dist/src/skills/bundled/control-browser/SKILL.md +9 -1
  132. package/dist/src/skills/bundled/graph-manager/SKILL.md +8 -0
  133. package/dist/src/skills/bundled/provenance.json +3 -3
  134. package/dist/src/skills/bundled/web-gui-tester/SKILL.md +1 -1
  135. package/dist/src/stall-recovery.d.ts +33 -0
  136. package/dist/src/stall-recovery.js +83 -0
  137. package/dist/src/subagent-run.js +1 -2
  138. package/dist/src/telemetry/schema.d.ts +1 -1
  139. package/dist/src/telemetry/schema.js +1 -2
  140. package/dist/src/terminal-ui.d.ts +66 -22
  141. package/dist/src/terminal-ui.js +327 -92
  142. package/dist/src/tool-diff-stats.d.ts +9 -0
  143. package/dist/src/tool-diff-stats.js +20 -0
  144. package/dist/src/tool-names.d.ts +1 -1
  145. package/dist/src/tool-result-filter.js +1 -1
  146. package/dist/src/tools.js +26 -2
  147. package/dist/src/transcript.d.ts +11 -0
  148. package/dist/src/transcript.js +23 -3
  149. package/dist/src/types.d.ts +24 -4
  150. package/dist/src/usage-analytics.d.ts +7 -0
  151. package/dist/src/usage-analytics.js +55 -15
  152. package/docs/concepts/README.md +1 -1
  153. package/docs/concepts/limits.md +9 -0
  154. package/docs/guides/desktop-app.md +1 -1
  155. package/docs/guides/graph-builder.md +16 -1
  156. package/docs/guides/tui.md +9 -9
  157. package/docs/reference/slash-commands.md +2 -1
  158. package/docs/superpowers/plans/2026-11-13-graph-manager-chat.md +203 -0
  159. package/docs/superpowers/plans/2026-11-14-jev-fair-use-pricing.md +79 -0
  160. package/docs/superpowers/specs/2026-11-13-graph-manager-chat-design.md +182 -0
  161. package/docs/superpowers/specs/2026-11-14-jev-fair-use-pricing-design.md +156 -0
  162. package/package.json +1 -1
  163. package/tests/chat-side-panel-test-plan.md +1 -1
  164. package/dist/src/qa/api/http-runner.d.ts +0 -3
  165. package/dist/src/qa/api/http-runner.js +0 -47
  166. package/dist/src/qa/git/ChangeDetector.d.ts +0 -26
  167. package/dist/src/qa/git/ChangeDetector.js +0 -177
  168. package/dist/src/qa/git/DiffReviewer.d.ts +0 -28
  169. package/dist/src/qa/git/DiffReviewer.js +0 -115
  170. package/dist/src/qa/orchestrator/ChangeClassifier.d.ts +0 -14
  171. package/dist/src/qa/orchestrator/ChangeClassifier.js +0 -28
  172. package/dist/src/qa/orchestrator/MergeGate.d.ts +0 -14
  173. package/dist/src/qa/orchestrator/MergeGate.js +0 -40
  174. package/dist/src/qa/orchestrator/QaOrchestrator.d.ts +0 -79
  175. package/dist/src/qa/orchestrator/QaOrchestrator.js +0 -373
  176. package/dist/src/qa/runners/CommandRunner.d.ts +0 -22
  177. package/dist/src/qa/runners/CommandRunner.js +0 -96
  178. package/dist/src/qa/runners/TestRunner.d.ts +0 -21
  179. package/dist/src/qa/runners/TestRunner.js +0 -66
  180. package/dist/src/qa/runtime/RuntimeSmoke.d.ts +0 -11
  181. package/dist/src/qa/runtime/RuntimeSmoke.js +0 -78
  182. package/dist/src/qa/runtime-detect.d.ts +0 -10
  183. package/dist/src/qa/runtime-detect.js +0 -72
  184. package/dist/src/qa/security/DependencyScanner.d.ts +0 -19
  185. package/dist/src/qa/security/DependencyScanner.js +0 -167
  186. package/dist/src/qa/security/SecretScanner.d.ts +0 -3
  187. package/dist/src/qa/security/SecretScanner.js +0 -55
@@ -0,0 +1,198 @@
1
+ /* Andorra Code desktop tokens. Two appearances: dark (the ground every first paint starts from) and
2
+ * light. Neutral surfaces carry the work, and every grey but the grounds is one ink at a fixed alpha
3
+ * (ADR 0022, 2026-11-14 amendment). One blue marks the primary action, keyboard focus, a switch that
4
+ * is on, links and progress; nothing else in the chrome carries a hue. Status hues mean state.
5
+ */
6
+
7
+ :root {
8
+ /* Measurements. The row is the Siderail row everywhere: 28px tall, 6px radius, 13px type. */
9
+ --rail-width: 232px; /* written live by RailResizeHandle while the edge is dragged */
10
+ --chrome-height: 36px; /* every title strip */
11
+ --reading-measure: 720px; /* the prose column */
12
+ --settings-measure: 880px; /* every settings page: one column, one left edge */
13
+ --row-height: 28px;
14
+ --row-radius: 6px;
15
+ --control-height: 28px; /* the pill: small labelled actions, composer controls, fields in rows */
16
+ --btn-height: 32px; /* the primary/soft button */
17
+ --btn-radius: 8px;
18
+ --card-radius: 12px;
19
+ --setting-row-height: 52px; /* a Settings row: a title over its one-line description */
20
+ /* The radius scale. Every corner takes one of these steps, and a corner inside another is the
21
+ outer step minus the padding between them, floored at the next step down: 4 for badges, menu
22
+ rows and inline code, 6 for rows, 28px buttons and icon buttons, 8 for 32px buttons, fields,
23
+ code blocks and menus, 12 for cards and dialogs, 20 for the composer (the one large rounded
24
+ object), and full for dots, avatars, switches and status pills. The --row/--btn/--input/--card
25
+ radii above are positions on it. */
26
+ --radius-xs: 4px; --radius-sm: 6px; --radius-md: 8px; --radius-lg: 12px; --radius-xl: 16px; --radius-full: 999px;
27
+ --radius-composer: 20px;
28
+
29
+ --font-ui: "Geist Sans", "Geist", -apple-system, "SF Pro Text", system-ui, sans-serif;
30
+ --font-mono: "Geist Mono", "SF Mono", Menlo, Consolas, ui-monospace, monospace;
31
+ /* The type scale: four sizes, two weights in the chrome. The --type-* role names restate steps on it. */
32
+ --type-xs: 12px; --type-sm: 13px; --type-md: 15px; --type-lg: 20px;
33
+ --type-row: 13px;
34
+ --type-label: 12px;
35
+ --type-section: 15px;
36
+ --type-hint: 12px;
37
+ --weight-regular: 400; --weight-strong: 500;
38
+ /* Leading and tracking, one value per size: 12px on 16, 13px on 18, prose 14px on 22. 13px type is
39
+ tracked in by a hair (−0.08px), the way the platform faces set their text size. */
40
+ --leading-xs: 16px; --leading-sm: 18px; --leading-prose: 22px; --leading-code: 1.55;
41
+ --tracking-sm: -0.08px; --tracking-title: -0.01em; --tracking-code: .06em;
42
+ /* A message is the one thing the window is read for at length, so its prose takes one step up
43
+ from the row size. The body is regular 400; a heading is 600 and a bold term 500. A bold term is
44
+ set apart by ink as well as weight: the body takes the ink a fifth of the way to the surface and
45
+ a bold term takes full ink. Declared once: the theme blocks redefine --text and --bg-surface on
46
+ this same element, so the mix follows the theme. */
47
+ --type-prose: 14px; --weight-prose: 400; --weight-prose-strong: 600; --weight-prose-bold: 500;
48
+ --text-prose: color-mix(in srgb, var(--text) 80%, var(--bg-surface));
49
+ /* The spacing scale. Padding, margins and gaps take these values and nothing between them. */
50
+ --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 24px; --space-6: 32px;
51
+ --input-height: 32px; /* every text field, boxed select and popover search */
52
+ --input-radius: 8px;
53
+
54
+ /* Dark grounds: sidebar, chrome, pane, raised (menus, dialogs, the composer). Pure neutrals; these
55
+ are also the first paint, before the boot script or React has named an appearance. */
56
+ --bg-rail: #101010; --bg-app: #141414; --bg-surface: #191919; --bg-input: #1f1f1f;
57
+ /* Every other grey is the ink at a fixed alpha, so it reads the same on any ground: text 100 / 74 /
58
+ 60 / 36 %, hairline 8 %, field edge 12 %, card 6 %, control 8 % (14 % hovered), raised 16 %. */
59
+ --text: #f5f5f5; --text-2: rgba(245,245,245,.74); --text-3: rgba(245,245,245,.60);
60
+ /* A control that cannot be used. It is its own token, and a clear step below the muted inks: when
61
+ it shared --text-3's value a disabled pill read as live and a quiet live one read as disabled. */
62
+ --text-disabled: rgba(245,245,245,.36);
63
+ --border: rgba(245,245,245,.08); --border-strong: rgba(245,245,245,.12);
64
+ --bg-card: rgba(245,245,245,.06);
65
+ /* A control's own fill (the secondary button), and its hover. */
66
+ --bg-control: rgba(245,245,245,.08); --bg-control-hover: rgba(245,245,245,.14);
67
+ /* The raised chip: the selected segment of a segmented control. */
68
+ --bg-raised: rgba(245,245,245,.16);
69
+ /* A card's fill composited onto the pane, for what must hide what is under it (a donut's hole, a
70
+ ring punched around a dot that overlaps a logo). */
71
+ --bg-card-solid: color-mix(in srgb, var(--text) 6%, var(--bg-surface));
72
+ /* A switch that is off: a boundary of 3:1 on the pane in both themes. */
73
+ --switch-off: var(--text-disabled);
74
+ /* Pointed at, and chosen. One hover for every quiet control, row, menu item and pill, and one
75
+ selection a clear step stronger, so the open task never looks like the one under the pointer. */
76
+ --hover: color-mix(in srgb, var(--text) 7%, transparent);
77
+ --selected: color-mix(in srgb, var(--text) 12%, transparent);
78
+ --bg-hover: var(--hover);
79
+ /* The neutral accent: the send button, the caret, a checked checkbox, a field's focus halo. */
80
+ --accent: #ececec; --accent-soft: rgba(245,245,245,.16); --on-accent: #141414;
81
+ --accent-hover: #ffffff; --accent-ring: rgba(245,245,245,.22);
82
+ /* The one hue in the chrome: the primary button's fill, keyboard focus, a switch that is on, links
83
+ and progress. Everything else is neutral, so the blue stays rare and means "the action". */
84
+ --accent-fill: #1372da; --accent-fill-hover: #2a7fdd; --on-accent-fill: #f5f5f5;
85
+ --accent-text: #71aeff; --focus: #1f87fc;
86
+ /* 2026-11-12: the chrome keeps no amber. --warn is the attention ink, a bright neutral: a row or
87
+ a pill that needs its person is marked by contrast, weight and motion, never by a warning hue.
88
+ --err is one clean red, kept for what failed and for removed lines; it is never a button. */
89
+ --ok: #2f9e6a; --err: #e5484d; --warn: #c9c9c9; --you: #c9c9c9;
90
+ /* Merged: the violet GitHub gives a merged pull request, the one state the three status hues above
91
+ do not already name. */
92
+ --merged: #8e6ee0;
93
+ /* Text-safe status variants: --ok/--err/--warn are the dot and border colours the Siderail
94
+ language defines, and at small text sizes they fall short of 4.5:1 on these surfaces. Any use
95
+ of a status colour as foreground text takes the -text variant instead. */
96
+ --ok-text: #7cc79a; --err-text: #f47174; --warn-text: #ececec; --merged-text: #bba4f2;
97
+ /* A picked skill in the composer. It is content the person typed, not chrome, and it has to read as
98
+ recognised at a glance, so it carries the one hue outside status and the accent (see ADR 0022).
99
+ 4.5:1 or better on its wash over the input ground in both themes. */
100
+ --skill: #aab8ff; --skill-wash: rgba(120,140,255,.18);
101
+ /* A status pill's fill: a faint wash of its hue under the -text ink, light enough that the ink
102
+ keeps 4.5:1 on both the card and the pane ground. */
103
+ --ok-wash: rgba(47,158,106,.14); --err-wash: rgba(229,72,77,.14); --merged-wash: rgba(142,110,224,.14);
104
+ --warn-wash: rgba(245,245,245,.10);
105
+ --add-wash: rgba(47,158,106,.16); --del-wash: rgba(229,72,77,.16);
106
+ --overlay: rgba(0,0,0,.5);
107
+
108
+ /* Fenced code tokens, on the input surface the blocks shade. The register is a terminal's, not
109
+ the chrome's: hue only where code has meaning, at the contrast the small mono type needs. */
110
+ --code-keyword: #569cd6; --code-string: #ce9178; --code-number: #b5cea8; --code-comment: #6a9955;
111
+ --code-fn: #dcdcaa; --code-var: #9cdcfe; --code-type: #4ec9b0; --code-meta: #c586c0;
112
+
113
+ /* Rows on the rail fill with the shared hover and selection. */
114
+ --rail-wash: var(--hover);
115
+ /* 2026-11-12: the rail is a flat ground. The glow and grain are kept as tokens and switched off. */
116
+ --glow-1: transparent; --glow-2: transparent; --glow-size: 440px 380px; --grain: 0;
117
+ /* The waiting update row's halo: faint at rest and brighter at its peak. */
118
+ --update-glow-rest: rgba(245,245,245,.10); --update-glow-peak: rgba(245,245,245,.28);
119
+
120
+ /* Elevation: one shadow per step. lift-2 under a bordered card at rest, lift-3 for the composer
121
+ holding focus, menu for every menu and popover, panel for dialogs and toasts, raised for a chip
122
+ lifted out of its well, knob for a switch's thumb. On a dark ground the lift gains a highlight
123
+ inside its top edge. */
124
+ --lift-2: inset 0 1px 0 rgba(255,255,255,.05), 0 2px 4px rgba(0,0,0,.28), 0 14px 30px -10px rgba(0,0,0,.55);
125
+ --lift-3: inset 0 1px 0 rgba(255,255,255,.07), 0 2px 4px rgba(0,0,0,.3), 0 18px 38px -10px rgba(0,0,0,.7);
126
+ --shadow-menu: 0 8px 28px rgba(0,0,0,.4);
127
+ --shadow-panel: var(--shadow-menu);
128
+ --shadow-lift: var(--shadow-menu); /* kept for the graph editor's copy; unused here */
129
+ --shadow-raised: 0 1px 2px rgba(0,0,0,.32);
130
+ --shadow-knob: 0 1px 2px rgba(0,0,0,.4);
131
+
132
+ /* Layers, lowest first. The window's own controls (chrome) sit under every menu and dialog. Menus
133
+ sit above dialogs on purpose: a picker opened inside a dialog owns the next click. */
134
+ --z-raised: 10; --z-chrome: 30; --z-rail-menu: 40; --z-dialog: 50; --z-menu: 60; --z-palette: 70; --z-toast: 80;
135
+ --z-lightbox: 90; --z-tooltip: 100;
136
+
137
+ /* Motion: five durations, four curves. Nothing UI-driven exceeds 240ms, and nothing loops while
138
+ the app is idle: the spinner turns only while work runs. */
139
+ /* 2026-11-12: quick and soft, with no overshoot. Row hover arrives and leaves at once; popovers
140
+ and rows take --dur-2, dialogs and view changes --dur-3, height --dur-4. */
141
+ --dur-0: 80ms; --dur-1: 120ms; --dur-2: 160ms; --dur-3: 200ms; --dur-4: 240ms; --stagger: 40ms;
142
+ --ease-standard: cubic-bezier(.2,.8,.2,1);
143
+ --ease-out: var(--ease-standard);
144
+ --ease-in-out: cubic-bezier(.65,0,.35,1);
145
+ --ease-exit: cubic-bezier(.4,0,1,1);
146
+ --ease-settle: var(--ease-standard); /* kept for the graph editor's copy; unused here */
147
+ --pop-distance: 4px; --pop-scale: .98;
148
+ --loop-spin: 1s; --loop-shimmer: 1.8s; --loop-breathe: 2.4s;
149
+
150
+ color-scheme: dark;
151
+ }
152
+
153
+ /* Light: white panes and fields on a #f5f5f5 rail, with the same ink-at-alpha greys as dark. The
154
+ muted ink is 66 % rather than 60 % so it keeps 5:1 on every light ground (the rail, a card, a
155
+ hovered row), the bar a live muted ink holds here so it never reads as disabled. A light block only states what it
156
+ changes; measurements, motion and the layers inherit from the dark root. */
157
+ :root[data-theme="light"] {
158
+ --bg-rail: #f5f5f5; --bg-app: #ffffff; --bg-surface: #ffffff; --bg-input: #ffffff;
159
+ --text: #1c1c1c; --text-2: rgba(28,28,28,.74); --text-3: rgba(28,28,28,.66); --text-disabled: rgba(28,28,28,.36);
160
+ --border: rgba(28,28,28,.08); --border-strong: rgba(28,28,28,.12);
161
+ --bg-card: rgba(28,28,28,.06);
162
+ --bg-control: rgba(28,28,28,.08); --bg-control-hover: rgba(28,28,28,.14);
163
+ /* The raised segment is white in light: it lifts out of its grey well by its fill and shadow. */
164
+ --bg-raised: #ffffff;
165
+ --switch-off: color-mix(in srgb, var(--text) 50%, transparent);
166
+ --accent: #1c1c1c; --accent-soft: rgba(28,28,28,.16); --on-accent: #ffffff;
167
+ --accent-hover: #333333; --accent-ring: rgba(28,28,28,.16);
168
+ --accent-fill: #1680f3; --accent-fill-hover: #1776dd; --on-accent-fill: #ffffff;
169
+ --accent-text: #0b6dd3; --focus: #1680f3;
170
+ --ok: #3d7a5c; --err: #d13438; --warn: #45464b; --you: #45464b;
171
+ /* No merged ink in the source palette; this violet is in the key of its pass and fail inks. */
172
+ --merged: #6a4fc4;
173
+ --ok-text: #3d7a5c; --err-text: #c4262e; --warn-text: #1c1c1c; --merged-text: #6a4fc4;
174
+ --skill: #3b4fc4; --skill-wash: rgba(59,79,196,.10);
175
+ /* Fainter than the dark washes: at .14 the pass ink on its own wash drops under 4.5:1. */
176
+ --ok-wash: rgba(61,122,92,.08); --err-wash: rgba(209,52,56,.08); --merged-wash: rgba(106,79,196,.08);
177
+ --warn-wash: rgba(28,28,28,.06);
178
+ /* A removed line has to be found beside an added one: at .08 it was all but white. At .13 the
179
+ fail ink still keeps 5:1 on it. */
180
+ --add-wash: rgba(61,122,92,.14); --del-wash: rgba(209,52,56,.13);
181
+ --overlay: rgba(22,23,26,.32);
182
+
183
+ --code-keyword: #0000ff; --code-string: #a31515; --code-number: #098658; --code-comment: #008000;
184
+ --code-fn: #795e26; --code-var: #001080; --code-type: #267f99; --code-meta: #af00db;
185
+
186
+ --glow-1: transparent; --glow-2: transparent; --glow-size: 480px 420px; --grain: 0;
187
+ --update-glow-rest: rgba(28,28,28,.08); --update-glow-peak: rgba(28,28,28,.20);
188
+
189
+ --lift-2: 0 1px 2px rgba(16,18,24,.04), 0 6px 24px rgba(16,18,24,.07);
190
+ --lift-3: 0 1px 2px rgba(16,18,24,.05), 0 6px 24px rgba(16,18,24,.085);
191
+ --shadow-menu: 0 2px 4px rgba(16,18,24,.05), 0 8px 20px rgba(16,18,24,.07), 0 24px 48px rgba(16,18,24,.07);
192
+ --shadow-panel: var(--shadow-menu);
193
+ --shadow-lift: var(--shadow-menu);
194
+ --shadow-raised: 0 1px 2px rgba(16,18,24,.12), 0 0 0 .5px rgba(16,18,24,.06);
195
+ --shadow-knob: 0 1px 2px rgba(16,18,24,.3);
196
+
197
+ color-scheme: light;
198
+ }
@@ -33,7 +33,32 @@ export declare const VIEW_MOBILE_VIEWPORT: {
33
33
  readonly height: 844;
34
34
  };
35
35
  /** The JPEG quality stream frames use; agent screenshots keep their own setting. */
36
- export declare const VIEW_STREAM_QUALITY = 75;
36
+ export declare const VIEW_STREAM_QUALITY = 90;
37
+ /**
38
+ * The largest display pixel ratio a desktop-mode page renders at. A 4K laptop
39
+ * panel at 300% scaling is the densest display Windows ships with; past that
40
+ * the frames only cost bandwidth the pane cannot show.
41
+ */
42
+ export declare const VIEW_MAX_SCALE = 3;
43
+ /**
44
+ * The largest frame the desktop accepts, in base64 characters (`parseFrameEvent`
45
+ * in desktop/src/engine/browserView.ts drops anything bigger). A dropped frame
46
+ * leaves the pane frozen, so a frame over this is never sent: the stream steps
47
+ * its quality and then its size down until the page's frames fit.
48
+ */
49
+ export declare const VIEW_FRAME_LIMIT: number;
50
+ /**
51
+ * The next, smaller frame budget after a frame came out over the limit: quality
52
+ * first, in steps of 20 down to 50, then the frame size in steps of a quarter,
53
+ * down to the page's CSS size. Undefined when there is nothing left to give up.
54
+ */
55
+ export declare function nextFrameBudget(budget: {
56
+ quality: number;
57
+ size: number;
58
+ }, scale: number): {
59
+ quality: number;
60
+ size: number;
61
+ } | undefined;
37
62
  /**
38
63
  * The mobile Chrome UA Mobile mode presents. A Chromium engine claiming to be
39
64
  * iOS Safari confuses sites that branch on it, so the UA names the platform the
@@ -45,6 +70,14 @@ export declare function clampViewport(width: unknown, height: unknown): {
45
70
  width: number;
46
71
  height: number;
47
72
  };
73
+ /**
74
+ * The pane's display pixel ratio, which sizes its frames (and the factor a
75
+ * browser launched for it runs at), so one frame pixel is one screen pixel and
76
+ * the pane never stretches a frame rendered at CSS size. Anything that is not a finite number is the plain 1×
77
+ * an old panel (which sends none) has always had; the value is rounded to
78
+ * hundredths so a ratio like 1.2500000001 does not count as a change.
79
+ */
80
+ export declare function clampScale(value: unknown): number;
48
81
  /**
49
82
  * JPEG dimensions straight from the SOF markers, without decoding pixels.
50
83
  *
@@ -95,7 +128,7 @@ export declare function macEditingCommands(key: string, modifiers: number): stri
95
128
  * screencast carries pixels only, so the page's own audio output on the engine's
96
129
  * machine is the only sound the panel has.
97
130
  */
98
- export declare function viewLaunchOptions(channel: BrowserViewChannel, executablePath: string): Record<string, unknown>;
131
+ export declare function viewLaunchOptions(channel: BrowserViewChannel, executablePath: string, scale?: number): Record<string, unknown>;
99
132
  /** Whether a frame arriving at `now` may be emitted, given the last emitted frame time. */
100
133
  export declare function frameGate(now: number, lastEmittedAt: number | undefined, minIntervalMs: number): boolean;
101
134
  /**
@@ -126,7 +159,7 @@ export interface BrowserViewOptions {
126
159
  launchProfile?: (directory: string, viewport: {
127
160
  width: number;
128
161
  height: number;
129
- }) => Promise<any>;
162
+ }, scale: number) => Promise<any>;
130
163
  }
131
164
  export type BrowserViewEmit = (event: string, data: Record<string, unknown>) => void;
132
165
  /**
@@ -148,6 +181,12 @@ export declare class BrowserViewManager {
148
181
  * resumes streaming without another round trip.
149
182
  */
150
183
  private readonly desired;
184
+ /**
185
+ * The display ratio a pane most recently reported, for any session. A browser
186
+ * an agent opens while its pane is collapsed has no request of its own to read
187
+ * a ratio from; the machine's display is the best answer there is.
188
+ */
189
+ private displayScale;
151
190
  /** Launches in flight per session, so concurrent opens share one browser. */
152
191
  private readonly launching;
153
192
  private runtime;
@@ -174,7 +213,7 @@ export declare class BrowserViewManager {
174
213
  */
175
214
  private readonly incognito;
176
215
  private closed;
177
- constructor(emit: BrowserViewEmit, launchBrowser?: (() => Promise<any>) | undefined, options?: BrowserViewOptions);
216
+ constructor(emit: BrowserViewEmit, launchBrowser?: ((scale: number) => Promise<any>) | undefined, options?: BrowserViewOptions);
178
217
  private publishRuntime;
179
218
  /**
180
219
  * Probe the same executables `launch` will use, without launching anything;
@@ -229,11 +268,11 @@ export declare class BrowserViewManager {
229
268
  * respected, with a phone's pixel density — a mobile Chrome user agent, and
230
269
  * touch events, so the sites the pane shows answer with their mobile layouts
231
270
  * and hover-dependent UIs behave like they do on a phone. Leaving Mobile
232
- * clears the metrics and resets the user agent with an empty override —
233
- * Chromium answers that with the page's own browser UA (verified live), so
234
- * nothing about the page before the switch needs remembering. A switch
235
- * changes the page's size, so the caller restarts the screencast for the new
236
- * capture scale.
271
+ * clears the metrics and applies the desktop spoof identity (see
272
+ * browser-stealth), so the page presents as a normal desktop browser rather
273
+ * than the headless automation UA a reset would expose. A switch changes the
274
+ * page's size, so the caller restarts the screencast for the new capture
275
+ * scale.
237
276
  *
238
277
  * Calls for one tab are serialized by `queueViewportMode`: each applies
239
278
  * whatever the session's mode is at its turn, so a rapid toggle cannot leave
@@ -244,6 +283,14 @@ export declare class BrowserViewManager {
244
283
  private queueViewportMode;
245
284
  private emitFrame;
246
285
  private startScreencast;
286
+ /**
287
+ * Step one tab's frame budget down after a frame came out over the limit, and
288
+ * restart its stream at it. The oversized frame itself is not sent; the pane
289
+ * keeps its previous frame until the smaller stream delivers.
290
+ */
291
+ private shrinkStream;
292
+ /** Stop and start one tab's stream, keeping it only while it still owns the pane. */
293
+ private restartStream;
247
294
  private wireTab;
248
295
  /**
249
296
  * A frame straight from the page, for a stream that is already running.
@@ -327,6 +374,7 @@ export declare class BrowserViewManager {
327
374
  viewportHeight?: unknown;
328
375
  quality?: unknown;
329
376
  mode?: unknown;
377
+ scale?: unknown;
330
378
  }): Promise<void>;
331
379
  /**
332
380
  * Panel input, translated from image pixels to page CSS pixels and forwarded