@devframes/hub
Advanced tools
| import { I as JsonRenderSpec, L as JsonRenderer, S as DevframeDocksHost, c as DevframeCommandsHost, p as DevframeDockActivation, v as DevframeDockEntryIcon } from "./settings-Bn38f2Yw.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; | ||
| } | ||
| /** | ||
| * A labeled control a message can carry. Rendered by the messages panel; when | ||
| * clicked it drives the described intent. Discriminated by `kind` so further | ||
| * action kinds can be added without reshaping the field. | ||
| * | ||
| * `'activate'` requests the viewer switch its focused dock to `activate.dockId` | ||
| * (deep-linking via the opaque, serializable `activate.params` bag the target | ||
| * dock interprets), via the hub's `hub:docks:activate` RPC. | ||
| */ | ||
| interface DevframeMessageActivateAction { | ||
| /** Stable id for the action within its entry. */ | ||
| id: string; | ||
| /** Button label shown in the messages panel. */ | ||
| label: string; | ||
| kind: 'activate'; | ||
| /** The dock to focus, plus an optional deep-link params bag. */ | ||
| activate: { | ||
| dockId: string; | ||
| params?: Record<string, unknown>; | ||
| }; | ||
| } | ||
| type DevframeMessageAction = DevframeMessageActivateAction; | ||
| 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[]; | ||
| /** | ||
| * Optional labeled actions (e.g. "navigate to a dock") the panel renders as | ||
| * clickable controls in the entry's detail view. | ||
| */ | ||
| actions?: DevframeMessageAction[]; | ||
| /** | ||
| * Time in ms to auto-dismiss the toast notification (client-side) | ||
| */ | ||
| autoDismiss?: number; | ||
| /** | ||
| * Time in ms to auto-delete this message entry (server-side) | ||
| */ | ||
| autoDelete?: number; | ||
| /** | ||
| * Timestamp when the message was created (auto-generated if not provided) | ||
| */ | ||
| timestamp: number; | ||
| /** | ||
| * Status of the message entry (e.g., 'loading' while an operation is in progress). | ||
| * Defaults to 'idle' when not specified. | ||
| */ | ||
| status?: 'loading' | 'idle'; | ||
| } | ||
| /** | ||
| * Input type for creating a message entry. | ||
| * `id`, `timestamp`, and `from` are auto-filled by the host. | ||
| */ | ||
| type DevframeMessageEntryInput = Omit<DevframeMessageEntry, 'id' | 'timestamp' | 'from'> & { | ||
| id?: string; | ||
| timestamp?: number; | ||
| }; | ||
| interface DevframeMessageHandle { | ||
| /** The underlying message entry data */ | ||
| readonly entry: DevframeMessageEntry; | ||
| /** Shortcut to entry.id */ | ||
| readonly id: string; | ||
| /** Partial update of this message entry */ | ||
| update: (patch: Partial<DevframeMessageEntryInput>) => Promise<DevframeMessageEntry | undefined>; | ||
| /** Remove this message entry */ | ||
| dismiss: () => Promise<void>; | ||
| } | ||
| /** | ||
| * Extra fields accepted by the per-level message shortcuts — | ||
| * everything on {@link DevframeMessageEntryInput} except the | ||
| * `message` and `level` the shortcut itself provides. | ||
| */ | ||
| type DevframeMessageShortcutInput = Omit<DevframeMessageEntryInput, 'message' | 'level'>; | ||
| /** | ||
| * Per-level shortcuts shared by the client and the node host — | ||
| * `messages.info('...')` is `messages.add({ message: '...', level: 'info' })`. | ||
| */ | ||
| interface DevframeMessagesLevelShortcuts { | ||
| /** Shortcut for `add({ message, level: 'info', ...extra })` */ | ||
| info: (message: string, extra?: DevframeMessageShortcutInput) => Promise<DevframeMessageHandle>; | ||
| /** Shortcut for `add({ message, level: 'warn', ...extra })` */ | ||
| warn: (message: string, extra?: DevframeMessageShortcutInput) => Promise<DevframeMessageHandle>; | ||
| /** Shortcut for `add({ message, level: 'error', ...extra })` */ | ||
| error: (message: string, extra?: DevframeMessageShortcutInput) => Promise<DevframeMessageHandle>; | ||
| /** Shortcut for `add({ message, level: 'success', ...extra })` */ | ||
| success: (message: string, extra?: DevframeMessageShortcutInput) => Promise<DevframeMessageHandle>; | ||
| /** Shortcut for `add({ message, level: 'debug', ...extra })` */ | ||
| debug: (message: string, extra?: DevframeMessageShortcutInput) => Promise<DevframeMessageHandle>; | ||
| } | ||
| interface DevframeMessagesClient extends DevframeMessagesLevelShortcuts { | ||
| /** | ||
| * Add a message entry. Returns a Promise resolving to a handle for subsequent updates/dismissal. | ||
| * Can be used without `await` for fire-and-forget usage. | ||
| */ | ||
| add: (input: DevframeMessageEntryInput) => Promise<DevframeMessageHandle>; | ||
| /** Remove a message entry by id */ | ||
| remove: (id: string) => Promise<void>; | ||
| /** Clear all message entries */ | ||
| clear: () => Promise<void>; | ||
| } | ||
| /** | ||
| * A snapshot or delta of the message list, as returned by | ||
| * {@link DevframeMessagesHost.listSince}. Consumers apply `removedIds` | ||
| * first, then upsert `entries`, and pass `version` back as `since` on the | ||
| * next call. | ||
| */ | ||
| interface DevframeMessagesListDelta { | ||
| /** Entries added or updated since the cursor (or all entries when `full`) */ | ||
| entries: DevframeMessageEntry[]; | ||
| /** Ids removed since the cursor (empty when `full`) */ | ||
| removedIds: string[]; | ||
| /** The version cursor — pass back as `since` on the next call */ | ||
| version: number; | ||
| /** | ||
| * When `true`, `entries` is the complete snapshot and any locally cached | ||
| * list must be reset before applying it. | ||
| */ | ||
| full: boolean; | ||
| } | ||
| interface DevframeMessagesHost extends DevframeMessagesLevelShortcuts { | ||
| readonly entries: Map<string, DevframeMessageEntry>; | ||
| readonly events: EventEmitter<{ | ||
| 'message:added': (entry: DevframeMessageEntry) => void; | ||
| 'message:updated': (entry: DevframeMessageEntry) => void; | ||
| 'message:removed': (id: string) => void; | ||
| 'message:cleared': () => void; | ||
| }>; | ||
| /** | ||
| * Add a new message entry. If an entry with the same `id` already exists, it will be updated instead. | ||
| * Returns a handle for subsequent updates/dismissal. Can be used without `await` for fire-and-forget. | ||
| */ | ||
| add: (entry: DevframeMessageEntryInput) => Promise<DevframeMessageHandle>; | ||
| /** | ||
| * Update an existing message entry by id (partial update) | ||
| */ | ||
| update: (id: string, patch: Partial<DevframeMessageEntryInput>) => Promise<DevframeMessageEntry | undefined>; | ||
| /** | ||
| * Remove a message entry by id | ||
| */ | ||
| remove: (id: string) => Promise<void>; | ||
| /** | ||
| * Clear all message entries | ||
| */ | ||
| clear: () => Promise<void>; | ||
| /** | ||
| * Read the message list incrementally. Pass the `version` from the | ||
| * previous result as `since` to receive only the entries modified and the | ||
| * ids removed after that point; pass `null`/`undefined` for the initial | ||
| * full snapshot. When the host can no longer compute a reliable delta for | ||
| * the given cursor (trimmed removal history, or a cursor from another host | ||
| * incarnation), the result carries `full: true` with the complete list. | ||
| */ | ||
| listSince: (since?: number | null) => DevframeMessagesListDelta; | ||
| } | ||
| //#endregion | ||
| //#region src/types/terminals.d.ts | ||
| interface DevframeTerminalsHost { | ||
| readonly sessions: Map<string, DevframeTerminalSession>; | ||
| readonly events: EventEmitter<{ | ||
| 'terminal:session:updated': (session: DevframeTerminalSession) => void; | ||
| }>; | ||
| register: (session: DevframeTerminalSession) => DevframeTerminalSession; | ||
| update: (session: DevframeTerminalSession) => void; | ||
| /** Drop a session from the registry, disposing its bound output stream. */ | ||
| remove: (session: DevframeTerminalSession) => void; | ||
| /** | ||
| * Spawn a read-only child process (pipe-backed, output only). Use this for | ||
| * long-running logs and dev servers that don't need input. | ||
| */ | ||
| startChildProcess: (executeOptions: DevframeChildProcessExecuteOptions, terminal: Omit<DevframeTerminalSessionBase, 'status'>) => Promise<DevframeChildProcessTerminalSession>; | ||
| /** | ||
| * Spawn a fully interactive pseudo-terminal (PTY) any plugin can drive: | ||
| * keystrokes via {@link DevframePtyTerminalSession.write}, live layout via | ||
| * {@link DevframePtyTerminalSession.resize}, TUI-capable. The session is | ||
| * marked `interactive`, so a hub-aware terminal UI (e.g. the terminals | ||
| * plugin) surfaces it as writable rather than read-only. Powered by | ||
| * `zigpty` — where its native bindings can't load, it degrades to | ||
| * pipe-based terminal emulation. | ||
| */ | ||
| startPtySession: (executeOptions: DevframePtyExecuteOptions, terminal: Omit<DevframeTerminalSessionBase, 'status'>) => Promise<DevframePtyTerminalSession>; | ||
| } | ||
| type DevframeTerminalStatus = 'running' | 'stopped' | 'error'; | ||
| interface DevframeTerminalSessionBase { | ||
| id: string; | ||
| title: string; | ||
| description?: string; | ||
| status: DevframeTerminalStatus; | ||
| icon?: DevframeDockEntryIcon; | ||
| /** | ||
| * Whether the session accepts input (keystrokes + resize). `true` for | ||
| * {@link DevframeTerminalsHost.startPtySession} sessions; absent/`false` | ||
| * for pipe-backed, output-only ones. A hub-aware terminal UI reads this to | ||
| * decide whether to enable stdin and wire resize. | ||
| */ | ||
| interactive?: boolean; | ||
| /** | ||
| * Whether the session may be restarted in place (re-running its command). | ||
| * Defaults to `true`. Set `false` for sessions whose lifecycle is owned | ||
| * elsewhere — e.g. a one-shot build, or a server (like code-server) that | ||
| * should be restarted through its own controls rather than by re-spawning | ||
| * the raw process. A hub-aware terminal UI hides its restart affordance for | ||
| * these, and `hub:terminals:restart` rejects them. | ||
| */ | ||
| restartable?: boolean; | ||
| } | ||
| interface DevframeTerminalSession extends DevframeTerminalSessionBase { | ||
| buffer?: string[]; | ||
| stream?: ReadableStream<string>; | ||
| } | ||
| interface DevframeChildProcessExecuteOptions { | ||
| command: string; | ||
| args: string[]; | ||
| cwd?: string; | ||
| env?: Record<string, string>; | ||
| } | ||
| /** | ||
| * The settled outcome of a {@link DevframeChildProcessTerminalSession} run — | ||
| * stdout/stderr captured separately (unlike the session's merged display | ||
| * `stream`), plus the process's exit code (`undefined` if it was killed by a | ||
| * signal before exiting). | ||
| */ | ||
| interface DevframeChildProcessOutput { | ||
| stdout: string; | ||
| stderr: string; | ||
| exitCode: number | undefined; | ||
| } | ||
| /** | ||
| * A live handle on a child process's outcome — mirrors the ergonomics of | ||
| * `tinyexec`'s `Result` (a promise-like paired with synchronous accessors) so | ||
| * callers migrating from a `tinyexec`/`execa`-based subprocess API (e.g. | ||
| * Nuxt DevTools' `startSubprocess().getResult()`) can adopt | ||
| * {@link DevframeTerminalsHost.startChildProcess} with minimal changes. | ||
| * `await`ing it (or calling `.then()`) resolves once the process exits, with | ||
| * the full captured {@link DevframeChildProcessOutput}. | ||
| */ | ||
| interface DevframeChildProcessResult extends PromiseLike<DevframeChildProcessOutput> { | ||
| readonly pid: number | undefined; | ||
| /** `undefined` while the process is still running. */ | ||
| readonly exitCode: number | undefined; | ||
| readonly killed: boolean; | ||
| kill: (signal?: NodeJS.Signals | number) => boolean; | ||
| } | ||
| interface DevframeChildProcessTerminalSession extends DevframeTerminalSession { | ||
| type: 'child-process'; | ||
| executeOptions: DevframeChildProcessExecuteOptions; | ||
| getChildProcess: () => ChildProcess | undefined; | ||
| /** | ||
| * Get a live handle on the current run's outcome. Reflects the most recent | ||
| * `restart()` — call it again after restarting to track the new run. | ||
| */ | ||
| getResult: () => DevframeChildProcessResult; | ||
| terminate: () => Promise<void>; | ||
| restart: () => Promise<void>; | ||
| } | ||
| interface DevframePtyExecuteOptions { | ||
| command: string; | ||
| args?: string[]; | ||
| cwd?: string; | ||
| env?: Record<string, string>; | ||
| /** Initial column count. Default: 80. */ | ||
| cols?: number; | ||
| /** Initial row count. Default: 24. */ | ||
| rows?: number; | ||
| } | ||
| interface DevframePtyTerminalSession extends DevframeTerminalSession { | ||
| type: 'pty'; | ||
| interactive: true; | ||
| executeOptions: DevframePtyExecuteOptions; | ||
| /** Send keystrokes / raw input to the PTY. */ | ||
| write: (data: string) => void; | ||
| /** Resize the PTY (emits SIGWINCH so TUIs relayout). */ | ||
| resize: (cols: number, rows: number) => void; | ||
| /** Current foreground process name, when the backend can resolve it. */ | ||
| getProcessName: () => string | undefined; | ||
| terminate: () => Promise<void>; | ||
| restart: () => Promise<void>; | ||
| } | ||
| //#endregion | ||
| //#region src/node/context.d.ts | ||
| declare module 'devframe/types' { | ||
| interface DevframeRpcClientFunctions { | ||
| /** | ||
| * Server→client request to switch the active dock. Broadcast by the hub | ||
| * context in response to `ctx.docks.activate()` (driven by the | ||
| * `hub:docks:activate` RPC). The client host registers a handler that | ||
| * calls its local `switchEntry(dockId)`; the target dock reads | ||
| * `activation.params` to react (e.g. focus a session). Do not register | ||
| * manually. | ||
| * | ||
| * @internal | ||
| */ | ||
| 'devframe:docks:activate': (activation: DevframeDockActivation) => Promise<void>; | ||
| /** | ||
| * Server→client notification that terminal sessions changed. Broadcast | ||
| * by the hub context; a hub-aware client re-reads terminal state in | ||
| * response. Do not register manually. | ||
| * | ||
| * @internal | ||
| */ | ||
| 'devframe:terminals:updated': () => Promise<void>; | ||
| /** | ||
| * Server→client notification that the message list changed. Broadcast | ||
| * by the hub context; a hub-aware client re-reads message state in | ||
| * response. Do not register manually. | ||
| * | ||
| * @internal | ||
| */ | ||
| 'devframe:messages:updated': () => Promise<void>; | ||
| } | ||
| interface DevframeRpcServerFunctions { | ||
| /** | ||
| * Ask the active viewer to switch its focused dock to `dockId`, optionally | ||
| * carrying `params` for the target dock to interpret (e.g. | ||
| * `{ sessionId }` for the terminals dock). Any connected client may call | ||
| * it — a mounted devframe in its own iframe steers the host shell's dock | ||
| * selection. Handled by {@link import('./rpc-builtins').hubDocksActivate}. | ||
| */ | ||
| 'hub:docks:activate': (input: { | ||
| dockId: string; | ||
| params?: Record<string, unknown>; | ||
| }) => Promise<void>; | ||
| /** | ||
| * Invoke a registered server command by id; trailing args are forwarded to | ||
| * the command's handler. Handled by | ||
| * {@link import('./rpc-builtins').hubCommandsExecute}. | ||
| */ | ||
| 'hub:commands:execute': (id: string, ...args: any[]) => Promise<unknown>; | ||
| /** | ||
| * Add a message from a browser client into the hub's messages feed | ||
| * (marked `from: 'browser'`); returns the serializable entry. Handled by | ||
| * {@link import('./rpc-builtins').hubMessagesAdd}. | ||
| */ | ||
| 'hub:messages:add': (input: DevframeMessageEntryInput) => Promise<DevframeMessageEntry>; | ||
| /** Patch a message by id; resolves the updated entry (or `undefined`). */ | ||
| 'hub:messages:update': (id: string, patch: Partial<DevframeMessageEntryInput>) => Promise<DevframeMessageEntry | undefined>; | ||
| /** Remove a message by id. */ | ||
| 'hub:messages:remove': (id: string) => Promise<void>; | ||
| /** Remove every message. */ | ||
| 'hub:messages:clear': () => Promise<void>; | ||
| /** | ||
| * Send input to an interactive PTY session spawned via | ||
| * `ctx.terminals.startPtySession`. Handled by | ||
| * {@link import('./rpc-builtins').hubTerminalsWrite}. | ||
| */ | ||
| 'hub:terminals:write': (id: string, data: string) => Promise<void>; | ||
| /** Resize an interactive PTY session by id. */ | ||
| 'hub:terminals:resize': (id: string, cols: number, rows: number) => Promise<void>; | ||
| } | ||
| } | ||
| /** | ||
| * Hub-augmented node context — extends devframe's framework-neutral | ||
| * `DevframeNodeContext` with the hub-level subsystems (`docks`, | ||
| * `terminals`, `messages`, `commands`) and the deprecated | ||
| * `createJsonRenderer` compatibility factory. | ||
| * | ||
| * Framework kits further extend this with their own slots (e.g. | ||
| * `viteConfig`, `viteServer`). Host-specific capabilities (editor open, | ||
| * filesystem reveal, etc.) ship as kit-registered RPC functions rather | ||
| * than as part of this surface. JSON-render itself is not part of the hub: | ||
| * it is an opt-in integration (`@devframes/json-render`) that augments any | ||
| * devframe context and contributes its own dock type — prefer | ||
| * `createJsonRenderView` from `@devframes/json-render/node` over the | ||
| * deprecated factory below. | ||
| */ | ||
| interface DevframeHubContext extends DevframeNodeContext { | ||
| readonly host: DevframeHost; | ||
| docks: DevframeDocksHost; | ||
| terminals: DevframeTerminalsHost; | ||
| messages: DevframeMessagesHost; | ||
| commands: DevframeCommandsHost; | ||
| /** | ||
| * Create a `JsonRenderer` handle for building json-render powered UIs. | ||
| * | ||
| * @deprecated json-render moved out of the hub into the opt-in | ||
| * `@devframes/json-render` integration in 0.7. This factory is kept | ||
| * working (not just type-compatible) for the 0.7 series so existing call | ||
| * sites don't break — use `createJsonRenderView(ctx, { id, spec })` from | ||
| * `@devframes/json-render/node` instead. Will be removed in 0.8. | ||
| */ | ||
| createJsonRenderer: (spec: JsonRenderSpec) => JsonRenderer; | ||
| } | ||
| /** | ||
| * Options for {@link createHubContext} — devframe's | ||
| * {@link CreateHostContextOptions} plus any hub-level additions kits layer on | ||
| * through declaration merging. | ||
| */ | ||
| interface CreateHubContextOptions extends CreateHostContextOptions {} | ||
| /** | ||
| * Create a hub-level node context: wraps devframe's `createHostContext`, | ||
| * attaches the hub hosts (`docks`, `terminals`, `messages`, `commands`), | ||
| * registers the hub's built-in RPC commands, and wires the shared-state | ||
| * synchronization that powers a hub-aware client UI. | ||
| */ | ||
| declare function createHubContext(options: CreateHubContextOptions): Promise<DevframeHubContext>; | ||
| //#endregion | ||
| export { DevframeMessageShortcutInput as C, DevframeMessagesListDelta as D, DevframeMessagesLevelShortcuts as E, DevframeMessageLevel as S, DevframeMessagesHost as T, DevframeMessageEntry as _, DevframeChildProcessOutput as a, DevframeMessageFilePosition as b, DevframePtyExecuteOptions as c, DevframeTerminalSessionBase as d, DevframeTerminalStatus as f, DevframeMessageElementPosition as g, DevframeMessageActivateAction as h, DevframeChildProcessExecuteOptions as i, DevframePtyTerminalSession as l, DevframeMessageAction as m, DevframeHubContext as n, DevframeChildProcessResult as o, DevframeTerminalsHost as p, createHubContext as r, DevframeChildProcessTerminalSession as s, CreateHubContextOptions as t, DevframeTerminalSession as u, DevframeMessageEntryFrom as v, DevframeMessagesClient as w, DevframeMessageHandle as x, DevframeMessageEntryInput as y }; |
| import "./settings-Bn38f2Yw.mjs"; | ||
| import "./context-CvxNyUBj.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 { D as DevframeViewIframe, M as NavTarget, N as RemoteConnectionInfo, b as DevframeDockUserEntry, h as DevframeDockEntry, i as DevframeCommandEntry, m as DevframeDockEntriesGrouped, n as DevframeClientCommand, o as DevframeCommandKeybinding, t as DevframeDocksUserSettings, v as DevframeDockEntryIcon } from "../settings-Bn38f2Yw.mjs"; | ||
| import { DEFAULT_CATEGORIES_ORDER } from "../constants.mjs"; | ||
| import { S as DevframeMessagesClient, _ as DevframeMessageEntryInput } from "../context-cQyL2rge.mjs"; | ||
| import "../index-CP79Di2x.mjs"; | ||
| import { w as DevframeMessagesClient, y as DevframeMessageEntryInput } from "../context-CvxNyUBj.mjs"; | ||
| import "../index-CB6kSg0u.mjs"; | ||
| import { DevframeClientRpcHost, DevframeConnectionStatus, DevframeRpcClient, DevframeRpcClientOptions, DevframeRpcContext, RpcClientEvents, RpcClientEvents as RpcClientEvents$1 } from "devframe/client"; | ||
@@ -6,0 +6,0 @@ import { EventEmitter } from "devframe/types"; |
+3
-3
| import { A as DevframeViewLauncherStatus, C as DevframeViewAction, D as DevframeViewIframe, E as DevframeViewGroup, F as JsonRenderElement, I as JsonRenderSpec, L as JsonRenderer, M as NavTarget, N as RemoteConnectionInfo, O as DevframeViewJsonRender, P as RemoteDockOptions, S as DevframeDocksHost, T as DevframeViewCustomRender, _ as DevframeDockEntryCategory, a as DevframeCommandHandle, b as DevframeDockUserEntry, c as DevframeCommandsHost, d as DevframeServerCommandInput, f as ClientScriptEntry, g as DevframeDockEntryBase, h as DevframeDockEntry, i as DevframeCommandEntry, j as FrameSubTabsConfig, k as DevframeViewLauncher, l as DevframeCommandsHostEvents, m as DevframeDockEntriesGrouped, n as DevframeClientCommand, o as DevframeCommandKeybinding, p as DevframeDockActivation, r as DevframeCommandBase, s as DevframeCommandShortcutOverrides, t as DevframeDocksUserSettings, u as DevframeServerCommandEntry, v as DevframeDockEntryIcon, w as DevframeViewBuiltin, x as DevframeDocksActiveState, y as DevframeDockEntryRegistry } from "./settings-Bn38f2Yw.mjs"; | ||
| import { DEFAULT_CATEGORIES_ORDER } from "./constants.mjs"; | ||
| import { C as DevframeMessagesHost, S as DevframeMessagesClient, T as DevframeMessagesListDelta, _ as DevframeMessageEntryInput, a as DevframeChildProcessOutput, b as DevframeMessageLevel, c as DevframePtyExecuteOptions, d as DevframeTerminalSessionBase, f as DevframeTerminalStatus, g as DevframeMessageEntryFrom, h as DevframeMessageEntry, i as DevframeChildProcessExecuteOptions, l as DevframePtyTerminalSession, m as DevframeMessageElementPosition, n as DevframeHubContext, o as DevframeChildProcessResult, p as DevframeTerminalsHost, s as DevframeChildProcessTerminalSession, t as CreateHubContextOptions, u as DevframeTerminalSession, v as DevframeMessageFilePosition, w as DevframeMessagesLevelShortcuts, x as DevframeMessageShortcutInput, y as DevframeMessageHandle } from "./context-cQyL2rge.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-CP79Di2x.mjs"; | ||
| import { C as DevframeMessageShortcutInput, D as DevframeMessagesListDelta, E as DevframeMessagesLevelShortcuts, S as DevframeMessageLevel, T as DevframeMessagesHost, _ as DevframeMessageEntry, a as DevframeChildProcessOutput, b as DevframeMessageFilePosition, c as DevframePtyExecuteOptions, d as DevframeTerminalSessionBase, f as DevframeTerminalStatus, g as DevframeMessageElementPosition, h as DevframeMessageActivateAction, i as DevframeChildProcessExecuteOptions, l as DevframePtyTerminalSession, m as DevframeMessageAction, n as DevframeHubContext, o as DevframeChildProcessResult, p as DevframeTerminalsHost, s as DevframeChildProcessTerminalSession, t as CreateHubContextOptions, u as DevframeTerminalSession, v as DevframeMessageEntryFrom, w as DevframeMessagesClient, x as DevframeMessageHandle, y as DevframeMessageEntryInput } from "./context-CvxNyUBj.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-CB6kSg0u.mjs"; | ||
| import { WhenContext, WhenExpression } from "devframe/utils/when"; | ||
@@ -24,2 +24,2 @@ //#region src/define.d.ts | ||
| //#endregion | ||
| export { type ClientScriptEntry, type ConnectionMeta, type CreateHubContextOptions, DEFAULT_CATEGORIES_ORDER, 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 DevframeViewJsonRender, type DevframeViewLauncher, type DevframeViewLauncherStatus, type EntriesToObject, type EventEmitter, type EventUnsubscribe, type EventsMap, type FrameSubTabsConfig, type JsonRenderElement, type JsonRenderSpec, type JsonRenderer, type NavTarget, 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, DEFAULT_CATEGORIES_ORDER, 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 DevframeMessageAction, type DevframeMessageActivateAction, 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 FrameSubTabsConfig, type JsonRenderElement, type JsonRenderSpec, type JsonRenderer, type NavTarget, 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 }; |
| 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-Bn38f2Yw.mjs"; | ||
| import { DEFAULT_CATEGORIES_ORDER } from "../constants.mjs"; | ||
| import { C as DevframeMessagesHost$1, T as DevframeMessagesListDelta, _ as DevframeMessageEntryInput, c as DevframePtyExecuteOptions, d as DevframeTerminalSessionBase, h as DevframeMessageEntry, i as DevframeChildProcessExecuteOptions, l as DevframePtyTerminalSession, n as DevframeHubContext, p as DevframeTerminalsHost$1, r as createHubContext, s as DevframeChildProcessTerminalSession, t as CreateHubContextOptions, u as DevframeTerminalSession, x as DevframeMessageShortcutInput, y as DevframeMessageHandle } from "../context-cQyL2rge.mjs"; | ||
| import { C as DevframeMessageShortcutInput, D as DevframeMessagesListDelta, T as DevframeMessagesHost$1, _ as DevframeMessageEntry, c as DevframePtyExecuteOptions, d as DevframeTerminalSessionBase, 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 DevframeMessageHandle, y as DevframeMessageEntryInput } from "../context-CvxNyUBj.mjs"; | ||
| import { RpcFunctionDefinitionAny } from "devframe/rpc"; | ||
@@ -5,0 +5,0 @@ import { DevframeDefinition } from "devframe/types"; |
| import { A as DevframeViewLauncherStatus, C as DevframeViewAction, D as DevframeViewIframe, E as DevframeViewGroup, F as JsonRenderElement, I as JsonRenderSpec, L as JsonRenderer, M as NavTarget, N as RemoteConnectionInfo, O as DevframeViewJsonRender, P as RemoteDockOptions, S as DevframeDocksHost, T as DevframeViewCustomRender, _ as DevframeDockEntryCategory, a as DevframeCommandHandle, b as DevframeDockUserEntry, c as DevframeCommandsHost, d as DevframeServerCommandInput, f as ClientScriptEntry, g as DevframeDockEntryBase, h as DevframeDockEntry, i as DevframeCommandEntry, j as FrameSubTabsConfig, k as DevframeViewLauncher, l as DevframeCommandsHostEvents, m as DevframeDockEntriesGrouped, n as DevframeClientCommand, o as DevframeCommandKeybinding, p as DevframeDockActivation, r as DevframeCommandBase, s as DevframeCommandShortcutOverrides, t as DevframeDocksUserSettings, u as DevframeServerCommandEntry, v as DevframeDockEntryIcon, w as DevframeViewBuiltin, x as DevframeDocksActiveState, y as DevframeDockEntryRegistry } from "../settings-Bn38f2Yw.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-cQyL2rge.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-CP79Di2x.mjs"; | ||
| export { ClientScriptEntry, type ConnectionMeta, type CreateHubContextOptions, type DevframeCapabilities, DevframeChildProcessExecuteOptions, DevframeChildProcessOutput, DevframeChildProcessResult, DevframeChildProcessTerminalSession, DevframeClientCommand, DevframeCommandBase, DevframeCommandEntry, DevframeCommandHandle, DevframeCommandKeybinding, DevframeCommandShortcutOverrides, DevframeCommandsHost, DevframeCommandsHostEvents, type DevframeDiagnosticsDefinition, type DevframeDiagnosticsHost, type DevframeDiagnosticsLogger, DevframeDockActivation, DevframeDockEntriesGrouped, DevframeDockEntry, DevframeDockEntryBase, DevframeDockEntryCategory, DevframeDockEntryIcon, DevframeDockEntryRegistry, DevframeDockUserEntry, DevframeDocksActiveState, DevframeDocksHost, DevframeDocksUserSettings, type DevframeHost, type DevframeHubContext, DevframeMessageElementPosition, DevframeMessageEntry, DevframeMessageEntryFrom, DevframeMessageEntryInput, DevframeMessageFilePosition, DevframeMessageHandle, DevframeMessageLevel, DevframeMessageShortcutInput, DevframeMessagesClient, DevframeMessagesHost, DevframeMessagesLevelShortcuts, DevframeMessagesListDelta, type DevframeNodeRpcSession, DevframePtyExecuteOptions, DevframePtyTerminalSession, type DevframeRpcClientFunctions, type DevframeRpcServerFunctions, type DevframeRpcSharedStates, DevframeServerCommandEntry, DevframeServerCommandInput, DevframeTerminalSession, DevframeTerminalSessionBase, DevframeTerminalStatus, DevframeTerminalsHost, DevframeViewAction, DevframeViewBuiltin, DevframeViewCustomRender, DevframeViewGroup, type DevframeViewHost, DevframeViewIframe, DevframeViewJsonRender, DevframeViewLauncher, DevframeViewLauncherStatus, type EntriesToObject, type EventEmitter, type EventUnsubscribe, type EventsMap, FrameSubTabsConfig, JsonRenderElement, JsonRenderSpec, JsonRenderer, NavTarget, type PartialWithoutId, RemoteConnectionInfo, RemoteDockOptions, type RpcBroadcastOptions, type RpcDefinitionsFilter, type RpcDefinitionsToFunctions, type RpcFunctionsHost, type RpcSharedStateGetOptions, type RpcSharedStateHost, type RpcStreamingChannel, type RpcStreamingChannelOptions, type RpcStreamingHost, type Thenable }; | ||
| import { C as DevframeMessageShortcutInput, D as DevframeMessagesListDelta, E as DevframeMessagesLevelShortcuts, S as DevframeMessageLevel, T as DevframeMessagesHost, _ as DevframeMessageEntry, a as DevframeChildProcessOutput, b as DevframeMessageFilePosition, c as DevframePtyExecuteOptions, d as DevframeTerminalSessionBase, f as DevframeTerminalStatus, g as DevframeMessageElementPosition, h as DevframeMessageActivateAction, i as DevframeChildProcessExecuteOptions, l as DevframePtyTerminalSession, m as DevframeMessageAction, n as DevframeHubContext, o as DevframeChildProcessResult, p as DevframeTerminalsHost, s as DevframeChildProcessTerminalSession, t as CreateHubContextOptions, u as DevframeTerminalSession, v as DevframeMessageEntryFrom, w as DevframeMessagesClient, x as DevframeMessageHandle, y as DevframeMessageEntryInput } from "../context-CvxNyUBj.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-CB6kSg0u.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, DevframeMessageAction, DevframeMessageActivateAction, DevframeMessageElementPosition, DevframeMessageEntry, DevframeMessageEntryFrom, DevframeMessageEntryInput, DevframeMessageFilePosition, DevframeMessageHandle, DevframeMessageLevel, DevframeMessageShortcutInput, DevframeMessagesClient, DevframeMessagesHost, DevframeMessagesLevelShortcuts, DevframeMessagesListDelta, type DevframeNodeRpcSession, DevframePtyExecuteOptions, DevframePtyTerminalSession, type DevframeRpcClientFunctions, type DevframeRpcServerFunctions, type DevframeRpcSharedStates, DevframeServerCommandEntry, DevframeServerCommandInput, DevframeTerminalSession, DevframeTerminalSessionBase, DevframeTerminalStatus, DevframeTerminalsHost, DevframeViewAction, DevframeViewBuiltin, DevframeViewCustomRender, DevframeViewGroup, type DevframeViewHost, DevframeViewIframe, DevframeViewJsonRender, DevframeViewLauncher, DevframeViewLauncherStatus, type EntriesToObject, type EventEmitter, type EventUnsubscribe, type EventsMap, FrameSubTabsConfig, JsonRenderElement, JsonRenderSpec, JsonRenderer, NavTarget, type PartialWithoutId, RemoteConnectionInfo, RemoteDockOptions, type RpcBroadcastOptions, type RpcDefinitionsFilter, type RpcDefinitionsToFunctions, type RpcFunctionsHost, type RpcSharedStateGetOptions, type RpcSharedStateHost, type RpcStreamingChannel, type RpcStreamingChannelOptions, type RpcStreamingHost, type Thenable }; |
+3
-3
| { | ||
| "name": "@devframes/hub", | ||
| "type": "module", | ||
| "version": "0.7.13", | ||
| "version": "0.7.14", | ||
| "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.13" | ||
| "devframe": "0.7.14" | ||
| }, | ||
@@ -52,3 +52,3 @@ "dependencies": { | ||
| "tsdown": "^0.22.14", | ||
| "devframe": "0.7.13" | ||
| "devframe": "0.7.14" | ||
| }, | ||
@@ -55,0 +55,0 @@ "scripts": { |
| import { I as JsonRenderSpec, L as JsonRenderer, S as DevframeDocksHost, c as DevframeCommandsHost, p as DevframeDockActivation, v as DevframeDockEntryIcon } from "./settings-Bn38f2Yw.mjs"; | ||
| import { CreateHostContextOptions } from "devframe/node"; | ||
| import { DevframeHost, DevframeNodeContext, EventEmitter } from "devframe/types"; | ||
| import { ChildProcess } from "node:child_process"; | ||
| //#region src/types/messages.d.ts | ||
| type DevframeMessageLevel = 'info' | 'warn' | 'error' | 'success' | 'debug'; | ||
| type DevframeMessageEntryFrom = 'server' | 'browser'; | ||
| interface DevframeMessageElementPosition { | ||
| /** CSS selector for the element */ | ||
| selector?: string; | ||
| /** Bounding box of the element */ | ||
| boundingBox?: { | ||
| x: number; | ||
| y: number; | ||
| width: number; | ||
| height: number; | ||
| }; | ||
| /** Human-readable description of the element */ | ||
| description?: string; | ||
| } | ||
| interface DevframeMessageFilePosition { | ||
| /** Absolute or relative file path */ | ||
| file: string; | ||
| /** Line number (1-based) */ | ||
| line?: number; | ||
| /** Column number (1-based) */ | ||
| column?: number; | ||
| } | ||
| interface DevframeMessageEntry { | ||
| /** | ||
| * Unique identifier for this message entry (auto-generated if not provided) | ||
| */ | ||
| id: string; | ||
| /** | ||
| * Short title or summary of the message | ||
| */ | ||
| message: string; | ||
| /** | ||
| * Optional detailed description or explanation | ||
| */ | ||
| description?: string; | ||
| /** | ||
| * Severity level, determines color and icon | ||
| */ | ||
| level: DevframeMessageLevel; | ||
| /** | ||
| * Optional stack trace string | ||
| */ | ||
| stacktrace?: string; | ||
| /** | ||
| * Optional DOM element position info (e.g., for a11y issues) | ||
| */ | ||
| elementPosition?: DevframeMessageElementPosition; | ||
| /** | ||
| * Optional source file position info (e.g., for lint errors) | ||
| */ | ||
| filePosition?: DevframeMessageFilePosition; | ||
| /** | ||
| * Whether this message should also appear as a toast notification | ||
| */ | ||
| notify?: boolean; | ||
| /** | ||
| * Origin of the message entry, automatically set by the context | ||
| */ | ||
| from: DevframeMessageEntryFrom; | ||
| /** | ||
| * Grouping category (e.g., 'a11y', 'lint', 'runtime', 'test') | ||
| */ | ||
| category?: string; | ||
| /** | ||
| * Optional tags/labels for filtering | ||
| */ | ||
| labels?: string[]; | ||
| /** | ||
| * Time in ms to auto-dismiss the toast notification (client-side) | ||
| */ | ||
| autoDismiss?: number; | ||
| /** | ||
| * Time in ms to auto-delete this message entry (server-side) | ||
| */ | ||
| autoDelete?: number; | ||
| /** | ||
| * Timestamp when the message was created (auto-generated if not provided) | ||
| */ | ||
| timestamp: number; | ||
| /** | ||
| * Status of the message entry (e.g., 'loading' while an operation is in progress). | ||
| * Defaults to 'idle' when not specified. | ||
| */ | ||
| status?: 'loading' | 'idle'; | ||
| } | ||
| /** | ||
| * Input type for creating a message entry. | ||
| * `id`, `timestamp`, and `from` are auto-filled by the host. | ||
| */ | ||
| type DevframeMessageEntryInput = Omit<DevframeMessageEntry, 'id' | 'timestamp' | 'from'> & { | ||
| id?: string; | ||
| timestamp?: number; | ||
| }; | ||
| interface DevframeMessageHandle { | ||
| /** The underlying message entry data */ | ||
| readonly entry: DevframeMessageEntry; | ||
| /** Shortcut to entry.id */ | ||
| readonly id: string; | ||
| /** Partial update of this message entry */ | ||
| update: (patch: Partial<DevframeMessageEntryInput>) => Promise<DevframeMessageEntry | undefined>; | ||
| /** Remove this message entry */ | ||
| dismiss: () => Promise<void>; | ||
| } | ||
| /** | ||
| * Extra fields accepted by the per-level message shortcuts — | ||
| * everything on {@link DevframeMessageEntryInput} except the | ||
| * `message` and `level` the shortcut itself provides. | ||
| */ | ||
| type DevframeMessageShortcutInput = Omit<DevframeMessageEntryInput, 'message' | 'level'>; | ||
| /** | ||
| * Per-level shortcuts shared by the client and the node host — | ||
| * `messages.info('...')` is `messages.add({ message: '...', level: 'info' })`. | ||
| */ | ||
| interface DevframeMessagesLevelShortcuts { | ||
| /** Shortcut for `add({ message, level: 'info', ...extra })` */ | ||
| info: (message: string, extra?: DevframeMessageShortcutInput) => Promise<DevframeMessageHandle>; | ||
| /** Shortcut for `add({ message, level: 'warn', ...extra })` */ | ||
| warn: (message: string, extra?: DevframeMessageShortcutInput) => Promise<DevframeMessageHandle>; | ||
| /** Shortcut for `add({ message, level: 'error', ...extra })` */ | ||
| error: (message: string, extra?: DevframeMessageShortcutInput) => Promise<DevframeMessageHandle>; | ||
| /** Shortcut for `add({ message, level: 'success', ...extra })` */ | ||
| success: (message: string, extra?: DevframeMessageShortcutInput) => Promise<DevframeMessageHandle>; | ||
| /** Shortcut for `add({ message, level: 'debug', ...extra })` */ | ||
| debug: (message: string, extra?: DevframeMessageShortcutInput) => Promise<DevframeMessageHandle>; | ||
| } | ||
| interface DevframeMessagesClient extends DevframeMessagesLevelShortcuts { | ||
| /** | ||
| * Add a message entry. Returns a Promise resolving to a handle for subsequent updates/dismissal. | ||
| * Can be used without `await` for fire-and-forget usage. | ||
| */ | ||
| add: (input: DevframeMessageEntryInput) => Promise<DevframeMessageHandle>; | ||
| /** Remove a message entry by id */ | ||
| remove: (id: string) => Promise<void>; | ||
| /** Clear all message entries */ | ||
| clear: () => Promise<void>; | ||
| } | ||
| /** | ||
| * A snapshot or delta of the message list, as returned by | ||
| * {@link DevframeMessagesHost.listSince}. Consumers apply `removedIds` | ||
| * first, then upsert `entries`, and pass `version` back as `since` on the | ||
| * next call. | ||
| */ | ||
| interface DevframeMessagesListDelta { | ||
| /** Entries added or updated since the cursor (or all entries when `full`) */ | ||
| entries: DevframeMessageEntry[]; | ||
| /** Ids removed since the cursor (empty when `full`) */ | ||
| removedIds: string[]; | ||
| /** The version cursor — pass back as `since` on the next call */ | ||
| version: number; | ||
| /** | ||
| * When `true`, `entries` is the complete snapshot and any locally cached | ||
| * list must be reset before applying it. | ||
| */ | ||
| full: boolean; | ||
| } | ||
| interface DevframeMessagesHost extends DevframeMessagesLevelShortcuts { | ||
| readonly entries: Map<string, DevframeMessageEntry>; | ||
| readonly events: EventEmitter<{ | ||
| 'message:added': (entry: DevframeMessageEntry) => void; | ||
| 'message:updated': (entry: DevframeMessageEntry) => void; | ||
| 'message:removed': (id: string) => void; | ||
| 'message:cleared': () => void; | ||
| }>; | ||
| /** | ||
| * Add a new message entry. If an entry with the same `id` already exists, it will be updated instead. | ||
| * Returns a handle for subsequent updates/dismissal. Can be used without `await` for fire-and-forget. | ||
| */ | ||
| add: (entry: DevframeMessageEntryInput) => Promise<DevframeMessageHandle>; | ||
| /** | ||
| * Update an existing message entry by id (partial update) | ||
| */ | ||
| update: (id: string, patch: Partial<DevframeMessageEntryInput>) => Promise<DevframeMessageEntry | undefined>; | ||
| /** | ||
| * Remove a message entry by id | ||
| */ | ||
| remove: (id: string) => Promise<void>; | ||
| /** | ||
| * Clear all message entries | ||
| */ | ||
| clear: () => Promise<void>; | ||
| /** | ||
| * Read the message list incrementally. Pass the `version` from the | ||
| * previous result as `since` to receive only the entries modified and the | ||
| * ids removed after that point; pass `null`/`undefined` for the initial | ||
| * full snapshot. When the host can no longer compute a reliable delta for | ||
| * the given cursor (trimmed removal history, or a cursor from another host | ||
| * incarnation), the result carries `full: true` with the complete list. | ||
| */ | ||
| listSince: (since?: number | null) => DevframeMessagesListDelta; | ||
| } | ||
| //#endregion | ||
| //#region src/types/terminals.d.ts | ||
| interface DevframeTerminalsHost { | ||
| readonly sessions: Map<string, DevframeTerminalSession>; | ||
| readonly events: EventEmitter<{ | ||
| 'terminal:session:updated': (session: DevframeTerminalSession) => void; | ||
| }>; | ||
| register: (session: DevframeTerminalSession) => DevframeTerminalSession; | ||
| update: (session: DevframeTerminalSession) => void; | ||
| /** Drop a session from the registry, disposing its bound output stream. */ | ||
| remove: (session: DevframeTerminalSession) => void; | ||
| /** | ||
| * Spawn a read-only child process (pipe-backed, output only). Use this for | ||
| * long-running logs and dev servers that don't need input. | ||
| */ | ||
| startChildProcess: (executeOptions: DevframeChildProcessExecuteOptions, terminal: Omit<DevframeTerminalSessionBase, 'status'>) => Promise<DevframeChildProcessTerminalSession>; | ||
| /** | ||
| * Spawn a fully interactive pseudo-terminal (PTY) any plugin can drive: | ||
| * keystrokes via {@link DevframePtyTerminalSession.write}, live layout via | ||
| * {@link DevframePtyTerminalSession.resize}, TUI-capable. The session is | ||
| * marked `interactive`, so a hub-aware terminal UI (e.g. the terminals | ||
| * plugin) surfaces it as writable rather than read-only. Powered by | ||
| * `zigpty` — where its native bindings can't load, it degrades to | ||
| * pipe-based terminal emulation. | ||
| */ | ||
| startPtySession: (executeOptions: DevframePtyExecuteOptions, terminal: Omit<DevframeTerminalSessionBase, 'status'>) => Promise<DevframePtyTerminalSession>; | ||
| } | ||
| type DevframeTerminalStatus = 'running' | 'stopped' | 'error'; | ||
| interface DevframeTerminalSessionBase { | ||
| id: string; | ||
| title: string; | ||
| description?: string; | ||
| status: DevframeTerminalStatus; | ||
| icon?: DevframeDockEntryIcon; | ||
| /** | ||
| * Whether the session accepts input (keystrokes + resize). `true` for | ||
| * {@link DevframeTerminalsHost.startPtySession} sessions; absent/`false` | ||
| * for pipe-backed, output-only ones. A hub-aware terminal UI reads this to | ||
| * decide whether to enable stdin and wire resize. | ||
| */ | ||
| interactive?: boolean; | ||
| /** | ||
| * Whether the session may be restarted in place (re-running its command). | ||
| * Defaults to `true`. Set `false` for sessions whose lifecycle is owned | ||
| * elsewhere — e.g. a one-shot build, or a server (like code-server) that | ||
| * should be restarted through its own controls rather than by re-spawning | ||
| * the raw process. A hub-aware terminal UI hides its restart affordance for | ||
| * these, and `hub:terminals:restart` rejects them. | ||
| */ | ||
| restartable?: boolean; | ||
| } | ||
| interface DevframeTerminalSession extends DevframeTerminalSessionBase { | ||
| buffer?: string[]; | ||
| stream?: ReadableStream<string>; | ||
| } | ||
| interface DevframeChildProcessExecuteOptions { | ||
| command: string; | ||
| args: string[]; | ||
| cwd?: string; | ||
| env?: Record<string, string>; | ||
| } | ||
| /** | ||
| * The settled outcome of a {@link DevframeChildProcessTerminalSession} run — | ||
| * stdout/stderr captured separately (unlike the session's merged display | ||
| * `stream`), plus the process's exit code (`undefined` if it was killed by a | ||
| * signal before exiting). | ||
| */ | ||
| interface DevframeChildProcessOutput { | ||
| stdout: string; | ||
| stderr: string; | ||
| exitCode: number | undefined; | ||
| } | ||
| /** | ||
| * A live handle on a child process's outcome — mirrors the ergonomics of | ||
| * `tinyexec`'s `Result` (a promise-like paired with synchronous accessors) so | ||
| * callers migrating from a `tinyexec`/`execa`-based subprocess API (e.g. | ||
| * Nuxt DevTools' `startSubprocess().getResult()`) can adopt | ||
| * {@link DevframeTerminalsHost.startChildProcess} with minimal changes. | ||
| * `await`ing it (or calling `.then()`) resolves once the process exits, with | ||
| * the full captured {@link DevframeChildProcessOutput}. | ||
| */ | ||
| interface DevframeChildProcessResult extends PromiseLike<DevframeChildProcessOutput> { | ||
| readonly pid: number | undefined; | ||
| /** `undefined` while the process is still running. */ | ||
| readonly exitCode: number | undefined; | ||
| readonly killed: boolean; | ||
| kill: (signal?: NodeJS.Signals | number) => boolean; | ||
| } | ||
| interface DevframeChildProcessTerminalSession extends DevframeTerminalSession { | ||
| type: 'child-process'; | ||
| executeOptions: DevframeChildProcessExecuteOptions; | ||
| getChildProcess: () => ChildProcess | undefined; | ||
| /** | ||
| * Get a live handle on the current run's outcome. Reflects the most recent | ||
| * `restart()` — call it again after restarting to track the new run. | ||
| */ | ||
| getResult: () => DevframeChildProcessResult; | ||
| terminate: () => Promise<void>; | ||
| restart: () => Promise<void>; | ||
| } | ||
| interface DevframePtyExecuteOptions { | ||
| command: string; | ||
| args?: string[]; | ||
| cwd?: string; | ||
| env?: Record<string, string>; | ||
| /** Initial column count. Default: 80. */ | ||
| cols?: number; | ||
| /** Initial row count. Default: 24. */ | ||
| rows?: number; | ||
| } | ||
| interface DevframePtyTerminalSession extends DevframeTerminalSession { | ||
| type: 'pty'; | ||
| interactive: true; | ||
| executeOptions: DevframePtyExecuteOptions; | ||
| /** Send keystrokes / raw input to the PTY. */ | ||
| write: (data: string) => void; | ||
| /** Resize the PTY (emits SIGWINCH so TUIs relayout). */ | ||
| resize: (cols: number, rows: number) => void; | ||
| /** Current foreground process name, when the backend can resolve it. */ | ||
| getProcessName: () => string | undefined; | ||
| terminate: () => Promise<void>; | ||
| restart: () => Promise<void>; | ||
| } | ||
| //#endregion | ||
| //#region src/node/context.d.ts | ||
| declare module 'devframe/types' { | ||
| interface DevframeRpcClientFunctions { | ||
| /** | ||
| * Server→client request to switch the active dock. Broadcast by the hub | ||
| * context in response to `ctx.docks.activate()` (driven by the | ||
| * `hub:docks:activate` RPC). The client host registers a handler that | ||
| * calls its local `switchEntry(dockId)`; the target dock reads | ||
| * `activation.params` to react (e.g. focus a session). Do not register | ||
| * manually. | ||
| * | ||
| * @internal | ||
| */ | ||
| 'devframe:docks:activate': (activation: DevframeDockActivation) => Promise<void>; | ||
| /** | ||
| * Server→client notification that terminal sessions changed. Broadcast | ||
| * by the hub context; a hub-aware client re-reads terminal state in | ||
| * response. Do not register manually. | ||
| * | ||
| * @internal | ||
| */ | ||
| 'devframe:terminals:updated': () => Promise<void>; | ||
| /** | ||
| * Server→client notification that the message list changed. Broadcast | ||
| * by the hub context; a hub-aware client re-reads message state in | ||
| * response. Do not register manually. | ||
| * | ||
| * @internal | ||
| */ | ||
| 'devframe:messages:updated': () => Promise<void>; | ||
| } | ||
| interface DevframeRpcServerFunctions { | ||
| /** | ||
| * Ask the active viewer to switch its focused dock to `dockId`, optionally | ||
| * carrying `params` for the target dock to interpret (e.g. | ||
| * `{ sessionId }` for the terminals dock). Any connected client may call | ||
| * it — a mounted devframe in its own iframe steers the host shell's dock | ||
| * selection. Handled by {@link import('./rpc-builtins').hubDocksActivate}. | ||
| */ | ||
| 'hub:docks:activate': (input: { | ||
| dockId: string; | ||
| params?: Record<string, unknown>; | ||
| }) => Promise<void>; | ||
| /** | ||
| * Invoke a registered server command by id; trailing args are forwarded to | ||
| * the command's handler. Handled by | ||
| * {@link import('./rpc-builtins').hubCommandsExecute}. | ||
| */ | ||
| 'hub:commands:execute': (id: string, ...args: any[]) => Promise<unknown>; | ||
| /** | ||
| * Add a message from a browser client into the hub's messages feed | ||
| * (marked `from: 'browser'`); returns the serializable entry. Handled by | ||
| * {@link import('./rpc-builtins').hubMessagesAdd}. | ||
| */ | ||
| 'hub:messages:add': (input: DevframeMessageEntryInput) => Promise<DevframeMessageEntry>; | ||
| /** Patch a message by id; resolves the updated entry (or `undefined`). */ | ||
| 'hub:messages:update': (id: string, patch: Partial<DevframeMessageEntryInput>) => Promise<DevframeMessageEntry | undefined>; | ||
| /** Remove a message by id. */ | ||
| 'hub:messages:remove': (id: string) => Promise<void>; | ||
| /** Remove every message. */ | ||
| 'hub:messages:clear': () => Promise<void>; | ||
| /** | ||
| * Send input to an interactive PTY session spawned via | ||
| * `ctx.terminals.startPtySession`. Handled by | ||
| * {@link import('./rpc-builtins').hubTerminalsWrite}. | ||
| */ | ||
| 'hub:terminals:write': (id: string, data: string) => Promise<void>; | ||
| /** Resize an interactive PTY session by id. */ | ||
| 'hub:terminals:resize': (id: string, cols: number, rows: number) => Promise<void>; | ||
| } | ||
| } | ||
| /** | ||
| * Hub-augmented node context — extends devframe's framework-neutral | ||
| * `DevframeNodeContext` with the hub-level subsystems (`docks`, | ||
| * `terminals`, `messages`, `commands`) and the deprecated | ||
| * `createJsonRenderer` compatibility factory. | ||
| * | ||
| * Framework kits further extend this with their own slots (e.g. | ||
| * `viteConfig`, `viteServer`). Host-specific capabilities (editor open, | ||
| * filesystem reveal, etc.) ship as kit-registered RPC functions rather | ||
| * than as part of this surface. JSON-render itself is not part of the hub: | ||
| * it is an opt-in integration (`@devframes/json-render`) that augments any | ||
| * devframe context and contributes its own dock type — prefer | ||
| * `createJsonRenderView` from `@devframes/json-render/node` over the | ||
| * deprecated factory below. | ||
| */ | ||
| interface DevframeHubContext extends DevframeNodeContext { | ||
| readonly host: DevframeHost; | ||
| docks: DevframeDocksHost; | ||
| terminals: DevframeTerminalsHost; | ||
| messages: DevframeMessagesHost; | ||
| commands: DevframeCommandsHost; | ||
| /** | ||
| * Create a `JsonRenderer` handle for building json-render powered UIs. | ||
| * | ||
| * @deprecated json-render moved out of the hub into the opt-in | ||
| * `@devframes/json-render` integration in 0.7. This factory is kept | ||
| * working (not just type-compatible) for the 0.7 series so existing call | ||
| * sites don't break — use `createJsonRenderView(ctx, { id, spec })` from | ||
| * `@devframes/json-render/node` instead. Will be removed in 0.8. | ||
| */ | ||
| createJsonRenderer: (spec: JsonRenderSpec) => JsonRenderer; | ||
| } | ||
| /** | ||
| * Options for {@link createHubContext} — devframe's | ||
| * {@link CreateHostContextOptions} plus any hub-level additions kits layer on | ||
| * through declaration merging. | ||
| */ | ||
| interface CreateHubContextOptions extends CreateHostContextOptions {} | ||
| /** | ||
| * Create a hub-level node context: wraps devframe's `createHostContext`, | ||
| * attaches the hub hosts (`docks`, `terminals`, `messages`, `commands`), | ||
| * registers the hub's built-in RPC commands, and wires the shared-state | ||
| * synchronization that powers a hub-aware client UI. | ||
| */ | ||
| declare function createHubContext(options: CreateHubContextOptions): Promise<DevframeHubContext>; | ||
| //#endregion | ||
| export { DevframeMessagesHost as C, DevframeMessagesClient as S, DevframeMessagesListDelta as T, DevframeMessageEntryInput as _, DevframeChildProcessOutput as a, DevframeMessageLevel as b, DevframePtyExecuteOptions as c, DevframeTerminalSessionBase as d, DevframeTerminalStatus as f, DevframeMessageEntryFrom as g, DevframeMessageEntry as h, DevframeChildProcessExecuteOptions as i, DevframePtyTerminalSession as l, DevframeMessageElementPosition as m, DevframeHubContext as n, DevframeChildProcessResult as o, DevframeTerminalsHost as p, createHubContext as r, DevframeChildProcessTerminalSession as s, CreateHubContextOptions as t, DevframeTerminalSession as u, DevframeMessageFilePosition as v, DevframeMessagesLevelShortcuts as w, DevframeMessageShortcutInput as x, DevframeMessageHandle as y }; |
| import "./settings-Bn38f2Yw.mjs"; | ||
| import "./context-cQyL2rge.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 }; |
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
354588
0.38%