@orchagent/cli 0.3.80 → 0.3.82
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/dist/commands/publish.js +15 -0
- package/dist/commands/run.js +8 -0
- package/package.json +1 -1
package/dist/commands/publish.js
CHANGED
|
@@ -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/dist/commands/run.js
CHANGED
|
@@ -1826,6 +1826,14 @@ async function executeCloud(agentRef, file, options) {
|
|
|
1826
1826
|
...(options.model && { model: options.model }),
|
|
1827
1827
|
};
|
|
1828
1828
|
}
|
|
1829
|
+
else if (effectiveProvider || options.model) {
|
|
1830
|
+
// No local key, but user specified --provider or --model.
|
|
1831
|
+
// Send preferences so the gateway uses the right vault key.
|
|
1832
|
+
llmCredentials = {
|
|
1833
|
+
...(effectiveProvider && { provider: effectiveProvider }),
|
|
1834
|
+
...(options.model && { model: options.model }),
|
|
1835
|
+
};
|
|
1836
|
+
}
|
|
1829
1837
|
else if (cloudEngine !== 'code_runtime') {
|
|
1830
1838
|
const searchedProviders = effectiveProvider ? [effectiveProvider] : supportedProviders;
|
|
1831
1839
|
const providerList = searchedProviders.join(', ');
|
package/package.json
CHANGED