devframe 0.6.2 → 0.7.2

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.
Files changed (57) hide show
  1. package/dist/adapters/build.d.mts +1 -2
  2. package/dist/adapters/build.mjs +1 -1
  3. package/dist/adapters/cac.d.mts +40 -0
  4. package/dist/adapters/cac.mjs +2 -0
  5. package/dist/adapters/cli.d.mts +8 -32
  6. package/dist/adapters/cli.mjs +3 -143
  7. package/dist/adapters/dev.d.mts +3 -4
  8. package/dist/adapters/dev.mjs +1 -1
  9. package/dist/adapters/embedded.d.mts +1 -2
  10. package/dist/adapters/mcp.d.mts +2 -1
  11. package/dist/adapters/mcp.mjs +1 -1
  12. package/dist/{build-server-0jWgMrz-.mjs → build-server-Bo0G5XcS.mjs} +10 -4
  13. package/dist/cac-BFCgKymz.mjs +152 -0
  14. package/dist/client/index.d.mts +90 -6
  15. package/dist/client/index.mjs +150 -8
  16. package/dist/{context-DgkYTlXx.d.mts → context-B1sekkgB.d.mts} +3 -3
  17. package/dist/{dev-DE51PeJc.mjs → dev-Bs4oRVnI.mjs} +2 -2
  18. package/dist/{devframe-CpXy1ZlO.d.mts → devframe-CnTVuGw9.d.mts} +76 -16
  19. package/dist/{dump-D09PZb7T.mjs → dump-CocOVBVz.mjs} +3 -1
  20. package/dist/{hash-PAfnyu2k.mjs → hash-KtDZYXDN.mjs} +5 -2
  21. package/dist/helpers/vite.d.mts +7 -5
  22. package/dist/helpers/vite.mjs +2 -2
  23. package/dist/{http-COX960WK.mjs → http-BirzlyE9.mjs} +1 -1
  24. package/dist/{index-DI_TMGjv.d.mts → index-DgsLFhZg.d.mts} +2 -3
  25. package/dist/{index-DzeFcwMM.d.mts → index-Dpsr-8dD.d.mts} +4 -4
  26. package/dist/{index-BAZpbgHu.d.mts → index-YDSJgsyG.d.mts} +1 -2
  27. package/dist/index.d.mts +5 -5
  28. package/dist/{launch-editor-DIzaS5EG.mjs → launch-editor-C_xuzLnF.mjs} +67 -16
  29. package/dist/node/auth.d.mts +1 -1
  30. package/dist/node/hub-internals.d.mts +2 -3
  31. package/dist/node/index.d.mts +5 -6
  32. package/dist/recipes/interactive-auth.d.mts +2 -3
  33. package/dist/recipes/interactive-auth.mjs +1 -0
  34. package/dist/recipes/open-helpers.d.mts +3 -2
  35. package/dist/recipes/open-helpers.mjs +1 -1
  36. package/dist/rpc/client.d.mts +0 -1
  37. package/dist/rpc/dump.d.mts +1 -1
  38. package/dist/rpc/dump.mjs +1 -1
  39. package/dist/rpc/index.d.mts +2 -2
  40. package/dist/rpc/index.mjs +1 -1
  41. package/dist/rpc/server.d.mts +0 -1
  42. package/dist/rpc/transports/ws-client.d.mts +1 -1
  43. package/dist/rpc/transports/ws-server.d.mts +1 -1
  44. package/dist/{server-C83NJvZp.d.mts → server-4QH37sb-.d.mts} +2 -3
  45. package/dist/types/index.d.mts +4 -4
  46. package/dist/{types-oEqKqUC9.d.mts → types-CrzNxXKq.d.mts} +42 -23
  47. package/dist/utils/events.d.mts +1 -2
  48. package/dist/utils/hash.mjs +1 -1
  49. package/dist/utils/launch-editor.mjs +1 -1
  50. package/dist/utils/serve-static.d.mts +0 -1
  51. package/dist/utils/shared-state.d.mts +1 -1
  52. package/dist/utils/streaming-channel.d.mts +1 -1
  53. package/dist/utils/when.d.mts +1 -330
  54. package/dist/{ws-client-nBjpin71.d.mts → ws-client-DSXiI2h7.d.mts} +1 -2
  55. package/dist/{ws-server-BUgJpdX4.d.mts → ws-server-CceOy6He.d.mts} +1 -2
  56. package/package.json +11 -6
  57. package/skills/devframe/SKILL.md +4 -4
@@ -1,4 +1,4 @@
1
- import { t as hash } from "../hash-PAfnyu2k.mjs";
1
+ import { t as hash } from "../hash-KtDZYXDN.mjs";
2
2
  import { colors } from "../utils/colors.mjs";
3
3
  import { createEventEmitter } from "../utils/events.mjs";
4
4
  import { t as createSharedState } from "../shared-state-QtMas0NG.mjs";
