@buffcore/cli 0.8.46 → 0.8.47

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/CHANGELOG.md +56 -0
  2. package/dist/commands/change-merge-remove.d.ts +9 -2
  3. package/dist/commands/change-merge-remove.js +27 -15
  4. package/dist/commands/design/check.d.ts +1 -1
  5. package/dist/commands/design/check.js +2 -1
  6. package/dist/commands/design/contract-size.d.ts +7 -0
  7. package/dist/commands/design/contract-size.js +47 -0
  8. package/dist/commands/design/tells.en.d.ts +2 -0
  9. package/dist/commands/design/tells.en.js +2 -0
  10. package/dist/commands/design/tells.es.js +2 -0
  11. package/dist/commands/extension/places-approval.d.ts +4 -0
  12. package/dist/commands/process-paths.d.ts +14 -0
  13. package/dist/commands/process-paths.js +90 -0
  14. package/dist/commands/prototype/ai-approval.d.ts +27 -0
  15. package/dist/commands/prototype/ai-approval.js +60 -0
  16. package/dist/commands/prototype/approver.d.ts +71 -0
  17. package/dist/commands/prototype/approver.js +168 -0
  18. package/dist/commands/prototype/critique-gate.d.ts +14 -0
  19. package/dist/commands/prototype/critique-gate.js +48 -0
  20. package/dist/commands/prototype/fence.d.ts +1 -0
  21. package/dist/commands/prototype/fence.js +12 -0
  22. package/dist/commands/prototype/final-approval-grant.js +18 -0
  23. package/dist/commands/prototype/final-approval.js +4 -1
  24. package/dist/commands/prototype/index.js +3 -0
  25. package/dist/commands/prototype/layout-hints.d.ts +34 -0
  26. package/dist/commands/prototype/layout-hints.js +194 -0
  27. package/dist/commands/prototype/layout-measure.d.ts +39 -0
  28. package/dist/commands/prototype/layout-measure.js +97 -0
  29. package/dist/commands/prototype/layout-words.d.ts +2 -0
  30. package/dist/commands/prototype/layout-words.js +11 -0
  31. package/dist/commands/prototype/layout.en.d.ts +6 -0
  32. package/dist/commands/prototype/layout.en.js +7 -0
  33. package/dist/commands/prototype/load-location.js +2 -3
  34. package/dist/commands/prototype/messages.en.d.ts +14 -0
  35. package/dist/commands/prototype/messages.en.js +15 -1
  36. package/dist/commands/prototype/messages.js +15 -1
  37. package/dist/commands/prototype/milestone-versions.d.ts +4 -0
  38. package/dist/commands/prototype/prune-command.d.ts +5 -0
  39. package/dist/commands/prototype/prune-command.js +25 -0
  40. package/dist/commands/prototype/prune-words.d.ts +1 -0
  41. package/dist/commands/prototype/prune-words.js +7 -0
  42. package/dist/commands/prototype/prune.d.ts +16 -0
  43. package/dist/commands/prototype/prune.en.d.ts +9 -0
  44. package/dist/commands/prototype/prune.en.js +9 -0
  45. package/dist/commands/prototype/prune.es.d.ts +2 -0
  46. package/dist/commands/prototype/prune.es.js +9 -0
  47. package/dist/commands/prototype/prune.js +140 -0
  48. package/dist/commands/prototype/reopen-messages.d.ts +9 -0
  49. package/dist/commands/prototype/reopen-messages.js +19 -0
  50. package/dist/commands/prototype/report.d.ts +14 -0
  51. package/dist/commands/prototype/report.js +5 -1
  52. package/dist/commands/prototype/scene-layout.d.ts +17 -0
  53. package/dist/commands/prototype/scene-layout.js +57 -0
  54. package/dist/commands/prototype/scene-ready.js +8 -2
  55. package/dist/commands/prototype/scene.d.ts +15 -2
  56. package/dist/commands/prototype/scene.js +54 -42
  57. package/dist/commands/prototype/selector-answer.d.ts +43 -0
  58. package/dist/commands/prototype/selector-answer.js +73 -0
  59. package/dist/commands/prototype/selector-misses.d.ts +19 -0
  60. package/dist/commands/prototype/selector-misses.js +78 -0
  61. package/dist/commands/prototype/selector-prompt.d.ts +23 -0
  62. package/dist/commands/prototype/selector-prompt.js +32 -0
  63. package/dist/commands/prototype/selector-run.d.ts +13 -0
  64. package/dist/commands/prototype/selector-run.js +113 -0
  65. package/dist/commands/prototype/selector.d.ts +54 -0
  66. package/dist/commands/prototype/selector.js +96 -0
  67. package/dist/commands/prototype/snapshot-ancestor.js +2 -0
  68. package/dist/commands/prototype/snapshot-bundle.d.ts +17 -3
  69. package/dist/commands/prototype/snapshot-bundle.js +69 -7
  70. package/dist/commands/prototype/snapshot-check-files.d.ts +2 -0
  71. package/dist/commands/prototype/snapshot-check-files.js +41 -0
  72. package/dist/commands/prototype/snapshot-command.d.ts +2 -0
  73. package/dist/commands/prototype/snapshot-command.js +3 -0
  74. package/dist/commands/prototype/snapshot-completion.d.ts +4 -0
  75. package/dist/commands/prototype/snapshot-completion.js +30 -2
  76. package/dist/commands/prototype/snapshot-dependencies.d.ts +23 -2
  77. package/dist/commands/prototype/snapshot-dependencies.js +120 -14
  78. package/dist/commands/prototype/snapshot-hashes.d.ts +7 -0
  79. package/dist/commands/prototype/snapshot-hashes.js +28 -0
  80. package/dist/commands/prototype/snapshot-inputs.d.ts +15 -6
  81. package/dist/commands/prototype/snapshot-inputs.js +140 -197
  82. package/dist/commands/prototype/snapshot-matrix.d.ts +58 -0
  83. package/dist/commands/prototype/snapshot-matrix.js +95 -0
  84. package/dist/commands/prototype/snapshot-metro-inputs.d.ts +8 -0
  85. package/dist/commands/prototype/snapshot-metro-inputs.js +81 -0
  86. package/dist/commands/prototype/snapshot-owners.d.ts +6 -2
  87. package/dist/commands/prototype/snapshot-owners.js +12 -3
  88. package/dist/commands/prototype/snapshot-progress-entry.d.ts +14 -0
  89. package/dist/commands/prototype/snapshot-progress-entry.js +85 -0
  90. package/dist/commands/prototype/snapshot-progress.d.ts +19 -2
  91. package/dist/commands/prototype/snapshot-progress.js +54 -102
  92. package/dist/commands/prototype/snapshot-registry.d.ts +14 -0
  93. package/dist/commands/prototype/snapshot-registry.js +121 -0
  94. package/dist/commands/prototype/snapshot-report.d.ts +4 -0
  95. package/dist/commands/prototype/snapshot-report.js +77 -12
  96. package/dist/commands/prototype/snapshot-requests.d.ts +13 -3
  97. package/dist/commands/prototype/snapshot-requests.js +68 -30
  98. package/dist/commands/prototype/snapshot-reuse.d.ts +6 -1
  99. package/dist/commands/prototype/snapshot-reuse.js +17 -7
  100. package/dist/commands/prototype/snapshot-scene-inputs.d.ts +30 -0
  101. package/dist/commands/prototype/snapshot-scene-inputs.js +210 -0
  102. package/dist/commands/prototype/snapshot-served-inputs.d.ts +3 -0
  103. package/dist/commands/prototype/snapshot-served-inputs.js +12 -0
  104. package/dist/commands/prototype/snapshot-server-record.d.ts +26 -0
  105. package/dist/commands/prototype/snapshot-server-record.js +135 -0
  106. package/dist/commands/prototype/snapshot-servers.d.ts +3 -1
  107. package/dist/commands/prototype/snapshot-servers.js +50 -2
  108. package/dist/commands/prototype/snapshot-setup.d.ts +3 -1
  109. package/dist/commands/prototype/snapshot-setup.js +2 -1
  110. package/dist/commands/prototype/snapshot-surface-inputs.d.ts +23 -0
  111. package/dist/commands/prototype/snapshot-surface-inputs.js +161 -0
  112. package/dist/commands/prototype/snapshot-vite-inputs.d.ts +22 -0
  113. package/dist/commands/prototype/snapshot-vite-inputs.js +209 -0
  114. package/dist/commands/prototype/snapshot.d.ts +5 -0
  115. package/dist/commands/prototype/snapshot.js +72 -10
  116. package/dist/commands/prototype/version-commands.d.ts +4 -0
  117. package/dist/commands/prototype/version-commands.js +36 -8
  118. package/dist/commands/prototype/versions.d.ts +28 -2
  119. package/dist/commands/prototype/versions.js +25 -1
  120. package/dist/commands/prototype/vite-fs-path.d.ts +4 -0
  121. package/dist/commands/prototype/vite-fs-path.js +15 -0
  122. package/dist/commands/remove-links.d.ts +6 -0
  123. package/dist/commands/remove-links.js +17 -0
  124. package/dist/commands/size-docs.d.ts +9 -0
  125. package/dist/commands/size-docs.en.d.ts +6 -0
  126. package/dist/commands/size-docs.en.js +6 -0
  127. package/dist/commands/size-docs.es.d.ts +2 -0
  128. package/dist/commands/size-docs.es.js +6 -0
  129. package/dist/commands/size-docs.js +28 -0
  130. package/dist/commands/size.d.ts +5 -2
  131. package/dist/commands/size.js +27 -9
  132. package/dist/commands/ui/approval-authority.d.ts +10 -2
  133. package/dist/commands/ui/approval-authority.js +1 -0
  134. package/dist/commands/ui/autopilot-ai-approve.d.ts +18 -0
  135. package/dist/commands/ui/autopilot-ai-approve.js +68 -0
  136. package/dist/commands/ui/autopilot-loop.js +5 -6
  137. package/dist/commands/ui/autopilot-merge.js +3 -0
  138. package/dist/commands/ui/autopilot.en.d.ts +23 -0
  139. package/dist/commands/ui/autopilot.en.js +23 -0
  140. package/dist/commands/ui/autopilot.es.d.ts +23 -0
  141. package/dist/commands/ui/autopilot.es.js +23 -0
  142. package/dist/commands/ui/chat/find.d.ts +2 -0
  143. package/dist/commands/ui/chat/find.js +13 -0
  144. package/dist/commands/ui/chat/fresh-codex.d.ts +39 -0
  145. package/dist/commands/ui/chat/fresh-codex.js +175 -0
  146. package/dist/commands/ui/chat/fresh-critique.js +13 -5
  147. package/dist/commands/ui/chat/fresh-launch.d.ts +19 -0
  148. package/dist/commands/ui/chat/fresh-launch.js +67 -11
  149. package/dist/commands/ui/chat/fresh-prompts.d.ts +2 -0
  150. package/dist/commands/ui/chat/fresh-prompts.js +2 -0
  151. package/dist/commands/ui/chat/fresh-secrets.d.ts +6 -0
  152. package/dist/commands/ui/chat/fresh-secrets.js +172 -0
  153. package/dist/commands/ui/chat/fresh.en.d.ts +1 -0
  154. package/dist/commands/ui/chat/fresh.en.js +2 -1
  155. package/dist/commands/ui/chat/fresh.es.d.ts +1 -0
  156. package/dist/commands/ui/chat/fresh.es.js +2 -1
  157. package/dist/commands/ui/chat/worktree.js +25 -5
  158. package/dist/commands/ui/index.js +3 -0
  159. package/dist/commands/ui/loop-approve.d.ts +30 -1
  160. package/dist/commands/ui/loop-approve.js +2 -2
  161. package/dist/commands/ui/merge-route.js +3 -0
  162. package/dist/commands/ui/places-change.d.ts +4 -0
  163. package/dist/commands/ui/prototype-main.d.ts +4 -0
  164. package/dist/commands/ui/reopen-route.d.ts +117 -0
  165. package/dist/commands/ui/reopen-route.js +97 -0
  166. package/dist/commands/ui/save-route.d.ts +2 -0
  167. package/dist/commands/ui/save-route.js +4 -0
  168. package/dist/commands/ui/studio-routes.js +2 -0
  169. package/dist/commands/ui/studio-state.d.ts +33 -0
  170. package/dist/commands/ui/studio-versions.d.ts +24 -0
  171. package/dist/commands/ui/worktrees.d.ts +1 -1
  172. package/dist/commands/ui/worktrees.js +19 -3
  173. package/dist/commands/worktree-sweep.d.ts +45 -0
  174. package/dist/commands/worktree-sweep.js +188 -0
  175. package/dist/commands/worktrees-command.d.ts +32 -0
  176. package/dist/commands/worktrees-command.en.d.ts +25 -0
  177. package/dist/commands/worktrees-command.en.js +55 -0
  178. package/dist/commands/worktrees-command.js +96 -0
  179. package/dist/main.js +2 -0
  180. package/dist/ui/page.js +82 -82
  181. package/docs/PROTOTYPE.md +6 -3
  182. package/docs/WORKBENCH.md +11 -6
  183. package/package.json +11 -11
  184. package/skills/ape-critique/SKILL.md +41 -6
  185. package/skills/ape-design-system/SKILL.md +3 -0
  186. package/skills/ape-plan-change/SKILL.md +6 -0
  187. package/skills/ape-prototype/SKILL.md +8 -4
