🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@devframes/hub

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@devframes/hub - npm Package Compare versions

Comparing version
0.7.11
to
0.7.12
+438
dist/context-BdaDhtC2.d.mts
import { I as JsonRenderSpec, L as JsonRenderer, S as DevframeDocksHost, c as DevframeCommandsHost, p as DevframeDockActivation, v as DevframeDockEntryIcon } from "./settings-BIhD5WT_.mjs";
import { CreateHostContextOptions } from "devframe/node";
import { DevframeHost, DevframeNodeContext, EventEmitter } from "devframe/types";
import { ChildProcess } from "node:child_process";
//#region src/types/messages.d.ts
type DevframeMessageLevel = 'info' | 'warn' | 'error' | 'success' | 'debug';
type DevframeMessageEntryFrom = 'server' | 'browser';
interface DevframeMessageElementPosition {
/** CSS selector for the element */
selector?: string;
/** Bounding box of the element */
boundingBox?: {
x: number;
y: number;
width: number;
height: number;
};
/** Human-readable description of the element */
description?: string;
}
interface DevframeMessageFilePosition {
/** Absolute or relative file path */
file: string;
/** Line number (1-based) */
line?: number;
/** Column number (1-based) */
column?: number;
}
interface DevframeMessageEntry {
/**
* Unique identifier for this message entry (auto-generated if not provided)
*/
id: string;
/**
* Short title or summary of the message
*/
message: string;
/**
* Optional detailed description or explanation
*/
description?: string;
/**
* Severity level, determines color and icon
*/
level: DevframeMessageLevel;
/**
* Optional stack trace string
*/
stacktrace?: string;
/**
* Optional DOM element position info (e.g., for a11y issues)
*/
elementPosition?: DevframeMessageElementPosition;
/**
* Optional source file position info (e.g., for lint errors)
*/
filePosition?: DevframeMessageFilePosition;
/**
* Whether this message should also appear as a toast notification
*/
notify?: boolean;
/**
* Origin of the message entry, automatically set by the context
*/
from: DevframeMessageEntryFrom;
/**
* Grouping category (e.g., 'a11y', 'lint', 'runtime', 'test')
*/
category?: string;
/**
* Optional tags/labels for filtering
*/
labels?: string[];
/**
* Time in ms to auto-dismiss the toast notification (client-side)
*/
autoDismiss?: number;
/**
* Time in ms to auto-delete this message entry (server-side)
*/
autoDelete?: number;
/**
* Timestamp when the message was created (auto-generated if not provided)
*/
timestamp: number;
/**
* Status of the message entry (e.g., 'loading' while an operation is in progress).
* Defaults to 'idle' when not specified.
*/
status?: 'loading' | 'idle';
}
/**
* Input type for creating a message entry.
* `id`, `timestamp`, and `from` are auto-filled by the host.
*/
type DevframeMessageEntryInput = Omit<DevframeMessageEntry, 'id' | 'timestamp' | 'from'> & {
id?: string;
timestamp?: number;
};
interface DevframeMessageHandle {
/** The underlying message entry data */
readonly entry: DevframeMessageEntry;
/** Shortcut to entry.id */
readonly id: string;
/** Partial update of this message entry */
update: (patch: Partial<DevframeMessageEntryInput>) => Promise<DevframeMessageEntry | undefined>;
/** Remove this message entry */
dismiss: () => Promise<void>;
}
/**
* Extra fields accepted by the per-level message shortcuts —
* everything on {@link DevframeMessageEntryInput} except the
* `message` and `level` the shortcut itself provides.
*/
type DevframeMessageShortcutInput = Omit<DevframeMessageEntryInput, 'message' | 'level'>;
/**
* Per-level shortcuts shared by the client and the node host —
* `messages.info('...')` is `messages.add({ message: '...', level: 'info' })`.
*/
interface DevframeMessagesLevelShortcuts {
/** Shortcut for `add({ message, level: 'info', ...extra })` */
info: (message: string, extra?: DevframeMessageShortcutInput) => Promise<DevframeMessageHandle>;
/** Shortcut for `add({ message, level: 'warn', ...extra })` */
warn: (message: string, extra?: DevframeMessageShortcutInput) => Promise<DevframeMessageHandle>;
/** Shortcut for `add({ message, level: 'error', ...extra })` */
error: (message: string, extra?: DevframeMessageShortcutInput) => Promise<DevframeMessageHandle>;
/** Shortcut for `add({ message, level: 'success', ...extra })` */
success: (message: string, extra?: DevframeMessageShortcutInput) => Promise<DevframeMessageHandle>;
/** Shortcut for `add({ message, level: 'debug', ...extra })` */
debug: (message: string, extra?: DevframeMessageShortcutInput) => Promise<DevframeMessageHandle>;
}
interface DevframeMessagesClient extends DevframeMessagesLevelShortcuts {
/**
* Add a message entry. Returns a Promise resolving to a handle for subsequent updates/dismissal.
* Can be used without `await` for fire-and-forget usage.
*/
add: (input: DevframeMessageEntryInput) => Promise<DevframeMessageHandle>;
/** Remove a message entry by id */
remove: (id: string) => Promise<void>;
/** Clear all message entries */
clear: () => Promise<void>;
}
/**
* A snapshot or delta of the message list, as returned by
* {@link DevframeMessagesHost.listSince}. Consumers apply `removedIds`
* first, then upsert `entries`, and pass `version` back as `since` on the
* next call.
*/
interface DevframeMessagesListDelta {
/** Entries added or updated since the cursor (or all entries when `full`) */
entries: DevframeMessageEntry[];
/** Ids removed since the cursor (empty when `full`) */
removedIds: string[];
/** The version cursor — pass back as `since` on the next call */
version: number;
/**
* When `true`, `entries` is the complete snapshot and any locally cached
* list must be reset before applying it.
*/
full: boolean;
}
interface DevframeMessagesHost extends DevframeMessagesLevelShortcuts {
readonly entries: Map<string, DevframeMessageEntry>;
readonly events: EventEmitter<{
'message:added': (entry: DevframeMessageEntry) => void;
'message:updated': (entry: DevframeMessageEntry) => void;
'message:removed': (id: string) => void;
'message:cleared': () => void;
}>;
/**
* Add a new message entry. If an entry with the same `id` already exists, it will be updated instead.
* Returns a handle for subsequent updates/dismissal. Can be used without `await` for fire-and-forget.
*/
add: (entry: DevframeMessageEntryInput) => Promise<DevframeMessageHandle>;
/**
* Update an existing message entry by id (partial update)
*/
update: (id: string, patch: Partial<DevframeMessageEntryInput>) => Promise<DevframeMessageEntry | undefined>;
/**
* Remove a message entry by id
*/
remove: (id: string) => Promise<void>;
/**
* Clear all message entries
*/
clear: () => Promise<void>;
/**
* Read the message list incrementally. Pass the `version` from the
* previous result as `since` to receive only the entries modified and the
* ids removed after that point; pass `null`/`undefined` for the initial
* full snapshot. When the host can no longer compute a reliable delta for
* the given cursor (trimmed removal history, or a cursor from another host
* incarnation), the result carries `full: true` with the complete list.
*/
listSince: (since?: number | null) => DevframeMessagesListDelta;
}
//#endregion
//#region src/types/terminals.d.ts
interface DevframeTerminalsHost {
readonly sessions: Map<string, DevframeTerminalSession>;
readonly events: EventEmitter<{
'terminal:session:updated': (session: DevframeTerminalSession) => void;
}>;
register: (session: DevframeTerminalSession) => DevframeTerminalSession;
update: (session: DevframeTerminalSession) => void;
/** Drop a session from the registry, disposing its bound output stream. */
remove: (session: DevframeTerminalSession) => void;
/**
* Spawn a read-only child process (pipe-backed, output only). Use this for
* long-running logs and dev servers that don't need input.
*/
startChildProcess: (executeOptions: DevframeChildProcessExecuteOptions, terminal: Omit<DevframeTerminalSessionBase, 'status'>) => Promise<DevframeChildProcessTerminalSession>;
/**
* Spawn a fully interactive pseudo-terminal (PTY) any plugin can drive:
* keystrokes via {@link DevframePtyTerminalSession.write}, live layout via
* {@link DevframePtyTerminalSession.resize}, TUI-capable. The session is
* marked `interactive`, so a hub-aware terminal UI (e.g. the terminals
* plugin) surfaces it as writable rather than read-only. Powered by
* `zigpty` — where its native bindings can't load, it degrades to
* pipe-based terminal emulation.
*/
startPtySession: (executeOptions: DevframePtyExecuteOptions, terminal: Omit<DevframeTerminalSessionBase, 'status'>) => Promise<DevframePtyTerminalSession>;
}
type DevframeTerminalStatus = 'running' | 'stopped' | 'error';
interface DevframeTerminalSessionBase {
id: string;
title: string;
description?: string;
status: DevframeTerminalStatus;
icon?: DevframeDockEntryIcon;
/**
* Whether the session accepts input (keystrokes + resize). `true` for
* {@link DevframeTerminalsHost.startPtySession} sessions; absent/`false`
* for pipe-backed, output-only ones. A hub-aware terminal UI reads this to
* decide whether to enable stdin and wire resize.
*/
interactive?: boolean;
/**
* Whether the session may be restarted in place (re-running its command).
* Defaults to `true`. Set `false` for sessions whose lifecycle is owned
* elsewhere — e.g. a one-shot build, or a server (like code-server) that
* should be restarted through its own controls rather than by re-spawning
* the raw process. A hub-aware terminal UI hides its restart affordance for
* these, and `hub:terminals:restart` rejects them.
*/
restartable?: boolean;
}
interface DevframeTerminalSession extends DevframeTerminalSessionBase {
buffer?: string[];
stream?: ReadableStream<string>;
}
interface DevframeChildProcessExecuteOptions {
command: string;
args: string[];
cwd?: string;
env?: Record<string, string>;
}
/**
* The settled outcome of a {@link DevframeChildProcessTerminalSession} run —
* stdout/stderr captured separately (unlike the session's merged display
* `stream`), plus the process's exit code (`undefined` if it was killed by a
* signal before exiting).
*/
interface DevframeChildProcessOutput {
stdout: string;
stderr: string;
exitCode: number | undefined;
}
/**
* A live handle on a child process's outcome — mirrors the ergonomics of
* `tinyexec`'s `Result` (a promise-like paired with synchronous accessors) so
* callers migrating from a `tinyexec`/`execa`-based subprocess API (e.g.
* Nuxt DevTools' `startSubprocess().getResult()`) can adopt
* {@link DevframeTerminalsHost.startChildProcess} with minimal changes.
* `await`ing it (or calling `.then()`) resolves once the process exits, with
* the full captured {@link DevframeChildProcessOutput}.
*/
interface DevframeChildProcessResult extends PromiseLike<DevframeChildProcessOutput> {
readonly pid: number | undefined;
/** `undefined` while the process is still running. */
readonly exitCode: number | undefined;
readonly killed: boolean;
kill: (signal?: NodeJS.Signals | number) => boolean;
}
interface DevframeChildProcessTerminalSession extends DevframeTerminalSession {
type: 'child-process';
executeOptions: DevframeChildProcessExecuteOptions;
getChildProcess: () => ChildProcess | undefined;
/**
* Get a live handle on the current run's outcome. Reflects the most recent
* `restart()` — call it again after restarting to track the new run.
*/
getResult: () => DevframeChildProcessResult;
terminate: () => Promise<void>;
restart: () => Promise<void>;
}
interface DevframePtyExecuteOptions {
command: string;
args?: string[];
cwd?: string;
env?: Record<string, string>;
/** Initial column count. Default: 80. */
cols?: number;
/** Initial row count. Default: 24. */
rows?: number;
}
interface DevframePtyTerminalSession extends DevframeTerminalSession {
type: 'pty';
interactive: true;
executeOptions: DevframePtyExecuteOptions;
/** Send keystrokes / raw input to the PTY. */
write: (data: string) => void;
/** Resize the PTY (emits SIGWINCH so TUIs relayout). */
resize: (cols: number, rows: number) => void;
/** Current foreground process name, when the backend can resolve it. */
getProcessName: () => string | undefined;
terminate: () => Promise<void>;
restart: () => Promise<void>;
}
//#endregion
//#region src/node/context.d.ts
declare module 'devframe/types' {
interface DevframeRpcClientFunctions {
/**
* Server→client request to switch the active dock. Broadcast by the hub
* context in response to `ctx.docks.activate()` (driven by the
* `hub:docks:activate` RPC). The client host registers a handler that
* calls its local `switchEntry(dockId)`; the target dock reads
* `activation.params` to react (e.g. focus a session). Do not register
* manually.
*
* @internal
*/
'devframe:docks:activate': (activation: DevframeDockActivation) => Promise<void>;
/**
* Server→client notification that terminal sessions changed. Broadcast
* by the hub context; a hub-aware client re-reads terminal state in
* response. Do not register manually.
*
* @internal
*/
'devframe:terminals:updated': () => Promise<void>;
/**
* Server→client notification that the message list changed. Broadcast
* by the hub context; a hub-aware client re-reads message state in
* response. Do not register manually.
*
* @internal
*/
'devframe:messages:updated': () => Promise<void>;
}
interface DevframeRpcServerFunctions {
/**
* Ask the active viewer to switch its focused dock to `dockId`, optionally
* carrying `params` for the target dock to interpret (e.g.
* `{ sessionId }` for the terminals dock). Any connected client may call
* it — a mounted devframe in its own iframe steers the host shell's dock
* selection. Handled by {@link import('./rpc-builtins').hubDocksActivate}.
*/
'hub:docks:activate': (input: {
dockId: string;
params?: Record<string, unknown>;
}) => Promise<void>;
/**
* Invoke a registered server command by id; trailing args are forwarded to
* the command's handler. Handled by
* {@link import('./rpc-builtins').hubCommandsExecute}.
*/
'hub:commands:execute': (id: string, ...args: any[]) => Promise<unknown>;
/**
* Add a message from a browser client into the hub's messages feed
* (marked `from: 'browser'`); returns the serializable entry. Handled by
* {@link import('./rpc-builtins').hubMessagesAdd}.
*/
'hub:messages:add': (input: DevframeMessageEntryInput) => Promise<DevframeMessageEntry>;
/** Patch a message by id; resolves the updated entry (or `undefined`). */
'hub:messages:update': (id: string, patch: Partial<DevframeMessageEntryInput>) => Promise<DevframeMessageEntry | undefined>;
/** Remove a message by id. */
'hub:messages:remove': (id: string) => Promise<void>;
/** Remove every message. */
'hub:messages:clear': () => Promise<void>;
/**
* Send input to an interactive PTY session spawned via
* `ctx.terminals.startPtySession`. Handled by
* {@link import('./rpc-builtins').hubTerminalsWrite}.
*/
'hub:terminals:write': (id: string, data: string) => Promise<void>;
/** Resize an interactive PTY session by id. */
'hub:terminals:resize': (id: string, cols: number, rows: number) => Promise<void>;
}
}
/**
* Hub-augmented node context — extends devframe's framework-neutral
* `DevframeNodeContext` with the hub-level subsystems (`docks`,
* `terminals`, `messages`, `commands`) and the deprecated
* `createJsonRenderer` compatibility factory.
*
* Framework kits further extend this with their own slots (e.g.
* `viteConfig`, `viteServer`). Host-specific capabilities (editor open,
* filesystem reveal, etc.) ship as kit-registered RPC functions rather
* than as part of this surface. JSON-render itself is not part of the hub:
* it is an opt-in integration (`@devframes/json-render`) that augments any
* devframe context and contributes its own dock type — prefer
* `createJsonRenderView` from `@devframes/json-render/node` over the
* deprecated factory below.
*/
interface DevframeHubContext extends DevframeNodeContext {
readonly host: DevframeHost;
docks: DevframeDocksHost;
terminals: DevframeTerminalsHost;
messages: DevframeMessagesHost;
commands: DevframeCommandsHost;
/**
* Create a `JsonRenderer` handle for building json-render powered UIs.
*
* @deprecated json-render moved out of the hub into the opt-in
* `@devframes/json-render` integration in 0.7. This factory is kept
* working (not just type-compatible) for the 0.7 series so existing call
* sites don't break — use `createJsonRenderView(ctx, { id, spec })` from
* `@devframes/json-render/node` instead. Will be removed in 0.8.
*/
createJsonRenderer: (spec: JsonRenderSpec) => JsonRenderer;
}
/**
* Options for {@link createHubContext} — devframe's
* {@link CreateHostContextOptions} plus any hub-level additions kits layer on
* through declaration merging.
*/
interface CreateHubContextOptions extends CreateHostContextOptions {}
/**
* Create a hub-level node context: wraps devframe's `createHostContext`,
* attaches the hub hosts (`docks`, `terminals`, `messages`, `commands`),
* registers the hub's built-in RPC commands, and wires the shared-state
* synchronization that powers a hub-aware client UI.
*/
declare function createHubContext(options: CreateHubContextOptions): Promise<DevframeHubContext>;
//#endregion
export { DevframeMessagesHost as C, DevframeMessagesClient as S, DevframeMessagesListDelta as T, DevframeMessageEntryInput as _, DevframeChildProcessOutput as a, DevframeMessageLevel as b, DevframePtyExecuteOptions as c, DevframeTerminalSessionBase as d, DevframeTerminalStatus as f, DevframeMessageEntryFrom as g, DevframeMessageEntry as h, DevframeChildProcessExecuteOptions as i, DevframePtyTerminalSession as l, DevframeMessageElementPosition as m, DevframeHubContext as n, DevframeChildProcessResult as o, DevframeTerminalsHost as p, createHubContext as r, DevframeChildProcessTerminalSession as s, CreateHubContextOptions as t, DevframeTerminalSession as u, DevframeMessageFilePosition as v, DevframeMessagesLevelShortcuts as w, DevframeMessageShortcutInput as x, DevframeMessageHandle as y };
import "./settings-BIhD5WT_.mjs";
import "./context-BdaDhtC2.mjs";
import { RpcDefinitionsFilter, RpcDefinitionsToFunctions } from "devframe/rpc";
import { ConnectionMeta as ConnectionMeta$1, DevframeCapabilities, DevframeDiagnosticsDefinition, DevframeDiagnosticsHost, DevframeDiagnosticsLogger, DevframeHost as DevframeHost$1, DevframeNodeRpcSession, DevframeRpcClientFunctions, DevframeRpcServerFunctions, DevframeRpcSharedStates, DevframeViewHost, EntriesToObject, EventEmitter as EventEmitter$1, EventUnsubscribe, EventsMap, PartialWithoutId, RpcBroadcastOptions, RpcFunctionsHost, RpcSharedStateGetOptions, RpcSharedStateHost, RpcStreamingChannel, RpcStreamingChannelOptions, RpcStreamingHost, Thenable } from "devframe/types";
export { RpcStreamingChannel as C, Thenable as E, RpcSharedStateHost as S, RpcStreamingHost as T, RpcBroadcastOptions as _, DevframeDiagnosticsLogger as a, RpcFunctionsHost as b, DevframeRpcClientFunctions as c, DevframeViewHost as d, EntriesToObject as f, PartialWithoutId as g, EventsMap as h, DevframeDiagnosticsHost as i, DevframeRpcServerFunctions as l, EventUnsubscribe as m, DevframeCapabilities as n, DevframeHost$1 as o, EventEmitter$1 as p, DevframeDiagnosticsDefinition as r, DevframeNodeRpcSession as s, ConnectionMeta$1 as t, DevframeRpcSharedStates as u, RpcDefinitionsFilter as v, RpcStreamingChannelOptions as w, RpcSharedStateGetOptions as x, RpcDefinitionsToFunctions as y };
import { ConnectionMeta, EventEmitter } from "devframe/types";
//#region src/types/json-render.d.ts
/** @deprecated Use `DevframeJsonRenderSpec`'s element shape from `@devframes/json-render` instead. Removed in 0.8. */
interface JsonRenderElement {
type: string;
props?: Record<string, unknown>;
children?: string[];
/** json-render event bindings (e.g. `{ press: { action: "my:action" } }`) */
on?: Record<string, unknown>;
/** json-render visibility condition */
visible?: unknown;
/** json-render repeat binding */
repeat?: unknown;
/** Allow additional json-render element fields */
[key: string]: unknown;
}
/** @deprecated Use `DevframeJsonRenderSpec` from `@devframes/json-render` instead. Removed in 0.8. */
interface JsonRenderSpec {
root: string;
elements: Record<string, JsonRenderElement>;
/** Initial client-side state model for $state/$bindState expressions */
state?: Record<string, unknown>;
}
/** @deprecated Use `JsonRenderView` from `@devframes/json-render` instead. Removed in 0.8. */
interface JsonRenderer {
/** Replace the entire spec */
updateSpec: (spec: JsonRenderSpec) => void | Promise<void>;
/** Update json-render state values (shallow merge into spec.state) */
updateState: (state: Record<string, unknown>) => void | Promise<void>;
/** Internal: shared state key used by the client to subscribe */
readonly _stateKey: string;
}
//#endregion
//#region src/types/docks.d.ts
interface DevframeDocksHost {
readonly views: Map<string, DevframeDockUserEntry>;
readonly events: EventEmitter<{
'dock:entry:updated': (entry: DevframeDockUserEntry) => void;
'dock:activate': (activation: DevframeDockActivation) => void;
}>;
register: <T extends DevframeDockUserEntry>(entry: T, force?: boolean) => {
update: (patch: Partial<T>) => void;
};
update: (entry: DevframeDockUserEntry) => void;
values: () => DevframeDockEntry[];
/**
* Request the active viewer switch its focused dock to `dockId`, optionally
* carrying `params` for the target dock to interpret (e.g. a terminals
* session id).
*
* Any connected client may drive this via the `hub:docks:activate` RPC — a
* mounted devframe running in its own iframe can steer the host shell's dock
* selection, which is otherwise client-local. The request is delivered live
* to connected clients (broadcast) and mirrored into the
* `devframe:docks:active` shared state so a dock that mounts in response
* still sees it. Activation is best-effort: unknown dock ids degrade
* gracefully.
*/
activate: (dockId: string, params?: Record<string, unknown>) => void;
}
/**
* A request to switch the active dock. `params` is an opaque, serializable
* bag the target dock interprets — the terminals dock reads `params.sessionId`
* to focus a specific session.
*/
interface DevframeDockActivation {
dockId: string;
params?: Record<string, unknown>;
}
/**
* Shape of the `devframe:docks:active` shared-state slot — the most recent
* {@link DevframeDockActivation}, or `null` before any activation. Mirrored
* so a dock that mounts in response to an activation can still converge on the
* request instead of missing the live broadcast.
*/
interface DevframeDocksActiveState {
activation: DevframeDockActivation | null;
}
type DevframeDockEntryCategory = 'framework' | 'app' | 'ui' | 'data' | 'web' | 'performance' | 'advanced' | 'docs' | 'default' | '~builtin' | (string & {});
type DevframeDockEntryIcon = string | {
light: string;
dark: string;
};
interface DevframeDockEntryBase {
id: string;
title: string;
icon: DevframeDockEntryIcon;
/**
* The default order of the entry in the dock.
* The higher the number the earlier it appears.
* @default 0
*/
defaultOrder?: number;
/**
* The category of the entry — a field with a dual role that depends on
* whether {@link groupId} resolves to a registered {@link DevframeViewGroup}:
*
* - **Ungrouped (or orphan) entry** — `category` is the entry's OUTER bucket
* on the dock bar, ordered by {@link import('../constants').DEFAULT_CATEGORIES_ORDER}.
* - **Grouped entry** (a `groupId` that resolves to a registered group) —
* the OUTER bucket is instead the group's own `category`, and this field is
* reinterpreted as the entry's IN-GROUP sub-category, used to sub-divide and
* sort members inside the group's popover / sub-navigation.
*
* Falls back to `'default'` when omitted — both as an outer bucket and, for a
* grouped member, as its in-group sub-bucket.
*
* @default 'default'
*/
category?: DevframeDockEntryCategory;
/**
* Conditional visibility expression.
* When set, the dock entry is only visible when the expression evaluates to true.
* Uses the same syntax as command `when` clauses.
*
* Set to `'false'` to unconditionally hide the entry.
*
* @example 'clientType == embedded'
* @see {@link import('devframe/utils/when').evaluateWhen}
*/
when?: string;
/**
* Badge text to display on the dock icon (e.g., unread count)
*/
badge?: string;
/**
* Id of the group this entry belongs to. When set, hosts collapse this entry
* under the matching group's button instead of showing it directly on the
* dock bar.
*
* This is a flat pointer — membership, not containment. The entry stays an
* independently-registered, top-level entry; only its rendering is grouped
* downstream.
*
* When the referenced group **is** registered, it supplies the entry's OUTER
* dock-bar category (the group's own {@link category}), and this entry's own
* {@link category} is reinterpreted as its IN-GROUP sub-category. When the
* referenced group is **never** registered, the entry renders as a normal
* top-level entry and falls back to using its own {@link category} as the
* outer bucket (orphan tolerance).
*
* @see {@link DevframeViewGroup}
*/
groupId?: string;
}
interface ClientScriptEntry {
/**
* The filepath or module name to import from
*/
importFrom: string;
/**
* The name to import the module as
*
* @default 'default'
*/
importName?: string;
}
interface DevframeViewIframe extends DevframeDockEntryBase {
type: 'iframe';
url: string;
/**
* The id of the iframe, if multiple tabs is assigned with the same id, the iframe will be shared.
*
* When not provided, it would be treated as a unique frame.
*
* `frameId` is an axis independent of {@link DevframeDockEntryBase.groupId}:
* it decides *which* iframe element a dock renders into (and which soft-nav
* pool it joins), while `groupId` only affects dock-bar grouping. Docks that
* share a `frameId` may live in one group, several groups, or none.
*/
frameId?: string;
/**
* Optional client script to import into the iframe
*/
clientScript?: ClientScriptEntry;
/**
* Soft-navigation target within a shared frame. Set on a **member** dock
* (one of several docks sharing a {@link frameId}) to describe which internal
* view the embedded app should show. The hub treats {@link NavTarget.path} as
* opaque and hands it to the frame's nav shim over `postMessage`; switching to
* this dock performs client-side navigation instead of reloading the iframe.
*
* The anchor dock (the one flagged with {@link subTabs}) leaves this unset.
*/
navTarget?: NavTarget;
/**
* Marks this iframe as a **shared-frame anchor** whose sub-tabs are discovered
* at runtime over a host↔iframe `postMessage` protocol. The client host
* auto-attaches the frame-nav adapter when this iframe mounts: it runs the
* ready handshake, materializes one client-only member dock per reported tab
* (grouped/soft-navigated via this anchor's {@link frameId}), and drives the
* live navigation loop. Absent a shim, the anchor simply renders as a single
* plain iframe dock.
*/
subTabs?: FrameSubTabsConfig;
/**
* Enable remote-UI mode: the hub injects a connection descriptor
* (WS URL + pre-approved auth token) into the iframe URL so a hosted
* page can connect back via `connectRemoteDevframe()` from
* `@devframes/hub/client` — without needing to ship a dist with the
* plugin.
*
* Requires dev mode (no effect in build mode — no WS server exists).
* When enabled, the dock is automatically hidden in build mode unless
* the author provides an explicit `when` clause.
*/
remote?: boolean | RemoteDockOptions;
}
/**
* A structured, soft-navigation target within a shared frame. `path` is opaque
* to the hub — the embedded app maps it onto its own router.
*
* Kept to `path` + `query` so the shape survives shared-state's `Immutable`
* projection cleanly (a `DevframeViewIframe` must still narrow back from its
* immutable form). An `unknown`/recursive history-`state` field breaks that
* round-trip, so richer per-navigation state is intentionally out of scope for
* now — carry it in `query` or the app's own store.
*/
interface NavTarget {
path: string;
query?: Record<string, string | readonly string[]>;
}
/**
* Configuration for a {@link DevframeViewIframe.subTabs shared-frame anchor}.
*/
interface FrameSubTabsConfig {
/** Transport for tab discovery + the live nav loop. */
protocol: 'postmessage';
/**
* How long (ms) the adapter waits for the shim's `ready` before treating the
* frame as having no shim (the anchor renders as a single plain iframe dock,
* and a navigation requested before readiness hard-navigates).
*
* @default 3000
*/
handshakeTimeoutMs?: number;
}
interface RemoteDockOptions {
/**
* How to pass the connection descriptor to the hosted page.
*
* - `'fragment'` (default): appended as a URL fragment.
* Not sent in HTTP requests or Referer headers — safest for auth tokens.
* - `'query'`: appended as a URL query parameter. Use when your hosting
* platform rewrites fragments or your SPA router repurposes the fragment
* for navigation. The token will appear in server access logs and
* outbound Referer headers.
*
* @default 'fragment'
*/
transport?: 'fragment' | 'query';
/**
* Reject WS handshakes whose `Origin` header doesn't match the dock URL
* origin. Turn off when the same hosted app is served from multiple
* origins (e.g. preview deploys).
*
* @default true
*/
originLock?: boolean;
}
interface RemoteConnectionInfo extends ConnectionMeta {
backend: 'websocket';
websocket: string;
v: 1;
authToken: string;
origin: string;
}
type DevframeViewLauncherStatus = 'idle' | 'loading' | 'success' | 'error';
interface DevframeViewLauncher extends DevframeDockEntryBase {
type: 'launcher';
launcher: {
icon?: DevframeDockEntryIcon;
title: string;
status?: DevframeViewLauncherStatus;
error?: string;
description?: string;
buttonStart?: string;
buttonLoading?: string;
/**
* Bound command id: the launch button, command palette entry, and any
* keybinding all resolve to this one handler. A viewer running out of
* process dispatches it over the `hub:commands:execute` RPC — the
* serializable path {@link onLaunch} can't cross, since a function is
* dropped when the entry is projected into the `devframe:docks` shared
* state. Register the command (with its handler) via `ctx.commands`.
*/
command?: string;
/**
* Id of the terminal session this launcher tracks (e.g. the one returned
* by `ctx.terminals.startChildProcess`). A viewer surfaces a first-class
* "view in terminal" action that calls `hub:docks:activate` with the
* terminals dock id and `{ sessionId: terminalSessionId }`, jumping the
* user straight to the running process.
*/
terminalSessionId?: string;
/**
* Latest single line of progress for inline display beneath the launcher
* (e.g. the tail of the tracked session's output). Author-set: the owner
* patches it via `docks.update()` as the process reports progress.
*/
digest?: string;
/**
* In-process launch handler. Optional: a same-process host can invoke it
* directly, but it does not survive projection into shared state, so an
* out-of-process viewer relies on {@link command} instead. Provide one or
* both.
*/
onLaunch?: () => Promise<void>;
};
}
interface DevframeViewAction extends DevframeDockEntryBase {
type: 'action';
action: ClientScriptEntry;
}
interface DevframeViewCustomRender extends DevframeDockEntryBase {
type: 'custom-render';
renderer: ClientScriptEntry;
}
/**
* A view rendered natively by the viewer rather than by a plugin — the
* settings panel, the terminals feed, the messages feed, etc. A high-level
* integration registers the built-in views it wants; the viewer recognizes the
* reserved `id` and renders its own UI for it.
*
* Its {@link DevframeDockEntryBase.category} defaults to `'~builtin'` when
* omitted, so built-in views group together and sort last without every
* integration repeating it.
*/
interface DevframeViewBuiltin extends DevframeDockEntryBase {
type: '~builtin';
id: string;
}
/**
* @deprecated json-render moved out of the hub into the opt-in
* `@devframes/json-render` integration in 0.7, which contributes its own
* `'json-render'` entry (carrying a serializable view ref, not a live
* `JsonRenderer` handle) to {@link DevframeDockEntryRegistry} via declaration
* merging. This type is kept for compatibility but is no longer a member of
* {@link DevframeDockUserEntry} — use `@devframes/json-render/hub` instead.
* Removed in 0.8.
*/
interface DevframeViewJsonRender extends DevframeDockEntryBase {
type: 'json-render';
/** JsonRenderer handle created by the deprecated ctx.createJsonRenderer() */
ui: JsonRenderer;
}
/**
* A dock group: a single dock-bar button that collapses every entry whose
* {@link DevframeDockEntryBase.groupId} matches this group's `id`.
*
* A group carries its own `title`/`icon`/`category`/`defaultOrder`/`when`
* (inherited from {@link DevframeDockEntryBase}) and has no view payload of its
* own — hosts render its members in a popover / sub-navigation. It flows
* through the same `register`/`update`/`values` machinery as every other entry,
* keyed by `id`.
*
* The group's `category` is the OUTER bucket for the group button itself AND
* for every one of its members — a member's own `category` no longer decides
* its outer bucket, but is reinterpreted as an in-group sub-category that
* sub-divides and sorts members inside this group. A group with no `category`
* buckets itself and its members under `'default'`.
*
* Grouping is one level deep: a group entry must not itself set `groupId`.
*/
interface DevframeViewGroup extends DevframeDockEntryBase {
type: 'group';
/**
* Member id auto-opened when the group button is activated. When unset,
* activating the group only reveals its members (popover-only); no view
* opens until a member is chosen.
*/
defaultChildId?: string;
/**
* Per-group override of the in-group sub-category ordering — a map of
* sub-category id → ordering weight (lower sorts earlier), mirroring the
* shape of {@link import('../constants').DEFAULT_CATEGORIES_ORDER}.
*
* A member's own {@link DevframeDockEntryBase.category} is reinterpreted as
* its IN-GROUP sub-category, and members are sub-divided and sorted by those
* sub-categories. By default that sort follows the hub-wide
* `DEFAULT_CATEGORIES_ORDER`; set this to reorder the sub-categories **inside
* this group only**, leaving the outer dock-bar ordering (and every other
* group) untouched.
*
* Keys are merged over the defaults, so you only list the sub-categories you
* want to move; any sub-category absent from the map keeps its default weight
* (falling back to `0`).
*
* @example
* ```ts
* // In the "nuxt" group, surface `app` tools before `framework` internals.
* { type: 'group', id: 'nuxt', categoryOrder: { app: -200 } }
* ```
*/
categoryOrder?: Record<string, number>;
}
/**
* The **open** registry of dock entry variants, keyed by their `type`
* discriminator. The hub ships the framework-neutral built-ins; opt-in
* integrations contribute their own variants through declaration merging —
* e.g. `@devframes/json-render/hub` adds a `'json-render'` entry. The hub
* itself stays agnostic: it hard-codes no integration-specific variant.
*
* @example
* ```ts
* // in an opt-in integration package
* declare module '@devframes/hub/types' {
* interface DevframeDockEntryRegistry {
* 'my-view': MyDockEntry
* }
* }
* ```
*/
interface DevframeDockEntryRegistry {
'iframe': DevframeViewIframe;
'action': DevframeViewAction;
'custom-render': DevframeViewCustomRender;
'launcher': DevframeViewLauncher;
'group': DevframeViewGroup;
'~builtin': DevframeViewBuiltin;
}
type DevframeDockUserEntry = DevframeDockEntryRegistry[keyof DevframeDockEntryRegistry];
type DevframeDockEntry = DevframeDockUserEntry;
type DevframeDockEntriesGrouped = [category: string, entries: DevframeDockEntry[]][];
//#endregion
//#region src/types/commands.d.ts
interface DevframeCommandKeybinding {
/**
* Keyboard shortcut string.
* Use "Mod" for platform-aware modifier (Cmd on macOS, Ctrl elsewhere).
* Examples: "Mod+K", "Mod+Shift+P", "Alt+N"
*/
key: string;
}
interface DevframeCommandBase {
/**
* Unique namespaced ID, e.g. "vite:open-in-editor"
*/
id: string;
title: string;
description?: string;
/**
* Icon for the command. Either an Iconify icon string (e.g. "ph:pencil-duotone")
* or a theme-specific pair `{ light, dark }` — the same shape as dock icons.
*/
icon?: DevframeDockEntryIcon;
category?: string;
/**
* Whether to show in command palette. Default: true
*
* - `true` — show the command and flatten its children into search results
* - `false` — hide the command entirely from the palette
* - `'without-children'` — show the command but don't flatten children into top-level search (children are still accessible via drill-down)
*/
showInPalette?: boolean | 'without-children';
/**
* Optional context expression for conditional visibility.
* When set, the command is only shown in the palette and only executable
* when the expression evaluates to true.
*/
when?: string;
/**
* Default keyboard shortcut(s) for this command
*/
keybindings?: DevframeCommandKeybinding[];
}
/**
* Server command input — what plugins pass to `ctx.commands.register()`.
*/
interface DevframeServerCommandInput extends DevframeCommandBase {
/**
* Handler for this command. Optional if the command only serves as a group for children.
*/
handler?: (...args: any[]) => any | Promise<any>;
/**
* Static sub-commands. Two levels max (parent → children).
* Each child must have a globally unique `id`.
*/
children?: DevframeServerCommandInput[];
}
/**
* Serializable server command entry — sent over RPC (no handler).
*/
interface DevframeServerCommandEntry extends DevframeCommandBase {
source: 'server';
children?: DevframeServerCommandEntry[];
}
/**
* Client command — registered in the webcomponent context.
*/
interface DevframeClientCommand extends DevframeCommandBase {
source: 'client';
/**
* Action for this command. Optional if the command only serves as a group for children.
* Return sub-commands for dynamic nested palette menus (runtime submenus).
*/
action?: (...args: any[]) => void | DevframeClientCommand[] | Promise<void | DevframeClientCommand[]>;
/**
* Static sub-commands. Two levels max (parent → children).
*/
children?: DevframeClientCommand[];
}
/**
* Union of command entries visible in the palette.
*/
type DevframeCommandEntry = DevframeServerCommandEntry | DevframeClientCommand;
interface DevframeCommandHandle {
readonly id: string;
update: (patch: Partial<Omit<DevframeServerCommandInput, 'id'>>) => void;
unregister: () => void;
}
interface DevframeCommandsHostEvents {
'command:registered': (command: DevframeServerCommandEntry) => void;
'command:unregistered': (id: string) => void;
}
interface DevframeCommandsHost {
readonly commands: Map<string, DevframeServerCommandInput>;
readonly events: EventEmitter<DevframeCommandsHostEvents>;
/**
* Register a command (with optional children).
*/
register: (command: DevframeServerCommandInput) => DevframeCommandHandle;
/**
* Unregister a command by ID (removes parent and all children).
*/
unregister: (id: string) => boolean;
/**
* Execute a command by ID. Searches top-level and children.
* Throws if not found or if command has no handler.
*/
execute: (id: string, ...args: any[]) => Promise<unknown>;
/**
* Returns serializable list (no handlers), preserving tree structure.
*/
list: () => DevframeServerCommandEntry[];
}
interface DevframeCommandShortcutOverrides {
/**
* Command ID → keybinding overrides. Empty array = shortcut disabled.
*/
[commandId: string]: DevframeCommandKeybinding[];
}
//#endregion
//#region src/types/settings.d.ts
interface DevframeDocksUserSettings {
docksHidden: string[];
docksCategoriesHidden: string[];
docksPinned: string[];
docksCustomOrder: Record<string, number>;
showIframeAddressBar: boolean;
closeOnOutsideClick: boolean;
commandShortcuts: DevframeCommandShortcutOverrides;
}
//#endregion
export { DevframeViewLauncherStatus as A, DevframeViewAction as C, DevframeViewIframe as D, DevframeViewGroup as E, JsonRenderElement as F, JsonRenderSpec as I, JsonRenderer as L, NavTarget as M, RemoteConnectionInfo as N, DevframeViewJsonRender as O, RemoteDockOptions as P, DevframeDocksHost as S, DevframeViewCustomRender as T, DevframeDockEntryCategory as _, DevframeCommandHandle as a, DevframeDockUserEntry as b, DevframeCommandsHost as c, DevframeServerCommandInput as d, ClientScriptEntry as f, DevframeDockEntryBase as g, DevframeDockEntry as h, DevframeCommandEntry as i, FrameSubTabsConfig as j, DevframeViewLauncher as k, DevframeCommandsHostEvents as l, DevframeDockEntriesGrouped as m, DevframeClientCommand as n, DevframeCommandKeybinding as o, DevframeDockActivation as p, DevframeCommandBase as r, DevframeCommandShortcutOverrides as s, DevframeDocksUserSettings as t, DevframeServerCommandEntry as u, DevframeDockEntryIcon as v, DevframeViewBuiltin as w, DevframeDocksActiveState as x, DevframeDockEntryRegistry as y };
+25
-3

