@orchagent/cli 0.3.110 → 0.3.112

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.
@@ -183,7 +183,33 @@ function registerScheduleCommand(program) {
183
183
  throw new errors_1.CliError('Missing org. Use org/agent format or set default org.');
184
184
  }
185
185
  // Resolve agent to get the ID (pass workspace context for private agents)
186
- const agent = await (0, api_2.getAgentWithFallback)(config, org, ref.agent, ref.version, workspaceId);
186
+ let agent = await (0, api_2.getAgentWithFallback)(config, org, ref.agent, ref.version, workspaceId);
187
+ // Warn if scheduling a non-latest version (skip in --json mode)
188
+ if (ref.version !== 'latest' && !options.json) {
189
+ const allAgents = await (0, api_1.listMyAgents)(config, workspaceId);
190
+ const versions = allAgents
191
+ .filter((a) => a.name === ref.agent)
192
+ .sort((a, b) => new Date(b.created_at).getTime() - new Date(a.created_at).getTime());
193
+ if (versions.length > 1 && versions[0].version !== ref.version) {
194
+ const latest = versions[0];
195
+ const current = versions.find((a) => a.version === ref.version);
196
+ const fmtDate = (iso) => new Date(iso).toLocaleString();
197
+ const currentDate = current ? ` (published ${fmtDate(current.created_at)})` : '';
198
+ const latestDate = ` (published ${fmtDate(latest.created_at)})`;
199
+ process.stdout.write(chalk_1.default.yellow(`\u26a0 Scheduling ${ref.version}${currentDate}. `) +
200
+ `A newer version is available: ${chalk_1.default.bold(latest.version)}${latestDate}.\n`);
201
+ const rl = promises_1.default.createInterface({
202
+ input: process.stdin,
203
+ output: process.stdout,
204
+ });
205
+ const answer = await rl.question(`Use latest (${latest.version}) instead? (Y/n): `);
206
+ rl.close();
207
+ if (answer.trim().toLowerCase() !== 'n' && answer.trim().toLowerCase() !== 'no') {
208
+ agent = latest;
209
+ ref.version = latest.version;
210
+ }
211
+ }
212
+ }
187
213
  // Parse input data (--data is primary, --input is deprecated alias)
188
214
  const rawInput = options.data ?? options.input;
189
215
  let inputData;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orchagent/cli",
3
- "version": "0.3.110",
3
+ "version": "0.3.112",
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>",