@orchagent/cli 0.3.80 → 0.3.81

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.
@@ -524,6 +524,21 @@ function registerPublishCommand(program) {
524
524
  if (!manifest.name) {
525
525
  throw new errors_1.CliError('orchagent.json must have name');
526
526
  }
527
+ // Validate agent name format (must match gateway rules)
528
+ const agentNameRegex = /^[a-z0-9][a-z0-9-]*[a-z0-9]$/;
529
+ const agentName = manifest.name;
530
+ if (agentName.length < 2 || agentName.length > 50) {
531
+ throw new errors_1.CliError('Agent name must be 2-50 characters');
532
+ }
533
+ if (agentName !== agentName.toLowerCase()) {
534
+ throw new errors_1.CliError('Agent name must be lowercase');
535
+ }
536
+ if (agentName.length > 1 && !agentNameRegex.test(agentName)) {
537
+ throw new errors_1.CliError('Agent name must contain only lowercase letters, numbers, and hyphens, and must start/end with a letter or number');
538
+ }
539
+ if (agentName.includes('--')) {
540
+ throw new errors_1.CliError('Agent name must not contain consecutive hyphens');
541
+ }
527
542
  const { canonicalType, rawType } = canonicalizeManifestType(manifest.type);
528
543
  const runMode = normalizeRunMode(manifest.run_mode);
529
544
  const executionEngine = inferExecutionEngineFromManifest(manifest, rawType);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orchagent/cli",
3
- "version": "0.3.80",
3
+ "version": "0.3.81",
4
4
  "description": "Command-line interface for orchagent — deploy and run AI agents for your team",
5
5
  "license": "MIT",
6
6
  "author": "orchagent <hello@orchagent.io>",