import type { RemoteTestedClientAgent } from "./client-agent.js"; import type { WorkOrder } from "./prompts.js"; import type { RemoteJobName } from "./remote-executor.js"; import type { ScenarioSlice, TestRun, UiInteraction } from "./types.js"; /** * The mobile client agent (React Native + Expo). Same shape as the other * clients, but its UI tests need an emulator, which exists only on the * runner hardware — a RemoteTestedClientAgent. The page.evaluate * substitute is the dev-only deep-link test-command route (doubles and * session plumbing only, never state seeding). * * It additionally owns the SMOKE layer, which browser clients do not * have: hand-written journey flows on the untouched release binary with * the real backend, step-minimized while covering every interaction of * the app. Instructions arrive as order.prompt. */ export interface MobileAppAgent extends RemoteTestedClientAgent { readonly platform: "mobile-app"; /** The CI job definition that runs the smoke flows. */ readonly smokeJob: RemoteJobName; /** Every UI interaction this slice added or changed. */ listUiInteractions(order: WorkOrder, slice: ScenarioSlice): Promise; /** Fold interactions into the journey flows, minimizing steps. */ weaveIntoSmokeFlows(order: WorkOrder, interactions: UiInteraction[]): Promise; /** The WHOLE app's interactions no flow exercises (empty = full coverage). */ findUncoveredInteractions(order: WorkOrder): Promise; /** A smoke failure is a bug nothing else caught — fix the app, never the flow. */ fixActualCauseOfSmokeFailure(order: WorkOrder, run: TestRun): Promise; }