devframe 0.6.0-beta.3 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,114 @@
1
+ import { isAllowedOrigin } from "./rpc/transports/ws-server.mjs";
2
+ import { t as buildMcpServerFromContext } from "./build-server-0jWgMrz-.mjs";
3
+ import { randomUUID } from "node:crypto";
4
+ import { defineHandler } from "h3";
5
+ import { isInitializeRequest } from "@modelcontextprotocol/sdk/types.js";
6
+ import { WebStandardStreamableHTTPServerTransport } from "@modelcontextprotocol/sdk/server/webStandardStreamableHttp.js";
7
+ //#region src/adapters/mcp/http.ts
8
+ /**
9
+ * Mount an MCP Streamable-HTTP endpoint on an h3 app at `path`.
10
+ *
11
+ * Each MCP session gets its own {@link WebStandardStreamableHTTPServerTransport}
12
+ * and MCP server (built from the shared, live `ctx` via
13
+ * `buildMcpServerFromContext`), correlated by the `Mcp-Session-Id` header:
14
+ * an `initialize` POST spins up a session; later requests route to it; a
15
+ * `DELETE` (or client disconnect) tears it down.
16
+ *
17
+ * The transport is web-standard — its `handleRequest` takes the h3 event's
18
+ * web `Request` and returns a web `Response` (an SSE `ReadableStream` body
19
+ * for the server→client stream). We copy that response onto `event.res` and
20
+ * return its body rather than returning the `Response` object directly, so a
21
+ * legitimate MCP 404 (unknown session) isn't swallowed by h3's
22
+ * "Response-with-404 falls through to the next handler" rule (which would
23
+ * otherwise hand the request to the SPA static catch-all).
24
+ *
25
+ * @experimental
26
+ */
27
+ function mountMcpHttp(app, ctx, path, options) {
28
+ const sessions = /* @__PURE__ */ new Map();
29
+ const allowedOrigins = options.allowedOrigins;
30
+ function drop(sessionId) {
31
+ const session = sessions.get(sessionId);
32
+ if (!session) return;
33
+ sessions.delete(sessionId);
34
+ session.dispose();
35
+ }
36
+ async function createSession() {
37
+ let session;
38
+ const transport = new WebStandardStreamableHTTPServerTransport({
39
+ sessionIdGenerator: () => randomUUID(),
40
+ onsessioninitialized: (id) => {
41
+ sessions.set(id, session);
42
+ },
43
+ onsessionclosed: (id) => {
44
+ drop(id);
45
+ }
46
+ });
47
+ const { server, dispose } = buildMcpServerFromContext(ctx, {
48
+ serverName: options.serverName,
49
+ serverVersion: options.serverVersion,
50
+ exposeSharedState: options.exposeSharedState
51
+ });
52
+ session = {
53
+ transport,
54
+ dispose: async () => {
55
+ dispose();
56
+ await server.close();
57
+ }
58
+ };
59
+ transport.onclose = () => {
60
+ if (transport.sessionId) drop(transport.sessionId);
61
+ };
62
+ await server.connect(transport);
63
+ return session;
64
+ }
65
+ app.use(path, defineHandler(async (event) => {
66
+ const req = event.req;
67
+ const origin = req.headers.get("origin") ?? void 0;
68
+ if (allowedOrigins !== false && !isAllowedOrigin(origin, allowedOrigins ?? [])) {
69
+ event.res.status = 403;
70
+ return "Forbidden: origin not allowed";
71
+ }
72
+ const sessionId = req.headers.get("mcp-session-id") ?? void 0;
73
+ let session = sessionId ? sessions.get(sessionId) : void 0;
74
+ if (!session && req.method === "POST") {
75
+ let body;
76
+ try {
77
+ body = await req.json();
78
+ } catch {
79
+ body = void 0;
80
+ }
81
+ if (!sessionId && isInitializeRequest(body)) session = await createSession();
82
+ else {
83
+ event.res.status = sessionId ? 404 : 400;
84
+ return sessionId ? "Not Found: unknown MCP session" : "Bad Request: no valid session ID and not an initialize request";
85
+ }
86
+ return respond(event, await session.transport.handleRequest(req, { parsedBody: body }));
87
+ }
88
+ if (!session) {
89
+ event.res.status = sessionId ? 404 : 400;
90
+ return sessionId ? "Not Found: unknown MCP session" : "Bad Request: missing MCP session ID";
91
+ }
92
+ return respond(event, await session.transport.handleRequest(req));
93
+ }));
94
+ return { dispose: async () => {
95
+ const live = [...sessions.values()];
96
+ sessions.clear();
97
+ await Promise.all(live.map((session) => session.dispose()));
98
+ } };
99
+ }
100
+ /**
101
+ * Copy a web `Response` from the MCP transport onto the h3 event's response
102
+ * and return its body. Returning the body (a `ReadableStream` or `null`)
103
+ * rather than the `Response` object avoids h3's 404-fall-through behavior.
104
+ */
105
+ function respond(event, response) {
106
+ event.res.status = response.status;
107
+ event.res.statusText = response.statusText;
108
+ response.headers.forEach((value, key) => {
109
+ event.res.headers.set(key, value);
110
+ });
111
+ return response.body ?? "";
112
+ }
113
+ //#endregion
114
+ export { mountMcpHttp };
@@ -1,6 +1,6 @@
1
- import { L as SharedState, h as DevframeNodeRpcSession, m as DevframeNodeContext } from "./devframe-DgvncQy2.mjs";
1
+ import { R as SharedState, g as DevframeNodeRpcSession, h as DevframeNodeContext } from "./devframe-BtVHhmwM.mjs";
2
2
  import { v as RpcFunctionDefinitionAny } from "./types-DZEx4ffs.mjs";
