@linkdesk/plugin-sdk 0.1.13 → 0.1.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,682 +1,687 @@
1
- {
2
- "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://embeddesk.app/schemas/plugin.schema.json",
4
- "title": "插件元数据",
5
- "description": "plugin.json JSON Schema——IDE 自动补全 + JSON 校验",
6
- "type": "object",
7
- "required": ["name", "version"],
8
- "properties": {
9
- "$schema": {
10
- "type": "string",
11
- "description": "JSON Schema 引用——IDE 自动补全用",
12
- "$comment": "$schema 仅用于 IDE 自动补全,运行时不做 JSON Schema 验证"
13
- },
14
- "type": {
15
- "type": "string",
16
- "description": "【已废弃】插件类型——不再必需。loader 从 entry/mode/themes/languages/resources 等声明字段自动检测贡献类型。保留仅用于向后兼容。E5.7#66:enum 开放为任意字符串。"
17
- },
18
- "core": {
19
- "type": "boolean",
20
- "description": "纯 UI 防误删旗标——声明此插件重要,卸载入口在插件详情 UI 不显示(藏钮,新手误删不了)。无任何行为特权:禁用/卸载经 API/命令层照常生效(卸后写 removed 墓碑,boot 不复活)。设置页/市场等基础能力靠的是 factoryRole 槽位(可替换),与 core 声明无关。无此声明 = 普通插件,UI 可自由装卸。默认 false。",
21
- "default": false
22
- },
23
- "factoryRole": {
24
- "type": "string",
25
- "description": "系统插槽角色——声明此插件填充哪个系统级功能。settings=设置页(Ctrl+, 打开),marketplace=插件市场。同一 role 多插件合法并存(全收进槽位候选,一对多);默认 = 首注册稳定序(core:true 无行为特权,不抢默认),用户切换的活动套持久化保持。"
26
- },
27
- "pluginRole": {
28
- "type": "string",
29
- "description": "插件加载策略——view=有 React UI 组件,data=纯数据(主题/语言/协议),不填则自动推导。E5.7#66:enum 开放——第三方可声明新加载策略名。"
30
- },
31
- "appearsIn": {
32
- "type": "object",
33
- "description": "插件 UI 出现位置——声明式。替代 iconLocation+viewRole+keepSidebarOnFocus。",
34
- "properties": {
35
- "iconBar": { "type": "string", "enum": ["top", "bottom"], "description": "图标栏位置,不填=不显示图标" },
36
- "sidePanel": { "type": "boolean", "description": "有侧栏视图容器,默认 false" },
37
- "tabBar": { "type": "boolean", "description": "可作为标签页打开,默认 false" },
38
- "statusBar": { "type": "string", "description": "自绘(代码)状态栏组件文件路径(相对插件根,.tsx,如 \"src/components/statusBar.tsx\")——池按声明 URL 渲染,取代 statusBar 静态贡献项;仅贡献静态条目则不必填" }
39
- }
40
- },
41
- "distribution": {
42
- "type": "string",
43
- "enum": ["builtin", "user"],
44
- "default": "user",
45
- "description": "⚠️ 遗留字段(2026-09-05 塌平单根后已无 plugins/builtin、plugins/user 之分——本字段不再对应任何目录,安装侧恒归一化为 user)。内置随带与否由 `core` 声明,与分发字段无关。第三方插件请勿填写。"
46
- },
47
- "name": {
48
- "type": "string",
49
- "description": "显示名称",
50
- "minLength": 1
51
- },
52
- "version": {
53
- "type": "string",
54
- "description": "语义化版本",
55
- "pattern": "^\\d+\\.\\d+\\.\\d+$"
56
- },
57
- "icon": {
58
- "type": "string",
59
- "description": "图标(E6#69 三图模型分工)——图标栏位插件填 Type-1 单色剪影 glyph(壳图标栏只读本字段);非图标栏插件此位即 Type-2 身份彩色图,标签栏/市场经「marketIcon ?? icon ?? 默认彩色块」复用本图。codicon 名或包内 svg/png 资产相对路径(iconSource 省略按值推断)"
60
- },
61
- "iconSource": {
62
- "type": "string",
63
- "description": "图标来源",
64
- "enum": ["codicon", "svg", "url", "lucide"],
65
- "default": "codicon"
66
- },
67
- "marketIcon": {
68
- "type": "string",
69
- "description": "Type-2 插件身份彩色图(E6#69 改向——#67「cover art 场景封面」语义废止,场景封面如需展示嵌 README 而非本字段)——市场侧栏行/详情头与标签栏视图标签显同一张图。svg 资产相对路径;缺省 → 回退 icon → 统一默认彩色块。可选:零图插件全链路自动兜底,分工对第三方不可见"
70
- },
71
- "marketIconSource": {
72
- "type": "string",
73
- "description": "身份图来源——与 iconSource 同枚举;值走 svg 资产相对路径,source 省略按路径推断(显式 svg 会把路径当裸 URL,已装插件会裂)",
74
- "enum": ["codicon", "svg", "url", "lucide"],
75
- "default": "codicon"
76
- },
77
- "description": {
78
- "type": "string",
79
- "description": "一句话描述,插件详情页展示。支持多行"
80
- },
81
- "author": {
82
- "type": "string",
83
- "description": "作者名"
84
- },
85
- "entry": {
86
- "type": "string",
87
- "description": "入口文件路径,相对插件目录。view/card/protocol 必需"
88
- },
89
- "sidebar": {
90
- "type": "string",
91
- "description": "侧栏组件路径,仅 view 类型有效",
92
- "$comment": " Vite glob 自动发现,无需插件声明"
93
- },
94
- "tabBehavior": {
95
- "type": "object",
96
- "description": "标签页行为声明——核心读此字段决定去重/保底/关闭确认",
97
- "properties": {
98
- "isFallback": {
99
- "type": "boolean",
100
- "description": "场上无标签页时自动创建此标签页,且不可关闭",
101
- "default": false
102
- },
103
- "singleton": {
104
- "type": "boolean",
105
- "description": "全局只允许一个实例",
106
- "default": false
107
- },
108
- "confirmOnClose": {
109
- "type": "string",
110
- "description": "关闭前弹出确认对话框,值为提示文本"
111
- },
112
- "invokeBeforeClose": {
113
- "type": "string",
114
- "description": "关闭前调用的命令(在 confirmOnClose 确认之后、标签页关闭之前)。如终端声明 \"close_port\""
115
- },
116
- "identityField": {
117
- "type": "string",
118
- "description": "CreateTabOptions 中用于判断标签页身份的唯一字段。不声明=允许多实例不去重。如 workspace 声明 \"workspaceName\"——同名工作台只允许一个标签页。"
119
- }
120
- },
121
- "additionalProperties": false
122
- },
123
- "statusBar": {
124
- "type": "array",
125
- "description": "状态栏贡献条目",
126
- "items": {
127
- "type": "object",
128
- "required": ["id"],
129
- "properties": {
130
- "id": { "type": "string", "description": "唯一标识" },
131
- "icon": { "type": "string", "description": "codicon 名称或 SVG 路径" },
132
- "label": { "type": "string", "description": "显示文字" },
133
- "align": { "type": "string", "enum": ["left", "right"], "default": "left" },
134
- "onClick": { "type": "string", "description": "点击行为——命令名" },
135
- "configurable": { "type": "boolean", "description": "声明 true → 壳自动注册配置项并注入 visible prop。插件作者只写一行 JSON,零代码。", "default": false }
136
- },
137
- "additionalProperties": false
138
- }
139
- },
140
- "file": {
141
- "type": "string",
142
- "description": "单文件入口——theme/language 类型用。和 themes/languages 二选一"
143
- },
144
- "themes": {
145
- "type": "array",
146
- "description": "多主题数组,仅 theme 类型",
147
- "items": {
148
- "type": "object",
149
- "required": ["id", "name", "file"],
150
- "properties": {
151
- "id": { "type": "string" },
152
- "name": { "type": "string" },
153
- "file": { "type": "string" }
154
- },
155
- "additionalProperties": false
156
- }
157
- },
158
- "languages": {
159
- "type": "array",
160
- "description": "多语言数组,仅 language 类型",
161
- "items": {
162
- "type": "object",
163
- "required": ["code", "name", "file"],
164
- "properties": {
165
- "code": { "type": "string" },
166
- "name": { "type": "string" },
167
- "file": { "type": "string" }
168
- },
169
- "additionalProperties": false
170
- }
171
- },
172
- "mode": {
173
- "type": "string",
174
- "description": "协议模式。text = Phase 4 可用;binary = Phase 6+ WASM",
175
- "enum": ["text", "binary"],
176
- "default": "text"
177
- },
178
- "resources": {
179
- "type": "array",
180
- "description": "资源文件列表,仅 resource 类型",
181
- "items": { "type": "string" }
182
- },
183
- "recommends": {
184
- "type": "array",
185
- "description": "推荐同时安装的插件",
186
- "items": {
187
- "type": "object",
188
- "required": ["plugin", "reason"],
189
- "properties": {
190
- "plugin": { "type": "string" },
191
- "reason": { "type": "string" }
192
- },
193
- "additionalProperties": false
194
- }
195
- },
196
- "suggests": {
197
- "type": "array",
198
- "description": "可选相关插件",
199
- "items": {
200
- "type": "object",
201
- "required": ["plugin", "reason"],
202
- "properties": {
203
- "plugin": { "type": "string" },
204
- "reason": { "type": "string" }
205
- },
206
- "additionalProperties": false
207
- }
208
- },
209
- "requires": {
210
- "type": "array",
211
- "description": "插件级激活顺序依赖(E5.8#13)——按 pluginId 声明,加载时先加载依赖再加载本插件。无版本约束。缺依赖 → 插件挂起(PENDING),依赖就绪自动加载。",
212
- "items": { "type": "string" },
213
- "uniqueItems": true
214
- },
215
- "screenshots": {
216
- "type": "array",
217
- "description": "截图 URL 数组",
218
- "$comment": "Phase 6 PluginDetailView 增强时启用",
219
- "items": { "type": "string" }
220
- },
221
- "minAppVersion": {
222
- "type": "string",
223
- "description": "最低软件版本要求"
224
- },
225
- "docs": {
226
- "type": "string",
227
- "description": "附带文档路径(资源插件联动)",
228
- "$comment": "Phase 6 文档链接"
229
- },
230
- "cardDocMap": {
231
- "type": "object",
232
- "description": "卡片 ID 文档锚点映射",
233
- "$comment": "Phase 8 卡片文档映射",
234
- "additionalProperties": { "type": "string" }
235
- },
236
- "i18n": {
237
- "type": "object",
238
- "description": "@deprecated 使用 contributes.i18n 代替——翻译文件声明已迁移到 contributes 下。保留仅向后兼容。",
239
- "additionalProperties": { "type": "string" }
240
- },
241
- "cssVars": {
242
- "type": "object",
243
- "description": "插件自定义 CSS 变量",
244
- "$comment": "Phase 7 启用——插件注入 CSS 变量到 :root",
245
- "additionalProperties": {
246
- "type": "object",
247
- "properties": {
248
- "dark": { "type": "string" },
249
- "light": { "type": "string" }
250
- }
251
- }
252
- },
253
- "permissions": {
254
- "type": "array",
255
- "description": "权限声明",
256
- "$comment": "Phase 6 启用——serial/filesystem/network 为第一批白名单值。E5.7#66:enum 开放——第三方可声明新权限名(主进程解释)。",
257
- "items": {
258
- "type": "string"
259
- }
260
- },
261
- "iconLocation": {
262
- "type": "string",
263
- "description": "Phase 5g:图标在图标栏的位置。top(默认,上部可拖拽区)或 bottom(底部固定区)。",
264
- "enum": ["top", "bottom"],
265
- "default": "top"
266
- },
267
- "viewRole": {
268
- "type": "string",
269
- "description": "Phase 5g:视图在壳中的交互角色。sidebarPrimary=侧栏为主(点击 toggle 侧栏,标签页由侧栏内操作触发,默认),tabOnly=纯标签页视图(直接开标签页)。tabPrimary 已移除——所有插件统一 sidebarPrimary。",
270
- "enum": ["sidebarPrimary", "tabOnly"],
271
- "default": "sidebarPrimary"
272
- },
273
- "shellRendered": {
274
- "type": "boolean",
275
- "description": "Phase 5g:壳自己渲染此视图(不走插件路由)。仅欢迎页/插件详情页等壳级视图声明。",
276
- "default": false
277
- },
278
- "keepSidebarOnFocus": {
279
- "type": "boolean",
280
- "description": "Phase 5g:聚焦此视图时保留当前侧栏不清除。如插件详情页浏览时侧栏不变。",
281
- "default": false
282
- },
283
- "contributes": {
284
- "type": "object",
285
- "description": "贡献点声明——对标 VS Code package.json contributes。Phase 5 核心机制。",
286
- "properties": {
287
- "commands": {
288
- "type": "array",
289
- "description": "注册命令——CommandPalette/右键菜单/快捷键的消费源",
290
- "items": {
291
- "type": "object",
292
- "required": ["id", "title"],
293
- "properties": {
294
- "id": { "type": "string", "description": "命令 ID——如 terminal.clear" },
295
- "title": { "type": "string", "description": "显示名称" },
296
- "category": { "type": "string", "description": "命令面板分组" },
297
- "when": { "type": "string", "description": "context key when 条件——如 activeEditor == 'terminal'" }
298
- },
299
- "additionalProperties": false
300
- }
301
- },
302
- "menus": {
303
- "type": "object",
304
- "description": "菜单项声明——按 MenuId 分组。壳内置注册点见 MenuRegistry MENU_SLOTS 常量表;E5.7#64 起 MenuId 开放字符串,第三方可声明任意新注册点(propertyNames enum 已删)。",
305
- "additionalProperties": {
306
- "type": "array",
307
- "items": {
308
- "oneOf": [
309
- { "type": "string", "description": "命令 ID(简写)" },
310
- { "$ref": "#/$defs/menuItem" }
311
- ]
312
- }
313
- }
314
- },
315
- "keybindings": {
316
- "type": "array",
317
- "description": "快捷键绑定",
318
- "items": {
319
- "type": "object",
320
- "required": ["command", "key"],
321
- "properties": {
322
- "command": { "type": "string" },
323
- "key": { "type": "string", "description": "如 ctrl+k" },
324
- "when": { "type": "string", "description": "context key when 条件" }
325
- },
326
- "additionalProperties": false
327
- }
328
- },
329
- "configuration": {
330
- "type": "object",
331
- "description": "设置项声明——Settings Editor 自动渲染",
332
- "required": ["title", "properties"],
333
- "properties": {
334
- "title": { "type": "string", "description": "设置分组名" },
335
- "properties": {
336
- "type": "object",
337
- "description": "设置项映射——key → { type, default, enum?, description }",
338
- "additionalProperties": {
339
- "type": "object",
340
- "required": ["type", "default", "description"],
341
- "properties": {
342
- "type": { "type": "string", "enum": ["string", "number", "boolean", "object", "array"] },
343
- "default": {},
344
- "enum": { "type": "array" },
345
- "enumDescriptions": { "type": "object", "description": "enum 值 → 显示名映射" },
346
- "description": { "type": "string" },
347
- "uiHint": { "type": "string", "description": "设置编辑器渲染提示。SettingsView 按提示选择控件。不认识的 hint 降级回 type 默认渲染——不抛错。E5.7#66:enum 开放——第三方可声明新 hint 名。" },
348
- "monoOnly": { "type": "boolean", "description": "等宽限定——仅 uiHint \"fontFamily\" 有意义。true/缺省 = 只列等宽族(编辑器字体);false = 全字族(UI 字体)。E5.8#50.20。" },
349
- "minimum": { "type": "number", "description": "数值下限——type number 时生效(E5.8#65 补录:滑杆/数值控件范围)" },
350
- "maximum": { "type": "number", "description": "数值上限——type number 时生效(E5.8#65 补录:滑杆/数值控件范围)" },
351
- "step": { "type": "number", "description": "滑杆步进——仅 uiHint \"slider\" 有意义。缺省由 SettingsView 按区间推导(浮点区间自动 0.01)。E5.8#65。" },
352
- "group": { "type": "string", "description": "组内二级标题——同 group key 在设置页归到子标题下渲染(E5.8#78/#189);无 group 保持平铺(第三方零侵入)" }
353
- },
354
- "additionalProperties": false
355
- }
356
- }
357
- },
358
- "additionalProperties": false
359
- },
360
- "configurationDefaults": {
361
- "type": "object",
362
- "description": "弱默认值——插件给其他配置项的建议值,用户手动设置优先",
363
- "additionalProperties": {}
364
- },
365
- "themes": {
366
- "type": "array",
367
- "description": "主题声明——对标 VS Code contributes.themes。插件贡献主题供用户在主题浏览器/外观中切换。",
368
- "items": {
369
- "type": "object",
370
- "required": ["id", "label", "uiTheme", "path"],
371
- "properties": {
372
- "id": { "type": "string", "description": "主题 ID——如 my-theme-dark" },
373
- "label": { "type": "string", "description": "显示名称——如 My Theme Dark" },
374
- "uiTheme": { "type": "string", "enum": ["dark", "light", "highContrast"], "description": "基础 UI 主题——暗色/亮色/高对比" },
375
- "path": { "type": "string", "description": "主题定义 JSON 文件路径" }
376
- },
377
- "additionalProperties": false
378
- }
379
- },
380
- "iconThemes": {
381
- "type": "array",
382
- "description": "产品图标主题——对标 VS Code productIconThemes。插件声明图标集供用户切换。",
383
- "items": {
384
- "type": "object",
385
- "required": ["id", "label", "path"],
386
- "properties": {
387
- "id": { "type": "string", "description": "图标主题 ID——如 codicon" },
388
- "label": { "type": "string", "description": "显示名称——如 Codicon" },
389
- "path": { "type": "string", "description": "图标定义 JSON 文件路径" }
390
- },
391
- "additionalProperties": false
392
- }
393
- },
394
- "icons": {
395
- "type": "object",
396
- "description": "共享图标——插件贡献图标供其他插件通过 iconSource:shared 引用。对标 VS Code icon extension point。",
397
- "additionalProperties": {
398
- "type": "object",
399
- "required": ["description", "default"],
400
- "properties": {
401
- "description": { "type": "string", "description": "图标描述" },
402
- "default": {
403
- "type": "object",
404
- "properties": {
405
- "fontPath": { "type": "string", "description": "字体文件路径" },
406
- "fontCharacter": { "type": "string", "description": "字体字符码——如 \\e001" }
407
- },
408
- "additionalProperties": false
409
- }
410
- },
411
- "additionalProperties": false
412
- }
413
- },
414
- "langDefs": {
415
- "type": "array",
416
- "description": "编程语言定义——对标 VS Code contributes.languages。声明新语言的 ID/扩展名/语法高亮/LSP 支持。",
417
- "items": {
418
- "type": "object",
419
- "required": ["id", "extensions"],
420
- "properties": {
421
- "id": { "type": "string", "description": "语言 ID——如 cpp / python / rust" },
422
- "extensions": { "type": "array", "items": { "type": "string" }, "description": "扩展名列表——如 ['.cpp', '.cxx', '.h']" },
423
- "aliases": { "type": "array", "items": { "type": "string" }, "description": "别名——如 ['C++', 'C']" },
424
- "monarch": {
425
- "type": "object",
426
- "description": "可选——Monarch tokenizer 定义(Monaco 内建语法高亮)",
427
- "properties": {
428
- "tokenizer": { "type": "object" }
429
- }
430
- },
431
- "lsp": {
432
- "type": "object",
433
- "description": "可选——LSP 语言服务器配置",
434
- "properties": {
435
- "command": { "type": "string", "description": "启动命令——解释器或可执行名(解释器如 node;PATH 二进制如 clangd;或绝对路径)。python 插件即 command='node' + args 带脚本路径" },
436
- "args": { "type": "array", "items": { "type": "string" }, "description": "启动参数。E6#15e:相对路径式参数以插件根目录为基准解析(注册处一次绝对化)——如 'node_modules/pyright/dist/pyright-langserver.js' → <插件根>/node_modules/pyright/dist/pyright-langserver.js;'--stdio' 等 flag 原样透传。LSP 二进制随插件自带:SDK 打包按 args 引用把对应 node_modules 包打进 .linkdesk-plugin(壳不再发货 LSP,E5#114d extraResources 临时方案已删)" }
437
- }
438
- }
439
- },
440
- "additionalProperties": false
441
- }
442
- },
443
- "fileAssociations": {
444
- "type": "array",
445
- "description": "文件关联——文件扩展名 → 插件路由(主进程 plugin-manifest-loader 消费,E5.7#50 壳侧注册已删)。只声明扩展名 + 可选打开命令;pluginId 用目录名,无需声明。",
446
- "items": {
447
- "type": "object",
448
- "required": ["extension"],
449
- "properties": {
450
- "extension": { "type": "string", "description": "文件扩展名——不含点,如 dxf / stl / step" },
451
- "command": { "type": "string", "description": "可选——打开该扩展名文件时执行的命令 ID" },
452
- "displayName": { "type": "string", "description": "可选——'打开方式…'选择器中的显示名" }
453
- },
454
- "additionalProperties": false
455
- }
456
- },
457
- "languages": {
458
- "type": "array",
459
- "description": "语言包——对标 VS Code language extension point。合集语言包一个 plugin.json 声明多个条目。",
460
- "items": {
461
- "type": "object",
462
- "required": ["id", "label", "path"],
463
- "properties": {
464
- "id": { "type": "string", "description": "语言代码——如 zh / en / ja" },
465
- "label": { "type": "string", "description": "显示名称——如 中文 / English / 日本語" },
466
- "path": { "type": "string", "description": "i18n JSON 翻译文件路径" }
467
- },
468
- "additionalProperties": false
469
- }
470
- },
471
- "titleBar": {
472
- "type": "object",
473
- "description": "顶栏按钮声明——对标 VS Code titleBar。声明标题栏左侧/右侧的按钮:图标按钮(icon)或全文字按钮(label),二者填一个。",
474
- "properties": {
475
- "left": {
476
- "type": "array",
477
- "description": "标题栏左侧按钮",
478
- "items": {
479
- "type": "object",
480
- "required": ["command"],
481
- "properties": {
482
- "command": { "type": "string", "description": "点击执行的命令 ID" },
483
- "icon": { "type": "string", "description": "codicon 图标名(如 codicon-settings)或图片路径" },
484
- "label": { "type": "string", "description": "按钮文字(E6#57.11)——填了就不渲染 icon。'$键名' = 取该 context key 的值当文字(如 $updateButtonLabel);否则当 i18n key(本仓 i18n key = 中文原文)" },
485
- "when": { "type": "string", "description": "context key when 条件——不满足时按钮隐藏" }
486
- },
487
- "additionalProperties": false
488
- }
489
- },
490
- "right": {
491
- "type": "array",
492
- "description": "标题栏右侧按钮",
493
- "items": {
494
- "type": "object",
495
- "required": ["command"],
496
- "properties": {
497
- "command": { "type": "string", "description": "点击执行的命令 ID" },
498
- "icon": { "type": "string", "description": "codicon 图标名(如 codicon-settings)或图片路径" },
499
- "label": { "type": "string", "description": "按钮文字(E6#57.11)——填了就不渲染 icon。'$键名' = 取该 context key 的值当文字(如 $updateButtonLabel);否则当 i18n key(本仓 i18n key = 中文原文)" },
500
- "when": { "type": "string", "description": "context key when 条件——不满足时按钮隐藏" }
501
- },
502
- "additionalProperties": false
503
- }
504
- }
505
- },
506
- "additionalProperties": false
507
- },
508
- "viewsContainers": {
509
- "type": "object",
510
- "description": "声明侧栏容器——点此插件图标时切换到此容器。对标 VS Code viewsContainers。",
511
- "patternProperties": {
512
- "^[a-z][a-z0-9-]*$": {
513
- "type": "object",
514
- "required": ["title"],
515
- "properties": {
516
- "title": { "type": "string", "description": "容器标题——侧栏 header 显示" },
517
- "icon": { "type": "string", "description": "容器图标——覆盖插件自身的图标" },
518
- "location": {
519
- "type": "string",
520
- "enum": ["sidebar", "panel", "auxiliarybar", "main"],
521
- "default": "sidebar",
522
- "description": "容器位置——sidebar=侧栏, panel=底部面板, auxiliarybar=辅助侧栏(⚠ 壳当前未接线,声明 auxiliarybar 容器/视图不渲染), main=主区标签页渲染面(E6#30.10:活跃 factoryRole 插件经 views.main[] 贡献,壳 ShellViewRenderer 解析 plugin-detail tab 时消费;第三方交付插件非市场类请用 sidebar/panel)"
523
- },
524
- "hideIfEmpty": {
525
- "type": "boolean",
526
- "default": false,
527
- "description": "无活跃 view 时自动隐藏容器"
528
- },
529
- "order": {
530
- "type": "number",
531
- "description": "同位置内的排序权重。小值靠前"
532
- },
533
- "mergeHeaderWhenSingle": {
534
- "type": "boolean",
535
- "default": false,
536
- "description": "容器内只有一个 view 时隐藏 view header——标题合并到容器 header。对标 VS Code mergeViewWithContainerWhenSingleView"
537
- }
538
- },
539
- "additionalProperties": false
540
- }
541
- },
542
- "additionalProperties": false
543
- },
544
- "views": {
545
- "type": "object",
546
- "description": "往容器注册视图——key = 容器 ID。对标 VS Code views。",
547
- "patternProperties": {
548
- "^[a-z][a-z0-9-]*$": {
549
- "type": "array",
550
- "items": {
551
- "type": "object",
552
- "required": ["id", "render"],
553
- "properties": {
554
- "id": { "type": "string", "description": "View 唯一 ID——如 folders / sessions / settings" },
555
- "title": { "type": "string", "description": "显示标题——SidebarSection 的 header 文字。空字符串=不显示折叠头" },
556
- "render": { "type": "string", "description": "视图组件的模块路径——相对插件根目录" },
557
- "when": { "type": "string", "description": "Context key when 条件" },
558
- "order": { "type": "number", "description": "同容器内的排序权重。小值在上" },
559
- "role": { "type": "string", "enum": ["toolbar", "section"], "default": "section", "description": "容器角色——toolbar 粘顶不被覆盖,section 有折叠头同级替换" },
560
- "collapsed": { "type": "boolean", "default": false, "description": "初始折叠状态" },
561
- "canToggleVisibility": { "type": "boolean", "default": true, "description": "用户可通过 Views 子菜单切换可见性" },
562
- "canMoveView": { "type": "boolean", "default": true, "description": "用户可将此 view 移到其他容器" }, "minHeight": {
563
- "type": "number",
564
- "description": "声明视图最小高度——侧栏分区 PaneSash effectiveMinHeight(对标 VS Code view view size)"
565
- },
566
-
567
- "hideByDefault": { "type": "boolean", "default": false, "description": "默认隐藏——用户需手动从 Views 菜单开启" },
568
- "singleViewPaneContainerTitle": { "type": "string", "description": "单 view 且容器 mergeHeaderWhenSingle 时替代容器 title" },
569
- "titleDescription": { "type": "string", "description": "标题旁的副文字——如 (5 files)" },
570
- "showActions": {
571
- "type": "string",
572
- "enum": ["always", "whenExpanded", "default"],
573
- "default": "default",
574
- "description": "actions 显隐时机——always=始终, whenExpanded=展开时, default=hover 显示"
575
- },
576
- "titleTooltip": { "type": "string", "description": "标题 hover tooltip——标题截断时显示完整文字" },
577
- "titleActions": {
578
- "type": "array",
579
- "description": "视图动作区声明(E5.8#36.5)——面板标签栏/侧栏 header 右侧 widget 列表,随视图走随视图迁移。三形态:icon 按钮 / dropdown 下拉菜单 / split 主按钮+下拉复合(VS Code 终端 [+] 新建 + [▾] 配置文件列表同款)。动作 = command + args,label/title 为 i18n key(中文原文)。",
580
- "items": {
581
- "type": "object",
582
- "required": ["type", "id"],
583
- "properties": {
584
- "type": { "type": "string", "enum": ["icon", "dropdown", "split"], "description": "widget 形态" },
585
- "id": { "type": "string", "description": "widget 唯一 ID——React key / 下拉展开状态定位" },
586
- "command": { "type": "string", "description": "点击执行的命令 ID(split=主按钮默认动作 / icon 必填)" },
587
- "icon": { "type": "string", "description": "codicon 类名(如 codicon-add)——icon/split 主按钮图标" },
588
- "title": { "type": "string", "description": "tooltip / aria-label——i18n key(split 无 icon 时作文本按钮)" },
589
- "args": { "description": "命令参数——executeCommand(command, args) 单个位置参数透传(JSON 可序列化)" },
590
- "items": {
591
- "type": "array",
592
- "description": "dropdown / split 下拉条目",
593
- "items": {
594
- "type": "object",
595
- "required": ["label", "command"],
596
- "properties": {
597
- "label": { "type": "string", "description": "显示文本——i18n key(中文原文)" },
598
- "command": { "type": "string", "description": "点击执行的命令 ID" },
599
- "args": { "description": "命令参数——单个位置参数透传" }
600
- }
601
- }
602
- }
603
- }
604
- }
605
- }
606
- },
607
- "additionalProperties": false
608
- }
609
- }
610
- },
611
- "additionalProperties": false
612
- },
613
- "floatingPanel": {
614
- "type": "object",
615
- "description": "悬浮面板声明(E5.8#39.5)——声明 contributes.views 中某视图可在壳内悬浮面板显示(类型 B)。viewId 必须引用已注册视图——声明寻址解析出 pluginId/renderPath/title;未声明则无「在悬浮面板中打开」右键入口(I8-3 声明即出现)。首批声明者 = settings(#38 Ctrl+, 弹面板)。",
616
- "required": ["viewId"],
617
- "properties": {
618
- "viewId": { "type": "string", "description": "视图 ID——contributes.views 已注册视图" }
619
- },
620
- "additionalProperties": false
621
- },
622
- "i18n": {
623
- "type": "object",
624
- "description": "插件自带翻译——key=语言代码, value=相对插件根目录的 JSON 文件路径。如 { \"en\": \"i18n/en.json\" }。不需要 zh.json——中文 key 自带兜底。",
625
- "additionalProperties": { "type": "string" }
626
- }
627
- },
628
- "additionalProperties": false
629
- }
630
- },
631
- "$defs": {
632
- "menuItem": {
633
- "type": "object",
634
- "required": ["command"],
635
- "description": "菜单项——与运行时 ManifestMenuItem(MenuRegistry)对齐(E5.8#149 声明式 schema 唯一缺口补齐:label/order/children 递归自引用)。children 任意深度递归,与运行时归一一对一。",
636
- "properties": {
637
- "command": { "type": "string", "description": "命令 ID(有 children 时可为空——父菜单项不执行命令,展开子菜单)" },
638
- "label": { "type": "string", "description": "显示标签——有值时覆盖命令标题(getCommand(id).title);父菜单项(无 command)必填" },
639
- "group": { "type": "string", "description": "分组——navigation/edit/terminal/delete/split" },
640
- "when": { "type": "string", "description": "context key when 条件" },
641
- "order": { "type": "number", "description": "排序权重——同 group 内越小越靠前(E5.8#33)" },
642
- "children": {
643
- "type": "array",
644
- "description": "嵌套子菜单——任意深度递归(对标 VS Code SubmenuAction,E5.8#148/#149);有 children command 可为空",
645
- "items": { "$ref": "#/$defs/menuItem" }
646
- }
647
- },
648
- "additionalProperties": false
649
- }
650
- },
651
- "allOf": [
652
- {
653
- "$comment": "entry 条件(废弃 type 系)——if 必须带 required:[\"type\"],否则对缺 type 的 theme/language 等数据插件空真(properties 只验在场属性)→ 误强 entry(E6#5 SDK validate 冒烟实证 2026-09-04)。type 在场且命中 const 才强制 entry。",
654
- "if": {
655
- "required": ["type"],
656
- "properties": { "type": { "const": "view" } }
657
- },
658
- "then": {
659
- "required": ["entry"]
660
- }
661
- },
662
- {
663
- "if": {
664
- "required": ["type"],
665
- "properties": { "type": { "const": "card" } }
666
- },
667
- "then": {
668
- "required": ["entry"]
669
- }
670
- },
671
- {
672
- "if": {
673
- "required": ["type"],
674
- "properties": { "type": { "const": "protocol" } }
675
- },
676
- "then": {
677
- "required": ["entry"]
678
- }
679
- }
680
- ],
681
- "additionalProperties": true
682
- }
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://embeddesk.app/schemas/plugin.schema.json",
4
+ "title": "Plugin metadata",
5
+ "description": "JSON Schema for plugin.json IDE autocompletion + JSON validation",
6
+ "type": "object",
7
+ "required": ["name", "version"],
8
+ "properties": {
9
+ "$schema": {
10
+ "type": "string",
11
+ "description": "JSON Schema reference — used for IDE autocompletion",
12
+ "$comment": "$schema is used only for IDE autocompletion; no JSON Schema validation is performed at runtime"
13
+ },
14
+ "pluginId": {
15
+ "type": "string",
16
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$",
17
+ "description": "🔴 Plugin identity — immutable once published (mirrors VS Code's publisher.name). Everything keys off it: install directory {userData}/plugins/<pluginId>/, distribution file name <pluginId>.linkdesk-plugin, marketplace dedup key, uninstall tombstone key, and update reconciliation. Strongly recommended to declare it explicitly: when omitted it falls back to the project directory name, but repository names and local directory names are free-form — rename the directory and the identity changes with it, and none of the five consequences (two install directories side by side / tombstone mismatch / duplicate marketplace entries / silently broken update chain / plugin data appearing lost) reports an error. Character set: letters, digits, `.`, `_`, `-`; the first character must be a letter or a digit."
18
+ },
19
+ "type": {
20
+ "type": "string",
21
+ "description": "[Deprecated] Plugin type — no longer required. The loader infers the contribution type from declared fields such as entry/mode/themes/languages/resources. Kept only for backward compatibility. The value is an open string, not a closed enum."
22
+ },
23
+ "core": {
24
+ "type": "boolean",
25
+ "description": "Pure UI safeguard against accidental removal — marks the plugin as important, so the uninstall entry is hidden in the plugin detail UI (newcomers cannot delete it by mistake). Grants no behavioral privilege: disable/uninstall still work through the API/command layer (uninstall writes a `removed` tombstone; boot does not resurrect it). Built-in capabilities such as the settings page and marketplace come from factoryRole slots (replaceable) and are unrelated to this flag. Absent = an ordinary plugin that the UI can freely install and uninstall. Default false.",
26
+ "default": false
27
+ },
28
+ "factoryRole": {
29
+ "type": "string",
30
+ "description": "System slot role — declares which system-level feature this plugin fills. settings = settings page (opened with Ctrl+,), marketplace = plugin marketplace. Multiple plugins with the same role may legally coexist (all become slot candidates, one-to-many); the default is the first registered in stable order (core:true grants no privilege and does not claim the default), and a user-switched active candidate is persisted."
31
+ },
32
+ "pluginRole": {
33
+ "type": "string",
34
+ "description": "Plugin loading strategy — view = has React UI components, data = pure data (themes/languages/protocols); inferred when omitted. The value is an open string, so third parties may declare new strategy names."
35
+ },
36
+ "appearsIn": {
37
+ "type": "object",
38
+ "description": "Where the plugin's UI appears — declarative. Replaces iconLocation + viewRole + keepSidebarOnFocus.",
39
+ "properties": {
40
+ "iconBar": { "type": "string", "enum": ["top", "bottom"], "description": "Icon Bar position; omitted = no icon shown" },
41
+ "sidePanel": { "type": "boolean", "description": "Has a Sidebar view container. Default false." },
42
+ "tabBar": { "type": "boolean", "description": "Can be opened as a tab. Default false." },
43
+ "statusBar": { "type": "string", "description": "File path of a self-drawn (code) Status Bar component, relative to the plugin root, .tsx, e.g. \"src/components/statusBar.tsx\" — the pool renders it from the declared URL, replacing static statusBar contributions; omit it when you only contribute static entries." }
44
+ }
45
+ },
46
+ "distribution": {
47
+ "type": "string",
48
+ "enum": ["builtin", "user"],
49
+ "default": "user",
50
+ "description": "⚠️ Legacy field — after the single-root flattening there is no longer any plugins/builtin vs. plugins/user distinction, so this field maps to no directory and is always normalized to user on install. Whether a plugin ships built-in is declared by `core`, not by this field. Third-party plugins should not set it."
51
+ },
52
+ "name": {
53
+ "type": "string",
54
+ "description": "Display name",
55
+ "minLength": 1
56
+ },
57
+ "version": {
58
+ "type": "string",
59
+ "description": "Semantic version",
60
+ "pattern": "^\\d+\\.\\d+\\.\\d+$"
61
+ },
62
+ "icon": {
63
+ "type": "string",
64
+ "description": "Icon (split of the three-image model) — plugins placed on the Icon Bar set a Type-1 monochrome silhouette glyph here (the shell Icon Bar reads only this field); for plugins not on the Icon Bar this field is the Type-2 colored identity image, which the tab bar and marketplace reuse as marketIcon ?? icon ?? default colored block. A codicon name, or a path relative to a bundled svg/png asset (inferred from the value when iconSource is omitted)."
65
+ },
66
+ "iconSource": {
67
+ "type": "string",
68
+ "description": "Icon source",
69
+ "enum": ["codicon", "svg", "url", "lucide"],
70
+ "default": "codicon"
71
+ },
72
+ "marketIcon": {
73
+ "type": "string",
74
+ "description": "Type-2 colored plugin identity image (the earlier \"cover art / scene cover\" meaning is retired — embed a scene cover in the README instead) — the marketplace Sidebar row / detail header and the tab bar view label show the same image. A path relative to a bundled svg asset; omitted → falls back to icon → shared default colored block. Optional: the whole chain falls back automatically for plugins with no images, so this split is invisible to third parties."
75
+ },
76
+ "marketIconSource": {
77
+ "type": "string",
78
+ "description": "Identity image source — same enum as iconSource; the value is a path relative to a bundled svg asset, and when source is omitted it is inferred from the path (an explicit svg treats the path as a bare URL, which breaks already-installed plugins).",
79
+ "enum": ["codicon", "svg", "url", "lucide"],
80
+ "default": "codicon"
81
+ },
82
+ "description": {
83
+ "type": "string",
84
+ "description": "One-line description shown on the plugin detail page. Multi-line supported."
85
+ },
86
+ "author": {
87
+ "type": "string",
88
+ "description": "Author name"
89
+ },
90
+ "entry": {
91
+ "type": "string",
92
+ "description": "Entry file path, relative to the plugin directory. Required for view/card/protocol."
93
+ },
94
+ "sidebar": {
95
+ "type": "string",
96
+ "description": "Sidebar component path; only meaningful for the view type.",
97
+ "$comment": "Discovered automatically by Vite glob; no plugin declaration needed"
98
+ },
99
+ "tabBehavior": {
100
+ "type": "object",
101
+ "description": "Tab behavior declaration — the core reads this field to decide dedup / fallback / close confirmation.",
102
+ "properties": {
103
+ "isFallback": {
104
+ "type": "boolean",
105
+ "description": "Automatically create this tab when no tab is open, and make it non-closable.",
106
+ "default": false
107
+ },
108
+ "singleton": {
109
+ "type": "boolean",
110
+ "description": "Only one instance allowed globally.",
111
+ "default": false
112
+ },
113
+ "confirmOnClose": {
114
+ "type": "string",
115
+ "description": "Show a confirmation dialog before closing; the value is the prompt text."
116
+ },
117
+ "invokeBeforeClose": {
118
+ "type": "string",
119
+ "description": "Command invoked before closing (after the confirmOnClose confirmation, before the tab closes). For example the terminal declares \"close_port\"."
120
+ },
121
+ "identityField": {
122
+ "type": "string",
123
+ "description": "The single field in CreateTabOptions used to determine tab identity. Omitted = multiple instances allowed, no dedup. For example workspace declares \"workspaceName\" — only one tab per workspace name."
124
+ }
125
+ },
126
+ "additionalProperties": false
127
+ },
128
+ "statusBar": {
129
+ "type": "array",
130
+ "description": "Status Bar contribution entries",
131
+ "items": {
132
+ "type": "object",
133
+ "required": ["id"],
134
+ "properties": {
135
+ "id": { "type": "string", "description": "Unique identifier" },
136
+ "icon": { "type": "string", "description": "codicon name or SVG path" },
137
+ "label": { "type": "string", "description": "Display text" },
138
+ "align": { "type": "string", "enum": ["left", "right"], "default": "left" },
139
+ "onClick": { "type": "string", "description": "Click behavior — command name" },
140
+ "configurable": { "type": "boolean", "description": "Declaring true → the shell auto-registers a configuration entry and injects the visible prop. The plugin author writes one line of JSON, zero code.", "default": false }
141
+ },
142
+ "additionalProperties": false
143
+ }
144
+ },
145
+ "file": {
146
+ "type": "string",
147
+ "description": "Single-file entry — for the theme/language types. Use either this or themes/languages."
148
+ },
149
+ "themes": {
150
+ "type": "array",
151
+ "description": "Array of multiple themes; only for the theme type.",
152
+ "items": {
153
+ "type": "object",
154
+ "required": ["id", "name", "file"],
155
+ "properties": {
156
+ "id": { "type": "string" },
157
+ "name": { "type": "string" },
158
+ "file": { "type": "string" }
159
+ },
160
+ "additionalProperties": false
161
+ }
162
+ },
163
+ "languages": {
164
+ "type": "array",
165
+ "description": "Array of multiple languages; only for the language type.",
166
+ "items": {
167
+ "type": "object",
168
+ "required": ["code", "name", "file"],
169
+ "properties": {
170
+ "code": { "type": "string" },
171
+ "name": { "type": "string" },
172
+ "file": { "type": "string" }
173
+ },
174
+ "additionalProperties": false
175
+ }
176
+ },
177
+ "mode": {
178
+ "type": "string",
179
+ "description": "Protocol mode. text = plain-text protocol; binary = WASM binary protocol (not available yet).",
180
+ "enum": ["text", "binary"],
181
+ "default": "text"
182
+ },
183
+ "resources": {
184
+ "type": "array",
185
+ "description": "Resource file list; only for the resource type.",
186
+ "items": { "type": "string" }
187
+ },
188
+ "recommends": {
189
+ "type": "array",
190
+ "description": "Plugins recommended to install alongside.",
191
+ "items": {
192
+ "type": "object",
193
+ "required": ["plugin", "reason"],
194
+ "properties": {
195
+ "plugin": { "type": "string" },
196
+ "reason": { "type": "string" }
197
+ },
198
+ "additionalProperties": false
199
+ }
200
+ },
201
+ "suggests": {
202
+ "type": "array",
203
+ "description": "Optional related plugins.",
204
+ "items": {
205
+ "type": "object",
206
+ "required": ["plugin", "reason"],
207
+ "properties": {
208
+ "plugin": { "type": "string" },
209
+ "reason": { "type": "string" }
210
+ },
211
+ "additionalProperties": false
212
+ }
213
+ },
214
+ "requires": {
215
+ "type": "array",
216
+ "description": "Plugin-level activation order dependency — declared by pluginId; dependencies load before this plugin. No version constraint. A missing dependency suspends the plugin (PENDING), which then loads automatically once the dependency is ready.",
217
+ "items": { "type": "string" },
218
+ "uniqueItems": true
219
+ },
220
+ "screenshots": {
221
+ "type": "array",
222
+ "description": "Array of screenshot URLs.",
223
+ "$comment": "Reserved for future PluginDetailView enhancements",
224
+ "items": { "type": "string" }
225
+ },
226
+ "minAppVersion": {
227
+ "type": "string",
228
+ "description": "Minimum required app version."
229
+ },
230
+ "docs": {
231
+ "type": "string",
232
+ "description": "Path to accompanying documentation (used with resource plugins).",
233
+ "$comment": "Documentation link"
234
+ },
235
+ "cardDocMap": {
236
+ "type": "object",
237
+ "description": "Card ID → documentation anchor mapping",
238
+ "$comment": "Card documentation mapping",
239
+ "additionalProperties": { "type": "string" }
240
+ },
241
+ "i18n": {
242
+ "type": "object",
243
+ "description": "@deprecated Use contributes.i18n instead — translation file declarations moved under contributes. Kept only for backward compatibility.",
244
+ "additionalProperties": { "type": "string" }
245
+ },
246
+ "cssVars": {
247
+ "type": "object",
248
+ "description": "Plugin-defined CSS variables",
249
+ "$comment": "Plugins inject CSS variables into :root",
250
+ "additionalProperties": {
251
+ "type": "object",
252
+ "properties": {
253
+ "dark": { "type": "string" },
254
+ "light": { "type": "string" }
255
+ }
256
+ }
257
+ },
258
+ "permissions": {
259
+ "type": "array",
260
+ "description": "Permission declaration",
261
+ "$comment": "serial/filesystem/network are the first whitelist values. The value is an open string, so third parties may declare new permission names (interpreted by the main process).",
262
+ "items": {
263
+ "type": "string"
264
+ }
265
+ },
266
+ "iconLocation": {
267
+ "type": "string",
268
+ "description": "Icon position in the Icon Bar. top (default, upper draggable area) or bottom (fixed bottom area).",
269
+ "enum": ["top", "bottom"],
270
+ "default": "top"
271
+ },
272
+ "viewRole": {
273
+ "type": "string",
274
+ "description": "Interaction role of the view in the shell. sidebarPrimary = Sidebar first (clicking toggles the Sidebar; tabs are opened from within the Sidebar; default), tabOnly = tab-only view (opens a tab directly). tabPrimary was removed — all plugins use sidebarPrimary.",
275
+ "enum": ["sidebarPrimary", "tabOnly"],
276
+ "default": "sidebarPrimary"
277
+ },
278
+ "shellRendered": {
279
+ "type": "boolean",
280
+ "description": "The shell renders this view itself (bypassing plugin routing). Declared only by shell-level views such as the welcome page and plugin detail page.",
281
+ "default": false
282
+ },
283
+ "keepSidebarOnFocus": {
284
+ "type": "boolean",
285
+ "description": "Keep the current Sidebar when this view is focused — for example the Sidebar stays unchanged while browsing the plugin detail page.",
286
+ "default": false
287
+ },
288
+ "contributes": {
289
+ "type": "object",
290
+ "description": "Contribution point declarations — mirrors VS Code package.json contributes. A core mechanism.",
291
+ "properties": {
292
+ "commands": {
293
+ "type": "array",
294
+ "description": "Registered commands — the source consumed by the Command Palette, context menus, and keybindings.",
295
+ "items": {
296
+ "type": "object",
297
+ "required": ["id", "title"],
298
+ "properties": {
299
+ "id": { "type": "string", "description": "Command ID — e.g. terminal.clear" },
300
+ "title": { "type": "string", "description": "Display name" },
301
+ "category": { "type": "string", "description": "Command palette group" },
302
+ "when": { "type": "string", "description": "context key when condition — e.g. activeEditor == 'terminal'" }
303
+ },
304
+ "additionalProperties": false
305
+ }
306
+ },
307
+ "menus": {
308
+ "type": "object",
309
+ "description": "Menu item declarations — grouped by MenuId. The built-in shell registration points are listed in the MenuRegistry MENU_SLOTS constant; MenuId is an open string, so third parties may declare any new registration point.",
310
+ "additionalProperties": {
311
+ "type": "array",
312
+ "items": {
313
+ "oneOf": [
314
+ { "type": "string", "description": "Command ID (shorthand)" },
315
+ { "$ref": "#/$defs/menuItem" }
316
+ ]
317
+ }
318
+ }
319
+ },
320
+ "keybindings": {
321
+ "type": "array",
322
+ "description": "Keybinding.",
323
+ "items": {
324
+ "type": "object",
325
+ "required": ["command", "key"],
326
+ "properties": {
327
+ "command": { "type": "string" },
328
+ "key": { "type": "string", "description": "e.g. ctrl+k" },
329
+ "when": { "type": "string", "description": "context key when condition" }
330
+ },
331
+ "additionalProperties": false
332
+ }
333
+ },
334
+ "configuration": {
335
+ "type": "object",
336
+ "description": "Configuration declarations — rendered automatically by the Settings Editor.",
337
+ "required": ["title", "properties"],
338
+ "properties": {
339
+ "title": { "type": "string", "description": "Settings group name" },
340
+ "properties": {
341
+ "type": "object",
342
+ "description": "Configuration mapping key { type, default, enum?, description }",
343
+ "additionalProperties": {
344
+ "type": "object",
345
+ "required": ["type", "default", "description"],
346
+ "properties": {
347
+ "type": { "type": "string", "enum": ["string", "number", "boolean", "object", "array"] },
348
+ "default": {},
349
+ "enum": { "type": "array" },
350
+ "enumDescriptions": { "type": "object", "description": "enum value display name mapping" },
351
+ "description": { "type": "string" },
352
+ "uiHint": { "type": "string", "description": "Settings editor rendering hint. SettingsView picks the control from the hint. An unknown hint falls back to the default rendering for its type — no error is thrown. The value is an open string, so third parties may declare new hint names." },
353
+ "monoOnly": { "type": "boolean", "description": "Monospace only — meaningful only with uiHint \"fontFamily\". true/omitted = list monospace families only (editor fonts); false = all families (UI fonts)." },
354
+ "minimum": { "type": "number", "description": "Numeric lower bound — applies when type is number (range of the slider/numeric control)" },
355
+ "maximum": { "type": "number", "description": "Numeric upper bound — applies when type is number (range of the slider/numeric control)" },
356
+ "step": { "type": "number", "description": "Slider step — meaningful only with uiHint \"slider\". Defaults are derived by SettingsView from the range (0.01 for floating-point ranges)." },
357
+ "group": { "type": "string", "description": "Second-level heading within a group — keys sharing a group are rendered under a subheading on the settings page; without a group they stay flat (zero intrusion for third parties)" }
358
+ },
359
+ "additionalProperties": false
360
+ }
361
+ }
362
+ },
363
+ "additionalProperties": false
364
+ },
365
+ "configurationDefaults": {
366
+ "type": "object",
367
+ "description": "Weak defaults suggested values this plugin gives for other configuration keys; values set by the user take precedence.",
368
+ "additionalProperties": {}
369
+ },
370
+ "themes": {
371
+ "type": "array",
372
+ "description": "Theme declarations mirrors VS Code contributes.themes. Plugins contribute themes that users can switch in the theme browser / appearance settings.",
373
+ "items": {
374
+ "type": "object",
375
+ "required": ["id", "label", "uiTheme", "path"],
376
+ "properties": {
377
+ "id": { "type": "string", "description": "Theme ID — e.g. my-theme-dark" },
378
+ "label": { "type": "string", "description": "Display name — e.g. My Theme Dark" },
379
+ "uiTheme": { "type": "string", "enum": ["dark", "light", "highContrast"], "description": "Base UI theme — dark / light / high contrast" },
380
+ "path": { "type": "string", "description": "Path to the theme definition JSON file" }
381
+ },
382
+ "additionalProperties": false
383
+ }
384
+ },
385
+ "iconThemes": {
386
+ "type": "array",
387
+ "description": "Product icon themes mirrors VS Code productIconThemes. Plugins declare icon sets that users can switch.",
388
+ "items": {
389
+ "type": "object",
390
+ "required": ["id", "label", "path"],
391
+ "properties": {
392
+ "id": { "type": "string", "description": "Icon theme ID — e.g. codicon" },
393
+ "label": { "type": "string", "description": "Display name — e.g. Codicon" },
394
+ "path": { "type": "string", "description": "Path to the icon definition JSON file" }
395
+ },
396
+ "additionalProperties": false
397
+ }
398
+ },
399
+ "icons": {
400
+ "type": "object",
401
+ "description": "Shared icons — a plugin contributes icons that other plugins reference via iconSource:shared. Mirrors the VS Code icon extension point.",
402
+ "additionalProperties": {
403
+ "type": "object",
404
+ "required": ["description", "default"],
405
+ "properties": {
406
+ "description": { "type": "string", "description": "Icon description" },
407
+ "default": {
408
+ "type": "object",
409
+ "properties": {
410
+ "fontPath": { "type": "string", "description": "Font file path" },
411
+ "fontCharacter": { "type": "string", "description": "Font character code — e.g. \\e001" }
412
+ },
413
+ "additionalProperties": false
414
+ }
415
+ },
416
+ "additionalProperties": false
417
+ }
418
+ },
419
+ "langDefs": {
420
+ "type": "array",
421
+ "description": "Language definitions mirrors VS Code contributes.languages. Declares a new language's ID/extensions/syntax highlighting/LSP support.",
422
+ "items": {
423
+ "type": "object",
424
+ "required": ["id", "extensions"],
425
+ "properties": {
426
+ "id": { "type": "string", "description": "Language ID e.g. cpp / python / rust" },
427
+ "extensions": { "type": "array", "items": { "type": "string" }, "description": "Extension list — e.g. ['.cpp', '.cxx', '.h']" },
428
+ "aliases": { "type": "array", "items": { "type": "string" }, "description": "Aliases — e.g. ['C++', 'C']" },
429
+ "monarch": {
430
+ "type": "object",
431
+ "description": "Optional — Monarch tokenizer definition (Monaco's built-in syntax highlighting)",
432
+ "properties": {
433
+ "tokenizer": { "type": "object" }
434
+ }
435
+ },
436
+ "lsp": {
437
+ "type": "object",
438
+ "description": "Optional — LSP language server configuration",
439
+ "properties": {
440
+ "command": { "type": "string", "description": "Launch command — an interpreter or executable name (an interpreter such as node; a PATH binary such as clangd; or an absolute path). The python plugin uses command='node' plus args carrying the script path." },
441
+ "args": { "type": "array", "items": { "type": "string" }, "description": "Launch arguments. Relative-path arguments resolve against the plugin root (made absolute once at registration) — e.g. 'node_modules/pyright/dist/pyright-langserver.js' → <plugin root>/node_modules/pyright/dist/pyright-langserver.js; flags such as '--stdio' are passed through verbatim. LSP binaries ship with the plugin: the SDK packaging bundles the referenced node_modules packages into the .linkdesk-plugin file (the shell no longer ships LSPs)." }
442
+ }
443
+ }
444
+ },
445
+ "additionalProperties": false
446
+ }
447
+ },
448
+ "fileAssociations": {
449
+ "type": "array",
450
+ "description": "File associations file extension plugin routing (consumed by the main-process plugin-manifest-loader). Declare only the extension plus an optional open command; this plugin's own pluginId comes from the top-level `pluginId` field (see the top-level pluginId description for the directory-name fallback).",
451
+ "items": {
452
+ "type": "object",
453
+ "required": ["extension"],
454
+ "properties": {
455
+ "extension": { "type": "string", "description": "File extension — without the dot, e.g. dxf / stl / step" },
456
+ "command": { "type": "string", "description": "Optional — command ID to run when opening a file with this extension" },
457
+ "displayName": { "type": "string", "description": "Optional — display name in the 'Open with…' picker" }
458
+ },
459
+ "additionalProperties": false
460
+ }
461
+ },
462
+ "languages": {
463
+ "type": "array",
464
+ "description": "Language packs mirrors the VS Code language extension point. A collection language pack declares multiple entries in one plugin.json.",
465
+ "items": {
466
+ "type": "object",
467
+ "required": ["id", "label", "path"],
468
+ "properties": {
469
+ "id": { "type": "string", "description": "Language code — e.g. zh / en / ja" },
470
+ "label": { "type": "string", "description": "Display name — e.g. English / Japanese / Chinese" },
471
+ "path": { "type": "string", "description": "Path to the i18n JSON translation file" }
472
+ },
473
+ "additionalProperties": false
474
+ }
475
+ },
476
+ "titleBar": {
477
+ "type": "object",
478
+ "description": "Title Bar button declarations — mirrors VS Code titleBar. Declares buttons on the left/right of the Title Bar: an icon button (icon) or a text-only button (label); set exactly one.",
479
+ "properties": {
480
+ "left": {
481
+ "type": "array",
482
+ "description": "Left Title Bar buttons",
483
+ "items": {
484
+ "type": "object",
485
+ "required": ["command"],
486
+ "properties": {
487
+ "command": { "type": "string", "description": "Command ID to run on click" },
488
+ "icon": { "type": "string", "description": "codicon name (e.g. codicon-settings) or image path" },
489
+ "label": { "type": "string", "description": "Button text — when set, the icon is not rendered. '$keyName' takes the value of that context key as the text (e.g. $updateButtonLabel); otherwise the value is treated as an i18n key (in this repository an i18n key is the original Chinese string)." },
490
+ "when": { "type": "string", "description": "context key when condition — the button is hidden while unmet" }
491
+ },
492
+ "additionalProperties": false
493
+ }
494
+ },
495
+ "right": {
496
+ "type": "array",
497
+ "description": "Right Title Bar buttons",
498
+ "items": {
499
+ "type": "object",
500
+ "required": ["command"],
501
+ "properties": {
502
+ "command": { "type": "string", "description": "Command ID to run on click" },
503
+ "icon": { "type": "string", "description": "codicon name (e.g. codicon-settings) or image path" },
504
+ "label": { "type": "string", "description": "Button text — when set, the icon is not rendered. '$keyName' takes the value of that context key as the text (e.g. $updateButtonLabel); otherwise the value is treated as an i18n key (in this repository an i18n key is the original Chinese string)." },
505
+ "when": { "type": "string", "description": "context key when condition — the button is hidden while unmet" }
506
+ },
507
+ "additionalProperties": false
508
+ }
509
+ }
510
+ },
511
+ "additionalProperties": false
512
+ },
513
+ "viewsContainers": {
514
+ "type": "object",
515
+ "description": "Declares Sidebar containers — clicking this plugin's icon switches to the container. Mirrors VS Code viewsContainers.",
516
+ "patternProperties": {
517
+ "^[a-z][a-z0-9-]*$": {
518
+ "type": "object",
519
+ "required": ["title"],
520
+ "properties": {
521
+ "title": { "type": "string", "description": "Container title — shown in the Sidebar header" },
522
+ "icon": { "type": "string", "description": "Container icon overrides the plugin's own icon" },
523
+ "location": {
524
+ "type": "string",
525
+ "enum": ["sidebar", "panel", "auxiliarybar", "main"],
526
+ "default": "sidebar",
527
+ "description": "Container location — sidebar = Sidebar, panel = Bottom Panel, auxiliarybar = auxiliary sidebar (⚠ not wired in the shell yet: auxiliarybar containers/views are not rendered), main = Main Area tab render surface (contributed by the active factoryRole plugin via views.main[] and consumed by the shell's ShellViewRenderer when it resolves the plugin-detail tab; third-party plugins that are not marketplace-like should use sidebar/panel)"
528
+ },
529
+ "hideIfEmpty": {
530
+ "type": "boolean",
531
+ "default": false,
532
+ "description": "Hide the container automatically when it has no active views"
533
+ },
534
+ "order": {
535
+ "type": "number",
536
+ "description": "Sort weight within the same location. Lower values come first"
537
+ },
538
+ "mergeHeaderWhenSingle": {
539
+ "type": "boolean",
540
+ "default": false,
541
+ "description": "Hide the view header when the container holds a single view — the title merges into the container header. Mirrors VS Code mergeViewWithContainerWhenSingleView"
542
+ }
543
+ },
544
+ "additionalProperties": false
545
+ }
546
+ },
547
+ "additionalProperties": false
548
+ },
549
+ "views": {
550
+ "type": "object",
551
+ "description": "Register views into containers — key = container ID. Mirrors VS Code views.",
552
+ "patternProperties": {
553
+ "^[a-z][a-z0-9-]*$": {
554
+ "type": "array",
555
+ "items": {
556
+ "type": "object",
557
+ "required": ["id", "render"],
558
+ "properties": {
559
+ "id": { "type": "string", "description": "Unique view ID e.g. folders / sessions / settings" },
560
+ "title": { "type": "string", "description": "Display title — the header text of the SidebarSection. An empty string hides the collapsible header" },
561
+ "render": { "type": "string", "description": "Module path of the view component — relative to the plugin root" },
562
+ "when": { "type": "string", "description": "Context key when condition" },
563
+ "order": { "type": "number", "description": "Sort weight within the container. Lower values on top" },
564
+ "role": { "type": "string", "enum": ["toolbar", "section"], "default": "section", "description": "Container role toolbar sticks to the top and is not overridden; section has a collapsible header and is replaced at the same level" },
565
+ "collapsed": { "type": "boolean", "default": false, "description": "Initial collapsed state" },
566
+ "canToggleVisibility": { "type": "boolean", "default": true, "description": "Users can toggle visibility from the Views submenu" },
567
+ "canMoveView": { "type": "boolean", "default": true, "description": "Users can move this view to another container" }, "minHeight": {
568
+ "type": "number",
569
+ "description": "Declared minimum view height — the Sidebar pane PaneSash effectiveMinHeight (mirrors the VS Code view size)"
570
+ },
571
+
572
+ "hideByDefault": { "type": "boolean", "default": false, "description": "Hidden by default — users must enable it manually from the Views menu" },
573
+ "singleViewPaneContainerTitle": { "type": "string", "description": "Replaces the container title when there is a single view and the container has mergeHeaderWhenSingle" },
574
+ "titleDescription": { "type": "string", "description": "Secondary text next to the title — e.g. (5 files)" },
575
+ "showActions": {
576
+ "type": "string",
577
+ "enum": ["always", "whenExpanded", "default"],
578
+ "default": "default",
579
+ "description": "When actions are shown always, whenExpanded, or default (on hover)"
580
+ },
581
+ "titleTooltip": { "type": "string", "description": "Title hover tooltip — shows the full text when the title is truncated" },
582
+ "titleActions": {
583
+ "type": "array",
584
+ "description": "View action area declaration — the widget list on the right of the Panel tab bar / Sidebar header, carried along with the view when it moves. Three forms: icon button, dropdown menu, and split (primary button + dropdown, like the VS Code terminal's [+] New and [▾] profile list). An action is command + args; label/title are i18n keys (the original Chinese strings).",
585
+ "items": {
586
+ "type": "object",
587
+ "required": ["type", "id"],
588
+ "properties": {
589
+ "type": { "type": "string", "enum": ["icon", "dropdown", "split"], "description": "Widget form" },
590
+ "id": { "type": "string", "description": "Unique widget ID — React key / dropdown open-state anchor" },
591
+ "command": { "type": "string", "description": "Command ID to run on click (split = default action of the primary button; required for icon)" },
592
+ "icon": { "type": "string", "description": "codicon class name (e.g. codicon-add) — the icon/split primary button icon" },
593
+ "title": { "type": "string", "description": "tooltip / aria-label — an i18n key (used as a text button when a split has no icon)" },
594
+ "args": { "description": "Command arguments — passed through as the single positional argument of executeCommand(command, args) (JSON-serializable)" },
595
+ "items": {
596
+ "type": "array",
597
+ "description": "dropdown / split menu entries",
598
+ "items": {
599
+ "type": "object",
600
+ "required": ["label", "command"],
601
+ "properties": {
602
+ "label": { "type": "string", "description": "Display text — an i18n key (the original Chinese string)" },
603
+ "command": { "type": "string", "description": "Command ID to run on click" },
604
+ "args": { "description": "Command arguments — passed through as a single positional argument" }
605
+ }
606
+ }
607
+ }
608
+ }
609
+ }
610
+ }
611
+ },
612
+ "additionalProperties": false
613
+ }
614
+ }
615
+ },
616
+ "additionalProperties": false
617
+ },
618
+ "floatingPanel": {
619
+ "type": "object",
620
+ "description": "Floating Panel declaration — declares that a view in contributes.views can be shown in a Floating Panel inside the shell. viewId must reference an already registered view: the declaration is resolved into pluginId/renderPath/title. Without it there is no 'Open in Floating Panel' context menu entry. The first declarer is settings (Ctrl+, opens the panel).",
621
+ "required": ["viewId"],
622
+ "properties": {
623
+ "viewId": { "type": "string", "description": "View ID — a view registered in contributes.views" }
624
+ },
625
+ "additionalProperties": false
626
+ },
627
+ "i18n": {
628
+ "type": "object",
629
+ "description": "Plugin-bundled translations — key = language code, value = JSON file path relative to the plugin root, e.g. { \"en\": \"i18n/en.json\" }. No zh.json is needed — Chinese keys are the built-in fallback.",
630
+ "additionalProperties": { "type": "string" }
631
+ }
632
+ },
633
+ "additionalProperties": false
634
+ }
635
+ },
636
+ "$defs": {
637
+ "menuItem": {
638
+ "type": "object",
639
+ "required": ["command"],
640
+ "description": "Menu item aligned with the runtime ManifestMenuItem (MenuRegistry); label/order/children are recursively self-referencing. children recurses to any depth and maps one-to-one onto the runtime normalization.",
641
+ "properties": {
642
+ "command": { "type": "string", "description": "Command ID (may be empty with children — a parent menu item runs no command and expands a submenu)" },
643
+ "label": { "type": "string", "description": "Display label — overrides the command title (getCommand(id).title) when present; required for a parent menu item (no command)" },
644
+ "group": { "type": "string", "description": "Group navigation/edit/terminal/delete/split" },
645
+ "when": { "type": "string", "description": "context key when condition" },
646
+ "order": { "type": "number", "description": "Sort weight — lower values come first within the same group" },
647
+ "children": {
648
+ "type": "array",
649
+ "description": "Nested submenus — recurses to any depth (mirrors the VS Code SubmenuAction); command may be empty when children is present",
650
+ "items": { "$ref": "#/$defs/menuItem" }
651
+ }
652
+ },
653
+ "additionalProperties": false
654
+ }
655
+ },
656
+ "allOf": [
657
+ {
658
+ "$comment": "entry condition (deprecated type family) — the if clause must include required:[\"type\"], otherwise it is vacuously true for data plugins such as theme/language that have no type (properties only validate properties that are present), which would wrongly require entry. entry is required only when type is present and matches the const.",
659
+ "if": {
660
+ "required": ["type"],
661
+ "properties": { "type": { "const": "view" } }
662
+ },
663
+ "then": {
664
+ "required": ["entry"]
665
+ }
666
+ },
667
+ {
668
+ "if": {
669
+ "required": ["type"],
670
+ "properties": { "type": { "const": "card" } }
671
+ },
672
+ "then": {
673
+ "required": ["entry"]
674
+ }
675
+ },
676
+ {
677
+ "if": {
678
+ "required": ["type"],
679
+ "properties": { "type": { "const": "protocol" } }
680
+ },
681
+ "then": {
682
+ "required": ["entry"]
683
+ }
684
+ }
685
+ ],
686
+ "additionalProperties": true
687
+ }