@@ -0,0 +1,97 @@
1
+ /// <reference lib="dom" />
2
+ // Runs inside the scene page (Playwright sends its source): no imports or outer variables.
3
+ // The laid-out boxes the layout hints read (`layout-hints.ts`): each shown element with its box,
4
+ // its parent's layout and its own spacing. Reads only what the page has already laid out.
5
+ /** The boxes as JSON: Playwright's own transfer of hundreds of objects costs far more. */
6
+ export function measureLayout() {
7
+ const layerRoles = ['dialog', 'alertdialog', 'menu', 'listbox', 'tooltip', 'alert', 'status'];
8
+ const blockish = ['block', 'flex', 'grid', 'table', 'list-item', 'flow-root'];
9
+ const boxes = [];
10
+ const shapes = [];
11
+ const px = (value) => Number.parseFloat(value) || 0;
12
+ const textOf = (el) => (el.textContent ?? '').replace(/\s+/g, ' ').trim();
13
+ const words = (el) => {
14
+ const text = textOf(el);
15
+ const said = text || el.getAttribute('aria-label') || el.getAttribute('data-testid') || el.id || '';
16
+ return said.length > 40 ? `${said.slice(0, 39)}…` : said;
17
+ };
18
+ const walk = (parent, at) => {
19
+ for (const el of parent.children) {
20
+ if (!(el instanceof HTMLElement) || el.matches('script,style,template,noscript'))
21
+ continue;
22
+ if (el.getAttribute('aria-hidden') === 'true')
23
+ continue;
24
+ const s = getComputedStyle(el);
25
+ if (s.display === 'none' || s.visibility === 'hidden' || s.opacity === '0')
26
+ continue;
27
+ if (s.display === 'contents') {
28
+ walk(el, at);
29
+ continue;
30
+ }
31
+ const r = el.getBoundingClientRect();
32
+ const role = el.getAttribute('role');
33
+ const layer = ['absolute', 'fixed', 'sticky'].includes(s.position) ||
34
+ layerRoles.includes(role ?? '') ||
35
+ el.hasAttribute('popover') ||
36
+ el.getAttribute('aria-modal') === 'true';
37
+ const flex = s.display === 'flex' || s.display === 'inline-flex';
38
+ const reversed = s.flexDirection.endsWith('reverse');
39
+ const index = boxes.length;
40
+ const rtl = s.direction === 'rtl';
41
+ // Top, inline end, bottom, inline start.
42
+ const sides = (top, right, bottom, left) => {
43
+ const [t = 0, r = 0, b = 0, l = 0] = [top, right, bottom, left].map(px);
44
+ return (rtl ? [t, l, b, r] : [t, r, b, l]);
45
+ };
46
+ const margin = sides(s.marginTop, s.marginRight, s.marginBottom, s.marginLeft);
47
+ const border = sides(s.borderTopWidth, s.borderRightWidth, s.borderBottomWidth, s.borderLeftWidth);
48
+ const tag = el.tagName.toLowerCase();
49
+ boxes.push({
50
+ parent: at,
51
+ tag,
52
+ name: `${tag}${role ? `[role=${role}]` : ''} "${words(el)}"`,
53
+ x: r.x,
54
+ y: r.y,
55
+ w: r.width,
56
+ h: r.height,
57
+ bare: !textOf(el),
58
+ framed: !/^rgba\(.*, 0\)$|transparent/.test(s.backgroundColor) ||
59
+ s.backgroundImage !== 'none' ||
60
+ s.boxShadow !== 'none' ||
61
+ border.some((width) => width > 0),
62
+ layer,
63
+ flows: !layer &&
64
+ r.width >= 1 &&
65
+ r.height >= 1 &&
66
+ s.float === 'none' &&
67
+ blockish.includes(s.display),
68
+ flow: flex && !reversed
69
+ ? s.flexDirection === 'row'
70
+ ? 'row'
71
+ : 'column'
72
+ : ['block', 'flow-root', 'list-item'].includes(s.display)
73
+ ? 'column'
74
+ : 'other',
75
+ wrap: flex && s.flexWrap !== 'nowrap',
76
+ rtl,
77
+ align: s.alignItems,
78
+ justify: s.justifyContent,
79
+ self: s.alignSelf,
80
+ padding: sides(s.paddingTop, s.paddingRight, s.paddingBottom, s.paddingLeft),
81
+ outside: margin.map((m, i) => m + (border[i] ?? 0)),
82
+ margin,
83
+ gap: [px(s.rowGap), px(s.columnGap)],
84
+ kind: '',
85
+ });
86
+ shapes.push('');
87
+ if (at >= 0)
88
+ shapes[at] += `${tag}${role ?? ''},`;
89
+ walk(el, index);
90
+ const box = boxes[index];
91
+ if (box)
92
+ box.kind = [tag, role, s.display, s.flexDirection, s.borderRadius, shapes[index]].join('|');
93
+ }
94
+ };
95
+ walk(document.body, -1);
96
+ return JSON.stringify(boxes);
97
+ }
@@ -0,0 +1,2 @@
1
+ import { en } from './layout.en.ts';
2
+ export declare const layoutText: (key: keyof typeof en, values?: Record<string, unknown>) => string;
@@ -0,0 +1,11 @@
1
+ import { createI18n } from '@buffcore/i18n';
2
+ import { en } from './layout.en.js';
3
+ import { locale } from './messages.js';
4
+ const es = {
5
+ 'layout.overlap': 'Sugerencia de maquetación: escena "{scene}": {element} se superpone a {other} en {width} x {height} px, y ninguno es una capa (un menú, una hoja, un aviso).',
6
+ 'layout.edge': 'Sugerencia de maquetación: escena "{scene}": {element} queda {offset} px fuera del borde que comparten {count} de sus hermanos.',
7
+ 'layout.padding': 'Sugerencia de maquetación: escena "{scene}": {element} tiene un relleno de {own} px donde {count} hermanos del mismo tipo tienen {usual} px (arriba, final, abajo, inicio / huecos entre filas y columnas).',
8
+ 'layout.gap': 'Sugerencia de maquetación: escena "{scene}": los {gap} px entre {other} y {element} no son un paso de la escala de espaciado; el más cercano es {token} ({value} px).',
9
+ };
10
+ const translator = createI18n({ catalogs: [{ en, es }] });
11
+ export const layoutText = (key, values) => translator.t(locale(), key, values);
@@ -0,0 +1,6 @@
1
+ export declare const en: {
2
+ 'layout.overlap': string;
3
+ 'layout.edge': string;
4
+ 'layout.padding': string;
5
+ 'layout.gap': string;
6
+ };
@@ -0,0 +1,7 @@
1
+ // The layout hints' words (`scene-layout.ts`); Spanish in `layout-words.ts`.
2
+ export const en = {
3
+ 'layout.overlap': 'Layout hint: scene "{scene}": {element} overlaps {other} by {width} x {height} px, and neither is a layer (a menu, a sheet, a toast).',
4
+ 'layout.edge': 'Layout hint: scene "{scene}": {element} sits {offset} px off the edge {count} of its siblings share.',
5
+ 'layout.padding': 'Layout hint: scene "{scene}": {element} has padding {own} px where {count} siblings of the same kind have {usual} px (top, end, bottom, start / row and column gaps).',
6
+ 'layout.gap': 'Layout hint: scene "{scene}": {gap} px between {other} and {element} is not a step of the spacing scale; the nearest is {token} ({value} px).',
7
+ };
@@ -1,6 +1,7 @@
1
1
  import { existsSync } from 'node:fs';