3
- import { n as InternalAnonymousAuthStorage } from "./context-B_I9fMBc.mjs";
3
+ import { n as InternalAnonymousAuthStorage } from "./context-UX9qUDK7.mjs";
4
4
  import { Peer } from "crossws";
5
5
 
6
6
  //#region src/node/auth/handler.d.ts
package/dist/index.d.mts CHANGED
@@ -1,8 +1,8 @@
1
- import { $ as ScopedServerFunctions, G as DevframeScopedNodeContext, H as EntriesToObject, J as DevframeSettings, K as DevframeScopedNodeRpc, Q as ScopedClientFunctions, S as RpcStreamingHost, St as EventsMap, U as PartialWithoutId, W as Thenable, X as DevframeSettingsStore, Y as DevframeSettingsRegistry, Z as ScopedBroadcastOptions, _ as RpcFunctionsHost, _t as AgentToolInput, a as DevframeDuplicationStrategy, at as DevframeRpcSharedStates, b as RpcStreamingChannel, bt as EventEmitter, c as DevframeSpaOptions, ct as DevframeDiagnosticsDefinition, d as ConnectionMeta, dt as AgentHandle, et as ScopedSharedStates, f as ConnectionMetaWebsocket, ft as AgentManifest, g as RpcBroadcastOptions, gt as AgentTool, h as DevframeNodeRpcSession, ht as AgentResourceInput, i as DevframeDeploymentKind, it as DevframeRpcServerFunctions, l as DevframeWsOptions, lt as DevframeDiagnosticsHost, m as DevframeNodeContext, mt as AgentResourceContent, n as DevframeCliOptions, nt as DevframeViewHost, o as DevframeRuntime, ot as DevframeHost, p as DevframeCapabilities, pt as AgentResource, q as DevframeScopedStreamingHost, r as DevframeDefinition, rt as DevframeRpcClientFunctions, s as DevframeSetupInfo, st as DevframeDefineDiagnosticsOptions, t as DevframeBrowserContext, tt as SettingsForNamespace, u as defineDevframe, ut as DevframeDiagnosticsLogger, v as RpcSharedStateGetOptions, vt as DevframeAgentHost, x as RpcStreamingChannelOptions, xt as EventUnsubscribe, y as RpcSharedStateHost, yt as DevframeAgentHostEvents } from "./devframe-DgvncQy2.mjs";
1
+ import { $ as ScopedClientFunctions, C as RpcStreamingHost, Ct as EventsMap, G as Thenable, J as DevframeScopedStreamingHost, K as DevframeScopedNodeContext, Q as ScopedBroadcastOptions, S as RpcStreamingChannelOptions, St as EventUnsubscribe, U as EntriesToObject, W as PartialWithoutId, X as DevframeSettingsRegistry, Y as DevframeSettings, Z as DevframeSettingsStore, _ as RpcBroadcastOptions, _t as AgentTool, a as DevframeDuplicationStrategy, at as DevframeRpcServerFunctions, b as RpcSharedStateHost, bt as DevframeAgentHostEvents, c as DevframeSpaOptions, ct as DevframeDefineDiagnosticsOptions, d as defineDevframe, dt as DevframeDiagnosticsLogger, et as ScopedServerFunctions, f as ConnectionMeta, ft as AgentHandle, g as DevframeNodeRpcSession, gt as AgentResourceInput, h as DevframeNodeContext, ht as AgentResourceContent, i as DevframeDeploymentKind, it as DevframeRpcClientFunctions, l as DevframeWsOptions, lt as DevframeDiagnosticsDefinition, m as DevframeCapabilities, mt as AgentResource, n as DevframeCliOptions, nt as SettingsForNamespace, o as DevframeRuntime, ot as DevframeRpcSharedStates, p as ConnectionMetaWebsocket, pt as AgentManifest, q as DevframeScopedNodeRpc, r as DevframeDefinition, rt as DevframeViewHost, s as DevframeSetupInfo, st as DevframeHost, t as DevframeBrowserContext, tt as ScopedSharedStates, u as McpRouteOptions, ut as DevframeDiagnosticsHost, v as RpcFunctionsHost, vt as AgentToolInput, x as RpcStreamingChannel, xt as EventEmitter, y as RpcSharedStateGetOptions, yt as DevframeAgentHost } from "./devframe-BtVHhmwM.mjs";
2
2
  import { C as RpcFunctionType, T as RpcReturnSchema, _ as RpcFunctionDefinition, g as RpcFunctionAgentOptions, i as RpcArgsSchema } from "./types-DZEx4ffs.mjs";
