The Bridge SDK is automatically injected into every app's HTML via the window.dench object. It provides various namespaces to interact with the platform, databases, agents, and UI. All methods return Promises and have a 30-second timeout. Accessing these namespaces requires specific permissions defined in your app manifest.
| Namespace | Permission | Methods | Details In |
| ----------------- | ----------------------------- | ---------------------------------------------------------------------------------------------------- | ----------------- |
| `dench.db` | `database` / `database:write` | `query(sql)`, `execute(sql)` | **data-builder** |
| `dench.objects` | `objects` | `list()`, `get()`, `create()`, `update()`, `delete()`, `bulkDelete()`, `getSchema()`, `getOptions()` | **data-builder** |
| `dench.files` | `files` / `files:write` | `read()`, `list()`, `write()`, `delete()`, `mkdir()` | below |
| `dench.app` | _(none)_ | `getManifest()`, `getTheme()` | below |
| `dench.chat` | `agent` | `createSession()`, `send()`, `getHistory()`, `getSessions()`, `abort()`, `isActive()` | **agent-builder** |
| `dench.agent` | `agent` | `send(message)` | **agent-builder** |
| `dench.tool` | `agent` | `register(name, handler)` | **agent-builder** |
| `dench.memory` | `agent` | `get()` | **agent-builder** |
| `dench.ui` | `ui` | `toast()`, `navigate()`, `openEntry()`, `setTitle()`, `confirm()`, `prompt()` | **platform-api** |
| `dench.store` | `store` | `get()`, `set()`, `delete()`, `list()`, `clear()` | **platform-api** |
| `dench.http` | `http` | `fetch(url, opts)` | **platform-api** |
| `dench.events` | `events` | `on(channel, cb)`, `off(channel)` | **platform-api** |
| `dench.context` | _(none)_ | `getWorkspace()`, `getAppInfo()` | **platform-api** |
| `dench.apps` | `apps` | `send()`, `on()`, `list()` | **platform-api** |
| `dench.cron` | `cron` | `schedule()`, `list()`, `run()`, `cancel()` | **platform-api** |
| `dench.webhooks` | `webhooks` | `register()`, `on()`, `poll()` | **platform-api** |
| `dench.clipboard` | `clipboard` | `read()`, `write()` | **platform-api** |