2
2
  import { dirname, isAbsolute, join, relative, resolve, sep } from 'node:path';
3
3
  import { surfaceDir } from './export.js';
4
+ import { viteFsFile } from './vite-fs-path.js';
4
5
  /** Only the run's configured loopback surfaces may be read again. */
5
6
  export function ownSurface(context, input) {
6
7
  try {
@@ -50,9 +51,7 @@ export function loadLocation(root, input, context) {
50
51
  if (!base)
51
52
  return url.origin;
52
53
  const pathname = decodeURIComponent(url.pathname);
53
- const file = pathname.startsWith('/@fs/')
54
- ? pathname.slice(5).replace(/^\/([a-z]:\/)/i, '$1')
55
- : resolve(base, `.${pathname}`);
54
+ const file = viteFsFile(pathname) ?? resolve(base, `.${pathname}`);
56
55
  const path = relative(root, file);
57
56
  if (!isAbsolute(path) && path !== '..' && !path.startsWith(`..${sep}`) && existsSync(file))
58
57
  return path.replaceAll('\\', '/');
@@ -161,6 +161,19 @@ export declare const en: {
161
161
  'prototype.worktreeBusy': string;
162
162
  'prototype.noSlot': string;
163
163
  'prototype.ownFirstHelp': string;
164
+ 'prototype.belowFloor': string;
165
+ 'prototype.selectorSkipped': string;
166
+ 'prototype.selectorAdded': string;
167
+ 'prototype.selector.agent-unsupported': string;
168
+ 'prototype.selector.codex-sandbox': string;
169
+ 'prototype.selector.ci': string;
170
+ 'prototype.selector.host': string;
171
+ 'prototype.selector.launch': string;
172
+ 'prototype.selector.failed': string;
173
+ 'prototype.selector.timeout': string;
174
+ 'prototype.selector.secret': string;
175
+ 'prototype.selector.shape': string;
176
+ 'prototype.fullHelp': string;
164
177
  'prototype.pagesHelp': string;
165
178
  'prototype.invalidPages': string;
166
179
  'prototype.lowMemory': string;
@@ -171,4 +184,5 @@ export declare const en: {
171
184
  'prototype.exportServe': string;
172
185
  'prototype.exportServeBase': string;
173
186
  'prototype.exportServeRelative': string;
187
+ 'prototype.milestoneFull': string;
174
188
  };
@@ -43,7 +43,7 @@ export const en = {
43
43
  'prototype.remade': 'remade',
44
44
  'prototype.problems': '{count} problem(s)',
45
45
  'prototype.sceneResult': ' {title}: {result}{retry}',
46
- 'prototype.drawFallbacks': 'Full-page fallbacks: {looks} looks, {scenes} scenes.',
46
+ 'prototype.drawFallbacks': 'Full-page fallbacks in the scenes drawn this run: {looks} looks, {scenes} scenes.',
47
47
  'prototype.sceneFailed': 'Scene "{scene}" failed{retry}: {detail}',
48
48
  'prototype.serverUnavailable': 'Server "{server}" is not answering for scene "{scene}". {status}.',
49
49
  'prototype.serverExitCode': 'Last exit code was {code}',
@@ -162,6 +162,19 @@ export const en = {
162
162
  'prototype.worktreeBusy': 'Another snapshot of this change is already running. Take this one when it has finished.',
163
163
  'prototype.noSlot': 'Two snapshots are already running in this repository. Take this one when one has finished.',
164
164
  'prototype.ownFirstHelp': "draw the scenes this branch changed before the others (the report's order stays)",
165
+ 'prototype.belowFloor': 'This snapshot has a scene drawn in fewer looks than its matrix needs (the floor: the product’s theme, light and dark, its languages and en-XA), or a floor scene in a full report. Take the snapshot again with ape prototype snapshot (with --full for a full report).',
166
+ 'prototype.selectorSkipped': 'No looks were added beyond the floor: {why}. This snapshot draws the floor alone.',
167
+ 'prototype.selectorAdded': 'The selector added {count, plural, one {# pick} other {# picks}} beyond the floor; report.json lists them in selector.',
168
+ 'prototype.selector.agent-unsupported': 'the selector runs only with Claude Code or Codex ({agent} is set in plan/agents.md and has no read-only turn)',
169
+ 'prototype.selector.codex-sandbox': 'Codex’s elevated Windows sandbox is not set up (set it up once in Codex, then try again)',
170
+ 'prototype.selector.ci': 'this is a CI or test run',
171
+ 'prototype.selector.host': 'the host starts every agent turn, so this run cannot',
172
+ 'prototype.selector.launch': 'the agent could not be started',
173
+ 'prototype.selector.failed': 'the agent turn failed',
174
+ 'prototype.selector.timeout': 'the agent turn took longer than {seconds} seconds',
175
+ 'prototype.selector.secret': 'the agent’s answer quoted a value from {file}, so it was dropped',
176
+ 'prototype.selector.shape': 'the agent answered out of shape',
177
+ 'prototype.fullHelp': 'draw every theme, mode and pseudo-locale (the full matrix), not only the floor',
165
178
  'prototype.pagesHelp': 'scene pages open at once, 1 to 4 (default uses cores and free memory, up to 2 with admin scenes)',
166
179
  'prototype.invalidPages': '--pages must be a whole number from 1 to {max}.',
167
180
  'prototype.lowMemory': 'This computer has {free} MB of free memory and a snapshot needs at least {need} MB. Close some programs and take the snapshot again, or set APE_SNAPSHOT_MIN_FREE_MB to change this.',
@@ -172,4 +185,5 @@ export const en = {
172
185
  'prototype.exportServe': 'Serve that folder at the root of any static file server (e.g. python -m http.server) and open it: no API, database or development server.',
173
186
  'prototype.exportServeBase': 'Serve that folder at {base} of any static file server and open it there: no API, database or development server.',
174
187
  'prototype.exportServeRelative': 'Serve that folder under any path of any static file server and open it there: no API, database or development server.',
188
+ 'prototype.milestoneFull': 'A milestone needs every scene drawn in the full matrix: take a full report of this commit (ape prototype snapshot --full, which reuses what it can) and record it.',
175
189
  };
@@ -44,7 +44,7 @@ const es = {
44
44
  'prototype.remade': 'regenerada',
45
45
  'prototype.problems': '{count} problema(s)',
46
46
  'prototype.sceneResult': ' {title}: {result}{retry}',
47
- 'prototype.drawFallbacks': 'Recargas completas: {looks} apariencias, {scenes} escenas.',
47
+ 'prototype.drawFallbacks': 'Recargas completas en las escenas dibujadas en esta ejecución: {looks} apariencias, {scenes} escenas.',
48
48
  'prototype.sceneFailed': 'La escena "{scene}" falló{retry}: {detail}',
49
49
  'prototype.serverUnavailable': 'El servidor "{server}" no responde para la escena "{scene}". {status}.',
50
50
  'prototype.serverExitCode': 'El último código de salida fue {code}',
@@ -163,6 +163,19 @@ const es = {
163
163
  'prototype.worktreeBusy': 'Ya se está tomando otra captura de este cambio. Toma esta cuando termine.',
164
164
  'prototype.noSlot': 'Ya se están tomando dos capturas en este repositorio. Toma esta cuando termine una.',
165
165
  'prototype.ownFirstHelp': 'dibuja primero las escenas que cambió esta rama (el informe conserva su orden)',
166
+ 'prototype.belowFloor': 'Esta captura tiene una escena dibujada en menos aspectos de los que necesita su matriz (la base: el tema del producto, claro y oscuro, sus idiomas y en-XA), o una escena de la base en un informe completo. Toma la captura de nuevo con ape prototype snapshot (con --full para un informe completo).',
167
+ 'prototype.selectorSkipped': 'No se añadieron aspectos además de la base: {why}. Esta captura dibuja solo la base.',
168
+ 'prototype.selectorAdded': 'El selector añadió {count, plural, one {# elección} other {# elecciones}} además de la base; report.json las lista en selector.',
169
+ 'prototype.selector.agent-unsupported': 'el selector solo funciona con Claude Code o Codex (plan/agents.md indica {agent}, que no tiene un turno de solo lectura)',
170
+ 'prototype.selector.codex-sandbox': 'el sandbox elevado de Windows de Codex no está configurado (configúralo una vez en Codex y vuelve a intentarlo)',
171
+ 'prototype.selector.ci': 'es una ejecución de CI o de pruebas',
172
+ 'prototype.selector.host': 'el anfitrión inicia cada turno de agente, así que esta ejecución no puede',
173
+ 'prototype.selector.secret': 'la respuesta del agente citaba un valor de {file}, así que se descartó',
174
+ 'prototype.selector.launch': 'no se pudo iniciar el agente',
175
+ 'prototype.selector.failed': 'el turno del agente falló',
176
+ 'prototype.selector.timeout': 'el turno del agente tardó más de {seconds} segundos',
177
+ 'prototype.selector.shape': 'el agente respondió con una forma no válida',
178
+ 'prototype.fullHelp': 'dibuja todos los temas, modos y pseudoidiomas (la matriz completa), no solo la base',
166
179
  'prototype.pagesHelp': 'páginas de escena abiertas a la vez, de 1 a 4 (por defecto, según los núcleos y la memoria libre, hasta 2 con escenas de administración)',
167
180
  'prototype.invalidPages': '--pages debe ser un número entero de 1 a {max}.',
168
181
  'prototype.lowMemory': 'Este equipo tiene {free} MB de memoria libre y una captura necesita al menos {need} MB. Cierra algunos programas y toma la captura de nuevo, o define APE_SNAPSHOT_MIN_FREE_MB para cambiarlo.',
@@ -173,6 +186,7 @@ const es = {
173
186
  'prototype.exportServe': 'Sirve esa carpeta en la raíz de cualquier servidor de archivos estáticos (p. ej. python -m http.server) y ábrela: sin API, base de datos ni servidor de desarrollo.',
174
187
  'prototype.exportServeBase': 'Sirve esa carpeta en {base} de cualquier servidor de archivos estáticos y ábrela ahí: sin API, base de datos ni servidor de desarrollo.',
175
188
  'prototype.exportServeRelative': 'Sirve esa carpeta bajo cualquier ruta de cualquier servidor de archivos estáticos y ábrela ahí: sin API, base de datos ni servidor de desarrollo.',
189
+ 'prototype.milestoneFull': 'Un hito necesita cada escena dibujada en la matriz completa: toma un informe completo de este commit (ape prototype snapshot --full, que reutiliza lo que puede) y regístralo.',
176
190
  };
177
191
  /** The locale the prototype's words are shown in (also for the lists inside them). */
178
192
  export const locale = () => /^es(?:[-_.]|$)/i.test(process.env.LC_ALL || process.env.LANG || '') ? 'es' : 'en';
@@ -30,6 +30,10 @@ export declare function readMilestoneVersions(root: string, milestone: string, r
30
30
  fingerprint: string;
31
31
  role?: string | undefined;
32
32
  agent?: string | undefined;
33
+ ai?: {
34
+ model?: string | undefined;
35
+ reason: string;
36
+ } | undefined;
33
37
  }[];
34
38
  rule?: {
35
39
  kind: "one";
@@ -0,0 +1,5 @@
1
+ import type { Command } from 'commander';
2
+ import { type PruneResult } from './prune.ts';
3
+ /** The person's summary of a prune. */
4
+ export declare function pruneLine(result: PruneResult): string;
5
+ export declare function addPruneCommand(prototype: Command): void;
@@ -0,0 +1,25 @@
1
+ import { findRoot } from '../../project.js';
2
+ import { printJson } from '../json.js';
3
+ import { pruneSnapshots } from './prune.js';
4
+ import { pruneText } from './prune-words.js';
5
+ /** The person's summary of a prune. */
6
+ export function pruneLine(result) {
7
+ const count = result.removed.length;
8
+ if (count === 0)
9
+ return pruneText('prune.nothing');
10
+ const folders = result.removed.join(', ');
11
+ return pruneText(result.dryRun ? 'prune.wouldRemove' : 'prune.removed', { count, folders });
12
+ }
13
+ export function addPruneCommand(prototype) {
14
+ prototype
15
+ .command('prune')
16
+ .description(pruneText('prune.help'))
17
+ .option('--dry-run', pruneText('prune.dryRunHelp'))
18
+ .option('--json', pruneText('prune.jsonHelp'))
19
+ .action(async (flags) => {
20
+ const work = async () => pruneSnapshots(findRoot(), { dryRun: flags.dryRun === true });
21
+ if (flags.json)
22
+ return printJson(work);
23
+ console.log(pruneLine(await work()));
24
+ });
25
+ }
@@ -0,0 +1 @@
1
+ export declare const pruneText: (key: string, values?: Record<string, unknown>) => string;
@@ -0,0 +1,7 @@
1
+ // The words `ape prototype prune` prints, in the person's language.
2
+ import { createI18n } from '@buffcore/i18n';
3
+ import { en } from './prune.en.js';
4
+ import { es } from './prune.es.js';
5
+ const messages = createI18n({ catalogs: [{ en, es }] });
6
+ const locale = () => /^es(?:[-_.]|$)/i.test(process.env.LC_ALL || process.env.LANG || '') ? 'es' : 'en';
7
+ export const pruneText = (key, values) => messages.t(locale(), key, values);
@@ -0,0 +1,16 @@
1
+ /** Why a committed folder stays. */
2
+ export type KeptBecause = 'version' | 'newest' | 'head' | 'unsaved';
3
+ export interface PruneResult {
4
+ ok: true;
5
+ dryRun: boolean;
6
+ /** The folders removed (with `--dry-run`, the ones that would be), under `prototype/snapshots/`. */
7
+ removed: string[];
8
+ kept: {
9
+ folder: string;
10
+ because: KeptBecause;
11
+ }[];
12
+ }
13
+ /** Remove (or, with `dryRun`, list) the committed snapshot folders nothing needs. */
14
+ export declare function pruneSnapshots(root: string, { dryRun }?: {
15
+ dryRun?: boolean | undefined;
16
+ }): PruneResult;
@@ -0,0 +1,9 @@
1
+ export declare const en: {
2
+ 'prune.help': string;
3
+ 'prune.dryRunHelp': string;
4
+ 'prune.jsonHelp': string;
5
+ 'prune.unreadable': string;
6
+ 'prune.nothing': string;
7
+ 'prune.wouldRemove': string;
8
+ 'prune.removed': string;
9
+ };
@@ -0,0 +1,9 @@
1
+ export const en = {
2
+ 'prune.help': 'Remove committed snapshot folders no version names (keeps the newest, HEAD’s and unsaved ones); their history stays in git',
3
+ 'prune.dryRunHelp': 'list what would be removed, and remove nothing',
4
+ 'prune.jsonHelp': 'the result as JSON; exit 0 done, 2 could not run',
5
+ 'prune.unreadable': 'Could not read {file}: fix it, then prune again.',
6
+ 'prune.nothing': 'Nothing to remove: every committed snapshot folder is named by a version, the newest, HEAD’s or unsaved.',
7
+ 'prune.wouldRemove': '{count, plural, one {Would remove # snapshot folder} other {Would remove # snapshot folders}} no version names: {folders}. Run without --dry-run to remove them.',
8
+ 'prune.removed': '{count, plural, one {Removed # snapshot folder} other {Removed # snapshot folders}} no version names: {folders}. Commit the deletion: their history stays in git.',
9
+ };
@@ -0,0 +1,2 @@
1
+ import type { en } from './prune.en.ts';
2
+ export declare const es: typeof en;
@@ -0,0 +1,9 @@
1
+ export const es = {
2
+ 'prune.help': 'Quita las carpetas de capturas guardadas que ninguna versión nombra (conserva la más reciente, la de HEAD y las que tienen cambios sin guardar); su historial queda en git',
3
+ 'prune.dryRunHelp': 'lista lo que se quitaría, sin quitar nada',
4
+ 'prune.jsonHelp': 'el resultado en JSON; sale con 0 si terminó, 2 si no pudo ejecutarse',
5
+ 'prune.unreadable': 'No se pudo leer {file}: corrígelo y vuelve a ejecutar prune.',
6
+ 'prune.nothing': 'No hay nada que quitar: cada carpeta de capturas guardada la nombra una versión, es la más reciente, la de HEAD o tiene cambios sin guardar.',
7
+ 'prune.wouldRemove': '{count, plural, one {Se quitaría # carpeta de capturas} other {Se quitarían # carpetas de capturas}} que ninguna versión nombra: {folders}. Ejecuta sin --dry-run para quitarlas.',
8
+ 'prune.removed': '{count, plural, one {Se quitó # carpeta de capturas} other {Se quitaron # carpetas de capturas}} que ninguna versión nombra: {folders}. Guarda el borrado en un commit: su historial queda en git.',
9
+ };
@@ -0,0 +1,140 @@
1
+ // `ape prototype prune`: committed snapshot folders under `prototype/snapshots/` that no version
2
+ // names are dead weight (about 2 MB of data each), and git keeps them in history. Prune removes
3
+ // them from the working tree; the person commits the deletion. It keeps every folder a record in
4
+ // `prototype/versions/` (or `design/approval.json`) names by its source commit or its report's
5
+ // fingerprint, the newest committed snapshot, HEAD's, any folder with unsaved changes, and `comp/`.
6
+ import { createHash } from 'node:crypto';
7
+ import { existsSync, readdirSync, readFileSync, rmSync } from 'node:fs';
8
+ import { join } from 'node:path';
9
+ import { pruneText } from './prune-words.js';
10
+ import { git, gitBytes, snapshotsDir } from './report.js';
11
+ const SNAPSHOTS = 'prototype/snapshots/';
12
+ const HASH = /^[0-9a-f]{7,40}$/;
13
+ /** The commit-named folders git tracks under `prototype/snapshots/` (never `comp/`). */
14
+ function committedFolders(root) {
15
+ const listed = gitBytes(root, ['ls-files', '-z', '--', SNAPSHOTS]).toString('utf8');
16
+ const folders = new Set();
17
+ for (const path of listed.split('\0')) {
18
+ const [folder, file] = path.slice(SNAPSHOTS.length).split('/');
19
+ if (path.startsWith(SNAPSHOTS) && folder && file && HASH.test(folder))
20
+ folders.add(folder);
21
+ }
22
+ return [...folders].sort();
23
+ }
24
+ /** Every `commit` and `report` string anywhere in a record. */
25
+ function collect(value, into) {
26
+ if (Array.isArray(value))
27
+ for (const item of value)
28
+ collect(item, into);
29
+ else if (value && typeof value === 'object')
30
+ for (const [key, item] of Object.entries(value)) {
31
+ if (key === 'commit' && typeof item === 'string')
32
+ into.commits.add(item.toLowerCase());
33
+ else if (key === 'report' && typeof item === 'string')
34
+ into.reports.add(item);
35
+ else
36
+ collect(item, into);
37
+ }
38
+ }
39
+ /** The JSON files under a folder, at any depth. */
40
+ function jsonFiles(dir) {
41
+ if (!existsSync(dir))
42
+ return [];
43
+ return readdirSync(dir, { withFileTypes: true }).flatMap((entry) => {
44
+ const path = join(dir, entry.name);
45
+ if (entry.isDirectory())
46
+ return jsonFiles(path);
47
+ return entry.name.endsWith('.json') ? [path] : [];
48
+ });
49
+ }
50
+ /** What the records name: source commits and report fingerprints. A record that won't parse refuses. */
51
+ function references(root) {
52
+ const into = { commits: new Set(), reports: new Set() };
53
+ const files = jsonFiles(join(root, 'prototype', 'versions'));
54
+ const approval = join(root, 'design', 'approval.json');
55
+ if (existsSync(approval))
56
+ files.push(approval);
57
+ for (const file of files) {
58
+ try {
59
+ collect(JSON.parse(readFileSync(file, 'utf8')), into);
60
+ }
61
+ catch (cause) {
62
+ throw new Error(pruneText('prune.unreadable', { file }), { cause });
63
+ }
64
+ }
65
+ return into;
66
+ }
67
+ const readReport = (root, folder) => {
68
+ try {
69
+ return readFileSync(join(snapshotsDir(root), folder, 'report.json'));
70
+ }
71
+ catch {
72
+ return undefined;
73
+ }
74
+ };
75
+ const createdAt = (bytes) => {
76
+ try {
77
+ const at = JSON.parse(bytes?.toString('utf8') ?? '').createdAt;
78
+ return typeof at === 'string' ? at : '';
79
+ }
80
+ catch {
81
+ return '';
82
+ }
83
+ };
84
+ /** The folders under `prototype/snapshots/` with unsaved changes, as `git status` lists them. */
85
+ function unsavedFolders(root) {
86
+ const status = gitBytes(root, [
87
+ 'status',
88
+ '--porcelain=v1',
89
+ '-z',
90
+ '--no-renames',
91
+ '--',
92
+ SNAPSHOTS,
93
+ ]);
94
+ const prefix = `${git(root, ['rev-parse', '--show-prefix'])}${SNAPSHOTS}`;
95
+ const folders = new Set();
96
+ for (const entry of status.toString('utf8').split('\0')) {
97
+ const path = entry.slice(3);
98
+ if (path.startsWith(prefix))
99
+ folders.add(path.slice(prefix.length).split('/')[0] ?? '');
100
+ }
101
+ return folders;
102
+ }
103
+ /** Remove (or, with `dryRun`, list) the committed snapshot folders nothing needs. */
104
+ export function pruneSnapshots(root, { dryRun = false } = {}) {
105
+ const folders = committedFolders(root);
106
+ const { commits, reports } = references(root);
107
+ const head = git(root, ['rev-parse', 'HEAD']).toLowerCase();
108
+ const unsaved = unsavedFolders(root);
109
+ const bytes = new Map(folders.map((folder) => [folder, readReport(root, folder)]));
110
+ const newest = [...folders].sort((a, b) => createdAt(bytes.get(b)).localeCompare(createdAt(bytes.get(a))))[0];
111
+ const named = (folder) => {
112
+ const report = bytes.get(folder);
113
+ const digest = report && createHash('sha256').update(report).digest('hex');
114
+ return ((digest !== undefined && reports.has(digest)) ||
115
+ [...commits].some((commit) => commit.startsWith(folder) || folder.startsWith(commit)));
116
+ };
117
+ const because = (folder) => {
118
+ if (named(folder))
119
+ return 'version';
120
+ if (head.startsWith(folder))
121
+ return 'head';
122
+ if (unsaved.has(folder))
123
+ return 'unsaved';
124
+ if (folder === newest)
125
+ return 'newest';
126
+ return undefined;
127
+ };
128
+ const result = { ok: true, dryRun, removed: [], kept: [] };
129
+ for (const folder of folders) {
130
+ const kept = because(folder);
131
+ if (kept)
132
+ result.kept.push({ folder, because: kept });
133
+ else
134
+ result.removed.push(folder);
135
+ }
136
+ if (!dryRun)
137
+ for (const folder of result.removed)
138
+ rmSync(join(snapshotsDir(root), folder), { recursive: true, force: true });
139
+ return result;
140
+ }
@@ -0,0 +1,9 @@
1
+ declare const en: {
2
+ 'reopen.none': string;
3
+ 'reopen.help': string;
4
+ 'reopen.done': string;
5
+ 'reopen.aiMark': string;
6
+ 'reopen.host': string;
7
+ };
8
+ export declare const reopenT: (key: keyof typeof en, values?: Record<string, unknown>) => string;
9
+ export {};
@@ -0,0 +1,19 @@
1
+ // Words for reopening an AI approval (S4), in English and Spanish.
2
+ import { createI18n } from '@buffcore/i18n';
3
+ import { locale } from './messages.js';
4
+ const en = {
5
+ 'reopen.none': '{change} has no AI approval to reopen.',
6
+ 'reopen.help': 'Reopen an AI approval so the version waits for a person (a person only)',
7
+ 'reopen.done': '{change}: the AI approval is reopened; the version waits for a person.',
8
+ 'reopen.aiMark': ' (approved by AI, a person may reopen it)',
9
+ 'reopen.host': 'This host cannot reopen an AI approval from the studio. Ask whoever runs it.',
10
+ };
11
+ const es = {
12
+ 'reopen.none': '{change} no tiene una aprobación de IA que reabrir.',
13
+ 'reopen.help': 'Reabre una aprobación de IA para que la versión espere a una persona (solo una persona)',
14
+ 'reopen.done': '{change}: la aprobación de IA está reabierta; la versión espera a una persona.',
15
+ 'reopen.aiMark': ' (aprobada por IA, una persona puede reabrirla)',
16
+ 'reopen.host': 'Este servidor no puede reabrir una aprobación de IA desde el estudio. Pregunta a quien lo gestiona.',
17
+ };
18
+ const translator = createI18n({ catalogs: [{ en, es }] });
19
+ export const reopenT = (key, values) => translator.t(locale(), key, values);
@@ -1,6 +1,8 @@
1
1
  import type { Frame, Surface } from '@buffcore/config';
2
2
  import type { PrototypeProblem } from '@buffcore/contracts/prototype';
3
3
  import type { LoadFailure } from './scene-errors.ts';
4
+ import type { SelectorRecord } from './selector.ts';
5
+ import type { Matrix, MatrixReason } from './snapshot-matrix.ts';
4
6
  export interface SnapshotHint {
5
7
  scene: string;
6
8
  theme: string;
@@ -32,6 +34,14 @@ export interface SnapshotReport {
32
34
  api?: 'stand-in';
33
35
  themes: string[];
34
36
  locales: string[];
37
+ /** The looks the run drew (S3b): absent in an older report, which drew the full matrix. */
38
+ matrix?: Matrix;
39
+ /** Why it drew them: the default, `--full`, or a shared input changed since the last full report. */
40
+ matrixReason?: MatrixReason;
41
+ /** The shared inputs (F113c) of the last full report: this one's own when it is full. */
42
+ fullInputs?: string;
43
+ /** The selector's turns, picks with reasons, drops, or why it didn't run (S3c); absent: not asked. */
44
+ selector?: SelectorRecord;
35
45
  scenes: {
36
46
  key: string;
37
47
  title: string;
@@ -56,6 +66,10 @@ export interface SnapshotReport {
56
66
  scriptError?: LoadFailure;
57
67
  /** The ancestor snapshot's folder (its source commit). */
58
68
  reusedFrom?: string;
69
+ /** The looks this scene was drawn in (a reused scene keeps its own); absent: full. */
70
+ matrix?: Matrix;
71
+ /** The looks the selector added beyond the floor for this scene (S3c), `<theme>.<mode>.<locale>`. */
72
+ extraLooks?: string[];
59
73
  }[];
60
74
  /** The ancestor commit that holds the exact report used for every reused scene. */
61
75
  reuseReport?: string;
@@ -5,6 +5,7 @@ import { existsSync } from 'node:fs';
5
5
  import { readdir, readFile } from 'node:fs/promises';
6
6
  import { join } from 'node:path';
7
7
  import { hostGitBytes } from '../safe-git.js';
8
+ import { MISSES_FILE } from './selector-misses.js';
8
9
  import { recoverSnapshots } from './snapshot-storage.js';
9
10
  /** The scenes drawn again after a render error (a timeout leaves no line). */
10
11
  export const renderRetries = (scenes) => scenes.flatMap(({ key, retryError }) => (retryError ? [{ scene: key, error: retryError }] : []));
@@ -58,7 +59,10 @@ export function unsavedEntries(dir, output) {
58
59
  return gitBytes(dir, ['status', '--porcelain=v1', '-z', '--untracked-files=all', '--no-renames'])
59
60
  .toString('utf8')
60
61
  .split('\0')
61
- .filter((entry) => entry !== '' && !(entry.startsWith('?? ') && entry.slice(3).startsWith(output)));
62
+ .filter((entry) => entry !== '' &&
63
+ !(entry.startsWith('?? ') && entry.slice(3).startsWith(output)) &&
64
+ // The selector's misses (S3c) are learning, not work: committed or not, never unsaved.
65
+ entry.slice(3) !== `${output}${MISSES_FILE}`);
62
66
  }
63
67
  /** Refuse uncommitted changes: what follows must match the commit checked out. */
64
68
  export function requireCommitted(dir, why) {
@@ -0,0 +1,17 @@
1
+ import type { LayoutException, Scene } from '@buffcore/config';
2
+ import type { Theme } from '@buffcore/tokens';
3
+ import type { Page } from 'playwright-core';
4
+ import { type LayoutFinding } from './layout-hints.ts';
5
+ import type { SnapshotHint } from './report.ts';
6
+ /** A scene's layout hints in the report, at most: past this, its layout wants a look as a whole. */
7
+ export declare const MAX_LAYOUT_HINTS = 20;
8
+ /** True when the scene marks this finding as meant. */
9
+ export declare function setAside(finding: LayoutFinding, exceptions?: readonly LayoutException[]): boolean;
10
+ /** The finding in the reader's words. */
11
+ export declare function layoutDetail(scene: string, finding: LayoutFinding): string;
12
+ /** Measure the page as it shows `look` and add its new layout hints to the scene's `hints`. */
13
+ export declare function addLayoutHints(page: Page, scene: Scene, theme: Theme | undefined, look: {
14
+ theme: string;
15
+ mode: string;
16
+ locale: string;
17
+ }, hints: SnapshotHint[]): Promise<void>;