devframe 0.0.0 → 0.1.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.
Files changed (73) hide show
  1. package/LICENSE.md +21 -0
  2. package/README.md +62 -0
  3. package/dist/_shared-CU6dE-VX.mjs +20 -0
  4. package/dist/adapters/build.d.mts +37 -0
  5. package/dist/adapters/build.mjs +61 -0
  6. package/dist/adapters/cli.d.mts +35 -0
  7. package/dist/adapters/cli.mjs +357 -0
  8. package/dist/adapters/embedded.d.mts +19 -0
  9. package/dist/adapters/embedded.mjs +15 -0
  10. package/dist/adapters/kit.d.mts +23 -0
  11. package/dist/adapters/kit.mjs +16 -0
  12. package/dist/adapters/mcp.d.mts +39 -0
  13. package/dist/adapters/mcp.mjs +278 -0
  14. package/dist/adapters/vite.d.mts +32 -0
  15. package/dist/adapters/vite.mjs +31 -0
  16. package/dist/client/index.d.mts +227 -0
  17. package/dist/client/index.mjs +2 -0
  18. package/dist/client-4WrEozlH.mjs +1561 -0
  19. package/dist/constants.d.mts +20 -0
  20. package/dist/constants.mjs +34 -0
  21. package/dist/context-BrePWeyd.mjs +6776 -0
  22. package/dist/define-Bb4zh-Dc.mjs +11 -0
  23. package/dist/devtool-OJ3QW0ns.d.mts +1125 -0
  24. package/dist/helpers/nuxt/index.d.mts +46 -0
  25. package/dist/helpers/nuxt/index.mjs +58 -0
  26. package/dist/helpers/nuxt/runtime/plugin.client.d.mts +8 -0
  27. package/dist/helpers/nuxt/runtime/plugin.client.mjs +12 -0
  28. package/dist/human-id-CHS0s28X.mjs +844 -0
  29. package/dist/immer-HjMAm3b6.mjs +894 -0
  30. package/dist/index-DvKDO5H8.d.mts +333 -0
  31. package/dist/index.d.mts +10 -0
  32. package/dist/index.mjs +2 -0
  33. package/dist/main-DpINGndA.mjs +601 -0
  34. package/dist/node/index.d.mts +365 -0
  35. package/dist/node/index.mjs +69 -0
  36. package/dist/open-BtOOEldu.mjs +533 -0
  37. package/dist/recipes/open-helpers.d.mts +104 -0
  38. package/dist/recipes/open-helpers.mjs +69 -0
  39. package/dist/rpc/client.d.mts +9 -0
  40. package/dist/rpc/client.mjs +13 -0
  41. package/dist/rpc/index.d.mts +2 -0
  42. package/dist/rpc/index.mjs +3 -0
  43. package/dist/rpc/server.d.mts +8 -0
  44. package/dist/rpc/server.mjs +10 -0
  45. package/dist/rpc/transports/ws-client.d.mts +2 -0
  46. package/dist/rpc/transports/ws-client.mjs +43 -0
  47. package/dist/rpc/transports/ws-server.d.mts +2 -0
  48. package/dist/rpc/transports/ws-server.mjs +58 -0
  49. package/dist/rpc-9FNa3Inb.mjs +474 -0
  50. package/dist/server-DrBxa6ZV.mjs +49 -0
  51. package/dist/src-BoIqXRc9.mjs +85 -0
  52. package/dist/static-dump-CQUC1aIW.mjs +82 -0
  53. package/dist/transports-BPUzHhI2.mjs +15 -0
  54. package/dist/types/index.d.mts +4 -0
  55. package/dist/types/index.mjs +6 -0
  56. package/dist/utils/events.d.mts +9 -0
  57. package/dist/utils/events.mjs +40 -0
  58. package/dist/utils/human-id.d.mts +10 -0
  59. package/dist/utils/human-id.mjs +3 -0
  60. package/dist/utils/nanoid.d.mts +4 -0
  61. package/dist/utils/nanoid.mjs +10 -0
  62. package/dist/utils/promise.d.mts +8 -0
  63. package/dist/utils/promise.mjs +15 -0
  64. package/dist/utils/shared-state.d.mts +2 -0
  65. package/dist/utils/shared-state.mjs +36 -0
  66. package/dist/utils/state.d.mts +49 -0
  67. package/dist/utils/state.mjs +26 -0
  68. package/dist/utils/when.d.mts +2 -0
  69. package/dist/utils/when.mjs +424 -0
  70. package/dist/when-CGLewRtm.d.mts +401 -0
  71. package/dist/ws-client-CklfxUHE.d.mts +17 -0
  72. package/dist/ws-server--IuUAaGi.d.mts +37 -0
  73. package/package.json +116 -8
