@devframes/plugin-inspect 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/README.md CHANGED
@@ -28,12 +28,13 @@ reference and for poking at the introspection RPCs themselves.
28
28
 
29
29
  ```ts
30
30
  // vite.config.ts
31
- import { inspectVitePlugin } from '@devframes/plugin-inspect/vite'
31
+ import createInspectDevframe from '@devframes/plugin-inspect'
32
+ import { devframeVite } from '@devframes/vite/single'
32
33
  import { defineConfig } from 'vite'
33
34
 
34
35
  export default defineConfig({
35
36
  plugins: [
36
- inspectVitePlugin(),
37
+ devframeVite(createInspectDevframe()),
37
38
  ],
38
39
  })
39
40
  ```
package/dist/cli.d.mts CHANGED
@@ -4,7 +4,7 @@ import { CacHandle } from "devframe/adapters/cac";
4
4
  * Build the standalone CLI for the inspector — backs the package `bin`
5
5
  * (`devframe-inspect`) and `pnpx @devframes/plugin-inspect`. Wraps the
6
6
  * default {@link createInspectDevframe} definition with devframe's
7
- * `dev` / `build` / `spa` / `mcp` command shell.
7
+ * `dev` / `build` / `mcp` command shell.
8
8
  */
9
9
  declare function createInspectCli(): CacHandle;
10
10
  //#endregion
package/dist/cli.mjs CHANGED
@@ -1,14 +1,14 @@
1
- import { n as inspectDevframe } from "./src-CzzEF2WN.mjs";
1
+ import { t as createInspectDevframe } from "./src-A0WVU5Jb.mjs";
2
2
  import { createCac } from "devframe/adapters/cac";
3
3
  //#region src/cli.ts
4
4
  /**
5
5
  * Build the standalone CLI for the inspector — backs the package `bin`
6
6
  * (`devframe-inspect`) and `pnpx @devframes/plugin-inspect`. Wraps the
7
7
  * default {@link createInspectDevframe} definition with devframe's
8
- * `dev` / `build` / `spa` / `mcp` command shell.
8
+ * `dev` / `build` / `mcp` command shell.
9
9
  */
10
10
  function createInspectCli() {
11
- return createCac(inspectDevframe);
11
+ return createCac(createInspectDevframe());
12
12
  }
13
13
  //#endregion
14
14
  export { createInspectCli };
@@ -1,4 +1,4 @@
1
- import { a as RpcFunctionAgentInfo, i as InvokeResult, n as DevframeInspectCommandInfo, o as RpcFunctionInfo, r as DevframeInspectInstanceInfo, t as AgentManifest } from "../types-_vo7QhmS.mjs";
1
+ import { a as RpcFunctionAgentInfo, i as InvokeResult, n as DevframeInspectCommandInfo, o as RpcFunctionInfo, r as DevframeInspectInstanceInfo, t as AgentManifest } from "../types-CiRcsiuh.mjs";
2
2
  import { DevframeConnectionStatus, DevframeRpcClient, DevframeRpcClientOptions } from "devframe/client";
3
3
  //#region src/client/index.d.ts
4
4
  /**
@@ -1,5 +1,5 @@
1
- import "./types-_vo7QhmS.mjs";
2
- import { DevframeDefinition } from "devframe/types";
1
+ import "./types-CiRcsiuh.mjs";
2
+ import { DevframeDefinition } from "devframe";
3
3
  //#region src/index.d.ts
4
4
  interface InspectDevframeOptions {
5
5
  /** Override the devframe id (and default CLI command / mount path). */
@@ -25,14 +25,12 @@ interface InspectDevframeOptions {
25
25
  }
26
26
  /**
27
27
  * Build a {@link DevframeDefinition} for the Devframe Inspector. The
28
- * same definition runs standalone (`/cli`, `/spa`, `/build`) and mounts
28
+ * same definition runs standalone (`/cli`, `/build`) and mounts
29
29
  * into a host (`/vite`, hub).
30
30
  *
31
31
  * @experimental This plugin is experimental and may change without a major
32
32
  * version bump until it stabilizes.
33
33
  */
34
34
  declare function createInspectDevframe(options?: InspectDevframeOptions): DevframeDefinition;
35
- /** The default inspector devframe definition. */
36
- declare const inspectDevframe: DevframeDefinition;
37
35
  //#endregion