3
3
  import { t as DevframeNodeRpcSessionMeta } from "./ws-server-Bc2wBHl-.mjs";
4
4
 
5
5
  //#region src/define.d.ts
6
6
  declare const defineRpcFunction: <NAME extends string, TYPE extends RpcFunctionType, ARGS extends any[], RETURN = void, const AS extends RpcArgsSchema | undefined = undefined, const RS extends RpcReturnSchema | undefined = undefined>(definition: RpcFunctionDefinition<NAME, TYPE, ARGS, RETURN, AS, RS, DevframeNodeContext>) => RpcFunctionDefinition<NAME, TYPE, ARGS, RETURN, AS, RS, DevframeNodeContext>;
7
7
  //#endregion
8
- export { type AgentHandle, type AgentManifest, type AgentResource, type AgentResourceContent, type AgentResourceInput, type AgentTool, type AgentToolInput, type ConnectionMeta, type ConnectionMetaWebsocket, type DevframeAgentHost, type DevframeAgentHostEvents, type DevframeBrowserContext, type DevframeCapabilities, type DevframeCliOptions, type DevframeDefineDiagnosticsOptions, type DevframeDefinition, type DevframeDeploymentKind, type DevframeDiagnosticsDefinition, type DevframeDiagnosticsHost, type DevframeDiagnosticsLogger, type DevframeDuplicationStrategy, type DevframeHost, type DevframeNodeContext, type DevframeNodeRpcSession, type DevframeNodeRpcSessionMeta, type DevframeRpcClientFunctions, type DevframeRpcServerFunctions, type DevframeRpcSharedStates, type DevframeRuntime, type DevframeScopedNodeContext, type DevframeScopedNodeRpc, type DevframeScopedStreamingHost, type DevframeSettings, type DevframeSettingsRegistry, type DevframeSettingsStore, type DevframeSetupInfo, type DevframeSpaOptions, type DevframeViewHost, type DevframeWsOptions, type EntriesToObject, type EventEmitter, type EventUnsubscribe, type EventsMap, type PartialWithoutId, type RpcBroadcastOptions, type RpcFunctionAgentOptions, type RpcFunctionsHost, type RpcSharedStateGetOptions, type RpcSharedStateHost, type RpcStreamingChannel, type RpcStreamingChannelOptions, type RpcStreamingHost, type ScopedBroadcastOptions, type ScopedClientFunctions, type ScopedServerFunctions, type ScopedSharedStates, type SettingsForNamespace, type Thenable, type defineDevframe, defineRpcFunction };
8
+ export { type AgentHandle, type AgentManifest, type AgentResource, type AgentResourceContent, type AgentResourceInput, type AgentTool, type AgentToolInput, type ConnectionMeta, type ConnectionMetaWebsocket, type DevframeAgentHost, type DevframeAgentHostEvents, type DevframeBrowserContext, type DevframeCapabilities, type DevframeCliOptions, type DevframeDefineDiagnosticsOptions, type DevframeDefinition, type DevframeDeploymentKind, type DevframeDiagnosticsDefinition, type DevframeDiagnosticsHost, type DevframeDiagnosticsLogger, type DevframeDuplicationStrategy, type DevframeHost, type DevframeNodeContext, type DevframeNodeRpcSession, type DevframeNodeRpcSessionMeta, type DevframeRpcClientFunctions, type DevframeRpcServerFunctions, type DevframeRpcSharedStates, type DevframeRuntime, type DevframeScopedNodeContext, type DevframeScopedNodeRpc, type DevframeScopedStreamingHost, type DevframeSettings, type DevframeSettingsRegistry, type DevframeSettingsStore, type DevframeSetupInfo, type DevframeSpaOptions, type DevframeViewHost, type DevframeWsOptions, type EntriesToObject, type EventEmitter, type EventUnsubscribe, type EventsMap, type McpRouteOptions, type PartialWithoutId, type RpcBroadcastOptions, type RpcFunctionAgentOptions, type RpcFunctionsHost, type RpcSharedStateGetOptions, type RpcSharedStateHost, type RpcStreamingChannel, type RpcStreamingChannelOptions, type RpcStreamingHost, type ScopedBroadcastOptions, type ScopedClientFunctions, type ScopedServerFunctions, type ScopedSharedStates, type SettingsForNamespace, type Thenable, type defineDevframe, defineRpcFunction };
@@ -1,2 +1,2 @@
1
- import { a as verifyAuthToken, c as DevframeAuthHandler, i as refreshTempAuthCode, n as exchangeTempAuthCode, o as revokeActiveConnectionsForToken, r as getTempAuthCode, s as revokeAuthToken, t as buildOtpAuthUrl } from "../index-B4lNDq5v.mjs";
1
+ import { a as verifyAuthToken, c as DevframeAuthHandler, i as refreshTempAuthCode, n as exchangeTempAuthCode, o as revokeActiveConnectionsForToken, r as getTempAuthCode, s as revokeAuthToken, t as buildOtpAuthUrl } from "../index-ByaMT1Xp.mjs";
2
2
  export { DevframeAuthHandler, buildOtpAuthUrl, exchangeTempAuthCode, getTempAuthCode, refreshTempAuthCode, revokeActiveConnectionsForToken, revokeAuthToken, verifyAuthToken };
