prompt-skill-armory 0.4.3 → 0.4.5

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 +31 -0
  2. package/package.json +1 -1
package/cli.cjs CHANGED
@@ -27,6 +27,20 @@ const BUNDLED = join(here, 'packages')
27
27
  /** Harness home; default ~/.dsh, overridable via DSH_HOME. */
28
28
  const dshHome = process.env.DSH_HOME ?? join(homedir(), '.dsh')
29
29
  const profilesDir = join(dshHome, 'profiles')
30
+ const settingsPath = join(dshHome, 'settings.yaml')
31
+
32
+ /** Desktop client's settings limit (from its diagnostics). */
33
+ const SETTINGS_LIMIT = 4 * 1024 * 1024
34
+
35
+ /** Warn if the harness settings document is oversized or has stale blobs. */
36
+ function healthCheck() {
37
+ if (!existsSync(settingsPath)) return
38
+ const size = readFileSync(settingsPath, 'utf8').length
39
+ if (size > SETTINGS_LIMIT) {
40
+ console.error(` ⚠ settings.yaml is ${(size / 1024 / 1024).toFixed(1)}MB — over the ${4}MB client limit.`)
41
+ console.error(' Remove large blobs (e.g. a stale pendingZip) or the client may enter recovery mode.')
42
+ }
43
+ }
30
44
 
31
45
  const HOST_BUNDLE = '@deepseek-ai/dsh-switchblade'
32
46
 
@@ -82,6 +96,21 @@ function addBundle(profileDir) {
82
96
  }
83
97
  }
84
98
 
99
+ /** Mount the client panel via the profile's cordis.patch.yml. */
100
+ function mountClientPanel(profileDir) {
101
+ const patchPath = join(profileDir, 'cordis.patch.yml')
102
+ const existing = existsSync(patchPath) ? readFileSync(patchPath, 'utf8') : '[]'
103
+ if (existing.includes('ui-switchblade')) {
104
+ console.log(` · ui-switchblade already mounted in ${patchPath}`)
105
+ return
106
+ }
107
+ const mount = `# Prompt-SkillArmory: mount the Web panel (client half).\n- insert:\n - id: ui-switchblade\n name: '@deepseek-ai/dsh-client-ui-switchblade'\n`
108
+ // Append after the existing patch list (or start fresh if it was just `[]`).
109
+ const base = existing.trim() === '[]' ? '' : existing.replace(/\s*$/, '\n')
110
+ writeFileSync(patchPath, `${base}${mount}`)
111
+ console.log(` ✓ mounted ui-switchblade in ${patchPath}`)
112
+ }
113
+
85
114
  function main() {
86
115
  console.log('Prompt-SkillArmory installer')
87
116
  console.log(` harness home: ${dshHome}`)
@@ -89,6 +118,7 @@ function main() {
89
118
  console.log(' (postinstall hook — no profile install here)')
90
119
  return
91
120
  }
121
+ healthCheck()
92
122
 
93
123
  const pkgs = bundledPackages()
94
124
  if (pkgs.length === 0) {
@@ -107,6 +137,7 @@ function main() {
107
137
  console.log(` profile: ${profileDir}`)
108
138
  for (const pkg of pkgs) installPackage(pkg, profileDir)
109
139
  addBundle(profileDir)
140
+ mountClientPanel(profileDir)
110
141
  }
111
142
 
112
143
  console.log('')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "prompt-skill-armory",
3
- "version": "0.4.3",
3
+ "version": "0.4.5",
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": {