dsh-ppt 0.34.0 → 0.36.0

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.
Files changed (40) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/README.en.md +14 -17
  3. package/README.md +14 -17
  4. package/docs/USAGE.en.md +44 -35
  5. package/docs/USAGE.md +45 -36
  6. package/docs/VALIDATION.md +4 -0
  7. package/docs/assets/intro/screen-en.webp +0 -0
  8. package/docs/assets/intro/screen-zh.webp +0 -0
  9. package/docs/assets/intro/workflow-en-dark.svg +1 -1
  10. package/docs/assets/intro/workflow-en-light.svg +1 -1
  11. package/docs/assets/intro/workflow-en-mobile-dark.svg +1 -1
  12. package/docs/assets/intro/workflow-en-mobile-light.svg +1 -1
  13. package/docs/assets/intro/workflow-zh-dark.svg +1 -1
  14. package/docs/assets/intro/workflow-zh-light.svg +1 -1
  15. package/docs/assets/intro/workflow-zh-mobile-dark.svg +1 -1
  16. package/docs/assets/intro/workflow-zh-mobile-light.svg +1 -1
  17. package/lib/client.js +333 -45
  18. package/lib/execution.js +20 -2
  19. package/lib/tools.js +64 -2
  20. package/lib/types.d.ts +58 -1
  21. package/lib/workbench.js +18 -2
  22. package/package.json +2 -2
  23. package/skills/dsh-ppt/SKILL.md +34 -32
  24. package/skills/dsh-ppt/package.json +1 -1
  25. package/skills/dsh-ppt/references/office-pack.md +124 -0
  26. package/skills/dsh-ppt/references/research-plan.md +93 -62
  27. package/skills/dsh-ppt/scripts/build-deck.mjs +60 -2
  28. package/skills/dsh-ppt/scripts/deck-absorb.mjs +2 -0
  29. package/skills/dsh-ppt/scripts/deck-advanced.mjs +198 -29
  30. package/skills/dsh-ppt/scripts/deck-brand-kit.mjs +13 -0
  31. package/skills/dsh-ppt/scripts/deck-charts-exec.mjs +805 -0
  32. package/skills/dsh-ppt/scripts/deck-chrome.mjs +10 -1
  33. package/skills/dsh-ppt/scripts/deck-compose.mjs +386 -0
  34. package/skills/dsh-ppt/scripts/deck-core.mjs +128 -14
  35. package/skills/dsh-ppt/scripts/deck-delivery.mjs +141 -3
  36. package/skills/dsh-ppt/scripts/deck-evidence.mjs +811 -118
  37. package/skills/dsh-ppt/scripts/deck-export.mjs +652 -0
  38. package/skills/dsh-ppt/scripts/deck-i18n.mjs +170 -0
  39. package/skills/dsh-ppt/scripts/deck-layouts.mjs +72 -8
  40. package/skills/dsh-ppt/scripts/deck-office.mjs +833 -38
