* 完善所有用到的type对象,并添加中文注释

* 补充遗失的type
This commit is contained in:
xiaoFjun-eng
2026-05-19 09:05:04 +08:00
committed by GitHub
parent c499bfb4ed
commit ea399f1862
68 changed files with 986 additions and 208 deletions

View File

@@ -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
*/