devframe 0.9.15 → 0.9.16
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/dist/{_shared-Bf2FcfJ4.d.mts → _shared-CkLpdx6I.d.mts} +1 -1
- package/dist/adapters/build.d.mts +1 -1
- package/dist/adapters/cac.d.mts +1 -1
- package/dist/adapters/dev.d.mts +5 -4
- package/dist/adapters/embedded.d.mts +1 -1
- package/dist/adapters/initiate.d.mts +5 -4
- package/dist/adapters/mcp.d.mts +1 -1
- package/dist/client/index.d.mts +1 -1
- package/dist/{context-CIsx_QnV.d.mts → context-3y_PeZKl.d.mts} +1 -1
- package/dist/{context-B7411Bem.d.mts → context-DLzIyQCZ.d.mts} +1 -1
- package/dist/in-page-channel/index.d.mts +1 -1
- package/dist/{index--pZ3fdAq.d.mts → index-Ces7aTOQ.d.mts} +2 -2
- package/dist/index.d.mts +3 -3
- package/dist/{instance-shell-B-FE8NY5.d.mts → instance-shell-BQXr8n68.d.mts} +5 -4
- package/dist/internal/index.d.mts +4 -4
- package/dist/node/auth.d.mts +2 -2
- package/dist/node/hub-internals.d.mts +2 -2
- package/dist/node/index.d.mts +1 -1
- package/dist/recipes/common-rpc-functions.d.mts +1 -1
- package/dist/recipes/interactive-auth.d.mts +2 -2
- package/dist/rpc/transports/sse-server.d.mts +2 -1
- package/dist/rpc/transports/ws-bun.d.mts +2 -2
- package/dist/rpc/transports/ws-deno.d.mts +2 -2
- package/dist/rpc/transports/ws-server.d.mts +3 -2
- package/dist/{rpc-core-D7WvbvK0.d.mts → rpc-core-Clo3kHfo.d.mts} +4 -3
- package/dist/session-r6PDixP6.d.mts +111 -0
- package/dist/types/index.d.mts +3 -3
- package/dist/utils/events.d.mts +1 -1
- package/dist/utils/serve-static.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-server-D2nv68Hg.d.mts → ws-server-9ztvkeJ0.d.mts} +3 -70
- package/package.json +2 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { F as DevframeDefinition, G as McpAuthorization, I as DevframeDeploymentKind, q as McpSetting, t as ConnectionMeta, zt as DevframeAgentHost } from "./context-
|
|
1
|
+
import { F as DevframeDefinition, G as McpAuthorization, I as DevframeDeploymentKind, q as McpSetting, t as ConnectionMeta, zt as DevframeAgentHost } from "./context-DLzIyQCZ.mjs";
|
|
2
2
|
//#region src/adapters/_shared.d.ts
|
|
3
3
|
/**
|
|
4
4
|
* Resolve the mount base path for a devframe's SPA. Hosted adapters
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { F as DevframeDefinition, V as DevframeSnapshotRpcEntry, o as DevframeNodeContext } from "../context-
|
|
1
|
+
import { F as DevframeDefinition, V as DevframeSnapshotRpcEntry, o as DevframeNodeContext } from "../context-DLzIyQCZ.mjs";
|
|
2
2
|
import { o as StaticAssetsSource } from "../remote-assets-eBvSKZMS.mjs";
|
|
3
3
|
//#region src/adapters/build.d.ts
|
|
4
4
|
export interface CreateBuildOptions {
|
package/dist/adapters/cac.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Dt as InferCliFlags, Et as CliFlagsSchema, F as DevframeDefinition, Ot as defineCliFlags, kt as parseCliFlags, q as McpSetting } from "../context-
|
|
1
|
+
import { Dt as InferCliFlags, Et as CliFlagsSchema, F as DevframeDefinition, Ot as defineCliFlags, kt as parseCliFlags, q as McpSetting } from "../context-DLzIyQCZ.mjs";
|
|
2
2
|
import { CAC } from "cac";
|
|
3
3
|
import { H3 } from "h3";
|
|
4
4
|
//#region src/adapters/cac.d.ts
|
package/dist/adapters/dev.d.mts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { F as DevframeDefinition, Tt as DevframeAuthHandler, U as DevframeSseOptions, W as DevframeWsOptions, q as McpSetting, s as DevframeNodeRpcSession } from "../context-DLzIyQCZ.mjs";
|
|
2
|
+
import { n as DevframeRpcConnection, t as DevframeNodeRpcSessionMeta } from "../session-r6PDixP6.mjs";
|
|
3
3
|
import { o as StaticAssetsSource } from "../remote-assets-eBvSKZMS.mjs";
|
|
4
|
-
import {
|
|
5
|
-
import { c as
|
|
4
|
+
import { n as WsOriginRegistry } from "../ws-server-9ztvkeJ0.mjs";
|
|
5
|
+
import { c as StartedServer } from "../instance-shell-BQXr8n68.mjs";
|
|
6
|
+
import { c as resolveMcpConnectionMeta, o as resolveDevServerPort, t as ResolveDevServerPortOptions } from "../_shared-CkLpdx6I.mjs";
|
|
6
7
|
import { H3 } from "h3";
|
|
7
8
|
//#region src/adapters/dev.d.ts
|
|
8
9
|
export interface CreateDevServerOptions {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { F as DevframeDefinition, o as DevframeNodeContext } from "../context-
|
|
1
|
+
import { F as DevframeDefinition, o as DevframeNodeContext } from "../context-DLzIyQCZ.mjs";
|
|
2
2
|
//#region src/adapters/embedded.d.ts
|
|
3
3
|
export interface CreateEmbeddedOptions {
|
|
4
4
|
/** Target context the devframe is registered into. Required. */
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { F as DevframeDefinition, St as DevframeStorageScope, Tt as DevframeAuthHandler, U as DevframeSseOptions, W as DevframeWsOptions, o as DevframeNodeContext, q as McpSetting, s as DevframeNodeRpcSession, t as ConnectionMeta } from "../context-DLzIyQCZ.mjs";
|
|
2
|
+
import { n as DevframeRpcConnection, t as DevframeNodeRpcSessionMeta } from "../session-r6PDixP6.mjs";
|
|
3
3
|
import { o as StaticAssetsSource } from "../remote-assets-eBvSKZMS.mjs";
|
|
4
|
-
import {
|
|
4
|
+
import { n as WsOriginRegistry } from "../ws-server-9ztvkeJ0.mjs";
|
|
5
|
+
import { c as StartedServer, f as DevframeInstanceRecord } from "../instance-shell-BQXr8n68.mjs";
|
|
6
|
+
import { H3 } from "h3";
|
|
5
7
|
import { Buffer } from "node:buffer";
|
|
6
8
|
import { IncomingMessage, Server, ServerResponse } from "node:http";
|
|
7
9
|
import { Duplex } from "node:stream";
|
|
8
|
-
import { H3 } from "h3";
|
|
9
10
|
//#region src/adapters/initiate.d.ts
|
|
10
11
|
export interface InitDevframeOptions {
|
|
11
12
|
/**
|
package/dist/adapters/mcp.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { F as DevframeDefinition, G as McpAuthorization, o as DevframeNodeContext } from "../context-
|
|
1
|
+
import { F as DevframeDefinition, G as McpAuthorization, o as DevframeNodeContext } from "../context-DLzIyQCZ.mjs";
|
|
2
2
|
import { H3 } from "h3";
|
|
3
3
|
import "@modelcontextprotocol/server";
|
|
4
4
|
//#region src/adapters/mcp/build-server.d.ts
|
package/dist/client/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { f as RpcCacheManager, p as RpcCacheOptions } from "../index-pIVt92jP.mjs";
|
|
2
2
|
import { _ as RpcFunctionDefinition, w as RpcFunctionsCollector } from "../types-Dq4i156u.mjs";
|
|
3
|
-
import { Q as DevframeServiceMeta, Vt as EventEmitter, b as StreamSink, ct as DevframeSettings, d as RpcSharedStateHost, et as DevframeServiceScopeOf, gt as SettingsForNamespace, ht as ScopedSharedStates, it as DevframeServicesState, k as SharedState, mt as ScopedServerFunctions, pt as ScopedRpcFn, t as ConnectionMeta, u as RpcSharedStateGetOptions, vt as DevframeRpcClientFunctions, y as StreamReader, yt as DevframeRpcServerFunctions } from "../context-
|
|
3
|
+
import { Q as DevframeServiceMeta, Vt as EventEmitter, b as StreamSink, ct as DevframeSettings, d as RpcSharedStateHost, et as DevframeServiceScopeOf, gt as SettingsForNamespace, ht as ScopedSharedStates, it as DevframeServicesState, k as SharedState, mt as ScopedServerFunctions, pt as ScopedRpcFn, t as ConnectionMeta, u as RpcSharedStateGetOptions, vt as DevframeRpcClientFunctions, y as StreamReader, yt as DevframeRpcServerFunctions } from "../context-DLzIyQCZ.mjs";
|
|
4
4
|
import { t as SseRpcChannelOptions } from "../sse-client-BQ4jS3eO.mjs";
|
|
5
5
|
import { t as WsRpcChannelOptions } from "../ws-client-Xpxt0oPA.mjs";
|
|
6
6
|
import { BirpcOptions, BirpcReturn } from "birpc";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { k as SharedState, o as DevframeNodeContext } from "./context-
|
|
1
|
+
import { k as SharedState, o as DevframeNodeContext } from "./context-DLzIyQCZ.mjs";
|
|
2
2
|
//#region src/node/hub-internals/context.d.ts
|
|
3
3
|
interface InternalAnonymousAuthStorage {
|
|
4
4
|
trusted: Record<string, {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { d as RpcFunctionsCollectorBase } from "./index-pIVt92jP.mjs";
|
|
2
2
|
import { _ as RpcFunctionDefinition, v as RpcFunctionDefinitionAny } from "./types-Dq4i156u.mjs";
|
|
3
|
-
import {
|
|
3
|
+
import { n as DevframeRpcConnection, t as DevframeNodeRpcSessionMeta } from "./session-r6PDixP6.mjs";
|
|
4
4
|
import { a as RemoteAssetsStore, o as StaticAssetsSource } from "./remote-assets-eBvSKZMS.mjs";
|
|
5
5
|
import { m as defineDiagnostics } from "./nostics-0sKe5HIj.mjs";
|
|
6
6
|
import { BirpcReturn } from "birpc";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { D as InferArgsType, E as Thenable, O as InferReturnType, T as RpcReturnSchema, i as RpcArgsSchema } from "../types-Dq4i156u.mjs";
|
|
2
|
-
import { Vt as EventEmitter, k as SharedState } from "../context-
|
|
2
|
+
import { Vt as EventEmitter, k as SharedState } from "../context-DLzIyQCZ.mjs";
|
|
3
3
|
import { BirpcReturn } from "birpc";
|
|
4
4
|
//#region src/in-page-channel/types.d.ts
|
|
5
5
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { k as SharedState, o as DevframeNodeContext, s as DevframeNodeRpcSession } from "./context-
|
|
2
|
-
import { n as InternalAnonymousAuthStorage } from "./context-
|
|
1
|
+
import { k as SharedState, o as DevframeNodeContext, s as DevframeNodeRpcSession } from "./context-DLzIyQCZ.mjs";
|
|
2
|
+
import { n as InternalAnonymousAuthStorage } from "./context-3y_PeZKl.mjs";
|
|
3
3
|
//#region src/node/auth/revoke.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* Flip `isTrusted` to false on any live WS clients connected with `token`
|
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "./index-pIVt92jP.mjs";
|
|
2
2
|
import { C as RpcFunctionType, T as RpcReturnSchema, _ as RpcFunctionDefinition, g as RpcFunctionAgentOptions, i as RpcArgsSchema } from "./types-Dq4i156u.mjs";
|
|
3
|
-
import { c as
|
|
4
|
-
import {
|
|
3
|
+
import { $ as DevframeServiceOf, At as AgentHandle, B as DevframeSetupInfo, Bt as DevframeAgentHostEvents, Ct as DevframeDiagnosticsHost, F as DevframeDefinition, Ft as AgentTool, G as McpAuthorization, H as DevframeSnapshotRpcInputs, Ht as EventUnsubscribe, I as DevframeDeploymentKind, It as AgentToolInput, J as DevframeServiceDefinition, K as McpRouteOptions, L as DevframeDockDefaults, Lt as AgentToolProvider, Mt as AgentResource, Nt as AgentResourceContent, P as DevframeCliOptions, Pt as AgentResourceInput, Q as DevframeServiceMeta, R as DevframeDuplicationStrategy, Rt as AgentToolProviderHandle, St as DevframeStorageScope, U as DevframeSseOptions, Ut as EventsMap, V as DevframeSnapshotRpcEntry, Vt as EventEmitter, W as DevframeWsOptions, X as DevframeServiceId, Y as DevframeServiceDescriptor, Z as DevframeServiceInput, _t as DevframeViewHost, a as DevframeConnectionConfigsRegistry, at as DevframeScopedNodeContext, bt as DevframeRpcSharedStates, c as RpcBroadcastOptions, ct as DevframeSettings, d as RpcSharedStateHost, dt as ScopedBroadcastOptions, et as DevframeServiceScopeOf, f as RpcStreamingChannel, ft as ScopedClientFunctions, gt as SettingsForNamespace, ht as ScopedSharedStates, i as DevframeCapabilities, it as DevframeServicesState, jt as AgentManifest, l as RpcFunctionsHost, lt as DevframeSettingsRegistry, m as RpcStreamingHost, mt as ScopedServerFunctions, n as ConnectionMetaSse, nt as DevframeServicesRegistry, o as DevframeNodeContext, ot as DevframeScopedNodeRpc, p as RpcStreamingChannelOptions, pt as ScopedRpcFn, q as McpSetting, r as ConnectionMetaWebsocket, rt as DevframeServicesScopeRegistry, s as DevframeNodeRpcSession, st as DevframeScopedStreamingHost, t as ConnectionMeta, tt as DevframeServicesHost, u as RpcSharedStateGetOptions, ut as DevframeSettingsStore, vt as DevframeRpcClientFunctions, wt as DevframeDiagnosticsLogger, xt as DevframeHost, yt as DevframeRpcServerFunctions, z as DevframeRpcOptions, zt as DevframeAgentHost } from "./context-DLzIyQCZ.mjs";
|
|
4
|
+
import { a as DevframeWsPeer, i as DevframeRpcTransportKind, n as DevframeRpcConnection, r as DevframeRpcConnectionRequest, t as DevframeNodeRpcSessionMeta } from "./session-r6PDixP6.mjs";
|
|
5
5
|
import { a as RemoteAssetsStore, i as RemoteAssetsProviderCustom, n as RemoteAssetsErrorMessage, o as StaticAssetsSource, r as RemoteAssetsProvider, t as RemoteAssets } from "./remote-assets-eBvSKZMS.mjs";
|
|
6
6
|
import { i as DevframeDefineDiagnosticsOptions } from "./nostics-0sKe5HIj.mjs";
|
|
7
7
|
//#region src/define.d.ts
|
|
@@ -18,4 +18,4 @@ export declare function defineDevframe(d: DevframeDefinition): DevframeDefinitio
|
|
|
18
18
|
*/
|
|
19
19
|
export declare function resolveClientAssets(d: DevframeDefinition): StaticAssetsSource | undefined;
|
|
20
20
|
//#endregion
|
|
21
|
-
export type { AgentHandle, AgentManifest, AgentResource, AgentResourceContent, AgentResourceInput, AgentTool, AgentToolInput, AgentToolProvider, AgentToolProviderHandle, ConnectionMeta, ConnectionMetaSse, ConnectionMetaWebsocket, DevframeAgentHost, DevframeAgentHostEvents, DevframeCapabilities, DevframeCliOptions, DevframeConnectionConfigsRegistry, DevframeDefineDiagnosticsOptions, DevframeDefinition, DevframeDeploymentKind, DevframeDiagnosticsHost, DevframeDiagnosticsLogger, DevframeDockDefaults, DevframeDuplicationStrategy, DevframeHost, DevframeNodeContext, DevframeNodeRpcSession, DevframeNodeRpcSessionMeta, DevframeRpcClientFunctions, DevframeRpcConnection, DevframeRpcConnectionRequest, DevframeRpcOptions, DevframeRpcServerFunctions, DevframeRpcSharedStates, 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, McpAuthorization, McpRouteOptions, McpSetting, RemoteAssets, RemoteAssetsErrorMessage, RemoteAssetsProvider, RemoteAssetsProviderCustom, RemoteAssetsStore, RpcBroadcastOptions, RpcFunctionAgentOptions, RpcFunctionsHost, RpcSharedStateGetOptions, RpcSharedStateHost, RpcStreamingChannel, RpcStreamingChannelOptions, RpcStreamingHost, ScopedBroadcastOptions, ScopedClientFunctions, ScopedRpcFn, ScopedServerFunctions, ScopedSharedStates, SettingsForNamespace, StaticAssetsSource };
|
|
21
|
+
export type { AgentHandle, AgentManifest, AgentResource, AgentResourceContent, AgentResourceInput, AgentTool, AgentToolInput, AgentToolProvider, AgentToolProviderHandle, ConnectionMeta, ConnectionMetaSse, ConnectionMetaWebsocket, DevframeAgentHost, DevframeAgentHostEvents, DevframeCapabilities, DevframeCliOptions, DevframeConnectionConfigsRegistry, DevframeDefineDiagnosticsOptions, DevframeDefinition, DevframeDeploymentKind, DevframeDiagnosticsHost, DevframeDiagnosticsLogger, DevframeDockDefaults, DevframeDuplicationStrategy, DevframeHost, DevframeNodeContext, DevframeNodeRpcSession, DevframeNodeRpcSessionMeta, DevframeRpcClientFunctions, DevframeRpcConnection, DevframeRpcConnectionRequest, DevframeRpcOptions, DevframeRpcServerFunctions, DevframeRpcSharedStates, 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, DevframeWsPeer, EventEmitter, EventUnsubscribe, EventsMap, McpAuthorization, McpRouteOptions, McpSetting, RemoteAssets, RemoteAssetsErrorMessage, RemoteAssetsProvider, RemoteAssetsProviderCustom, RemoteAssetsStore, RpcBroadcastOptions, RpcFunctionAgentOptions, RpcFunctionsHost, RpcSharedStateGetOptions, RpcSharedStateHost, RpcStreamingChannel, RpcStreamingChannelOptions, RpcStreamingHost, ScopedBroadcastOptions, ScopedClientFunctions, ScopedRpcFn, ScopedServerFunctions, ScopedSharedStates, SettingsForNamespace, StaticAssetsSource };
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import "./
|
|
1
|
+
import { Tt as DevframeAuthHandler, U as DevframeSseOptions, W as DevframeWsOptions, o as DevframeNodeContext, s as DevframeNodeRpcSession, t as ConnectionMeta, vt as DevframeRpcClientFunctions, yt as DevframeRpcServerFunctions } from "./context-DLzIyQCZ.mjs";
|
|
2
|
+
import { n as DevframeRpcConnection, t as DevframeNodeRpcSessionMeta } from "./session-r6PDixP6.mjs";
|
|
3
|
+
import { n as WsOriginRegistry } from "./ws-server-9ztvkeJ0.mjs";
|
|
4
|
+
import "./index-Ces7aTOQ.mjs";
|
|
4
5
|
import { BirpcGroup } from "birpc";
|
|
6
|
+
import { H3 } from "h3";
|
|
5
7
|
import { NodeAdapter } from "crossws/adapters/node";
|
|
6
8
|
import { Buffer } from "node:buffer";
|
|
7
9
|
import { IncomingMessage, Server, ServerResponse } from "node:http";
|
|
8
10
|
import { Duplex } from "node:stream";
|
|
9
|
-
import { H3 } from "h3";
|
|
10
11
|
//#region src/node/instance-registry.d.ts
|
|
11
12
|
/**
|
|
12
13
|
* One running devframe instance, as recorded in the instance registry.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { v as RpcFunctionDefinitionAny } from "../types-Dq4i156u.mjs";
|
|
2
|
-
import { At as AgentHandle, Bt as DevframeAgentHostEvents, F as DevframeDefinition, Ft as AgentTool, It as AgentToolInput, Lt as AgentToolProvider, Mt as AgentResource, Nt as AgentResourceContent, Pt as AgentResourceInput, Rt as AgentToolProviderHandle, Vt as EventEmitter, jt as AgentManifest, o as DevframeNodeContext, xt as DevframeHost, zt as DevframeAgentHost$1 } from "../context-
|
|
2
|
+
import { At as AgentHandle, Bt as DevframeAgentHostEvents, F as DevframeDefinition, Ft as AgentTool, It as AgentToolInput, Lt as AgentToolProvider, Mt as AgentResource, Nt as AgentResourceContent, Pt as AgentResourceInput, Rt as AgentToolProviderHandle, Vt as EventEmitter, jt as AgentManifest, o as DevframeNodeContext, xt as DevframeHost, zt as DevframeAgentHost$1 } from "../context-DLzIyQCZ.mjs";
|
|
3
3
|
import { a as RemoteAssetsStore, o as StaticAssetsSource } from "../remote-assets-eBvSKZMS.mjs";
|
|
4
|
-
import { a as InstanceShellInit, c as StartedServer, d as samePath, f as DevframeInstanceRecord, h as registerDevframeInstance, i as InstanceShellApi, l as createInstanceShell, m as listLiveDevframeInstances, n as InstanceRegisterConfig, o as InstanceShellInternals, p as DevframeInstanceRegistration, r as InstanceShell, s as InstanceWsTier, t as CreateInstanceShellOptions, u as resolveInstanceRegister } from "../instance-shell-
|
|
5
|
-
import { a as resolveBasePath, i as normalizeBasePath, n as ResolvedMcpConfig, r as loadAutoMcpAdapter, s as resolveMcpConfig } from "../_shared-
|
|
6
|
-
import { n as CreateContextRpcServerOptions, r as createContextRpcServer, t as ContextRpcServer } from "../rpc-core-
|
|
4
|
+
import { a as InstanceShellInit, c as StartedServer, d as samePath, f as DevframeInstanceRecord, h as registerDevframeInstance, i as InstanceShellApi, l as createInstanceShell, m as listLiveDevframeInstances, n as InstanceRegisterConfig, o as InstanceShellInternals, p as DevframeInstanceRegistration, r as InstanceShell, s as InstanceWsTier, t as CreateInstanceShellOptions, u as resolveInstanceRegister } from "../instance-shell-BQXr8n68.mjs";
|
|
5
|
+
import { a as resolveBasePath, i as normalizeBasePath, n as ResolvedMcpConfig, r as loadAutoMcpAdapter, s as resolveMcpConfig } from "../_shared-CkLpdx6I.mjs";
|
|
6
|
+
import { n as CreateContextRpcServerOptions, r as createContextRpcServer, t as ContextRpcServer } from "../rpc-core-Clo3kHfo.mjs";
|
|
7
7
|
//#region src/client-assets.d.ts
|
|
8
8
|
/**
|
|
9
9
|
* Resolve a definition's client assets source: the built SPA served as its
|
package/dist/node/auth.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { Tt as DevframeAuthHandler } from "../context-
|
|
2
|
-
import { a as getTempAuthCodeInfo, c as revokeActiveConnectionsForToken, i as getTempAuthCode, l as revokeAuthToken, n as describeUA, o as refreshTempAuthCode, r as exchangeTempAuthCode, s as verifyAuthToken, t as buildOtpAuthUrl } from "../index
|
|
1
|
+
import { Tt as DevframeAuthHandler } from "../context-DLzIyQCZ.mjs";
|
|
2
|
+
import { a as getTempAuthCodeInfo, c as revokeActiveConnectionsForToken, i as getTempAuthCode, l as revokeAuthToken, n as describeUA, o as refreshTempAuthCode, r as exchangeTempAuthCode, s as verifyAuthToken, t as buildOtpAuthUrl } from "../index-Ces7aTOQ.mjs";
|
|
3
3
|
export { DevframeAuthHandler, buildOtpAuthUrl, describeUA, exchangeTempAuthCode, getTempAuthCode, getTempAuthCodeInfo, refreshTempAuthCode, revokeActiveConnectionsForToken, revokeAuthToken, verifyAuthToken };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { a as internalContextMap, i as getInternalContext, n as InternalAnonymousAuthStorage, r as RemoteTokenRecord, t as DevframeInternalContext } from "../context-
|
|
2
|
-
import { a as resolveBasePath, i as normalizeBasePath } from "../_shared-
|
|
1
|
+
import { a as internalContextMap, i as getInternalContext, n as InternalAnonymousAuthStorage, r as RemoteTokenRecord, t as DevframeInternalContext } from "../context-3y_PeZKl.mjs";
|
|
2
|
+
import { a as resolveBasePath, i as normalizeBasePath } from "../_shared-CkLpdx6I.mjs";
|
|
3
3
|
export { type DevframeInternalContext, type InternalAnonymousAuthStorage, type RemoteTokenRecord, getInternalContext, internalContextMap, normalizeBasePath, resolveBasePath };
|
package/dist/node/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "../index-pIVt92jP.mjs";
|
|
2
2
|
import { v as RpcFunctionDefinitionAny } from "../types-Dq4i156u.mjs";
|
|
3
|
-
import { k as SharedState, l as RpcFunctionsHost, o as DevframeNodeContext, xt as DevframeHost } from "../context-
|
|
3
|
+
import { k as SharedState, l as RpcFunctionsHost, o as DevframeNodeContext, xt as DevframeHost } from "../context-DLzIyQCZ.mjs";
|
|
4
4
|
import { BirpcGroup } from "birpc";
|
|
5
5
|
//#region src/node/context.d.ts
|
|
6
6
|
export interface CreateHostContextOptions {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "../index-pIVt92jP.mjs";
|
|
2
2
|
import { E as Thenable, S as RpcFunctionSetupResult, c as RpcDump, g as RpcFunctionAgentOptions } from "../types-Dq4i156u.mjs";
|
|
3
|
-
import "../context-
|
|
3
|
+
import "../context-DLzIyQCZ.mjs";
|
|
4
4
|
import { SimpleSchema } from "../utils/simple-schema.mjs";
|
|
5
5
|
//#region src/recipes/common-rpc-functions.d.ts
|
|
6
6
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Tt as DevframeAuthHandler, o as DevframeNodeContext, s as DevframeNodeRpcSession } from "../context-
|
|
2
|
-
import "../index
|
|
1
|
+
import { Tt as DevframeAuthHandler, o as DevframeNodeContext, s as DevframeNodeRpcSession } from "../context-DLzIyQCZ.mjs";
|
|
2
|
+
import "../index-Ces7aTOQ.mjs";
|
|
3
3
|
import { ColorFn } from "../utils/colors.mjs";
|
|
4
4
|
//#region src/recipes/interactive-auth.d.ts
|
|
5
5
|
export interface CreateInteractiveAuthOptions {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { v as RpcFunctionDefinitionAny } from "../../types-Dq4i156u.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { n as DevframeRpcConnection, t as DevframeNodeRpcSessionMeta } from "../../session-r6PDixP6.mjs";
|
|
3
|
+
import { n as WsOriginRegistry } from "../../ws-server-9ztvkeJ0.mjs";
|
|
3
4
|
import { BirpcGroup } from "birpc";
|
|
4
5
|
//#region src/rpc/transports/sse-server.d.ts
|
|
5
6
|
export interface SseRpcTransportOptions {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as WsOriginRegistry } from "../../ws-server-
|
|
2
|
-
import { t as ContextRpcServer } from "../../rpc-core-
|
|
1
|
+
import { n as WsOriginRegistry } from "../../ws-server-9ztvkeJ0.mjs";
|
|
2
|
+
import { t as ContextRpcServer } from "../../rpc-core-Clo3kHfo.mjs";
|
|
3
3
|
//#region src/rpc/transports/ws-bun.d.ts
|
|
4
4
|
export interface AttachBunWsTransportOptions {
|
|
5
5
|
/** Same contract as `WsRpcTransportOptions.allowedOrigins`. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as WsOriginRegistry } from "../../ws-server-
|
|
2
|
-
import { t as ContextRpcServer } from "../../rpc-core-
|
|
1
|
+
import { n as WsOriginRegistry } from "../../ws-server-9ztvkeJ0.mjs";
|
|
2
|
+
import { t as ContextRpcServer } from "../../rpc-core-Clo3kHfo.mjs";
|
|
3
3
|
//#region src/rpc/transports/ws-deno.d.ts
|
|
4
4
|
export interface AttachDenoWsTransportOptions {
|
|
5
5
|
/** Same contract as `WsRpcTransportOptions.allowedOrigins`. */
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import { a as
|
|
1
|
+
import { a as DevframeWsPeer, i as DevframeRpcTransportKind, n as DevframeRpcConnection, r as DevframeRpcConnectionRequest, t as DevframeNodeRpcSessionMeta } from "../../session-r6PDixP6.mjs";
|
|
2
2
|
import { n as isLoopbackHostname, t as isAllowedOrigin } from "../../origin-DGDH8BI9.mjs";
|
|
3
|
-
|
|
3
|
+
import { a as attachWsRpcTransport, i as WsRpcTransportOptions, n as WsOriginRegistry, o as createWsOriginRegistry, r as WsRpcTransport, s as createWsRpcPeerHooks, t as CreateWsOriginRegistryOptions } from "../../ws-server-9ztvkeJ0.mjs";
|
|
4
|
+
export { CreateWsOriginRegistryOptions, type DevframeNodeRpcSessionMeta, type DevframeRpcConnection, type DevframeRpcConnectionRequest, type DevframeRpcTransportKind, type DevframeWsPeer, WsOriginRegistry, WsRpcTransport, WsRpcTransportOptions, attachWsRpcTransport, createWsOriginRegistry, createWsRpcPeerHooks, isAllowedOrigin, isLoopbackHostname };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import "./
|
|
1
|
+
import { Tt as DevframeAuthHandler, o as DevframeNodeContext, s as DevframeNodeRpcSession, vt as DevframeRpcClientFunctions, yt as DevframeRpcServerFunctions } from "./context-DLzIyQCZ.mjs";
|
|
2
|
+
import { n as DevframeRpcConnection, t as DevframeNodeRpcSessionMeta } from "./session-r6PDixP6.mjs";
|
|
3
|
+
import "./ws-server-9ztvkeJ0.mjs";
|
|
4
|
+
import "./index-Ces7aTOQ.mjs";
|
|
4
5
|
import { BirpcGroup, EventOptions } from "birpc";
|
|
5
6
|
//#region src/node/rpc-core.d.ts
|
|
6
7
|
interface CreateContextRpcServerOptions {
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
//#region src/rpc/transports/session.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Structural view of the crossws `Peer` backing a WebSocket RPC connection:
|
|
4
|
+
* the transport-independent slice of its API (identity, send, pub/sub,
|
|
5
|
+
* close, backpressure), typed locally so the `devframe/types` declaration
|
|
6
|
+
* graph never imports `crossws`, whose own declarations require the DOM,
|
|
7
|
+
* Bun, and Cloudflare type libs a plain Node consumer doesn't load. Every
|
|
8
|
+
* member mirrors its crossws counterpart; for the full API (the upgrade
|
|
9
|
+
* `request`, raw `websocket`, connected `peers`), import `Peer` from
|
|
10
|
+
* `crossws` and cast, which opts your compilation into crossws's lib
|
|
11
|
+
* requirements.
|
|
12
|
+
*/
|
|
13
|
+
interface DevframeWsPeer {
|
|
14
|
+
/** Unique random uuid v4 identifier for the peer. */
|
|
15
|
+
readonly id: string;
|
|
16
|
+
/** IP address of the peer. */
|
|
17
|
+
readonly remoteAddress: string | undefined;
|
|
18
|
+
/** All topics this peer has been subscribed to. */
|
|
19
|
+
readonly topics: Set<string>;
|
|
20
|
+
/** Bytes queued for transmission but not yet flushed to the client. */
|
|
21
|
+
readonly bufferedAmount: number;
|
|
22
|
+
/** Wait until the send buffer drains to `threshold` bytes (default `0`). */
|
|
23
|
+
waitForDrain: (opts?: {
|
|
24
|
+
threshold?: number;
|
|
25
|
+
pollInterval?: number;
|
|
26
|
+
}) => Promise<void>;
|
|
27
|
+
/** Send a message to the peer. */
|
|
28
|
+
send: (data: unknown, options?: {
|
|
29
|
+
compress?: boolean;
|
|
30
|
+
}) => number | void | undefined;
|
|
31
|
+
/** Send a message to subscribers of a topic. */
|
|
32
|
+
publish: (topic: string, data: unknown, options?: {
|
|
33
|
+
compress?: boolean;
|
|
34
|
+
}) => void;
|
|
35
|
+
/** Subscribe to a topic. */
|
|
36
|
+
subscribe: (topic: string) => void;
|
|
37
|
+
/** Unsubscribe from a topic. */
|
|
38
|
+
unsubscribe: (topic: string) => void;
|
|
39
|
+
/** Close the connection. */
|
|
40
|
+
close: (code?: number, reason?: string) => void;
|
|
41
|
+
/** Abruptly close the connection. */
|
|
42
|
+
terminate: () => void;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Which wire transport produced an RPC connection. Every transport speaks
|
|
46
|
+
* the same birpc channel protocol; the kind only matters to code that needs
|
|
47
|
+
* transport-specific behavior (e.g. reaching the WS escape hatch on
|
|
48
|
+
* {@link DevframeRpcConnection.peer}).
|
|
49
|
+
*/
|
|
50
|
+
type DevframeRpcTransportKind = 'websocket' | 'sse';
|
|
51
|
+
/**
|
|
52
|
+
* Structural view of the connect-time HTTP request behind an RPC connection:
|
|
53
|
+
* the WS upgrade request, or the request opening an SSE stream. Shaped to
|
|
54
|
+
* match both the web `Request` a crossws peer exposes and a plain
|
|
55
|
+
* `node:http` request wrapper, so auth hooks can read the bearer-token
|
|
56
|
+
* query param and the `Origin` header without caring which transport (or
|
|
57
|
+
* runtime) produced the connection.
|
|
58
|
+
*/
|
|
59
|
+
interface DevframeRpcConnectionRequest {
|
|
60
|
+
/** Request URL (may be path-only, e.g. `/__ws?devframe_auth_token=…`). */
|
|
61
|
+
url?: string;
|
|
62
|
+
/** Header lookup, `Headers`-style. */
|
|
63
|
+
headers?: {
|
|
64
|
+
get: (name: string) => string | null | undefined;
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* A live RPC connection, independent of the transport that carries it. One
|
|
69
|
+
* exists per connected client; transport bindings construct it alongside the
|
|
70
|
+
* session meta and hand both to the connect/disconnect hooks
|
|
71
|
+
* (`onPeerConnect` / `onPeerDisconnect`, {@link DevframeAuthHandler.onConnect}).
|
|
72
|
+
*/
|
|
73
|
+
interface DevframeRpcConnection {
|
|
74
|
+
/** Session id, the same value as the session meta's `id`. */
|
|
75
|
+
id: number;
|
|
76
|
+
/** The transport carrying this connection. */
|
|
77
|
+
transport: DevframeRpcTransportKind;
|
|
78
|
+
/** The connect-time HTTP request (upgrade request / stream request). */
|
|
79
|
+
request?: DevframeRpcConnectionRequest;
|
|
80
|
+
/** Send a raw wire frame to this client. Prefer the birpc channel. */
|
|
81
|
+
send?: (data: string) => void;
|
|
82
|
+
/** Terminate the connection from the server side. */
|
|
83
|
+
close?: (code?: number, reason?: string) => void;
|
|
84
|
+
/**
|
|
85
|
+
* The crossws peer backing a `websocket` connection: the WS-specific
|
|
86
|
+
* escape hatch (pub/sub, raw socket access). Absent on other transports.
|
|
87
|
+
*/
|
|
88
|
+
peer?: DevframeWsPeer;
|
|
89
|
+
}
|
|
90
|
+
interface DevframeNodeRpcSessionMeta {
|
|
91
|
+
id: number;
|
|
92
|
+
/** The crossws peer backing this session's socket (WS transport only). */
|
|
93
|
+
peer?: DevframeWsPeer;
|
|
94
|
+
clientAuthToken?: string;
|
|
95
|
+
isTrusted?: boolean;
|
|
96
|
+
subscribedStates: Set<string>;
|
|
97
|
+
/**
|
|
98
|
+
* Streams this session has subscribed to via
|
|
99
|
+
* `rpc.streaming.subscribe(channel, id)`. Tracked here for O(1) cleanup
|
|
100
|
+
* on disconnect; the wire format is `${channel}\x1F${id}`.
|
|
101
|
+
*/
|
|
102
|
+
subscribedStreams?: Set<string>;
|
|
103
|
+
/**
|
|
104
|
+
* Inbound streams this session is currently uploading to (via
|
|
105
|
+
* `rpc.streaming.upload(channel, id)`). Tracked for cleanup on
|
|
106
|
+
* disconnect; same wire format as `subscribedStreams`.
|
|
107
|
+
*/
|
|
108
|
+
uploadingStreams?: Set<string>;
|
|
109
|
+
}
|
|
110
|
+
//#endregion
|
|
111
|
+
export { DevframeWsPeer as a, DevframeRpcTransportKind as i, DevframeRpcConnection as n, DevframeRpcConnectionRequest as r, DevframeNodeRpcSessionMeta as t };
|
package/dist/types/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { g as RpcFunctionAgentOptions } from "../types-Dq4i156u.mjs";
|
|
2
|
-
import { c as
|
|
3
|
-
import {
|
|
2
|
+
import { $ as DevframeServiceOf, At as AgentHandle, B as DevframeSetupInfo, Bt as DevframeAgentHostEvents, Ct as DevframeDiagnosticsHost, F as DevframeDefinition, Ft as AgentTool, G as McpAuthorization, H as DevframeSnapshotRpcInputs, Ht as EventUnsubscribe, I as DevframeDeploymentKind, It as AgentToolInput, J as DevframeServiceDefinition, K as McpRouteOptions, L as DevframeDockDefaults, Lt as AgentToolProvider, Mt as AgentResource, Nt as AgentResourceContent, P as DevframeCliOptions, Pt as AgentResourceInput, Q as DevframeServiceMeta, R as DevframeDuplicationStrategy, Rt as AgentToolProviderHandle, St as DevframeStorageScope, U as DevframeSseOptions, Ut as EventsMap, V as DevframeSnapshotRpcEntry, Vt as EventEmitter, W as DevframeWsOptions, X as DevframeServiceId, Y as DevframeServiceDescriptor, Z as DevframeServiceInput, _t as DevframeViewHost, a as DevframeConnectionConfigsRegistry, at as DevframeScopedNodeContext, bt as DevframeRpcSharedStates, c as RpcBroadcastOptions, ct as DevframeSettings, d as RpcSharedStateHost, dt as ScopedBroadcastOptions, et as DevframeServiceScopeOf, f as RpcStreamingChannel, ft as ScopedClientFunctions, gt as SettingsForNamespace, ht as ScopedSharedStates, i as DevframeCapabilities, it as DevframeServicesState, jt as AgentManifest, l as RpcFunctionsHost, lt as DevframeSettingsRegistry, m as RpcStreamingHost, mt as ScopedServerFunctions, n as ConnectionMetaSse, nt as DevframeServicesRegistry, o as DevframeNodeContext, ot as DevframeScopedNodeRpc, p as RpcStreamingChannelOptions, pt as ScopedRpcFn, q as McpSetting, r as ConnectionMetaWebsocket, rt as DevframeServicesScopeRegistry, s as DevframeNodeRpcSession, st as DevframeScopedStreamingHost, t as ConnectionMeta, tt as DevframeServicesHost, u as RpcSharedStateGetOptions, ut as DevframeSettingsStore, vt as DevframeRpcClientFunctions, wt as DevframeDiagnosticsLogger, xt as DevframeHost, yt as DevframeRpcServerFunctions, z as DevframeRpcOptions, zt as DevframeAgentHost } from "../context-DLzIyQCZ.mjs";
|
|
3
|
+
import { a as DevframeWsPeer, i as DevframeRpcTransportKind, n as DevframeRpcConnection, r as DevframeRpcConnectionRequest, t as DevframeNodeRpcSessionMeta } from "../session-r6PDixP6.mjs";
|
|
4
4
|
import { a as RemoteAssetsStore, i as RemoteAssetsProviderCustom, n as RemoteAssetsErrorMessage, o as StaticAssetsSource, r as RemoteAssetsProvider, t as RemoteAssets } from "../remote-assets-eBvSKZMS.mjs";
|
|
5
5
|
import { i as DevframeDefineDiagnosticsOptions } from "../nostics-0sKe5HIj.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, McpAuthorization, McpRouteOptions, McpSetting, RemoteAssets, RemoteAssetsErrorMessage, RemoteAssetsProvider, RemoteAssetsProviderCustom, RemoteAssetsStore, RpcBroadcastOptions, type RpcFunctionAgentOptions, RpcFunctionsHost, RpcSharedStateGetOptions, RpcSharedStateHost, RpcStreamingChannel, RpcStreamingChannelOptions, RpcStreamingHost, ScopedBroadcastOptions, ScopedClientFunctions, ScopedRpcFn, ScopedServerFunctions, ScopedSharedStates, SettingsForNamespace, StaticAssetsSource };
|
|
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, type DevframeWsPeer, EventEmitter, EventUnsubscribe, EventsMap, McpAuthorization, McpRouteOptions, McpSetting, RemoteAssets, RemoteAssetsErrorMessage, RemoteAssetsProvider, RemoteAssetsProviderCustom, RemoteAssetsStore, RpcBroadcastOptions, type RpcFunctionAgentOptions, RpcFunctionsHost, RpcSharedStateGetOptions, RpcSharedStateHost, RpcStreamingChannel, RpcStreamingChannelOptions, RpcStreamingHost, ScopedBroadcastOptions, ScopedClientFunctions, ScopedRpcFn, ScopedServerFunctions, ScopedSharedStates, SettingsForNamespace, StaticAssetsSource };
|
package/dist/utils/events.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as RemoteAssetsStore } from "../remote-assets-eBvSKZMS.mjs";
|
|
2
|
-
import { IncomingMessage, ServerResponse } from "node:http";
|
|
3
2
|
import { EventHandler, H3 } from "h3";
|
|
3
|
+
import { IncomingMessage, ServerResponse } from "node:http";
|
|
4
4
|
//#region src/utils/serve-static.d.ts
|
|
5
5
|
/**
|
|
6
6
|
* What the static-serving engine accepts: a local directory, or a resolved
|
|
@@ -1,2 +1,2 @@
|
|
|
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-
|
|
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-DLzIyQCZ.mjs";
|
|
2
2
|
export { Immutable, ImmutableArray, ImmutableMap, ImmutableObject, ImmutableSet, SharedState, SharedStateEvents, SharedStateOptions, SharedStatePatch, createSharedState };
|
|
@@ -1,2 +1,2 @@
|
|
|
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-
|
|
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-DLzIyQCZ.mjs";
|
|
2
2
|
export { BufferedChunk, CreateStreamReaderOptions, CreateStreamSinkOptions, StreamErrorPayload, StreamReader, StreamSink, StreamSinkEvents, createStreamReader, createStreamSink };
|
|
@@ -1,80 +1,13 @@
|
|
|
1
1
|
import { v as RpcFunctionDefinitionAny } from "./types-Dq4i156u.mjs";
|
|
2
|
+
import { n as DevframeRpcConnection, t as DevframeNodeRpcSessionMeta } from "./session-r6PDixP6.mjs";
|
|
2
3
|
import { BirpcGroup, ChannelOptions } from "birpc";
|
|
3
|
-
import { Hooks
|
|
4
|
+
import { Hooks } from "crossws";
|
|
4
5
|
import { NodeAdapter } from "crossws/adapters/node";
|
|
5
6
|
import { Buffer } from "node:buffer";
|
|
6
7
|
import { IncomingMessage, Server } from "node:http";
|
|
7
8
|
import { Server as Server$1, ServerOptions } from "node:https";
|
|
8
9
|
import { AddressInfo } from "node:net";
|
|
9
10
|
import { Duplex } from "node:stream";
|
|
10
|
-
//#region src/rpc/transports/session.d.ts
|
|
11
|
-
/**
|
|
12
|
-
* Which wire transport produced an RPC connection. Every transport speaks
|
|
13
|
-
* the same birpc channel protocol; the kind only matters to code that needs
|
|
14
|
-
* transport-specific behavior (e.g. reaching the WS escape hatch on
|
|
15
|
-
* {@link DevframeRpcConnection.peer}).
|
|
16
|
-
*/
|
|
17
|
-
type DevframeRpcTransportKind = 'websocket' | 'sse';
|
|
18
|
-
/**
|
|
19
|
-
* Structural view of the connect-time HTTP request behind an RPC connection:
|
|
20
|
-
* the WS upgrade request, or the request opening an SSE stream. Shaped to
|
|
21
|
-
* match both the web `Request` a crossws peer exposes and a plain
|
|
22
|
-
* `node:http` request wrapper, so auth hooks can read the bearer-token
|
|
23
|
-
* query param and the `Origin` header without caring which transport (or
|
|
24
|
-
* runtime) produced the connection.
|
|
25
|
-
*/
|
|
26
|
-
interface DevframeRpcConnectionRequest {
|
|
27
|
-
/** Request URL (may be path-only, e.g. `/__ws?devframe_auth_token=…`). */
|
|
28
|
-
url?: string;
|
|
29
|
-
/** Header lookup, `Headers`-style. */
|
|
30
|
-
headers?: {
|
|
31
|
-
get: (name: string) => string | null | undefined;
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* A live RPC connection, independent of the transport that carries it. One
|
|
36
|
-
* exists per connected client; transport bindings construct it alongside the
|
|
37
|
-
* session meta and hand both to the connect/disconnect hooks
|
|
38
|
-
* (`onPeerConnect` / `onPeerDisconnect`, {@link DevframeAuthHandler.onConnect}).
|
|
39
|
-
*/
|
|
40
|
-
interface DevframeRpcConnection {
|
|
41
|
-
/** Session id, the same value as the session meta's `id`. */
|
|
42
|
-
id: number;
|
|
43
|
-
/** The transport carrying this connection. */
|
|
44
|
-
transport: DevframeRpcTransportKind;
|
|
45
|
-
/** The connect-time HTTP request (upgrade request / stream request). */
|
|
46
|
-
request?: DevframeRpcConnectionRequest;
|
|
47
|
-
/** Send a raw wire frame to this client. Prefer the birpc channel. */
|
|
48
|
-
send?: (data: string) => void;
|
|
49
|
-
/** Terminate the connection from the server side. */
|
|
50
|
-
close?: (code?: number, reason?: string) => void;
|
|
51
|
-
/**
|
|
52
|
-
* The crossws peer backing a `websocket` connection: the WS-specific
|
|
53
|
-
* escape hatch (pub/sub, raw socket access). Absent on other transports.
|
|
54
|
-
*/
|
|
55
|
-
peer?: Peer;
|
|
56
|
-
}
|
|
57
|
-
interface DevframeNodeRpcSessionMeta {
|
|
58
|
-
id: number;
|
|
59
|
-
/** The crossws peer backing this session's socket (WS transport only). */
|
|
60
|
-
peer?: Peer;
|
|
61
|
-
clientAuthToken?: string;
|
|
62
|
-
isTrusted?: boolean;
|
|
63
|
-
subscribedStates: Set<string>;
|
|
64
|
-
/**
|
|
65
|
-
* Streams this session has subscribed to via
|
|
66
|
-
* `rpc.streaming.subscribe(channel, id)`. Tracked here for O(1) cleanup
|
|
67
|
-
* on disconnect; the wire format is `${channel}\x1F${id}`.
|
|
68
|
-
*/
|
|
69
|
-
subscribedStreams?: Set<string>;
|
|
70
|
-
/**
|
|
71
|
-
* Inbound streams this session is currently uploading to (via
|
|
72
|
-
* `rpc.streaming.upload(channel, id)`). Tracked for cleanup on
|
|
73
|
-
* disconnect; same wire format as `subscribedStreams`.
|
|
74
|
-
*/
|
|
75
|
-
uploadingStreams?: Set<string>;
|
|
76
|
-
}
|
|
77
|
-
//#endregion
|
|
78
11
|
//#region src/rpc/transports/ws-server.d.ts
|
|
79
12
|
interface WsRpcTransportOptions {
|
|
80
13
|
/**
|
|
@@ -216,4 +149,4 @@ declare function createWsRpcPeerHooks<ClientFunctions extends object, ServerFunc
|
|
|
216
149
|
*/
|
|
217
150
|
declare function attachWsRpcTransport<ClientFunctions extends object, ServerFunctions extends object>(rpcGroup: BirpcGroup<ClientFunctions, ServerFunctions, false>, options?: WsRpcTransportOptions): WsRpcTransport;
|
|
218
151
|
//#endregion
|
|
219
|
-
export { attachWsRpcTransport as a,
|
|
152
|
+
export { attachWsRpcTransport as a, WsRpcTransportOptions as i, WsOriginRegistry as n, createWsOriginRegistry as o, WsRpcTransport as r, createWsRpcPeerHooks as s, CreateWsOriginRegistryOptions as t };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "devframe",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.9.
|
|
4
|
+
"version": "0.9.16",
|
|
5
5
|
"description": "Framework for building one portable devtool integration that runs in any viewer.",
|
|
6
6
|
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -112,6 +112,7 @@
|
|
|
112
112
|
"structured-clone-es": "^2.0.1",
|
|
113
113
|
"tinyglobby": "^0.2.17",
|
|
114
114
|
"tsdown": "^0.23.0",
|
|
115
|
+
"typescript": "^6.0.3",
|
|
115
116
|
"ua-parser-modern": "^0.1.1",
|
|
116
117
|
"valibot": "^1.4.2",
|
|
117
118
|
"whenexpr": "^0.1.2",
|