export type ToolDef = import("../types").ToolDef; /** * A connected baremobile page/device handle. baremobile ships no types, so the * surface used here is described structurally; all calls resolve to `any`. */ export type MobilePage = any; /** @typedef {import('../types').ToolDef} ToolDef */ /** * A connected baremobile page/device handle. baremobile ships no types, so the * surface used here is described structurally; all calls resolve to `any`. * @typedef {any} MobilePage */ /** * Creates mobile control tools via baremobile (optional dep). * Returns { tools, close } or null if baremobile is not installed. * * Tools follow the snapshot() → tap(ref) observe-act pattern. * Action tools auto-return a fresh snapshot so the LLM sees the result. * Supports dual platform: Android (default) and iOS via platform option. * * @param {object} [opts] - Options passed to baremobile connect() * @param {string} [opts.platform] - 'android' (default) or 'ios' * @param {string} [opts.device] - Device serial or 'auto' * @param {boolean} [opts.termux] - Use Termux ADB on-device mode * @returns {Promise<{tools: ToolDef[], close: Function}|null>} * @when you want to give an agent Android/iOS device control (tap, type, snapshot) via baremobile * @fails returns null if baremobile (optional dep) is not installed; otherwise returns {tools, close} — call close() to disconnect. * @example * const m = await createMobileTools({ platform: 'android' }); * const loop = new Loop({ provider, tools: m.tools }); */ export function createMobileTools(opts?: { platform?: string | undefined; device?: string | undefined; termux?: boolean | undefined; }): Promise<{ tools: ToolDef[]; close: Function; } | null>;