devframe 0.8.2 → 0.9.0-beta.10
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-BPmX9fqK.d.mts +41 -0
- package/dist/_shared-CbZ_yhbz.mjs +68 -0
- package/dist/adapters/build.d.mts +10 -12
- package/dist/adapters/build.mjs +26 -29
- package/dist/adapters/cac.d.mts +1 -1
- package/dist/adapters/cac.mjs +156 -1
- package/dist/adapters/dev.d.mts +38 -46
- package/dist/adapters/dev.mjs +2 -1
- package/dist/adapters/embedded.d.mts +1 -1
- package/dist/adapters/initiate.d.mts +224 -0
- package/dist/adapters/initiate.mjs +2 -0
- package/dist/adapters/mcp.d.mts +24 -7
- package/dist/adapters/mcp.mjs +2 -2
- 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 +4 -8
- package/dist/client/index.d.mts +71 -7
- package/dist/client/index.mjs +720 -1540
- package/dist/constants.d.mts +28 -7
- package/dist/constants.mjs +28 -7
- package/dist/{context-DoSozfvx.d.mts → context-B3YUu_95.d.mts} +19 -1
- package/dist/{host-h3-D2hYZvDK.mjs → context-CEe4PBz1.mjs} +25 -557
- package/dist/{context-CBg8iRbQ.mjs → context-xdynGSLP.mjs} +10 -1
- package/dist/dev--rAPzbvO.mjs +239 -0
- package/dist/{devframe-mQ4qZAuo.d.mts → devframe-DJMg0WLe.d.mts} +181 -134
- package/dist/{diagnostics-hwjXp_UV.mjs → diagnostics-CD8nlgll.mjs} +1 -3
- package/dist/{diagnostics-D7wM2cwM.mjs → diagnostics-DOQPnQmX.mjs} +51 -5
- package/dist/dist-eNI9qM_I.mjs +228 -0
- package/dist/host-agent-xLCSe65D.mjs +264 -0
- package/dist/host-h3-Crkzm42q.mjs +26 -0
- package/dist/{fetch-BKaD0Vb3.mjs → http-DYpK0cUi.mjs} +42 -11
- package/dist/{index-b64Uuhy2.d.mts → index-CB-fSUyn.d.mts} +2 -2
- package/dist/{index-Dbw1p5ch.d.mts → index-tdrk1bzV.d.mts} +3 -32
- package/dist/index.d.mts +12 -5
- package/dist/index.mjs +8 -1
- package/dist/{instance-registry-BnnA2Eoh.mjs → instance-registry-WvQkt42E.mjs} +9 -8
- package/dist/instance-shell-CMFyszWJ.mjs +486 -0
- package/dist/instance-shell-CljiKq1c.d.mts +255 -0
- package/dist/internal/index.d.mts +397 -0
- package/dist/internal/index.mjs +9 -0
- package/dist/node/auth.d.mts +2 -2
- package/dist/node/auth.mjs +1 -1
- package/dist/node/hub-internals.d.mts +2 -14
- package/dist/node/hub-internals.mjs +2 -2
- package/dist/node/index.d.mts +4 -268
- package/dist/node/index.mjs +3 -5
- package/dist/nostics-CzECRXpE.mjs +59 -0
- package/dist/nostics-SPGDgHEP.d.mts +33 -0
- package/dist/recipes/common-rpc-functions.d.mts +4 -4
- package/dist/recipes/interactive-auth.d.mts +3 -3
- package/dist/recipes/interactive-auth.mjs +8 -8
- package/dist/remote-assets-Bg4gCUZ_.d.mts +123 -0
- package/dist/remote-assets-nTTxY2MU.mjs +636 -0
- package/dist/rolldown-runtime-JspESFgx.mjs +35 -0
- package/dist/rpc/dump.d.mts +77 -1
- package/dist/rpc/dump.mjs +1 -1
- package/dist/rpc/index.d.mts +3 -3
- package/dist/rpc/index.mjs +4 -18
- package/dist/rpc/transports/sse-client.d.mts +2 -0
- package/dist/rpc/transports/sse-client.mjs +142 -0
- package/dist/rpc/transports/sse-server.d.mts +61 -0
- package/dist/rpc/transports/sse-server.mjs +209 -0
- package/dist/rpc/transports/ws-bun.d.mts +35 -0
- package/dist/rpc/transports/ws-bun.mjs +31 -0
- package/dist/rpc/transports/ws-client.d.mts +1 -1
- package/dist/rpc/transports/ws-client.mjs +10 -18
- package/dist/rpc/transports/ws-server.d.mts +2 -2
- package/dist/rpc/transports/ws-server.mjs +2 -235
- package/dist/rpc-core-Cc4lucI0.d.mts +48 -0
- package/dist/rpc-core-DMTe-hLo.mjs +81 -0
- package/dist/{serialization-C8Mnw9hK.mjs → serialization-BGzEwAdr.mjs} +2 -2
- package/dist/{shared-state-6kHolYZy.mjs → shared-state-fRRbRUtD.mjs} +1 -1
- package/dist/sse-client-CFBOIaUi.d.mts +37 -0
- package/dist/state-Cc1IeSmQ.mjs +1291 -0
- package/dist/{dump-CgZShDRB.mjs → static-BPZ1_OPA.mjs} +3 -266
- package/dist/storage-CYye7P7L.mjs +137 -0
- package/dist/types/index.d.mts +6 -4
- package/dist/types/index.mjs +1 -6
- 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/get-port.d.mts +17 -0
- package/dist/utils/get-port.mjs +2 -0
- package/dist/utils/launch-editor.mjs +1 -25
- package/dist/utils/nostics.d.mts +2 -0
- package/dist/utils/nostics.mjs +2 -0
- package/dist/utils/open.d.mts +2 -10
- package/dist/utils/open.mjs +56 -1
- package/dist/utils/remote-assets.d.mts +15 -0
- package/dist/utils/remote-assets.mjs +2 -0
- package/dist/utils/serve-static.d.mts +13 -5
- package/dist/utils/serve-static.mjs +119 -9
- package/dist/utils/shared-state.d.mts +1 -1
- package/dist/utils/shared-state.mjs +1 -1
- package/dist/utils/simple-schema.d.mts +101 -1
- package/dist/utils/streaming-channel.d.mts +1 -1
- package/dist/validation-CpXFB6Dz.mjs +266 -0
- package/dist/wire-codec-0K-o5MYW.mjs +56 -0
- package/dist/{ws-client-B6Tnr0ic.d.mts → ws-client-DhjNyQo3.d.mts} +7 -2
- package/dist/ws-server-BdSLrhxE.mjs +267 -0
- package/dist/{ws-server-uKQcClcJ.d.mts → ws-server-D1d3QM9f.d.mts} +90 -9
- package/package.json +13 -12
- package/skills/devframe/SKILL.md +91 -93
- package/dist/_shared-bWRzeSa0.mjs +0 -19
- package/dist/adapters/cli.d.mts +0 -11
- package/dist/adapters/cli.mjs +0 -6
- package/dist/cac-D4_9ok0z.mjs +0 -157
- package/dist/dev-Bc49u3qg.mjs +0 -439
- package/dist/diagnostics-reporter-CsIG85Q5.mjs +0 -38
- package/dist/helpers/vite.d.mts +0 -100
- package/dist/helpers/vite.mjs +0 -105
- package/dist/http-C4T68YV6.mjs +0 -38
- package/dist/index-vAX6bYuc.d.mts +0 -78
- package/dist/open-Deb5xmIT.mjs +0 -547
- package/dist/recipes/open-helpers.d.mts +0 -6
- package/dist/recipes/open-helpers.mjs +0 -6
- package/dist/server-CD8XmBXl.mjs +0 -167
- package/dist/server-UHWae43Q.d.mts +0 -149
- package/dist/simple-schema-BDzLeJDk.d.mts +0 -102
- package/dist/state-BeUHDDjk.mjs +0 -108
- package/dist/storage-CTNVbuFB.mjs +0 -1122
- package/dist/utils/promise.d.mts +0 -8
- package/dist/utils/promise.mjs +0 -15
- package/dist/utils/scope.d.mts +0 -11
- package/dist/utils/scope.mjs +0 -15
- package/skills/devframe/templates/spa-devframe.ts +0 -38
package/dist/utils/promise.d.mts
DELETED
package/dist/utils/promise.mjs
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
//#region src/utils/promise.ts
|
|
2
|
-
function promiseWithResolver() {
|
|
3
|
-
let resolve;
|
|
4
|
-
let reject;
|
|
5
|
-
return {
|
|
6
|
-
promise: new Promise((_resolve, _reject) => {
|
|
7
|
-
resolve = _resolve;
|
|
8
|
-
reject = _reject;
|
|
9
|
-
}),
|
|
10
|
-
resolve,
|
|
11
|
-
reject
|
|
12
|
-
};
|
|
13
|
-
}
|
|
14
|
-
//#endregion
|
|
15
|
-
export { promiseWithResolver };
|
package/dist/utils/scope.d.mts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
//#region src/utils/scope.d.ts
|
|
2
|
-
/** Whether a name is already namespaced (contains a `:` separator). */
|
|
3
|
-
declare function isQualifiedName(name: string): boolean;
|
|
4
|
-
/**
|
|
5
|
-
* Prefix a bare name with `<namespace>:`. Names that already contain a
|
|
6
|
-
* `:` are returned unchanged, so callers can reference another scope's
|
|
7
|
-
* ids explicitly (e.g. `ctx.rpc.call('other-plugin:fn')`).
|
|
8
|
-
*/
|
|
9
|
-
declare function qualifyName(namespace: string, name: string): string;
|
|
10
|
-
//#endregion
|
|
11
|
-
export { isQualifiedName, qualifyName };
|
package/dist/utils/scope.mjs
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
//#region src/utils/scope.ts
|
|
2
|
-
/** Whether a name is already namespaced (contains a `:` separator). */
|
|
3
|
-
function isQualifiedName(name) {
|
|
4
|
-
return name.includes(":");
|
|
5
|
-
}
|
|
6
|
-
/**
|
|
7
|
-
* Prefix a bare name with `<namespace>:`. Names that already contain a
|
|
8
|
-
* `:` are returned unchanged, so callers can reference another scope's
|
|
9
|
-
* ids explicitly (e.g. `ctx.rpc.call('other-plugin:fn')`).
|
|
10
|
-
*/
|
|
11
|
-
function qualifyName(namespace, name) {
|
|
12
|
-
return isQualifiedName(name) ? name : `${namespace}:${name}`;
|
|
13
|
-
}
|
|
14
|
-
//#endregion
|
|
15
|
-
export { isQualifiedName, qualifyName };
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
// Devframe with setupBrowser + SPA query-loader — deployable as a static site.
|
|
2
|
-
// Host adapters (e.g. the `vite` adapter for Vite DevTools) auto-derive their
|
|
3
|
-
// mount entry from `id` / `name` / `icon`.
|
|
4
|
-
import { defineDevframe, defineRpcFunction } from 'devframe'
|
|
5
|
-
// Recommended: source version/packageName/homepage/description from your
|
|
6
|
-
// package.json so the published metadata stays in sync. The import-attribute
|
|
7
|
-
// form resolves under both bundlers and Node's native TypeScript execution.
|
|
8
|
-
import pkg from '../package.json' with { type: 'json' }
|
|
9
|
-
import * as v from 'valibot'
|
|
10
|
-
|
|
11
|
-
export default defineDevframe({
|
|
12
|
-
id: 'my-inspector',
|
|
13
|
-
name: 'My Inspector',
|
|
14
|
-
version: pkg.version,
|
|
15
|
-
packageName: pkg.name,
|
|
16
|
-
homepage: pkg.homepage,
|
|
17
|
-
description: pkg.description,
|
|
18
|
-
icon: 'ph:magnifying-glass-duotone',
|
|
19
|
-
setup(ctx) {
|
|
20
|
-
const my = ctx.scope('my-inspector')
|
|
21
|
-
my.rpc.register(defineRpcFunction({
|
|
22
|
-
name: 'analyze', // -> my-inspector:analyze
|
|
23
|
-
type: 'query',
|
|
24
|
-
args: [v.object({ url: v.string() })],
|
|
25
|
-
returns: v.object({ url: v.string(), verdict: v.literal('ok') }),
|
|
26
|
-
handler: ({ url }: { url: string }) => {
|
|
27
|
-
// Server-side implementation (used by CLI/build adapters).
|
|
28
|
-
return { url, verdict: 'ok' as const }
|
|
29
|
-
},
|
|
30
|
-
}))
|
|
31
|
-
},
|
|
32
|
-
setupBrowser() {
|
|
33
|
-
// Browser-side implementation — used by the SPA adapter so the
|
|
34
|
-
// deployed static site can answer RPC without a server.
|
|
35
|
-
// (Wire up an in-browser handler here once the SPA adapter lands.)
|
|
36
|
-
},
|
|
37
|
-
spa: { loader: 'query' },
|
|
38
|
-
})
|