openpersona 0.14.2 → 0.14.3

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/bin/cli.js CHANGED
@@ -25,7 +25,7 @@ const PRESETS_DIR = path.join(PKG_ROOT, 'presets');
25
25
  program
26
26
  .name('openpersona')
27
27
  .description('OpenPersona - Create, manage, and orchestrate agent personas')
28
- .version('0.14.2');
28
+ .version('0.14.3');
29
29
 
30
30
  if (process.argv.length === 2) {
31
31
  process.argv.push('create');
package/lib/utils.js CHANGED
@@ -116,67 +116,73 @@ function syncHeartbeat(config, manifestPath) {
116
116
  }
117
117
 
118
118
  /**
119
- * Install an external package from ClawHub or skills.sh.
120
- * Shared by installer and switcher for all four layers.
119
+ * Collect soft-ref hint from a layer entry (has `install` field).
120
+ * Does NOT execute any install decision is left to the agent or user at runtime.
121
121
  *
122
122
  * @param {object} entry - Layer entry with optional `install` field (e.g. "clawhub:pkg")
123
123
  * @param {string} layerName - Layer label for logging (e.g. "faculty", "skill", "body")
124
- * @returns {boolean} true if installation was attempted
124
+ * @returns {{ name: string, install: string, layerName: string }|null}
125
125
  */
126
126
  function installExternal(entry, layerName) {
127
- if (!entry || !entry.install) return false;
128
- const { execSync } = require('child_process');
127
+ if (!entry || !entry.install) return null;
129
128
  const [source, pkg] = entry.install.split(':', 2);
130
- if (!pkg || !SAFE_NAME_RE.test(pkg)) {
131
- printWarning(`[${layerName}] Skipping invalid install target: ${entry.install}`);
132
- return false;
133
- }
134
- try {
135
- if (source === 'clawhub') {
136
- execSync(`npx clawhub@latest install ${pkg}`, { stdio: 'inherit' });
137
- printSuccess(`[${layerName}] Installed from ClawHub: ${pkg}`);
138
- } else if (source === 'skillssh') {
139
- execSync(`npx skills add ${pkg}`, { stdio: 'inherit' });
140
- printSuccess(`[${layerName}] Installed from skills.sh: ${pkg}`);
141
- } else {
142
- printWarning(`[${layerName}] Unknown source "${source}" for ${entry.name || pkg} — skipping`);
143
- return false;
144
- }
145
- return true;
146
- } catch (e) {
147
- printWarning(`[${layerName}] Failed to install ${entry.name || pkg} (${entry.install}): ${e.message}`);
148
- return false;
149
- }
129
+ if (!pkg || !SAFE_NAME_RE.test(pkg)) return null;
130
+ return { name: entry.name || pkg, install: entry.install, source, pkg, layerName };
150
131
  }
151
132
 
152
133
  /**
153
- * Scan all four layers for `install` fields and install external packages.
134
+ * Scan all four layers for soft-ref `install` fields and print hints.
135
+ * Never auto-installs — autonomous agents handle this at runtime when capabilities are needed.
154
136
  *
155
137
  * @param {object} layers - The layers object from manifest.json (soul, body, faculties, skills)
156
138
  */
157
139
  function installAllExternal(layers) {
158
- // Soul layer — object form with install
140
+ const hints = [];
141
+
142
+ // Soul layer
159
143
  const soul = layers.soul || null;
160
144
  if (soul && typeof soul === 'object') {
161
- installExternal(soul, 'soul');
145
+ const h = installExternal(soul, 'soul');
146
+ if (h) hints.push(h);
162
147
  }
163
148
 
164
- // Body layer — object form with install
149
+ // Body layer
165
150
  const body = layers.body || null;
166
151
  if (body && typeof body === 'object') {
167
- installExternal(body, 'body');
152
+ const h = installExternal(body, 'body');
153
+ if (h) hints.push(h);
168
154
  }
169
155
 
170
156
  // Faculty layer
171
157
  const faculties = Array.isArray(layers.faculties) ? layers.faculties : [];
172
158
  for (const f of faculties) {
173
- installExternal(f, 'faculty');
159
+ const h = installExternal(f, 'faculty');
160
+ if (h) hints.push(h);
174
161
  }
175
162
 
176
163
  // Skill layer
177
164
  const skills = Array.isArray(layers.skills) ? layers.skills : [];
178
165
  for (const s of skills) {
179
- installExternal(s, 'skill');
166
+ const h = installExternal(s, 'skill');
167
+ if (h) hints.push(h);
168
+ }
169
+
170
+ // Print soft-ref hints — no auto-install
171
+ if (hints.length > 0) {
172
+ printInfo('');
173
+ printInfo('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━');
174
+ printInfo(' Optional capabilities declared by this persona:');
175
+ for (const h of hints) {
176
+ const cmd = h.source === 'clawhub'
177
+ ? `npx openpersona install ${h.pkg}`
178
+ : h.source === 'skillssh'
179
+ ? `npx skills add ${h.pkg}`
180
+ : `# ${h.install}`;
181
+ printInfo(` [${h.layerName}] ${h.name}`);
182
+ printInfo(` To enable: ${cmd}`);
183
+ }
184
+ printInfo(' Autonomous agents (e.g. OpenClaw) can install these on demand.');
185
+ printInfo('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━');
180
186
  }
181
187
  }
182
188
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openpersona",
3
- "version": "0.14.2",
3
+ "version": "0.14.3",
4
4
  "description": "Open four-layer agent framework — Soul/Body/Faculty/Skill. Create, manage, and orchestrate agent personas.",
5
5
  "main": "lib/generator.js",
6
6
  "bin": {
@@ -57,6 +57,6 @@
57
57
  },
58
58
  "meta": {
59
59
  "framework": "openpersona",
60
- "frameworkVersion": "0.14.2"
60
+ "frameworkVersion": "0.14.3"
61
61
  }
62
62
  }
