@taloswork/ose-shared 0.1.12 → 0.1.13

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 (66) hide show
  1. package/package.json +3 -3
  2. package/skills/document/SKILL.md +33 -45
  3. package/skills/document/bin/deck-build.cjs +10482 -272
  4. package/skills/document/bin/deck-chart.cjs +21 -12
  5. package/skills/document/bin/deck-plan.cjs +11654 -42
  6. package/skills/document/bin/deck-qa.cjs +95 -21
  7. package/skills/document/bin/deck-scenario.cjs +20 -3
  8. package/skills/document/bin/deck-styles.cjs +1604 -0
  9. package/skills/document/bin/doc-convert.cjs +182 -257
  10. package/skills/document/bin/doc-fill.cjs +140 -19
  11. package/skills/document/bin/doc-gen.cjs +1903 -281
  12. package/skills/document/bin/doc-validate.cjs +127 -52
  13. package/skills/document/bin/docx-defaults.cjs +9907 -0
  14. package/skills/document/bin/html2pptx.cjs +35949 -31972
  15. package/skills/document/bin/pdf-form.cjs +8 -0
  16. package/skills/document/bin/pdf-ops.cjs +8 -0
  17. package/skills/document/bin/pptx-notes.cjs +10038 -0
  18. package/skills/document/bin/pptx-tokenize.cjs +19 -4
  19. package/skills/document/bin/template-skin.cjs +10910 -0
  20. package/skills/document/bin-reference.md +15 -10
  21. package/skills/document/catalog.json +33 -32
  22. package/skills/document/content-pipeline.md +79 -44
  23. package/skills/document/deck-design.md +55 -32
  24. package/skills/document/generated-visuals.md +99 -0
  25. package/skills/document/layouts/MAINTAINERS.md +33 -0
  26. package/skills/document/layouts/README.md +20 -20
  27. package/skills/document/layouts/big-stat.tpl +1 -1
  28. package/skills/document/layouts/capacity.json +1 -1
  29. package/skills/document/layouts/cards-3.tpl +1 -1
  30. package/skills/document/layouts/chart-full.tpl +1 -1
  31. package/skills/document/layouts/chart-kpi.tpl +1 -1
  32. package/skills/document/layouts/comparison.tpl +1 -1
  33. package/skills/document/layouts/data-table.tpl +1 -1
  34. package/skills/document/layouts/funnel.tpl +1 -1
  35. package/skills/document/layouts/gantt.tpl +1 -1
  36. package/skills/document/layouts/hub-flow.tpl +4 -0
  37. package/skills/document/layouts/icon-row.tpl +1 -1
  38. package/skills/document/layouts/image-grid.tpl +1 -1
  39. package/skills/document/layouts/matrix-2x2.tpl +1 -1
  40. package/skills/document/layouts/mock-qa.tpl +4 -0
  41. package/skills/document/layouts/profiles.json +2 -2
  42. package/skills/document/layouts/pyramid.tpl +1 -1
  43. package/skills/document/layouts/radar.tpl +1 -1
  44. package/skills/document/layouts/ring-progress.tpl +1 -1
  45. package/skills/document/layouts/slots.json +1 -1
  46. package/skills/document/layouts/steps-vertical.tpl +1 -1
  47. package/skills/document/layouts/steps.tpl +1 -1
  48. package/skills/document/layouts/three-kpi.tpl +1 -1
  49. package/skills/document/layouts/timeline.tpl +1 -1
  50. package/skills/document/layouts/toc-panel.tpl +1 -1
  51. package/skills/document/layouts/two-kpi.tpl +2 -2
  52. package/skills/document/layouts/versus.tpl +1 -1
  53. package/skills/document/packs/README.md +1 -1
  54. package/skills/document/pdf.md +13 -0
  55. package/skills/document/rewrite.md +23 -8
  56. package/skills/document/scenarios.json +19 -2
  57. package/skills/document/scenarios.schema.json +1 -0
  58. package/skills/document/styles/_backdrops/rimlight.html +3 -2
  59. package/skills/document/styles/_contract-defaults.css +6 -1
  60. package/skills/document/styles/_samples/_groups/biz-premium.webp +0 -0
  61. package/skills/document/styles/_samples/mckinsey.webp +0 -0
  62. package/skills/document/styles/mckinsey/backdrop.html +7 -5
  63. package/skills/grill-me/SKILL.md +6 -0
  64. package/skills/grill-me/agents/openai.yaml +5 -0
  65. package/skills/grilling/SKILL.md +28 -0
  66. package/skills/grilling/agents/openai.yaml +3 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taloswork/ose-shared",
