devframe 1.3.0 → 1.3.2
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-C06DH07o.mjs → _shared-BGb9aDxr.mjs} +7 -9
- package/dist/{_shared-DbO-OtUC.d.mts → _shared-CnKu5myY.d.mts} +4 -4
- package/dist/adapters/build.d.mts +3 -5
- package/dist/adapters/build.mjs +7 -8
- package/dist/adapters/cac.d.mts +1 -3
- package/dist/adapters/cac.mjs +5 -7
- package/dist/adapters/dev.d.mts +6 -8
- package/dist/adapters/dev.mjs +2 -2
- package/dist/adapters/embedded.d.mts +2 -4
- package/dist/adapters/embedded.mjs +1 -2
- package/dist/adapters/initiate.d.mts +9 -9
- package/dist/adapters/initiate.mjs +1 -2
- package/dist/adapters/mcp.d.mts +3 -3
- package/dist/adapters/mcp.mjs +1 -2
- package/dist/{agentic-D6HePbWg.d.mts → agentic-CCstJ5yv.d.mts} +1 -3
- package/dist/{browser-agent-Pu-FLk6I.mjs → browser-agent-DmAotroz.mjs} +1 -2
- package/dist/{browser-agent-rpc-KH4HHvHf.mjs → browser-agent-rpc-CS80Sphv.mjs} +3 -5
- package/dist/cli/main.d.mts +1 -3
- package/dist/cli/main.mjs +3 -4
- package/dist/client/index.d.mts +6 -30
- package/dist/client/index.mjs +47 -72
- package/dist/{client-agent-DuLhUF6d.mjs → client-agent-qNMgDUev.mjs} +7 -12
- package/dist/constants.d.mts +1 -5
- package/dist/constants.mjs +2 -3
- package/dist/{context-BY72d2gV.mjs → context-BTxC4QrJ.mjs} +4 -5
- package/dist/{context-CmSDJAEI.mjs → context-C5FcbWQi.mjs} +25 -41
- package/dist/{context-eIUOSrKu.d.mts → context-CsdPs3po.d.mts} +1 -3
- package/dist/{context-Dko5QFWF.d.mts → context-WxTq6kqb.d.mts} +54 -42
- package/dist/{crypto-token-TVbGGFuj.mjs → crypto-token-CUhPE_ei.mjs} +1 -2
- package/dist/{define-BLWPsH6y.mjs → define-C8h-fyD3.mjs} +1 -2
- package/dist/{dev-C-wQTIrV.mjs → dev-DaHYh5YK.mjs} +10 -11
- package/dist/{diagnostics-BJjvKfVK.mjs → diagnostics-DC1-WcvN.mjs} +6 -3
- package/dist/{dist-CO98PBnQ.mjs → dist-BWGpvt-z.mjs} +1 -2
- package/dist/{dist-CZXfGEkd.mjs → dist-DJydMELP.mjs} +3 -10
- package/dist/{events-0wDwalmL.mjs → events-qWCKwD8-.mjs} +1 -2
- package/dist/{handler-DmaAfpGq.mjs → handler-DkLlj3-B.mjs} +3 -5
- package/dist/{hash-DdPnc4k3.mjs → hash-DHqpWeMO.mjs} +4 -8
- package/dist/{host-h3-BROI6SQ4.mjs → host-h3-D1uj5EM8.mjs} +1 -2
- package/dist/{import-runtime-module-BzlEQ9PI.mjs → import-runtime-module-DsdqJ1gK.mjs} +2 -3
- package/dist/in-page-channel/index.d.mts +2 -12
- package/dist/in-page-channel/index.mjs +10 -16
- package/dist/{index-CeEtxDmK.d.mts → index-BIRF0E5l.d.mts} +0 -2
- package/dist/{index-Bia1vKjL.d.mts → index-BKu9BxcT.d.mts} +0 -2
- package/dist/{index-DuEm0sDH.d.mts → index-D0qrBkhO.d.mts} +1 -15
- package/dist/{index-BMj-o_sP.d.mts → index-HMJPlexc.d.mts} +2 -6
- package/dist/index.d.mts +7 -9
- package/dist/index.mjs +3 -4
- package/dist/{instance-registry-vlz81P9X.mjs → instance-registry-CmZfF5u3.mjs} +4 -10
- package/dist/{instance-shell-yfm1AYk8.d.mts → instance-shell-Bujp0BhE.d.mts} +5 -9
- package/dist/{instance-shell-CBgy8YzK.mjs → instance-shell-Dk2SejFT.mjs} +38 -17
- package/dist/{interactive-auth-BsqLFXw8.mjs → interactive-auth-BURwIAvE.mjs} +6 -8
- package/dist/internal/index.d.mts +15 -29
- package/dist/internal/index.mjs +13 -15
- package/dist/{mcp-content-wcQxvrrW.d.mts → mcp-content-CQQBt2An.d.mts} +1 -3
- package/dist/{mcp-content-DN3O212x.mjs → mcp-content-CqU8yaF7.mjs} +1 -2
- package/dist/{mrmime-40h5OOIp.mjs → mrmime-y_XyiVcd.mjs} +1 -2
- package/dist/node/auth.d.mts +2 -2
- package/dist/node/auth.mjs +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 +2 -6
- package/dist/node/index.mjs +2 -2
- package/dist/{nostics-DWvukRwa.d.mts → nostics-Dgwh7ytT.d.mts} +0 -2
- package/dist/{nostics-D0PvLZsn.mjs → nostics-InlX4tmd.mjs} +2 -4
- package/dist/{origin-DZit9g29.mjs → origin-Ck7mLbKU.mjs} +1 -2
- package/dist/{origin-CY6BBHOy.d.mts → origin-D5i7K_Zb.d.mts} +0 -2
- package/dist/recipes/interactive-auth.d.mts +3 -5
- package/dist/recipes/interactive-auth.mjs +1 -2
- package/dist/{remote-assets-eBvSKZMS.d.mts → remote-assets-5AQMHZnV.d.mts} +0 -2
- package/dist/{remote-assets-DOva7l3s.mjs → remote-assets-DhonNeo_.mjs} +5 -8
- package/dist/{revoke-CeQUo6KI.mjs → revoke-D6KA3vwr.mjs} +2 -3
- package/dist/{rolldown-runtime-B4iAMlE-.mjs → rolldown-runtime-DYf_mQCB.mjs} +2 -3
- package/dist/rpc/client.d.mts +2 -4
- package/dist/rpc/client.mjs +2 -3
- package/dist/rpc/dump.d.mts +3 -11
- package/dist/rpc/dump.mjs +1 -2
- package/dist/rpc/index.d.mts +3 -3
- package/dist/rpc/index.mjs +6 -8
- package/dist/rpc/server.d.mts +2 -4
- package/dist/rpc/server.mjs +2 -3
- package/dist/rpc/transports/sse-client.d.mts +1 -1
- package/dist/rpc/transports/sse-client.mjs +2 -3
- package/dist/rpc/transports/sse-server.d.mts +5 -7
- package/dist/rpc/transports/sse-server.mjs +4 -5
- package/dist/rpc/transports/ws-bun.d.mts +3 -5
- package/dist/rpc/transports/ws-bun.mjs +2 -3
- package/dist/rpc/transports/ws-client.d.mts +1 -1
- package/dist/rpc/transports/ws-client.mjs +2 -3
- package/dist/rpc/transports/ws-deno.d.mts +3 -5
- package/dist/rpc/transports/ws-deno.mjs +2 -3
- package/dist/rpc/transports/ws-server.d.mts +3 -3
- package/dist/rpc/transports/ws-server.mjs +5 -6
- package/dist/{rpc-core-oXIq2hjO.mjs → rpc-core-CDUizUQB.mjs} +4 -5
- package/dist/{rpc-core-BQ1mesqZ.d.mts → rpc-core-CFwyV10r.d.mts} +5 -7
- package/dist/{serialization-BhuOoL80.mjs → serialization-iiTQ7n21.mjs} +3 -5
- package/dist/{services-install-D5YUwFXW.mjs → services-install-DCuDzMJ-.mjs} +1 -2
- package/dist/{session-DPfj6zQG.mjs → session-BjvoLH3r.mjs} +1 -2
- package/dist/{session-r6PDixP6.d.mts → session-Y9R6tqg4.d.mts} +0 -2
- package/dist/{shared-state-Cc-Jrhma.mjs → shared-state-COV7NCbd.mjs} +4 -6
- package/dist/{sse-client-DNdscfu_.d.mts → sse-client-B2PrSz-H.d.mts} +2 -4
- package/dist/{state-W4wI6X5X.mjs → state-B_yjfeqo.mjs} +3 -5
- package/dist/{storage-BzAr-S6I.mjs → storage-DpJ52UB_.mjs} +3 -5
- package/dist/{structured-clone-CbAV5rFI.mjs → structured-clone-B1N_XQvA.mjs} +2 -4
- package/dist/{structured-clone-CgtQ61SA.mjs → structured-clone-D1dOCZvc.mjs} +2 -4
- package/dist/{tool-input-CES3Pc4y.mjs → tool-input-CcCgJ8jq.mjs} +6 -12
- package/dist/types/index.d.mts +6 -6
- package/dist/{types-BmDbfHCx.d.mts → types-844OBepb.d.mts} +1 -5
- package/dist/utils/agent-tool-name.d.mts +1 -3
- package/dist/utils/agent-tool-name.mjs +1 -2
- package/dist/utils/colors.d.mts +1 -3
- package/dist/utils/colors.mjs +1 -2
- package/dist/utils/crypto-token.d.mts +1 -3
- package/dist/utils/crypto-token.mjs +1 -2
- package/dist/utils/debounce.d.mts +0 -2
- package/dist/utils/debounce.mjs +1 -2
- package/dist/utils/events.d.mts +2 -4
- package/dist/utils/events.mjs +1 -2
- package/dist/utils/get-port.d.mts +0 -2
- package/dist/utils/get-port.mjs +1 -2
- package/dist/utils/hash.d.mts +1 -3
- package/dist/utils/hash.mjs +1 -2
- package/dist/utils/launch-editor.d.mts +1 -3
- package/dist/utils/launch-editor.mjs +25 -37
- package/dist/utils/nanoid.d.mts +1 -3
- package/dist/utils/nanoid.mjs +1 -2
- package/dist/utils/nostics.d.mts +1 -1
- package/dist/utils/nostics.mjs +1 -2
- package/dist/utils/open.d.mts +1 -3
- package/dist/utils/open.mjs +1 -2
- package/dist/utils/origin.d.mts +1 -1
- package/dist/utils/origin.mjs +1 -2
- package/dist/utils/remote-assets.d.mts +2 -4
- package/dist/utils/remote-assets.mjs +1 -2
- package/dist/utils/serve-static.d.mts +2 -4
- package/dist/utils/serve-static.mjs +3 -4
- package/dist/utils/shared-state.d.mts +1 -1
- package/dist/utils/shared-state.mjs +1 -2
- package/dist/utils/simple-schema.d.mts +1 -3
- package/dist/utils/simple-schema.mjs +1 -2
- package/dist/utils/streaming-channel.d.mts +1 -1
- package/dist/utils/streaming-channel.mjs +1 -2
- package/dist/utils/structured-clone.d.mts +1 -3
- package/dist/utils/structured-clone.mjs +1 -2
- package/dist/utils/url.d.mts +1 -3
- package/dist/utils/url.mjs +1 -2
- package/dist/utils/when.d.mts +1 -3
- package/dist/utils/when.mjs +2 -4
- package/dist/{validation-CMfDAti3.mjs → validation-Cjy1P58H.mjs} +7 -13
- package/dist/{wire-codec-B1W3zH3L.mjs → wire-codec-BdngvzfH.mjs} +3 -4
- package/dist/{write-DK7rBUN3.mjs → write-3miSvPaD.mjs} +10 -16
- package/dist/{ws-client-6Mrz6eC4.d.mts → ws-client-lqOeANcn.d.mts} +2 -4
- package/dist/{ws-server-y2R76aSW.d.mts → ws-server-CYHkeyA-.d.mts} +3 -5
- package/package.json +8 -8
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { n as getPort } from "./dist-DJydMELP.mjs";
|
|
1
2
|
import "./constants.mjs";
|
|
2
|
-
import { t as diagnostics } from "./diagnostics-
|
|
3
|
-
import { n as
|
|
4
|
-
|
|
5
|
-
//#region src/utils/url.ts
|
|
3
|
+
import { t as diagnostics } from "./diagnostics-DC1-WcvN.mjs";
|
|
4
|
+
import { n as isRuntimeModuleResolvable, t as importRuntimeModule } from "./import-runtime-module-DsdqJ1gK.mjs";
|
|
5
|
+
// src/utils/url.ts
|
|
6
6
|
/**
|
|
7
7
|
* URL path-joining and slash-normalization helpers shared by the adapters,
|
|
8
8
|
* the RPC clients, and the hub's mount-path plumbing. In-house replacements
|
|
@@ -53,8 +53,7 @@ function withBase(input, base) {
|
|
|
53
53
|
const prefix = withoutTrailingSlash(base);
|
|
54
54
|
return input.startsWith(prefix) ? input : joinURL(prefix, input);
|
|
55
55
|
}
|
|
56
|
-
|
|
57
|
-
//#region src/node/agentic.ts
|
|
56
|
+
// src/node/agentic.ts
|
|
58
57
|
const AGENTIC_PACKAGE = "@devframes/agentic";
|
|
59
58
|
/**
|
|
60
59
|
* Whether `@devframes/agentic` is resolvable from devframe's own location
|
|
@@ -88,8 +87,7 @@ async function importAgenticMcp(specifier = `${AGENTIC_PACKAGE}/mcp`) {
|
|
|
88
87
|
});
|
|
89
88
|
}
|
|
90
89
|
}
|
|
91
|
-
|
|
92
|
-
//#region src/adapters/_shared.ts
|
|
90
|
+
// src/adapters/_shared.ts
|
|
93
91
|
const DEFAULT_PORT = 9999;
|
|
94
92
|
/**
|
|
95
93
|
* Resolve the mount base path for a devframe's SPA. Hosted adapters
|
|
@@ -147,6 +145,7 @@ function resolveMcpConfig(mcp) {
|
|
|
147
145
|
...mcp.instructions !== void 0 ? { instructions: mcp.instructions } : {},
|
|
148
146
|
...mcp.resourceTemplates !== void 0 ? { resourceTemplates: mcp.resourceTemplates } : {},
|
|
149
147
|
...mcp.onResourcesChanged !== void 0 ? { onResourcesChanged: mcp.onResourcesChanged } : {},
|
|
148
|
+
...mcp.prompts !== void 0 ? { prompts: mcp.prompts } : {},
|
|
150
149
|
authorization
|
|
151
150
|
};
|
|
152
151
|
}
|
|
@@ -191,5 +190,4 @@ function resolveMcpConnectionMeta(mcp, port) {
|
|
|
191
190
|
port
|
|
192
191
|
} : { path: route };
|
|
193
192
|
}
|
|
194
|
-
//#endregion
|
|
195
193
|
export { resolveMcpConfig as a, joinURL as c, withoutLeadingSlash as d, withoutTrailingSlash as f, resolveDevServerPort as i, withBase as l, normalizeBasePath as n, resolveMcpConnectionMeta as o, resolveBasePath as r, importAgenticMcp as s, loadAutoMcpAdapter as t, withLeadingSlash as u };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as
|
|
3
|
-
//#region src/adapters/_shared.d.ts
|
|
1
|
+
import { t as AgenticMcpModule } from "./agentic-CCstJ5yv.mjs";
|
|
2
|
+
import { F as DevframeDefinition, Ft as McpResourceTemplate, G as McpAuthorization, I as DevframeDeploymentKind, Rt as McpResourcesChangedHook, en as DevframeAgentHost, jt as McpPrompt, q as McpSetting, t as ConnectionMeta } from "./context-WxTq6kqb.mjs";
|
|
4
3
|
/**
|
|
5
4
|
* Resolve the mount base path for a devframe's SPA. Hosted adapters
|
|
6
5
|
* (`vite`, `embedded`) default to `/__<id>/` so they don't collide
|
|
@@ -43,6 +42,8 @@ interface ResolvedMcpConfig {
|
|
|
43
42
|
resourceTemplates?: McpResourceTemplate[];
|
|
44
43
|
/** Resource-list change subscription from the route options; omitted means none. */
|
|
45
44
|
onResourcesChanged?: McpResourcesChangedHook;
|
|
45
|
+
/** Prompt templates from the route options; omitted means none. */
|
|
46
|
+
prompts?: McpPrompt[];
|
|
46
47
|
/** The resolved identity policy: a bearer token, callback, or `false`. */
|
|
47
48
|
authorization: McpAuthorization;
|
|
48
49
|
}
|
|
@@ -86,5 +87,4 @@ declare function loadAutoMcpAdapter(agent: Pick<DevframeAgentHost, 'hasSurface'>
|
|
|
86
87
|
* same-server default).
|
|
87
88
|
*/
|
|
88
89
|
declare function resolveMcpConnectionMeta(mcp: McpSetting | undefined, port?: number): ConnectionMeta['mcp'];
|
|
89
|
-
//#endregion
|
|
90
90
|
export { resolveBasePath as a, resolveMcpConnectionMeta as c, normalizeBasePath as i, ResolvedMcpConfig as n, resolveDevServerPort as o, loadAutoMcpAdapter as r, resolveMcpConfig as s, ResolveDevServerPortOptions as t };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { F as DevframeDefinition, V as DevframeSnapshotRpcEntry, o as DevframeNodeContext } from "../context-
|
|
2
|
-
import { o as StaticAssetsSource } from "../remote-assets-
|
|
3
|
-
//#region src/adapters/build.d.ts
|
|
1
|
+
import { F as DevframeDefinition, V as DevframeSnapshotRpcEntry, o as DevframeNodeContext } from "../context-WxTq6kqb.mjs";
|
|
2
|
+
import { o as StaticAssetsSource } from "../remote-assets-5AQMHZnV.mjs";
|
|
4
3
|
export interface CreateBuildOptions {
|
|
5
4
|
/** Output directory. Defaults to `dist-static`. */
|
|
6
5
|
outDir?: string;
|
|
@@ -45,5 +44,4 @@ export declare function createBuild(d: DevframeDefinition, options?: CreateBuild
|
|
|
45
44
|
* argument-tuple by running the target's own handler, with the first tuple's
|
|
46
45
|
* output as the fallback.
|
|
47
46
|
*/
|
|
48
|
-
export declare function applySnapshotRpc(ctx: DevframeNodeContext, entries: readonly DevframeSnapshotRpcEntry[] | undefined): void;
|
|
49
|
-
//#endregion
|
|
47
|
+
export declare function applySnapshotRpc(ctx: DevframeNodeContext, entries: readonly DevframeSnapshotRpcEntry[] | undefined): void;
|
package/dist/adapters/build.mjs
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { s as colors } from "../nostics-
|
|
1
|
+
import { s as colors } from "../nostics-InlX4tmd.mjs";
|
|
2
|
+
import { t as resolveStaticAssetsSource } from "../remote-assets-DhonNeo_.mjs";
|
|
2
3
|
import { DEVFRAME_CONNECTION_META_FILENAME, DEVFRAME_RPC_DUMP_MANIFEST_FILENAME } from "../constants.mjs";
|
|
3
|
-
import {
|
|
4
|
-
import { t as diagnostics } from "../diagnostics-
|
|
5
|
-
import { t as
|
|
6
|
-
import { t as
|
|
7
|
-
import { t as createH3DevframeHost } from "../host-h3-BROI6SQ4.mjs";
|
|
4
|
+
import { t as createHostContext } from "../context-C5FcbWQi.mjs";
|
|
5
|
+
import { t as diagnostics } from "../diagnostics-DC1-WcvN.mjs";
|
|
6
|
+
import { t as createH3DevframeHost } from "../host-h3-D1uj5EM8.mjs";
|
|
7
|
+
import { n as collectStaticRpcDump, t as writeStaticRpcDump } from "../write-3miSvPaD.mjs";
|
|
8
8
|
import fs from "node:fs/promises";
|
|
9
9
|
import { resolve } from "pathe";
|
|
10
10
|
import { existsSync } from "node:fs";
|
|
11
11
|
import process from "node:process";
|
|
12
|
-
|
|
12
|
+
// src/adapters/build.ts
|
|
13
13
|
/**
|
|
14
14
|
* Produce a self-contained static deploy of a devframe:
|
|
15
15
|
*
|
|
@@ -103,5 +103,4 @@ function applySnapshotRpc(ctx, entries) {
|
|
|
103
103
|
};
|
|
104
104
|
}
|
|
105
105
|
}
|
|
106
|
-
//#endregion
|
|
107
106
|
export { applySnapshotRpc, createBuild };
|
package/dist/adapters/cac.d.mts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { F as DevframeDefinition, Ht as InferCliFlags, Ut as defineCliFlags, Vt as CliFlagsSchema, Wt as parseCliFlags, q as McpSetting } from "../context-WxTq6kqb.mjs";
|
|
2
2
|
import { CAC } from "cac";
|
|
3
3
|
import { H3 } from "h3";
|
|
4
|
-
//#region src/adapters/cac.d.ts
|
|
5
4
|
export interface CreateCacOptions {
|
|
6
5
|
/** Default port for `dev` (default: 9999). */
|
|
7
6
|
defaultPort?: number;
|
|
@@ -46,5 +45,4 @@ export interface CacHandle {
|
|
|
46
45
|
* Requires the optional `cac` peer dependency.
|
|
47
46
|
*/
|
|
48
47
|
export declare function createCac(d: DevframeDefinition, options?: CreateCacOptions): CacHandle;
|
|
49
|
-
//#endregion
|
|
50
48
|
export { type CliFlagsSchema, type InferCliFlags, defineCliFlags, parseCliFlags };
|
package/dist/adapters/cac.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { s as colors } from "../nostics-
|
|
2
|
-
import { s as importAgenticMcp } from "../_shared-
|
|
1
|
+
import { s as colors } from "../nostics-InlX4tmd.mjs";
|
|
2
|
+
import { s as importAgenticMcp } from "../_shared-BGb9aDxr.mjs";
|
|
3
3
|
import { createBuild } from "./build.mjs";
|
|
4
|
-
import { t as createDevServer } from "../dev-
|
|
4
|
+
import { t as createDevServer } from "../dev-DaHYh5YK.mjs";
|
|
5
5
|
import process from "node:process";
|
|
6
6
|
import cac$1 from "cac";
|
|
7
|
-
|
|
7
|
+
// src/adapters/flags.ts
|
|
8
8
|
/**
|
|
9
9
|
* Identity helper that preserves the literal schema-map type; use this
|
|
10
10
|
* so `InferCliFlags<typeof myFlags>` resolves to the right object shape.
|
|
@@ -82,8 +82,7 @@ function toKebab(camel) {
|
|
|
82
82
|
function flagKeyToOption(camel) {
|
|
83
83
|
return toKebab(camel);
|
|
84
84
|
}
|
|
85
|
-
|
|
86
|
-
//#region src/adapters/cac.ts
|
|
85
|
+
// src/adapters/cac.ts
|
|
87
86
|
/**
|
|
88
87
|
* Wrap a {@link DevframeDefinition} in a `cac`-powered command-line
|
|
89
88
|
* interface exposing `dev` / `build` / `mcp` subcommands.
|
|
@@ -152,5 +151,4 @@ function resolveTypedFlags(d, raw) {
|
|
|
152
151
|
}
|
|
153
152
|
return flags;
|
|
154
153
|
}
|
|
155
|
-
//#endregion
|
|
156
154
|
export { createCac, defineCliFlags, parseCliFlags };
|
package/dist/adapters/dev.d.mts
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as DevframeRpcConnection, t as DevframeNodeRpcSessionMeta } from "../session-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { c as resolveMcpConnectionMeta, o as resolveDevServerPort, t as ResolveDevServerPortOptions } from "../_shared-
|
|
1
|
+
import { n as WsOriginRegistry } from "../ws-server-CYHkeyA-.mjs";
|
|
2
|
+
import { n as DevframeRpcConnection, t as DevframeNodeRpcSessionMeta } from "../session-Y9R6tqg4.mjs";
|
|
3
|
+
import { Bt as DevframeAuthHandler, F as DevframeDefinition, U as DevframeSseOptions, W as DevframeWsOptions, q as McpSetting, s as DevframeNodeRpcSession } from "../context-WxTq6kqb.mjs";
|
|
4
|
+
import { c as StartedServer } from "../instance-shell-Bujp0BhE.mjs";
|
|
5
|
+
import { o as StaticAssetsSource } from "../remote-assets-5AQMHZnV.mjs";
|
|
6
|
+
import { c as resolveMcpConnectionMeta, o as resolveDevServerPort, t as ResolveDevServerPortOptions } from "../_shared-CnKu5myY.mjs";
|
|
7
7
|
import { H3 } from "h3";
|
|
8
|
-
//#region src/adapters/dev.d.ts
|
|
9
8
|
export interface CreateDevServerOptions {
|
|
10
9
|
/** Bind host. Default: `def.cli?.host ?? 'localhost'`. */
|
|
11
10
|
host?: string;
|
|
@@ -139,5 +138,4 @@ export interface CreateDevServerOptions {
|
|
|
139
138
|
* `dev` / `build` / `mcp` shell, reach for {@link createCac} instead.
|
|
140
139
|
*/
|
|
141
140
|
export declare function createDevServer(def: DevframeDefinition, options?: CreateDevServerOptions): Promise<StartedServer>;
|
|
142
|
-
//#endregion
|
|
143
141
|
export { type ResolveDevServerPortOptions, resolveDevServerPort, resolveMcpConnectionMeta };
|
package/dist/adapters/dev.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { i as resolveDevServerPort, o as resolveMcpConnectionMeta } from "../_shared-
|
|
2
|
-
import { t as createDevServer } from "../dev-
|
|
1
|
+
import { i as resolveDevServerPort, o as resolveMcpConnectionMeta } from "../_shared-BGb9aDxr.mjs";
|
|
2
|
+
import { t as createDevServer } from "../dev-DaHYh5YK.mjs";
|
|
3
3
|
export { createDevServer, resolveDevServerPort, resolveMcpConnectionMeta };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { F as DevframeDefinition, o as DevframeNodeContext } from "../context-
|
|
2
|
-
//#region src/adapters/embedded.d.ts
|
|
1
|
+
import { F as DevframeDefinition, o as DevframeNodeContext } from "../context-WxTq6kqb.mjs";
|
|
3
2
|
export interface CreateEmbeddedOptions {
|
|
4
3
|
/** Target context the devframe is registered into. Required. */
|
|
5
4
|
ctx: DevframeNodeContext;
|
|
@@ -13,5 +12,4 @@ export interface CreateEmbeddedOptions {
|
|
|
13
12
|
* The host owns the mount path; when a hosted mount is needed the
|
|
14
13
|
* effective default follows the hosted rule of `def.basePath ?? '/__<id>/'`.
|
|
15
14
|
*/
|
|
16
|
-
export declare function createEmbedded(d: DevframeDefinition, options: CreateEmbeddedOptions): Promise<void>;
|
|
17
|
-
//#endregion
|
|
15
|
+
export declare function createEmbedded(d: DevframeDefinition, options: CreateEmbeddedOptions): Promise<void>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/adapters/embedded.ts
|
|
2
2
|
/**
|
|
3
3
|
* Register a devframe into an already-running devframe/Kit context at
|
|
4
4
|
* runtime. Mirrors what the Vite plugin scan does for devframes passed
|
|
@@ -13,5 +13,4 @@ async function createEmbedded(d, options) {
|
|
|
13
13
|
await options.ctx.services.ready();
|
|
14
14
|
await d.setup(options.ctx);
|
|
15
15
|
}
|
|
16
|
-
//#endregion
|
|
17
16
|
export { createEmbedded };
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as DevframeRpcConnection, t as DevframeNodeRpcSessionMeta } from "../session-
|
|
3
|
-
import { o as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { n as WsOriginRegistry } from "../ws-server-CYHkeyA-.mjs";
|
|
2
|
+
import { n as DevframeRpcConnection, t as DevframeNodeRpcSessionMeta } from "../session-Y9R6tqg4.mjs";
|
|
3
|
+
import { Bt as DevframeAuthHandler, Ct as DevframeStorageScope, F as DevframeDefinition, U as DevframeSseOptions, W as DevframeWsOptions, o as DevframeNodeContext, q as McpSetting, s as DevframeNodeRpcSession, t as ConnectionMeta } from "../context-WxTq6kqb.mjs";
|
|
4
|
+
import { c as StartedServer, f as DevframeInstanceRecord } from "../instance-shell-Bujp0BhE.mjs";
|
|
5
|
+
import { o as StaticAssetsSource } from "../remote-assets-5AQMHZnV.mjs";
|
|
6
6
|
import { H3 } from "h3";
|
|
7
7
|
import { Buffer } from "node:buffer";
|
|
8
8
|
import { IncomingMessage, Server, ServerResponse } from "node:http";
|
|
9
9
|
import { Duplex } from "node:stream";
|
|
10
|
-
//#region src/adapters/initiate.d.ts
|
|
11
10
|
export interface InitDevframeOptions {
|
|
12
11
|
/**
|
|
13
12
|
* Mount base the handler answers under (e.g. `/__my-tool/`), required so
|
|
@@ -157,7 +156,9 @@ export interface DevframeInstance {
|
|
|
157
156
|
* Connect/Express-style middleware over the same surface, for
|
|
158
157
|
* `viteServer.middlewares.use(handler.nodeMiddleware)` or any other
|
|
159
158
|
* node middleware stack. Mount it un-prefixed: paths outside the base
|
|
160
|
-
* call `next()` so the rest of the stack keeps working.
|
|
159
|
+
* call `next()` so the rest of the stack keeps working. At base `/`, a
|
|
160
|
+
* path no devframe route answers calls `next()` too, so the host app
|
|
161
|
+
* keeps its own pages.
|
|
161
162
|
*/
|
|
162
163
|
nodeMiddleware: (req: IncomingMessage, res: ServerResponse, next?: (err?: unknown) => void) => void;
|
|
163
164
|
/**
|
|
@@ -224,5 +225,4 @@ export declare function getInstanceInternals(handler: object): DevframeInstanceI
|
|
|
224
225
|
* transport to an external server. `__connection.json` reflects whichever
|
|
225
226
|
* combination is active.
|
|
226
227
|
*/
|
|
227
|
-
export declare function initDevframe(def: DevframeDefinition, options: InitDevframeOptions): DevframeInstance;
|
|
228
|
-
//#endregion
|
|
228
|
+
export declare function initDevframe(def: DevframeDefinition, options: InitDevframeOptions): DevframeInstance;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { getInstanceInternals, initDevframe };
|
|
1
|
+
export { n as getInstanceInternals, r as initDevframe } from "../dev-DaHYh5YK.mjs";
|
package/dist/adapters/mcp.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { n as MountMcpHttpOptions, r as MountedMcpHttp } from "../agentic-CCstJ5yv.mjs";
|
|
2
|
+
import { At as McpFetchHandler, Dt as CreateMcpServerOptions, Et as CreateMcpFetchHandlerOptions, Ft as McpResourceTemplate, It as McpResourceTemplateContent, Lt as McpResourceTemplateEntry, Mt as McpPromptArgument, Nt as McpPromptMessage, Ot as McpConnectionInfo, Pt as McpPromptResult, Rt as McpResourcesChangedHook, jt as McpPrompt, zt as McpServerHandle } from "../context-WxTq6kqb.mjs";
|
|
3
3
|
import { createMcpFetchHandler, createMcpServer, mountMcpHttp } from "@devframes/agentic/mcp";
|
|
4
|
-
export { type CreateMcpFetchHandlerOptions, type CreateMcpServerOptions, type McpConnectionInfo, type McpFetchHandler, type McpResourceTemplate, type McpResourceTemplateContent, type McpResourceTemplateEntry, type McpResourcesChangedHook, type McpServerHandle, type MountMcpHttpOptions, type MountedMcpHttp, createMcpFetchHandler, createMcpServer, mountMcpHttp };
|
|
4
|
+
export { type CreateMcpFetchHandlerOptions, type CreateMcpServerOptions, type McpConnectionInfo, type McpFetchHandler, type McpPrompt, type McpPromptArgument, type McpPromptMessage, type McpPromptResult, type McpResourceTemplate, type McpResourceTemplateContent, type McpResourceTemplateEntry, type McpResourcesChangedHook, type McpServerHandle, type MountMcpHttpOptions, type MountedMcpHttp, createMcpFetchHandler, createMcpServer, mountMcpHttp };
|
package/dist/adapters/mcp.mjs
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { createMcpFetchHandler, createMcpServer, mountMcpHttp };
|
|
1
|
+
export { createMcpFetchHandler, createMcpServer, mountMcpHttp } from "@devframes/agentic/mcp";
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { At as McpFetchHandler, Dt as CreateMcpServerOptions, Et as CreateMcpFetchHandlerOptions, F as DevframeDefinition,
|
|
1
|
+
import { At as McpFetchHandler, Dt as CreateMcpServerOptions, Et as CreateMcpFetchHandlerOptions, F as DevframeDefinition, o as DevframeNodeContext, zt as McpServerHandle } from "./context-WxTq6kqb.mjs";
|
|
2
2
|
import { H3 } from "h3";
|
|
3
|
-
//#region src/node/agentic.d.ts
|
|
4
3
|
/**
|
|
5
4
|
* The h3-bound half of the MCP adapter contract (the SDK-neutral half lives
|
|
6
5
|
* in `types/mcp.ts`, which must stay lib-neutral; h3's declarations are not).
|
|
@@ -26,5 +25,4 @@ interface AgenticMcpModule {
|
|
|
26
25
|
* it never enter a consumer's bundle graph.
|
|
27
26
|
*/
|
|
28
27
|
declare function importAgenticMcp(specifier?: string): Promise<AgenticMcpModule>;
|
|
29
|
-
//#endregion
|
|
30
28
|
export { importAgenticMcp as i, MountMcpHttpOptions as n, MountedMcpHttp as r, AgenticMcpModule as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/client/browser-agent.ts
|
|
2
2
|
const REGISTRY_KEY = Symbol.for("devframe:browser-agent-registry");
|
|
3
3
|
const { tools, listeners } = globalThis[REGISTRY_KEY] ??= {
|
|
4
4
|
tools: /* @__PURE__ */ new Map(),
|
|
@@ -22,5 +22,4 @@ function onBrowserAgentToolsChanged(listener) {
|
|
|
22
22
|
listeners.add(listener);
|
|
23
23
|
return () => listeners.delete(listener);
|
|
24
24
|
}
|
|
25
|
-
//#endregion
|
|
26
25
|
export { onBrowserAgentToolsChanged as n, registerBrowserAgentTool as r, listBrowserAgentTools as t };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { n as onBrowserAgentToolsChanged, t as listBrowserAgentTools } from "./browser-agent-DmAotroz.mjs";
|
|
1
2
|
import { nanoid } from "./utils/nanoid.mjs";
|
|
2
|
-
|
|
3
|
-
//#region src/client/client-id.ts
|
|
3
|
+
// src/client/client-id.ts
|
|
4
4
|
const CLIENT_ID_STORAGE_KEY = "devframe:client-id";
|
|
5
5
|
let memoryClientId;
|
|
6
6
|
/**
|
|
@@ -26,8 +26,7 @@ function resolveClientId(win = globalThis.window) {
|
|
|
26
26
|
memoryClientId ??= nanoid();
|
|
27
27
|
return memoryClientId;
|
|
28
28
|
}
|
|
29
|
-
|
|
30
|
-
//#region src/client/browser-agent-rpc.ts
|
|
29
|
+
// src/client/browser-agent-rpc.ts
|
|
31
30
|
/** Snapshot of this document as seen by a coding agent picking a tab. */
|
|
32
31
|
function describeBrowserAgentClient() {
|
|
33
32
|
const doc = typeof document === "undefined" ? void 0 : document;
|
|
@@ -88,5 +87,4 @@ function setupBrowserAgentRpcBridge(rpc) {
|
|
|
88
87
|
win?.document.removeEventListener("visibilitychange", sync);
|
|
89
88
|
};
|
|
90
89
|
}
|
|
91
|
-
//#endregion
|
|
92
90
|
export { setupBrowserAgentRpcBridge };
|
package/dist/cli/main.d.mts
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
//#region src/cli/main.d.ts
|
|
2
1
|
/**
|
|
3
2
|
* The `devframe` bin is the framework's own CLI, distinct from the per-app
|
|
4
3
|
* CLI shells authors build with `createCac(definition)`. It hosts the
|
|
5
4
|
* app-independent commands; today that is `connect`, the MCP connector.
|
|
6
5
|
*/
|
|
7
|
-
export declare function runDevframeCli(argv?: string[]): Promise<void>;
|
|
8
|
-
//#endregion
|
|
6
|
+
export declare function runDevframeCli(argv?: string[]): Promise<void>;
|
package/dist/cli/main.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { t as diagnostics } from "../diagnostics-
|
|
2
|
-
import { t as importRuntimeModule } from "../import-runtime-module-
|
|
1
|
+
import { t as diagnostics } from "../diagnostics-DC1-WcvN.mjs";
|
|
2
|
+
import { t as importRuntimeModule } from "../import-runtime-module-DsdqJ1gK.mjs";
|
|
3
3
|
import process from "node:process";
|
|
4
4
|
import { cac } from "cac";
|
|
5
|
-
|
|
5
|
+
// src/cli/main.ts
|
|
6
6
|
/** Parse the repeatable `--port` flag value(s) from cac into numbers. */
|
|
7
7
|
function parsePortsFlag(value) {
|
|
8
8
|
return (Array.isArray(value) ? value : value === void 0 ? [] : [value]).map((v) => Number(v)).filter((n) => Number.isInteger(n) && n > 0 && n < 65536);
|
|
@@ -53,5 +53,4 @@ async function runDevframeCli(argv = process.argv) {
|
|
|
53
53
|
}
|
|
54
54
|
await cli.runMatchedCommand();
|
|
55
55
|
}
|
|
56
|
-
//#endregion
|
|
57
56
|
export { runDevframeCli };
|
package/dist/client/index.d.mts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { i as BirpcReturn, r as BirpcOptions } from "../index-
|
|
2
|
-
import { f as RpcCacheManager, p as RpcCacheOptions } from "../index-
|
|
3
|
-
import { h as RpcFunctionDefinition, w as RpcFunctionsCollector } from "../types-
|
|
4
|
-
import {
|
|
5
|
-
import { t as
|
|
6
|
-
import { t as
|
|
7
|
-
//#region src/client/connection.d.ts
|
|
1
|
+
import { i as BirpcReturn, r as BirpcOptions } from "../index-BKu9BxcT.mjs";
|
|
2
|
+
import { f as RpcCacheManager, p as RpcCacheOptions } from "../index-D0qrBkhO.mjs";
|
|
3
|
+
import { h as RpcFunctionDefinition, w as RpcFunctionsCollector } from "../types-844OBepb.mjs";
|
|
4
|
+
import { t as SseRpcChannelOptions } from "../sse-client-B2PrSz-H.mjs";
|
|
5
|
+
import { t as WsRpcChannelOptions } from "../ws-client-lqOeANcn.mjs";
|
|
6
|
+
import { Q as DevframeServiceMeta, b as StreamSink, ct as DevframeSettings, d as RpcSharedStateHost, et as DevframeServiceScopeOf, gt as SettingsForNamespace, ht as ScopedSharedStates, it as DevframeServicesState, k as SharedState, mt as ScopedServerFunctions, nn as EventEmitter, pt as ScopedRpcFn, t as ConnectionMeta, u as RpcSharedStateGetOptions, vt as DevframeRpcClientFunctions, y as StreamReader, yt as DevframeRpcServerFunctions } from "../context-WxTq6kqb.mjs";
|
|
8
7
|
export interface DevframeConnection {
|
|
9
8
|
/** Server-advertised transport and serialization metadata. */
|
|
10
9
|
connectionMeta: ConnectionMeta;
|
|
@@ -91,8 +90,6 @@ export declare class DevframeConnectionError extends Error {
|
|
|
91
90
|
* failure states short-circuit calls so a stuck socket never hangs the UI.
|
|
92
91
|
*/
|
|
93
92
|
export declare function isCallableStatus(status: DevframeConnectionStatus): boolean;
|
|
94
|
-
//#endregion
|
|
95
|
-
//#region src/client/rpc-streaming.d.ts
|
|
96
93
|
export interface StreamingSubscribeOptions {
|
|
97
94
|
/** Maximum buffered chunks before the oldest is dropped. Default 256. */
|
|
98
95
|
highWaterMark?: number;
|
|
@@ -121,8 +118,6 @@ export interface RpcStreamingClientHost {
|
|
|
121
118
|
* state lives in a `Map<streamKey, StreamReader>`.
|
|
122
119
|
*/
|
|
123
120
|
export declare function createRpcStreamingClientHost(rpc: DevframeRpcClient): RpcStreamingClientHost;
|
|
124
|
-
//#endregion
|
|
125
|
-
//#region src/client/scope.d.ts
|
|
126
121
|
type AnyRpcFn = (...args: any[]) => any;
|
|
127
122
|
/**
|
|
128
123
|
* Client-side streaming host scoped to a namespace. Channel names are
|
|
@@ -196,8 +191,6 @@ export interface DevframeScopedClientContext<NS extends string = string, Setting
|
|
|
196
191
|
* `rpc` surface is auto-namespaced with `<namespace>:`.
|
|
197
192
|
*/
|
|
198
193
|
export declare function createScopedClientContext<NS extends string = string>(rpc: DevframeRpcClient, namespace: NS): DevframeScopedClientContext<NS>;
|
|
199
|
-
//#endregion
|
|
200
|
-
//#region src/client/rpc-services.d.ts
|
|
201
194
|
/**
|
|
202
195
|
* A typed handle on one advertised wire service: the service's
|
|
203
196
|
* advertisement meta plus an RPC surface scoped to its namespace, so
|
|
@@ -235,8 +228,6 @@ interface DevframeServicesClient {
|
|
|
235
228
|
*/
|
|
236
229
|
state: () => Promise<SharedState<DevframeServicesState>>;
|
|
237
230
|
}
|
|
238
|
-
//#endregion
|
|
239
|
-
//#region src/client/rpc.d.ts
|
|
240
231
|
export interface DevframeRpcContext {
|
|
241
232
|
/**
|
|
242
233
|
* The RPC client to interact with the server
|
|
@@ -502,16 +493,12 @@ export interface DevframeRpcClientMode {
|
|
|
502
493
|
*/
|
|
503
494
|
export declare function resolveClientTransport(requested: 'auto' | 'websocket' | 'sse', meta: ConnectionMeta): 'websocket' | 'sse' | 'static';
|
|
504
495
|
export declare function getDevframeRpcClient(options?: DevframeRpcClientOptions): Promise<DevframeRpcClient>;
|
|
505
|
-
//#endregion
|
|
506
|
-
//#region src/client/connection-storage.d.ts
|
|
507
496
|
/**
|
|
508
497
|
* Publish the connection on this window for same-origin frames to inherit.
|
|
509
498
|
* Call again after mutating `connection.connectionMeta` so the legacy meta
|
|
510
499
|
* copy below follows.
|
|
511
500
|
*/
|
|
512
501
|
export declare function storeConnection(connection: DevframeConnection): void;
|
|
513
|
-
//#endregion
|
|
514
|
-
//#region src/client/otp.d.ts
|
|
515
502
|
/**
|
|
516
503
|
* Read a one-time authentication code (OTP) from the current page URL's
|
|
517
504
|
* fragment, without side effects. Returns `undefined` when the parameter is
|
|
@@ -538,8 +525,6 @@ export declare function consumeOtpFromUrl(param?: string): string | undefined;
|
|
|
538
525
|
export declare function authenticateWithUrlOtp(rpc: Pick<DevframeRpcClient, 'isTrusted' | 'requestTrustWithCode'>, options?: {
|
|
539
526
|
param?: string;
|
|
540
527
|
}): Promise<boolean>;
|
|
541
|
-
//#endregion
|
|
542
|
-
//#region src/client/rpc-ws.d.ts
|
|
543
528
|
/** Minimal subset of `window.location` needed to resolve a WS URL. */
|
|
544
529
|
interface WsUrlLocation {
|
|
545
530
|
protocol: string;
|
|
@@ -560,8 +545,6 @@ interface WsUrlLocation {
|
|
|
560
545
|
* endpoint, e.g. a side-car server on its own port.
|
|
561
546
|
*/
|
|
562
547
|
export declare function resolveWsUrl(websocket: ConnectionMeta['websocket'], metaBaseUrl: string, loc: WsUrlLocation): string;
|
|
563
|
-
//#endregion
|
|
564
|
-
//#region src/client/rpc-sse.d.ts
|
|
565
548
|
/**
|
|
566
549
|
* Resolve a {@link ConnectionMeta.sse} descriptor into a concrete
|
|
567
550
|
* `http(s)://` URL, with the same proxy-safe rules as `resolveWsUrl`: the
|
|
@@ -571,15 +554,11 @@ export declare function resolveWsUrl(websocket: ConnectionMeta['websocket'], met
|
|
|
571
554
|
* string) opts into a cross-origin endpoint.
|
|
572
555
|
*/
|
|
573
556
|
export declare function resolveSseUrl(sse: ConnectionMeta['sse'], metaBaseUrl: string, loc: WsUrlLocation): string;
|
|
574
|
-
//#endregion
|
|
575
|
-
//#region src/client/settings.d.ts
|
|
576
557
|
/**
|
|
577
558
|
* Build the client-side `settings` surface for a scope namespace. Mirrors
|
|
578
559
|
* the node-side stores over the shared-state sync protocol.
|
|
579
560
|
*/
|
|
580
561
|
export declare function createClientSettings<T extends Record<string, any> = Record<string, any>>(rpc: DevframeRpcClient, namespace: string): DevframeSettings<T>;
|
|
581
|
-
//#endregion
|
|
582
|
-
//#region src/client/webmcp.d.ts
|
|
583
562
|
/**
|
|
584
563
|
* Result a WebMCP tool's `execute` resolves with; mirrors the MCP
|
|
585
564
|
* `CallToolResult` text shape the [WebMCP](https://github.com/webmachinelearning/webmcp)
|
|
@@ -664,8 +643,5 @@ export interface RegisterWebMcpToolsOptions {
|
|
|
664
643
|
* `register`/`update` calls. Returns a dispose that unregisters every tool.
|
|
665
644
|
*/
|
|
666
645
|
export declare function registerWebMcpTools<LocalFunctions, SetupContext>(clientRpc: RpcFunctionsCollector<LocalFunctions, SetupContext>, options?: RegisterWebMcpToolsOptions): () => void;
|
|
667
|
-
//#endregion
|
|
668
|
-
//#region src/client/index.d.ts
|
|
669
646
|
export declare const connectDevframe: typeof getDevframeRpcClient;
|
|
670
|
-
//#endregion
|
|
671
647
|
export type { DevframeServiceClientHandle, DevframeServicesClient, WsUrlLocation };
|