mirror of
https://github.com/claude-code-best/claude-code.git
synced 2026-06-17 13:55:50 +00:00
@@ -1,5 +1,4 @@
|
||||
import type { McpbManifestAny as McpbManifest } from '@anthropic-ai/mcpb'
|
||||
type McpbUserConfigurationOption = any
|
||||
import axios from 'axios'
|
||||
import { createHash } from 'crypto'
|
||||
import { chmod, writeFile } from 'fs/promises'
|
||||
@@ -19,6 +18,19 @@ import {
|
||||
import { jsonParse, jsonStringify } from '../slowOperations.js'
|
||||
import { getSystemDirectories } from '../systemDirectories.js'
|
||||
import { classifyFetchError, logPluginFetch } from './fetchTelemetry.js'
|
||||
|
||||
/** DXT / MCPB `user_config` 中单字段的 JSON Schema 式描述(校验见 `validateUserConfig`)。 */
|
||||
export type McpbUserConfigurationOption = {
|
||||
type: 'string' | 'number' | 'boolean' | 'file' | 'directory' // 控件/校验类型
|
||||
required?: boolean // 是否必填
|
||||
title?: string // 表单标签(缺省用 key)
|
||||
description?: string // 帮助说明
|
||||
sensitive?: boolean // true 时写入安全存储而非明文 settings
|
||||
multiple?: boolean // string 类型时是否允许多值(数组)
|
||||
min?: number // 数值下限
|
||||
max?: number // 数值上限
|
||||
}
|
||||
|
||||
/**
|
||||
* User configuration values for MCPB
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user