# @devframes/plugin-inspect

> Devframe plugin that inspects the RPC registry, shared state, and agent surface of a connection.

Latest version **0.9.18** (published 2026-09-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install @devframes/plugin-inspect
pnpm add @devframes/plugin-inspect
yarn add @devframes/plugin-inspect
bun add @devframes/plugin-inspect
```

Provides the command `devframe-inspect`.

## Health

**Score 75/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; has provenance; recently updated; high maintenance score; high quality score.

Warnings: low downloads; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.9.18 |
| Published | 2026-09-10 |
| First published | 2026-07-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM |
| Dependencies | 1 |
| Unpacked size | 39.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 116 |
| Author | Anthony Fu <anthonyfu117@hotmail.com> |
| Maintainers | antfu |
| Keywords | devframe, devframe-plugin, devtools, rpc, inspector |

## Links

- npm: https://www.npmjs.com/package/@devframes/plugin-inspect
- Repository: https://github.com/devframes/devframe
- Homepage: https://github.com/devframes/devframe#readme
- Issues: https://github.com/devframes/devframe/issues
- npm.io page: https://npm.io/package/@devframes/plugin-inspect

## Dependencies (1)

- [cac](https://npm.io/package/cac.md) ^7.0.0

## Recent versions

- 0.9.18 (latest) — 2026-09-10
- 0.9.17 — 2026-09-09
- 0.9.16 — 2026-09-08
- 0.9.15 — 2026-09-08
- 0.9.12 — 2026-09-04
- 0.9.11 — 2026-09-04
- 0.9.10 — 2026-09-03
- 0.9.9 — 2026-09-03
- 0.9.8 — 2026-09-01
- 0.9.7 — 2026-08-27
- 0.9.6 — 2026-08-27
- 0.9.5 — 2026-08-21
- 0.9.4 — 2026-08-20
- 0.9.3 — 2026-08-19
- 0.9.2 — 2026-08-19
- … 35 more at https://npm.io/package/@devframes/plugin-inspect/versions

## README

# @devframes/plugin-inspect

> [!WARNING] Experimental
> This devframe is experimental and may change without a major version bump until
> it stabilizes.

A built-in devframe that inspects *its own* connection (and, when mounted in a
hub, the hub's): browse every registered RPC function with its metadata,
invoke read-only `query`/`static` functions and inspect the results, watch
shared-state keys update live, explore the agent-exposed API, and (while
running against a live backend) list the other devframe dev servers running
alongside it.

Ported in spirit from the RPC & State panels of
[`vitejs/devtools`](https://github.com/vitejs/devtools); rebuilt on devframe's
framework-neutral client (`connectDevframe`, `rpc.sharedState`) with a Vue + Vite SPA.

## Use it standalone

```bash
pnpx @devframes/plugin-inspect
```

Opens the inspector against a fresh standalone devframe connection, useful as a
reference and for poking at the introspection RPCs themselves.

## Mount into a Vite host

```ts
// vite.config.ts
import createInspectDevframe from '@devframes/plugin-inspect'
import { devframeVite } from '@devframes/vite/single'
import { defineConfig } from 'vite'

export default defineConfig({
  plugins: [
    devframeVite(createInspectDevframe()),
  ],
})
```

## Programmatic

```ts
import { createInspectDevframe } from '@devframes/plugin-inspect'

const devframe = createInspectDevframe({ port: 9100 })
```

## RPC

All functions are namespaced `devframes:plugin:inspect:*`:

| Function | Type | What it returns |
|----------|------|-----------------|
| `list-functions` | `query` (snapshot) | Every registered RPC function with metadata (type, JSON-serializable/snapshot flags, args/return JSON Schema, agent exposure). |
| `invoke` | `action` | Invokes a read-only `query`/`static` function by name and returns a result envelope. Refuses `action`/`event` functions. |
| `list-state-keys` | `query` (snapshot) | The keys of every shared-state entry on the connection. |
| `describe-agent` | `query` (snapshot) | The agent manifest: tools and readable resources. |
| `list-instances` | `query` (live) | Every devframe dev server currently running on the machine, discovered through the shared instance registry. Powers the read-only Instances tab. |

The three snapshot `query` functions are agent-exposed (read-only) and bake into
the static dump, so the inspector still lists functions, state keys, and the
agent-exposed API when deployed as a static SPA. `list-instances` is live rather
than baked (the set of running processes is meaningless in a static dump), so
the Instances tab appears only against a live backend.

---
_Source: https://npm.io/package/@devframes/plugin-inspect · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
