Reads Antigravity's internal state from the SQLite database.

Uses sql.js (pure JavaScript SQLite, compiled to WASM) which is verified to work in Antigravity's Extension Host (unlike better-sqlite3 which fails due to ABI mismatch with Electron v22.21.1 / ABI v140).

const bridge = new StateBridge();
await bridge.initialize();

const prefs = await bridge.getAgentPreferences();
console.log(prefs.terminalExecutionPolicy);

Implements

Constructors

Methods

  • Get all stored USS keys from the state database.

    Returns Promise<string[]>

    List of key names related to Antigravity (excludes sensitive keys)

  • Read a raw value from the state database.

    Parameters

    • key: string

      The SQLite key to read

    Returns Promise<null | string>

    The raw string value, or null if not found

    If the key is sensitive or read fails

  • Initialize the state bridge by locating and opening state database.

    Returns Promise<void>

    If the database cannot be found