devframe 0.9.0-beta.2 → 0.9.0-beta.4
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-DmpWW-HH.d.mts → _shared-Bm8p4-fD.d.mts} +1 -3
- package/dist/{dist-D8jAMwxU.mjs → _shared-CGPVmXUM.mjs} +67 -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 +4 -4
- package/dist/adapters/dev.d.mts +7 -7
- package/dist/adapters/dev.mjs +2 -2
- 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 -8
- package/dist/adapters/mcp.mjs +1 -1
- package/dist/{agent-tool-name-C3b5vEwJ.mjs → agent-tool-name-EgfoFO8C.mjs} +0 -3
- package/dist/cli/main.d.mts +0 -2
- package/dist/cli/main.mjs +3 -7
- package/dist/client/index.d.mts +5 -5
- package/dist/{context-C33rR7n0.mjs → context-CMSryXs-.mjs} +10 -1
- package/dist/{context-CSCwoABx.d.mts → context-DV4uWieM.d.mts} +19 -1
- package/dist/{context-Du11TLcO.mjs → context-b6iSomtv.mjs} +4 -5
- package/dist/{dev-BEveeA5H.mjs → dev-4xjiynUD.mjs} +6 -6
- package/dist/{devframe-Bdd9YXTy.d.mts → devframe-5oblos7I.d.mts} +52 -36
- package/dist/{diagnostics-DLYH5oD3.mjs → diagnostics-C7IGWppM.mjs} +2 -2
- package/dist/{host-agent-CpbAoqBx.mjs → host-agent-BBkKT27Q.mjs} +2 -6
- package/dist/{http-DLr_cJZ7.mjs → http-Z0w9baEe.mjs} +3 -10
- package/dist/{index-CZRd2K1C.d.mts → index-BzDl02lt.d.mts} +2 -2
- package/dist/{index-DSCq4M4q.d.mts → index-tdrk1bzV.d.mts} +1 -1
- package/dist/index.d.mts +5 -5
- package/dist/{instance-registry-BQqGoDO9.mjs → instance-registry-Du_hbx-j.mjs} +1 -7
- package/dist/{instance-shell-DBTXTSjN.d.mts → instance-shell-B-BSVp37.d.mts} +3 -12
- package/dist/{instance-shell-KRdee1QF.mjs → instance-shell-B0TwOxCl.mjs} +9 -8
- package/dist/internal/index.d.mts +202 -9
- package/dist/internal/index.mjs +7 -5
- package/dist/node/auth.d.mts +2 -2
- package/dist/node/hub-internals.d.mts +2 -2
- package/dist/node/hub-internals.mjs +2 -2
- package/dist/node/index.d.mts +3 -3
- package/dist/node/index.mjs +2 -2
- package/dist/recipes/common-rpc-functions.d.mts +3 -3
- package/dist/recipes/interactive-auth.d.mts +2 -2
- package/dist/recipes/interactive-auth.mjs +1 -1
- package/dist/rpc/dump.d.mts +1 -1
- package/dist/rpc/index.d.mts +2 -2
- package/dist/rpc/transports/sse-client.d.mts +1 -1
- package/dist/rpc/transports/sse-server.d.mts +2 -2
- 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-server.d.mts +1 -1
- package/dist/{rpc-core-CGctXToO.d.mts → rpc-core-B4Qm66Qt.d.mts} +3 -3
- package/dist/{rpc-core-CqcJkAu9.mjs → rpc-core-Cva-0pw0.mjs} +1 -1
- package/dist/{sse-client-BsIK3hMD.d.mts → sse-client-CFBOIaUi.d.mts} +1 -1
- package/dist/{storage-BcmVEJRc.mjs → storage-CaUVrBrG.mjs} +1 -1
- package/dist/types/index.d.mts +4 -4
- package/dist/{types-CnJSgRVa.d.mts → types-Djq7CBXh.d.mts} +0 -7
- package/dist/utils/agent-tool-name.d.mts +0 -3
- package/dist/utils/agent-tool-name.mjs +0 -3
- 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-CdNuATYa.d.mts → ws-client-DhjNyQo3.d.mts} +1 -1
- package/dist/{ws-server-Ces08fjP.d.mts → ws-server-D1d3QM9f.d.mts} +1 -1
- package/package.json +1 -2
- package/skills/devframe/SKILL.md +6 -6
- package/dist/_shared-CttmCMBi.mjs +0 -70
- package/dist/helpers/vite.d.mts +0 -104
- package/dist/helpers/vite.mjs +0 -93
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import { At as
|
|
2
|
-
import { v as RpcFunctionDefinitionAny } from "../types-
|
|
3
|
-
import { a as InstanceShellInit, c as StartedServer, d as samePath, f as DevframeInstanceRecord, h as registerDevframeInstance, i as InstanceShellApi, l as createInstanceShell, m as listLiveDevframeInstances, n as InstanceRegisterConfig, o as InstanceShellInternals, p as DevframeInstanceRegistration, r as InstanceShell, s as InstanceWsTier, t as CreateInstanceShellOptions, u as resolveInstanceRegister } from "../instance-shell-
|
|
4
|
-
import { n as
|
|
1
|
+
import { At as AgentToolProviderHandle, B as DevframeHost, Ct as AgentManifest, Dt as AgentTool, Et as AgentResourceInput, Mt as DevframeAgentHostEvents, Nt as EventEmitter, Ot as AgentToolInput, S as DevframeNodeContext, St as AgentHandle, Tt as AgentResourceContent, jt as DevframeAgentHost$1, kt as AgentToolProvider, wt as AgentResource } from "../devframe-5oblos7I.mjs";
|
|
2
|
+
import { v as RpcFunctionDefinitionAny } from "../types-Djq7CBXh.mjs";
|
|
3
|
+
import { a as InstanceShellInit, c as StartedServer, d as samePath, f as DevframeInstanceRecord, h as registerDevframeInstance, i as InstanceShellApi, l as createInstanceShell, m as listLiveDevframeInstances, n as InstanceRegisterConfig, o as InstanceShellInternals, p as DevframeInstanceRegistration, r as InstanceShell, s as InstanceWsTier, t as CreateInstanceShellOptions, u as resolveInstanceRegister } from "../instance-shell-B-BSVp37.mjs";
|
|
4
|
+
import { n as normalizeBasePath, r as resolveBasePath } from "../_shared-Bm8p4-fD.mjs";
|
|
5
|
+
import { n as CreateContextRpcServerOptions, r as createContextRpcServer, t as ContextRpcServer } from "../rpc-core-B4Qm66Qt.mjs";
|
|
6
|
+
import { Diagnostic } from "nostics";
|
|
5
7
|
//#region src/node/agent-args.d.ts
|
|
6
8
|
/**
|
|
7
9
|
* How {@link coerceAgentPositionalArgs} treats an args object that carries
|
|
@@ -27,19 +29,210 @@ type AgentArgsFallback = 'wrap' | 'drop';
|
|
|
27
29
|
* - without schemas, `arg0`/`arg1`/… keys are collected when present
|
|
28
30
|
* - an empty object becomes a zero-argument call
|
|
29
31
|
* - anything else follows the {@link AgentArgsFallback}
|
|
30
|
-
*
|
|
31
|
-
* @experimental
|
|
32
32
|
*/
|
|
33
33
|
declare function coerceAgentPositionalArgs(args: unknown, schemas: readonly unknown[] | undefined, fallback?: AgentArgsFallback): unknown[];
|
|
34
34
|
//#endregion
|
|
35
|
+
//#region src/utils/diagnostics-reporter.d.ts
|
|
36
|
+
interface DevframeReporterOptions {
|
|
37
|
+
method?: 'log' | 'warn' | 'error';
|
|
38
|
+
}
|
|
39
|
+
declare function devframeReporter(d: Diagnostic, { method }?: DevframeReporterOptions): void;
|
|
40
|
+
//#endregion
|
|
41
|
+
//#region src/node/diagnostics.d.ts
|
|
42
|
+
declare const diagnostics: import("nostics").Diagnostics<{
|
|
43
|
+
readonly DF0006: {
|
|
44
|
+
readonly why: (p: {
|
|
45
|
+
name: string;
|
|
46
|
+
}) => string;
|
|
47
|
+
};
|
|
48
|
+
readonly DF0007: {
|
|
49
|
+
readonly why: "AsyncLocalStorage is not set, it likely to be an internal bug of the Devframe foundation";
|
|
50
|
+
};
|
|
51
|
+
readonly DF0008: {
|
|
52
|
+
readonly why: (p: {
|
|
53
|
+
distDir: string;
|
|
54
|
+
}) => string;
|
|
55
|
+
};
|
|
56
|
+
readonly DF0012: {
|
|
57
|
+
readonly why: (p: {
|
|
58
|
+
filepath: string;
|
|
59
|
+
}) => string;
|
|
60
|
+
};
|
|
61
|
+
readonly DF0013: {
|
|
62
|
+
readonly why: (p: {
|
|
63
|
+
key: string;
|
|
64
|
+
}) => string;
|
|
65
|
+
};
|
|
66
|
+
readonly DF0014: {
|
|
67
|
+
readonly why: (p: {
|
|
68
|
+
name: string;
|
|
69
|
+
}) => string;
|
|
70
|
+
readonly fix: "Provide a short description (~1–3 sentences) explaining what the tool does and when agents should invoke it.";
|
|
71
|
+
};
|
|
72
|
+
readonly DF0015: {
|
|
73
|
+
readonly why: (p: {
|
|
74
|
+
id: string;
|
|
75
|
+
}) => string;
|
|
76
|
+
readonly fix: "Tool ids must be unique across RPC functions with an `agent` field and tools registered via `ctx.agent.registerTool()`.";
|
|
77
|
+
};
|
|
78
|
+
readonly DF0016: {
|
|
79
|
+
readonly why: (p: {
|
|
80
|
+
id: string;
|
|
81
|
+
}) => string;
|
|
82
|
+
};
|
|
83
|
+
readonly DF0017: {
|
|
84
|
+
readonly why: (p: {
|
|
85
|
+
transport: string;
|
|
86
|
+
reason: string;
|
|
87
|
+
}) => string;
|
|
88
|
+
};
|
|
89
|
+
readonly DF0029: {
|
|
90
|
+
readonly why: (p: {
|
|
91
|
+
channel: string;
|
|
92
|
+
id: string;
|
|
93
|
+
dropped: number;
|
|
94
|
+
}) => string;
|
|
95
|
+
readonly fix: "The consumer is too slow for the producer. Raise `highWaterMark` on the subscription, slow the producer, or batch chunks.";
|
|
96
|
+
};
|
|
97
|
+
readonly DF0030: {
|
|
98
|
+
readonly why: (p: {
|
|
99
|
+
channel: string;
|
|
100
|
+
id: string;
|
|
101
|
+
}) => string;
|
|
102
|
+
readonly fix: "Ensure the server-side producer is running before clients subscribe, or check for typos in the stream id.";
|
|
103
|
+
};
|
|
104
|
+
readonly DF0031: {
|
|
105
|
+
readonly why: (p: {
|
|
106
|
+
channel: string;
|
|
107
|
+
id: string;
|
|
108
|
+
}) => string;
|
|
109
|
+
readonly fix: "Track the producer lifecycle — guard writes with the `stream.signal.aborted` flag.";
|
|
110
|
+
};
|
|
111
|
+
readonly DF0032: {
|
|
112
|
+
readonly why: (p: {
|
|
113
|
+
channel: string;
|
|
114
|
+
}) => string;
|
|
115
|
+
readonly fix: "Each channel name must be unique within a context. Pick a different name or reuse the existing channel handle.";
|
|
116
|
+
};
|
|
117
|
+
readonly DF0033: {
|
|
118
|
+
readonly why: (p: {
|
|
119
|
+
id: string;
|
|
120
|
+
reason: string;
|
|
121
|
+
}) => string;
|
|
122
|
+
readonly fix: "Verify the bridge port is free and the devframe setup function does not throw. Pin a port via `cli.port` / `cli.portRange` on the definition, or via `port` on `devframeViteBridge` (`@devframes/vite`).";
|
|
123
|
+
};
|
|
124
|
+
readonly DF0034: {
|
|
125
|
+
readonly why: (p: {
|
|
126
|
+
namespace: string;
|
|
127
|
+
name: string;
|
|
128
|
+
}) => string;
|
|
129
|
+
readonly fix: "A scoped context auto-namespaces ids. Pass a bare name without a \":\" separator (e.g. `register({ name: \"get-cwd\" })`), or use the unscoped `ctx.base.rpc.register` for a fully-qualified name.";
|
|
130
|
+
};
|
|
131
|
+
readonly DF0035: {
|
|
132
|
+
readonly why: (p: {
|
|
133
|
+
filepath: string;
|
|
134
|
+
}) => string;
|
|
135
|
+
readonly fix: "Check that the storage directory is writable and has free space.";
|
|
136
|
+
};
|
|
137
|
+
readonly DF0036: {
|
|
138
|
+
readonly why: (p: {
|
|
139
|
+
name: string;
|
|
140
|
+
}) => string;
|
|
141
|
+
readonly fix: "Complete the auth handshake (or connect with a static/pre-shared token) before calling a trusted method. Untrusted callers may only call `anonymous:`-prefixed methods — see `isAnonymousRpcMethod`.";
|
|
142
|
+
};
|
|
143
|
+
readonly DF0037: {
|
|
144
|
+
readonly why: (p: {
|
|
145
|
+
id: string;
|
|
146
|
+
}) => string;
|
|
147
|
+
readonly fix: "Service ids are unique per context. Revoke the existing provider first (the `provide()` call returns a revoke function), or namespace the id with your plugin id to avoid collisions.";
|
|
148
|
+
};
|
|
149
|
+
readonly DF0042: {
|
|
150
|
+
readonly why: (p: {
|
|
151
|
+
id: string;
|
|
152
|
+
}) => string;
|
|
153
|
+
readonly fix: "Pass `{ force: true }` to `createBuild()` if the degraded export is still useful to you, or drop `capabilities.build: false` on the definition.";
|
|
154
|
+
};
|
|
155
|
+
readonly DF0045: {
|
|
156
|
+
readonly why: (p: {
|
|
157
|
+
file: string;
|
|
158
|
+
reason: string;
|
|
159
|
+
}) => string;
|
|
160
|
+
readonly fix: "Discovery tooling (`devframe connect`) will not see this instance. Check that the registry directory is writable, point `DEVFRAME_INSTANCES_DIR` at a writable directory, or set `DEVFRAME_DISABLE_INSTANCE_REGISTRY=1` to opt out of registration.";
|
|
161
|
+
};
|
|
162
|
+
readonly DF0046: {
|
|
163
|
+
readonly why: (p: {
|
|
164
|
+
reason: string;
|
|
165
|
+
}) => string;
|
|
166
|
+
readonly fix: "Install it next to devframe (e.g. `npm install @modelcontextprotocol/server`) and run `devframe connect` again.";
|
|
167
|
+
};
|
|
168
|
+
readonly DF0047: {
|
|
169
|
+
readonly why: (p: {
|
|
170
|
+
name: string;
|
|
171
|
+
id: string;
|
|
172
|
+
existing: string;
|
|
173
|
+
}) => string;
|
|
174
|
+
readonly fix: "Wire names derive from tool ids (characters outside [a-zA-Z0-9_-] become \"_\"). Rename one of the two ids so they sanitize to distinct names.";
|
|
175
|
+
};
|
|
176
|
+
readonly DF0048: {
|
|
177
|
+
readonly why: (p: {
|
|
178
|
+
key: string;
|
|
179
|
+
}) => string;
|
|
180
|
+
readonly fix: "Call the devframe_state_read tool without arguments to list the available keys, then retry with one of them.";
|
|
181
|
+
};
|
|
182
|
+
readonly DF0049: {
|
|
183
|
+
readonly why: "The devframe_connect_call-tool tool requires { port: number, tool: string }.";
|
|
184
|
+
readonly fix: "Call devframe_connect_list-instances to get the port and tool names, then retry.";
|
|
185
|
+
};
|
|
186
|
+
readonly DF0050: {
|
|
187
|
+
readonly why: (p: {
|
|
188
|
+
port: number;
|
|
189
|
+
}) => string;
|
|
190
|
+
readonly fix: "Call devframe_connect_list-instances for the current instance list — the instance may have stopped or changed port.";
|
|
191
|
+
};
|
|
192
|
+
readonly DF0051: {
|
|
193
|
+
readonly why: (p: {
|
|
194
|
+
port: number;
|
|
195
|
+
}) => string;
|
|
196
|
+
readonly fix: "Restart the instance with the --mcp flag (or set `cli.mcp: true` on its definition) to expose its tools, then list instances again.";
|
|
197
|
+
};
|
|
198
|
+
readonly DF0052: {
|
|
199
|
+
readonly why: (p: {
|
|
200
|
+
host: string;
|
|
201
|
+
port: number;
|
|
202
|
+
reason: string;
|
|
203
|
+
}) => string;
|
|
204
|
+
readonly fix: "The port is likely already taken by another process (often a previous devframe instance). Free it, or pick another via `--port`, `cli.port` / `cli.portRange` on the definition, or `port` on `devframeViteBridge` (`@devframes/vite`). The original node error is available as `error.cause`.";
|
|
205
|
+
};
|
|
206
|
+
readonly DF0054: {
|
|
207
|
+
readonly why: (p: {
|
|
208
|
+
id: string;
|
|
209
|
+
}) => string;
|
|
210
|
+
readonly fix: "Await `instance.ready` (or any request through `instance.handler`) before reading `connectionMeta()` — the WebSocket binding it describes is only known once initialization completes.";
|
|
211
|
+
};
|
|
212
|
+
readonly DF0055: {
|
|
213
|
+
readonly why: (p: {
|
|
214
|
+
tier: string;
|
|
215
|
+
}) => string;
|
|
216
|
+
readonly fix: "Drop `handleUpgrade`/`attach` and let the configured transport serve the socket, or remove `server` / `ws.port` / `ws.sidecar` from the options so the instance leaves the binding to you.";
|
|
217
|
+
};
|
|
218
|
+
readonly DF0056: {
|
|
219
|
+
readonly why: (p: {
|
|
220
|
+
url: string;
|
|
221
|
+
}) => string;
|
|
222
|
+
readonly fix: "The server behind `ws.url` owns the transport (and its auth). Drop `ws.url` to have the instance serve the socket, or pair it with `server` / `ws.port` / `ws.sidecar` for the tunnel pattern, where a local binding is advertised through the relay.";
|
|
223
|
+
};
|
|
224
|
+
readonly DF0057: {
|
|
225
|
+
readonly why: () => string;
|
|
226
|
+
readonly fix: "Clients connect over the SSE endpoint instead — no upgrade wiring is needed. Remove `ws: false` if the instance should serve a WebSocket after all.";
|
|
227
|
+
};
|
|
228
|
+
}, readonly [typeof devframeReporter]>;
|
|
229
|
+
//#endregion
|
|
35
230
|
//#region src/node/host-agent.d.ts
|
|
36
231
|
/**
|
|
37
232
|
* Framework-neutral host aggregating the agent-exposed surface of a
|
|
38
233
|
* devframe. Auto-discovers RPC functions with an `agent` field from
|
|
39
234
|
* `ctx.rpc.definitions`, and accepts plugin-registered tools /
|
|
40
235
|
* resources via `registerTool` / `registerResource`.
|
|
41
|
-
*
|
|
42
|
-
* @experimental
|
|
43
236
|
*/
|
|
44
237
|
declare class DevframeAgentHost implements DevframeAgentHost$1 {
|
|
45
238
|
readonly context: DevframeNodeContext;
|
|
@@ -147,4 +340,4 @@ declare function peekRpcWireFrame(raw: string): {
|
|
|
147
340
|
i?: string;
|
|
148
341
|
};
|
|
149
342
|
//#endregion
|
|
150
|
-
export { type AgentArgsFallback, type ContextRpcServer, type CreateContextRpcServerOptions, CreateH3DevframeHostOptions, type CreateInstanceShellOptions, DevframeAgentHost, type DevframeInstanceRecord, type DevframeInstanceRegistration, type InstanceRegisterConfig, type InstanceShell, type InstanceShellApi, type InstanceShellInit, type InstanceShellInternals, type InstanceWsTier, type RpcWireCodec, type StartedServer, coerceAgentPositionalArgs, createContextRpcServer, createH3DevframeHost, createInstanceShell, createRpcWireCodec, listLiveDevframeInstances, normalizeHttpServerUrl, peekRpcWireFrame, registerDevframeInstance, resolveInstanceRegister, samePath };
|
|
343
|
+
export { type AgentArgsFallback, type ContextRpcServer, type CreateContextRpcServerOptions, CreateH3DevframeHostOptions, type CreateInstanceShellOptions, DevframeAgentHost, type DevframeInstanceRecord, type DevframeInstanceRegistration, type InstanceRegisterConfig, type InstanceShell, type InstanceShellApi, type InstanceShellInit, type InstanceShellInternals, type InstanceWsTier, type RpcWireCodec, type StartedServer, coerceAgentPositionalArgs, createContextRpcServer, createH3DevframeHost, createInstanceShell, createRpcWireCodec, diagnostics, listLiveDevframeInstances, normalizeBasePath, normalizeHttpServerUrl, peekRpcWireFrame, registerDevframeInstance, resolveBasePath, resolveInstanceRegister, samePath };
|
package/dist/internal/index.mjs
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { n as peekRpcWireFrame, t as createRpcWireCodec } from "../wire-codec-9VhIKnyp.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { t as diagnostics } from "../diagnostics-C7IGWppM.mjs";
|
|
3
|
+
import { n as coerceAgentPositionalArgs, t as DevframeAgentHost } from "../host-agent-BBkKT27Q.mjs";
|
|
4
|
+
import { n as resolveBasePath, t as normalizeBasePath } from "../_shared-CGPVmXUM.mjs";
|
|
3
5
|
import { t as createH3DevframeHost } from "../host-h3-CzCZwtuV.mjs";
|
|
4
|
-
import { i as registerDevframeInstance, n as listLiveDevframeInstances } from "../instance-registry-
|
|
5
|
-
import { i as normalizeHttpServerUrl, n as resolveInstanceRegister, r as samePath, t as createInstanceShell } from "../instance-shell-
|
|
6
|
-
import { t as createContextRpcServer } from "../rpc-core-
|
|
7
|
-
export { DevframeAgentHost, coerceAgentPositionalArgs, createContextRpcServer, createH3DevframeHost, createInstanceShell, createRpcWireCodec, listLiveDevframeInstances, normalizeHttpServerUrl, peekRpcWireFrame, registerDevframeInstance, resolveInstanceRegister, samePath };
|
|
6
|
+
import { i as registerDevframeInstance, n as listLiveDevframeInstances } from "../instance-registry-Du_hbx-j.mjs";
|
|
7
|
+
import { i as normalizeHttpServerUrl, n as resolveInstanceRegister, r as samePath, t as createInstanceShell } from "../instance-shell-B0TwOxCl.mjs";
|
|
8
|
+
import { t as createContextRpcServer } from "../rpc-core-Cva-0pw0.mjs";
|
|
9
|
+
export { DevframeAgentHost, coerceAgentPositionalArgs, createContextRpcServer, createH3DevframeHost, createInstanceShell, createRpcWireCodec, diagnostics, listLiveDevframeInstances, normalizeBasePath, normalizeHttpServerUrl, peekRpcWireFrame, registerDevframeInstance, resolveBasePath, resolveInstanceRegister, samePath };
|
package/dist/node/auth.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { p as DevframeAuthHandler } from "../devframe-
|
|
2
|
-
import { a as verifyAuthToken, i as refreshTempAuthCode, n as exchangeTempAuthCode, o as revokeActiveConnectionsForToken, r as getTempAuthCode, s as revokeAuthToken, t as buildOtpAuthUrl } from "../index-
|
|
1
|
+
import { p as DevframeAuthHandler } from "../devframe-5oblos7I.mjs";
|
|
2
|
+
import { a as verifyAuthToken, i as refreshTempAuthCode, n as exchangeTempAuthCode, o as revokeActiveConnectionsForToken, r as getTempAuthCode, s as revokeAuthToken, t as buildOtpAuthUrl } from "../index-BzDl02lt.mjs";
|
|
3
3
|
export { DevframeAuthHandler, buildOtpAuthUrl, exchangeTempAuthCode, getTempAuthCode, refreshTempAuthCode, revokeActiveConnectionsForToken, revokeAuthToken, verifyAuthToken };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { a as internalContextMap, i as getInternalContext, n as InternalAnonymousAuthStorage, r as RemoteTokenRecord, t as DevframeInternalContext } from "../context-
|
|
2
|
-
import { n as normalizeBasePath, r as resolveBasePath } from "../_shared-
|
|
1
|
+
import { a as internalContextMap, i as getInternalContext, n as InternalAnonymousAuthStorage, r as RemoteTokenRecord, t as DevframeInternalContext } from "../context-DV4uWieM.mjs";
|
|
2
|
+
import { n as normalizeBasePath, r as resolveBasePath } from "../_shared-Bm8p4-fD.mjs";
|
|
3
3
|
export { type DevframeInternalContext, type InternalAnonymousAuthStorage, type RemoteTokenRecord, getInternalContext, internalContextMap, normalizeBasePath, resolveBasePath };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { n as resolveBasePath, t as normalizeBasePath } from "../_shared-
|
|
2
|
-
import { n as internalContextMap, t as getInternalContext } from "../context-
|
|
1
|
+
import { n as resolveBasePath, t as normalizeBasePath } from "../_shared-CGPVmXUM.mjs";
|
|
2
|
+
import { n as internalContextMap, t as getInternalContext } from "../context-CMSryXs-.mjs";
|
|
3
3
|
export { getInternalContext, internalContextMap, normalizeBasePath, resolveBasePath };
|
package/dist/node/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "../index-
|
|
3
|
-
import { v as RpcFunctionDefinitionAny } from "../types-
|
|
1
|
+
import { B as DevframeHost, J as RpcFunctionsHost, S as DevframeNodeContext, _t as SharedState } from "../devframe-5oblos7I.mjs";
|
|
2
|
+
import "../index-tdrk1bzV.mjs";
|
|
3
|
+
import { v as RpcFunctionDefinitionAny } from "../types-Djq7CBXh.mjs";
|
|
4
4
|
import { BirpcGroup } from "birpc";
|
|
5
5
|
//#region src/node/context.d.ts
|
|
6
6
|
interface CreateHostContextOptions {
|
package/dist/node/index.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { t as createStorage } from "../storage-
|
|
2
|
-
import { t as createHostContext } from "../context-
|
|
1
|
+
import { t as createStorage } from "../storage-CaUVrBrG.mjs";
|
|
2
|
+
import { t as createHostContext } from "../context-b6iSomtv.mjs";
|
|
3
3
|
export { createHostContext, createStorage };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "../devframe-
|
|
2
|
-
import "../index-
|
|
3
|
-
import { E as Thenable, S as RpcFunctionSetupResult, c as RpcDump, g as RpcFunctionAgentOptions } from "../types-
|
|
1
|
+
import "../devframe-5oblos7I.mjs";
|
|
2
|
+
import "../index-tdrk1bzV.mjs";
|
|
3
|
+
import { E as Thenable, S as RpcFunctionSetupResult, c as RpcDump, g as RpcFunctionAgentOptions } from "../types-Djq7CBXh.mjs";
|
|
4
4
|
import { SimpleSchema } from "../utils/simple-schema.mjs";
|
|
5
5
|
//#region src/recipes/common-rpc-functions.d.ts
|
|
6
6
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "../index-
|
|
1
|
+
import { S as DevframeNodeContext, p as DevframeAuthHandler } from "../devframe-5oblos7I.mjs";
|
|
2
|
+
import "../index-BzDl02lt.mjs";
|
|
3
3
|
//#region src/recipes/interactive-auth.d.ts
|
|
4
4
|
interface CreateInteractiveAuthOptions {
|
|
5
5
|
/**
|
|
@@ -2,7 +2,7 @@ import { n as colors } from "../diagnostics-reporter-CsIG85Q5.mjs";
|
|
|
2
2
|
import { n as defineRpcFunction } from "../define-BLWPsH6y.mjs";
|
|
3
3
|
import { isAnonymousRpcMethod } from "../constants.mjs";
|
|
4
4
|
import { a as verifyAuthToken, n as exchangeTempAuthCode, r as getTempAuthCode, t as buildOtpAuthUrl } from "../state-BeUHDDjk.mjs";
|
|
5
|
-
import { t as getInternalContext } from "../context-
|
|
5
|
+
import { t as getInternalContext } from "../context-CMSryXs-.mjs";
|
|
6
6
|
import { t as s } from "../simple-schema-DQPZrAaZ.mjs";
|
|
7
7
|
//#region src/recipes/interactive-auth.ts
|
|
8
8
|
function defaultBanner(info) {
|
package/dist/rpc/dump.d.mts
CHANGED
|
@@ -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-Djq7CBXh.mjs";
|
|
2
2
|
//#region src/rpc/dump/collect.d.ts
|
|
3
3
|
/**
|
|
4
4
|
* Collects pre-computed dumps by executing functions with their defined input combinations.
|
package/dist/rpc/index.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { a as STRUCTURED_CLONE_PREFIX, c as getRpcResolvedSetupResult, d as RpcFunctionsCollectorBase, f as RpcCacheManager, i as validateRpcReturn, l as createDefineWrapperWithContext, n as validateDefinitions, o as strictJsonStringify, p as RpcCacheOptions, r as validateRpcArgs, s as getRpcHandler, t as validateDefinition, u as defineRpcFunction } from "../index-
|
|
2
|
-
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-
|
|
1
|
+
import { a as STRUCTURED_CLONE_PREFIX, c as getRpcResolvedSetupResult, d as RpcFunctionsCollectorBase, f as RpcCacheManager, i as validateRpcReturn, l as createDefineWrapperWithContext, n as validateDefinitions, o as strictJsonStringify, p as RpcCacheOptions, r as validateRpcArgs, s as getRpcHandler, t as validateDefinition, u as defineRpcFunction } from "../index-tdrk1bzV.mjs";
|
|
2
|
+
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-Djq7CBXh.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, Thenable, createDefineWrapperWithContext, defineRpcFunction, getRpcHandler, getRpcResolvedSetupResult, strictJsonStringify, validateDefinition, validateDefinitions, validateRpcArgs, validateRpcReturn };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as createSseRpcChannel, t as SseRpcChannelOptions } from "../../sse-client-
|
|
1
|
+
import { n as createSseRpcChannel, t as SseRpcChannelOptions } from "../../sse-client-CFBOIaUi.mjs";
|
|
2
2
|
export { SseRpcChannelOptions, createSseRpcChannel };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { v as RpcFunctionDefinitionAny } from "../../types-
|
|
2
|
-
import { d as DevframeRpcConnection, n as WsOriginRegistry, u as DevframeNodeRpcSessionMeta } from "../../ws-server-
|
|
1
|
+
import { v as RpcFunctionDefinitionAny } from "../../types-Djq7CBXh.mjs";
|
|
2
|
+
import { d as DevframeRpcConnection, n as WsOriginRegistry, u as DevframeNodeRpcSessionMeta } from "../../ws-server-D1d3QM9f.mjs";
|
|
3
3
|
import { BirpcGroup } from "birpc";
|
|
4
4
|
//#region src/rpc/transports/sse-server.d.ts
|
|
5
5
|
interface SseRpcTransportOptions {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as WsOriginRegistry } from "../../ws-server-
|
|
2
|
-
import { t as ContextRpcServer } from "../../rpc-core-
|
|
1
|
+
import { n as WsOriginRegistry } from "../../ws-server-D1d3QM9f.mjs";
|
|
2
|
+
import { t as ContextRpcServer } from "../../rpc-core-B4Qm66Qt.mjs";
|
|
3
3
|
//#region src/rpc/transports/ws-bun.d.ts
|
|
4
4
|
interface AttachBunWsTransportOptions {
|
|
5
5
|
/** Same contract as `WsRpcTransportOptions.allowedOrigins`. */
|
|
@@ -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-DhjNyQo3.mjs";
|
|
2
2
|
export { WsRpcChannelOptions, createWsRpcChannel };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as attachWsRpcTransport, c as isAllowedOrigin, d as DevframeRpcConnection, f as DevframeRpcConnectionRequest, i as WsRpcTransportOptions, l as isLoopbackHostname, n as WsOriginRegistry, o as createWsOriginRegistry, p as DevframeRpcTransportKind, r as WsRpcTransport, s as createWsRpcPeerHooks, t as CreateWsOriginRegistryOptions, u as DevframeNodeRpcSessionMeta } from "../../ws-server-
|
|
1
|
+
import { a as attachWsRpcTransport, c as isAllowedOrigin, d as DevframeRpcConnection, f as DevframeRpcConnectionRequest, i as WsRpcTransportOptions, l as isLoopbackHostname, n as WsOriginRegistry, o as createWsOriginRegistry, p as DevframeRpcTransportKind, r as WsRpcTransport, s as createWsRpcPeerHooks, t as CreateWsOriginRegistryOptions, u as DevframeNodeRpcSessionMeta } from "../../ws-server-D1d3QM9f.mjs";
|
|
2
2
|
export { CreateWsOriginRegistryOptions, type DevframeNodeRpcSessionMeta, type DevframeRpcConnection, type DevframeRpcConnectionRequest, type DevframeRpcTransportKind, WsOriginRegistry, WsRpcTransport, WsRpcTransportOptions, attachWsRpcTransport, createWsOriginRegistry, createWsRpcPeerHooks, isAllowedOrigin, isLoopbackHostname };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { d as DevframeRpcConnection, u as DevframeNodeRpcSessionMeta } from "./ws-server-
|
|
3
|
-
import "./index-
|
|
1
|
+
import { K as DevframeNodeRpcSession, S as DevframeNodeContext, et as DevframeRpcClientFunctions, p as DevframeAuthHandler, tt as DevframeRpcServerFunctions } from "./devframe-5oblos7I.mjs";
|
|
2
|
+
import { d as DevframeRpcConnection, u as DevframeNodeRpcSessionMeta } from "./ws-server-D1d3QM9f.mjs";
|
|
3
|
+
import "./index-BzDl02lt.mjs";
|
|
4
4
|
import { BirpcGroup, EventOptions } from "birpc";
|
|
5
5
|
//#region src/node/rpc-core.d.ts
|
|
6
6
|
interface CreateContextRpcServerOptions {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as __exportAll } from "./rolldown-runtime-JspESFgx.mjs";
|
|
2
2
|
import { createRpcServer } from "./rpc/server.mjs";
|
|
3
|
-
import { t as diagnostics } from "./diagnostics-
|
|
3
|
+
import { t as diagnostics } from "./diagnostics-C7IGWppM.mjs";
|
|
4
4
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
5
5
|
//#region src/node/rpc-core.ts
|
|
6
6
|
var rpc_core_exports = /* @__PURE__ */ __exportAll({ createContextRpcServer: () => createContextRpcServer });
|
package/dist/types/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as
|
|
2
|
-
import { g as RpcFunctionAgentOptions } from "../types-
|
|
3
|
-
import { d as DevframeRpcConnection, f as DevframeRpcConnectionRequest, p as DevframeRpcTransportKind, u as DevframeNodeRpcSessionMeta } from "../ws-server-
|
|
4
|
-
export { AgentHandle, AgentManifest, AgentResource, AgentResourceContent, AgentResourceInput, AgentTool, AgentToolInput, AgentToolProvider, AgentToolProviderHandle, ConnectionMeta, ConnectionMetaSse, ConnectionMetaWebsocket, DevframeAgentHost, DevframeAgentHostEvents, DevframeBrowserContext, DevframeCapabilities, DevframeCliOptions, DevframeDefineDiagnosticsOptions, DevframeDefinition, DevframeDeploymentKind, DevframeDiagnosticsDefinition, DevframeDiagnosticsHost, DevframeDiagnosticsLogger, DevframeDockDefaults, DevframeDuplicationStrategy, DevframeHost, DevframeNodeContext, DevframeNodeRpcSession, type DevframeNodeRpcSessionMeta, DevframeRpcClientFunctions, type DevframeRpcConnection, type DevframeRpcConnectionRequest, DevframeRpcServerFunctions, DevframeRpcSharedStates, type DevframeRpcTransportKind, DevframeRuntime, DevframeScopedNodeContext, DevframeScopedNodeRpc, DevframeScopedStreamingHost, DevframeServiceId, DevframeServiceOf, DevframeServicesHost, DevframeServicesRegistry, DevframeSettings, DevframeSettingsRegistry, DevframeSettingsStore, DevframeSetupInfo, DevframeSpaOptions, DevframeSseOptions, DevframeStorageScope, DevframeViewHost, DevframeWsOptions, EntriesToObject, EventEmitter, EventUnsubscribe, EventsMap, McpRouteOptions, PartialWithoutId, RpcBroadcastOptions, type RpcFunctionAgentOptions, RpcFunctionsHost, RpcSharedStateGetOptions, RpcSharedStateHost, RpcStreamingChannel, RpcStreamingChannelOptions, RpcStreamingHost, ScopedBroadcastOptions, ScopedClientFunctions, ScopedRpcFn, ScopedServerFunctions, ScopedSharedStates, SettingsForNamespace, Thenable };
|
|
1
|
+
import { $ as RpcStreamingHost, A as DevframeSettings, At as AgentToolProviderHandle, B as DevframeHost, C as DevframeServiceId, Ct as AgentManifest, D as DevframeScopedNodeContext, Dt as AgentTool, E as DevframeServicesRegistry, Et as AgentResourceInput, F as ScopedRpcFn, Ft as EventsMap, G as DevframeDiagnosticsLogger, H as DevframeDefineDiagnosticsOptions, I as ScopedServerFunctions, J as RpcFunctionsHost, K as DevframeNodeRpcSession, L as ScopedSharedStates, M as DevframeSettingsStore, Mt as DevframeAgentHostEvents, N as ScopedBroadcastOptions, Nt as EventEmitter, O as DevframeScopedNodeRpc, Ot as AgentToolInput, P as ScopedClientFunctions, Pt as EventUnsubscribe, Q as RpcStreamingChannelOptions, R as SettingsForNamespace, S as DevframeNodeContext, St as AgentHandle, T as DevframeServicesHost, Tt as AgentResourceContent, U as DevframeDiagnosticsDefinition, V as DevframeStorageScope, W as DevframeDiagnosticsHost, X as RpcSharedStateHost, Y as RpcSharedStateGetOptions, Z as RpcStreamingChannel, _ as ConnectionMeta, a as DevframeDockDefaults, b as DevframeCapabilities, c as DevframeSetupInfo, d as DevframeWsOptions, et as DevframeRpcClientFunctions, f as McpRouteOptions, g as Thenable, h as PartialWithoutId, i as DevframeDeploymentKind, j as DevframeSettingsRegistry, jt as DevframeAgentHost, k as DevframeScopedStreamingHost, kt as AgentToolProvider, l as DevframeSpaOptions, m as EntriesToObject, n as DevframeCliOptions, nt as DevframeRpcSharedStates, o as DevframeDuplicationStrategy, q as RpcBroadcastOptions, r as DevframeDefinition, s as DevframeRuntime, t as DevframeBrowserContext, tt as DevframeRpcServerFunctions, u as DevframeSseOptions, v as ConnectionMetaSse, w as DevframeServiceOf, wt as AgentResource, x as DevframeConnectionConfigsRegistry, y as ConnectionMetaWebsocket, z as DevframeViewHost } from "../devframe-5oblos7I.mjs";
|
|
2
|
+
import { g as RpcFunctionAgentOptions } from "../types-Djq7CBXh.mjs";
|
|
3
|
+
import { d as DevframeRpcConnection, f as DevframeRpcConnectionRequest, p as DevframeRpcTransportKind, u as DevframeNodeRpcSessionMeta } from "../ws-server-D1d3QM9f.mjs";
|
|
4
|
+
export { AgentHandle, AgentManifest, AgentResource, AgentResourceContent, AgentResourceInput, AgentTool, AgentToolInput, AgentToolProvider, AgentToolProviderHandle, ConnectionMeta, ConnectionMetaSse, ConnectionMetaWebsocket, DevframeAgentHost, DevframeAgentHostEvents, DevframeBrowserContext, DevframeCapabilities, DevframeCliOptions, DevframeConnectionConfigsRegistry, DevframeDefineDiagnosticsOptions, DevframeDefinition, DevframeDeploymentKind, DevframeDiagnosticsDefinition, DevframeDiagnosticsHost, DevframeDiagnosticsLogger, DevframeDockDefaults, DevframeDuplicationStrategy, DevframeHost, DevframeNodeContext, DevframeNodeRpcSession, type DevframeNodeRpcSessionMeta, DevframeRpcClientFunctions, type DevframeRpcConnection, type DevframeRpcConnectionRequest, DevframeRpcServerFunctions, DevframeRpcSharedStates, type DevframeRpcTransportKind, DevframeRuntime, DevframeScopedNodeContext, DevframeScopedNodeRpc, DevframeScopedStreamingHost, DevframeServiceId, DevframeServiceOf, DevframeServicesHost, DevframeServicesRegistry, DevframeSettings, DevframeSettingsRegistry, DevframeSettingsStore, DevframeSetupInfo, DevframeSpaOptions, DevframeSseOptions, DevframeStorageScope, DevframeViewHost, DevframeWsOptions, EntriesToObject, EventEmitter, EventUnsubscribe, EventsMap, McpRouteOptions, PartialWithoutId, RpcBroadcastOptions, type RpcFunctionAgentOptions, RpcFunctionsHost, RpcSharedStateGetOptions, RpcSharedStateHost, RpcStreamingChannel, RpcStreamingChannelOptions, RpcStreamingHost, ScopedBroadcastOptions, ScopedClientFunctions, ScopedRpcFn, ScopedServerFunctions, ScopedSharedStates, SettingsForNamespace, Thenable };
|
|
@@ -24,9 +24,6 @@ type RpcFunctionType = 'static' | 'action' | 'event' | 'query';
|
|
|
24
24
|
* the function is surfaced to agents (e.g. via the devframe MCP adapter)
|
|
25
25
|
* as a callable tool. Functions without an `agent` field are not exposed —
|
|
26
26
|
* default-deny.
|
|
27
|
-
*
|
|
28
|
-
* @experimental The agent-native surface is experimental and may change
|
|
29
|
-
* without a major version bump until it stabilizes.
|
|
30
27
|
*/
|
|
31
28
|
interface RpcFunctionAgentOptions {
|
|
32
29
|
/**
|
|
@@ -233,8 +230,6 @@ type RpcFunctionDefinition<NAME extends string, TYPE extends RpcFunctionType = '
|
|
|
233
230
|
/**
|
|
234
231
|
* Expose this function to agents (e.g. via the MCP adapter).
|
|
235
232
|
* When omitted, the function is not agent-exposed (default-deny).
|
|
236
|
-
*
|
|
237
|
-
* @experimental
|
|
238
233
|
*/
|
|
239
234
|
agent?: RpcFunctionAgentOptions;
|
|
240
235
|
/** Setup function called with context to initialize handler and dump */
|
|
@@ -280,8 +275,6 @@ type RpcFunctionDefinition<NAME extends string, TYPE extends RpcFunctionType = '
|
|
|
280
275
|
/**
|
|
281
276
|
* Expose this function to agents (e.g. via the MCP adapter).
|
|
282
277
|
* When omitted, the function is not agent-exposed (default-deny).
|
|
283
|
-
*
|
|
284
|
-
* @experimental
|
|
285
278
|
*/
|
|
286
279
|
agent?: RpcFunctionAgentOptions;
|
|
287
280
|
/** Setup function called with context to initialize handler and dump */
|
|
@@ -18,9 +18,6 @@
|
|
|
18
18
|
* A plain string transform with no node dependency, so browser-side UIs
|
|
19
19
|
* that display a tool's id (e.g. the inspect plugin's agent view) can
|
|
20
20
|
* import it too and show the name a client actually calls.
|
|
21
|
-
*
|
|
22
|
-
* @experimental The agent-native surface is experimental and may change
|
|
23
|
-
* without a major version bump until it stabilizes.
|
|
24
21
|
*/
|
|
25
22
|
declare function toAgentToolName(id: string): string;
|
|
26
23
|
//#endregion
|
|
@@ -23,9 +23,6 @@ const MAX_TOOL_NAME_LENGTH = 128;
|
|
|
23
23
|
* A plain string transform with no node dependency, so browser-side UIs
|
|
24
24
|
* that display a tool's id (e.g. the inspect plugin's agent view) can
|
|
25
25
|
* import it too and show the name a client actually calls.
|
|
26
|
-
*
|
|
27
|
-
* @experimental The agent-native surface is experimental and may change
|
|
28
|
-
* without a major version bump until it stabilizes.
|
|
29
26
|
*/
|
|
30
27
|
function toAgentToolName(id) {
|
|
31
28
|
return id.replace(/[^\w-]+/g, "_").slice(0, MAX_TOOL_NAME_LENGTH);
|
package/dist/utils/events.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { _t as
|
|
1
|
+
import { _t as SharedState, bt as SharedStatePatch, ft as Immutable, gt as ImmutableSet, ht as ImmutableObject, mt as ImmutableMap, pt as ImmutableArray, vt as SharedStateEvents, xt as createSharedState, yt as SharedStateOptions } from "../devframe-5oblos7I.mjs";
|
|
2
2
|
export { Immutable, ImmutableArray, ImmutableMap, ImmutableObject, ImmutableSet, SharedState, SharedStateEvents, SharedStateOptions, SharedStatePatch, createSharedState };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { at as
|
|
1
|
+
import { at as CreateStreamSinkOptions, ct as StreamSink, dt as createStreamSink, it as CreateStreamReaderOptions, lt as StreamSinkEvents, ot as StreamErrorPayload, rt as BufferedChunk, st as StreamReader, ut as createStreamReader } from "../devframe-5oblos7I.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-Djq7CBXh.mjs";
|
|
2
2
|
import { BirpcGroup, ChannelOptions } from "birpc";
|
|
3
3
|
import { Hooks, Peer } from "crossws";
|
|
4
4
|
import { NodeAdapter } from "crossws/adapters/node";
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "devframe",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.9.0-beta.
|
|
4
|
+
"version": "0.9.0-beta.4",
|
|
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",
|
|
@@ -27,7 +27,6 @@
|
|
|
27
27
|
"./adapters/mcp": "./dist/adapters/mcp.mjs",
|
|
28
28
|
"./client": "./dist/client/index.mjs",
|
|
29
29
|
"./constants": "./dist/constants.mjs",
|
|
30
|
-
"./helpers/vite": "./dist/helpers/vite.mjs",
|
|
31
30
|
"./initiate": "./dist/adapters/initiate.mjs",
|
|
32
31
|
"./internal": "./dist/internal/index.mjs",
|
|
33
32
|
"./node": "./dist/node/index.mjs",
|
package/skills/devframe/SKILL.md
CHANGED
|
@@ -36,11 +36,11 @@ All adapter factories share the shape `createXxx(devframeDef, options?)`.
|
|
|
36
36
|
| Self-contained static deploy with baked data | `createBuild(def, options?)` | `devframe/adapters/build` |
|
|
37
37
|
| Mount into a host (Vite DevTools or any compatible host) | `createPluginFromDevframe(def, options?)` | `@vitejs/devtools-kit/node` |
|
|
38
38
|
| Register dynamically at runtime | `createEmbedded(def, { ctx })` | `devframe/adapters/embedded` |
|
|
39
|
-
| Expose to coding agents (MCP) | `createMcpServer(def, options?)` | `devframe/adapters/mcp`
|
|
39
|
+
| Expose to coding agents (MCP) | `createMcpServer(def, options?)` | `devframe/adapters/mcp` |
|
|
40
40
|
|
|
41
41
|
The same `DevframeDefinition` runs under every adapter - pick based on deployment, not on what the tool does.
|
|
42
42
|
|
|
43
|
-
For Vite-based hosts that don't use the kit (Nuxt, Astro, SolidStart, plain Vite apps),
|
|
43
|
+
For Vite-based hosts that don't use the kit (Nuxt, Astro, SolidStart, plain Vite apps), `@devframes/vite` exports `devframeVitePlugin(def, options?)` (static SPA mount) and `devframeViteBridge(def, options?)` (RPC + WS bridge alongside the host's dev server) - plus `devframeVite(def, { bridge, ...options })` as a convenience wrapper over both. Not an adapter; just a Vite integration helper.
|
|
44
44
|
|
|
45
45
|
## Minimum viable devframe
|
|
46
46
|
|
|
@@ -243,7 +243,7 @@ A [scoped context](#scoped-context-preferred) applies this prefix for you - `ctx
|
|
|
243
243
|
| `ctx.rpc` | Register RPC functions, broadcast, shared state, streaming channels |
|
|
244
244
|
| `ctx.views` | Serve static files via `hostStatic(base, distDir)` |
|
|
245
245
|
| `ctx.diagnostics` | Structured diagnostics host (nostics) - register custom error codes |
|
|
246
|
-
| `ctx.agent` | Expose tools + resources to coding agents
|
|
246
|
+
| `ctx.agent` | Expose tools + resources to coding agents |
|
|
247
247
|
| `ctx.host` | Runtime abstraction - `mountStatic`, `resolveOrigin`, `getStorageDir` |
|
|
248
248
|
| `ctx.mode` | `'dev'` or `'build'` - gate setup work per runtime |
|
|
249
249
|
|
|
@@ -440,7 +440,7 @@ when: 'my-inspector.ready && count >= 10'
|
|
|
440
440
|
|
|
441
441
|
Built-in context: `clientType` (`'embedded' | 'standalone'`), `dockOpen`, `paletteOpen`, `dockSelectedId`. Plugins can add namespaced keys (`.` or `:` separators). Both the types (`WhenExpression<Ctx, S>`) and runtime (`evaluateWhen`, `resolveContextValue`) come from `devframe/utils/when`.
|
|
442
442
|
|
|
443
|
-
## Agent-native surface
|
|
443
|
+
## Agent-native surface
|
|
444
444
|
|
|
445
445
|
Opt an RPC function into the agent surface with an `agent` field - default-deny otherwise. Agent-exposed functions **must declare `jsonSerializable: true`** (registration throws `DF0019` otherwise):
|
|
446
446
|
|
|
@@ -537,7 +537,7 @@ At runtime, static clients look up the argument hash in the dump; misses resolve
|
|
|
537
537
|
| *(default)* | Dev server on port 9999 (or `--port`) - WebSocket RPC, `cli.distDir` served at `/.devframe/` |
|
|
538
538
|
| `build` | Static snapshot → `./dist-static/` (configurable via `--out-dir`) |
|
|
539
539
|
| `spa` | Deployable SPA → `./dist-spa/` |
|
|
540
|
-
| `mcp` | stdio MCP server
|
|
540
|
+
| `mcp` | stdio MCP server |
|
|
541
541
|
|
|
542
542
|
**Bring your own CLI framework?** `createCac` (`devframe/adapters/cac`) is just a cac wrapper around three peer factories - `createDevServer` (`devframe/adapters/dev`), `createBuild` (`devframe/adapters/build`), and `createMcpServer` (`devframe/adapters/mcp`). Use them directly with commander/yargs/oclif when `createCac`'s baked-in command structure doesn't fit. `cac` is an optional peer dependency pulled in only through `devframe/adapters/cac`, so bring-your-own-CLI tools run without installing it. `createDevServer` returns a `StartedServer` handle (`origin`, `port`, `app`, `wss`, `close()`) so you can wire SIGINT / hot-reload teardown into the surrounding program. `parseCliFlags(schema, raw)` and `defineCliFlags(...)` (both from `devframe/adapters/cac`) validate an arbitrary flag bag against a `CliFlagsSchema` - the helpers are framework-agnostic.
|
|
543
543
|
|
|
@@ -572,7 +572,7 @@ RPC handlers run with the full privileges of the host process, so the boundary t
|
|
|
572
572
|
- **Tokens are secrets.** The bearer token rides the WS URL (`?devframe_auth_token=…`) - serve over `wss://`/`https://` beyond loopback. Never log the token or code, never bake them into build output. Revoke via `revokeAuthToken(...)`; clients drop to untrusted on `devframe:auth:revoked`.
|
|
573
573
|
- **Authorize handlers.** Any trusted client can call any registered function - validate inputs, and mark state-changing functions `type: 'destructive'` so MCP/agent clients prompt first.
|
|
574
574
|
- **Origin-lock remote docks** (`originLock`, on by default) so a dock's session token is honored only on a connection whose `Origin` matches the dock - the connect-time gate enforces it.
|
|
575
|
-
- **The MCP route requires an Origin.** The route-based MCP server (`cli.mcp`, `
|
|
575
|
+
- **The MCP route requires an Origin.** The route-based MCP server (`cli.mcp`, `devframeViteBridge`/Next handler `mcp`, `createMcpFetchHandler`) rejects `Origin`-less requests - a request must carry a loopback (or allow-listed) `Origin`, so it isn't reachable by an arbitrary local process. `devframe connect` sends each instance's own loopback origin automatically.
|
|
576
576
|
|
|
577
577
|
See [Security](https://devfra.me/security) for the full reference.
|
|
578
578
|
|