@@ -505,6 +505,8 @@ async function createStaticRpcClientMode(options) {
505
505
  const staticCaller = createStaticRpcCaller(await options.fetchJsonFromBases(DEVFRAME_RPC_DUMP_MANIFEST_FILENAME), options.fetchJsonFromBases);
506
506
  return {
507
507
  isTrusted: true,
508
+ status: "connected",
509
+ connectionError: null,
508
510
  requestTrust: async () => true,
509
511
  requestTrustWithToken: async () => true,
510
512
  requestTrustWithCode: async () => null,
@@ -1857,6 +1859,30 @@ function parseUA(uastringOrExtensions, extensions) {
1857
1859
  };
1858
1860
  }
1859
1861
  //#endregion
1862
+ //#region src/client/connection.ts
1863
+ /**
1864
+ * The error rejected from `rpc.call(...)` (and carried on
1865
+ * `rpc.connectionError`) when a call cannot be served because the connection is
1866
+ * down, the client is unauthorized, or a call timed out. Its `kind` lets a UI
1867
+ * tailor its message and recovery affordance without string-matching.
1868
+ */
1869
+ var DevframeConnectionError = class extends Error {
1870
+ name = "DevframeConnectionError";
1871
+ kind;
1872
+ constructor(kind, message, options) {
1873
+ super(message, options);
1874
+ this.kind = kind;
1875
+ }
1876
+ };
1877
+ /**
1878
+ * Whether a status means calls can be attempted. `connecting` counts because
1879
+ * the transport queues outgoing calls until the socket opens; the terminal
1880
+ * failure states short-circuit calls so a stuck socket never hangs the UI.
1881
+ */
1882
+ function isCallableStatus(status) {
1883
+ return status === "connected" || status === "connecting";
1884
+ }
1885
+ //#endregion
1860
1886
  //#region src/client/rpc-ws.ts
1861
1887
  /**
1862
1888
  * Resolve a {@link ConnectionMeta.websocket} descriptor into a concrete
@@ -1899,10 +1925,65 @@ function resolveWsUrl(websocket, metaBaseUrl, loc) {
1899
1925
  return target.href;
1900
1926
  }
1901
1927
  function createWsRpcClientMode(options) {
1902
- const { authToken, connectionMeta, metaBaseUrl, events, clientRpc, rpcOptions = {}, wsOptions = {} } = options;
1928
+ const { authToken, connectionMeta, metaBaseUrl, events, clientRpc, rpcOptions = {}, wsOptions = {}, callTimeout = 0 } = options;
1903
1929
  let isTrusted = false;
1930
+ let status = "connecting";
1931
+ let connectionError = null;
1904
1932
  const trustedPromise = promiseWithResolver();
1905
1933
  const url = resolveWsUrl(connectionMeta.websocket, metaBaseUrl ?? "./", location);
1934
+ function setStatus(next, error = null) {
1935
+ if (error) connectionError = error;
1936
+ else if (next === "connected") connectionError = null;
1937
+ if (next === status) return;
1938
+ const previous = status;
1939
+ status = next;
1940
+ events.emit("connection:status", next, previous);
1941
+ }
1942
+ const pending = /* @__PURE__ */ new Set();
1943
+ function rejectAllPending(error) {
1944
+ for (const entry of [...pending]) entry.reject(error);
1945
+ }
1946
+ function terminalError() {
1947
+ if (status === "disconnected" || status === "error") return new DevframeConnectionError("connection", "[devframe] Not connected to the devframe server", { cause: connectionError ?? void 0 });
1948
+ if (status === "unauthorized") return new DevframeConnectionError("auth", "[devframe] Not authorized by the devframe server", { cause: connectionError ?? void 0 });
1949
+ return null;
1950
+ }
1951
+ /**
1952
+ * Wrap an in-flight call promise so it settles on server response, on an
1953
+ * optional wall-clock timeout, or when the connection drops — never hangs.
1954
+ */
1955
+ function guardCall(promise, method) {
1956
+ return new Promise((resolve, reject) => {
1957
+ let settled = false;
1958
+ let timer;
1959
+ const entry = { reject(error) {
1960
+ if (settled) return;
1961
+ finish();
1962
+ events.emit("rpc:error", error, method);
1963
+ reject(error);
1964
+ } };
1965
+ function finish() {
1966
+ settled = true;
1967
+ pending.delete(entry);
1968
+ if (timer) clearTimeout(timer);
1969
+ }
1970
+ pending.add(entry);
1971
+ if (callTimeout > 0) timer = setTimeout(() => {
1972
+ entry.reject(new DevframeConnectionError("timeout", `[devframe] RPC call "${method}" timed out after ${callTimeout}ms`));
1973
+ }, callTimeout);
1974
+ promise.then((value) => {
1975
+ if (settled) return;
1976
+ finish();
1977
+ resolve(value);
1978
+ }, (error) => {
1979
+ if (settled) return;
1980
+ finish();
1981
+ const err = error instanceof Error ? error : new Error(String(error));
1982
+ events.emit("rpc:error", err, method);
1983
+ reject(err);
1984
+ });
1985
+ });
1986
+ }
1906
1987
  const definitions = /* @__PURE__ */ new Map();
1907
1988
  for (const name of connectionMeta.jsonSerializableMethods ?? []) definitions.set(name, { jsonSerializable: true });
1908
1989
  const serverRpc = createRpcClient(clientRpc.functions, {
@@ -1910,7 +1991,21 @@ function createWsRpcClientMode(options) {
1910
1991
  url,
1911
1992
  authToken,
1912
1993
  definitions,
1913
- ...wsOptions
1994
+ ...wsOptions,
1995
+ onConnected(event) {
1996
+ wsOptions.onConnected?.(event);
1997
+ },
1998
+ onError(error) {
1999
+ setStatus("error", error);
2000
+ events.emit("connection:error", error);
2001
+ rejectAllPending(new DevframeConnectionError("connection", "[devframe] Connection to the devframe server failed", { cause: error }));
2002
+ wsOptions.onError?.(error);
2003
+ },
2004
+ onDisconnected(event) {
2005
+ if (status !== "error") setStatus("disconnected");
2006
+ rejectAllPending(new DevframeConnectionError("connection", "[devframe] Disconnected from the devframe server", { cause: connectionError ?? void 0 }));
2007
+ wsOptions.onDisconnected?.(event);
2008
+ }
1914
2009
  }),
1915
2010
  rpcOptions
1916
2011
  });
@@ -1919,6 +2014,10 @@ function createWsRpcClientMode(options) {
1919
2014
  type: "event",
1920
2015
  handler: () => {
1921
2016
  isTrusted = false;
2017
+ const authError = new DevframeConnectionError("auth", "[devframe] The devframe server revoked this client's trust");
2018
+ setStatus("unauthorized", authError);
2019
+ events.emit("connection:error", authError);
2020
+ rejectAllPending(authError);
1922
2021
  events.emit("rpc:is-trusted:updated", false);
1923
2022
  }
1924
2023
  });
@@ -1942,7 +2041,14 @@ function createWsRpcClientMode(options) {
1942
2041
  origin: location.origin
1943
2042
  });
1944
2043
  isTrusted = result.isTrusted;
1945
- if (isTrusted) trustedPromise.resolve(true);
2044
+ if (isTrusted) {
2045
+ trustedPromise.resolve(true);
2046
+ setStatus("connected");
2047
+ } else {
2048
+ const authError = new DevframeConnectionError("auth", "[devframe] The devframe server refused this client's credentials");
2049
+ setStatus("unauthorized", authError);
2050
+ events.emit("connection:error", authError);
2051
+ }
1946
2052
  events.emit("rpc:is-trusted:updated", isTrusted);
1947
2053
  return result.isTrusted;
1948
2054
  }
@@ -1956,6 +2062,7 @@ function createWsRpcClientMode(options) {
1956
2062
  currentAuthToken = token;
1957
2063
  isTrusted = true;
1958
2064
  trustedPromise.resolve(true);
2065
+ setStatus("connected");
1959
2066
  events.emit("rpc:is-trusted:updated", true);
1960
2067
  }
1961
2068
  return token;