3
- "version": "0.1.12",
3
+ "version": "0.1.13",
4
4
  "description": "Talos cross-OSE shared library — skills + MCP servers auto-loaded into every OSE (P93 2026-07-27).",
5
5
  "type": "module",
6
6
  "files": [
@@ -10,6 +10,6 @@
10
10
  "publishConfig": {
11
11
  "access": "public"
12
12
  },
13
- "_talosPublishHash": "sha256-H6oTRkzTtWhz5kbtdMN6IhbuX_uh4d6W8nxcax6lK94",
14
- "_talosPublishedAt": "2026-10-07T12:24:23.248Z"
13
+ "_talosPublishHash": "sha256-HbLb5fXPsWxwD1td2ljod1H_UVd555EmCpblxk4GZ2g",
14
+ "_talosPublishedAt": "2026-10-10T06:45:49.079Z"
15
15
  }
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: document
3
- description: "Use for document FILES. Reading: a PDF, .docx, .pptx or .xlsx attachment to read, summarize, translate or search when its pages must be rendered (formulas, scans, figures) or a sheet computed — others arrive as extracted text. Writing: any request to create or edit a Word, PowerPoint, Excel or PDF file, or convert one (转成/导出 PDF, .docx/.pptx → PDF). ALWAYS use its scripts — doc-gen (docs), html2pptx (decks, and a deck made here to PDF), doc-convert (an existing file to PDF); never hand-write a python/ReportLab/LibreOffice/browser pipeline. Do NOT trigger for images or plain .txt/.md/.csv."
3
+ description: "Use for document FILES. Reading: a PDF, .docx, .pptx or .xlsx attachment to read, summarize, translate or search when its pages must be rendered (formulas, scans, figures) or a sheet computed — others arrive as extracted text. Writing: any request to create or edit a Word, PowerPoint, Excel or PDF file, or convert one (转成/导出 PDF, .docx/.pptx → PDF). ALWAYS use its scripts — doc-gen (docs), html2pptx (decks), doc-convert (Office files and final decks to PDF); never hand-write a python/ReportLab/LibreOffice/browser pipeline. Do NOT trigger for images or plain .txt/.md/.csv."
4
4
  license: Proprietary. LICENSE.txt has complete terms
5
5
  ---
6
6
 
@@ -28,16 +28,14 @@ document's content; never guess from the filename. Then:
28
28
  produce document files via the scripts — never hand-write a python / ReportLab /
29
29
  LibreOffice script for document output.
30
30
  - **Convert** a .docx/.pptx/.xlsx to PDF(转成/导出 PDF)→ `bin/doc-convert.cjs <in> <out.pdf>`.
31
- FAITHFUL conversion — the source's content, structure and images with neutral print
32
- styling; do not re-theme or "优化排版" unless asked, and never hand-roll a textutil /
33
- LibreOffice / headless-browser pipeline. Spreadsheets render ONLY through a real
31
+ Preserve the source; do not re-theme or "优化排版" unless asked, and never hand-roll a textutil /
32
+ LibreOffice / headless-browser pipeline. PPTX and spreadsheets render ONLY through a real
34
33
  LibreOffice (local `soffice` or `TALOS_OFFICE_URL`); without one the command errors.
35
- - **A deck you built here, as PDF**(PPT 要 PDF)→ print its `deck.html` with the same
36
- style flags as the .pptx, minus the .pptx-only `--editable` / `--rasterize` / `--notes-doc`:
37
- `bin/html2pptx.cjs deck.html out.pdf --style <id> [--theme-v2 …] [--backdrop …]` — one
38
- vector 16:9 page per slide, text selectable, links live. Not `doc-convert` (it re-lays
39
- out the .pptx), never slide PNGs assembled into a PDF. `pages` ≠ `slides` in the result
40
- means a slide overflows its canvas — fix it and print again.
34
+ DOCX may fall back to HTML reconstruction; report that its layout can change.
35
+ - **A deck you built here, as PDF**(PPT 要 PDF)→ `bin/doc-convert.cjs deck.pptx out.pdf`.
36
+ The final PPTX is the source of truth for content, fonts and layout. Reuse its final
37
+ QA Office PDF only if the PPTX has not changed. Never print `deck.html` or assemble
38
+ preview PNGs as the delivered PDF. No Office engine → report that PDF export is unavailable.
41
39
  - **Any deck/presentation(路演/汇报/评审/宣讲/pitch/roadshow/介绍 PPT)** → the deck route below.
