prompt-skill-armory 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.
Files changed (2) hide show
  1. package/cli.cjs +14 -6
  2. package/package.json +1 -1
package/cli.cjs CHANGED
@@ -133,16 +133,24 @@ function addBundle(profileDir) {
133
133
  function mountClientPanel(profileDir) {
134
134
  const patchPath = join(profileDir, 'cordis.patch.yml')
135
135
  const existing = existsSync(patchPath) ? readFileSync(patchPath, 'utf8') : ''
136
- const cleanBase = '# Your patch layer for this dsh profile.\n[]\n'
137
- const mount = `# Prompt-SkillArmory client panel.\n- insert:\n - id: ui-switchblade\n name: '@deepseek-ai/dsh-client-ui-switchblade'\n`
138
- // Idempotent ONLY when the patch is already exactly our clean format.
139
- const canonical = `${cleanBase}${mount}`
136
+ // Correct patch format: a TOP-LEVEL YAML array of patch entries. `[]` and
137
+ // `- insert:` cannot coexist in one document (YAML separator error), so we
138
+ // write a pure insert list.
139
+ const canonical = `# Prompt-SkillArmory client panel.\n- insert:\n - id: ui-switchblade\n name: '@deepseek-ai/dsh-client-ui-switchblade'\n`
140
140
  if (existing.replace(/\r/g, '') === canonical) {
141
141
  console.log(` · ui-switchblade already mounted in ${patchPath}`)
142
142
  return
143
143
  }
144
- // Otherwise (missing, empty, or malformed from an older installer) rewrite.
145
- writeFileSync(patchPath, canonical)
144
+ // Preserve any real user entries, dropping an old bare `[]` line.
145
+ const meaningful = existing
146
+ .split('\n')
147
+ .map((l) => l.replace(/\r$/, ''))
148
+ .filter((l) => {
149
+ const t = l.trim()
150
+ return t !== '' && t !== '[]' && !(l.includes('ui-switchblade') && (l.includes('id:') || l.includes('name:') || l.includes('# Prompt-SkillArmory')))
151
+ })
152
+ const base = meaningful.length > 0 ? meaningful.join('\n') + '\n' : ''
153
+ writeFileSync(patchPath, `${base}${canonical}`)
146
154
  console.log(` ✓ mounted ui-switchblade in ${patchPath}`)
147
155
  }
148
156
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "prompt-skill-armory",
3
- "version": "0.5.3",
3
+ "version": "0.5.4",
4
4
  "description": "One-command installer for Prompt-SkillArmory (prompts + skills manager) into a DeepSeek Harness web profile",
5
5
  "type": "module",
6
6
  "bin": {