You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Lookup tables for the hub: subsystems, launcher fields, duplication strategies, dock categories, the hub UI protocol, the namespace routes, the client runtime, the client context, and dock entry types.
Lookup tables for @devframes/hub: its node-side subsystems and its browser-side client runtime. Each section links the guide page that teaches the concept.
Hub subsystems
What DevframeHubContext adds to DevframeNodeContext: Hub.
Subsystem
API
Purpose
ctx.docks
register / update / values / activate
Dock entries (iframes, launchers, custom-render) and groups; activate(dockId, params?) sets the active dock (Cross-iframe dock activation).
Runs after a verified install, or on the first request when the packages already exist; a returned handler takes over base
onConfirm
y/N in the terminal
Gets { packages, command, request } before each install the panel asks for; return true to allow it. Refuses at once when stdin is not a TTY or is in raw mode, and after 5 minutes without an answer
Route
Serves
GET <base>embedded.js
the floating button, a self-contained ES module
GET <base>__onboard/status
{ state, command, branding, messages, error? }
POST <base>__onboard/install
waits for onConfirm, then starts the install (202) or refuses it (403); same-origin only
POST <base>__onboard/disable
writes the state file (204), same-origin only
state
Meaning
idle
nothing installed yet; the panel offers Install
installing
the package manager is running; the button polls once a second
installed
installed, no hub handler to hand off to; the panel asks for a restart
ready
onInstalled returned a handler; the button loads the real embedded.js and removes itself
error
the install or onInstalled failed; error.code is a DF90xx diagnostic
disabled
the user chose Disable entirely; the button renders nothing
buildHub options
The options of buildHub() from @devframes/hub/build: Static builds. devframes, services, tracing, rpcDeclarations, configure, ui, renderers, name, version, cwd, and getStorageDir carry the same contracts as their initHub counterparts.
Option
Purpose
outDir
Output directory for the hub subtree; corresponds to base at serve time (build base: '/__devframes/' into dist/__devframes). A mount served outside the hub base (a devframe SPA or asset dir kept as a sibling of it) is written to this directory's parent (the deploy root) by its absolute path.
base
Mount base baked into every absolute URL the build emits. Default /__devframes/.
deployBase
URL prefix the deploy root is served under. Root-absolute URLs the build emits are rebased under it. Must be a prefix of base. Default /.
context
An already-mounted DevframeHubContext to bake instead of devframes (the build counterpart of initHub({ context })); reads ctx.frames and ctx.views.buildStaticDirs. Mutually exclusive with devframes.
clean
Remove outDir before writing. Default true; set false to bake beside an app's own build output.
The RPC client: server/client functions, shared state.
clientType
'embedded' (inside the user app) or 'standalone' (independent hub page).
docks
entries, selected, groupedEntries, switchEntry(), toggleEntry(), setActionActive(id, active) for toggle actions, getStateById(), register() / update() for client-only docks.
panel
Current state, local events, session, position, size, and drag/resize state for the dock panel.
commands
Command palette: register(), execute(), getKeybindings(), paletteOpen, paletteScopeId, openPalette(atCommandId?). Passing an id opens the palette drilled into that command's children (Activating a group).
renderers
Dock-renderer registry: register(), get(), has(), mount(entry, container). Routes a dock type to a renderer (local boot or the hub's manifest; local wins). mount() resolves a status: mounted (with dispose), missing-renderer, or load-error (with error).
Which ClientScriptEntry field carries an entry's client script, and when it runs: Dock client scripts.
Entry kind
Field
Runs
action
action
on each click; once for a toggle: true action
custom-render
renderer
to render the entry's panel
iframe
clientScript (optional)
inside the host page on first activation
ClientScriptEntry.eager defaults to false. Set it to true on an iframeclientScript or an action to initialize it after RPC trust, before dock activation. A custom-renderrenderer needs its mounted panel, so it always initializes on activation regardless of eager. Setup is cached per RPC connection and dock; action clicks execute on every activation, except a toggle: true action, which sets up once.
show a view ({ tabId, navTarget }); the SPA routes client-side
navigated
iframe → host page
the SPA navigated internally; the hub UI provider highlights the dock
Dock entry types
The built-in variants of the open dock union (DevframeDockEntryRegistry, @devframes/hub/types) a hub UI provider renders: Build Your Own Hub UI. Each entry's icon takes any of the icon values. Each entry's title has an optional titleLocales map of translations, resolved with resolveTitle(entry, locale) from @devframes/hub/client; commands and launchers carry the same pair. An optional one-line description explains the entry; the reference hub UI shows it under the title in the dock button tooltip.
Type
The hub UI provider renders
iframe
the entry's url in a kept-alive iframe (per frameId when shared); honor subTabs soft nav; show the existing address bar with addressBar: true, or configure Back, Reload, and Open externally by passing an addressBar object
action
a dock-rail button; activating runs its client script. With toggle: true, render it as active while getStateById(id).isActive is true
custom-render
a container its client script mounts into
launcher
a launch call-to-action reflecting launcher.status
group
one dock-rail button collapsing its member entries
~builtin
your native views (settings, feeds) for reserved ids