42
40
 
43
41
  ## Decks
@@ -50,40 +48,29 @@ AskUserQuestion call with at most THREE questions**, and wait for the answers. I
50
48
  three are already known, do not ask them again.
51
49
 
52
50
  **STYLE PICKER — ONE RESULT PER IMAGE, SCENARIO-RANKED.** After the scenario is
53
- known, read the skill directory's **current `catalog.json` from disk immediately
54
- before building the picker**. Never reuse a catalog listing from earlier conversation
55
- context and never infer pack availability by scanning `packs/`. If the current catalog
56
- cannot be read or parsed, stop and report that exact error instead of presenting stale
57
- options.
51
+ known, run `node <skill>/bin/deck-styles.cjs --scenario "<the confirmed scenario>"`: it
52
+ reads the current `catalog.json` from disk immediately and ranks the entries (a
53
+ scenario-matching pack first, at least six cards). Never rank from memory, reuse a listing
54
+ from earlier context or scan `packs/`. If it exits non-zero, stop and report that exact
55
+ error instead of presenting stale options.
58
56
 
59
57
  Unless the user already named an entry id/name, supplied a template file, or explicitly
60
- said **"无需展示模板,直接替我选定风格"**, send one single-question image-card picker:
61
-
62
- - Rank **entries**, not groups, against the confirmed scenario and the user's requested
63
- tone. Show at most 8 recommended entries. A scenario-matching `kind === "pack"` ranks
64
- before matching skins; include at least one matching pack whenever one exists.
65
- - Every image card maps to exactly one final entry and uses
66
- `{ label: entry.kind === "pack" ? "PACK · " + entry.name_cn :
67
- (entry 属于 renderMode === "classic-v1" 的 collection ? "经典 · " + entry.name_cn : entry.name_cn),
68
- description: entry.oneliner, imagePath: <skill目录下entry.sample的绝对路径> }`.
69
- Copy `entry.oneliner` verbatim. Never use `group.sample` in this default picker.
70
- - Append `{ label: "查看全部风格", description: "一次查看全部模板" }`, then
71
- `{ label: "使用我的模板文件", description: "复用现成 PPT 的版式/风格",
72
- filePick: "file" }` as the final option.
58
+ said **"无需展示模板,直接替我选定风格"**, send one single-question image-card picker whose
59
+ `options` are deck-styles' `options` **as printed** — never rewrite, reorder or add a card.
73
60
 
74
61
  **"按场景推荐/你推荐" means rank the cards and still ask.** It does NOT waive the
75
62
  picker. Only the explicit no-picker wording above authorizes automatic selection.
76
63
  Do not waive this gate because the deck is small or quick.
77
64
 
78
- If the user chooses **查看全部风格**, immediately show **every current
79
- `catalog.entries` item in one single-question image-card picker** using the same label,
80
- description, and imagePath rule above. Preserve catalog order, keep `PACK ·` visible,
81
- and append the custom-template file card. Do not ask for a group, paginate, or return to
82
- any category/second-level picker; the browse-all action must expose final selectable
83
- templates directly.
65
+ **查看全部风格** opens the full gallery in the app itself — you receive the final pick, not
66
+ the click. Only if 查看全部风格 comes back as the answer, show **every current
67
+ `catalog.entries` item in one single-question image-card picker** in catalog order:
68
+ `{ label: "PACK · " + entry.name_cn` for a pack, `"经典 · " + entry.name_cn` in a
69
+ `classic-v1` collection, else `entry.name_cn`; `description: entry.oneliner, imagePath:
70
+ "document:" + entry.sample }`, then the template card. Do not ask for a group, paginate, or return to
71
+ any category/second-level picker.
84
72
 
85
- Samples are pre-rendered WebP files shipped with the skill: pass their absolute paths
86
- directly and render nothing during the question. The selected `entry.id` is the stable
73
+ The selected `entry.id` is the stable
87
74
  `style` id. An entry in a `renderMode:"classic-v1"` collection of `catalog.collections`
88
75
  renders V1 (no `themeVersion`, never `--theme-v2`); every other new deck uses Theme V2 —
89
76
  read **theme-system.md** before authoring.
@@ -100,12 +87,13 @@ the preference to memory.
100
87
 
101
88
  **Custom style** (其他/自定义, 使用我的模板文件, "我之前那个风格"): routes and naming are in
102
89
  **deck-design.md "Custom skins"** — prefer deriving a bespoke skin, saved as a user style
