@devframes/hub
Advanced tools
| import { S as DevframeDocksHost, c as DevframeCommandsHost, p as DevframeDockActivation, v as DevframeDockEntryIcon } from "./settings-ywInLQJ3.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`). | ||
| * | ||
| * 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 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. | ||
| */ | ||
| interface DevframeHubContext extends DevframeNodeContext { | ||
| readonly host: DevframeHost; | ||
| docks: DevframeDocksHost; | ||
| terminals: DevframeTerminalsHost; | ||
| messages: DevframeMessagesHost; | ||
| commands: DevframeCommandsHost; | ||
| } | ||
| /** | ||
| * 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 { createDefineWrapperWithContext } from "devframe/rpc"; | ||
| //#region src/define.ts | ||
| const defineHubRpcFunction = createDefineWrapperWithContext(); | ||
| function defineCommand(command) { | ||
| return command; | ||
| } | ||
| function defineDockEntry(entry) { | ||
| return entry; | ||
| } | ||
| //#endregion | ||
| export { defineDockEntry as n, defineHubRpcFunction as r, defineCommand as t }; |
| import "./context-ChGTyDu-.mjs"; | ||
| import "./settings-ywInLQJ3.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/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 = 'app' | 'framework' | 'web' | 'advanced' | '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 | ||
| * @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. If the referenced group is never registered, the entry renders | ||
| * as a normal top-level entry (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?: string; | ||
| /** | ||
| * Optional client script to import into the iframe | ||
| */ | ||
| clientScript?: ClientScriptEntry; | ||
| /** | ||
| * 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; | ||
| } | ||
| 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; | ||
| } | ||
| /** | ||
| * 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`. | ||
| * | ||
| * 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 { RemoteConnectionInfo as A, DevframeViewAction as C, DevframeViewIframe as D, DevframeViewGroup as E, DevframeViewLauncher as O, 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, RemoteDockOptions as j, DevframeViewLauncherStatus 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 }; |
@@ -1,4 +0,4 @@ | ||
| import { S as DevframeMessagesClient, _ as DevframeMessageEntryInput } from "../context-vip-UA-J.mjs"; | ||
| import { A as RemoteConnectionInfo, h as DevframeDockEntry, i as DevframeCommandEntry, m as DevframeDockEntriesGrouped, n as DevframeClientCommand, o as DevframeCommandKeybinding, t as DevframeDocksUserSettings, y as DevframeDockUserEntry } from "../settings-qfQQ1nTD.mjs"; | ||
| import "../index-BvRGGB3C.mjs"; | ||
| import { S as DevframeMessagesClient, _ as DevframeMessageEntryInput } from "../context-ChGTyDu-.mjs"; | ||
| import { A as RemoteConnectionInfo, b as DevframeDockUserEntry, h as DevframeDockEntry, i as DevframeCommandEntry, m as DevframeDockEntriesGrouped, n as DevframeClientCommand, o as DevframeCommandKeybinding, t as DevframeDocksUserSettings } from "../settings-ywInLQJ3.mjs"; | ||
| import "../index-BCVXXhEH.mjs"; | ||
| import { DevframeClientRpcHost, DevframeConnectionStatus, DevframeRpcClient, DevframeRpcClientOptions, DevframeRpcContext, RpcClientEvents, RpcClientEvents as RpcClientEvents$1 } from "devframe/client"; | ||
@@ -9,2 +9,49 @@ import { EventEmitter } from "devframe/types"; | ||
| export * from "devframe/client"; | ||
| //#region src/client/renderers.d.ts | ||
| /** | ||
| * Options handed to a dock renderer when the client host mounts a dock entry. | ||
| */ | ||
| interface DockRendererMountOptions { | ||
| /** The dock entry being rendered (carries the entry's serializable payload). */ | ||
| entry: DevframeDockEntry; | ||
| /** The DOM element the renderer should mount into. */ | ||
| container: HTMLElement; | ||
| /** The assembled client host context (rpc, docks, commands, …). */ | ||
| context: DevframeClientContext; | ||
| } | ||
| /** A mounted renderer instance the host can tear down. */ | ||
| interface DockRendererInstance { | ||
| /** Tear down the mounted UI and release its subscriptions. */ | ||
| dispose?: () => void; | ||
| } | ||
| /** | ||
| * A renderer for a dock `type`. The headless hub is renderer-agnostic — a | ||
| * host application registers renderers at boot (e.g. injecting | ||
| * `@devframes/json-render-ui` for the `'json-render'` type). The renderer | ||
| * owns its framework (Vue, React, …); the hub only routes a dock type to it | ||
| * and disposes it on deactivation. | ||
| */ | ||
| type DockRenderer = (options: DockRendererMountOptions) => DockRendererInstance | Promise<DockRendererInstance>; | ||
| /** | ||
| * The dock-renderer registry surfaced on the client host context. A viewer | ||
| * calls {@link DockRenderersContext.mount} to render a dock whose `type` has a | ||
| * registered renderer into a container it owns; the host tracks the instance | ||
| * and disposes it when the entry deactivates. | ||
| */ | ||
| interface DockRenderersContext { | ||
| /** Register a renderer for a dock `type`. Returns an unregister function. */ | ||
| register: (type: string, renderer: DockRenderer) => () => void; | ||
| /** Look up the renderer registered for a dock `type`, if any. */ | ||
| get: (type: string) => DockRenderer | undefined; | ||
| /** Whether a renderer is registered for a dock `type`. */ | ||
| has: (type: string) => boolean; | ||
| /** | ||
| * Mount the entry's registered renderer into `container`. Resolves to a | ||
| * disposer; the same instance is also disposed automatically when the entry | ||
| * deactivates. Warns and resolves to a no-op disposer when no renderer is | ||
| * registered for the entry's type. | ||
| */ | ||
| mount: (entry: DevframeDockEntry, container: HTMLElement) => Promise<() => void>; | ||
| } | ||
| //#endregion | ||
| //#region src/client/docks.d.ts | ||
@@ -52,2 +99,8 @@ interface DockPanelStorage { | ||
| readonly connection: DocksConnectionContext; | ||
| /** | ||
| * The dock-renderer registry. Routes a dock `type` to a host-registered | ||
| * renderer (e.g. `@devframes/json-render-ui` for `'json-render'`). The hub | ||
| * itself ships no renderers. | ||
| */ | ||
| readonly renderers: DockRenderersContext; | ||
| } | ||
@@ -200,2 +253,9 @@ interface DocksConnectionContext { | ||
| loadClientScripts?: boolean; | ||
| /** | ||
| * Dock renderers to register at boot, keyed by dock `type`. The host | ||
| * application injects the ones it wants (e.g. | ||
| * `{ 'json-render': createJsonRenderDockRenderer() }` from | ||
| * `@devframes/json-render-ui`). The hub ships none by default. | ||
| */ | ||
| renderers?: Record<string, DockRenderer>; | ||
| } | ||
@@ -258,2 +318,2 @@ interface DevframeClientHost { | ||
| //#endregion | ||
| export { CLIENT_CONTEXT_KEY, CommandsContext, ConnectRemoteDevframeOptions, DevframeClientContext, DevframeClientHost, DevframeClientHostOptions, type DevframeClientRpcHost, DockClientScriptContext, DockClientType, DockEntryState, DockEntryStateEvents, DockPanelStorage, DocksConnectionContext, DocksContext, DocksEntriesContext, DocksPanelContext, MessagesClientOptions, type RpcClientEvents, WhenClauseContext, connectRemoteDevframe, createDevframeClientHost, createMessagesClient, getDevframeClientContext, parseRemoteConnection, setDevframeClientContext }; | ||
| export { CLIENT_CONTEXT_KEY, CommandsContext, ConnectRemoteDevframeOptions, DevframeClientContext, DevframeClientHost, DevframeClientHostOptions, type DevframeClientRpcHost, DockClientScriptContext, DockClientType, DockEntryState, DockEntryStateEvents, DockPanelStorage, DockRenderer, DockRendererInstance, DockRendererMountOptions, DockRenderersContext, DocksConnectionContext, DocksContext, DocksEntriesContext, DocksPanelContext, MessagesClientOptions, type RpcClientEvents, WhenClauseContext, connectRemoteDevframe, createDevframeClientHost, createMessagesClient, getDevframeClientContext, parseRemoteConnection, setDevframeClientContext }; |
@@ -93,2 +93,3 @@ import { DEFAULT_CATEGORIES_ORDER, DEFAULT_STATE_USER_SETTINGS } from "../constants.mjs"; | ||
| const rpc = options.rpc ?? await connectDevframe(options.connect); | ||
| let mountedRenderers; | ||
| const [docksState, commandsState, settings] = await Promise.all([ | ||
@@ -110,2 +111,3 @@ rpc.sharedState.get(DOCKS_STATE_KEY, { initialValue: [] }), | ||
| commands, | ||
| renderers: createRenderersContext(), | ||
| when: { get context() { | ||
@@ -158,2 +160,3 @@ return { | ||
| for (const off of disposers.splice(0)) off(); | ||
| if (mountedRenderers) for (const disposeMount of [...mountedRenderers]) disposeMount(); | ||
| if (getDevframeClientContext() === context) setDevframeClientContext(void 0); | ||
@@ -252,2 +255,42 @@ } | ||
| } | ||
| function createRenderersContext() { | ||
| const rendererMap = /* @__PURE__ */ new Map(); | ||
| for (const [type, renderer] of Object.entries(options.renderers ?? {})) rendererMap.set(type, renderer); | ||
| const mountedDisposers = /* @__PURE__ */ new Set(); | ||
| mountedRenderers = mountedDisposers; | ||
| return { | ||
| register(type, renderer) { | ||
| rendererMap.set(type, renderer); | ||
| return () => { | ||
| if (rendererMap.get(type) === renderer) rendererMap.delete(type); | ||
| }; | ||
| }, | ||
| get: (type) => rendererMap.get(type), | ||
| has: (type) => rendererMap.has(type), | ||
| async mount(entry, container) { | ||
| const renderer = rendererMap.get(entry.type); | ||
| if (!renderer) { | ||
| console.warn(`[@devframes/hub] no renderer registered for dock type "${entry.type}" (entry "${entry.id}")`); | ||
| return () => {}; | ||
| } | ||
| const instance = await renderer({ | ||
| entry, | ||
| container, | ||
| context | ||
| }); | ||
| let disposed = false; | ||
| let offDeactivate; | ||
| const dispose = () => { | ||
| if (disposed) return; | ||
| disposed = true; | ||
| mountedDisposers.delete(dispose); | ||
| offDeactivate?.(); | ||
| instance.dispose?.(); | ||
| }; | ||
| mountedDisposers.add(dispose); | ||
| offDeactivate = entryToStateMap.get(entry.id)?.events.on("entry:deactivated", dispose); | ||
| return dispose; | ||
| } | ||
| }; | ||
| } | ||
| function clientScriptOf(entry) { | ||
@@ -254,0 +297,0 @@ return entry.action ?? entry.renderer ?? entry.clientScript; |
@@ -1,2 +0,2 @@ | ||
| import { t as DevframeDocksUserSettings } from "./settings-qfQQ1nTD.mjs"; | ||
| import { t as DevframeDocksUserSettings } from "./settings-ywInLQJ3.mjs"; | ||
| export * from "devframe/constants"; | ||
@@ -3,0 +3,0 @@ //#region src/constants.d.ts |
+4
-5
@@ -1,4 +0,4 @@ | ||
| 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-vip-UA-J.mjs"; | ||
| import { A as RemoteConnectionInfo, C as DevframeViewBuiltin, D as DevframeViewJsonRender, E as DevframeViewIframe, M as JsonRenderElement, N as JsonRenderSpec, O as DevframeViewLauncher, P as JsonRenderer, S as DevframeViewAction, T as DevframeViewGroup, _ as DevframeDockEntryCategory, a as DevframeCommandHandle, b as DevframeDocksActiveState, c as DevframeCommandsHost, d as DevframeServerCommandInput, f as ClientScriptEntry, g as DevframeDockEntryBase, h as DevframeDockEntry, i as DevframeCommandEntry, j as RemoteDockOptions, k as DevframeViewLauncherStatus, 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 DevframeViewCustomRender, x as DevframeDocksHost, y as DevframeDockUserEntry } from "./settings-qfQQ1nTD.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-BvRGGB3C.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-ChGTyDu-.mjs"; | ||
| import { A as RemoteConnectionInfo, C as DevframeViewAction, D as DevframeViewIframe, E as DevframeViewGroup, O as DevframeViewLauncher, 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 RemoteDockOptions, k as DevframeViewLauncherStatus, 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-ywInLQJ3.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-BCVXXhEH.mjs"; | ||
| import { WhenContext, WhenExpression } from "devframe/utils/when"; | ||
@@ -13,4 +13,3 @@ //#region src/define.d.ts | ||
| }): T; | ||
| declare function defineJsonRenderSpec(spec: JsonRenderSpec): JsonRenderSpec; | ||
| //#endregion | ||
| export { type ClientScriptEntry, type ConnectionMeta, type CreateHubContextOptions, type DevframeCapabilities, type DevframeChildProcessExecuteOptions, type DevframeChildProcessOutput, type DevframeChildProcessResult, type DevframeChildProcessTerminalSession, type DevframeClientCommand, type DevframeCommandBase, type DevframeCommandEntry, type DevframeCommandHandle, type DevframeCommandKeybinding, type DevframeCommandShortcutOverrides, type DevframeCommandsHost, type DevframeCommandsHostEvents, type DevframeDiagnosticsDefinition, type DevframeDiagnosticsHost, type DevframeDiagnosticsLogger, type DevframeDockActivation, type DevframeDockEntriesGrouped, type DevframeDockEntry, type DevframeDockEntryBase, type DevframeDockEntryCategory, type DevframeDockEntryIcon, type DevframeDockUserEntry, type DevframeDocksActiveState, type DevframeDocksHost, type DevframeDocksUserSettings, type DevframeHost, type DevframeHubContext, type DevframeMessageElementPosition, type DevframeMessageEntry, type DevframeMessageEntryFrom, type DevframeMessageEntryInput, type DevframeMessageFilePosition, type DevframeMessageHandle, type DevframeMessageLevel, type DevframeMessageShortcutInput, type DevframeMessagesClient, type DevframeMessagesHost, type DevframeMessagesLevelShortcuts, type DevframeMessagesListDelta, type DevframeNodeRpcSession, type DevframePtyExecuteOptions, type DevframePtyTerminalSession, type DevframeRpcClientFunctions, type DevframeRpcServerFunctions, type DevframeRpcSharedStates, type DevframeServerCommandEntry, type DevframeServerCommandInput, type DevframeTerminalSession, type DevframeTerminalSessionBase, type DevframeTerminalStatus, type DevframeTerminalsHost, type DevframeViewAction, type DevframeViewBuiltin, type DevframeViewCustomRender, type DevframeViewGroup, type DevframeViewHost, type DevframeViewIframe, type DevframeViewJsonRender, type DevframeViewLauncher, type DevframeViewLauncherStatus, type EntriesToObject, type EventEmitter, type EventUnsubscribe, type EventsMap, type JsonRenderElement, type JsonRenderSpec, type JsonRenderer, type PartialWithoutId, type RemoteConnectionInfo, type RemoteDockOptions, type RpcBroadcastOptions, type RpcDefinitionsFilter, type RpcDefinitionsToFunctions, type RpcFunctionsHost, type RpcSharedStateGetOptions, type RpcSharedStateHost, type RpcStreamingChannel, type RpcStreamingChannelOptions, type RpcStreamingHost, type Thenable, defineCommand, defineDockEntry, defineHubRpcFunction, defineJsonRenderSpec }; | ||
| export { type ClientScriptEntry, type ConnectionMeta, type CreateHubContextOptions, type DevframeCapabilities, type DevframeChildProcessExecuteOptions, type DevframeChildProcessOutput, type DevframeChildProcessResult, type DevframeChildProcessTerminalSession, type DevframeClientCommand, type DevframeCommandBase, type DevframeCommandEntry, type DevframeCommandHandle, type DevframeCommandKeybinding, type DevframeCommandShortcutOverrides, type DevframeCommandsHost, type DevframeCommandsHostEvents, type DevframeDiagnosticsDefinition, type DevframeDiagnosticsHost, type DevframeDiagnosticsLogger, type DevframeDockActivation, type DevframeDockEntriesGrouped, type DevframeDockEntry, type DevframeDockEntryBase, type DevframeDockEntryCategory, type DevframeDockEntryIcon, type DevframeDockEntryRegistry, type DevframeDockUserEntry, type DevframeDocksActiveState, type DevframeDocksHost, type DevframeDocksUserSettings, type DevframeHost, type DevframeHubContext, type DevframeMessageElementPosition, type DevframeMessageEntry, type DevframeMessageEntryFrom, type DevframeMessageEntryInput, type DevframeMessageFilePosition, type DevframeMessageHandle, type DevframeMessageLevel, type DevframeMessageShortcutInput, type DevframeMessagesClient, type DevframeMessagesHost, type DevframeMessagesLevelShortcuts, type DevframeMessagesListDelta, type DevframeNodeRpcSession, type DevframePtyExecuteOptions, type DevframePtyTerminalSession, type DevframeRpcClientFunctions, type DevframeRpcServerFunctions, type DevframeRpcSharedStates, type DevframeServerCommandEntry, type DevframeServerCommandInput, type DevframeTerminalSession, type DevframeTerminalSessionBase, type DevframeTerminalStatus, type DevframeTerminalsHost, type DevframeViewAction, type DevframeViewBuiltin, type DevframeViewCustomRender, type DevframeViewGroup, type DevframeViewHost, type DevframeViewIframe, type DevframeViewLauncher, type DevframeViewLauncherStatus, type EntriesToObject, type EventEmitter, type EventUnsubscribe, type EventsMap, type PartialWithoutId, type RemoteConnectionInfo, type RemoteDockOptions, type RpcBroadcastOptions, type RpcDefinitionsFilter, type RpcDefinitionsToFunctions, type RpcFunctionsHost, type RpcSharedStateGetOptions, type RpcSharedStateHost, type RpcStreamingChannel, type RpcStreamingChannelOptions, type RpcStreamingHost, type Thenable, defineCommand, defineDockEntry, defineHubRpcFunction }; |
+2
-2
@@ -1,2 +0,2 @@ | ||
| import { i as defineJsonRenderSpec, n as defineDockEntry, r as defineHubRpcFunction, t as defineCommand } from "./define-Dp-x6d09.mjs"; | ||
| export { defineCommand, defineDockEntry, defineHubRpcFunction, defineJsonRenderSpec }; | ||
| import { n as defineDockEntry, r as defineHubRpcFunction, t as defineCommand } from "./define-Ceekw2EO.mjs"; | ||
| export { defineCommand, defineDockEntry, defineHubRpcFunction }; |
@@ -1,3 +0,3 @@ | ||
| 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-vip-UA-J.mjs"; | ||
| import { E as DevframeViewIframe, a as DevframeCommandHandle, c as DevframeCommandsHost$1, d as DevframeServerCommandInput, f as ClientScriptEntry, h as DevframeDockEntry, t as DevframeDocksUserSettings, u as DevframeServerCommandEntry, x as DevframeDocksHost$1, y as DevframeDockUserEntry } from "../settings-qfQQ1nTD.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-ChGTyDu-.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-ywInLQJ3.mjs"; | ||
| import { RpcFunctionDefinitionAny } from "devframe/rpc"; | ||
@@ -265,2 +265,63 @@ import { DevframeDefinition } from "devframe/types"; | ||
| /** | ||
| * `hub:terminals:terminate` — Kill a session's process while keeping the | ||
| * session registered (its output/scrollback stays). Works for both read-only | ||
| * child-process and interactive PTY sessions, letting a hub-aware terminal UI | ||
| * force-kill a session owned by another plugin. | ||
| */ | ||
| declare const hubTerminalsTerminate: { | ||
| name: "hub:terminals:terminate"; | ||
| type?: "action" | undefined; | ||
| cacheable?: boolean; | ||
| args?: undefined; | ||
| returns?: undefined; | ||
| jsonSerializable?: boolean; | ||
| agent?: import("devframe").RpcFunctionAgentOptions; | ||
| setup?: ((context: DevframeHubContext) => import("devframe/rpc").Thenable<import("devframe/rpc").RpcFunctionSetupResult<[id: string], Promise<void>>>) | undefined; | ||
| handler?: ((id: string) => Promise<void>) | undefined; | ||
| dump?: import("devframe/rpc").RpcDump<[id: string], Promise<void>, DevframeHubContext> | undefined; | ||
| snapshot?: boolean; | ||
| __cache?: WeakMap<object, import("devframe/rpc").Thenable<import("devframe/rpc").RpcFunctionSetupResult<[id: string], Promise<void>>>> | undefined; | ||
| __promise?: import("devframe/rpc").Thenable<import("devframe/rpc").RpcFunctionSetupResult<[id: string], Promise<void>>> | undefined; | ||
| }; | ||
| /** | ||
| * `hub:terminals:restart` — Re-run a session's command in place. Rejected for | ||
| * sessions registered with `restartable: false`, whose lifecycle is owned | ||
| * elsewhere. | ||
| */ | ||
| declare const hubTerminalsRestart: { | ||
| name: "hub:terminals:restart"; | ||
| type?: "action" | undefined; | ||
| cacheable?: boolean; | ||
| args?: undefined; | ||
| returns?: undefined; | ||
| jsonSerializable?: boolean; | ||
| agent?: import("devframe").RpcFunctionAgentOptions; | ||
| setup?: ((context: DevframeHubContext) => import("devframe/rpc").Thenable<import("devframe/rpc").RpcFunctionSetupResult<[id: string], Promise<void>>>) | undefined; | ||
| handler?: ((id: string) => Promise<void>) | undefined; | ||
| dump?: import("devframe/rpc").RpcDump<[id: string], Promise<void>, DevframeHubContext> | undefined; | ||
| snapshot?: boolean; | ||
| __cache?: WeakMap<object, import("devframe/rpc").Thenable<import("devframe/rpc").RpcFunctionSetupResult<[id: string], Promise<void>>>> | undefined; | ||
| __promise?: import("devframe/rpc").Thenable<import("devframe/rpc").RpcFunctionSetupResult<[id: string], Promise<void>>> | undefined; | ||
| }; | ||
| /** | ||
| * `hub:terminals:remove` — Kill a session's process (when it still owns one) | ||
| * and drop it from the registry, disposing its output stream. Lets a hub-aware | ||
| * terminal UI discard a stopped aggregated session. | ||
| */ | ||
| declare const hubTerminalsRemove: { | ||
| name: "hub:terminals:remove"; | ||
| type?: "action" | undefined; | ||
| cacheable?: boolean; | ||
| args?: undefined; | ||
| returns?: undefined; | ||
| jsonSerializable?: boolean; | ||
| agent?: import("devframe").RpcFunctionAgentOptions; | ||
| setup?: ((context: DevframeHubContext) => import("devframe/rpc").Thenable<import("devframe/rpc").RpcFunctionSetupResult<[id: string], Promise<void>>>) | undefined; | ||
| handler?: ((id: string) => Promise<void>) | undefined; | ||
| dump?: import("devframe/rpc").RpcDump<[id: string], Promise<void>, DevframeHubContext> | undefined; | ||
| snapshot?: boolean; | ||
| __cache?: WeakMap<object, import("devframe/rpc").Thenable<import("devframe/rpc").RpcFunctionSetupResult<[id: string], Promise<void>>>> | undefined; | ||
| __promise?: import("devframe/rpc").Thenable<import("devframe/rpc").RpcFunctionSetupResult<[id: string], Promise<void>>> | undefined; | ||
| }; | ||
| /** | ||
| * `hub:docks:activate` — Ask the active viewer to switch its focused dock to | ||
@@ -325,2 +386,2 @@ * `dockId`, optionally carrying `params` for the target dock to interpret | ||
| //#endregion | ||
| export { CreateHubContextOptions, DevframeCommandsHost, DevframeDocksHost, DevframeHubContext, DevframeMessagesHost, DevframeTerminalsHost, MountDevframeOptions, builtinHubRpcDeclarations, createHubContext, createSimpleClientScript, hubCommandsExecute, hubDocksActivate, hubMessagesAdd, hubMessagesClear, hubMessagesRemove, hubMessagesUpdate, hubTerminalsResize, hubTerminalsWrite, mountDevframe }; | ||
| export { CreateHubContextOptions, DevframeCommandsHost, DevframeDocksHost, DevframeHubContext, DevframeMessagesHost, DevframeTerminalsHost, MountDevframeOptions, builtinHubRpcDeclarations, createHubContext, createSimpleClientScript, hubCommandsExecute, hubDocksActivate, hubMessagesAdd, hubMessagesClear, hubMessagesRemove, hubMessagesUpdate, hubTerminalsRemove, hubTerminalsResize, hubTerminalsRestart, hubTerminalsTerminate, hubTerminalsWrite, mountDevframe }; |
@@ -1,4 +0,4 @@ | ||
| 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-vip-UA-J.mjs"; | ||
| import { A as RemoteConnectionInfo, C as DevframeViewBuiltin, D as DevframeViewJsonRender, E as DevframeViewIframe, M as JsonRenderElement, N as JsonRenderSpec, O as DevframeViewLauncher, P as JsonRenderer, S as DevframeViewAction, T as DevframeViewGroup, _ as DevframeDockEntryCategory, a as DevframeCommandHandle, b as DevframeDocksActiveState, c as DevframeCommandsHost, d as DevframeServerCommandInput, f as ClientScriptEntry, g as DevframeDockEntryBase, h as DevframeDockEntry, i as DevframeCommandEntry, j as RemoteDockOptions, k as DevframeViewLauncherStatus, 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 DevframeViewCustomRender, x as DevframeDocksHost, y as DevframeDockUserEntry } from "../settings-qfQQ1nTD.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-BvRGGB3C.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, 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, JsonRenderElement, JsonRenderSpec, JsonRenderer, type PartialWithoutId, RemoteConnectionInfo, RemoteDockOptions, type RpcBroadcastOptions, type RpcDefinitionsFilter, type RpcDefinitionsToFunctions, type RpcFunctionsHost, type RpcSharedStateGetOptions, type RpcSharedStateHost, type RpcStreamingChannel, type RpcStreamingChannelOptions, type RpcStreamingHost, type Thenable }; | ||
| 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-ChGTyDu-.mjs"; | ||
| import { A as RemoteConnectionInfo, C as DevframeViewAction, D as DevframeViewIframe, E as DevframeViewGroup, O as DevframeViewLauncher, 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 RemoteDockOptions, k as DevframeViewLauncherStatus, 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-ywInLQJ3.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-BCVXXhEH.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, DevframeViewLauncher, DevframeViewLauncherStatus, type EntriesToObject, type EventEmitter, type EventUnsubscribe, type EventsMap, type PartialWithoutId, RemoteConnectionInfo, RemoteDockOptions, type RpcBroadcastOptions, type RpcDefinitionsFilter, type RpcDefinitionsToFunctions, type RpcFunctionsHost, type RpcSharedStateGetOptions, type RpcSharedStateHost, type RpcStreamingChannel, type RpcStreamingChannelOptions, type RpcStreamingHost, type Thenable }; |
+5
-5
| { | ||
| "name": "@devframes/hub", | ||
| "type": "module", | ||
| "version": "0.7.5", | ||
| "version": "0.7.6", | ||
| "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.5" | ||
| "devframe": "0.7.6" | ||
| }, | ||
@@ -42,3 +42,3 @@ "dependencies": { | ||
| "destr": "^2.0.5", | ||
| "nostics": "^1.1.4", | ||
| "nostics": "^1.2.0", | ||
| "pathe": "^2.0.3", | ||
@@ -52,4 +52,4 @@ "perfect-debounce": "^2.1.0", | ||
| "mlly": "^1.8.2", | ||
| "tsdown": "^0.22.8", | ||
| "devframe": "0.7.5" | ||
| "tsdown": "^0.22.12", | ||
| "devframe": "0.7.6" | ||
| }, | ||
@@ -56,0 +56,0 @@ "scripts": { |
| import { N as JsonRenderSpec, P as JsonRenderer, c as DevframeCommandsHost, p as DevframeDockActivation, v as DevframeDockEntryIcon, x as DevframeDocksHost } from "./settings-qfQQ1nTD.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; | ||
| /** | ||
| * 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; | ||
| } | ||
| 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 `createJsonRenderer` | ||
| * 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. | ||
| */ | ||
| 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. | ||
| */ | ||
| 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 { createDefineWrapperWithContext } from "devframe/rpc"; | ||
| //#region src/define.ts | ||
| const defineHubRpcFunction = createDefineWrapperWithContext(); | ||
| function defineCommand(command) { | ||
| return command; | ||
| } | ||
| function defineDockEntry(entry) { | ||
| return entry; | ||
| } | ||
| function defineJsonRenderSpec(spec) { | ||
| return spec; | ||
| } | ||
| //#endregion | ||
| export { defineJsonRenderSpec as i, defineDockEntry as n, defineHubRpcFunction as r, defineCommand as t }; |
| import "./context-vip-UA-J.mjs"; | ||
| import "./settings-qfQQ1nTD.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 | ||
| 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; | ||
| } | ||
| interface JsonRenderSpec { | ||
| root: string; | ||
| elements: Record<string, JsonRenderElement>; | ||
| /** Initial client-side state model for $state/$bindState expressions */ | ||
| state?: Record<string, unknown>; | ||
| } | ||
| 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 = 'app' | 'framework' | 'web' | 'advanced' | '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 | ||
| * @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. If the referenced group is never registered, the entry renders | ||
| * as a normal top-level entry (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?: string; | ||
| /** | ||
| * Optional client script to import into the iframe | ||
| */ | ||
| clientScript?: ClientScriptEntry; | ||
| /** | ||
| * 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; | ||
| } | ||
| 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; | ||
| } | ||
| interface DevframeViewJsonRender extends DevframeDockEntryBase { | ||
| type: 'json-render'; | ||
| /** JsonRenderer handle created by 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`. | ||
| * | ||
| * 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; | ||
| } | ||
| type DevframeDockUserEntry = DevframeViewIframe | DevframeViewAction | DevframeViewCustomRender | DevframeViewLauncher | DevframeViewJsonRender | DevframeViewGroup | DevframeViewBuiltin; | ||
| 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 { RemoteConnectionInfo as A, DevframeViewBuiltin as C, DevframeViewJsonRender as D, DevframeViewIframe as E, JsonRenderElement as M, JsonRenderSpec as N, DevframeViewLauncher as O, JsonRenderer as P, DevframeViewAction as S, DevframeViewGroup as T, DevframeDockEntryCategory as _, DevframeCommandHandle as a, DevframeDocksActiveState as b, DevframeCommandsHost as c, DevframeServerCommandInput as d, ClientScriptEntry as f, DevframeDockEntryBase as g, DevframeDockEntry as h, DevframeCommandEntry as i, RemoteDockOptions as j, DevframeViewLauncherStatus 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, DevframeViewCustomRender as w, DevframeDocksHost as x, DevframeDockUserEntry as y }; |
Sorry, the diff of this file is too big to display
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
323717
3%7105
1.23%7
-12.5%+ Added
- Removed
Updated