Connect+Documentation
Extensions

The manifest

Every connect.json field — identity, background, and the ui surfaces.

Every extension has a connect.json at its root, validated at load time (unknown keys are rejected). It declares the extension's identity, the surfaces it presents, and the capabilities it requests.

Fields

FieldRequiredTypeNotes
manifestVersion1Only 1 today.
idstringReverse-DNS-ish, e.g. com.example.hello. Immutable identity; also the on-disk dir name and the connect-extension://<id> origin.
namestringDisplay name.
versionstringDotted-numeric (1.2.10). Updates compare these numerically.
apiVersionstringThe connect.* API generation you target ("1").
descriptionstringShown in the manager and store.
icons{ [size]: path }Toolbar / manager icon; the shell picks the size nearest a toolbar slot.
backgroundobjectA headless script — see below.
contentScriptsarrayStatic content scripts — see connect.scripting.
uiobjectSurfaces: action, sidePanel, options, newTab, historyPage, bookmarksPage, panels — see below.
capabilitiesarrayThe capabilities you request — see Capabilities & consent.
commandsobjectKeyboard shortcuts — see connect.commands.
default_localestringFallback locale for connect.i18n (needs _locales/<default_locale>/messages.json).
keystringPinned signing key (base64 SPKI/DER) — the update trust anchor. See Packaging & trust.
updateUrlstring (http/https)Where to check for updates. See Packaging & trust.

background

"background": {
  "entry": "background.js",          // required: your background script
  "lifecycle": "suspendable",        // persistent | suspendable | ephemeral
  "substrate": "renderer"            // renderer (default) | worker (first-party only)
}
LifecycleBehaviour
persistentStays resident for the profile's lifetime.
suspendableStarts at boot; after ~30s idle it's told runtime.onSuspend and torn down, then woken by a subscribed event (told runtime.onResume). There is no event replay — re-establish state on resume/boot.
ephemeralNot started at boot; spun up on a wake event, torn down on idle.

substrate: "worker" runs the background in a worker_threads compute host — far lighter than a renderer, faster to wake, no DOM/window. First-party (root-signed) extensions only: a worker cannot be sandboxed like a renderer, so any other trust level is refused and gets the sandboxed renderer. The worker's connect surface is call/onEvent plus runtime/storage/alarms sugar (no Ports).

ui

"ui": {
  "action":    { "entry": "popup.html", "defaultTitle": "…", "width": 360, "height": 520 },
  "options":   { "entry": "options.html" },
  "sidePanel": { "entry": "panel.html" },
  "panels":    [{ "id": "…", "entry": "…", "title": "…" }]
}
  • action.entry is optional: omit it for a popup-less button that fires action.onClicked instead.
  • action.width / height seed the popup (bounded 150–800 × 100–600); resize it live with ui.setPopupSize.

Next

On this page