103
- under `$TALOS_DOC_STYLES_DIR/styles/<name>/`; an uploaded deck whose exact layouts must be
104
- kept → rewrite.md "Reuse an uploaded deck". Never write inside the skill directory.
90
+ under `$TALOS_DOC_STYLES_DIR/styles/<name>/`; a 使用我的模板文件 deck is learned as a style
91
+ (`template-skin`); refilling its original pages (opt-in) → rewrite.md "Reuse an
92
+ uploaded deck". Never write inside the skill directory.
105
93
 
106
- **Then build it.** Read **content-pipeline.md** (brief → research → narrative → one
107
- outline gate) for a substantive deck, then **deck-design.md** (workflow, slide contract,
108
- sign-off) and **`layouts/README.md`** (layout selection and fill contract). In short:
94
+ **Then build it.** Read **content-pipeline.md** for a substantive deck, then
95
+ **deck-design.md** and **`layouts/README.md`**. Assess whether generated visuals help;
96
+ if so, read **generated-visuals.md**. In short:
109
97
  **plan before you fill** — `bin/deck-plan.cjs plan.json spec.json` picks layouts by
110
98
  MEASURED capacity and drafts the spec, `deck-build` fills it, charts are drawn from data
111
99
  (never hand-write chart SVG), and `bin/html2pptx.cjs deck.html out.pptx --style <id>`
@@ -118,7 +106,7 @@ fall back to a lesser deck.
118
106
  1. **Valid.** `doc-gen` and `html2pptx` check their own output in the step that wrote
119
107
  it — `valid: false` exits 1, fix before delivering;
120
108
  never re-run `doc-validate` on their output. `doc-gen pdf` prints `{valid, pages, textChars, cjkChars, previews}`
121
- (a ≈72dpi PNG per page — read those, do not re-render or count characters yourself);
109
+ (≈72dpi PNGs — read those, do not re-render). Counts describe input, not visible glyphs.
122
110
  `doc-gen docx` prints `{valid, textChars, cjkChars}`, `xlsx` `{valid}`. After any
123
111
  other write (doc-fill, docx-annotate, pptx-*, pdf-form / pdf-ops, doc-xml pack, a
124
112
  doc-run script) run `bin/doc-validate.cjs <file>` yourself — exit 1 means fix it.
@@ -149,10 +137,10 @@ codes). Never read or grep `bin/*.cjs` themselves: they are bundled builds.
149
137
  - Read: `bin/doc-scan.cjs` · `bin/doc-text.cjs` · `bin/pdf-render.cjs` · `bin/pdf-images.cjs` ·
150
138
  `bin/pdf-tables.cjs` · `bin/ocr.cjs` · `bin/xlsx-query.cjs`
151
139
  - Generate: `bin/doc-gen.cjs` · `bin/doc-run.cjs` · `bin/xlsx-recalc.cjs`
152
- - Fill / edit: `bin/doc-fill.cjs` · `bin/doc-xml.cjs` · `bin/docx-annotate.cjs` · `bin/pptx-clone.cjs` ·
153
- `bin/pptx-slide.cjs` · `bin/pptx-tokenize.cjs` · `bin/pptx-set-image.cjs` · `bin/pptx-theme.cjs` ·
140
+ - Fill / edit: `bin/doc-fill.cjs` · `bin/doc-xml.cjs` · `bin/docx-annotate.cjs` · `bin/docx-defaults.cjs` · `bin/pptx-clone.cjs` ·
141
+ `bin/pptx-slide.cjs` · `bin/pptx-tokenize.cjs` · `bin/pptx-set-image.cjs` · `bin/pptx-notes.cjs` · `bin/pptx-theme.cjs` ·
154
142
  `bin/pptx-embed-fonts.cjs` · `bin/pdf-form.cjs` · `bin/pdf-ops.cjs`
155
- - Decks: `bin/deck-scenario.cjs` · `bin/deck-plan.cjs` · `bin/deck-build.cjs` · `bin/deck-chart.cjs` · `bin/html2pptx.cjs` · `bin/deck-qa.cjs`
143
+ - Decks: `bin/deck-scenario.cjs` · `bin/deck-styles.cjs` · `bin/deck-plan.cjs` · `bin/deck-build.cjs` · `bin/deck-chart.cjs` · `bin/html2pptx.cjs` · `bin/deck-qa.cjs` · `bin/template-skin.cjs`
156
144
  - Validate / convert: `bin/doc-validate.cjs <file.docx|pptx|xlsx|pdf> [--strict]` · `bin/doc-convert.cjs`
157
145
 
158
146
  Every script prints a machine-readable result. On a missing dependency or unreadable