-
Notifications
You must be signed in to change notification settings - Fork 41
api index
One table per surface. Use this to grep for a method, see its status at a glance, and jump to its full reference.
Status legend — same as the rest of the docs:
- Stable — shipping, backwards-compatible inside the current major.
- Experimental — shipping but signature may still change.
- Planned — reserved name, not yet fired.
The full surface is documented in javascript-reference.md. This table indexes the most-used members — for the exhaustive inventory, use the reference.
| Member | Signature | Status |
|---|---|---|
whenReady |
( cb: () => void ) => void |
Stable |
ready |
( cb: () => void ) => void (alias of whenReady, idiomatic)
|
Stable |
isReady |
() => boolean |
Stable |
isActive |
() => boolean (true iff the desktop shell is mounted)
|
Stable |
config |
DesktopConfig (shell config blob)
|
Stable |
HOOKS |
typeof HOOKS (typed hook-name constants)
|
Stable |
hooks |
wp.hooks bridge |
Stable |
saveSession |
() => void |
Stable |
registerWindowAction / unregisterWindowAction / listWindowActions
|
( def: WindowActionDef ) => void (rows in every window's ⋯ menu, as verbs or checkboxes; label/icon/isVisible/checked may be per-window functions)
|
Experimental |
electron |
ElectronAdapterApi (set a window free into a real OS window; published by the Electron Adapter extension, absent in a browser)
|
Experimental |
| Member | Signature | Status |
|---|---|---|
fetch |
( input, init?, opts? ) => Promise<Response> (routed fetch — pulses title-bar dot)
|
Stable |
confirm |
( opts: OsConfirmOptions ) => Promise<boolean> (replaces window.confirm)
|
Stable |
notify |
( opts: NotifyOptions ) => () => void (local notification w/ fallback; returns a dismiss function)
|
Stable |
loadComponents |
( tags?: readonly string[] ) => Promise<void> (make <os-*> tags upgrade; the runtime route to the kit for plugins that can't import it)
|
Stable |
getWindowParams |
( id: string ) => Record<string, string | number | boolean> | undefined (what an open window is showing now)
|
Stable |
registerNativeUrlRemap |
( entry: NativeUrlRemap ) => () => void (claim an admin URL for a native window)
|
Stable |
| Member | Signature | Status |
|---|---|---|
windowManager |
WindowManager instance |
Stable |
openWindow |
( id: string, opts?: { source?: string } ) => boolean |
Stable |
openNewWindow |
( id: string, opts?: { source?: string } ) => boolean (always spawns a new instance)
|
Stable |
registerWindow |
( def: NativeWindowDef ) => Promise<Window> |
Stable (returns a Promise)
|
cloneTemplate |
( templateOrId: string | HTMLTemplateElement ) => DocumentFragment |
Stable |
onWindow |
( id, handlers, opts? ) => () => void |
Stable |
connect |
( windowId, opts? ) => ConnectionHandle |
Stable |
getWindowConfig |
<T>( id: string ) => T | undefined |
Stable |
setDefaultWindow |
( url: string | null ) => Promise<void> |
Stable |
deriveWindowId |
( url: string, adminUrl?: string ) => string |
Stable |
debug.window |
( id: string ) => DesktopDebugWindow | null |
Stable |
| Member | Signature | Status |
|---|---|---|
dock |
Dock | null (primary / bottom rail)
|
Stable |
sideDock |
Dock | null (left rail; classic only)
|
Stable |
desktopLayout |
'classic' | 'unified' |
Stable |
dockPlacement |
'bottom' | 'left' | 'right' (Unified)
|
Stable |
Dock.setBadge |
( id: string, count: number ) => void |
Stable |
Dock.removeSystemItem |
( id: string ) => void |
Stable |
icons |
IconsApi (see icons.setBadge)
|
Stable |
icons.setBadge |
( iconId: string, count: number ) => void |
Stable |
iconSet |
OsIconSetApi (the thirty-icon set; unrelated to icons)
|
Stable |
iconSet.svg |
( name: string, options?: OsIconOptions ) => string |
Stable |
iconSet.node |
( name: string, options?: OsIconOptions ) => SVGSVGElement |
Stable |
iconSet.dataUri |
( name: string, options?: OsIconOptions ) => string |
Stable |
registerSystemTile |
( item: SystemDockItem ) => void |
Stable |
listSystemTiles |
() => Array<{ id, title, icon, navKind, placeable, locked }> |
Stable |
getSystemTile |
( id: string ) => SystemDockItem | null |
Stable |
getMenuItems |
() => DockItem[] |
Stable |
getNavItems |
() => NavItem[] (every menu, app and control, with its kind)
|
Stable |
getNav |
() => NavResult | null (the computed dock zones, sidebar, wallpaper, and running-only ids)
|
Stable |
widgetLayer |
WidgetLayer | null |
Stable |
registerWidget |
( def: WidgetDef ) => void |
Stable |
registerWallpaper |
( def: WallpaperDef ) => void |
Stable |
wallpaper |
WallpaperSuspendApi (suspend( reason ) / resume( reason ) / isSuspended() — refcounted wallpaper pause)
|
Experimental |
games |
GamesApi (register / unregister / list / get / subscribe / launch / getPlaytime — desktop games + unified scoreboard)
|
Experimental |
mio |
MioApi (isEnabled / enable / disable / toggle / getPosition / setPosition / getConfig / setConfig / setStyle / getLook / commitStyle / resetStyle — the soft-body desk companion; see mio.md)
|
Experimental |
| Member | Signature | Status |
|---|---|---|
createSharedStore |
<T>( key: string, init: () => T ) => SharedStore<T> |
Stable |
activity |
ActivityApi (typed pub/sub bus)
|
Stable |
heartbeat |
HeartbeatBus (WordPress Heartbeat bridge)
|
Stable |
broadcast |
<T>( topic: string, payload: T ) => void (cross-window)
|
Stable |
subscribe |
( topic: string, cb ) => () => void (cross-window)
|
Stable |
| — topic family |
os.<type>.changed (content-change realtime; { source, action, ids })
|
Stable |
presence |
PresenceApi |
Stable |
selection |
SelectionApi (active(), resolveCommonActions(), createModel())
|
Experimental |
| Member | Signature | Status |
|---|---|---|
registerCommand |
( def: CommandDef ) => void |
Stable |
unregisterCommand |
( id: string ) => void |
Stable |
listCommands |
() => CommandDef[] |
Stable |
registerPalette |
( def: PaletteDef ) => void |
Experimental |
ai.ask |
( prompt: string, opts? ) => Promise<AiAnswer> |
Experimental |
registerSettingsTab |
( def: SettingsTabDef ) => void |
Stable |
subscribeOsSettings |
( cb ) => () => void |
Stable |
updateOsSettings |
( patch, opts? ) => void |
Stable |
| Member | Signature | Status |
|---|---|---|
registerTitleBarButton |
( def: TitleBarButtonDef ) => void |
Stable |
unregisterTitleBarButton |
( id: string ) => void |
Stable |
listTitleBarButtons |
() => TitleBarButtonDef[] |
Experimental |
registerUnfocusEffect |
( def: UnfocusEffectDef ) => void |
Experimental |
unregisterUnfocusEffect |
( id: string ) => void |
Experimental |
listUnfocusEffects |
() => UnfocusEffectDef[] |
Experimental |
registerWindowReveal |
( def: WindowRevealDef ) => void |
Experimental |
unregisterWindowReveal |
( id: string ) => void |
Experimental |
listWindowReveals |
() => WindowRevealDef[] |
Experimental |
registerWindowLinkRenderer |
( def: WindowLinkRendererDef ) => void |
Experimental |
unregisterWindowLinkRenderer |
( id: string ) => void |
Experimental |
listWindowLinkRenderers |
() => WindowLinkRendererDef[] |
Experimental |
relations.get |
( windowId: string ) => WindowContentRef | undefined |
Experimental |
relations.set |
( windowId: string, ref: WindowContentRef | null ) => void |
Experimental |
relations.groups |
() => WindowLinkGroup[] |
Experimental |
relations.edges |
() => WindowLinkEdge[] |
Experimental |
relations.groupOf |
( windowId: string ) => WindowLinkGroup | undefined |
Experimental |
relations.related |
( windowId: string ) => string[] |
Experimental |
relations.subscribe |
( cb: () => void ) => () => void |
Experimental |
registerWindowTheme |
( def: WindowThemeDef ) => void |
Stable |
registerWindowControl |
( def: WindowControlDef ) => void |
Stable |
registerWindowSlot |
( def: WindowSlotDef ) => void |
Stable |
registerWindowChrome |
( def: WindowChromeDef ) => void |
Experimental |
desktopThemes.list |
() => DesktopThemeEntry[] |
Experimental |
desktopThemes.getActive |
() => string | null |
Experimental |
desktopThemes.setActive |
( themeId: string ) => void |
Experimental |
desktopThemes.ensureFull |
() => Promise<void> |
Experimental |
desktopThemes.subscribe |
( cb ) => () => void |
Experimental |
desktopThemes.resolveIcon |
( slot: string ) => string | null |
Experimental |
desktopThemes.applyRecommendedOsSettings |
( themeId?: string ) => RecommendedOsSettings |
Experimental |
| Member | Signature | Status |
|---|---|---|
files.registerType |
( def: FileTypeDef ) => void |
Experimental |
files.resolve |
( serialized ) => DesktopFile | null |
Experimental |
files.getTypes |
() => FileTypeDef[] |
Experimental |
files.open |
( file: DesktopFile ) => void |
Experimental |
files.registerOpener |
( def: FileOpenerDef ) => void |
Experimental |
| Member | Signature | Status |
|---|---|---|
pwa.promptInstall |
() => Promise<'accepted' | 'dismissed' | 'unavailable'> |
Stable |
pwa.undismissInstallHint |
() => void |
Stable |
pwa.getState |
() => { installHintDismissed: boolean, notificationsEnabled: boolean } |
Stable |
pwa.subscribe |
( cb: ( state ) => void ) => () => void |
Stable |
pwa.requestNotificationPermission |
() => Promise<'granted' | 'denied' | 'default' | 'unsupported'> |
Stable |
pwa.getNotificationPermission |
() => 'granted' | 'denied' | 'default' | 'unsupported' |
Stable |
| Member | Signature | Status |
|---|---|---|
dragManager |
DragManager (in-shell drag)
|
Stable |
dragBridge |
DragBridge (cross-iframe drag)
|
Stable |
Inside an iframe window, after the chromeless bridge installs the API:
| Member | Signature | Status |
|---|---|---|
iframe.publish |
( channel: string, payload? ) => void |
Stable |
iframe.subscribe |
( channel, cb ) => () => void |
Stable |
iframe.requestConnection |
( opts: RequestConnectionOptions ) => Promise<ConnectionRecord> |
Stable |
iframe.onConnection |
( cb ) => () => void |
Stable |
| Member | Signature | Status |
|---|---|---|
registerModule |
( def: ModuleDef ) => void |
Stable |
loadModules |
( ids: string[] ) => Promise<void> |
Stable |
loadVendorScript |
( url: string, extras? ) => Promise<void> |
Stable |
createInfiniteList |
<T>( opts: InfiniteListOptions<T> ) => InfiniteList (IntersectionObserver + AbortController + dedup-by-id + cursor pagination)
|
Stable |
startOAuth |
( service: string, opts? ) => Promise<{ ok: true, service }> (framework owns state nonce + popup + postMessage round-trip)
|
Stable |
No dedicated wp.os.agents namespace yet — the surface is REST +
shared-store + registries. Index:
| Surface | Where | Status |
|---|---|---|
| Trust model, capability ceiling, untrusted tool output | agents-security.md |
Experimental |
/desktop-mode/v1/agents[…] REST routes |
includes/rest/README.md |
Experimental |
openstation_agent_* PHP helpers, actions, filters |
hooks-reference.md |
Experimental |
desktop-mode/agents-chat shared-store key + desktop-mode-agent-run window |
javascript-reference.md |
Experimental |
agent WP Explorer entity kind |
registerEntityKind() seam |
Experimental |
No wp.os.woo namespace. The surface is PHP filters + REST + a
native window, all hanging off WP Explorer. Index:
| Surface | Where | Status |
|---|---|---|
| What the integration renders, and why | plugin-compat-layer.md |
Experimental |
openstation_my_wordpress_woo_* filters (orders, products, coupons, store, summaries, customers) |
hooks-reference.md |
Experimental |
desktop-mode/v1/woocommerce/{orders, store, summary/<type>/<id>, customers, customers/<id>} |
includes/my-wordpress/integrations/ |
Experimental |
openstation_woo_customer REST field on the core user resource |
hooks-reference.md |
Experimental |
desktop-mode-woo-customer native window (retargetable singleton, customerId param)
|
hooks-reference.md |
Experimental |
| Surface | Signature | Status |
|---|---|---|
openstation_register_station_home_card |
`( string $id, array $args ) => true | WP_Error` |
openstation_unregister_station_home_card |
( string $id ) => bool |
Experimental |
openstation_station_home_cards |
( array $cards, int $user_id ) => array |
Experimental |
openstation_station_home_card_data |
( array $data, string $id, array $entry, int $user_id ) => array |
Experimental |
| card lifecycle actions | registered, preference-updated, callback-error | Experimental |
See station-home.md and the complete plugin recipe.
Every event bubbles from document. See javascript-reference.md for detail shapes.
| Event | Status |
|---|---|
os-init |
Stable |
os-window-opened |
Stable |
os-window-reopened |
Stable |
os-window-content-loading |
Stable |
os-window-content-loaded |
Stable |
os-window-focused |
Stable |
os-window-blurred |
Stable |
os-window-child-blocked |
Stable |
os-window-closing |
Stable |
os-window-closed |
Stable |
os-window-changed |
Experimental |
os-window-content-changed |
Experimental |
os-window-link-groups-changed |
Experimental |
os-presence-changed |
Stable |
os-selection-changed |
Experimental |
os-layout-changed |
Stable |
os-item-menu-opening |
Stable |
os-registry-changed |
Stable |
os.drag.start / .move / .enter / .leave / .rejected / .commit / .cancel / .end
|
Stable |
os-cross-frame-drag-start / -end (cross-iframe drag bridge)
|
Stable |
os-settings-save-lifecycle |
Stable |
os-default-window-changed |
Stable |
os-open-ai (plugin-dispatched; the shell listens)
|
Experimental |
os-intros-reset |
Experimental |
os-my-wordpress-entity-trashed |
Experimental |
os-note-created (pinned-notes hand-off from the Note Pad widget)
|
Experimental |
os-auth-lost / os-auth-restored (session expiry / recovery)
|
Stable |
os-desktop-theme-changed (whole-OS reskin activated / cleared)
|
Experimental |
os-editor-preview-opened / -closed (editor↔preview pairing lifecycle)
|
Experimental |
os-desktop-host-freed / -docked / -connection (window set free into a real OS window)
|
Experimental |
Typed messages between the parent shell and iframe windows. Full shapes in bridge-protocol.md and javascript-reference.md.
| Message type | Direction | Status |
|---|---|---|
os-ready |
iframe → parent | Stable |
os-window-publish |
iframe → parent | Stable |
os-window-send |
parent → iframe | Stable |
os-bridge-* (connection-bridge family)
|
both | Stable |
os-plugins-changed |
iframe → shell (top window) | Stable |
os-menu-signature |
iframe → shell (top window) | Stable |
os-updates-changed (shiny-update completion nudge)
|
iframe → shell | Stable |
os-code-open (ships with the desktop-mode-code-editor extension)
|
iframe → parent | Stable |
os-drag-start / -end / -payload-request
|
iframe → parent | Stable |
os-drag-payload (reply to -payload-request)
|
parent → iframe | Stable |
os-drag-over / -leave / os-drop
|
parent → iframe | Stable |
os-reauth-detected (session re-auth nudge)
|
iframe → parent | Stable |
os-pointer-track (arm / disarm the pointer forwarder; off by default)
|
parent → iframe | Experimental |
os-pointer-move (cursor position inside the iframe, ~25 Hz, only while armed)
|
iframe → parent | Experimental |
os-editor-autosave-request / -response (preview-button autosave query)
|
parent → iframe / iframe → parent | Experimental |
os-editor-live-watch / -unwatch / -live-saved (typing-driven preview refresh)
|
parent → iframe / parent → iframe / iframe → parent | Experimental |
-
wp.os.*methods — JSDoc on each member, plus this table. - CustomEvents — section heading in
javascript-reference.md, plus this table. - PHP hooks —
hooks-reference.md. - Web Components —
static helpblock on each<os-*>class, pluscomponents-reference.md.
When a status changes (Experimental → Stable, or anything → removed), update all three of: the JSDoc, this table, and the relevant per-doc reference. The doc lint guidance in AGENTS.md enforces this rule of thumb: a hook change without a doc update ships a lie.
This wiki is generated from the docs/ directory — edits made here are overwritten by the next sync.
To change a page, open a pull request against docs/.
Guides
- Development guide
- Releasing openstation
- Agents security model
- API Index
- Architecture
- Bridge protocol — wiring overview
- <os-*> component reference
- Native Desktop Host — Experimental
- Desktop themes
- Dock customization — two registries, one mental model
- The event-driven framework
- Files on the Desktop
- Folder sharing
- Getting Started
- Hooks Reference
- Icons
- JavaScript Reference
- The Living Tree — algorithm definition
- Mio
- Native Windows & Framework Interop
- Plugin compatibility layer
- Progressive Web App (PWA)
- Station Home
- Using openstation from your own plugin
Migration notes
- Migration: built-in activity channels move to the os/ namespace
- Migration: window, wallpaper and widget bundles load on demand
- Migration — the navigation model
- Migration: a native window's tabs move to the window chrome
All examples
- AI Agents — extend and invoke from a plugin
- wp.os.ai.ask() — programmatic AI Copilot
- Tune the AI model config
- Custom arrange-menu action
- Open a child window its owner can't cover
- Style a specific admin page inside the iframe
- Code Blue — register your plugin's log file
- Open a file in the Code editor (deep-link from any window)
- Connect to a window — title-bar button + iframe pub/sub
- Content changes — live-refresh every window listing your type
- Custom window chrome (Experimental)
- Register a custom unfocused-window effect
- Example: render a data table
- Real file storage — react to uploads, gate policy, share from PHP
- React to a window being set free onto the real desktop
- Cross-window devtools — instrumentation primitives
- Add a dock item with a badge
- Decorate the dock without forking the renderer
- Replace the dock rail entirely
- Retune the Drafts widget's AI writing assistant
- Gate OpenStation by role
- Iframe-initiated window opens
- Build a feed reader without the bookkeeping
- Inject data into openStationConfig
- Render a list without losing clicks — renderKeyedList()
- Example: layout primitives (body → panel → row → col)
- Use <os-*> components from a plugin that ships as a zip
- Restyle and drive Mio
- Add an action that works on a whole selection
- WP Explorer — custom post types and their folder
- Add an action button to a WP Explorer preview pane
- Example: native Posts window
- Example: native window with tabs
- Native windows
- Customize note → post conversion
- Send a notification
- OAuth relay — connect to an external service
- OS-file drop
- <os-flyout> — window-scoped sliding card
- Plugins window — extras
- Track who's around — wp.os.presence
- Example: progress bar
- PWA install — surface your own button
- React to window events
- Example: extend the Trash
- Register a slash-command
- Register a desktop theme from a plugin
- Register a game
- Example: register a desktop icon (Jorvy)
- Register a wallpaper
- Register a widget
- Related entities — extend the title bar's "Related" menu
- The native-window render ctx
- Programmatic folder sharing
- Share state across multi-bundle plugins — wp.os.createSharedStore()
- Example: loading spinner
- Add an opt-in card to Station Home
- Accept drops on your desktop icon
- Give a tile two icons, one per state
- Add a row to a window's ⋯ menu
- Example: window activity & the status ring
- Window controls
- Subscribe to window lifecycle events
- Window links — relate windows and restyle the ties (Experimental)
- Window loading state — spinner overlay & ready signal
- Show a banner at the top of a window
- Pulse a window's icon — Window.requestAttention()
- Register a custom window reveal
- Window slots
- Window themes
- Native window with bundle-bound config