@@ -1,5 +1,5 @@
1
- import { i as DevframeDeploymentKind, r as DevframeDefinition } from "../devframe-DgvncQy2.mjs";
2
- import { a as internalContextMap, i as getInternalContext, n as InternalAnonymousAuthStorage, r as RemoteTokenRecord, t as DevframeInternalContext } from "../context-B_I9fMBc.mjs";
1
+ import { i as DevframeDeploymentKind, r as DevframeDefinition } from "../devframe-BtVHhmwM.mjs";
2
+ import { a as internalContextMap, i as getInternalContext, n as InternalAnonymousAuthStorage, r as RemoteTokenRecord, t as DevframeInternalContext } from "../context-UX9qUDK7.mjs";
3
3
 
4
4
  //#region src/adapters/_shared.d.ts
5
5
  /**
@@ -1,8 +1,8 @@
1
- import { G as DevframeScopedNodeContext, J as DevframeSettings, L as SharedState, S as RpcStreamingHost, _ as RpcFunctionsHost$1, _t as AgentToolInput, bt as EventEmitter, dt as AgentHandle, ft as AgentManifest, g as RpcBroadcastOptions, gt as AgentTool, h as DevframeNodeRpcSession, ht as AgentResourceInput, it as DevframeRpcServerFunctions, lt as DevframeDiagnosticsHost$1, m as DevframeNodeContext, mt as AgentResourceContent, nt as DevframeViewHost$1, ot as DevframeHost, pt as AgentResource, rt as DevframeRpcClientFunctions, ut as DevframeDiagnosticsLogger, vt as DevframeAgentHost$1, y as RpcSharedStateHost, yt as DevframeAgentHostEvents } from "../devframe-DgvncQy2.mjs";
1
+ import { C as RpcStreamingHost, K as DevframeScopedNodeContext, R as SharedState, Y as DevframeSettings, _ as RpcBroadcastOptions, _t as AgentTool, at as DevframeRpcServerFunctions, b as RpcSharedStateHost, bt as DevframeAgentHostEvents, dt as DevframeDiagnosticsLogger, ft as AgentHandle, g as DevframeNodeRpcSession, gt as AgentResourceInput, h as DevframeNodeContext, ht as AgentResourceContent, it as DevframeRpcClientFunctions, mt as AgentResource, pt as AgentManifest, rt as DevframeViewHost$1, st as DevframeHost, ut as DevframeDiagnosticsHost$1, v as RpcFunctionsHost$1, vt as AgentToolInput, xt as EventEmitter, yt as DevframeAgentHost$1 } from "../devframe-BtVHhmwM.mjs";
2
2
  import { v as RpcFunctionDefinitionAny } from "../types-DZEx4ffs.mjs";
3
3
  import { S as RpcFunctionsCollectorBase } from "../index-Dy6GFDRf.mjs";
4
4
  import { t as DevframeNodeRpcSessionMeta } from "../ws-server-Bc2wBHl-.mjs";
5
- import { n as StartedServer, r as startHttpAndWs, t as StartHttpAndWsOptions } from "../server-DXPq8q0K.mjs";
5
+ import { n as StartedServer, r as startHttpAndWs, t as StartHttpAndWsOptions } from "../server-Cfr1NrGQ.mjs";
6
6
  import { BirpcGroup } from "birpc";
7
7
  import { AsyncLocalStorage } from "node:async_hooks";
8
8
 
@@ -1,6 +1,6 @@
1
1
  import { t as createStorage } from "../storage-yrUZaiib.mjs";
2
2
  import { a as DevframeViewHost, c as createRpcSharedStateServerHost, i as createNodeSettings, l as DevframeDiagnosticsHost, n as createHostContext, o as RpcFunctionsHost, r as createScopedNodeContext, s as createRpcStreamingServerHost, t as createH3DevframeHost, u as DevframeAgentHost } from "../host-h3-Dsf-Tgwx.mjs";
3
- import { t as startHttpAndWs } from "../server-BdN41ckC.mjs";
3
+ import { t as startHttpAndWs } from "../server-CAsvfJNK.mjs";
4
4
  import { isIP } from "node:net";
5
5
  //#region src/node/utils.ts
6
6
  function isObject(value) {
@@ -1,5 +1,5 @@
1
- import { m as DevframeNodeContext } from "../devframe-DgvncQy2.mjs";
2
- import { c as DevframeAuthHandler } from "../index-B4lNDq5v.mjs";
1
+ import { h as DevframeNodeContext } from "../devframe-BtVHhmwM.mjs";
2
+ import { c as DevframeAuthHandler } from "../index-ByaMT1Xp.mjs";
3
3
 
4
4
  //#region src/recipes/interactive-auth.d.ts
5
5
  interface CreateInteractiveAuthOptions {
@@ -24,23 +24,27 @@ async function startHttpAndWs(options) {
24
24
  if (authHandler) {
25
25
  for (const fn of authHandler.rpcFunctions) if (!rpcHost.definitions.has(fn.name)) rpcHost.register(fn);
26
26
  }
27
- const rpcGroup = createRpcServer(rpcHost.functions, { rpcOptions: { resolver(name, fn) {
28
- const rpc = this;
29
- if (!fn) return void 0;
30
- return async function(...args) {
31
- const meta = rpc.$meta;
32
- if (effectiveAuthorize && !effectiveAuthorize(name, {
33
- meta,
34
- rpc
35
- })) throw diagnostics.DF0036({ name });
36
- return await asyncStorage.run({
37
- rpc,
38
- meta
39
- }, async () => {
40
- return (await fn).apply(this, args);
41
- });
42
- };
43
- } } });
27
+ const rpcGroup = createRpcServer(rpcHost.functions, { rpcOptions: {
28
+ onFunctionError: options.rpcOptions?.onFunctionError,
29
+ onGeneralError: options.rpcOptions?.onGeneralError,
30
+ resolver(name, fn) {
31
+ const rpc = this;
32
+ if (!fn) return void 0;
33
+ return async function(...args) {
34
+ const meta = rpc.$meta;
35
+ if (effectiveAuthorize && !effectiveAuthorize(name, {
36
+ meta,
37
+ rpc
38
+ })) throw diagnostics.DF0036({ name });
39
+ return await asyncStorage.run({
40
+ rpc,
41
+ meta
42
+ }, async () => {
43
+ return (await fn).apply(this, args);
44
+ });
45
+ };
46
+ }
47
+ } });
44
48
  const separateWsPort = ownsHttpServer && options.wsPort != null && options.wsPort !== port ? options.wsPort : void 0;
45
49
  const { ws, close: closeWs } = attachWsRpcTransport(rpcGroup, {
46
50
  ...separateWsPort != null ? {
@@ -1,6 +1,6 @@
1
- import { d as ConnectionMeta, h as DevframeNodeRpcSession, it as DevframeRpcServerFunctions, m as DevframeNodeContext, rt as DevframeRpcClientFunctions } from "./devframe-DgvncQy2.mjs";
2
- import { c as DevframeAuthHandler } from "./index-B4lNDq5v.mjs";
3
- import { BirpcGroup } from "birpc";
1
+ import { at as DevframeRpcServerFunctions, f as ConnectionMeta, g as DevframeNodeRpcSession, h as DevframeNodeContext, it as DevframeRpcClientFunctions } from "./devframe-BtVHhmwM.mjs";
2
+ import { c as DevframeAuthHandler } from "./index-ByaMT1Xp.mjs";
3
+ import { BirpcGroup, EventOptions } from "birpc";
4
4
  import { Peer } from "crossws";
5
5
  import { NodeAdapter } from "crossws/adapters/node";
6
6
  import { Server } from "node:http";
@@ -74,6 +74,17 @@ interface StartHttpAndWsOptions {
74
74
  * observe — but not override — the connect-time trust decision.
75
75
  */
