@devframes/hub 0.9.6 → 0.9.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
- import { E as DevframeMessagesClient, x as DevframeMessageEntryInput } from "../context-D5JSW_X5.mjs";
2
- import { N as NavTarget, P as RemoteConnectionInfo, S as DevframeDockUserEntry, _ as DevframeDockEntry, a as DevframeCommandEntry, b as DevframeDockEntryIcon, g as DevframeDockEntriesGrouped, k as DevframeViewIframe, n as DevframeClientCommand, p as ClientScriptEntry, s as DevframeCommandKeybinding, t as DevframeDocksUserSettings } from "../settings-D7whfcx2.mjs";
3
- import "../index-DhxIxS-Q.mjs";
1
+ import { C as DevframeMessageEntryInput, O as DevframeMessagesClient } from "../context-BJFGlcf8.mjs";
2
+ import { A as DevframeViewIframe, C as DevframeDockUserEntry, F as RemoteConnectionInfo, P as NavTarget, S as DevframeDockPanelState, _ as DevframeDockEntry, a as DevframeCommandEntry, b as DevframeDockEntryIcon, g as DevframeDockEntriesGrouped, n as DevframeClientCommand, p as ClientScriptEntry, s as DevframeCommandKeybinding, t as DevframeDocksUserSettings } from "../settings-DwxCyeI6.mjs";
3
+ import "../index-OpSX0dK5.mjs";
4
4
  import { DevframeClientRpcHost, DevframeConnection, DevframeConnectionStatus, DevframeRpcClient, DevframeRpcClientOptions, DevframeRpcContext, RpcClientEvents, RpcClientEvents as RpcClientEvents$1 } from "devframe/client";
5
5
  import { EventEmitter } from "devframe/types";
6
6
  import { SharedState } from "devframe/utils/shared-state";
@@ -181,6 +181,27 @@ interface DockSessionStorage {
181
181
  * reload. `null` when the selected dock has no iframe route to remember.
182
182
  */
183
183
  selectedDockRoute: string | null;
184
+ /**
185
+ * The dock entry most recently selected from beyond the float bar's inline
186
+ * capacity — from the overflow popover or from inside a dock group. A hub UI
187
+ * provider raises this entry into a dedicated slot between the bar's visible
188
+ * items and the overflow button, so deselecting it (or selecting a visible
189
+ * neighbour) keeps it one click away instead of folding it straight back
190
+ * into the overflow. `null` (or absent, for stores persisted before this
191
+ * field existed) when no entry has been raised.
192
+ */
193
+ recentDockId?: string | null;
194
+ /**
195
+ * The member most recently opened in each dock group, keyed by group id.
196
+ * Recorded whenever a grouped member is selected (from the group popover,
197
+ * the group sidebar, the command palette, or an RPC activation), and read
198
+ * back when the group is activated again: the remembered member reopens
199
+ * directly, taking precedence over the group's own
200
+ * {@link import('../types/docks').DevframeViewGroup.defaultChildId defaultChildId}.
201
+ * A group is only listed once one of its members has been opened this tab
202
+ * (absent for stores persisted before this field existed).
203
+ */
204
+ groupLastChildIds?: Record<string, string>;
184
205
  }
185
206
  type DockClientType = 'embedded' | 'standalone';
