@devframes/hub 0.9.12 → 0.9.16

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,5 +1,5 @@
1
1
  import { a as resolveClientModuleSpecifier } from "./remote-url-UClKLQ5_.mjs";
2
- import { v as prepareDevframe, y as diagnostics } from "./context-nVwOE7i1.mjs";
2
+ import { v as prepareDevframe, y as diagnostics } from "./context-C7AFekjP.mjs";
3
3
  import { joinURL, withTrailingSlash } from "ufo";
4
4
  import { DEVFRAME_CONNECTION_META_FILENAME, DEVFRAME_DOCK_IMPORTS_FILENAME, DEVFRAME_MCP_ROUTE, DEVFRAME_WS_ROUTE } from "devframe/constants";
5
5
  import { existsSync } from "node:fs";
@@ -17,7 +17,7 @@ export * from "devframe/client";
17
17
  * viewer. With neither, it stays unchanged, since a page import map may
18
18
  * still cover it.
19
19
  */
20
- declare function resolveClientModuleSpecifier(specifier: string, options?: {
20
+ export declare function resolveClientModuleSpecifier(specifier: string, options?: {
21
21
  resolveClientModule?: (specifier: string) => string | undefined;
22
22
  template?: string;
23
23
  metaBaseUrl?: string;
@@ -28,13 +28,13 @@ declare function resolveClientModuleSpecifier(specifier: string, options?: {
28
28
  * declared specifier, `specifier` what was actually imported (after
29
29
  * {@link resolveClientModuleSpecifier}).
30
30
  */
31
- declare function clientScriptFailureHint(importFrom: string, specifier: string): string;
31
+ export declare function clientScriptFailureHint(importFrom: string, specifier: string): string;
32
32
  //#endregion
33
33
  //#region src/client/renderers.d.ts
34
34
  /**
35
35
  * Options handed to a dock renderer when the client host mounts a dock entry.
36
36
  */
37
- interface DockRendererMountOptions<Entry extends DevframeDockEntry = DevframeDockEntry> {
37
+ export interface DockRendererMountOptions<Entry extends DevframeDockEntry = DevframeDockEntry> {
38
38
  /** The dock entry being rendered (carries the entry's serializable payload). */
39
39
  entry: Entry;
40
40
  /**
@@ -50,7 +50,7 @@ interface DockRendererMountOptions<Entry extends DevframeDockEntry = DevframeDoc
50
50
  context: DevframeClientContext;
51
51
  }
52
52
  /** A mounted renderer instance the host can tear down. */
53
- interface DockRendererInstance {
53
+ export interface DockRendererInstance {
54
54
  /** Tear down the mounted UI and release its subscriptions. */
55
55
  dispose?: () => void;
56
56
  }
@@ -66,14 +66,14 @@ interface DockRendererInstance {
66
66
  * e.g. `@devframes/json-render/hub` exports
67
67
  * `JsonRenderDockRenderer = DockRenderer<DevframeJsonRenderDockEntry>`.
68
68
  */
69
- type DockRenderer<Entry extends DevframeDockEntry = DevframeDockEntry> = (options: DockRendererMountOptions<Entry>) => DockRendererInstance | Promise<DockRendererInstance>;
69
+ export type DockRenderer<Entry extends DevframeDockEntry = DevframeDockEntry> = (options: DockRendererMountOptions<Entry>) => DockRendererInstance | Promise<DockRendererInstance>;
70
70
  /**
71
71
  * The outcome of {@link DockRenderersContext.mount}. A missing renderer is an
72
72
  * expected, non-exceptional state: a viewer renders its "no renderer for this
73
73
  * dock type" fallback from `missing-renderer`, and its error variant (with a
74
74
  * retry affordance) from `load-error`.
75
75
  */
76
- type DockRendererMountResult = {
76
+ export type DockRendererMountResult = {
77
77
  status: 'mounted';
78
78
  dispose: () => void;
79
79
  } | {
@@ -89,7 +89,7 @@ type DockRendererMountResult = {
89
89
  * hub's renderer manifest) into a container it owns; the host tracks the
90
90
  * instance and disposes it when the entry deactivates.
91
91
  */
92
- interface DockRenderersContext {
92
+ export interface DockRenderersContext {
93
93
  /**
94
94
  * Register a renderer for a dock `type`. Returns an unregister function.
95
95
  * Accepts a renderer narrowed to any specific entry variant (e.g. a
@@ -125,9 +125,9 @@ interface DockRenderersContext {
125
125
  * convention: the module's `importName` export (default `'default'`) is a
126
126
  * ready {@link DockRenderer}.
127
127
  */
128
- type DockRendererManifest = Record<string, ClientScriptEntry>;
128
+ export type DockRendererManifest = Record<string, ClientScriptEntry>;
129
129
  /** Options for {@link createDockRenderersContext}. */
130
- interface CreateDockRenderersContextOptions {
130
+ export interface CreateDockRenderersContextOptions {
131
131
  /** The assembled client context handed to renderers at mount. */
132
132
  context: () => DevframeClientContext;
133
133
  /** Renderers registered locally at boot; these win over manifest modules. */
@@ -148,10 +148,10 @@ interface CreateDockRenderersContextOptions {
148
148
  * (`@devframes/hub-ui`) both delegate here so local-first resolution, lazy
149
149
  * manifest imports, and the typed mount result behave identically everywhere.
150
150
  */
151
- declare function createDockRenderersContext(options: CreateDockRenderersContextOptions): DockRenderersContext;
151
+ export declare function createDockRenderersContext(options: CreateDockRenderersContextOptions): DockRenderersContext;
152
152
  //#endregion
153
153
  //#region src/client/docks.d.ts
154
- interface DockPanelStorage {
154
+ export interface DockPanelStorage {
155
155
  mode: 'float' | 'edge';
156
156
  width: number;
157
157
  height: number;
@@ -170,7 +170,7 @@ interface DockPanelStorage {
170
170
  * the same dev server each keep their own selection rather than fighting over a
171
171
  * shared one. Every field is serializable.
172
172
  */
173
- interface DockSessionStorage {
173
+ export interface DockSessionStorage {
174
174
  /** Whether the dock panel is open. */
175
175
  open: boolean;
176
176
  /** The currently selected dock entry id, or `null` when nothing is open. */
@@ -203,8 +203,8 @@ interface DockSessionStorage {
203
203
  */
204
204
  groupLastChildIds?: Record<string, string>;
205
205
  }
206
- type DockClientType = 'embedded' | 'standalone';
207
- interface DocksContext extends DevframeRpcContext {
206
+ export type DockClientType = 'embedded' | 'standalone';
207
+ export interface DocksContext extends DevframeRpcContext {
208
208
  /**
209
209
  * Type of the client environment
210
210
  *
@@ -241,7 +241,7 @@ interface DocksContext extends DevframeRpcContext {
241
241
  */
242
242
  readonly renderers: DockRenderersContext;
243
243
  }
244
- interface DocksConnectionContext {
244
+ export interface DocksConnectionContext {
245
245
  /** The current connection status. */
246
246
  readonly status: DevframeConnectionStatus;
247
247
  /** The most recent connection-level error, or `null` when healthy. */
@@ -252,18 +252,18 @@ interface DocksConnectionContext {
252
252
  */
253
253
  readonly events: EventEmitter<RpcClientEvents$1>;
254
254
  }
255
- interface WhenClauseContext {
255
+ export interface WhenClauseContext {
256
256
  /**
257
257
  * Get the current when-clause context snapshot.
258
258
  * Returns a reactive object with built-in variables and any custom plugin variables.
259
259
  */
260
260
  readonly context: WhenContext;
261
261
  }
262
- type DevframeClientContext = DocksContext;
263
- interface DocksPanelEvents {
262
+ export type DevframeClientContext = DocksContext;
263
+ export interface DocksPanelEvents {
264
264
  'panel:state:changed': (panelState: DevframeDockPanelState) => void;
265
265
  }
266
- interface DocksPanelContext {
266
+ export interface DocksPanelContext {
267
267
  /** The current panel state snapshot. */
268
268
  readonly state: DevframeDockPanelState;
269
269
  /** Subscribe to panel state changes after the current snapshot. */
@@ -289,7 +289,7 @@ interface DocksPanelContext {
289
289
  */
290
290
  consumeBootRoute?: (id: string) => string | null;
291
291
  }
292
- interface DocksEntriesContext {
292
+ export interface DocksEntriesContext {
293
293
  selectedId: string | null;
294
294
  selectedRoute: string | null;
295
295
  readonly selected: DevframeDockEntry | null;
@@ -341,7 +341,7 @@ interface DocksEntriesContext {
341
341
  */
342
342
  update: (entry: DevframeDockUserEntry) => void;
343
343
  }
344
- interface DockRegistration<T extends DevframeDockEntry = DevframeDockEntry> {
344
+ export interface DockRegistration<T extends DevframeDockEntry = DevframeDockEntry> {
345
345
  /**
346
346
  * Patch the registered client dock in place. The `id` is immutable, so passing
347
347
  * a differing `id` throws.
@@ -350,7 +350,7 @@ interface DockRegistration<T extends DevframeDockEntry = DevframeDockEntry> {
350
350
  /** Remove the client dock from the local merge. */
351
351
  dispose: () => void;
352
352
  }
353
- interface DockEntryState {
353
+ export interface DockEntryState {
354
354
  entryMeta: DevframeDockEntry;
355
355
  readonly isActive: boolean;
356
356
  domElements: {
@@ -359,14 +359,14 @@ interface DockEntryState {
359
359
  };
360
360
  events: EventEmitter<DockEntryStateEvents>;
361
361
  }
362
- interface DockEntryStateEvents {
362
+ export interface DockEntryStateEvents {
363
363
  'entry:activated': () => void;
364
364
  'entry:deactivated': () => void;
365
365
  'entry:updated': (newMeta: DevframeDockUserEntry) => void;
366
366
  'dom:panel:mounted': (panel: HTMLDivElement) => void;
367
367
  'dom:iframe:mounted': (iframe: HTMLIFrameElement) => void;
368
368
  }
369
- interface CommandsContext {
369
+ export interface CommandsContext {
370
370
  /**
371
371
  * All commands (server + client)
372
372
  */
@@ -415,7 +415,7 @@ interface CommandsContext {
415
415
  /**
416
416
  * Context for client scripts running in dock entries
417
417
  */
418
- interface DockClientScriptContext extends DocksContext {
418
+ export interface DockClientScriptContext extends DocksContext {
419
419
  /**
420
420
  * The state of the current dock entry
421
421
  */
@@ -432,13 +432,13 @@ declare const CLIENT_CONTEXT_KEY = "__DEVFRAME_HUB_CLIENT_CONTEXT__";
432
432
  /**
433
433
  * Get the global Devframe client context, or `undefined` if not yet initialized.
434
434
  */
435
- declare function getDevframeClientContext(): DevframeClientContext | undefined;
435
+ export declare function getDevframeClientContext(): DevframeClientContext | undefined;
436
436
  /**
437
437
  * Publish the global Devframe client context (or clear it with `undefined`).
438
438
  * Called by {@link import('./host').createDevframeClientRuntime}; a dock client
439
439
  * script or a hub UI provider reads it back with {@link getDevframeClientContext}.
440
440
  */
441
- declare function setDevframeClientContext(ctx: DevframeClientContext | undefined): void;
441
+ export declare function setDevframeClientContext(ctx: DevframeClientContext | undefined): void;
442
442
  //#endregion
443
443
  //#region src/client/dock-resources.d.ts
444
444
  /**
@@ -446,9 +446,9 @@ declare function setDevframeClientContext(ctx: DevframeClientContext | undefined
446
446
  * dock entry. This keeps root-relative and dot-relative paths on the host
447
447
  * server when an external viewer renders the hub.
448
448
  */
449
- declare function resolveDockUrl(url: string, connection: DevframeConnection): string;
449
+ export declare function resolveDockUrl(url: string, connection: DevframeConnection): string;
450
450
  /** Resolve URL-backed dock icons while preserving Iconify names and data URLs. */
451
- declare function resolveDockIcon(icon: DevframeDockEntryIcon, connection: DevframeConnection): DevframeDockEntryIcon;
451
+ export declare function resolveDockIcon(icon: DevframeDockEntryIcon, connection: DevframeConnection): DevframeDockEntryIcon;
452
452
  //#endregion
453
453
  //#region src/client/frame-location.d.ts
454
454
  /**
@@ -481,12 +481,12 @@ declare function resolveDockIcon(icon: DevframeDockEntryIcon, connection: Devfra
481
481
  * so the caller keeps the last URL it knew.
482
482
  */
483
483
  /** The minimal `history` surface the watcher wraps. Injectable for tests. */
484
- interface FrameLocationHistory {
484
+ export interface FrameLocationHistory {
485
485
  pushState: (...args: any[]) => void;
486
486
  replaceState: (...args: any[]) => void;
487
487
  }
488
488
  /** The minimal frame-window surface the watcher reads and subscribes to. */
489
- interface FrameLocationWindow {
489
+ export interface FrameLocationWindow {
490
490
  readonly location: {
491
491
  readonly href: string;
492
492
  };
@@ -500,12 +500,12 @@ interface FrameLocationWindow {
500
500
  removeEventListener: (type: 'popstate' | 'hashchange', listener: () => void) => void;
501
501
  }
502
502
  /** The minimal iframe surface the watcher needs. Injectable for tests. */
503
- interface FrameLocationTarget {
503
+ export interface FrameLocationTarget {
504
504
  readonly contentWindow: FrameLocationWindow | null;
505
505
  addEventListener: (type: 'load', listener: () => void) => void;
506
506
  removeEventListener: (type: 'load', listener: () => void) => void;
507
507
  }
508
- interface WatchFrameLocationOptions {
508
+ export interface WatchFrameLocationOptions {
509
509
  /** The live iframe whose location is tracked. */
510
510
  iframe: FrameLocationTarget;
511
511
  /** Called with the frame's `location.href` on each observed change. */
@@ -521,7 +521,7 @@ interface WatchFrameLocationOptions {
521
521
  * detaches every listener and restores any wrapped `history` method, leaving the
522
522
  * embedded page as it was found.
523
523
  */
524
- declare function watchFrameLocation(options: WatchFrameLocationOptions): () => void;
524
+ export declare function watchFrameLocation(options: WatchFrameLocationOptions): () => void;
525
525
  //#endregion
526
526
  //#region src/client/frame-nav.d.ts
527
527
  /**
@@ -544,11 +544,11 @@ declare function watchFrameLocation(options: WatchFrameLocationOptions): () => v
544
544
  * decoupled, so the embedded app takes no hub/RPC dependency, only the shim.
545
545
  */
546
546
  /** `postMessage` channel tag shared by both halves of the protocol. */
547
- declare const FRAME_NAV_CHANNEL: string;
547
+ export declare const FRAME_NAV_CHANNEL: string;
548
548
  /** Protocol version. */
549
- declare const FRAME_NAV_VERSION = 1;
549
+ export declare const FRAME_NAV_VERSION = 1;
550
550
  /** Envelope every frame-nav message carries. */
551
- interface FrameNavEnvelope {
551
+ export interface FrameNavEnvelope {
552
552
  channel: typeof FRAME_NAV_CHANNEL;
553
553
  v: typeof FRAME_NAV_VERSION;
554
554
  frameId: string;
@@ -559,7 +559,7 @@ interface FrameNavEnvelope {
559
559
  * One tab in the manifest the shim reports. Maps directly onto a dock entry, so
560
560
  * a materialized member dock is first-class.
561
561
  */
562
- interface FrameTab {
562
+ export interface FrameTab {
563
563
  /** Unique within the frame. The member dock id becomes `<frameId>:<id>`. */
564
564
  id: string;
565
565
  title: string;
@@ -579,7 +579,7 @@ interface FrameTab {
579
579
  groupId?: string;
580
580
  }
581
581
  /** Host → frame message payloads (without the {@link FrameNavEnvelope}). */
582
- type FrameNavHostPayload = {
582
+ export type FrameNavHostPayload = {
583
583
  type: 'hello';
584
584
  } | {
585
585
  type: 'navigate';
@@ -587,11 +587,11 @@ type FrameNavHostPayload = {
587
587
  navTarget: NavTarget;
588
588
  };
589
589
  /** Host → frame messages. */
590
- type FrameNavHostMessage = FrameNavEnvelope & {
590
+ export type FrameNavHostMessage = FrameNavEnvelope & {
591
591
  from: 'host';
592
592
  } & FrameNavHostPayload;
593
593
  /** Frame → host messages. */
594
- type FrameNavFrameMessage = FrameNavEnvelope & {
594
+ export type FrameNavFrameMessage = FrameNavEnvelope & {
595
595
  from: 'frame';
596
596
  } & ({
597
597
  type: 'ready';
@@ -607,11 +607,11 @@ type FrameNavFrameMessage = FrameNavEnvelope & {
607
607
  navTarget?: NavTarget;
608
608
  });
609
609
  /** Minimal window surface the adapter listens on (injectable for tests). */
610
- interface FrameNavListenTarget {
610
+ export interface FrameNavListenTarget {
611
611
  addEventListener: (type: 'message', listener: (ev: MessageEvent) => void) => void;
612
612
  removeEventListener: (type: 'message', listener: (ev: MessageEvent) => void) => void;
613
613
  }
614
- interface FrameNavClientOptions {
614
+ export interface FrameNavClientOptions {
615
615
  /** The shared frame id (defaults to the anchor's, else the anchor id). */
616
616
  frameId: string;
617
617
  /** The anchor iframe dock entry, supplying url/icon/groupId defaults. */
@@ -630,7 +630,7 @@ interface FrameNavClientOptions {
630
630
  /** @default 3000 */
631
631
  handshakeTimeoutMs?: number;
632
632
  }
633
- interface FrameNavClient {
633
+ export interface FrameNavClient {
634
634
  /** Whether the shim has completed its `ready` handshake. */
635
635
  readonly ready: boolean;
636
636
  /** The tab id currently shown in the frame, or `null`. */
@@ -642,10 +642,10 @@ interface FrameNavClient {
642
642
  * exposing readiness/current state and a `dispose()` that removes every member
643
643
  * dock it registered and detaches its listener.
644
644
  */
645
- declare function attachFrameNavClient(options: FrameNavClientOptions): FrameNavClient;
645
+ export declare function attachFrameNavClient(options: FrameNavClientOptions): FrameNavClient;
646
646
  //#endregion
647
647
  //#region src/client/host.d.ts
648
- interface DevframeClientRuntimeOptions {
648
+ export interface DevframeClientRuntimeOptions {
649
649
  /**
650
650
  * An already-connected RPC client. When omitted, one is created via
651
651
  * `connectDevframe(connect)`, so pass `connect.baseURL` to point at the hub's
@@ -707,7 +707,7 @@ interface DevframeClientRuntimeOptions {
707
707
  */
708
708
  categoryOrder?: Record<string, number>;
709
709
  }
710
- interface DevframeClientRuntime {
710
+ export interface DevframeClientRuntime {
711
711
  /** The assembled, globally-registered client context. */
712
712
  context: DevframeClientContext;
713
713
  /** Tear down listeners and stop tracking newly-registered client scripts. */
@@ -723,16 +723,16 @@ interface DevframeClientRuntime {
723
723
  * A hub UI provider keeps rendering its own dock UI (reading the same shared state); this
724
724
  * runtime is what gives plugin client scripts a live host context to run in.
725
725
  */
726
- declare function createDevframeClientRuntime(options?: DevframeClientRuntimeOptions): Promise<DevframeClientRuntime>;
726
+ export declare function createDevframeClientRuntime(options?: DevframeClientRuntimeOptions): Promise<DevframeClientRuntime>;
727
727
  /** @deprecated Renamed; use {@link DevframeClientRuntimeOptions}. */
728
- type DevframeClientHostOptions = DevframeClientRuntimeOptions;
728
+ export type DevframeClientHostOptions = DevframeClientRuntimeOptions;
729
729
  /** @deprecated Renamed; use {@link DevframeClientRuntime}. */
730
- type DevframeClientHost = DevframeClientRuntime;
730
+ export type DevframeClientHost = DevframeClientRuntime;
731
731
  /** @deprecated Renamed; use {@link createDevframeClientRuntime}. */
732
- declare const createDevframeClientHost: typeof createDevframeClientRuntime;
732
+ export declare const createDevframeClientHost: typeof createDevframeClientRuntime;
733
733
  //#endregion
734
734
  //#region src/client/messages.d.ts
735
- interface MessagesClientOptions {
735
+ export interface MessagesClientOptions {
736
736
  /**
737
737
  * Default fields merged beneath every `add()` input. The client host passes
738
738
  * `{ category: entry.id }` to scope a dock client script's messages to its
@@ -746,20 +746,20 @@ interface MessagesClientOptions {
746
746
  * returned by `add` proxies `update`/`dismiss` back through the same RPCs, so a
747
747
  * dock client script reports into the very feed the server writes to.
748
748
  */
749
- declare function createMessagesClient(rpc: DevframeRpcClient, options?: MessagesClientOptions): DevframeMessagesClient;
749
+ export declare function createMessagesClient(rpc: DevframeRpcClient, options?: MessagesClientOptions): DevframeMessagesClient;
750
750
  //#endregion
751
751
  //#region src/remote-url.d.ts
752
752
  /** Remove the remote connection descriptor from a URL before displaying or copying it. */
753
- declare function stripRemoteConnectionFromUrl(input: string): string;
753
+ export declare function stripRemoteConnectionFromUrl(input: string): string;
754
754
  //#endregion
755
755
  //#region src/client/remote.d.ts
756
- type ConnectRemoteDevframeOptions = Omit<DevframeRpcClientOptions, 'connectionMeta' | 'authToken'>;
756
+ export type ConnectRemoteDevframeOptions = Omit<DevframeRpcClientOptions, 'connectionMeta' | 'authToken'>;
757
757
  /**
758
758
  * Build an external viewer URL from an existing trusted Devframe connection.
759
759
  * Returns the original URL if the connection has no auth token, does not use
760
760
  * WebSockets, or has an invalid metadata URL.
761
761
  */
762
- declare function buildRemoteDevframeUrl(url: string, connection: DevframeConnection): string;
762
+ export declare function buildRemoteDevframeUrl(url: string, connection: DevframeConnection): string;
763
763
  /**
764
764
  * Parse a {@link RemoteConnectionInfo} descriptor from the current page's URL
765
765
  * (or a provided URL/string). Checks the URL fragment first, then the query.
@@ -767,7 +767,7 @@ declare function buildRemoteDevframeUrl(url: string, connection: DevframeConnect
767
767
  * Returns `null` if no descriptor is present.
768
768
  * Throws if the descriptor is malformed or its schema version is unsupported.
769
769
  */
770
- declare function parseRemoteConnection(input?: string): RemoteConnectionInfo | null;
770
+ export declare function parseRemoteConnection(input?: string): RemoteConnectionInfo | null;
771
771
  /**
772
772
  * One-liner for a hosted Devframe page: reads the connection descriptor from
773
773
  * the current URL and returns a connected {@link DevframeRpcClient}.
@@ -777,6 +777,6 @@ declare function parseRemoteConnection(input?: string): RemoteConnectionInfo | n
777
777
  *
778
778
  * @throws if no descriptor is present in the URL.
779
779
  */
780
- declare function connectRemoteDevframe(options?: ConnectRemoteDevframeOptions): Promise<DevframeRpcClient>;
780
+ export declare function connectRemoteDevframe(options?: ConnectRemoteDevframeOptions): Promise<DevframeRpcClient>;
781
781
  //#endregion
782
- 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 };
782
+ export { CLIENT_CONTEXT_KEY, type DevframeClientRpcHost, type RpcClientEvents };
@@ -129,7 +129,9 @@ function watchFrameLocation(options) {
129
129
  });
130
130
  }
131
131
  detach = () => {
132
- for (const off of listeners) off();
132
+ for (const unsubscribe of listeners) try {
133
+ unsubscribe();
134
+ } catch {}
133
135
  };
134
136
  }
135
137
  function onLoad() {
@@ -769,7 +769,8 @@ var DevframeTerminalsHost = class {
769
769
  const result = await reader.read();
770
770
  if (isDisposed() || result.done) break;
771
771
  sessionBuffer.push(result.value);
772
- if (sessionBuffer.length > TERMINAL_BUFFER_LIMIT) sessionBuffer.splice(0, sessionBuffer.length - TERMINAL_BUFFER_LIMIT);
772
+ if (sessionBuffer.length === 1001) sessionBuffer.shift();
773
+ else if (sessionBuffer.length > TERMINAL_BUFFER_LIMIT) sessionBuffer.splice(0, sessionBuffer.length - TERMINAL_BUFFER_LIMIT);
773
774
  sink?.write(result.value);
774
775
  }
775
776
  if (!isDisposed() && sink && !sink.closed) sink.close();
package/dist/index.d.mts CHANGED
@@ -3,13 +3,13 @@ import { A as DevframeViewIframe, C as DevframeDockUserEntry, D as DevframeViewB
3
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-Dv8iu9St.mjs";
4
4
  import { WhenContext, WhenExpression } from "devframe/utils/when";
5
5
  //#region src/define.d.ts
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>;
7
- declare function defineCommand<const W extends string = ''>(command: Omit<DevframeServerCommandInput, 'when'> & {
6
+ export 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>;
7
+ export declare function defineCommand<const W extends string = ''>(command: Omit<DevframeServerCommandInput, 'when'> & {
8
8
  when?: WhenExpression<WhenContext, W>;
9
9
  }): DevframeServerCommandInput;
10
- declare function defineDockEntry<const T extends DevframeDockUserEntry, const W extends string = '', const V extends string = ''>(entry: Omit<T, 'when' | 'visibility'> & {
10
+ export declare function defineDockEntry<const T extends DevframeDockUserEntry, const W extends string = '', const V extends string = ''>(entry: Omit<T, 'when' | 'visibility'> & {
11
11
  when?: WhenExpression<WhenContext, 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 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 };
15
+ export type { ClientScriptEntry, ConnectionMeta, CreateHubContextOptions, DevframeCapabilities, DevframeChildProcessExecuteOptions, DevframeChildProcessOutput, DevframeChildProcessResult, DevframeChildProcessTerminalSession, DevframeClientCommand, DevframeCommandAgentOptions, DevframeCommandBase, DevframeCommandEntry, DevframeCommandHandle, DevframeCommandKeybinding, DevframeCommandShortcutOverrides, DevframeCommandsHost, DevframeCommandsHostEvents, DevframeDiagnosticsHost, DevframeDiagnosticsLogger, DevframeDockActivation, DevframeDockBadgeVariant, DevframeDockEntriesGrouped, DevframeDockEntry, DevframeDockEntryBase, DevframeDockEntryCategory, DevframeDockEntryIcon, DevframeDockEntryRegistry, DevframeDockPanelState, DevframeDockUserEntry, DevframeDocksActiveState, DevframeDocksHost, DevframeDocksUserSettings, DevframeHost, DevframeHubContext, DevframeMessageAction, DevframeMessageActivateAction, DevframeMessageCommandAction, DevframeMessageElementPosition, DevframeMessageEntry, DevframeMessageEntryFrom, DevframeMessageEntryInput, DevframeMessageFilePosition, DevframeMessageHandle, DevframeMessageLevel, DevframeMessageShortcutInput, DevframeMessagesClient, DevframeMessagesHost, DevframeMessagesLevelShortcuts, DevframeMessagesListDelta, DevframeNodeRpcSession, DevframePtyExecuteOptions, DevframePtyOutput, DevframePtyResult, DevframePtyTerminalSession, DevframeRpcClientFunctions, DevframeRpcServerFunctions, DevframeRpcSharedStates, DevframeServerCommandEntry, DevframeServerCommandInput, DevframeTerminalSession, DevframeTerminalSessionBase, DevframeTerminalStatus, DevframeTerminalsHost, DevframeViewAction, DevframeViewBuiltin, DevframeViewCustomRender, DevframeViewGroup, DevframeViewHost, DevframeViewIframe, DevframeViewLauncher, DevframeViewLauncherStatus, EventEmitter, EventUnsubscribe, EventsMap, FrameSubTabsConfig, NavTarget, RemoteConnectionInfo, RemoteDockOptions, RpcBroadcastOptions, RpcDefinitionsFilter, RpcDefinitionsToFunctions, RpcFunctionsHost, RpcSharedStateGetOptions, RpcSharedStateHost, RpcStreamingChannel, RpcStreamingChannelOptions, RpcStreamingHost };
@@ -2,7 +2,7 @@ import { n as DevframeHubContext, t as CreateHubContextOptions } from "../contex
2
2
  import { DevframeHubUi, DevframesInput, DockRendererRegistration } from "./initiate.mjs";
3
3
  import { DevframeServiceInput, DevframeStorageScope } from "devframe/types";
4
4
  //#region src/node/build.d.ts
5
- interface BuildHubOptions {
5
+ export interface BuildHubOptions {
6
6
  /**
7
7
  * Output directory the hub subtree is written into. It corresponds to the
8
8
  * hub {@link BuildHubOptions.base} at serve time: building with
@@ -91,6 +91,5 @@ interface BuildHubOptions {
91
91
  * Reads work from the baked dump; live writes (messages, terminals, commands
92
92
  * execution) have no server and degrade to no-ops in the clients.
93
93
  */
94
- declare function buildHub(options: BuildHubOptions): Promise<void>;
95
- //#endregion
96
- export { BuildHubOptions, buildHub };
94
+ export declare function buildHub(options: BuildHubOptions): Promise<void>;
95
+ //#endregion
@@ -1,6 +1,6 @@
1
1
  import { a as normalizeHubBase, i as DOCK_RENDERERS_STATE_KEY } from "../constants-Da23JxCZ.mjs";
2
- import { t as createHubContext, y as diagnostics } from "../context-nVwOE7i1.mjs";
3
- import { i as resolveRendererRegistrations, n as renderClientImportsModule, r as resolveDevframesInput, t as mountDevframes } from "../assemble-CbPTcI7d.mjs";
2
+ import { t as createHubContext, y as diagnostics } from "../context-C7AFekjP.mjs";
3
+ import { i as resolveRendererRegistrations, n as renderClientImportsModule, r as resolveDevframesInput, t as mountDevframes } from "../assemble-B-ISfDe5.mjs";
4
4
  import { joinURL } from "ufo";
5
5
  import { DEVFRAME_CONNECTION_META_FILENAME, DEVFRAME_DOCK_IMPORTS_FILENAME } from "devframe/constants";
6
6
  import { existsSync } from "node:fs";
@@ -3,7 +3,7 @@ import { C as DevframeDockUserEntry, T as DevframeDocksHost$1, _ as DevframeDock
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
6
- declare class DevframeCommandsHost implements DevframeCommandsHost$1 {
6
+ export declare class DevframeCommandsHost implements DevframeCommandsHost$1 {
7
7
  readonly context: DevframeHubContext;
8
8
  readonly commands: DevframeCommandsHost$1['commands'];
9
9
  readonly events: DevframeCommandsHost$1['events'];
@@ -34,7 +34,7 @@ declare class DevframeCommandsHost implements DevframeCommandsHost$1 {
34
34
  }
35
35
  //#endregion
36
36
  //#region src/node/host-docks.d.ts
37
- declare class DevframeDocksHost implements DevframeDocksHost$1 {
37
+ export declare class DevframeDocksHost implements DevframeDocksHost$1 {
38
38
  readonly context: DevframeHubContext;
39
39
  readonly views: DevframeDocksHost$1['views'];
40
40
  readonly events: DevframeDocksHost$1['events'];
@@ -64,7 +64,7 @@ declare class DevframeDocksHost implements DevframeDocksHost$1 {
64
64
  }
65
65
  //#endregion
66
66
  //#region src/node/host-messages.d.ts
67
- declare class DevframeMessagesHost implements DevframeMessagesHost$1 {
67
+ export declare class DevframeMessagesHost implements DevframeMessagesHost$1 {
68
68
  readonly context: DevframeHubContext;
69
69
  readonly entries: DevframeMessagesHost$1['entries'];
70
70
  readonly events: DevframeMessagesHost$1['events'];
@@ -105,7 +105,7 @@ type PartialWithoutId<T extends {
105
105
  }> = Partial<T> & {
106
106
  id: string;
107
107
  };
108
- declare class DevframeTerminalsHost implements DevframeTerminalsHost$1 {
108
+ export declare class DevframeTerminalsHost implements DevframeTerminalsHost$1 {
109
109
  readonly context: DevframeHubContext;
110
110
  readonly sessions: DevframeTerminalsHost$1['sessions'];
111
111
  readonly events: DevframeTerminalsHost$1['events'];
@@ -144,7 +144,7 @@ declare class DevframeTerminalsHost implements DevframeTerminalsHost$1 {
144
144
  * Pairs with the `devframe:commands` shared state: clients read the list
145
145
  * from the shared state and dispatch by id via this RPC.
146
146
  */
147
- declare const hubCommandsExecute: {
147
+ export declare const hubCommandsExecute: {
148
148
  name: "hub:commands:execute";
149
149
  type?: "action" | undefined;
150
150
  cacheable?: boolean;
@@ -168,7 +168,7 @@ declare const hubCommandsExecute: {
168
168
  * context, whose `messages` client dispatches through these built-ins so a
169
169
  * dock client script can report into the same feed the server writes to.
170
170
  */
171
- declare const hubMessagesAdd: {
171
+ export declare const hubMessagesAdd: {
172
172
  name: "hub:messages:add";
173
173
  type?: "action" | undefined;
174
174
  cacheable?: boolean;
@@ -184,7 +184,7 @@ declare const hubMessagesAdd: {
184
184
  __promise?: import("devframe/rpc").Thenable<import("devframe/rpc").RpcFunctionSetupResult<[input: DevframeMessageEntryInput], Promise<DevframeMessageEntry>>> | undefined;
185
185
  };
186
186
  /** `hub:messages:update`: Patch a message by id; returns the updated entry (or `undefined`). */
187
- declare const hubMessagesUpdate: {
187
+ export declare const hubMessagesUpdate: {
188
188
  name: "hub:messages:update";
189
189
  type?: "action" | undefined;
190
190
  cacheable?: boolean;
@@ -200,7 +200,7 @@ declare const hubMessagesUpdate: {
200
200
  __promise?: import("devframe/rpc").Thenable<import("devframe/rpc").RpcFunctionSetupResult<[id: string, patch: Partial<DevframeMessageEntryInput>], Promise<DevframeMessageEntry | undefined>>> | undefined;
201
201
  };
202
202
  /** `hub:messages:remove`: Remove a message by id. */
203
- declare const hubMessagesRemove: {
203
+ export declare const hubMessagesRemove: {
204
204
  name: "hub:messages:remove";
205
205
  type?: "action" | undefined;
206
206
  cacheable?: boolean;
@@ -216,7 +216,7 @@ declare const hubMessagesRemove: {
216
216
  __promise?: import("devframe/rpc").Thenable<import("devframe/rpc").RpcFunctionSetupResult<[id: string], Promise<void>>> | undefined;
217
217
  };
218
218
  /** `hub:messages:clear`: Remove every message. */
219
- declare const hubMessagesClear: {
219
+ export declare const hubMessagesClear: {
220
220
  name: "hub:messages:clear";
221
221
  type?: "action" | undefined;
222
222
  cacheable?: boolean;
@@ -236,7 +236,7 @@ declare const hubMessagesClear: {
236
236
  * via `ctx.terminals.startPtySession`. Lets a hub-aware terminal UI (e.g. the
237
237
  * terminals plugin) drive a session owned by another plugin.
238
238
  */
239
- declare const hubTerminalsWrite: {
239
+ export declare const hubTerminalsWrite: {
240
240
  name: "hub:terminals:write";
241
241
  type?: "action" | undefined;
242
242
  cacheable?: boolean;
@@ -252,7 +252,7 @@ declare const hubTerminalsWrite: {
252
252
  __promise?: import("devframe/rpc").Thenable<import("devframe/rpc").RpcFunctionSetupResult<[id: string, data: string], Promise<void>>> | undefined;
253
253
  };
254
254
  /** `hub:terminals:resize`: Resize an interactive PTY session by id. */
255
- declare const hubTerminalsResize: {
255
+ export declare const hubTerminalsResize: {
256
256
  name: "hub:terminals:resize";
257
257
  type?: "action" | undefined;
258
258
  cacheable?: boolean;
@@ -273,7 +273,7 @@ declare const hubTerminalsResize: {
273
273
  * child-process and interactive PTY sessions, letting a hub-aware terminal UI
274
274
  * force-kill a session owned by another plugin.
275
275
  */
276
- declare const hubTerminalsTerminate: {
276
+ export declare const hubTerminalsTerminate: {
277
277
  name: "hub:terminals:terminate";
278
278
  type?: "action" | undefined;
279
279
  cacheable?: boolean;
@@ -293,7 +293,7 @@ declare const hubTerminalsTerminate: {
293
293
  * sessions registered with `restartable: false`, whose lifecycle is owned
294
294
  * elsewhere.
295
295
  */
296
- declare const hubTerminalsRestart: {
296
+ export declare const hubTerminalsRestart: {
297
297
  name: "hub:terminals:restart";
298
298
  type?: "action" | undefined;
299
299
  cacheable?: boolean;
@@ -313,7 +313,7 @@ declare const hubTerminalsRestart: {
313
313
  * and drop it from the registry, disposing its output stream. Lets a hub-aware
314
314
  * terminal UI discard a stopped aggregated session.
315
315
  */
316
- declare const hubTerminalsRemove: {
316
+ export declare const hubTerminalsRemove: {
317
317
  name: "hub:terminals:remove";
318
318
  type?: "action" | undefined;
319
319
  cacheable?: boolean;
@@ -340,7 +340,7 @@ declare const hubTerminalsRemove: {
340
340
  * and mirrors it into the `devframe:docks:active` shared state (a dock that
341
341
  * mounts in response still converges on it).
342
342
  */
343
- declare const hubDocksActivate: {
343
+ export declare const hubDocksActivate: {
344
344
  name: "hub:docks:activate";
345
345
  type?: "action" | undefined;
346
346
  cacheable?: boolean;
@@ -376,7 +376,7 @@ declare const hubDocksActivate: {
376
376
  * array via `CreateHubContextOptions.builtinRpcDeclarations`; the hub's
377
377
  * list is prepended automatically.
378
378
  */
379
- declare const builtinHubRpcDeclarations: readonly RpcFunctionDefinitionAny[];
379
+ export declare const builtinHubRpcDeclarations: readonly RpcFunctionDefinitionAny[];
380
380
  //#endregion
381
381
  //#region src/node/utils.d.ts
382
382
  /**
@@ -386,6 +386,6 @@ declare const builtinHubRpcDeclarations: readonly RpcFunctionDefinitionAny[];
386
386
  *
387
387
  * @experimental Prefer a proper importable module for production use.
388
388
  */
389
- declare function createSimpleClientScript(fn: string | ((ctx: any) => void)): ClientScriptEntry;
389
+ export declare function createSimpleClientScript(fn: string | ((ctx: any) => void)): ClientScriptEntry;
390
390
  //#endregion
391
- export { CreateHubContextOptions, DevframeCommandsHost, DevframeDocksHost, DevframeHubContext, DevframeMessagesHost, DevframeTerminalsHost, HubMountedFrame, type InstallDevframeOptions, builtinHubRpcDeclarations, createHubContext, createSimpleClientScript, hubCommandsExecute, hubDocksActivate, hubMessagesAdd, hubMessagesClear, hubMessagesRemove, hubMessagesUpdate, hubTerminalsRemove, hubTerminalsResize, hubTerminalsRestart, hubTerminalsTerminate, hubTerminalsWrite };
391
+ export { CreateHubContextOptions, DevframeHubContext, HubMountedFrame, type InstallDevframeOptions, createHubContext };
@@ -1,4 +1,4 @@
1
- import { _ as DevframeCommandsHost, a as hubMessagesAdd, c as hubMessagesUpdate, d as hubTerminalsRestart, f as hubTerminalsTerminate, g as DevframeDocksHost, h as DevframeMessagesHost, i as hubDocksActivate, l as hubTerminalsRemove, m as DevframeTerminalsHost, n as builtinHubRpcDeclarations, o as hubMessagesClear, p as hubTerminalsWrite, r as hubCommandsExecute, s as hubMessagesRemove, t as createHubContext, u as hubTerminalsResize } from "../context-nVwOE7i1.mjs";
1
+ import { _ as DevframeCommandsHost, a as hubMessagesAdd, c as hubMessagesUpdate, d as hubTerminalsRestart, f as hubTerminalsTerminate, g as DevframeDocksHost, h as DevframeMessagesHost, i as hubDocksActivate, l as hubTerminalsRemove, m as DevframeTerminalsHost, n as builtinHubRpcDeclarations, o as hubMessagesClear, p as hubTerminalsWrite, r as hubCommandsExecute, s as hubMessagesRemove, t as createHubContext, u as hubTerminalsResize } from "../context-C7AFekjP.mjs";
2
2
  import "ufo";
3
3
  import "node:fs";
4
4
  import "node:process";
@@ -10,7 +10,7 @@ import { IncomingMessage, Server, ServerResponse } from "node:http";
10
10
  import { Duplex } from "node:stream";
11
11
  //#region src/node/initiate.d.ts
12
12
  /** A `devframes` entry with per-mount dock customization. */
13
- interface HubDevframeEntry {
13
+ export interface HubDevframeEntry {
14
14
  devframe: DevframeDefinition;
15
15
  /** Per-mount overrides for the auto-synthesized iframe dock entry. */
16
16
  dock?: InstallDevframeOptions['dock'];
@@ -31,7 +31,7 @@ type Arrayable<T> = T | readonly T[];
31
31
  * returning this shape, e.g. `jsonRenderUiRenderer()` from
32
32
  * `@devframes/json-render-ui/hub`.
33
33
  */
34
- interface DockRendererRegistration {
34
+ export interface DockRendererRegistration {
35
35
  /** Dock `type` this renderer handles (e.g. `'json-render'`). */
36
36
  type: string;
37
37
  /** Absolute path of the prebuilt, self-contained browser ES module. */
@@ -50,7 +50,7 @@ interface DockRendererRegistration {
50
50
  * Vite DevTools or any community viewer supplies its own object to the same
51
51
  * slot and reuses all the infrastructure.
52
52
  */
53
- interface DevframeHubUi {
53
+ export interface DevframeHubUi {
54
54
  /**
55
55
  * A standalone viewer SPA (built with relative asset paths) served at the
56
56
  * hub base itself; open `<base>` in a tab and the devtools are there.
@@ -99,8 +99,8 @@ interface DevframeHubUi {
99
99
  */
100
100
  authBanner?: AuthBannerFunction;
101
101
  }
102
- type DevframesInput = Array<DevframeDefinition | HubDevframeEntry | Thenable<Arrayable<DevframeDefinition | HubDevframeEntry | null | undefined>> | (() => Thenable<Arrayable<DevframeDefinition | HubDevframeEntry | null | undefined>>)>;
103
- interface InitHubOptions {
102
+ export type DevframesInput = Array<DevframeDefinition | HubDevframeEntry | Thenable<Arrayable<DevframeDefinition | HubDevframeEntry | null | undefined>> | (() => Thenable<Arrayable<DevframeDefinition | HubDevframeEntry | null | undefined>>)>;
103
+ export interface InitHubOptions {
104
104
  /**
105
105
  * Name for the hub instance, used in logs and diagnostics, and mcp server.
106
106
  */
@@ -256,7 +256,7 @@ interface InitHubOptions {
256
256
  /** Destroy off-route upgrades on a shared `server` devframe's adapter owns outright. */
257
257
  destroyUnmatchedUpgrades?: boolean;
258
258
  }
259
- interface HubInstance {
259
+ export interface HubInstance {
260
260
  /**
261
261
  * The normalized mount base this hub answers under (leading and trailing
262
262
  * slash, e.g. `/__devframes/`). Reference it when wiring the mount (route
@@ -309,6 +309,6 @@ interface HubInstance {
309
309
  * {@link InitHubOptions.ws}), or waits for the host to hand upgrades over
310
310
  * through {@link HubInstance.attach}.
311
311
  */
312
- declare function initHub(options: InitHubOptions): HubInstance;
312
+ export declare function initHub(options: InitHubOptions): HubInstance;
313
313
  //#endregion
314
- export { DEVFRAMES_HUB_BASE, DevframeHubUi, DevframesInput, DockRendererRegistration, HubDevframeEntry, HubInstance, InitHubOptions, initHub };
314
+ export { DEVFRAMES_HUB_BASE };
@@ -1,6 +1,6 @@
1
1
  import { a as normalizeHubBase, i as DOCK_RENDERERS_STATE_KEY, r as DEVFRAMES_HUB_BASE } from "../constants-Da23JxCZ.mjs";
2
- import { t as createHubContext, y as diagnostics } from "../context-nVwOE7i1.mjs";
3
- import { i as resolveRendererRegistrations, n as renderClientImportsModule, r as resolveDevframesInput, t as mountDevframes } from "../assemble-CbPTcI7d.mjs";
2
+ import { t as createHubContext, y as diagnostics } from "../context-C7AFekjP.mjs";
3
+ import { i as resolveRendererRegistrations, n as renderClientImportsModule, r as resolveDevframesInput, t as mountDevframes } from "../assemble-B-ISfDe5.mjs";
4
4
  import { joinURL, withoutLeadingSlash } from "ufo";
5
5
  import { DEVFRAME_CONNECTION_META_FILENAME, DEVFRAME_DOCK_IMPORTS_FILENAME, DEVFRAME_MCP_ROUTE } from "devframe/constants";
6
6
  import { readFile } from "node:fs/promises";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@devframes/hub",
3
3
  "type": "module",
4
- "version": "0.9.12",
4
+ "version": "0.9.16",
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",
@@ -35,24 +35,24 @@
35
35
  "dist"
36
36
  ],
37
37
  "peerDependencies": {
38
- "devframe": "0.9.12"
38
+ "devframe": "0.9.16"
39
39
  },
40
40
  "dependencies": {
41
41
  "@standard-schema/spec": "^1.1.0",
42
42
  "destr": "^2.0.5",
43
- "h3": "^2.0.1-rc.29",
43
+ "h3": "^2.0.1-rc.31",
44
44
  "pathe": "^2.0.3",
45
45
  "perfect-debounce": "^2.1.0",
46
- "tinyexec": "^1.3.0",
46
+ "tinyexec": "^1.3.1",
47
47
  "ufo": "^1.6.4",
48
48
  "zigpty": "^0.2.1"
49
49
  },
50
50
  "devDependencies": {
51
- "@types/node": "^26.4.0",
52
- "devframe": "0.9.12",
51
+ "@types/node": "^26.5.0",
52
+ "devframe": "0.9.16",
53
53
  "get-port-please": "^3.2.0",
54
54
  "mlly": "^1.8.2",
55
- "tsdown": "^0.22.14",
55
+ "tsdown": "^0.23.0",
56
56
  "valibot": "^1.4.2"
57
57
  },
58
58
  "scripts": {