38
- export { createInspectDevframe as n, inspectDevframe as r, InspectDevframeOptions as t };
36
+ export { createInspectDevframe as n, InspectDevframeOptions as t };
package/dist/index.d.mts CHANGED
@@ -1,3 +1,3 @@
1
- import { i as InvokeResult, o as RpcFunctionInfo } from "./types-_vo7QhmS.mjs";
2
- import { n as createInspectDevframe, r as inspectDevframe, t as InspectDevframeOptions } from "./index-B7KBbd3U.mjs";
3
- export { InspectDevframeOptions, type InvokeResult, type RpcFunctionInfo, createInspectDevframe, inspectDevframe as default };
1
+ import { i as InvokeResult, o as RpcFunctionInfo } from "./types-CiRcsiuh.mjs";
2
+ import { n as createInspectDevframe, t as InspectDevframeOptions } from "./index-BeAbhMoX.mjs";
3
+ export { InspectDevframeOptions, type InvokeResult, type RpcFunctionInfo, createInspectDevframe, createInspectDevframe as default };
package/dist/index.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import { n as inspectDevframe, t as createInspectDevframe } from "./src-CzzEF2WN.mjs";
2
- export { createInspectDevframe, inspectDevframe as default };
1
+ import { t as createInspectDevframe } from "./src-A0WVU5Jb.mjs";
2
+ export { createInspectDevframe, createInspectDevframe as default };
@@ -1,5 +1,5 @@
1
1
  import { serverFunctions } from "../rpc/index.mjs";
2
- import { DevframeNodeContext } from "devframe/types";
2
+ import { DevframeNodeContext } from "devframe";
3
3
  //#region src/node/index.d.ts
4
4
  /**
5
5
  * Register the inspector's introspection RPC functions on a devframe
@@ -1,4 +1,4 @@
1
- import { t as serverFunctions } from "../rpc-BCuMcHnd.mjs";
1
+ import { t as serverFunctions } from "../rpc-IoEVPxbU.mjs";
2
2
  //#region src/node/index.ts
3
3
  /**
4
4
  * Register the inspector's introspection RPC functions on a devframe
@@ -1,5 +1,5 @@
1
- import { i as InvokeResult, n as DevframeInspectCommandInfo, o as RpcFunctionInfo, r as DevframeInspectInstanceInfo } from "../types-_vo7QhmS.mjs";
2
- import "../index-B7KBbd3U.mjs";
1
+ import { i as InvokeResult, n as DevframeInspectCommandInfo, o as RpcFunctionInfo, r as DevframeInspectInstanceInfo } from "../types-CiRcsiuh.mjs";
2
+ import "../index-BeAbhMoX.mjs";
3
3
  import { RpcDefinitionsToFunctions } from "devframe/rpc";
4
4
  //#region src/rpc/index.d.ts
5
5
  /**
@@ -1,2 +1,2 @@
1
- import { t as serverFunctions } from "../rpc-BCuMcHnd.mjs";
1
+ import { t as serverFunctions } from "../rpc-IoEVPxbU.mjs";
2
2
  export { serverFunctions };
@@ -1,8 +1,7 @@
1
1
  import { createDefineWrapperWithContext } from "devframe/rpc";
2
- import { defineDiagnostics } from "nostics";
3
- import { toJsonSchema } from "@valibot/to-json-schema";
2
+ import { defineDiagnostics } from "devframe/utils/nostics";
4
3
  import process from "node:process";
5
- import { listLiveDevframeInstances } from "devframe/node";
4
+ import { listLiveDevframeInstances } from "devframe/internal";
6
5
  //#region src/rpc/functions/_define.ts
7
6
  /**
8
7
  * `defineRpcFunction` pre-bound to the framework-neutral
@@ -240,16 +239,18 @@ const FALLBACK_SCHEMA = Object.freeze({
240
239
  /**
241
240
  * Convert a schema to JSON Schema for the inspector, vendor-neutrally.
242
241
  *
243
- * Prefers the schema's own Standard JSON Schema converter
244
- * (`~standard.jsonSchema`, implemented by e.g. zod 4), then falls back to
245
- * valibot's converter, then to a permissive object — so introspection never
246
- * throws regardless of which validator produced the schema.
242
+ * Uses the schema's own [Standard JSON Schema](https://standardschema.dev/)
243
+ * converter (`~standard.jsonSchema`, implemented by e.g. zod 4) when the
244
+ * validator provides one, and degrades to a permissive object schema
245
+ * otherwise (e.g. valibot, which has no native converter) — so introspection
246
+ * never throws and never pulls in a converter library for a validator devframe
247
+ * doesn't otherwise depend on.
247
248
  */
