Internals

Kernel contract

Public API surface of @owdproject/core for themes, apps, and extension modules.

This page summarizes the stable contract between @owdproject/core and themes/apps. Internal implementation under runtime/internal/ is not part of the contract and may change in minor releases.

Source of truth in the repo: packages/core/DESKTOP_KERNEL.md.

Bootstrap order

  1. Load desktop.config.ts (or legacy owd.config.ts).
  2. Validate and split: theme / apps / modulesinstallModule; other keys → runtimeConfig.public.desktop / appConfig.desktop only.
  3. Install Pinia, then theme → modules → apps.
  4. Client plugin flushes queued defineDesktopApp calls after Pinia is active.

Configuration API

ExportUse
defineDesktopConfig({ theme, apps, modules, … })Root desktop config file
runtimeConfig.public.desktopShell flags (workspaces, systemBar, explorer, …)
useDesktopManager().setConfig()Runtime shell overrides (defu: new props win)

Allowed shell keys include: name, defaultApps, features, systemBar, dockBar, workspaces, explorer, docs. Unknown keys: dev warning. Nuxt-like keys: rejected with hint.

Applications

ExportUse
defineDesktopApp(config)App register plugin (owd-*-register, client-only, import.meta.server guard)
useApplicationManager()Launch, list running apps, resolve windows

Kernel Vue components

ComponentRole
DesktopCoreShell wrapper
DesktopApplicationRenderRunning app windows
DesktopWindow / DesktopWindowNav / DesktopWindowContentWindow primitives
DesktopBackground / DesktopTimeOptional utilities

Themes expose Desktop.vueapp.vue uses <Desktop />.

Stores and composables

SymbolRole
useDesktopStoreShell state, personalization, default apps
useDesktopWorkspaceStoreActive workspace, overview mode
useDesktopWindowStoreGlobal z-index
useWorkspaceManagerOverview keyboard + HTML5 workspace drops
useApplicationManagerApp registry and launch
useDesktopManagerShell config merge

Explorer: useExplorerStore from @owdproject/module-fs (alias useDesktopExplorerStore deprecated).

Window lifecycle (internal contract)

WindowController guarantees:

  • focus() / bringToFront() — exclusive focus + monotonic z-index
  • minimize() / unminimize() — toggles state.active
  • setWorkspace(id) — assigns workspace

Contract tests: windowController.contract.test.ts, useWorkspaceManager.contract.test.ts.

Extension packages

PackageLayer
core shell composablesShell identity, edge drop, overview — Shell identity
core runtime/explorer/Explorer store, DnD, menu model
@owdproject/kit-primevuePrimeVue dialogs + PV explorer UI
@owdproject/module-fsZenFS VFS
@owdproject/module-persistenceOptional persistence

Versioning

Breaking contract changes require semver coordination with themes (separate repos). Current kernel release line: 3.4.x (Desktop* rename, explorer eviction from core, full public.desktop merge, extension defineDesktopModule + composables — see DESKTOP_KERNEL.md in @owdproject/core).

Package authors: Migrate themes, apps, and modules (3.4). Stack changes (PrimeVue, shell in core): see migration guide.