11# Plugin 01 — RPC & State self-inspector
22
3- ** Package:** ` @devframes/plugin-rpc ` · ** Dir:** ` plugins/rpc / `
3+ ** Package:** ` @devframes/plugin-inspect ` · ** Dir:** ` plugins/inspect / `
44** Inspiration:** port of the RPC + shared-state inspector panels from
55` vitejs/devtools ` .
66** SPA stack (Axis B):** Vue + Vite (direct port).
7- ** Diagnostics band:** ` DF90xx ` .
7+ ** Diagnostics band:** ` DP_INSPECT_00xx ` .
88
99## Why first
1010
@@ -35,20 +35,20 @@ APIs every other plugin produces, so it is the fastest way to discover whether:
3535- the agent surface (` ctx.agent ` , the ` BUILTIN_AGENT_RPC ` ) is browsable.
3636
3737Expected gaps: missing introspection getters (may need a built-in
38- ` rpc :list-functions` style meta RPC in core), dump fidelity for non-JSON values,
38+ ` devframe :list-functions` style meta RPC in core), dump fidelity for non-JSON values,
3939and how a devframe inspects a connection it is * also* part of.
4040
4141## Host integrations (Axis A)
4242
43- - ` . ` — ` createRpcInspectorDevframe ()` factory + default ` DevframeDefinition ` .
44- - ` /cli ` — ` npx @devframes/plugin-rpc ` opens the inspector against a target.
43+ - ` . ` — ` createInspectDevframe ()` factory + default ` DevframeDefinition ` .
44+ - ` /cli ` — ` npx @devframes/plugin-inspect ` opens the inspector against a target.
4545- ` /vite ` — mount into a Vite host to inspect that host's devframe connection.
4646- ` /client ` — Vue mount helpers + any dock ` custom-render ` modules.
4747
4848## Package layout
4949
5050```
51- plugins/rpc /
51+ plugins/inspect /
5252 src/
5353 index.ts # `.` default DevframeDefinition + factory
5454 node/index.ts # `/node` setup(ctx): register introspection RPCs + docks
@@ -58,29 +58,29 @@ plugins/rpc/
5858 rpc/
5959 index.ts # serverFunctions tuple + DevframeRpcServerFunctions augment
6060 functions/
61- list-functions.ts # rpc :list-functions (query, snapshot)
62- invoke.ts # rpc :invoke (action) — gated to query fns
63- list-state-keys.ts # rpc :list-state-keys (query)
64- describe-agent.ts # rpc :describe-agent (query, snapshot)
61+ list-functions.ts # devframes-plugin-inspect :list-functions (query, snapshot)
62+ invoke.ts # devframes-plugin-inspect :invoke (action) — gated to query fns
63+ list-state-keys.ts # devframes-plugin-inspect :list-state-keys (query)
64+ describe-agent.ts # devframes-plugin-inspect :describe-agent (query, snapshot)
6565 spa/ # Vue + Vite UI
6666 bin.mjs
6767 test/
6868```
6969
7070## Node side
7171
72- - RPC (namespaced ` rpc :*` ):
73- - ` rpc :list-functions` — ` query ` , ` snapshot: true ` , ` jsonSerializable: true ` :
72+ - RPC (namespaced ` devframes-plugin-inspect :*` ):
73+ - ` devframes-plugin-inspect :list-functions` — ` query ` , ` snapshot: true ` , ` jsonSerializable: true ` :
7474 returns the registry with metadata. May need a core hook to read the registry;
7575 if absent, that is a tracked gap to add to ` devframe ` core.
76- - ` rpc :invoke` — ` action ` : invoke a named ` query ` function with validated args;
76+ - ` devframes-plugin-inspect :invoke` — ` action ` : invoke a named ` query ` function with validated args;
7777 refuse ` action ` /mutating functions for safety.
78- - ` rpc :list-state-keys` — enumerate shared-state keys + current snapshots.
79- - ` rpc :describe-agent` — surface ` ctx.agent ` tools/resources.
80- - Docks: a single ` iframe ` (or ` custom-render ` ) dock ` rpc :inspector` titled
78+ - ` devframes-plugin-inspect :list-state-keys` — enumerate shared-state keys + current snapshots.
79+ - ` devframes-plugin-inspect :describe-agent` — surface ` ctx.agent ` tools/resources.
80+ - Docks: a single ` iframe ` (or ` custom-render ` ) dock ` devframes-plugin-inspect :inspector` titled
8181 "RPC & State", icon e.g. ` ph:plugs-duotone ` .
8282- Shared state observed (read-only): all keys; no new keys written except a small
83- ` rpc :inspector:ui` for persisted panel UI prefs (serializable).
83+ ` devframes-plugin-inspect :inspector:ui` for persisted panel UI prefs (serializable).
8484
8585## Client side
8686
@@ -93,8 +93,8 @@ plugins/rpc/
9393
94941 . Scaffold package + tsdown three-config + alias/turbo/workspace wiring (this is
9595 the template all others copy).
96- 2 . ` rpc :list-functions` + Functions view (read-only).
97- 3 . ` rpc :invoke` for ` query ` functions + result rendering.
96+ 2 . ` devframes-plugin-inspect :list-functions` + Functions view (read-only).
97+ 3 . ` devframes-plugin-inspect :invoke` for ` query ` functions + result rendering.
98984 . State view with live subscription + diff.
99995 . Agent view; ` static ` /` spa ` degradation; tsnapi snapshot + e2e.
100100
@@ -106,5 +106,5 @@ plugins/rpc/
106106- How much of the ` vitejs/devtools ` Vue code ports cleanly vs. needs a rewrite
107107 against devframe's client (` connectDevframe ` , ` rpc.sharedState ` ) rather than
108108 Vite DevTools' kit client.
109- - Safety model for ` rpc :invoke` (which function types are invokable; argument
109+ - Safety model for ` devframes-plugin-inspect :invoke` (which function types are invokable; argument
110110 validation surface).
0 commit comments