@copado/agentia-cli 1.0.0-rc.0 → 1.0.0

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,3 +1,4 @@
1
+ import { Flags } from '@oclif/core';
1
2
  import { AgentiaCommand } from '../lib/agentia-command.js';
2
3
  import { AuthSetError } from '../lib/auth-config.js';
3
4
  import { isPromptCanceled } from '../lib/setup-prompts.js';
@@ -6,12 +7,22 @@ export default class Setup extends AgentiaCommand {
6
7
  static description = [
7
8
  'Prepare this machine and the current project for Agentia.',
8
9
  'Guides CICD, AI, and CRT authentication, Cursor MCP, local quality gates, and AGENTS.md.',
10
+ 'Use --skip-auth to skip authentication and continue with Cursor MCP and project setup.',
9
11
  'Git is optional: .gitignore is updated only inside a repository, and generated files are not committed.',
10
12
  ].join(' ');
11
13
  static enableJsonFlag = false;
12
- static examples = ['<%= config.bin %> <%= command.id %>'];
14
+ static examples = [
15
+ '<%= config.bin %> <%= command.id %>',
16
+ '<%= config.bin %> <%= command.id %> --skip-auth',
17
+ ];
18
+ static flags = {
19
+ 'skip-auth': Flags.boolean({
20
+ default: false,
21
+ description: 'Skip CICD, AI, and CRT authentication; continue with Cursor MCP and project setup',
22
+ }),
23
+ };
13
24
  async run() {
14
- await this.parse(Setup);
25
+ const { flags } = await this.parse(Setup);
15
26
  try {
16
27
  return await runSetupWizard({
17
28
  bin: this.config.bin,
@@ -20,6 +31,7 @@ export default class Setup extends AgentiaCommand {
20
31
  this.log(message);
21
32
  });
22
33
  },
34
+ skipAuth: flags['skip-auth'],
23
35
  withSpinner: (message, action) => this.withSpinner(message, action),
24
36
  });
25
37
  }
@@ -12,21 +12,25 @@ export default class Update extends AgentiaCommand {
12
12
  ];
13
13
  static flags = {
14
14
  channel: Flags.option({
15
- description: 'npm dist-tag to check (rc or latest). Omit to auto-select: prerelease installs compare rc and latest; stable installs use latest only.',
15
+ description: 'npm dist-tag to check or install (rc or latest). Also saves that channel as the preferred update channel when an install runs. Omit to auto-select from the stored preference or install type: prerelease installs and an rc preference compare rc and latest; stable installs with a latest preference (or no preference) use latest only.',
16
16
  options: ['rc', 'latest'],
17
17
  })(),
18
18
  check: Flags.boolean({
19
- description: 'Check for an update without installing it',
19
+ description: 'Check for an update without installing it or changing the preferred channel',
20
20
  }),
21
21
  };
22
22
  async run() {
23
23
  const { flags } = await this.parse(Update);
24
24
  const requestedChannel = flags.channel ?? 'auto';
25
- const result = await this.withSpinner(flags.check ? 'Checking for Agentia CLI updates' : 'Updating Agentia CLI', () => runCliUpdate({
25
+ const interactive = !this.jsonEnabled() && Boolean(process.stdin.isTTY);
26
+ const result = await runCliUpdate({
27
+ binName: this.config.bin,
26
28
  channel: requestedChannel,
27
29
  checkOnly: flags.check,
28
30
  currentVersion: this.config.version,
29
- }));
31
+ interactive,
32
+ withProgress: (message, action) => this.withSpinner(message, action),
33
+ });
30
34
  this.display(() => {
31
35
  if (result.updated) {
32
36
  this.log(`Updated Agentia CLI from ${result.currentVersion} to ${result.latestVersion}. Re-run \`agentia --version\` to verify the new installation.`);
@@ -41,6 +45,9 @@ export default class Update extends AgentiaCommand {
41
45
  this.log(`Agentia CLI ${result.currentVersion} is already current on the ${result.channel} channel.`);
42
46
  }
43
47
  });
48
+ if (result.skillsUpdateReminder !== undefined) {
49
+ this.warn(result.skillsUpdateReminder);
50
+ }
44
51
  return result;
45
52
  }
46
53
  }
@@ -6,6 +6,11 @@ const npmExecutable = modules["cli-update.js"]["npmExecutable"]
6
6
  const npmPackageScope = modules["cli-update.js"]["npmPackageScope"]
7
7
  const npmRegistryArguments = modules["cli-update.js"]["npmRegistryArguments"]
8
8
  const npmUpdateArguments = modules["cli-update.js"]["npmUpdateArguments"]
9
+ const promptUpdateChannelPreference = modules["cli-update.js"]["promptUpdateChannelPreference"]
9
10
  const runCliUpdate = modules["cli-update.js"]["runCliUpdate"]
10
11
  const setCliUpdateExecutorForTests = modules["cli-update.js"]["setCliUpdateExecutorForTests"]
