新增只读 Hermes 插件页 (#592)
* feat: add read-only plugins page * fix: align plugins page i18n and header
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
import { request } from '../client'
|
||||
|
||||
export type PluginConfigStatus = 'enabled' | 'disabled' | 'not-enabled' | 'auto' | 'provider-managed'
|
||||
export type PluginEffectiveStatus = 'enabled' | 'disabled' | 'inactive' | 'auto-active' | 'provider-managed'
|
||||
|
||||
export interface HermesPluginInfo {
|
||||
key: string
|
||||
name: string
|
||||
kind: string
|
||||
source: string
|
||||
configStatus: PluginConfigStatus | string
|
||||
effectiveStatus: PluginEffectiveStatus | string
|
||||
version: string
|
||||
description: string
|
||||
author: string
|
||||
path: string
|
||||
providesTools: string[]
|
||||
providesHooks: string[]
|
||||
requiresEnv: Array<string | Record<string, unknown>>
|
||||
}
|
||||
|
||||
export interface HermesPluginsMetadata {
|
||||
hermesAgentRoot: string
|
||||
pythonExecutable: string
|
||||
cwd: string
|
||||
projectPluginsEnabled: boolean
|
||||
}
|
||||
|
||||
export interface HermesPluginsResponse {
|
||||
plugins: HermesPluginInfo[]
|
||||
warnings: string[]
|
||||
metadata: HermesPluginsMetadata
|
||||
}
|
||||
|
||||
export async function fetchPlugins(): Promise<HermesPluginsResponse> {
|
||||
return request<HermesPluginsResponse>('/api/hermes/plugins')
|
||||
}
|
||||
Reference in New Issue
Block a user