Skip to content

Commit 72cfb9d

Browse files
committed
fix(self-inspect): declare jsonSerializable on agent-flagged RPCs
1 parent decfe30 commit 72cfb9d

5 files changed

Lines changed: 5 additions & 0 deletions

File tree

packages/self-inspect/src/node/rpc/functions/get-client-scripts.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { defineRpcFunction } from '@vitejs/devtools-kit'
44
export const getClientScripts = defineRpcFunction({
55
name: 'devtoolskit:self-inspect:get-client-scripts',
66
type: 'query',
7+
jsonSerializable: true,
78
agent: {
89
description: 'List client-side scripts attached to UI docks (actions, custom renderers, and iframe clientScripts). Read-only — returns the stringified scripts, not their execution state.',
910
title: 'List client scripts',

packages/self-inspect/src/node/rpc/functions/get-devtools-plugins.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { defineRpcFunction } from '@vitejs/devtools-kit'
44
export const getDevtoolsPlugins = defineRpcFunction({
55
name: 'devtoolskit:self-inspect:get-devtools-plugins',
66
type: 'query',
7+
jsonSerializable: true,
78
agent: {
89
description: 'List every Vite plugin involved in the current project, flagging which ones export a `devtools` hook (and whether that hook sets up any devtools surface). Read-only.',
910
title: 'List devtools plugins',

packages/self-inspect/src/node/rpc/functions/get-docks.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { defineRpcFunction } from '@vitejs/devtools-kit'
33
export const getDocks = defineRpcFunction({
44
name: 'devtoolskit:self-inspect:get-docks',
55
type: 'query',
6+
jsonSerializable: true,
67
agent: {
78
description: 'List every UI dock/panel registered on the devtools. Each entry includes id, title, icon, category, and how the dock is rendered (iframe, action, custom-render, launcher). Read-only.',
89
title: 'List docks',

packages/self-inspect/src/node/rpc/functions/get-rpc-functions.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { defineRpcFunction } from '@vitejs/devtools-kit'
33
export const getRpcFunctions = defineRpcFunction({
44
name: 'devtoolskit:self-inspect:get-rpc-functions',
55
type: 'query',
6+
jsonSerializable: true,
67
agent: {
78
description: 'List every RPC function registered on the devtools server, with metadata (name, type, whether it has args/returns schemas, dump, setup, handler). Useful for discovering what functionality the running devtools expose. Read-only.',
89
title: 'List RPC functions',

packages/self-inspect/src/node/rpc/functions/get-shared-state-keys.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { defineRpcFunction } from '@vitejs/devtools-kit'
33
export const getSharedStateKeys = defineRpcFunction({
44
name: 'devtoolskit:self-inspect:get-shared-state-keys',
55
type: 'query',
6+
jsonSerializable: true,
67
agent: {
78
description: 'List the keys of all shared-state entries published by the devtools server. Read-only. Combine with the `devframe://state/<key>` MCP resource to inspect values.',
89
title: 'List shared-state keys',

0 commit comments

Comments
 (0)