electron-agent-bridge
    Preparing search index...

    Transport-agnostic operations the runtime exposes over the control channel.

    Index
    • Parameters

      • params: {
            actions: (
                | {
                    button?: "left"
                    | "right"
                    | "middle";
                    clickCount?: number;
                    locator: {
                        css?: string;
                        exact?: boolean;
                        name?: string;
                        nth?: number;
                        ref?: string;
                        role?: string;
                        text?: string;
                    };
                    modifiers?: ("Alt" | "Control" | "Meta" | "Shift")[];
                    type: "click";
                }
                | {
                    locator: {
                        css?: string;
                        exact?: boolean;
                        name?: string;
                        nth?: number;
                        ref?: string;
                        role?: string;
                        text?: string;
                    };
                    type: "hover";
                }
                | {
                    locator: {
                        css?: string;
                        exact?: boolean;
                        name?: string;
                        nth?: number;
                        ref?: string;
                        role?: string;
                        text?: string;
                    };
                    type: "fill";
                    value: string;
                }
                | {
                    fields: {
                        locator: {
                            css?: string;
                            exact?: boolean;
                            name?: string;
                            nth?: number;
                            ref?: string;
                            role?: string;
                            text?: string;
                        };
                        value: string
                        | boolean
                        | string[];
                    }[];
                    type: "fillForm";
                }
                | {
                    locator?: {
                        css?: string;
                        exact?: boolean;
                        name?: string;
                        nth?: number;
                        ref?: string;
                        role?: string;
                        text?: string;
                    };
                    text: string;
                    type: "type";
                }
                | {
                    key: string;
                    locator?: {
                        css?: string;
                        exact?: boolean;
                        name?: string;
                        nth?: number;
                        ref?: string;
                        role?: string;
                        text?: string;
                    };
                    type: "press";
                }
                | {
                    locator: {
                        css?: string;
                        exact?: boolean;
                        name?: string;
                        nth?: number;
                        ref?: string;
                        role?: string;
                        text?: string;
                    };
                    type: "check";
                }
                | {
                    locator: {
                        css?: string;
                        exact?: boolean;
                        name?: string;
                        nth?: number;
                        ref?: string;
                        role?: string;
                        text?: string;
                    };
                    type: "uncheck";
                }
                | {
                    locator: {
                        css?: string;
                        exact?: boolean;
                        name?: string;
                        nth?: number;
                        ref?: string;
                        role?: string;
                        text?: string;
                    };
                    type: "select";
                    values: string[];
                }
                | {
                    deltaX?: number;
                    deltaY?: number;
                    locator?: {
                        css?: string;
                        exact?: boolean;
                        name?: string;
                        nth?: number;
                        ref?: string;
                        role?: string;
                        text?: string;
                    };
                    type: "scroll";
                }
                | {
                    files: string[];
                    locator: {
                        css?: string;
                        exact?: boolean;
                        name?: string;
                        nth?: number;
                        ref?: string;
                        role?: string;
                        text?: string;
                    };
                    type: "upload";
                }
                | {
                    from: {
                        css?: string;
                        exact?: boolean;
                        name?: string;
                        nth?: number;
                        ref?: string;
                        role?: string;
                        text?: string;
                    };
                    to: {
                        css?: string;
                        exact?: boolean;
                        name?: string;
                        nth?: number;
                        ref?: string;
                        role?: string;
                        text?: string;
                    };
                    type: "drag";
                }
            )[];
            continueOnError?: boolean;
            delta?: boolean;
            target?: string;
            timeoutMs?: number;
        }

      Returns Promise<
          Envelope<
              {
                  cursor?: string;
                  delta?: string;
                  observations: {
                      consoleErrors: string[];
                      dialogs: string[];
                      failedRequests: string[];
                      ipc: { channel: string; kind: string; seq: number }[];
                      navigation?: { url: string };
                      toasts: string[];
                  };
                  steps: {
                      error?: { code: string; hint?: string; message: string };
                      ok: boolean;
                      resolved?: { name: string; ref: string; role: string }[];
                      timings: { actionMs: number; settleMs: number };
                      type: string;
                  }[];
              },
          >,
      >

    • Parameters

      • params: {
            action: z.ZodRecord<z.ZodString, z.ZodUnknown>;
            store?: string;
            target?: string;
        }

      Returns Promise<Envelope<{ dispatched: true }>>

    • Parameters

      • params: {
            limit?: number;
            locator: {
                css?: string;
                exact?: boolean;
                name?: string;
                nth?: number;
                ref?: string;
                role?: string;
                text?: string;
            };
            target?: string;
        }

      Returns Promise<
          Envelope<
              {
                  matches: { line: string; name: string; ref: string; role: string }[];
                  total: number;
              },
          >,
      >

    • Returns Envelope<
          {
              targets: {
                  attached: boolean;
                  detachedReason?: | "unknown"
                  | "host-debugger"
                  | "target-closed"
                  | "crashed"
                  | "closed";
                  id: string;
                  kind: | "window"
                  | "view"
                  | "webview"
                  | "other"
                  | "worker"
                  | "serviceWorker"
                  | "offscreen";
                  name: string;
                  title: string;
                  url: string;
                  visible?: boolean;
              }[];
          },
      >

    • Parameters

      • params: {
            component?: number;
            locator: {
                css?: string;
                exact?: boolean;
                name?: string;
                nth?: number;
                ref?: string;
                role?: string;
                text?: string;
            };
            maxDepth?: number;
            path?: string;
            target?: string;
        }

      Returns Promise<
          Envelope<
              {
                  chain: string[];
                  framework: "react"
                  | "vue";
                  name: string;
                  path?: string;
                  truncated: boolean;
                  value: unknown;
              },
          >,
      >

    • Parameters

      • params: { maxDepth?: number; path?: string; store?: string; target?: string }

      Returns Promise<
          Envelope<
              {
                  path?: string;
                  store?: string;
                  stores: {
                      actions?: number;
                      kind: "generic"
                      | "redux"
                      | "zustand"
                      | "mobx";
                      name: string;
                  }[];
                  truncated: boolean;
                  value: unknown;
              },
          >,
      >

    • Parameters

      • params: {
            format?: "png" | "jpeg";
            locator?: {
                css?: string;
                exact?: boolean;
                name?: string;
                nth?: number;
                ref?: string;
                role?: string;
                text?: string;
            };
            quality?: number;
            target?: string;
        }

      Returns Promise<
          Envelope<
              {
                  base64?: string;
                  height: number;
                  mimeType: "image/png"
                  | "image/jpeg";
                  path?: string;
                  width: number;
              },
          >,
      >

    • Parameters

      • params: {
            depth?: number;
            fidelity?: "dom" | "ax";
            maxLines?: number;
            mode?: "delta" | "full";
            root?: {
                css?: string;
                exact?: boolean;
                name?: string;
                nth?: number;
                ref?: string;
                role?: string;
                text?: string;
            };
            since?: string;
            target?: string;
        }

      Returns Promise<
          Envelope<
              {
                  cursor?: string;
                  kind: "delta"
                  | "full"
                  | "unchanged";
                  lineCount: number;
                  target: string;
                  text: string;
                  title: string;
                  url: string;
              },
          >,
      >

    • Parameters

      • params: {
            condition:
                | {
                    kind: "element";
                    locator: {
                        css?: string;
                        exact?: boolean;
                        name?: string;
                        nth?: number;
                        ref?: string;
                        role?: string;
                        text?: string;
                    };
                    state?: "enabled"
                    | "visible"
                    | "attached"
                    | "detached"
                    | "hidden";
                }
                | { kind: "text"; present?: boolean; text: string }
                | { contains: string; kind: "url" }
                | { channel: string; kind: "ipc" }
                | { idleMs?: number; kind: "networkIdle" }
                | { equals: {} | null; kind: "state"; path: string; store?: string };
            target?: string;
            timeoutMs?: number;
        }

      Returns Promise<Envelope<{ elapsedMs: number; observed?: string }>>