devframe 1.3.1 → 1.3.3
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-Cm4iD0L3.d.mts → _shared-BxeuukaL.d.mts} +2 -4
- package/dist/{_shared-C61zPwIz.mjs → _shared-CtXCQFTV.mjs} +6 -9
- 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 +10 -10
- package/dist/adapters/initiate.mjs +1 -2
- package/dist/adapters/mcp.d.mts +2 -2
- package/dist/adapters/mcp.mjs +1 -2
- package/dist/{agentic-C6SCkdtj.d.mts → agentic-DVgUzwhV.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-iBkMYxqn.mjs → client-agent-qNMgDUev.mjs} +7 -12
- package/dist/constants.d.mts +1 -5
- package/dist/constants.mjs +2 -3
- package/dist/{context-BGJi0ITA.d.mts → context-B-AARy_U.d.mts} +1 -3
- package/dist/{context-D_jSSdME.mjs → context-BTxC4QrJ.mjs} +4 -5
- package/dist/{context-CAJ5V017.mjs → context-C5FcbWQi.mjs} +25 -41
- 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-BKBjIpX3.mjs → dev-Cu_iwSCy.mjs} +9 -11
- package/dist/{diagnostics-E_PvUPsA.mjs → diagnostics-DC1-WcvN.mjs} +2 -3
- package/dist/{dist-CO98PBnQ.mjs → dist-BWGpvt-z.mjs} +1 -2
- package/dist/{dist-CZXfGEkd.mjs → dist-CZ-TySHD.mjs} +3 -11
- 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 +3 -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/{context-BNxFOPbX.d.mts → index-BhUqJUHG.d.mts} +1408 -1442
- package/dist/index.d.mts +7 -8
- package/dist/index.mjs +3 -4
- package/dist/{instance-registry-C_4PpB6N.mjs → instance-registry-DwmnWyCK.mjs} +4 -10
- package/dist/{instance-shell-m4sY2oTG.mjs → instance-shell-Coid7CP6.mjs} +38 -17
- package/dist/{instance-shell-GihbmXoF.d.mts → instance-shell-DTk514M9.d.mts} +6 -10
- package/dist/{interactive-auth-DdDxs3WF.mjs → interactive-auth-BURwIAvE.mjs} +6 -8
- package/dist/internal/index.d.mts +9 -29
- package/dist/internal/index.mjs +13 -15
- package/dist/{mcp-content-QImBQO8e.d.mts → mcp-content-0a0mpCL5.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 +84 -3
- package/dist/node/auth.mjs +2 -2
- package/dist/node/hub-internals.d.mts +11 -2
- package/dist/node/hub-internals.mjs +2 -2
- package/dist/node/index.d.mts +4 -6
- package/dist/node/index.mjs +2 -2
- package/dist/{nostics-D0PvLZsn.mjs → nostics-InlX4tmd.mjs} +2 -4
- package/dist/{origin-DZit9g29.mjs → origin-Ck7mLbKU.mjs} +1 -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-B-n83kUY.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-BVN1G_yT.mjs} +6 -7
- 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 +122 -4
- 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 +34 -2
- 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 +27 -2
- 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 +151 -4
- package/dist/rpc/transports/ws-server.mjs +5 -6
- package/dist/{rpc-core-BLc5hm9X.mjs → rpc-core-BmDHiDR6.mjs} +4 -5
- package/dist/{rpc-core-CGTCla-R.d.mts → rpc-core-CblgPYJ_.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/{state-W4wI6X5X.mjs → state-B_yjfeqo.mjs} +3 -5
- package/dist/{storage-CWI9PZ-5.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 +5 -5
- package/dist/{types-BmDbfHCx.d.mts → types-KZOyhez5.d.mts} +2 -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 +6 -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 +40 -2
- 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 +55 -2
- 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 +3 -5
- 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/package.json +8 -8
- package/dist/index-CxJatyA1.d.mts +0 -88
- package/dist/index-DuEm0sDH.d.mts +0 -135
- package/dist/nostics-DWvukRwa.d.mts +0 -42
- package/dist/origin-CY6BBHOy.d.mts +0 -58
- package/dist/sse-client-DNdscfu_.d.mts +0 -37
- package/dist/ws-client-6Mrz6eC4.d.mts +0 -30
- package/dist/ws-server-y2R76aSW.d.mts +0 -152
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/rpc/define.ts
|
|
2
2
|
function defineRpcFunction(definition) {
|
|
3
3
|
return definition;
|
|
4
4
|
}
|
|
@@ -7,5 +7,4 @@ function createDefineWrapperWithContext() {
|
|
|
7
7
|
return definition;
|
|
8
8
|
};
|
|
9
9
|
}
|
|
10
|
-
//#endregion
|
|
11
10
|
export { defineRpcFunction as n, createDefineWrapperWithContext as t };
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { DEVFRAME_CONNECTION_META_FILENAME } from "./constants.mjs";
|
|
2
|
-
import { t as diagnostics } from "./diagnostics-E_PvUPsA.mjs";
|
|
3
|
-
import { t as createHostContext } from "./context-CAJ5V017.mjs";
|
|
4
|
-
import { t as resolveStaticAssetsSource } from "./remote-assets-B-n83kUY.mjs";
|
|
5
|
-
import { a as resolveMcpConfig, c as joinURL, d as withoutLeadingSlash, i as resolveDevServerPort, l as withBase, n as normalizeBasePath, r as resolveBasePath, s as importAgenticMcp, t as loadAutoMcpAdapter } from "./_shared-C61zPwIz.mjs";
|
|
6
|
-
import { t as createH3DevframeHost } from "./host-h3-BROI6SQ4.mjs";
|
|
7
|
-
import { a as isAddressInUse, i as normalizeHttpServerUrl, n as resolveInstanceRegister, o as listenWithLoopbackTwin, t as createInstanceShell } from "./instance-shell-m4sY2oTG.mjs";
|
|
8
1
|
import { open } from "./utils/open.mjs";
|
|
2
|
+
import { a as resolveMcpConfig, c as joinURL, d as withoutLeadingSlash, i as resolveDevServerPort, l as withBase, n as normalizeBasePath, r as resolveBasePath, s as importAgenticMcp, t as loadAutoMcpAdapter } from "./_shared-CtXCQFTV.mjs";
|
|
3
|
+
import { t as diagnostics } from "./diagnostics-DC1-WcvN.mjs";
|
|
4
|
+
import { a as isAddressInUse, i as normalizeHttpServerUrl, n as resolveInstanceRegister, o as listenWithLoopbackTwin, t as createInstanceShell } from "./instance-shell-Coid7CP6.mjs";
|
|
5
|
+
import { t as resolveStaticAssetsSource } from "./remote-assets-DhonNeo_.mjs";
|
|
9
6
|
import { mountStaticHandler } from "./utils/serve-static.mjs";
|
|
7
|
+
import { DEVFRAME_CONNECTION_META_FILENAME } from "./constants.mjs";
|
|
8
|
+
import { t as createHostContext } from "./context-C5FcbWQi.mjs";
|
|
9
|
+
import { t as createH3DevframeHost } from "./host-h3-D1uj5EM8.mjs";
|
|
10
10
|
import { resolve } from "pathe";
|
|
11
11
|
import { createServer } from "node:http";
|
|
12
12
|
import process from "node:process";
|
|
13
13
|
import { H3, toNodeHandler } from "h3";
|
|
14
|
-
|
|
14
|
+
// src/adapters/initiate.ts
|
|
15
15
|
const INSTANCE_INTERNALS = /* @__PURE__ */ new WeakMap();
|
|
16
16
|
/** @internal */
|
|
17
17
|
function getInstanceInternals(handler) {
|
|
@@ -152,8 +152,7 @@ async function mountMcpRoute(app, context, def, base, setting) {
|
|
|
152
152
|
dispose: mounted.dispose
|
|
153
153
|
};
|
|
154
154
|
}
|
|
155
|
-
|
|
156
|
-
//#region src/adapters/dev.ts
|
|
155
|
+
// src/adapters/dev.ts
|
|
157
156
|
/**
|
|
158
157
|
* Start a devframe dev server for a {@link DevframeDefinition}:
|
|
159
158
|
* h3 + WebSocket RPC + (optionally) the author's SPA mounted at the
|
|
@@ -286,5 +285,4 @@ async function maybeOpenBrowser(def, flags, origin, override, authHandler) {
|
|
|
286
285
|
await open(authorizedTarget);
|
|
287
286
|
} catch {}
|
|
288
287
|
}
|
|
289
|
-
//#endregion
|
|
290
288
|
export { getInstanceInternals as n, initDevframe as r, createDevServer as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as defineDiagnostics } from "./nostics-
|
|
2
|
-
|
|
1
|
+
import { i as defineDiagnostics } from "./nostics-InlX4tmd.mjs";
|
|
2
|
+
// src/node/diagnostics.ts
|
|
3
3
|
/**
|
|
4
4
|
* DF00xx codes are allocated across packages (e.g. @devframes/json-render
|
|
5
5
|
* owns DF0037–DF0041), so this file alone doesn't show the next free
|
|
@@ -201,5 +201,4 @@ const diagnostics = defineDiagnostics({
|
|
|
201
201
|
}
|
|
202
202
|
}
|
|
203
203
|
});
|
|
204
|
-
//#endregion
|
|
205
204
|
export { diagnostics as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// ../../node_modules/.pnpm/birpc@4.2.0/node_modules/birpc/dist/index.mjs
|
|
2
2
|
function createPromiseWithResolvers() {
|
|
3
3
|
let resolve;
|
|
4
4
|
let reject;
|
|
@@ -261,5 +261,4 @@ function createBirpcGroup(functions, channels, options = {}) {
|
|
|
261
261
|
broadcast: broadcastProxy
|
|
262
262
|
};
|
|
263
263
|
}
|
|
264
|
-
//#endregion
|
|
265
264
|
export { createBirpcGroup as n, createBirpc as t };
|
|
@@ -1,15 +1,8 @@
|
|
|
1
|
-
import { n as __exportAll } from "./rolldown-runtime-
|
|
2
|
-
import "node:fs/promises";
|
|
1
|
+
import { n as __exportAll } from "./rolldown-runtime-BVN1G_yT.mjs";
|
|
3
2
|
import { createServer } from "node:net";
|
|
4
3
|
import { networkInterfaces } from "node:os";
|
|
5
|
-
|
|
6
|
-
var dist_exports = /* @__PURE__ */ __exportAll({
|
|
7
|
-
checkPort: () => checkPort,
|
|
8
|
-
getPort: () => getPort,
|
|
9
|
-
getRandomPort: () => getRandomPort,
|
|
10
|
-
isSafePort: () => isSafePort,
|
|
11
|
-
isUnsafePort: () => isUnsafePort
|
|
12
|
-
});
|
|
4
|
+
// ../../node_modules/.pnpm/get-port-please@3.2.0/node_modules/get-port-please/dist/index.mjs
|
|
5
|
+
var dist_exports = /* @__PURE__ */ __exportAll({ getPort: () => getPort });
|
|
13
6
|
const unsafePorts = /* @__PURE__ */ new Set([
|
|
14
7
|
1,
|
|
15
8
|
7,
|
|
@@ -224,5 +217,4 @@ async function checkPort(port, host = process.env.HOST, verbose) {
|
|
|
224
217
|
}
|
|
225
218
|
return port;
|
|
226
219
|
}
|
|
227
|
-
//#endregion
|
|
228
220
|
export { getPort as n, dist_exports as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/events.ts
|
|
2
2
|
/**
|
|
3
3
|
* Centralized registry of the core devframe event names: the node-side host
|
|
4
4
|
* bus events, the client RPC connection events, and the server→client
|
|
@@ -76,5 +76,4 @@ const DEVFRAME_EVENTS = {
|
|
|
76
76
|
inPageChannel: "devframe:in-page-channel"
|
|
77
77
|
}
|
|
78
78
|
};
|
|
79
|
-
//#endregion
|
|
80
79
|
export { DEVFRAME_EVENTS as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as diagnostics } from "./serialization-
|
|
2
|
-
|
|
1
|
+
import { r as diagnostics } from "./serialization-iiTQ7n21.mjs";
|
|
2
|
+
// src/rpc/validate-io.ts
|
|
3
3
|
/**
|
|
4
4
|
* Run a single [Standard Schema](https://standardschema.dev) validator,
|
|
5
5
|
* awaiting the result when the validator is asynchronous.
|
|
@@ -62,8 +62,7 @@ async function validateRpcReturn(name, returnSchema, value) {
|
|
|
62
62
|
});
|
|
63
63
|
return value;
|
|
64
64
|
}
|
|
65
|
-
|
|
66
|
-
//#region src/rpc/handler.ts
|
|
65
|
+
// src/rpc/handler.ts
|
|
67
66
|
async function getRpcResolvedSetupResult(definition, context) {
|
|
68
67
|
if (!definition.setup) return {};
|
|
69
68
|
if (typeof context === "object" && context !== null) {
|
|
@@ -106,5 +105,4 @@ async function getRpcHandler(definition, context) {
|
|
|
106
105
|
};
|
|
107
106
|
return validating;
|
|
108
107
|
}
|
|
109
|
-
//#endregion
|
|
110
108
|
export { validateRpcReturn as i, getRpcResolvedSetupResult as n, validateRpcArgs as r, getRpcHandler as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// ../../node_modules/.pnpm/ohash@2.0.12/node_modules/ohash/dist/_chunks/is-equal.mjs
|
|
2
2
|
function serialize(input) {
|
|
3
3
|
if (typeof input === "string") return `'${input}'`;
|
|
4
4
|
return new Serializer().serialize(input);
|
|
@@ -145,8 +145,7 @@ const Serializer = /*@__PURE__*/ (function() {
|
|
|
145
145
|
};
|
|
146
146
|
return Serializer;
|
|
147
147
|
})();
|
|
148
|
-
|
|
149
|
-
//#region ../../node_modules/.pnpm/ohash@2.0.12/node_modules/ohash/dist/crypto/js/index.mjs
|
|
148
|
+
// ../../node_modules/.pnpm/ohash@2.0.12/node_modules/ohash/dist/crypto/js/index.mjs
|
|
150
149
|
const H = [
|
|
151
150
|
1779033703,
|
|
152
151
|
-1150833019,
|
|
@@ -343,18 +342,15 @@ var WordArray = class WordArray {
|
|
|
343
342
|
function digest(message) {
|
|
344
343
|
return new SHA256().finalize(message).toBase64();
|
|
345
344
|
}
|
|
346
|
-
|
|
347
|
-
//#region ../../node_modules/.pnpm/ohash@2.0.12/node_modules/ohash/dist/index.mjs
|
|
345
|
+
// ../../node_modules/.pnpm/ohash@2.0.12/node_modules/ohash/dist/index.mjs
|
|
348
346
|
function hash$1(input) {
|
|
349
347
|
return digest(serialize(input));
|
|
350
348
|
}
|
|
351
|
-
|
|
352
|
-
//#region src/utils/hash.ts
|
|
349
|
+
// src/utils/hash.ts
|
|
353
350
|
/**
|
|
354
351
|
* Stable, deterministic hash of any structured-cloneable value.
|
|
355
352
|
*/
|
|
356
353
|
function hash(value) {
|
|
357
354
|
return hash$1(value);
|
|
358
355
|
}
|
|
359
|
-
//#endregion
|
|
360
356
|
export { hash as t };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { join } from "pathe";
|
|
2
2
|
import process from "node:process";
|
|
3
3
|
import { homedir } from "node:os";
|
|
4
|
-
|
|
4
|
+
// src/node/host-h3.ts
|
|
5
5
|
/**
|
|
6
6
|
* h3-backed {@link DevframeHost}, used by the standalone CLI adapter.
|
|
7
7
|
*/
|
|
@@ -22,5 +22,4 @@ function createH3DevframeHost(options) {
|
|
|
22
22
|
}
|
|
23
23
|
};
|
|
24
24
|
}
|
|
25
|
-
//#endregion
|
|
26
25
|
export { createH3DevframeHost as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as resolveServicePackage, r as importServicePackage } from "./services-install-
|
|
2
|
-
|
|
1
|
+
import { i as resolveServicePackage, r as importServicePackage } from "./services-install-DCuDzMJ-.mjs";
|
|
2
|
+
// src/node/import-runtime-module.ts
|
|
3
3
|
/**
|
|
4
4
|
* Resolve and import a package at runtime without adding it to a consumer's
|
|
5
5
|
* bundle graph. First-party adapters use this for modules whose code is
|
|
@@ -20,5 +20,4 @@ async function importRuntimeModule(specifier) {
|
|
|
20
20
|
function isRuntimeModuleResolvable(specifier) {
|
|
21
21
|
return resolveServicePackage(specifier, [import.meta.url]) !== void 0;
|
|
22
22
|
}
|
|
23
|
-
//#endregion
|
|
24
23
|
export { isRuntimeModuleResolvable as n, importRuntimeModule as t };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { D as InferArgsType, E as Thenable, O as InferReturnType, T as RpcReturnSchema, m as RpcFunctionAgentOptions, n as RpcArgsSchema } from "../types-
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
import { D as InferArgsType, E as Thenable, O as InferReturnType, T as RpcReturnSchema, m as RpcFunctionAgentOptions, n as RpcArgsSchema } from "../types-KZOyhez5.mjs";
|
|
2
|
+
import { Bt as SharedState, nn as EventEmitter } from "../index-BhUqJUHG.mjs";
|
|
3
|
+
import "../index-BKu9BxcT.mjs";
|
|
4
4
|
/**
|
|
5
5
|
* The shared contract of one in-page channel, declared once (usually in a
|
|
6
6
|
* `shared/protocol.ts` both sides import) and passed to both endpoints as a
|
|
@@ -327,8 +327,6 @@ interface PanelChannel<P extends InPageChannelProtocol> {
|
|
|
327
327
|
/** Tear the endpoint down permanently. */
|
|
328
328
|
close: () => void;
|
|
329
329
|
}
|
|
330
|
-
//#endregion
|
|
331
|
-
//#region src/in-page-channel/internal.d.ts
|
|
332
330
|
/** Stable failure codes of the in-page channel. */
|
|
333
331
|
type InPageChannelErrorCode = 'timeout' |
|
|
334
332
|
/** The endpoint was closed (or closed while calls were pending). */
|
|
@@ -349,8 +347,6 @@ export declare class InPageChannelError extends Error {
|
|
|
349
347
|
cause?: unknown;
|
|
350
348
|
});
|
|
351
349
|
}
|
|
352
|
-
//#endregion
|
|
353
|
-
//#region src/in-page-channel/page-script.d.ts
|
|
354
350
|
/**
|
|
355
351
|
* Create the page-script endpoint of an in-page channel.
|
|
356
352
|
*
|
|
@@ -361,8 +357,6 @@ export declare class InPageChannelError extends Error {
|
|
|
361
357
|
* handshake. No server is involved at any point.
|
|
362
358
|
*/
|
|
363
359
|
export declare function createPageScriptChannel<P extends InPageChannelProtocol>(options: CreatePageScriptChannelOptions<P>): PageScriptChannel<P>;
|
|
364
|
-
//#endregion
|
|
365
|
-
//#region src/in-page-channel/panel.d.ts
|
|
366
360
|
/**
|
|
367
361
|
* Connect the panel endpoint of an in-page channel.
|
|
368
362
|
*
|
|
@@ -376,8 +370,6 @@ export declare function createPageScriptChannel<P extends InPageChannelProtocol>
|
|
|
376
370
|
* the UI can key a fallback state off `status` / `whenConnected()`.
|
|
377
371
|
*/
|
|
378
372
|
export declare function connectPanelChannel<P extends InPageChannelProtocol>(options: ConnectPanelChannelOptions<P>): PanelChannel<P>;
|
|
379
|
-
//#endregion
|
|
380
|
-
//#region src/in-page-channel/index.d.ts
|
|
381
373
|
/**
|
|
382
374
|
* Define one in-page channel function, the `defineRpcFunction` authoring
|
|
383
375
|
* shape narrowed to the browser (see {@link InPageFunctionDefinition}).
|
|
@@ -387,5 +379,4 @@ export declare function connectPanelChannel<P extends InPageChannelProtocol>(opt
|
|
|
387
379
|
* constant.
|
|
388
380
|
*/
|
|
389
381
|
export declare function defineChannelFunction<NAME extends string, TYPE extends InPageFunctionType, ARGS extends any[], RETURN = void, const AS extends RpcArgsSchema | undefined = undefined, const RS extends RpcReturnSchema | undefined = undefined>(definition: InPageFunctionDefinition<NAME, TYPE, ARGS, RETURN, AS, RS>): InPageFunctionDefinition<NAME, TYPE, ARGS, RETURN, AS, RS>;
|
|
390
|
-
//#endregion
|
|
391
382
|
export type { ConnectPanelChannelOptions, CreatePageScriptChannelOptions, InPageChannelErrorCode, InPageChannelProtocol, InPageChannelStatus, InPageFunctionDefinition, PageScriptChannel, PanelChannel, PanelPeer };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { a as defineDiagnostics, i as createBirpc, n as argsToJsonSchema, o as DEVFRAME_EVENTS, r as resolveAgentSafety, t as toolInputToRpcArgs } from "../tool-input-
|
|
2
|
-
import {
|
|
3
|
-
import { t as createSharedState } from "../shared-state-Cc-Jrhma.mjs";
|
|
1
|
+
import { a as defineDiagnostics, i as createBirpc, n as argsToJsonSchema, o as DEVFRAME_EVENTS, r as resolveAgentSafety, t as toolInputToRpcArgs } from "../tool-input-CcCgJ8jq.mjs";
|
|
2
|
+
import { r as registerBrowserAgentTool } from "../browser-agent-DmAotroz.mjs";
|
|
4
3
|
import { nanoid } from "../utils/nanoid.mjs";
|
|
5
|
-
import {
|
|
6
|
-
|
|
4
|
+
import { createEventEmitter } from "../utils/events.mjs";
|
|
5
|
+
import { t as createSharedState } from "../shared-state-COV7NCbd.mjs";
|
|
6
|
+
// src/in-page-channel/diagnostics.ts
|
|
7
7
|
const diagnostics = /* #__PURE__ */ defineDiagnostics({
|
|
8
8
|
docsBase: "https://devfra.me/errors",
|
|
9
9
|
codes: {
|
|
@@ -17,8 +17,7 @@ const diagnostics = /* #__PURE__ */ defineDiagnostics({
|
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
19
|
});
|
|
20
|
-
|
|
21
|
-
//#region src/in-page-channel/protocol.ts
|
|
20
|
+
// src/in-page-channel/protocol.ts
|
|
22
21
|
/**
|
|
23
22
|
* Wire protocol of the in-page channel handshake and its port-level control
|
|
24
23
|
* frames. The envelope is transport-neutral by design: it identifies the
|
|
@@ -348,8 +347,7 @@ function withCallDeadline(promise, ms, describeTimeout) {
|
|
|
348
347
|
});
|
|
349
348
|
});
|
|
350
349
|
}
|
|
351
|
-
|
|
352
|
-
//#region src/in-page-channel/state.ts
|
|
350
|
+
// src/in-page-channel/state.ts
|
|
353
351
|
/**
|
|
354
352
|
* The channel shared-state layer: `createSharedState` pumped over the
|
|
355
353
|
* in-page channel, mirroring the RPC shared-state wire design with the page
|
|
@@ -503,8 +501,7 @@ function createPanelStateHost(options) {
|
|
|
503
501
|
}
|
|
504
502
|
};
|
|
505
503
|
}
|
|
506
|
-
|
|
507
|
-
//#region src/in-page-channel/page-script.ts
|
|
504
|
+
// src/in-page-channel/page-script.ts
|
|
508
505
|
/**
|
|
509
506
|
* Create the page-script endpoint of an in-page channel.
|
|
510
507
|
*
|
|
@@ -674,8 +671,7 @@ function createPageScriptChannel(options) {
|
|
|
674
671
|
}
|
|
675
672
|
};
|
|
676
673
|
}
|
|
677
|
-
|
|
678
|
-
//#region src/in-page-channel/panel.ts
|
|
674
|
+
// src/in-page-channel/panel.ts
|
|
679
675
|
const DEFAULT_HELLO_INTERVAL_MS = 300;
|
|
680
676
|
const HELLO_INTERVAL_CAP_MS = 3e3;
|
|
681
677
|
const DEFAULT_EVENT_BUFFER_LIMIT = 64;
|
|
@@ -916,8 +912,7 @@ function connectPanelChannel(options) {
|
|
|
916
912
|
}
|
|
917
913
|
};
|
|
918
914
|
}
|
|
919
|
-
|
|
920
|
-
//#region src/in-page-channel/index.ts
|
|
915
|
+
// src/in-page-channel/index.ts
|
|
921
916
|
/**
|
|
922
917
|
* Define one in-page channel function, the `defineRpcFunction` authoring
|
|
923
918
|
* shape narrowed to the browser (see {@link InPageFunctionDefinition}).
|
|
@@ -929,5 +924,4 @@ function connectPanelChannel(options) {
|
|
|
929
924
|
function defineChannelFunction(definition) {
|
|
930
925
|
return definition;
|
|
931
926
|
}
|
|
932
|
-
//#endregion
|
|
933
927
|
export { InPageChannelError, connectPanelChannel, createPageScriptChannel, defineChannelFunction };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region ../../node_modules/.pnpm/@standard-schema+spec@1.1.0/node_modules/@standard-schema/spec/dist/index.d.ts
|
|
2
1
|
/** The Standard Typed interface. This is a base type extended by other specs. */
|
|
3
2
|
interface StandardTypedV1<Input = unknown, Output = Input> {
|
|
4
3
|
/** The Standard properties. */
|
|
@@ -74,5 +73,4 @@ declare namespace StandardSchemaV1 {
|
|
|
74
73
|
/** Infers the output type of a Standard. */
|
|
75
74
|
type InferOutput<Schema extends StandardTypedV1> = StandardTypedV1.InferOutput<Schema>;
|
|
76
75
|
}
|
|
77
|
-
//#endregion
|
|
78
76
|
export { StandardSchemaV1 as t };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region ../../node_modules/.pnpm/birpc@4.2.0/node_modules/birpc/dist/index.d.mts
|
|
2
1
|
//#region src/messages.d.ts
|
|
3
2
|
declare const TYPE_REQUEST: "q";
|
|
4
3
|
interface RpcRequest {
|
|
@@ -214,5 +213,4 @@ interface BirpcGroup<RemoteFunctions extends object = Record<string, unknown>, L
|
|
|
214
213
|
readonly broadcast: BirpcGroupReturn<RemoteFunctions, Proxify>;
|
|
215
214
|
updateChannels: (fn?: ((channels: ChannelOptions[]) => void)) => BirpcReturn<RemoteFunctions, LocalFunctions, Proxify>[];
|
|
216
215
|
}
|
|
217
|
-
//#endregion
|
|
218
216
|
export { ChannelOptions as a, BirpcReturn as i, BirpcGroup as n, EventOptions as o, BirpcOptions as r, BirpcFn as t };
|