refern.
Extensions

llms-full: one-file reference for AI coding agents

The refern extension manifest schema, @refern/plugin-sdk signatures, UI imports, the WebAssembly decoder ABI and CLI commands in one token-efficient file to give an AI coding agent.

Give this file to an AI coding agent with a starter template. It is complete for building refern extensions: use only the keys, methods and commands listed here.

0. Hard rules

  • Three tiers, set by manifest.json kind: "theme" (JSON data), "app" (web pages in a sandboxed iframe), "format" (WebAssembly decoder).
  • apiVersion is 1. id is lowercase reverse-domain (yourname.thing), permanent. version is X.Y.Z. Keep minAppVersion "1.12.0" or the refern version you test with.
  • The manifest is strict: unknown keys fail refern-cli plugin validate.
  • Paths in the manifest are package-relative, /-separated, characters A-Z a-z 0-9 . _ - + @, no .., no leading / or ., no \, no URL.
  • App pages: no fetch, XMLHttpRequest, WebSocket, localStorage, indexedDB, cookies, window.open, forms, inline <script>, or any URL outside the package (CDN scripts, web fonts, remote images). Use refern.net.fetch, refern.storage, refern.ui.openExternal, bundled assets, and blob: URLs for bytes.
  • A selection is a handle read in pages, never one array.
  • Ask for the fewest scopes. Every call can throw PluginRpcError.
  • Decoders: target wasm32-unknown-unknown, import nothing, keep the ABI in section 9 exactly, never panic, stay within 500,000,000 fuel and 128 MiB.
  • Verify before you finish: refern-cli plugin validate . must print <id> <version> is valid. (or is valid (N warning(s)).); app plugins must typecheck and build; decoders must pass node check-decoder.mjs.
  • The user loads the folder in refern with Load Developer Folder... on the Extensions page.

1. Templates

 theme-starter/ manifest.json, theme-dark.json, theme-light.json, fonts/ app-plugin-starter/ manifest.json, package.json, vite.config.ts, tsconfig.json, index.html (src/summary.tsx), sidebar.html (src/sidebar.tsx), src/shared.ts, src/styles.css -> builds dist/ wasm-decoder-starter/ manifest.json, Cargo.toml, src/lib.rs, src/abi.rs, src/decode.rs, build.mjs -> decoder.wasm, check-decoder.mjs, fuel-check/ 

Each has AGENTS.md (tier rules) and CLAUDE.md (@AGENTS.md).

