- the in-product site adapter setup flow (Create an adapter for this site)
- the repository example at
registry/examples/site-pack.example.json

Path A: Site adapter setup
On an unsupported HTTPS page, open the launcher (Create an adapter for this site). The wizard walks through:- message input
- send button
- conversation container
- user message
- AI response
- optional conversation list item
- optional new-chat button
- live outline preview and capability summary
- save / download / open a prefilled GitHub contribution flow
- pick elements on the page, or edit selectors manually
- optional AI selector draft helper that only copies a sanitized prompt when you choose to
- local save requires HTTPS
- saving may request host permission; denial leaves the saved pack disabled
- after a successful local save, reload the page so adapter modules start from a clean lifecycle
Path B: hand-written JSON
Copy the example pack toregistry/sites/<id>.json, or export a local draft from the wizard.
Do not add a $schema property inside the manifest. The repository maps Site Pack JSON files to the editor schema externally, while the runtime rejects unknown keys.
Identity and compatibility
Name and description
name / description are fallbacks. nameI18n / descriptionI18n override them for matching languages. Registry contributions that change user-facing metadata should provide all eleven project languages used by Ophel.
Match the target site
- at most ten HTTPS extension match patterns
- no global matches or top-level host wildcards
- no overlaps with built-in sites or existing packs
- self-hosted packs may use
matches: []and activate only after the user binds an exact HTTPS origin
Declare capabilities honestly
Select chat elements
- prefer stable
data-testid, stable IDs, semantic attributes, and short structural relationships - avoid generated hashes, utility-only classes, and translated visible text when a stable attribute exists
- treat positional selectors such as
:nth-child()as a last resort and document the real-browser evidence in the pull request
Configure common groups
InputextraCss is still filtered by the restricted CSS-value validator. Remote resource functions, imports, expressions, and JavaScript URLs are rejected after decoding and normalization.
Panel avoidance and theme sync
panel-avoidance requires a verified panelAvoidance block. At minimum, provide non-empty widthSelectors. Optional fields include scopeSelector, obstacleSelectors, insetSelectors, gap, and width thresholds.
themeSync is optional and is not a capability id. Use it only for sites that switch theme through explicit localStorage writes and optional <html> class toggles. See Capabilities.
Security constraints while authoring
- serialized Site Pack JSON must stay within 64 KiB
- ordinary arrays are capped at 50 items
- regexes are length-limited and checked with
safe-regex2 - same-origin path templates must start with a single
/ - never include tokens, cookies, account data, internal URLs, or user content
- never use a Site Pack to override a built-in site
- never add scripts, expressions, remote resources, or destructive automation fields
Validate and contribute
From the ophel repository:registry:build generates a local unsigned build for testing. The signed distribution used by the registry publish workflow is produced by pnpm registry:build:signed.
Then verify the declared capabilities on the real site, including:
- cold reload
- idle and generating states
- outline / export / prompt insertion if declared
- panel open and closed, for width or panel-avoidance packs