76
76
  onPeerConnect?: (peer: Peer, session: DevframeNodeRpcSession) => void;
77
+ /**
78
+ * Forwarded verbatim to the internal `createRpcServer`'s birpc
79
+ * `rpcOptions`, alongside the resolver `startHttpAndWs` installs for
80
+ * auth/session wiring. Use this so a host that owns its own structured
81
+ * diagnostics (e.g. a coded error reporter) keeps seeing RPC failures
82
+ * instead of them being silently absorbed by delegating to
83
+ * `startHttpAndWs`. Returning `true` from either callback suppresses
84
+ * birpc's own error response to the caller — see birpc's
85
+ * `EventOptions` for the full contract.
86
+ */
87
+ rpcOptions?: Pick<EventOptions<DevframeRpcClientFunctions, DevframeRpcServerFunctions, false>, 'onFunctionError' | 'onGeneralError'>;
77
88
  /**
78
89
  * Extra origins to accept on the WS upgrade beyond the loopback default
79
90
  * (`localhost`/`127.0.0.1`/`::1` and any `Origin`-less request from a
@@ -1,4 +1,4 @@
1
- import { $ as ScopedServerFunctions, G as DevframeScopedNodeContext, H as EntriesToObject, J as DevframeSettings, K as DevframeScopedNodeRpc, Q as ScopedClientFunctions, S as RpcStreamingHost, St as EventsMap, U as PartialWithoutId, W as Thenable, X as DevframeSettingsStore, Y as DevframeSettingsRegistry, Z as ScopedBroadcastOptions, _ as RpcFunctionsHost, _t as AgentToolInput, a as DevframeDuplicationStrategy, at as DevframeRpcSharedStates, b as RpcStreamingChannel, bt as EventEmitter, c as DevframeSpaOptions, ct as DevframeDiagnosticsDefinition, d as ConnectionMeta, dt as AgentHandle, et as ScopedSharedStates, f as ConnectionMetaWebsocket, ft as AgentManifest, g as RpcBroadcastOptions, gt as AgentTool, h as DevframeNodeRpcSession, ht as AgentResourceInput, i as DevframeDeploymentKind, it as DevframeRpcServerFunctions, l as DevframeWsOptions, lt as DevframeDiagnosticsHost, m as DevframeNodeContext, mt as AgentResourceContent, n as DevframeCliOptions, nt as DevframeViewHost, o as DevframeRuntime, ot as DevframeHost, p as DevframeCapabilities, pt as AgentResource, q as DevframeScopedStreamingHost, r as DevframeDefinition, rt as DevframeRpcClientFunctions, s as DevframeSetupInfo, st as DevframeDefineDiagnosticsOptions, t as DevframeBrowserContext, tt as SettingsForNamespace, u as defineDevframe, ut as DevframeDiagnosticsLogger, v as RpcSharedStateGetOptions, vt as DevframeAgentHost, x as RpcStreamingChannelOptions, xt as EventUnsubscribe, y as RpcSharedStateHost, yt as DevframeAgentHostEvents } from "../devframe-DgvncQy2.mjs";
1
+ import { $ as ScopedClientFunctions, C as RpcStreamingHost, Ct as EventsMap, G as Thenable, J as DevframeScopedStreamingHost, K as DevframeScopedNodeContext, Q as ScopedBroadcastOptions, S as RpcStreamingChannelOptions, St as EventUnsubscribe, U as EntriesToObject, W as PartialWithoutId, X as DevframeSettingsRegistry, Y as DevframeSettings, Z as DevframeSettingsStore, _ as RpcBroadcastOptions, _t as AgentTool, a as DevframeDuplicationStrategy, at as DevframeRpcServerFunctions, b as RpcSharedStateHost, bt as DevframeAgentHostEvents, c as DevframeSpaOptions, ct as DevframeDefineDiagnosticsOptions, d as defineDevframe, dt as DevframeDiagnosticsLogger, et as ScopedServerFunctions, f as ConnectionMeta, ft as AgentHandle, g as DevframeNodeRpcSession, gt as AgentResourceInput, h as DevframeNodeContext, ht as AgentResourceContent, i as DevframeDeploymentKind, it as DevframeRpcClientFunctions, l as DevframeWsOptions, lt as DevframeDiagnosticsDefinition, m as DevframeCapabilities, mt as AgentResource, n as DevframeCliOptions, nt as SettingsForNamespace, o as DevframeRuntime, ot as DevframeRpcSharedStates, p as ConnectionMetaWebsocket, pt as AgentManifest, q as DevframeScopedNodeRpc, r as DevframeDefinition, rt as DevframeViewHost, s as DevframeSetupInfo, st as DevframeHost, t as DevframeBrowserContext, tt as ScopedSharedStates, u as McpRouteOptions, ut as DevframeDiagnosticsHost, v as RpcFunctionsHost, vt as AgentToolInput, x as RpcStreamingChannel, xt as EventEmitter, y as RpcSharedStateGetOptions, yt as DevframeAgentHost } from "../devframe-BtVHhmwM.mjs";
2
2
  import { g as RpcFunctionAgentOptions } from "../types-DZEx4ffs.mjs";
3
3
  import { t as DevframeNodeRpcSessionMeta } from "../ws-server-Bc2wBHl-.mjs";
4
- export { AgentHandle, AgentManifest, AgentResource, AgentResourceContent, AgentResourceInput, AgentTool, AgentToolInput, ConnectionMeta, ConnectionMetaWebsocket, DevframeAgentHost, DevframeAgentHostEvents, DevframeBrowserContext, DevframeCapabilities, DevframeCliOptions, DevframeDefineDiagnosticsOptions, DevframeDefinition, DevframeDeploymentKind, DevframeDiagnosticsDefinition, DevframeDiagnosticsHost, DevframeDiagnosticsLogger, DevframeDuplicationStrategy, DevframeHost, DevframeNodeContext, DevframeNodeRpcSession, type DevframeNodeRpcSessionMeta, DevframeRpcClientFunctions, DevframeRpcServerFunctions, DevframeRpcSharedStates, DevframeRuntime, DevframeScopedNodeContext, DevframeScopedNodeRpc, DevframeScopedStreamingHost, DevframeSettings, DevframeSettingsRegistry, DevframeSettingsStore, DevframeSetupInfo, DevframeSpaOptions, DevframeViewHost, DevframeWsOptions, EntriesToObject, EventEmitter, EventUnsubscribe, EventsMap, PartialWithoutId, RpcBroadcastOptions, type RpcFunctionAgentOptions, RpcFunctionsHost, RpcSharedStateGetOptions, RpcSharedStateHost, RpcStreamingChannel, RpcStreamingChannelOptions, RpcStreamingHost, ScopedBroadcastOptions, ScopedClientFunctions, ScopedServerFunctions, ScopedSharedStates, SettingsForNamespace, Thenable, defineDevframe };
4
+ export { AgentHandle, AgentManifest, AgentResource, AgentResourceContent, AgentResourceInput, AgentTool, AgentToolInput, ConnectionMeta, ConnectionMetaWebsocket, DevframeAgentHost, DevframeAgentHostEvents, DevframeBrowserContext, DevframeCapabilities, DevframeCliOptions, DevframeDefineDiagnosticsOptions, DevframeDefinition, DevframeDeploymentKind, DevframeDiagnosticsDefinition, DevframeDiagnosticsHost, DevframeDiagnosticsLogger, DevframeDuplicationStrategy, DevframeHost, DevframeNodeContext, DevframeNodeRpcSession, type DevframeNodeRpcSessionMeta, DevframeRpcClientFunctions, DevframeRpcServerFunctions, DevframeRpcSharedStates, DevframeRuntime, DevframeScopedNodeContext, DevframeScopedNodeRpc, DevframeScopedStreamingHost, DevframeSettings, DevframeSettingsRegistry, DevframeSettingsStore, DevframeSetupInfo, DevframeSpaOptions, DevframeViewHost, DevframeWsOptions, EntriesToObject, EventEmitter, EventUnsubscribe, EventsMap, McpRouteOptions, PartialWithoutId, RpcBroadcastOptions, type RpcFunctionAgentOptions, RpcFunctionsHost, RpcSharedStateGetOptions, RpcSharedStateHost, RpcStreamingChannel, RpcStreamingChannelOptions, RpcStreamingHost, ScopedBroadcastOptions, ScopedClientFunctions, ScopedServerFunctions, ScopedSharedStates, SettingsForNamespace, Thenable, defineDevframe };
@@ -1,4 +1,4 @@
1
- import { St as EventsMap, bt as EventEmitter } from "../devframe-DgvncQy2.mjs";
1
+ import { Ct as EventsMap, xt as EventEmitter } from "../devframe-BtVHhmwM.mjs";
2
2
 
3
3
  //#region src/utils/events.d.ts
4
4
  /**
@@ -1,2 +1,2 @@
1
- import { B as SharedStatePatch, F as ImmutableObject, I as ImmutableSet, L as SharedState, M as Immutable, N as ImmutableArray, P as ImmutableMap, R as SharedStateEvents, V as createSharedState, z as SharedStateOptions } from "../devframe-DgvncQy2.mjs";
1
+ import { B as SharedStateOptions, F as ImmutableMap, H as createSharedState, I as ImmutableObject, L as ImmutableSet, N as Immutable, P as ImmutableArray, R as SharedState, V as SharedStatePatch, z as SharedStateEvents } from "../devframe-BtVHhmwM.mjs";
2
2
  export { Immutable, ImmutableArray, ImmutableMap, ImmutableObject, ImmutableSet, SharedState, SharedStateEvents, SharedStateOptions, SharedStatePatch, createSharedState };
@@ -1,2 +1,2 @@
1
- import { A as createStreamReader, C as BufferedChunk, D as StreamReader, E as StreamErrorPayload, O as StreamSink, T as CreateStreamSinkOptions, j as createStreamSink, k as StreamSinkEvents, w as CreateStreamReaderOptions } from "../devframe-DgvncQy2.mjs";
1
+ import { A as StreamSinkEvents, D as StreamErrorPayload, E as CreateStreamSinkOptions, M as createStreamSink, O as StreamReader, T as CreateStreamReaderOptions, j as createStreamReader, k as StreamSink, w as BufferedChunk } from "../devframe-BtVHhmwM.mjs";
2
2
  export { BufferedChunk, CreateStreamReaderOptions, CreateStreamSinkOptions, StreamErrorPayload, StreamReader, StreamSink, StreamSinkEvents, createStreamReader, createStreamSink };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "devframe",
3
3
  "type": "module",
4
- "version": "0.6.0-beta.3",
4
+ "version": "0.6.0",
5
5
  "description": "Framework for building generic devframes",
6
6
  "author": "Anthony Fu <anthonyfu117@hotmail.com>",
7
7
  "license": "MIT",