devframe 0.9.0-beta.7 → 0.9.0-beta.9

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 (73) hide show
  1. package/dist/{_shared-QkI6ljJS.d.mts → _shared-BPmX9fqK.d.mts} +1 -1
  2. package/dist/adapters/build.d.mts +2 -2
  3. package/dist/adapters/build.mjs +6 -6
  4. package/dist/adapters/cac.d.mts +1 -1
  5. package/dist/adapters/cac.mjs +2 -2
  6. package/dist/adapters/dev.d.mts +4 -4
  7. package/dist/adapters/dev.mjs +1 -1
  8. package/dist/adapters/embedded.d.mts +1 -1
  9. package/dist/adapters/initiate.d.mts +3 -3
  10. package/dist/adapters/initiate.mjs +1 -1
  11. package/dist/adapters/mcp.d.mts +1 -1
  12. package/dist/adapters/mcp.mjs +1 -1
  13. package/dist/cli/main.mjs +3 -3
  14. package/dist/client/index.d.mts +1 -1
  15. package/dist/client/index.mjs +22 -3
  16. package/dist/constants.d.mts +10 -1
  17. package/dist/constants.mjs +10 -1
  18. package/dist/{context-CQkRTbAc.d.mts → context-B3YUu_95.d.mts} +1 -1
  19. package/dist/{context-D0HD0F7C.mjs → context-CEe4PBz1.mjs} +7 -300
  20. package/dist/{context-D0jErmlx.mjs → context-xdynGSLP.mjs} +1 -1
  21. package/dist/{dev-QEuT8SOF.mjs → dev-Chvlqs7I.mjs} +5 -5
  22. package/dist/{devframe-Cfx6doi4.d.mts → devframe-DJMg0WLe.d.mts} +7 -16
  23. package/dist/{diagnostics-hwjXp_UV.mjs → diagnostics-CD8nlgll.mjs} +1 -3
  24. package/dist/{diagnostics-DEuH3P5O.mjs → diagnostics-DOQPnQmX.mjs} +1 -3
  25. package/dist/{host-agent-C5HjzfBz.mjs → host-agent-xLCSe65D.mjs} +1 -1
  26. package/dist/{http-CVwj7b4g.mjs → http-8Kpkap4_.mjs} +4 -4
  27. package/dist/{index-MYi1SZVL.d.mts → index-CB-fSUyn.d.mts} +2 -2
  28. package/dist/index.d.mts +4 -3
  29. package/dist/{instance-registry-M2p-z6xE.mjs → instance-registry-WvQkt42E.mjs} +1 -1
  30. package/dist/{instance-shell-D_UA0Idz.d.mts → instance-shell-CljiKq1c.d.mts} +2 -2
  31. package/dist/{instance-shell-DJ8s-MFw.mjs → instance-shell-XvN5USg4.mjs} +4 -4
  32. package/dist/internal/index.d.mts +8 -13
  33. package/dist/internal/index.mjs +6 -6
  34. package/dist/node/auth.d.mts +2 -2
  35. package/dist/node/hub-internals.d.mts +2 -2
  36. package/dist/node/hub-internals.mjs +1 -1
  37. package/dist/node/index.d.mts +1 -1
  38. package/dist/node/index.mjs +2 -2
  39. package/dist/nostics-CzECRXpE.mjs +59 -0
  40. package/dist/nostics-SPGDgHEP.d.mts +33 -0
  41. package/dist/recipes/common-rpc-functions.d.mts +1 -1
  42. package/dist/recipes/interactive-auth.d.mts +2 -2
  43. package/dist/recipes/interactive-auth.mjs +2 -2
  44. package/dist/{remote-assets-DclsYyoL.d.mts → remote-assets-Bg4gCUZ_.d.mts} +19 -2
  45. package/dist/remote-assets-nTTxY2MU.mjs +636 -0
  46. package/dist/rpc/dump.mjs +1 -1
  47. package/dist/rpc/index.mjs +3 -3
  48. package/dist/rpc/transports/sse-client.mjs +1 -1
  49. package/dist/rpc/transports/sse-server.mjs +2 -2
  50. package/dist/rpc/transports/ws-bun.d.mts +1 -1
  51. package/dist/rpc/transports/ws-bun.mjs +1 -1
  52. package/dist/rpc/transports/ws-client.mjs +1 -1
  53. package/dist/rpc/transports/ws-server.mjs +1 -1
  54. package/dist/{rpc-core-C8JQ3p7A.d.mts → rpc-core-Cc4lucI0.d.mts} +2 -2
  55. package/dist/{rpc-core-IhcWl_xn.mjs → rpc-core-DMTe-hLo.mjs} +1 -1
  56. package/dist/{serialization-BHY8M5NQ.mjs → serialization-BGzEwAdr.mjs} +1 -1
  57. package/dist/{static-CvjkO8QE.mjs → static-BPZ1_OPA.mjs} +2 -2
  58. package/dist/{storage-BVuipbGS.mjs → storage-CYye7P7L.mjs} +1 -1
  59. package/dist/types/index.d.mts +4 -3
  60. package/dist/utils/events.d.mts +1 -1
  61. package/dist/utils/nostics.d.mts +2 -0
  62. package/dist/utils/nostics.mjs +2 -0
  63. package/dist/utils/remote-assets.d.mts +1 -1
  64. package/dist/utils/remote-assets.mjs +1 -308
  65. package/dist/utils/serve-static.d.mts +1 -1
  66. package/dist/utils/serve-static.mjs +16 -0
  67. package/dist/utils/shared-state.d.mts +1 -1
  68. package/dist/utils/streaming-channel.d.mts +1 -1
  69. package/dist/{validation-BiuDXTKW.mjs → validation-CpXFB6Dz.mjs} +1 -1
  70. package/dist/{wire-codec-9VhIKnyp.mjs → wire-codec-GsoRxIsD.mjs} +1 -1
  71. package/dist/{ws-server-Bk1hOG3X.mjs → ws-server-BiUne4K7.mjs} +1 -1
  72. package/package.json +3 -2
  73. package/dist/diagnostics-reporter-CsIG85Q5.mjs +0 -38
@@ -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,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-BiUne4K7.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
- 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,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,
@@ -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
  /**
@@ -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";
1
+ import { n as peekRpcWireFrame, t as createRpcWireCodec } from "../wire-codec-GsoRxIsD.mjs";
2
+ import { t as diagnostics } from "../diagnostics-DOQPnQmX.mjs";
3
+ import { n as coerceAgentPositionalArgs, t as DevframeAgentHost } from "../host-agent-xLCSe65D.mjs";
4
4
  import { n as resolveBasePath, t as normalizeBasePath } from "../_shared-CKZPvSrN.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-XvN5USg4.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
1
  import { n as resolveBasePath, t as normalizeBasePath } from "../_shared-CKZPvSrN.mjs";
2
- import { n as internalContextMap, t as getInternalContext } from "../context-D0jErmlx.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 };