@@ -57,6 +57,6 @@
57
57
  },
58
58
  "meta": {
59
59
  "framework": "openpersona",
60
- "frameworkVersion": "0.14.2"
60
+ "frameworkVersion": "0.14.3"
61
61
  }
62
62
  }
@@ -62,6 +62,6 @@
62
62
  },
63
63
  "meta": {
64
64
  "framework": "openpersona",
65
- "frameworkVersion": "0.14.2"
65
+ "frameworkVersion": "0.14.3"
66
66
  }
67
67
  }
@@ -61,6 +61,6 @@
61
61
  },
62
62
  "meta": {
63
63
  "framework": "openpersona",
64
- "frameworkVersion": "0.14.2"
64
+ "frameworkVersion": "0.14.3"
65
65
  }
66
66
  }
@@ -64,6 +64,6 @@
64
64
  },
65
65
  "meta": {
66
66
  "framework": "openpersona",
67
- "frameworkVersion": "0.14.2"
67
+ "frameworkVersion": "0.14.3"
68
68
  }
69
69
  }
@@ -43,6 +43,6 @@
43
43
  },
44
44
  "meta": {
45
45
  "framework": "openpersona",
46
- "frameworkVersion": "0.14.2"
46
+ "frameworkVersion": "0.14.3"
47
47
  }
48
48
  }
@@ -4,7 +4,7 @@ description: >
4
4
  Meta-skill for building and managing agent persona skill packs.
5
5
  Use when the user wants to create a new agent persona, install/manage
6
6
  existing personas, or publish persona skill packs to ClawHub.
7
- version: "0.14.2"
7
+ version: "0.14.3"
8
8
  author: openpersona
9
9
  repository: https://github.com/acnlabs/OpenPersona
10
10
  tags: [persona, agent, skill-pack, meta-skill, agent-agnostic, openclaw]