@@ -0,0 +1,333 @@
1
+ import { GenericSchema, InferInput } from "valibot";
2
+ import { BirpcFn, BirpcReturn as BirpcReturn$1 } from "birpc";
3
+
4
+ //#region src/rpc/cache.d.ts
5
+ interface RpcCacheOptions {
6
+ functions: string[];
7
+ keySerializer?: (args: unknown[]) => string;
8
+ }
9
+ /**
10
+ * @experimental API is expected to change.
11
+ */
12
+ declare class RpcCacheManager {
13
+ private cacheMap;
14
+ private options;
15
+ private keySerializer;
16
+ constructor(options: RpcCacheOptions);
17
+ updateOptions(options: Partial<RpcCacheOptions>): void;
18
+ cached<T>(m: string, a: unknown[]): T | undefined;
19
+ apply(req: {
20
+ m: string;
21
+ a: unknown[];
22
+ }, res: unknown): void;
23
+ validate(m: string): boolean;
24
+ clear(fn?: string): void;
25
+ }
26
+ //#endregion
27
+ //#region src/rpc/utils.d.ts
28
+ /** Infers TypeScript tuple type from Valibot schema array */
29
+ type InferArgsType<S extends RpcArgsSchema | undefined> = S extends readonly [] ? [] : S extends readonly [infer H, ...infer T] ? H extends GenericSchema ? T extends readonly GenericSchema[] ? [InferInput<H>, ...InferArgsType<T>] : never : never : never;
30
+ /** Infers TypeScript return type from Valibot return schema */
31
+ type InferReturnType<S extends RpcReturnSchema | undefined> = S extends RpcReturnSchema ? InferInput<S> : void;
32
+ //#endregion
33
+ //#region src/rpc/types.d.ts
34
+ type Thenable<T> = T | Promise<T>;
35
+ type EntriesToObject<T extends readonly [string, any][]> = { [K in T[number] as K[0]]: K[1] };
36
+ /**
37
+ * Type of the RPC function,
38
+ * - static: A function that returns a static data, no arguments (can be cached and dumped)
39
+ * - action: A function that performs an action (no data returned)
40
+ * - event: A function that emits an event (no data returned), and does not wait for a response
41
+ * - query: A function that queries a resource
42
+ *
43
+ * By default, the function is a query function.
44
+ */
45
+ type RpcFunctionType = 'static' | 'action' | 'event' | 'query';
46
+ /**
47
+ * Agent exposure settings for an RPC function. When this field is set,
48
+ * the function is surfaced to agents (e.g. via the devframe MCP adapter)
49
+ * as a callable tool. Functions without an `agent` field are not exposed —
50
+ * default-deny.
51
+ *
52
+ * @experimental The agent-native surface is experimental and may change
53
+ * without a major version bump until it stabilizes.
54
+ */
55
+ interface RpcFunctionAgentOptions {
56
+ /**
57
+ * Human-readable description shown to the agent. Required — agents
58
+ * rely on this to decide when to invoke the tool. Keep it to ~1–3
59
+ * sentences explaining what the tool does and when to use it.
60
+ */
61
+ description: string;
62
+ /**
63
+ * Optional human-friendly display title. Maps to the MCP tool `title`
64
+ * annotation. Falls back to the RPC function `name` when omitted.
65
+ */
66
+ title?: string;
67
+ /**
68
+ * Safety classification. Drives MCP annotations (`readOnlyHint`,
69
+ * `destructiveHint`) downstream.
70
+ * - `'read'` — no side effects; safe to call freely.
71
+ * - `'action'` — mutates state but not destructive.
72
+ * - `'destructive'` — may perform destructive updates.
73
+ *
74
+ * When omitted it is inferred from the function `type`:
75
+ * - `'static'` / `'query'` → `'read'`
76
+ * - `'action'` / `'event'` → `'action'`
77
+ */
78
+ safety?: 'read' | 'action' | 'destructive';
79
+ /** Free-form tags for grouping or filtering. */
80
+ tags?: readonly string[];
81
+ /**
82
+ * Optional example invocations shown to agents. Returned verbatim in
83
+ * the agent manifest.
84
+ */
85
+ examples?: readonly {
86
+ args: unknown[];
87
+ description?: string;
88
+ }[];
89
+ }
90
+ /**
91
+ * Manages dynamic function registration and provides a type-safe proxy for accessing functions.
92
+ */
93
+ interface RpcFunctionsCollector<LocalFunctions, SetupContext = undefined> {
94
+ /** User-provided context passed to setup functions */
95
+ context: SetupContext;
96
+ /** Type-safe proxy for calling registered functions */
97
+ readonly functions: LocalFunctions;
98
+ /** Map of registered function definitions keyed by function name */
99
+ readonly definitions: Map<string, RpcFunctionDefinitionAnyWithContext<SetupContext>>;
100
+ /** Register a new function definition */
101
+ register: (fn: RpcFunctionDefinitionAnyWithContext<SetupContext>) => void;
102
+ /** Update an existing function definition */
103
+ update: (fn: RpcFunctionDefinitionAnyWithContext<SetupContext>) => void;
104
+ /** Subscribe to function changes, returns unsubscribe function */
105
+ onChanged: (fn: (id?: string) => void) => (() => void);
106
+ }
107
+ /**
108
+ * Result returned by a function's setup method.
109
+ */
110
+ interface RpcFunctionSetupResult<ARGS extends any[], RETURN = void> {
111
+ /** Function handler */
112
+ handler?: (...args: ARGS) => RETURN;
113
+ /** Optional dump definition (overrides definition-level dump) */
114
+ dump?: RpcDumpDefinition<ARGS, RETURN>;
115
+ }
116
+ /** Valibot schema array for validating function arguments */
117
+ type RpcArgsSchema = readonly GenericSchema[];
118
+ /** Valibot schema for validating function return value */
119
+ type RpcReturnSchema = GenericSchema;
120
+ /**
121
+ * Single record in a dump store with pre-computed results.
122
+ */
123
+ interface RpcDumpRecord<ARGS extends any[] = any[], RETURN = any> {
124
+ /** Function arguments */
125
+ inputs: ARGS;
126
+ /** Result (value or lazy function) */
127
+ output?: RETURN;
128
+ /** Error if execution failed */
129
+ error?: {
130
+ /** Error message */message: string; /** Error type name (e.g., "Error", "TypeError") */
131
+ name: string;
132
+ };
133
+ }
134
+ /**
135
+ * Defines argument combinations to pre-compute for a function.
136
+ */
137
+ interface RpcDumpDefinition<ARGS extends any[] = any[], RETURN = any> {
138
+ /** Argument combinations to pre-compute by executing handler */
139
+ inputs?: ARGS[];
140
+ /** Pre-computed records to use directly (bypasses handler execution) */
141
+ records?: RpcDumpRecord<ARGS, RETURN>[];
142
+ /** Fallback value when no match found */
143
+ fallback?: RETURN;
144
+ }
145
+ /**
146
+ * Dynamically generates dump definitions based on context.
147
+ */
148
+ type RpcDumpGetter<ARGS extends any[] = any[], RETURN = any, CONTEXT = any> = (context: CONTEXT, handler: (...args: ARGS) => RETURN) => Thenable<RpcDumpDefinition<ARGS, RETURN>>;
149
+ /**
150
+ * Dump configuration (static object or dynamic function).
151
+ */
152
+ type RpcDump<ARGS extends any[] = any[], RETURN = any, CONTEXT = any> = RpcDumpDefinition<ARGS, RETURN> | RpcDumpGetter<ARGS, RETURN, CONTEXT>;
153
+ /**
154
+ * Base function definition metadata.
155
+ */
156
+ interface RpcFunctionDefinitionBase {
157
+ /** Function name (unique identifier) */
158
+ name: string;
159
+ /** Function type (static, action, event, or query) */
160
+ type?: RpcFunctionType;
161
+ }
162
+ /**
163
+ * Dump store containing pre-computed results.
164
+ * Flat structure for serialization and efficient lookups.
165
+ */
166
+ interface RpcDumpStore<T = any> {
167
+ /** Function definitions keyed by name */
168
+ definitions: Record<string, RpcFunctionDefinitionBase>;
169
+ /** Records keyed by '<function-name>---<hash>' or '<function-name>---fallback' */
170
+ records: Record<string, RpcDumpRecord | (() => Promise<RpcDumpRecord>)>;
171
+ /** @internal */
172
+ _functions?: T;
173
+ }
174
+ /**
175
+ * Dump client options.
176
+ */
177
+ interface RpcDumpClientOptions {
178
+ /** Called when arguments don't match any pre-computed entry */
179
+ onMiss?: (functionName: string, args: any[]) => void;
180
+ }
181
+ /**
182
+ * Options for collecting dumps.
183
+ */
184
+ interface RpcDumpCollectionOptions {
185
+ /**
186
+ * Concurrency control for parallel execution.
187
+ * - `false` or `undefined`: sequential execution (default)
188
+ * - `true`: parallel execution with concurrency limit of 5
189
+ * - `number`: parallel execution with specified concurrency limit
190
+ */
191
+ concurrency?: boolean | number | null;
192
+ }
193
+ /**
194
+ * RPC function definition with optional dump support.
195
+ */
196
+ 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] ? {
197
+ /** Function name (unique identifier) */name: NAME; /** Function type (static, action, event, or query) */
198
+ type?: TYPE; /** Whether the function results should be cached */
199
+ cacheable?: boolean; /** Valibot schema array for validating function arguments */
200
+ args?: AS; /** Valibot schema for validating function return value */
201
+ returns?: RS;
202
+ /**
203
+ * Expose this function to agents (e.g. via the MCP adapter).
204
+ * When omitted, the function is not agent-exposed (default-deny).
205
+ *
206
+ * @experimental
207
+ */
208
+ agent?: RpcFunctionAgentOptions; /** Setup function called with context to initialize handler and dump */
209
+ setup?: (context: CONTEXT) => Thenable<RpcFunctionSetupResult<ARGS, RETURN>>; /** Function implementation (required if setup doesn't provide one) */
210
+ handler?: (...args: ARGS) => RETURN; /** Dump definition (setup dump takes priority) */
211
+ dump?: RpcDump<ARGS, RETURN, CONTEXT>;
212
+ /**
213
+ * Sugar for "query in dev, single baked snapshot in build": when
214
+ * `true` and no `dump` is provided, the build adapter runs the
215
+ * handler once with no arguments and stores the result as both a
216
+ * no-args record and the fallback so any call variant resolves
217
+ * to the same snapshot. Only valid on `query` (or untyped)
218
+ * functions — `static` already has equivalent default behavior.
219
+ */
220
+ snapshot?: boolean;
221
+ __resolved?: RpcFunctionSetupResult<ARGS, RETURN>;
222
+ __promise?: Thenable<RpcFunctionSetupResult<ARGS, RETURN>>;
223
+ } : {
224
+ /** Function name (unique identifier) */name: NAME; /** Function type (static, action, event, or query) */
225
+ type?: TYPE; /** Whether the function results should be cached */
226
+ cacheable?: boolean; /** Valibot schema array for validating function arguments */
227
+ args: AS; /** Valibot schema for validating function return value */
228
+ returns: RS;
229
+ /**
230
+ * Expose this function to agents (e.g. via the MCP adapter).
231
+ * When omitted, the function is not agent-exposed (default-deny).
232
+ *
233
+ * @experimental
234
+ */
235
+ agent?: RpcFunctionAgentOptions; /** Setup function called with context to initialize handler and dump */
236
+ setup?: (context: CONTEXT) => Thenable<RpcFunctionSetupResult<InferArgsType<AS>, InferReturnType<RS>>>; /** Function implementation (required if setup doesn't provide one) */
237
+ handler?: (...args: InferArgsType<AS>) => InferReturnType<RS>; /** Dump definition (setup dump takes priority) */
238
+ dump?: RpcDump<InferArgsType<AS>, InferReturnType<RS>, CONTEXT>;
239
+ /**
240
+ * Sugar for "query in dev, single baked snapshot in build": when
241
+ * `true` and no `dump` is provided, the build adapter runs the
242
+ * handler once with no arguments and stores the result as both a
243
+ * no-args record and the fallback so any call variant resolves
244
+ * to the same snapshot. Only valid on `query` (or untyped)
245
+ * functions — `static` already has equivalent default behavior.
246
+ */
247
+ snapshot?: boolean;
248
+ __resolved?: RpcFunctionSetupResult<InferArgsType<AS>, InferReturnType<RS>>;
249
+ __promise?: Thenable<RpcFunctionSetupResult<InferArgsType<AS>, InferReturnType<RS>>>;
250
+ };
251
+ type RpcFunctionDefinitionToFunction<T extends RpcFunctionDefinitionAny> = T extends {
252
+ args: infer AS;
253
+ returns: infer RS;
254
+ } ? AS extends RpcArgsSchema ? RS extends RpcReturnSchema ? (...args: InferArgsType<AS>) => InferReturnType<RS> : never : never : T extends RpcFunctionDefinition<string, any, infer ARGS, infer RETURN, any, any, any> ? (...args: ARGS) => RETURN : never;
255
+ type RpcFunctionDefinitionAny = RpcFunctionDefinition<string, any, any, any, any, any, any>;
256
+ type RpcFunctionDefinitionAnyWithContext<CONTEXT = undefined> = RpcFunctionDefinition<string, any, any, any, any, any, CONTEXT>;
257
+ type RpcDefinitionsToFunctions<T extends readonly RpcFunctionDefinitionAny[]> = EntriesToObject<{ [K in keyof T]: [T[K]['name'], RpcFunctionDefinitionToFunction<T[K]>] }>;
258
+ type RpcDefinitionsFilter<T extends readonly RpcFunctionDefinitionAny[], Type extends RpcFunctionType> = { [K in keyof T]: T[K] extends {
259
+ type: Type;
260
+ } ? T[K] : never };
261
+ //#endregion
262
+ //#region src/rpc/collector.d.ts
263
+ declare class RpcFunctionsCollectorBase<LocalFunctions extends Record<string, any>, SetupContext> implements RpcFunctionsCollector<LocalFunctions, SetupContext> {
264
+ readonly context: SetupContext;
265
+ readonly definitions: Map<string, RpcFunctionDefinition<string, any, any, any, any, any, SetupContext>>;
266
+ readonly functions: LocalFunctions;
267
+ private readonly _onChanged;
268
+ constructor(context: SetupContext);
269
+ register(fn: RpcFunctionDefinition<string, any, any, any, any, any, SetupContext>, force?: boolean): void;
270
+ update(fn: RpcFunctionDefinition<string, any, any, any, any, any, SetupContext>, force?: boolean): void;
271
+ onChanged(fn: (id?: string) => void): () => void;
272
+ getHandler<T extends keyof LocalFunctions>(name: T): Promise<LocalFunctions[T]>;
273
+ getSchema<T extends keyof LocalFunctions>(name: T): {
274
+ args: RpcArgsSchema | undefined;
275
+ returns: RpcReturnSchema | undefined;
276
+ };
277
+ has(name: string): boolean;
278
+ get(name: string): RpcFunctionDefinition<string, any, any, any, any, any, SetupContext> | undefined;
279
+ list(): string[];
280
+ }
281
+ //#endregion
282
+ //#region src/rpc/define.d.ts
283
+ declare function 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>): RpcFunctionDefinition<NAME, TYPE, ARGS, RETURN, AS, RS>;
284
+ declare function createDefineWrapperWithContext<CONTEXT>(): <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, CONTEXT>) => RpcFunctionDefinition<NAME, TYPE, ARGS, RETURN, AS, RS, CONTEXT>;
285
+ //#endregion
286
+ //#region src/rpc/dumps.d.ts
287
+ /**
288
+ * Collects pre-computed dumps by executing functions with their defined input combinations.
289
+ * Static functions without dump config automatically get `{ inputs: [[]] }`.
290
+ *
291
+ * @example
292
+ * ```ts
293
+ * const store = await dumpFunctions([greet], context, { concurrency: 10 })
294
+ * ```
295
+ */
296
+ declare function dumpFunctions<T extends readonly RpcFunctionDefinitionAny[]>(definitions: T, context?: any, options?: RpcDumpCollectionOptions): Promise<RpcDumpStore<RpcDefinitionsToFunctions<T>>>;
297
+ /**
298
+ * Creates a client that serves pre-computed results from a dump store.
299
+ * Uses argument hashing to match calls to stored records.
300
+ *
301
+ * @example
302
+ * ```ts
303
+ * const client = createClientFromDump(store)
304
+ * await client.greet('Alice')
305
+ * ```
306
+ */
307
+ declare function createClientFromDump<T extends Record<string, any>>(store: RpcDumpStore<T>, options?: RpcDumpClientOptions): BirpcReturn$1<T>;
308
+ /**
309
+ * Filters function definitions to only those with dump definitions.
310
+ * Note: Only checks the definition itself, not setup results.
311
+ */
312
+ declare function getDefinitionsWithDumps<T extends readonly RpcFunctionDefinitionAny[]>(definitions: T): RpcFunctionDefinitionAny[];
313
+ //#endregion
314
+ //#region src/rpc/handler.d.ts
315
+ declare function getRpcResolvedSetupResult<NAME extends string, TYPE extends RpcFunctionType, ARGS extends any[], RETURN = void, CONTEXT = undefined>(definition: RpcFunctionDefinition<NAME, TYPE, ARGS, RETURN, any, any, CONTEXT>, context: CONTEXT): Promise<RpcFunctionSetupResult<ARGS, RETURN>>;
316
+ declare function getRpcHandler<NAME extends string, TYPE extends RpcFunctionType, ARGS extends any[], RETURN = void, CONTEXT = undefined>(definition: RpcFunctionDefinition<NAME, TYPE, ARGS, RETURN, any, any, CONTEXT>, context: CONTEXT): Promise<(...args: ARGS) => RETURN>;
317
+ //#endregion
318
+ //#region src/rpc/validation.d.ts
319
+ /**
320
+ * Validates RPC function definitions.
321
+ * Action and event functions cannot have dumps (side effects should not be cached).
322
+ *
323
+ * @throws {Error} If an action or event function has a dump configuration
324
+ */
325
+ declare function validateDefinitions(definitions: readonly RpcFunctionDefinitionAny[]): void;
326
+ /**
327
+ * Validates a single RPC function definition.
328
+ *
329
+ * @throws {Error} If an action or event function has a dump configuration
330
+ */
331
+ declare function validateDefinition(definition: RpcFunctionDefinitionAny): void;
332
+ //#endregion
333
+ export { RpcFunctionSetupResult as A, RpcDumpStore as C, RpcFunctionDefinitionAnyWithContext as D, RpcFunctionDefinitionAny as E, RpcCacheManager as F, RpcCacheOptions as I, RpcFunctionsCollector as M, RpcReturnSchema as N, RpcFunctionDefinitionBase as O, Thenable as P, RpcDumpRecord as S, RpcFunctionDefinition as T, RpcDump as _, createClientFromDump as a, RpcDumpDefinition as b, createDefineWrapperWithContext as c, BirpcFn as d, BirpcReturn$1 as f, RpcDefinitionsToFunctions as g, RpcDefinitionsFilter as h, getRpcResolvedSetupResult as i, RpcFunctionType as j, RpcFunctionDefinitionToFunction as k, defineRpcFunction as l, RpcArgsSchema as m, validateDefinitions as n, dumpFunctions as o, EntriesToObject as p, getRpcHandler as r, getDefinitionsWithDumps as s, validateDefinition as t, RpcFunctionsCollectorBase as u, RpcDumpClientOptions as v, RpcFunctionAgentOptions as w, RpcDumpGetter as x, RpcDumpCollectionOptions as y };
@@ -0,0 +1,10 @@
1
+ import { $ as DevToolsLogsHost, A as DevToolsViewHost, At as AgentHandle, B as DevToolsTerminalStatus, Bt as EventUnsubscribe, Ct as DevToolsCommandHandle, Dt as DevToolsCommandsHostEvents, Et as DevToolsCommandsHost, F as DevToolsChildProcessTerminalSession, Ft as AgentTool, G as DevToolsLogElementPosition, H as DevToolsRpcClientFunctions, Ht as CliFlagsSchema, I as DevToolsTerminalHost, It as AgentToolInput, J as DevToolsLogEntryInput, K as DevToolsLogEntry, L as DevToolsTerminalSession, Lt as DevToolsAgentHost, M as PartialWithoutId, Mt as AgentResource, N as Thenable, Nt as AgentResourceContent, Ot as DevToolsServerCommandEntry, P as DevToolsChildProcessExecuteOptions, Pt as AgentResourceInput, Q as DevToolsLogsClient, R as DevToolsTerminalSessionBase, Rt as DevToolsAgentHostEvents, St as DevToolsCommandEntry, Tt as DevToolsCommandShortcutOverrides, U as DevToolsRpcServerFunctions, Ut as InferCliFlags, V as DevToolsDocksUserSettings, Vt as EventsMap, W as DevToolsRpcSharedStates, Wt as defineCliFlags, X as DevToolsLogHandle, Y as DevToolsLogFilePosition, Z as DevToolsLogLevel, _ as RpcSharedStateGetOptions, _t as JsonRenderSpec, a as DevtoolRuntime, at as DevToolsDockEntryCategory, bt as DevToolsClientCommand, c as defineDevtool, ct as DevToolsDockUserEntry, d as DevToolsNodeContext, dt as DevToolsViewCustomRender, et as DevToolsHost, f as DevToolsNodeUtils, ft as DevToolsViewIframe, g as RpcFunctionsHost, gt as JsonRenderElement, h as RpcBroadcastOptions, ht as DevToolsViewLauncherStatus, i as DevtoolDeploymentKind, it as DevToolsDockEntryBase, j as EntriesToObject, jt as AgentManifest, kt as DevToolsServerCommandInput, l as ConnectionMeta, lt as DevToolsViewAction, m as DevToolsNodeRpcSession, mt as DevToolsViewLauncher, n as DevtoolCliOptions, nt as DevToolsDockEntriesGrouped, o as DevtoolSetupInfo, ot as DevToolsDockEntryIcon, p as RemoteConnectionInfo, pt as DevToolsViewJsonRender, q as DevToolsLogEntryFrom, r as DevtoolDefinition, rt as DevToolsDockEntry, s as DevtoolSpaOptions, st as DevToolsDockHost, t as DevtoolBrowserContext, tt as ClientScriptEntry, u as DevToolsCapabilities, ut as DevToolsViewBuiltin, v as RpcSharedStateHost, vt as JsonRenderer, wt as DevToolsCommandKeybinding, xt as DevToolsCommandBase, yt as RemoteDockOptions, z as DevToolsTerminalSessionStreamChunkEvent, zt as EventEmitter } from "./devtool-OJ3QW0ns.mjs";
2
+ import { N as RpcReturnSchema, T as RpcFunctionDefinition, j as RpcFunctionType, m as RpcArgsSchema, w as RpcFunctionAgentOptions } from "./index-DvKDO5H8.mjs";
3
+ import { t as DevToolsNodeRpcSessionMeta } from "./ws-server--IuUAaGi.mjs";
4
+
5
+ //#region src/define.d.ts
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, DevToolsNodeContext>) => RpcFunctionDefinition<NAME, TYPE, ARGS, RETURN, AS, RS, DevToolsNodeContext>;
7
+ declare function defineCommand(command: DevToolsServerCommandInput): DevToolsServerCommandInput;
8
+ declare function defineJsonRenderSpec(spec: JsonRenderSpec): JsonRenderSpec;
9
+ //#endregion
10
+ export { AgentHandle, AgentManifest, AgentResource, AgentResourceContent, AgentResourceInput, AgentTool, AgentToolInput, type CliFlagsSchema, ClientScriptEntry, ConnectionMeta, DevToolsAgentHost, DevToolsAgentHostEvents, DevToolsCapabilities, DevToolsChildProcessExecuteOptions, DevToolsChildProcessTerminalSession, DevToolsClientCommand, DevToolsCommandBase, DevToolsCommandEntry, DevToolsCommandHandle, DevToolsCommandKeybinding, DevToolsCommandShortcutOverrides, DevToolsCommandsHost, DevToolsCommandsHostEvents, DevToolsDockEntriesGrouped, DevToolsDockEntry, DevToolsDockEntryBase, DevToolsDockEntryCategory, DevToolsDockEntryIcon, DevToolsDockHost, DevToolsDockUserEntry, DevToolsDocksUserSettings, DevToolsHost, DevToolsLogElementPosition, DevToolsLogEntry, DevToolsLogEntryFrom, DevToolsLogEntryInput, DevToolsLogFilePosition, DevToolsLogHandle, DevToolsLogLevel, DevToolsLogsClient, DevToolsLogsHost, DevToolsNodeContext, DevToolsNodeRpcSession, DevToolsNodeRpcSessionMeta, DevToolsNodeUtils, DevToolsRpcClientFunctions, DevToolsRpcServerFunctions, DevToolsRpcSharedStates, DevToolsServerCommandEntry, DevToolsServerCommandInput, DevToolsTerminalHost, DevToolsTerminalSession, DevToolsTerminalSessionBase, DevToolsTerminalSessionStreamChunkEvent, DevToolsTerminalStatus, DevToolsViewAction, DevToolsViewBuiltin, DevToolsViewCustomRender, DevToolsViewHost, DevToolsViewIframe, DevToolsViewJsonRender, DevToolsViewLauncher, DevToolsViewLauncherStatus, DevtoolBrowserContext, DevtoolCliOptions, DevtoolDefinition, DevtoolDeploymentKind, DevtoolRuntime, DevtoolSetupInfo, DevtoolSpaOptions, EntriesToObject, EventEmitter, EventUnsubscribe, EventsMap, type InferCliFlags, JsonRenderElement, JsonRenderSpec, JsonRenderer, PartialWithoutId, RemoteConnectionInfo, RemoteDockOptions, RpcBroadcastOptions, RpcFunctionAgentOptions, RpcFunctionsHost, RpcSharedStateGetOptions, RpcSharedStateHost, Thenable, defineCliFlags, defineCommand, defineDevtool, defineJsonRenderSpec, defineRpcFunction };
package/dist/index.mjs ADDED
@@ -0,0 +1,2 @@
1
+ import { i as defineCliFlags, n as defineJsonRenderSpec, r as defineRpcFunction, t as defineCommand } from "./src-BoIqXRc9.mjs";
2
+ export { defineCliFlags, defineCommand, defineJsonRenderSpec, defineRpcFunction };