devframe 0.6.1 → 0.7.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.
- package/dist/adapters/build.d.mts +1 -1
- package/dist/adapters/cac.d.mts +41 -0
- package/dist/adapters/cac.mjs +2 -0
- package/dist/adapters/cli.d.mts +8 -31
- package/dist/adapters/cli.mjs +3 -143
- package/dist/adapters/dev.d.mts +3 -3
- package/dist/adapters/dev.mjs +1 -1
- package/dist/adapters/embedded.d.mts +1 -1
- package/dist/adapters/mcp.d.mts +1 -1
- package/dist/cac-DCBSjlzl.mjs +152 -0
- package/dist/client/index.d.mts +90 -5
- package/dist/client/index.mjs +143 -6
- package/dist/{context-UX9qUDK7.d.mts → context-BsiCAEC4.d.mts} +1 -1
- package/dist/{dev-DE51PeJc.mjs → dev-YeAm6GL0.mjs} +1 -1
- package/dist/{devframe-BtVHhmwM.d.mts → devframe-Dma0XG3U.d.mts} +53 -6
- package/dist/helpers/vite.d.mts +2 -2
- package/dist/helpers/vite.mjs +2 -2
- package/dist/{index-DXHWuwJk.d.mts → index-BAZpbgHu.d.mts} +1 -1
- package/dist/{index-Dy6GFDRf.d.mts → index-DI_TMGjv.d.mts} +2 -2
- package/dist/{index-ByaMT1Xp.d.mts → index-d40ZLcYw.d.mts} +3 -3
- package/dist/index.d.mts +4 -4
- package/dist/node/auth.d.mts +1 -1
- package/dist/node/hub-internals.d.mts +2 -2
- package/dist/node/index.d.mts +5 -5
- package/dist/recipes/interactive-auth.d.mts +2 -2
- package/dist/recipes/open-helpers.d.mts +1 -1
- package/dist/rpc/dump.d.mts +1 -1
- package/dist/rpc/index.d.mts +2 -2
- package/dist/rpc/transports/ws-client.d.mts +1 -1
- package/dist/rpc/transports/ws-server.d.mts +1 -1
- package/dist/{server-Cfr1NrGQ.d.mts → server-BD-tKDVf.d.mts} +2 -2
- package/dist/types/index.d.mts +4 -4
- package/dist/{types-DZEx4ffs.d.mts → types-oEqKqUC9.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-D0z0pOhn.d.mts → ws-client-nBjpin71.d.mts} +1 -1
- package/dist/{ws-server-Bc2wBHl-.d.mts → ws-server-BUgJpdX4.d.mts} +1 -1
- package/package.json +8 -3
- package/skills/devframe/SKILL.md +4 -4
package/dist/client/index.mjs
CHANGED
|
@@ -505,6 +505,8 @@ async function createStaticRpcClientMode(options) {
|
|
|
505
505
|
const staticCaller = createStaticRpcCaller(await options.fetchJsonFromBases(DEVFRAME_RPC_DUMP_MANIFEST_FILENAME), options.fetchJsonFromBases);
|
|
506
506
|
return {
|
|
507
507
|
isTrusted: true,
|
|
508
|
+
status: "connected",
|
|
509
|
+
connectionError: null,
|
|
508
510
|
requestTrust: async () => true,
|
|
509
511
|
requestTrustWithToken: async () => true,
|
|
510
512
|
requestTrustWithCode: async () => null,
|
|
@@ -1857,6 +1859,30 @@ function parseUA(uastringOrExtensions, extensions) {
|
|
|
1857
1859
|
};
|
|
1858
1860
|
}
|
|
1859
1861
|
//#endregion
|
|
1862
|
+
//#region src/client/connection.ts
|
|
1863
|
+
/**
|
|
1864
|
+
* The error rejected from `rpc.call(...)` (and carried on
|
|
1865
|
+
* `rpc.connectionError`) when a call cannot be served because the connection is
|
|
1866
|
+
* down, the client is unauthorized, or a call timed out. Its `kind` lets a UI
|
|
1867
|
+
* tailor its message and recovery affordance without string-matching.
|
|
1868
|
+
*/
|
|
1869
|
+
var DevframeConnectionError = class extends Error {
|
|
1870
|
+
name = "DevframeConnectionError";
|
|
1871
|
+
kind;
|
|
1872
|
+
constructor(kind, message, options) {
|
|
1873
|
+
super(message, options);
|
|
1874
|
+
this.kind = kind;
|
|
1875
|
+
}
|
|
1876
|
+
};
|
|
1877
|
+
/**
|
|
1878
|
+
* Whether a status means calls can be attempted. `connecting` counts because
|
|
1879
|
+
* the transport queues outgoing calls until the socket opens; the terminal
|
|
1880
|
+
* failure states short-circuit calls so a stuck socket never hangs the UI.
|
|
1881
|
+
*/
|
|
1882
|
+
function isCallableStatus(status) {
|
|
1883
|
+
return status === "connected" || status === "connecting";
|
|
1884
|
+
}
|
|
1885
|
+
//#endregion
|
|
1860
1886
|
//#region src/client/rpc-ws.ts
|
|
1861
1887
|
/**
|
|
1862
1888
|
* Resolve a {@link ConnectionMeta.websocket} descriptor into a concrete
|
|
@@ -1899,10 +1925,65 @@ function resolveWsUrl(websocket, metaBaseUrl, loc) {
|
|
|
1899
1925
|
return target.href;
|
|
1900
1926
|
}
|
|
1901
1927
|
function createWsRpcClientMode(options) {
|
|
1902
|
-
const { authToken, connectionMeta, metaBaseUrl, events, clientRpc, rpcOptions = {}, wsOptions = {} } = options;
|
|
1928
|
+
const { authToken, connectionMeta, metaBaseUrl, events, clientRpc, rpcOptions = {}, wsOptions = {}, callTimeout = 0 } = options;
|
|
1903
1929
|
let isTrusted = false;
|
|
1930
|
+
let status = "connecting";
|
|
1931
|
+
let connectionError = null;
|
|
1904
1932
|
const trustedPromise = promiseWithResolver();
|
|
1905
1933
|
const url = resolveWsUrl(connectionMeta.websocket, metaBaseUrl ?? "./", location);
|
|
1934
|
+
function setStatus(next, error = null) {
|
|
1935
|
+
if (error) connectionError = error;
|
|
1936
|
+
else if (next === "connected") connectionError = null;
|
|
1937
|
+
if (next === status) return;
|
|
1938
|
+
const previous = status;
|
|
1939
|
+
status = next;
|
|
1940
|
+
events.emit("connection:status", next, previous);
|
|
1941
|
+
}
|
|
1942
|
+
const pending = /* @__PURE__ */ new Set();
|
|
1943
|
+
function rejectAllPending(error) {
|
|
1944
|
+
for (const entry of [...pending]) entry.reject(error);
|
|
1945
|
+
}
|
|
1946
|
+
function terminalError() {
|
|
1947
|
+
if (status === "disconnected" || status === "error") return new DevframeConnectionError("connection", "[devframe] Not connected to the devframe server", { cause: connectionError ?? void 0 });
|
|
1948
|
+
if (status === "unauthorized") return new DevframeConnectionError("auth", "[devframe] Not authorized by the devframe server", { cause: connectionError ?? void 0 });
|
|
1949
|
+
return null;
|
|
1950
|
+
}
|
|
1951
|
+
/**
|
|
1952
|
+
* Wrap an in-flight call promise so it settles on server response, on an
|
|
1953
|
+
* optional wall-clock timeout, or when the connection drops — never hangs.
|
|
1954
|
+
*/
|
|
1955
|
+
function guardCall(promise, method) {
|
|
1956
|
+
return new Promise((resolve, reject) => {
|
|
1957
|
+
let settled = false;
|
|
1958
|
+
let timer;
|
|
1959
|
+
const entry = { reject(error) {
|
|
1960
|
+
if (settled) return;
|
|
1961
|
+
finish();
|
|
1962
|
+
events.emit("rpc:error", error, method);
|
|
1963
|
+
reject(error);
|
|
1964
|
+
} };
|
|
1965
|
+
function finish() {
|
|
1966
|
+
settled = true;
|
|
1967
|
+
pending.delete(entry);
|
|
1968
|
+
if (timer) clearTimeout(timer);
|
|
1969
|
+
}
|
|
1970
|
+
pending.add(entry);
|
|
1971
|
+
if (callTimeout > 0) timer = setTimeout(() => {
|
|
1972
|
+
entry.reject(new DevframeConnectionError("timeout", `[devframe] RPC call "${method}" timed out after ${callTimeout}ms`));
|
|
1973
|
+
}, callTimeout);
|
|
1974
|
+
promise.then((value) => {
|
|
1975
|
+
if (settled) return;
|
|
1976
|
+
finish();
|
|
1977
|
+
resolve(value);
|
|
1978
|
+
}, (error) => {
|
|
1979
|
+
if (settled) return;
|
|
1980
|
+
finish();
|
|
1981
|
+
const err = error instanceof Error ? error : new Error(String(error));
|
|
1982
|
+
events.emit("rpc:error", err, method);
|
|
1983
|
+
reject(err);
|
|
1984
|
+
});
|
|
1985
|
+
});
|
|
1986
|
+
}
|
|
1906
1987
|
const definitions = /* @__PURE__ */ new Map();
|
|
1907
1988
|
for (const name of connectionMeta.jsonSerializableMethods ?? []) definitions.set(name, { jsonSerializable: true });
|
|
1908
1989
|
const serverRpc = createRpcClient(clientRpc.functions, {
|
|
@@ -1910,7 +1991,21 @@ function createWsRpcClientMode(options) {
|
|
|
1910
1991
|
url,
|
|
1911
1992
|
authToken,
|
|
1912
1993
|
definitions,
|
|
1913
|
-
...wsOptions
|
|
1994
|
+
...wsOptions,
|
|
1995
|
+
onConnected(event) {
|
|
1996
|
+
wsOptions.onConnected?.(event);
|
|
1997
|
+
},
|
|
1998
|
+
onError(error) {
|
|
1999
|
+
setStatus("error", error);
|
|
2000
|
+
events.emit("connection:error", error);
|
|
2001
|
+
rejectAllPending(new DevframeConnectionError("connection", "[devframe] Connection to the devframe server failed", { cause: error }));
|
|
2002
|
+
wsOptions.onError?.(error);
|
|
2003
|
+
},
|
|
2004
|
+
onDisconnected(event) {
|
|
2005
|
+
if (status !== "error") setStatus("disconnected");
|
|
2006
|
+
rejectAllPending(new DevframeConnectionError("connection", "[devframe] Disconnected from the devframe server", { cause: connectionError ?? void 0 }));
|
|
2007
|
+
wsOptions.onDisconnected?.(event);
|
|
2008
|
+
}
|
|
1914
2009
|
}),
|
|
1915
2010
|
rpcOptions
|
|
1916
2011
|
});
|
|
@@ -1919,6 +2014,10 @@ function createWsRpcClientMode(options) {
|
|
|
1919
2014
|
type: "event",
|
|
1920
2015
|
handler: () => {
|
|
1921
2016
|
isTrusted = false;
|
|
2017
|
+
const authError = new DevframeConnectionError("auth", "[devframe] The devframe server revoked this client's trust");
|
|
2018
|
+
setStatus("unauthorized", authError);
|
|
2019
|
+
events.emit("connection:error", authError);
|
|
2020
|
+
rejectAllPending(authError);
|
|
1922
2021
|
events.emit("rpc:is-trusted:updated", false);
|
|
1923
2022
|
}
|
|
1924
2023
|
});
|
|
@@ -1942,7 +2041,14 @@ function createWsRpcClientMode(options) {
|
|
|
1942
2041
|
origin: location.origin
|
|
1943
2042
|
});
|
|
1944
2043
|
isTrusted = result.isTrusted;
|
|
1945
|
-
if (isTrusted)
|
|
2044
|
+
if (isTrusted) {
|
|
2045
|
+
trustedPromise.resolve(true);
|
|
2046
|
+
setStatus("connected");
|
|
2047
|
+
} else {
|
|
2048
|
+
const authError = new DevframeConnectionError("auth", "[devframe] The devframe server refused this client's credentials");
|
|
2049
|
+
setStatus("unauthorized", authError);
|
|
2050
|
+
events.emit("connection:error", authError);
|
|
2051
|
+
}
|
|
1946
2052
|
events.emit("rpc:is-trusted:updated", isTrusted);
|
|
1947
2053
|
return result.isTrusted;
|
|
1948
2054
|
}
|
|
@@ -1956,6 +2062,7 @@ function createWsRpcClientMode(options) {
|
|
|
1956
2062
|
currentAuthToken = token;
|
|
1957
2063
|
isTrusted = true;
|
|
1958
2064
|
trustedPromise.resolve(true);
|
|
2065
|
+
setStatus("connected");
|
|
1959
2066
|
events.emit("rpc:is-trusted:updated", true);
|
|
1960
2067
|
}
|
|
1961
2068
|
return token;
|
|
@@ -1980,18 +2087,41 @@ function createWsRpcClientMode(options) {
|
|
|
1980
2087
|
get isTrusted() {
|
|
1981
2088
|
return isTrusted;
|
|
1982
2089
|
},
|
|
2090
|
+
get status() {
|
|
2091
|
+
return status;
|
|
2092
|
+
},
|
|
2093
|
+
get connectionError() {
|
|
2094
|
+
return connectionError;
|
|
2095
|
+
},
|
|
1983
2096
|
requestTrust,
|
|
1984
2097
|
requestTrustWithToken,
|
|
1985
2098
|
requestTrustWithCode,
|
|
1986
2099
|
ensureTrusted,
|
|
1987
2100
|
call: (...args) => {
|
|
1988
|
-
|
|
2101
|
+
const method = String(args[0]);
|
|
2102
|
+
const failFast = terminalError();
|
|
2103
|
+
if (failFast) {
|
|
2104
|
+
events.emit("rpc:error", failFast, method);
|
|
2105
|
+
return Promise.reject(failFast);
|
|
2106
|
+
}
|
|
2107
|
+
return guardCall(serverRpc.$call(...args), method);
|
|
1989
2108
|
},
|
|
1990
2109
|
callEvent: (...args) => {
|
|
2110
|
+
const failFast = terminalError();
|
|
2111
|
+
if (failFast) {
|
|
2112
|
+
events.emit("rpc:error", failFast, String(args[0]));
|
|
2113
|
+
return;
|
|
2114
|
+
}
|
|
1991
2115
|
return serverRpc.$callEvent(...args);
|
|
1992
2116
|
},
|
|
1993
2117
|
callOptional: (...args) => {
|
|
1994
|
-
|
|
2118
|
+
const method = String(args[0]);
|
|
2119
|
+
const failFast = terminalError();
|
|
2120
|
+
if (failFast) {
|
|
2121
|
+
events.emit("rpc:error", failFast, method);
|
|
2122
|
+
return Promise.reject(failFast);
|
|
2123
|
+
}
|
|
2124
|
+
return guardCall(serverRpc.$callOptional(...args), method);
|
|
1995
2125
|
}
|
|
1996
2126
|
};
|
|
1997
2127
|
}
|
|
@@ -2156,6 +2286,7 @@ async function getDevframeRpcClient(options = {}) {
|
|
|
2156
2286
|
metaBaseUrl: resolveMetaBaseUrl(),
|
|
2157
2287
|
events,
|
|
2158
2288
|
clientRpc,
|
|
2289
|
+
callTimeout: options.callTimeout,
|
|
2159
2290
|
rpcOptions: {
|
|
2160
2291
|
...rpcOptions,
|
|
2161
2292
|
async onRequest(req, next, resolve) {
|
|
@@ -2178,6 +2309,12 @@ async function getDevframeRpcClient(options = {}) {
|
|
|
2178
2309
|
get isTrusted() {
|
|
2179
2310
|
return mode.isTrusted;
|
|
2180
2311
|
},
|
|
2312
|
+
get status() {
|
|
2313
|
+
return mode.status;
|
|
2314
|
+
},
|
|
2315
|
+
get connectionError() {
|
|
2316
|
+
return mode.connectionError;
|
|
2317
|
+
},
|
|
2181
2318
|
connectionMeta,
|
|
2182
2319
|
ensureTrusted: mode.ensureTrusted,
|
|
2183
2320
|
requestTrust: mode.requestTrust,
|
|
@@ -2231,4 +2368,4 @@ async function getDevframeRpcClient(options = {}) {
|
|
|
2231
2368
|
//#region src/client/index.ts
|
|
2232
2369
|
const connectDevframe = getDevframeRpcClient;
|
|
2233
2370
|
//#endregion
|
|
2234
|
-
export { authenticateWithUrlOtp, connectDevframe, consumeOtpFromUrl, createClientSettings, createRpcStreamingClientHost, createScopedClientContext, getDevframeRpcClient, readOtpFromUrl };
|
|
2371
|
+
export { DevframeConnectionError, authenticateWithUrlOtp, connectDevframe, consumeOtpFromUrl, createClientSettings, createRpcStreamingClientHost, createScopedClientContext, getDevframeRpcClient, isCallableStatus, readOtpFromUrl };
|
|
@@ -262,7 +262,7 @@ async function resolveDevServerPort(def, options = {}) {
|
|
|
262
262
|
*
|
|
263
263
|
* Use this directly when integrating devframe into an existing CLI
|
|
264
264
|
* framework (commander, yargs, hand-rolled CAC). For the all-in-one
|
|
265
|
-
* `dev` / `build` / `mcp` shell, reach for {@link
|
|
265
|
+
* `dev` / `build` / `mcp` shell, reach for {@link createCac} instead.
|
|
266
266
|
*/
|
|
267
267
|
async function createDevServer(def, options = {}) {
|
|
268
268
|
const distDir = options.distDir ?? def.cli?.distDir;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { _ as RpcFunctionDefinition } from "./types-
|
|
2
|
-
import { S as RpcFunctionsCollectorBase } from "./index-
|
|
3
|
-
import { t as DevframeNodeRpcSessionMeta } from "./ws-server-
|
|
1
|
+
import { _ as RpcFunctionDefinition } from "./types-oEqKqUC9.mjs";
|
|
2
|
+
import { S as RpcFunctionsCollectorBase } from "./index-DI_TMGjv.mjs";
|
|
3
|
+
import { t as DevframeNodeRpcSessionMeta } from "./ws-server-BUgJpdX4.mjs";
|
|
4
4
|
import { CAC } from "cac";
|
|
5
5
|
import { GenericSchema, InferOutput } from "valibot";
|
|
6
6
|
import { BirpcReturn } from "birpc";
|
|
@@ -1378,7 +1378,7 @@ interface DevframeCliOptions {
|
|
|
1378
1378
|
/**
|
|
1379
1379
|
* Capability-side CAC hook. Called with the CAC instance after the
|
|
1380
1380
|
* adapter registers its built-in commands (`build` / `spa` / `mcp`)
|
|
1381
|
-
* but before `
|
|
1381
|
+
* but before `createCac`'s own `configureCli` caller. Use this to
|
|
1382
1382
|
* contribute tool-specific flags and subcommands from the definition
|
|
1383
1383
|
* itself.
|
|
1384
1384
|
*/
|
|
@@ -1409,6 +1409,44 @@ interface DevframeCliOptions {
|
|
|
1409
1409
|
*/
|
|
1410
1410
|
flags?: CliFlagsSchema;
|
|
1411
1411
|
}
|
|
1412
|
+
/**
|
|
1413
|
+
* Default dock attributes for the iframe entry a hub synthesizes when it
|
|
1414
|
+
* mounts this devframe. Framework-neutral metadata only — the hub layer
|
|
1415
|
+
* (`mountDevframe`) merges these beneath its per-mount `dock` overrides,
|
|
1416
|
+
* which in turn sit beneath the locked, derived `id` / `type` / `url`.
|
|
1417
|
+
*
|
|
1418
|
+
* Every field is optional. `title` / `icon` default to the definition's
|
|
1419
|
+
* `name` / `icon` when omitted here; the rest are unset by default.
|
|
1420
|
+
* Standalone adapters (`cli` / `spa` / `build`) ignore this entirely.
|
|
1421
|
+
*/
|
|
1422
|
+
interface DevframeDockDefaults {
|
|
1423
|
+
/** Dock entry title. Defaults to the definition's `name`. */
|
|
1424
|
+
title?: string;
|
|
1425
|
+
/** Dock entry icon. Defaults to the definition's `icon`. */
|
|
1426
|
+
icon?: string | {
|
|
1427
|
+
light: string;
|
|
1428
|
+
dark: string;
|
|
1429
|
+
};
|
|
1430
|
+
/**
|
|
1431
|
+
* Sort weight within the dock; higher sorts earlier.
|
|
1432
|
+
* @default 0
|
|
1433
|
+
*/
|
|
1434
|
+
defaultOrder?: number;
|
|
1435
|
+
/**
|
|
1436
|
+
* Category the entry groups under in the dock.
|
|
1437
|
+
* @default 'default'
|
|
1438
|
+
*/
|
|
1439
|
+
category?: string;
|
|
1440
|
+
/**
|
|
1441
|
+
* Conditional-visibility expression (same syntax as command `when`
|
|
1442
|
+
* clauses). Set to `'false'` to hide the entry unconditionally.
|
|
1443
|
+
*/
|
|
1444
|
+
when?: string;
|
|
1445
|
+
/** Badge text rendered on the dock icon (e.g. an unread count). */
|
|
1446
|
+
badge?: string;
|
|
1447
|
+
/** Id of the dock group this entry collapses under, if any. */
|
|
1448
|
+
groupId?: string;
|
|
1449
|
+
}
|
|
1412
1450
|
interface DevframeSpaOptions {
|
|
1413
1451
|
base?: string;
|
|
1414
1452
|
/**
|
|
@@ -1428,7 +1466,7 @@ interface DevframeBrowserContext {
|
|
|
1428
1466
|
/**
|
|
1429
1467
|
* Runtime information threaded into `setup(ctx, info)`. Adapters
|
|
1430
1468
|
* populate the fields that make sense for their deployment. In
|
|
1431
|
-
* particular, `
|
|
1469
|
+
* particular, `createCac` fills `flags` with the parsed CAC bag.
|
|
1432
1470
|
*/
|
|
1433
1471
|
interface DevframeSetupInfo {
|
|
1434
1472
|
/** Parsed CLI flags, populated by the CLI adapter. */
|
|
@@ -1449,6 +1487,15 @@ interface DevframeDefinition {
|
|
|
1449
1487
|
light: string;
|
|
1450
1488
|
dark: string;
|
|
1451
1489
|
};
|
|
1490
|
+
/**
|
|
1491
|
+
* Default dock attributes applied when a hub mounts this devframe as an
|
|
1492
|
+
* iframe dock entry. Consulted only by hub adapters (`mountDevframe`),
|
|
1493
|
+
* which merge these beneath the per-mount `dock` overrides; standalone
|
|
1494
|
+
* adapters (`cli` / `spa` / `build`) ignore it.
|
|
1495
|
+
*
|
|
1496
|
+
* @see {@link DevframeDockDefaults}
|
|
1497
|
+
*/
|
|
1498
|
+
dock?: DevframeDockDefaults;
|
|
1452
1499
|
/**
|
|
1453
1500
|
* Mount path override. Defaults depend on the adapter:
|
|
1454
1501
|
* `/` for standalone (`cli` / `spa` / `build`), `/__<id>/` for hosted
|
|
@@ -1478,4 +1525,4 @@ interface DevframeDefinition {
|
|
|
1478
1525
|
}
|
|
1479
1526
|
declare function defineDevframe(d: DevframeDefinition): DevframeDefinition;
|
|
1480
1527
|
//#endregion
|
|
1481
|
-
export {
|
|
1528
|
+
export { ScopedBroadcastOptions as $, StreamSink as A, SharedStateEvents as B, RpcStreamingChannelOptions as C, EventUnsubscribe as Ct, CreateStreamSinkOptions as D, defineCliFlags as Dt, CreateStreamReaderOptions as E, InferCliFlags as Et, ImmutableArray as F, PartialWithoutId as G, SharedStatePatch as H, ImmutableMap as I, DevframeScopedNodeRpc as J, Thenable as K, ImmutableObject as L, createStreamReader as M, createStreamSink as N, StreamErrorPayload as O, parseCliFlags as Ot, Immutable as P, DevframeSettingsStore as Q, ImmutableSet as R, RpcStreamingChannel as S, EventEmitter as St, BufferedChunk as T, CliFlagsSchema as Tt, createSharedState as U, SharedStateOptions as V, EntriesToObject as W, DevframeSettings as X, DevframeScopedStreamingHost as Y, DevframeSettingsRegistry as Z, DevframeNodeRpcSession as _, AgentResourceInput as _t, DevframeDockDefaults as a, DevframeRpcClientFunctions as at, RpcSharedStateGetOptions as b, DevframeAgentHost as bt, DevframeSetupInfo as c, DevframeHost as ct, McpRouteOptions as d, DevframeDiagnosticsHost as dt, ScopedClientFunctions as et, defineDevframe as f, DevframeDiagnosticsLogger as ft, DevframeNodeContext as g, AgentResourceContent as gt, DevframeCapabilities as h, AgentResource as ht, DevframeDeploymentKind as i, DevframeViewHost as it, StreamSinkEvents as j, StreamReader as k, DevframeSpaOptions as l, DevframeDefineDiagnosticsOptions as lt, ConnectionMetaWebsocket as m, AgentManifest as mt, DevframeCliOptions as n, ScopedSharedStates as nt, DevframeDuplicationStrategy as o, DevframeRpcServerFunctions as ot, ConnectionMeta as p, AgentHandle as pt, DevframeScopedNodeContext as q, DevframeDefinition as r, SettingsForNamespace as rt, DevframeRuntime as s, DevframeRpcSharedStates as st, DevframeBrowserContext as t, ScopedServerFunctions as tt, DevframeWsOptions as u, DevframeDiagnosticsDefinition as ut, RpcBroadcastOptions as v, AgentTool as vt, RpcStreamingHost as w, EventsMap as wt, RpcSharedStateHost as x, DevframeAgentHostEvents as xt, RpcFunctionsHost as y, AgentToolInput as yt, SharedState as z };
|
package/dist/helpers/vite.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as DevframeDefinition } from "../devframe-
|
|
1
|
+
import { r as DevframeDefinition } from "../devframe-Dma0XG3U.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/helpers/vite.d.ts
|
|
4
4
|
interface ViteDevBridgeOptions {
|
|
@@ -58,7 +58,7 @@ interface DevframeVitePlugin {
|
|
|
58
58
|
*
|
|
59
59
|
* Use bridge mode when integrating with frameworks that own the SPA
|
|
60
60
|
* (Nuxt, Astro, SolidStart, plain Vite apps). For the all-in-one
|
|
61
|
-
* `dev` / `build` / `mcp` shell, reach for {@link
|
|
61
|
+
* `dev` / `build` / `mcp` shell, reach for {@link createCac} instead.
|
|
62
62
|
*/
|
|
63
63
|
declare function viteDevBridge(d: DevframeDefinition, options?: ViteDevBridgeOptions): DevframeVitePlugin;
|
|
64
64
|
//#endregion
|
package/dist/helpers/vite.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import { DEVFRAME_CONNECTION_META_FILENAME, DEVFRAME_WS_ROUTE } from "../constan
|
|
|
2
2
|
import { a as diagnostics } from "../storage-yrUZaiib.mjs";
|
|
3
3
|
import { n as resolveBasePath, t as normalizeBasePath } from "../_shared-bWRzeSa0.mjs";
|
|
4
4
|
import { serveStaticNodeMiddleware } from "../utils/serve-static.mjs";
|
|
5
|
-
import { n as resolveDevServerPort, t as createDevServer } from "../dev-
|
|
5
|
+
import { n as resolveDevServerPort, t as createDevServer } from "../dev-YeAm6GL0.mjs";
|
|
6
6
|
import { resolve } from "pathe";
|
|
7
7
|
//#region src/helpers/vite.ts
|
|
8
8
|
/**
|
|
@@ -21,7 +21,7 @@ import { resolve } from "pathe";
|
|
|
21
21
|
*
|
|
22
22
|
* Use bridge mode when integrating with frameworks that own the SPA
|
|
23
23
|
* (Nuxt, Astro, SolidStart, plain Vite apps). For the all-in-one
|
|
24
|
-
* `dev` / `build` / `mcp` shell, reach for {@link
|
|
24
|
+
* `dev` / `build` / `mcp` shell, reach for {@link createCac} instead.
|
|
25
25
|
*/
|
|
26
26
|
function viteDevBridge(d, options = {}) {
|
|
27
27
|
const base = normalizeMountBase(options.base ?? resolveBasePath(d, "hosted"));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h as RpcDumpStore, l as RpcDumpClientOptions, m as RpcDumpRecordError, n as BirpcReturn, o as RpcDefinitionsToFunctions, u as RpcDumpCollectionOptions, v as RpcFunctionDefinitionAny } from "./types-
|
|
1
|
+
import { h as RpcDumpStore, l as RpcDumpClientOptions, m as RpcDumpRecordError, n as BirpcReturn, o as RpcDefinitionsToFunctions, u as RpcDumpCollectionOptions, v as RpcFunctionDefinitionAny } from "./types-oEqKqUC9.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/rpc/dump/static.d.ts
|
|
4
4
|
type StaticRpcDumpSerialization = 'json' | 'structured-clone';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as RpcFunctionType, S as RpcFunctionSetupResult, T as RpcReturnSchema, _ as RpcFunctionDefinition, i as RpcArgsSchema, v as RpcFunctionDefinitionAny, w as RpcFunctionsCollector } from "./types-
|
|
2
|
-
import { a as getDefinitionsWithDumps$1, c as StaticRpcDumpManifest$1, d as StaticRpcDumpManifestValue$1, f as StaticRpcDumpSerialization$1, i as dumpFunctions$1, l as StaticRpcDumpManifestQueryEntry$1, n as serializeDumpError$1, o as StaticRpcDumpCollection$1, p as collectStaticRpcDump$1, r as createClientFromDump$1, s as StaticRpcDumpFile$1, t as reviveDumpError$1, u as StaticRpcDumpManifestStaticEntry$1 } from "./index-
|
|
1
|
+
import { C as RpcFunctionType, S as RpcFunctionSetupResult, T as RpcReturnSchema, _ as RpcFunctionDefinition, i as RpcArgsSchema, v as RpcFunctionDefinitionAny, w as RpcFunctionsCollector } from "./types-oEqKqUC9.mjs";
|
|
2
|
+
import { a as getDefinitionsWithDumps$1, c as StaticRpcDumpManifest$1, d as StaticRpcDumpManifestValue$1, f as StaticRpcDumpSerialization$1, i as dumpFunctions$1, l as StaticRpcDumpManifestQueryEntry$1, n as serializeDumpError$1, o as StaticRpcDumpCollection$1, p as collectStaticRpcDump$1, r as createClientFromDump$1, s as StaticRpcDumpFile$1, t as reviveDumpError$1, u as StaticRpcDumpManifestStaticEntry$1 } from "./index-BAZpbgHu.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/rpc/cache.d.ts
|
|
5
5
|
interface RpcCacheOptions {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { v as RpcFunctionDefinitionAny } from "./types-
|
|
3
|
-
import { n as InternalAnonymousAuthStorage } from "./context-
|
|
1
|
+
import { _ as DevframeNodeRpcSession, g as DevframeNodeContext, z as SharedState } from "./devframe-Dma0XG3U.mjs";
|
|
2
|
+
import { v as RpcFunctionDefinitionAny } from "./types-oEqKqUC9.mjs";
|
|
3
|
+
import { n as InternalAnonymousAuthStorage } from "./context-BsiCAEC4.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
|
|
2
|
-
import { C as RpcFunctionType, T as RpcReturnSchema, _ as RpcFunctionDefinition, g as RpcFunctionAgentOptions, i as RpcArgsSchema } from "./types-
|
|
3
|
-
import { t as DevframeNodeRpcSessionMeta } from "./ws-server-
|
|
1
|
+
import { $ as ScopedBroadcastOptions, C as RpcStreamingChannelOptions, Ct as EventUnsubscribe, G as PartialWithoutId, J as DevframeScopedNodeRpc, K as Thenable, Q as DevframeSettingsStore, S as RpcStreamingChannel, St as EventEmitter, W as EntriesToObject, X as DevframeSettings, Y as DevframeScopedStreamingHost, Z as DevframeSettingsRegistry, _ as DevframeNodeRpcSession, _t as AgentResourceInput, a as DevframeDockDefaults, at as DevframeRpcClientFunctions, b as RpcSharedStateGetOptions, bt as DevframeAgentHost, c as DevframeSetupInfo, ct as DevframeHost, d as McpRouteOptions, dt as DevframeDiagnosticsHost, et as ScopedClientFunctions, f as defineDevframe, ft as DevframeDiagnosticsLogger, g as DevframeNodeContext, gt as AgentResourceContent, h as DevframeCapabilities, ht as AgentResource, i as DevframeDeploymentKind, it as DevframeViewHost, l as DevframeSpaOptions, lt as DevframeDefineDiagnosticsOptions, m as ConnectionMetaWebsocket, mt as AgentManifest, n as DevframeCliOptions, nt as ScopedSharedStates, o as DevframeDuplicationStrategy, ot as DevframeRpcServerFunctions, p as ConnectionMeta, pt as AgentHandle, q as DevframeScopedNodeContext, r as DevframeDefinition, rt as SettingsForNamespace, s as DevframeRuntime, st as DevframeRpcSharedStates, t as DevframeBrowserContext, tt as ScopedServerFunctions, u as DevframeWsOptions, ut as DevframeDiagnosticsDefinition, v as RpcBroadcastOptions, vt as AgentTool, w as RpcStreamingHost, wt as EventsMap, x as RpcSharedStateHost, xt as DevframeAgentHostEvents, y as RpcFunctionsHost, yt as AgentToolInput } from "./devframe-Dma0XG3U.mjs";
|
|
2
|
+
import { C as RpcFunctionType, T as RpcReturnSchema, _ as RpcFunctionDefinition, g as RpcFunctionAgentOptions, i as RpcArgsSchema } from "./types-oEqKqUC9.mjs";
|
|
3
|
+
import { t as DevframeNodeRpcSessionMeta } from "./ws-server-BUgJpdX4.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 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 };
|
|
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 DevframeDockDefaults, 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 };
|
package/dist/node/auth.d.mts
CHANGED
|
@@ -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-
|
|
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-d40ZLcYw.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-
|
|
2
|
-
import { a as internalContextMap, i as getInternalContext, n as InternalAnonymousAuthStorage, r as RemoteTokenRecord, t as DevframeInternalContext } from "../context-
|
|
1
|
+
import { i as DevframeDeploymentKind, r as DevframeDefinition } from "../devframe-Dma0XG3U.mjs";
|
|
2
|
+
import { a as internalContextMap, i as getInternalContext, n as InternalAnonymousAuthStorage, r as RemoteTokenRecord, t as DevframeInternalContext } from "../context-BsiCAEC4.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/adapters/_shared.d.ts
|
|
5
5
|
/**
|
package/dist/node/index.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { v as RpcFunctionDefinitionAny } from "../types-
|
|
3
|
-
import { S as RpcFunctionsCollectorBase } from "../index-
|
|
4
|
-
import { t as DevframeNodeRpcSessionMeta } from "../ws-server-
|
|
5
|
-
import { n as StartedServer, r as startHttpAndWs, t as StartHttpAndWsOptions } from "../server-
|
|
1
|
+
import { St as EventEmitter, X as DevframeSettings, _ as DevframeNodeRpcSession, _t as AgentResourceInput, at as DevframeRpcClientFunctions, bt as DevframeAgentHost$1, ct as DevframeHost, dt as DevframeDiagnosticsHost$1, ft as DevframeDiagnosticsLogger, g as DevframeNodeContext, gt as AgentResourceContent, ht as AgentResource, it as DevframeViewHost$1, mt as AgentManifest, ot as DevframeRpcServerFunctions, pt as AgentHandle, q as DevframeScopedNodeContext, v as RpcBroadcastOptions, vt as AgentTool, w as RpcStreamingHost, x as RpcSharedStateHost, xt as DevframeAgentHostEvents, y as RpcFunctionsHost$1, yt as AgentToolInput, z as SharedState } from "../devframe-Dma0XG3U.mjs";
|
|
2
|
+
import { v as RpcFunctionDefinitionAny } from "../types-oEqKqUC9.mjs";
|
|
3
|
+
import { S as RpcFunctionsCollectorBase } from "../index-DI_TMGjv.mjs";
|
|
4
|
+
import { t as DevframeNodeRpcSessionMeta } from "../ws-server-BUgJpdX4.mjs";
|
|
5
|
+
import { n as StartedServer, r as startHttpAndWs, t as StartHttpAndWsOptions } from "../server-BD-tKDVf.mjs";
|
|
6
6
|
import { BirpcGroup } from "birpc";
|
|
7
7
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
8
8
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { c as DevframeAuthHandler } from "../index-
|
|
1
|
+
import { g as DevframeNodeContext } from "../devframe-Dma0XG3U.mjs";
|
|
2
|
+
import { c as DevframeAuthHandler } from "../index-d40ZLcYw.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/recipes/interactive-auth.d.ts
|
|
5
5
|
interface CreateInteractiveAuthOptions {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { E as Thenable, S as RpcFunctionSetupResult, c as RpcDump, g as RpcFunctionAgentOptions } from "../types-
|
|
1
|
+
import { E as Thenable, S as RpcFunctionSetupResult, c as RpcDump, g as RpcFunctionAgentOptions } from "../types-oEqKqUC9.mjs";
|
|
2
2
|
import * as v from "valibot";
|
|
3
3
|
|
|
4
4
|
//#region src/recipes/open-helpers.d.ts
|
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-BAZpbgHu.mjs";
|
|
2
2
|
export { StaticRpcDumpCollection, StaticRpcDumpFile, StaticRpcDumpManifest, StaticRpcDumpManifestQueryEntry, StaticRpcDumpManifestStaticEntry, StaticRpcDumpManifestValue, StaticRpcDumpSerialization, collectStaticRpcDump, createClientFromDump, dumpFunctions, getDefinitionsWithDumps, reviveDumpError, serializeDumpError };
|
package/dist/rpc/index.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { C as RpcFunctionType, E as Thenable, S as RpcFunctionSetupResult, T as RpcReturnSchema, _ as RpcFunctionDefinition, a as RpcDefinitionsFilter, b as RpcFunctionDefinitionBase, c as RpcDump, d as RpcDumpDefinition, f as RpcDumpGetter, g as RpcFunctionAgentOptions, h as RpcDumpStore, i as RpcArgsSchema, l as RpcDumpClientOptions, m as RpcDumpRecordError, n as BirpcReturn, o as RpcDefinitionsToFunctions, p as RpcDumpRecord, r as EntriesToObject, s as RpcDefinitionsToFunctionsWithNamespace, t as BirpcFn, u as RpcDumpCollectionOptions, v as RpcFunctionDefinitionAny, w as RpcFunctionsCollector, x as RpcFunctionDefinitionToFunction, y as RpcFunctionDefinitionAnyWithContext } from "../types-
|
|
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 RpcFunctionType, E as Thenable, S as RpcFunctionSetupResult, T as RpcReturnSchema, _ as RpcFunctionDefinition, a as RpcDefinitionsFilter, b as RpcFunctionDefinitionBase, c as RpcDump, d as RpcDumpDefinition, f as RpcDumpGetter, g as RpcFunctionAgentOptions, h as RpcDumpStore, i as RpcArgsSchema, l as RpcDumpClientOptions, m as RpcDumpRecordError, n as BirpcReturn, o as RpcDefinitionsToFunctions, p as RpcDumpRecord, r as EntriesToObject, s as RpcDefinitionsToFunctionsWithNamespace, t as BirpcFn, u as RpcDumpCollectionOptions, v as RpcFunctionDefinitionAny, w as RpcFunctionsCollector, x as RpcFunctionDefinitionToFunction, y as RpcFunctionDefinitionAnyWithContext } from "../types-oEqKqUC9.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-DI_TMGjv.mjs";
|
|
3
3
|
export { type BirpcFn, type BirpcReturn, EntriesToObject, RpcArgsSchema, RpcCacheManager, RpcCacheOptions, RpcDefinitionsFilter, RpcDefinitionsToFunctions, RpcDefinitionsToFunctionsWithNamespace, RpcDump, RpcDumpClientOptions, RpcDumpCollectionOptions, RpcDumpDefinition, RpcDumpGetter, RpcDumpRecord, RpcDumpRecordError, RpcDumpStore, RpcFunctionAgentOptions, RpcFunctionDefinition, RpcFunctionDefinitionAny, RpcFunctionDefinitionAnyWithContext, RpcFunctionDefinitionBase, RpcFunctionDefinitionToFunction, RpcFunctionSetupResult, RpcFunctionType, RpcFunctionsCollector, RpcFunctionsCollectorBase, RpcReturnSchema, STRUCTURED_CLONE_PREFIX, StaticRpcDumpCollection, StaticRpcDumpFile, StaticRpcDumpManifest, StaticRpcDumpManifestQueryEntry, StaticRpcDumpManifestStaticEntry, StaticRpcDumpManifestValue, StaticRpcDumpSerialization, Thenable, collectStaticRpcDump, createClientFromDump, createDefineWrapperWithContext, defineRpcFunction, dumpFunctions, getDefinitionsWithDumps, getRpcHandler, getRpcResolvedSetupResult, reviveDumpError, serializeDumpError, strictJsonStringify, validateDefinition, validateDefinitions };
|
|
@@ -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-nBjpin71.mjs";
|
|
2
2
|
export { WsRpcChannelOptions, createWsRpcChannel };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as isAllowedOrigin, i as attachWsRpcTransport, n as WsRpcTransport, o as isLoopbackHostname, r as WsRpcTransportOptions, t as DevframeNodeRpcSessionMeta } from "../../ws-server-
|
|
1
|
+
import { a as isAllowedOrigin, i as attachWsRpcTransport, n as WsRpcTransport, o as isLoopbackHostname, r as WsRpcTransportOptions, t as DevframeNodeRpcSessionMeta } from "../../ws-server-BUgJpdX4.mjs";
|
|
2
2
|
export { DevframeNodeRpcSessionMeta, WsRpcTransport, WsRpcTransportOptions, attachWsRpcTransport, isAllowedOrigin, isLoopbackHostname };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { c as DevframeAuthHandler } from "./index-
|
|
1
|
+
import { _ as DevframeNodeRpcSession, at as DevframeRpcClientFunctions, g as DevframeNodeContext, ot as DevframeRpcServerFunctions, p as ConnectionMeta } from "./devframe-Dma0XG3U.mjs";
|
|
2
|
+
import { c as DevframeAuthHandler } from "./index-d40ZLcYw.mjs";
|
|
3
3
|
import { BirpcGroup, EventOptions } from "birpc";
|
|
4
4
|
import { Peer } from "crossws";
|
|
5
5
|
import { NodeAdapter } from "crossws/adapters/node";
|
package/dist/types/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as
|
|
2
|
-
import { g as RpcFunctionAgentOptions } from "../types-
|
|
3
|
-
import { t as DevframeNodeRpcSessionMeta } from "../ws-server-
|
|
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
|
+
import { $ as ScopedBroadcastOptions, C as RpcStreamingChannelOptions, Ct as EventUnsubscribe, G as PartialWithoutId, J as DevframeScopedNodeRpc, K as Thenable, Q as DevframeSettingsStore, S as RpcStreamingChannel, St as EventEmitter, W as EntriesToObject, X as DevframeSettings, Y as DevframeScopedStreamingHost, Z as DevframeSettingsRegistry, _ as DevframeNodeRpcSession, _t as AgentResourceInput, a as DevframeDockDefaults, at as DevframeRpcClientFunctions, b as RpcSharedStateGetOptions, bt as DevframeAgentHost, c as DevframeSetupInfo, ct as DevframeHost, d as McpRouteOptions, dt as DevframeDiagnosticsHost, et as ScopedClientFunctions, f as defineDevframe, ft as DevframeDiagnosticsLogger, g as DevframeNodeContext, gt as AgentResourceContent, h as DevframeCapabilities, ht as AgentResource, i as DevframeDeploymentKind, it as DevframeViewHost, l as DevframeSpaOptions, lt as DevframeDefineDiagnosticsOptions, m as ConnectionMetaWebsocket, mt as AgentManifest, n as DevframeCliOptions, nt as ScopedSharedStates, o as DevframeDuplicationStrategy, ot as DevframeRpcServerFunctions, p as ConnectionMeta, pt as AgentHandle, q as DevframeScopedNodeContext, r as DevframeDefinition, rt as SettingsForNamespace, s as DevframeRuntime, st as DevframeRpcSharedStates, t as DevframeBrowserContext, tt as ScopedServerFunctions, u as DevframeWsOptions, ut as DevframeDiagnosticsDefinition, v as RpcBroadcastOptions, vt as AgentTool, w as RpcStreamingHost, wt as EventsMap, x as RpcSharedStateHost, xt as DevframeAgentHostEvents, y as RpcFunctionsHost, yt as AgentToolInput } from "../devframe-Dma0XG3U.mjs";
|
|
2
|
+
import { g as RpcFunctionAgentOptions } from "../types-oEqKqUC9.mjs";
|
|
3
|
+
import { t as DevframeNodeRpcSessionMeta } from "../ws-server-BUgJpdX4.mjs";
|
|
4
|
+
export { AgentHandle, AgentManifest, AgentResource, AgentResourceContent, AgentResourceInput, AgentTool, AgentToolInput, ConnectionMeta, ConnectionMetaWebsocket, DevframeAgentHost, DevframeAgentHostEvents, DevframeBrowserContext, DevframeCapabilities, DevframeCliOptions, DevframeDefineDiagnosticsOptions, DevframeDefinition, DevframeDeploymentKind, DevframeDiagnosticsDefinition, DevframeDiagnosticsHost, DevframeDiagnosticsLogger, DevframeDockDefaults, 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 };
|
|
@@ -74,10 +74,10 @@ interface RpcFunctionsCollector<LocalFunctions, SetupContext = undefined> {
|
|
|
74
74
|
readonly functions: LocalFunctions;
|
|
75
75
|
/** Map of registered function definitions keyed by function name */
|
|
76
76
|
readonly definitions: Map<string, RpcFunctionDefinitionAnyWithContext<SetupContext>>;
|
|
77
|
-
/** Register a new function definition */
|
|
78
|
-
register: (fn: RpcFunctionDefinitionAnyWithContext<SetupContext
|
|
79
|
-
/** Update an existing function definition */
|
|
80
|
-
update: (fn: RpcFunctionDefinitionAnyWithContext<SetupContext
|
|
77
|
+
/** Register a new function definition. Pass `force` to overwrite an existing one. */
|
|
78
|
+
register: (fn: RpcFunctionDefinitionAnyWithContext<SetupContext>, force?: boolean) => void;
|
|
79
|
+
/** Update an existing function definition. Pass `force` to register it if it doesn't exist yet. */
|
|
80
|
+
update: (fn: RpcFunctionDefinitionAnyWithContext<SetupContext>, force?: boolean) => void;
|
|
81
81
|
/** Subscribe to function changes, returns unsubscribe function */
|
|
82
82
|
onChanged: (fn: (id?: string) => void) => (() => void);
|
|
83
83
|
}
|
package/dist/utils/events.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { B as
|
|
1
|
+
import { B as SharedStateEvents, F as ImmutableArray, H as SharedStatePatch, I as ImmutableMap, L as ImmutableObject, P as Immutable, R as ImmutableSet, U as createSharedState, V as SharedStateOptions, z as SharedState } from "../devframe-Dma0XG3U.mjs";
|
|
2
2
|
export { Immutable, ImmutableArray, ImmutableMap, ImmutableObject, ImmutableSet, SharedState, SharedStateEvents, SharedStateOptions, SharedStatePatch, createSharedState };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as
|
|
1
|
+
import { A as StreamSink, D as CreateStreamSinkOptions, E as CreateStreamReaderOptions, M as createStreamReader, N as createStreamSink, O as StreamErrorPayload, T as BufferedChunk, j as StreamSinkEvents, k as StreamReader } from "../devframe-Dma0XG3U.mjs";
|
|
2
2
|
export { BufferedChunk, CreateStreamReaderOptions, CreateStreamSinkOptions, StreamErrorPayload, StreamReader, StreamSink, StreamSinkEvents, createStreamReader, createStreamSink };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { v as RpcFunctionDefinitionAny } from "./types-
|
|
1
|
+
import { v as RpcFunctionDefinitionAny } from "./types-oEqKqUC9.mjs";
|
|
2
2
|
import { BirpcGroup, ChannelOptions } from "birpc";
|
|
3
3
|
import { Peer } from "crossws";
|
|
4
4
|
import { NodeAdapter } from "crossws/adapters/node";
|