Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { defineRpcFunction } from 'devframe'
export const agentListResources = defineRpcFunction({
name: 'devframe:agent:list-resources',
type: 'query',
jsonSerializable: true,
setup: (ctx) => {
return {
async handler(): Promise<readonly AgentResource[]> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { defineRpcFunction } from 'devframe'
export const agentListTools = defineRpcFunction({
name: 'devframe:agent:list-tools',
type: 'query',
jsonSerializable: true,
setup: (ctx) => {
return {
async handler(): Promise<readonly AgentTool[]> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { defineRpcFunction } from 'devframe'
export const agentReadResource = defineRpcFunction({
name: 'devframe:agent:read-resource',
type: 'query',
jsonSerializable: true,
setup: (ctx) => {
return {
async handler(id: string): Promise<AgentResourceContent> {
Expand Down
2 changes: 2 additions & 0 deletions devframe/packages/devframe/src/recipes/open-helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import { defineRpcFunction } from '../rpc/define'
export const openInEditor = defineRpcFunction({
name: 'devframe:open-in-editor',
type: 'action',
jsonSerializable: true,
args: [v.string()],
returns: v.void(),
async handler(filename: string) {
Expand All @@ -49,6 +50,7 @@ export const openInEditor = defineRpcFunction({
export const openInFinder = defineRpcFunction({
name: 'devframe:open-in-finder',
type: 'action',
jsonSerializable: true,
args: [v.string()],
returns: v.void(),
async handler(path: string) {
Expand Down
1 change: 1 addition & 0 deletions packages/core/src/node/rpc/anonymous/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ const AUTH_TIMEOUT_MS = 60_000
export const anonymousAuth = defineRpcFunction({
name: 'vite:anonymous:auth',
type: 'action',
jsonSerializable: true,
setup: (context) => {
const internal = getInternalContext(context)
const storage = internal.storage.auth
Expand Down
1 change: 1 addition & 0 deletions packages/core/src/node/rpc/internal/commands-list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { defineRpcFunction } from '@vitejs/devtools-kit'
export const commandsList = defineRpcFunction({
name: 'devtoolskit:internal:commands:list',
type: 'static',
jsonSerializable: true,
setup: (context) => {
return {
async handler() {
Expand Down
1 change: 1 addition & 0 deletions packages/core/src/node/rpc/internal/messages-add.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { defineRpcFunction } from '@vitejs/devtools-kit'
export const messagesAdd = defineRpcFunction({
name: 'devtoolskit:internal:messages:add',
type: 'action',
jsonSerializable: true,
setup: (context) => {
return {
async handler(input: DevToolsMessageEntryInput): Promise<DevToolsMessageEntry> {
Expand Down
1 change: 1 addition & 0 deletions packages/core/src/node/rpc/internal/messages-clear.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { defineRpcFunction } from '@vitejs/devtools-kit'
export const messagesClear = defineRpcFunction({
name: 'devtoolskit:internal:messages:clear',
type: 'action',
jsonSerializable: true,
setup: (context) => {
return {
async handler(): Promise<void> {
Expand Down
1 change: 1 addition & 0 deletions packages/core/src/node/rpc/internal/messages-list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export interface MessagesListResult {
export const messagesList = defineRpcFunction({
name: 'devtoolskit:internal:messages:list',
type: 'static',
jsonSerializable: true,
setup: (context) => {
const host = context.messages as unknown as DevToolsMessagesHost
return {
Expand Down
1 change: 1 addition & 0 deletions packages/core/src/node/rpc/internal/messages-remove.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { defineRpcFunction } from '@vitejs/devtools-kit'
export const messagesRemove = defineRpcFunction({
name: 'devtoolskit:internal:messages:remove',
type: 'action',
jsonSerializable: true,
setup: (context) => {
return {
async handler(id: string): Promise<void> {
Expand Down
1 change: 1 addition & 0 deletions packages/core/src/node/rpc/internal/messages-update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { defineRpcFunction } from '@vitejs/devtools-kit'
export const messagesUpdate = defineRpcFunction({
name: 'devtoolskit:internal:messages:update',
type: 'action',
jsonSerializable: true,
setup: (context) => {
return {
async handler(id: string, patch: Partial<DevToolsMessageEntryInput>): Promise<DevToolsMessageEntry | null> {
Expand Down
1 change: 1 addition & 0 deletions packages/core/src/node/rpc/internal/rpc-server-list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { defineRpcFunction } from '@vitejs/devtools-kit'
export const rpcServerList = defineRpcFunction({
name: 'devtoolskit:internal:rpc:server:list',
type: 'static',
jsonSerializable: true,
setup: (context) => {
return {
async handler() {
Expand Down
1 change: 1 addition & 0 deletions packages/core/src/node/rpc/internal/terminals-list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { defineRpcFunction } from '@vitejs/devtools-kit'
export const terminalsList = defineRpcFunction({
name: 'devtoolskit:internal:terminals:list',
type: 'static',
jsonSerializable: true,
setup: (context) => {
return {
async handler() {
Expand Down
1 change: 1 addition & 0 deletions packages/core/src/node/rpc/internal/terminals-read.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { defineRpcFunction } from '@vitejs/devtools-kit'
export const terminalsRead = defineRpcFunction({
name: 'devtoolskit:internal:terminals:read',
type: 'query',
jsonSerializable: true,
setup: (context) => {
return {
async handler(id: string) {
Expand Down
1 change: 1 addition & 0 deletions packages/core/src/node/rpc/public/open-in-editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { logger } from '../../diagnostics'
export const openInEditor = defineRpcFunction({
name: 'vite:core:open-in-editor',
type: 'action',
jsonSerializable: true,
setup: (context) => {
return {
handler: async (path: string) => {
Expand Down
1 change: 1 addition & 0 deletions packages/core/src/node/rpc/public/open-in-finder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { logger } from '../../diagnostics'
export const openInFinder = defineRpcFunction({
name: 'vite:core:open-in-finder',
type: 'action',
jsonSerializable: true,
setup: (context) => {
return {
handler: async (path: string) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { getLogsManager } from '../utils'
export const rolldownGetAssetDetails = defineRpcFunction({
name: 'vite:rolldown:get-asset-details',
type: 'query',
jsonSerializable: true,
cacheable: true,
setup: (context) => {
const manager = getLogsManager(context)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { getLogsManager } from '../utils'
export const rolldownGetAssetsList = defineRpcFunction({
name: 'vite:rolldown:get-assets-list',
type: 'query',
jsonSerializable: true,
cacheable: true,
setup: (context) => {
const manager = getLogsManager(context)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { getLogsManager } from '../utils'
export const rolldownGetChunkInfo = defineRpcFunction({
name: 'vite:rolldown:get-chunk-info',
type: 'query',
jsonSerializable: true,
cacheable: true,
setup: (context) => {
const manager = getLogsManager(context)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { getLogsManager } from '../utils'
export const rolldownGetChunksGraph = defineRpcFunction({
name: 'vite:rolldown:get-chunks-graph',
type: 'query',
jsonSerializable: true,
cacheable: true,
setup: (context) => {
const manager = getLogsManager(context)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { getLogsManager } from '../utils'
export const rolldownGetModuleInfo = defineRpcFunction({
name: 'vite:rolldown:get-module-info',
type: 'query',
jsonSerializable: true,
cacheable: true,
setup: (context) => {
const manager = getLogsManager(context)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { getLogsManager } from '../utils'
export const rolldownGetModuleRawEvents = defineRpcFunction({
name: 'vite:rolldown:get-module-raw-events',
type: 'query',
jsonSerializable: true,
setup: (context) => {
const manager = getLogsManager(context)
return {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { getLogsManager } from '../utils'
export const rolldownGetModuleTransforms = defineRpcFunction({
name: 'vite:rolldown:get-module-transforms',
type: 'query',
jsonSerializable: true,
setup: (context) => {
const manager = getLogsManager(context)
return {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { getPackagesManifest } from './rolldown-get-packages'
export const rolldownGetPackageDetails = defineRpcFunction({
name: 'vite:rolldown:get-package-details',
type: 'query',
jsonSerializable: true,
cacheable: true,
setup: (context) => {
const manager = getLogsManager(context)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ export async function getPackagesManifest(reader: RolldownEventsReader) {
export const rolldownGetPackages = defineRpcFunction({
name: 'vite:rolldown:get-packages',
type: 'query',
jsonSerializable: true,
cacheable: true,
setup: (context) => {
const manager = getLogsManager(context)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { getLogsManager } from '../utils'
export const rolldownGetPluginDetails = defineRpcFunction({
name: 'vite:rolldown:get-plugin-details',
type: 'query',
jsonSerializable: true,
cacheable: true,
setup: (context) => {
const manager = getLogsManager(context)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { getLogsManager } from '../utils'
export const rolldownGetRawEvents = defineRpcFunction({
name: 'vite:rolldown:get-raw-events',
type: 'query',
jsonSerializable: true,
setup: (context) => {
const manager = getLogsManager(context)
return {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { getLogsManager } from '../utils'
export const rolldownGetSessionCompareSummary = defineRpcFunction({
name: 'vite:rolldown:get-session-compare-summary',
type: 'query',
jsonSerializable: true,
cacheable: true,
setup: async (context) => {
const manager = getLogsManager(context)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { getLogsManager } from '../utils'
export const rolldownGetSessionSummary = defineRpcFunction({
name: 'vite:rolldown:get-session-summary',
type: 'query',
jsonSerializable: true,
cacheable: true,
dump: async (context) => {
const manager = getLogsManager(context)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export const rolldownListSessions = defineRpcFunction({
name: 'vite:rolldown:list-sessions',
cacheable: true,
type: 'static',
jsonSerializable: true,
setup: (context) => {
const manager = getLogsManager(context)
return {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { getInternalContext } from '@vitejs/devtools/internal'
export const getAuthTokens = defineRpcFunction({
name: 'devtoolskit:self-inspect:get-auth-tokens',
type: 'query',
jsonSerializable: true,
setup: (context) => {
const internal = getInternalContext(context)
const storage = internal.storage.auth
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { defineRpcFunction } from '@vitejs/devtools-kit'
export const getClientScripts = defineRpcFunction({
name: 'devtoolskit:self-inspect:get-client-scripts',
type: 'query',
jsonSerializable: true,
agent: {
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.',
title: 'List client scripts',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { defineRpcFunction } from '@vitejs/devtools-kit'
export const getRpcFunctions = defineRpcFunction({
name: 'devtoolskit:self-inspect:get-rpc-functions',
type: 'query',
jsonSerializable: true,
agent: {
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.',
title: 'List RPC functions',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { defineRpcFunction } from '@vitejs/devtools-kit'
export const getSharedStateKeys = defineRpcFunction({
name: 'devtoolskit:self-inspect:get-shared-state-keys',
type: 'query',
jsonSerializable: true,
agent: {
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.',
title: 'List shared-state keys',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { getInternalContext } from '@vitejs/devtools/internal'
export const revokeAuthTokenRpc = defineRpcFunction({
name: 'devtoolskit:self-inspect:revoke-auth-token',
type: 'action',
jsonSerializable: true,
setup: (context) => {
const internal = getInternalContext(context)
return {
Expand Down
1 change: 1 addition & 0 deletions packages/vite/src/node/rpc/functions/vite-env-info.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { defineRpcFunction } from '@vitejs/devtools-kit'
export const viteEnvInfo = defineRpcFunction({
name: 'vite:env-info',
type: 'query',
jsonSerializable: true,
setup: () => {
return {
handler: async () => {
Expand Down
1 change: 1 addition & 0 deletions packages/vite/src/node/rpc/functions/vite-meta-info.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { defineRpcFunction } from '@vitejs/devtools-kit'
export const viteMetaInfo = defineRpcFunction({
name: 'vite:meta-info',
type: 'query',
jsonSerializable: true,
setup: (context) => {
return {
handler: async () => {
Expand Down
Loading