@@ -1980,18 +2087,41 @@ function createWsRpcClientMode(options) {
1980
2087
  get isTrusted() {
1981
2088
  return isTrusted;
1982
2089
  },
2090
+ get status() {
2091
+ return status;
2092
+ },
2093
+ get connectionError() {
2094
+ return connectionError;
2095
+ },
1983
2096
  requestTrust,
1984
2097
  requestTrustWithToken,
1985
2098
  requestTrustWithCode,
1986
2099
  ensureTrusted,
1987
2100
  call: (...args) => {
1988
- return serverRpc.$call(...args);
2101
+ const method = String(args[0]);
2102
+ const failFast = terminalError();
2103
+ if (failFast) {
2104
+ events.emit("rpc:error", failFast, method);
2105
+ return Promise.reject(failFast);
2106
+ }
2107
+ return guardCall(serverRpc.$call(...args), method);
1989
2108
  },
1990
2109
  callEvent: (...args) => {
2110
+ const failFast = terminalError();
2111
+ if (failFast) {
2112
+ events.emit("rpc:error", failFast, String(args[0]));
2113
+ return;
2114
+ }
1991
2115
  return serverRpc.$callEvent(...args);
1992
2116
  },
1993
2117
  callOptional: (...args) => {
1994
- return serverRpc.$callOptional(...args);
2118
+ const method = String(args[0]);
2119
+ const failFast = terminalError();
2120
+ if (failFast) {
2121
+ events.emit("rpc:error", failFast, method);
2122
+ return Promise.reject(failFast);
2123
+ }
2124
+ return guardCall(serverRpc.$callOptional(...args), method);
1995
2125
  }
1996
2126
  };
1997
2127
  }
