console fill: walk the whole form; the owner only reviews and presses the final button

App Privacy stopped at "now click Get Started yourself" and every page
asked the owner to click Next. The owner should not click what
storebound can safely do.

- Every button of every console form is classified (navigation,
  draft-save, final-submit) in FORM_BUTTONS (cli/lib/console-forms.ts),
  citing Apple's and Google's help pages. A scoped flow gate
  (flowAllowed) lets navigation through; the generic click gate stays
  absolute for field clicks.
- App Privacy: Get Started, Edit next to Data Types (never the Privacy
  Policy Edit), each data type / "Set Up <type>", Next, and the Save
  inside the questionnaire dialogs (a draft: Apple publishes only after
  Publish, per "Manage app privacy"). Each type's dialog may be one page
  or purposes > Next > linked > Next > tracking > Save. It ends with
  "review the summary, then press Publish yourself". Publish is never
  clicked.
- Play content rating and target audience: Next by itself. Save draft,
  Submit, the final Save, Create and Create app stay the owner's.
- An uncertain answer stops the walk on its page (outlined, "answer
  needed on ...") until the owner has set it; then it goes on.

Fixture apple-app-privacy-flow.html (first time, ?existing=1, decoys);
tests/console-flow.test.ts with the guardrail that no log line asks the
owner to click a navigation control.
This commit is contained in:
CRTkafa 2026-10-12 06:51:01 +08:00
parent b39e44e6ab
commit 8ffc83bb39
23 changed files with 662 additions and 56 deletions

View file

@ -54,7 +54,7 @@ These rules apply to every AI tool that uses storebound (skills, MCP server or t
- `skills/appstore-first-release/SKILL.md`: Step-by-step first (and later) App Store release of a mobile app or game - `skills/appstore-first-release/SKILL.md`: Step-by-step first (and later) App Store release of a mobile app or game
- `skills/aso-basics/SKILL.md`: App store optimization basics for a mobile app's or game's text - `skills/aso-basics/SKILL.md`: App store optimization basics for a mobile app's or game's text
- `skills/build-and-sign/SKILL.md`: Sign, build and upload a mobile app or game from the terminal - `skills/build-and-sign/SKILL.md`: Sign, build and upload a mobile app or game from the terminal
- `skills/console-autofill/SKILL.md`: AI-assisted autofill of App Store Connect and Google Play Console forms that have no API (the New App dialog, App Privacy, Play's Create app form, the Play IARC content rating questionnaire, Target audience and content plus the Ads declaration; the App Store age rating is shown as guidance because the API sets it) in a visible browser that reuses the owner's Chrome sign-in (or one they sign in to); storebound opens the form itself. Answers come only from storebound.config.ts; anything the config does not prove stays empty and highlighted. storebound never signs in, never saves, submits or publishes - `skills/console-autofill/SKILL.md`: AI-assisted autofill of App Store Connect and Google Play Console forms that have no API (the New App dialog, App Privacy, Play's Create app form, the Play IARC content rating questionnaire, Target audience and content plus the Ads declaration; the App Store age rating is shown as guidance because the API sets it) in a visible browser that reuses the owner's Chrome sign-in (or one they sign in to); storebound opens the form itself. Answers come only from storebound.config.ts; anything the config does not prove stays empty and highlighted. storebound moves through the pages itself (Next; App Privacy: Get Started, Edit, each data type and the draft Save) and never signs in, submits or publishes: the owner presses the final button
- `skills/export-compliance/SKILL.md`: Answer App Store export compliance (encryption) for a mobile app or game correctly - `skills/export-compliance/SKILL.md`: Answer App Store export compliance (encryption) for a mobile app or game correctly
- `skills/listing-localization/SKILL.md`: Translate the store listing of a mobile app or game into more languages - `skills/listing-localization/SKILL.md`: Translate the store listing of a mobile app or game into more languages
- `skills/migrate-from-fastlane/SKILL.md`: Move a mobile app or game from fastlane (deliver, supply, snapshot / screengrab, Appfile, Deliverfile) to storebound with `storebound import fastlane` - `skills/migrate-from-fastlane/SKILL.md`: Move a mobile app or game from fastlane (deliver, supply, snapshot / screengrab, Appfile, Deliverfile) to storebound with `storebound import fastlane`

View file

@ -56,7 +56,7 @@ These rules apply to every AI tool that uses storebound (skills, MCP server or t
| `appstore-first-release` | Step-by-step first (and later) App Store release of a mobile app or game | | `appstore-first-release` | Step-by-step first (and later) App Store release of a mobile app or game |
| `aso-basics` | App store optimization basics for a mobile app's or game's text | | `aso-basics` | App store optimization basics for a mobile app's or game's text |
| `build-and-sign` | Sign, build and upload a mobile app or game from the terminal | | `build-and-sign` | Sign, build and upload a mobile app or game from the terminal |
| `console-autofill` | AI-assisted autofill of App Store Connect and Google Play Console forms that have no API (the New App dialog, App Privacy, Play's Create app form, the Play IARC content rating questionnaire, Target audience and content plus the Ads declaration; the App Store age rating is shown as guidance because the API sets it) in a visible browser that reuses the owner's Chrome sign-in (or one they sign in to); storebound opens the form itself. Answers come only from storebound.config.ts; anything the config does not prove stays empty and highlighted. storebound never signs in, never saves, submits or publishes | | `console-autofill` | AI-assisted autofill of App Store Connect and Google Play Console forms that have no API (the New App dialog, App Privacy, Play's Create app form, the Play IARC content rating questionnaire, Target audience and content plus the Ads declaration; the App Store age rating is shown as guidance because the API sets it) in a visible browser that reuses the owner's Chrome sign-in (or one they sign in to); storebound opens the form itself. Answers come only from storebound.config.ts; anything the config does not prove stays empty and highlighted. storebound moves through the pages itself (Next; App Privacy: Get Started, Edit, each data type and the draft Save) and never signs in, submits or publishes: the owner presses the final button |
| `export-compliance` | Answer App Store export compliance (encryption) for a mobile app or game correctly | | `export-compliance` | Answer App Store export compliance (encryption) for a mobile app or game correctly |
| `listing-localization` | Translate the store listing of a mobile app or game into more languages | | `listing-localization` | Translate the store listing of a mobile app or game into more languages |
| `migrate-from-fastlane` | Move a mobile app or game from fastlane (deliver, supply, snapshot / screengrab, Appfile, Deliverfile) to storebound with `storebound import fastlane` | | `migrate-from-fastlane` | Move a mobile app or game from fastlane (deliver, supply, snapshot / screengrab, Appfile, Deliverfile) to storebound with `storebound import fastlane` |

View file

@ -55,7 +55,7 @@ These rules apply to every AI tool that uses storebound (skills, MCP server or t
- `skills/appstore-first-release/SKILL.md`: Step-by-step first (and later) App Store release of a mobile app or game - `skills/appstore-first-release/SKILL.md`: Step-by-step first (and later) App Store release of a mobile app or game
- `skills/aso-basics/SKILL.md`: App store optimization basics for a mobile app's or game's text - `skills/aso-basics/SKILL.md`: App store optimization basics for a mobile app's or game's text
- `skills/build-and-sign/SKILL.md`: Sign, build and upload a mobile app or game from the terminal - `skills/build-and-sign/SKILL.md`: Sign, build and upload a mobile app or game from the terminal
- `skills/console-autofill/SKILL.md`: AI-assisted autofill of App Store Connect and Google Play Console forms that have no API (the New App dialog, App Privacy, Play's Create app form, the Play IARC content rating questionnaire, Target audience and content plus the Ads declaration; the App Store age rating is shown as guidance because the API sets it) in a visible browser that reuses the owner's Chrome sign-in (or one they sign in to); storebound opens the form itself. Answers come only from storebound.config.ts; anything the config does not prove stays empty and highlighted. storebound never signs in, never saves, submits or publishes - `skills/console-autofill/SKILL.md`: AI-assisted autofill of App Store Connect and Google Play Console forms that have no API (the New App dialog, App Privacy, Play's Create app form, the Play IARC content rating questionnaire, Target audience and content plus the Ads declaration; the App Store age rating is shown as guidance because the API sets it) in a visible browser that reuses the owner's Chrome sign-in (or one they sign in to); storebound opens the form itself. Answers come only from storebound.config.ts; anything the config does not prove stays empty and highlighted. storebound moves through the pages itself (Next; App Privacy: Get Started, Edit, each data type and the draft Save) and never signs in, submits or publishes: the owner presses the final button
- `skills/export-compliance/SKILL.md`: Answer App Store export compliance (encryption) for a mobile app or game correctly - `skills/export-compliance/SKILL.md`: Answer App Store export compliance (encryption) for a mobile app or game correctly
- `skills/listing-localization/SKILL.md`: Translate the store listing of a mobile app or game into more languages - `skills/listing-localization/SKILL.md`: Translate the store listing of a mobile app or game into more languages
- `skills/migrate-from-fastlane/SKILL.md`: Move a mobile app or game from fastlane (deliver, supply, snapshot / screengrab, Appfile, Deliverfile) to storebound with `storebound import fastlane` - `skills/migrate-from-fastlane/SKILL.md`: Move a mobile app or game from fastlane (deliver, supply, snapshot / screengrab, Appfile, Deliverfile) to storebound with `storebound import fastlane`

View file

@ -55,7 +55,7 @@ These rules apply to every AI tool that uses storebound (skills, MCP server or t
| `appstore-first-release` | Step-by-step first (and later) App Store release of a mobile app or game | | `appstore-first-release` | Step-by-step first (and later) App Store release of a mobile app or game |
| `aso-basics` | App store optimization basics for a mobile app's or game's text | | `aso-basics` | App store optimization basics for a mobile app's or game's text |
| `build-and-sign` | Sign, build and upload a mobile app or game from the terminal | | `build-and-sign` | Sign, build and upload a mobile app or game from the terminal |
| `console-autofill` | AI-assisted autofill of App Store Connect and Google Play Console forms that have no API (the New App dialog, App Privacy, Play's Create app form, the Play IARC content rating questionnaire, Target audience and content plus the Ads declaration; the App Store age rating is shown as guidance because the API sets it) in a visible browser that reuses the owner's Chrome sign-in (or one they sign in to); storebound opens the form itself. Answers come only from storebound.config.ts; anything the config does not prove stays empty and highlighted. storebound never signs in, never saves, submits or publishes | | `console-autofill` | AI-assisted autofill of App Store Connect and Google Play Console forms that have no API (the New App dialog, App Privacy, Play's Create app form, the Play IARC content rating questionnaire, Target audience and content plus the Ads declaration; the App Store age rating is shown as guidance because the API sets it) in a visible browser that reuses the owner's Chrome sign-in (or one they sign in to); storebound opens the form itself. Answers come only from storebound.config.ts; anything the config does not prove stays empty and highlighted. storebound moves through the pages itself (Next; App Privacy: Get Started, Edit, each data type and the draft Save) and never signs in, submits or publishes: the owner presses the final button |
| `export-compliance` | Answer App Store export compliance (encryption) for a mobile app or game correctly | | `export-compliance` | Answer App Store export compliance (encryption) for a mobile app or game correctly |
| `listing-localization` | Translate the store listing of a mobile app or game into more languages | | `listing-localization` | Translate the store listing of a mobile app or game into more languages |
| `migrate-from-fastlane` | Move a mobile app or game from fastlane (deliver, supply, snapshot / screengrab, Appfile, Deliverfile) to storebound with `storebound import fastlane` | | `migrate-from-fastlane` | Move a mobile app or game from fastlane (deliver, supply, snapshot / screengrab, Appfile, Deliverfile) to storebound with `storebound import fastlane` |

View file

@ -114,7 +114,7 @@ pub const NEW_FOLDER_METHODS: &[&str] = &["project.init", "import.fastlane"];
/// closes it. `write_with_confirm` shows its answers and this note instead of a dry-run log; a cancel (`job_cancel`) /// closes it. `write_with_confirm` shows its answers and this note instead of a dry-run log; a cancel (`job_cancel`)
/// stops the command, which closes the browser. /// stops the command, which closes the browser.
pub const CONSOLE_FILL: &str = "console.fill"; pub const CONSOLE_FILL: &str = "console.fill";
pub const CONSOLE_FILL_NOTE: &str = "Console pages change. This is AI-assisted: review every field in the browser and press Save yourself. storebound never saves, submits or publishes."; pub const CONSOLE_FILL_NOTE: &str = "Console pages change. This is AI-assisted: review every field in the browser and press the final button (Publish, Submit, Save or Create) yourself. storebound moves through the pages for you and never submits or publishes; App Privacy answers stay a draft until you press Publish.";
/// Reads that are never kept in the offline cache (big: one rendered image as a data: URL). /// Reads that are never kept in the offline cache (big: one rendered image as a data: URL).
pub const NO_CACHE_METHODS: &[&str] = &["project.render"]; pub const NO_CACHE_METHODS: &[&str] = &["project.render"];

View file

@ -1298,7 +1298,7 @@ export const en = {
'cf.playAppRecord': 'Play app (Create app)', 'cf.playAppRecord': 'Play app (Create app)',
'cf.dryFailed': 'Could not prepare {form}', 'cf.dryFailed': 'Could not prepare {form}',
'cf.panelTitle': 'Fill in console: {form}', 'cf.panelTitle': 'Fill in console: {form}',
'cf.disclaimer': 'Console pages change. This is AI-assisted: review every field in the browser and press Save yourself. storebound never saves, submits or publishes.', 'cf.disclaimer': 'Console pages change. This is AI-assisted: review every field in the browser and press the final button (Publish, Submit, Save or Create) yourself. storebound moves through the pages for you and never submits or publishes; App Privacy answers stay a draft until you press Publish.',
'cf.notOpened': 'You chose Cancel in the dialog: no browser was opened.', 'cf.notOpened': 'You chose Cancel in the dialog: no browser was opened.',
'cf.runningText': 'The browser is open with your Chrome sign-in (if it asks, sign in there yourself). storebound opens the form, fills the fields and marks the ones you answer. Review every field, press Save yourself, then close the browser.', 'cf.runningText': 'The browser is open with your Chrome sign-in (if it asks, sign in there yourself). storebound opens the form, fills the fields and marks the ones you answer. Review every field, press Save yourself, then close the browser.',
'cf.doneText': 'Browser closed. Filled: {filled}, marked for you: {highlighted}. Check in the console that your answers are saved.', 'cf.doneText': 'Browser closed. Filled: {filled}, marked for you: {highlighted}. Check in the console that your answers are saved.',

View file

@ -1300,7 +1300,7 @@ export const tr: Record<keyof typeof en, string> = {
'cf.playAppRecord': 'Play uygulaması (Uygulama oluştur)', 'cf.playAppRecord': 'Play uygulaması (Uygulama oluştur)',
'cf.dryFailed': '{form} hazırlanamadı', 'cf.dryFailed': '{form} hazırlanamadı',
'cf.panelTitle': 'Konsolda doldur: {form}', 'cf.panelTitle': 'Konsolda doldur: {form}',
'cf.disclaimer': 'Konsol sayfaları değişebilir. Bu, yapay zekâ destekli bir yardımdır: tarayıcıda her alanı kontrol edin ve Kaydet\'e kendiniz basın. storebound hiçbir zaman kaydetmez, göndermez veya yayınlamaz.', 'cf.disclaimer': 'Konsol sayfaları değişebilir. Bu, yapay zekâ destekli bir yardımdır: tarayıcıda her alanı kontrol edin ve son düğmeye (Yayınla, Gönder, Kaydet veya Oluştur) kendiniz basın. storebound sayfalar arasında sizin yerinize ilerler, hiçbir zaman göndermez veya yayınlamaz; Uygulama Gizliliği yanıtları siz Yayınla\'ya basana kadar taslak kalır.',
'cf.notOpened': 'İletişim kutusunda Vazgeç\'i seçtiniz: tarayıcı açılmadı.', 'cf.notOpened': 'İletişim kutusunda Vazgeç\'i seçtiniz: tarayıcı açılmadı.',
'cf.runningText': 'Tarayıcı Chrome oturumunuzla açık (isterse orada kendiniz oturum açın). storebound formu açar, alanları doldurur ve yanıtı size kalanları işaretler. Her alanı kontrol edin, Kaydet\'e kendiniz basın ve ardından tarayıcıyı kapatın.', 'cf.runningText': 'Tarayıcı Chrome oturumunuzla açık (isterse orada kendiniz oturum açın). storebound formu açar, alanları doldurur ve yanıtı size kalanları işaretler. Her alanı kontrol edin, Kaydet\'e kendiniz basın ve ardından tarayıcıyı kapatın.',
'cf.doneText': 'Tarayıcı kapandı. Doldurulan: {filled}, sizin için işaretlenen: {highlighted}. Yanıtlarınızın kaydedildiğini konsolda kontrol edin.', 'cf.doneText': 'Tarayıcı kapandı. Doldurulan: {filled}, sizin için işaretlenen: {highlighted}. Yanıtlarınızın kaydedildiğini konsolda kontrol edin.',

View file

@ -2,7 +2,7 @@
// content rating, target audience). Click -> dry run of `console.fill` (the answers from the config, nothing opens) -> this // content rating, target audience). Click -> dry run of `console.fill` (the answers from the config, nothing opens) -> this
// panel lists them, the uncertain ones marked for the owner, with the disclaimer -> "Open the browser" goes through // panel lists them, the uncertain ones marked for the owner, with the disclaimer -> "Open the browser" goes through
// write_with_confirm (the host shows the answers again in a native dialog and mints the token only on its button) -> // write_with_confirm (the host shows the answers again in a native dialog and mints the token only on its button) ->
// a visible browser the owner signs in to; storebound fills the fields and never saves, submits or publishes. The run // a visible browser the owner signs in to; storebound fills the fields, moves through the pages and never submits or publishes. The run
// lasts until the owner closes that browser; Cancel here stops the command, which closes it. // lasts until the owner closes that browser; Cancel here stops the command, which closes it.
import { type KeyboardEvent, useEffect, useRef, useState } from 'react'; import { type KeyboardEvent, useEffect, useRef, useState } from 'react';
import { api, type ConsoleFillResult, type ConsoleForm, errorText, newJob, onProgress, type Project, type ToolResult } from '../api'; import { api, type ConsoleFillResult, type ConsoleForm, errorText, newJob, onProgress, type Project, type ToolResult } from '../api';

View file

@ -29,7 +29,7 @@ import { join } from 'node:path';
import type { Ctx } from '../lib/ctx'; import type { Ctx } from '../lib/ctx';
import { type Answer, type ConsoleResult, consoleResult, DISCLAIMER, FORM_IDS, type FormId, fillValue, formMeta, isForm, valueText } from '../lib/console-answers'; import { type Answer, type ConsoleResult, consoleResult, DISCLAIMER, FORM_IDS, type FormId, fillValue, formMeta, isForm, valueText } from '../lib/console-answers';
import type { ShipConfig } from '../lib/config'; import type { ShipConfig } from '../lib/config';
import { ALL_APPS, consoleReached, CREATE_FORM_FIELD, createAppAllowed, type FieldDef, type FormDef, formDef, FORM_OPENERS, forbiddenControl, hasToken, isSignInText, isSignInUrl, type Name, navAllowed, type NavBases, type NavStep, navPlan } from '../lib/console-forms'; import { ALL_APPS, APP_PRIVACY_HEADING, consoleReached, CREATE_FORM_FIELD, createAppAllowed, DATA_TYPES_HEADING, type FieldDef, FLOW_NAMES, flowAllowed, flowClass, type FlowWhere, type FormDef, formDef, FORM_OPENERS, forbiddenControl, hasToken, isSignInText, isSignInUrl, type Name, navAllowed, type NavBases, type NavStep, navPlan } from '../lib/console-forms';
import { log, printJson, warn } from '../lib/log'; import { log, printJson, warn } from '../lib/log';
import { openAcross, withAccountIds } from './accounts'; import { openAcross, withAccountIds } from './accounts';
import { appleAppId, withAppleAppId } from './app-id'; import { appleAppId, withAppleAppId } from './app-id';
@ -122,6 +122,10 @@ export async function highlight(loc: Locator, text = CHECK): Promise<void> {
const box = (el.tagName === 'INPUT' && el.closest('label')) || el; const box = (el.tagName === 'INPUT' && el.closest('label')) || el;
if (box.getAttribute('data-storebound-check')) return; if (box.getAttribute('data-storebound-check')) return;
box.setAttribute('data-storebound-check', '1'); box.setAttribute('data-storebound-check', '1');
// the owner answering it (a click, a choice, typing) is what the flow waits for before it moves on
const answered = () => { box.setAttribute('data-storebound-answered', '1'); el.setAttribute('data-storebound-answered', '1'); };
el.addEventListener('change', answered);
el.addEventListener('input', answered);
box.style.outline = '3px solid #d93025'; box.style.outline = '3px solid #d93025';
box.style.outlineOffset = '2px'; box.style.outlineOffset = '2px';
const s = el.ownerDocument.createElement('span'); const s = el.ownerDocument.createElement('span');
@ -173,6 +177,10 @@ export interface FillStep {
/** Fields of the section that could not be located (UI change) -> fallback. */ /** Fields of the section that could not be located (UI change) -> fallback. */
missing: string[]; missing: string[];
fallback: boolean; fallback: boolean;
/** A control of the filled section (the flow finds its dialog and its Next / Save from it). */
anchor?: Locator;
/** Per uncertain answer (agreements left out), its outlined controls: the flow waits until the owner set each one. */
pending?: Locator[][];
} }
/** /**
@ -193,24 +201,29 @@ export async function fillPage(page: Page, def: FormDef, answers: Answer[], done
} }
const rs: Resolved[] = []; const rs: Resolved[] = [];
for (const f of sec.fields) rs.push(await resolve(root, f)); for (const f of sec.fields) rs.push(await resolve(root, f));
if (!sec.dialog && !rs.some(r => r.seen)) continue; if ((!sec.dialog || sec.page) && !rs.some(r => r.seen)) continue;
const missing = rs.filter(r => !r.ok).map(r => r.field.id); const missing = rs.filter(r => !r.ok).map(r => r.field.id);
// only when no field of the section can be found is it a UI change; otherwise fill what was found and leave the // only when no field of the section can be found is it a UI change; otherwise fill what was found and leave the
// missing fields to the owner (reported as "check") // missing fields to the owner (reported as "check")
// (a page still loading can also miss a field for a moment: the caller retries before it passes partial = true) // (a page still loading can also miss a field for a moment: the caller retries before it passes partial = true)
if (missing.length && (!partial || missing.length === rs.length)) return { section: i, title: sec.title, filled: [], highlighted: [], missing, fallback: true }; if (missing.length && (!partial || missing.length === rs.length)) return { section: i, title: sec.title, filled: [], highlighted: [], missing, fallback: true };
const filled: string[] = [], highlighted: string[] = [...missing]; const filled: string[] = [], highlighted: string[] = [...missing], pending: Locator[][] = [];
let anchor: Locator | undefined;
for (const r of rs) { for (const r of rs) {
if (!r.ok) continue; if (!r.ok) continue;
anchor ??= r.loc ?? Object.values(r.options ?? {})[0];
const a = byId.get(r.field.id); const a = byId.get(r.field.id);
if (!a) continue; if (!a) continue;
// an agreement is never ticked, whatever the answer says: highlighted for the owner // an agreement is never ticked, whatever the answer says: highlighted for the owner
if (r.field.agreement || a.agreement) { await mark(r, 'storebound: you agree to this, never ticked'); highlighted.push(a.id); continue; } if (r.field.agreement || a.agreement) { await mark(r, 'storebound: you agree to this, never ticked'); highlighted.push(a.id); continue; }
const set = a.certain && a.value !== null ? await setField(r, a.value) : false; const set = a.certain && a.value !== null ? await setField(r, a.value) : false;
if (set) { filled.push(a.id); if (a.ownerCheck) await mark(r, 'storebound: owner check'); } else { await mark(r); highlighted.push(a.id); } if (set) { filled.push(a.id); if (a.ownerCheck) await mark(r, 'storebound: owner check'); } else {
await mark(r); highlighted.push(a.id);
pending.push(r.loc ? [r.loc] : Object.values(r.options ?? {}));
}
} }
done.add(i); done.add(i);
return { section: i, title: sec.title, filled, highlighted, missing, fallback: false }; return { section: i, title: sec.title, filled, highlighted, missing, fallback: false, ...(anchor ? { anchor } : {}), pending };
} }
return { section: null, filled: [], highlighted: [], missing: [], fallback: false }; return { section: null, filled: [], highlighted: [], missing: [], fallback: false };
} }
@ -281,6 +294,66 @@ export async function createAppHere(loc: Locator, name: string, role: string): P
return createAppAllowed(name, role, { appList, formOpen, inForm }); return createAppAllowed(name, role, { appList, formOpen, inForm });
} }
// ---- walking a form: Next between pages, App Privacy's openers and its draft Save (console-forms.ts FORM_BUTTONS) ----
/** Where a control sits: in a dialog, in App Privacy's Data Types section, on the App Privacy page. Read-only. */
export async function flowWhere(loc: Locator, dataTypes: string[]): Promise<FlowWhere> {
const page: Page = loc.page();
const privacyPage = (await findAny(page, ['heading'], APP_PRIVACY_HEADING)).state !== 'none';
const dt = DATA_TYPES_HEADING.filter((n): n is string => typeof n === 'string');
const r: { inDialog: boolean; inDataTypes: boolean } = await loc.evaluate((el: any, names: string[]) => {
const inDialog = !!el.closest('[role="dialog"], dialog');
let inDataTypes = false;
// the nearest container around the control that has a heading decides: its first heading is "Data Types"
for (let a = el.parentElement; a && a !== el.ownerDocument.body; a = a.parentElement) {
const h = a.querySelector('h1, h2, h3, h4, h5, h6, [role="heading"]');
if (!h) continue;
inDataTypes = names.includes((h.textContent ?? '').trim().replace(/\s+/g, ' '));
break;
}
return { inDialog, inDataTypes };
}, dt);
return { privacyPage, dataTypes, ...r };
}
/**
* The flow click gate (flowAllowed): a navigation control of the form, or App Privacy's in-dialog Save (a draft, public
* only after the owner's Publish). Reads the real name, role and place of the control; logs the click.
*/
export async function flowClick(loc: Locator, form: FormId, dataTypes: string[], say: (m: string) => void): Promise<boolean> {
const name = await accName(loc), role = await realRole(loc);
const where = await flowWhere(loc, dataTypes);
if (!flowAllowed(form, name, role, where)) { warn(TAG, `not clicking "${name}": only the owner presses it`); return false; }
await loc.click();
say(`clicked "${name}" (${flowClass(form, name, role, where)})`);
return true;
}
/** Visible controls named like `names` (buttons and links) that sit where `ok` says; the one match, or null. */
async function controlWhere(root: Locator, names: Name[], ok: (w: FlowWhere) => boolean, dataTypes: string[]): Promise<Locator | null> {
const hits: Locator[] = [];
for (const role of ['button', 'link']) {
for (const n of names) {
const all = vis(root.getByRole(role, nameOpts(n)));
const c = await all.count();
for (let i = 0; i < c; i++) { const l = all.nth(i); if (ok(await flowWhere(l, dataTypes))) hits.push(l); }
}
}
return hits.length === 1 ? hits[0]! : null;
}
/** Every outlined control of each uncertain answer has been set by the owner (a click, a choice, typing). Read-only. */
async function answered(pending: Locator[][]): Promise<boolean> {
for (const field of pending) {
let any = false;
for (const l of field) {
if (await l.evaluate((el: any) => el.getAttribute('data-storebound-answered') === '1' || (el.closest('label')?.getAttribute('data-storebound-answered') === '1')).catch(() => false)) { any = true; break; }
}
if (!any) return false;
}
return true;
}
export interface NavResult { export interface NavResult {
ok: boolean; ok: boolean;
/** Labels of the steps done (["already open"] when the form was already on the page). */ /** Labels of the steps done (["already open"] when the form was already on the page). */
@ -563,7 +636,9 @@ export interface FillSessionOpts {
* 3. a step not found -> the printed steps, and storebound keeps watching: a sign-in page that goes away -> from step * 3. a step not found -> the printed steps, and storebound keeps watching: a sign-in page that goes away -> from step
* 1; the owner moving on by hand (the + button, the New App menu item, the app in the list appear) -> from that step * 1; the owner moving on by hand (the + button, the New App menu item, the app in the list appear) -> from that step
* (resumeAt); the owner opening the form -> it is filled. * (resumeAt); the owner opening the form -> it is filled.
* 4. fills section by section as the owner moves through the form; never saves, submits or publishes. * 4. fills section by section and moves on by itself: Next (App Privacy: Get Started / Edit next to Data Types, each
* data type, and the draft Save of its dialogs). An uncertain answer stops it on that page until the owner set it.
* The final button (Publish, Submit, Save, Create) and agreements stay the owner's.
*/ */
export async function fillSession(b: ConsoleBrowser, o: FillSessionOpts): Promise<{ filled: number; highlighted: number; fallback: boolean }> { export async function fillSession(b: ConsoleBrowser, o: FillSessionOpts): Promise<{ filled: number; highlighted: number; fallback: boolean }> {
const { form, config, say, startUrl } = o; const { form, config, say, startUrl } = o;
@ -622,7 +697,7 @@ export async function fillSession(b: ConsoleBrowser, o: FillSessionOpts): Promis
} }
let tried = ''; let tried = '';
const report = (r: NavResult, first: boolean) => { const report = (r: NavResult, first: boolean) => {
if (r.ok) { if (meta.then) say(`now click ${meta.then} yourself; storebound fills the form when it appears`); return; } if (r.ok) return; // the form (App Privacy: its page) is open; the flow below goes on from there
if (r.signIn) return; if (r.signIn) return;
// refused / ambiguous: not retried on this page; "not found" / "did not appear" is retried when the step shows up // refused / ambiguous: not retried on this page; "not found" / "did not appear" is retried when the step shows up
if (!/^(not found|did not appear)$/.test(r.why ?? '')) tried = `${(active() ?? b.page).url()}#${plan.findIndex(s => s.label === r.failed)}`; if (!/^(not found|did not appear)$/.test(r.why ?? '')) tried = `${(active() ?? b.page).url()}#${plan.findIndex(s => s.label === r.failed)}`;
@ -646,7 +721,74 @@ export async function fillSession(b: ConsoleBrowser, o: FillSessionOpts): Promis
else for (const s of meta.open) say(`open the form: ${s}`); else for (const s of meta.open) say(`open the form: ${s}`);
const last = def.sections.length - 1; const last = def.sections.length - 1;
const finished = () => done.size === def.sections.length || (form !== 'apple-app-privacy' && done.has(last)); const privacy = form === 'apple-app-privacy';
/** App Privacy: the data types storebound answers (their entries in the Data Types section open their questions). */
const dataTypes = [...new Set(def.sections.map(x => x.type).filter((t): t is string => !!t))];
/** The page was filled: its Next (App Privacy: Next, else the dialog's draft Save) is clicked when nothing waits. */
let pendingAdvance = false;
/** A control of the last filled section (its dialog / page holds the Next or Save to press). */
let anchor: Locator | undefined;
/** Uncertain answers on the page: storebound stops here until the owner set them (never clicks Next past them). */
let waitFor: { title: string; pending: Locator[][] } | null = null;
/** App Privacy openers clicked (each at most twice: a click that opens nothing is a UI change). */
const opened = new Map<string, number>();
let askedCollects = false;
const finished = () => !pendingAdvance && !waitFor && (done.size === def.sections.length || (!privacy && done.has(last)));
/** The dialog of the last filled section when it is still visible, else null. */
const anchorDialog = async (): Promise<Locator | null> => {
if (!anchor) return null;
const d = vis(anchor.locator('xpath=ancestor-or-self::*[@role="dialog" or local-name()="dialog"][1]'));
return (await d.count().catch(() => 0)) === 1 ? d : null;
};
/** The Next of the page (App Privacy: of the questionnaire dialog). */
const nextControl = async (p: Page): Promise<Locator | null> => {
const d = await anchorDialog();
if (privacy && !d) return null;
return controlWhere(d ?? p, FLOW_NAMES.next, w => !privacy || w.inDialog, dataTypes);
};
/** Moves on after a filled page: Next, else (App Privacy) the dialog's draft Save. true when something was clicked. */
async function advance(p: Page): Promise<boolean> {
const next = await nextControl(p);
if (next) return flowClick(next, form, dataTypes, say);
const d = privacy ? await anchorDialog() : null;
if (!d) return false;
const save = await controlWhere(d, FLOW_NAMES.save, w => w.inDialog && w.privacyPage, dataTypes);
return save ? flowClick(save, form, dataTypes, say) : false;
}
/** App Privacy with no dialog open: opens the next part (Get Started, Edit next to Data Types, the next data type). */
async function privacyStep(p: Page): Promise<void> {
if (await vis(p.getByRole('dialog')).count() > 0) return; // a dialog is open: it is filled, or the owner works in it
if ((await findAny(p, ['heading'], APP_PRIVACY_HEADING)).state === 'none') return;
const open = async (key: string, what: string, loc: Locator | null): Promise<void> => {
if (!loc) return;
const n = opened.get(key) ?? 0;
if (n === 2) { opened.set(key, 3); warn(TAG, `${what} did not open after two clicks: the console UI may have changed. Open it yourself; storebound fills it when it appears`); }
if (n >= 2) return;
opened.set(key, n + 1);
await flowClick(loc, form, dataTypes, say);
};
const editTypes = () => controlWhere(p, FLOW_NAMES.edit, w => w.inDataTypes && !w.inDialog, dataTypes);
if (!done.has(0)) {
const start = await controlWhere(p, FLOW_NAMES.getStarted, w => w.privacyPage && !w.inDialog, dataTypes);
if (start) return open('get-started', 'Get Started', start);
const edit = await editTypes();
if (!edit) return;
const c = pageAnswers.find(x => x.id === 'collects');
if (!(c?.certain && c.value === true)) {
if (!askedCollects) { askedCollects = true; say(`answer needed: ${c?.label ?? 'Data collection'} (the page lists data types, the config does not prove the answer is yes)`); }
return;
}
done.add(0);
say('Data collection was answered before (the page lists data types): storebound opens the data types with Edit');
return open('edit', 'Edit next to Data Types', edit);
}
const typesAt = def.sections.findIndex(x => x.title === 'Data types');
if (typesAt >= 0 && !done.has(typesAt)) return open('edit-types', 'Edit next to Data Types', await editTypes());
const t = def.sections.find((x, i) => x.type && !done.has(i))?.type;
if (t) return open(`type:${t}`, t, await controlWhere(p, [t, `Set Up ${t}`, `${t} ayarla`], w => w.inDataTypes && !w.inDialog, dataTypes));
}
let signedOut = false, misses = 0, firstMiss = 0; let signedOut = false, misses = 0, firstMiss = 0;
while (!b.isClosed() && !finished()) { while (!b.isClosed() && !finished()) {
const p = active(); const p = active();
@ -694,11 +836,33 @@ export async function fillSession(b: ConsoleBrowser, o: FillSessionOpts): Promis
} }
filled += s.filled.length; highlighted += s.highlighted.length; filled += s.filled.length; highlighted += s.highlighted.length;
say(`${s.title}: filled ${s.filled.length}, check ${s.highlighted.length}${s.highlighted.length ? `: ${s.highlighted.map(id => labels.get(id) ?? id).join('; ')}` : ''}`); say(`${s.title}: filled ${s.filled.length}, check ${s.highlighted.length}${s.highlighted.length ? `: ${s.highlighted.map(id => labels.get(id) ?? id).join('; ')}` : ''}`);
if (!finished()) say('review this page, then click Next (or open the next part) yourself; storebound fills it when it appears'); anchor = s.anchor;
// the last page of a Play / App Store form without a Next ends the run: its button is the owner's (Save, Submit, Create)
const ends = !privacy && s.section === last && !await nextControl(p).catch(() => null);
pendingAdvance = !ends;
const open = ends ? [] : (s.pending ?? []);
waitFor = open.length ? { title: s.title ?? '', pending: open } : null;
if (waitFor) {
const need = s.highlighted.filter(id => !pageAnswers.find(a => a.id === id)?.agreement);
say(`answer needed on "${s.title}": ${need.map(id => labels.get(id) ?? id).join('; ')}. Answer ${need.length === 1 ? 'it' : 'each one'} in the browser (outlined in red); storebound goes on by itself once every outlined answer is set (a box that stays empty: click it twice)`);
}
continue; // more of the form may be on this page
} }
if (waitFor) {
if (!await answered(waitFor.pending)) { await Bun.sleep(tick); continue; }
say(`"${waitFor.title}" answered: storebound goes on`);
waitFor = null;
}
if (pendingAdvance) {
pendingAdvance = false;
if (await advance(p).catch(() => false)) { await Bun.sleep(tick); continue; }
}
if (privacy) await privacyStep(p).catch(() => { /* navigating */ });
await Bun.sleep(tick); await Bun.sleep(tick);
} }
if (!b.isClosed() && !fallback) say(`review every field and press ${meta.stopBefore} yourself. storebound never saves, submits or publishes. Close the window when done.`); if (!b.isClosed() && !fallback) say(privacy
? 'review the summary, then press Publish yourself. storebound saved the answers as a draft (Save in each dialog); nothing is public until you press Publish. Close the window when done.'
: `review every field and press ${meta.stopBefore} yourself. storebound never saves, submits or publishes. Close the window when done.`);
else if (!b.isClosed()) say('close the browser window when done'); else if (!b.isClosed()) say('close the browser window when done');
await b.closed; await b.closed;
return { filled, highlighted, fallback }; return { filled, highlighted, fallback };

View file

@ -39,8 +39,6 @@ export interface FormMeta {
id: FormId; store: Store; title: string; url: string; id: FormId; store: Store; title: string; url: string;
/** What the owner clicks to open the form when storebound cannot open it itself (a navigation step was not found). */ /** What the owner clicks to open the form when storebound cannot open it itself (a navigation step was not found). */
open: string[]; open: string[];
/** What the owner still clicks after storebound opened the page (a control the click gate refuses, e.g. Get Started). */
then?: string;
/** The control storebound stops before; the owner presses it. */ /** The control storebound stops before; the owner presses it. */
stopBefore: string; stopBefore: string;
/** false: no page filling at all, guidance only (the API covers it). */ /** false: no page filling at all, guidance only (the API covers it). */
@ -54,7 +52,7 @@ export interface ConsoleResult { form: FormId; store: Store; title: string; url:
export const DISCLAIMER = [ export const DISCLAIMER = [
'storebound console fill is AI-assisted autofill. Console pages change without notice and it may misplace an answer.', 'storebound console fill is AI-assisted autofill. Console pages change without notice and it may misplace an answer.',
'Review every field yourself. storebound never saves, submits or publishes: you press the final button.', 'Review every field yourself. storebound never submits or publishes: you press the final button (App Privacy: storebound saves the answers as a draft, public only when you press Publish).',
'storebound never types passwords or touches sign-in pages: you sign in in the browser window yourself.', 'storebound never types passwords or touches sign-in pages: you sign in in the browser window yourself.',
]; ];
@ -73,8 +71,7 @@ export function formMeta(id: FormId, config: ShipConfig): FormMeta {
case 'apple-age-rating': return { id, store: 'apple', title: 'App Store Connect: Age Ratings', url: app, stopBefore: 'Save', fillable: false, case 'apple-age-rating': return { id, store: 'apple', title: 'App Store Connect: Age Ratings', url: app, stopBefore: 'Save', fillable: false,
open: ['General > App Information > Age Ratings > Set Up Age Ratings (only to look: `storebound apple appinfo` sets it)'] }; open: ['General > App Information > Age Ratings > Set Up Age Ratings (only to look: `storebound apple appinfo` sets it)'] };
case 'apple-app-privacy': return { id, store: 'apple', title: 'App Store Connect: App Privacy', url: privacy, stopBefore: 'Publish', fillable: true, case 'apple-app-privacy': return { id, store: 'apple', title: 'App Store Connect: App Privacy', url: privacy, stopBefore: 'Publish', fillable: true,
open: [...(config.apple?.appId ? [] : ['Apps > your app (set apple.appId so storebound opens it directly)']), 'App Privacy in the sidebar > Get Started (or Edit next to Data Types)'], open: [...(config.apple?.appId ? [] : ['Apps > your app (set apple.appId so storebound opens it directly)']), 'App Privacy in the sidebar (storebound clicks Get Started, or Edit next to Data Types, and walks the questionnaire itself)'] };
then: 'Get Started (or Edit next to Data Types)' };
case 'play-app-record': return { id, store: 'play', title: 'Play Console: Create app', url: PLAY, stopBefore: 'Create app', fillable: true, case 'play-app-record': return { id, store: 'play', title: 'Play Console: Create app', url: PLAY, stopBefore: 'Create app', fillable: true,
open: ['Pick the developer account if Play Console asks (play.developerId or play.developerAccount picks it)', 'Home (All apps) > Create app'], open: ['Pick the developer account if Play Console asks (play.developerId or play.developerAccount picks it)', 'Home (All apps) > Create app'],
notes: [ notes: [
@ -311,7 +308,7 @@ export function guidance(meta: FormMeta, answers: Answer[]): string[] {
g.push(...meta.open.map(o => `Open: ${o}`)); g.push(...meta.open.map(o => `Open: ${o}`));
for (const a of answers) g.push(`${a.label}: ${a.agreement ? 'you tick it (an agreement; storebound never does)' : valueText(a)}${a.certain && !a.ownerCheck ? '' : ` (check: ${a.note ?? 'not in the config'})`}`); for (const a of answers) g.push(`${a.label}: ${a.agreement ? 'you tick it (an agreement; storebound never does)' : valueText(a)}${a.certain && !a.ownerCheck ? '' : ` (check: ${a.note ?? 'not in the config'})`}`);
g.push(...(meta.notes ?? []).map(n => `Note: ${n}`)); g.push(...(meta.notes ?? []).map(n => `Note: ${n}`));
g.push(meta.fillable ? `Review every field, then press ${meta.stopBefore} yourself. storebound never saves, submits or publishes.` : 'Answers marked "check" are yours to confirm in storebound.config.ts (apple.info.ageRating).'); g.push(meta.fillable ? `Review every field, then press ${meta.stopBefore} yourself. ${meta.id === 'apple-app-privacy' ? 'storebound saves the answers only as a draft (Save in each dialog); nothing is public before Publish.' : 'storebound never saves, submits or publishes.'}` : 'Answers marked "check" are yours to confirm in storebound.config.ts (apple.info.ageRating).');
return g; return g;
} }

View file

@ -1,7 +1,8 @@
// Where each answer of a console form lives on the page, as accessible names only (role + name / label), never CSS // Where each answer of a console form lives on the page, as accessible names only (role + name / label), never CSS
// paths: `storebound console fill` locates every field of a section first and falls back to printed guidance when one // paths: `storebound console fill` locates every field of a section first and falls back to printed guidance when one
// is missing or ambiguous (the console UI changed). Several candidate names per field absorb small wording drift. // is missing or ambiguous (the console UI changed). Several candidate names per field absorb small wording drift.
// Also the click gate (no Save / Submit / Publish / Next ... ever) and the sign-in page detector. Pure. // Also the click gate (no Save / Submit / Publish / Next ... for field clicks), its scoped exceptions for moving
// through a form (navigation, App Privacy's draft Save: FORM_BUTTONS) and the sign-in page detector. Pure.
// The names are modeled on Apple's and Google's public help pages (sources in console-answers.ts), not recorded from a // The names are modeled on Apple's and Google's public help pages (sources in console-answers.ts), not recorded from a
// signed-in console: the exact App Privacy dialog titles, the IARC question wording and the Play category names could // signed-in console: the exact App Privacy dialog titles, the IARC question wording and the Play category names could
// not be verified without an account, which is why every field has candidates and the engine falls back on a miss. // not be verified without an account, which is why every field has candidates and the engine falls back on a miss.
@ -28,6 +29,10 @@ export interface SectionDef {
title: string; title: string;
/** Candidate names of the dialog the section lives in; it is present when that dialog is visible. */ /** Candidate names of the dialog the section lives in; it is present when that dialog is visible. */
dialog?: Name[]; dialog?: Name[];
/** A later page of a multi-page dialog: not on the page yet (none of its fields seen) is not a UI change. */
page?: boolean;
/** App Privacy: the data type this section belongs to (its dialog opens from the Data Types section). */
type?: string;
fields: FieldDef[]; fields: FieldDef[];
} }
@ -80,13 +85,14 @@ export function formDef(id: FormId, answers: Answer[]): FormDef {
] }]; ] }];
const types = answers.filter(a => a.id.startsWith('type:')); const types = answers.filter(a => a.id.startsWith('type:'));
if (types.length) sections.push({ title: 'Data types', fields: types.map(a => ({ id: a.id, kind: 'checkbox', names: [a.id.slice(5)] })) }); if (types.length) sections.push({ title: 'Data types', fields: types.map(a => ({ id: a.id, kind: 'checkbox', names: [a.id.slice(5)] })) });
// one data type's dialog: purposes, linked to the user, tracking; one page each (Next between, Save at the end)
// or all on one page: each is its own section, the later two are `page`s
for (const a of types.filter(t => t.value === true && has(`linked:${t.id.slice(5)}`))) { for (const a of types.filter(t => t.value === true && has(`linked:${t.id.slice(5)}`))) {
const n = a.id.slice(5); const n = a.id.slice(5);
sections.push({ title: n, dialog: [n, new RegExp(`^${esc(n)}\\b`, 'i')], fields: [ const dialog = [n, new RegExp(`^${esc(n)}\\b`, 'i')];
...APPLE_PURPOSES.map(p => ({ id: `purpose:${n}:${p}`, kind: 'checkbox' as const, names: [p] })), sections.push({ title: `${n}: purposes`, dialog, type: n, fields: APPLE_PURPOSES.map(p => ({ id: `purpose:${n}:${p}`, kind: 'checkbox' as const, names: [p] })) });
{ id: `linked:${n}`, kind: 'radio', options: yesNo([/^Yes,.*\blinked to the user/i], [/^No,.*\blinked to the user/i]) }, sections.push({ title: `${n}: linked to the user`, dialog, type: n, page: true, fields: [{ id: `linked:${n}`, kind: 'radio', options: yesNo([/^Yes,.*\blinked to the user/i], [/^No,.*\blinked to the user/i]) }] });
{ id: `tracking:${n}`, kind: 'radio', options: yesNo([/^Yes,.*\btracking/i], [/^No,.*\btracking/i]) }, sections.push({ title: `${n}: tracking`, dialog, type: n, page: true, fields: [{ id: `tracking:${n}`, kind: 'radio', options: yesNo([/^Yes,.*\btracking/i], [/^No,.*\btracking/i]) }] });
] });
} }
return { id, sections }; return { id, sections };
} }
@ -287,6 +293,125 @@ export function navAllowed(name: string, role: string): boolean {
return n.length > 0 && !forbiddenControl(n); return n.length > 0 && !forbiddenControl(n);
} }
// ---- the buttons of each form: navigation, draft save, final submit ----
// The owner should only click what only the owner may decide. Every button of the console forms is classified here
// (help pages below, checked October 2026); `auto` says whether storebound clicks it itself:
// navigation only moves between pages or opens a dialog: storebound clicks it (flowAllowed), after the page's
// certain answers are filled and only when no answer on the page is uncertain
// draft-save stores answers that are not public yet. App Privacy only: Apple keeps the answers in App Store Connect
// and puts them on the product page only after Publish ("Your responses will be published on your
// product page on the App Store" once you click Publish), so its in-dialog Save is clicked. On every
// other form a draft save stays the owner's click for now
// final-submit publishes, submits, creates or sends something for review: always the owner's click
// Sources: Apple "Manage app privacy" https://developer.apple.com/help/app-store-connect/manage-app-information/manage-app-privacy ;
// Apple "Add a new app" https://developer.apple.com/help/app-store-connect/create-an-app-record/add-a-new-app ;
// Apple "Set an app age rating" https://developer.apple.com/help/app-store-connect/manage-app-information/set-an-app-age-rating ;
// Google "Content ratings" https://support.google.com/googleplay/android-developer/answer/9859655 ;
// Google "Target audience and content" https://support.google.com/googleplay/android-developer/answer/9867159 ;
// Google "Create and set up your app" https://support.google.com/googleplay/android-developer/answer/9859152
export type ButtonClass = 'navigation' | 'draft-save' | 'final-submit';
export interface ButtonRule { button: string; class: ButtonClass; where: string; auto: boolean }
const NEXT: Name[] = ['Next', 'Continue', 'İleri', 'Sonraki', 'Devam', 'Devam et'];
const BACK: Name[] = ['Back', 'Geri'];
const GET_STARTED: Name[] = ['Get Started', 'Başlayın', 'Başla'];
const EDIT: Name[] = ['Edit', 'Düzenle'];
const SAVE: Name[] = ['Save', 'Kaydet'];
const SAVE_DRAFT: Name[] = ['Save draft', 'Taslağı kaydet', 'Taslak olarak kaydet'];
const DONE: Name[] = ['Done', 'Bitti', 'Tamam'];
/** The heading of App Privacy's Data Types section (Edit and the data types sit in it). */
export const DATA_TYPES_HEADING: Name[] = ['Data Types', 'Veri Türleri', 'Veri türleri'];
/** The App Privacy page heading. */
export const APP_PRIVACY_HEADING: Name[] = ['App Privacy', 'Uygulama Gizliliği', /^app privacy$/i];
/** Names the engine looks for. */
export const FLOW_NAMES = { next: NEXT, save: SAVE, getStarted: GET_STARTED, edit: EDIT };
/** Every button of every console form, classified (the console-autofill skill's table is written from this). */
export const FORM_BUTTONS: Record<FormId, ButtonRule[]> = {
'apple-app-privacy': [
{ button: 'Get Started', class: 'navigation', where: 'App Privacy page, first time: opens the questionnaire', auto: true },
{ button: 'Edit (next to Data Types)', class: 'navigation', where: 'Data Types section: opens the data type list', auto: true },
{ button: '<data type> / Set Up <data type>', class: 'navigation', where: 'Data Types section: opens that type\'s questions', auto: true },
{ button: 'Next / Continue', class: 'navigation', where: 'questionnaire dialogs', auto: true },
{ button: 'Back', class: 'navigation', where: 'questionnaire dialogs (never needed)', auto: false },
{ button: 'Save', class: 'draft-save', where: 'questionnaire dialogs: stores the answers, not public until Publish', auto: true },
{ button: 'Publish (and its confirmation dialog)', class: 'final-submit', where: 'top right of the App Privacy page', auto: false },
],
'apple-app-record': [
{ button: '+ / New App', class: 'navigation', where: 'Apps: opens the New App dialog', auto: true },
{ button: 'Cancel', class: 'navigation', where: 'New App dialog: closes it, nothing saved (only to leave a team without the bundle id)', auto: true },
{ button: 'Create', class: 'final-submit', where: 'New App dialog: creates the app record', auto: false },
],
'apple-age-rating': [
{ button: 'Set Up Age Ratings / Edit', class: 'navigation', where: 'App Information (guide only: `storebound apple appinfo` sets the rating by API)', auto: false },
{ button: 'Next', class: 'navigation', where: 'age rating questionnaire (guide only)', auto: false },
{ button: 'Done / Save', class: 'final-submit', where: 'age rating questionnaire: stores the rating (guide only)', auto: false },
],
'play-app-record': [
{ button: 'Create app (app list)', class: 'navigation', where: 'Home / All apps: opens the Create app form', auto: true },
{ button: 'Developer Program Policies / US export laws boxes', class: 'final-submit', where: 'the Create app form: agreements, never ticked', auto: false },
{ button: 'Create app (form)', class: 'final-submit', where: 'the Create app form: creates the app', auto: false },
],
'play-content-rating': [
{ button: 'Start / Start new questionnaire', class: 'navigation', where: 'App content: opens the questionnaire', auto: true },
{ button: 'Next', class: 'navigation', where: 'after the category, and from the questions to the Summary', auto: true },
{ button: 'Save draft', class: 'draft-save', where: 'questionnaire: stores an unfinished draft (the owner\'s click for now)', auto: false },
{ button: 'Submit', class: 'final-submit', where: 'Summary: sends the questionnaire to IARC', auto: false },
],
'play-target-audience': [
{ button: 'Start / Manage', class: 'navigation', where: 'App content: opens the section', auto: true },
{ button: 'Next', class: 'navigation', where: 'between Target age, App details, Ads and Store presence', auto: true },
{ button: 'Save', class: 'final-submit', where: 'the last page: stores the declaration, which Google then reviews', auto: false },
],
};
const norm = (n: string): string => n.trim().replace(/\s+/g, ' ');
const nameIs = (n: string, names: Name[]): boolean => names.some(x => (typeof x === 'string' ? x.toLocaleLowerCase('tr') === n.toLocaleLowerCase('tr') : x.test(n)));
/** Words that publish, submit or create: final whatever the context. */
const FINAL = /(?<![\p{L}])(publish|submit|create|send|release|rollout|roll out|yayınla|yayımla|gönder|oluştur|incelemeye)/iu;
/** Where a control sits, read from the page by the engine. */
export interface FlowWhere {
/** The App Privacy page is open (its heading). */
privacyPage: boolean;
/** Inside a dialog. */
inDialog: boolean;
/** Inside App Privacy's Data Types section. */
inDataTypes: boolean;
/** App Privacy: the data types storebound answers (their names open their questions). */
dataTypes: string[];
}
/** The class of a control of `form` with this accessible name and role where it sits, or null (unknown: never clicked). */
export function flowClass(form: FormId, name: string, role: string, where: FlowWhere): ButtonClass | null {
const n = norm(name);
if (!n || !['button', 'link'].includes(role)) return null;
if (FINAL.test(n.toLocaleLowerCase('tr')) || FINAL.test(n)) return 'final-submit';
if (nameIs(n, NEXT) || nameIs(n, BACK)) return 'navigation';
if (form === 'apple-app-privacy') {
if (nameIs(n, GET_STARTED) && where.privacyPage && !where.inDialog) return 'navigation';
if (nameIs(n, EDIT) && where.inDataTypes && !where.inDialog) return 'navigation';
const low = n.toLocaleLowerCase('tr');
if (where.inDataTypes && !where.inDialog && where.dataTypes.some(t => { const tl = t.toLocaleLowerCase('tr'); return low === tl || low === `set up ${tl}` || low === `${tl} ayarla`; })) return 'navigation';
if (nameIs(n, SAVE)) return 'draft-save';
return null;
}
if (nameIs(n, SAVE_DRAFT)) return 'draft-save';
if (nameIs(n, SAVE) || nameIs(n, DONE)) return 'final-submit';
return null;
}
/**
* The flow click gate: a navigation control of the form, or App Privacy's Save inside a questionnaire dialog (a draft:
* nothing is public before Publish). Everything else (Publish, Submit, Create, a draft save on other forms, an unknown
* control) stays the owner's click.
*/
export function flowAllowed(form: FormId, name: string, role: string, where: FlowWhere): boolean {
const c = flowClass(form, name, role, where);
return c === 'navigation' || (c === 'draft-save' && form === 'apple-app-privacy' && where.inDialog && where.privacyPage);
}
// ---- one login, several developer accounts / teams ---- // ---- one login, several developer accounts / teams ----
// Switching the developer account (Play) or the team (App Store Connect) changes what the console shows, it writes // Switching the developer account (Play) or the team (App Store Connect) changes what the console shows, it writes
// nothing: such a click is let through when its target is one of the accounts storebound just read from the chooser or // nothing: such a click is let through when its target is one of the accounts storebound just read from the chooser or

View file

@ -95,7 +95,7 @@ export const DESKTOP_ONLY: ToolDef[] = [
props: { file: { type: 'string', pattern: RENDER_FILE_RE.source, description: 'Path relative to the renders folder, as project.renders names it' } }, props: { file: { type: 'string', pattern: RENDER_FILE_RE.source, description: 'Path relative to the renders folder, as project.renders names it' } },
required: ['file'], args: i => ['--render', String(i.file)] }, required: ['file'], args: i => ['--render', String(i.file)] },
{ name: 'console_fill', title: 'Fill in a console form', command: ['console', 'fill'], write: true, network: true, { name: 'console_fill', title: 'Fill in a console form', command: ['console', 'fill'], write: true, network: true,
description: 'Fills one store console form that has no API (App Store app record, age rating, App Privacy; Play content rating, target audience) from the config in a visible Chromium the owner signs in to; uncertain fields are highlighted. It never saves, submits or publishes: the owner reviews every field and presses Save. The dry run lists the answers; the real run lasts until the owner closes the browser.', description: 'Fills one store console form that has no API (App Store app record, age rating, App Privacy; Play content rating, target audience) from the config in a visible Chromium the owner signs in to; uncertain fields are highlighted. It moves through the pages itself (Next; App Privacy: Get Started, Edit, each data type and the draft Save in its dialogs) and never submits or publishes: the owner reviews every field and presses the final button (Publish, Submit, Save or Create). The dry run lists the answers; the real run lasts until the owner closes the browser.',
props: { form: { type: 'string', enum: CONSOLE_FORMS, description: 'The console form' }, store: { type: 'string', enum: ['apple', 'play'], description: 'Default: from the form' }, props: { form: { type: 'string', enum: CONSOLE_FORMS, description: 'The console form' }, store: { type: 'string', enum: ['apple', 'play'], description: 'Default: from the form' },
fresh_profile: { type: 'boolean', default: false, description: "Use storebound's own browser profile (sign in there) instead of the owner's Chrome sign-in (a temporary copy of only the console cookies, deleted at the end)" } }, fresh_profile: { type: 'boolean', default: false, description: "Use storebound's own browser profile (sign in there) instead of the owner's Chrome sign-in (a temporary copy of only the console cookies, deleted at the end)" } },
required: ['form'], args: i => [String(i.form), ...opt('store', i.store), ...(i.fresh_profile === true ? ['--fresh-profile'] : [])] }, required: ['form'], args: i => [String(i.form), ...opt('store', i.store), ...(i.fresh_profile === true ? ['--fresh-profile'] : [])] },

View file

@ -188,12 +188,14 @@ write, never an MCP tool):
1. The click runs the dry run (`console fill <form> --dry --json`): nothing opens. A panel lists the answers from 1. The click runs the dry run (`console fill <form> --dry --json`): nothing opens. A panel lists the answers from
the config; the ones only the owner knows are marked "You answer this". It shows the note: "Console pages the config; the ones only the owner knows are marked "You answer this". It shows the note: "Console pages
change. This is AI-assisted: review every field in the browser and press Save yourself. storebound never saves, change. This is AI-assisted: review every field in the browser and press the final button (Publish, Submit, Save
submits or publishes." or Create) yourself. storebound moves through the pages for you and never submits or publishes; App Privacy
answers stay a draft until you press Publish."
2. **Open the browser** goes through `write_with_confirm`: the host repeats the dry run and shows the answers and the 2. **Open the browser** goes through `write_with_confirm`: the host repeats the dry run and shows the answers and the
note in a native dialog ("Open the browser" / Cancel). Only that button mints the confirm token. note in a native dialog ("Open the browser" / Cancel). Only that button mints the confirm token.
3. The real run opens a visible Chromium with its own profile. The owner signs in (storebound never types passwords); 3. The real run opens a visible Chromium with its own profile. The owner signs in (storebound never types passwords);
storebound fills the fields, highlights the uncertain ones and never clicks Save, Submit, Publish or Next. The storebound fills the fields, highlights the uncertain ones, clicks the navigation (Next, App Privacy's Get Started /
Edit / data types and its draft Save) and never clicks Submit, Publish, Create or a final Save. The
run lasts until the owner closes the browser: no timeout in serve, the runner or the host. Progress lines show in run lasts until the owner closes the browser: no timeout in serve, the runner or the host. Progress lines show in
the panel; **Cancel: close the browser** sends `$/cancelRequest`, which stops the command and its browser. the panel; **Cancel: close the browser** sends `$/cancelRequest`, which stops the command and its browser.

View file

@ -89,7 +89,7 @@ first. No write path sends the same values again on a second run.
| `ads apple bid / budget / pause` | campaign / keyword | PUT of a value | ok (owner) | | `ads apple bid / budget / pause` | campaign / keyword | PUT of a value | ok (owner) |
| `web init` | file content | unchanged files are not written | ok | | `web init` | file content | unchanged files are not written | ok |
| `flow run --apply` | steps (state file) | each step is one of the commands above; `--resume` skips finished steps | ok | | `flow run --apply` | steps (state file) | each step is one of the commands above; `--resume` skips finished steps | ok |
| `console fill` | none | fills fields in a visible browser, never presses Save / Submit / Next | ok (never saves) | | `console fill` | none | fills fields in a visible browser and moves through the pages; never presses Submit / Publish / Create or a final Save (App Privacy: draft Save only, public after the owner's Publish) | ok (re-filling sets the same answers) |
| `storebound api <write>` | none (one raw request) | a POST without a clear answer is not retried; check with a GET first | raw | | `storebound api <write>` | none (one raw request) | a POST without a clear answer is not retried; check with a GET first | raw |
## Not run twice in the tests ## Not run twice in the tests

View file

@ -1,6 +1,6 @@
--- ---
name: console-autofill name: console-autofill
description: AI-assisted autofill of App Store Connect and Google Play Console forms that have no API (the New App dialog, App Privacy, Play's Create app form, the Play IARC content rating questionnaire, Target audience and content plus the Ads declaration; the App Store age rating is shown as guidance because the API sets it) in a visible browser that reuses the owner's Chrome sign-in (or one they sign in to); storebound opens the form itself. Answers come only from storebound.config.ts; anything the config does not prove stays empty and highlighted. storebound never signs in, never saves, submits or publishes. Use when the user wants help filling one of these console forms, asks what to answer in them, or wants the answers as a checklist. description: AI-assisted autofill of App Store Connect and Google Play Console forms that have no API (the New App dialog, App Privacy, Play's Create app form, the Play IARC content rating questionnaire, Target audience and content plus the Ads declaration; the App Store age rating is shown as guidance because the API sets it) in a visible browser that reuses the owner's Chrome sign-in (or one they sign in to); storebound opens the form itself. Answers come only from storebound.config.ts; anything the config does not prove stays empty and highlighted. storebound moves through the pages itself (Next; App Privacy: Get Started, Edit, each data type and the draft Save) and never signs in, submits or publishes: the owner presses the final button. Use when the user wants help filling one of these console forms, asks what to answer in them, or wants the answers as a checklist.
--- ---
# Console autofill (forms without an API) # Console autofill (forms without an API)
@ -9,8 +9,9 @@ CLI: `storebound` (or `bunx storebound` in a project that has it, or `bun <toolc
**Read this to the owner first.** Console pages change without notice. This is AI-assisted autofill and it may put an **Read this to the owner first.** Console pages change without notice. This is AI-assisted autofill and it may put an
answer in the wrong place. The owner reviews every field and presses the final button. storebound never types a answer in the wrong place. The owner reviews every field and presses the final button. storebound never types a
password, never touches a sign-in page, never prints or sends a cookie, and never clicks Save, Submit, Publish, Create, password, never touches a sign-in page, never prints or sends a cookie, and never clicks Submit, Publish, Create, a
Next or any similar control (English or Turkish console); it only clicks to open the form. It reuses the owner's final Save or anything that sends a form for review (English or Turkish console). It clicks only what moves through
the form (see "What storebound clicks" below). It reuses the owner's
Chrome sign-in through a temporary copy of only the console cookies (deleted at the end; `--fresh-profile` opts out). Chrome sign-in through a temporary copy of only the console cookies (deleted at the end; `--fresh-profile` opts out).
It is not available over MCP. It is not available over MCP.
@ -79,10 +80,8 @@ It is not available over MCP.
`apple.appId` / `play.packageName`), storebound says which step failed, prints what to click, and keeps watching: `apple.appId` / `play.packageName`), storebound says which step failed, prints what to click, and keeps watching:
a sign-in that finishes restarts navigation at step 1; when the owner moves on by hand (the + button, the New App a sign-in that finishes restarts navigation at step 1; when the owner moves on by hand (the + button, the New App
item, the app in the list appear) it continues from that step; when the owner opens the form it fills it. Watching item, the app in the list appear) it continues from that step; when the owner opens the form it fills it. Watching
ends when the window is closed. App ends when the window is closed. When the form appears storebound fills the certain answers, outlines every
Privacy: the owner clicks Get Started (or Edit next to Data Types). When the form appears storebound fills the unproven or unfillable field with a "storebound: check this" label, and lists them in the terminal.
certain answers, outlines every unproven or unfillable field with a "storebound: check this" label, and lists them
in the terminal.
5. **One login, many developer accounts or teams.** storebound never asks for a second sign-in; it finds the 5. **One login, many developer accounts or teams.** storebound never asks for a second sign-in; it finds the
account that has the app and remembers it in `~/.storebound/console-accounts.json` (ids only, never cookies; account that has the app and remembers it in `~/.storebound/console-accounts.json` (ids only, never cookies;
shared with the desktop app): shared with the desktop app):
@ -105,8 +104,13 @@ It is not available over MCP.
- Switching only changes what the console shows. Each switch click must be an account name storebound just read - Switching only changes what the console shows. Each switch click must be an account name storebound just read
from the chooser or the menu, and never Sign Out or a deny-listed name (a studio called "Next Games" is left from the chooser or the menu, and never Sign Out or a deny-listed name (a studio called "Next Games" is left
for the owner to pick). for the owner to pick).
6. Multi-page forms: the owner reviews the page and clicks Next; storebound fills the next page when it appears. 6. Multi-page forms: storebound fills a page and clicks its Next itself (App Privacy: Get Started or Edit next to
7. On the last page storebound prints "review every field and press <Save | Submit | Publish | Create> yourself". The Data Types, Next, the data types' Save, then each data type in the Data Types section: purposes > Next > linked >
Next > tracking > Save). It stops on a page only when an answer there is uncertain: it logs
`answer needed on "<page>": <the answers>`, leaves them outlined, and goes on by itself once the owner has set
each one (a box that should stay empty: click it twice). It never clicks Next past an open question.
7. On the last page storebound prints "review every field and press <Save | Submit | Publish | Create> yourself"
(App Privacy: "review the summary, then press Publish yourself"). The
command ends when the owner closes the window (`--json` then prints the result with `filled`, `highlighted`, command ends when the owner closes the window (`--json` then prints the result with `filled`, `highlighted`,
`fallback`, `stoppedAt`). `fallback`, `stoppedAt`).
8. If a field cannot be found or matches twice (for more than a moment: a page that is still loading does not count), the console UI changed: storebound stops filling and prints the 8. If a field cannot be found or matches twice (for more than a moment: a page that is still loading does not count), the console UI changed: storebound stops filling and prints the
@ -130,6 +134,24 @@ It is not available over MCP.
- The package name is not in this form: the first AAB upload sets it for good (`storebound play upload --track - The package name is not in this form: the first AAB upload sets it for good (`storebound play upload --track
internal`, or `storebound flow run release`). internal`, or `storebound flow run release`).
## What storebound clicks, and what stays with the owner
Every button of each form is classified in `cli/lib/console-forms.ts` (`FORM_BUTTONS`), from Apple's and Google's
help pages ("Manage app privacy", "Add a new app", "Set an app age rating"; "Content ratings", "Target audience and
content", "Create and set up your app"):
| form | storebound clicks (navigation) | stays with the owner, and why |
|---|---|---|
| App Privacy | Get Started; Edit next to Data Types (never the Privacy Policy Edit); each data type or "Set Up <type>"; Next; **Save inside the questionnaire dialogs** (a draft: Apple publishes the answers only after Publish) | **Publish** and its confirmation: it puts the answers on the App Store product page |
| New App (App Store) | + and New App (Cancel only to leave a team without the bundle id) | **Create**: creates the app record for good |
| Age rating (guide only) | nothing (`storebound apple appinfo` sets it by API) | Set Up / Next / Done, if the owner wants to look |
| Create app (Play) | Create app on the app list (opens the form) | the two **declarations** (agreements, never ticked) and **Create app** in the form: creates the app |
| Content rating (Play) | Start, Next (after the category, and to the Summary) | **Save draft** (not clicked yet: a stored draft is the owner's call for now) and **Submit**: sends the questionnaire to IARC |
| Target audience (Play) | Start / Manage, Next between the pages | **Save** on the last page: stores the declaration, which Google then reviews |
Mid-way storebound stops only for an uncertain answer (see 6). It never asks the owner to click a navigation button
unless the console page changed so that storebound cannot find it (then it says so).
## The owner decides ## The owner decides
Every `[check]` answer, linked-to-identity and tracking for each App Privacy data type (unless `appPrivacy.types` Every `[check]` answer, linked-to-identity and tracking for each App Privacy data type (unless `appPrivacy.types`

View file

@ -79,7 +79,7 @@ describe('appPrivacy.types (the owner\'s answers)', () => {
expect(a.get('tracking:Performance Data')).toMatchObject({ value: null, certain: false }); // not set: (you decide) expect(a.get('tracking:Performance Data')).toMatchObject({ value: null, certain: false }); // not set: (you decide)
expect(a.get('type:Customer Support')).toMatchObject({ value: null, certain: false }); expect(a.get('type:Customer Support')).toMatchObject({ value: null, certain: false });
// the Advertising Data dialog gets a section of its own // the Advertising Data dialog gets a section of its own
expect(formDef('apple-app-privacy', [...a.values()]).sections.map(s => s.title)).toContain('Advertising Data'); expect(formDef('apple-app-privacy', [...a.values()]).sections.map(s => s.title)).toContain('Advertising Data: purposes');
}); });
test('without dataSafety: only appPrivacy.types', () => { test('without dataSafety: only appPrivacy.types', () => {
const c = { ...base, dataSafety: undefined, appPrivacy: { types: { HANDS: { collected: true, purposes: ['APP_FUNCTIONALITY'] } } } } as ShipConfig; const c = { ...base, dataSafety: undefined, appPrivacy: { types: { HANDS: { collected: true, purposes: ['APP_FUNCTIONALITY'] } } } } as ShipConfig;

View file

@ -274,7 +274,7 @@ describe.skipIf(!browser)('engine (headless, modeled pages)', () => {
await page.close(); await page.close();
}, BROWSER_TEST_MS); }, BROWSER_TEST_MS);
test('app privacy: section by section as the owner moves on; Next / Save / Publish never clicked', async () => { test('app privacy (fillPage alone): section by section as the page changes; fillPage itself never clicks Next / Save / Publish', async () => {
const page = await open('apple-app-privacy.html'); const page = await open('apple-app-privacy.html');
const ans = pageAnswers('apple-app-privacy'); const ans = pageAnswers('apple-app-privacy');
const def = formDef('apple-app-privacy', ans); const def = formDef('apple-app-privacy', ans);
@ -293,15 +293,16 @@ describe.skipIf(!browser)('engine (headless, modeled pages)', () => {
expect(await checked(page, 'Advertising Data')).toBe(false); expect(await checked(page, 'Advertising Data')).toBe(false);
await page.evaluate(() => (window as any).__next()); await page.evaluate(() => (window as any).__next());
s = await fillPage(page, def, ans, done); s = await fillPage(page, def, ans, done);
expect(s.title).toBe('Device ID'); expect(s.title).toBe('Device ID: purposes');
expect(s.fallback).toBe(false); expect(s.fallback).toBe(false);
expect(await checked(page, 'Third-Party Advertising')).toBe(true); expect(await checked(page, 'Third-Party Advertising')).toBe(true);
expect(await checked(page, 'App Functionality')).toBe(false); expect(await checked(page, 'App Functionality')).toBe(false);
expect(s.highlighted.sort()).toEqual(['linked:Device ID', 'tracking:Device ID']); // one dialog page with all three parts: linked and tracking are the next sections of the same dialog
expect((await fillPage(page, def, ans, done))).toMatchObject({ title: 'Device ID: linked to the user', highlighted: ['linked:Device ID'] });
expect((await fillPage(page, def, ans, done))).toMatchObject({ title: 'Device ID: tracking', highlighted: ['tracking:Device ID'] });
expect(await page.getByRole('radio').filter({ visible: true }).evaluateAll((els: HTMLInputElement[]) => els.filter(e => e.checked).length)).toBe(0); expect(await page.getByRole('radio').filter({ visible: true }).evaluateAll((els: HTMLInputElement[]) => els.filter(e => e.checked).length)).toBe(0);
await page.evaluate(() => (window as any).__type('Crash Data')); await page.evaluate(() => (window as any).__type('Crash Data'));
s = await fillPage(page, def, ans, done); for (const part of ['purposes', 'linked to the user', 'tracking']) expect((await fillPage(page, def, ans, done)).title).toBe(`Crash Data: ${part}`);
expect(s.title).toBe('Crash Data');
expect(done.size).toBe(def.sections.length); expect(done.size).toBe(def.sections.length);
expect(await clicks(page)).toEqual([]); expect(await clicks(page)).toEqual([]);
await page.close(); await page.close();

215
tests/console-flow.test.ts Normal file
View file

@ -0,0 +1,215 @@
// storebound console fill walks a whole form: it clicks every navigation control (Next, App Privacy's Get Started,
// Edit next to Data Types, each data type) and App Privacy's in-dialog draft Save itself, stops only for an uncertain
// answer (until the owner set it), an agreement or the final button (Publish, Submit, Save, Create), which stays the
// owner's. Runs fillSession against MODELED pages (tests/fixtures/console) on 127.0.0.1. No network.
// Guardrail: no log line ever asks the owner to click a navigation control.
import { afterAll, afterEach, beforeAll, describe, expect, test } from 'bun:test';
import { join } from 'node:path';
import { fillSession } from '../cli/console/fill';
import type { ConsoleBrowser } from '../cli/console/session';
import { APPLE_DATA_TYPE_IDS, type AppleDataTypeId, type AppleTypeAnswer } from '../cli/lib/app-privacy';
import type { ShipConfig } from '../cli/lib/config';
import { type FlowWhere, flowAllowed, flowClass, FORM_BUTTONS } from '../cli/lib/console-forms';
import { AFTER_ALL_MS, AFTER_EACH_MS, launchTestBrowser, logLines, testScope } from './helpers/browser';
const FIX = join(import.meta.dir, 'fixtures', 'console');
const base0: ShipConfig = {
app: { name: 'Example Game', profile: 'game', privacyPolicyUrl: 'https://example.com/privacy', supportUrl: 'https://example.com/support', website: 'https://example.com', contactEmail: 'support@example.com' },
languages: [{ id: 'en', play: 'en-US', apple: 'en-US' }],
apple: { bundleId: 'com.example.game', primaryLocale: 'en-US' },
play: { packageName: 'com.example.game' },
ads: { appAdsTxt: ['example-network.com, pub-0000, DIRECT, abc123'] },
dataSafety: { collectsData: true, encryptedInTransit: true, deletionRequest: false, data: { PSL_DEVICE_ID: { shared: true, collect: ['advertising', 'analytics'], share: ['advertising'] } } },
console: { contentRating: { answers: { violence: false } }, targetAudience: { ages: ['13-15', '16-17', '18-over'] } },
} as ShipConfig;
/** Every App Privacy answer certain: Device ID and Crash Data collected, nothing else. */
function privacy(over: Partial<Record<AppleDataTypeId, AppleTypeAnswer>> = {}): ShipConfig {
const types: Partial<Record<AppleDataTypeId, AppleTypeAnswer>> = Object.fromEntries(APPLE_DATA_TYPE_IDS.map(id => [id, { collected: false }]));
types.DEVICE_ID = { collected: true, purposes: ['THIRD_PARTY_ADVERTISING', 'ANALYTICS'], linked: false, tracking: true };
types.CRASH_DATA = { collected: true, purposes: ['APP_FUNCTIONALITY'], linked: false, tracking: false };
return { ...base0, dataSafety: undefined, appPrivacy: { types: { ...types, ...over } } } as unknown as ShipConfig;
}
const shared = await launchTestBrowser('playwright');
const { browser, skipWhy } = shared;
if (!browser) console.warn(`console-flow browser tests skipped: no Chromium installed (${skipWhy}). Run \`bunx playwright install chromium\`.`);
const scope = testScope(() => browser);
const TEST_MS = 60_000;
let server: ReturnType<typeof Bun.serve> | null = null;
let base = '';
beforeAll(() => {
server = Bun.serve({ hostname: '127.0.0.1', port: 0, fetch: req => {
const name = new URL(req.url).pathname.slice(1);
if (!/^[a-z_-]+\.(html|js)$/.test(name)) return new Response('not found', { status: 404 });
return new Response(Bun.file(join(FIX, name)));
} });
base = `http://127.0.0.1:${server.port}/`;
});
afterEach(() => scope.settle(), AFTER_EACH_MS);
afterAll(async () => { await shared.close(); server?.stop(true); }, AFTER_ALL_MS);
async function local(): Promise<ConsoleBrowser> {
const ctx = scope.track(await browser.newContext());
const page = await ctx.newPage();
let closed = false;
const done = new Promise<void>(r => ctx.on('close', () => { closed = true; r(); }));
return { mode: 'profile', context: ctx, page, pages: () => ctx.pages(), closed: done, isClosed: () => closed, close: () => ctx.close(), cleanup: () => {} };
}
const fast = (log: ReturnType<typeof logLines>) => ({ say: log.say, tickMs: 100, navTimeoutMs: 5000, signInWaitMs: 30_000, env: {} });
const clicks = (b: ConsoleBrowser): Promise<string[]> => b.page.evaluate(() => (window as any).__clicks);
const navClicks = (b: ConsoleBrowser): Promise<string[]> => b.page.evaluate(() => (window as any).__navClicks());
/** Guardrail: a line that tells the owner to click a navigation control themselves. */
const NAV_YOURSELF = /\b(Next|Continue|Get Started|Edit|Back|Set Up|Start|Manage|New App)\b[^.]*\byourself\b|\byourself\b[^.]*\b(Next|Continue|Get Started|Edit next|Set Up)\b/;
const navAsked = (lines: string[]) => lines.filter(l => NAV_YOURSELF.test(l));
const PUBLISH = 'review the summary, then press Publish yourself';
describe('button classes (FORM_BUTTONS, flowClass, flowAllowed)', () => {
const at = (w: Partial<FlowWhere> = {}): FlowWhere => ({ privacyPage: true, inDialog: false, inDataTypes: false, dataTypes: ['Device ID'], ...w });
test('App Privacy: openers, Next and the in-dialog Save are clicked; Publish never', () => {
expect(flowAllowed('apple-app-privacy', 'Get Started', 'button', at())).toBe(true);
expect(flowAllowed('apple-app-privacy', 'Başlayın', 'button', at())).toBe(true);
expect(flowAllowed('apple-app-privacy', 'Edit', 'button', at({ inDataTypes: true }))).toBe(true);
expect(flowAllowed('apple-app-privacy', 'Edit', 'button', at())).toBe(false); // the Privacy Policy URL's Edit
expect(flowAllowed('apple-app-privacy', 'Set Up Device ID', 'button', at({ inDataTypes: true }))).toBe(true);
expect(flowAllowed('apple-app-privacy', 'Device ID', 'link', at({ inDataTypes: true }))).toBe(true);
expect(flowAllowed('apple-app-privacy', 'Next', 'button', at({ inDialog: true }))).toBe(true);
expect(flowClass('apple-app-privacy', 'Save', 'button', at({ inDialog: true }))).toBe('draft-save');
expect(flowAllowed('apple-app-privacy', 'Save', 'button', at({ inDialog: true }))).toBe(true);
expect(flowAllowed('apple-app-privacy', 'Save', 'button', at())).toBe(false); // not in a questionnaire dialog
expect(flowAllowed('apple-app-privacy', 'Save', 'button', at({ inDialog: true, privacyPage: false }))).toBe(false);
for (const n of ['Publish', 'Yayınla', 'Submit for Review']) expect(flowAllowed('apple-app-privacy', n, 'button', at({ inDialog: true, inDataTypes: true }))).toBe(false);
expect(flowAllowed('apple-app-privacy', 'Get Started', 'checkbox', at())).toBe(false);
});
test('other forms: Next is navigation; Save draft, Save, Submit, Create, Done stay the owner\'s', () => {
const w = at({ privacyPage: false });
for (const f of ['play-content-rating', 'play-target-audience', 'apple-app-record', 'play-app-record'] as const) {
expect(flowAllowed(f, 'Next', 'button', w)).toBe(true);
expect(flowAllowed(f, 'İleri', 'button', w)).toBe(true);
expect(flowAllowed(f, 'Get Started', 'button', w)).toBe(false);
for (const n of ['Save draft', 'Save', 'Submit', 'Create', 'Create app', 'Done', 'Start rollout', 'Publish']) expect(flowAllowed(f, n, 'button', w)).toBe(false);
}
expect(flowClass('play-content-rating', 'Save draft', 'button', w)).toBe('draft-save');
expect(flowClass('play-target-audience', 'Save', 'button', w)).toBe('final-submit');
expect(flowClass('play-content-rating', 'Submit', 'button', w)).toBe('final-submit');
});
test('every form has its buttons classified; only navigation and App Privacy\'s draft Save are automatic', () => {
for (const [f, rules] of Object.entries(FORM_BUTTONS)) {
expect(rules.length).toBeGreaterThan(0);
for (const r of rules) if (r.auto) expect(r.class === 'navigation' || (f === 'apple-app-privacy' && r.class === 'draft-save')).toBe(true);
expect(rules.some(r => r.class === 'final-submit' && !r.auto)).toBe(true);
}
});
});
describe.skipIf(!browser)('App Privacy: the whole questionnaire (fixture apple-app-privacy-flow.html)', () => {
test('first time: Get Started > yes > Next > data types > Save > each type (purposes > Next > linked > Next > tracking > Save); Publish never clicked', async () => {
const b = await local();
const log = logLines();
const run = scope.run(fillSession(b, { form: 'apple-app-privacy', config: privacy(), startUrl: base + 'apple-app-privacy-flow.html', ...fast(log) }));
await log.wait('the Publish line', l => l.some(m => m.startsWith(PUBLISH)));
const c = await clicks(b);
expect(c).not.toContain('Publish');
expect(c).not.toContain('See Details');
expect(c).not.toContain('Edit'); // neither the Privacy Policy Edit nor (first time) the Data Types one
expect(c.filter(x => x === 'Get Started')).toHaveLength(1);
expect(await b.page.evaluate(() => (window as any).__saves)).toBe(3); // the type list + Device ID + Crash Data, drafts
expect(await navClicks(b)).toContain('Crash Data'); // the link of the second type
expect(c).toContain('Set Up Device ID');
expect(log.lines).toContain('clicked "Save" (draft-save)');
expect(log.lines.some(m => m.startsWith('answer needed'))).toBe(false);
expect(navAsked(log.lines)).toEqual([]);
await b.context.close();
expect((await run).fallback).toBe(false);
}, TEST_MS);
test('answers exist: Edit next to Data Types (never the Privacy Policy Edit), then every type', async () => {
const b = await local();
const log = logLines();
const run = scope.run(fillSession(b, { form: 'apple-app-privacy', config: privacy(), startUrl: base + 'apple-app-privacy-flow.html?existing=1', ...fast(log) }));
await log.wait('the Publish line', l => l.some(m => m.startsWith(PUBLISH)));
expect((await clicks(b)).filter(x => x === 'Edit')).toHaveLength(1);
expect(log.lines.some(m => m.startsWith('Data collection was answered before'))).toBe(true);
expect(await b.page.evaluate(() => (window as any).__saves)).toBe(3);
expect(await clicks(b)).not.toContain('Publish');
expect(navAsked(log.lines)).toEqual([]);
await b.context.close();
await run;
}, TEST_MS);
test('an uncertain answer stops the walk on its page until the owner sets it, then it goes on', async () => {
const b = await local();
const log = logLines();
const config = privacy({ DEVICE_ID: { collected: true, purposes: ['ANALYTICS'], tracking: false } }); // linked: not in the config
const run = scope.run(fillSession(b, { form: 'apple-app-privacy', config, startUrl: base + 'apple-app-privacy-flow.html', ...fast(log) }));
await log.wait('the stop', l => l.some(m => m.startsWith('answer needed on "Device ID: linked to the user"')));
await Bun.sleep(600); // several rounds: Next must not be clicked past the open question
const linked = b.page.getByRole('radio', { name: /^No, Device ID .* not linked/ });
expect(await linked.isVisible()).toBe(true);
expect(await b.page.getByRole('radio', { name: /^No, we do not use Device ID/ }).isVisible()).toBe(false);
await linked.check(); // the owner answers
await log.wait('the Publish line', l => l.some(m => m.startsWith(PUBLISH)));
expect(log.lines).toContain('"Device ID: linked to the user" answered: storebound goes on');
expect(await b.page.evaluate(() => (window as any).__saves)).toBe(3);
expect(await clicks(b)).not.toContain('Publish');
expect(navAsked(log.lines)).toEqual([]);
await b.context.close();
await run;
}, TEST_MS);
test('no data collected: "No" and the dialog\'s Save, then the summary', async () => {
const b = await local();
const log = logLines();
const types = Object.fromEntries(APPLE_DATA_TYPE_IDS.map(id => [id, { collected: false }]));
const config = { ...base0, dataSafety: undefined, appPrivacy: { types } } as unknown as ShipConfig;
const run = scope.run(fillSession(b, { form: 'apple-app-privacy', config, startUrl: base + 'apple-app-privacy-flow.html', ...fast(log) }));
await log.wait('the Publish line', l => l.some(m => m.startsWith(PUBLISH)));
expect(await b.page.evaluate(() => (window as any).__saves)).toBe(1);
expect(await clicks(b)).not.toContain('Next');
expect(await clicks(b)).not.toContain('Publish');
await b.context.close();
await run;
}, TEST_MS);
});
describe.skipIf(!browser)('the other forms: navigation by itself, final buttons and draft saves left to the owner', () => {
test('content rating: Next after the category by itself; stops at the uncertain questions; Save draft / Submit never clicked', async () => {
const b = await local();
const log = logLines();
const run = scope.run(fillSession(b, { form: 'play-content-rating', config: base0, startUrl: base + 'play-content-rating.html', ...fast(log) }));
await log.wait('the questionnaire stop', l => l.some(m => m.startsWith('answer needed on "Questionnaire"')));
expect(log.lines).toContain('clicked "Next" (navigation)');
const c = await clicks(b);
expect(c).toEqual(['Next']);
expect(navAsked(log.lines)).toEqual([]);
await b.context.close();
await run;
}, TEST_MS);
test('target audience: Next by itself, a stop at the uncertain appeal question until answered, then Next; Save stays the owner\'s', async () => {
const b = await local();
const log = logLines();
const run = scope.run(fillSession(b, { form: 'play-target-audience', config: base0, startUrl: base + 'play-target-audience.html', ...fast(log) }));
await log.wait('the appeal stop', l => l.some(m => m.startsWith('answer needed on "Appeal to children"')));
expect(await clicks(b)).toEqual(['Next']);
await b.page.getByRole('radiogroup', { name: /appeal to children/ }).getByRole('radio', { name: 'No' }).check();
await log.wait('the final line', l => l.some(m => m.includes('press Save yourself')));
expect(await clicks(b)).toEqual(['Next', 'Next']);
expect(navAsked(log.lines)).toEqual([]);
await b.context.close();
await run;
}, TEST_MS);
test('New App (App Store) and Create app (Play): filled, the final button is the owner\'s, no navigation asked of the owner', async () => {
for (const [form, file, final] of [['apple-app-record', 'apple-app-record.html', 'Create'], ['play-app-record', 'play-create-app.html', 'Create app']] as const) {
const b = await local();
const log = logLines();
const run = scope.run(fillSession(b, { form, config: base0, startUrl: base + file, ...fast(log) }));
await log.wait('the final line', l => l.some(m => m.includes(`press ${final} yourself`)));
expect(await clicks(b)).toEqual([]);
expect(navAsked(log.lines)).toEqual([]);
await b.context.close();
await run;
}
}, TEST_MS);
});

View file

@ -12,6 +12,8 @@ document.addEventListener('click', e => {
if (b.matches('button')) window.__clicks.push(b.textContent.trim()); if (b.matches('button')) window.__clicks.push(b.textContent.trim());
try { sessionStorage.setItem('navClicks', JSON.stringify([...navLog(), name])); } catch { /* file: pages */ } try { sessionStorage.setItem('navClicks', JSON.stringify([...navLog(), name])); } catch { /* file: pages */ }
}, true); }, true);
// a control with data-next acts like the console's Next: shows the next step (what storebound's flow clicks)
document.addEventListener('click', e => { if (e.target.closest('[data-next]')) window.__next(); });
window.__step = 0; window.__step = 0;
window.__next = () => { window.__next = () => {
const steps = [...document.querySelectorAll('[data-step]')]; const steps = [...document.querySelectorAll('[data-step]')];

View file

@ -0,0 +1,77 @@
<!doctype html>
<!-- MODELED, not recorded: App Store Connect > App Privacy as a whole questionnaire, written from Apple's help page
"Manage app privacy" (Get Started; "Yes, we collect data" > Next > data types > Save; each data type in the Data
Types section opens its questions: purposes > Next > linked to the user > Next > tracking > Save; Edit next to Data
Types changes the list; Publish at the top right publishes, with a confirmation). ?existing=1: answers exist (no
Get Started; Edit next to Data Types). Decoys: Publish, See Details, and the Edit next to the Privacy Policy URL.
window.__saves counts the draft saves. Placeholder data only. -->
<html lang="en"><head><meta charset="utf-8"><title>App Privacy - App Store Connect</title><script src="/_common.js"></script></head>
<body>
<h1>App Privacy</h1>
<button type="button" id="publish">Publish</button>
<section><h2>Privacy Policy</h2><p>https://example.com/privacy</p><button type="button">Edit</button></section>
<p id="intro"><button type="button" id="start">Get Started</button></p>
<section id="dt" hidden><h2>Data Types</h2><button type="button" id="edit">Edit</button><ul id="list"></ul></section>
<section><h2>Product Page Preview</h2><button type="button">See Details</button></section>
<div role="dialog" aria-label="Data Collection" id="collect" hidden>
<div id="c1">
<label><input type="radio" name="c" value="yes"> Yes, we collect data from this app</label>
<label><input type="radio" name="c" value="no"> No, we do not collect data from this app</label>
<button type="button">Cancel</button> <button type="button" id="c1next">Next</button> <button type="button" id="c1save" hidden>Save</button>
</div>
<div id="c2" hidden><div id="types"></div><button type="button" id="c2back">Back</button> <button type="button" id="c2save">Save</button></div>
</div>
<div id="per"></div>
<script>
const TYPES = ['Name', 'Email Address', 'Phone Number', 'Physical Address', 'Other User Contact Info', 'Health', 'Fitness', 'Payment Info', 'Credit Info',
'Other Financial Info', 'Precise Location', 'Coarse Location', 'Sensitive Info', 'Contacts', 'Emails or Text Messages', 'Photos or Videos', 'Audio Data',
'Gameplay Content', 'Customer Support', 'Other User Content', 'Browsing History', 'Search History', 'User ID', 'Device ID', 'Purchase History',
'Product Interaction', 'Advertising Data', 'Other Usage Data', 'Crash Data', 'Performance Data', 'Other Diagnostic Data', 'Environment Scanning', 'Hands',
'Head', 'Other Data Types'];
const PURPOSES = ['Third-Party Advertising', "Developer's Advertising or Marketing", 'Analytics', 'Product Personalization', 'App Functionality', 'Other Purposes'];
const $ = id => document.getElementById(id);
window.__saves = 0;
for (const t of TYPES) { const l = document.createElement('label'); l.innerHTML = '<input type="checkbox"> '; l.append(t); $('types').append(l); }
const existing = new URLSearchParams(location.search).has('existing');
const show = (el, on) => { el.hidden = !on; };
function listTypes(names) {
$('list').innerHTML = '';
for (const [i, t] of names.entries()) {
const li = document.createElement('li');
// one data type opens with a "Set Up <type>" button, the next with a link named like the type
li.innerHTML = i % 2 === 0 ? `<button type="button">Set Up ${t}</button>` : `<a href="#">${t}</a>`;
li.querySelector('button, a').addEventListener('click', e => { e.preventDefault(); openType(t); });
$('list').append(li);
}
show($('dt'), true); show($('intro'), false);
}
// the per-type dialog: three pages (purposes > Next > linked > Next > tracking > Save)
function openType(t) {
const d = document.createElement('div'); d.setAttribute('role', 'dialog'); d.setAttribute('aria-label', t);
d.innerHTML = `<div data-p="1">${PURPOSES.map(p => `<label><input type="checkbox"> ${p}</label>`).join('')}<button type="button" data-go="2">Next</button></div>`
+ `<div data-p="2" hidden><label><input type="radio" name="l"> Yes, ${t} collected from this app is linked to the user's identity</label>`
+ `<label><input type="radio" name="l"> No, ${t} collected from this app is not linked to the user's identity</label><button type="button" data-go="1b">Back</button> <button type="button" data-go="3">Next</button></div>`
+ `<div data-p="3" hidden><label><input type="radio" name="t"> Yes, we use ${t} for tracking purposes</label>`
+ `<label><input type="radio" name="t"> No, we do not use ${t} for tracking purposes</label><button type="button" data-save>Save</button></div>`;
d.addEventListener('click', e => {
const go = e.target.closest('[data-go]')?.getAttribute('data-go');
if (go && go !== '1b') d.querySelectorAll('[data-p]').forEach(p => { p.hidden = p.getAttribute('data-p') !== go; });
if (e.target.closest('[data-save]')) { window.__saves++; d.remove(); }
});
$('per').append(d);
}
if (existing) listTypes(['Device ID', 'Crash Data']);
$('start').addEventListener('click', () => { show($('collect'), true); show($('c1'), true); show($('c2'), false); });
$('edit').addEventListener('click', () => { show($('collect'), true); show($('c1'), false); show($('c2'), true); });
// "No" saves at once; "Yes" goes on with Next
document.querySelectorAll('input[name=c]').forEach(r => r.addEventListener('change', () => { const no = r.value === 'no' && r.checked; show($('c1next'), !no); show($('c1save'), no); }));
$('c1next').addEventListener('click', () => { show($('c1'), false); show($('c2'), true); });
$('c1save').addEventListener('click', () => { window.__saves++; show($('collect'), false); });
$('c2save').addEventListener('click', () => {
window.__saves++;
const picked = [...$('types').querySelectorAll('label')].filter(l => l.querySelector('input').checked).map(l => l.textContent.trim());
show($('collect'), false); listTypes(picked);
});
</script>
</body></html>

View file

@ -1,7 +1,7 @@
<!doctype html> <!doctype html>
<!-- MODELED, not recorded: a sanitized stand-in for Play Console > Policy > App content > Content rating (IARC), written <!-- MODELED, not recorded: a sanitized stand-in for Play Console > Policy > App content > Content rating (IARC), written
from Google's public help page "Content ratings" (email address, category, questionnaire, Save draft / Next / from Google's public help page "Content ratings" (email address, category, questionnaire, Save draft / Next /
Submit). The question wording is modeled on the IARC topics, not copied from the console. --> Submit on the Summary). The question wording is modeled on the IARC topics, not copied from the console. -->
<html lang="en"><head><meta charset="utf-8"><title>Content rating - Play Console</title><script src="_common.js"></script></head> <html lang="en"><head><meta charset="utf-8"><title>Content rating - Play Console</title><script src="_common.js"></script></head>
<body> <body>
<h1>Content rating</h1> <h1>Content rating</h1>
@ -12,9 +12,10 @@
<label><input type="radio" name="cat"> Social or communication</label> <label><input type="radio" name="cat"> Social or communication</label>
<label><input type="radio" name="cat"> All other app types</label> <label><input type="radio" name="cat"> All other app types</label>
</fieldset> </fieldset>
<button type="button">Save draft</button> <button type="button">Next</button> <button type="button">Save draft</button> <button type="button" data-next>Next</button>
</section> </section>
<section data-step hidden id="q"><button type="button">Save draft</button> <button type="button">Next</button></section> <section data-step hidden id="q"><button type="button">Save draft</button> <button type="button" data-next>Next</button></section>
<section data-step hidden><h2>Summary</h2><p>Calculated ratings</p><button type="button">Submit</button></section>
<script> <script>
const Q = ['Does the app contain any violence?', 'Does the app contain content that might scare or frighten (fear or horror)?', const Q = ['Does the app contain any violence?', 'Does the app contain content that might scare or frighten (fear or horror)?',
'Does the app contain sexual content or nudity?', 'Does the app contain profanity or crude language?', 'Does the app contain sexual content or nudity?', 'Does the app contain profanity or crude language?',

View file

@ -8,9 +8,9 @@
<section data-step><fieldset><legend>Target age</legend> <section data-step><fieldset><legend>Target age</legend>
<label><input type="checkbox"> Ages 5 and under</label><label><input type="checkbox"> Ages 6-8</label><label><input type="checkbox"> Ages 9-12</label> <label><input type="checkbox"> Ages 5 and under</label><label><input type="checkbox"> Ages 6-8</label><label><input type="checkbox"> Ages 9-12</label>
<label><input type="checkbox"> Ages 13-15</label><label><input type="checkbox"> Ages 16-17</label><label><input type="checkbox"> Ages 18 and over</label> <label><input type="checkbox"> Ages 13-15</label><label><input type="checkbox"> Ages 16-17</label><label><input type="checkbox"> Ages 18 and over</label>
</fieldset><button type="button">Next</button></section> </fieldset><button type="button" data-next>Next</button></section>
<section data-step hidden><div role="radiogroup" aria-label="Could your app unintentionally appeal to children?"> <section data-step hidden><div role="radiogroup" aria-label="Could your app unintentionally appeal to children?">
<label><input type="radio" name="a"> Yes</label><label><input type="radio" name="a"> No</label></div><button type="button">Next</button></section> <label><input type="radio" name="a"> Yes</label><label><input type="radio" name="a"> No</label></div><button type="button" data-next>Next</button></section>
<section data-step hidden><h2>Ads</h2> <section data-step hidden><h2>Ads</h2>
<label><input type="radio" name="ads"> Yes, my app contains ads</label><label><input type="radio" name="ads"> No, my app does not contain ads</label> <label><input type="radio" name="ads"> Yes, my app contains ads</label><label><input type="radio" name="ads"> No, my app does not contain ads</label>
<button type="button">Save</button></section> <button type="button">Save</button></section>

View file

@ -13,7 +13,7 @@ export const TIMINGS = join(ROOT, 'node_modules/.cache/storebound-ci/test-timing
* suite next to it, so they don't fight for CPU and time out. */ * suite next to it, so they don't fight for CPU and time out. */
export const HEAVY = [ export const HEAVY = [
'tests/console-fill.test.ts', 'tests/site-overflow.test.ts', 'tests/local-fonts.test.ts', 'tests/glyphs.test.ts', 'tests/console-fill.test.ts', 'tests/site-overflow.test.ts', 'tests/local-fonts.test.ts', 'tests/glyphs.test.ts',
'tests/capture-web.test.ts', 'tests/console-session.test.ts', 'tests/console-persist.test.ts', 'tests/capture-web.test.ts', 'tests/console-session.test.ts', 'tests/console-persist.test.ts', 'tests/console-flow.test.ts',
]; ];
/** Changes that can affect every test: run the whole suite. */ /** Changes that can affect every test: run the whole suite. */