devframe 0.9.1 → 0.9.3

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 (76) hide show
  1. package/dist/{_shared-DqbKCAew.d.mts → _shared-BPovvJW8.d.mts} +1 -1
  2. package/dist/adapters/build.d.mts +11 -2
  3. package/dist/adapters/build.mjs +46 -9
  4. package/dist/adapters/cac.d.mts +1 -1
  5. package/dist/adapters/cac.mjs +1 -1
  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/embedded.mjs +2 -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 +2 -2
  15. package/dist/client/index.d.mts +5 -5
  16. package/dist/client/index.mjs +2 -2
  17. package/dist/{context-CXhjygJU.mjs → context-BUJGvlje.mjs} +1 -1
  18. package/dist/{context-dqyXS6o3.d.mts → context-CO7eZHJy.d.mts} +1 -1
  19. package/dist/{context-Bdkakk8S.mjs → context-CQW0lSw8.mjs} +40 -20
  20. package/dist/{devframe-BlLEZR-x.d.mts → context-_i51nYOs.d.mts} +1033 -970
  21. package/dist/{dev-C8VHtuPP.mjs → dev-lpIvwagf.mjs} +10 -9
  22. package/dist/{diagnostics-Di8ytitn.mjs → diagnostics-BXWW3VK-.mjs} +3 -3
  23. package/dist/hash-DdPnc4k3.mjs +360 -0
  24. package/dist/{host-agent-BDdcOXhG.mjs → host-agent-B84av916.mjs} +1 -1
  25. package/dist/{http-BbHCU5Zs.mjs → http-BKiqHcXX.mjs} +6 -5
  26. package/dist/{index-BKFT9-jA.d.mts → index-CEvd-YXD.d.mts} +2 -2
  27. package/dist/{index-tdrk1bzV.d.mts → index-DOg4S5wk.d.mts} +1 -1
  28. package/dist/index.d.mts +6 -6
  29. package/dist/{instance-registry-CHunhMi5.mjs → instance-registry-BjlMQbFB.mjs} +1 -1
  30. package/dist/{instance-shell-DbDoozNM.mjs → instance-shell-B-uevnK-.mjs} +4 -4
  31. package/dist/{instance-shell-0iw-cQ5V.d.mts → instance-shell-BHvBIGP4.d.mts} +3 -3
  32. package/dist/internal/index.d.mts +8 -8
  33. package/dist/internal/index.mjs +5 -5
  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 +12 -3
  38. package/dist/node/index.mjs +2 -2
  39. package/dist/recipes/common-rpc-functions.d.mts +13 -3
  40. package/dist/recipes/common-rpc-functions.mjs +10 -0
  41. package/dist/recipes/interactive-auth.d.mts +2 -2
  42. package/dist/recipes/interactive-auth.mjs +1 -1
  43. package/dist/{remote-assets-DRfY2RjX.mjs → remote-assets-DezQmPQU.mjs} +13 -3
  44. package/dist/rpc/dump.d.mts +1 -1
  45. package/dist/rpc/dump.mjs +1 -1
  46. package/dist/rpc/index.d.mts +2 -2
  47. package/dist/rpc/index.mjs +1 -1
  48. package/dist/rpc/transports/sse-client.d.mts +1 -1
  49. package/dist/rpc/transports/sse-server.d.mts +2 -2
  50. package/dist/rpc/transports/ws-bun.d.mts +2 -2
  51. package/dist/rpc/transports/ws-client.d.mts +1 -1
  52. package/dist/rpc/transports/ws-deno.d.mts +26 -0
  53. package/dist/rpc/transports/ws-deno.mjs +30 -0
  54. package/dist/rpc/transports/ws-server.d.mts +1 -1
  55. package/dist/{rpc-core-CR8o34O9.d.mts → rpc-core-CDZoGYiD.d.mts} +3 -3
  56. package/dist/{rpc-core-Dru9uoM0.mjs → rpc-core-DlHd276T.mjs} +3 -10
  57. package/dist/{shared-state-fRRbRUtD.mjs → shared-state-DoXutg_U.mjs} +1 -1
  58. package/dist/{sse-client-CFBOIaUi.d.mts → sse-client-CdGD_B8_.d.mts} +1 -1
  59. package/dist/{static-BPZ1_OPA.mjs → static-DV_qUSRS.mjs} +1 -1
  60. package/dist/{storage-D4a99Ung.mjs → storage-BXNVhKyR.mjs} +1 -1
  61. package/dist/types/index.d.mts +5 -5
  62. package/dist/{types-Djq7CBXh.d.mts → types-BBLeGfpt.d.mts} +1 -1
  63. package/dist/utils/events.d.mts +1 -1
  64. package/dist/utils/hash.mjs +1 -1
  65. package/dist/utils/remote-assets.d.mts +7 -1
  66. package/dist/utils/remote-assets.mjs +1 -1
  67. package/dist/utils/shared-state.d.mts +1 -1
  68. package/dist/utils/shared-state.mjs +1 -1
  69. package/dist/utils/streaming-channel.d.mts +1 -1
  70. package/dist/validation-YrZH6atx.mjs +311 -0
  71. package/dist/{ws-client-DhjNyQo3.d.mts → ws-client-Bo2t6hES.d.mts} +1 -1
  72. package/dist/{ws-server-D1d3QM9f.d.mts → ws-server-DLtEoLdR.d.mts} +1 -1
  73. package/package.json +4 -3
  74. package/skills/devframe/SKILL.md +1 -1
  75. package/dist/hash-KtDZYXDN.mjs +0 -266
  76. package/dist/validation-CpXFB6Dz.mjs +0 -266
