devframe 0.9.0-beta.8 → 0.9.0

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 (77) hide show
  1. package/dist/{_shared-QkI6ljJS.d.mts → _shared-BPmX9fqK.d.mts} +1 -1
  2. package/dist/_shared-CbZ_yhbz.mjs +68 -0
  3. package/dist/adapters/build.d.mts +2 -2
  4. package/dist/adapters/build.mjs +6 -6
  5. package/dist/adapters/cac.d.mts +1 -1
  6. package/dist/adapters/cac.mjs +3 -3
  7. package/dist/adapters/dev.d.mts +4 -4
  8. package/dist/adapters/dev.mjs +2 -2
  9. package/dist/adapters/embedded.d.mts +1 -1
  10. package/dist/adapters/initiate.d.mts +3 -3
  11. package/dist/adapters/initiate.mjs +1 -1
  12. package/dist/adapters/mcp.d.mts +1 -1
  13. package/dist/adapters/mcp.mjs +1 -1
  14. package/dist/cli/main.mjs +3 -3
  15. package/dist/client/index.d.mts +1 -1
  16. package/dist/client/index.mjs +22 -4
  17. package/dist/constants.d.mts +10 -1
  18. package/dist/constants.mjs +10 -1
  19. package/dist/{context-CQkRTbAc.d.mts → context-B3YUu_95.d.mts} +1 -1
  20. package/dist/{context-D0HD0F7C.mjs → context-CEe4PBz1.mjs} +7 -300
  21. package/dist/{context-D0jErmlx.mjs → context-xdynGSLP.mjs} +1 -1
  22. package/dist/{dev-QEuT8SOF.mjs → dev--rAPzbvO.mjs} +6 -6
  23. package/dist/{devframe-Cfx6doi4.d.mts → devframe-DJMg0WLe.d.mts} +7 -16
  24. package/dist/{diagnostics-hwjXp_UV.mjs → diagnostics-CD8nlgll.mjs} +1 -3
  25. package/dist/{diagnostics-DEuH3P5O.mjs → diagnostics-DOQPnQmX.mjs} +1 -3
  26. package/dist/{_shared-CKZPvSrN.mjs → dist-eNI9qM_I.mjs} +1 -67
  27. package/dist/{host-agent-C5HjzfBz.mjs → host-agent-xLCSe65D.mjs} +1 -1
  28. package/dist/{http-CVwj7b4g.mjs → http-DYpK0cUi.mjs} +4 -4
  29. package/dist/{index-MYi1SZVL.d.mts → index-CB-fSUyn.d.mts} +2 -2
  30. package/dist/index.d.mts +4 -3
  31. package/dist/{instance-registry-M2p-z6xE.mjs → instance-registry-WvQkt42E.mjs} +1 -1
  32. package/dist/{instance-shell-DJ8s-MFw.mjs → instance-shell-CMFyszWJ.mjs} +5 -5
  33. package/dist/{instance-shell-D_UA0Idz.d.mts → instance-shell-CljiKq1c.d.mts} +2 -2
  34. package/dist/internal/index.d.mts +8 -16
  35. package/dist/internal/index.mjs +7 -7
  36. package/dist/node/auth.d.mts +2 -2
  37. package/dist/node/hub-internals.d.mts +2 -2
  38. package/dist/node/hub-internals.mjs +2 -2
  39. package/dist/node/index.d.mts +1 -1
  40. package/dist/node/index.mjs +2 -2
  41. package/dist/nostics-CzECRXpE.mjs +59 -0
  42. package/dist/nostics-SPGDgHEP.d.mts +33 -0
  43. package/dist/recipes/common-rpc-functions.d.mts +1 -1
  44. package/dist/recipes/interactive-auth.d.mts +2 -2
  45. package/dist/recipes/interactive-auth.mjs +2 -2
  46. package/dist/{remote-assets-DclsYyoL.d.mts → remote-assets-Bg4gCUZ_.d.mts} +19 -2
  47. package/dist/remote-assets-nTTxY2MU.mjs +636 -0
  48. package/dist/rpc/dump.mjs +1 -1
  49. package/dist/rpc/index.mjs +3 -3
  50. package/dist/rpc/transports/sse-client.mjs +1 -1
  51. package/dist/rpc/transports/sse-server.mjs +2 -2
  52. package/dist/rpc/transports/ws-bun.d.mts +1 -1
  53. package/dist/rpc/transports/ws-bun.mjs +1 -1
  54. package/dist/rpc/transports/ws-client.mjs +1 -1
  55. package/dist/rpc/transports/ws-server.mjs +1 -1
  56. package/dist/{rpc-core-C8JQ3p7A.d.mts → rpc-core-Cc4lucI0.d.mts} +2 -2
  57. package/dist/{rpc-core-IhcWl_xn.mjs → rpc-core-DMTe-hLo.mjs} +1 -1
  58. package/dist/{serialization-BHY8M5NQ.mjs → serialization-BGzEwAdr.mjs} +1 -1
  59. package/dist/{static-CvjkO8QE.mjs → static-BPZ1_OPA.mjs} +2 -2
  60. package/dist/{storage-BVuipbGS.mjs → storage-CYye7P7L.mjs} +1 -1
  61. package/dist/types/index.d.mts +4 -3
  62. package/dist/utils/events.d.mts +1 -1
  63. package/dist/utils/get-port.d.mts +17 -0
  64. package/dist/utils/get-port.mjs +2 -0
  65. package/dist/utils/nostics.d.mts +2 -0
  66. package/dist/utils/nostics.mjs +2 -0
  67. package/dist/utils/remote-assets.d.mts +1 -1
  68. package/dist/utils/remote-assets.mjs +1 -308
  69. package/dist/utils/serve-static.d.mts +1 -1
  70. package/dist/utils/serve-static.mjs +16 -0
  71. package/dist/utils/shared-state.d.mts +1 -1
  72. package/dist/utils/streaming-channel.d.mts +1 -1
  73. package/dist/{validation-BiuDXTKW.mjs → validation-CpXFB6Dz.mjs} +1 -1
  74. package/dist/{wire-codec-9VhIKnyp.mjs → wire-codec-0K-o5MYW.mjs} +1 -3
  75. package/dist/{ws-server-Bk1hOG3X.mjs → ws-server-BdSLrhxE.mjs} +1 -1
  76. package/package.json +3 -1
  77. package/dist/diagnostics-reporter-CsIG85Q5.mjs +0 -38
@@ -1,10 +1,10 @@
1
1
  import { DEVFRAME_CONNECTION_META_FILENAME } from "./constants.mjs";
2
- import { t as diagnostics } from "./diagnostics-DEuH3P5O.mjs";
3
- import { t as createHostContext } from "./context-D0HD0F7C.mjs";
4
- import { resolveStaticAssetsSource } from "./utils/remote-assets.mjs";
5
- import { i as resolveMcpConnectionMeta, n as resolveBasePath, r as resolveDevServerPort, t as normalizeBasePath } from "./_shared-CKZPvSrN.mjs";
2
+ import { t as diagnostics } from "./diagnostics-DOQPnQmX.mjs";
3
+ import { t as createHostContext } from "./context-CEe4PBz1.mjs";
4
+ import { t as resolveStaticAssetsSource } from "./remote-assets-nTTxY2MU.mjs";
5
+ import { i as resolveMcpConnectionMeta, n as resolveBasePath, r as resolveDevServerPort, t as normalizeBasePath } from "./_shared-CbZ_yhbz.mjs";
6
6
  import { t as createH3DevframeHost } from "./host-h3-Crkzm42q.mjs";
