@orchagent/cli 0.3.26 → 0.3.28

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.
@@ -1,37 +1,4 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || (function () {
19
- var ownKeys = function(o) {
20
- ownKeys = Object.getOwnPropertyNames || function (o) {
21
- var ar = [];
22
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
- return ar;
24
- };
25
- return ownKeys(o);
26
- };
27
- return function (mod) {
28
- if (mod && mod.__esModule) return mod;
29
- var result = {};
30
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
- __setModuleDefault(result, mod);
32
- return result;
33
- };
34
- })();
35
2
  var __importDefault = (this && this.__importDefault) || function (mod) {
36
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
37
4
  };
@@ -208,27 +175,6 @@ argument or --file option instead.
208
175
  if (!org) {
209
176
  throw new errors_1.CliError('Missing org. Use org/agent or set default org.');
210
177
  }
211
- // First-use confirmation when workspace is active (and user didn't specify explicit org)
212
- if (configFile.workspace && !configFile.workspace_confirmed && !parsed.org) {
213
- // Only prompt in interactive mode (TTY)
214
- if (process.stdin.isTTY) {
215
- const readline = await Promise.resolve().then(() => __importStar(require('readline')));
216
- const rl = readline.createInterface({
217
- input: process.stdin,
218
- output: process.stderr,
219
- });
220
- const answer = await new Promise((resolve) => {
221
- rl.question(`Using workspace: ${configFile.workspace}. Continue? [Y/n]: `, resolve);
222
- });
223
- rl.close();
224
- if (answer.toLowerCase() === 'n') {
225
- throw new errors_1.CliError('Cancelled. Use explicit org/agent or `orch workspace use <slug>`.');
226
- }
227
- // Save confirmation so we don't prompt again until workspace changes
228
- configFile.workspace_confirmed = true;
229
- await (0, config_1.saveConfig)(configFile);
230
- }
231
- }
232
178
  const agentMeta = await (0, api_1.getAgentWithFallback)(resolved, org, parsed.agent, parsed.version);
233
179
  const endpoint = options.endpoint?.trim() || agentMeta.default_endpoint || 'analyze';
234
180
  const headers = {
@@ -90,7 +90,8 @@ function registerInstallCommand(program) {
90
90
  };
91
91
  const resolved = await (0, config_1.getResolvedConfig)();
92
92
  const parsed = parseAgentRef(agentArg);
93
- const org = parsed.org ?? resolved.defaultOrg;
93
+ const configFile = await (0, config_1.loadConfig)();
94
+ const org = parsed.org ?? configFile.workspace ?? resolved.defaultOrg;
94
95
  if (!org) {
95
96
  if (jsonMode) {
96
97
  result.errors.push('Missing org. Use org/agent format or set default org.');
@@ -821,27 +821,6 @@ Note: Use 'run' for local execution, 'call' for server-side execution.
821
821
  if (!org) {
822
822
  throw new errors_1.CliError('Missing org. Use org/agent format.');
823
823
  }
824
- // First-use confirmation when workspace is active (and user didn't specify explicit org)
825
- if (configFile.workspace && !configFile.workspace_confirmed && !parsed.org) {
826
- // Only prompt in interactive mode (TTY)
827
- if (process.stdin.isTTY) {
828
- const readline = await Promise.resolve().then(() => __importStar(require('readline')));
829
- const rl = readline.createInterface({
830
- input: process.stdin,
831
- output: process.stderr,
832
- });
833
- const answer = await new Promise((resolve) => {
834
- rl.question(`Using workspace: ${configFile.workspace}. Continue? [Y/n]: `, resolve);
835
- });
836
- rl.close();
837
- if (answer.toLowerCase() === 'n') {
838
- throw new errors_1.CliError('Cancelled. Use explicit org/agent or `orch workspace use <slug>`.');
839
- }
840
- // Save confirmation so we don't prompt again until workspace changes
841
- configFile.workspace_confirmed = true;
842
- await (0, config_1.saveConfig)(configFile);
843
- }
844
- }
845
824
  // Download agent definition with spinner
846
825
  const agentData = await (0, spinner_1.withSpinner)(`Downloading ${org}/${parsed.agent}@${parsed.version}...`, async () => {
847
826
  try {
@@ -289,7 +289,8 @@ Instructions and guidance for AI agents...
289
289
  }
290
290
  }
291
291
  const parsed = parseSkillRef(skillRef);
292
- const org = parsed.org ?? resolved.defaultOrg;
292
+ const configFile = await (0, config_1.loadConfig)();
293
+ const org = parsed.org ?? configFile.workspace ?? resolved.defaultOrg;
293
294
  if (!org) {
294
295
  const errMsg = 'Missing org. Use org/skill or set default org.';
295
296
  if (jsonMode) {
@@ -442,7 +443,8 @@ ${skillData.prompt}
442
443
  };
443
444
  const resolved = await (0, config_1.getResolvedConfig)();
444
445
  const parsed = parseSkillRef(skillRef);
445
- const org = parsed.org ?? resolved.defaultOrg;
446
+ const configFile = await (0, config_1.loadConfig)();
447
+ const org = parsed.org ?? configFile.workspace ?? resolved.defaultOrg;
446
448
  if (!org) {
447
449
  const errMsg = 'Missing org. Use org/skill or set default org.';
448
450
  if (jsonMode) {
@@ -85,7 +85,6 @@ async function useWorkspace(slug) {
85
85
  // Save to config
86
86
  const configFile = await (0, config_1.loadConfig)();
87
87
  configFile.workspace = slug;
88
- delete configFile.workspace_confirmed;
89
88
  await (0, config_1.saveConfig)(configFile);
90
89
  await (0, analytics_1.track)('cli_workspace_use', { slug });
91
90
  process.stdout.write(chalk_1.default.green('\u2713') + ` Now using workspace: ${workspace.name} (${workspace.slug})\n`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orchagent/cli",
3
- "version": "0.3.26",
3
+ "version": "0.3.28",
4
4
  "description": "Command-line interface for the orchagent AI agent marketplace",
5
5
  "license": "MIT",
6
6
  "author": "orchagent <hello@orchagent.io>",