@orchagent/cli 0.3.108 → 0.3.110

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.
@@ -79,7 +79,7 @@ async function browserBasedLogin(port) {
79
79
  const existing = await (0, config_1.loadConfig)();
80
80
  const isFirstLogin = !existing.api_key;
81
81
  const resolved = await (0, config_1.getResolvedConfig)();
82
- process.stdout.write('Opening browser for authentication...\n');
82
+ process.stdout.write('Opening browser for authentication...\n\n');
83
83
  try {
84
84
  const result = await (0, browser_auth_1.startBrowserAuth)(resolved.apiUrl, port);
85
85
  const nextConfig = {
@@ -851,6 +851,26 @@ function registerPublishCommand(program) {
851
851
  validationErrors.push('timeout_seconds must be a positive integer');
852
852
  }
853
853
  }
854
+ // Validate model_tasks: "default" key required, all values non-empty strings
855
+ if (manifest.model_tasks !== undefined) {
856
+ if (typeof manifest.model_tasks !== 'object' || manifest.model_tasks === null || Array.isArray(manifest.model_tasks)) {
857
+ validationErrors.push('model_tasks must be an object mapping task names to model IDs');
858
+ }
859
+ else {
860
+ const tasks = manifest.model_tasks;
861
+ if (!tasks.default) {
862
+ validationErrors.push('model_tasks must include a "default" key');
863
+ }
864
+ for (const [taskName, modelId] of Object.entries(tasks)) {
865
+ if (typeof modelId !== 'string' || modelId.trim() === '') {
866
+ validationErrors.push(`model_tasks.${taskName} must be a non-empty string (model ID)`);
867
+ }
868
+ if (!/^[a-z0-9_]+$/.test(taskName)) {
869
+ validationErrors.push(`model_tasks key "${taskName}" must contain only lowercase letters, numbers, and underscores`);
870
+ }
871
+ }
872
+ }
873
+ }
854
874
  // Warn about deprecated prompt field
855
875
  if (manifest.prompt) {
856
876
  process.stderr.write(chalk_1.default.yellow('Warning: "prompt" field in orchagent.json is ignored. Use prompt.md file instead.\n'));
@@ -1351,6 +1371,8 @@ function registerPublishCommand(program) {
1351
1371
  allow_local_download: options.localDownload !== false,
1352
1372
  // Environment pinning
1353
1373
  environment: manifest.environment,
1374
+ // Per-task model assignment
1375
+ model_tasks: manifest.model_tasks,
1354
1376
  }, workspaceId);
1355
1377
  }
1356
1378
  catch (err) {
@@ -69,12 +69,14 @@ function healthColor(health) {
69
69
  return chalk_1.default.gray(health);
70
70
  }
71
71
  }
72
- function formatServiceUrl(svc) {
73
- const url = svc.provider_url || svc.cloud_run_url || '-';
74
- if (url !== '-' && svc.infrastructure_provider === 'flyio') {
75
- return `${url} ${chalk_1.default.gray('(internal — not a public endpoint)')}`;
76
- }
77
- return url;
72
+ function formatServiceTier(svc) {
73
+ const tier = svc.service_tier_label;
74
+ if (tier)
75
+ return tier;
76
+ const rawTier = svc.service_tier || 'standard';
77
+ return rawTier === 'performance'
78
+ ? 'Performance (Dedicated 1 vCPU, 512 MB)'
79
+ : 'Standard (Shared CPU, 512 MB)';
78
80
  }
79
81
  function severityColor(severity, message) {
80
82
  switch (severity.toUpperCase()) {
@@ -200,7 +202,7 @@ function registerServiceCommand(program) {
200
202
  process.stdout.write(` ${chalk_1.default.bold('Name:')} ${svc.service_name}\n`);
201
203
  process.stdout.write(` ${chalk_1.default.bold('Agent:')} ${svc.agent_name}@${svc.agent_version}\n`);
202
204
  process.stdout.write(` ${chalk_1.default.bold('State:')} ${stateColor(svc.current_state)}\n`);
203
- process.stdout.write(` ${chalk_1.default.bold('URL:')} ${formatServiceUrl(svc)}\n`);
205
+ process.stdout.write(` ${chalk_1.default.bold('Tier:')} ${formatServiceTier(svc)}\n`);
204
206
  if (options.pin) {
205
207
  process.stdout.write(` ${chalk_1.default.bold('Pinned:')} ${chalk_1.default.yellow(`yes (won't auto-update on publish)`)}\n`);
206
208
  }
@@ -363,8 +365,7 @@ function registerServiceCommand(program) {
363
365
  process.stdout.write(` Fail Streak: ${chalk_1.default.red(String(svc.consecutive_restart_failures))} / ${svc.max_restart_failures}\n`);
364
366
  }
365
367
  process.stdout.write(` Instances: ${svc.min_instances}-${svc.max_instances}\n`);
366
- process.stdout.write(` Service ID: ${svc.provider_service_id || svc.cloud_run_service || '-'}\n`);
367
- process.stdout.write(` URL: ${formatServiceUrl(svc)}\n`);
368
+ process.stdout.write(` Tier: ${formatServiceTier(svc)}\n`);
368
369
  process.stdout.write(` Deployed: ${formatDate(svc.last_deployed_at)}\n`);
369
370
  process.stdout.write(` Last Restart: ${formatDate(svc.last_restart_at)}\n`);
370
371
  if (svc.last_error) {
@@ -130,13 +130,13 @@ async function startBrowserAuth(apiUrl, port = DEFAULT_PORT) {
130
130
  const { auth_url } = await initResponse.json();
131
131
  // Step 2: Start local server to receive callback
132
132
  const tokenPromise = waitForCallback(port, AUTH_TIMEOUT_MS);
133
- // Step 3: Open browser
133
+ // Step 3: Open browser + always show URL as fallback
134
+ process.stdout.write(`\nIf your browser doesn't open, visit this URL:\n${auth_url}\n\n`);
134
135
  try {
135
136
  await (0, open_1.default)(auth_url);
136
137
  }
137
138
  catch {
138
- // If browser fails to open, show the URL for manual opening
139
- process.stdout.write(`\nPlease open this URL in your browser:\n${auth_url}\n\n`);
139
+ // Browser open failed URL already printed above
140
140
  }
141
141
  // Step 4: Wait for callback
142
142
  const token = await tokenPromise;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orchagent/cli",
3
- "version": "0.3.108",
3
+ "version": "0.3.110",
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>",