@@ -1,5 +0,5 @@

import { D as DevframeViewIframe, M as NavTarget, N as RemoteConnectionInfo, b as DevframeDockUserEntry, h as DevframeDockEntry, i as DevframeCommandEntry, m as DevframeDockEntriesGrouped, n as DevframeClientCommand, o as DevframeCommandKeybinding, t as DevframeDocksUserSettings, v as DevframeDockEntryIcon } from "../settings-Brw6_lEi.mjs";
import { D as DevframeViewIframe, M as NavTarget, N as RemoteConnectionInfo, b as DevframeDockUserEntry, h as DevframeDockEntry, i as DevframeCommandEntry, m as DevframeDockEntriesGrouped, n as DevframeClientCommand, o as DevframeCommandKeybinding, t as DevframeDocksUserSettings, v as DevframeDockEntryIcon } from "../settings-BIhD5WT_.mjs";
import { DEFAULT_CATEGORIES_ORDER } from "../constants.mjs";
import { S as DevframeMessagesClient, _ as DevframeMessageEntryInput } from "../context-CCyi44Ep.mjs";
import "../index-Dyam2SU1.mjs";
import { S as DevframeMessagesClient, _ as DevframeMessageEntryInput } from "../context-BdaDhtC2.mjs";
import "../index-Df737YkR.mjs";
import { DevframeClientRpcHost, DevframeConnectionStatus, DevframeRpcClient, DevframeRpcClientOptions, DevframeRpcContext, RpcClientEvents, RpcClientEvents as RpcClientEvents$1 } from "devframe/client";