package/lib/execution.js CHANGED
@@ -71,8 +71,9 @@ export function createPptExecutors(config, loadEngine = getEngine) {
71
71
  throw new Error('dsh-ppt:title 不能为空');
72
72
  const hasContent = typeof args.content === 'string' && args.content.trim() !== '';
73
73
  const hasSlides = Array.isArray(args.slides) && args.slides.length > 0;
74
- if (!hasContent && !hasSlides && !args.template)
75
- throw new Error('dsh-ppt:content 不能为空(或用 slides / template 传结构化幻灯片)');
74
+ const hasMerge = Array.isArray(args.mergeSources) && args.mergeSources.length > 0;
75
+ if (!hasContent && !hasSlides && !args.template && !hasMerge)
76
+ throw new Error('dsh-ppt:content 不能为空(或用 slides / template / mergeSources 传结构化幻灯片)');
76
77
  const engine = await loadEngine();
77
78
  // Check cancellation after loading and before artifact commit inside the async engine.
78
79
  exec?.signal?.throwIfAborted();
@@ -82,6 +83,7 @@ export function createPptExecutors(config, loadEngine = getEngine) {
82
83
  title: args.title.trim(),
83
84
  content: typeof args.content === 'string' ? args.content : '',
84
85
  slides: hasSlides ? args.slides : undefined,
86
+ ...(hasMerge ? { mergeSources: args.mergeSources } : {}),
85
87
  theme: typeof args.theme === 'string' && args.theme.trim() !== '' ? args.theme.trim() : ((args.taste || args.exemplar) ? undefined : (config.defaultTheme || (typeof engine.absorbPptx === 'function' ? 'auto' : undefined))),
86
88
  ...(args.taste ? { taste: args.taste } : {}),
87
89
  ...(typeof args.exemplar === 'string' && args.exemplar.trim() !== '' ? { exemplar: args.exemplar.trim() } : {}),
@@ -93,6 +95,8 @@ export function createPptExecutors(config, loadEngine = getEngine) {
93
95
  smartLayout: typeof args.smartLayout === 'boolean' ? args.smartLayout : undefined,
94
96
  lang: typeof args.lang === 'string' && args.lang.trim() !== '' ? args.lang.trim() : (config.defaultLang || undefined),
95
97
  motion: args.motion,
98
+ ...(typeof args.motionProfile === 'string' && args.motionProfile.trim() ? { motionProfile: args.motionProfile.trim() } : {}),
99
+ ...(Array.isArray(args.exports) && args.exports.length > 0 ? { exports: args.exports } : {}),
96
100
  outputDir: resolve(cwd, outputDir || '.'),
97
101
  fileName: typeof args.fileName === 'string' && args.fileName.trim() !== '' ? args.fileName.trim() : undefined,
98
102
  overwrite: args.overwrite === true,
@@ -150,6 +154,8 @@ export function createPptExecutors(config, loadEngine = getEngine) {
150
154
  ...(typeof args.brandKitName === 'string' && args.brandKitName.trim() ? { brandKitName: args.brandKitName.trim() } : {}),
151
155
  ...(typeof args.watermark === 'string' && args.watermark.trim() ? { watermark: args.watermark.trim() } : {}),
152
156
  ...(Array.isArray(args.forbiddenTerms) ? { forbiddenTerms: args.forbiddenTerms } : {}),
157
+ ...(Array.isArray(args.preferredSources) ? { preferredSources: args.preferredSources } : {}),
158
+ ...(Array.isArray(args.blockedDomains) ? { blockedDomains: args.blockedDomains } : {}),
153
159
  cwd,
154
160
  signal: exec?.signal,
155
161
  });
@@ -167,6 +173,7 @@ export function createPptExecutors(config, loadEngine = getEngine) {
167
173
  const exemplarId = typeof args.exemplarId === 'string' ? args.exemplarId.trim() : '';
168
174
  const topic = typeof args.topic === 'string' ? args.topic.trim() : '';
169
175
  if (topic && typeof engine.buildResearchPlan === 'function') {
176
+ const kit = typeof engine.loadWorkspaceBrandKit === 'function' ? engine.loadWorkspaceBrandKit(cwd) : null;
170
177
  const researchPlan = engine.buildResearchPlan({
171
178
  topic,
172
179
  persona: typeof args.persona === 'string' ? args.persona.trim() : undefined,
@@ -174,6 +181,8 @@ export function createPptExecutors(config, loadEngine = getEngine) {
174
181
  evidence: Array.isArray(args.evidence) ? args.evidence : undefined,
175
182
  lang,
176
183
  workspaceExemplars,
184
+ ...(Array.isArray(kit?.preferredSources) ? { preferredSources: kit.preferredSources } : {}),
185
+ ...(Array.isArray(kit?.blockedDomains) ? { blockedDomains: kit.blockedDomains } : {}),
177
186
  });
178
187
  return {
179
188
  ok: true,
@@ -283,6 +292,15 @@ export function createPptExecutors(config, loadEngine = getEngine) {
283
292
  return engine.importOfficeDeck({
284
293
  filePath: rawFilePath,
285
294
  ...(mergedPaths ? { filePaths: mergedPaths } : {}),
295
+ ...(args.inspectOnly === true ? { inspectOnly: true } : {}),
296
+ ...(typeof args.instructions === 'string' && args.instructions.trim() !== '' ? { instructions: args.instructions.trim() } : {}),
297
+ ...(typeof args.maxSlides === 'number' && Number.isInteger(args.maxSlides) ? { maxSlides: args.maxSlides } : {}),
298
+ ...(Array.isArray(args.includeSheets) ? { includeSheets: args.includeSheets } : {}),
299
+ ...(args.photoRoles && typeof args.photoRoles === 'object' && !Array.isArray(args.photoRoles) ? { photoRoles: args.photoRoles } : {}),
300
+ ...(args.bindDataModel === true ? { bindDataModel: true } : {}),
301
+ ...(Array.isArray(args.evidence) ? { evidence: args.evidence } : {}),
302
+ ...(Array.isArray(args.exports) && args.exports.length > 0 ? { exports: args.exports } : {}),
303
+ ...(typeof args.motionProfile === 'string' && args.motionProfile.trim() ? { motionProfile: args.motionProfile.trim() } : {}),
286
304
  cwd,
287
305
  outDir: resolvedOut,
288
306
  outputDir: resolvedOut,
package/lib/tools.js CHANGED
@@ -39,10 +39,12 @@ function compileParameters(spec) {
39
39
  node.description = prop.description;
40
40
  if (Array.isArray(prop?.enum))
41
41
  node.enum = prop.enum;
42
- if (prop?.type === 'array' && prop.items !== null && typeof prop.items === 'object')
42
+ if ((prop?.type === 'array' || (Array.isArray(prop?.type) && prop.type.includes('array'))) && prop.items !== null && typeof prop.items === 'object')
43
43
  node.items = prop.items;
44
44
  if (prop.properties)
45
45
  node.properties = prop.properties;
46
+ if (Array.isArray(prop?.required))
47
+ node.required = [...prop.required];
46
48
  if (prop.additionalProperties !== undefined)
47
49
  node.additionalProperties = prop.additionalProperties;
48
50
  properties[key] = compileNode(node);
@@ -140,6 +142,9 @@ function renderAbsorb(value) {
140
142
  return oneText(parts.join('\n'));
141
143
  }
142
144
  function renderCreate(value) {
145
+ if (value.inspectOnly === true && typeof value.dossierMarkdown === 'string') {
146
+ return oneText(value.dossierMarkdown);
147
+ }
143
148
  const up = value.upgradeReport;
144
149
  const sr = (up?.selfRepair && typeof up.selfRepair === 'object') ? up.selfRepair : undefined;
145
150
  const srNote = sr && Number(sr.fixedCount || 0) > 0
@@ -157,7 +162,12 @@ function renderCreate(value) {
157
162
  '可直接修改的 PPTX:' + value.pptxPath + '\n' +
158
163
  '可继续编辑的项目:' + value.jsonPath + '\n' +
159
164
  (value.handoutPath ? '演讲讲义:' + value.handoutPath + '\n' : '') +
160
- 'HTML 双击即可放映;可点击上一页/下一页、输入页码,以及“检查与导出”定位问题或下载 PPTX。PPTX 可用 PowerPoint / WPS / Keynote 直接编辑。' +
165
+ (value.xlsxPath ? '配套 Excel 数据簿:' + value.xlsxPath + '\n' : '') +
166
+ (value.docxPath ? '配套 Word 文档:' + value.docxPath + '\n' : '') +
167
+ (value.memoPath ? '高管阅读备忘录:' + value.memoPath + '\n' : '') +
168
+ (value.qaPrepPath ? '会前高管质询预案:' + value.qaPrepPath + '\n' : '') +
169
+ (value.i18nPath ? '无损翻译槽位包:' + value.i18nPath + '\n' : '') +
170
+ 'HTML 双击即可放映;可点击上一页/下一页、输入页码,按 R 离线审阅批注,以及“检查与导出”定位问题或下载 PPTX。PPTX 可用 PowerPoint / WPS / Keynote 直接编辑。' +
161
171
  upgradeLine +
162
172
  evidenceLine +
163
173
  (value.revision !== undefined ? '\n修订号:' + value.revision + ';可撤销修改:' + value.undoAvailable + '。用 ppt_edit 修改指定页,ppt_undo 撤销。' : '') +
@@ -335,11 +345,15 @@ const slideItemSchema = {
335
345
  size: { type: 'number', description: 'Relative bubble size weight for quadrant/bubble-matrix items.' },
336
346
  before: { type: 'number', description: 'Baseline/before numeric value for dumbbell/slope comparison items.' },
337
347
  after: { type: 'number', description: 'Target/after numeric value for dumbbell/slope comparison items.' },
348
+ actual: { type: 'number', description: 'Actual numeric progress value for gauge/bullet-chart items.' },
349
+ target: { type: 'number', description: 'Target threshold numeric value for gauge/bullet-chart items.' },
350
+ max: { type: 'number', description: 'Maximum scale ceiling for gauge/bullet-chart items.' },
338
351
  status: { type: 'string', enum: ['positive', 'negative', 'warning', 'neutral', 'accent'] },
339
352
  tone: { type: 'string', enum: ['positive', 'negative', 'warning', 'neutral', 'accent'] },
340
353
  },
341
354
  additionalProperties: false,
342
355
  };
356
+ const exportKinds = ['xlsx', 'docx', 'qa-prep', 'memo', 'social-carousel', 'subtitles', 'handout', 'one-pager', 'i18n'];
343
357
  const slideLayouts = [
344
358
  'cover', 'agenda', 'section', 'bullets', 'statement', 'quote',
345
359
  'kpi', 'cards', 'comparison', 'matrix', 'process', 'callout',
@@ -348,6 +362,7 @@ const slideLayouts = [
348
362
  'mockup', 'code', 'quadrant', 'radar', 'dumbbell', 'heatmap',
349
363
  'device', 'browser', 'mobile', 'snippet', 'bubble-matrix', 'magic-quadrant', 'spider', 'slope', 'heat-matrix',
350
364
  'map', 'world-map', 'china-map', 'geo-map', 'isometric', 'iso-stack', 'iso-layers', '3d-stack', 'iso-pillars',
365
+ 'issue-tree', 'mece', 'logic-tree', 'treemap', 'rect-map', 'budget-map', 'gauge', 'bullet-chart', 'okr-gauge', 'pricing', 'tiers', 'packages',
351
366
  'table', 'closing', 'image', 'image-left', 'image-right',
352
367
  'chart', 'chart-split', 'gallery', 'waterfall', 'flywheel',
353
368
  'bento', 'pillars', 'exec-summary', 'timeline', 'steps', 'layers', 'funnel', 'chevron', 'value-chain',
@@ -369,6 +384,7 @@ const slideProperties = {
369
384
  chrome: { type: 'string', enum: ALLOWED_CHROME_STYLES, description: 'Optional per-slide master chrome skeleton override.' },
370
385
  cardMaterial: { type: 'string', enum: ['solid', 'frameless', 'glass', 'editorial-rule'], description: 'Optional per-slide card surface materiality.' },
371
386
  iconMode: { type: 'string', enum: ['off', 'explicit', 'auto'], description: 'Optional per-slide native vector icon badge mode.' },
387
+ reveal: { type: 'string', enum: ['step', 'all'], description: 'Progressive step-by-step click reveal choreography ("step") on kpi/cards/comparison/process/isometric/matrix/issue-tree/pricing/gauge slides.' },
372
388
  title: { type: 'string' }, subtitle: { type: 'string' }, kicker: { type: 'string' },
373
389
  takeaway: { type: 'string', description: 'Bottom key-takeaway synthesis banner.' },
374
390
  source: { type: 'string', description: 'Bottom-left data/citation source line.' },
@@ -439,6 +455,9 @@ const evidenceEntrySchema = {
439
455
  scope: { type: 'string', description: 'Geographic/segment scope or statistical definition (e.g. "Global", "中国大陆", "乘用车口径").' },
440
456
  url: { type: 'string', description: 'Optional verified http:// or https:// source URL (stored in speaker notes & handout).' },
441
457
  confidence: { type: 'string', enum: ['verified', 'estimated', 'conflicting', 'unverified'], description: 'Fact-check verification status (default "verified").' },
458
+ origin: { type: 'string', enum: ['local-file', 'web-research'], description: 'Provenance origin separating user local materials ("local-file") from external authoritative research ("web-research").' },
459
+ tier: { type: 'integer', description: 'Authoritative source credibility tier: 1 (Official/Gov/Filing/Peer-Reviewed), 2 (Analyst/Research Institute), 3 (Media/UGC).' },
460
+ claimType: { type: 'string', enum: ['actual', 'forecast', 'policy', 'benchmark'], description: 'Distinguishes realized actuals from forward projections ("forecast") or policy/benchmark figures.' },
442
461
  note: { type: 'string', description: 'Optional methodology caveat or cross-check discrepancy note.' },
443
462
  },
444
463
  required: ['claim', 'source'],
@@ -479,6 +498,8 @@ export function buildPptTools(config) {
479
498
  brandKitName: { type: 'string', description: 'Optional corporate brand kit display name when saveBrandKit is true.' },
480
499
  watermark: { type: 'string', description: 'Optional subtle content-slide classification watermark locked into the brand kit (e.g. "CONFIDENTIAL · 内部资料").' },
481
500
  forbiddenTerms: { type: 'array', items: { type: 'string' }, description: 'Optional corporate compliance forbidden terms scanned automatically by SLOP-14.' },
501
+ preferredSources: { type: 'array', items: { type: 'string' }, description: 'Optional corporate/industry trusted authoritative domains or publisher names promoted to Tier 1 in research query packs and SLOP-13.' },
502
+ blockedDomains: { type: 'array', items: { type: 'string' }, description: 'Optional domains blacklisted as low-authority noise sources in research queries and SLOP-13.' },
482
503
  }),
483
504
  output: {
484
505
  schema: { type: 'object', additionalProperties: true },
@@ -503,6 +524,21 @@ export function buildPptTools(config) {
503
524
  smartLayout: { type: 'boolean', description: 'Enable or disable automatic multi-archetype Markdown layout promotion on >=4-section decks. Default true in async tool mode.' },
504
525
  lang: { type: 'string', description: 'UI language of the generated player: zh (default), en, or bilingual. Content language is whatever you write.' },
505
526
  motion: { type: 'string', enum: ['on', 'off'], description: 'Slide transitions plus bullet entrance animations: on (default) or off for a fully static deck.' },
527
+ motionProfile: { type: 'string', enum: ['subtle', 'executive', 'keynote'], description: 'Optional native PPTX transition profile: subtle (fast fade), executive (med fade), or keynote (push).' },
528
+ exports: { type: 'array', items: { type: 'string', enum: exportKinds }, description: 'Optional extra companion deliverables written alongside the 3-file core trio: xlsx (reverse Excel workbook), docx (Word report), qa-prep (executive Q&A defense sheet), memo (narrative memo), i18n (lossless translation bundle), handout, one-pager, social-carousel, subtitles.' },
529
+ mergeSources: {
530
+ type: 'array',
531
+ items: {
532
+ type: 'object',
533
+ properties: {
534
+ deckPath: { type: 'string', description: 'Path to an existing dsh-ppt .json project to cherry-pick slides from.' },
535
+ slides: { type: 'array', items: { oneOf: [{ type: 'integer' }, { type: 'string' }] }, description: 'Optional 1-based slide numbers or slide IDs to pick from deckPath.' },
536
+ bankIds: { type: 'array', items: { type: 'string' }, description: 'Optional slide bank entry IDs from .dsh-ppt/slide-bank.json.' },
537
+ },
538
+ additionalProperties: false,
539
+ },
540
+ description: 'Compose a unified new deck from 2+ existing .json projects and/or workspace slide-bank entries with SHA-256 asset dedup and collision-free [E#] evidence remapping.',
541
+ },
506
542
  slides: { type: 'array', items: { type: 'object', properties: slideProperties, additionalProperties: true }, description: 'Structured slides across 30+ native layouts & pro diagrams (cover, agenda, section, bullets, kpi, cards, comparison, matrix, process, callout, gantt, architecture, harvey, tam, org, marimekko, sankey, swot, value-chain, mockup, code, quadrant, radar, dumbbell, heatmap, mermaid, statement, quote, table, chart, chart-split, waterfall, image, image-left, image-right, closing) with items[], columns[], takeaway, source, chrome, tableStyle (consulting|booktabs|minimal|banded|harvey), local images, and 13 chart kinds.' },
507
543
  template: { type: 'string', enum: templateIds, description: 'Industry blueprint from ppt_templates (20 blueprints). Provide finished content/slides following its outline; template alone creates an unfilled draft.' },
508
544
  brand: { type: 'object', properties: brandProperties, additionalProperties: false, description: 'Shared brand: #RRGGBB primary/background/text colors, fontFamily, logo, footer, and chromeStyle (' + ALLOWED_CHROME_STYLES.join('|') + '). Applied to HTML and PPTX.' },
@@ -565,6 +601,23 @@ export function buildPptTools(config) {
565
601
  brand: { type: ['object', 'null'], properties: brandProperties, additionalProperties: false, description: 'Merge shared branding. null clears all branding. Empty footer clears footer; logo:null clears logo.' },
566
602
  targetMinutes: { type: ['number', 'null'], description: 'Optional target speaking duration in minutes for pace budgeting (null clears).' },
567
603
  remixPreset: { type: 'string', enum: ['exec-5min', 'board-brief', 'sales-pitch'], description: 'Multi-audience compression remix preset (exec-5min: 6 slides / board-brief: 8 slides / sales-pitch: 7 slides). Preserves omitted takeaways in speaker notes and defaults saveAs to true.' },
604
+ motionProfile: { type: ['string', 'null'], description: 'Optional native PPTX transition profile (subtle | executive | keynote, or null to clear).' },
605
+ exports: { type: 'array', items: { type: 'string', enum: exportKinds }, description: 'Optional extra companion exports to write: xlsx, docx, qa-prep, memo, i18n, handout, one-pager, social-carousel, subtitles.' },
606
+ saveToBank: {
607
+ type: 'object',
608
+ properties: {
609
+ slide: { oneOf: [{ type: 'integer' }, { type: 'string' }], description: '1-based slide number or slide ID to save into .dsh-ppt/slide-bank.json.' },
610
+ bankId: { type: 'string' },
611
+ name: { type: 'string' },
612
+ tags: { type: 'array', items: { type: 'string' } },
613
+ },
614
+ required: ['slide'],
615
+ additionalProperties: false,
616
+ description: 'Bookmark a golden slide (with its embedded assets & evidence) into workspace .dsh-ppt/slide-bank.json for cross-deck reuse.',
617
+ },
618
+ translations: { type: ['object', 'array'], items: { type: 'object', additionalProperties: true }, additionalProperties: true, description: 'Lossless translation bundle (from exports:["i18n"] or per-slide array) applied in-place while preserving 100% of layouts, charts, images, and evidence.' },
619
+ bilingualMode: { type: 'boolean', description: 'When applying translations, keep original + translated copy side-by-side in bilingual mode instead of replacing.' },
620
+ targetLang: { type: 'string', enum: ['zh', 'en', 'bilingual'], description: 'Optional target UI language when applying translations.' },
568
621
  }),
569
622
  output: { schema: createResultSchema, render: (_args, value) => renderCreate(value) },
570
623
  execute: executors.edit,
@@ -594,6 +647,7 @@ export function buildPptTools(config) {
594
647
  description: 'Inspect a dsh-ppt JSON project without rewriting artifacts. Report revision, slide IDs, page-specific errors and warnings for dense text, estimated overflow, small table fonts, missing/low-resolution images, chart labels, contrast and unfilled template slots. Static estimates require final visual review in browser and PowerPoint/WPS. 中文:交付前检查工程,定位具体页的问题并给出修改建议,不改文件。',
595
648
  parameters: compileParameters({ deckPath: projectParameters.deckPath,
596
649
  renderReceipt: { type: 'string', description: 'Optional receiptPath returned by ppt_render. Rechecks current PPTX hash and every rendered output; never implies a visual pass.' },
650
+ feedbackPath: { type: 'string', description: 'Optional path to review-feedback.json exported offline from the HTML player (R key); surfaces every stakeholder comment as actionable slide-level issues.' },
597
651
  }),
598
652
  output: { schema: { type: 'object', additionalProperties: true }, render: (_args, value) => renderCheck(value) },
599
653
  execute: executors.check,
@@ -636,6 +690,14 @@ export function buildPptTools(config) {
636
690
  parameters: compileParameters({
637
691
  filePath: { type: 'string', required: true, description: 'Local .xlsx, .csv, .tsv, .docx, .pdf file path OR a local directory containing mixed source files (relative to session cwd or absolute).' },
638
692
  filePaths: { type: 'array', items: { type: 'string' }, description: 'Optional additional local file paths (.xlsx/.csv/.tsv/.docx/.pdf/.png/.jpg/.webp) to fuse together with filePath into one deck with automatic [E1..En] source provenance.' },
693
+ inspectOnly: { type: 'boolean', description: 'Return a compact, token-efficient Material Dossier (Excel sheet profiles/charts, Word/PDF sections, photo pixel dimensions/orientation/focal-point tips, local [E1..Ek] ledger, AND Mode C Authoritative External Enrichment queries) without writing files yet — ideal when following custom user presentation instructions or enriching with web research.' },
694
+ instructions: { type: 'string', description: 'Natural-language presentation requirements (e.g. "控制 8 页,跳过目录,product.png 放封面,重点讲毛利变化") applied deterministically during direct build.' },
695
+ maxSlides: { type: 'integer', description: 'Optional maximum slide budget for direct build.' },
696
+ includeSheets: { type: 'array', items: { type: 'string' }, description: 'Optional list of Excel worksheet names (or substrings) to include.' },
697
+ photoRoles: { type: 'object', additionalProperties: true, description: 'Optional explicit filename-to-role map overriding smart photo choreography (e.g. {"hero.png":"cover","app.png":"mockup-mobile","site1.jpg":"gallery"}).' },
698
+ bindDataModel: { type: 'boolean', description: 'Automatically bind Excel/CSV numeric tables & KPI cards into live dataModel {{metricId}} placeholders so future ppt_data updates refresh the deck live.' },
699
+ evidence: { type: 'array', items: evidenceEntrySchema, description: 'Optional external authoritative web-research evidence[] (origin:"web-research", tier:1|2) merged collision-free after local file evidence [E1..Ek] (Mode C Hybrid).' },
700
+ exports: { type: 'array', items: { type: 'string', enum: exportKinds }, description: 'Optional extra companion exports: xlsx, docx, qa-prep, memo, i18n, handout, one-pager, social-carousel, subtitles.' },
639
701
  outputDir: { type: 'string', description: 'Directory to write the generated files into. Default: session working directory (or the plugin outputDir config).' },
640
702
  fileName: { type: 'string', description: 'Base file name for the three artifacts. Default: derived from source file or title.' },
641
703
  theme: { type: 'string', description: 'Target built-in theme id (or "auto", default "auto").' },
package/lib/types.d.ts CHANGED
@@ -35,7 +35,7 @@ export interface PptTasteRecipe {
35
35
  }
36
36
  export type PptPersonaId = 'auto' | 'consulting' | 'tech-pitch' | 'academic' | 'gov-exec' | 'education' | 'editorial';
37
37
  export type PptLanguage = 'zh' | 'en' | 'bilingual';
38
- export type PptSlideLayout = 'cover' | 'agenda' | 'section' | 'bullets' | 'statement' | 'quote' | 'kpi' | 'cards' | 'comparison' | 'matrix' | 'process' | 'callout' | 'gantt' | 'architecture' | 'harvey' | 'tam' | 'org' | 'marimekko' | 'sankey' | 'swot' | 'table' | 'closing' | 'image' | 'image-left' | 'image-right' | 'chart' | 'chart-split' | 'gallery' | 'waterfall' | 'flywheel' | 'bento' | 'pillars' | 'exec-summary' | 'timeline' | 'steps' | 'layers' | 'funnel' | 'chevron' | 'value-chain' | 'issue-action' | 'before-after' | 'matrix-2x2' | 'kpi-grid' | 'scorecard' | 'formula-callout' | 'takeaways' | 'gallery-grid' | 'ablation-compare' | 'roadmap' | 'swimlane' | 'team' | 'mermaid' | 'flowchart' | 'sequence' | 'map' | 'world-map' | 'china-map' | 'geo-map' | 'isometric' | 'iso-stack' | 'iso-layers' | '3d-stack' | 'iso-pillars';
38
+ export type PptSlideLayout = 'cover' | 'agenda' | 'section' | 'bullets' | 'statement' | 'quote' | 'kpi' | 'cards' | 'comparison' | 'matrix' | 'process' | 'callout' | 'gantt' | 'architecture' | 'harvey' | 'tam' | 'org' | 'marimekko' | 'sankey' | 'swot' | 'table' | 'closing' | 'image' | 'image-left' | 'image-right' | 'chart' | 'chart-split' | 'gallery' | 'waterfall' | 'flywheel' | 'bento' | 'pillars' | 'exec-summary' | 'timeline' | 'steps' | 'layers' | 'funnel' | 'chevron' | 'value-chain' | 'issue-action' | 'before-after' | 'matrix-2x2' | 'kpi-grid' | 'scorecard' | 'formula-callout' | 'takeaways' | 'gallery-grid' | 'ablation-compare' | 'roadmap' | 'swimlane' | 'team' | 'mermaid' | 'flowchart' | 'sequence' | 'map' | 'world-map' | 'china-map' | 'geo-map' | 'isometric' | 'iso-stack' | 'iso-layers' | '3d-stack' | 'iso-pillars' | 'issue-tree' | 'mece' | 'logic-tree' | 'treemap' | 'rect-map' | 'budget-map' | 'gauge' | 'bullet-chart' | 'okr-gauge' | 'pricing' | 'tiers' | 'packages';
39
39
  export type PptTemplateId = 'weekly' | 'defense' | 'project' | 'pitch' | 'consulting' | 'keynote' | 'gov-report' | 'workshop' | 'architecture-review' | 'financial-earnings' | 'medical-case' | 'postmortem' | 'marketing-campaign' | 'promotion-review' | 'legal-compliance' | 'creative-lookbook' | 'quarterly-okr' | 'product-prd' | 'vc-daylight' | 'industry-research';
40
40
  export type PptTableStyle = 'consulting' | 'booktabs' | 'minimal' | 'banded' | 'harvey';
41
41
  export interface PptImageSpec {
@@ -69,6 +69,9 @@ export interface PptSlideItem {
69
69
  role?: string;
70
70
  conversion?: string;
71
71
  icon?: string;
72
+ actual?: number;
73
+ target?: number;
74
+ max?: number;
72
75
  status?: 'positive' | 'negative' | 'warning' | 'neutral' | 'accent';
73
76
  tone?: 'positive' | 'negative' | 'warning' | 'neutral' | 'accent';
74
77
  }
@@ -169,6 +172,13 @@ export interface PptCheckResult extends PptQualityResult {
169
172
  verification: PptVerification;
170
173
  render?: PptRenderResult;
171
174
  }
175
+ export type PptExportKind = 'xlsx' | 'docx' | 'qa-prep' | 'memo' | 'social-carousel' | 'subtitles' | 'handout' | 'one-pager' | 'i18n';
176
+ export type PptMotionProfile = 'subtle' | 'executive' | 'keynote';
177
+ export interface PptMergeSource {
178
+ deckPath?: string;
179
+ slides?: Array<number | string>;
180
+ bankIds?: string[];
181
+ }
172
182
  export interface PptEditArgs {
173
183
  deckPath: string;
174
184
  edits?: Array<{
@@ -185,6 +195,17 @@ export interface PptEditArgs {
185
195
  brand?: PptBrand | null;
186
196
  targetMinutes?: number | null;
187
197
  remixPreset?: 'exec-5min' | 'board-brief' | 'sales-pitch';
198
+ motionProfile?: PptMotionProfile | null;
199
+ exports?: PptExportKind[];
200
+ saveToBank?: {
201
+ slide: number | string;
202
+ bankId?: string;
203
+ name?: string;
204
+ tags?: string[];
205
+ };
206
+ translations?: Record<string, unknown> | Array<Record<string, unknown>>;
207
+ bilingualMode?: boolean | 'replace' | 'bilingual';
208
+ targetLang?: PptLanguage;
188
209
  expectedRevision?: number;
189
210
  saveAs?: boolean;
190
211
  }
@@ -237,6 +258,9 @@ export interface PptEvidenceEntry {
237
258
  scope?: string;
238
259
  url?: string;
239
260
  confidence?: 'verified' | 'estimated' | 'conflicting' | 'unverified';
261
+ origin?: 'local-file' | 'web-research';
262
+ tier?: 1 | 2 | 3;
263
+ claimType?: 'actual' | 'forecast' | 'policy' | 'benchmark';
240
264
  note?: string;
241
265
  }
242
266
  export interface PptSlideSpec {
@@ -246,6 +270,7 @@ export interface PptSlideSpec {
246
270
  chrome?: PptChromeStyle | string;
247
271
  cardMaterial?: PptCardMaterial;
248
272
  iconMode?: PptIconMode;
273
+ reveal?: 'step' | 'all';
249
274
  title?: string;
250
275
  subtitle?: string;
251
276
  kicker?: string;
@@ -315,6 +340,9 @@ export interface PptCreateArgs {
315
340
  lang?: string;
316
341
  /** 页间转场与要点入场动画:on(默认)/ off。 */
317
342
  motion?: 'on' | 'off';
343
+ motionProfile?: PptMotionProfile;
344
+ exports?: PptExportKind[];
345
+ mergeSources?: PptMergeSource[];
318
346
  outputDir?: string;
319
347
  fileName?: string;
320
348
  /** 是否覆盖同名三件套;默认 false,同名时自动选择唯一后缀。 */
@@ -377,6 +405,8 @@ export interface PptAbsorbArgs {
377
405
  brandKitName?: string;
378
406
  watermark?: string;
379
407
  forbiddenTerms?: string[];
408
+ preferredSources?: string[];
409
+ blockedDomains?: string[];
380
410
  signal?: AbortSignal;
381
411
  }
382
412
  export interface PptExemplarSummary {
@@ -459,6 +489,14 @@ export interface PptImportArgs {
459
489
  export interface PptFromOfficeArgs {
460
490
  filePath: string;
461
491
  filePaths?: string[];
492
+ inspectOnly?: boolean;
493
+ instructions?: string;
494
+ maxSlides?: number;
495
+ includeSheets?: string[];
496
+ photoRoles?: Record<string, string>;
497
+ bindDataModel?: boolean;
498
+ evidence?: PptEvidenceEntry[];
499
+ exports?: PptExportKind[];
462
500
  outputDir?: string;
463
501
  fileName?: string;
464
502
  theme?: string;
@@ -523,6 +561,17 @@ export interface PptCreateResult {
523
561
  pptxPath: string;
524
562
  jsonPath: string;
525
563
  handoutPath?: string;
564
+ onePagerPath?: string;
565
+ carouselPath?: string;
566
+ subtitlesPath?: string;
567
+ xlsxPath?: string;
568
+ docxPath?: string;
569
+ memoPath?: string;
570
+ qaPrepPath?: string;
571
+ i18nPath?: string;
572
+ inspectOnly?: boolean;
573
+ dossierMarkdown?: string;
574
+ enrichmentPlan?: Record<string, unknown>;
526
575
  deckId?: string;
527
576
  revision?: number;
528
577
  undoAvailable?: number;
@@ -563,6 +612,14 @@ export interface DeckEngine {
563
612
  renderSocialCarouselHtml?(manifest: any, options?: Record<string, unknown>): string;
564
613
  renderSubtitlesSrt?(manifest: any, lang?: string): string;
565
614
  renderSubtitlesVtt?(manifest: any, lang?: string): string;
615
+ renderDeckWorkbookXlsx?(manifest: any): Buffer;
616
+ renderDeckReportDocx?(manifest: any, lang?: string): Buffer;
617
+ renderDeckMemoMarkdown?(manifest: any, lang?: string): string;
618
+ renderQaPrepMarkdown?(manifest: any, lang?: string): string;
619
+ extractTranslationBundle?(manifest: any): Record<string, unknown>;
620
+ applyTranslationBundle?(manifest: any, translations: unknown, options?: Record<string, unknown>): Record<string, unknown>;
621
+ listSlideBank?(cwd?: string, tag?: string): Record<string, unknown>;
622
+ mergeDecks?(options?: Record<string, unknown>): Promise<PptCreateResult>;
566
623
  remixDeck?(options: Record<string, unknown>): Promise<PptCreateResult>;
567
624
  loadWorkspaceBrandKit?(cwd?: string): Record<string, unknown> | null;
568
625
  saveWorkspaceBrandKit?(cwd: string, rawKit: Record<string, unknown>): {
package/lib/workbench.js CHANGED
@@ -22,6 +22,7 @@ const ALLOWED_LAYOUTS = new Set([
22
22
  'marimekko', 'sankey', 'swot',
23
23
  'mockup', 'code', 'quadrant', 'radar', 'dumbbell', 'heatmap',
24
24
  'map', 'isometric',
25
+ 'issue-tree', 'treemap', 'gauge', 'pricing',
25
26
  'table', 'closing', 'image', 'image-left', 'image-right', 'chart', 'chart-split',
26
27
  'waterfall', 'gallery', 'flywheel', 'chevron', 'value-chain',
27
28
  'mermaid', 'flowchart', 'sequence',
@@ -35,7 +36,7 @@ const ALLOWED_ICON_MODES = new Set(['off', 'explicit', 'auto']);
35
36
  const ALLOWED_COVER_PATTERNS = new Set(['dots', 'grid', 'rings', 'waves', 'isometric-mesh', 'editorial-arcs']);
36
37
  const ALLOWED_FOCAL_POINTS = new Set(['center', 'top', 'bottom', 'left', 'right']);
37
38
  const ALLOWED_REMIX_PRESETS = new Set(['exec-5min', 'board-brief', 'sales-pitch']);
38
- const ITEM_KEYS = new Set(['tag', 'badge', 'title', 'text', 'body', 'value', 'unit', 'delta', 'start', 'span', 'milestone', 'role', 'conversion', 'icon', 'avatar', 'x', 'y', 'size', 'before', 'after', 'status', 'tone', 'bullets']);
39
+ const ITEM_KEYS = new Set(['tag', 'badge', 'title', 'text', 'body', 'value', 'unit', 'delta', 'start', 'span', 'milestone', 'role', 'conversion', 'icon', 'avatar', 'x', 'y', 'size', 'before', 'after', 'actual', 'target', 'max', 'status', 'tone', 'bullets']);
39
40
  const BRAND_KEYS = new Set(['name', 'primaryColor', 'secondaryColor', 'backgroundColor', 'textColor', 'fontFamily', 'headingFont', 'coverMode', 'coverBg', 'logo', 'footer', 'watermark', 'chromeStyle', 'cardMaterial', 'iconMode', 'taste']);
40
41
  const VISUAL_KEYS = new Set(['titleSize', 'bodySize', 'chartLabelSize', 'density', 'tableStyle', 'chrome']);
41
42
  /** Sharing keeps the offline deck, but omits the control for a project not in the ZIP. */
@@ -1530,8 +1531,23 @@ export class PptWorkbench {
1530
1531
  };
1531
1532
  }
1532
1533
  if (body.operation === 'download') {
1533
- if (!['html', 'pptx', 'json', 'handout', 'onepager', 'social-carousel', 'subtitles', 'remotion'].includes(String(body.kind)))
1534
+ if (!['html', 'pptx', 'json', 'handout', 'onepager', 'social-carousel', 'subtitles', 'remotion', 'xlsx', 'docx', 'qa-prep'].includes(String(body.kind)))
1534
1535
  throw new Error('不支持此文件类型');
1536
+ if (body.kind === 'xlsx') {
1537
+ if (typeof engine.renderDeckWorkbookXlsx !== 'function')
1538
+ throw new Error('当前引擎版本暂不支持 Excel 工作簿导出');
1539
+ return { ok: true, name: basename(entry.path, '.json') + '.xlsx', data: engine.renderDeckWorkbookXlsx(manifest).toString('base64') };
1540
+ }
1541
+ if (body.kind === 'docx') {
1542
+ if (typeof engine.renderDeckReportDocx !== 'function')
1543
+ throw new Error('当前引擎版本暂不支持 Word 文档导出');
1544
+ return { ok: true, name: basename(entry.path, '.json') + '.docx', data: engine.renderDeckReportDocx(manifest, manifest.language).toString('base64') };
1545
+ }
1546
+ if (body.kind === 'qa-prep') {
1547
+ if (typeof engine.renderQaPrepMarkdown !== 'function')
1548
+ throw new Error('当前引擎版本暂不支持会前质询预案导出');
1549
+ return { ok: true, name: basename(entry.path, '.json') + '.qa-prep.md', data: Buffer.from(engine.renderQaPrepMarkdown(manifest, manifest.language), 'utf8').toString('base64') };
1550
+ }
1535
1551
  if (body.kind === 'handout') {
1536
1552
  const handoutPath = files.json.slice(0, -5) + '.handout.md';
1537
1553
  if (existsSync(handoutPath))
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "dsh-ppt",
3
- "version": "0.34.0",
4
- "description": "DeepSeek Harness 大师级演示文稿引擎与工作台:支持企业品牌宪章锁与 SLOP-14 合规门禁、多源资料包融合直吞(.pdf/.docx/.xlsx/.png + 证据溯源)、多受众一键压缩改编与 4:5/1:1 社媒长图、HTML 现场演示增强包(⌘K 速搜/白板画笔/Q&A 倒计时/字幕导览)、20 套标杆范本、24 主题 / 37+ 原生可编辑图谱(点阵地图/2.5D 等轴测/Mermaid/公式/代码),导出离线 HTML + 100% 可编辑 PPTX。欢迎 PR 与 Issues。",
3
+ "version": "0.36.0",
4
+ "description": "DeepSeek Harness 大师级演示文稿引擎与工作台:支持三模路由(有资料直出 / 零资料 8 域权威深研 / Mode C 本地多源融合+外源对标)、企业品牌宪章锁(SLOP-13/14)、41 种原生可编辑图谱(MECE 议题树/Treemap/OKR 子弹仪/三档报价/点阵地图/2.5D 等轴测/Mermaid/公式/代码)、24 主题 / 20 标杆范本、逆向导出 Excel/Word/备忘录/答辩预案/无损翻译包、企业金页库拼装与离线 R 键审阅回流。欢迎 PR 与 Issues。",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
7
7
  "types": "lib/index.d.ts",