devframe 0.9.18 → 0.9.19
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-CkLpdx6I.d.mts → _shared-BIUet_Jh.d.mts} +1 -1
- package/dist/adapters/build.d.mts +1 -1
- package/dist/adapters/build.mjs +3 -3
- package/dist/adapters/cac.d.mts +1 -1
- package/dist/adapters/cac.mjs +1 -1
- package/dist/adapters/dev.d.mts +4 -4
- package/dist/adapters/dev.mjs +1 -1
- package/dist/adapters/embedded.d.mts +1 -1
- package/dist/adapters/initiate.d.mts +3 -3
- package/dist/adapters/initiate.mjs +1 -1
- package/dist/adapters/mcp.d.mts +1 -1
- package/dist/adapters/mcp.mjs +1 -1
- package/dist/client/index.d.mts +5 -5
- package/dist/client/index.mjs +66 -54
- package/dist/{context-3y_PeZKl.d.mts → context-BA5FPz7K.d.mts} +1 -1
- package/dist/{context-DLzIyQCZ.d.mts → context-BLHBDQcZ.d.mts} +2 -2
- package/dist/{context-Cdj9z9m2.mjs → context-BLXXjoBW.mjs} +3 -3
- package/dist/{dev-DpfkCVqo.mjs → dev-DbWecpjA.mjs} +2 -2
- package/dist/{host-agent-CKqSTEX9.mjs → host-agent-C3MBpNCd.mjs} +30 -31
- package/dist/in-page-channel/index.d.mts +4 -4
- package/dist/in-page-channel/index.mjs +6 -6
- package/dist/{index-pIVt92jP.d.mts → index-CiA6C705.d.mts} +2 -2
- package/dist/{index-Ces7aTOQ.d.mts → index-r6NstVmM.d.mts} +2 -2
- package/dist/index.d.mts +3 -3
- package/dist/{instance-shell-BQXr8n68.d.mts → instance-shell-C6Vg97lg.d.mts} +3 -3
- package/dist/internal/index.d.mts +13 -33
- package/dist/internal/index.mjs +3 -3
- package/dist/node/auth.d.mts +2 -2
- package/dist/node/hub-internals.d.mts +2 -2
- package/dist/node/index.d.mts +3 -3
- package/dist/node/index.mjs +1 -1
- package/dist/recipes/common-rpc-functions.d.mts +5 -62
- package/dist/recipes/interactive-auth.d.mts +2 -2
- package/dist/{remote-assets-DMFzLSoH.mjs → remote-assets-D0StJVLp.mjs} +17 -16
- package/dist/rpc/dump.d.mts +1 -1
- package/dist/rpc/dump.mjs +1 -1
- package/dist/rpc/index.d.mts +3 -3
- package/dist/rpc/index.mjs +8 -11
- package/dist/rpc/transports/sse-client.d.mts +1 -1
- package/dist/rpc/transports/sse-client.mjs +1 -1
- package/dist/rpc/transports/sse-server.d.mts +2 -2
- package/dist/rpc/transports/sse-server.mjs +1 -1
- package/dist/rpc/transports/ws-bun.d.mts +2 -2
- package/dist/rpc/transports/ws-client.d.mts +1 -1
- package/dist/rpc/transports/ws-client.mjs +1 -1
- package/dist/rpc/transports/ws-deno.d.mts +2 -2
- package/dist/rpc/transports/ws-server.d.mts +1 -1
- package/dist/rpc/transports/ws-server.mjs +1 -1
- package/dist/{rpc-core-Clo3kHfo.d.mts → rpc-core-BlL-Ip8n.d.mts} +3 -3
- package/dist/{serialization-DFg5sUt6.mjs → serialization-BhuOoL80.mjs} +2 -2
- package/dist/{sse-client-BQ4jS3eO.d.mts → sse-client-BcbYwXdD.d.mts} +1 -1
- package/dist/types/index.d.mts +2 -2
- package/dist/{types-Dq4i156u.d.mts → types-D2vGd7-2.d.mts} +52 -113
- package/dist/utils/events.d.mts +1 -1
- package/dist/utils/remote-assets.mjs +1 -1
- package/dist/utils/shared-state.d.mts +1 -1
- package/dist/utils/streaming-channel.d.mts +1 -1
- package/dist/{validation-CfV1s0SF.mjs → validation-BzxTTYaV.mjs} +15 -2
- package/dist/{wire-codec-BHGt0sSs.mjs → wire-codec-B1W3zH3L.mjs} +1 -1
- package/dist/{write-D2AJqVT8.mjs → write-DoXJzGUH.mjs} +3 -2
- package/dist/{ws-client-Xpxt0oPA.d.mts → ws-client-CNpP6Ium.d.mts} +1 -1
- package/dist/{ws-server-9ztvkeJ0.d.mts → ws-server-BB8jhxeT.d.mts} +1 -1
- package/package.json +3 -3
- package/skills/devframe/SKILL.md +1 -1
|
@@ -149,28 +149,47 @@ type RpcDumpGetter<ARGS extends any[] = any[], RETURN = any, CONTEXT = any> = (c
|
|
|
149
149
|
* Dump configuration (static object or dynamic function).
|
|
150
150
|
*/
|
|
151
151
|
type RpcDump<ARGS extends any[] = any[], RETURN = any, CONTEXT = any> = RpcDumpDefinition<ARGS, RETURN> | RpcDumpGetter<ARGS, RETURN, CONTEXT>;
|
|
152
|
-
/**
|
|
153
|
-
|
|
154
|
-
*/
|
|
155
|
-
interface RpcFunctionDefinitionBase {
|
|
152
|
+
/** Shared fields for an RPC function definition. */
|
|
153
|
+
interface RpcFunctionDefinitionBase<NAME extends string = string, TYPE extends RpcFunctionType = RpcFunctionType, ARGS extends any[] = any[], RETURN = any, CONTEXT = any> {
|
|
156
154
|
/** Function name (unique identifier) */
|
|
157
|
-
name:
|
|
155
|
+
name: NAME;
|
|
158
156
|
/** Function type (static, action, event, or query) */
|
|
159
|
-
type?:
|
|
157
|
+
type?: TYPE;
|
|
158
|
+
/** Whether the function results should be cached */
|
|
159
|
+
cacheable?: boolean;
|
|
160
160
|
/**
|
|
161
|
-
*
|
|
162
|
-
* i.e. no `Map`, `Set`, `Date`, `BigInt`, class instances, circular
|
|
163
|
-
* references, `undefined` leaves, `Symbol`, or `Function` values.
|
|
161
|
+
* Selects the serialization format for arguments and return values.
|
|
164
162
|
*
|
|
165
|
-
* - `true`:
|
|
166
|
-
*
|
|
167
|
-
*
|
|
168
|
-
*
|
|
169
|
-
* - `false` (default): payloads use `structured-clone-es`, which
|
|
170
|
-
* round-trips Maps/Sets/cycles. Functions in this mode cannot be
|
|
171
|
-
* exposed via the `agent` field; registration throws `DF0018`.
|
|
163
|
+
* - `true`: uses strict JSON encoding (default when `agent` is set).
|
|
164
|
+
* - `false` (default otherwise): uses structured-clone encoding and supports values
|
|
165
|
+
* such as `Map`, `Set`, `Date`, and cycles. Functions using this mode
|
|
166
|
+
* cannot be agent-exposed.
|
|
172
167
|
*/
|
|
173
168
|
jsonSerializable?: boolean;
|
|
169
|
+
/**
|
|
170
|
+
* Expose this function to agents (e.g. via the MCP adapter).
|
|
171
|
+
* When omitted, the function is not agent-exposed (default-deny).
|
|
172
|
+
*/
|
|
173
|
+
agent?: RpcFunctionAgentOptions;
|
|
174
|
+
/** Setup function called with context to initialize handler and dump */
|
|
175
|
+
setup?: (context: CONTEXT) => Thenable<RpcFunctionSetupResult<ARGS, RETURN>>;
|
|
176
|
+
/** Function implementation (required if setup doesn't provide one) */
|
|
177
|
+
handler?: (...args: ARGS) => RETURN;
|
|
178
|
+
/** Dump definition (setup dump takes priority) */
|
|
179
|
+
dump?: RpcDump<ARGS, RETURN, CONTEXT>;
|
|
180
|
+
/**
|
|
181
|
+
* Sugar for "query in dev, single baked snapshot in build": when
|
|
182
|
+
* `true` and no `dump` is provided, the build adapter runs the
|
|
183
|
+
* handler once with no arguments and stores the result as both a
|
|
184
|
+
* no-args record and the fallback so any call variant resolves
|
|
185
|
+
* to the same snapshot. Only valid on `query` (or untyped)
|
|
186
|
+
* functions; `static` already has equivalent default behavior.
|
|
187
|
+
*/
|
|
188
|
+
snapshot?: boolean;
|
|
189
|
+
/** Per-context setup-result cache, populated by `getRpcResolvedSetupResult`. @internal */
|
|
190
|
+
__cache?: WeakMap<object, Thenable<RpcFunctionSetupResult<ARGS, RETURN>>>;
|
|
191
|
+
/** Single-slot fallback for primitive contexts. @internal */
|
|
192
|
+
__promise?: Thenable<RpcFunctionSetupResult<ARGS, RETURN>>;
|
|
174
193
|
}
|
|
175
194
|
/**
|
|
176
195
|
* Dump store containing pre-computed results.
|
|
@@ -178,12 +197,26 @@ interface RpcFunctionDefinitionBase {
|
|
|
178
197
|
*/
|
|
179
198
|
interface RpcDumpStore<T = any> {
|
|
180
199
|
/** Function definitions keyed by name */
|
|
181
|
-
definitions: Record<string, RpcFunctionDefinitionBase
|
|
200
|
+
definitions: Record<string, Pick<RpcFunctionDefinitionBase, 'name' | 'type'>>;
|
|
182
201
|
/** Records keyed by '<function-name>---<hash>' or '<function-name>---fallback' */
|
|
183
202
|
records: Record<string, RpcDumpRecord | (() => Promise<RpcDumpRecord>)>;
|
|
184
203
|
/** @internal */
|
|
185
204
|
_functions?: T;
|
|
186
205
|
}
|
|
206
|
+
/** RPC function definition whose handler supplies its argument and return types. */
|
|
207
|
+
interface RpcFunctionDefinitionWithoutSchemas<NAME extends string, TYPE extends RpcFunctionType, ARGS extends any[], RETURN, AS extends RpcArgsSchema | undefined, RS extends RpcReturnSchema | undefined, CONTEXT> extends RpcFunctionDefinitionBase<NAME, TYPE, ARGS, RETURN, CONTEXT> {
|
|
208
|
+
/** Standard Schema array validating (and typing) the arguments */
|
|
209
|
+
args?: AS;
|
|
210
|
+
/** Standard Schema validating (and typing) the return value */
|
|
211
|
+
returns?: RS;
|
|
212
|
+
}
|
|
213
|
+
/** RPC function definition whose argument and return types come from schemas. */
|
|
214
|
+
interface RpcFunctionDefinitionWithSchemas<NAME extends string, TYPE extends RpcFunctionType, AS extends RpcArgsSchema | undefined, RS extends RpcReturnSchema | undefined, CONTEXT> extends RpcFunctionDefinitionBase<NAME, TYPE, InferArgsType<AS>, Thenable<InferReturnType<RS>>, CONTEXT> {
|
|
215
|
+
/** Standard Schema array validating (and typing) the arguments */
|
|
216
|
+
args: AS;
|
|
217
|
+
/** Standard Schema validating (and typing) the resolved return value */
|
|
218
|
+
returns: RS;
|
|
219
|
+
}
|
|
187
220
|
/**
|
|
188
221
|
* Dump client options.
|
|
189
222
|
*/
|
|
@@ -206,101 +239,7 @@ interface RpcDumpCollectionOptions {
|
|
|
206
239
|
/**
|
|
207
240
|
* RPC function definition with optional dump support.
|
|
208
241
|
*/
|
|
209
|
-
type RpcFunctionDefinition<NAME extends string, TYPE extends RpcFunctionType = 'query', ARGS extends any[] = [], RETURN = void, AS extends RpcArgsSchema | undefined = undefined, RS extends RpcReturnSchema | undefined = undefined, CONTEXT = undefined> = [AS, RS] extends [undefined, undefined] ?
|
|
210
|
-
/** Function name (unique identifier) */
|
|
211
|
-
name: NAME;
|
|
212
|
-
/** Function type (static, action, event, or query) */
|
|
213
|
-
type?: TYPE;
|
|
214
|
-
/** Whether the function results should be cached */
|
|
215
|
-
cacheable?: boolean;
|
|
216
|
-
/** Standard Schema array validating (and typing) the arguments */
|
|
217
|
-
args?: AS;
|
|
218
|
-
/** Standard Schema validating (and typing) the return value */
|
|
219
|
-
returns?: RS;
|
|
220
|
-
/**
|
|
221
|
-
* Declares whether this function's args/return are JSON-serializable
|
|
222
|
-
* (no Map/Set/Date/BigInt/cycles/class instances/undefined/Symbol/Function).
|
|
223
|
-
*
|
|
224
|
-
* - `true`: wire and dump use strict `JSON.stringify`; misshapen
|
|
225
|
-
* values throw `DF0019` at the call site. Required for `agent`.
|
|
226
|
-
* - `false` (default): `structured-clone-es` round-trips fancy
|
|
227
|
-
* types. Cannot be `agent`-exposed (registration throws `DF0018`).
|
|
228
|
-
*/
|
|
229
|
-
jsonSerializable?: boolean;
|
|
230
|
-
/**
|
|
231
|
-
* Expose this function to agents (e.g. via the MCP adapter).
|
|
232
|
-
* When omitted, the function is not agent-exposed (default-deny).
|
|
233
|
-
*/
|
|
234
|
-
agent?: RpcFunctionAgentOptions;
|
|
235
|
-
/** Setup function called with context to initialize handler and dump */
|
|
236
|
-
setup?: (context: CONTEXT) => Thenable<RpcFunctionSetupResult<ARGS, RETURN>>;
|
|
237
|
-
/** Function implementation (required if setup doesn't provide one) */
|
|
238
|
-
handler?: (...args: ARGS) => RETURN;
|
|
239
|
-
/** Dump definition (setup dump takes priority) */
|
|
240
|
-
dump?: RpcDump<ARGS, RETURN, CONTEXT>;
|
|
241
|
-
/**
|
|
242
|
-
* Sugar for "query in dev, single baked snapshot in build": when
|
|
243
|
-
* `true` and no `dump` is provided, the build adapter runs the
|
|
244
|
-
* handler once with no arguments and stores the result as both a
|
|
245
|
-
* no-args record and the fallback so any call variant resolves
|
|
246
|
-
* to the same snapshot. Only valid on `query` (or untyped)
|
|
247
|
-
* functions; `static` already has equivalent default behavior.
|
|
248
|
-
*/
|
|
249
|
-
snapshot?: boolean;
|
|
250
|
-
/** Per-context setup-result cache, populated by `getRpcResolvedSetupResult`. @internal */
|
|
251
|
-
__cache?: WeakMap<object, Thenable<RpcFunctionSetupResult<ARGS, RETURN>>>;
|
|
252
|
-
/** Single-slot fallback for primitive contexts. @internal */
|
|
253
|
-
__promise?: Thenable<RpcFunctionSetupResult<ARGS, RETURN>>;
|
|
254
|
-
} : {
|
|
255
|
-
/** Function name (unique identifier) */
|
|
256
|
-
name: NAME;
|
|
257
|
-
/** Function type (static, action, event, or query) */
|
|
258
|
-
type?: TYPE;
|
|
259
|
-
/** Whether the function results should be cached */
|
|
260
|
-
cacheable?: boolean;
|
|
261
|
-
/** Standard Schema array validating (and typing) the arguments */
|
|
262
|
-
args: AS;
|
|
263
|
-
/** Standard Schema validating (and typing) the return value */
|
|
264
|
-
returns: RS;
|
|
265
|
-
/**
|
|
266
|
-
* Declares whether this function's args/return are JSON-serializable
|
|
267
|
-
* (no Map/Set/Date/BigInt/cycles/class instances/undefined/Symbol/Function).
|
|
268
|
-
*
|
|
269
|
-
* - `true`: wire and dump use strict `JSON.stringify`; misshapen
|
|
270
|
-
* values throw `DF0019` at the call site. Required for `agent`.
|
|
271
|
-
* - `false` (default): `structured-clone-es` round-trips fancy
|
|
272
|
-
* types. Cannot be `agent`-exposed (registration throws `DF0018`).
|
|
273
|
-
*/
|
|
274
|
-
jsonSerializable?: boolean;
|
|
275
|
-
/**
|
|
276
|
-
* Expose this function to agents (e.g. via the MCP adapter).
|
|
277
|
-
* When omitted, the function is not agent-exposed (default-deny).
|
|
278
|
-
*/
|
|
279
|
-
agent?: RpcFunctionAgentOptions;
|
|
280
|
-
/** Setup function called with context to initialize handler and dump */
|
|
281
|
-
setup?: (context: CONTEXT) => Thenable<RpcFunctionSetupResult<InferArgsType<AS>, Thenable<InferReturnType<RS>>>>;
|
|
282
|
-
/**
|
|
283
|
-
* Function implementation (required if setup doesn't provide one).
|
|
284
|
-
* The declared `returns` schema describes the *resolved* value:
|
|
285
|
-
* async handlers return a promise of it (the runtime always awaits).
|
|
286
|
-
*/
|
|
287
|
-
handler?: (...args: InferArgsType<AS>) => Thenable<InferReturnType<RS>>;
|
|
288
|
-
/** Dump definition (setup dump takes priority) */
|
|
289
|
-
dump?: RpcDump<InferArgsType<AS>, Thenable<InferReturnType<RS>>, CONTEXT>;
|
|
290
|
-
/**
|
|
291
|
-
* Sugar for "query in dev, single baked snapshot in build": when
|
|
292
|
-
* `true` and no `dump` is provided, the build adapter runs the
|
|
293
|
-
* handler once with no arguments and stores the result as both a
|
|
294
|
-
* no-args record and the fallback so any call variant resolves
|
|
295
|
-
* to the same snapshot. Only valid on `query` (or untyped)
|
|
296
|
-
* functions; `static` already has equivalent default behavior.
|
|
297
|
-
*/
|
|
298
|
-
snapshot?: boolean;
|
|
299
|
-
/** Per-context setup-result cache, populated by `getRpcResolvedSetupResult`. @internal */
|
|
300
|
-
__cache?: WeakMap<object, Thenable<RpcFunctionSetupResult<InferArgsType<AS>, Thenable<InferReturnType<RS>>>>>;
|
|
301
|
-
/** Single-slot fallback for primitive contexts. @internal */
|
|
302
|
-
__promise?: Thenable<RpcFunctionSetupResult<InferArgsType<AS>, Thenable<InferReturnType<RS>>>>;
|
|
303
|
-
};
|
|
242
|
+
type RpcFunctionDefinition<NAME extends string, TYPE extends RpcFunctionType = 'query', ARGS extends any[] = [], RETURN = void, AS extends RpcArgsSchema | undefined = undefined, RS extends RpcReturnSchema | undefined = undefined, CONTEXT = undefined> = [AS, RS] extends [undefined, undefined] ? RpcFunctionDefinitionWithoutSchemas<NAME, TYPE, ARGS, RETURN, AS, RS, CONTEXT> : RpcFunctionDefinitionWithSchemas<NAME, TYPE, AS, RS, CONTEXT>;
|
|
304
243
|
type RpcFunctionDefinitionToFunction<T extends RpcFunctionDefinitionAny> = T extends {
|
|
305
244
|
args: infer AS;
|
|
306
245
|
returns: infer RS;
|
|
@@ -320,4 +259,4 @@ type RpcDefinitionsFilter<T extends readonly RpcFunctionDefinitionAny[], Type ex
|
|
|
320
259
|
type: Type;
|
|
321
260
|
} ? T[K] : never; };
|
|
322
261
|
//#endregion
|
|
323
|
-
export {
|
|
262
|
+
export { InferReturnType as A, RpcFunctionDefinitionWithoutSchemas as C, RpcReturnSchema as D, RpcFunctionsCollector as E, Thenable as O, RpcFunctionDefinitionWithSchemas as S, RpcFunctionType as T, RpcFunctionDefinition as _, RpcDefinitionsFilter as a, RpcFunctionDefinitionBase as b, RpcDump as c, RpcDumpDefinition as d, RpcDumpGetter as f, RpcFunctionAgentOptions as g, RpcDumpStore as h, RpcArgsSchema as i, InferArgsType as k, RpcDumpClientOptions as l, RpcDumpRecordError as m, BirpcReturn$1 as n, RpcDefinitionsToFunctions as o, RpcDumpRecord as p, EntriesToObject as r, RpcDefinitionsToFunctionsWithNamespace as s, BirpcFn as t, RpcDumpCollectionOptions as u, RpcFunctionDefinitionAny as v, RpcFunctionSetupResult as w, RpcFunctionDefinitionToFunction as x, RpcFunctionDefinitionAnyWithContext as y };
|
package/dist/utils/events.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as resolveStaticAssetsSource } from "../remote-assets-
|
|
1
|
+
import { t as resolveStaticAssetsSource } from "../remote-assets-D0StJVLp.mjs";
|
|
2
2
|
export { resolveStaticAssetsSource };
|
|
@@ -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-BLHBDQcZ.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-BLHBDQcZ.mjs";
|
|
2
2
|
export { BufferedChunk, CreateStreamReaderOptions, CreateStreamSinkOptions, StreamErrorPayload, StreamReader, StreamSink, StreamSinkEvents, createStreamReader, createStreamSink };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as diagnostics } from "./serialization-
|
|
1
|
+
import { r as diagnostics } from "./serialization-BhuOoL80.mjs";
|
|
2
2
|
import { createHash } from "node:crypto";
|
|
3
3
|
//#region ../../node_modules/.pnpm/ohash@2.0.12/node_modules/ohash/dist/_chunks/is-equal.mjs
|
|
4
4
|
function serialize(input) {
|
|
@@ -171,6 +171,19 @@ function hash(value) {
|
|
|
171
171
|
return hash$1(value);
|
|
172
172
|
}
|
|
173
173
|
//#endregion
|
|
174
|
+
//#region src/rpc/agent-json-serialization.ts
|
|
175
|
+
/**
|
|
176
|
+
* Prevents using a coding-agent-exposed RPC function that is explicitly
|
|
177
|
+
* marked as non-serializable, and marks these functions as serializable by
|
|
178
|
+
* default.
|
|
179
|
+
*
|
|
180
|
+
* @internal
|
|
181
|
+
*/
|
|
182
|
+
function ensureAgentJsonSerializable(fnDef) {
|
|
183
|
+
if (fnDef.agent && fnDef.jsonSerializable === false) throw diagnostics.DF0019({ name: fnDef.name });
|
|
184
|
+
if (fnDef.agent && !fnDef.jsonSerializable) fnDef.jsonSerializable = true;
|
|
185
|
+
}
|
|
186
|
+
//#endregion
|
|
174
187
|
//#region src/rpc/validate-io.ts
|
|
175
188
|
/**
|
|
176
189
|
* Run a single [Standard Schema](https://standardschema.dev) validator,
|
|
@@ -308,4 +321,4 @@ function validateDefinition(definition) {
|
|
|
308
321
|
validateDefinitions([definition]);
|
|
309
322
|
}
|
|
310
323
|
//#endregion
|
|
311
|
-
export { validateRpcArgs as a, getRpcResolvedSetupResult as i, validateDefinitions as n, validateRpcReturn as o, getRpcHandler as r,
|
|
324
|
+
export { validateRpcArgs as a, hash as c, getRpcResolvedSetupResult as i, validateDefinitions as n, validateRpcReturn as o, getRpcHandler as r, ensureAgentJsonSerializable as s, validateDefinition as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as strictJsonStringify } from "./serialization-
|
|
1
|
+
import { n as strictJsonStringify } from "./serialization-BhuOoL80.mjs";
|
|
2
2
|
import { n as structuredCloneStringify, t as structuredCloneParse } from "./structured-clone-CbAV5rFI.mjs";
|
|
3
3
|
//#region src/rpc/wire-codec.ts
|
|
4
4
|
const EMPTY_WIRE_DEFS = /* @__PURE__ */ new Map();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as validateDefinitions, r as getRpcHandler, s as
|
|
2
|
-
import { n as strictJsonStringify, r as diagnostics } from "./serialization-
|
|
1
|
+
import { c as hash, n as validateDefinitions, r as getRpcHandler, s as ensureAgentJsonSerializable } from "./validation-BzxTTYaV.mjs";
|
|
2
|
+
import { n as strictJsonStringify, r as diagnostics } from "./serialization-BhuOoL80.mjs";
|
|
3
3
|
import { DEVFRAME_RPC_DUMP_DIRNAME, DEVFRAME_RPC_DUMP_MANIFEST_FILENAME } from "./constants.mjs";
|
|
4
4
|
import { n as structuredCloneStringify } from "./structured-clone-CbAV5rFI.mjs";
|
|
5
5
|
import fs from "node:fs/promises";
|
|
@@ -402,6 +402,7 @@ async function collectStaticRpcDump(definitions, context) {
|
|
|
402
402
|
const manifest = {};
|
|
403
403
|
const files = {};
|
|
404
404
|
for (const definition of definitions) {
|
|
405
|
+
ensureAgentJsonSerializable(definition);
|
|
405
406
|
const type = definition.type ?? "query";
|
|
406
407
|
const serialization = definition.jsonSerializable === true ? "json" : "structured-clone";
|
|
407
408
|
if (type === "static") {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { v as RpcFunctionDefinitionAny } from "./types-
|
|
1
|
+
import { v as RpcFunctionDefinitionAny } from "./types-D2vGd7-2.mjs";
|
|
2
2
|
import { n as DevframeRpcConnection, t as DevframeNodeRpcSessionMeta } from "./session-r6PDixP6.mjs";
|
|
3
3
|
import { BirpcGroup, ChannelOptions } from "birpc";
|
|
4
4
|
import { Hooks } from "crossws";
|
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.19",
|
|
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",
|
|
@@ -105,7 +105,7 @@
|
|
|
105
105
|
"immer": "^11.1.18",
|
|
106
106
|
"launch-editor": "^2.14.1",
|
|
107
107
|
"mlly": "^1.8.2",
|
|
108
|
-
"obug": "^
|
|
108
|
+
"obug": "^3.0.0",
|
|
109
109
|
"ohash": "^2.0.12",
|
|
110
110
|
"p-limit": "^7.3.2",
|
|
111
111
|
"perfect-debounce": "^2.1.0",
|
|
@@ -114,7 +114,7 @@
|
|
|
114
114
|
"tsdown": "^0.23.0",
|
|
115
115
|
"typescript": "^6.0.3",
|
|
116
116
|
"ua-parser-modern": "^0.1.1",
|
|
117
|
-
"valibot": "^1.
|
|
117
|
+
"valibot": "^1.5.0",
|
|
118
118
|
"whenexpr": "^0.1.2",
|
|
119
119
|
"ws": "^8.21.3"
|
|
120
120
|
},
|
package/skills/devframe/SKILL.md
CHANGED
|
@@ -30,7 +30,7 @@ Two layers, one boundary:
|
|
|
30
30
|
|
|
31
31
|
Devframe is framework- and build-tool-agnostic - it has zero dependency on Vite or any `@vitejs/*` package and makes no UI-framework assumption. [Vite DevTools](https://devtools.vite.dev/) is the first flagship hub UI provider built on it; the built-in devframes deliberately span Vue, Svelte, Solid, React, and Next to prove the point.
|
|
32
32
|
|
|
33
|
-
High-level concept: [Pluggable, Extensible, and Playful DevTools](https://
|
|
33
|
+
High-level concept: [Pluggable, Extensible, and Playful DevTools](https://devfra.me/posts/pluggable-extensible-playful-devtools). Full reference: [devfra.me](https://devfra.me/).
|
|
34
34
|
|
|
35
35
|
## Deployment map — pick by how it's served, not by what it does
|
|
36
36
|
|