devframe 0.4.1 → 0.5.1
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.
- package/README.md +1 -1
- package/dist/adapters/build.d.mts +2 -2
- package/dist/adapters/build.mjs +9 -9
- package/dist/adapters/cli.d.mts +1 -1
- package/dist/adapters/cli.mjs +1 -1
- package/dist/adapters/dev.d.mts +2 -2
- package/dist/adapters/dev.mjs +1 -1
- package/dist/adapters/embedded.d.mts +2 -2
- package/dist/adapters/mcp.d.mts +1 -1
- package/dist/adapters/mcp.mjs +3 -3
- package/dist/client/index.d.mts +28 -28
- package/dist/client/index.mjs +27 -23
- package/dist/constants.d.mts +10 -10
- package/dist/constants.mjs +10 -10
- package/dist/{context-C9oW88gr.d.mts → context-DTRcO_UH.d.mts} +6 -6
- package/dist/{storage-CZVTPKsw.mjs → context-DaKmhhHY.mjs} +48 -3
- package/dist/{dev-C2wjXjGB.mjs → dev-Cv43GfqM.mjs} +5 -5
- package/dist/{devframe-K4IxpM4a.d.mts → devframe-BuR6n9ZD.d.mts} +44 -44
- package/dist/{dump-B1wd4u68.mjs → dump-9lKIJTLh.mjs} +15 -11
- package/dist/helpers/vite.d.mts +1 -1
- package/dist/helpers/vite.mjs +4 -4
- package/dist/{host-h3-Div5Vp8R.mjs → host-h3-Dgpgr1Ul.mjs} +16 -16
- package/dist/{index-CBSBvT9K.d.mts → index-C7M1hnvL.d.mts} +2 -2
- package/dist/{index-BhtRKN7X.d.mts → index-DH2sBIwd.d.mts} +1 -1
- package/dist/index.d.mts +5 -5
- package/dist/node/auth.d.mts +5 -5
- package/dist/node/auth.mjs +1 -1
- package/dist/node/{internal.d.mts → hub-internals.d.mts} +3 -3
- package/dist/node/hub-internals.mjs +3 -0
- package/dist/node/index.d.mts +34 -34
- package/dist/node/index.mjs +4 -4
- package/dist/recipes/open-helpers.d.mts +5 -5
- package/dist/{human-id-Dq-qgtES.mjs → revoke-CL0LSAN9.mjs} +35 -35
- package/dist/rpc/dump.d.mts +1 -1
- package/dist/rpc/dump.mjs +1 -1
- package/dist/rpc/index.d.mts +2 -2
- package/dist/rpc/index.mjs +1 -1
- package/dist/rpc/transports/ws-client.d.mts +1 -1
- package/dist/rpc/transports/ws-client.mjs +1 -1
- package/dist/rpc/transports/ws-server.d.mts +2 -2
- package/dist/{server-BO8IDVsJ.mjs → server-BBaBJaUL.mjs} +12 -5
- package/dist/{server-KzCqriO9.d.mts → server-wHlpcdZ9.d.mts} +3 -3
- package/dist/{shared-state-CasqoUba.mjs → shared-state-BlBNYziY.mjs} +1 -1
- package/dist/types/index.d.mts +4 -4
- package/dist/{types-dNW3UmMl.d.mts → types-BkkQ0Txg.d.mts} +4 -4
- package/dist/utils/events.d.mts +1 -1
- package/dist/utils/shared-state.d.mts +1 -1
- package/dist/utils/streaming-channel.d.mts +1 -1
- package/dist/{ws-client-BZptK_Mf.d.mts → ws-client-CVYX9niP.d.mts} +1 -1
- package/dist/{ws-server-CTeMCO1r.d.mts → ws-server-C1LjmRnp.d.mts} +5 -5
- package/package.json +5 -5
- package/skills/devframe/SKILL.md +82 -5
- package/dist/node/internal.mjs +0 -49
package/dist/node/index.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { $ as AgentResource, K as
|
|
2
|
-
import { _ as RpcFunctionDefinitionAny } from "../types-
|
|
3
|
-
import { S as RpcFunctionsCollectorBase } from "../index-
|
|
4
|
-
import { t as
|
|
5
|
-
import { n as StartedServer, r as startHttpAndWs, t as StartHttpAndWsOptions } from "../server-
|
|
1
|
+
import { $ as AgentResource, K as DevframeHost, P as SharedState, Q as AgentManifest, U as DevframeRpcClientFunctions, W as DevframeRpcServerFunctions, X as DevframeDiagnosticsLogger, Y as DevframeDiagnosticsHost$1, Z as AgentHandle, at as DevframeAgentHostEvents, d as DevframeNodeContext, et as AgentResourceContent, f as DevframeNodeRpcSession, g as RpcSharedStateHost, it as DevframeAgentHost$1, m as RpcFunctionsHost$1, nt as AgentTool, ot as EventEmitter, p as RpcBroadcastOptions, rt as AgentToolInput, tt as AgentResourceInput, y as RpcStreamingHost, z as DevframeViewHost$1 } from "../devframe-BuR6n9ZD.mjs";
|
|
2
|
+
import { _ as RpcFunctionDefinitionAny } from "../types-BkkQ0Txg.mjs";
|
|
3
|
+
import { S as RpcFunctionsCollectorBase } from "../index-C7M1hnvL.mjs";
|
|
4
|
+
import { t as DevframeNodeRpcSessionMeta } from "../ws-server-C1LjmRnp.mjs";
|
|
5
|
+
import { n as StartedServer, r as startHttpAndWs, t as StartHttpAndWsOptions } from "../server-wHlpcdZ9.mjs";
|
|
6
6
|
import { BirpcGroup } from "birpc";
|
|
7
7
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
8
8
|
|
|
@@ -11,7 +11,7 @@ interface CreateHostContextOptions {
|
|
|
11
11
|
cwd: string;
|
|
12
12
|
workspaceRoot?: string;
|
|
13
13
|
mode: 'dev' | 'build';
|
|
14
|
-
host:
|
|
14
|
+
host: DevframeHost;
|
|
15
15
|
/**
|
|
16
16
|
* Built-in RPC declarations to register on the host. Framework
|
|
17
17
|
* adapters (vite, rolldown, cli) can pass the ones they need; the
|
|
@@ -20,14 +20,14 @@ interface CreateHostContextOptions {
|
|
|
20
20
|
builtinRpcDeclarations?: readonly RpcFunctionDefinitionAny[];
|
|
21
21
|
}
|
|
22
22
|
/**
|
|
23
|
-
* Framework- and build-tool-agnostic core of the
|
|
23
|
+
* Framework- and build-tool-agnostic core of the Devframe node context.
|
|
24
24
|
* Wires the RPC host, view (HTTP file-serving) host, diagnostics, and
|
|
25
25
|
* agent subsystems. Host adapters can wrap this to augment `ctx` with
|
|
26
26
|
* extra surfaces — for example, `@vitejs/devtools-kit`'s
|
|
27
27
|
* `createKitContext` attaches `docks`, `terminals`, `messages`,
|
|
28
28
|
* `commands`, and `createJsonRenderer` when mounted into Vite DevTools.
|
|
29
29
|
*/
|
|
30
|
-
declare function createHostContext(options: CreateHostContextOptions): Promise<
|
|
30
|
+
declare function createHostContext(options: CreateHostContextOptions): Promise<DevframeNodeContext>;
|
|
31
31
|
//#endregion
|
|
32
32
|
//#region src/node/host-agent.d.ts
|
|
33
33
|
/**
|
|
@@ -38,13 +38,13 @@ declare function createHostContext(options: CreateHostContextOptions): Promise<D
|
|
|
38
38
|
*
|
|
39
39
|
* @experimental
|
|
40
40
|
*/
|
|
41
|
-
declare class
|
|
42
|
-
readonly context:
|
|
43
|
-
readonly events: EventEmitter<
|
|
41
|
+
declare class DevframeAgentHost implements DevframeAgentHost$1 {
|
|
42
|
+
readonly context: DevframeNodeContext;
|
|
43
|
+
readonly events: EventEmitter<DevframeAgentHostEvents>;
|
|
44
44
|
private readonly tools;
|
|
45
45
|
private readonly resources;
|
|
46
46
|
private _rpcUnsubscribe;
|
|
47
|
-
constructor(context:
|
|
47
|
+
constructor(context: DevframeNodeContext);
|
|
48
48
|
registerTool(input: AgentToolInput): AgentHandle;
|
|
49
49
|
unregisterTool(id: string): boolean;
|
|
50
50
|
registerResource(input: AgentResourceInput): AgentHandle;
|
|
@@ -64,23 +64,23 @@ declare class DevToolsAgentHost implements DevToolsAgentHost$1 {
|
|
|
64
64
|
}
|
|
65
65
|
//#endregion
|
|
66
66
|
//#region src/node/host-diagnostics.d.ts
|
|
67
|
-
declare class
|
|
68
|
-
readonly context:
|
|
67
|
+
declare class DevframeDiagnosticsHost implements DevframeDiagnosticsHost$1 {
|
|
68
|
+
readonly context: DevframeNodeContext;
|
|
69
69
|
private _registry;
|
|
70
|
-
readonly logger:
|
|
71
|
-
readonly defineDiagnostics:
|
|
72
|
-
constructor(context:
|
|
70
|
+
readonly logger: DevframeDiagnosticsLogger;
|
|
71
|
+
readonly defineDiagnostics: DevframeDiagnosticsHost$1['defineDiagnostics'];
|
|
72
|
+
constructor(context: DevframeNodeContext, initialDefinitions?: Array<Record<string, unknown>>);
|
|
73
73
|
register(diagnostics: Record<string, unknown>): void;
|
|
74
74
|
}
|
|
75
75
|
//#endregion
|
|
76
76
|
//#region src/node/host-functions.d.ts
|
|
77
|
-
declare class RpcFunctionsHost extends RpcFunctionsCollectorBase<
|
|
77
|
+
declare class RpcFunctionsHost extends RpcFunctionsCollectorBase<DevframeRpcServerFunctions, DevframeNodeContext> implements RpcFunctionsHost$1 {
|
|
78
78
|
/**
|
|
79
79
|
* @internal
|
|
80
80
|
*/
|
|
81
|
-
_rpcGroup: BirpcGroup<
|
|
82
|
-
_asyncStorage: AsyncLocalStorage<
|
|
83
|
-
constructor(context:
|
|
81
|
+
_rpcGroup: BirpcGroup<DevframeRpcClientFunctions, DevframeRpcServerFunctions, false>;
|
|
82
|
+
_asyncStorage: AsyncLocalStorage<DevframeNodeRpcSession>;
|
|
83
|
+
constructor(context: DevframeNodeContext);
|
|
84
84
|
sharedState: RpcSharedStateHost;
|
|
85
85
|
streaming: RpcStreamingHost;
|
|
86
86
|
/**
|
|
@@ -90,14 +90,14 @@ declare class RpcFunctionsHost extends RpcFunctionsCollectorBase<DevToolsRpcServ
|
|
|
90
90
|
*
|
|
91
91
|
* @internal
|
|
92
92
|
*/
|
|
93
|
-
_emitSessionDisconnected(meta:
|
|
94
|
-
invokeLocal<T extends keyof
|
|
95
|
-
broadcast<T extends keyof
|
|
96
|
-
getCurrentRpcSession():
|
|
93
|
+
_emitSessionDisconnected(meta: DevframeNodeRpcSessionMeta): void;
|
|
94
|
+
invokeLocal<T extends keyof DevframeRpcServerFunctions, Args extends Parameters<DevframeRpcServerFunctions[T]>>(method: T, ...args: Args): Promise<Awaited<ReturnType<DevframeRpcServerFunctions[T]>>>;
|
|
95
|
+
broadcast<T extends keyof DevframeRpcClientFunctions, Args extends Parameters<DevframeRpcClientFunctions[T]>>(options: RpcBroadcastOptions<T, Args>): Promise<void>;
|
|
96
|
+
getCurrentRpcSession(): DevframeNodeRpcSession | undefined;
|
|
97
97
|
}
|
|
98
98
|
//#endregion
|
|
99
99
|
//#region src/node/host-h3.d.ts
|
|
100
|
-
interface
|
|
100
|
+
interface CreateH3DevframeHostOptions {
|
|
101
101
|
/** The h3 app instance — registered once the CLI adapter lands. */
|
|
102
102
|
app?: unknown;
|
|
103
103
|
/**
|
|
@@ -113,8 +113,8 @@ interface CreateH3DevToolsHostOptions {
|
|
|
113
113
|
mount?: (base: string, distDir: string) => void | Promise<void>;
|
|
114
114
|
/**
|
|
115
115
|
* Namespace for storage paths returned by `getStorageDir`. Workspace
|
|
116
|
-
* state lives under `${workspaceRoot}/node_modules/.<appName>/
|
|
117
|
-
* and global state under `${homedir()}/.<appName>/
|
|
116
|
+
* state lives under `${workspaceRoot}/node_modules/.<appName>/devframe/`
|
|
117
|
+
* and global state under `${homedir()}/.<appName>/devframe/`. Pick the
|
|
118
118
|
* devtool's id (or another stable, filesystem-safe identifier) so the
|
|
119
119
|
* standalone host doesn't collide with other tools' storage.
|
|
120
120
|
*/
|
|
@@ -126,13 +126,13 @@ interface CreateH3DevToolsHostOptions {
|
|
|
126
126
|
workspaceRoot?: string;
|
|
127
127
|
}
|
|
128
128
|
/**
|
|
129
|
-
* h3-backed {@link
|
|
129
|
+
* h3-backed {@link DevframeHost} — used by the standalone CLI adapter.
|
|
130
130
|
*/
|
|
131
|
-
declare function
|
|
131
|
+
declare function createH3DevframeHost(options: CreateH3DevframeHostOptions): DevframeHost;
|
|
132
132
|
//#endregion
|
|
133
133
|
//#region src/node/host-views.d.ts
|
|
134
|
-
declare class
|
|
135
|
-
readonly context:
|
|
134
|
+
declare class DevframeViewHost implements DevframeViewHost$1 {
|
|
135
|
+
readonly context: DevframeNodeContext;
|
|
136
136
|
/**
|
|
137
137
|
* @internal
|
|
138
138
|
*/
|
|
@@ -140,7 +140,7 @@ declare class DevToolsViewHost implements DevToolsViewHost$1 {
|
|
|
140
140
|
baseUrl: string;
|
|
141
141
|
distDir: string;
|
|
142
142
|
}[];
|
|
143
|
-
constructor(context:
|
|
143
|
+
constructor(context: DevframeNodeContext);
|
|
144
144
|
hostStatic(baseUrl: string, distDir: string): void;
|
|
145
145
|
}
|
|
146
146
|
//#endregion
|
|
@@ -169,4 +169,4 @@ declare function createStorage<T extends object>(options: CreateStorageOptions<T
|
|
|
169
169
|
declare function isObject(value: unknown): value is Record<string, any>;
|
|
170
170
|
declare function normalizeHttpServerUrl(host: string, port: number | string): string;
|
|
171
171
|
//#endregion
|
|
172
|
-
export {
|
|
172
|
+
export { CreateH3DevframeHostOptions, CreateHostContextOptions, CreateStorageOptions, DevframeAgentHost, DevframeDiagnosticsHost, DevframeViewHost, RpcFunctionsHost, StartHttpAndWsOptions, StartedServer, createH3DevframeHost, createHostContext, createRpcSharedStateServerHost, createRpcStreamingServerHost, createStorage, isObject, normalizeHttpServerUrl, startHttpAndWs };
|
package/dist/node/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as createRpcStreamingServerHost, c as
|
|
2
|
-
import {
|
|
3
|
-
import { t as
|
|
1
|
+
import { a as createRpcStreamingServerHost, c as DevframeAgentHost, i as RpcFunctionsHost, n as createHostContext, o as createRpcSharedStateServerHost, r as DevframeViewHost, s as DevframeDiagnosticsHost, t as createH3DevframeHost } from "../host-h3-Dgpgr1Ul.mjs";
|
|
2
|
+
import { r as createStorage } from "../context-DaKmhhHY.mjs";
|
|
3
|
+
import { t as startHttpAndWs } from "../server-BBaBJaUL.mjs";
|
|
4
4
|
import { isIP } from "node:net";
|
|
5
5
|
//#region src/node/utils.ts
|
|
6
6
|
function isObject(value) {
|
|
@@ -10,4 +10,4 @@ function normalizeHttpServerUrl(host, port) {
|
|
|
10
10
|
return `http://${host === "127.0.0.1" ? "localhost" : isIP(host) === 6 ? `[${host}]` : host}:${port}`;
|
|
11
11
|
}
|
|
12
12
|
//#endregion
|
|
13
|
-
export {
|
|
13
|
+
export { DevframeAgentHost, DevframeDiagnosticsHost, DevframeViewHost, RpcFunctionsHost, createH3DevframeHost, createHostContext, createRpcSharedStateServerHost, createRpcStreamingServerHost, createStorage, isObject, normalizeHttpServerUrl, startHttpAndWs };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { T as Thenable, h as RpcFunctionAgentOptions, s as RpcDump, x as RpcFunctionSetupResult } from "../types-
|
|
1
|
+
import { T as Thenable, h as RpcFunctionAgentOptions, s as RpcDump, x as RpcFunctionSetupResult } from "../types-BkkQ0Txg.mjs";
|
|
2
2
|
import * as v from "valibot";
|
|
3
3
|
|
|
4
4
|
//#region src/recipes/open-helpers.d.ts
|
|
@@ -31,7 +31,7 @@ declare const openInEditor: {
|
|
|
31
31
|
handler?: ((args_0: string) => void) | undefined;
|
|
32
32
|
dump?: RpcDump<[string], void, undefined> | undefined;
|
|
33
33
|
snapshot?: boolean;
|
|
34
|
-
|
|
34
|
+
__cache?: WeakMap<object, Thenable<RpcFunctionSetupResult<[string], void>>> | undefined;
|
|
35
35
|
__promise?: Thenable<RpcFunctionSetupResult<[string], void>> | undefined;
|
|
36
36
|
};
|
|
37
37
|
/**
|
|
@@ -57,7 +57,7 @@ declare const openInFinder: {
|
|
|
57
57
|
handler?: ((args_0: string) => void) | undefined;
|
|
58
58
|
dump?: RpcDump<[string], void, undefined> | undefined;
|
|
59
59
|
snapshot?: boolean;
|
|
60
|
-
|
|
60
|
+
__cache?: WeakMap<object, Thenable<RpcFunctionSetupResult<[string], void>>> | undefined;
|
|
61
61
|
__promise?: Thenable<RpcFunctionSetupResult<[string], void>> | undefined;
|
|
62
62
|
};
|
|
63
63
|
/**
|
|
@@ -82,7 +82,7 @@ declare const openHelpers: readonly [{
|
|
|
82
82
|
handler?: ((args_0: string) => void) | undefined;
|
|
83
83
|
dump?: RpcDump<[string], void, undefined> | undefined;
|
|
84
84
|
snapshot?: boolean;
|
|
85
|
-
|
|
85
|
+
__cache?: WeakMap<object, Thenable<RpcFunctionSetupResult<[string], void>>> | undefined;
|
|
86
86
|
__promise?: Thenable<RpcFunctionSetupResult<[string], void>> | undefined;
|
|
87
87
|
}, {
|
|
88
88
|
name: "devframe:open-in-finder";
|
|
@@ -96,7 +96,7 @@ declare const openHelpers: readonly [{
|
|
|
96
96
|
handler?: ((args_0: string) => void) | undefined;
|
|
97
97
|
dump?: RpcDump<[string], void, undefined> | undefined;
|
|
98
98
|
snapshot?: boolean;
|
|
99
|
-
|
|
99
|
+
__cache?: WeakMap<object, Thenable<RpcFunctionSetupResult<[string], void>>> | undefined;
|
|
100
100
|
__promise?: Thenable<RpcFunctionSetupResult<[string], void>> | undefined;
|
|
101
101
|
}];
|
|
102
102
|
//#endregion
|
|
@@ -1,37 +1,3 @@
|
|
|
1
|
-
//#region src/node/auth/revoke.ts
|
|
2
|
-
/**
|
|
3
|
-
* Flip `isTrusted` to false on any live WS clients connected with `token`
|
|
4
|
-
* and broadcast the `auth:revoked` event so they can react.
|
|
5
|
-
*
|
|
6
|
-
* Shared between persisted-auth revocation and remote-dock token revocation.
|
|
7
|
-
*/
|
|
8
|
-
async function revokeActiveConnectionsForToken(context, token) {
|
|
9
|
-
const rpcHost = context.rpc;
|
|
10
|
-
if (!rpcHost?._rpcGroup) return;
|
|
11
|
-
const affectedSessionIds = /* @__PURE__ */ new Set();
|
|
12
|
-
for (const client of rpcHost._rpcGroup.clients) if (client.$meta.clientAuthToken === token) {
|
|
13
|
-
affectedSessionIds.add(client.$meta.id);
|
|
14
|
-
client.$meta.isTrusted = false;
|
|
15
|
-
client.$meta.clientAuthToken = void 0;
|
|
16
|
-
}
|
|
17
|
-
if (affectedSessionIds.size === 0) return;
|
|
18
|
-
await rpcHost.broadcast({
|
|
19
|
-
method: "devframe:auth:revoked",
|
|
20
|
-
args: [],
|
|
21
|
-
filter: (client) => affectedSessionIds.has(client.$meta.id)
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Revoke an auth token: remove from storage and notify all connected clients
|
|
26
|
-
* using this token that they are no longer trusted.
|
|
27
|
-
*/
|
|
28
|
-
async function revokeAuthToken(context, storage, token) {
|
|
29
|
-
storage.mutate((state) => {
|
|
30
|
-
delete state.trusted[token];
|
|
31
|
-
});
|
|
32
|
-
await revokeActiveConnectionsForToken(context, token);
|
|
33
|
-
}
|
|
34
|
-
//#endregion
|
|
35
1
|
//#region src/utils/human-id.ts
|
|
36
2
|
const adjectives = [
|
|
37
3
|
"afraid",
|
|
@@ -800,4 +766,38 @@ function humanId() {
|
|
|
800
766
|
return `${pick(adjectives)}-${pick(nouns)}-${pick(verbs)}`;
|
|
801
767
|
}
|
|
802
768
|
//#endregion
|
|
803
|
-
|
|
769
|
+
//#region src/node/auth/revoke.ts
|
|
770
|
+
/**
|
|
771
|
+
* Flip `isTrusted` to false on any live WS clients connected with `token`
|
|
772
|
+
* and broadcast the `auth:revoked` event so they can react.
|
|
773
|
+
*
|
|
774
|
+
* Shared between persisted-auth revocation and remote-dock token revocation.
|
|
775
|
+
*/
|
|
776
|
+
async function revokeActiveConnectionsForToken(context, token) {
|
|
777
|
+
const rpcHost = context.rpc;
|
|
778
|
+
if (!rpcHost?._rpcGroup) return;
|
|
779
|
+
const affectedSessionIds = /* @__PURE__ */ new Set();
|
|
780
|
+
for (const client of rpcHost._rpcGroup.clients) if (client.$meta.clientAuthToken === token) {
|
|
781
|
+
affectedSessionIds.add(client.$meta.id);
|
|
782
|
+
client.$meta.isTrusted = false;
|
|
783
|
+
client.$meta.clientAuthToken = void 0;
|
|
784
|
+
}
|
|
785
|
+
if (affectedSessionIds.size === 0) return;
|
|
786
|
+
await rpcHost.broadcast({
|
|
787
|
+
method: "devframe:auth:revoked",
|
|
788
|
+
args: [],
|
|
789
|
+
filter: (client) => affectedSessionIds.has(client.$meta.id)
|
|
790
|
+
});
|
|
791
|
+
}
|
|
792
|
+
/**
|
|
793
|
+
* Revoke an auth token: remove from storage and notify all connected clients
|
|
794
|
+
* using this token that they are no longer trusted.
|
|
795
|
+
*/
|
|
796
|
+
async function revokeAuthToken(context, storage, token) {
|
|
797
|
+
storage.mutate((state) => {
|
|
798
|
+
delete state.trusted[token];
|
|
799
|
+
});
|
|
800
|
+
await revokeActiveConnectionsForToken(context, token);
|
|
801
|
+
}
|
|
802
|
+
//#endregion
|
|
803
|
+
export { revokeAuthToken as n, humanId as r, revokeActiveConnectionsForToken as t };
|
package/dist/rpc/dump.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as getDefinitionsWithDumps, c as StaticRpcDumpManifest, d as StaticRpcDumpManifestValue, f as StaticRpcDumpSerialization, i as dumpFunctions, l as StaticRpcDumpManifestQueryEntry, n as serializeDumpError, o as StaticRpcDumpCollection, p as collectStaticRpcDump, r as createClientFromDump, s as StaticRpcDumpFile, t as reviveDumpError, u as StaticRpcDumpManifestStaticEntry } from "../index-
|
|
1
|
+
import { a as getDefinitionsWithDumps, c as StaticRpcDumpManifest, d as StaticRpcDumpManifestValue, f as StaticRpcDumpSerialization, i as dumpFunctions, l as StaticRpcDumpManifestQueryEntry, n as serializeDumpError, o as StaticRpcDumpCollection, p as collectStaticRpcDump, r as createClientFromDump, s as StaticRpcDumpFile, t as reviveDumpError, u as StaticRpcDumpManifestStaticEntry } from "../index-DH2sBIwd.mjs";
|
|
2
2
|
export { StaticRpcDumpCollection, StaticRpcDumpFile, StaticRpcDumpManifest, StaticRpcDumpManifestQueryEntry, StaticRpcDumpManifestStaticEntry, StaticRpcDumpManifestValue, StaticRpcDumpSerialization, collectStaticRpcDump, createClientFromDump, dumpFunctions, getDefinitionsWithDumps, reviveDumpError, serializeDumpError };
|
package/dist/rpc/dump.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as dumpFunctions, c as serializeDumpError, i as createClientFromDump, o as getDefinitionsWithDumps, s as reviveDumpError, t as collectStaticRpcDump } from "../dump-
|
|
1
|
+
import { a as dumpFunctions, c as serializeDumpError, i as createClientFromDump, o as getDefinitionsWithDumps, s as reviveDumpError, t as collectStaticRpcDump } from "../dump-9lKIJTLh.mjs";
|
|
2
2
|
export { collectStaticRpcDump, createClientFromDump, dumpFunctions, getDefinitionsWithDumps, reviveDumpError, serializeDumpError };
|
package/dist/rpc/index.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { C as RpcFunctionsCollector, S as RpcFunctionType, T as Thenable, _ as RpcFunctionDefinitionAny, a as RpcDefinitionsFilter, b as RpcFunctionDefinitionToFunction, c as RpcDumpClientOptions, d as RpcDumpGetter, f as RpcDumpRecord, g as RpcFunctionDefinition, h as RpcFunctionAgentOptions, i as RpcArgsSchema, l as RpcDumpCollectionOptions, m as RpcDumpStore, n as BirpcReturn, o as RpcDefinitionsToFunctions, p as RpcDumpRecordError, r as EntriesToObject, s as RpcDump, t as BirpcFn, u as RpcDumpDefinition, v as RpcFunctionDefinitionAnyWithContext, w as RpcReturnSchema, x as RpcFunctionSetupResult, y as RpcFunctionDefinitionBase } from "../types-
|
|
2
|
-
import { C as RpcCacheManager, S as RpcFunctionsCollectorBase, _ as strictJsonStringify, a as StaticRpcDumpManifestStaticEntry, b as createDefineWrapperWithContext, c as collectStaticRpcDump, d as getDefinitionsWithDumps, f as reviveDumpError, g as STRUCTURED_CLONE_PREFIX, h as validateDefinitions, i as StaticRpcDumpManifestQueryEntry, l as createClientFromDump, m as validateDefinition, n as StaticRpcDumpFile, o as StaticRpcDumpManifestValue, p as serializeDumpError, r as StaticRpcDumpManifest, s as StaticRpcDumpSerialization, t as StaticRpcDumpCollection, u as dumpFunctions, v as getRpcHandler, w as RpcCacheOptions, x as defineRpcFunction, y as getRpcResolvedSetupResult } from "../index-
|
|
1
|
+
import { C as RpcFunctionsCollector, S as RpcFunctionType, T as Thenable, _ as RpcFunctionDefinitionAny, a as RpcDefinitionsFilter, b as RpcFunctionDefinitionToFunction, c as RpcDumpClientOptions, d as RpcDumpGetter, f as RpcDumpRecord, g as RpcFunctionDefinition, h as RpcFunctionAgentOptions, i as RpcArgsSchema, l as RpcDumpCollectionOptions, m as RpcDumpStore, n as BirpcReturn, o as RpcDefinitionsToFunctions, p as RpcDumpRecordError, r as EntriesToObject, s as RpcDump, t as BirpcFn, u as RpcDumpDefinition, v as RpcFunctionDefinitionAnyWithContext, w as RpcReturnSchema, x as RpcFunctionSetupResult, y as RpcFunctionDefinitionBase } from "../types-BkkQ0Txg.mjs";
|
|
2
|
+
import { C as RpcCacheManager, S as RpcFunctionsCollectorBase, _ as strictJsonStringify, a as StaticRpcDumpManifestStaticEntry, b as createDefineWrapperWithContext, c as collectStaticRpcDump, d as getDefinitionsWithDumps, f as reviveDumpError, g as STRUCTURED_CLONE_PREFIX, h as validateDefinitions, i as StaticRpcDumpManifestQueryEntry, l as createClientFromDump, m as validateDefinition, n as StaticRpcDumpFile, o as StaticRpcDumpManifestValue, p as serializeDumpError, r as StaticRpcDumpManifest, s as StaticRpcDumpSerialization, t as StaticRpcDumpCollection, u as dumpFunctions, v as getRpcHandler, w as RpcCacheOptions, x as defineRpcFunction, y as getRpcResolvedSetupResult } from "../index-C7M1hnvL.mjs";
|
|
3
3
|
export { BirpcFn, BirpcReturn, EntriesToObject, RpcArgsSchema, RpcCacheManager, RpcCacheOptions, RpcDefinitionsFilter, RpcDefinitionsToFunctions, RpcDump, RpcDumpClientOptions, RpcDumpCollectionOptions, RpcDumpDefinition, RpcDumpGetter, RpcDumpRecord, RpcDumpRecordError, RpcDumpStore, RpcFunctionAgentOptions, RpcFunctionDefinition, RpcFunctionDefinitionAny, RpcFunctionDefinitionAnyWithContext, RpcFunctionDefinitionBase, RpcFunctionDefinitionToFunction, RpcFunctionSetupResult, RpcFunctionType, RpcFunctionsCollector, RpcFunctionsCollectorBase, RpcReturnSchema, STRUCTURED_CLONE_PREFIX, StaticRpcDumpCollection, StaticRpcDumpFile, StaticRpcDumpManifest, StaticRpcDumpManifestQueryEntry, StaticRpcDumpManifestStaticEntry, StaticRpcDumpManifestValue, StaticRpcDumpSerialization, Thenable, collectStaticRpcDump, createClientFromDump, createDefineWrapperWithContext, defineRpcFunction, dumpFunctions, getDefinitionsWithDumps, getRpcHandler, getRpcResolvedSetupResult, reviveDumpError, serializeDumpError, strictJsonStringify, validateDefinition, validateDefinitions };
|
package/dist/rpc/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as dumpFunctions$1, c as serializeDumpError$1, d as hash, i as createClientFromDump$1, l as validateDefinition, n as getRpcHandler, o as getDefinitionsWithDumps$1, r as getRpcResolvedSetupResult, s as reviveDumpError$1, t as collectStaticRpcDump$1, u as validateDefinitions } from "../dump-
|
|
1
|
+
import { a as dumpFunctions$1, c as serializeDumpError$1, d as hash, i as createClientFromDump$1, l as validateDefinition, n as getRpcHandler, o as getDefinitionsWithDumps$1, r as getRpcResolvedSetupResult, s as reviveDumpError$1, t as collectStaticRpcDump$1, u as validateDefinitions } from "../dump-9lKIJTLh.mjs";
|
|
2
2
|
import { t as diagnostics } from "../diagnostics-GitRGKbr.mjs";
|
|
3
3
|
import { n as defineRpcFunction, t as createDefineWrapperWithContext } from "../define-CW9gLnyG.mjs";
|
|
4
4
|
import { n as strictJsonStringify, t as STRUCTURED_CLONE_PREFIX } from "../serialization-BD_qXGjd.mjs";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as createWsRpcChannel, t as WsRpcChannelOptions } from "../../ws-client-
|
|
1
|
+
import { n as createWsRpcChannel, t as WsRpcChannelOptions } from "../../ws-client-CVYX9niP.mjs";
|
|
2
2
|
export { WsRpcChannelOptions, createWsRpcChannel };
|
|
@@ -9,7 +9,7 @@ const EMPTY_DEFS = /* @__PURE__ */ new Map();
|
|
|
9
9
|
*/
|
|
10
10
|
function createWsRpcChannel(options) {
|
|
11
11
|
let url = options.url;
|
|
12
|
-
if (options.authToken) url = `${url}?
|
|
12
|
+
if (options.authToken) url = `${url}?devframe_auth_token=${encodeURIComponent(options.authToken)}`;
|
|
13
13
|
const ws = new WebSocket(url);
|
|
14
14
|
const { onConnected = NOOP, onError = NOOP, onDisconnected = NOOP, definitions = EMPTY_DEFS } = options;
|
|
15
15
|
ws.addEventListener("open", (e) => {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as WsRpcTransportOptions, r as attachWsRpcTransport, t as
|
|
2
|
-
export {
|
|
1
|
+
import { n as WsRpcTransportOptions, r as attachWsRpcTransport, t as DevframeNodeRpcSessionMeta } from "../../ws-server-C1LjmRnp.mjs";
|
|
2
|
+
export { DevframeNodeRpcSessionMeta, WsRpcTransportOptions, attachWsRpcTransport };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { createRpcServer } from "./rpc/server.mjs";
|
|
2
2
|
import { attachWsRpcTransport } from "./rpc/transports/ws-server.mjs";
|
|
3
|
+
import { t as getInternalContext } from "./context-DaKmhhHY.mjs";
|
|
3
4
|
import { WebSocketServer } from "ws";
|
|
4
5
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
5
6
|
import { createServer } from "node:http";
|
|
@@ -39,8 +40,8 @@ async function startHttpAndWs(options) {
|
|
|
39
40
|
rpcHost._rpcGroup = rpcGroup;
|
|
40
41
|
rpcHost._asyncStorage = asyncStorage;
|
|
41
42
|
rpcHost._authDisabled = options.auth === false;
|
|
42
|
-
if (options.auth === false && !rpcHost.definitions.has("
|
|
43
|
-
name: "
|
|
43
|
+
if (options.auth === false && !rpcHost.definitions.has("devframe:anonymous:auth")) rpcHost.register({
|
|
44
|
+
name: "devframe:anonymous:auth",
|
|
44
45
|
type: "action",
|
|
45
46
|
handler: () => {
|
|
46
47
|
const session = rpcHost.getCurrentRpcSession();
|
|
@@ -51,15 +52,20 @@ async function startHttpAndWs(options) {
|
|
|
51
52
|
await new Promise((resolveListen) => {
|
|
52
53
|
httpServer.listen(port, bindHost, () => resolveListen());
|
|
53
54
|
});
|
|
54
|
-
const
|
|
55
|
+
const address = httpServer.address();
|
|
56
|
+
const resolvedPort = typeof address === "object" && address ? address.port : port;
|
|
57
|
+
const origin = `http://${bindHost}:${resolvedPort}`;
|
|
58
|
+
const internal = getInternalContext(context);
|
|
59
|
+
const wsUrl = origin.replace(/^http/, "ws");
|
|
60
|
+
internal.wsEndpoint = { url: wsUrl };
|
|
55
61
|
if (options.onReady) await options.onReady({
|
|
56
62
|
origin,
|
|
57
|
-
port,
|
|
63
|
+
port: resolvedPort,
|
|
58
64
|
app
|
|
59
65
|
});
|
|
60
66
|
return {
|
|
61
67
|
origin,
|
|
62
|
-
port,
|
|
68
|
+
port: resolvedPort,
|
|
63
69
|
app,
|
|
64
70
|
wss,
|
|
65
71
|
rpcGroup,
|
|
@@ -67,6 +73,7 @@ async function startHttpAndWs(options) {
|
|
|
67
73
|
for (const ws of wss.clients) ws.terminate();
|
|
68
74
|
await new Promise((r) => wss.close(() => r()));
|
|
69
75
|
await new Promise((r) => httpServer.close(() => r()));
|
|
76
|
+
if (getInternalContext(context).wsEndpoint?.url === wsUrl) getInternalContext(context).wsEndpoint = void 0;
|
|
70
77
|
}
|
|
71
78
|
};
|
|
72
79
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { U as
|
|
1
|
+
import { U as DevframeRpcClientFunctions, W as DevframeRpcServerFunctions, d as DevframeNodeContext } from "./devframe-BuR6n9ZD.mjs";
|
|
2
2
|
import { BirpcGroup } from "birpc";
|
|
3
3
|
import { WebSocketServer } from "ws";
|
|
4
4
|
import { H3 } from "h3";
|
|
5
5
|
|
|
6
6
|
//#region src/node/server.d.ts
|
|
7
7
|
interface StartHttpAndWsOptions {
|
|
8
|
-
context:
|
|
8
|
+
context: DevframeNodeContext;
|
|
9
9
|
host?: string;
|
|
10
10
|
port: number;
|
|
11
11
|
/**
|
|
@@ -42,7 +42,7 @@ interface StartedServer {
|
|
|
42
42
|
port: number;
|
|
43
43
|
app: H3;
|
|
44
44
|
wss: WebSocketServer;
|
|
45
|
-
rpcGroup: BirpcGroup<
|
|
45
|
+
rpcGroup: BirpcGroup<DevframeRpcClientFunctions, DevframeRpcServerFunctions, false>;
|
|
46
46
|
close: () => Promise<void>;
|
|
47
47
|
}
|
|
48
48
|
/**
|
|
@@ -6,7 +6,7 @@ const diagnostics = defineDiagnostics({
|
|
|
6
6
|
reporters: [devframeReporter],
|
|
7
7
|
codes: {
|
|
8
8
|
DF0006: { why: (p) => `RPC function "${p.name}" is not registered` },
|
|
9
|
-
DF0007: { why: "AsyncLocalStorage is not set, it likely to be an internal bug of the
|
|
9
|
+
DF0007: { why: "AsyncLocalStorage is not set, it likely to be an internal bug of the Devframe foundation" },
|
|
10
10
|
DF0008: { why: (p) => `distDir ${p.distDir} does not exist` },
|
|
11
11
|
DF0012: { why: (p) => `Failed to parse storage file: ${p.filepath}, falling back to defaults.` },
|
|
12
12
|
DF0013: { why: (p) => `Shared state of "${p.key}" is not found, please provide an initial value for the first time` },
|
package/dist/types/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as AgentResource, B as EntriesToObject, G as
|
|
2
|
-
import { h as RpcFunctionAgentOptions } from "../types-
|
|
3
|
-
import { t as
|
|
4
|
-
export { AgentHandle, AgentManifest, AgentResource, AgentResourceContent, AgentResourceInput, AgentTool, AgentToolInput, ConnectionMeta,
|
|
1
|
+
import { $ as AgentResource, B as EntriesToObject, G as DevframeRpcSharedStates, H as Thenable, J as DevframeDiagnosticsDefinition, K as DevframeHost, Q as AgentManifest, U as DevframeRpcClientFunctions, V as PartialWithoutId, W as DevframeRpcServerFunctions, X as DevframeDiagnosticsLogger, Y as DevframeDiagnosticsHost, Z as AgentHandle, _ as RpcStreamingChannel, a as DevframeRuntime, at as DevframeAgentHostEvents, c as defineDevframe, ct as EventsMap, d as DevframeNodeContext, et as AgentResourceContent, f as DevframeNodeRpcSession, g as RpcSharedStateHost, h as RpcSharedStateGetOptions, i as DevframeDeploymentKind, it as DevframeAgentHost, l as ConnectionMeta, m as RpcFunctionsHost, n as DevframeCliOptions, nt as AgentTool, o as DevframeSetupInfo, ot as EventEmitter, p as RpcBroadcastOptions, q as DevframeDefineDiagnosticsOptions, r as DevframeDefinition, rt as AgentToolInput, s as DevframeSpaOptions, st as EventUnsubscribe, t as DevframeBrowserContext, tt as AgentResourceInput, u as DevframeCapabilities, v as RpcStreamingChannelOptions, y as RpcStreamingHost, z as DevframeViewHost } from "../devframe-BuR6n9ZD.mjs";
|
|
2
|
+
import { h as RpcFunctionAgentOptions } from "../types-BkkQ0Txg.mjs";
|
|
3
|
+
import { t as DevframeNodeRpcSessionMeta } from "../ws-server-C1LjmRnp.mjs";
|
|
4
|
+
export { AgentHandle, AgentManifest, AgentResource, AgentResourceContent, AgentResourceInput, AgentTool, AgentToolInput, ConnectionMeta, DevframeAgentHost, DevframeAgentHostEvents, DevframeBrowserContext, DevframeCapabilities, DevframeCliOptions, DevframeDefineDiagnosticsOptions, DevframeDefinition, DevframeDeploymentKind, DevframeDiagnosticsDefinition, DevframeDiagnosticsHost, DevframeDiagnosticsLogger, DevframeHost, DevframeNodeContext, DevframeNodeRpcSession, DevframeNodeRpcSessionMeta, DevframeRpcClientFunctions, DevframeRpcServerFunctions, DevframeRpcSharedStates, DevframeRuntime, DevframeSetupInfo, DevframeSpaOptions, DevframeViewHost, EntriesToObject, EventEmitter, EventUnsubscribe, EventsMap, PartialWithoutId, RpcBroadcastOptions, RpcFunctionAgentOptions, RpcFunctionsHost, RpcSharedStateGetOptions, RpcSharedStateHost, RpcStreamingChannel, RpcStreamingChannelOptions, RpcStreamingHost, Thenable, defineDevframe };
|
|
@@ -234,8 +234,8 @@ type RpcFunctionDefinition<NAME extends string, TYPE extends RpcFunctionType = '
|
|
|
234
234
|
* to the same snapshot. Only valid on `query` (or untyped)
|
|
235
235
|
* functions — `static` already has equivalent default behavior.
|
|
236
236
|
*/
|
|
237
|
-
snapshot?: boolean;
|
|
238
|
-
|
|
237
|
+
snapshot?: boolean; /** Per-context setup-result cache, populated by `getRpcResolvedSetupResult`. @internal */
|
|
238
|
+
__cache?: WeakMap<object, Thenable<RpcFunctionSetupResult<ARGS, RETURN>>>; /** Single-slot fallback for primitive contexts. @internal */
|
|
239
239
|
__promise?: Thenable<RpcFunctionSetupResult<ARGS, RETURN>>;
|
|
240
240
|
} : {
|
|
241
241
|
/** Function name (unique identifier) */name: NAME; /** Function type (static, action, event, or query) */
|
|
@@ -271,8 +271,8 @@ type RpcFunctionDefinition<NAME extends string, TYPE extends RpcFunctionType = '
|
|
|
271
271
|
* to the same snapshot. Only valid on `query` (or untyped)
|
|
272
272
|
* functions — `static` already has equivalent default behavior.
|
|
273
273
|
*/
|
|
274
|
-
snapshot?: boolean;
|
|
275
|
-
|
|
274
|
+
snapshot?: boolean; /** Per-context setup-result cache, populated by `getRpcResolvedSetupResult`. @internal */
|
|
275
|
+
__cache?: WeakMap<object, Thenable<RpcFunctionSetupResult<InferArgsType<AS>, InferReturnType<RS>>>>; /** Single-slot fallback for primitive contexts. @internal */
|
|
276
276
|
__promise?: Thenable<RpcFunctionSetupResult<InferArgsType<AS>, InferReturnType<RS>>>;
|
|
277
277
|
};
|
|
278
278
|
type RpcFunctionDefinitionToFunction<T extends RpcFunctionDefinitionAny> = T extends {
|
package/dist/utils/events.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as ImmutableArray, F as SharedStateEvents, I as SharedStateOptions, L as SharedStatePatch, M as ImmutableObject, N as ImmutableSet, P as SharedState, R as createSharedState, j as ImmutableMap, k as Immutable } from "../devframe-
|
|
1
|
+
import { A as ImmutableArray, F as SharedStateEvents, I as SharedStateOptions, L as SharedStatePatch, M as ImmutableObject, N as ImmutableSet, P as SharedState, R as createSharedState, j as ImmutableMap, k as Immutable } from "../devframe-BuR6n9ZD.mjs";
|
|
2
2
|
export { Immutable, ImmutableArray, ImmutableMap, ImmutableObject, ImmutableSet, SharedState, SharedStateEvents, SharedStateOptions, SharedStatePatch, createSharedState };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { C as StreamErrorPayload, D as createStreamReader, E as StreamSinkEvents, O as createStreamSink, S as CreateStreamSinkOptions, T as StreamSink, b as BufferedChunk, w as StreamReader, x as CreateStreamReaderOptions } from "../devframe-
|
|
1
|
+
import { C as StreamErrorPayload, D as createStreamReader, E as StreamSinkEvents, O as createStreamSink, S as CreateStreamSinkOptions, T as StreamSink, b as BufferedChunk, w as StreamReader, x as CreateStreamReaderOptions } from "../devframe-BuR6n9ZD.mjs";
|
|
2
2
|
export { BufferedChunk, CreateStreamReaderOptions, CreateStreamSinkOptions, StreamErrorPayload, StreamReader, StreamSink, StreamSinkEvents, createStreamReader, createStreamSink };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { _ as RpcFunctionDefinitionAny } from "./types-
|
|
1
|
+
import { _ as RpcFunctionDefinitionAny } from "./types-BkkQ0Txg.mjs";
|
|
2
2
|
import { BirpcGroup, ChannelOptions } from "birpc";
|
|
3
3
|
import { IncomingMessage } from "node:http";
|
|
4
4
|
import { ServerOptions } from "node:https";
|
|
5
5
|
import { WebSocket, WebSocketServer } from "ws";
|
|
6
6
|
|
|
7
7
|
//#region src/rpc/transports/ws-server.d.ts
|
|
8
|
-
interface
|
|
8
|
+
interface DevframeNodeRpcSessionMeta {
|
|
9
9
|
id: number;
|
|
10
10
|
ws?: WebSocket;
|
|
11
11
|
clientAuthToken?: string;
|
|
@@ -42,8 +42,8 @@ interface WsRpcTransportOptions {
|
|
|
42
42
|
* loses dev-time validation for `jsonSerializable: true` declarations.
|
|
43
43
|
*/
|
|
44
44
|
definitions?: ReadonlyMap<string, Pick<RpcFunctionDefinitionAny, 'jsonSerializable'>>;
|
|
45
|
-
onConnected?: (ws: WebSocket, req: IncomingMessage, meta:
|
|
46
|
-
onDisconnected?: (ws: WebSocket, meta:
|
|
45
|
+
onConnected?: (ws: WebSocket, req: IncomingMessage, meta: DevframeNodeRpcSessionMeta) => void;
|
|
46
|
+
onDisconnected?: (ws: WebSocket, meta: DevframeNodeRpcSessionMeta) => void;
|
|
47
47
|
/** Override the default per-call serializer. Most callers should leave this unset. */
|
|
48
48
|
serialize?: ChannelOptions['serialize'];
|
|
49
49
|
/** Override the default per-call deserializer. Most callers should leave this unset. */
|
|
@@ -58,4 +58,4 @@ declare function attachWsRpcTransport<ClientFunctions extends object, ServerFunc
|
|
|
58
58
|
wss: WebSocketServer;
|
|
59
59
|
};
|
|
60
60
|
//#endregion
|
|
61
|
-
export { WsRpcTransportOptions as n, attachWsRpcTransport as r,
|
|
61
|
+
export { WsRpcTransportOptions as n, attachWsRpcTransport as r, DevframeNodeRpcSessionMeta as t };
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "devframe",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
5
|
-
"description": "Framework for building generic
|
|
4
|
+
"version": "0.5.1",
|
|
5
|
+
"description": "Framework for building generic devframes",
|
|
6
6
|
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"homepage": "https://github.com/devframes/devframe#readme",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"./helpers/vite": "./dist/helpers/vite.mjs",
|
|
31
31
|
"./node": "./dist/node/index.mjs",
|
|
32
32
|
"./node/auth": "./dist/node/auth.mjs",
|
|
33
|
-
"./node/
|
|
33
|
+
"./node/hub-internals": "./dist/node/hub-internals.mjs",
|
|
34
34
|
"./recipes/open-helpers": "./dist/recipes/open-helpers.mjs",
|
|
35
35
|
"./rpc": "./dist/rpc/index.mjs",
|
|
36
36
|
"./rpc/client": "./dist/rpc/client.mjs",
|
|
@@ -75,8 +75,8 @@
|
|
|
75
75
|
"mrmime": "^2.0.1",
|
|
76
76
|
"nostics": "^0.2.0",
|
|
77
77
|
"pathe": "^2.0.3",
|
|
78
|
-
"valibot": "^1.4.
|
|
79
|
-
"ws": "^8.
|
|
78
|
+
"valibot": "^1.4.1",
|
|
79
|
+
"ws": "^8.21.0"
|
|
80
80
|
},
|
|
81
81
|
"devDependencies": {
|
|
82
82
|
"@modelcontextprotocol/sdk": "^1.29.0",
|