7
- import { i as normalizeHttpServerUrl, n as resolveInstanceRegister, t as createInstanceShell } from "./instance-shell-DJ8s-MFw.mjs";
7
+ import { i as normalizeHttpServerUrl, n as resolveInstanceRegister, t as createInstanceShell } from "./instance-shell-CMFyszWJ.mjs";
8
8
  import { open } from "./utils/open.mjs";
9
9
  import { mountStaticHandler } from "./utils/serve-static.mjs";
10
10
  import { createServer } from "node:http";
@@ -87,7 +87,7 @@ function initDevframe(def, options) {
87
87
  const mcpPath = joinURL(base, mcpMeta.path);
88
88
  let mountMcpHttp;
89
89
  try {
90
- ({mountMcpHttp} = await import("./http-CVwj7b4g.mjs").then((n) => n.t));
90
+ ({mountMcpHttp} = await import("./http-DYpK0cUi.mjs").then((n) => n.t));
91
91
  } catch (error) {
92
92
  const reason = error instanceof Error ? error.message : String(error);
93
93
  throw diagnostics.DF0017({
@@ -1,11 +1,11 @@
1
1
  import { d as RpcFunctionsCollectorBase } from "./index-tdrk1bzV.mjs";
2
2
  import { _ as RpcFunctionDefinition, v as RpcFunctionDefinitionAny } from "./types-Djq7CBXh.mjs";
3
3
  import { d as DevframeRpcConnection, u as DevframeNodeRpcSessionMeta } from "./ws-server-D1d3QM9f.mjs";
4
- import { a as StaticAssetsSource, i as RemoteAssetsStore } from "./remote-assets-DclsYyoL.mjs";
4
+ import { m as defineDiagnostics } from "./nostics-SPGDgHEP.mjs";
5
+ import { a as RemoteAssetsStore, o as StaticAssetsSource } from "./remote-assets-Bg4gCUZ_.mjs";
5
6
  import { CAC } from "cac";
6
7
  import { StandardSchemaV1 } from "@standard-schema/spec";
7
8
  import { BirpcReturn } from "birpc";
8
- import { Diagnostic, DiagnosticDefinition, defineDiagnostics } from "nostics";
9
9
  //#region src/adapters/flags.d.ts
10
10
  /**
11
11
  * Schema map for typed CLI flags. Keys are flag names in camelCase —
@@ -844,16 +844,6 @@ interface RpcStreamingHost {
844
844
  * integrations.
845
845
  */
846
846
  type DevframeDiagnosticsLogger = Record<string, any>;
847
- /**
848
- * Options accepted by the host's `defineDiagnostics()` factory — mirrors
849
- * `nostics`'s shape but the host pre-wires its ANSI console reporter, so
850
- * plugins typically omit `reporters`.
851
- */
852
- interface DevframeDefineDiagnosticsOptions<Codes extends Record<string, DiagnosticDefinition>> {
853
- docsBase?: string | ((code: keyof Codes) => string | undefined);
854
- codes: Codes;
855
- reporters?: ReadonlyArray<(d: Diagnostic, o?: any) => void>;
856
- }
857
847
  /**
858
848
  * Host for structured diagnostics — a thin layer over `nostics` that lets
859
849
  * integrations register their own coded errors/warnings into a shared
@@ -896,10 +886,11 @@ interface DevframeDiagnosticsHost {
896
886
  register: (definitions: Record<string, unknown>) => void;
897
887
  /**
898
888
  * Build a typed diagnostics object with the host's ANSI console reporter
899
- * pre-wired. Mirrors `nostics`'s `defineDiagnostics` so integrations don't
900
- * need to take a direct dependency on `nostics`.
889
+ * pre-wired. The same `devframe/utils/nostics` `defineDiagnostics` every
890
+ * built-in plugin's module-level `diagnostics.ts` uses, so integrations
891
+ * don't need to take a direct dependency on `nostics`.
901
892
  */
902
- defineDiagnostics: <const Codes extends Record<string, DiagnosticDefinition>>(options: DevframeDefineDiagnosticsOptions<Codes>) => ReturnType<typeof defineDiagnostics<Codes, any>>;
893
+ defineDiagnostics: typeof defineDiagnostics;
903
894
  }
904
895
  //#endregion
905
896
  //#region src/types/host.d.ts
@@ -1855,4 +1846,4 @@ interface DevframeDefinition {
1855
1846
  cli?: DevframeCliOptions;
1856
1847
  }
1857
1848
  //#endregion
1858
- export { StreamErrorPayload as $, ScopedServerFunctions as A, InferCliFlags as At, RpcBroadcastOptions as B, DevframeScopedStreamingHost as C, AgentToolProviderHandle as Ct, ScopedBroadcastOptions as D, EventUnsubscribe as Dt, DevframeSettingsStore as E, EventEmitter as Et, DevframeStorageScope as F, RpcStreamingChannelOptions as G, RpcSharedStateGetOptions as H, DevframeDefineDiagnosticsOptions as I, DevframeRpcServerFunctions as J, RpcStreamingHost as K, DevframeDiagnosticsHost as L, SettingsForNamespace as M, parseCliFlags as Mt, DevframeViewHost as N, ScopedClientFunctions as O, EventsMap as Ot, DevframeHost as P, CreateStreamSinkOptions as Q, DevframeDiagnosticsLogger as R, DevframeScopedNodeRpc as S, AgentToolProvider as St, DevframeSettingsRegistry as T, DevframeAgentHostEvents as Tt, RpcSharedStateHost as U, RpcFunctionsHost as V, RpcStreamingChannel as W, BufferedChunk as X, DevframeRpcSharedStates as Y, CreateStreamReaderOptions as Z, DevframeServiceId as _, AgentResource as _t, DevframeDuplicationStrategy as a, Immutable as at, DevframeServicesRegistry as b, AgentTool as bt, DevframeWsOptions as c, ImmutableObject as ct, ConnectionMeta as d, SharedStateEvents as dt, StreamReader as et, ConnectionMetaSse as f, SharedStateOptions as ft, DevframeNodeContext as g, AgentManifest as gt, DevframeConnectionConfigsRegistry as h, AgentHandle as ht, DevframeDockDefaults as i, createStreamSink as it, ScopedSharedStates as j, defineCliFlags as jt, ScopedRpcFn as k, CliFlagsSchema as kt, McpRouteOptions as l, ImmutableSet as lt, DevframeCapabilities as m, createSharedState as mt, DevframeDefinition as n, StreamSinkEvents as nt, DevframeSetupInfo as o, ImmutableArray as ot, ConnectionMetaWebsocket as p, SharedStatePatch as pt, DevframeRpcClientFunctions as q, DevframeDeploymentKind as r, createStreamReader as rt, DevframeSseOptions as s, ImmutableMap as st, DevframeCliOptions as t, StreamSink as tt, DevframeAuthHandler as u, SharedState as ut, DevframeServiceOf as v, AgentResourceContent as vt, DevframeSettings as w, DevframeAgentHost as wt, DevframeScopedNodeContext as x, AgentToolInput as xt, DevframeServicesHost as y, AgentResourceInput as yt, DevframeNodeRpcSession as z };
1849
+ export { StreamReader as $, ScopedServerFunctions as A, defineCliFlags as At, RpcFunctionsHost as B, DevframeScopedStreamingHost as C, DevframeAgentHost as Ct, ScopedBroadcastOptions as D, EventsMap as Dt, DevframeSettingsStore as E, EventUnsubscribe as Et, DevframeStorageScope as F, RpcStreamingHost as G, RpcSharedStateHost as H, DevframeDiagnosticsHost as I, DevframeRpcSharedStates as J, DevframeRpcClientFunctions as K, DevframeDiagnosticsLogger as L, SettingsForNamespace as M, DevframeViewHost as N, ScopedClientFunctions as O, CliFlagsSchema as Ot, DevframeHost as P, StreamErrorPayload as Q, DevframeNodeRpcSession as R, DevframeScopedNodeRpc as S, AgentToolProviderHandle as St, DevframeSettingsRegistry as T, EventEmitter as Tt, RpcStreamingChannel as U, RpcSharedStateGetOptions as V, RpcStreamingChannelOptions as W, CreateStreamReaderOptions as X, BufferedChunk as Y, CreateStreamSinkOptions as Z, DevframeServiceId as _, AgentResourceContent as _t, DevframeDuplicationStrategy as a, ImmutableArray as at, DevframeServicesRegistry as b, AgentToolInput as bt, DevframeWsOptions as c, ImmutableSet as ct, ConnectionMeta as d, SharedStateOptions as dt, StreamSink as et, ConnectionMetaSse as f, SharedStatePatch as ft, DevframeNodeContext as g, AgentResource as gt, DevframeConnectionConfigsRegistry as h, AgentManifest as ht, DevframeDockDefaults as i, Immutable as it, ScopedSharedStates as j, parseCliFlags as jt, ScopedRpcFn as k, InferCliFlags as kt, McpRouteOptions as l, SharedState as lt, DevframeCapabilities as m, AgentHandle as mt, DevframeDefinition as n, createStreamReader as nt, DevframeSetupInfo as o, ImmutableMap as ot, ConnectionMetaWebsocket as p, createSharedState as pt, DevframeRpcServerFunctions as q, DevframeDeploymentKind as r, createStreamSink as rt, DevframeSseOptions as s, ImmutableObject as st, DevframeCliOptions as t, StreamSinkEvents as tt, DevframeAuthHandler as u, SharedStateEvents as ut, DevframeServiceOf as v, AgentResourceInput as vt, DevframeSettings as w, DevframeAgentHostEvents as wt, DevframeScopedNodeContext as x, AgentToolProvider as xt, DevframeServicesHost as y, AgentTool as yt, RpcBroadcastOptions as z };
@@ -1,9 +1,7 @@
1
- import { t as devframeReporter } from "./diagnostics-reporter-CsIG85Q5.mjs";
2
- import { defineDiagnostics } from "nostics";
1
+ import { i as defineDiagnostics } from "./nostics-CzECRXpE.mjs";
3
2
  //#region src/rpc/diagnostics.ts
4
3
  const diagnostics = defineDiagnostics({
5
4
  docsBase: "https://devfra.me/errors",
6
- reporters: [devframeReporter],
7
5
  codes: {
8
6
  DF0019: {
9
7
  why: (p) => `RPC function "${p.name}" has \`agent\` set but \`jsonSerializable\` is not \`true\` — MCP requires JSON-serializable data.`,
@@ -1,9 +1,7 @@
1
- import { t as devframeReporter } from "./diagnostics-reporter-CsIG85Q5.mjs";
2
- import { defineDiagnostics } from "nostics";
1
+ import { i as defineDiagnostics } from "./nostics-CzECRXpE.mjs";
3
2
  //#region src/node/diagnostics.ts
4
3
  const diagnostics = defineDiagnostics({
5
4
  docsBase: "https://devfra.me/errors",
6
- reporters: [devframeReporter],
7
5
  codes: {
8
6
  DF0006: { why: (p) => `RPC function "${p.name}" is not registered` },
9
7
  DF0007: { why: "AsyncLocalStorage is not set, it likely to be an internal bug of the Devframe foundation" },
@@ -1,9 +1,7 @@
1
1
  import { n as __exportAll } from "./rolldown-runtime-JspESFgx.mjs";
2
- import "./constants.mjs";
3
2
  import "node:fs/promises";
4
3
  import { createServer } from "node:net";
5
4
  import { networkInterfaces } from "node:os";
6
- import { cleanDoubleSlashes, withLeadingSlash, withTrailingSlash, withoutLeadingSlash } from "ufo";
7
5
  //#region ../../node_modules/.pnpm/get-port-please@3.2.0/node_modules/get-port-please/dist/index.mjs
8
6
  var dist_exports = /* @__PURE__ */ __exportAll({
9
7
  checkPort: () => checkPort,
@@ -227,68 +225,4 @@ async function checkPort(port, host = process.env.HOST, verbose) {
227
225
  return port;
228
226
  }
229
227
  //#endregion
230
- //#region src/adapters/_shared.ts
231
- const DEFAULT_PORT = 9999;
232
- /**
233
- * Resolve the mount base path for a devframe's SPA. Hosted adapters
234
- * (`vite`, `embedded`) default to `/__<id>/` so they don't collide
235
- * with the host app; standalone adapters (`cli`, `build`)
236
- * default to `/` because they own the origin.
237
- *
238
- * The devframe author can override with `basePath` on the definition.
239
- */
240
- function resolveBasePath(def, kind) {
241
- if (def.basePath) return normalizeBasePath(def.basePath);
242
- return kind === "standalone" ? "/" : `/__${def.id}/`;
243
- }
244
- function normalizeBasePath(base) {
245
- return cleanDoubleSlashes(withTrailingSlash(withLeadingSlash(base)));
246
- }
247
- /**
248
- * Resolve the listening port for `createDevServer` (and `createHandler`'s
249
- * side-car tiers), honoring the definition's `cli.port` / `cli.portRange` /
250
- * `cli.random` settings. Exposed separately so authors who run their own
251
- * argv parsing can resolve a port up-front (to print it, log it, etc.)
252
- * before starting the server.
253
- */
254
- async function resolveDevServerPort(def, options = {}) {
255
- const host = options.host ?? def.cli?.host ?? "localhost";
256
- const portOptions = {
257
- port: options.defaultPort ?? def.cli?.port ?? DEFAULT_PORT,
258
- host
259
- };
260
- if (def.cli?.portRange) portOptions.portRange = def.cli.portRange;
261
- if (def.cli?.random) portOptions.random = def.cli.random;
262
- return getPort(portOptions);
263
- }
264
- /**
265
- * Normalize the `cli.mcp` / `mcp` option (`boolean | McpRouteOptions`) into
266
- * concrete options, or `undefined` when the MCP route is disabled.
267
- */
268
- function resolveMcpConfig(mcp) {
269
- if (!mcp) return void 0;
270
- return mcp === true ? {} : mcp;
271
- }
272
- /**
273
- * Resolve the `mcp` entry a `__connection.json` should advertise for a dev
274
- * server started with the given `mcp` option (falling back to `def.cli?.mcp`,
275
- * exactly like `createDevServer`), or `undefined` when the route is
276
- * disabled.
277
- *
278
- * Hosted bridges that hand-roll their connection meta pass the side-car
279
- * `port`: the advertised path becomes absolute (the side-car mounts at `/`)
280
- * and the client dials `<page-host>:<port><path>`. Without `port` the path
281
- * stays relative, resolved against `__connection.json`'s own location (the
282
- * same-server default).
283
- */
284
- function resolveMcpConnectionMeta(def, mcp, port) {
285
- const config = resolveMcpConfig(mcp ?? def.cli?.mcp);
286
- if (!config) return void 0;
287
- const route = withoutLeadingSlash(config.path ?? "__mcp");
288
- return port != null ? {
289
- path: withLeadingSlash(route),
290
- port
291
- } : { path: route };
292
- }
293
- //#endregion
294
- export { dist_exports as a, resolveMcpConnectionMeta as i, resolveBasePath as n, resolveDevServerPort as r, normalizeBasePath as t };
228
+ export { getPort as n, dist_exports as t };
@@ -1,4 +1,4 @@
1
- import { t as diagnostics } from "./diagnostics-DEuH3P5O.mjs";
1
+ import { t as diagnostics } from "./diagnostics-DOQPnQmX.mjs";
2
2
  //#region src/utils/events.ts
3
3
  /**
4
4
  * Create event emitter.
@@ -1,10 +1,10 @@
1
1
  import { n as __exportAll } from "./rolldown-runtime-JspESFgx.mjs";
2
- import { i as isAllowedOrigin } from "./ws-server-Bk1hOG3X.mjs";
3
- import { t as diagnostics } from "./diagnostics-DEuH3P5O.mjs";
4
- import { t as createHostContext } from "./context-D0HD0F7C.mjs";
2
+ import { t as Diagnostic } from "./nostics-CzECRXpE.mjs";
3
+ import { i as isAllowedOrigin } from "./ws-server-BdSLrhxE.mjs";
4
+ import { t as diagnostics } from "./diagnostics-DOQPnQmX.mjs";
5
+ import { t as createHostContext } from "./context-CEe4PBz1.mjs";
5
6
  import { t as toAgentToolName } from "./agent-tool-name-EgfoFO8C.mjs";
6
7
  import { randomUUID } from "node:crypto";
7
- import { Diagnostic } from "nostics";
8
8
  import { join } from "pathe";
9
9
  import process from "node:process";
10
10
  import { homedir } from "node:os";
@@ -1,5 +1,5 @@
1
- import { g as DevframeNodeContext, ut as SharedState, z as DevframeNodeRpcSession } from "./devframe-Cfx6doi4.mjs";
2
- import { n as InternalAnonymousAuthStorage } from "./context-CQkRTbAc.mjs";
1
+ import { R as DevframeNodeRpcSession, g as DevframeNodeContext, lt as SharedState } from "./devframe-DJMg0WLe.mjs";
2
+ import { n as InternalAnonymousAuthStorage } from "./context-B3YUu_95.mjs";
3
3
  //#region src/node/auth/revoke.d.ts
4
4
  /**
5
5
  * Flip `isTrusted` to false on any live WS clients connected with `token`
package/dist/index.d.mts CHANGED
@@ -1,8 +1,9 @@
1
- import { A as ScopedServerFunctions, B as RpcBroadcastOptions, C as DevframeScopedStreamingHost, Ct as AgentToolProviderHandle, D as ScopedBroadcastOptions, Dt as EventUnsubscribe, E as DevframeSettingsStore, Et as EventEmitter, F as DevframeStorageScope, G as RpcStreamingChannelOptions, H as RpcSharedStateGetOptions, I as DevframeDefineDiagnosticsOptions, J as DevframeRpcServerFunctions, K as RpcStreamingHost, L as DevframeDiagnosticsHost, M as SettingsForNamespace, N as DevframeViewHost, O as ScopedClientFunctions, Ot as EventsMap, P as DevframeHost, R as DevframeDiagnosticsLogger, S as DevframeScopedNodeRpc, St as AgentToolProvider, T as DevframeSettingsRegistry, Tt as DevframeAgentHostEvents, U as RpcSharedStateHost, V as RpcFunctionsHost, W as RpcStreamingChannel, Y as DevframeRpcSharedStates, _ as DevframeServiceId, _t as AgentResource, a as DevframeDuplicationStrategy, b as DevframeServicesRegistry, bt as AgentTool, c as DevframeWsOptions, d as ConnectionMeta, f as ConnectionMetaSse, g as DevframeNodeContext, gt as AgentManifest, h as DevframeConnectionConfigsRegistry, ht as AgentHandle, i as DevframeDockDefaults, j as ScopedSharedStates, k as ScopedRpcFn, l as McpRouteOptions, m as DevframeCapabilities, n as DevframeDefinition, o as DevframeSetupInfo, p as ConnectionMetaWebsocket, q as DevframeRpcClientFunctions, r as DevframeDeploymentKind, s as DevframeSseOptions, t as DevframeCliOptions, v as DevframeServiceOf, vt as AgentResourceContent, w as DevframeSettings, wt as DevframeAgentHost, x as DevframeScopedNodeContext, xt as AgentToolInput, y as DevframeServicesHost, yt as AgentResourceInput, z as DevframeNodeRpcSession } from "./devframe-Cfx6doi4.mjs";
1
+ import { A as ScopedServerFunctions, B as RpcFunctionsHost, C as DevframeScopedStreamingHost, Ct as DevframeAgentHost, D as ScopedBroadcastOptions, Dt as EventsMap, E as DevframeSettingsStore, Et as EventUnsubscribe, F as DevframeStorageScope, G as RpcStreamingHost, H as RpcSharedStateHost, I as DevframeDiagnosticsHost, J as DevframeRpcSharedStates, K as DevframeRpcClientFunctions, L as DevframeDiagnosticsLogger, M as SettingsForNamespace, N as DevframeViewHost, O as ScopedClientFunctions, P as DevframeHost, R as DevframeNodeRpcSession, S as DevframeScopedNodeRpc, St as AgentToolProviderHandle, T as DevframeSettingsRegistry, Tt as EventEmitter, U as RpcStreamingChannel, V as RpcSharedStateGetOptions, W as RpcStreamingChannelOptions, _ as DevframeServiceId, _t as AgentResourceContent, a as DevframeDuplicationStrategy, b as DevframeServicesRegistry, bt as AgentToolInput, c as DevframeWsOptions, d as ConnectionMeta, f as ConnectionMetaSse, g as DevframeNodeContext, gt as AgentResource, h as DevframeConnectionConfigsRegistry, ht as AgentManifest, i as DevframeDockDefaults, j as ScopedSharedStates, k as ScopedRpcFn, l as McpRouteOptions, m as DevframeCapabilities, mt as AgentHandle, n as DevframeDefinition, o as DevframeSetupInfo, p as ConnectionMetaWebsocket, q as DevframeRpcServerFunctions, r as DevframeDeploymentKind, s as DevframeSseOptions, t as DevframeCliOptions, v as DevframeServiceOf, vt as AgentResourceInput, w as DevframeSettings, wt as DevframeAgentHostEvents, x as DevframeScopedNodeContext, xt as AgentToolProvider, y as DevframeServicesHost, yt as AgentTool, z as RpcBroadcastOptions } from "./devframe-DJMg0WLe.mjs";
2
2
  import "./index-tdrk1bzV.mjs";
3
3
  import { C as RpcFunctionType, T as RpcReturnSchema, _ as RpcFunctionDefinition, g as RpcFunctionAgentOptions, i as RpcArgsSchema } from "./types-Djq7CBXh.mjs";
4
4
  import { d as DevframeRpcConnection, f as DevframeRpcConnectionRequest, p as DevframeRpcTransportKind, u as DevframeNodeRpcSessionMeta } from "./ws-server-D1d3QM9f.mjs";
5
- import { a as StaticAssetsSource, i as RemoteAssetsStore, n as RemoteAssetsProvider, r as RemoteAssetsProviderCustom, t as RemoteAssets } from "./remote-assets-DclsYyoL.mjs";
5
+ import { i as DevframeDefineDiagnosticsOptions } from "./nostics-SPGDgHEP.mjs";
6
+ import { a as RemoteAssetsStore, i as RemoteAssetsProviderCustom, n as RemoteAssetsErrorMessage, o as StaticAssetsSource, r as RemoteAssetsProvider, t as RemoteAssets } from "./remote-assets-Bg4gCUZ_.mjs";
6
7
  //#region src/define.d.ts
7
8
  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>;
8
9
  /**
@@ -11,4 +12,4 @@ declare const defineRpcFunction: <NAME extends string, TYPE extends RpcFunctionT
11
12
  */
12
13
  declare function defineDevframe(d: DevframeDefinition): DevframeDefinition;
13
14
  //#endregion
14
- export { type AgentHandle, type AgentManifest, type AgentResource, type AgentResourceContent, type AgentResourceInput, type AgentTool, type AgentToolInput, type AgentToolProvider, type AgentToolProviderHandle, type ConnectionMeta, type ConnectionMetaSse, type ConnectionMetaWebsocket, type DevframeAgentHost, type DevframeAgentHostEvents, type DevframeCapabilities, type DevframeCliOptions, type DevframeConnectionConfigsRegistry, type DevframeDefineDiagnosticsOptions, type DevframeDefinition, type DevframeDeploymentKind, type DevframeDiagnosticsHost, type DevframeDiagnosticsLogger, type DevframeDockDefaults, type DevframeDuplicationStrategy, type DevframeHost, type DevframeNodeContext, type DevframeNodeRpcSession, type DevframeNodeRpcSessionMeta, type DevframeRpcClientFunctions, type DevframeRpcConnection, type DevframeRpcConnectionRequest, type DevframeRpcServerFunctions, type DevframeRpcSharedStates, type DevframeRpcTransportKind, type DevframeScopedNodeContext, type DevframeScopedNodeRpc, type DevframeScopedStreamingHost, type DevframeServiceId, type DevframeServiceOf, type DevframeServicesHost, type DevframeServicesRegistry, type DevframeSettings, type DevframeSettingsRegistry, type DevframeSettingsStore, type DevframeSetupInfo, type DevframeSseOptions, type DevframeStorageScope, type DevframeViewHost, type DevframeWsOptions, type EventEmitter, type EventUnsubscribe, type EventsMap, type McpRouteOptions, type RemoteAssets, type RemoteAssetsProvider, type RemoteAssetsProviderCustom, type RemoteAssetsStore, type RpcBroadcastOptions, type RpcFunctionAgentOptions, type RpcFunctionsHost, type RpcSharedStateGetOptions, type RpcSharedStateHost, type RpcStreamingChannel, type RpcStreamingChannelOptions, type RpcStreamingHost, type ScopedBroadcastOptions, type ScopedClientFunctions, type ScopedRpcFn, type ScopedServerFunctions, type ScopedSharedStates, type SettingsForNamespace, type StaticAssetsSource, defineDevframe, defineRpcFunction };
15
+ export { type AgentHandle, type AgentManifest, type AgentResource, type AgentResourceContent, type AgentResourceInput, type AgentTool, type AgentToolInput, type AgentToolProvider, type AgentToolProviderHandle, type ConnectionMeta, type ConnectionMetaSse, type ConnectionMetaWebsocket, type DevframeAgentHost, type DevframeAgentHostEvents, type DevframeCapabilities, type DevframeCliOptions, type DevframeConnectionConfigsRegistry, type DevframeDefineDiagnosticsOptions, type DevframeDefinition, type DevframeDeploymentKind, type DevframeDiagnosticsHost, type DevframeDiagnosticsLogger, type DevframeDockDefaults, type DevframeDuplicationStrategy, type DevframeHost, type DevframeNodeContext, type DevframeNodeRpcSession, type DevframeNodeRpcSessionMeta, type DevframeRpcClientFunctions, type DevframeRpcConnection, type DevframeRpcConnectionRequest, type DevframeRpcServerFunctions, type DevframeRpcSharedStates, type DevframeRpcTransportKind, type DevframeScopedNodeContext, type DevframeScopedNodeRpc, type DevframeScopedStreamingHost, type DevframeServiceId, type DevframeServiceOf, type DevframeServicesHost, type DevframeServicesRegistry, type DevframeSettings, type DevframeSettingsRegistry, type DevframeSettingsStore, type DevframeSetupInfo, type DevframeSseOptions, type DevframeStorageScope, type DevframeViewHost, type DevframeWsOptions, type EventEmitter, type EventUnsubscribe, type EventsMap, type McpRouteOptions, type RemoteAssets, type RemoteAssetsErrorMessage, type RemoteAssetsProvider, type RemoteAssetsProviderCustom, type RemoteAssetsStore, type RpcBroadcastOptions, type RpcFunctionAgentOptions, type RpcFunctionsHost, type RpcSharedStateGetOptions, type RpcSharedStateHost, type RpcStreamingChannel, type RpcStreamingChannelOptions, type RpcStreamingHost, type ScopedBroadcastOptions, type ScopedClientFunctions, type ScopedRpcFn, type ScopedServerFunctions, type ScopedSharedStates, type SettingsForNamespace, type StaticAssetsSource, defineDevframe, defineRpcFunction };
@@ -1,5 +1,5 @@
1
1
  import { n as __exportAll } from "./rolldown-runtime-JspESFgx.mjs";
2
- import { t as diagnostics } from "./diagnostics-DEuH3P5O.mjs";
2
+ import { t as diagnostics } from "./diagnostics-DOQPnQmX.mjs";
3
3
  import { mkdirSync, readFileSync, readdirSync, renameSync, rmSync, writeFileSync } from "node:fs";
4
4
  import { join } from "pathe";
5
5
  import process from "node:process";
@@ -1,6 +1,6 @@
1
1
  import "./constants.mjs";
2
- import { t as diagnostics } from "./diagnostics-DEuH3P5O.mjs";
3
- import { t as getInternalContext } from "./context-D0jErmlx.mjs";
2
+ import { t as diagnostics } from "./diagnostics-DOQPnQmX.mjs";
3
+ import { t as getInternalContext } from "./context-xdynGSLP.mjs";
4
4
  import { createInteractiveAuth } from "./recipes/interactive-auth.mjs";
5
5
  import { createServer } from "node:http";
6
6
  import process from "node:process";
@@ -197,7 +197,7 @@ function createInstanceShell(options) {
197
197
  const origin = currentOrigin();
198
198
  if (!cfg || registerPromise || !origin || !meta) return;
199
199
  const resolvedMeta = meta;
200
- registerPromise = import("./instance-registry-M2p-z6xE.mjs").then((n) => n.t).then(({ registerDevframeInstance }) => {
200
+ registerPromise = import("./instance-registry-WvQkt42E.mjs").then((n) => n.t).then(({ registerDevframeInstance }) => {
201
201
  let port = 0;
202
202
  try {
203
203
  const url = new URL(origin);
@@ -257,7 +257,7 @@ function createInstanceShell(options) {
257
257
  let resolvedAuth = false;
258
258
  let corePromise;
259
259
  function ensureCore() {
260
- corePromise ??= import("./rpc-core-IhcWl_xn.mjs").then((n) => n.n).then(({ createContextRpcServer }) => createContextRpcServer({
260
+ corePromise ??= import("./rpc-core-DMTe-hLo.mjs").then((n) => n.n).then(({ createContextRpcServer }) => createContextRpcServer({
261
261
  context: ctx,
262
262
  auth: resolvedAuth,
263
263
  onPeerConnect: options.onPeerConnect,
@@ -298,7 +298,7 @@ function createInstanceShell(options) {
298
298
  allowedOrigins: options.allowedOrigins
299
299
  });
300
300
  if (ws.port != null) return await start(ws.port);
301
- const { getPort } = await import("./_shared-CKZPvSrN.mjs").then((n) => n.a);
301
+ const { getPort } = await import("./dist-eNI9qM_I.mjs").then((n) => n.t);
302
302
  let lastError;
303
303
  for (let attempt = 0; attempt < 3; attempt++) {
304
304
  const port = attempt === 0 && options.resolveSidecarPort ? await options.resolveSidecarPort(sidecarHost) : await getPort({
@@ -1,6 +1,6 @@
1
- import { J as DevframeRpcServerFunctions, c as DevframeWsOptions, d as ConnectionMeta, g as DevframeNodeContext, q as DevframeRpcClientFunctions, s as DevframeSseOptions, u as DevframeAuthHandler, z as DevframeNodeRpcSession } from "./devframe-Cfx6doi4.mjs";
1
+ import { K as DevframeRpcClientFunctions, R as DevframeNodeRpcSession, c as DevframeWsOptions, d as ConnectionMeta, g as DevframeNodeContext, q as DevframeRpcServerFunctions, s as DevframeSseOptions, u as DevframeAuthHandler } from "./devframe-DJMg0WLe.mjs";
2
2
  import { d as DevframeRpcConnection, n as WsOriginRegistry, u as DevframeNodeRpcSessionMeta } from "./ws-server-D1d3QM9f.mjs";
3
- import "./index-MYi1SZVL.mjs";
3
+ import "./index-CB-fSUyn.mjs";
4
4
  import { BirpcGroup } from "birpc";
5
5
  import { NodeAdapter } from "crossws/adapters/node";
6
6
  import { Buffer } from "node:buffer";
@@ -1,10 +1,9 @@
1
- import { Ct as AgentToolProviderHandle, Et as EventEmitter, P as DevframeHost, St as AgentToolProvider, Tt as DevframeAgentHostEvents, _t as AgentResource, bt as AgentTool, g as DevframeNodeContext, gt as AgentManifest, ht as AgentHandle, vt as AgentResourceContent, wt as DevframeAgentHost$1, xt as AgentToolInput, yt as AgentResourceInput } from "../devframe-Cfx6doi4.mjs";
1
+ import { Ct as DevframeAgentHost$1, P as DevframeHost, St as AgentToolProviderHandle, Tt as EventEmitter, _t as AgentResourceContent, bt as AgentToolInput, g as DevframeNodeContext, gt as AgentResource, ht as AgentManifest, mt as AgentHandle, vt as AgentResourceInput, wt as DevframeAgentHostEvents, xt as AgentToolProvider, yt as AgentTool } from "../devframe-DJMg0WLe.mjs";
2
2
  import { v as RpcFunctionDefinitionAny } from "../types-Djq7CBXh.mjs";
3
- import { i as RemoteAssetsStore } from "../remote-assets-DclsYyoL.mjs";
4
- import { a as InstanceShellInit, c as StartedServer, d as samePath, f as DevframeInstanceRecord, h as registerDevframeInstance, i as InstanceShellApi, l as createInstanceShell, m as listLiveDevframeInstances, n as InstanceRegisterConfig, o as InstanceShellInternals, p as DevframeInstanceRegistration, r as InstanceShell, s as InstanceWsTier, t as CreateInstanceShellOptions, u as resolveInstanceRegister } from "../instance-shell-D_UA0Idz.mjs";
5
- import { n as normalizeBasePath, r as resolveBasePath } from "../_shared-QkI6ljJS.mjs";
6
- import { n as CreateContextRpcServerOptions, r as createContextRpcServer, t as ContextRpcServer } from "../rpc-core-C8JQ3p7A.mjs";
7
- import { Diagnostic } from "nostics";
3
+ import { a as RemoteAssetsStore } from "../remote-assets-Bg4gCUZ_.mjs";
4
+ import { a as InstanceShellInit, c as StartedServer, d as samePath, f as DevframeInstanceRecord, h as registerDevframeInstance, i as InstanceShellApi, l as createInstanceShell, m as listLiveDevframeInstances, n as InstanceRegisterConfig, o as InstanceShellInternals, p as DevframeInstanceRegistration, r as InstanceShell, s as InstanceWsTier, t as CreateInstanceShellOptions, u as resolveInstanceRegister } from "../instance-shell-CljiKq1c.mjs";
5
+ import { n as normalizeBasePath, r as resolveBasePath } from "../_shared-BPmX9fqK.mjs";
6
+ import { n as CreateContextRpcServerOptions, r as createContextRpcServer, t as ContextRpcServer } from "../rpc-core-Cc4lucI0.mjs";
8
7
  //#region src/node/agent-args.d.ts
9
8
  /**
10
9
  * How {@link coerceAgentPositionalArgs} treats an args object that carries
@@ -33,12 +32,6 @@ type AgentArgsFallback = 'wrap' | 'drop';
33
32
  */
34
33
  declare function coerceAgentPositionalArgs(args: unknown, schemas: readonly unknown[] | undefined, fallback?: AgentArgsFallback): unknown[];
35
34
  //#endregion
36
- //#region src/utils/diagnostics-reporter.d.ts
37
- interface DevframeReporterOptions {
38
- method?: 'log' | 'warn' | 'error';
39
- }
40
- declare function devframeReporter(d: Diagnostic, { method }?: DevframeReporterOptions): void;
41
- //#endregion
42
35
  //#region src/node/diagnostics.d.ts
43
36
  declare const diagnostics: import("nostics").Diagnostics<{
44
37
  readonly DF0006: {
@@ -287,7 +280,9 @@ declare const diagnostics: import("nostics").Diagnostics<{
287
280
  }) => string;
288
281
  readonly fix: "A remote-assets `package` must be a valid npm package name and `version` an exact semver version (e.g. `1.2.3`) — they are interpolated into CDN URLs and the cache path.";
289
282
  };
290
- }, readonly [typeof devframeReporter]>;
283
+ }, readonly [(d: import("nostics").Diagnostic, { method }?: {
284
+ method?: "log" | "warn" | "error";
285
+ }) => void]>;
291
286
  //#endregion
292
287
  //#region src/node/host-agent.d.ts
293
288
  /**
@@ -369,7 +364,6 @@ declare function normalizeHttpServerUrl(host: string, port: number | string): st
369
364
  * The per-connection `serialize`/`deserialize` pair for a live RPC wire.
370
365
  *
371
366
  * @internal
372
- * implementations; not part of the stable public API.
373
367
  */
374
368
  interface RpcWireCodec {
375
369
  serialize: (msg: any) => string;
@@ -385,7 +379,6 @@ interface RpcWireCodec {
385
379
  * don't collide across connections.
386
380
  *
387
381
  * @internal
388
- * implementations; not part of the stable public API.
389
382
  */
390
383
  declare function createRpcWireCodec(definitions?: ReadonlyMap<string, Pick<RpcFunctionDefinitionAny, 'jsonSerializable'>>): RpcWireCodec;
391
384
  /**
@@ -395,7 +388,6 @@ declare function createRpcWireCodec(definitions?: ReadonlyMap<string, Pick<RpcFu
395
388
  * handed to birpc proper.
396
389
  *
397
390
  * @internal
398
- * implementations; not part of the stable public API.
399
391
  */
400
392
  declare function peekRpcWireFrame(raw: string): {
401
393
  t?: string;
@@ -1,9 +1,9 @@
1
- import { n as peekRpcWireFrame, t as createRpcWireCodec } from "../wire-codec-9VhIKnyp.mjs";
2
- import { t as diagnostics } from "../diagnostics-DEuH3P5O.mjs";
3
- import { n as coerceAgentPositionalArgs, t as DevframeAgentHost } from "../host-agent-C5HjzfBz.mjs";
4
- import { n as resolveBasePath, t as normalizeBasePath } from "../_shared-CKZPvSrN.mjs";
1
+ import { n as peekRpcWireFrame, t as createRpcWireCodec } from "../wire-codec-0K-o5MYW.mjs";
2
+ import { t as diagnostics } from "../diagnostics-DOQPnQmX.mjs";
3
+ import { n as coerceAgentPositionalArgs, t as DevframeAgentHost } from "../host-agent-xLCSe65D.mjs";
4
+ import { n as resolveBasePath, t as normalizeBasePath } from "../_shared-CbZ_yhbz.mjs";
5
5
  import { t as createH3DevframeHost } from "../host-h3-Crkzm42q.mjs";
6
- import { i as registerDevframeInstance, n as listLiveDevframeInstances } from "../instance-registry-M2p-z6xE.mjs";
7
- import { i as normalizeHttpServerUrl, n as resolveInstanceRegister, r as samePath, t as createInstanceShell } from "../instance-shell-DJ8s-MFw.mjs";
8
- import { t as createContextRpcServer } from "../rpc-core-IhcWl_xn.mjs";
6
+ import { i as registerDevframeInstance, n as listLiveDevframeInstances } from "../instance-registry-WvQkt42E.mjs";
7
+ import { i as normalizeHttpServerUrl, n as resolveInstanceRegister, r as samePath, t as createInstanceShell } from "../instance-shell-CMFyszWJ.mjs";
8
+ import { t as createContextRpcServer } from "../rpc-core-DMTe-hLo.mjs";
9
9
  export { DevframeAgentHost, coerceAgentPositionalArgs, createContextRpcServer, createH3DevframeHost, createInstanceShell, createRpcWireCodec, diagnostics, listLiveDevframeInstances, normalizeBasePath, normalizeHttpServerUrl, peekRpcWireFrame, registerDevframeInstance, resolveBasePath, resolveInstanceRegister, samePath };
@@ -1,3 +1,3 @@
1
- import { u as DevframeAuthHandler } from "../devframe-Cfx6doi4.mjs";
2
- import { a as verifyAuthToken, i as refreshTempAuthCode, n as exchangeTempAuthCode, o as revokeActiveConnectionsForToken, r as getTempAuthCode, s as revokeAuthToken, t as buildOtpAuthUrl } from "../index-MYi1SZVL.mjs";
1
+ import { u as DevframeAuthHandler } from "../devframe-DJMg0WLe.mjs";
2
+ import { a as verifyAuthToken, i as refreshTempAuthCode, n as exchangeTempAuthCode, o as revokeActiveConnectionsForToken, r as getTempAuthCode, s as revokeAuthToken, t as buildOtpAuthUrl } from "../index-CB-fSUyn.mjs";
3
3
  export { DevframeAuthHandler, buildOtpAuthUrl, exchangeTempAuthCode, getTempAuthCode, refreshTempAuthCode, revokeActiveConnectionsForToken, revokeAuthToken, verifyAuthToken };
@@ -1,3 +1,3 @@
1
- import { a as internalContextMap, i as getInternalContext, n as InternalAnonymousAuthStorage, r as RemoteTokenRecord, t as DevframeInternalContext } from "../context-CQkRTbAc.mjs";
2
- import { n as normalizeBasePath, r as resolveBasePath } from "../_shared-QkI6ljJS.mjs";
1
+ import { a as internalContextMap, i as getInternalContext, n as InternalAnonymousAuthStorage, r as RemoteTokenRecord, t as DevframeInternalContext } from "../context-B3YUu_95.mjs";
2
+ import { n as normalizeBasePath, r as resolveBasePath } from "../_shared-BPmX9fqK.mjs";
3
3
  export { type DevframeInternalContext, type InternalAnonymousAuthStorage, type RemoteTokenRecord, getInternalContext, internalContextMap, normalizeBasePath, resolveBasePath };
@@ -1,3 +1,3 @@
1
- import { n as resolveBasePath, t as normalizeBasePath } from "../_shared-CKZPvSrN.mjs";
2
- import { n as internalContextMap, t as getInternalContext } from "../context-D0jErmlx.mjs";
1
+ import { n as resolveBasePath, t as normalizeBasePath } from "../_shared-CbZ_yhbz.mjs";
2
+ import { n as internalContextMap, t as getInternalContext } from "../context-xdynGSLP.mjs";
3
3
  export { getInternalContext, internalContextMap, normalizeBasePath, resolveBasePath };
@@ -1,4 +1,4 @@
1
- import { P as DevframeHost, V as RpcFunctionsHost, g as DevframeNodeContext, ut as SharedState } from "../devframe-Cfx6doi4.mjs";
1
+ import { B as RpcFunctionsHost, P as DevframeHost, g as DevframeNodeContext, lt as SharedState } from "../devframe-DJMg0WLe.mjs";
2
2
  import "../index-tdrk1bzV.mjs";
3
3
  import { v as RpcFunctionDefinitionAny } from "../types-Djq7CBXh.mjs";
4
4
  import { BirpcGroup } from "birpc";
@@ -1,3 +1,3 @@
1
- import { t as createHostContext } from "../context-D0HD0F7C.mjs";
2
- import { t as createStorage } from "../storage-BVuipbGS.mjs";
1
+ import { t as createHostContext } from "../context-CEe4PBz1.mjs";
2
+ import { t as createStorage } from "../storage-CYye7P7L.mjs";
3
3
  export { createHostContext, createStorage };
@@ -0,0 +1,59 @@
1
+ import { Diagnostic, createConsoleReporter, defineDiagnostics, defineProdDiagnostics, formatDiagnostic } from "nostics";
2
+ import { ansiFormatter, ansiFormatter as ansiFormatter$1 } from "nostics/formatters/ansi";
3
+ //#region src/utils/colors.ts
4
+ function makeColor(open, close) {
5
+ const o = `\x1B[${open}m`;
6
+ const c = `\x1B[${close}m`;
7
+ return ((arg, ...values) => {
8
+ if (Array.isArray(arg) && "raw" in arg) {
9
+ const strings = arg;
10
+ let out = "";
11
+ for (let i = 0; i < strings.length; i++) {
12
+ out += strings[i];
13
+ if (i < values.length) out += String(values[i]);
14
+ }
15
+ return `${o}${out}${c}`;
16
+ }
17
+ return `${o}${String(arg)}${c}`;
18
+ });
19
+ }
20
+ const colors = {
21
+ blue: makeColor(34, 39),
22
+ cyan: makeColor(36, 39),
23
+ gray: makeColor(90, 39),
24
+ green: makeColor(32, 39),
25
+ red: makeColor(31, 39),
26
+ yellow: makeColor(33, 39),
27
+ bold: makeColor(1, 22),
28
+ dim: makeColor(2, 22),
29
+ reset: makeColor(0, 0),
30
+ underline: makeColor(4, 24)
31
+ };
32
+ //#endregion
33
+ //#region src/utils/nostics.ts
34
+ const formatAnsi = ansiFormatter(colors);
35
+ /**
36
+ * The reporter every {@link defineDiagnostics} call below wires in ahead of
37
+ * any caller-supplied ones: prints the diagnostic through devframe's own
38
+ * ANSI colors via `console[method]` (default `'warn'`).
39
+ */
40
+ function devframeReporter(d, { method = "warn" } = {}) {
41
+ console[method](formatAnsi(d));
42
+ }
43
+ /**
44
+ * Drop-in replacement for `nostics`'s `defineDiagnostics()` with devframe's
45
+ * ANSI console reporter pre-wired ahead of any `reporters` passed in. Every
46
+ * `diagnostics.ts` in devframe core, `@devframes/hub`, `@devframes/json-render`,
47
+ * and the built-in plugins defines its codes through this instead of
48
+ * `nostics`'s own `defineDiagnostics` — the reporter registration lives
49
+ * here, once, so none of them need to build their own reporter (`colors`,
50
+ * `ansiFormatter`) or take a direct dependency on `nostics` themselves.
51
+ */
52
+ function defineDiagnostics$1(options) {
53
+ return defineDiagnostics({
54
+ ...options,
55
+ reporters: [devframeReporter, ...options.reporters ?? []]
56
+ });
57
+ }
58
+ //#endregion
59
+ export { defineProdDiagnostics as a, defineDiagnostics$1 as i, ansiFormatter$1 as n, formatDiagnostic as o, createConsoleReporter as r, colors as s, Diagnostic as t };
@@ -0,0 +1,33 @@
1
+ import { AnyDiagnosticReporter, AnyDiagnosticReporter as AnyDiagnosticReporter$1, ConsoleMethod, ConsoleReporterOptions, Diagnostic, Diagnostic as Diagnostic$1, DiagnosticCallParams, DiagnosticDefinition, DiagnosticDefinition as DiagnosticDefinition$1, DiagnosticHandle, DiagnosticInit, DiagnosticReporter, Diagnostics, Diagnostics as Diagnostics$1, createConsoleReporter, defineProdDiagnostics, formatDiagnostic } from "nostics";
2
+ import { ansiFormatter } from "nostics/formatters/ansi";
3
+ //#region src/utils/nostics.d.ts
4
+ /**
5
+ * The reporter every {@link defineDiagnostics} call below wires in ahead of
6
+ * any caller-supplied ones: prints the diagnostic through devframe's own
7
+ * ANSI colors via `console[method]` (default `'warn'`).
8
+ */
9
+ declare function devframeReporter(d: Diagnostic, { method }?: {
10
+ method?: 'log' | 'warn' | 'error';
11
+ }): void;
12
+ /**
13
+ * Options accepted by {@link defineDiagnostics} — identical to `nostics`'s
14
+ * own `DefineDiagnosticsOptions`, minus the reporter devframe already
15
+ * prepends.
16
+ */
17
+ type DevframeDefineDiagnosticsOptions<Codes extends Record<string, DiagnosticDefinition>, Reporters extends readonly AnyDiagnosticReporter[] = []> = Parameters<typeof defineDiagnostics<Codes, Reporters>>[0];
18
+ /**
19
+ * Drop-in replacement for `nostics`'s `defineDiagnostics()` with devframe's
20
+ * ANSI console reporter pre-wired ahead of any `reporters` passed in. Every
21
+ * `diagnostics.ts` in devframe core, `@devframes/hub`, `@devframes/json-render`,
22
+ * and the built-in plugins defines its codes through this instead of
23
+ * `nostics`'s own `defineDiagnostics` — the reporter registration lives
24
+ * here, once, so none of them need to build their own reporter (`colors`,
25
+ * `ansiFormatter`) or take a direct dependency on `nostics` themselves.
26
+ */
27
+ declare function defineDiagnostics<const Codes extends Record<string, DiagnosticDefinition>, const Reporters extends readonly AnyDiagnosticReporter[] = []>(options: {
28
+ docsBase?: string | ((code: keyof Codes) => string | undefined);
29
+ codes: Codes;
30
+ reporters?: Reporters;
31
+ }): Diagnostics<Codes, readonly [typeof devframeReporter, ...Reporters]>;
32
+ //#endregion
33
+ export { Diagnostic$1 as a, DiagnosticHandle as c, Diagnostics$1 as d, ansiFormatter as f, formatDiagnostic as g, defineProdDiagnostics as h, DevframeDefineDiagnosticsOptions as i, DiagnosticInit as l, defineDiagnostics as m, ConsoleMethod as n, DiagnosticCallParams as o, createConsoleReporter as p, ConsoleReporterOptions as r, DiagnosticDefinition$1 as s, AnyDiagnosticReporter$1 as t, DiagnosticReporter as u };
@@ -1,4 +1,4 @@
1
- import "../devframe-Cfx6doi4.mjs";
1
+ import "../devframe-DJMg0WLe.mjs";
2
2
  import "../index-tdrk1bzV.mjs";
3
3
  import { E as Thenable, S as RpcFunctionSetupResult, c as RpcDump, g as RpcFunctionAgentOptions } from "../types-Djq7CBXh.mjs";
4
4
  import { SimpleSchema } from "../utils/simple-schema.mjs";
@@ -1,5 +1,5 @@
1
- import { g as DevframeNodeContext, u as DevframeAuthHandler } from "../devframe-Cfx6doi4.mjs";
2
- import "../index-MYi1SZVL.mjs";
1
+ import { g as DevframeNodeContext, u as DevframeAuthHandler } from "../devframe-DJMg0WLe.mjs";
2
+ import "../index-CB-fSUyn.mjs";
3
3
  //#region src/recipes/interactive-auth.d.ts
4
4
  interface CreateInteractiveAuthOptions {
5
5
  /**
@@ -1,8 +1,8 @@
1
- import { n as colors } from "../diagnostics-reporter-CsIG85Q5.mjs";
1
+ import { s as colors } from "../nostics-CzECRXpE.mjs";
2
2
  import { n as defineRpcFunction } from "../define-BLWPsH6y.mjs";
3
3
  import { isAnonymousRpcMethod } from "../constants.mjs";
4
4
  import { a as verifyAuthToken, n as exchangeTempAuthCode, r as getTempAuthCode, t as buildOtpAuthUrl } from "../state-Cc1IeSmQ.mjs";
5
- import { t as getInternalContext } from "../context-D0jErmlx.mjs";
5
+ import { t as getInternalContext } from "../context-xdynGSLP.mjs";
6
6
  import { t as s } from "../simple-schema-DQPZrAaZ.mjs";
7
7
  //#region src/recipes/interactive-auth.ts
8
8
  function defaultBanner(info) {
@@ -42,7 +42,7 @@ interface RemoteAssets {
42
42
  * with zero network. Omitting it skips the installed-package step —
43
43
  * cache + CDN still work.
44
44
  */
45
- resolveFrom?: string;
45
+ resolveFrom?: string | null;
46
46
  /** Custom fetch implementation (proxies, tests). Defaults to the global `fetch`. */
47
47
  fetch?: typeof globalThis.fetch;
48
48
  /**
@@ -79,6 +79,23 @@ interface RemoteAssetsProviderCustom {
79
79
  * {@link RemoteAssets} pointer served through the caching back-proxy.
80
80
  */
81
81
  type StaticAssetsSource = string | RemoteAssets;
82
+ /**
83
+ * What the remote-assets fallback page posts to `window.parent` when a
84
+ * devframe's client assets could be served from neither a local install nor
85
+ * their provider. A viewer embedding the devframe in an iframe listens for
86
+ * `DEVFRAME_REMOTE_ASSETS_ERROR_MESSAGE_TYPE` (`devframe/constants`) and can
87
+ * render the failure in its own design, with the two ways out the page also
88
+ * spells out: install `package@version` locally, or restore network access.
89
+ */
90
+ interface RemoteAssetsErrorMessage {
91
+ type: 'devframe:remote-assets-error';
92
+ /** npm package the assets are published as. */
93
+ package: string;
94
+ /** Exact version the devframe asked for. */
95
+ version: string;
96
+ /** Why the fetch failed, as reported by the provider or the network stack. */
97
+ reason: string;
98
+ }
82
99
  /**
83
100
  * A resolved, servable handle over a {@link RemoteAssets} declaration —
84
101
  * produced by `resolveStaticAssetsSource()` (`devframe/utils/remote-assets`)
@@ -103,4 +120,4 @@ interface RemoteAssetsStore {
103
120
  materialize: (targetDir: string) => Promise<void>;
104
121
  }
105
122
  //#endregion
106
- export { StaticAssetsSource as a, RemoteAssetsStore as i, RemoteAssetsProvider as n, RemoteAssetsProviderCustom as r, RemoteAssets as t };
123
+ export { RemoteAssetsStore as a, RemoteAssetsProviderCustom as i, RemoteAssetsErrorMessage as n, StaticAssetsSource as o, RemoteAssetsProvider as r, RemoteAssets as t };