@@ -1,6 +1,6 @@
1
- import { Q as DevframeHost, g as DevframeNodeContext, gt as SharedState, y as RpcFunctionsHost } from "../devframe-BlLEZR-x.mjs";
2
- import "../index-tdrk1bzV.mjs";
3
- import { v as RpcFunctionDefinitionAny } from "../types-Djq7CBXh.mjs";
1
+ import "../index-DOg4S5wk.mjs";
2
+ import { v as RpcFunctionDefinitionAny } from "../types-BBLeGfpt.mjs";
3
+ import { k as SharedState, l as RpcFunctionsHost, o as DevframeNodeContext, yt as DevframeHost } from "../context-_i51nYOs.mjs";
4
4
  import { BirpcGroup } from "birpc";
5
5
  //#region src/node/context.d.ts
6
6
  interface CreateHostContextOptions {
@@ -8,6 +8,15 @@ interface CreateHostContextOptions {
8
8
  workspaceRoot?: string;
9
9
  mode: 'dev' | 'build';
10
10
  host: DevframeHost;
11
+ /**
12
+ * `import.meta.url` of the module that defines the devframe this context
13
+ * serves (from `DevframeDefinition.importMetaUrl`). Supplies the default
14
+ * `resolveFrom` base for remote {@link DevframeViewHost.hostStatic} sources
15
+ * that don't set one, so a locally installed copy of an assets package is
16
+ * served with zero network. An internal plumbing detail — it isn't part of
17
+ * the public {@link DevframeNodeContext} surface.
18
+ */
19
+ importMetaUrl?: string;
11
20
  /**
12
21
  * Built-in RPC declarations to register on the host. Framework
13
22
  * adapters (vite, rolldown, cli) can pass the ones they need; the
@@ -1,3 +1,3 @@
1
- import { t as createHostContext } from "../context-Bdkakk8S.mjs";
2
- import { t as createStorage } from "../storage-D4a99Ung.mjs";
1
+ import { t as createHostContext } from "../context-CQW0lSw8.mjs";
2
+ import { t as createStorage } from "../storage-BXNVhKyR.mjs";
3
3
  export { createHostContext, createStorage };
@@ -1,6 +1,6 @@
1
- import "../devframe-BlLEZR-x.mjs";
2
- import "../index-tdrk1bzV.mjs";
3
- import { E as Thenable, S as RpcFunctionSetupResult, c as RpcDump, g as RpcFunctionAgentOptions } from "../types-Djq7CBXh.mjs";
1
+ import "../index-DOg4S5wk.mjs";
2
+ import { E as Thenable, S as RpcFunctionSetupResult, c as RpcDump, g as RpcFunctionAgentOptions } from "../types-BBLeGfpt.mjs";
3
+ import "../context-_i51nYOs.mjs";
4
4
  import { SimpleSchema } from "../utils/simple-schema.mjs";
5
5
  //#region src/recipes/common-rpc-functions.d.ts
6
6
  /**
@@ -33,6 +33,10 @@ declare const KNOWN_EDITORS: KnownEditor[];
33
33
  * },
34
34
  * })
35
35
  * ```
36
+ *
37
+ * @deprecated Use the `@devframes/service-open` wire service instead — one
38
+ * host-level installation shared by every plugin and feature-detectable from
39
+ * clients, with workspace-root path containment on top of the editor gating.
36
40
  */
37
41
  declare const openInEditor: {
38
42
  name: "devframe:open-in-editor";
@@ -59,6 +63,10 @@ declare const openInEditor: {
59
63
  *
60
64
  * ctx.rpc.register(openInFinder)
61
65
  * ```
66
+ *
67
+ * @deprecated Use the `@devframes/service-open` wire service instead — one
68
+ * host-level installation shared by every plugin and feature-detectable from
69
+ * clients, with workspace-root path containment.
62
70
  */
63
71
  declare const openInFinder: {
64
72
  name: "devframe:open-in-finder";
@@ -84,6 +92,8 @@ declare const openInFinder: {
84
92
  *
85
93
  * commonRpcFunctions.forEach(fn => ctx.rpc.register(fn))
86
94
  * ```
95
+ *
96
+ * @deprecated Use the `@devframes/service-open` wire service instead.
87
97
  */
88
98
  declare const commonRpcFunctions: readonly [{
89
99
  name: "devframe:open-in-editor";
@@ -56,6 +56,10 @@ const KNOWN_EDITORS = [
56
56
  * },
57
57
  * })
58
58
  * ```
59
+ *
60
+ * @deprecated Use the `@devframes/service-open` wire service instead — one
61
+ * host-level installation shared by every plugin and feature-detectable from
62
+ * clients, with workspace-root path containment on top of the editor gating.
59
63
  */
60
64
  const openInEditor = defineRpcFunction({
61
65
  name: "devframe:open-in-editor",
@@ -78,6 +82,10 @@ const openInEditor = defineRpcFunction({
78
82
  *
79
83
  * ctx.rpc.register(openInFinder)
80
84
  * ```
85
+ *
86
+ * @deprecated Use the `@devframes/service-open` wire service instead — one
87
+ * host-level installation shared by every plugin and feature-detectable from
88
+ * clients, with workspace-root path containment.
81
89
  */
82
90
  const openInFinder = defineRpcFunction({
83
91
  name: "devframe:open-in-finder",
@@ -99,6 +107,8 @@ const openInFinder = defineRpcFunction({
99
107
  *
100
108
  * commonRpcFunctions.forEach(fn => ctx.rpc.register(fn))
101
109
  * ```
110
+ *
111
+ * @deprecated Use the `@devframes/service-open` wire service instead.
102
112
  */
103
113
  const commonRpcFunctions = [openInEditor, openInFinder];
104
114
  //#endregion
@@ -1,5 +1,5 @@
1
- import { g as DevframeNodeContext, u as DevframeAuthHandler } from "../devframe-BlLEZR-x.mjs";
2
- import "../index-BKFT9-jA.mjs";
1
+ import { Ct as DevframeAuthHandler, o as DevframeNodeContext } from "../context-_i51nYOs.mjs";
2
+ import "../index-CEvd-YXD.mjs";
3
3
  //#region src/recipes/interactive-auth.d.ts
4
4
  interface CreateInteractiveAuthOptions {
5
5
  /**
@@ -2,7 +2,7 @@ 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-CK9LjrnT.mjs";
5
- import { t as getInternalContext } from "../context-CXhjygJU.mjs";
5
+ import { t as getInternalContext } from "../context-BUJGvlje.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) {
@@ -1,4 +1,4 @@
1
- import { t as diagnostics } from "./diagnostics-Di8ytitn.mjs";
1
+ import { t as diagnostics } from "./diagnostics-BXWW3VK-.mjs";
2
2
  import { createRequire } from "node:module";
3
3
  import { isatty } from "node:tty";
4
4
  import { formatWithOptions, inspect } from "node:util";
@@ -627,11 +627,21 @@ function assertValidRemoteAssets(assets) {
627
627
  *
628
628
  * A remote source's `package`/`version` are validated first (`DF0065`) — both
629
629
  * are interpolated into CDN URLs and the cache path.
630
+ *
631
+ * `defaultResolveFrom` (typically the declaring devframe's `importMetaUrl`)
632
+ * supplies a `resolveFrom` base for a remote source that doesn't set one:
633
+ * it is applied only when `source.resolveFrom` is `undefined`, so an explicit
634
+ * per-source string still wins and an explicit `null` still opts out of the
635
+ * installed-copy lookup.
630
636
  */
631
- function resolveStaticAssetsSource(source, projectStorageDir) {
637
+ function resolveStaticAssetsSource(source, projectStorageDir, defaultResolveFrom) {
632
638
  if (typeof source === "string") return source;
633
639
  assertValidRemoteAssets(source);
634
- return resolveInstalled(source) ?? createStore(source, join(projectStorageDir, ".remote-assets", `${source.package.replace(/\//g, "+")}@${source.version}`));
640
+ const resolved = source.resolveFrom === void 0 && defaultResolveFrom != null ? {
641
+ ...source,
642
+ resolveFrom: defaultResolveFrom
643
+ } : source;
644
+ return resolveInstalled(resolved) ?? createStore(resolved, join(projectStorageDir, ".remote-assets", `${resolved.package.replace(/\//g, "+")}@${resolved.version}`));
635
645
  }
636
646
  //#endregion
637
647
  export { createDebug as n, resolveStaticAssetsSource as t };
@@ -1,4 +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-Djq7CBXh.mjs";
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-BBLeGfpt.mjs";
2
2
  //#region src/rpc/dump/collect.d.ts
3
3
  /**
4
4
  * Collects pre-computed dumps by executing functions with their defined input combinations.
package/dist/rpc/dump.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import { a as reviveDumpError, i as getDefinitionsWithDumps, n as createClientFromDump, o as serializeDumpError, r as dumpFunctions, t as collectStaticRpcDump } from "../static-BPZ1_OPA.mjs";
1
+ import { a as reviveDumpError, i as getDefinitionsWithDumps, n as createClientFromDump, o as serializeDumpError, r as dumpFunctions, t as collectStaticRpcDump } from "../static-DV_qUSRS.mjs";
2
2
  export { collectStaticRpcDump, createClientFromDump, dumpFunctions, getDefinitionsWithDumps, reviveDumpError, serializeDumpError };
@@ -1,3 +1,3 @@
1
- import { a as STRUCTURED_CLONE_PREFIX, c as getRpcResolvedSetupResult, d as RpcFunctionsCollectorBase, f as RpcCacheManager, i as validateRpcReturn, l as createDefineWrapperWithContext, n as validateDefinitions, o as strictJsonStringify, p as RpcCacheOptions, r as validateRpcArgs, s as getRpcHandler, t as validateDefinition, u as defineRpcFunction } from "../index-tdrk1bzV.mjs";
2
- import { C as RpcFunctionType, E as Thenable, S as RpcFunctionSetupResult, T as RpcReturnSchema, _ as RpcFunctionDefinition, a as RpcDefinitionsFilter, b as RpcFunctionDefinitionBase, c as RpcDump, d as RpcDumpDefinition, f as RpcDumpGetter, g as RpcFunctionAgentOptions, h as RpcDumpStore, i as RpcArgsSchema, l as RpcDumpClientOptions, m as RpcDumpRecordError, n as BirpcReturn, o as RpcDefinitionsToFunctions, p as RpcDumpRecord, r as EntriesToObject, s as RpcDefinitionsToFunctionsWithNamespace, t as BirpcFn, u as RpcDumpCollectionOptions, v as RpcFunctionDefinitionAny, w as RpcFunctionsCollector, x as RpcFunctionDefinitionToFunction, y as RpcFunctionDefinitionAnyWithContext } from "../types-Djq7CBXh.mjs";
1
+ import { a as STRUCTURED_CLONE_PREFIX, c as getRpcResolvedSetupResult, d as RpcFunctionsCollectorBase, f as RpcCacheManager, i as validateRpcReturn, l as createDefineWrapperWithContext, n as validateDefinitions, o as strictJsonStringify, p as RpcCacheOptions, r as validateRpcArgs, s as getRpcHandler, t as validateDefinition, u as defineRpcFunction } from "../index-DOg4S5wk.mjs";
2
+ import { C as RpcFunctionType, E as Thenable, S as RpcFunctionSetupResult, T as RpcReturnSchema, _ as RpcFunctionDefinition, a as RpcDefinitionsFilter, b as RpcFunctionDefinitionBase, c as RpcDump, d as RpcDumpDefinition, f as RpcDumpGetter, g as RpcFunctionAgentOptions, h as RpcDumpStore, i as RpcArgsSchema, l as RpcDumpClientOptions, m as RpcDumpRecordError, n as BirpcReturn, o as RpcDefinitionsToFunctions, p as RpcDumpRecord, r as EntriesToObject, s as RpcDefinitionsToFunctionsWithNamespace, t as BirpcFn, u as RpcDumpCollectionOptions, v as RpcFunctionDefinitionAny, w as RpcFunctionsCollector, x as RpcFunctionDefinitionToFunction, y as RpcFunctionDefinitionAnyWithContext } from "../types-BBLeGfpt.mjs";
3
3
  export { type BirpcFn, type BirpcReturn, EntriesToObject, RpcArgsSchema, RpcCacheManager, RpcCacheOptions, RpcDefinitionsFilter, RpcDefinitionsToFunctions, RpcDefinitionsToFunctionsWithNamespace, RpcDump, RpcDumpClientOptions, RpcDumpCollectionOptions, RpcDumpDefinition, RpcDumpGetter, RpcDumpRecord, RpcDumpRecordError, RpcDumpStore, RpcFunctionAgentOptions, RpcFunctionDefinition, RpcFunctionDefinitionAny, RpcFunctionDefinitionAnyWithContext, RpcFunctionDefinitionBase, RpcFunctionDefinitionToFunction, RpcFunctionSetupResult, RpcFunctionType, RpcFunctionsCollector, RpcFunctionsCollectorBase, RpcReturnSchema, STRUCTURED_CLONE_PREFIX, Thenable, createDefineWrapperWithContext, defineRpcFunction, getRpcHandler, getRpcResolvedSetupResult, strictJsonStringify, validateDefinition, validateDefinitions, validateRpcArgs, validateRpcReturn };
@@ -1,4 +1,4 @@
1
- import { a as validateRpcArgs, i as getRpcResolvedSetupResult, n as validateDefinitions, o as validateRpcReturn, r as getRpcHandler, s as hash, t as validateDefinition } from "../validation-CpXFB6Dz.mjs";
1
+ import { a as validateRpcArgs, i as getRpcResolvedSetupResult, n as validateDefinitions, o as validateRpcReturn, r as getRpcHandler, s as hash, t as validateDefinition } from "../validation-YrZH6atx.mjs";
2
2
  import { t as diagnostics } from "../diagnostics-CD8nlgll.mjs";
3
3
  import { n as defineRpcFunction, t as createDefineWrapperWithContext } from "../define-BLWPsH6y.mjs";
4
4
  import { n as strictJsonStringify, t as STRUCTURED_CLONE_PREFIX } from "../serialization-BGzEwAdr.mjs";
@@ -1,2 +1,2 @@
1
- import { n as createSseRpcChannel, t as SseRpcChannelOptions } from "../../sse-client-CFBOIaUi.mjs";
1
+ import { n as createSseRpcChannel, t as SseRpcChannelOptions } from "../../sse-client-CdGD_B8_.mjs";
2
2
  export { SseRpcChannelOptions, createSseRpcChannel };
@@ -1,5 +1,5 @@
1
- import { v as RpcFunctionDefinitionAny } from "../../types-Djq7CBXh.mjs";
2
- import { d as DevframeRpcConnection, n as WsOriginRegistry, u as DevframeNodeRpcSessionMeta } from "../../ws-server-D1d3QM9f.mjs";
1
+ import { v as RpcFunctionDefinitionAny } from "../../types-BBLeGfpt.mjs";
2
+ import { d as DevframeRpcConnection, n as WsOriginRegistry, u as DevframeNodeRpcSessionMeta } from "../../ws-server-DLtEoLdR.mjs";
3
3
  import { BirpcGroup } from "birpc";
4
4
  //#region src/rpc/transports/sse-server.d.ts
5
5
  interface SseRpcTransportOptions {
@@ -1,5 +1,5 @@
1
- import { n as WsOriginRegistry } from "../../ws-server-D1d3QM9f.mjs";
2
- import { t as ContextRpcServer } from "../../rpc-core-CR8o34O9.mjs";
1
+ import { n as WsOriginRegistry } from "../../ws-server-DLtEoLdR.mjs";
2
+ import { t as ContextRpcServer } from "../../rpc-core-CDZoGYiD.mjs";
3
3
  //#region src/rpc/transports/ws-bun.d.ts
4
4
  interface AttachBunWsTransportOptions {
5
5
  /** Same contract as `WsRpcTransportOptions.allowedOrigins`. */
@@ -1,2 +1,2 @@
1
- import { n as createWsRpcChannel, t as WsRpcChannelOptions } from "../../ws-client-DhjNyQo3.mjs";
1
+ import { n as createWsRpcChannel, t as WsRpcChannelOptions } from "../../ws-client-Bo2t6hES.mjs";
2
2
  export { WsRpcChannelOptions, createWsRpcChannel };
@@ -0,0 +1,26 @@
1
+ import { n as WsOriginRegistry } from "../../ws-server-DLtEoLdR.mjs";
2
+ import { t as ContextRpcServer } from "../../rpc-core-CDZoGYiD.mjs";
3
+ //#region src/rpc/transports/ws-deno.d.ts
4
+ interface AttachDenoWsTransportOptions {
5
+ /** Same contract as `WsRpcTransportOptions.allowedOrigins`. */
6
+ allowedOrigins?: readonly string[] | WsOriginRegistry | false;
7
+ }
8
+ interface DenoWsTier {
9
+ /**
10
+ * Complete a WS upgrade request — `Deno.serve`'s handler info as the 2nd
11
+ * argument. Unlike Bun, Deno's adapter attaches the socket to the returned
12
+ * `Response` itself, so there is no `websocket` handler object to register.
13
+ */
14
+ handleUpgrade: (request: Request, info: unknown) => Promise<Response>;
15
+ close: () => Promise<void>;
16
+ }
17
+ /**
18
+ * The Deno fetch-upgrade WebSocket tier for `initDevframe` / `initHub` — the
19
+ * same RPC peer wiring as `attachWsRpcTransport`, driven by crossws's Deno
20
+ * adapter so upgrades complete through `handleUpgrade(request, info)` on the
21
+ * app's own origin, with no side-car server. Load it dynamically so the Deno
22
+ * adapter never enters a Node-only bundle path.
23
+ */
24
+ declare function attachDenoWsTransport(core: ContextRpcServer, options?: AttachDenoWsTransportOptions): Promise<DenoWsTier>;
25
+ //#endregion
26
+ export { AttachDenoWsTransportOptions, DenoWsTier, attachDenoWsTransport };
@@ -0,0 +1,30 @@
1
+ import { i as isAllowedOrigin, r as createWsRpcPeerHooks } from "../../ws-server-BdSLrhxE.mjs";
2
+ //#region src/rpc/transports/ws-deno.ts
3
+ /**
4
+ * The Deno fetch-upgrade WebSocket tier for `initDevframe` / `initHub` — the
5
+ * same RPC peer wiring as `attachWsRpcTransport`, driven by crossws's Deno
6
+ * adapter so upgrades complete through `handleUpgrade(request, info)` on the
7
+ * app's own origin, with no side-car server. Load it dynamically so the Deno
8
+ * adapter never enters a Node-only bundle path.
9
+ */
10
+ async function attachDenoWsTransport(core, options = {}) {
11
+ const { default: denoAdapter } = await import("crossws/adapters/deno");
12
+ const { allowedOrigins } = options;
13
+ const ws = denoAdapter({ hooks: {
14
+ ...createWsRpcPeerHooks(core.rpcGroup, {
15
+ onConnected: core.onConnected,
16
+ onDisconnected: core.onDisconnected
17
+ }),
18
+ upgrade(request) {
19
+ const origin = request.headers.get("origin") ?? void 0;
20
+ const allowed = allowedOrigins && !Array.isArray(allowedOrigins) ? allowedOrigins.isAllowed(origin) : isAllowedOrigin(origin, allowedOrigins || []);
21
+ if (allowedOrigins !== false && !allowed) return new Response("Forbidden", { status: 403 });
22
+ }
23
+ } });
24
+ return {
25
+ handleUpgrade: (request, info) => ws.handleUpgrade(request, info),
26
+ close: () => ws.close()
27
+ };
28
+ }
29
+ //#endregion
30
+ export { attachDenoWsTransport };
@@ -1,2 +1,2 @@
1
- import { a as attachWsRpcTransport, c as isAllowedOrigin, d as DevframeRpcConnection, f as DevframeRpcConnectionRequest, i as WsRpcTransportOptions, l as isLoopbackHostname, n as WsOriginRegistry, o as createWsOriginRegistry, p as DevframeRpcTransportKind, r as WsRpcTransport, s as createWsRpcPeerHooks, t as CreateWsOriginRegistryOptions, u as DevframeNodeRpcSessionMeta } from "../../ws-server-D1d3QM9f.mjs";
1
+ import { a as attachWsRpcTransport, c as isAllowedOrigin, d as DevframeRpcConnection, f as DevframeRpcConnectionRequest, i as WsRpcTransportOptions, l as isLoopbackHostname, n as WsOriginRegistry, o as createWsOriginRegistry, p as DevframeRpcTransportKind, r as WsRpcTransport, s as createWsRpcPeerHooks, t as CreateWsOriginRegistryOptions, u as DevframeNodeRpcSessionMeta } from "../../ws-server-DLtEoLdR.mjs";
2
2
  export { CreateWsOriginRegistryOptions, type DevframeNodeRpcSessionMeta, type DevframeRpcConnection, type DevframeRpcConnectionRequest, type DevframeRpcTransportKind, WsOriginRegistry, WsRpcTransport, WsRpcTransportOptions, attachWsRpcTransport, createWsOriginRegistry, createWsRpcPeerHooks, isAllowedOrigin, isLoopbackHostname };
@@ -1,6 +1,6 @@
1
- import { E as DevframeRpcServerFunctions, T as DevframeRpcClientFunctions, _ as DevframeNodeRpcSession, g as DevframeNodeContext, u as DevframeAuthHandler } from "./devframe-BlLEZR-x.mjs";
2
- import { d as DevframeRpcConnection, u as DevframeNodeRpcSessionMeta } from "./ws-server-D1d3QM9f.mjs";
3
- import "./index-BKFT9-jA.mjs";
1
+ import { d as DevframeRpcConnection, u as DevframeNodeRpcSessionMeta } from "./ws-server-DLtEoLdR.mjs";
2
+ import { Ct as DevframeAuthHandler, _t as DevframeRpcServerFunctions, gt as DevframeRpcClientFunctions, o as DevframeNodeContext, s as DevframeNodeRpcSession } from "./context-_i51nYOs.mjs";
3
+ import "./index-CEvd-YXD.mjs";
4
4
  import { BirpcGroup, EventOptions } from "birpc";
5
5
  //#region src/node/rpc-core.d.ts
6
6
  interface CreateContextRpcServerOptions {
@@ -1,6 +1,6 @@
1
1
  import { n as __exportAll } from "./rolldown-runtime-B4iAMlE-.mjs";
2
2
  import { createRpcServer } from "./rpc/server.mjs";
3
- import { t as diagnostics } from "./diagnostics-Di8ytitn.mjs";
3
+ import { t as diagnostics } from "./diagnostics-BXWW3VK-.mjs";
4
4
  import { AsyncLocalStorage } from "node:async_hooks";
5
5
  //#region src/node/rpc-core.ts
6
6
  var rpc_core_exports = /* @__PURE__ */ __exportAll({ createContextRpcServer: () => createContextRpcServer });
@@ -58,21 +58,14 @@ function createContextRpcServer(options) {
58
58
  return { isTrusted: true };
59
59
  }
60
60
  });
61
- const onConnected = (connection, meta) => {
62
- Promise.resolve().then(() => context.services.ready?.()).catch((error) => {
63
- const reason = error instanceof Error ? error.message : String(error);
64
- diagnostics.DF0071({
65
- reason,
66
- cause: error
67
- }, { method: "error" });
68
- });
61
+ const onConnected = authHandler || options.onPeerConnect ? (connection, meta) => {
69
62
  const session = {
70
63
  meta,
71
64
  rpc: rpcGroup.clients.find((client) => client.$meta === meta)
72
65
  };
73
66
  authHandler?.onConnect(connection, session);
74
67
  options.onPeerConnect?.(connection, session);
75
- };
68
+ } : void 0;
76
69
  const onDisconnected = (connection, meta) => {
77
70
  options.onPeerDisconnect?.(connection, meta);
78
71
  rpcHost._emitSessionDisconnected(meta);
@@ -1,6 +1,6 @@
1
1
  import { createEventEmitter } from "./utils/events.mjs";
2
2
  import { nanoid } from "./utils/nanoid.mjs";
3
- //#region ../../node_modules/.pnpm/immer@11.1.16/node_modules/immer/dist/immer.mjs
3
+ //#region ../../node_modules/.pnpm/immer@11.1.17/node_modules/immer/dist/immer.mjs
4
4
  var NOTHING = Symbol.for("immer-nothing");
5
5
  var DRAFTABLE = Symbol.for("immer-draftable");
6
6
  var DRAFT_STATE = Symbol.for("immer-state");
@@ -1,4 +1,4 @@
1
- import { v as RpcFunctionDefinitionAny } from "./types-Djq7CBXh.mjs";
1
+ import { v as RpcFunctionDefinitionAny } from "./types-BBLeGfpt.mjs";
2
2
  import { ChannelOptions } from "birpc";
3
3
  //#region src/rpc/transports/sse-client.d.ts
4
4
  interface SseRpcChannelOptions {
@@ -1,4 +1,4 @@
1
- import { n as validateDefinitions, r as getRpcHandler, s as hash } from "./validation-CpXFB6Dz.mjs";
1
+ import { n as validateDefinitions, r as getRpcHandler, s as hash } from "./validation-YrZH6atx.mjs";
2
2
  import { t as diagnostics } from "./diagnostics-CD8nlgll.mjs";
3
3
  import { DEVFRAME_RPC_DUMP_DIRNAME } from "./constants.mjs";
4
4
  //#region ../../node_modules/.pnpm/yocto-queue@1.2.2/node_modules/yocto-queue/index.js
@@ -1,4 +1,4 @@
1
- import { t as diagnostics } from "./diagnostics-Di8ytitn.mjs";
1
+ import { t as diagnostics } from "./diagnostics-BXWW3VK-.mjs";
2
2
  import { createSharedState } from "devframe/utils/shared-state";
3
3
  import process from "node:process";
4
4
  import { dirname } from "pathe";
@@ -1,6 +1,6 @@
1
- import { $ as DevframeStorageScope, A as DevframeServiceId, At as DevframeAgentHost, B as DevframeScopedNodeRpc, C as RpcStreamingChannelOptions, Ct as AgentResource, D as DevframeRpcSharedStates, Dt as AgentToolInput, E as DevframeRpcServerFunctions, Et as AgentTool, F as DevframeServicesHost, G as ScopedBroadcastOptions, H as DevframeSettings, I as DevframeServicesRegistry, J as ScopedServerFunctions, K as ScopedClientFunctions, L as DevframeServicesScopeRegistry, M as DevframeServiceMeta, Mt as EventEmitter, N as DevframeServiceOf, Nt as EventUnsubscribe, O as DevframeServiceDefinition, Ot as AgentToolProvider, P as DevframeServiceScopeOf, Pt as EventsMap, Q as DevframeHost, R as DevframeServicesState, S as RpcStreamingChannel, St as AgentManifest, T as DevframeRpcClientFunctions, Tt as AgentResourceInput, U as DevframeSettingsRegistry, V as DevframeScopedStreamingHost, W as DevframeSettingsStore, X as SettingsForNamespace, Y as ScopedSharedStates, Z as DevframeViewHost, _ as DevframeNodeRpcSession, a as DevframeDuplicationStrategy, b as RpcSharedStateGetOptions, c as DevframeWsOptions, d as ConnectionMeta, et as DevframeDiagnosticsHost, f as ConnectionMetaSse, g as DevframeNodeContext, h as DevframeConnectionConfigsRegistry, i as DevframeDockDefaults, j as DevframeServiceInput, jt as DevframeAgentHostEvents, k as DevframeServiceDescriptor, kt as AgentToolProviderHandle, l as McpRouteOptions, m as DevframeCapabilities, n as DevframeDefinition, o as DevframeSetupInfo, p as ConnectionMetaWebsocket, q as ScopedRpcFn, r as DevframeDeploymentKind, s as DevframeSseOptions, t as DevframeCliOptions, tt as DevframeDiagnosticsLogger, v as RpcBroadcastOptions, w as RpcStreamingHost, wt as AgentResourceContent, x as RpcSharedStateHost, xt as AgentHandle, y as RpcFunctionsHost, z as DevframeScopedNodeContext } from "../devframe-BlLEZR-x.mjs";
2
- import { g as RpcFunctionAgentOptions } from "../types-Djq7CBXh.mjs";
3
- import { d as DevframeRpcConnection, f as DevframeRpcConnectionRequest, p as DevframeRpcTransportKind, u as DevframeNodeRpcSessionMeta } from "../ws-server-D1d3QM9f.mjs";
4
- import { i as DevframeDefineDiagnosticsOptions } from "../nostics-SPGDgHEP.mjs";
1
+ import { g as RpcFunctionAgentOptions } from "../types-BBLeGfpt.mjs";
2
+ import { d as DevframeRpcConnection, f as DevframeRpcConnectionRequest, p as DevframeRpcTransportKind, u as DevframeNodeRpcSessionMeta } from "../ws-server-DLtEoLdR.mjs";
3
+ import { $ as DevframeServicesHost, At as AgentResource, B as DevframeSetupInfo, Bt as EventUnsubscribe, F as DevframeDefinition, Ft as AgentToolProvider, G as McpRouteOptions, H as DevframeSnapshotRpcInputs, I as DevframeDeploymentKind, It as AgentToolProviderHandle, J as DevframeServiceId, K as DevframeServiceDefinition, L as DevframeDockDefaults, Lt as DevframeAgentHost, Mt as AgentResourceInput, Nt as AgentTool, Ot as AgentHandle, P as DevframeCliOptions, Pt as AgentToolInput, Q as DevframeServiceScopeOf, R as DevframeDuplicationStrategy, Rt as DevframeAgentHostEvents, St as DevframeDiagnosticsLogger, U as DevframeSseOptions, V as DevframeSnapshotRpcEntry, Vt as EventsMap, W as DevframeWsOptions, X as DevframeServiceMeta, Y as DevframeServiceInput, Z as DevframeServiceOf, _t as DevframeRpcServerFunctions, a as DevframeConnectionConfigsRegistry, at as DevframeScopedStreamingHost, bt as DevframeStorageScope, c as RpcBroadcastOptions, ct as DevframeSettingsStore, d as RpcSharedStateHost, dt as ScopedRpcFn, et as DevframeServicesRegistry, f as RpcStreamingChannel, ft as ScopedServerFunctions, gt as DevframeRpcClientFunctions, ht as DevframeViewHost, i as DevframeCapabilities, it as DevframeScopedNodeRpc, jt as AgentResourceContent, kt as AgentManifest, l as RpcFunctionsHost, lt as ScopedBroadcastOptions, m as RpcStreamingHost, mt as SettingsForNamespace, n as ConnectionMetaSse, nt as DevframeServicesState, o as DevframeNodeContext, ot as DevframeSettings, p as RpcStreamingChannelOptions, pt as ScopedSharedStates, q as DevframeServiceDescriptor, r as ConnectionMetaWebsocket, rt as DevframeScopedNodeContext, s as DevframeNodeRpcSession, st as DevframeSettingsRegistry, t as ConnectionMeta, tt as DevframeServicesScopeRegistry, u as RpcSharedStateGetOptions, ut as ScopedClientFunctions, vt as DevframeRpcSharedStates, xt as DevframeDiagnosticsHost, yt as DevframeHost, z as DevframeRpcOptions, zt as EventEmitter } from "../context-_i51nYOs.mjs";
5
4
  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
- export { AgentHandle, AgentManifest, AgentResource, AgentResourceContent, AgentResourceInput, AgentTool, AgentToolInput, AgentToolProvider, AgentToolProviderHandle, ConnectionMeta, ConnectionMetaSse, ConnectionMetaWebsocket, DevframeAgentHost, DevframeAgentHostEvents, DevframeCapabilities, DevframeCliOptions, DevframeConnectionConfigsRegistry, type DevframeDefineDiagnosticsOptions, DevframeDefinition, DevframeDeploymentKind, DevframeDiagnosticsHost, DevframeDiagnosticsLogger, DevframeDockDefaults, DevframeDuplicationStrategy, DevframeHost, DevframeNodeContext, DevframeNodeRpcSession, type DevframeNodeRpcSessionMeta, DevframeRpcClientFunctions, type DevframeRpcConnection, type DevframeRpcConnectionRequest, DevframeRpcServerFunctions, DevframeRpcSharedStates, type DevframeRpcTransportKind, DevframeScopedNodeContext, DevframeScopedNodeRpc, DevframeScopedStreamingHost, DevframeServiceDefinition, DevframeServiceDescriptor, DevframeServiceId, DevframeServiceInput, DevframeServiceMeta, DevframeServiceOf, DevframeServiceScopeOf, DevframeServicesHost, DevframeServicesRegistry, DevframeServicesScopeRegistry, DevframeServicesState, DevframeSettings, DevframeSettingsRegistry, DevframeSettingsStore, DevframeSetupInfo, DevframeSseOptions, DevframeStorageScope, DevframeViewHost, DevframeWsOptions, EventEmitter, EventUnsubscribe, EventsMap, McpRouteOptions, RemoteAssets, RemoteAssetsErrorMessage, RemoteAssetsProvider, RemoteAssetsProviderCustom, RemoteAssetsStore, RpcBroadcastOptions, type RpcFunctionAgentOptions, RpcFunctionsHost, RpcSharedStateGetOptions, RpcSharedStateHost, RpcStreamingChannel, RpcStreamingChannelOptions, RpcStreamingHost, ScopedBroadcastOptions, ScopedClientFunctions, ScopedRpcFn, ScopedServerFunctions, ScopedSharedStates, SettingsForNamespace, StaticAssetsSource };
5
+ import { i as DevframeDefineDiagnosticsOptions } from "../nostics-SPGDgHEP.mjs";
6
+ export { AgentHandle, AgentManifest, AgentResource, AgentResourceContent, AgentResourceInput, AgentTool, AgentToolInput, AgentToolProvider, AgentToolProviderHandle, ConnectionMeta, ConnectionMetaSse, ConnectionMetaWebsocket, DevframeAgentHost, DevframeAgentHostEvents, DevframeCapabilities, DevframeCliOptions, DevframeConnectionConfigsRegistry, type DevframeDefineDiagnosticsOptions, DevframeDefinition, DevframeDeploymentKind, DevframeDiagnosticsHost, DevframeDiagnosticsLogger, DevframeDockDefaults, DevframeDuplicationStrategy, DevframeHost, DevframeNodeContext, DevframeNodeRpcSession, type DevframeNodeRpcSessionMeta, DevframeRpcClientFunctions, type DevframeRpcConnection, type DevframeRpcConnectionRequest, DevframeRpcOptions, DevframeRpcServerFunctions, DevframeRpcSharedStates, type DevframeRpcTransportKind, DevframeScopedNodeContext, DevframeScopedNodeRpc, DevframeScopedStreamingHost, DevframeServiceDefinition, DevframeServiceDescriptor, DevframeServiceId, DevframeServiceInput, DevframeServiceMeta, DevframeServiceOf, DevframeServiceScopeOf, DevframeServicesHost, DevframeServicesRegistry, DevframeServicesScopeRegistry, DevframeServicesState, DevframeSettings, DevframeSettingsRegistry, DevframeSettingsStore, DevframeSetupInfo, DevframeSnapshotRpcEntry, DevframeSnapshotRpcInputs, DevframeSseOptions, DevframeStorageScope, DevframeViewHost, DevframeWsOptions, EventEmitter, EventUnsubscribe, EventsMap, McpRouteOptions, RemoteAssets, RemoteAssetsErrorMessage, RemoteAssetsProvider, RemoteAssetsProviderCustom, RemoteAssetsStore, RpcBroadcastOptions, type RpcFunctionAgentOptions, RpcFunctionsHost, RpcSharedStateGetOptions, RpcSharedStateHost, RpcStreamingChannel, RpcStreamingChannelOptions, RpcStreamingHost, ScopedBroadcastOptions, ScopedClientFunctions, ScopedRpcFn, ScopedServerFunctions, ScopedSharedStates, SettingsForNamespace, StaticAssetsSource };
@@ -1,5 +1,5 @@
1
- import { StandardSchemaV1 } from "@standard-schema/spec";
2
1
  import { BirpcFn, BirpcReturn as BirpcReturn$1 } from "birpc";
2
+ import { StandardSchemaV1 } from "@standard-schema/spec";
3
3
  //#region src/rpc/utils.d.ts
4
4
  /** Infers a TypeScript argument tuple from a Standard Schema array */
5
5
  type InferArgsType<S extends RpcArgsSchema | undefined> = S extends readonly [] ? [] : S extends readonly [infer H, ...infer T] ? H extends StandardSchemaV1 ? T extends readonly StandardSchemaV1[] ? [StandardSchemaV1.InferInput<H>, ...InferArgsType<T>] : never : never : never;
@@ -1,4 +1,4 @@
1
- import { Mt as EventEmitter, Pt as EventsMap } from "../devframe-BlLEZR-x.mjs";
1
+ import { Vt as EventsMap, zt as EventEmitter } from "../context-_i51nYOs.mjs";
2
2
  //#region src/utils/events.d.ts
3
3
  /**
4
4
  * Create event emitter.
@@ -1,2 +1,2 @@
1
- import { t as hash } from "../hash-KtDZYXDN.mjs";
1
+ import { t as hash } from "../hash-DdPnc4k3.mjs";
2
2
  export { hash };
@@ -9,7 +9,13 @@ import { a as RemoteAssetsStore, o as StaticAssetsSource } from "../remote-asset
9
9
  *
10
10
  * A remote source's `package`/`version` are validated first (`DF0065`) — both
11
11
  * are interpolated into CDN URLs and the cache path.
12
+ *
13
+ * `defaultResolveFrom` (typically the declaring devframe's `importMetaUrl`)
14
+ * supplies a `resolveFrom` base for a remote source that doesn't set one:
15
+ * it is applied only when `source.resolveFrom` is `undefined`, so an explicit
16
+ * per-source string still wins and an explicit `null` still opts out of the
17
+ * installed-copy lookup.
12
18
  */
13
- declare function resolveStaticAssetsSource(source: StaticAssetsSource, projectStorageDir: string): string | RemoteAssetsStore;
19
+ declare function resolveStaticAssetsSource(source: StaticAssetsSource, projectStorageDir: string, defaultResolveFrom?: string | null): string | RemoteAssetsStore;
14
20
  //#endregion
15
21
  export { resolveStaticAssetsSource };
@@ -1,2 +1,2 @@
1
- import { t as resolveStaticAssetsSource } from "../remote-assets-DRfY2RjX.mjs";
1
+ import { t as resolveStaticAssetsSource } from "../remote-assets-DezQmPQU.mjs";
2
2
  export { resolveStaticAssetsSource };
@@ -1,2 +1,2 @@
1
- import { _t as SharedStateEvents, bt as createSharedState, dt as Immutable, ft as ImmutableArray, gt as SharedState, ht as ImmutableSet, mt as ImmutableObject, pt as ImmutableMap, vt as SharedStateOptions, yt as SharedStatePatch } from "../devframe-BlLEZR-x.mjs";
1
+ import { A as SharedStateEvents, D as ImmutableObject, E as ImmutableMap, M as SharedStatePatch, N as createSharedState, O as ImmutableSet, T as ImmutableArray, j as SharedStateOptions, k as SharedState, w as Immutable } from "../context-_i51nYOs.mjs";
2
2
  export { Immutable, ImmutableArray, ImmutableMap, ImmutableObject, ImmutableSet, SharedState, SharedStateEvents, SharedStateOptions, SharedStatePatch, createSharedState };
@@ -1,2 +1,2 @@
1
- import { t as createSharedState } from "../shared-state-fRRbRUtD.mjs";
1
+ import { t as createSharedState } from "../shared-state-DoXutg_U.mjs";
2
2
  export { createSharedState };
@@ -1,2 +1,2 @@
1
- import { at as StreamErrorPayload, ct as StreamSinkEvents, it as CreateStreamSinkOptions, lt as createStreamReader, nt as BufferedChunk, ot as StreamReader, rt as CreateStreamReaderOptions, st as StreamSink, ut as createStreamSink } from "../devframe-BlLEZR-x.mjs";
1
+ import { C as createStreamSink, S as createStreamReader, _ as CreateStreamSinkOptions, b as StreamSink, g as CreateStreamReaderOptions, h as BufferedChunk, v as StreamErrorPayload, x as StreamSinkEvents, y as StreamReader } from "../context-_i51nYOs.mjs";
2
2
  export { BufferedChunk, CreateStreamReaderOptions, CreateStreamSinkOptions, StreamErrorPayload, StreamReader, StreamSink, StreamSinkEvents, createStreamReader, createStreamSink };