186
207
  interface DocksContext extends DevframeRpcContext {
@@ -239,7 +260,14 @@ interface WhenClauseContext {
239
260
  readonly context: WhenContext;
240
261
  }
241
262
  type DevframeClientContext = DocksContext;
263
+ interface DocksPanelEvents {
264
+ 'panel:state:changed': (panelState: DevframeDockPanelState) => void;
265
+ }
242
266
  interface DocksPanelContext {
267
+ /** The current panel state snapshot. */
268
+ readonly state: DevframeDockPanelState;
269
+ /** Subscribe to panel state changes after the current snapshot. */
270
+ readonly events: EventEmitter<DocksPanelEvents>;
243
271
  store: DockPanelStorage;
244
272
  /**
245
273
  * Per-tab session UI state — whether the panel is open, which dock is
@@ -737,4 +765,4 @@ declare function parseRemoteConnection(input?: string): RemoteConnectionInfo | n
737
765
  */
738
766
  declare function connectRemoteDevframe(options?: ConnectRemoteDevframeOptions): Promise<DevframeRpcClient>;
739
767
  //#endregion
740
- export { CLIENT_CONTEXT_KEY, CommandsContext, ConnectRemoteDevframeOptions, CreateDockRenderersContextOptions, DevframeClientContext, DevframeClientHost, DevframeClientHostOptions, type DevframeClientRpcHost, DevframeClientRuntime, DevframeClientRuntimeOptions, DockClientScriptContext, DockClientType, DockEntryState, DockEntryStateEvents, DockPanelStorage, DockRegistration, DockRenderer, DockRendererInstance, DockRendererManifest, DockRendererMountOptions, DockRendererMountResult, DockRenderersContext, DockSessionStorage, DocksConnectionContext, DocksContext, DocksEntriesContext, DocksPanelContext, FRAME_NAV_CHANNEL, FRAME_NAV_VERSION, FrameLocationHistory, FrameLocationTarget, FrameLocationWindow, FrameNavClient, FrameNavClientOptions, FrameNavEnvelope, FrameNavFrameMessage, FrameNavHostMessage, FrameNavHostPayload, FrameNavListenTarget, FrameTab, MessagesClientOptions, type RpcClientEvents, WatchFrameLocationOptions, WhenClauseContext, attachFrameNavClient, buildRemoteDevframeUrl, clientScriptFailureHint, connectRemoteDevframe, createDevframeClientHost, createDevframeClientRuntime, createDockRenderersContext, createMessagesClient, getDevframeClientContext, parseRemoteConnection, resolveClientModuleSpecifier, resolveDockIcon, resolveDockUrl, setDevframeClientContext, stripRemoteConnectionFromUrl, watchFrameLocation };
768
+ export { CLIENT_CONTEXT_KEY, CommandsContext, ConnectRemoteDevframeOptions, CreateDockRenderersContextOptions, DevframeClientContext, DevframeClientHost, DevframeClientHostOptions, type DevframeClientRpcHost, DevframeClientRuntime, DevframeClientRuntimeOptions, DockClientScriptContext, DockClientType, DockEntryState, DockEntryStateEvents, DockPanelStorage, DockRegistration, DockRenderer, DockRendererInstance, DockRendererManifest, DockRendererMountOptions, DockRendererMountResult, DockRenderersContext, DockSessionStorage, DocksConnectionContext, DocksContext, DocksEntriesContext, DocksPanelContext, DocksPanelEvents, FRAME_NAV_CHANNEL, FRAME_NAV_VERSION, FrameLocationHistory, FrameLocationTarget, FrameLocationWindow, FrameNavClient, FrameNavClientOptions, FrameNavEnvelope, FrameNavFrameMessage, FrameNavHostMessage, FrameNavHostPayload, FrameNavListenTarget, FrameTab, MessagesClientOptions, type RpcClientEvents, WatchFrameLocationOptions, WhenClauseContext, attachFrameNavClient, buildRemoteDevframeUrl, clientScriptFailureHint, connectRemoteDevframe, createDevframeClientHost, createDevframeClientRuntime, createDockRenderersContext, createMessagesClient, getDevframeClientContext, parseRemoteConnection, resolveClientModuleSpecifier, resolveDockIcon, resolveDockUrl, setDevframeClientContext, stripRemoteConnectionFromUrl, watchFrameLocation };
@@ -1,4 +1,4 @@
1
- import { i as DOCK_RENDERERS_STATE_KEY, n as DEFAULT_STATE_USER_SETTINGS, o as HUB_EVENTS, t as DEFAULT_CATEGORIES_ORDER } from "../constants-DrF61GFx.mjs";
1
+ import { i as DOCK_RENDERERS_STATE_KEY, n as DEFAULT_STATE_USER_SETTINGS, o as HUB_EVENTS, t as DEFAULT_CATEGORIES_ORDER } from "../constants-D1zicoJ4.mjs";
2
2
  import { a as resolveClientModuleSpecifier, n as stripRemoteConnectionFromUrl, r as clientScriptFailureHint, t as buildRemoteConnectionUrl } from "../remote-url-Bgc7gtsP.mjs";
3
3
  import { REMOTE_CONNECTION_KEY } from "devframe/constants";
4
4
  import { connectDevframe, getDevframeRpcClient, resolveWsUrl } from "devframe/client";
@@ -833,11 +833,50 @@ function createPanelContext(clientType) {
833
833
  position: "right",
834
834
  inactiveTimeout: 0
835
835
  };
836
+ let open = clientType === "standalone";
837
+ let selectedDockId = null;
838
+ const events = createEventEmitter();
839
+ let panelStateChangePending = false;
840
+ function createDockPanelState() {
841
+ const panelState = { state: open ? "open" : "closed" };
842
+ if (selectedDockId !== null) panelState.selectedDockId = selectedDockId;
843
+ return panelState;
844
+ }
845
+ let previousPanelState = createDockPanelState();
846
+ function schedulePanelStateChange() {
847
+ if (panelStateChangePending) return;
848
+ panelStateChangePending = true;
849
+ queueMicrotask(() => {
850
+ panelStateChangePending = false;
851
+ const panelState = createDockPanelState();
852
+ if (panelState.state === previousPanelState.state && panelState.selectedDockId === previousPanelState.selectedDockId) return;
853
+ previousPanelState = panelState;
854
+ events.emit(HUB_EVENTS.client.docksPanelStateChanged, panelState);
855
+ });
856
+ }
836
857
  return {
858
+ get state() {
859
+ return createDockPanelState();
860
+ },
861
+ events,
837
862
  store,
838
863
  session: {
839
- open: clientType === "standalone",
840
- selectedDockId: null,
864
+ get open() {
865
+ return open;
866
+ },
867
+ set open(nextOpen) {
868
+ if (nextOpen === open) return;
869
+ open = nextOpen;
870
+ schedulePanelStateChange();
871
+ },
872
+ get selectedDockId() {
873
+ return selectedDockId;
874
+ },
875
+ set selectedDockId(nextSelectedDockId) {
876
+ if (nextSelectedDockId === selectedDockId) return;
877
+ selectedDockId = nextSelectedDockId;
878
+ schedulePanelStateChange();
879
+ },
841
880
  selectedDockRoute: null
842
881
  },
843
882
  isDragging: false,
@@ -11,10 +11,9 @@ import { cleanDoubleSlashes, withLeadingSlash, withTrailingSlash } from "ufo";
11
11
  * both places in the same change, and reference `HUB_EVENTS.*` from call sites
12
12
  * instead of re-typing a literal.
13
13
  *
14
- * The `.events` EventEmitter maps in `types/{docks,terminals,messages,commands}.ts`
15
- * and the RPC augmentation interfaces in `node/context.ts` declare these same
16
- * names as type-level keys (a literal is unavoidable in a type position); those
17
- * declarations mirror this map and move with it.
14
+ * The `.events` EventEmitter maps and RPC augmentation interfaces declare these
15
+ * same names as type-level keys (a literal is unavoidable in a type position);
16
+ * those declarations mirror this map and move with it.
18
17
  */
19
18
  const HUB_EVENTS = {
20
19
  /**
@@ -47,6 +46,8 @@ const HUB_EVENTS = {
47
46
  terminalsRestart: "hub:terminals:restart",
48
47
  terminalsRemove: "hub:terminals:remove"
49
48
  },
49
+ /** Client-context events emitted inside the host page. */
50
+ client: { docksPanelStateChanged: "panel:state:changed" },
50
51
  /** Broadcast notifications the server pushes to clients (server → client), `devframe:` prefix. */
51
52
  broadcast: {
52
53
  docksActivate: "devframe:docks:activate",
@@ -1,4 +1,4 @@
1
- import { t as DevframeDocksUserSettings } from "./settings-D7whfcx2.mjs";
1
+ import { t as DevframeDocksUserSettings } from "./settings-DwxCyeI6.mjs";
2
2
  //#region src/events.d.ts
3
3
  /**
4
4
  * Centralized registry of every event, broadcast, RPC method, shared-state
@@ -11,10 +11,9 @@ import { t as DevframeDocksUserSettings } from "./settings-D7whfcx2.mjs";
11
11
  * both places in the same change, and reference `HUB_EVENTS.*` from call sites
12
12
  * instead of re-typing a literal.
13
13
  *
14
- * The `.events` EventEmitter maps in `types/{docks,terminals,messages,commands}.ts`
15
- * and the RPC augmentation interfaces in `node/context.ts` declare these same
16
- * names as type-level keys (a literal is unavoidable in a type position); those
17
- * declarations mirror this map and move with it.
14
+ * The `.events` EventEmitter maps and RPC augmentation interfaces declare these
15
+ * same names as type-level keys (a literal is unavoidable in a type position);
16
+ * those declarations mirror this map and move with it.
18
17
  */
19
18
  declare const HUB_EVENTS: {
20
19
  /**
@@ -47,6 +46,10 @@ declare const HUB_EVENTS: {
47
46
  readonly terminalsRestart: "hub:terminals:restart";
48
47
  readonly terminalsRemove: "hub:terminals:remove";
49
48
  };
49
+ /** Client-context events emitted inside the host page. */
50
+ readonly client: {
51
+ readonly docksPanelStateChanged: "panel:state:changed";
52
+ };
50
53
  /** Broadcast notifications the server pushes to clients (server → client), `devframe:` prefix. */
51
54
  readonly broadcast: {
52
55
  readonly docksActivate: "devframe:docks:activate";
@@ -1,3 +1,3 @@
1
- import { a as normalizeHubBase, i as DOCK_RENDERERS_STATE_KEY, n as DEFAULT_STATE_USER_SETTINGS, o as HUB_EVENTS, r as DEVFRAMES_HUB_BASE, t as DEFAULT_CATEGORIES_ORDER } from "./constants-C5t0DeZ0.mjs";
1
+ import { a as normalizeHubBase, i as DOCK_RENDERERS_STATE_KEY, n as DEFAULT_STATE_USER_SETTINGS, o as HUB_EVENTS, r as DEVFRAMES_HUB_BASE, t as DEFAULT_CATEGORIES_ORDER } from "./constants-DJrPlLi0.mjs";
2
2
  export * from "devframe/constants";
3
3
  export { DEFAULT_CATEGORIES_ORDER, DEFAULT_STATE_USER_SETTINGS, DEVFRAMES_HUB_BASE, DOCK_RENDERERS_STATE_KEY, HUB_EVENTS, normalizeHubBase };
@@ -1,3 +1,3 @@
1
- import { a as normalizeHubBase, i as DOCK_RENDERERS_STATE_KEY, n as DEFAULT_STATE_USER_SETTINGS, o as HUB_EVENTS, r as DEVFRAMES_HUB_BASE, t as DEFAULT_CATEGORIES_ORDER } from "./constants-DrF61GFx.mjs";
1
+ import { a as normalizeHubBase, i as DOCK_RENDERERS_STATE_KEY, n as DEFAULT_STATE_USER_SETTINGS, o as HUB_EVENTS, r as DEVFRAMES_HUB_BASE, t as DEFAULT_CATEGORIES_ORDER } from "./constants-D1zicoJ4.mjs";
2
2
  export * from "devframe/constants";
3
3
  export { DEFAULT_CATEGORIES_ORDER, DEFAULT_STATE_USER_SETTINGS, DEVFRAMES_HUB_BASE, DOCK_RENDERERS_STATE_KEY, HUB_EVENTS, normalizeHubBase };
@@ -1,4 +1,4 @@
1
- import { b as DevframeDockEntryIcon, k as DevframeViewIframe, l as DevframeCommandsHost, m as DevframeDockActivation, w as DevframeDocksHost } from "./settings-D7whfcx2.mjs";
1
+ import { A as DevframeViewIframe, T as DevframeDocksHost, b as DevframeDockEntryIcon, l as DevframeCommandsHost, m as DevframeDockActivation } from "./settings-DwxCyeI6.mjs";
2
2
  import { CreateHostContextOptions } from "devframe/node";
3
3
  import { DevframeDefinition, DevframeHost, DevframeNodeContext, EventEmitter } from "devframe/types";
4
4
  import { ChildProcess } from "node:child_process";
@@ -351,6 +351,23 @@ interface DevframePtyExecuteOptions {
351
351
  /** Initial row count. Default: 24. */
352
352
  rows?: number;
353
353
  }
354
+ /**
355
+ * The settled outcome of a {@link DevframePtyTerminalSession} run. PTYs merge
356
+ * stdout and stderr into one terminal output stream, so the captured text is
357
+ * exposed as a single `output` value.
358
+ */
359
+ interface DevframePtyOutput {
360
+ output: string;
361
+ exitCode: number | undefined;
362
+ signal: number | undefined;
363
+ }
364
+ /** A live handle on the current PTY run's merged output and process state. */
365
+ interface DevframePtyResult extends PromiseLike<DevframePtyOutput> {
366
+ readonly pid: number | undefined;
367
+ /** `undefined` while the process is running or after a signal kill. */
368
+ readonly exitCode: number | undefined;
369
+ readonly killed: boolean;
370
+ }
354
371
  interface DevframePtyTerminalSession extends DevframeTerminalSession {
355
372
  type: 'pty';
356
373
  interactive: true;
@@ -361,6 +378,11 @@ interface DevframePtyTerminalSession extends DevframeTerminalSession {
361
378
  resize: (cols: number, rows: number) => void;
362
379
  /** Current foreground process name, when the backend can resolve it. */
363
380
  getProcessName: () => string | undefined;
381
+ /**
382
+ * Get a live handle on the current run's outcome. Call it again after
383
+ * `restart()` to track the new run.
384
+ */
385
+ getResult: () => DevframePtyResult;
364
386
  terminate: () => Promise<void>;
365
387
  /** Throws `DF8206` once the session's output stream has closed (after a natural exit or `terminate()`) — drop it with `ctx.terminals.remove(session)` and start a fresh session instead. */
366
388
  restart: () => Promise<void>;
@@ -496,4 +518,4 @@ interface CreateHubContextOptions extends CreateHostContextOptions {}
496
518
  */
497
519
  declare function createHubContext(options: CreateHubContextOptions): Promise<DevframeHubContext>;
498
520
  //#endregion
499
- export { DevframeMessageHandle as C, DevframeMessagesHost as D, DevframeMessagesClient as E, DevframeMessagesLevelShortcuts as O, DevframeMessageFilePosition as S, DevframeMessageShortcutInput as T, DevframeMessageCommandAction as _, DevframeChildProcessExecuteOptions as a, DevframeMessageEntryFrom as b, DevframeChildProcessTerminalSession as c, DevframeTerminalSession as d, DevframeTerminalSessionBase as f, DevframeMessageActivateAction as g, DevframeMessageAction as h, InstallDevframeOptions as i, DevframeMessagesListDelta as k, DevframePtyExecuteOptions as l, DevframeTerminalsHost as m, DevframeHubContext as n, DevframeChildProcessOutput as o, DevframeTerminalStatus as p, createHubContext as r, DevframeChildProcessResult as s, CreateHubContextOptions as t, DevframePtyTerminalSession as u, DevframeMessageElementPosition as v, DevframeMessageLevel as w, DevframeMessageEntryInput as x, DevframeMessageEntry as y };
521
+ export { DevframeMessagesLevelShortcuts as A, DevframeMessageEntryInput as C, DevframeMessageShortcutInput as D, DevframeMessageLevel as E, DevframeMessagesClient as O, DevframeMessageEntryFrom as S, DevframeMessageHandle as T, DevframeMessageAction as _, DevframeChildProcessExecuteOptions as a, DevframeMessageElementPosition as b, DevframeChildProcessTerminalSession as c, DevframePtyResult as d, DevframePtyTerminalSession as f, DevframeTerminalsHost as g, DevframeTerminalStatus as h, InstallDevframeOptions as i, DevframeMessagesListDelta as j, DevframeMessagesHost as k, DevframePtyExecuteOptions as l, DevframeTerminalSessionBase as m, DevframeHubContext as n, DevframeChildProcessOutput as o, DevframeTerminalSession as p, createHubContext as r, DevframeChildProcessResult as s, CreateHubContextOptions as t, DevframePtyOutput as u, DevframeMessageActivateAction as v, DevframeMessageFilePosition as w, DevframeMessageEntry as x, DevframeMessageCommandAction as y };
@@ -1,16 +1,17 @@
1
1
  import { r as defineHubRpcFunction } from "./define-Ceekw2EO.mjs";
2
- import { n as DEFAULT_STATE_USER_SETTINGS, o as HUB_EVENTS } from "./constants-DrF61GFx.mjs";
2
+ import { n as DEFAULT_STATE_USER_SETTINGS, o as HUB_EVENTS } from "./constants-D1zicoJ4.mjs";
3
3
  import { i as isBareModuleSpecifier, t as buildRemoteConnectionUrl } from "./remote-url-Bgc7gtsP.mjs";
4
+ import { joinURL, withTrailingSlash } from "ufo";
4
5
  import { createEventEmitter } from "devframe/utils/events";
5
6
  import { createHostContext, createStorage } from "devframe/node";
6
7
  import { getInternalContext, resolveBasePath } from "devframe/node/hub-internals";
7
8
  import { debounce } from "perfect-debounce";
8
- import { coerceAgentPositionalArgs } from "devframe/internal";
9
+ import { coerceAgentPositionalArgs, resolveClientAssets } from "devframe/internal";
9
10
  import { defineDiagnostics } from "devframe/utils/nostics";
10
- import { join, resolve } from "pathe";
11
+ import { basename, dirname, isAbsolute, join, resolve } from "pathe";
11
12
  import { nanoid } from "devframe/utils/nanoid";
12
13
  import process from "node:process";
13
- import { resolveClientAssets } from "devframe";
14
+ import { existsSync } from "node:fs";
14
15
  //#region src/node/diagnostics.ts
15
16
  const diagnostics = defineDiagnostics({
16
17
  docsBase: "https://devfra.me/errors",
@@ -770,6 +771,8 @@ var DevframeTerminalsHost = class {
770
771
  const rows = executeOptions.rows ?? 24;
771
772
  let controller;
772
773
  let pty;
774
+ let currentResult;
775
+ let killCurrentRun;
773
776
  let runId = 0;
774
777
  let streamClosed = false;
775
778
  let session;
@@ -797,14 +800,14 @@ var DevframeTerminalsHost = class {
797
800
  controller = _controller;
798
801
  },
799
802
  cancel() {
800
- pty?.kill();
803
+ killCurrentRun?.();
801
804
  pty = void 0;
802
805
  closeStream();
803
806
  }
804
807
  });
805
808
  const spawnPty = () => {
806
809
  const currentRun = ++runId;
807
- const proc = spawn(executeOptions.command, executeOptions.args ?? [], {
810
+ const ptyProcess = spawn(executeOptions.command, executeOptions.args ?? [], {
808
811
  name: PTY_TERM_NAME,
809
812
  cols,
810
813
  rows,
@@ -817,16 +820,58 @@ var DevframeTerminalsHost = class {
817
820
  ...executeOptions.env ?? {}
818
821
  }
819
822
  });
820
- proc.onData((data) => {
821
- if (streamClosed || currentRun !== runId) return;
822
- controller?.enqueue(typeof data === "string" ? data : data.toString("utf8"));
823
+ const outputChunks = [];
824
+ let killed = false;
825
+ let settled = false;
826
+ let settledExitCode;
827
+ let resolveOutput;
828
+ const outputPromise = new Promise((resolve) => {
829
+ resolveOutput = resolve;
830
+ });
831
+ const settle = (exitCode, signal) => {
832
+ if (settled) return;
833
+ settled = true;
834
+ killed ||= signal !== 0;
835
+ settledExitCode = killed ? void 0 : exitCode;
836
+ resolveOutput({
837
+ output: outputChunks.join(""),
838
+ exitCode: settledExitCode,
839
+ signal: signal === 0 ? void 0 : signal
840
+ });
841
+ };
842
+ ptyProcess.onData((data) => {
843
+ const text = typeof data === "string" ? data : data.toString("utf8");
844
+ outputChunks.push(text);
845
+ if (!streamClosed && currentRun === runId) controller?.enqueue(text);
823
846
  });
824
- proc.onExit(({ exitCode, signal }) => {
847
+ ptyProcess.onExit(({ exitCode, signal }) => {
848
+ settle(exitCode, signal);
825
849
  if (currentRun !== runId) return;
826
850
  closeStream();
827
- markStatus(signal === 0 && exitCode !== 0 ? "error" : "stopped");
851
+ /**
852
+ * Killed runs and clean exits are stopped. Only a non-killed non-zero exit
853
+ * code is a crash, matching the child-process path.
854
+ */
855
+ markStatus(!killed && exitCode !== 0 ? "error" : "stopped");
828
856
  });
829
- return proc;
857
+ currentResult = {
858
+ get pid() {
859
+ return ptyProcess.pid;
860
+ },
861
+ get exitCode() {
862
+ return killed ? void 0 : ptyProcess.exitCode ?? settledExitCode;
863
+ },
864
+ get killed() {
865
+ return killed;
866
+ },
867
+ then: (onfulfilled, onrejected) => outputPromise.then(onfulfilled, onrejected)
868
+ };
869
+ killCurrentRun = () => {
870
+ if (ptyProcess.exitCode !== null) return;
871
+ killed = true;
872
+ ptyProcess.kill();
873
+ };
874
+ return ptyProcess;
830
875
  };
831
876
  try {
832
877
  pty = spawnPty();
@@ -862,16 +907,27 @@ var DevframeTerminalsHost = class {
862
907
  return;
863
908
  }
864
909
  },
910
+ getResult: () => currentResult,
865
911
  terminate: async () => {
866
- pty?.kill();
912
+ killCurrentRun?.();
867
913
  pty = void 0;
868
914
  closeStream();
869
915
  markStatus("stopped");
870
916
  },
871
917
  restart: async () => {
872
918
  if (streamClosed) throw diagnostics.DF8206({ id: terminal.id });
873
- pty?.kill();
874
- pty = spawnPty();
919
+ killCurrentRun?.();
920
+ killCurrentRun = void 0;
921
+ pty = void 0;
922
+ try {
923
+ pty = spawnPty();
924
+ } catch (error) {
925
+ markStatus("error");
926
+ throw diagnostics.DF8203({
927
+ command: executeOptions.command,
928
+ reason: error instanceof Error ? error.message : String(error)
929
+ });
930
+ }
875
931
  markStatus("running");
876
932
  }
877
933
  };
@@ -894,6 +950,22 @@ function nextAvailableDockId(views, baseId) {
894
950
  return `${baseId}-${n}`;
895
951
  }
896
952
  /**
953
+ * When a dock's `clientScript.importFrom` is an absolute filesystem path, serve
954
+ * its directory under `<base>__page-script/` and rewrite `importFrom` to that
955
+ * URL. A URL or bare specifier (not existing on disk) passes through untouched.
956
+ */
957
+ async function resolvePageScriptClientScript(ctx, clientScript, base) {
958
+ if (!clientScript?.importFrom) return clientScript;
959
+ const { importFrom } = clientScript;
960
+ if (!isAbsolute(importFrom) || !existsSync(importFrom)) return clientScript;
961
+ const scriptBase = withTrailingSlash(joinURL(base, "__page-script"));
962
+ await ctx.host.mountStatic(scriptBase, dirname(importFrom));
963
+ return {
964
+ ...clientScript,
965
+ importFrom: joinURL(scriptBase, basename(importFrom))
966
+ };
967
+ }
968
+ /**
897
969
  * Framework-neutral primitive backing {@link DevframeHubContext.install} —
898
970
  * installs a {@link DevframeDefinition} as a dock inside a hub-aware context:
899
971
  * serves the devframe's SPA at the resolved base path, synthesizes an iframe
@@ -936,6 +1008,12 @@ async function prepareDevframe(ctx, d, options = {}) {
936
1008
  id,
937
1009
  basePath: void 0
938
1010
  }, "hosted"));
1011
+ const dockDefaults = {
1012
+ ...d.dock,
1013
+ ...options.dock
1014
+ };
1015
+ const clientScript = await resolvePageScriptClientScript(ctx, dockDefaults.clientScript, base);
1016
+ if (clientScript) dockDefaults.clientScript = clientScript;
939
1017
  const clientAssets = resolveClientAssets(d);
940
1018
  if (clientAssets) {
941
1019
  if (ctx.host.mountConnectionMeta) await ctx.host.mountConnectionMeta(base);
@@ -951,8 +1029,7 @@ async function prepareDevframe(ctx, d, options = {}) {
951
1029
  id,
952
1030
  title: d.name,
953
1031
  icon: d.icon,
954
- ...d.dock,
955
- ...options.dock,
1032
+ ...dockDefaults,
956
1033
  type: "iframe",
957
1034
  url: base
958
1035
  });
@@ -1,5 +1,5 @@
1
- import "./context-D5JSW_X5.mjs";
2
- import "./settings-D7whfcx2.mjs";
1
+ import "./context-BJFGlcf8.mjs";
2
+ import "./settings-DwxCyeI6.mjs";
3
3
  import { RpcDefinitionsFilter, RpcDefinitionsToFunctions } from "devframe/rpc";
4
4
  import { ConnectionMeta as ConnectionMeta$1, DevframeCapabilities, DevframeDiagnosticsHost, DevframeDiagnosticsLogger, DevframeHost as DevframeHost$1, DevframeNodeRpcSession, DevframeRpcClientFunctions, DevframeRpcServerFunctions, DevframeRpcSharedStates, DevframeViewHost, EventEmitter as EventEmitter$1, EventUnsubscribe, EventsMap, RpcBroadcastOptions, RpcFunctionsHost, RpcSharedStateGetOptions, RpcSharedStateHost, RpcStreamingChannel, RpcStreamingChannelOptions, RpcStreamingHost } from "devframe/types";
5
5
  export { RpcStreamingHost as S, RpcFunctionsHost as _, DevframeHost$1 as a, RpcStreamingChannel as b, DevframeRpcServerFunctions as c, EventEmitter$1 as d, EventUnsubscribe as f, RpcDefinitionsToFunctions as g, RpcDefinitionsFilter as h, DevframeDiagnosticsLogger as i, DevframeRpcSharedStates as l, RpcBroadcastOptions as m, DevframeCapabilities as n, DevframeNodeRpcSession as o, EventsMap as p, DevframeDiagnosticsHost as r, DevframeRpcClientFunctions as s, ConnectionMeta$1 as t, DevframeViewHost as u, RpcSharedStateGetOptions as v, RpcStreamingChannelOptions as x, RpcSharedStateHost as y };
package/dist/index.d.mts CHANGED
@@ -1,6 +1,6 @@
1
- import { C as DevframeMessageHandle, D as DevframeMessagesHost, E as DevframeMessagesClient, O as DevframeMessagesLevelShortcuts, S as DevframeMessageFilePosition, T as DevframeMessageShortcutInput, _ as DevframeMessageCommandAction, a as DevframeChildProcessExecuteOptions, b as DevframeMessageEntryFrom, c as DevframeChildProcessTerminalSession, d as DevframeTerminalSession, f as DevframeTerminalSessionBase, g as DevframeMessageActivateAction, h as DevframeMessageAction, k as DevframeMessagesListDelta, l as DevframePtyExecuteOptions, m as DevframeTerminalsHost, n as DevframeHubContext, o as DevframeChildProcessOutput, p as DevframeTerminalStatus, s as DevframeChildProcessResult, t as CreateHubContextOptions, u as DevframePtyTerminalSession, v as DevframeMessageElementPosition, w as DevframeMessageLevel, x as DevframeMessageEntryInput, y as DevframeMessageEntry } from "./context-D5JSW_X5.mjs";
2
- import { A as DevframeViewLauncher, C as DevframeDocksActiveState, D as DevframeViewCustomRender, E as DevframeViewBuiltin, F as RemoteDockOptions, M as FrameSubTabsConfig, N as NavTarget, O as DevframeViewGroup, P as RemoteConnectionInfo, S as DevframeDockUserEntry, T as DevframeViewAction, _ as DevframeDockEntry, a as DevframeCommandEntry, b as DevframeDockEntryIcon, c as DevframeCommandShortcutOverrides, d as DevframeServerCommandEntry, f as DevframeServerCommandInput, g as DevframeDockEntriesGrouped, h as DevframeDockBadgeVariant, i as DevframeCommandBase, j as DevframeViewLauncherStatus, k as DevframeViewIframe, l as DevframeCommandsHost, m as DevframeDockActivation, n as DevframeClientCommand, o as DevframeCommandHandle, p as ClientScriptEntry, r as DevframeCommandAgentOptions, s as DevframeCommandKeybinding, t as DevframeDocksUserSettings, u as DevframeCommandsHostEvents, v as DevframeDockEntryBase, w as DevframeDocksHost, x as DevframeDockEntryRegistry, y as DevframeDockEntryCategory } from "./settings-D7whfcx2.mjs";
3
- import { S as RpcStreamingHost, _ as RpcFunctionsHost, a as DevframeHost, b as RpcStreamingChannel, c as DevframeRpcServerFunctions, d as EventEmitter, f as EventUnsubscribe, g as RpcDefinitionsToFunctions, h as RpcDefinitionsFilter, i as DevframeDiagnosticsLogger, l as DevframeRpcSharedStates, m as RpcBroadcastOptions, n as DevframeCapabilities, o as DevframeNodeRpcSession, p as EventsMap, r as DevframeDiagnosticsHost, s as DevframeRpcClientFunctions, t as ConnectionMeta, u as DevframeViewHost, v as RpcSharedStateGetOptions, x as RpcStreamingChannelOptions, y as RpcSharedStateHost } from "./index-DhxIxS-Q.mjs";
1
+ import { A as DevframeMessagesLevelShortcuts, C as DevframeMessageEntryInput, D as DevframeMessageShortcutInput, E as DevframeMessageLevel, O as DevframeMessagesClient, S as DevframeMessageEntryFrom, T as DevframeMessageHandle, _ as DevframeMessageAction, a as DevframeChildProcessExecuteOptions, b as DevframeMessageElementPosition, c as DevframeChildProcessTerminalSession, d as DevframePtyResult, f as DevframePtyTerminalSession, g as DevframeTerminalsHost, h as DevframeTerminalStatus, j as DevframeMessagesListDelta, k as DevframeMessagesHost, l as DevframePtyExecuteOptions, m as DevframeTerminalSessionBase, n as DevframeHubContext, o as DevframeChildProcessOutput, p as DevframeTerminalSession, s as DevframeChildProcessResult, t as CreateHubContextOptions, u as DevframePtyOutput, v as DevframeMessageActivateAction, w as DevframeMessageFilePosition, x as DevframeMessageEntry, y as DevframeMessageCommandAction } from "./context-BJFGlcf8.mjs";
2
+ import { A as DevframeViewIframe, C as DevframeDockUserEntry, D as DevframeViewBuiltin, E as DevframeViewAction, F as RemoteConnectionInfo, I as RemoteDockOptions, M as DevframeViewLauncherStatus, N as FrameSubTabsConfig, O as DevframeViewCustomRender, P as NavTarget, S as DevframeDockPanelState, T as DevframeDocksHost, _ as DevframeDockEntry, a as DevframeCommandEntry, b as DevframeDockEntryIcon, c as DevframeCommandShortcutOverrides, d as DevframeServerCommandEntry, f as DevframeServerCommandInput, g as DevframeDockEntriesGrouped, h as DevframeDockBadgeVariant, i as DevframeCommandBase, j as DevframeViewLauncher, k as DevframeViewGroup, l as DevframeCommandsHost, m as DevframeDockActivation, n as DevframeClientCommand, o as DevframeCommandHandle, p as ClientScriptEntry, r as DevframeCommandAgentOptions, s as DevframeCommandKeybinding, t as DevframeDocksUserSettings, u as DevframeCommandsHostEvents, v as DevframeDockEntryBase, w as DevframeDocksActiveState, x as DevframeDockEntryRegistry, y as DevframeDockEntryCategory } from "./settings-DwxCyeI6.mjs";
3
+ import { S as RpcStreamingHost, _ as RpcFunctionsHost, a as DevframeHost, b as RpcStreamingChannel, c as DevframeRpcServerFunctions, d as EventEmitter, f as EventUnsubscribe, g as RpcDefinitionsToFunctions, h as RpcDefinitionsFilter, i as DevframeDiagnosticsLogger, l as DevframeRpcSharedStates, m as RpcBroadcastOptions, n as DevframeCapabilities, o as DevframeNodeRpcSession, p as EventsMap, r as DevframeDiagnosticsHost, s as DevframeRpcClientFunctions, t as ConnectionMeta, u as DevframeViewHost, v as RpcSharedStateGetOptions, x as RpcStreamingChannelOptions, y as RpcSharedStateHost } from "./index-OpSX0dK5.mjs";
4
4
  import { WhenContext, WhenExpression } from "devframe/utils/when";
5
5
  //#region src/define.d.ts
6
6
  declare const defineHubRpcFunction: <NAME extends string, TYPE extends import("devframe/rpc").RpcFunctionType, ARGS extends any[], RETURN = void, const AS extends import("devframe/rpc").RpcArgsSchema | undefined = undefined, const RS extends import("devframe/rpc").RpcReturnSchema | undefined = undefined>(definition: import("devframe/rpc").RpcFunctionDefinition<NAME, TYPE, ARGS, RETURN, AS, RS, DevframeHubContext>) => import("devframe/rpc").RpcFunctionDefinition<NAME, TYPE, ARGS, RETURN, AS, RS, DevframeHubContext>;
@@ -12,4 +12,4 @@ declare function defineDockEntry<const T extends DevframeDockUserEntry, const W
12
12
  visibility?: WhenExpression<WhenContext, V>;
13
13
  }): T;
14
14
  //#endregion
15
- export { type ClientScriptEntry, type ConnectionMeta, type CreateHubContextOptions, type DevframeCapabilities, type DevframeChildProcessExecuteOptions, type DevframeChildProcessOutput, type DevframeChildProcessResult, type DevframeChildProcessTerminalSession, type DevframeClientCommand, type DevframeCommandAgentOptions, type DevframeCommandBase, type DevframeCommandEntry, type DevframeCommandHandle, type DevframeCommandKeybinding, type DevframeCommandShortcutOverrides, type DevframeCommandsHost, type DevframeCommandsHostEvents, type DevframeDiagnosticsHost, type DevframeDiagnosticsLogger, type DevframeDockActivation, type DevframeDockBadgeVariant, 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 DevframeMessageCommandAction, 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 EventEmitter, type EventUnsubscribe, type EventsMap, type FrameSubTabsConfig, type NavTarget, type RemoteConnectionInfo, type RemoteDockOptions, type RpcBroadcastOptions, type RpcDefinitionsFilter, type RpcDefinitionsToFunctions, type RpcFunctionsHost, type RpcSharedStateGetOptions, type RpcSharedStateHost, type RpcStreamingChannel, type RpcStreamingChannelOptions, type RpcStreamingHost, defineCommand, defineDockEntry, defineHubRpcFunction };
15
+ export { type ClientScriptEntry, type ConnectionMeta, type CreateHubContextOptions, type DevframeCapabilities, type DevframeChildProcessExecuteOptions, type DevframeChildProcessOutput, type DevframeChildProcessResult, type DevframeChildProcessTerminalSession, type DevframeClientCommand, type DevframeCommandAgentOptions, type DevframeCommandBase, type DevframeCommandEntry, type DevframeCommandHandle, type DevframeCommandKeybinding, type DevframeCommandShortcutOverrides, type DevframeCommandsHost, type DevframeCommandsHostEvents, type DevframeDiagnosticsHost, type DevframeDiagnosticsLogger, type DevframeDockActivation, type DevframeDockBadgeVariant, type DevframeDockEntriesGrouped, type DevframeDockEntry, type DevframeDockEntryBase, type DevframeDockEntryCategory, type DevframeDockEntryIcon, type DevframeDockEntryRegistry, type DevframeDockPanelState, type DevframeDockUserEntry, type DevframeDocksActiveState, type DevframeDocksHost, type DevframeDocksUserSettings, type DevframeHost, type DevframeHubContext, type DevframeMessageAction, type DevframeMessageActivateAction, type DevframeMessageCommandAction, 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 DevframePtyOutput, type DevframePtyResult, 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 EventEmitter, type EventUnsubscribe, type EventsMap, type FrameSubTabsConfig, type NavTarget, type RemoteConnectionInfo, type RemoteDockOptions, type RpcBroadcastOptions, type RpcDefinitionsFilter, type RpcDefinitionsToFunctions, type RpcFunctionsHost, type RpcSharedStateGetOptions, type RpcSharedStateHost, type RpcStreamingChannel, type RpcStreamingChannelOptions, type RpcStreamingHost, defineCommand, defineDockEntry, defineHubRpcFunction };
@@ -1,5 +1,5 @@
1
- import { C as DevframeMessageHandle, D as DevframeMessagesHost$1, T as DevframeMessageShortcutInput, a as DevframeChildProcessExecuteOptions, c as DevframeChildProcessTerminalSession, d as DevframeTerminalSession, f as DevframeTerminalSessionBase, i as InstallDevframeOptions, k as DevframeMessagesListDelta, l as DevframePtyExecuteOptions, m as DevframeTerminalsHost$1, n as DevframeHubContext, r as createHubContext, t as CreateHubContextOptions, u as DevframePtyTerminalSession, x as DevframeMessageEntryInput, y as DevframeMessageEntry } from "../context-D5JSW_X5.mjs";
2
- import { S as DevframeDockUserEntry, _ as DevframeDockEntry, d as DevframeServerCommandEntry, f as DevframeServerCommandInput, l as DevframeCommandsHost$1, o as DevframeCommandHandle, p as ClientScriptEntry, t as DevframeDocksUserSettings, w as DevframeDocksHost$1 } from "../settings-D7whfcx2.mjs";
1
+ import { C as DevframeMessageEntryInput, D as DevframeMessageShortcutInput, T as DevframeMessageHandle, a as DevframeChildProcessExecuteOptions, c as DevframeChildProcessTerminalSession, f as DevframePtyTerminalSession, g as DevframeTerminalsHost$1, i as InstallDevframeOptions, j as DevframeMessagesListDelta, k as DevframeMessagesHost$1, l as DevframePtyExecuteOptions, m as DevframeTerminalSessionBase, n as DevframeHubContext, p as DevframeTerminalSession, r as createHubContext, t as CreateHubContextOptions, x as DevframeMessageEntry } from "../context-BJFGlcf8.mjs";
2
+ import { C as DevframeDockUserEntry, T as DevframeDocksHost$1, _ as DevframeDockEntry, d as DevframeServerCommandEntry, f as DevframeServerCommandInput, l as DevframeCommandsHost$1, o as DevframeCommandHandle, p as ClientScriptEntry, t as DevframeDocksUserSettings } from "../settings-DwxCyeI6.mjs";
3
3
  import { RpcFunctionDefinitionAny } from "devframe/rpc";
4
4
  import { SharedState } from "devframe/utils/shared-state";
5
5
  //#region src/node/host-commands.d.ts
@@ -1,9 +1,9 @@
1
- import { _ as DevframeDocksHost, a as hubMessagesAdd, c as hubMessagesUpdate, d as hubTerminalsRestart, f as hubTerminalsTerminate, g as DevframeMessagesHost, h as DevframeTerminalsHost, i as hubDocksActivate, l as hubTerminalsRemove, n as builtinHubRpcDeclarations, o as hubMessagesClear, p as hubTerminalsWrite, r as hubCommandsExecute, s as hubMessagesRemove, t as createHubContext, u as hubTerminalsResize, v as DevframeCommandsHost } from "../context-C3hUUCC1.mjs";
1
+ import { _ as DevframeDocksHost, a as hubMessagesAdd, c as hubMessagesUpdate, d as hubTerminalsRestart, f as hubTerminalsTerminate, g as DevframeMessagesHost, h as DevframeTerminalsHost, i as hubDocksActivate, l as hubTerminalsRemove, n as builtinHubRpcDeclarations, o as hubMessagesClear, p as hubTerminalsWrite, r as hubCommandsExecute, s as hubMessagesRemove, t as createHubContext, u as hubTerminalsResize, v as DevframeCommandsHost } from "../context-DYUkd3il.mjs";
2
2
  import "ufo";
3
3
  import "pathe";
4
4
  import "node:process";
5
- import { builtinModules } from "node:module";
6
5
  import "node:fs";
6
+ import { builtinModules } from "node:module";
7
7
  import "node:url";
8
8
  import assert from "node:assert";
9
9
  import "node:path";
@@ -1,5 +1,5 @@
1
- import { i as InstallDevframeOptions, n as DevframeHubContext, t as CreateHubContextOptions } from "../context-D5JSW_X5.mjs";
2
- import { r as DEVFRAMES_HUB_BASE } from "../constants-C5t0DeZ0.mjs";
1
+ import { i as InstallDevframeOptions, n as DevframeHubContext, t as CreateHubContextOptions } from "../context-BJFGlcf8.mjs";
2
+ import { r as DEVFRAMES_HUB_BASE } from "../constants-DJrPlLi0.mjs";
3
3
  import { DevframeInstanceRecord } from "devframe/internal";
4
4
  import { ConnectionMeta, DevframeDefinition, DevframeServiceInput, DevframeSseOptions, DevframeStorageScope, DevframeWsOptions, McpRouteOptions } from "devframe/types";
5
5
  import { DevframeAuthHandler } from "devframe/node/auth";
@@ -1,6 +1,6 @@
1
- import { a as normalizeHubBase, i as DOCK_RENDERERS_STATE_KEY, r as DEVFRAMES_HUB_BASE } from "../constants-DrF61GFx.mjs";
1
+ import { a as normalizeHubBase, i as DOCK_RENDERERS_STATE_KEY, r as DEVFRAMES_HUB_BASE } from "../constants-D1zicoJ4.mjs";
2
2
  import { a as resolveClientModuleSpecifier } from "../remote-url-Bgc7gtsP.mjs";
3
- import { m as prepareDevframe, t as createHubContext, y as diagnostics } from "../context-C3hUUCC1.mjs";
3
+ import { m as prepareDevframe, t as createHubContext, y as diagnostics } from "../context-DYUkd3il.mjs";
4
4
  import { joinURL, withTrailingSlash, withoutLeadingSlash } from "ufo";
5
5
  import { DEVFRAME_CONNECTION_META_FILENAME, DEVFRAME_DOCK_IMPORTS_FILENAME, DEVFRAME_MCP_ROUTE, DEVFRAME_WS_ROUTE } from "devframe/constants";
6
6
  import { createH3DevframeHost, createInstanceShell, importRuntimeModule, resolveInstanceRegister } from "devframe/internal";
@@ -27,6 +27,11 @@ interface DevframeDocksHost {
27
27
  */
28
28
  activate: (dockId: string, params?: Record<string, unknown>) => void;
29
29
  }
30
+ /** Current state of one dock panel in a host page. */
31
+ interface DevframeDockPanelState {
32
+ state: 'open' | 'closed' | 'hidden';
33
+ selectedDockId?: string;
34
+ }
30
35
  /**
31
36
  * A request to switch the active dock. `params` is an opaque, serializable
32
37
  * bag the target dock interprets — the terminals dock reads `params.sessionId`
@@ -630,4 +635,4 @@ interface DevframeDocksUserSettings {
630
635
  commandShortcuts: DevframeCommandShortcutOverrides;
631
636
  }
632
637
  //#endregion
633
- export { DevframeViewLauncher as A, DevframeDocksActiveState as C, DevframeViewCustomRender as D, DevframeViewBuiltin as E, RemoteDockOptions as F, FrameSubTabsConfig as M, NavTarget as N, DevframeViewGroup as O, RemoteConnectionInfo as P, DevframeDockUserEntry as S, DevframeViewAction as T, DevframeDockEntry as _, DevframeCommandEntry as a, DevframeDockEntryIcon as b, DevframeCommandShortcutOverrides as c, DevframeServerCommandEntry as d, DevframeServerCommandInput as f, DevframeDockEntriesGrouped as g, DevframeDockBadgeVariant as h, DevframeCommandBase as i, DevframeViewLauncherStatus as j, DevframeViewIframe as k, DevframeCommandsHost as l, DevframeDockActivation as m, DevframeClientCommand as n, DevframeCommandHandle as o, ClientScriptEntry as p, DevframeCommandAgentOptions as r, DevframeCommandKeybinding as s, DevframeDocksUserSettings as t, DevframeCommandsHostEvents as u, DevframeDockEntryBase as v, DevframeDocksHost as w, DevframeDockEntryRegistry as x, DevframeDockEntryCategory as y };
638
+ export { DevframeViewIframe as A, DevframeDockUserEntry as C, DevframeViewBuiltin as D, DevframeViewAction as E, RemoteConnectionInfo as F, RemoteDockOptions as I, DevframeViewLauncherStatus as M, FrameSubTabsConfig as N, DevframeViewCustomRender as O, NavTarget as P, DevframeDockPanelState as S, DevframeDocksHost as T, DevframeDockEntry as _, DevframeCommandEntry as a, DevframeDockEntryIcon as b, DevframeCommandShortcutOverrides as c, DevframeServerCommandEntry as d, DevframeServerCommandInput as f, DevframeDockEntriesGrouped as g, DevframeDockBadgeVariant as h, DevframeCommandBase as i, DevframeViewLauncher as j, DevframeViewGroup as k, DevframeCommandsHost as l, DevframeDockActivation as m, DevframeClientCommand as n, DevframeCommandHandle as o, ClientScriptEntry as p, DevframeCommandAgentOptions as r, DevframeCommandKeybinding as s, DevframeDocksUserSettings as t, DevframeCommandsHostEvents as u, DevframeDockEntryBase as v, DevframeDocksActiveState as w, DevframeDockEntryRegistry as x, DevframeDockEntryCategory as y };
@@ -1,4 +1,4 @@
1
- import { C as DevframeMessageHandle, D as DevframeMessagesHost, E as DevframeMessagesClient, O as DevframeMessagesLevelShortcuts, S as DevframeMessageFilePosition, T as DevframeMessageShortcutInput, _ as DevframeMessageCommandAction, a as DevframeChildProcessExecuteOptions, b as DevframeMessageEntryFrom, c as DevframeChildProcessTerminalSession, d as DevframeTerminalSession, f as DevframeTerminalSessionBase, g as DevframeMessageActivateAction, h as DevframeMessageAction, k as DevframeMessagesListDelta, l as DevframePtyExecuteOptions, m as DevframeTerminalsHost, n as DevframeHubContext, o as DevframeChildProcessOutput, p as DevframeTerminalStatus, s as DevframeChildProcessResult, t as CreateHubContextOptions, u as DevframePtyTerminalSession, v as DevframeMessageElementPosition, w as DevframeMessageLevel, x as DevframeMessageEntryInput, y as DevframeMessageEntry } from "../context-D5JSW_X5.mjs";
2
- import { A as DevframeViewLauncher, C as DevframeDocksActiveState, D as DevframeViewCustomRender, E as DevframeViewBuiltin, F as RemoteDockOptions, M as FrameSubTabsConfig, N as NavTarget, O as DevframeViewGroup, P as RemoteConnectionInfo, S as DevframeDockUserEntry, T as DevframeViewAction, _ as DevframeDockEntry, a as DevframeCommandEntry, b as DevframeDockEntryIcon, c as DevframeCommandShortcutOverrides, d as DevframeServerCommandEntry, f as DevframeServerCommandInput, g as DevframeDockEntriesGrouped, h as DevframeDockBadgeVariant, i as DevframeCommandBase, j as DevframeViewLauncherStatus, k as DevframeViewIframe, l as DevframeCommandsHost, m as DevframeDockActivation, n as DevframeClientCommand, o as DevframeCommandHandle, p as ClientScriptEntry, r as DevframeCommandAgentOptions, s as DevframeCommandKeybinding, t as DevframeDocksUserSettings, u as DevframeCommandsHostEvents, v as DevframeDockEntryBase, w as DevframeDocksHost, x as DevframeDockEntryRegistry, y as DevframeDockEntryCategory } from "../settings-D7whfcx2.mjs";
3
- import { S as RpcStreamingHost, _ as RpcFunctionsHost, a as DevframeHost, b as RpcStreamingChannel, c as DevframeRpcServerFunctions, d as EventEmitter, f as EventUnsubscribe, g as RpcDefinitionsToFunctions, h as RpcDefinitionsFilter, i as DevframeDiagnosticsLogger, l as DevframeRpcSharedStates, m as RpcBroadcastOptions, n as DevframeCapabilities, o as DevframeNodeRpcSession, p as EventsMap, r as DevframeDiagnosticsHost, s as DevframeRpcClientFunctions, t as ConnectionMeta, u as DevframeViewHost, v as RpcSharedStateGetOptions, x as RpcStreamingChannelOptions, y as RpcSharedStateHost } from "../index-DhxIxS-Q.mjs";
4
- export { ClientScriptEntry, type ConnectionMeta, type CreateHubContextOptions, type DevframeCapabilities, DevframeChildProcessExecuteOptions, DevframeChildProcessOutput, DevframeChildProcessResult, DevframeChildProcessTerminalSession, DevframeClientCommand, DevframeCommandAgentOptions, DevframeCommandBase, DevframeCommandEntry, DevframeCommandHandle, DevframeCommandKeybinding, DevframeCommandShortcutOverrides, DevframeCommandsHost, DevframeCommandsHostEvents, type DevframeDiagnosticsHost, type DevframeDiagnosticsLogger, DevframeDockActivation, DevframeDockBadgeVariant, DevframeDockEntriesGrouped, DevframeDockEntry, DevframeDockEntryBase, DevframeDockEntryCategory, DevframeDockEntryIcon, DevframeDockEntryRegistry, DevframeDockUserEntry, DevframeDocksActiveState, DevframeDocksHost, DevframeDocksUserSettings, type DevframeHost, type DevframeHubContext, DevframeMessageAction, DevframeMessageActivateAction, DevframeMessageCommandAction, 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 EventEmitter, type EventUnsubscribe, type EventsMap, FrameSubTabsConfig, NavTarget, RemoteConnectionInfo, RemoteDockOptions, type RpcBroadcastOptions, type RpcDefinitionsFilter, type RpcDefinitionsToFunctions, type RpcFunctionsHost, type RpcSharedStateGetOptions, type RpcSharedStateHost, type RpcStreamingChannel, type RpcStreamingChannelOptions, type RpcStreamingHost };
1
+ import { A as DevframeMessagesLevelShortcuts, C as DevframeMessageEntryInput, D as DevframeMessageShortcutInput, E as DevframeMessageLevel, O as DevframeMessagesClient, S as DevframeMessageEntryFrom, T as DevframeMessageHandle, _ as DevframeMessageAction, a as DevframeChildProcessExecuteOptions, b as DevframeMessageElementPosition, c as DevframeChildProcessTerminalSession, d as DevframePtyResult, f as DevframePtyTerminalSession, g as DevframeTerminalsHost, h as DevframeTerminalStatus, j as DevframeMessagesListDelta, k as DevframeMessagesHost, l as DevframePtyExecuteOptions, m as DevframeTerminalSessionBase, n as DevframeHubContext, o as DevframeChildProcessOutput, p as DevframeTerminalSession, s as DevframeChildProcessResult, t as CreateHubContextOptions, u as DevframePtyOutput, v as DevframeMessageActivateAction, w as DevframeMessageFilePosition, x as DevframeMessageEntry, y as DevframeMessageCommandAction } from "../context-BJFGlcf8.mjs";
2
+ import { A as DevframeViewIframe, C as DevframeDockUserEntry, D as DevframeViewBuiltin, E as DevframeViewAction, F as RemoteConnectionInfo, I as RemoteDockOptions, M as DevframeViewLauncherStatus, N as FrameSubTabsConfig, O as DevframeViewCustomRender, P as NavTarget, S as DevframeDockPanelState, T as DevframeDocksHost, _ as DevframeDockEntry, a as DevframeCommandEntry, b as DevframeDockEntryIcon, c as DevframeCommandShortcutOverrides, d as DevframeServerCommandEntry, f as DevframeServerCommandInput, g as DevframeDockEntriesGrouped, h as DevframeDockBadgeVariant, i as DevframeCommandBase, j as DevframeViewLauncher, k as DevframeViewGroup, l as DevframeCommandsHost, m as DevframeDockActivation, n as DevframeClientCommand, o as DevframeCommandHandle, p as ClientScriptEntry, r as DevframeCommandAgentOptions, s as DevframeCommandKeybinding, t as DevframeDocksUserSettings, u as DevframeCommandsHostEvents, v as DevframeDockEntryBase, w as DevframeDocksActiveState, x as DevframeDockEntryRegistry, y as DevframeDockEntryCategory } from "../settings-DwxCyeI6.mjs";
3
+ import { S as RpcStreamingHost, _ as RpcFunctionsHost, a as DevframeHost, b as RpcStreamingChannel, c as DevframeRpcServerFunctions, d as EventEmitter, f as EventUnsubscribe, g as RpcDefinitionsToFunctions, h as RpcDefinitionsFilter, i as DevframeDiagnosticsLogger, l as DevframeRpcSharedStates, m as RpcBroadcastOptions, n as DevframeCapabilities, o as DevframeNodeRpcSession, p as EventsMap, r as DevframeDiagnosticsHost, s as DevframeRpcClientFunctions, t as ConnectionMeta, u as DevframeViewHost, v as RpcSharedStateGetOptions, x as RpcStreamingChannelOptions, y as RpcSharedStateHost } from "../index-OpSX0dK5.mjs";
4
+ export { ClientScriptEntry, type ConnectionMeta, type CreateHubContextOptions, type DevframeCapabilities, DevframeChildProcessExecuteOptions, DevframeChildProcessOutput, DevframeChildProcessResult, DevframeChildProcessTerminalSession, DevframeClientCommand, DevframeCommandAgentOptions, DevframeCommandBase, DevframeCommandEntry, DevframeCommandHandle, DevframeCommandKeybinding, DevframeCommandShortcutOverrides, DevframeCommandsHost, DevframeCommandsHostEvents, type DevframeDiagnosticsHost, type DevframeDiagnosticsLogger, DevframeDockActivation, DevframeDockBadgeVariant, DevframeDockEntriesGrouped, DevframeDockEntry, DevframeDockEntryBase, DevframeDockEntryCategory, DevframeDockEntryIcon, DevframeDockEntryRegistry, DevframeDockPanelState, DevframeDockUserEntry, DevframeDocksActiveState, DevframeDocksHost, DevframeDocksUserSettings, type DevframeHost, type DevframeHubContext, DevframeMessageAction, DevframeMessageActivateAction, DevframeMessageCommandAction, DevframeMessageElementPosition, DevframeMessageEntry, DevframeMessageEntryFrom, DevframeMessageEntryInput, DevframeMessageFilePosition, DevframeMessageHandle, DevframeMessageLevel, DevframeMessageShortcutInput, DevframeMessagesClient, DevframeMessagesHost, DevframeMessagesLevelShortcuts, DevframeMessagesListDelta, type DevframeNodeRpcSession, DevframePtyExecuteOptions, DevframePtyOutput, DevframePtyResult, DevframePtyTerminalSession, type DevframeRpcClientFunctions, type DevframeRpcServerFunctions, type DevframeRpcSharedStates, DevframeServerCommandEntry, DevframeServerCommandInput, DevframeTerminalSession, DevframeTerminalSessionBase, DevframeTerminalStatus, DevframeTerminalsHost, DevframeViewAction, DevframeViewBuiltin, DevframeViewCustomRender, DevframeViewGroup, type DevframeViewHost, DevframeViewIframe, DevframeViewLauncher, DevframeViewLauncherStatus, type EventEmitter, type EventUnsubscribe, type EventsMap, FrameSubTabsConfig, NavTarget, RemoteConnectionInfo, RemoteDockOptions, type RpcBroadcastOptions, type RpcDefinitionsFilter, type RpcDefinitionsToFunctions, type RpcFunctionsHost, type RpcSharedStateGetOptions, type RpcSharedStateHost, type RpcStreamingChannel, type RpcStreamingChannelOptions, type RpcStreamingHost };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@devframes/hub",
3
3
  "type": "module",
4
- "version": "0.9.6",
4
+ "version": "0.9.8",
5
5
  "description": "Hub layer that orchestrates devframe docks, terminals, messages, and commands on any host.",
6
6
  "author": "Anthony Fu <anthonyfu117@hotmail.com>",
7
7
  "license": "MIT",
@@ -34,12 +34,12 @@
34
34
  "dist"
35
35
  ],
36
36
  "peerDependencies": {
37
- "devframe": "0.9.6"
37
+ "devframe": "0.9.8"
38
38
  },
39
39
  "dependencies": {
40
40
  "@standard-schema/spec": "^1.1.0",
41
41
  "destr": "^2.0.5",
42
- "h3": "^2.0.1-rc.26",
42
+ "h3": "^2.0.1-rc.29",
43
43
  "pathe": "^2.0.3",
44
44
  "perfect-debounce": "^2.1.0",
45
45
  "tinyexec": "^1.3.0",
@@ -47,12 +47,12 @@
47
47
  "zigpty": "^0.2.1"
48
48
  },
49
49
  "devDependencies": {
50
- "@types/node": "^26.2.0",
50
+ "@types/node": "^26.4.0",
51
+ "devframe": "0.9.8",
51
52
  "get-port-please": "^3.2.0",
52
53
  "mlly": "^1.8.2",
53
54
  "tsdown": "^0.22.14",
54
- "valibot": "^1.4.2",
55
- "devframe": "0.9.6"
55
+ "valibot": "^1.4.2"
56
56
  },
57
57
  "scripts": {
58
58
  "build": "tsdown",