11
- export {CliUpdateError, executeNpmUpdate, npmExecOptions, npmExecutable, npmPackageScope, npmRegistryArguments, npmUpdateArguments, runCliUpdate, setCliUpdateExecutorForTests};
12
+ const setUpdateChannelPreferenceStoreForTests = modules["cli-update.js"]["setUpdateChannelPreferenceStoreForTests"]
13
+ const setUpdateChannelPromptForTests = modules["cli-update.js"]["setUpdateChannelPromptForTests"]
14
+ const shouldPromptUpdateChannel = modules["cli-update.js"]["shouldPromptUpdateChannel"]
15
+ const skillsUpdateReminderMessage = modules["cli-update.js"]["skillsUpdateReminderMessage"]
16
+ export {CliUpdateError, executeNpmUpdate, npmExecOptions, npmExecutable, npmPackageScope, npmRegistryArguments, npmUpdateArguments, promptUpdateChannelPreference, runCliUpdate, setCliUpdateExecutorForTests, setUpdateChannelPreferenceStoreForTests, setUpdateChannelPromptForTests, shouldPromptUpdateChannel, skillsUpdateReminderMessage};
@@ -20,6 +20,7 @@ const readLastWorkItemId = modules["defaults-store.js"]["readLastWorkItemId"]
20
20
  const readLastWorkItemTitle = modules["defaults-store.js"]["readLastWorkItemTitle"]
21
21
  const readSkipNestedMetadataDetection = modules["defaults-store.js"]["readSkipNestedMetadataDetection"]
22
22
  const readSkipPullRequest = modules["defaults-store.js"]["readSkipPullRequest"]
23
+ const readUpdateChannel = modules["defaults-store.js"]["readUpdateChannel"]
23
24
  const readUserContext = modules["defaults-store.js"]["readUserContext"]
24
25
  const readWorkPushRetryTimeoutSeconds = modules["defaults-store.js"]["readWorkPushRetryTimeoutSeconds"]
25
26
  const resetDefaultsStorePathsForTests = modules["defaults-store.js"]["resetDefaultsStorePathsForTests"]
@@ -31,5 +32,6 @@ const writeCredentialSyncReceipt = modules["defaults-store.js"]["writeCredential
31
32
  const writeDefaults = modules["defaults-store.js"]["writeDefaults"]
32
33
  const writeLastCommitSelections = modules["defaults-store.js"]["writeLastCommitSelections"]
33
34
  const writeLastWorkSelection = modules["defaults-store.js"]["writeLastWorkSelection"]
35
+ const writeUpdateChannel = modules["defaults-store.js"]["writeUpdateChannel"]
34
36
  const writeUserContext = modules["defaults-store.js"]["writeUserContext"]
35
- export {DEFAULT_WORK_PUSH_RETRY_TIMEOUT_SECONDS, clearCredentialSyncReceipt, clearLastKeysFromUserConfig, clearUserContext, getDefaultsStorePaths, isValidUserContext, migrateUserSettingsFromProjectConfig, readCredentialSyncReceipt, readDefaults, readEnableLocalPromote, readLastApexTestClassesSelected, readLastBaseBranch, readLastDevOrgBranch, readLastFullMetadataSelected, readLastPermissionSelected, readLastPullRequestBaseUrl, readLastWorkItem, readLastWorkItemId, readLastWorkItemTitle, readSkipNestedMetadataDetection, readSkipPullRequest, readUserContext, readWorkPushRetryTimeoutSeconds, resetDefaultsStorePathsForTests, resolveDefaults, setDefaultsStorePathsForTests, setDefaultsStoreProjectRoot, unsetDefaults, writeCredentialSyncReceipt, writeDefaults, writeLastCommitSelections, writeLastWorkSelection, writeUserContext};
37
+ export {DEFAULT_WORK_PUSH_RETRY_TIMEOUT_SECONDS, clearCredentialSyncReceipt, clearLastKeysFromUserConfig, clearUserContext, getDefaultsStorePaths, isValidUserContext, migrateUserSettingsFromProjectConfig, readCredentialSyncReceipt, readDefaults, readEnableLocalPromote, readLastApexTestClassesSelected, readLastBaseBranch, readLastDevOrgBranch, readLastFullMetadataSelected, readLastPermissionSelected, readLastPullRequestBaseUrl, readLastWorkItem, readLastWorkItemId, readLastWorkItemTitle, readSkipNestedMetadataDetection, readSkipPullRequest, readUpdateChannel, readUserContext, readWorkPushRetryTimeoutSeconds, resetDefaultsStorePathsForTests, resolveDefaults, setDefaultsStorePathsForTests, setDefaultsStoreProjectRoot, unsetDefaults, writeCredentialSyncReceipt, writeDefaults, writeLastCommitSelections, writeLastWorkSelection, writeUpdateChannel, writeUserContext};