import type { ToolContext } from "../context.js"; import { z } from "../define-tool.js"; export declare const FLOW_BLOCKED_ACTIONS: Set; /** * Check whether an action is allowed in flow_batch / flow_run / flow_parallel. * * Strategy: blocklist instead of allowlist. Any registered tool or alias is * allowed unless it is in FLOW_BLOCKED_ACTIONS. This eliminates the need * to maintain a 50+ entry hardcoded allowlist that goes stale with every * new tool or alias. */ export declare function isFlowActionAllowed(actionName: string): boolean; export declare const FLOW_MAX_STEPS: 20; export declare const BATCH_MAX_COMMANDS = 50; export declare const FLOW_MAX_DURATION: 60000; export declare const FLOW_MAX_REPEAT = 10; export declare const PARALLEL_MAX_DEVICES = 10; export interface FlowStep { action: string; args?: Record; if_not_found?: "skip" | "scroll_down" | "scroll_up" | "fail"; repeat?: { times?: number; until_found?: string; until_not_found?: string; }; on_error?: "stop" | "skip" | "retry"; label?: string; } export interface FlowStepResult { step: number; action: string; label?: string; success: boolean; message: string; durationMs: number; } /** ContentBlock for turbo multi-content responses */ export type ContentBlock = { type: "text"; text: string; } | { type: "image"; data: string; mimeType: string; }; /** * Collect compact UI tree: interactive elements, no passwords, redacted input text. * Returns pipe-separated one-liner like: Button "Login" | EditText [input] | TextView "Welcome" */ export declare function collectCompactUiTree(ctx: ToolContext, platform: string): Promise; export interface FastTrackResult { message: string; uiCompact: string; } /** * Try to execute a step via fast-track (1 ADB call for action + UI dump). * Returns null if the step can't be fast-tracked → caller falls through to handleTool. */ export declare function turboFastTrack(step: FlowStep, ctx: ToolContext, platform: string, deviceId?: string): Promise; /** Collect brief UI context for diagnostics on flow step failure */ export declare function collectFailureDiag(ctx: ToolContext, platform: string, stepIndex: number): Promise; /** Capture a compressed screenshot for turbo mode. Returns base64 data or null on failure. */ export declare function captureTurboScreenshot(ctx: ToolContext, platform: string): Promise<{ data: string; mimeType: string; } | null>; export interface TurboStepContext { uiTree?: string; hasScreenshot?: boolean; } export declare function formatFlowResults(results: FlowStepResult[], totalMs: number, diagBlock?: string, turboContexts?: Map): string; export declare const platformEnum: z.ZodOptional>; export declare const batchCommandSchema: z.ZodObject<{ name: z.ZodString; arguments: z.ZodOptional>; }, z.core.$strip>; export declare const flowStepSchema: z.ZodObject<{ action: z.ZodString; args: z.ZodOptional>; if_not_found: z.ZodOptional>; repeat: z.ZodOptional; until_found: z.ZodOptional; until_not_found: z.ZodOptional; }, z.core.$strip>>; on_error: z.ZodOptional>; label: z.ZodOptional; }, z.core.$strip>; //# sourceMappingURL=common.d.ts.map