2. manifest.json

 type Manifest = AppOrFormat | Theme ; interface Base { id : string ; // /^[a-z0-9]+(-[a-z0-9]+)*(\.[a-z0-9]+(-[a-z0-9]+)*)+$/, <= 64 name : string ; // 1..64 version : string ; // "1.2.3" or "1.2.3-beta.1" apiVersion : 1 ; minAppVersion ?: string ; author ?: string ; // 1..80 description ?: string ; // 1..400 homepage ?: string | null ; // https:// fundingUrl ?: string | null ; // https:// } interface Theme extends Base { kind : "theme" ; themes : string []; // 1..16 ".json" files; at most one base "dark" and one "light" used } interface AppOrFormat extends Base { kind : "app" | "format" ; entry ?: string ; // required for "app": HTML page; hidden page that gets command.run permissions : { scopes : ( "read" | "write" | "organize" )[]; // required, may be [] includeNsfw ?: boolean ; // default false: NSFW items hidden network ?: string []; // <= 32: "api.example.com" or "*.example.com"; no IP/port/path/localhost/.local/.internal managedTools ?: "exiftool" []; }; contributes ?: { commands ?: { // <= 64; registered as plugin:<pluginId>:<id> id : string ; // /^[A-Za-z][A-Za-z0-9._-]{0,63}$/, unique title : string ; // 1..80 category ?: string ; // 1..40 defaultShortcut ?: string | null ; // "Alt+Q" when ?: When ; }[]; menus ?: { // each slot <= 32 entries itemContext ?: MenuEntry []; folderContext ?: MenuEntry []; canvasItemContext ?: MenuEntry []; }; panels ?: { // <= 16 id : string ; slot : "dialog" | "metadataSidebar" ; title : string ; // 1..80 entry : string ; // HTML page size ?: "small" | "medium" | "large" ; // dialog: 400x320, 640x480 (default), 960x640 defaultHeight ?: number ; // sidebar: 48..1200 (shown <= 640), default 200 when ?: When ; // sidebar: shown only when it holds }[]; overlays ?: { id : string ; entry : string ; width : number ; height : number }[]; // <= 4; 16..640 px importSources ?: { id : string ; title : string ; subtitle ?: string ; panel : string ; }[]; // <= 4; panel = a dialog panel id formats ?: { // <= 8; "format" kind needs >= 1 extensions : string []; // 1..16, lowercase, no dot, /^[a-z0-9]{1,10}$/ wasm : string ; // ".wasm" in the package categoryHint ?: string ; // 1..32 (unused yet) maxInputBytes ?: number ; // 1..67108864 (default 64 MiB) viewer ?: { entry : string ; maxFileBytes ?: number }; }[]; settings ?: { // <= 64; shown on the Extensions page key : string ; // /^[A-Za-z][A-Za-z0-9_]{0,63}$/ type : "boolean" | "string" | "number" | "select" | "secret" ; label : string ; // 1..120 description ?: string ; // 1..400 default ?: boolean | string | number | null ; // matches type; never for "secret" maxLength ?: number ; min ?: number ; max ?: number ; step ?: number ; options ?: { value : string ; label : string }[]; // required for "select", 1..64 }[]; }; } interface MenuEntry { command : string ; group ?: string ; when ?: When ; } // command = a command id of this manifest 

Scopes: read = read items, folders, tags, creators, groups, smart folders, search, changes, selection, thumbnails. write = items.update, create tags/creators/folders/groups, links, imports, undo. organize = rename, move, copy, trash files; edit/delete tags and creators; smart folders.

Command routing: a command id equal to an overlay id opens the overlay; equal to a dialog panel id opens the dialog; otherwise the hidden entry page gets event command.run { commandId, args }. Menu args: { menu, entityId | null, selectionCount }. Users bind keys in Settings > Shortcuts > Extensions and tools.

importSources gates imports.enqueueUrls, and each one of an enabled extension shows in the import dialog, the Create menu and a folder's right-click menu. A click opens its panel with init context { importSourceId, folderId | null }. A format viewer page opens in the file viewer for files of its extensions.

Minimal app manifest:

 { "id" : "yourname.hello" , "name" : "Hello" , "version" : "0.1.0" , "apiVersion" : 1 , "minAppVersion" : "1.12.0" , "kind" : "app" , "entry" : "dist/index.html" , "permissions" : { "scopes" : [ "read" ] }, "contributes" : { "commands" : [{ "id" : "hello" , "title" : "Say Hello..." }], "panels" : [ { "id" : "hello" , "slot" : "dialog" , "title" : "Hello" , "entry" : "dist/index.html" , "size" : "small" } ] } } 

Minimal format manifest:

 { "id" : "yourname.xyz-preview" , "name" : "XYZ Previews" , "version" : "0.1.0" , "apiVersion" : 1 , "minAppVersion" : "1.12.0" , "kind" : "format" , "permissions" : { "scopes" : [] }, "contributes" : { "formats" : [{ "extensions" : [ "xyz" ], "wasm" : "decoder.wasm" }] } } 

3. when expressions

Atoms joined by && (no ||, no parentheses, <= 256 chars): selection.nonEmpty, selection.single, selection.multiple, selection.singleFile, selection.hasFiles, selection.hasImages, selection.hasVideos, selection.ext:<ext> (selection.ext:psd), view.grid, view.viewer, view.canvas, !popout.

4. Theme JSON

 { "id" : "my-theme-dark" , "name" : "My Theme Dark" , "base" : "dark" , "colors" : { "background" : "22 24 29" , "surface" : "30 33 40" , "on-background" : "236 238 243" , "on-surface" : "236 238 243" }, "fonts" : [ { "role" : "sans" , "family" : "My Sans" , "file" : "fonts/MySans.woff2" , "weight" : 400 , "style" : "normal" } ] } 
  • id /^[a-z0-9][a-z0-9._-]{0,63}$/; name 1..64; base "light"|"dark".
  • Color value: exactly "R G B", integers 0..255, single spaces.
  • Tokens: primary secondary accent neutral info success warning danger favourite rating focus-ring drop drop-fill background surface surface-elevated surface-raised border shadow on-primary on-secondary on-accent on-neutral on-background muted on-surface on-danger on-warning on-info on-success. Required: background surface on-background on-surface.
  • Contrast >= 4.5:1 required for on-background/background and on-surface/surface; keep it also for muted on background and surfaces, on-surface on surface-elevated and surface-raised, and each on-X on X.
  • WCAG ratio: L = 0.2126 R + 0.7152 G + 0.0722 B with each channel c/255 <= 0.04045 ? c/255/12.92 : ((c/255 + 0.055)/1.055)^2.4; ratio = (Lmax + 0.05) / (Lmin + 0.05).
  • fonts: <= 2, one per role "sans"|"serif"; family /^[A-Za-z0-9][A-Za-z0-9 _-]{0,63}$/; file .ttf|.otf|.woff|.woff2 from the package top; keep theme files at the package top.
  • backgroundImage: optional { file, opacity?, blur?, fit?, position? } for the outer window shell frame (main content area stays opaque surface). file /^[A-Za-z0-9_-][A-Za-z0-9._/-]{0,127}\.(png|jpe?g|webp|avif)$/i (<= 16 MiB); opacity 0.05..1 (default 0.45); blur 0..64 (default 0); fit "cover"|"contain"|"repeat"; position "center"|"top"|"bottom"|"left"|"right".

5. @refern/plugin-sdk API

 import { refern, PluginRpcError } from "@refern/plugin-sdk" ; refern. ready (): Promise < InitMessage > ; // InitMessage: { pluginId, frameId, locale, workspaceId: string | null, context?: unknown, // themeTokens, dataTheme: "light" | "dark", reducedMotion } refern. on (event, handler): () => void ; // see section 6 refern.client.inHost: boolean; // false outside refern refern.client. onTheme (handler): () => void ; // Library (scope in brackets). Params follow the Local API; unknown fields -> invalid_field. refern.items. get ({ id, include? }): { item: Item } // [read] refern.items. batch ({ ids /* <=200 */ , include? }): { items: Item[]; missing: string[] } // [read] refern.items. list ({ folderId?, rootId?, kinds?, include?, cursor?, limit? }): { items; nextCursor } // [read] refern.items. update ({ itemIds /* <=500 */ , set?, tags?: { add?, remove?, clear? }, links?: { add?, remove? }, createMissing?, dryRun? }): { changeId? } // [write] refern.items. similar ({ id, mode?: "visual" | "meaning" }): { items } // [read] refern.items. getThumbnail ({ id, maxEdge? /* 16..2048, 512 */ }): { bytes : ArrayBuffer; mimeType; width; height } // [read] refern.folders. list ({ parentId?, rootId?, includeHidden?, cursor?, limit? }): { folders; nextCursor } // [read] refern.folders. get ({ id }): { folder } // [read] refern.folders. create ({ parentId? | rootId?, name }): WriteResult // [write] refern.tags. list ({ query?, cursor? }): { tags; nextCursor } refern.tags. get ({ id }) // [read] refern.tags. create ({ name, ... }): WriteResult // [write] refern.tags. edit ({ id, set }) / refern.tags. delete ({ ids }): WriteResult // [organize] refern.creators. list ({ query?, cursor? }) // [read] refern.creators. create ({ name, url? }) / refern.creators. setForItem ({ id, creatorIds }) // [write] refern.groups. get ({ id }): { group; members; membersTruncated } // [read] refern.groups. create (p) / edit ({ id, ... }) / merge (p) / dissolve ({ id }) // [write] refern.links. add (p) / refern.links. remove (p) // [write] refern.smartFolders. get (): { smartFolders; revision } // [read] refern.search. text ({ text?, tagNames?, tagIds?, tagMode?: "all" | "any" | "exact" | "none" | "untagged" , excludeTagNames?, folderId?, recursive?, kinds?, favourite?, nsfw?, ratingMin?, colorLabels?, creatorIds?, hasDescription?, hasNotes?, source?, addedAfter?, addedBefore?, sort?, direction?: "asc" | "desc" , limit? }): { items; truncated } // [read] refern.search. semantic ({ text, limit? }) / refern.search. color ({ color, folderId?, limit? }) // [read] refern.changes. list ({ cursor? }) [read] refern.changes. undo ({ changeId }) [write] // Selection (a lease; ends after 5 idle min, on frame close, or another library; <= 8 per frame) refern.selection. current (): { handle; count; workspaceId } | null // [read] refern.selection. page ({ selection: handle, cursor?, limit? /* <=500, 100 */ }): { items : Item[]; cursor : string | null } // [read] refern.selection. release ({ selection: handle }) // UI refern.ui. toast ({ message /* <=200 */ , kind?: "info" | "success" | "error" }) // 3 per 5 s refern.ui. openDialog ({ panelId, context? }) // needs a recent click/key refern.ui. closeOverlay () // closes this dialog/overlay refern.ui. openExternal ({ url /* https */ }) // user confirms; needs a click refern.ui. pickExportFolder (): { folder; name } | null // opaque token; needs a click // Commands refern.commands. list (): { id; title; category?; shortcut? }[] // app commands allowed by scopes refern.commands. execute (commandId, args ? ) // args: flat JSON values // Settings, storage, network refern.settings. getAll () : Record < string, unknown > // non-secret: stored ?? default ?? null refern.settings. getSecret ({ key }): string | null // a "secret" setting of this manifest refern.storage. get ({ key }) / set ({ key, value }) / delete ({ key }) / keys () // JSON, <=4 MiB total, key <=256 refern.net. fetch (url, { method?, headers?, body?: string | ArrayBuffer }): { status; headers: Record < string,string>; body: ArrayBuffer } // https, default port, host in permissions.network (each redirect too, <=5), no private/loopback // addresses, <=32 headers (not Host/Cookie/Origin/Referer/Proxy-*/Sec-*/...), send <=2 MiB, // read <=32 MiB, 30 s. "{{secret:<key>}}" in a header value -> the secret, filled by refern. // Imports, viewer, Managed ExifTool refern.imports. enqueueUrls ({ folderId?, items: { url; tags? }[], tags?, createMissing? }) // [write] + an importSources entry; https URLs only refern.imports. checkOrigins ({ origins: { source; item }[] }): { present: { source; item; itemId }[] } // [read] refern.viewer. readCurrentFile (): { bytes: ArrayBuffer; name; extension } // formats[].viewer frame refern.tools.exiftool. status ({ entityId? }): { installed; version; canWrite?; canInspect? } // managedTools: ["exiftool"]; with entityId, whether this extension can read and write that file now refern.tools.exiftool. inspect ({ entityId }): Record < string, unknown > // + [read] refern.tools.exiftool. write ({ selection? | entityIds?, fields: { keywords?, hierarchicalKeywords?, creators?, description?, rating?, source?, copyright?: string | null }, mode: "inPlace" | "exportCopies" , exportFolder?, descriptionSource?: "description" | "sourceDescription" | "descriptionOrSource" }): { updated; skippedReadOnly; skippedUnsupported; skippedPlaceholder; failed } // + [write] 

Item: \{ id, kind: "image"|"video"|"canvas"|"file"|"folder"|"group", name, path: null, folderId, folderPath, rootId, sourceEntityId, width, height, sizeBytes, extension, createdAt, updatedAt, hidden, missing, tags: \{ id, name \}[], inferredTags, creatorIds, description, notes, sourceName, sourceUrl, webLinks, rating, colorLabel, favourite, nsfw, pixelated, thumbnailUrl \}. Get the type in TypeScript with type Item = Awaited<ReturnType<typeof refern.items.get>>["item"].

Limits: 16 calls in flight per frame (more wait), 2 MiB params, 30 s timeout (net.fetch 35 s, imports.enqueueUrls 90 s, viewer 60 s, pickExportFolder 10 min, exiftool inspect 20 s, write 30 min).

6. Events, context, errors

Events (refern.on(name, (payload) => ...)): selection.changed { count }; items.changed { kinds } (Local API and extension writes, not edits in refern's own panels); settings.changed null; workspace.changed { workspaceId }; command.run { commandId, args } (hidden entry page only; register at top level).

init.context: sidebar one item { workspaceId, entityIds: [id] }; sidebar several { workspaceId, selectionCount }; dialog or overlay from a command { commandId, args }; ui.openDialog your context. frameId: "entry", "dialog:<id>", "panel:<id>", "overlay:<id>", "viewer" (a format viewer).

PluginRpcError: { code, message, details }. Codes: scope_required, forbidden, not_found, invalid_request, invalid_field, limit_exceeded, needs_user_action, no_workspace, workspace_changed, unavailable, busy, network_refused, timeout, no_host, internal.

7. UI controls

 import { PluginShell, usePluginContext, // root + { init, theme } FButton, // variant "filled"|"primary"|"outline"|"danger"|"ghost"; size "xs"|"sm"|"md" IconButton, MenuButton, DropdownMenu, type DropdownItem, FSwitch, // checked, onCheckedChange, size "sm"|"md" FCheckbox, FSlider, FToggleGroup, FTextField, // input props; multiline for textarea; size "sm"|"md" SearchField, TagChip, LabelBadge, ProgressBar /* value 0..100 or null */ , Collapsible, Tooltip, TooltipProvider, icons, // icons.IconRefresh, icons.IconTag, icons.IconImage, ... } from "@refern/plugin-sdk/ui" ; import "@refern/plugin-sdk/ui.css" ; // once per page 

Controls have no built-in text: pass labels as props. Wrap each page's tree in <PluginShell>. CSS colors: rgb(var(--color-<token>)), alpha rgb(var(--color-<token>) / 0.5); tokens as in section 4 plus highlight; fonts var(--font-sans), sans-serif. Tailwind 3 (optional): theme from @refern/plugin-sdk/tailwind-theme.

8. App page and build

 <! doctype html > < html lang = "en" > < head > < meta charset = "UTF-8" /> < title >Hello</ title > </ head > < body > < div id = "root" ></ div > < script type = "module" src = "./src/hello.tsx" ></ script > </ body > </ html > 
 // vite.config.ts import react from "@vitejs/plugin-react" ; import { defineConfig } from "vite" ; export default defineConfig ({ base: "./" , // relative asset paths plugins: [ react ()], css: { postcss: { plugins: [] } }, build: { outDir: "dist" , emptyOutDir: true , target: "safari15" , rollupOptions: { input: { index: "index.html" /* one entry per page */ } }, }, }); 
 // src/hello.tsx import { refern } from "@refern/plugin-sdk" ; import { FButton, PluginShell } from "@refern/plugin-sdk/ui" ; import "@refern/plugin-sdk/ui.css" ; import { createRoot } from "react-dom/client" ; function Hello () { return ( < FButton variant = "primary" size = "sm" onClick = {() => void refern.ui. toast ({ message: "Hello." , kind: "success" }) } > Say Hello </ FButton > ); } createRoot (document. getElementById ( "root" ) ! ). render ( < PluginShell > < Hello /> </ PluginShell >, ); 

tsconfig.json: "moduleResolution": "bundler", "jsx": "react-jsx", "types": ["vite/client"] (for CSS imports), "strict": true. Dependencies: @refern/plugin-sdk, react, react-dom (19); dev: @refern/cli, vite, @vitejs/plugin-react, typescript, @types/react, @types/react-dom. Escape inside a focused dialog or overlay frame closes it: the SDK calls refern.ui.closeOverlay(), except in a text field, an editable element, an open menu or list box, or when your keydown handler called event.preventDefault().

9. Format decoder ABI (Rust)

Exports (exact): memory, refern_alloc(u32) -> u32, refern_decode(in_ptr, in_len, max_edge, cfg_ptr, cfg_len: u32) -> u64. refern_dealloc(u32, u32) is optional: refern never calls it. No imports at all. Per file: fresh instance, 500,000,000 fuel (every wasm instruction counts, including local.get), 128 MiB memory, input <= maxInputBytes (64 MiB). refern passes max_edge 2560 and cfg = the settings JSON ("{}" when none).

Result: ((32u64) << 32) | header_ptr; header = 8 little-endian u32: status (0 ok, 1 unsupported -> OS preview, 2 corrupt -> no preview), preview_w, preview_h (1..4096), canvas_w, canvas_h (0 = preview size), flags (bit 0 pixelated), rgba_ptr, rgba_len (= wh4, straight RGBA). Trap or bad header = no preview; 5 traps per pass = skipped.

 // Cargo.toml: [lib] crate-type = ["cdylib"]; [profile.release] opt-level = 3, // lto = true, codegen-units = 1, panic = "abort", strip = true; [workspace] mod abi ; // copy src/abi.rs from wasm-decoder-starter unchanged mod decode ; // fn decode(data: &[u8], max_edge: u32) -> Result<abi::Image, abi::Fail> #[no_mangle] pub extern "C" fn refern_alloc (len : u32 ) -> u32 { abi :: alloc_bytes (len) } #[no_mangle] pub extern "C" fn refern_dealloc (ptr : u32 , len : u32 ) { unsafe { abi :: dealloc_bytes (ptr, len) } } #[no_mangle] pub extern "C" fn refern_decode (in_ptr : u32 , in_len : u32 , max_edge : u32 , _cfg_ptr : u32 , _cfg_len : u32 ) -> u64 { let data = unsafe { abi :: bytes (in_ptr, in_len) }; abi :: finish ( decode :: decode (data, abi :: max_edge (max_edge))) } // abi::Image { width, height, canvas_w, canvas_h, flags, rgba: Vec<u8> } // abi::Fail::Unsupported (not my format / too large) | abi::Fail::Corrupt 

Fuel tips: write pixels as [u8; 4] (vec![[0u8; 4]; n], then into_flattened()), keep channels in locals, avoid per-byte Result helpers, precompute per-column work; estimate fuel from the image size and return Unsupported above about 80% of the limit. Measure with cargo run --release --manifest-path fuel-check/Cargo.toml -- decoder.wasm <file>.

10. CLI

Installed from npm (@refern/cli, refern-cli command, 0.3.0+, Node 20+):

 npx @refern/cli plugin init < di r > [--template app | theme | wasm-format] [--id < i d > ] [--name < nam e > ] npx @refern/cli plugin validate < di r > # strict manifest, theme colors/contrast, files exist npx @refern/cli plugin pack < di r > [--out < fil e > ] # -> <id>-<version>.refernplugin + SHA-256 # Extension directory (a clone of github.com/refern-labs/refern-extensions): npx @refern/cli plugin submit < di r > --registry < clon e > /registry --release < owner/repo@ta g > --category < nam e > npx @refern/cli plugin check-entry < clon e > /registry/ < i d > # the registry's checks, before the pull request # Library commands (need Local API on + REFERN_API_TOKEN or --token): npx @refern/cli status | workspaces | search < tex t > | tag add | remove | import < url.. . > npx @refern/cli api < metho d > < /v1/pat h > [--body < jso n >| @ <file> | -] [--query k=v]... [--idempotency-key < k > ] [--out < fil e > ] # --json on any command; exit 0 ok, 1 failed, 2 usage. In Git Bash on Windows write v1/... (no leading /). 

The package holds manifest.json, README/LICENSE, every named file and the top-level folders that hold them (dist/), never src/, node_modules/ or dot files. Limits: 2,000 files, 64 MiB per file, 128 MiB in all, no links.

Decoder: node build.mjs (cargo build + copy to decoder.wasm), node check-decoder.mjs (ABI self-test), node check-decoder.mjs <file> --out preview.png.

Extension directory (refern.app/extensions; full guide: publishing.md, rules: developer-policy.md):

  • Requirements: public GitHub repository with an OSI license GitHub detects; README.md in the package; author, description and minAppVersion in the manifest; ID under your own name (refern. is reserved, no ID or name one edit away from a listed one); "refern" in a name only as "... for refern"; free (a fundingUrl is fine).
  • Images: icon.png 256 x 256 PNG; screenshot-1 to screenshot-6 (.png, .webp or .jpg) 1600 x 1000; each at most 500 KB.
  • Flow: push a version tag (the starter templates' release.yml packs and publishes the GitHub release) -> plugin submit -> one pull request that changes only registry/<id>/. Later versions: only publish a release; the registry opens the update within 3 hours and merges it on its own when the checks pass, the permissions did not grow and the release is in the pinned repository.
  • Blocks: the kill list in the index; the app turns a blocked extension off at its next index read (at start, every 24 hours).

11. Load, reload, troubleshoot

  • Load: Load Developer Folder... on the Extensions page (the folder with manifest.json). Install a package: Install from File.... Themes: choose in Settings > General > Custom Theme.
  • Reload: code/CSS -> reopen the dialog (sidebar: select another item and back). manifest.json -> turn the extension off and on (or load the folder again). Theme -> choose Built-in, then the theme again. decoder.wasm -> load the folder again; raise version to redo old thumbnails.
  • "not a valid refern extension" -> run validate. app_too_old -> lower minAppVersion. Empty frame -> build dist/. scope_required -> add the scope, toggle the extension. network_refused -> add the host. needs_user_action -> call from a click handler.

Extension developer policy

The rules for extensions in the refern directory: public source, OSI licenses, no paid extensions, names and IDs, content, privacy, abandoned extensions, ownership transfer and enforcement.

On this page

0. Hard rules1. Templates2. manifest.json3. when expressions4. Theme JSON5. @refern/plugin-sdk API6. Events, context, errors7. UI controls8. App page and build9. Format decoder ABI (Rust)10. CLI11. Load, reload, troubleshoot