@orchagent/cli 0.2.21 → 0.2.22

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.
@@ -69,10 +69,15 @@ function registerPublishCommand(program) {
69
69
  .option('--private', 'Make agent private (deprecated: now the default)')
70
70
  .option('--profile <name>', 'Use API key from named profile')
71
71
  .option('--dry-run', 'Show what would be published without making changes')
72
+ .option('--skills <skills>', 'Default skills (comma-separated, e.g., org/skill@v1,org/other@v1)')
73
+ .option('--skills-locked', 'Lock default skills (callers cannot override via headers)')
72
74
  .action(async (options) => {
73
75
  if (options.private) {
74
76
  process.stderr.write('Warning: --private is deprecated (private is now the default). You can safely remove it.\n');
75
77
  }
78
+ const skillsFromFlag = options.skills
79
+ ? options.skills.split(',').map(s => s.trim()).filter(Boolean)
80
+ : undefined;
76
81
  const config = await (0, config_1.getResolvedConfig)({}, options.profile);
77
82
  const cwd = process.cwd();
78
83
  // Check for SKILL.md first (skills take precedence)
@@ -111,6 +116,8 @@ function registerPublishCommand(program) {
111
116
  prompt: skillData.body,
112
117
  is_public: options.public ? true : false,
113
118
  supported_providers: ['any'],
119
+ default_skills: skillsFromFlag,
120
+ skills_locked: options.skillsLocked || undefined,
114
121
  });
115
122
  const skillVersion = skillResult.agent?.version || 'v1';
116
123
  await (0, analytics_1.track)('cli_publish', { agent_type: 'skill' });
@@ -261,6 +268,14 @@ function registerPublishCommand(program) {
261
268
  process.stderr.write(` Version: ${versionInfo}\n`);
262
269
  process.stderr.write(` Visibility: ${options.public ? 'public' : 'private'}\n`);
263
270
  process.stderr.write(` Providers: ${supportedProviders.join(', ')}\n`);
271
+ const effectiveSkills = skillsFromFlag || manifest.default_skills;
272
+ const effectiveLocked = manifest.skills_locked || options.skillsLocked;
273
+ if (effectiveLocked) {
274
+ process.stderr.write(` Skills: ${effectiveSkills?.join(', ') || '(none)'} [LOCKED]\n`);
275
+ }
276
+ else if (effectiveSkills?.length) {
277
+ process.stderr.write(` Skills: ${effectiveSkills.join(', ')}\n`);
278
+ }
264
279
  process.stderr.write(`\nWould publish: ${preview.org_slug}/${manifest.name}@${preview.next_version}\n`);
265
280
  if (shouldUploadBundle) {
266
281
  const bundlePreview = await (0, bundle_1.previewBundle)(cwd, {
@@ -295,6 +310,8 @@ function registerPublishCommand(program) {
295
310
  sdk_compatible: sdkCompatible || undefined,
296
311
  // Orchestration manifest (includes dependencies)
297
312
  manifest: manifest.manifest,
313
+ default_skills: skillsFromFlag || manifest.default_skills,
314
+ skills_locked: manifest.skills_locked || options.skillsLocked || undefined,
298
315
  });
299
316
  const assignedVersion = result.agent?.version || 'v1';
300
317
  const agentId = result.agent?.id;
@@ -728,6 +728,23 @@ Note: Use 'run' for local execution, 'call' for server-side execution.
728
728
  await downloadDependenciesRecursively(resolved, depStatuses);
729
729
  process.stderr.write(`\nAll dependencies downloaded.\n`);
730
730
  }
731
+ // Check if user is overriding locked skills
732
+ const agentSkillsLocked = agentData.skills_locked;
733
+ if (agentSkillsLocked && (options.noSkills || options.skillsOnly)) {
734
+ const readline = await Promise.resolve().then(() => __importStar(require('readline')));
735
+ const rl = readline.createInterface({ input: process.stdin, output: process.stderr });
736
+ const answer = await new Promise(resolve => {
737
+ rl.question(`\nWarning: Author locked skills for this agent.\n` +
738
+ `Default skills: ${agentData.default_skills?.join(', ') || '(none)'}\n` +
739
+ `Override anyway? [y/N] `, resolve);
740
+ });
741
+ rl.close();
742
+ if (answer.toLowerCase() !== 'y') {
743
+ process.stderr.write('Aborted. Running with author\'s locked skills.\n');
744
+ options.noSkills = false;
745
+ options.skillsOnly = undefined;
746
+ }
747
+ }
731
748
  // Save locally
732
749
  const agentDir = await saveAgentLocally(org, parsed.agent, agentData);
733
750
  process.stderr.write(`\nAgent saved to: ${agentDir}\n`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orchagent/cli",
3
- "version": "0.2.21",
3
+ "version": "0.2.22",
4
4
  "description": "Command-line interface for the OrchAgent AI agent marketplace",
5
5
  "license": "MIT",
6
6
  "author": "OrchAgent <hello@orchagent.io>",