@bytechain.cn/colamd-themes 0.5.3 → 0.5.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  # ColaMD Themes
2
2
 
3
- [![DSH Skill](https://img.shields.io/badge/DSH%20Skill-supported-brightgreen?logo=data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBmaWxsPSJjdXJyZW50Q29sb3IiIGQ9Ik0xMiAyQzYuNDggMiAyIDYuNDggMiAxMnM0LjQ4IDEwIDEwIDEwIDEwLTQuNDggMTAtMTBTMTcuNTIgMiAxMiAyem0tMSAxN2gxMm0tMTItMmgxMm0tMTItMkgxMg=="/>](https://github.com/deepseek-ai/deepseek-harness)
4
- [![Awesome DSH](https://awesome.re/badge.svg)](https://github.com/Dominic789654/awesome-deepseek-harness)
3
+ [![DSH Skill](https://img.shields.io/badge/DSH%20Skill-supported-brightgreen?logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBmaWxsPSIjZmZmZmZmIiBkPSJNOSAxNi4yIDQuOCAxMmwtMS40IDEuNEw5IDE5IDIxIDdsLTEuNC0xLjR6Ii8%2BPC9zdmc%2B)](https://github.com/deepseek-ai/deepseek-harness)
4
+ [![Awesome DSH](https://img.shields.io/badge/Awesome-DSH-black)](https://github.com/Dominic789654/awesome-deepseek-harness)
5
5
  [![Awesome DSH Plugin](https://beancookie.github.io/awesome-dsh-plugin/badge.svg)](https://github.com/beancookie/awesome-dsh-plugin)
6
6
 
7
7
  **Topics**: `dsh` `deepseek-harness` `colamd` `themes` `css` `markdown` `pdf` `html` `skill` `ai-agent`
@@ -38,7 +38,7 @@ A theme development & export toolkit for [ColaMD](https://github.com/cola-md/col
38
38
  - **Color System Library** — 15 predefined seed palettes across 5 families (Morandi, Macaron, Nordic, Vintage, Mint)
39
39
  - **2.7.8-rc.2 CSS Contract Validator** — flags dead selectors (`#write`, `.ProseMirror`, `body.theme-custom`), dead variables (`--mermaid-*`, `--radius-*`, `--font-size-root`…), `pt` units, and vertical padding on quote/code lines
40
40
  - **2.7.8-rc.2 Verified** — all 16 shipped themes audited against `@bytechain.cn/colamd@2.7.7` (contract unchanged through 2.7.8-rc.2) and smoke-tested on the 2.7.8-rc.2 export pipeline: zero `.cm-md-*` hook drift, all `:root` live variables and `--pele-*` overrides consumed, exports carry exactly the 27 contract live variables
41
- - **Pele Diagram Colors** — 9 `--pele-*` variables derived from `--code-block-bg` / `--code-block-text` / `--link-color`, replacing the 20 Mermaid variables
41
+ - **Pele Diagram Colors** — 9 `--pele-*` variables derived from `--code-block-bg` / `--code-block-text` / `--link-color`, replacing the 20 Mermaid variables
42
42
  - **Platform backward compatibility (v0.5.3+)** — [`src/compat.ts`](src/compat.ts) probes the installed `@bytechain.cn/colamd` version and its `themes/contract.json` for contract drift; `validate` prints a "平台兼容" report line and the renderer verifies the export API surface (`applyTheme` / `setMarkdown` / `ensureAllPluginsRendered` / `buildExportHTML`) before rendering. Platform upgrades produce actionable diagnostics (version + fix command) instead of cryptic mid-render failures
43
43
 
44
44
  ### Security & Performance (v0.4.0+)
@@ -87,7 +87,7 @@ Full MCP server for AI-native integration — connect ColaMD-themes to Chatbox,
87
87
 
88
88
  ### Multi-Agent Skill
89
89
 
90
- Universal skill definitions for 6 AI coding agents, auto-generated from a single source:
90
+ Universal skill definitions for 6 AI coding agents (7 outputs — Trae gets both workspace rules and a project skill), auto-generated from a single source:
91
91
 
92
92
  | Agent | Skill Path | Frontmatter |
93
93
  |-------|-----------|-------------|
@@ -95,7 +95,8 @@ Universal skill definitions for 6 AI coding agents, auto-generated from a single
95
95
  | **OpenCode** | `.opencode/skills/colamd-themes/SKILL.md` | `name`, `version`, `user-invocable`, `allowed-tools`, `hooks` |
96
96
  | **OpenClaw** | `.openclaw/skills/colamd-themes/SKILL.md` | `id`, `name`, `version`, `icon`, `author`, `homepage`, `metadata.openclaw.os` |
97
97
  | **Hermes** | `.hermes/skills/tools/colamd-themes/SKILL.md` | `name`, `version`, `author`, `license`, `metadata.hermes.tags`, `prerequisites` |
98
- | **Trae** | `.trae/rules/colamd-themes.md` | Plain Markdown (no frontmatter) |
98
+ | **Trae (rules)** | `.trae/rules/colamd-themes.md` | Plain Markdown (no frontmatter) |
99
+ | **Trae (skill)** | `.trae/skills/colamd-themes/SKILL.md` | `name`, `description` (single-line plain scalar) |
99
100
  | **DeepSeek Harness** | `.dsh/skills/colamd-themes/SKILL.md` | `name`, `version`, `description`, `metadata.dsh.tags`, `prerequisites` |
100
101
 
101
102
  **Architecture:**
@@ -111,6 +112,7 @@ skills/build-skills.sh ← Build script (bash)
111
112
  ├──→ .openclaw/skills/colamd-themes/SKILL.md
112
113
  ├──→ .hermes/skills/tools/colamd-themes/SKILL.md
113
114
  ├──→ .trae/rules/colamd-themes.md
115
+ ├──→ .trae/skills/colamd-themes/SKILL.md
114
116
  └──→ .dsh/skills/colamd-themes/SKILL.md
115
117
  ```
116
118
 
@@ -126,6 +128,7 @@ bash skills/build-skills.sh opencode
126
128
  bash skills/build-skills.sh openclaw
127
129
  bash skills/build-skills.sh hermes
128
130
  bash skills/build-skills.sh trae
131
+ bash skills/build-skills.sh trae-skill
129
132
  bash skills/build-skills.sh dsh
130
133
  ```
131
134
 
@@ -138,8 +141,8 @@ The package is also a **DSH (DeepSeek Harness) plugin bundle** installable from
138
141
  - **Plugin contract** — `package.json` declares `dsh.bundle.patch` pointing to [`cordis.patch.yml`](cordis.patch.yml), which inserts the `colamd-themes` Cordis entry into the profile's composition
139
142
  - **Host entry** — [`src/dsh-plugin.ts`](src/dsh-plugin.ts) exports the Cordis protocol (`name` / `inject: ["skills"]` / `apply`) and registers the bundled `skills/colamd-themes/SKILL.md` with the Harness `skills` service via `ctx.skills.registerProvider` (same provider protocol as the bundled dsh-ppt plugin)
140
143
  - **CLI bins** — `colamd-themes` / `cthemes` ship with the package and become available to profile agents after install
141
- - **Runtime compatibility** — `@deepseek-ai/dsh-skill` is declared as an *optional* peer (`^0.1.5-rc.1 || ^0.2.0-rc || ^0.2.1-rc || ^0.3.0-rc || ^0.4.0-rc`; semver's prerelease rule forces per-patch enumeration — append a comparator when a new rc line ships): the market checks it against the DSH runtime version, while standalone `npm install` is unaffected
142
- - **Backward compatibility** — the runtime consumes only the stable `BUNDLED_SKILL_RANK` constant, and the host entry's `apply()` tolerates skills-service protocol drift (warning instead of a broken profile load)
144
+ - **Runtime compatibility** — `@deepseek-ai/dsh-skill` is declared as an *optional* peer (`^0.1.5-rc.1 || ^0.2.0-rc || ^0.2.1-rc || ^0.3.0-rc || ^0.4.0-rc`; semver's prerelease rule forces per-patch enumeration — append a comparator when a new rc line ships): the market checks it against the DSH runtime version, while standalone `npm install` is unaffected
145
+ - **Backward compatibility** — the runtime consumes only the stable `BUNDLED_SKILL_RANK` constant, and the host entry's `apply()` tolerates skills-service protocol drift (warning instead of a broken profile load)
143
146
  - **Platform compat layer** — [`src/compat.ts`](src/compat.ts) probes the installed `@bytechain.cn/colamd` version and its `themes/contract.json` for contract drift, and the renderer verifies the export API surface at init; platform upgrades are diagnosed clearly at `cthemes validate`/export time instead of failing cryptically
144
147
  - **Bundle contents** — `dist/` (CLI + host entry), `themes/` (16 contract CSS themes), `skills/` (bundled skill), `cordis.patch.yml`
145
148
 
@@ -377,7 +380,8 @@ ColaMD-themes/
377
380
  ├── .opencode/skills/colamd-themes/SKILL.md # OpenCode skill
378
381
  ├── .openclaw/skills/colamd-themes/SKILL.md # OpenClaw skill
379
382
  ├── .hermes/skills/tools/colamd-themes/ # Hermes skill
380
- ├── .trae/rules/colamd-themes.md # Trae rules
383
+ ├── .trae/rules/colamd-themes.md # Trae rules
384
+ ├── .trae/skills/colamd-themes/ # Trae project skill
381
385
  ├── cordis.patch.yml # DSH plugin bundle patch (dsh-market)
382
386
  ├── package.json
383
387
  ├── tsconfig.json
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bytechain.cn/colamd-themes",
3
- "version": "0.5.3",
3
+ "version": "0.5.4",
4
4
  "description": "Theme development & export tool for ColaMD — extract formatting, generate themes, and export Markdown to HTML/PDF",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -52,7 +52,7 @@
52
52
  }
53
53
  },
54
54
  "dependencies": {
55
- "@bytechain.cn/colamd": "^2.7.8-rc.2",
55
+ "@bytechain.cn/colamd": "^2.7.8",
56
56
  "axios": "^1.7",
57
57
  "chalk": "^5.3",
58
58
  "cheerio": "^1.0",
@@ -101,6 +101,13 @@ prerequisites:
101
101
  commands: [node, npm]
102
102
  ---'
103
103
 
104
+ # Trae project skill constraints: description is a single-line plain scalar,
105
+ # unquoted, with no ": ", "<", or ">" (router-visible trigger text).
106
+ FRONT_TRAE_SKILL='---
107
+ name: colamd-themes
108
+ description: Generate, validate, and export ColaMD contract CSS themes — extract from URLs, DOCX or PDF, export Markdown to HTML or PDF. Use when the user asks to create, validate, export, or manage ColaMD themes.
109
+ ---'
110
+
104
111
  # ── Generator functions ──
105
112
 
106
113
  generate_claude() {
@@ -166,6 +173,16 @@ generate_trae() {
166
173
  echo " → $file"
167
174
  }
168
175
 
176
+ generate_trae_skill() {
177
+ local dir=".trae/skills/colamd-themes"
178
+ mkdir -p "$dir"
179
+ local file="$dir/SKILL.md"
180
+ echo "$FRONT_TRAE_SKILL" > "$file"
181
+ echo "" >> "$file"
182
+ echo "$BODY" >> "$file"
183
+ echo " → $file"
184
+ }
185
+
169
186
  # ── Main ──
170
187
 
171
188
  TARGET="${1:-all}"
@@ -173,23 +190,25 @@ echo "Building skill files from: $SOURCE"
173
190
  echo ""
174
191
 
175
192
  case "$TARGET" in
176
- claude) generate_claude ;;
177
- opencode) generate_opencode ;;
178
- openclaw) generate_openclaw ;;
179
- hermes) generate_hermes ;;
180
- trae) generate_trae ;;
181
- dsh) generate_dsh ;;
193
+ claude) generate_claude ;;
194
+ opencode) generate_opencode ;;
195
+ openclaw) generate_openclaw ;;
196
+ hermes) generate_hermes ;;
197
+ trae) generate_trae ;;
198
+ trae-skill) generate_trae_skill ;;
199
+ dsh) generate_dsh ;;
182
200
  all)
183
201
  generate_claude
184
202
  generate_opencode
185
203
  generate_openclaw
186
204
  generate_hermes
187
205
  generate_trae
206
+ generate_trae_skill
188
207
  generate_dsh
189
208
  ;;
190
209
  *)
191
210
  echo "Unknown agent: $TARGET" >&2
192
- echo "Usage: $0 [claude|opencode|openclaw|hermes|trae|dsh|all]" >&2
211
+ echo "Usage: $0 [claude|opencode|openclaw|hermes|trae|trae-skill|dsh|all]" >&2
193
212
  exit 1
194
213
  ;;
195
214
  esac