@capyclaw/ppt-skill-editing 0.0.0-stage → 2.2.1
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.
- package/README.md +2 -2
- package/contract/ppt-contract.json +1529 -0
- package/cordis.patch.yml +4 -0
- package/lib/index.mjs +23 -0
- package/lib/provider.mjs +82 -0
- package/package.json +41 -4
- package/skills/pptist-editing/SKILL.md +64 -0
|
@@ -0,0 +1,1529 @@
|
|
|
1
|
+
{
|
|
2
|
+
"contractVersion": "2.4.0",
|
|
3
|
+
"packageVersion": "2.4.2",
|
|
4
|
+
"toolCount": 27,
|
|
5
|
+
"tools": [
|
|
6
|
+
{
|
|
7
|
+
"name": "ppt_capabilities",
|
|
8
|
+
"kind": "read",
|
|
9
|
+
"since": "2.0.0",
|
|
10
|
+
"capability": "contract",
|
|
11
|
+
"description": "返回工作台契约版本、工具清单、能力清单、能力标签与编辑器地址。skill 加载后先调用一次;工具缺失或 major 版本不一致时停止并提示升级。",
|
|
12
|
+
"inputSchema": {
|
|
13
|
+
"type": "object",
|
|
14
|
+
"properties": {},
|
|
15
|
+
"additionalProperties": false
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"name": "ppt_get_deck",
|
|
20
|
+
"kind": "read",
|
|
21
|
+
"since": "1.0.0",
|
|
22
|
+
"capability": "deck",
|
|
23
|
+
"description": "读当前演示文稿:标题、每页背景/元素。需要精确定位(页号/元素 id)时调用;改背景/加页/改首个文本不要先读。",
|
|
24
|
+
"inputSchema": {
|
|
25
|
+
"type": "object",
|
|
26
|
+
"properties": {
|
|
27
|
+
"detailed": {
|
|
28
|
+
"type": "boolean",
|
|
29
|
+
"description": "元素几何/颜色等细节(缺省只给摘要)"
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
"additionalProperties": false
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"name": "ppt_audit",
|
|
37
|
+
"kind": "read",
|
|
38
|
+
"since": "2.1.0",
|
|
39
|
+
"capability": "audit",
|
|
40
|
+
"description": "确定性审计当前 deck:文字越界/溢出/重叠、同文案重复、文字隐形/被遮挡、有效背景对比度、重复版式、配色漂移、重复图片、页面密度。返回 pass/blocking;交付前或截图前调用,pass=false 不得说审计通过。",
|
|
41
|
+
"inputSchema": {
|
|
42
|
+
"type": "object",
|
|
43
|
+
"properties": {},
|
|
44
|
+
"additionalProperties": false
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"name": "ppt_task",
|
|
49
|
+
"kind": "read",
|
|
50
|
+
"since": "2.2.0",
|
|
51
|
+
"capability": "task",
|
|
52
|
+
"description": "任务恢复:status 查当前进度/待处理批次/最近 checkpoint;list 列 checkpoint;checkpoint 保存命名快照;restore 恢复快照。长任务每阶段保存一次。",
|
|
53
|
+
"inputSchema": {
|
|
54
|
+
"type": "object",
|
|
55
|
+
"properties": {
|
|
56
|
+
"action": {
|
|
57
|
+
"type": "string",
|
|
58
|
+
"enum": [
|
|
59
|
+
"status",
|
|
60
|
+
"list",
|
|
61
|
+
"checkpoint",
|
|
62
|
+
"restore"
|
|
63
|
+
]
|
|
64
|
+
},
|
|
65
|
+
"name": {
|
|
66
|
+
"type": "string",
|
|
67
|
+
"maxLength": 64,
|
|
68
|
+
"description": "checkpoint 名称(字母/数字/._-)"
|
|
69
|
+
},
|
|
70
|
+
"meta": {
|
|
71
|
+
"type": "object",
|
|
72
|
+
"description": "checkpoint 附带的 goal/plan/next 等元数据"
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
"required": [
|
|
76
|
+
"action"
|
|
77
|
+
],
|
|
78
|
+
"additionalProperties": false
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"name": "ppt_text",
|
|
83
|
+
"kind": "write",
|
|
84
|
+
"since": "1.0.0",
|
|
85
|
+
"capability": "text",
|
|
86
|
+
"description": "改文字:某页或某几页(缺省全部页)的首个文本,或指定 element_id 的文本;可同时改字号/颜色/加粗/对齐。首个文本优先取 text 元素,纯图形文字页回退到带文字的 shape。",
|
|
87
|
+
"inputSchema": {
|
|
88
|
+
"type": "object",
|
|
89
|
+
"properties": {
|
|
90
|
+
"text": {
|
|
91
|
+
"type": "string",
|
|
92
|
+
"maxLength": 2000
|
|
93
|
+
},
|
|
94
|
+
"slide": {
|
|
95
|
+
"type": "integer",
|
|
96
|
+
"description": "0 起页号"
|
|
97
|
+
},
|
|
98
|
+
"slides": {
|
|
99
|
+
"type": "array",
|
|
100
|
+
"maxItems": 100,
|
|
101
|
+
"items": {
|
|
102
|
+
"type": "integer"
|
|
103
|
+
},
|
|
104
|
+
"description": "0 起页号数组(缺省=全部)"
|
|
105
|
+
},
|
|
106
|
+
"element_id": {
|
|
107
|
+
"type": "string",
|
|
108
|
+
"description": "元素 id(缺省=首个文本)"
|
|
109
|
+
},
|
|
110
|
+
"font_size": {
|
|
111
|
+
"type": "integer"
|
|
112
|
+
},
|
|
113
|
+
"color": {
|
|
114
|
+
"type": "string",
|
|
115
|
+
"description": "CSS 颜色或中文色名"
|
|
116
|
+
},
|
|
117
|
+
"bold": {
|
|
118
|
+
"type": "boolean"
|
|
119
|
+
},
|
|
120
|
+
"align": {
|
|
121
|
+
"type": "string",
|
|
122
|
+
"enum": [
|
|
123
|
+
"left",
|
|
124
|
+
"center",
|
|
125
|
+
"right",
|
|
126
|
+
"justify"
|
|
127
|
+
]
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
"required": [
|
|
131
|
+
"text"
|
|
132
|
+
],
|
|
133
|
+
"additionalProperties": false
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
"name": "ppt_fill",
|
|
138
|
+
"kind": "write",
|
|
139
|
+
"since": "1.0.0",
|
|
140
|
+
"capability": "text",
|
|
141
|
+
"description": "填充文字槽位:把某页的第 slot 个文字载体(0 起,含带文字的 shape)改成 text,可带字号/颜色/加粗/对齐。保留原版式。",
|
|
142
|
+
"inputSchema": {
|
|
143
|
+
"type": "object",
|
|
144
|
+
"properties": {
|
|
145
|
+
"slide": {
|
|
146
|
+
"type": "integer",
|
|
147
|
+
"description": "0 起页号"
|
|
148
|
+
},
|
|
149
|
+
"slot": {
|
|
150
|
+
"type": "integer",
|
|
151
|
+
"description": "该页第几个文字载体(0 起,含图形内文字)"
|
|
152
|
+
},
|
|
153
|
+
"text": {
|
|
154
|
+
"type": "string"
|
|
155
|
+
},
|
|
156
|
+
"font_size": {
|
|
157
|
+
"type": "integer"
|
|
158
|
+
},
|
|
159
|
+
"color": {
|
|
160
|
+
"type": "string"
|
|
161
|
+
},
|
|
162
|
+
"bold": {
|
|
163
|
+
"type": "boolean"
|
|
164
|
+
},
|
|
165
|
+
"align": {
|
|
166
|
+
"type": "string"
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
"required": [
|
|
170
|
+
"slide",
|
|
171
|
+
"slot",
|
|
172
|
+
"text"
|
|
173
|
+
],
|
|
174
|
+
"additionalProperties": false
|
|
175
|
+
}
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
"name": "ppt_style",
|
|
179
|
+
"kind": "write",
|
|
180
|
+
"since": "1.0.0",
|
|
181
|
+
"capability": "style",
|
|
182
|
+
"description": "整体样式:背景色(可指定页),文字颜色,字体名,主题色数组。浅底会自动配深字、深底配白字。",
|
|
183
|
+
"inputSchema": {
|
|
184
|
+
"type": "object",
|
|
185
|
+
"properties": {
|
|
186
|
+
"background": {
|
|
187
|
+
"type": "string",
|
|
188
|
+
"description": "背景色(CSS 或中文色名)"
|
|
189
|
+
},
|
|
190
|
+
"slides": {
|
|
191
|
+
"type": "array",
|
|
192
|
+
"items": {
|
|
193
|
+
"type": "integer"
|
|
194
|
+
},
|
|
195
|
+
"description": "只改这些页的背景;缺省全部"
|
|
196
|
+
},
|
|
197
|
+
"contrast": {
|
|
198
|
+
"type": "boolean",
|
|
199
|
+
"description": "自动对比度,缺省 true"
|
|
200
|
+
},
|
|
201
|
+
"text_color": {
|
|
202
|
+
"type": "string",
|
|
203
|
+
"description": "全局正文颜色"
|
|
204
|
+
},
|
|
205
|
+
"font_name": {
|
|
206
|
+
"type": "string"
|
|
207
|
+
},
|
|
208
|
+
"theme_colors": {
|
|
209
|
+
"type": "array",
|
|
210
|
+
"items": {
|
|
211
|
+
"type": "string"
|
|
212
|
+
},
|
|
213
|
+
"description": "主题色数组"
|
|
214
|
+
}
|
|
215
|
+
},
|
|
216
|
+
"additionalProperties": false
|
|
217
|
+
}
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
"name": "ppt_element",
|
|
221
|
+
"kind": "write",
|
|
222
|
+
"since": "1.0.0",
|
|
223
|
+
"capability": "element",
|
|
224
|
+
"description": "元素级编辑:add 加文本/形状/图片,update 改位置/尺寸/旋转/填充/文字样式,remove 删除。插入图片走 ppt_image 的同一实现。",
|
|
225
|
+
"inputSchema": {
|
|
226
|
+
"type": "object",
|
|
227
|
+
"properties": {
|
|
228
|
+
"action": {
|
|
229
|
+
"type": "string",
|
|
230
|
+
"enum": [
|
|
231
|
+
"add",
|
|
232
|
+
"update",
|
|
233
|
+
"remove"
|
|
234
|
+
]
|
|
235
|
+
},
|
|
236
|
+
"slide": {
|
|
237
|
+
"type": "integer",
|
|
238
|
+
"description": "0 起页号"
|
|
239
|
+
},
|
|
240
|
+
"element_id": {
|
|
241
|
+
"type": "string"
|
|
242
|
+
},
|
|
243
|
+
"element": {
|
|
244
|
+
"type": "object",
|
|
245
|
+
"description": "add 用:{type:'text'|'shape'|'image', text?/content?, src?(image), fill?, left?, top?, width?, height?, fontSize?, color?}"
|
|
246
|
+
},
|
|
247
|
+
"props": {
|
|
248
|
+
"type": "object",
|
|
249
|
+
"description": "update 用:{left?,top?,width?,height?,rotate?,opacity?,fill?,src?,text?,fontSize?,color?,bold?,align?}"
|
|
250
|
+
}
|
|
251
|
+
},
|
|
252
|
+
"required": [
|
|
253
|
+
"action",
|
|
254
|
+
"slide"
|
|
255
|
+
],
|
|
256
|
+
"additionalProperties": false
|
|
257
|
+
}
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
"name": "ppt_slide",
|
|
261
|
+
"kind": "write",
|
|
262
|
+
"since": "1.0.0",
|
|
263
|
+
"capability": "slide",
|
|
264
|
+
"description": "页管理:add(标题+要点)/remove/move/duplicate/select。",
|
|
265
|
+
"inputSchema": {
|
|
266
|
+
"type": "object",
|
|
267
|
+
"properties": {
|
|
268
|
+
"action": {
|
|
269
|
+
"type": "string",
|
|
270
|
+
"enum": [
|
|
271
|
+
"add",
|
|
272
|
+
"remove",
|
|
273
|
+
"move",
|
|
274
|
+
"duplicate",
|
|
275
|
+
"select"
|
|
276
|
+
]
|
|
277
|
+
},
|
|
278
|
+
"index": {
|
|
279
|
+
"type": "integer",
|
|
280
|
+
"description": "目标页号(0 起);add 时为插入位置,缺省末尾"
|
|
281
|
+
},
|
|
282
|
+
"to": {
|
|
283
|
+
"type": "integer",
|
|
284
|
+
"description": "move 的目标位置"
|
|
285
|
+
},
|
|
286
|
+
"title": {
|
|
287
|
+
"type": "string",
|
|
288
|
+
"maxLength": 40,
|
|
289
|
+
"description": "add 的标题"
|
|
290
|
+
},
|
|
291
|
+
"bullets": {
|
|
292
|
+
"type": "array",
|
|
293
|
+
"maxItems": 8,
|
|
294
|
+
"items": {
|
|
295
|
+
"type": "string",
|
|
296
|
+
"maxLength": 80
|
|
297
|
+
}
|
|
298
|
+
},
|
|
299
|
+
"background": {
|
|
300
|
+
"type": "string"
|
|
301
|
+
}
|
|
302
|
+
},
|
|
303
|
+
"required": [
|
|
304
|
+
"action"
|
|
305
|
+
],
|
|
306
|
+
"additionalProperties": false
|
|
307
|
+
}
|
|
308
|
+
},
|
|
309
|
+
{
|
|
310
|
+
"name": "ppt_apply",
|
|
311
|
+
"kind": "write",
|
|
312
|
+
"since": "1.0.0",
|
|
313
|
+
"capability": "apply",
|
|
314
|
+
"description": "通用逃生口:一次提交任意底层指令数组(load / update-slide / add-element / set-background / theme / …),复杂组合动作用。",
|
|
315
|
+
"inputSchema": {
|
|
316
|
+
"type": "object",
|
|
317
|
+
"properties": {
|
|
318
|
+
"ops": {
|
|
319
|
+
"type": "array",
|
|
320
|
+
"maxItems": 100,
|
|
321
|
+
"items": {
|
|
322
|
+
"type": "object"
|
|
323
|
+
},
|
|
324
|
+
"description": "底层 op 数组(≤100)"
|
|
325
|
+
},
|
|
326
|
+
"title": {
|
|
327
|
+
"type": "string",
|
|
328
|
+
"maxLength": 120,
|
|
329
|
+
"description": "deck 标题(可选)"
|
|
330
|
+
}
|
|
331
|
+
},
|
|
332
|
+
"additionalProperties": false
|
|
333
|
+
}
|
|
334
|
+
},
|
|
335
|
+
{
|
|
336
|
+
"name": "ppt_deck",
|
|
337
|
+
"kind": "write",
|
|
338
|
+
"since": "1.0.0",
|
|
339
|
+
"capability": "compose",
|
|
340
|
+
"description": "从大纲一次成稿:按版式(cover/section/bullets/two/stat/quote/end)+ 设计预设(clean/business/warm/tech)生成整套专业排版 deck,替换当前内容。默认简洁成稿首选(preset: clean)。",
|
|
341
|
+
"inputSchema": {
|
|
342
|
+
"type": "object",
|
|
343
|
+
"properties": {
|
|
344
|
+
"title": {
|
|
345
|
+
"type": "string",
|
|
346
|
+
"maxLength": 40
|
|
347
|
+
},
|
|
348
|
+
"preset": {
|
|
349
|
+
"type": "string",
|
|
350
|
+
"enum": [
|
|
351
|
+
"clean",
|
|
352
|
+
"business",
|
|
353
|
+
"warm",
|
|
354
|
+
"tech"
|
|
355
|
+
]
|
|
356
|
+
},
|
|
357
|
+
"slides": {
|
|
358
|
+
"type": "array",
|
|
359
|
+
"maxItems": 30,
|
|
360
|
+
"items": {
|
|
361
|
+
"type": "object",
|
|
362
|
+
"properties": {
|
|
363
|
+
"layout": {
|
|
364
|
+
"type": "string",
|
|
365
|
+
"enum": [
|
|
366
|
+
"cover",
|
|
367
|
+
"section",
|
|
368
|
+
"bullets",
|
|
369
|
+
"two",
|
|
370
|
+
"stat",
|
|
371
|
+
"quote",
|
|
372
|
+
"end"
|
|
373
|
+
]
|
|
374
|
+
},
|
|
375
|
+
"title": {
|
|
376
|
+
"type": "string",
|
|
377
|
+
"maxLength": 40
|
|
378
|
+
},
|
|
379
|
+
"subtitle": {
|
|
380
|
+
"type": "string",
|
|
381
|
+
"maxLength": 80
|
|
382
|
+
},
|
|
383
|
+
"kicker": {
|
|
384
|
+
"type": "string",
|
|
385
|
+
"maxLength": 40
|
|
386
|
+
},
|
|
387
|
+
"index": {
|
|
388
|
+
"type": "integer"
|
|
389
|
+
},
|
|
390
|
+
"bullets": {
|
|
391
|
+
"type": "array",
|
|
392
|
+
"maxItems": 8
|
|
393
|
+
},
|
|
394
|
+
"left": {
|
|
395
|
+
"type": "object"
|
|
396
|
+
},
|
|
397
|
+
"right": {
|
|
398
|
+
"type": "object"
|
|
399
|
+
},
|
|
400
|
+
"stats": {
|
|
401
|
+
"type": "array",
|
|
402
|
+
"maxItems": 4
|
|
403
|
+
},
|
|
404
|
+
"quote": {
|
|
405
|
+
"type": "string",
|
|
406
|
+
"maxLength": 300
|
|
407
|
+
},
|
|
408
|
+
"author": {
|
|
409
|
+
"type": "string",
|
|
410
|
+
"maxLength": 60
|
|
411
|
+
},
|
|
412
|
+
"note": {
|
|
413
|
+
"type": "string",
|
|
414
|
+
"maxLength": 300
|
|
415
|
+
},
|
|
416
|
+
"foot": {
|
|
417
|
+
"type": "string",
|
|
418
|
+
"maxLength": 100
|
|
419
|
+
}
|
|
420
|
+
},
|
|
421
|
+
"required": [
|
|
422
|
+
"layout"
|
|
423
|
+
]
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
},
|
|
427
|
+
"required": [
|
|
428
|
+
"slides"
|
|
429
|
+
],
|
|
430
|
+
"additionalProperties": false
|
|
431
|
+
}
|
|
432
|
+
},
|
|
433
|
+
{
|
|
434
|
+
"name": "ppt_page",
|
|
435
|
+
"kind": "write",
|
|
436
|
+
"since": "2.3.0",
|
|
437
|
+
"capability": "compose",
|
|
438
|
+
"description": "逐页成稿:一次只追加/替换当前一页(同一套 clean 版式),适合长 deck 分批落盘;首屏用 replace:true,后续逐页追加。",
|
|
439
|
+
"inputSchema": {
|
|
440
|
+
"type": "object",
|
|
441
|
+
"properties": {
|
|
442
|
+
"layout": {
|
|
443
|
+
"type": "string",
|
|
444
|
+
"enum": [
|
|
445
|
+
"cover",
|
|
446
|
+
"section",
|
|
447
|
+
"bullets",
|
|
448
|
+
"two",
|
|
449
|
+
"stat",
|
|
450
|
+
"quote",
|
|
451
|
+
"end"
|
|
452
|
+
]
|
|
453
|
+
},
|
|
454
|
+
"preset": {
|
|
455
|
+
"type": "string",
|
|
456
|
+
"enum": [
|
|
457
|
+
"clean",
|
|
458
|
+
"business",
|
|
459
|
+
"warm",
|
|
460
|
+
"tech"
|
|
461
|
+
]
|
|
462
|
+
},
|
|
463
|
+
"deck_title": {
|
|
464
|
+
"type": "string",
|
|
465
|
+
"maxLength": 40
|
|
466
|
+
},
|
|
467
|
+
"position": {
|
|
468
|
+
"type": "integer",
|
|
469
|
+
"description": "插入位置(0 起,缺省末尾)"
|
|
470
|
+
},
|
|
471
|
+
"replace": {
|
|
472
|
+
"type": "boolean",
|
|
473
|
+
"description": "true 时用这一页替换整个 deck(首屏用)"
|
|
474
|
+
},
|
|
475
|
+
"title": {
|
|
476
|
+
"type": "string",
|
|
477
|
+
"maxLength": 40
|
|
478
|
+
},
|
|
479
|
+
"subtitle": {
|
|
480
|
+
"type": "string",
|
|
481
|
+
"maxLength": 80
|
|
482
|
+
},
|
|
483
|
+
"kicker": {
|
|
484
|
+
"type": "string",
|
|
485
|
+
"maxLength": 40
|
|
486
|
+
},
|
|
487
|
+
"section_index": {
|
|
488
|
+
"type": "integer",
|
|
489
|
+
"description": "section 版式的章节序号"
|
|
490
|
+
},
|
|
491
|
+
"bullets": {
|
|
492
|
+
"type": "array",
|
|
493
|
+
"maxItems": 8
|
|
494
|
+
},
|
|
495
|
+
"left": {
|
|
496
|
+
"type": "object"
|
|
497
|
+
},
|
|
498
|
+
"right": {
|
|
499
|
+
"type": "object"
|
|
500
|
+
},
|
|
501
|
+
"stats": {
|
|
502
|
+
"type": "array",
|
|
503
|
+
"maxItems": 4
|
|
504
|
+
},
|
|
505
|
+
"quote": {
|
|
506
|
+
"type": "string",
|
|
507
|
+
"maxLength": 300
|
|
508
|
+
},
|
|
509
|
+
"author": {
|
|
510
|
+
"type": "string",
|
|
511
|
+
"maxLength": 60
|
|
512
|
+
},
|
|
513
|
+
"note": {
|
|
514
|
+
"type": "string",
|
|
515
|
+
"maxLength": 300
|
|
516
|
+
},
|
|
517
|
+
"foot": {
|
|
518
|
+
"type": "string",
|
|
519
|
+
"maxLength": 100
|
|
520
|
+
}
|
|
521
|
+
},
|
|
522
|
+
"required": [
|
|
523
|
+
"layout"
|
|
524
|
+
],
|
|
525
|
+
"additionalProperties": false
|
|
526
|
+
}
|
|
527
|
+
},
|
|
528
|
+
{
|
|
529
|
+
"name": "ppt_recolor",
|
|
530
|
+
"kind": "write",
|
|
531
|
+
"since": "1.0.0",
|
|
532
|
+
"capability": "recolor",
|
|
533
|
+
"description": "一键整体换色(一次调用完成):背景 + 全部文字对比色 + 装饰形状(线条/圆点/色条)统一色。改整体背景/配色时优先用它,禁止逐页 ppt_element 改色。",
|
|
534
|
+
"inputSchema": {
|
|
535
|
+
"type": "object",
|
|
536
|
+
"properties": {
|
|
537
|
+
"background": {
|
|
538
|
+
"type": "string",
|
|
539
|
+
"description": "新背景色(CSS 颜色或中文色名)"
|
|
540
|
+
},
|
|
541
|
+
"text": {
|
|
542
|
+
"type": "string",
|
|
543
|
+
"description": "文字颜色;缺省按背景自动对比(浅底深字/深底白字)"
|
|
544
|
+
},
|
|
545
|
+
"shapes": {
|
|
546
|
+
"type": "string",
|
|
547
|
+
"description": "装饰形状填充色;缺省跟随文字色(传 null 表示不改装饰)"
|
|
548
|
+
},
|
|
549
|
+
"slides": {
|
|
550
|
+
"type": "array",
|
|
551
|
+
"items": {
|
|
552
|
+
"type": "integer"
|
|
553
|
+
},
|
|
554
|
+
"description": "只改这些页;缺省全部"
|
|
555
|
+
}
|
|
556
|
+
},
|
|
557
|
+
"required": [
|
|
558
|
+
"background"
|
|
559
|
+
],
|
|
560
|
+
"additionalProperties": false
|
|
561
|
+
}
|
|
562
|
+
},
|
|
563
|
+
{
|
|
564
|
+
"name": "ppt_image",
|
|
565
|
+
"kind": "write",
|
|
566
|
+
"since": "1.0.0",
|
|
567
|
+
"capability": "image",
|
|
568
|
+
"description": "插入图片(一次完成,图片先写入对象仓库,deck 只存 /assets/<sha256> 引用):attachment_id 取聊天图片附件的 sha256 id;也支持 path/src。src 走远程下载时带浏览器头、25s 超时、自动重试一次,上限 6MB。失败会返回 [错误码]:HOST_BLOCKED / HTTP_403 / TIMEOUT / TOO_LARGE 等——永久性失败不要重试同一链接或域名,改换来源或先用本地 path 下载。不要用 shell 找图,不要截图验证。",
|
|
569
|
+
"inputSchema": {
|
|
570
|
+
"type": "object",
|
|
571
|
+
"properties": {
|
|
572
|
+
"slide": {
|
|
573
|
+
"type": "integer",
|
|
574
|
+
"description": "0 起页号,缺省 0(封面)"
|
|
575
|
+
},
|
|
576
|
+
"attachment_id": {
|
|
577
|
+
"type": "string",
|
|
578
|
+
"description": "聊天图片附件的 attachmentId(sha256:…)"
|
|
579
|
+
},
|
|
580
|
+
"attachmentId": {
|
|
581
|
+
"type": "string",
|
|
582
|
+
"description": "attachment_id 的兼容别名"
|
|
583
|
+
},
|
|
584
|
+
"path": {
|
|
585
|
+
"type": "string",
|
|
586
|
+
"description": "本机图片路径(兼容旧用法)"
|
|
587
|
+
},
|
|
588
|
+
"src": {
|
|
589
|
+
"type": "string",
|
|
590
|
+
"description": "http(s) 或 data URL"
|
|
591
|
+
},
|
|
592
|
+
"left": {
|
|
593
|
+
"type": "number"
|
|
594
|
+
},
|
|
595
|
+
"top": {
|
|
596
|
+
"type": "number"
|
|
597
|
+
},
|
|
598
|
+
"width": {
|
|
599
|
+
"type": "number"
|
|
600
|
+
},
|
|
601
|
+
"height": {
|
|
602
|
+
"type": "number"
|
|
603
|
+
}
|
|
604
|
+
},
|
|
605
|
+
"additionalProperties": false
|
|
606
|
+
}
|
|
607
|
+
},
|
|
608
|
+
{
|
|
609
|
+
"name": "ppt_images",
|
|
610
|
+
"kind": "read",
|
|
611
|
+
"since": "2.3.0",
|
|
612
|
+
"capability": "imagesearch",
|
|
613
|
+
"description": "图片搜索:返回已预检可下载的候选直链(不下载正文,整轮 12s 内)。选中后直接用 ppt_image { src: url, slide } 插入;返回的候选基本不会 403/超限,若仍失败说明网络波动,换下一个候选即可。",
|
|
614
|
+
"inputSchema": {
|
|
615
|
+
"type": "object",
|
|
616
|
+
"properties": {
|
|
617
|
+
"query": {
|
|
618
|
+
"type": "string",
|
|
619
|
+
"maxLength": 120,
|
|
620
|
+
"description": "中文或英文图片搜索词"
|
|
621
|
+
},
|
|
622
|
+
"count": {
|
|
623
|
+
"type": "integer",
|
|
624
|
+
"minimum": 1,
|
|
625
|
+
"maximum": 12,
|
|
626
|
+
"description": "需要的候选数量,缺省 6"
|
|
627
|
+
},
|
|
628
|
+
"min_width": {
|
|
629
|
+
"type": "integer",
|
|
630
|
+
"description": "最小宽度像素,缺省 480"
|
|
631
|
+
}
|
|
632
|
+
},
|
|
633
|
+
"required": [
|
|
634
|
+
"query"
|
|
635
|
+
],
|
|
636
|
+
"additionalProperties": false
|
|
637
|
+
}
|
|
638
|
+
},
|
|
639
|
+
{
|
|
640
|
+
"name": "ppt_screenshot",
|
|
641
|
+
"kind": "read",
|
|
642
|
+
"since": "1.0.0",
|
|
643
|
+
"capability": "screenshot",
|
|
644
|
+
"description": "取右侧编辑器实时画面(全部页拼图)。确认视觉效果时调用。",
|
|
645
|
+
"inputSchema": {
|
|
646
|
+
"type": "object",
|
|
647
|
+
"properties": {},
|
|
648
|
+
"additionalProperties": false
|
|
649
|
+
}
|
|
650
|
+
},
|
|
651
|
+
{
|
|
652
|
+
"name": "ppt_present",
|
|
653
|
+
"kind": "control",
|
|
654
|
+
"since": "1.0.0",
|
|
655
|
+
"capability": "present",
|
|
656
|
+
"description": "放映控制:start(可指定起始页)/ exit。",
|
|
657
|
+
"inputSchema": {
|
|
658
|
+
"type": "object",
|
|
659
|
+
"properties": {
|
|
660
|
+
"action": {
|
|
661
|
+
"type": "string",
|
|
662
|
+
"enum": [
|
|
663
|
+
"start",
|
|
664
|
+
"exit"
|
|
665
|
+
]
|
|
666
|
+
},
|
|
667
|
+
"slide": {
|
|
668
|
+
"type": "integer",
|
|
669
|
+
"description": "start 的起始页(0 起)"
|
|
670
|
+
}
|
|
671
|
+
},
|
|
672
|
+
"required": [
|
|
673
|
+
"action"
|
|
674
|
+
],
|
|
675
|
+
"additionalProperties": false
|
|
676
|
+
}
|
|
677
|
+
},
|
|
678
|
+
{
|
|
679
|
+
"name": "ppt_history",
|
|
680
|
+
"kind": "control",
|
|
681
|
+
"since": "1.0.0",
|
|
682
|
+
"capability": "history",
|
|
683
|
+
"description": "撤销/重做。",
|
|
684
|
+
"inputSchema": {
|
|
685
|
+
"type": "object",
|
|
686
|
+
"properties": {
|
|
687
|
+
"action": {
|
|
688
|
+
"type": "string",
|
|
689
|
+
"enum": [
|
|
690
|
+
"undo",
|
|
691
|
+
"redo"
|
|
692
|
+
]
|
|
693
|
+
}
|
|
694
|
+
},
|
|
695
|
+
"required": [
|
|
696
|
+
"action"
|
|
697
|
+
],
|
|
698
|
+
"additionalProperties": false
|
|
699
|
+
}
|
|
700
|
+
},
|
|
701
|
+
{
|
|
702
|
+
"name": "ppt_chart",
|
|
703
|
+
"kind": "write",
|
|
704
|
+
"since": "2.2.0",
|
|
705
|
+
"capability": "chart",
|
|
706
|
+
"description": "插入或更新图表(PPTist 原生 echarts 图表)。给定数据即可生成柱/条/折线/面积/饼/环/雷达/散点图,支持多种数据格式(labels+series、表格 rows、键值对 items)。带 element_id 时为更新已有图表。",
|
|
707
|
+
"inputSchema": {
|
|
708
|
+
"type": "object",
|
|
709
|
+
"properties": {
|
|
710
|
+
"slide": {
|
|
711
|
+
"type": "integer",
|
|
712
|
+
"description": "0 起页号,默认 0"
|
|
713
|
+
},
|
|
714
|
+
"chart_type": {
|
|
715
|
+
"type": "string",
|
|
716
|
+
"enum": [
|
|
717
|
+
"bar",
|
|
718
|
+
"column",
|
|
719
|
+
"line",
|
|
720
|
+
"area",
|
|
721
|
+
"pie",
|
|
722
|
+
"ring",
|
|
723
|
+
"radar",
|
|
724
|
+
"scatter"
|
|
725
|
+
],
|
|
726
|
+
"description": "图表类型,新增必填"
|
|
727
|
+
},
|
|
728
|
+
"data": {
|
|
729
|
+
"type": "object",
|
|
730
|
+
"description": "数据,支持多种格式:{labels:[...], series:[[...]]} / {labels:[...], values:[...]} 单系列 / {headers:[...], rows:[[...]]} 表格式(首列类目,其余列系列) / {items:[[name,value]...]} 饼图式"
|
|
731
|
+
},
|
|
732
|
+
"element_id": {
|
|
733
|
+
"type": "string",
|
|
734
|
+
"description": "更新模式:要更新的图表元素 id"
|
|
735
|
+
},
|
|
736
|
+
"options": {
|
|
737
|
+
"type": "object",
|
|
738
|
+
"description": "渲染选项 {lineSmooth?:折线平滑, stack?:堆叠}",
|
|
739
|
+
"properties": {
|
|
740
|
+
"lineSmooth": {
|
|
741
|
+
"type": "boolean"
|
|
742
|
+
},
|
|
743
|
+
"stack": {
|
|
744
|
+
"type": "boolean"
|
|
745
|
+
}
|
|
746
|
+
},
|
|
747
|
+
"additionalProperties": false
|
|
748
|
+
},
|
|
749
|
+
"colors": {
|
|
750
|
+
"type": "array",
|
|
751
|
+
"items": {
|
|
752
|
+
"type": "string"
|
|
753
|
+
},
|
|
754
|
+
"description": "系列配色(缺省用幻灯片主题色)"
|
|
755
|
+
},
|
|
756
|
+
"text_color": {
|
|
757
|
+
"type": "string",
|
|
758
|
+
"description": "图表文字颜色"
|
|
759
|
+
},
|
|
760
|
+
"left": {
|
|
761
|
+
"type": "number"
|
|
762
|
+
},
|
|
763
|
+
"top": {
|
|
764
|
+
"type": "number"
|
|
765
|
+
},
|
|
766
|
+
"width": {
|
|
767
|
+
"type": "number"
|
|
768
|
+
},
|
|
769
|
+
"height": {
|
|
770
|
+
"type": "number"
|
|
771
|
+
}
|
|
772
|
+
},
|
|
773
|
+
"required": [
|
|
774
|
+
"slide"
|
|
775
|
+
],
|
|
776
|
+
"additionalProperties": false
|
|
777
|
+
}
|
|
778
|
+
},
|
|
779
|
+
{
|
|
780
|
+
"name": "ppt_table",
|
|
781
|
+
"kind": "write",
|
|
782
|
+
"since": "2.2.0",
|
|
783
|
+
"capability": "table",
|
|
784
|
+
"description": "插入或整体更新表格(PPTist 原生表格)。rows 为二维数组,字符串/数字直接作单元格;header: true 时首行渲染为加粗底色表头。带 element_id 时整体替换该表格数据。",
|
|
785
|
+
"inputSchema": {
|
|
786
|
+
"type": "object",
|
|
787
|
+
"properties": {
|
|
788
|
+
"slide": {
|
|
789
|
+
"type": "integer",
|
|
790
|
+
"description": "0 起页号,默认 0"
|
|
791
|
+
},
|
|
792
|
+
"rows": {
|
|
793
|
+
"type": "array",
|
|
794
|
+
"description": "二维数组,如 [[\"区域\",\"目标\"],[\"华东\",70],[\"华南\",66]];单元格也可用对象 {text, bold, color, backcolor, align, fontsize}",
|
|
795
|
+
"items": {
|
|
796
|
+
"type": "array"
|
|
797
|
+
}
|
|
798
|
+
},
|
|
799
|
+
"header": {
|
|
800
|
+
"type": "boolean",
|
|
801
|
+
"description": "首行作为表头(加粗 + 主题色浅底)"
|
|
802
|
+
},
|
|
803
|
+
"theme_color": {
|
|
804
|
+
"type": "string",
|
|
805
|
+
"description": "表格主题色(表头底色由此淡化生成),默认 #5b9bd5"
|
|
806
|
+
},
|
|
807
|
+
"element_id": {
|
|
808
|
+
"type": "string",
|
|
809
|
+
"description": "更新模式:整体替换该表格的数据/列宽"
|
|
810
|
+
},
|
|
811
|
+
"col_widths": {
|
|
812
|
+
"type": "array",
|
|
813
|
+
"items": {
|
|
814
|
+
"type": "number"
|
|
815
|
+
},
|
|
816
|
+
"description": "列宽比例或像素(自动归一)"
|
|
817
|
+
},
|
|
818
|
+
"cell_min_height": {
|
|
819
|
+
"type": "number",
|
|
820
|
+
"description": "单元格最小高度,默认 36"
|
|
821
|
+
},
|
|
822
|
+
"left": {
|
|
823
|
+
"type": "number"
|
|
824
|
+
},
|
|
825
|
+
"top": {
|
|
826
|
+
"type": "number"
|
|
827
|
+
},
|
|
828
|
+
"width": {
|
|
829
|
+
"type": "number"
|
|
830
|
+
},
|
|
831
|
+
"height": {
|
|
832
|
+
"type": "number"
|
|
833
|
+
}
|
|
834
|
+
},
|
|
835
|
+
"required": [
|
|
836
|
+
"slide",
|
|
837
|
+
"rows"
|
|
838
|
+
],
|
|
839
|
+
"additionalProperties": false
|
|
840
|
+
}
|
|
841
|
+
},
|
|
842
|
+
{
|
|
843
|
+
"name": "ppt_table_cells",
|
|
844
|
+
"kind": "write",
|
|
845
|
+
"since": "2.2.0",
|
|
846
|
+
"capability": "table",
|
|
847
|
+
"description": "精修已有表格的单元格:改文字 / 加粗 / 颜色 / 底色 / 对齐 / 字号,也可换表格主题色。行号列号从 0 起,元素 id 可用 ppt_get_deck 查询。",
|
|
848
|
+
"inputSchema": {
|
|
849
|
+
"type": "object",
|
|
850
|
+
"properties": {
|
|
851
|
+
"slide": {
|
|
852
|
+
"type": "integer",
|
|
853
|
+
"description": "0 起页号,默认 0"
|
|
854
|
+
},
|
|
855
|
+
"element_id": {
|
|
856
|
+
"type": "string",
|
|
857
|
+
"description": "表格元素 id"
|
|
858
|
+
},
|
|
859
|
+
"cells": {
|
|
860
|
+
"type": "array",
|
|
861
|
+
"description": "单元格补丁列表",
|
|
862
|
+
"items": {
|
|
863
|
+
"type": "object",
|
|
864
|
+
"properties": {
|
|
865
|
+
"row": {
|
|
866
|
+
"type": "integer",
|
|
867
|
+
"description": "0 起行号"
|
|
868
|
+
},
|
|
869
|
+
"col": {
|
|
870
|
+
"type": "integer",
|
|
871
|
+
"description": "0 起列号"
|
|
872
|
+
},
|
|
873
|
+
"text": {
|
|
874
|
+
"type": "string"
|
|
875
|
+
},
|
|
876
|
+
"bold": {
|
|
877
|
+
"type": "boolean"
|
|
878
|
+
},
|
|
879
|
+
"color": {
|
|
880
|
+
"type": "string",
|
|
881
|
+
"description": "文字颜色"
|
|
882
|
+
},
|
|
883
|
+
"backcolor": {
|
|
884
|
+
"type": "string",
|
|
885
|
+
"description": "单元格底色"
|
|
886
|
+
},
|
|
887
|
+
"align": {
|
|
888
|
+
"type": "string",
|
|
889
|
+
"enum": [
|
|
890
|
+
"left",
|
|
891
|
+
"center",
|
|
892
|
+
"right"
|
|
893
|
+
]
|
|
894
|
+
},
|
|
895
|
+
"fontsize": {
|
|
896
|
+
"type": "number"
|
|
897
|
+
}
|
|
898
|
+
},
|
|
899
|
+
"required": [
|
|
900
|
+
"row",
|
|
901
|
+
"col"
|
|
902
|
+
],
|
|
903
|
+
"additionalProperties": false
|
|
904
|
+
}
|
|
905
|
+
},
|
|
906
|
+
"theme_color": {
|
|
907
|
+
"type": "string",
|
|
908
|
+
"description": "顺带更换表格主题色"
|
|
909
|
+
}
|
|
910
|
+
},
|
|
911
|
+
"required": [
|
|
912
|
+
"slide",
|
|
913
|
+
"element_id",
|
|
914
|
+
"cells"
|
|
915
|
+
],
|
|
916
|
+
"additionalProperties": false
|
|
917
|
+
}
|
|
918
|
+
},
|
|
919
|
+
{
|
|
920
|
+
"name": "ppt_notes",
|
|
921
|
+
"kind": "write",
|
|
922
|
+
"since": "2.2.0",
|
|
923
|
+
"capability": "notes",
|
|
924
|
+
"description": "设置指定页的演讲者备注(显示在编辑器备注面板,导出 PPTX 一并保留)。传空字符串清空。",
|
|
925
|
+
"inputSchema": {
|
|
926
|
+
"type": "object",
|
|
927
|
+
"properties": {
|
|
928
|
+
"slide": {
|
|
929
|
+
"type": "integer",
|
|
930
|
+
"description": "0 起页号"
|
|
931
|
+
},
|
|
932
|
+
"notes": {
|
|
933
|
+
"type": "string",
|
|
934
|
+
"maxLength": 2000,
|
|
935
|
+
"description": "备注内容;空字符串清空"
|
|
936
|
+
}
|
|
937
|
+
},
|
|
938
|
+
"required": [
|
|
939
|
+
"slide",
|
|
940
|
+
"notes"
|
|
941
|
+
],
|
|
942
|
+
"additionalProperties": false
|
|
943
|
+
}
|
|
944
|
+
},
|
|
945
|
+
{
|
|
946
|
+
"name": "ppt_shape",
|
|
947
|
+
"kind": "write",
|
|
948
|
+
"since": "2.2.0",
|
|
949
|
+
"capability": "shape",
|
|
950
|
+
"description": "插入形状。shape 从内置库选(rect / round-rect / circle / triangle / triangle-down / diamond / pentagon / hexagon / star-5 / arrow-right / arrow-left / arrow-up / arrow-down / double-arrow / bubble / heart / cloud / bolt / cross / pie-quarter / cylinder / round-frame),也可传自定义 SVG path + viewBox。装饰、流程节点、强调块都走这里。",
|
|
951
|
+
"inputSchema": {
|
|
952
|
+
"type": "object",
|
|
953
|
+
"properties": {
|
|
954
|
+
"slide": {
|
|
955
|
+
"type": "integer",
|
|
956
|
+
"description": "0 起页号,默认 0"
|
|
957
|
+
},
|
|
958
|
+
"shape": {
|
|
959
|
+
"type": "string",
|
|
960
|
+
"description": "内置形状 key,如 circle / arrow-right / star-5 / round-rect"
|
|
961
|
+
},
|
|
962
|
+
"path": {
|
|
963
|
+
"type": "string",
|
|
964
|
+
"description": "自定义 SVG path(与 shape 二选一,优先生效)"
|
|
965
|
+
},
|
|
966
|
+
"viewBox": {
|
|
967
|
+
"type": "array",
|
|
968
|
+
"items": {
|
|
969
|
+
"type": "number"
|
|
970
|
+
},
|
|
971
|
+
"description": "自定义 path 的 viewBox [w, h],默认 [200, 200]"
|
|
972
|
+
},
|
|
973
|
+
"fill": {
|
|
974
|
+
"type": "string",
|
|
975
|
+
"description": "填充色,默认 #5b9bd5"
|
|
976
|
+
},
|
|
977
|
+
"left": {
|
|
978
|
+
"type": "number"
|
|
979
|
+
},
|
|
980
|
+
"top": {
|
|
981
|
+
"type": "number"
|
|
982
|
+
},
|
|
983
|
+
"width": {
|
|
984
|
+
"type": "number",
|
|
985
|
+
"description": "默认 200"
|
|
986
|
+
},
|
|
987
|
+
"height": {
|
|
988
|
+
"type": "number",
|
|
989
|
+
"description": "默认 200"
|
|
990
|
+
},
|
|
991
|
+
"rotate": {
|
|
992
|
+
"type": "number"
|
|
993
|
+
}
|
|
994
|
+
},
|
|
995
|
+
"required": [
|
|
996
|
+
"slide"
|
|
997
|
+
],
|
|
998
|
+
"additionalProperties": false
|
|
999
|
+
}
|
|
1000
|
+
},
|
|
1001
|
+
{
|
|
1002
|
+
"name": "ppt_line",
|
|
1003
|
+
"kind": "write",
|
|
1004
|
+
"since": "2.2.0",
|
|
1005
|
+
"capability": "line",
|
|
1006
|
+
"description": "画一条线(直线 / 虚线 / 折线)。给起点终点画布坐标即可,包围盒自动计算;端点箭头可选 arrow / triangle / dot / square;broken 给拐点画布坐标可画折线。",
|
|
1007
|
+
"inputSchema": {
|
|
1008
|
+
"type": "object",
|
|
1009
|
+
"properties": {
|
|
1010
|
+
"slide": {
|
|
1011
|
+
"type": "integer",
|
|
1012
|
+
"description": "0 起页号,默认 0"
|
|
1013
|
+
},
|
|
1014
|
+
"x1": {
|
|
1015
|
+
"type": "number",
|
|
1016
|
+
"description": "起点 x(画布坐标)"
|
|
1017
|
+
},
|
|
1018
|
+
"y1": {
|
|
1019
|
+
"type": "number",
|
|
1020
|
+
"description": "起点 y"
|
|
1021
|
+
},
|
|
1022
|
+
"x2": {
|
|
1023
|
+
"type": "number",
|
|
1024
|
+
"description": "终点 x"
|
|
1025
|
+
},
|
|
1026
|
+
"y2": {
|
|
1027
|
+
"type": "number",
|
|
1028
|
+
"description": "终点 y"
|
|
1029
|
+
},
|
|
1030
|
+
"color": {
|
|
1031
|
+
"type": "string",
|
|
1032
|
+
"description": "线色,默认 #5b9bd5"
|
|
1033
|
+
},
|
|
1034
|
+
"style": {
|
|
1035
|
+
"type": "string",
|
|
1036
|
+
"enum": [
|
|
1037
|
+
"solid",
|
|
1038
|
+
"dashed"
|
|
1039
|
+
],
|
|
1040
|
+
"description": "默认 solid"
|
|
1041
|
+
},
|
|
1042
|
+
"width": {
|
|
1043
|
+
"type": "number",
|
|
1044
|
+
"description": "线宽,默认 2"
|
|
1045
|
+
},
|
|
1046
|
+
"start_point": {
|
|
1047
|
+
"type": "string",
|
|
1048
|
+
"enum": [
|
|
1049
|
+
"none",
|
|
1050
|
+
"arrow",
|
|
1051
|
+
"triangle",
|
|
1052
|
+
"dot",
|
|
1053
|
+
"square"
|
|
1054
|
+
],
|
|
1055
|
+
"description": "起点箭头,默认 none"
|
|
1056
|
+
},
|
|
1057
|
+
"end_point": {
|
|
1058
|
+
"type": "string",
|
|
1059
|
+
"enum": [
|
|
1060
|
+
"none",
|
|
1061
|
+
"arrow",
|
|
1062
|
+
"triangle",
|
|
1063
|
+
"dot",
|
|
1064
|
+
"square"
|
|
1065
|
+
],
|
|
1066
|
+
"description": "终点箭头,默认 none"
|
|
1067
|
+
},
|
|
1068
|
+
"broken": {
|
|
1069
|
+
"type": "array",
|
|
1070
|
+
"items": {
|
|
1071
|
+
"type": "number"
|
|
1072
|
+
},
|
|
1073
|
+
"description": "折线拐点 [x, y](画布坐标,产生 ┳ 型连接)"
|
|
1074
|
+
}
|
|
1075
|
+
},
|
|
1076
|
+
"required": [
|
|
1077
|
+
"slide",
|
|
1078
|
+
"x1",
|
|
1079
|
+
"y1",
|
|
1080
|
+
"x2",
|
|
1081
|
+
"y2"
|
|
1082
|
+
],
|
|
1083
|
+
"additionalProperties": false
|
|
1084
|
+
}
|
|
1085
|
+
},
|
|
1086
|
+
{
|
|
1087
|
+
"name": "ppt_formula",
|
|
1088
|
+
"kind": "write",
|
|
1089
|
+
"since": "2.2.0",
|
|
1090
|
+
"capability": "formula",
|
|
1091
|
+
"description": "插入或更新数学公式(TeX 语法,PPTist 原生 latex 元素,手写风描边渲染)。支持分式 \\frac{}{}、上下标 ^ _、根号 \\sqrt、求和积分 \\sum \\int、希腊字母、矩阵等;渲染由内置 hfmath 引擎完成。带 element_id 时为更新(重新渲染并替换)。",
|
|
1092
|
+
"inputSchema": {
|
|
1093
|
+
"type": "object",
|
|
1094
|
+
"properties": {
|
|
1095
|
+
"slide": {
|
|
1096
|
+
"type": "integer",
|
|
1097
|
+
"description": "0 起页号,默认 0"
|
|
1098
|
+
},
|
|
1099
|
+
"latex": {
|
|
1100
|
+
"type": "string",
|
|
1101
|
+
"description": "TeX 公式,如 E=mc^2 / \\frac{a}{b} / \\int_0^1 x^2 dx"
|
|
1102
|
+
},
|
|
1103
|
+
"element_id": {
|
|
1104
|
+
"type": "string",
|
|
1105
|
+
"description": "更新模式:要更新的公式元素 id"
|
|
1106
|
+
},
|
|
1107
|
+
"color": {
|
|
1108
|
+
"type": "string",
|
|
1109
|
+
"description": "笔画颜色,默认 #333333"
|
|
1110
|
+
},
|
|
1111
|
+
"stroke_width": {
|
|
1112
|
+
"type": "number",
|
|
1113
|
+
"description": "笔画宽度,默认 2"
|
|
1114
|
+
},
|
|
1115
|
+
"left": {
|
|
1116
|
+
"type": "number"
|
|
1117
|
+
},
|
|
1118
|
+
"top": {
|
|
1119
|
+
"type": "number"
|
|
1120
|
+
},
|
|
1121
|
+
"width": {
|
|
1122
|
+
"type": "number",
|
|
1123
|
+
"description": "默认按渲染原始尺寸"
|
|
1124
|
+
},
|
|
1125
|
+
"height": {
|
|
1126
|
+
"type": "number",
|
|
1127
|
+
"description": "默认按渲染原始尺寸(fixedRatio 锁比例)"
|
|
1128
|
+
}
|
|
1129
|
+
},
|
|
1130
|
+
"required": [
|
|
1131
|
+
"slide",
|
|
1132
|
+
"latex"
|
|
1133
|
+
],
|
|
1134
|
+
"additionalProperties": false
|
|
1135
|
+
}
|
|
1136
|
+
},
|
|
1137
|
+
{
|
|
1138
|
+
"name": "ppt_import_pptx",
|
|
1139
|
+
"kind": "write",
|
|
1140
|
+
"since": "2.4.0",
|
|
1141
|
+
"capability": "import",
|
|
1142
|
+
"description": "打开本机 .pptx:上传给右侧 PPTist 编辑器,用其原生导入器转换成可编辑 deck。导入后返回标题/页数/每页元素摘要;动画、母版、SmartArt、复杂图表等可能丢失。",
|
|
1143
|
+
"inputSchema": {
|
|
1144
|
+
"type": "object",
|
|
1145
|
+
"properties": {
|
|
1146
|
+
"path": {
|
|
1147
|
+
"type": "string",
|
|
1148
|
+
"description": "本机 .pptx 文件路径(绝对路径,或相对 MCP 进程 cwd)"
|
|
1149
|
+
},
|
|
1150
|
+
"data": {
|
|
1151
|
+
"type": "string",
|
|
1152
|
+
"description": "可选:PPTX 的 base64 内容(无法访问 path 时使用)"
|
|
1153
|
+
},
|
|
1154
|
+
"name": {
|
|
1155
|
+
"type": "string",
|
|
1156
|
+
"maxLength": 200,
|
|
1157
|
+
"description": "显示文件名;缺省取 path 的 basename"
|
|
1158
|
+
},
|
|
1159
|
+
"mode": {
|
|
1160
|
+
"type": "string",
|
|
1161
|
+
"enum": [
|
|
1162
|
+
"replace",
|
|
1163
|
+
"append"
|
|
1164
|
+
],
|
|
1165
|
+
"description": "replace(默认)用导入内容替换当前 deck;append 追加到现有页之后"
|
|
1166
|
+
},
|
|
1167
|
+
"wait_ms": {
|
|
1168
|
+
"type": "integer",
|
|
1169
|
+
"minimum": 1000,
|
|
1170
|
+
"maximum": 300000,
|
|
1171
|
+
"description": "等待编辑器完成导入的毫秒数(默认 180000)"
|
|
1172
|
+
}
|
|
1173
|
+
},
|
|
1174
|
+
"additionalProperties": false
|
|
1175
|
+
}
|
|
1176
|
+
},
|
|
1177
|
+
{
|
|
1178
|
+
"name": "ppt_export_pptx",
|
|
1179
|
+
"kind": "write",
|
|
1180
|
+
"since": "2.4.0",
|
|
1181
|
+
"capability": "export",
|
|
1182
|
+
"description": "把当前 deck 导出为本机 .pptx 文件(pptxgenjs)。支持文字/形状/图片/线条/表格/图表/背景/备注;自定义 SVG 路径用矩形近似,LaTeX/音视频跳过。返回文件绝对路径与降级项。",
|
|
1183
|
+
"inputSchema": {
|
|
1184
|
+
"type": "object",
|
|
1185
|
+
"properties": {
|
|
1186
|
+
"path": {
|
|
1187
|
+
"type": "string",
|
|
1188
|
+
"description": "输出 .pptx 路径,或已存在的目录;缺省写到系统临时目录 ppt-exports/"
|
|
1189
|
+
},
|
|
1190
|
+
"file_name": {
|
|
1191
|
+
"type": "string",
|
|
1192
|
+
"maxLength": 160,
|
|
1193
|
+
"description": "文件名(可省略 .pptx);path 为目录/缺省时使用"
|
|
1194
|
+
},
|
|
1195
|
+
"slide_indices": {
|
|
1196
|
+
"type": "array",
|
|
1197
|
+
"items": {
|
|
1198
|
+
"type": "integer",
|
|
1199
|
+
"minimum": 0
|
|
1200
|
+
},
|
|
1201
|
+
"maxItems": 200,
|
|
1202
|
+
"description": "只导出指定页(0 基);缺省导出全部"
|
|
1203
|
+
},
|
|
1204
|
+
"include_notes": {
|
|
1205
|
+
"type": "boolean",
|
|
1206
|
+
"description": "是否写入演讲者备注(默认 true)"
|
|
1207
|
+
},
|
|
1208
|
+
"overwrite": {
|
|
1209
|
+
"type": "boolean",
|
|
1210
|
+
"description": "目标已存在时是否覆盖;保存回原文件必须显式 true"
|
|
1211
|
+
},
|
|
1212
|
+
"backup": {
|
|
1213
|
+
"type": "boolean",
|
|
1214
|
+
"description": "覆盖前是否备份为 <name>.bak-<时间>.pptx(默认 true)"
|
|
1215
|
+
}
|
|
1216
|
+
},
|
|
1217
|
+
"additionalProperties": false
|
|
1218
|
+
}
|
|
1219
|
+
}
|
|
1220
|
+
],
|
|
1221
|
+
"features": [
|
|
1222
|
+
"deck.contract",
|
|
1223
|
+
"deck.read",
|
|
1224
|
+
"deck.audit",
|
|
1225
|
+
"deck.task",
|
|
1226
|
+
"deck.write",
|
|
1227
|
+
"deck.compose",
|
|
1228
|
+
"deck.recolor",
|
|
1229
|
+
"deck.image",
|
|
1230
|
+
"media.search",
|
|
1231
|
+
"deck.screenshot",
|
|
1232
|
+
"deck.present",
|
|
1233
|
+
"deck.undo",
|
|
1234
|
+
"deck.chart",
|
|
1235
|
+
"deck.table",
|
|
1236
|
+
"deck.notes",
|
|
1237
|
+
"deck.shape",
|
|
1238
|
+
"deck.line",
|
|
1239
|
+
"deck.formula",
|
|
1240
|
+
"deck.import",
|
|
1241
|
+
"deck.export"
|
|
1242
|
+
],
|
|
1243
|
+
"capabilities": [
|
|
1244
|
+
{
|
|
1245
|
+
"id": "contract",
|
|
1246
|
+
"title": "契约探测",
|
|
1247
|
+
"description": "",
|
|
1248
|
+
"tags": [
|
|
1249
|
+
"meta"
|
|
1250
|
+
],
|
|
1251
|
+
"tools": [
|
|
1252
|
+
"ppt_capabilities"
|
|
1253
|
+
]
|
|
1254
|
+
},
|
|
1255
|
+
{
|
|
1256
|
+
"id": "deck",
|
|
1257
|
+
"title": "读取演示文稿",
|
|
1258
|
+
"description": "",
|
|
1259
|
+
"tags": [
|
|
1260
|
+
"read"
|
|
1261
|
+
],
|
|
1262
|
+
"tools": [
|
|
1263
|
+
"ppt_get_deck"
|
|
1264
|
+
]
|
|
1265
|
+
},
|
|
1266
|
+
{
|
|
1267
|
+
"id": "audit",
|
|
1268
|
+
"title": "确定性审计",
|
|
1269
|
+
"description": "",
|
|
1270
|
+
"tags": [
|
|
1271
|
+
"read",
|
|
1272
|
+
"quality"
|
|
1273
|
+
],
|
|
1274
|
+
"tools": [
|
|
1275
|
+
"ppt_audit"
|
|
1276
|
+
]
|
|
1277
|
+
},
|
|
1278
|
+
{
|
|
1279
|
+
"id": "task",
|
|
1280
|
+
"title": "任务恢复",
|
|
1281
|
+
"description": "",
|
|
1282
|
+
"tags": [
|
|
1283
|
+
"state"
|
|
1284
|
+
],
|
|
1285
|
+
"tools": [
|
|
1286
|
+
"ppt_task"
|
|
1287
|
+
]
|
|
1288
|
+
},
|
|
1289
|
+
{
|
|
1290
|
+
"id": "text",
|
|
1291
|
+
"title": "文字与槽位",
|
|
1292
|
+
"description": "",
|
|
1293
|
+
"tags": [
|
|
1294
|
+
"write",
|
|
1295
|
+
"content"
|
|
1296
|
+
],
|
|
1297
|
+
"tools": [
|
|
1298
|
+
"ppt_text",
|
|
1299
|
+
"ppt_fill"
|
|
1300
|
+
]
|
|
1301
|
+
},
|
|
1302
|
+
{
|
|
1303
|
+
"id": "style",
|
|
1304
|
+
"title": "主题与背景",
|
|
1305
|
+
"description": "",
|
|
1306
|
+
"tags": [
|
|
1307
|
+
"write",
|
|
1308
|
+
"style"
|
|
1309
|
+
],
|
|
1310
|
+
"tools": [
|
|
1311
|
+
"ppt_style"
|
|
1312
|
+
]
|
|
1313
|
+
},
|
|
1314
|
+
{
|
|
1315
|
+
"id": "element",
|
|
1316
|
+
"title": "元素编辑",
|
|
1317
|
+
"description": "",
|
|
1318
|
+
"tags": [
|
|
1319
|
+
"write",
|
|
1320
|
+
"layout"
|
|
1321
|
+
],
|
|
1322
|
+
"tools": [
|
|
1323
|
+
"ppt_element"
|
|
1324
|
+
]
|
|
1325
|
+
},
|
|
1326
|
+
{
|
|
1327
|
+
"id": "slide",
|
|
1328
|
+
"title": "页面管理",
|
|
1329
|
+
"description": "",
|
|
1330
|
+
"tags": [
|
|
1331
|
+
"write",
|
|
1332
|
+
"structure"
|
|
1333
|
+
],
|
|
1334
|
+
"tools": [
|
|
1335
|
+
"ppt_slide"
|
|
1336
|
+
]
|
|
1337
|
+
},
|
|
1338
|
+
{
|
|
1339
|
+
"id": "apply",
|
|
1340
|
+
"title": "底层指令",
|
|
1341
|
+
"description": "",
|
|
1342
|
+
"tags": [
|
|
1343
|
+
"advanced"
|
|
1344
|
+
],
|
|
1345
|
+
"tools": [
|
|
1346
|
+
"ppt_apply"
|
|
1347
|
+
]
|
|
1348
|
+
},
|
|
1349
|
+
{
|
|
1350
|
+
"id": "compose",
|
|
1351
|
+
"title": "成稿编排",
|
|
1352
|
+
"description": "",
|
|
1353
|
+
"tags": [
|
|
1354
|
+
"recipe",
|
|
1355
|
+
"layout"
|
|
1356
|
+
],
|
|
1357
|
+
"tools": [
|
|
1358
|
+
"ppt_deck",
|
|
1359
|
+
"ppt_page"
|
|
1360
|
+
]
|
|
1361
|
+
},
|
|
1362
|
+
{
|
|
1363
|
+
"id": "recolor",
|
|
1364
|
+
"title": "整体换色",
|
|
1365
|
+
"description": "",
|
|
1366
|
+
"tags": [
|
|
1367
|
+
"recipe",
|
|
1368
|
+
"style"
|
|
1369
|
+
],
|
|
1370
|
+
"tools": [
|
|
1371
|
+
"ppt_recolor"
|
|
1372
|
+
]
|
|
1373
|
+
},
|
|
1374
|
+
{
|
|
1375
|
+
"id": "image",
|
|
1376
|
+
"title": "图片",
|
|
1377
|
+
"description": "",
|
|
1378
|
+
"tags": [
|
|
1379
|
+
"write",
|
|
1380
|
+
"media"
|
|
1381
|
+
],
|
|
1382
|
+
"tools": [
|
|
1383
|
+
"ppt_image"
|
|
1384
|
+
]
|
|
1385
|
+
},
|
|
1386
|
+
{
|
|
1387
|
+
"id": "imagesearch",
|
|
1388
|
+
"title": "图片检索",
|
|
1389
|
+
"description": "",
|
|
1390
|
+
"tags": [
|
|
1391
|
+
"read"
|
|
1392
|
+
],
|
|
1393
|
+
"tools": [
|
|
1394
|
+
"ppt_images"
|
|
1395
|
+
]
|
|
1396
|
+
},
|
|
1397
|
+
{
|
|
1398
|
+
"id": "screenshot",
|
|
1399
|
+
"title": "实时画面",
|
|
1400
|
+
"description": "",
|
|
1401
|
+
"tags": [
|
|
1402
|
+
"read",
|
|
1403
|
+
"visual"
|
|
1404
|
+
],
|
|
1405
|
+
"tools": [
|
|
1406
|
+
"ppt_screenshot"
|
|
1407
|
+
]
|
|
1408
|
+
},
|
|
1409
|
+
{
|
|
1410
|
+
"id": "present",
|
|
1411
|
+
"title": "放映",
|
|
1412
|
+
"description": "",
|
|
1413
|
+
"tags": [
|
|
1414
|
+
"control"
|
|
1415
|
+
],
|
|
1416
|
+
"tools": [
|
|
1417
|
+
"ppt_present"
|
|
1418
|
+
]
|
|
1419
|
+
},
|
|
1420
|
+
{
|
|
1421
|
+
"id": "history",
|
|
1422
|
+
"title": "撤销重做",
|
|
1423
|
+
"description": "",
|
|
1424
|
+
"tags": [
|
|
1425
|
+
"control"
|
|
1426
|
+
],
|
|
1427
|
+
"tools": [
|
|
1428
|
+
"ppt_history"
|
|
1429
|
+
]
|
|
1430
|
+
},
|
|
1431
|
+
{
|
|
1432
|
+
"id": "chart",
|
|
1433
|
+
"title": "图表",
|
|
1434
|
+
"description": "",
|
|
1435
|
+
"tags": [
|
|
1436
|
+
"write",
|
|
1437
|
+
"data"
|
|
1438
|
+
],
|
|
1439
|
+
"tools": [
|
|
1440
|
+
"ppt_chart"
|
|
1441
|
+
]
|
|
1442
|
+
},
|
|
1443
|
+
{
|
|
1444
|
+
"id": "table",
|
|
1445
|
+
"title": "表格",
|
|
1446
|
+
"description": "",
|
|
1447
|
+
"tags": [
|
|
1448
|
+
"write",
|
|
1449
|
+
"data"
|
|
1450
|
+
],
|
|
1451
|
+
"tools": [
|
|
1452
|
+
"ppt_table",
|
|
1453
|
+
"ppt_table_cells"
|
|
1454
|
+
]
|
|
1455
|
+
},
|
|
1456
|
+
{
|
|
1457
|
+
"id": "notes",
|
|
1458
|
+
"title": "演讲备注",
|
|
1459
|
+
"description": "",
|
|
1460
|
+
"tags": [
|
|
1461
|
+
"write",
|
|
1462
|
+
"content"
|
|
1463
|
+
],
|
|
1464
|
+
"tools": [
|
|
1465
|
+
"ppt_notes"
|
|
1466
|
+
]
|
|
1467
|
+
},
|
|
1468
|
+
{
|
|
1469
|
+
"id": "shape",
|
|
1470
|
+
"title": "形状库",
|
|
1471
|
+
"description": "",
|
|
1472
|
+
"tags": [
|
|
1473
|
+
"write",
|
|
1474
|
+
"layout"
|
|
1475
|
+
],
|
|
1476
|
+
"tools": [
|
|
1477
|
+
"ppt_shape"
|
|
1478
|
+
]
|
|
1479
|
+
},
|
|
1480
|
+
{
|
|
1481
|
+
"id": "line",
|
|
1482
|
+
"title": "线条",
|
|
1483
|
+
"description": "",
|
|
1484
|
+
"tags": [
|
|
1485
|
+
"write",
|
|
1486
|
+
"layout"
|
|
1487
|
+
],
|
|
1488
|
+
"tools": [
|
|
1489
|
+
"ppt_line"
|
|
1490
|
+
]
|
|
1491
|
+
},
|
|
1492
|
+
{
|
|
1493
|
+
"id": "formula",
|
|
1494
|
+
"title": "数学公式",
|
|
1495
|
+
"description": "",
|
|
1496
|
+
"tags": [
|
|
1497
|
+
"write",
|
|
1498
|
+
"content"
|
|
1499
|
+
],
|
|
1500
|
+
"tools": [
|
|
1501
|
+
"ppt_formula"
|
|
1502
|
+
]
|
|
1503
|
+
},
|
|
1504
|
+
{
|
|
1505
|
+
"id": "import",
|
|
1506
|
+
"title": "导入 PPTX",
|
|
1507
|
+
"description": "",
|
|
1508
|
+
"tags": [
|
|
1509
|
+
"write",
|
|
1510
|
+
"file"
|
|
1511
|
+
],
|
|
1512
|
+
"tools": [
|
|
1513
|
+
"ppt_import_pptx"
|
|
1514
|
+
]
|
|
1515
|
+
},
|
|
1516
|
+
{
|
|
1517
|
+
"id": "export",
|
|
1518
|
+
"title": "导出 PPTX",
|
|
1519
|
+
"description": "",
|
|
1520
|
+
"tags": [
|
|
1521
|
+
"write",
|
|
1522
|
+
"file"
|
|
1523
|
+
],
|
|
1524
|
+
"tools": [
|
|
1525
|
+
"ppt_export_pptx"
|
|
1526
|
+
]
|
|
1527
|
+
}
|
|
1528
|
+
]
|
|
1529
|
+
}
|