@@ -2109,7 +2239,9 @@ async function getDevframeRpcClient(options = {}) {
2109
2239
  const bases = Array.isArray(baseURL) ? baseURL : [baseURL];
2110
2240
  let connectionMeta = options.connectionMeta || findConnectionMetaFromWindows();
2111
2241
  let resolvedBaseURL = bases[0] ?? "./";
2242
+ const inheritedMetaBaseUrl = options.connectionMeta ? void 0 : connectionMeta?.baseUrl;
2112
2243
  function resolveMetaBaseUrl() {
2244
+ if (inheritedMetaBaseUrl) return inheritedMetaBaseUrl;
2113
2245
  const metaPath = withBase(DEVFRAME_CONNECTION_META_FILENAME, resolvedBaseURL);
2114
2246
  try {
2115
2247
  return new URL(metaPath, globalThis.location?.href).href;
@@ -2122,7 +2254,10 @@ async function getDevframeRpcClient(options = {}) {
2122
2254
  for (const base of bases) try {
2123
2255
  connectionMeta = await fetch(withBase(DEVFRAME_CONNECTION_META_FILENAME, base)).then((r) => r.json());
2124
2256
  resolvedBaseURL = base;
2125
- globalThis[CONNECTION_META_KEY] = connectionMeta;
2257
+ globalThis[CONNECTION_META_KEY] = {
2258
+ ...connectionMeta,
2259
+ baseUrl: resolveMetaBaseUrl()
2260
+ };
2126
2261
  break;
2127
2262
  } catch (e) {
2128
2263
  errors.push(e);
@@ -2156,6 +2291,7 @@ async function getDevframeRpcClient(options = {}) {
2156
2291
  metaBaseUrl: resolveMetaBaseUrl(),
2157
2292
  events,
2158
2293
  clientRpc,
2294
+ callTimeout: options.callTimeout,
2159
2295
  rpcOptions: {
2160
2296
  ...rpcOptions,
2161
2297
  async onRequest(req, next, resolve) {
@@ -2178,6 +2314,12 @@ async function getDevframeRpcClient(options = {}) {
2178
2314
  get isTrusted() {
2179
2315
  return mode.isTrusted;
2180
2316
  },
2317
+ get status() {
2318
+ return mode.status;
2319
+ },
2320
+ get connectionError() {
2321
+ return mode.connectionError;
2322
+ },
2181
2323
  connectionMeta,
2182
2324
  ensureTrusted: mode.ensureTrusted,
2183
2325
  requestTrust: mode.requestTrust,
@@ -2231,4 +2373,4 @@ async function getDevframeRpcClient(options = {}) {
2231
2373
  //#region src/client/index.ts
2232
2374
  const connectDevframe = getDevframeRpcClient;
2233
2375
  //#endregion
2234
- export { authenticateWithUrlOtp, connectDevframe, consumeOtpFromUrl, createClientSettings, createRpcStreamingClientHost, createScopedClientContext, getDevframeRpcClient, readOtpFromUrl };
2376
+ export { DevframeConnectionError, authenticateWithUrlOtp, connectDevframe, consumeOtpFromUrl, createClientSettings, createRpcStreamingClientHost, createScopedClientContext, getDevframeRpcClient, isCallableStatus, readOtpFromUrl };
@@ -1,5 +1,4 @@
1
- import { R as SharedState, h as DevframeNodeContext } from "./devframe-CpXy1ZlO.mjs";
2
-
1
+ import { g as DevframeNodeContext, z as SharedState } from "./devframe-CnTVuGw9.mjs";
3
2
  //#region src/node/hub-internals/context.d.ts
4
3
  interface InternalAnonymousAuthStorage {
5
4
  trusted: Record<string, {
@@ -42,7 +41,8 @@ interface DevframeInternalContext {
42
41
  * docks host when enriching remote iframe URLs with a connection descriptor.
43
42
  */
44
43
  wsEndpoint?: {
45
- /** Full `ws://` or `wss://` URL with host and port. */url: string;
44
+ /** Full `ws://` or `wss://` URL with host and port. */
45
+ url: string;
46
46
  };
47
47
  }
48
48
  declare const internalContextMap: WeakMap<DevframeNodeContext, DevframeInternalContext>;
@@ -262,7 +262,7 @@ async function resolveDevServerPort(def, options = {}) {
262
262
  *
263
263
  * Use this directly when integrating devframe into an existing CLI
264
264
  * framework (commander, yargs, hand-rolled CAC). For the all-in-one
265
- * `dev` / `build` / `mcp` shell, reach for {@link createCli} instead.
265
+ * `dev` / `build` / `mcp` shell, reach for {@link createCac} instead.
266
266
  */
267
267
  async function createDevServer(def, options = {}) {
268
268
  const distDir = options.distDir ?? def.cli?.distDir;
@@ -293,7 +293,7 @@ async function createDevServer(def, options = {}) {
293
293
  const mcpPath = joinURL(basePath, mcpRoute);
294
294
  let mountMcpHttp;
295
295
  try {
296
- ({mountMcpHttp} = await import("./http-COX960WK.mjs"));
296
+ ({mountMcpHttp} = await import("./http-BirzlyE9.mjs"));
297
297
  } catch (error) {
298
298
  const reason = error instanceof Error ? error.message : String(error);
299
299
  throw diagnostics.DF0017({
@@ -1,11 +1,10 @@
1
- import { _ as RpcFunctionDefinition } from "./types-oEqKqUC9.mjs";
2
- import { S as RpcFunctionsCollectorBase } from "./index-DI_TMGjv.mjs";
3
- import { t as DevframeNodeRpcSessionMeta } from "./ws-server-BUgJpdX4.mjs";
1
+ import { _ as RpcFunctionDefinition } from "./types-CrzNxXKq.mjs";
2
+ import { S as RpcFunctionsCollectorBase } from "./index-DgsLFhZg.mjs";
3
+ import { t as DevframeNodeRpcSessionMeta } from "./ws-server-CceOy6He.mjs";
4
4
  import { CAC } from "cac";
5
5
  import { GenericSchema, InferOutput } from "valibot";
6
6
  import { BirpcReturn } from "birpc";
7
7
  import { Diagnostic, DiagnosticDefinition, defineDiagnostics } from "nostics";
8
-
9
8
  //#region src/adapters/flags.d.ts
10
9
  /**
11
10
  * Schema map for typed CLI flags. Keys are flag names in camelCase —
@@ -37,7 +36,7 @@ type CliFlagsSchema = Record<string, GenericSchema>;
37
36
  */
38
37
  declare function defineCliFlags<T extends CliFlagsSchema>(flags: T): T;
39
38
  /** Extract the parsed-output type from a {@link CliFlagsSchema}. */
40
- type InferCliFlags<T extends CliFlagsSchema> = { [K in keyof T]: InferOutput<T[K]> };
39
+ type InferCliFlags<T extends CliFlagsSchema> = { [K in keyof T]: InferOutput<T[K]>; };
41
40
  /** Validate and coerce the raw cac-parsed bag against a {@link CliFlagsSchema}. */
42
41
  declare function parseCliFlags(schema: CliFlagsSchema, raw: Record<string, unknown>): {
43
42
  flags: Record<string, unknown>;
@@ -75,7 +74,7 @@ interface EventEmitter<Events extends EventsMap> {
75
74
  *
76
75
  * @internal
77
76
  */
78
- _listeners: Partial<{ [E in keyof Events]: Events[E][] }>;
77
+ _listeners: Partial<{ [E in keyof Events]: Events[E][]; }>;
79
78
  /**
80
79
  * Add a listener for a given event.
81
80
  *
@@ -378,8 +377,13 @@ interface DevframeHost {
378
377
  * `mountStatic`). Without it, an embedded SPA can only discover the
379
378
  * endpoint by inheriting it from a same-origin parent window — which fails
380
379
  * for cross-origin or sandboxed iframes. Implementations serve the same
381
- * meta they expose at the hub's own base. Optional: hosts that can't serve
382
- * a dynamic route (e.g. static-snapshot builds) may omit it.
380
+ * meta they expose at the hub's own base.
381
+ *
382
+ * Optional in the type, but a host that mounts a devframe with a servable
383
+ * `distDir` yet omits this hook triggers a `DF8106` diagnostic, since the
384
+ * SPA's `./__connection.json` fetch would otherwise fall through and break
385
+ * silently. A static-snapshot host that bakes the meta into its served files
386
+ * can implement it as a no-op to acknowledge this intentionally.
383
387
  */
384
388
  mountConnectionMeta?: (base: string) => void | Promise<void>;
385
389
  /**
@@ -664,18 +668,18 @@ interface DevframeSettings<T extends Record<string, any> = Record<string, any>>
664
668
  * namespace, so a scoped `call('get-cwd')` is typed without the
665
669
  * `my-plugin:` prefix.
666
670
  */
667
- type ScopedServerFunctions<NS extends string> = { [K in keyof DevframeRpcServerFunctions as K extends `${NS}:${infer R}` ? R : never]: DevframeRpcServerFunctions[K] };
671
+ type ScopedServerFunctions<NS extends string> = { [K in keyof DevframeRpcServerFunctions as K extends `${NS}:${infer R}` ? R : never]: DevframeRpcServerFunctions[K]; };
668
672
  /**
669
673
  * Map the client-side RPC registry down to the bare names owned by a
670
674
  * namespace, used by scoped `broadcast`.
671
675
  */
672
- type ScopedClientFunctions<NS extends string> = { [K in keyof DevframeRpcClientFunctions as K extends `${NS}:${infer R}` ? R : never]: DevframeRpcClientFunctions[K] };
676
+ type ScopedClientFunctions<NS extends string> = { [K in keyof DevframeRpcClientFunctions as K extends `${NS}:${infer R}` ? R : never]: DevframeRpcClientFunctions[K]; };
673
677
  /**
674
678
  * Map the shared-state registry down to the bare keys owned by a
675
679
  * namespace, so scoped `sharedState('messages')` is typed without the
676
680
  * `my-plugin:` prefix.
677
681
  */
678
- type ScopedSharedStates<NS extends string> = { [K in keyof DevframeRpcSharedStates as K extends `${NS}:${infer R}` ? R : never]: DevframeRpcSharedStates[K] };
682
+ type ScopedSharedStates<NS extends string> = { [K in keyof DevframeRpcSharedStates as K extends `${NS}:${infer R}` ? R : never]: DevframeRpcSharedStates[K]; };
679
683
  /**
680
684
  * Broadcast options for a scoped client method (bare name).
681
685
  */
@@ -776,7 +780,7 @@ interface DevframeScopedNodeContext<NS extends string = string, Settings extends
776
780
  //#endregion
777
781
  //#region src/types/utils.d.ts
778
782
  type Thenable<T> = T | Promise<T>;
779
- type EntriesToObject<T extends readonly [string, any][]> = { [K in T[number] as K[0]]: K[1] };
783
+ type EntriesToObject<T extends readonly [string, any][]> = { [K in T[number] as K[0]]: K[1]; };
780
784
  type PartialWithoutId<T extends {
781
785
  id: string;
782
786
  }> = Partial<Omit<T, 'id'>> & {
@@ -789,7 +793,7 @@ type Immutable<T> = T extends ImmutablePrimitive ? T : T extends Array<infer U>
789
793
  type ImmutableArray<T> = ReadonlyArray<Immutable<T>>;
790
794
  type ImmutableMap<K, V> = ReadonlyMap<Immutable<K>, Immutable<V>>;
791
795
  type ImmutableSet<T> = ReadonlySet<Immutable<T>>;
792
- type ImmutableObject<T> = { readonly [K in keyof T]: Immutable<T[K]> };
796
+ type ImmutableObject<T> = { readonly [K in keyof T]: Immutable<T[K]>; };
793
797
  /**
794
798
  * Serializable patch describing a single mutation to a `SharedState`.
795
799
  * Structurally compatible with JSON-Patch and is safe to send over RPC.
@@ -1239,6 +1243,15 @@ interface ConnectionMeta {
1239
1243
  * structured-clone.
1240
1244
  */
1241
1245
  jsonSerializableMethods?: string[];
1246
+ /**
1247
+ * Absolute URL of the `__connection.json` this meta was loaded from.
1248
+ * Annotated by the client (not served) when it publishes the meta on a
1249
+ * shared window for same-origin inheritance: a relative `websocket.path`
1250
+ * resolves against this, so a child SPA mounted at another base (e.g. a hub
1251
+ * mounting several devframes at `/__foo/`, `/__bar/`, …) inherits a dialable
1252
+ * endpoint rather than resolving the path against its own mount.
1253
+ */
1254
+ baseUrl?: string;
1242
1255
  }
1243
1256
  //#endregion
1244
1257
  //#region src/types/devframe.d.ts
@@ -1378,7 +1391,7 @@ interface DevframeCliOptions {
1378
1391
  /**
1379
1392
  * Capability-side CAC hook. Called with the CAC instance after the
1380
1393
  * adapter registers its built-in commands (`build` / `spa` / `mcp`)
1381
- * but before `createCli`'s own `configureCli` caller. Use this to
1394
+ * but before `createCac`'s own `configureCli` caller. Use this to
1382
1395
  * contribute tool-specific flags and subcommands from the definition
1383
1396
  * itself.
1384
1397
  */
@@ -1409,6 +1422,44 @@ interface DevframeCliOptions {
1409
1422
  */
1410
1423
  flags?: CliFlagsSchema;
1411
1424
  }
1425
+ /**
1426
+ * Default dock attributes for the iframe entry a hub synthesizes when it
1427
+ * mounts this devframe. Framework-neutral metadata only — the hub layer
1428
+ * (`mountDevframe`) merges these beneath its per-mount `dock` overrides,
1429
+ * which in turn sit beneath the locked, derived `id` / `type` / `url`.
1430
+ *
1431
+ * Every field is optional. `title` / `icon` default to the definition's
1432
+ * `name` / `icon` when omitted here; the rest are unset by default.
1433
+ * Standalone adapters (`cli` / `spa` / `build`) ignore this entirely.
1434
+ */
1435
+ interface DevframeDockDefaults {
1436
+ /** Dock entry title. Defaults to the definition's `name`. */
1437
+ title?: string;
1438
+ /** Dock entry icon. Defaults to the definition's `icon`. */
1439
+ icon?: string | {
1440
+ light: string;
1441
+ dark: string;
1442
+ };
1443
+ /**
1444
+ * Sort weight within the dock; higher sorts earlier.
1445
+ * @default 0
1446
+ */
1447
+ defaultOrder?: number;
1448
+ /**
1449
+ * Category the entry groups under in the dock.
1450
+ * @default 'default'
1451
+ */
1452
+ category?: string;
1453
+ /**
1454
+ * Conditional-visibility expression (same syntax as command `when`
1455
+ * clauses). Set to `'false'` to hide the entry unconditionally.
1456
+ */
1457
+ when?: string;
1458
+ /** Badge text rendered on the dock icon (e.g. an unread count). */
1459
+ badge?: string;
1460
+ /** Id of the dock group this entry collapses under, if any. */
1461
+ groupId?: string;
1462
+ }
1412
1463
  interface DevframeSpaOptions {
1413
1464
  base?: string;
1414
1465
  /**
@@ -1428,7 +1479,7 @@ interface DevframeBrowserContext {
1428
1479
  /**
1429
1480
  * Runtime information threaded into `setup(ctx, info)`. Adapters
1430
1481
  * populate the fields that make sense for their deployment. In
1431
- * particular, `createCli` fills `flags` with the parsed CAC bag.
1482
+ * particular, `createCac` fills `flags` with the parsed CAC bag.
1432
1483
  */
1433
1484
  interface DevframeSetupInfo {
1434
1485
  /** Parsed CLI flags, populated by the CLI adapter. */
@@ -1449,6 +1500,15 @@ interface DevframeDefinition {
1449
1500
  light: string;
1450
1501
  dark: string;
1451
1502
  };
1503
+ /**
1504
+ * Default dock attributes applied when a hub mounts this devframe as an
1505
+ * iframe dock entry. Consulted only by hub adapters (`mountDevframe`),
1506
+ * which merge these beneath the per-mount `dock` overrides; standalone
1507
+ * adapters (`cli` / `spa` / `build`) ignore it.
1508
+ *
1509
+ * @see {@link DevframeDockDefaults}
1510
+ */
1511
+ dock?: DevframeDockDefaults;
1452
1512
  /**
1453
1513
  * Mount path override. Defaults depend on the adapter:
1454
1514
  * `/` for standalone (`cli` / `spa` / `build`), `/__<id>/` for hosted
@@ -1478,4 +1538,4 @@ interface DevframeDefinition {
1478
1538
  }
1479
1539
  declare function defineDevframe(d: DevframeDefinition): DevframeDefinition;
1480
1540
  //#endregion
1481
- export { ScopedClientFunctions as $, StreamSinkEvents as A, SharedStateOptions as B, RpcStreamingHost as C, EventsMap as Ct, StreamErrorPayload as D, parseCliFlags as Dt, CreateStreamSinkOptions as E, defineCliFlags as Et, ImmutableMap as F, Thenable as G, createSharedState as H, ImmutableObject as I, DevframeScopedStreamingHost as J, DevframeScopedNodeContext as K, ImmutableSet as L, createStreamSink as M, Immutable as N, StreamReader as O, ImmutableArray as P, ScopedBroadcastOptions as Q, SharedState as R, RpcStreamingChannelOptions as S, EventUnsubscribe as St, CreateStreamReaderOptions as T, InferCliFlags as Tt, EntriesToObject as U, SharedStatePatch as V, PartialWithoutId as W, DevframeSettingsRegistry as X, DevframeSettings as Y, DevframeSettingsStore as Z, RpcBroadcastOptions as _, AgentTool as _t, DevframeDuplicationStrategy as a, DevframeRpcServerFunctions as at, RpcSharedStateHost as b, DevframeAgentHostEvents as bt, DevframeSpaOptions as c, DevframeDefineDiagnosticsOptions as ct, defineDevframe as d, DevframeDiagnosticsLogger as dt, ScopedServerFunctions as et, ConnectionMeta as f, AgentHandle as ft, DevframeNodeRpcSession as g, AgentResourceInput as gt, DevframeNodeContext as h, AgentResourceContent as ht, DevframeDeploymentKind as i, DevframeRpcClientFunctions as it, createStreamReader as j, StreamSink as k, DevframeWsOptions as l, DevframeDiagnosticsDefinition as lt, DevframeCapabilities as m, AgentResource as mt, DevframeCliOptions as n, SettingsForNamespace as nt, DevframeRuntime as o, DevframeRpcSharedStates as ot, ConnectionMetaWebsocket as p, AgentManifest as pt, DevframeScopedNodeRpc as q, DevframeDefinition as r, DevframeViewHost as rt, DevframeSetupInfo as s, DevframeHost as st, DevframeBrowserContext as t, ScopedSharedStates as tt, McpRouteOptions as u, DevframeDiagnosticsHost as ut, RpcFunctionsHost as v, AgentToolInput as vt, BufferedChunk as w, CliFlagsSchema as wt, RpcStreamingChannel as x, EventEmitter as xt, RpcSharedStateGetOptions as y, DevframeAgentHost as yt, SharedStateEvents as z };
1541
+ export { ScopedBroadcastOptions as $, StreamSink as A, SharedStateEvents as B, RpcStreamingChannelOptions as C, EventUnsubscribe as Ct, CreateStreamSinkOptions as D, defineCliFlags as Dt, CreateStreamReaderOptions as E, InferCliFlags as Et, ImmutableArray as F, PartialWithoutId as G, SharedStatePatch as H, ImmutableMap as I, DevframeScopedNodeRpc as J, Thenable as K, ImmutableObject as L, createStreamReader as M, createStreamSink as N, StreamErrorPayload as O, parseCliFlags as Ot, Immutable as P, DevframeSettingsStore as Q, ImmutableSet as R, RpcStreamingChannel as S, EventEmitter as St, BufferedChunk as T, CliFlagsSchema as Tt, createSharedState as U, SharedStateOptions as V, EntriesToObject as W, DevframeSettings as X, DevframeScopedStreamingHost as Y, DevframeSettingsRegistry as Z, DevframeNodeRpcSession as _, AgentResourceInput as _t, DevframeDockDefaults as a, DevframeRpcClientFunctions as at, RpcSharedStateGetOptions as b, DevframeAgentHost as bt, DevframeSetupInfo as c, DevframeHost as ct, McpRouteOptions as d, DevframeDiagnosticsHost as dt, ScopedClientFunctions as et, defineDevframe as f, DevframeDiagnosticsLogger as ft, DevframeNodeContext as g, AgentResourceContent as gt, DevframeCapabilities as h, AgentResource as ht, DevframeDeploymentKind as i, DevframeViewHost as it, StreamSinkEvents as j, StreamReader as k, DevframeSpaOptions as l, DevframeDefineDiagnosticsOptions as lt, ConnectionMetaWebsocket as m, AgentManifest as mt, DevframeCliOptions as n, ScopedSharedStates as nt, DevframeDuplicationStrategy as o, DevframeRpcServerFunctions as ot, ConnectionMeta as p, AgentHandle as pt, DevframeScopedNodeContext as q, DevframeDefinition as r, SettingsForNamespace as rt, DevframeRuntime as s, DevframeRpcSharedStates as st, DevframeBrowserContext as t, ScopedServerFunctions as tt, DevframeWsOptions as u, DevframeDiagnosticsDefinition as ut, RpcBroadcastOptions as v, AgentTool as vt, RpcStreamingHost as w, EventsMap as wt, RpcSharedStateHost as x, DevframeAgentHostEvents as xt, RpcFunctionsHost as y, AgentToolInput as yt, SharedState as z };
@@ -105,7 +105,9 @@ const c = /*@__PURE__*/ function() {
105
105
  }();
106
106
  //#endregion
107
107
  //#region ../../node_modules/.pnpm/ohash@2.0.11/node_modules/ohash/dist/crypto/node/index.mjs
108
- const e = globalThis.process?.getBuiltinModule?.("crypto")?.hash, r = "sha256", s = "base64url";
108
+ const e = globalThis.process?.getBuiltinModule?.("crypto")?.hash;
109
+ const r = "sha256";
110
+ const s = "base64url";
109
111
  function digest(t) {
110
112
  if (e) return e(r, t, s);
111
113
  const o = createHash(r).update(t);
@@ -111,7 +111,8 @@ const z = [
111
111
  -1694144372,
112
112
  528734635,
113
113
  1541459225
114
- ], R = [
114
+ ];
115
+ const R = [
115
116
  1116352408,
116
117
  1899447441,
117
118
  -1245643825,
@@ -176,7 +177,9 @@ const z = [
176
177
  -1538233109,
177
178
  -1090935817,
178
179
  -965641998
179
- ], S = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_", r = [];
180
+ ];
181
+ const S = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";
182
+ const r = [];
180
183
  var k = class {
181
184
  _data = new l();
182
185
  _hash = new l([...z]);
@@ -1,5 +1,4 @@
1
- import { r as DevframeDefinition } from "../devframe-CpXy1ZlO.mjs";
2
-
1
+ import { r as DevframeDefinition } from "../devframe-CnTVuGw9.mjs";
3
2
  //#region src/helpers/vite.d.ts
4
3
  interface ViteDevBridgeOptions {
5
4
  /**
@@ -24,8 +23,11 @@ interface ViteDevBridgeOptions {
24
23
  * - object — bridge mode with explicit overrides.
25
24
  */
26
25
  devMiddleware?: boolean | {
27
- /** Override the bridge port. Default: {@link resolveDevServerPort}. */port?: number; /** Override the bridge bind host. Default: `def.cli?.host ?? 'localhost'`. */
28
- host?: string; /** Flag bag forwarded to `def.setup(ctx, { flags })`. */
26
+ /** Override the bridge port. Default: {@link resolveDevServerPort}. */
27
+ port?: number;
28
+ /** Override the bridge bind host. Default: `def.cli?.host ?? 'localhost'`. */
29
+ host?: string;
30
+ /** Flag bag forwarded to `def.setup(ctx, { flags })`. */
29
31
  flags?: Record<string, unknown>;
30
32
  };
31
33
  }
@@ -58,7 +60,7 @@ interface DevframeVitePlugin {
58
60
  *
59
61
  * Use bridge mode when integrating with frameworks that own the SPA
60
62
  * (Nuxt, Astro, SolidStart, plain Vite apps). For the all-in-one
61
- * `dev` / `build` / `mcp` shell, reach for {@link createCli} instead.
63
+ * `dev` / `build` / `mcp` shell, reach for {@link createCac} instead.
62
64
  */
63
65
  declare function viteDevBridge(d: DevframeDefinition, options?: ViteDevBridgeOptions): DevframeVitePlugin;
64
66
  //#endregion
@@ -2,7 +2,7 @@ import { DEVFRAME_CONNECTION_META_FILENAME, DEVFRAME_WS_ROUTE } from "../constan
2
2
  import { a as diagnostics } from "../storage-yrUZaiib.mjs";
3
3
  import { n as resolveBasePath, t as normalizeBasePath } from "../_shared-bWRzeSa0.mjs";
4
4
  import { serveStaticNodeMiddleware } from "../utils/serve-static.mjs";
5
- import { n as resolveDevServerPort, t as createDevServer } from "../dev-DE51PeJc.mjs";
5
+ import { n as resolveDevServerPort, t as createDevServer } from "../dev-Bs4oRVnI.mjs";
6
6
  import { resolve } from "pathe";
7
7
  //#region src/helpers/vite.ts
8
8
  /**
@@ -21,7 +21,7 @@ import { resolve } from "pathe";
21
21
  *
22
22
  * Use bridge mode when integrating with frameworks that own the SPA
23
23
  * (Nuxt, Astro, SolidStart, plain Vite apps). For the all-in-one
24
- * `dev` / `build` / `mcp` shell, reach for {@link createCli} instead.
24
+ * `dev` / `build` / `mcp` shell, reach for {@link createCac} instead.
25
25
  */
26
26
  function viteDevBridge(d, options = {}) {
27
27
  const base = normalizeMountBase(options.base ?? resolveBasePath(d, "hosted"));
@@ -1,5 +1,5 @@
1
1
  import { isAllowedOrigin } from "./rpc/transports/ws-server.mjs";
2
- import { t as buildMcpServerFromContext } from "./build-server-0jWgMrz-.mjs";
2
+ import { t as buildMcpServerFromContext } from "./build-server-Bo0G5XcS.mjs";
3
3
  import { randomUUID } from "node:crypto";
4
4
  import { defineHandler } from "h3";
5
5
  import { isInitializeRequest } from "@modelcontextprotocol/sdk/types.js";
@@ -1,6 +1,5 @@
1
- import { C as RpcFunctionType, S as RpcFunctionSetupResult, T as RpcReturnSchema, _ as RpcFunctionDefinition, i as RpcArgsSchema, v as RpcFunctionDefinitionAny, w as RpcFunctionsCollector } from "./types-oEqKqUC9.mjs";
2
- import { a as getDefinitionsWithDumps$1, c as StaticRpcDumpManifest$1, d as StaticRpcDumpManifestValue$1, f as StaticRpcDumpSerialization$1, i as dumpFunctions$1, l as StaticRpcDumpManifestQueryEntry$1, n as serializeDumpError$1, o as StaticRpcDumpCollection$1, p as collectStaticRpcDump$1, r as createClientFromDump$1, s as StaticRpcDumpFile$1, t as reviveDumpError$1, u as StaticRpcDumpManifestStaticEntry$1 } from "./index-BAZpbgHu.mjs";
3
-
1
+ import { C as RpcFunctionType, S as RpcFunctionSetupResult, T as RpcReturnSchema, _ as RpcFunctionDefinition, i as RpcArgsSchema, v as RpcFunctionDefinitionAny, w as RpcFunctionsCollector } from "./types-CrzNxXKq.mjs";
2
+ import { a as getDefinitionsWithDumps$1, c as StaticRpcDumpManifest$1, d as StaticRpcDumpManifestValue$1, f as StaticRpcDumpSerialization$1, i as dumpFunctions$1, l as StaticRpcDumpManifestQueryEntry$1, n as serializeDumpError$1, o as StaticRpcDumpCollection$1, p as collectStaticRpcDump$1, r as createClientFromDump$1, s as StaticRpcDumpFile$1, t as reviveDumpError$1, u as StaticRpcDumpManifestStaticEntry$1 } from "./index-YDSJgsyG.mjs";
4
3
  //#region src/rpc/cache.d.ts
5
4
  interface RpcCacheOptions {
6
5
  functions: string[];
@@ -1,8 +1,8 @@
1
- import { R as SharedState, g as DevframeNodeRpcSession, h as DevframeNodeContext } from "./devframe-CpXy1ZlO.mjs";
2
- import { v as RpcFunctionDefinitionAny } from "./types-oEqKqUC9.mjs";
3
- import { n as InternalAnonymousAuthStorage } from "./context-DgkYTlXx.mjs";
1
+ import { _ as DevframeNodeRpcSession, g as DevframeNodeContext, z as SharedState } from "./devframe-CnTVuGw9.mjs";
2
+ import { v as RpcFunctionDefinitionAny } from "./types-CrzNxXKq.mjs";
3
+ import "./index-DgsLFhZg.mjs";
4
+ import { n as InternalAnonymousAuthStorage } from "./context-B1sekkgB.mjs";
4
5
  import { Peer } from "crossws";
5
-
6
6
  //#region src/node/auth/handler.d.ts
7
7
  /**
8
8
  * A ready-made pre-auth RPC handler, as produced by
@@ -1,5 +1,4 @@
1
- import { h as RpcDumpStore, l as RpcDumpClientOptions, m as RpcDumpRecordError, n as BirpcReturn, o as RpcDefinitionsToFunctions, u as RpcDumpCollectionOptions, v as RpcFunctionDefinitionAny } from "./types-oEqKqUC9.mjs";
2
-
1
+ import { h as RpcDumpStore, l as RpcDumpClientOptions, m as RpcDumpRecordError, n as BirpcReturn, o as RpcDefinitionsToFunctions, u as RpcDumpCollectionOptions, v as RpcFunctionDefinitionAny } from "./types-CrzNxXKq.mjs";
3
2
  //#region src/rpc/dump/static.d.ts
4
3
  type StaticRpcDumpSerialization = 'json' | 'structured-clone';
5
4
  interface StaticRpcDumpManifestStaticEntry {
package/dist/index.d.mts CHANGED
@@ -1,8 +1,8 @@
1
- import { $ as ScopedClientFunctions, C as RpcStreamingHost, Ct as EventsMap, G as Thenable, J as DevframeScopedStreamingHost, K as DevframeScopedNodeContext, Q as ScopedBroadcastOptions, S as RpcStreamingChannelOptions, St as EventUnsubscribe, U as EntriesToObject, W as PartialWithoutId, X as DevframeSettingsRegistry, Y as DevframeSettings, Z as DevframeSettingsStore, _ as RpcBroadcastOptions, _t as AgentTool, a as DevframeDuplicationStrategy, at as DevframeRpcServerFunctions, b as RpcSharedStateHost, bt as DevframeAgentHostEvents, c as DevframeSpaOptions, ct as DevframeDefineDiagnosticsOptions, d as defineDevframe, dt as DevframeDiagnosticsLogger, et as ScopedServerFunctions, f as ConnectionMeta, ft as AgentHandle, g as DevframeNodeRpcSession, gt as AgentResourceInput, h as DevframeNodeContext, ht as AgentResourceContent, i as DevframeDeploymentKind, it as DevframeRpcClientFunctions, l as DevframeWsOptions, lt as DevframeDiagnosticsDefinition, m as DevframeCapabilities, mt as AgentResource, n as DevframeCliOptions, nt as SettingsForNamespace, o as DevframeRuntime, ot as DevframeRpcSharedStates, p as ConnectionMetaWebsocket, pt as AgentManifest, q as DevframeScopedNodeRpc, r as DevframeDefinition, rt as DevframeViewHost, s as DevframeSetupInfo, st as DevframeHost, t as DevframeBrowserContext, tt as ScopedSharedStates, u as McpRouteOptions, ut as DevframeDiagnosticsHost, v as RpcFunctionsHost, vt as AgentToolInput, x as RpcStreamingChannel, xt as EventEmitter, y as RpcSharedStateGetOptions, yt as DevframeAgentHost } from "./devframe-CpXy1ZlO.mjs";
2
- import { C as RpcFunctionType, T as RpcReturnSchema, _ as RpcFunctionDefinition, g as RpcFunctionAgentOptions, i as RpcArgsSchema } from "./types-oEqKqUC9.mjs";
3
- import { t as DevframeNodeRpcSessionMeta } from "./ws-server-BUgJpdX4.mjs";
4
-
1
+ import { $ as ScopedBroadcastOptions, C as RpcStreamingChannelOptions, Ct as EventUnsubscribe, G as PartialWithoutId, J as DevframeScopedNodeRpc, K as Thenable, Q as DevframeSettingsStore, S as RpcStreamingChannel, St as EventEmitter, W as EntriesToObject, X as DevframeSettings, Y as DevframeScopedStreamingHost, Z as DevframeSettingsRegistry, _ as DevframeNodeRpcSession, _t as AgentResourceInput, a as DevframeDockDefaults, at as DevframeRpcClientFunctions, b as RpcSharedStateGetOptions, bt as DevframeAgentHost, c as DevframeSetupInfo, ct as DevframeHost, d as McpRouteOptions, dt as DevframeDiagnosticsHost, et as ScopedClientFunctions, f as defineDevframe, ft as DevframeDiagnosticsLogger, g as DevframeNodeContext, gt as AgentResourceContent, h as DevframeCapabilities, ht as AgentResource, i as DevframeDeploymentKind, it as DevframeViewHost, l as DevframeSpaOptions, lt as DevframeDefineDiagnosticsOptions, m as ConnectionMetaWebsocket, mt as AgentManifest, n as DevframeCliOptions, nt as ScopedSharedStates, o as DevframeDuplicationStrategy, ot as DevframeRpcServerFunctions, p as ConnectionMeta, pt as AgentHandle, q as DevframeScopedNodeContext, r as DevframeDefinition, rt as SettingsForNamespace, s as DevframeRuntime, st as DevframeRpcSharedStates, t as DevframeBrowserContext, tt as ScopedServerFunctions, u as DevframeWsOptions, ut as DevframeDiagnosticsDefinition, v as RpcBroadcastOptions, vt as AgentTool, w as RpcStreamingHost, wt as EventsMap, x as RpcSharedStateHost, xt as DevframeAgentHostEvents, y as RpcFunctionsHost, yt as AgentToolInput } from "./devframe-CnTVuGw9.mjs";
2
+ import { C as RpcFunctionType, T as RpcReturnSchema, _ as RpcFunctionDefinition, g as RpcFunctionAgentOptions, i as RpcArgsSchema } from "./types-CrzNxXKq.mjs";
3
+ import "./index-DgsLFhZg.mjs";
4
+ import { t as DevframeNodeRpcSessionMeta } from "./ws-server-CceOy6He.mjs";
5
5
  //#region src/define.d.ts
6
6
  declare const defineRpcFunction: <NAME extends string, TYPE extends RpcFunctionType, ARGS extends any[], RETURN = void, const AS extends RpcArgsSchema | undefined = undefined, const RS extends RpcReturnSchema | undefined = undefined>(definition: RpcFunctionDefinition<NAME, TYPE, ARGS, RETURN, AS, RS, DevframeNodeContext>) => RpcFunctionDefinition<NAME, TYPE, ARGS, RETURN, AS, RS, DevframeNodeContext>;
7
7
  //#endregion
8
- export { type AgentHandle, type AgentManifest, type AgentResource, type AgentResourceContent, type AgentResourceInput, type AgentTool, type AgentToolInput, type ConnectionMeta, type ConnectionMetaWebsocket, type DevframeAgentHost, type DevframeAgentHostEvents, type DevframeBrowserContext, type DevframeCapabilities, type DevframeCliOptions, type DevframeDefineDiagnosticsOptions, type DevframeDefinition, type DevframeDeploymentKind, type DevframeDiagnosticsDefinition, type DevframeDiagnosticsHost, type DevframeDiagnosticsLogger, type DevframeDuplicationStrategy, type DevframeHost, type DevframeNodeContext, type DevframeNodeRpcSession, type DevframeNodeRpcSessionMeta, type DevframeRpcClientFunctions, type DevframeRpcServerFunctions, type DevframeRpcSharedStates, type DevframeRuntime, type DevframeScopedNodeContext, type DevframeScopedNodeRpc, type DevframeScopedStreamingHost, type DevframeSettings, type DevframeSettingsRegistry, type DevframeSettingsStore, type DevframeSetupInfo, type DevframeSpaOptions, type DevframeViewHost, type DevframeWsOptions, type EntriesToObject, type EventEmitter, type EventUnsubscribe, type EventsMap, type McpRouteOptions, type PartialWithoutId, type RpcBroadcastOptions, type RpcFunctionAgentOptions, type RpcFunctionsHost, type RpcSharedStateGetOptions, type RpcSharedStateHost, type RpcStreamingChannel, type RpcStreamingChannelOptions, type RpcStreamingHost, type ScopedBroadcastOptions, type ScopedClientFunctions, type ScopedServerFunctions, type ScopedSharedStates, type SettingsForNamespace, type Thenable, type defineDevframe, defineRpcFunction };
8
+ export { type AgentHandle, type AgentManifest, type AgentResource, type AgentResourceContent, type AgentResourceInput, type AgentTool, type AgentToolInput, type ConnectionMeta, type ConnectionMetaWebsocket, type DevframeAgentHost, type DevframeAgentHostEvents, type DevframeBrowserContext, type DevframeCapabilities, type DevframeCliOptions, type DevframeDefineDiagnosticsOptions, type DevframeDefinition, type DevframeDeploymentKind, type DevframeDiagnosticsDefinition, type DevframeDiagnosticsHost, type DevframeDiagnosticsLogger, type DevframeDockDefaults, type DevframeDuplicationStrategy, type DevframeHost, type DevframeNodeContext, type DevframeNodeRpcSession, type DevframeNodeRpcSessionMeta, type DevframeRpcClientFunctions, type DevframeRpcServerFunctions, type DevframeRpcSharedStates, type DevframeRuntime, type DevframeScopedNodeContext, type DevframeScopedNodeRpc, type DevframeScopedStreamingHost, type DevframeSettings, type DevframeSettingsRegistry, type DevframeSettingsStore, type DevframeSetupInfo, type DevframeSpaOptions, type DevframeViewHost, type DevframeWsOptions, type EntriesToObject, type EventEmitter, type EventUnsubscribe, type EventsMap, type McpRouteOptions, type PartialWithoutId, type RpcBroadcastOptions, type RpcFunctionAgentOptions, type RpcFunctionsHost, type RpcSharedStateGetOptions, type RpcSharedStateHost, type RpcStreamingChannel, type RpcStreamingChannelOptions, type RpcStreamingHost, type ScopedBroadcastOptions, type ScopedClientFunctions, type ScopedServerFunctions, type ScopedSharedStates, type SettingsForNamespace, type Thenable, type defineDevframe, defineRpcFunction };