@@ -408,2 +408,24 @@ import { EventEmitter } from "devframe/types";

renderers?: Record<string, DockRenderer>;
/**
* Hub-wide override of the top-level dock-bar category ordering — a map of
* category id → ordering weight (lower sorts earlier), mirroring the shape
* of {@link import('../constants').DEFAULT_CATEGORIES_ORDER}.
*
* This is the OUTER bucket ordering: it governs every ungrouped entry's own
* `category` and every group's `category` (see
* {@link import('../types/docks').DevframeDockEntryBase.category}). It is
* distinct from {@link import('../types/docks').DevframeViewGroup.categoryOrder},
* which only reorders the IN-GROUP sub-categories of one specific group.
*
* Keys are merged over `DEFAULT_CATEGORIES_ORDER`, so the host app only
* lists the categories it wants to move; any category absent from the map
* keeps its default weight (falling back to `0`).
*
* @example
* ```ts
* // Surface `data` tools ahead of `app` tools, hub-wide.
* createDevframeClientHost({ categoryOrder: { data: 50 } })
* ```
*/
categoryOrder?: Record<string, number>;
}

@@ -410,0 +432,0 @@ interface DevframeClientHost {

+1
-1

@@ -1,2 +0,2 @@

import { t as DevframeDocksUserSettings } from "./settings-Brw6_lEi.mjs";
import { t as DevframeDocksUserSettings } from "./settings-BIhD5WT_.mjs";
export * from "devframe/constants";

@@ -3,0 +3,0 @@ //#region src/constants.d.ts

@@ -1,5 +0,5 @@

import { A as DevframeViewLauncherStatus, C as DevframeViewAction, D as DevframeViewIframe, E as DevframeViewGroup, F as JsonRenderElement, I as JsonRenderSpec, L as JsonRenderer, M as NavTarget, N as RemoteConnectionInfo, O as DevframeViewJsonRender, P as RemoteDockOptions, S as DevframeDocksHost, T as DevframeViewCustomRender, _ as DevframeDockEntryCategory, a as DevframeCommandHandle, b as DevframeDockUserEntry, c as DevframeCommandsHost, d as DevframeServerCommandInput, f as ClientScriptEntry, g as DevframeDockEntryBase, h as DevframeDockEntry, i as DevframeCommandEntry, j as FrameSubTabsConfig, k as DevframeViewLauncher, l as DevframeCommandsHostEvents, m as DevframeDockEntriesGrouped, n as DevframeClientCommand, o as DevframeCommandKeybinding, p as DevframeDockActivation, r as DevframeCommandBase, s as DevframeCommandShortcutOverrides, t as DevframeDocksUserSettings, u as DevframeServerCommandEntry, v as DevframeDockEntryIcon, w as DevframeViewBuiltin, x as DevframeDocksActiveState, y as DevframeDockEntryRegistry } from "./settings-Brw6_lEi.mjs";
import { A as DevframeViewLauncherStatus, C as DevframeViewAction, D as DevframeViewIframe, E as DevframeViewGroup, F as JsonRenderElement, I as JsonRenderSpec, L as JsonRenderer, M as NavTarget, N as RemoteConnectionInfo, O as DevframeViewJsonRender, P as RemoteDockOptions, S as DevframeDocksHost, T as DevframeViewCustomRender, _ as DevframeDockEntryCategory, a as DevframeCommandHandle, b as DevframeDockUserEntry, c as DevframeCommandsHost, d as DevframeServerCommandInput, f as ClientScriptEntry, g as DevframeDockEntryBase, h as DevframeDockEntry, i as DevframeCommandEntry, j as FrameSubTabsConfig, k as DevframeViewLauncher, l as DevframeCommandsHostEvents, m as DevframeDockEntriesGrouped, n as DevframeClientCommand, o as DevframeCommandKeybinding, p as DevframeDockActivation, r as DevframeCommandBase, s as DevframeCommandShortcutOverrides, t as DevframeDocksUserSettings, u as DevframeServerCommandEntry, v as DevframeDockEntryIcon, w as DevframeViewBuiltin, x as DevframeDocksActiveState, y as DevframeDockEntryRegistry } from "./settings-BIhD5WT_.mjs";
import { DEFAULT_CATEGORIES_ORDER } from "./constants.mjs";
import { C as DevframeMessagesHost, S as DevframeMessagesClient, T as DevframeMessagesListDelta, _ as DevframeMessageEntryInput, a as DevframeChildProcessOutput, b as DevframeMessageLevel, c as DevframePtyExecuteOptions, d as DevframeTerminalSessionBase, f as DevframeTerminalStatus, g as DevframeMessageEntryFrom, h as DevframeMessageEntry, i as DevframeChildProcessExecuteOptions, l as DevframePtyTerminalSession, m as DevframeMessageElementPosition, n as DevframeHubContext, o as DevframeChildProcessResult, p as DevframeTerminalsHost, s as DevframeChildProcessTerminalSession, t as CreateHubContextOptions, u as DevframeTerminalSession, v as DevframeMessageFilePosition, w as DevframeMessagesLevelShortcuts, x as DevframeMessageShortcutInput, y as DevframeMessageHandle } from "./context-CCyi44Ep.mjs";
import { C as RpcStreamingChannel, E as Thenable, S as RpcSharedStateHost, T as RpcStreamingHost, _ as RpcBroadcastOptions, a as DevframeDiagnosticsLogger, b as RpcFunctionsHost, c as DevframeRpcClientFunctions, d as DevframeViewHost, f as EntriesToObject, g as PartialWithoutId, h as EventsMap, i as DevframeDiagnosticsHost, l as DevframeRpcServerFunctions, m as EventUnsubscribe, n as DevframeCapabilities, o as DevframeHost, p as EventEmitter, r as DevframeDiagnosticsDefinition, s as DevframeNodeRpcSession, t as ConnectionMeta, u as DevframeRpcSharedStates, v as RpcDefinitionsFilter, w as RpcStreamingChannelOptions, x as RpcSharedStateGetOptions, y as RpcDefinitionsToFunctions } from "./index-Dyam2SU1.mjs";
import { C as DevframeMessagesHost, S as DevframeMessagesClient, T as DevframeMessagesListDelta, _ as DevframeMessageEntryInput, a as DevframeChildProcessOutput, b as DevframeMessageLevel, c as DevframePtyExecuteOptions, d as DevframeTerminalSessionBase, f as DevframeTerminalStatus, g as DevframeMessageEntryFrom, h as DevframeMessageEntry, i as DevframeChildProcessExecuteOptions, l as DevframePtyTerminalSession, m as DevframeMessageElementPosition, n as DevframeHubContext, o as DevframeChildProcessResult, p as DevframeTerminalsHost, s as DevframeChildProcessTerminalSession, t as CreateHubContextOptions, u as DevframeTerminalSession, v as DevframeMessageFilePosition, w as DevframeMessagesLevelShortcuts, x as DevframeMessageShortcutInput, y as DevframeMessageHandle } from "./context-BdaDhtC2.mjs";
import { C as RpcStreamingChannel, E as Thenable, S as RpcSharedStateHost, T as RpcStreamingHost, _ as RpcBroadcastOptions, a as DevframeDiagnosticsLogger, b as RpcFunctionsHost, c as DevframeRpcClientFunctions, d as DevframeViewHost, f as EntriesToObject, g as PartialWithoutId, h as EventsMap, i as DevframeDiagnosticsHost, l as DevframeRpcServerFunctions, m as EventUnsubscribe, n as DevframeCapabilities, o as DevframeHost, p as EventEmitter, r as DevframeDiagnosticsDefinition, s as DevframeNodeRpcSession, t as ConnectionMeta, u as DevframeRpcSharedStates, v as RpcDefinitionsFilter, w as RpcStreamingChannelOptions, x as RpcSharedStateGetOptions, y as RpcDefinitionsToFunctions } from "./index-Df737YkR.mjs";
import { WhenContext, WhenExpression } from "devframe/utils/when";

@@ -6,0 +6,0 @@ //#region src/define.d.ts

@@ -1,4 +0,4 @@

import { D as DevframeViewIframe, S as DevframeDocksHost$1, a as DevframeCommandHandle, b as DevframeDockUserEntry, c as DevframeCommandsHost$1, d as DevframeServerCommandInput, f as ClientScriptEntry, h as DevframeDockEntry, t as DevframeDocksUserSettings, u as DevframeServerCommandEntry } from "../settings-Brw6_lEi.mjs";
import { D as DevframeViewIframe, S as DevframeDocksHost$1, a as DevframeCommandHandle, b as DevframeDockUserEntry, c as DevframeCommandsHost$1, d as DevframeServerCommandInput, f as ClientScriptEntry, h as DevframeDockEntry, t as DevframeDocksUserSettings, u as DevframeServerCommandEntry } from "../settings-BIhD5WT_.mjs";
import { DEFAULT_CATEGORIES_ORDER } from "../constants.mjs";
import { C as DevframeMessagesHost$1, T as DevframeMessagesListDelta, _ as DevframeMessageEntryInput, c as DevframePtyExecuteOptions, d as DevframeTerminalSessionBase, h as DevframeMessageEntry, i as DevframeChildProcessExecuteOptions, l as DevframePtyTerminalSession, n as DevframeHubContext, p as DevframeTerminalsHost$1, r as createHubContext, s as DevframeChildProcessTerminalSession, t as CreateHubContextOptions, u as DevframeTerminalSession, x as DevframeMessageShortcutInput, y as DevframeMessageHandle } from "../context-CCyi44Ep.mjs";
import { C as DevframeMessagesHost$1, T as DevframeMessagesListDelta, _ as DevframeMessageEntryInput, c as DevframePtyExecuteOptions, d as DevframeTerminalSessionBase, h as DevframeMessageEntry, i as DevframeChildProcessExecuteOptions, l as DevframePtyTerminalSession, n as DevframeHubContext, p as DevframeTerminalsHost$1, r as createHubContext, s as DevframeChildProcessTerminalSession, t as CreateHubContextOptions, u as DevframeTerminalSession, x as DevframeMessageShortcutInput, y as DevframeMessageHandle } from "../context-BdaDhtC2.mjs";
import { RpcFunctionDefinitionAny } from "devframe/rpc";

@@ -5,0 +5,0 @@ import { DevframeDefinition } from "devframe/types";

@@ -1,4 +0,4 @@

import { A as DevframeViewLauncherStatus, C as DevframeViewAction, D as DevframeViewIframe, E as DevframeViewGroup, F as JsonRenderElement, I as JsonRenderSpec, L as JsonRenderer, M as NavTarget, N as RemoteConnectionInfo, O as DevframeViewJsonRender, P as RemoteDockOptions, S as DevframeDocksHost, T as DevframeViewCustomRender, _ as DevframeDockEntryCategory, a as DevframeCommandHandle, b as DevframeDockUserEntry, c as DevframeCommandsHost, d as DevframeServerCommandInput, f as ClientScriptEntry, g as DevframeDockEntryBase, h as DevframeDockEntry, i as DevframeCommandEntry, j as FrameSubTabsConfig, k as DevframeViewLauncher, l as DevframeCommandsHostEvents, m as DevframeDockEntriesGrouped, n as DevframeClientCommand, o as DevframeCommandKeybinding, p as DevframeDockActivation, r as DevframeCommandBase, s as DevframeCommandShortcutOverrides, t as DevframeDocksUserSettings, u as DevframeServerCommandEntry, v as DevframeDockEntryIcon, w as DevframeViewBuiltin, x as DevframeDocksActiveState, y as DevframeDockEntryRegistry } from "../settings-Brw6_lEi.mjs";
import { C as DevframeMessagesHost, S as DevframeMessagesClient, T as DevframeMessagesListDelta, _ as DevframeMessageEntryInput, a as DevframeChildProcessOutput, b as DevframeMessageLevel, c as DevframePtyExecuteOptions, d as DevframeTerminalSessionBase, f as DevframeTerminalStatus, g as DevframeMessageEntryFrom, h as DevframeMessageEntry, i as DevframeChildProcessExecuteOptions, l as DevframePtyTerminalSession, m as DevframeMessageElementPosition, n as DevframeHubContext, o as DevframeChildProcessResult, p as DevframeTerminalsHost, s as DevframeChildProcessTerminalSession, t as CreateHubContextOptions, u as DevframeTerminalSession, v as DevframeMessageFilePosition, w as DevframeMessagesLevelShortcuts, x as DevframeMessageShortcutInput, y as DevframeMessageHandle } from "../context-CCyi44Ep.mjs";
import { C as RpcStreamingChannel, E as Thenable, S as RpcSharedStateHost, T as RpcStreamingHost, _ as RpcBroadcastOptions, a as DevframeDiagnosticsLogger, b as RpcFunctionsHost, c as DevframeRpcClientFunctions, d as DevframeViewHost, f as EntriesToObject, g as PartialWithoutId, h as EventsMap, i as DevframeDiagnosticsHost, l as DevframeRpcServerFunctions, m as EventUnsubscribe, n as DevframeCapabilities, o as DevframeHost, p as EventEmitter, r as DevframeDiagnosticsDefinition, s as DevframeNodeRpcSession, t as ConnectionMeta, u as DevframeRpcSharedStates, v as RpcDefinitionsFilter, w as RpcStreamingChannelOptions, x as RpcSharedStateGetOptions, y as RpcDefinitionsToFunctions } from "../index-Dyam2SU1.mjs";
import { A as DevframeViewLauncherStatus, C as DevframeViewAction, D as DevframeViewIframe, E as DevframeViewGroup, F as JsonRenderElement, I as JsonRenderSpec, L as JsonRenderer, M as NavTarget, N as RemoteConnectionInfo, O as DevframeViewJsonRender, P as RemoteDockOptions, S as DevframeDocksHost, T as DevframeViewCustomRender, _ as DevframeDockEntryCategory, a as DevframeCommandHandle, b as DevframeDockUserEntry, c as DevframeCommandsHost, d as DevframeServerCommandInput, f as ClientScriptEntry, g as DevframeDockEntryBase, h as DevframeDockEntry, i as DevframeCommandEntry, j as FrameSubTabsConfig, k as DevframeViewLauncher, l as DevframeCommandsHostEvents, m as DevframeDockEntriesGrouped, n as DevframeClientCommand, o as DevframeCommandKeybinding, p as DevframeDockActivation, r as DevframeCommandBase, s as DevframeCommandShortcutOverrides, t as DevframeDocksUserSettings, u as DevframeServerCommandEntry, v as DevframeDockEntryIcon, w as DevframeViewBuiltin, x as DevframeDocksActiveState, y as DevframeDockEntryRegistry } from "../settings-BIhD5WT_.mjs";
import { C as DevframeMessagesHost, S as DevframeMessagesClient, T as DevframeMessagesListDelta, _ as DevframeMessageEntryInput, a as DevframeChildProcessOutput, b as DevframeMessageLevel, c as DevframePtyExecuteOptions, d as DevframeTerminalSessionBase, f as DevframeTerminalStatus, g as DevframeMessageEntryFrom, h as DevframeMessageEntry, i as DevframeChildProcessExecuteOptions, l as DevframePtyTerminalSession, m as DevframeMessageElementPosition, n as DevframeHubContext, o as DevframeChildProcessResult, p as DevframeTerminalsHost, s as DevframeChildProcessTerminalSession, t as CreateHubContextOptions, u as DevframeTerminalSession, v as DevframeMessageFilePosition, w as DevframeMessagesLevelShortcuts, x as DevframeMessageShortcutInput, y as DevframeMessageHandle } from "../context-BdaDhtC2.mjs";
import { C as RpcStreamingChannel, E as Thenable, S as RpcSharedStateHost, T as RpcStreamingHost, _ as RpcBroadcastOptions, a as DevframeDiagnosticsLogger, b as RpcFunctionsHost, c as DevframeRpcClientFunctions, d as DevframeViewHost, f as EntriesToObject, g as PartialWithoutId, h as EventsMap, i as DevframeDiagnosticsHost, l as DevframeRpcServerFunctions, m as EventUnsubscribe, n as DevframeCapabilities, o as DevframeHost, p as EventEmitter, r as DevframeDiagnosticsDefinition, s as DevframeNodeRpcSession, t as ConnectionMeta, u as DevframeRpcSharedStates, v as RpcDefinitionsFilter, w as RpcStreamingChannelOptions, x as RpcSharedStateGetOptions, y as RpcDefinitionsToFunctions } from "../index-Df737YkR.mjs";
export { ClientScriptEntry, type ConnectionMeta, type CreateHubContextOptions, type DevframeCapabilities, DevframeChildProcessExecuteOptions, DevframeChildProcessOutput, DevframeChildProcessResult, DevframeChildProcessTerminalSession, DevframeClientCommand, DevframeCommandBase, DevframeCommandEntry, DevframeCommandHandle, DevframeCommandKeybinding, DevframeCommandShortcutOverrides, DevframeCommandsHost, DevframeCommandsHostEvents, type DevframeDiagnosticsDefinition, type DevframeDiagnosticsHost, type DevframeDiagnosticsLogger, DevframeDockActivation, DevframeDockEntriesGrouped, DevframeDockEntry, DevframeDockEntryBase, DevframeDockEntryCategory, DevframeDockEntryIcon, DevframeDockEntryRegistry, DevframeDockUserEntry, DevframeDocksActiveState, DevframeDocksHost, DevframeDocksUserSettings, type DevframeHost, type DevframeHubContext, DevframeMessageElementPosition, DevframeMessageEntry, DevframeMessageEntryFrom, DevframeMessageEntryInput, DevframeMessageFilePosition, DevframeMessageHandle, DevframeMessageLevel, DevframeMessageShortcutInput, DevframeMessagesClient, DevframeMessagesHost, DevframeMessagesLevelShortcuts, DevframeMessagesListDelta, type DevframeNodeRpcSession, DevframePtyExecuteOptions, DevframePtyTerminalSession, type DevframeRpcClientFunctions, type DevframeRpcServerFunctions, type DevframeRpcSharedStates, DevframeServerCommandEntry, DevframeServerCommandInput, DevframeTerminalSession, DevframeTerminalSessionBase, DevframeTerminalStatus, DevframeTerminalsHost, DevframeViewAction, DevframeViewBuiltin, DevframeViewCustomRender, DevframeViewGroup, type DevframeViewHost, DevframeViewIframe, DevframeViewJsonRender, DevframeViewLauncher, DevframeViewLauncherStatus, type EntriesToObject, type EventEmitter, type EventUnsubscribe, type EventsMap, FrameSubTabsConfig, JsonRenderElement, JsonRenderSpec, JsonRenderer, NavTarget, type PartialWithoutId, RemoteConnectionInfo, RemoteDockOptions, type RpcBroadcastOptions, type RpcDefinitionsFilter, type RpcDefinitionsToFunctions, type RpcFunctionsHost, type RpcSharedStateGetOptions, type RpcSharedStateHost, type RpcStreamingChannel, type RpcStreamingChannelOptions, type RpcStreamingHost, type Thenable };
{
"name": "@devframes/hub",
"type": "module",
"version": "0.7.11",
"version": "0.7.12",
"description": "Framework-neutral hub layer for devframe — docks, terminals, messages, commands.",

@@ -36,3 +36,3 @@ "author": "Anthony Fu <anthonyfu117@hotmail.com>",

"peerDependencies": {
"devframe": "0.7.11"
"devframe": "0.7.12"
},

@@ -52,3 +52,3 @@ "dependencies": {

"tsdown": "^0.22.12",
"devframe": "0.7.11"
"devframe": "0.7.12"
},

@@ -55,0 +55,0 @@ "scripts": {

import { I as JsonRenderSpec, L as JsonRenderer, S as DevframeDocksHost, c as DevframeCommandsHost, p as DevframeDockActivation, v as DevframeDockEntryIcon } from "./settings-Brw6_lEi.mjs";
import { CreateHostContextOptions } from "devframe/node";
import { DevframeHost, DevframeNodeContext, EventEmitter } from "devframe/types";
import { ChildProcess } from "node:child_process";
//#region src/types/messages.d.ts
type DevframeMessageLevel = 'info' | 'warn' | 'error' | 'success' | 'debug';
type DevframeMessageEntryFrom = 'server' | 'browser';
interface DevframeMessageElementPosition {
/** CSS selector for the element */
selector?: string;
/** Bounding box of the element */
boundingBox?: {
x: number;
y: number;
width: number;
height: number;
};
/** Human-readable description of the element */
description?: string;
}
interface DevframeMessageFilePosition {
/** Absolute or relative file path */
file: string;
/** Line number (1-based) */
line?: number;
/** Column number (1-based) */
column?: number;
}
interface DevframeMessageEntry {
/**
* Unique identifier for this message entry (auto-generated if not provided)
*/
id: string;
/**
* Short title or summary of the message
*/
message: string;
/**
* Optional detailed description or explanation
*/
description?: string;
/**
* Severity level, determines color and icon
*/
level: DevframeMessageLevel;
/**
* Optional stack trace string
*/
stacktrace?: string;
/**
* Optional DOM element position info (e.g., for a11y issues)
*/
elementPosition?: DevframeMessageElementPosition;
/**
* Optional source file position info (e.g., for lint errors)
*/
filePosition?: DevframeMessageFilePosition;
/**
* Whether this message should also appear as a toast notification
*/
notify?: boolean;
/**
* Origin of the message entry, automatically set by the context
*/
from: DevframeMessageEntryFrom;
/**
* Grouping category (e.g., 'a11y', 'lint', 'runtime', 'test')
*/
category?: string;
/**
* Optional tags/labels for filtering
*/
labels?: string[];
/**
* Time in ms to auto-dismiss the toast notification (client-side)
*/
autoDismiss?: number;
/**
* Time in ms to auto-delete this message entry (server-side)
*/
autoDelete?: number;
/**
* Timestamp when the message was created (auto-generated if not provided)
*/
timestamp: number;
/**
* Status of the message entry (e.g., 'loading' while an operation is in progress).
* Defaults to 'idle' when not specified.
*/
status?: 'loading' | 'idle';
}
/**
* Input type for creating a message entry.
* `id`, `timestamp`, and `from` are auto-filled by the host.
*/
type DevframeMessageEntryInput = Omit<DevframeMessageEntry, 'id' | 'timestamp' | 'from'> & {
id?: string;
timestamp?: number;
};
interface DevframeMessageHandle {
/** The underlying message entry data */
readonly entry: DevframeMessageEntry;
/** Shortcut to entry.id */
readonly id: string;
/** Partial update of this message entry */
update: (patch: Partial<DevframeMessageEntryInput>) => Promise<DevframeMessageEntry | undefined>;
/** Remove this message entry */
dismiss: () => Promise<void>;
}
/**
* Extra fields accepted by the per-level message shortcuts —
* everything on {@link DevframeMessageEntryInput} except the
* `message` and `level` the shortcut itself provides.
*/
type DevframeMessageShortcutInput = Omit<DevframeMessageEntryInput, 'message' | 'level'>;
/**
* Per-level shortcuts shared by the client and the node host —
* `messages.info('...')` is `messages.add({ message: '...', level: 'info' })`.
*/
interface DevframeMessagesLevelShortcuts {
/** Shortcut for `add({ message, level: 'info', ...extra })` */
info: (message: string, extra?: DevframeMessageShortcutInput) => Promise<DevframeMessageHandle>;
/** Shortcut for `add({ message, level: 'warn', ...extra })` */
warn: (message: string, extra?: DevframeMessageShortcutInput) => Promise<DevframeMessageHandle>;
/** Shortcut for `add({ message, level: 'error', ...extra })` */
error: (message: string, extra?: DevframeMessageShortcutInput) => Promise<DevframeMessageHandle>;
/** Shortcut for `add({ message, level: 'success', ...extra })` */
success: (message: string, extra?: DevframeMessageShortcutInput) => Promise<DevframeMessageHandle>;
/** Shortcut for `add({ message, level: 'debug', ...extra })` */
debug: (message: string, extra?: DevframeMessageShortcutInput) => Promise<DevframeMessageHandle>;
}
interface DevframeMessagesClient extends DevframeMessagesLevelShortcuts {
/**
* Add a message entry. Returns a Promise resolving to a handle for subsequent updates/dismissal.
* Can be used without `await` for fire-and-forget usage.
*/
add: (input: DevframeMessageEntryInput) => Promise<DevframeMessageHandle>;
/** Remove a message entry by id */
remove: (id: string) => Promise<void>;
/** Clear all message entries */
clear: () => Promise<void>;
}
/**
* A snapshot or delta of the message list, as returned by
* {@link DevframeMessagesHost.listSince}. Consumers apply `removedIds`
* first, then upsert `entries`, and pass `version` back as `since` on the
* next call.
*/
interface DevframeMessagesListDelta {
/** Entries added or updated since the cursor (or all entries when `full`) */
entries: DevframeMessageEntry[];
/** Ids removed since the cursor (empty when `full`) */
removedIds: string[];
/** The version cursor — pass back as `since` on the next call */
version: number;
/**
* When `true`, `entries` is the complete snapshot and any locally cached
* list must be reset before applying it.
*/
full: boolean;
}
interface DevframeMessagesHost extends DevframeMessagesLevelShortcuts {
readonly entries: Map<string, DevframeMessageEntry>;
readonly events: EventEmitter<{
'message:added': (entry: DevframeMessageEntry) => void;
'message:updated': (entry: DevframeMessageEntry) => void;
'message:removed': (id: string) => void;
'message:cleared': () => void;
}>;
/**
* Add a new message entry. If an entry with the same `id` already exists, it will be updated instead.
* Returns a handle for subsequent updates/dismissal. Can be used without `await` for fire-and-forget.
*/
add: (entry: DevframeMessageEntryInput) => Promise<DevframeMessageHandle>;
/**
* Update an existing message entry by id (partial update)
*/
update: (id: string, patch: Partial<DevframeMessageEntryInput>) => Promise<DevframeMessageEntry | undefined>;
/**
* Remove a message entry by id
*/
remove: (id: string) => Promise<void>;
/**
* Clear all message entries
*/
clear: () => Promise<void>;
/**
* Read the message list incrementally. Pass the `version` from the
* previous result as `since` to receive only the entries modified and the
* ids removed after that point; pass `null`/`undefined` for the initial
* full snapshot. When the host can no longer compute a reliable delta for
* the given cursor (trimmed removal history, or a cursor from another host
* incarnation), the result carries `full: true` with the complete list.
*/
listSince: (since?: number | null) => DevframeMessagesListDelta;
}
//#endregion
//#region src/types/terminals.d.ts
interface DevframeTerminalsHost {
readonly sessions: Map<string, DevframeTerminalSession>;
readonly events: EventEmitter<{
'terminal:session:updated': (session: DevframeTerminalSession) => void;
}>;
register: (session: DevframeTerminalSession) => DevframeTerminalSession;
update: (session: DevframeTerminalSession) => void;
/** Drop a session from the registry, disposing its bound output stream. */
remove: (session: DevframeTerminalSession) => void;
/**
* Spawn a read-only child process (pipe-backed, output only). Use this for
* long-running logs and dev servers that don't need input.
*/
startChildProcess: (executeOptions: DevframeChildProcessExecuteOptions, terminal: Omit<DevframeTerminalSessionBase, 'status'>) => Promise<DevframeChildProcessTerminalSession>;
/**
* Spawn a fully interactive pseudo-terminal (PTY) any plugin can drive:
* keystrokes via {@link DevframePtyTerminalSession.write}, live layout via
* {@link DevframePtyTerminalSession.resize}, TUI-capable. The session is
* marked `interactive`, so a hub-aware terminal UI (e.g. the terminals
* plugin) surfaces it as writable rather than read-only. Powered by
* `zigpty` — where its native bindings can't load, it degrades to
* pipe-based terminal emulation.
*/
startPtySession: (executeOptions: DevframePtyExecuteOptions, terminal: Omit<DevframeTerminalSessionBase, 'status'>) => Promise<DevframePtyTerminalSession>;
}
type DevframeTerminalStatus = 'running' | 'stopped' | 'error';
interface DevframeTerminalSessionBase {
id: string;
title: string;
description?: string;
status: DevframeTerminalStatus;
icon?: DevframeDockEntryIcon;
/**
* Whether the session accepts input (keystrokes + resize). `true` for
* {@link DevframeTerminalsHost.startPtySession} sessions; absent/`false`
* for pipe-backed, output-only ones. A hub-aware terminal UI reads this to
* decide whether to enable stdin and wire resize.
*/
interactive?: boolean;
/**
* Whether the session may be restarted in place (re-running its command).
* Defaults to `true`. Set `false` for sessions whose lifecycle is owned
* elsewhere — e.g. a one-shot build, or a server (like code-server) that
* should be restarted through its own controls rather than by re-spawning
* the raw process. A hub-aware terminal UI hides its restart affordance for
* these, and `hub:terminals:restart` rejects them.
*/
restartable?: boolean;
}
interface DevframeTerminalSession extends DevframeTerminalSessionBase {
buffer?: string[];
stream?: ReadableStream<string>;
}
interface DevframeChildProcessExecuteOptions {
command: string;
args: string[];
cwd?: string;
env?: Record<string, string>;
}
/**
* The settled outcome of a {@link DevframeChildProcessTerminalSession} run —
* stdout/stderr captured separately (unlike the session's merged display
* `stream`), plus the process's exit code (`undefined` if it was killed by a
* signal before exiting).
*/
interface DevframeChildProcessOutput {
stdout: string;
stderr: string;
exitCode: number | undefined;
}
/**
* A live handle on a child process's outcome — mirrors the ergonomics of
* `tinyexec`'s `Result` (a promise-like paired with synchronous accessors) so
* callers migrating from a `tinyexec`/`execa`-based subprocess API (e.g.
* Nuxt DevTools' `startSubprocess().getResult()`) can adopt
* {@link DevframeTerminalsHost.startChildProcess} with minimal changes.
* `await`ing it (or calling `.then()`) resolves once the process exits, with
* the full captured {@link DevframeChildProcessOutput}.
*/
interface DevframeChildProcessResult extends PromiseLike<DevframeChildProcessOutput> {
readonly pid: number | undefined;
/** `undefined` while the process is still running. */
readonly exitCode: number | undefined;
readonly killed: boolean;
kill: (signal?: NodeJS.Signals | number) => boolean;
}
interface DevframeChildProcessTerminalSession extends DevframeTerminalSession {
type: 'child-process';
executeOptions: DevframeChildProcessExecuteOptions;
getChildProcess: () => ChildProcess | undefined;
/**
* Get a live handle on the current run's outcome. Reflects the most recent
* `restart()` — call it again after restarting to track the new run.
*/
getResult: () => DevframeChildProcessResult;
terminate: () => Promise<void>;
restart: () => Promise<void>;
}
interface DevframePtyExecuteOptions {
command: string;
args?: string[];
cwd?: string;
env?: Record<string, string>;
/** Initial column count. Default: 80. */
cols?: number;
/** Initial row count. Default: 24. */
rows?: number;
}
interface DevframePtyTerminalSession extends DevframeTerminalSession {
type: 'pty';
interactive: true;
executeOptions: DevframePtyExecuteOptions;
/** Send keystrokes / raw input to the PTY. */
write: (data: string) => void;
/** Resize the PTY (emits SIGWINCH so TUIs relayout). */
resize: (cols: number, rows: number) => void;
/** Current foreground process name, when the backend can resolve it. */
getProcessName: () => string | undefined;
terminate: () => Promise<void>;
restart: () => Promise<void>;
}
//#endregion
//#region src/node/context.d.ts
declare module 'devframe/types' {
interface DevframeRpcClientFunctions {
/**
* Server→client request to switch the active dock. Broadcast by the hub
* context in response to `ctx.docks.activate()` (driven by the
* `hub:docks:activate` RPC). The client host registers a handler that
* calls its local `switchEntry(dockId)`; the target dock reads
* `activation.params` to react (e.g. focus a session). Do not register
* manually.
*
* @internal
*/
'devframe:docks:activate': (activation: DevframeDockActivation) => Promise<void>;
/**
* Server→client notification that terminal sessions changed. Broadcast
* by the hub context; a hub-aware client re-reads terminal state in
* response. Do not register manually.
*
* @internal
*/
'devframe:terminals:updated': () => Promise<void>;
/**
* Server→client notification that the message list changed. Broadcast
* by the hub context; a hub-aware client re-reads message state in
* response. Do not register manually.
*
* @internal
*/
'devframe:messages:updated': () => Promise<void>;
}
interface DevframeRpcServerFunctions {
/**
* Ask the active viewer to switch its focused dock to `dockId`, optionally
* carrying `params` for the target dock to interpret (e.g.
* `{ sessionId }` for the terminals dock). Any connected client may call
* it — a mounted devframe in its own iframe steers the host shell's dock
* selection. Handled by {@link import('./rpc-builtins').hubDocksActivate}.
*/
'hub:docks:activate': (input: {
dockId: string;
params?: Record<string, unknown>;
}) => Promise<void>;
/**
* Invoke a registered server command by id; trailing args are forwarded to
* the command's handler. Handled by
* {@link import('./rpc-builtins').hubCommandsExecute}.
*/
'hub:commands:execute': (id: string, ...args: any[]) => Promise<unknown>;
/**
* Add a message from a browser client into the hub's messages feed
* (marked `from: 'browser'`); returns the serializable entry. Handled by
* {@link import('./rpc-builtins').hubMessagesAdd}.
*/
'hub:messages:add': (input: DevframeMessageEntryInput) => Promise<DevframeMessageEntry>;
/** Patch a message by id; resolves the updated entry (or `undefined`). */
'hub:messages:update': (id: string, patch: Partial<DevframeMessageEntryInput>) => Promise<DevframeMessageEntry | undefined>;
/** Remove a message by id. */
'hub:messages:remove': (id: string) => Promise<void>;
/** Remove every message. */
'hub:messages:clear': () => Promise<void>;
/**
* Send input to an interactive PTY session spawned via
* `ctx.terminals.startPtySession`. Handled by
* {@link import('./rpc-builtins').hubTerminalsWrite}.
*/
'hub:terminals:write': (id: string, data: string) => Promise<void>;
/** Resize an interactive PTY session by id. */
'hub:terminals:resize': (id: string, cols: number, rows: number) => Promise<void>;
}
}
/**
* Hub-augmented node context — extends devframe's framework-neutral
* `DevframeNodeContext` with the hub-level subsystems (`docks`,
* `terminals`, `messages`, `commands`) and the deprecated
* `createJsonRenderer` compatibility factory.
*
* Framework kits further extend this with their own slots (e.g.
* `viteConfig`, `viteServer`). Host-specific capabilities (editor open,
* filesystem reveal, etc.) ship as kit-registered RPC functions rather
* than as part of this surface. JSON-render itself is not part of the hub:
* it is an opt-in integration (`@devframes/json-render`) that augments any
* devframe context and contributes its own dock type — prefer
* `createJsonRenderView` from `@devframes/json-render/node` over the
* deprecated factory below.
*/
interface DevframeHubContext extends DevframeNodeContext {
readonly host: DevframeHost;
docks: DevframeDocksHost;
terminals: DevframeTerminalsHost;
messages: DevframeMessagesHost;
commands: DevframeCommandsHost;
/**
* Create a `JsonRenderer` handle for building json-render powered UIs.
*
* @deprecated json-render moved out of the hub into the opt-in
* `@devframes/json-render` integration in 0.7. This factory is kept
* working (not just type-compatible) for the 0.7 series so existing call
* sites don't break — use `createJsonRenderView(ctx, { id, spec })` from
* `@devframes/json-render/node` instead. Will be removed in 0.8.
*/
createJsonRenderer: (spec: JsonRenderSpec) => JsonRenderer;
}
/**
* Options for {@link createHubContext} — devframe's
* {@link CreateHostContextOptions} plus any hub-level additions kits layer on
* through declaration merging.
*/
interface CreateHubContextOptions extends CreateHostContextOptions {}
/**
* Create a hub-level node context: wraps devframe's `createHostContext`,
* attaches the hub hosts (`docks`, `terminals`, `messages`, `commands`),
* registers the hub's built-in RPC commands, and wires the shared-state
* synchronization that powers a hub-aware client UI.
*/
declare function createHubContext(options: CreateHubContextOptions): Promise<DevframeHubContext>;
//#endregion
export { DevframeMessagesHost as C, DevframeMessagesClient as S, DevframeMessagesListDelta as T, DevframeMessageEntryInput as _, DevframeChildProcessOutput as a, DevframeMessageLevel as b, DevframePtyExecuteOptions as c, DevframeTerminalSessionBase as d, DevframeTerminalStatus as f, DevframeMessageEntryFrom as g, DevframeMessageEntry as h, DevframeChildProcessExecuteOptions as i, DevframePtyTerminalSession as l, DevframeMessageElementPosition as m, DevframeHubContext as n, DevframeChildProcessResult as o, DevframeTerminalsHost as p, createHubContext as r, DevframeChildProcessTerminalSession as s, CreateHubContextOptions as t, DevframeTerminalSession as u, DevframeMessageFilePosition as v, DevframeMessagesLevelShortcuts as w, DevframeMessageShortcutInput as x, DevframeMessageHandle as y };
import "./settings-Brw6_lEi.mjs";
import "./context-CCyi44Ep.mjs";
import { RpcDefinitionsFilter, RpcDefinitionsToFunctions } from "devframe/rpc";
import { ConnectionMeta as ConnectionMeta$1, DevframeCapabilities, DevframeDiagnosticsDefinition, DevframeDiagnosticsHost, DevframeDiagnosticsLogger, DevframeHost as DevframeHost$1, DevframeNodeRpcSession, DevframeRpcClientFunctions, DevframeRpcServerFunctions, DevframeRpcSharedStates, DevframeViewHost, EntriesToObject, EventEmitter as EventEmitter$1, EventUnsubscribe, EventsMap, PartialWithoutId, RpcBroadcastOptions, RpcFunctionsHost, RpcSharedStateGetOptions, RpcSharedStateHost, RpcStreamingChannel, RpcStreamingChannelOptions, RpcStreamingHost, Thenable } from "devframe/types";
export { RpcStreamingChannel as C, Thenable as E, RpcSharedStateHost as S, RpcStreamingHost as T, RpcBroadcastOptions as _, DevframeDiagnosticsLogger as a, RpcFunctionsHost as b, DevframeRpcClientFunctions as c, DevframeViewHost as d, EntriesToObject as f, PartialWithoutId as g, EventsMap as h, DevframeDiagnosticsHost as i, DevframeRpcServerFunctions as l, EventUnsubscribe as m, DevframeCapabilities as n, DevframeHost$1 as o, EventEmitter$1 as p, DevframeDiagnosticsDefinition as r, DevframeNodeRpcSession as s, ConnectionMeta$1 as t, DevframeRpcSharedStates as u, RpcDefinitionsFilter as v, RpcStreamingChannelOptions as w, RpcSharedStateGetOptions as x, RpcDefinitionsToFunctions as y };
import { ConnectionMeta, EventEmitter } from "devframe/types";
//#region src/types/json-render.d.ts
/** @deprecated Use `DevframeJsonRenderSpec`'s element shape from `@devframes/json-render` instead. Removed in 0.8. */
interface JsonRenderElement {
type: string;
props?: Record<string, unknown>;
children?: string[];
/** json-render event bindings (e.g. `{ press: { action: "my:action" } }`) */
on?: Record<string, unknown>;
/** json-render visibility condition */
visible?: unknown;
/** json-render repeat binding */
repeat?: unknown;
/** Allow additional json-render element fields */
[key: string]: unknown;
}
/** @deprecated Use `DevframeJsonRenderSpec` from `@devframes/json-render` instead. Removed in 0.8. */
interface JsonRenderSpec {
root: string;
elements: Record<string, JsonRenderElement>;
/** Initial client-side state model for $state/$bindState expressions */
state?: Record<string, unknown>;
}
/** @deprecated Use `JsonRenderView` from `@devframes/json-render` instead. Removed in 0.8. */
interface JsonRenderer {
/** Replace the entire spec */
updateSpec: (spec: JsonRenderSpec) => void | Promise<void>;
/** Update json-render state values (shallow merge into spec.state) */
updateState: (state: Record<string, unknown>) => void | Promise<void>;
/** Internal: shared state key used by the client to subscribe */
readonly _stateKey: string;
}
//#endregion
//#region src/types/docks.d.ts
interface DevframeDocksHost {
readonly views: Map<string, DevframeDockUserEntry>;
readonly events: EventEmitter<{
'dock:entry:updated': (entry: DevframeDockUserEntry) => void;
'dock:activate': (activation: DevframeDockActivation) => void;
}>;
register: <T extends DevframeDockUserEntry>(entry: T, force?: boolean) => {
update: (patch: Partial<T>) => void;
};
update: (entry: DevframeDockUserEntry) => void;
values: () => DevframeDockEntry[];
/**
* Request the active viewer switch its focused dock to `dockId`, optionally
* carrying `params` for the target dock to interpret (e.g. a terminals
* session id).
*
* Any connected client may drive this via the `hub:docks:activate` RPC — a
* mounted devframe running in its own iframe can steer the host shell's dock
* selection, which is otherwise client-local. The request is delivered live
* to connected clients (broadcast) and mirrored into the
* `devframe:docks:active` shared state so a dock that mounts in response
* still sees it. Activation is best-effort: unknown dock ids degrade
* gracefully.
*/
activate: (dockId: string, params?: Record<string, unknown>) => void;
}
/**
* A request to switch the active dock. `params` is an opaque, serializable
* bag the target dock interprets — the terminals dock reads `params.sessionId`
* to focus a specific session.
*/
interface DevframeDockActivation {
dockId: string;
params?: Record<string, unknown>;
}
/**
* Shape of the `devframe:docks:active` shared-state slot — the most recent
* {@link DevframeDockActivation}, or `null` before any activation. Mirrored
* so a dock that mounts in response to an activation can still converge on the
* request instead of missing the live broadcast.
*/
interface DevframeDocksActiveState {
activation: DevframeDockActivation | null;
}
type DevframeDockEntryCategory = 'framework' | 'app' | 'ui' | 'data' | 'web' | 'performance' | 'advanced' | 'docs' | 'default' | '~builtin' | (string & {});
type DevframeDockEntryIcon = string | {
light: string;
dark: string;
};
interface DevframeDockEntryBase {
id: string;
title: string;
icon: DevframeDockEntryIcon;
/**
* The default order of the entry in the dock.
* The higher the number the earlier it appears.
* @default 0
*/
defaultOrder?: number;
/**
* The category of the entry — a field with a dual role that depends on
* whether {@link groupId} resolves to a registered {@link DevframeViewGroup}:
*
* - **Ungrouped (or orphan) entry** — `category` is the entry's OUTER bucket
* on the dock bar, ordered by {@link import('../constants').DEFAULT_CATEGORIES_ORDER}.
* - **Grouped entry** (a `groupId` that resolves to a registered group) —
* the OUTER bucket is instead the group's own `category`, and this field is
* reinterpreted as the entry's IN-GROUP sub-category, used to sub-divide and
* sort members inside the group's popover / sub-navigation.
*
* Falls back to `'default'` when omitted — both as an outer bucket and, for a
* grouped member, as its in-group sub-bucket.
*
* @default 'default'
*/
category?: DevframeDockEntryCategory;
/**
* Conditional visibility expression.
* When set, the dock entry is only visible when the expression evaluates to true.
* Uses the same syntax as command `when` clauses.
*
* Set to `'false'` to unconditionally hide the entry.
*
* @example 'clientType == embedded'
* @see {@link import('devframe/utils/when').evaluateWhen}
*/
when?: string;
/**
* Badge text to display on the dock icon (e.g., unread count)
*/
badge?: string;
/**
* Id of the group this entry belongs to. When set, hosts collapse this entry
* under the matching group's button instead of showing it directly on the
* dock bar.
*
* This is a flat pointer — membership, not containment. The entry stays an
* independently-registered, top-level entry; only its rendering is grouped
* downstream.
*
* When the referenced group **is** registered, it supplies the entry's OUTER
* dock-bar category (the group's own {@link category}), and this entry's own
* {@link category} is reinterpreted as its IN-GROUP sub-category. When the
* referenced group is **never** registered, the entry renders as a normal
* top-level entry and falls back to using its own {@link category} as the
* outer bucket (orphan tolerance).
*
* @see {@link DevframeViewGroup}
*/
groupId?: string;
}
interface ClientScriptEntry {
/**
* The filepath or module name to import from
*/
importFrom: string;
/**
* The name to import the module as
*
* @default 'default'
*/
importName?: string;
}
interface DevframeViewIframe extends DevframeDockEntryBase {
type: 'iframe';
url: string;
/**
* The id of the iframe, if multiple tabs is assigned with the same id, the iframe will be shared.
*
* When not provided, it would be treated as a unique frame.
*
* `frameId` is an axis independent of {@link DevframeDockEntryBase.groupId}:
* it decides *which* iframe element a dock renders into (and which soft-nav
* pool it joins), while `groupId` only affects dock-bar grouping. Docks that
* share a `frameId` may live in one group, several groups, or none.
*/
frameId?: string;
/**
* Optional client script to import into the iframe
*/
clientScript?: ClientScriptEntry;
/**
* Soft-navigation target within a shared frame. Set on a **member** dock
* (one of several docks sharing a {@link frameId}) to describe which internal
* view the embedded app should show. The hub treats {@link NavTarget.path} as
* opaque and hands it to the frame's nav shim over `postMessage`; switching to
* this dock performs client-side navigation instead of reloading the iframe.
*
* The anchor dock (the one flagged with {@link subTabs}) leaves this unset.
*/
navTarget?: NavTarget;
/**
* Marks this iframe as a **shared-frame anchor** whose sub-tabs are discovered
* at runtime over a host↔iframe `postMessage` protocol. The client host
* auto-attaches the frame-nav adapter when this iframe mounts: it runs the
* ready handshake, materializes one client-only member dock per reported tab
* (grouped/soft-navigated via this anchor's {@link frameId}), and drives the
* live navigation loop. Absent a shim, the anchor simply renders as a single
* plain iframe dock.
*/
subTabs?: FrameSubTabsConfig;
/**
* Enable remote-UI mode: the hub injects a connection descriptor
* (WS URL + pre-approved auth token) into the iframe URL so a hosted
* page can connect back via `connectRemoteDevframe()` from
* `@devframes/hub/client` — without needing to ship a dist with the
* plugin.
*
* Requires dev mode (no effect in build mode — no WS server exists).
* When enabled, the dock is automatically hidden in build mode unless
* the author provides an explicit `when` clause.
*/
remote?: boolean | RemoteDockOptions;
}
/**
* A structured, soft-navigation target within a shared frame. `path` is opaque
* to the hub — the embedded app maps it onto its own router.
*
* Kept to `path` + `query` so the shape survives shared-state's `Immutable`
* projection cleanly (a `DevframeViewIframe` must still narrow back from its
* immutable form). An `unknown`/recursive history-`state` field breaks that
* round-trip, so richer per-navigation state is intentionally out of scope for
* now — carry it in `query` or the app's own store.
*/
interface NavTarget {
path: string;
query?: Record<string, string | readonly string[]>;
}
/**
* Configuration for a {@link DevframeViewIframe.subTabs shared-frame anchor}.
*/
interface FrameSubTabsConfig {
/** Transport for tab discovery + the live nav loop. */
protocol: 'postmessage';
/**
* How long (ms) the adapter waits for the shim's `ready` before treating the
* frame as having no shim (the anchor renders as a single plain iframe dock,
* and a navigation requested before readiness hard-navigates).
*
* @default 3000
*/
handshakeTimeoutMs?: number;
}
interface RemoteDockOptions {
/**
* How to pass the connection descriptor to the hosted page.
*
* - `'fragment'` (default): appended as a URL fragment.
* Not sent in HTTP requests or Referer headers — safest for auth tokens.
* - `'query'`: appended as a URL query parameter. Use when your hosting
* platform rewrites fragments or your SPA router repurposes the fragment
* for navigation. The token will appear in server access logs and
* outbound Referer headers.
*
* @default 'fragment'
*/
transport?: 'fragment' | 'query';
/**
* Reject WS handshakes whose `Origin` header doesn't match the dock URL
* origin. Turn off when the same hosted app is served from multiple
* origins (e.g. preview deploys).
*
* @default true
*/
originLock?: boolean;
}
interface RemoteConnectionInfo extends ConnectionMeta {
backend: 'websocket';
websocket: string;
v: 1;
authToken: string;
origin: string;
}
type DevframeViewLauncherStatus = 'idle' | 'loading' | 'success' | 'error';
interface DevframeViewLauncher extends DevframeDockEntryBase {
type: 'launcher';
launcher: {
icon?: DevframeDockEntryIcon;
title: string;
status?: DevframeViewLauncherStatus;
error?: string;
description?: string;
buttonStart?: string;
buttonLoading?: string;
/**
* Bound command id: the launch button, command palette entry, and any
* keybinding all resolve to this one handler. A viewer running out of
* process dispatches it over the `hub:commands:execute` RPC — the
* serializable path {@link onLaunch} can't cross, since a function is
* dropped when the entry is projected into the `devframe:docks` shared
* state. Register the command (with its handler) via `ctx.commands`.
*/
command?: string;
/**
* Id of the terminal session this launcher tracks (e.g. the one returned
* by `ctx.terminals.startChildProcess`). A viewer surfaces a first-class
* "view in terminal" action that calls `hub:docks:activate` with the
* terminals dock id and `{ sessionId: terminalSessionId }`, jumping the
* user straight to the running process.
*/
terminalSessionId?: string;
/**
* Latest single line of progress for inline display beneath the launcher
* (e.g. the tail of the tracked session's output). Author-set: the owner
* patches it via `docks.update()` as the process reports progress.
*/
digest?: string;
/**
* In-process launch handler. Optional: a same-process host can invoke it
* directly, but it does not survive projection into shared state, so an
* out-of-process viewer relies on {@link command} instead. Provide one or
* both.
*/
onLaunch?: () => Promise<void>;
};
}
interface DevframeViewAction extends DevframeDockEntryBase {
type: 'action';
action: ClientScriptEntry;
}
interface DevframeViewCustomRender extends DevframeDockEntryBase {
type: 'custom-render';
renderer: ClientScriptEntry;
}
/**
* A view rendered natively by the viewer rather than by a plugin — the
* settings panel, the terminals feed, the messages feed, etc. A high-level
* integration registers the built-in views it wants; the viewer recognizes the
* reserved `id` and renders its own UI for it.
*
* Its {@link DevframeDockEntryBase.category} defaults to `'~builtin'` when
* omitted, so built-in views group together and sort last without every
* integration repeating it.
*/
interface DevframeViewBuiltin extends DevframeDockEntryBase {
type: '~builtin';
id: string;
}
/**
* @deprecated json-render moved out of the hub into the opt-in
* `@devframes/json-render` integration in 0.7, which contributes its own
* `'json-render'` entry (carrying a serializable view ref, not a live
* `JsonRenderer` handle) to {@link DevframeDockEntryRegistry} via declaration
* merging. This type is kept for compatibility but is no longer a member of
* {@link DevframeDockUserEntry} — use `@devframes/json-render/hub` instead.
* Removed in 0.8.
*/
interface DevframeViewJsonRender extends DevframeDockEntryBase {
type: 'json-render';
/** JsonRenderer handle created by the deprecated ctx.createJsonRenderer() */
ui: JsonRenderer;
}
/**
* A dock group: a single dock-bar button that collapses every entry whose
* {@link DevframeDockEntryBase.groupId} matches this group's `id`.
*
* A group carries its own `title`/`icon`/`category`/`defaultOrder`/`when`
* (inherited from {@link DevframeDockEntryBase}) and has no view payload of its
* own — hosts render its members in a popover / sub-navigation. It flows
* through the same `register`/`update`/`values` machinery as every other entry,
* keyed by `id`.
*
* The group's `category` is the OUTER bucket for the group button itself AND
* for every one of its members — a member's own `category` no longer decides
* its outer bucket, but is reinterpreted as an in-group sub-category that
* sub-divides and sorts members inside this group. A group with no `category`
* buckets itself and its members under `'default'`.
*
* Grouping is one level deep: a group entry must not itself set `groupId`.
*/
interface DevframeViewGroup extends DevframeDockEntryBase {
type: 'group';
/**
* Member id auto-opened when the group button is activated. When unset,
* activating the group only reveals its members (popover-only); no view
* opens until a member is chosen.
*/
defaultChildId?: string;
}
/**
* The **open** registry of dock entry variants, keyed by their `type`
* discriminator. The hub ships the framework-neutral built-ins; opt-in
* integrations contribute their own variants through declaration merging —
* e.g. `@devframes/json-render/hub` adds a `'json-render'` entry. The hub
* itself stays agnostic: it hard-codes no integration-specific variant.
*
* @example
* ```ts
* // in an opt-in integration package
* declare module '@devframes/hub/types' {
* interface DevframeDockEntryRegistry {
* 'my-view': MyDockEntry
* }
* }
* ```
*/
interface DevframeDockEntryRegistry {
'iframe': DevframeViewIframe;
'action': DevframeViewAction;
'custom-render': DevframeViewCustomRender;
'launcher': DevframeViewLauncher;
'group': DevframeViewGroup;
'~builtin': DevframeViewBuiltin;
}
type DevframeDockUserEntry = DevframeDockEntryRegistry[keyof DevframeDockEntryRegistry];
type DevframeDockEntry = DevframeDockUserEntry;
type DevframeDockEntriesGrouped = [category: string, entries: DevframeDockEntry[]][];
//#endregion
//#region src/types/commands.d.ts
interface DevframeCommandKeybinding {
/**
* Keyboard shortcut string.
* Use "Mod" for platform-aware modifier (Cmd on macOS, Ctrl elsewhere).
* Examples: "Mod+K", "Mod+Shift+P", "Alt+N"
*/
key: string;
}
interface DevframeCommandBase {
/**
* Unique namespaced ID, e.g. "vite:open-in-editor"
*/
id: string;
title: string;
description?: string;
/**
* Icon for the command. Either an Iconify icon string (e.g. "ph:pencil-duotone")
* or a theme-specific pair `{ light, dark }` — the same shape as dock icons.
*/
icon?: DevframeDockEntryIcon;
category?: string;
/**
* Whether to show in command palette. Default: true
*
* - `true` — show the command and flatten its children into search results
* - `false` — hide the command entirely from the palette
* - `'without-children'` — show the command but don't flatten children into top-level search (children are still accessible via drill-down)
*/
showInPalette?: boolean | 'without-children';
/**
* Optional context expression for conditional visibility.
* When set, the command is only shown in the palette and only executable
* when the expression evaluates to true.
*/
when?: string;
/**
* Default keyboard shortcut(s) for this command
*/
keybindings?: DevframeCommandKeybinding[];
}
/**
* Server command input — what plugins pass to `ctx.commands.register()`.
*/
interface DevframeServerCommandInput extends DevframeCommandBase {
/**
* Handler for this command. Optional if the command only serves as a group for children.
*/
handler?: (...args: any[]) => any | Promise<any>;
/**
* Static sub-commands. Two levels max (parent → children).
* Each child must have a globally unique `id`.
*/
children?: DevframeServerCommandInput[];
}
/**
* Serializable server command entry — sent over RPC (no handler).
*/
interface DevframeServerCommandEntry extends DevframeCommandBase {
source: 'server';
children?: DevframeServerCommandEntry[];
}
/**
* Client command — registered in the webcomponent context.
*/
interface DevframeClientCommand extends DevframeCommandBase {
source: 'client';
/**
* Action for this command. Optional if the command only serves as a group for children.
* Return sub-commands for dynamic nested palette menus (runtime submenus).
*/
action?: (...args: any[]) => void | DevframeClientCommand[] | Promise<void | DevframeClientCommand[]>;
/**
* Static sub-commands. Two levels max (parent → children).
*/
children?: DevframeClientCommand[];
}
/**
* Union of command entries visible in the palette.
*/
type DevframeCommandEntry = DevframeServerCommandEntry | DevframeClientCommand;
interface DevframeCommandHandle {
readonly id: string;
update: (patch: Partial<Omit<DevframeServerCommandInput, 'id'>>) => void;
unregister: () => void;
}
interface DevframeCommandsHostEvents {
'command:registered': (command: DevframeServerCommandEntry) => void;
'command:unregistered': (id: string) => void;
}
interface DevframeCommandsHost {
readonly commands: Map<string, DevframeServerCommandInput>;
readonly events: EventEmitter<DevframeCommandsHostEvents>;
/**
* Register a command (with optional children).
*/
register: (command: DevframeServerCommandInput) => DevframeCommandHandle;
/**
* Unregister a command by ID (removes parent and all children).
*/
unregister: (id: string) => boolean;
/**
* Execute a command by ID. Searches top-level and children.
* Throws if not found or if command has no handler.
*/
execute: (id: string, ...args: any[]) => Promise<unknown>;
/**
* Returns serializable list (no handlers), preserving tree structure.
*/
list: () => DevframeServerCommandEntry[];
}
interface DevframeCommandShortcutOverrides {
/**
* Command ID → keybinding overrides. Empty array = shortcut disabled.
*/
[commandId: string]: DevframeCommandKeybinding[];
}
//#endregion
//#region src/types/settings.d.ts
interface DevframeDocksUserSettings {
docksHidden: string[];
docksCategoriesHidden: string[];
docksPinned: string[];
docksCustomOrder: Record<string, number>;
showIframeAddressBar: boolean;
closeOnOutsideClick: boolean;
commandShortcuts: DevframeCommandShortcutOverrides;
}
//#endregion
export { DevframeViewLauncherStatus as A, DevframeViewAction as C, DevframeViewIframe as D, DevframeViewGroup as E, JsonRenderElement as F, JsonRenderSpec as I, JsonRenderer as L, NavTarget as M, RemoteConnectionInfo as N, DevframeViewJsonRender as O, RemoteDockOptions as P, DevframeDocksHost as S, DevframeViewCustomRender as T, DevframeDockEntryCategory as _, DevframeCommandHandle as a, DevframeDockUserEntry as b, DevframeCommandsHost as c, DevframeServerCommandInput as d, ClientScriptEntry as f, DevframeDockEntryBase as g, DevframeDockEntry as h, DevframeCommandEntry as i, FrameSubTabsConfig as j, DevframeViewLauncher as k, DevframeCommandsHostEvents as l, DevframeDockEntriesGrouped as m, DevframeClientCommand as n, DevframeCommandKeybinding as o, DevframeDockActivation as p, DevframeCommandBase as r, DevframeCommandShortcutOverrides as s, DevframeDocksUserSettings as t, DevframeServerCommandEntry as u, DevframeDockEntryIcon as v, DevframeViewBuiltin as w, DevframeDocksActiveState as x, DevframeDockEntryRegistry as y };