@solidactions/cli 3.19.0 → 3.20.0

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.
@@ -152,6 +152,7 @@ exports.READONLY_COMMANDS = new Set([
152
152
  'ai init',
153
153
  'ai examples',
154
154
  'skill pull',
155
+ 'role pull',
155
156
  'skill list',
156
157
  'skill view',
157
158
  // Fetches crew variables (read) and runs the working copy locally, like
@@ -4,7 +4,7 @@
4
4
  *
5
5
  * Composes two existing MCP actions: crews_skills.read resolves a skill name to
6
6
  * its doc_id and reports whether the current revision is unpublished, and
7
- * crews_versions.take_snapshot promotes that revision to all agents.
7
+ * crews_history_manage.take_doc_snapshot promotes that revision to all agents.
8
8
  */
9
9
  var __importDefault = (this && this.__importDefault) || function (mod) {
10
10
  return (mod && mod.__esModule) ? mod : { "default": mod };
@@ -15,11 +15,11 @@ exports.publishSkillByName = publishSkillByName;
15
15
  exports.emitPublishOutcome = emitPublishOutcome;
16
16
  const chalk_1 = __importDefault(require("chalk"));
17
17
  const mcp_1 = require("./mcp");
18
- /** Snapshot a skill by its doc_id (crews_versions.take_snapshot). */
18
+ /** Snapshot a skill by its doc_id (crews_history_manage.take_doc_snapshot). */
19
19
  async function publishSkillByDocId(config, docId) {
20
20
  let result;
21
21
  try {
22
- result = await (0, mcp_1.callCrewsTool)(config, 'crews_versions', { action: 'take_snapshot', doc_id: docId });
22
+ result = await (0, mcp_1.callCrewsTool)(config, 'crews_history_manage', { action: 'take_doc_snapshot', doc_id: docId });
23
23
  }
24
24
  catch (e) {
25
25
  return { status: 'error', code: 'mcp_request_failed', message: e.message };
@@ -35,10 +35,19 @@ async function publishSkillByDocId(config, docId) {
35
35
  * read response, NOT the take_snapshot error code (the server maps both
36
36
  * "nothing to snapshot" and "live-mode" to the same not_snapshotable code).
37
37
  */
38
- async function publishSkillByName(config, name) {
38
+ async function publishSkillByName(config, name, opts = {}) {
39
39
  let read;
40
40
  try {
41
- read = await (0, mcp_1.callCrewsTool)(config, 'skills', { action: 'read', identifier: name });
41
+ if (opts.role) {
42
+ // Role-scoped skill: addressed by role + name (in_crew disambiguates the role).
43
+ const args = { action: 'read_skill', role: opts.role, name };
44
+ if (opts.inCrew)
45
+ args.in_crew = opts.inCrew;
46
+ read = await (0, mcp_1.callCrewsTool)(config, 'roles', args);
47
+ }
48
+ else {
49
+ read = await (0, mcp_1.callCrewsTool)(config, 'skills', { action: 'read', identifier: name });
50
+ }
42
51
  }
43
52
  catch (e) {
44
53
  return { status: 'error', code: 'mcp_request_failed', message: e.message };
@@ -81,7 +90,7 @@ function emitPublishOutcome(name, outcome, opts = {}) {
81
90
  const prefix = opts.pushed ? 'pushed, but publish failed — ' : '';
82
91
  process.stderr.write(chalk_1.default.red(`${prefix}${outcome.code}: ${outcome.message}\n`));
83
92
  if (opts.pushed) {
84
- process.stderr.write(chalk_1.default.yellow(` The skill was pushed. Retry: solidactions skill publish ${name}\n`));
93
+ process.stderr.write(chalk_1.default.yellow(` The skill was pushed. Retry: solidactions skill publish ${name}${opts.role ? ` --role ${opts.role}` : ''}${opts.role && opts.inCrew ? ` --in-crew ${opts.inCrew}` : ''}\n`));
85
94
  }
86
95
  process.exit(1);
87
96
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@solidactions/cli",
3
- "version": "3.19.0",
3
+ "version": "3.20.0",
4
4
  "description": "SolidActions CLI - Deploy and manage workflow automation",
5
5
  "main": "dist/index.js",
6
6
  "bin": {