248
249
  function convert(schema) {
249
250
  const standard = schema["~standard"];
251
+ if (!standard.jsonSchema) return FALLBACK_SCHEMA;
250
252
  try {
251
- if (standard.jsonSchema) return standard.jsonSchema.input({ target: "draft-2020-12" });
252
- return toJsonSchema(schema);
253
+ return standard.jsonSchema.input({ target: "draft-2020-12" });
253
254
  } catch {
254
255
  return FALLBACK_SCHEMA;
255
256
  }
@@ -1,20 +1,22 @@
1
1
  import { setupInspect } from "./node/index.mjs";
2
- import { existsSync } from "node:fs";
3
- import { fileURLToPath } from "node:url";
4
- import { defineDevframe } from "devframe/types";
2
+ import { defineDevframe } from "devframe";
5
3
  //#region package.json
6
4
  var name = "@devframes/plugin-inspect";
7
- var version = "0.8.2";
8
- var description = "Devframe plugin — a self-inspector for the RPC registry, shared state, and agent surface of a devframe connection.";
5
+ var version = "0.9.0-beta.10";
6
+ var description = "Devframe plugin that inspects the RPC registry, shared state, and agent surface of a connection.";
9
7
  var homepage = "https://github.com/devframes/devframe#readme";
10
8
  //#endregion
11
9
  //#region src/index.ts
12
10
  /** Default devframe id — drives the hosted mount path `/__<id>/`. */
13
11
  const DEFAULT_ID = "devframes_plugin_inspect";
14
- const distDir = fileURLToPath(new URL("../dist/spa", import.meta.url));
12
+ const distDir = {
13
+ package: `${name}--assets`,
14
+ version,
15
+ resolveFrom: import.meta.url
16
+ };
15
17
  /**
16
18
  * Build a {@link DevframeDefinition} for the Devframe Inspector. The
17
- * same definition runs standalone (`/cli`, `/spa`, `/build`) and mounts
19
+ * same definition runs standalone (`/cli`, `/build`) and mounts
18
20
  * into a host (`/vite`, hub).
19
21
  *
20
22
  * @experimental This plugin is experimental and may change without a major
@@ -34,17 +36,14 @@ function createInspectDevframe(options = {}) {
34
36
  cli: {
35
37
  command: id,
36
38
  port: options.port ?? 9012,
37
- distDir: existsSync(distDir) ? distDir : void 0,
39
+ distDir,
38
40
  auth: options.auth ?? true
39
41
  },
40
- spa: { loader: "none" },
41
42
  dock: { category: "~builtin" },
42
43
  setup(ctx) {
43
44
  setupInspect(ctx);
44
45
  }
45
46
  });
46
47
  }
47
- /** The default inspector devframe definition. */
48
- const inspectDevframe = createInspectDevframe();
49
48
  //#endregion
50
- export { inspectDevframe as n, createInspectDevframe as t };
49
+ export { createInspectDevframe as t };
@@ -1,4 +1,4 @@
1
- import { AgentManifest } from "devframe/types";
1
+ import { AgentManifest } from "devframe";
2
2
  //#region src/types.d.ts
3
3
  /**
4
4
  * Agent-exposure projection surfaced for each RPC function. Mirrors the
@@ -15,8 +15,8 @@ interface RpcFunctionAgentInfo {
15
15
  /**
16
16
  * Serializable description of a single registered RPC function. Returned
17
17
  * by `devframes:plugin:inspect:list-functions`. JSON-safe by construction
18
- * — valibot schemas are projected to JSON Schema (best effort), never
19
- * sent as live objects.
18
+ * — Standard Schema args/return schemas are projected to JSON Schema (best
19
+ * effort), never sent as live objects.
20
20
  */
21
21
  interface RpcFunctionInfo {
22
22
  /** Full namespaced function name (e.g. `my-plugin:do-thing`). */
@@ -29,9 +29,9 @@ interface RpcFunctionInfo {
29
29
  snapshot: boolean;
30
30
  /** Whether results may be cached client-side. */
31
31
  cacheable: boolean;
32
- /** Whether an args valibot schema is declared. */
32
+ /** Whether an args schema is declared. */
33
33
  hasArgs: boolean;
34
- /** Whether a return valibot schema is declared. */
34
+ /** Whether a return schema is declared. */
35
35
  hasReturns: boolean;
36
36
  /** Whether an explicit dump definition is declared. */
37
37
  hasDump: boolean;
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@devframes/plugin-inspect",
3
3
  "type": "module",
4
- "version": "0.8.2",
5
- "description": "Devframe plugin — a self-inspector for the RPC registry, shared state, and agent surface of a devframe connection.",
4
+ "version": "0.9.0-beta.10",
5
+ "description": "Devframe plugin that inspects the RPC registry, shared state, and agent surface of a connection.",
6
6
  "author": "Anthony Fu <anthonyfu117@hotmail.com>",
7
7
  "license": "MIT",
8
8
  "homepage": "https://github.com/devframes/devframe#readme",
@@ -25,7 +25,6 @@
25
25
  "./client": "./dist/client/index.mjs",
26
26
  "./cli": "./dist/cli.mjs",
27
27
  "./node": "./dist/node/index.mjs",
28
- "./vite": "./dist/vite.mjs",
29
28
  "./package.json": "./package.json"
30
29
  },
31
30
  "types": "./dist/index.d.mts",
@@ -38,40 +37,43 @@
38
37
  ],
39
38
  "peerDependencies": {
40
39
  "vite": "^7.0.0 || ^8.0.0",
41
- "devframe": "0.8.2"
40
+ "@devframes/plugin-inspect--assets": "0.9.0-beta.10",
41
+ "devframe": "0.9.0-beta.10"
42
42
  },
43
43
  "peerDependenciesMeta": {
44
+ "@devframes/plugin-inspect--assets": {
45
+ "optional": true
46
+ },
44
47
  "vite": {
45
48
  "optional": true
46
49
  }
47
50
  },
48
51
  "dependencies": {
49
- "@valibot/to-json-schema": "^1.7.1",
50
- "cac": "^7.0.0",
51
- "nostics": "^1.2.0"
52
+ "cac": "^7.0.0"
52
53
  },
53
54
  "devDependencies": {
54
- "@antfu/design": "^0.3.3",
55
+ "@antfu/design": "^0.3.4",
55
56
  "@iconify-json/ph": "^1.2.2",
56
57
  "@standard-schema/spec": "^1.1.0",
57
- "@storybook/addon-docs": "^10.5.6",
58
- "@storybook/vue3-vite": "^10.5.6",
58
+ "@storybook/addon-docs": "^10.5.7",
59
+ "@storybook/vue3-vite": "^10.5.7",
59
60
  "@unocss/preset-icons": "^66.7.5",
60
61
  "@vitejs/plugin-vue": "^6.0.8",
61
62
  "colorjs.io": "^0.7.1",
62
63
  "floating-vue": "^5.2.2",
63
- "get-port-please": "^3.2.0",
64
64
  "h3": "^2.0.1-rc.26",
65
- "reka-ui": "^2.10.1",
66
- "storybook": "^10.5.6",
65
+ "reka-ui": "^2.10.3",
66
+ "storybook": "^10.5.7",
67
67
  "tsdown": "^0.22.14",
68
68
  "unocss": "^66.7.5",
69
- "vite": "^8.2.0",
69
+ "vite": "^8.2.1",
70
70
  "vitest": "^4.1.10",
71
- "vue": "^3.5.40",
72
- "ws": "^8.21.2",
73
- "@devframes/hub": "0.8.2",
74
- "devframe": "0.8.2"
71
+ "vue": "^3.5.41",
72
+ "ws": "^8.21.3",
73
+ "@devframes/hub": "0.9.0-beta.10",
74
+ "@devframes/plugin-inspect--assets": "0.9.0-beta.10",
75
+ "@devframes/vite": "0.9.0-beta.10",
76
+ "devframe": "0.9.0-beta.10"
75
77
  },
76
78
  "scripts": {
77
79
  "build": "tsdown && vite build --config src/spa/vite.config.ts",