@copado/agentia-cli 0.122.0-alpha.0 → 0.122.0-alpha.1

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.
Files changed (51) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/README.md +290 -316
  3. package/dist/commands/ai/agent/ask.d.ts +13 -20
  4. package/dist/commands/ai/agent/ask.js +12 -32
  5. package/dist/commands/ai/agent/ask.js.map +1 -1
  6. package/dist/commands/ai/agent/chat.d.ts +11 -19
  7. package/dist/commands/ai/agent/chat.js +11 -34
  8. package/dist/commands/ai/agent/chat.js.map +1 -1
  9. package/dist/commands/cicd/work/commit.d.ts +0 -1
  10. package/dist/commands/cicd/work/commit.js +6 -8
  11. package/dist/commands/cicd/work/commit.js.map +1 -1
  12. package/dist/commands/setup.d.ts +1 -8
  13. package/dist/commands/setup.js +3 -47
  14. package/dist/commands/setup.js.map +1 -1
  15. package/dist/lib/auth-config.d.ts +2 -0
  16. package/dist/lib/auth-config.js +10 -1
  17. package/dist/lib/auth-config.js.map +1 -1
  18. package/dist/lib/cursor-mcp-config.d.ts +4 -0
  19. package/dist/lib/cursor-mcp-config.js +1 -0
  20. package/dist/lib/cursor-mcp-config.js.map +1 -1
  21. package/dist/lib/defaults-store.d.ts +2 -0
  22. package/dist/lib/defaults-store.js +10 -0
  23. package/dist/lib/defaults-store.js.map +1 -1
  24. package/dist/lib/mcp/server.js +2 -0
  25. package/dist/lib/mcp/server.js.map +1 -1
  26. package/dist/lib/mcp/tools.d.ts +0 -1
  27. package/dist/lib/mcp/work-tools.d.ts +1 -2
  28. package/dist/lib/mcp/work-tools.js +13 -15
  29. package/dist/lib/mcp/work-tools.js.map +1 -1
  30. package/dist/lib/project-root.d.ts +13 -0
  31. package/dist/lib/project-root.js +65 -0
  32. package/dist/lib/project-root.js.map +1 -0
  33. package/dist/lib/project-setup.js +49 -35
  34. package/dist/lib/project-setup.js.map +1 -1
  35. package/dist/lib/setup-templates.d.ts +3 -1
  36. package/dist/lib/setup-templates.js +3 -1
  37. package/dist/lib/setup-templates.js.map +1 -1
  38. package/dist/lib/setup-wizard.js +58 -29
  39. package/dist/lib/setup-wizard.js.map +1 -1
  40. package/dist/lib/stock-quality-gates.js +1 -1
  41. package/dist/lib/stock-quality-gates.js.map +1 -1
  42. package/dist/lib/work-commit.d.ts +3 -0
  43. package/dist/lib/work-commit.js +45 -8
  44. package/dist/lib/work-commit.js.map +1 -1
  45. package/dist/lib/work-flags.d.ts +3 -1
  46. package/dist/lib/work-flags.js +23 -11
  47. package/dist/lib/work-flags.js.map +1 -1
  48. package/oclif.manifest.json +589 -697
  49. package/package.json +1 -1
  50. package/templates/skills/agentia-ai/SKILL.md +4 -3
  51. package/templates/skills/agentia-ai/references/ai-agents.md +13 -13
@@ -0,0 +1,65 @@
1
+ import { existsSync, statSync } from 'node:fs';
2
+ import path from 'node:path';
3
+ import { setDefaultsStoreProjectRoot } from './defaults-store.js';
4
+ import { loadEnvFile } from './env-file.js';
5
+ export const AGENTIA_PROJECT_ROOT_ENV = 'AGENTIA_PROJECT_ROOT';
6
+ const PROJECT_MARKERS = ['.agentia', '.git'];
7
+ let testDeps;
8
+ export function setProjectRootDepsForTests(deps) {
9
+ testDeps = deps;
10
+ }
11
+ export function resetProjectRootDepsForTests() {
12
+ testDeps = undefined;
13
+ }
14
+ function isDirectory(filePath, deps) {
15
+ if (!(deps.existsSync ?? existsSync)(filePath))
16
+ return false;
17
+ try {
18
+ return (deps.statSync ?? statSync)(filePath).isDirectory();
19
+ }
20
+ catch {
21
+ return false;
22
+ }
23
+ }
24
+ function hasProjectMarker(root, deps) {
25
+ return PROJECT_MARKERS.some((marker) => {
26
+ const markerPath = path.join(root, marker);
27
+ return marker === '.agentia' ? isDirectory(markerPath, deps) : (deps.existsSync ?? existsSync)(markerPath);
28
+ });
29
+ }
30
+ function walkUpForProjectRoot(start, deps) {
31
+ let current = path.resolve(start);
32
+ while (true) {
33
+ if (isDirectory(current, deps) && hasProjectMarker(current, deps))
34
+ return current;
35
+ const parent = path.dirname(current);
36
+ if (parent === current)
37
+ return undefined;
38
+ current = parent;
39
+ }
40
+ }
41
+ export function resolveProjectRoot(start = process.cwd()) {
42
+ const deps = testDeps ?? {};
43
+ const configured = process.env[AGENTIA_PROJECT_ROOT_ENV];
44
+ if (configured !== undefined) {
45
+ if (!path.isAbsolute(configured)) {
46
+ throw new Error(`${AGENTIA_PROJECT_ROOT_ENV} must be an absolute directory path.`);
47
+ }
48
+ const root = path.resolve(configured);
49
+ if (!isDirectory(root, deps)) {
50
+ throw new Error(`${AGENTIA_PROJECT_ROOT_ENV} must point to an existing directory.`);
51
+ }
52
+ return root;
53
+ }
54
+ return walkUpForProjectRoot(start, deps) ?? path.resolve(start);
55
+ }
56
+ /** Apply the project context before loading configuration or registering MCP tools. */
57
+ export function applyProjectRoot(start = process.cwd()) {
58
+ const root = resolveProjectRoot(start);
59
+ setDefaultsStoreProjectRoot(root);
60
+ loadEnvFile(path.join(root, '.env'));
61
+ if (process.cwd() !== root)
62
+ process.chdir(root);
63
+ return root;
64
+ }
65
+ //# sourceMappingURL=project-root.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"project-root.js","sourceRoot":"","sources":["../../src/lib/project-root.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAE,QAAQ,EAAC,MAAM,SAAS,CAAA;AAC5C,OAAO,IAAI,MAAM,WAAW,CAAA;AAE5B,OAAO,EAAC,2BAA2B,EAAC,MAAM,qBAAqB,CAAA;AAC/D,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAA;AAEzC,MAAM,CAAC,MAAM,wBAAwB,GAAG,sBAAsB,CAAA;AAE9D,MAAM,eAAe,GAAG,CAAC,UAAU,EAAE,MAAM,CAAU,CAAA;AAOrD,IAAI,QAAqC,CAAA;AAEzC,MAAM,UAAU,0BAA0B,CAAC,IAAiC;IAC1E,QAAQ,GAAG,IAAI,CAAA;AACjB,CAAC;AAED,MAAM,U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UAAU,kBAAkB,CAAC,KAAK,GAAG,OAAO,CAAC,GAAG,EAAE;IACtD,MAAM,IAAI,GAAG,QAAQ,IAAI,EAAE,CAAA;IAC3B,MAAM,UAAU,GAAG,OAAO,CAAC,GAAG,CAAC,wBAAwB,CAAC,CAAA;IACxD,IAAI,UAAU,KAAK,SAAS,EAAE,CAAC;QAC7B,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,CAAC;YACjC,MAAM,IAAI,KAAK,CAAC,GAAG,wBAAwB,sCAAsC,CAAC,CAAA;QACpF,CAAC;QAED,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAA;QACrC,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,CAAC;YAC7B,MAAM,IAAI,KAAK,CAAC,GAAG,wBAAwB,uCAAuC,CAAC,CAAA;QACrF,CAAC;QAED,OAAO,IAAI,CAAA;IACb,CAAC;IAED,OAAO,oBAAoB,CAAC,KAAK,EAAE,IAAI,CAAC,IAAI,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;AACjE,CAAC;AAED,uFAAuF;AACvF,MAAM,UAAU,gBAAgB,CAAC,KAAK,GAAG,OAAO,CAAC,GAAG,EAAE;IACpD,MAAM,IAAI,GAAG,kBAAkB,CAAC,KAAK,CAAC,CAAA;IACtC,2BAA2B,CAAC,IAAI,CAAC,CAAA;IACjC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,CAAA;IACpC,IAAI,OAAO,CAAC,GAAG,EAAE,KAAK,IAAI;QAAE,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;IAC/C,OAAO,IAAI,CAAA;AACb,CAAC"}
@@ -4,7 +4,7 @@ import path from 'node:path';
4
4
  import { fileURLToPath } from 'node:url';
5
5
  import { getCurrentBranch, getGitRepoRoot, getRemoteUrl, isInsideGitWorkTree } from './git-worktree.js';
6
6
  import { QUALITY_GATES_SCRIPT_UNIX, QUALITY_GATES_SCRIPT_WINDOWS } from './local-quality-gates.js';
7
- import { AGENTIA_AGENTS_END_MARKER, AGENTIA_AGENTS_START_MARKER, AGENTIA_DIR_GITIGNORE_ENTRIES, AGENTIA_GITIGNORE_ENTRY, qualityGatesExplanation, SAMPLE_QUALITY_GATES_UNIX, SAMPLE_QUALITY_GATES_WINDOWS, } from './setup-templates.js';
7
+ import { AGENTIA_AGENTS_END_MARKER, AGENTIA_AGENTS_START_MARKER, AGENTIA_DIR_GITIGNORE_ENTRIES, AGENTIA_GITIGNORE_ENTRIES, AGENTIA_GITIGNORE_ENTRY, AGENTIA_IDEX_GITIGNORE_ENTRY, qualityGatesExplanation, SAMPLE_QUALITY_GATES_UNIX, SAMPLE_QUALITY_GATES_WINDOWS, } from './setup-templates.js';
8
8
  let testDeps;
9
9
  export function setProjectSetupDepsForTests(deps) {
10
10
  testDeps = deps;
@@ -32,27 +32,43 @@ function resolveDeps(overrides = {}) {
32
32
  function isAgentiaUserConfigGitignoreLine(trimmed) {
33
33
  return trimmed === AGENTIA_GITIGNORE_ENTRY || trimmed === `/${AGENTIA_GITIGNORE_ENTRY}`;
34
34
  }
35
+ function gitignoreEntryForLine(trimmed) {
36
+ if (isAgentiaUserConfigGitignoreLine(trimmed))
37
+ return AGENTIA_GITIGNORE_ENTRY;
38
+ if (trimmed === AGENTIA_IDEX_GITIGNORE_ENTRY ||
39
+ trimmed === `/${AGENTIA_IDEX_GITIGNORE_ENTRY}` ||
40
+ trimmed === `${AGENTIA_IDEX_GITIGNORE_ENTRY}/` ||
41
+ trimmed === `/${AGENTIA_IDEX_GITIGNORE_ENTRY}/`) {
42
+ return AGENTIA_IDEX_GITIGNORE_ENTRY;
43
+ }
44
+ return undefined;
45
+ }
35
46
  function isAgentiaDirGitignoreLine(trimmed) {
36
47
  return AGENTIA_DIR_GITIGNORE_ENTRIES.includes(trimmed);
37
48
  }
38
49
  export function gitignoreHasAgentiaEntry(contents) {
39
- return contents.split(/\r?\n/).some((line) => isAgentiaUserConfigGitignoreLine(line.trim()));
50
+ const entries = new Set(contents
51
+ .split(/\r?\n/)
52
+ .map((line) => gitignoreEntryForLine(line.trim()))
53
+ .filter((entry) => entry !== undefined));
54
+ return AGENTIA_GITIGNORE_ENTRIES.every((entry) => entries.has(entry));
40
55
  }
41
56
  function migrateAgentiaGitignoreContents(contents) {
42
57
  const lines = contents.split(/\r?\n/);
43
- let sawUserConfig = false;
58
+ const seen = new Set();
44
59
  let changed = false;
45
60
  const nextLines = [];
46
61
  for (const line of lines) {
47
62
  const trimmed = line.trim();
48
- if (isAgentiaUserConfigGitignoreLine(trimmed)) {
49
- if (sawUserConfig) {
63
+ const canonicalEntry = gitignoreEntryForLine(trimmed);
64
+ if (canonicalEntry !== undefined) {
65
+ if (seen.has(canonicalEntry)) {
50
66
  changed = true;
51
67
  continue;
52
68
  }
53
- sawUserConfig = true;
54
- if (trimmed !== AGENTIA_GITIGNORE_ENTRY) {
55
- nextLines.push(AGENTIA_GITIGNORE_ENTRY);
69
+ seen.add(canonicalEntry);
70
+ if (trimmed !== canonicalEntry) {
71
+ nextLines.push(canonicalEntry);
56
72
  changed = true;
57
73
  continue;
58
74
  }
@@ -60,26 +76,28 @@ function migrateAgentiaGitignoreContents(contents) {
60
76
  continue;
61
77
  }
62
78
  if (isAgentiaDirGitignoreLine(trimmed)) {
63
- if (sawUserConfig) {
64
- changed = true;
65
- continue;
79
+ for (const entry of AGENTIA_GITIGNORE_ENTRIES) {
80
+ if (!seen.has(entry)) {
81
+ nextLines.push(entry);
82
+ seen.add(entry);
83
+ }
66
84
  }
67
- nextLines.push(AGENTIA_GITIGNORE_ENTRY);
68
- sawUserConfig = true;
69
85
  changed = true;
70
86
  continue;
71
87
  }
72
88
  nextLines.push(line);
73
89
  }
74
- if (!sawUserConfig) {
75
- if (nextLines.length > 0 && nextLines.at(-1) === '') {
76
- nextLines[nextLines.length - 1] = AGENTIA_GITIGNORE_ENTRY;
77
- nextLines.push('');
78
- }
79
- else {
80
- nextLines.push(AGENTIA_GITIGNORE_ENTRY);
90
+ for (const entry of AGENTIA_GITIGNORE_ENTRIES) {
91
+ if (!seen.has(entry)) {
92
+ if (nextLines.length > 0 && nextLines.at(-1) === '') {
93
+ nextLines[nextLines.length - 1] = entry;
94
+ nextLines.push('');
95
+ }
96
+ else {
97
+ nextLines.push(entry);
98
+ }
99
+ changed = true;
81
100
  }
82
- changed = true;
83
101
  }
84
102
  let next = nextLines.join('\n');
85
103
  if (!next.endsWith('\n')) {
@@ -92,7 +110,7 @@ export async function ensureAgentiaGitignore(repoRoot, deps = {}) {
92
110
  const gitignorePath = path.join(repoRoot, '.gitignore');
93
111
  const exists = resolved.existsSync(gitignorePath);
94
112
  if (!exists) {
95
- await resolved.writeFile(gitignorePath, `${AGENTIA_GITIGNORE_ENTRY}\n`, 'utf8');
113
+ await resolved.writeFile(gitignorePath, `${AGENTIA_GITIGNORE_ENTRIES.join('\n')}\n`, 'utf8');
96
114
  return { path: gitignorePath, status: 'created' };
97
115
  }
98
116
  const current = await resolved.readFile(gitignorePath, 'utf8');
@@ -105,10 +123,7 @@ export async function ensureAgentiaGitignore(repoRoot, deps = {}) {
105
123
  }
106
124
  export function findLocalQualityGateScripts(repoRoot, deps = {}) {
107
125
  const resolved = resolveDeps(deps);
108
- const candidates = [
109
- path.join(repoRoot, QUALITY_GATES_SCRIPT_UNIX),
110
- path.join(repoRoot, QUALITY_GATES_SCRIPT_WINDOWS),
111
- ];
126
+ const candidates = [path.join(repoRoot, QUALITY_GATES_SCRIPT_UNIX), path.join(repoRoot, QUALITY_GATES_SCRIPT_WINDOWS)];
112
127
  const existingPaths = candidates.filter((filePath) => resolved.existsSync(filePath));
113
128
  return {
114
129
  existingPaths,
@@ -175,9 +190,7 @@ export async function writeAgentsMd(repoRoot, deps = {}) {
175
190
  const hasEnd = end !== -1;
176
191
  const startCount = current.split(AGENTIA_AGENTS_START_MARKER).length - 1;
177
192
  const endCount = current.split(AGENTIA_AGENTS_END_MARKER).length - 1;
178
- if (hasStart !== hasEnd ||
179
- (hasStart && (startCount !== 1 || endCount !== 1)) ||
180
- (hasStart && end < start)) {
193
+ if (hasStart !== hasEnd || (hasStart && (startCount !== 1 || endCount !== 1)) || (hasStart && end < start)) {
181
194
  throw new Error('AGENTS.md contains malformed or duplicate Agentia managed markers; repair them before running setup.');
182
195
  }
183
196
  if (hasStart) {
@@ -200,14 +213,14 @@ export async function writeAgentsMd(repoRoot, deps = {}) {
200
213
  function logGitignoreResult(log, cwd, gitignore) {
201
214
  const relative = path.relative(cwd, gitignore.path) || '.gitignore';
202
215
  if (gitignore.status === 'created') {
203
- log(`Created ${relative} with ${AGENTIA_GITIGNORE_ENTRY}`);
216
+ log(`Created ${relative} with ${AGENTIA_GITIGNORE_ENTRIES.join(' and ')}`);
204
217
  return;
205
218
  }
206
219
  if (gitignore.status === 'updated') {
207
- log(`Added ${AGENTIA_GITIGNORE_ENTRY} to ${relative}`);
220
+ log(`Added ${AGENTIA_GITIGNORE_ENTRIES.join(' and ')} to ${relative}`);
208
221
  return;
209
222
  }
210
- log(`.gitignore already ignores ${AGENTIA_GITIGNORE_ENTRY}`);
223
+ log(`.gitignore already ignores ${AGENTIA_GITIGNORE_ENTRIES.join(' and ')}`);
211
224
  }
212
225
  function toRelativePaths(cwd, absolutePaths) {
213
226
  return absolutePaths.map((filePath) => path.relative(cwd, filePath) || path.basename(filePath));
@@ -332,9 +345,10 @@ export async function resolveProjectContext(cwd, deps = {}) {
332
345
  export async function runProjectSetup(options = {}, deps = {}) {
333
346
  const resolved = resolveDeps(deps);
334
347
  const bin = options.bin ?? 'agentia';
335
- const log = options.log ?? (() => {
336
- /* no human output */
337
- });
348
+ const log = options.log ??
349
+ (() => {
350
+ /* no human output */
351
+ });
338
352
  const noPrompt = options.noPrompt ?? false;
339
353
  const cwd = options.cwd ?? process.cwd();
340
354
  const context = await resolveProjectContext(cwd, deps);
@@ -1 +1 @@
1
- {"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,EAAE,GAAG,EAAE,OAAO,CAAC,CAAA;QACrC,SAAS,GAAG;YACV,IAAI,EAAE,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE,OAAO,CAAC,IAAI,CAAC,IAAI,YAAY;YACtD,MAAM,EAAE,OAAO,CAAC,MAAM;SACvB,CAAA;IACH,CAAC;SAAM,CAAC;QACN,GAAG,CAAC,cAAc,GAAG,EAAE,CAAC,CAAA;QACxB,GAAG,CAAC,mDAAmD,CAAC,CAAA;QACxD,SAAS,GAAG,EAAC,MAAM,EAAE,SAAS,EAAC,CAAA;IACjC,CAAC;IAED,MAAM,YAAY,GAAG,MAAM,uBAAuB,CAAC;QACjD,GAAG;QACH,GAAG;QACH,IAAI;QACJ,GAAG;QACH,QAAQ;QACR,SAAS,EAAE,OAAO,CAAC,uBAAuB,KAAK,IAAI;QACnD,QAAQ;QACR,IAAI,EAAE,WAAW;KAClB,CAAC,CAAA;IAEF,MAAM,QAAQ,GAAG,MAAM,yBAAyB,CAAC;QAC/C,GAAG;QACH,IAAI;QACJ,WAAW,EAAE,OAAO,CAAC,WAAW,KAAK,IAAI;QACzC,GAAG;QACH,QAAQ;QACR,SAAS,EAAE,OAAO,CAAC,cAAc,KAAK,IAAI,IAAI,OAAO,CAAC,WAAW,KAAK,IAAI;QAC1E,QAAQ;QACR,IAAI,EAAE,WAAW;QACjB,aAAa,EAAE,OAAO,CAAC,aAAa;KACrC,CAAC,CAAA;IAEF,OAAO;QACL,QAAQ,EAAE,QAAQ,CAAC,QAAQ;QAC3B,GAAG;QACH,GAAG;QACH,SAAS;QACT,WAAW;QACX,YAAY;QACZ,WAAW,EAAE,QAAQ,CAAC,WAAW;KAClC,CAAA;AACH,CAAC"}
@@ -1,4 +1,6 @@
1
1
  export declare const AGENTIA_GITIGNORE_ENTRY = ".agentia/config.user.json";
2
+ export declare const AGENTIA_IDEX_GITIGNORE_ENTRY = ".agentia/idex";
3
+ export declare const AGENTIA_GITIGNORE_ENTRIES: readonly [".agentia/config.user.json", ".agentia/idex"];
2
4
  export declare const AGENTIA_AGENTS_START_MARKER = "<!-- agentia:managed:start -->";
3
5
  export declare const AGENTIA_AGENTS_END_MARKER = "<!-- agentia:managed:end -->";
4
6
  /** Legacy whole-directory ignores that should be migrated to {@link AGENTIA_GITIGNORE_ENTRY}. */
@@ -6,5 +8,5 @@ export declare const AGENTIA_DIR_GITIGNORE_ENTRIES: readonly [".agentia", ".agen
6
8
  export declare const SAMPLE_QUALITY_GATES_UNIX = "#!/usr/bin/env bash\nset -euo pipefail\n\n# Local Agentia quality gates (macOS / Linux).\n# Edit this script to match your project. Agentia runs it from the repo root during\n# `agentia cicd work test` (local by default) and `agentia cicd work submit` (unless --skip-local-tests).\n# The script must exit non-zero if any check fails.\n\necho \"## Running Code Analyzer\"\nsf code-analyzer run\n\nif [[ -n \"${AGENTIA_APEX_TEST_CLASSES:-}\" ]]; then\n agentia cicd work test apex -t \"${AGENTIA_APEX_TEST_CLASSES}\"\nfi\n\necho \"## Running LWC tests\"\nnpx sfdx-lwc-jest -- # --passWithNoTests\n";
7
9
  export declare const SAMPLE_QUALITY_GATES_WINDOWS = "@echo off\nsetlocal EnableExtensions EnableDelayedExpansion\nREM Local Agentia quality gates (Windows).\nREM Edit this script to match your project. Agentia runs it from the repo root during\nREM `agentia cicd work test` (local by default) and `agentia cicd work submit` (unless --skip-local-tests).\nREM The script must exit non-zero if any check fails.\n\necho ## Running Code Analyzer\nsf code-analyzer run\nif errorlevel 1 exit /b %errorlevel%\n\nif defined AGENTIA_APEX_TEST_CLASSES (\n agentia cicd work test apex -t \"!AGENTIA_APEX_TEST_CLASSES!\"\n if errorlevel 1 exit /b %errorlevel%\n)\n\necho ## Running LWC tests\nnpx sfdx-lwc-jest --\nif errorlevel 1 exit /b %errorlevel%\n";
8
10
  /** Bundled AGENTS.md template (mirrors docs/AGENTS.sample.md). Used when DEFAULT_AGENTS_MD_URL is unset or download fails. */
9
- export declare const BUNDLED_AGENTS_MD = "# Agentia CLI for AI Agents\n\nUse Agentia to manage Copado user stories end-to-end: pick work, prepare a git branch, push changes, submit for review, and promote.\n\n**Prefer the Agentia MCP server when it is available.** If tools such as `agentia_work_list`, `agentia_work_set`, `agentia_work_commit`, `agentia_work_publish`, and `agentia_work_submit` are registered, call those instead of shelling out to the `agentia` CLI. Fall back to CLI commands only when MCP is not configured.\n\nWhen using the CLI, prefer `--json` on every command so you can parse structured output instead of terminal tables.\n\nAuthentication must already be configured (`agentia auth set` / keychain, or local gateway mode). Run from a git repository that is a Copado-managed project.\n\n## Typical workflow\n\n```text\nlist \u2192 get \u2192 set \u2192 (implement & commit or cloud commit) \u2192 publish \u2192 submit [--done]\n```\n\n| Step | MCP tool (preferred) | CLI fallback | Purpose |\n| --- | --- | --- | --- |\n| 1 | `agentia_work_list` (`assignedToMe: true`) | `agentia cicd work list --assigned-to-me --json` | Show user stories assigned to you |\n| 2 | `agentia_work_get` | `agentia cicd work get [id] --json` | Read user story details (omit id after `work set`) |\n| 3 | `agentia_work_set` | `agentia cicd work set <id> --json` | Mark in progress and prepare the feature branch |\n| 4 | *(your edits + `git commit`)* or `agentia_work_commit` | *(your edits + `git commit`)* or `agentia cicd work commit --cloud --json` | Implement the story or create a Copado cloud metadata commit |\n| 5 | `agentia_work_publish` | `agentia cicd work publish --json` | Publish local Git commits and register them with Copado |\n| 6 | `agentia_work_submit` | `agentia cicd work submit --json` | Flag ready for review (pipeline quality gates / validation) |\n| 7 | `agentia_work_submit` (`done: true` or `deploy: true`) | `agentia cicd work submit --done --json` | Promote and deploy to the next stage (Copado UI Submit promote) |\n\nDo not skip `work set` before coding. Later steps expect a `feature/<user-story-name>` branch and a recorded base branch from `work set`.\n\n---\n\n## Commands\n\nCLI examples below are the fallback when MCP is unavailable. MCP tool names and arguments mirror these commands (camelCase args instead of flags).\n\n### `agentia cicd work list`\n\nShow user stories. For \u201Cassigned to me\u201D, always use:\n\n```sh\nagentia cicd work list --assigned-to-me --json\n```\n\nUseful filters: `--status`, `--project-name`, `--name`, `--owned-by-me`. Do not combine `--assigned-to-me` with `--owned-by-me` or `--assignee-id`.\n\n### `agentia cicd work get [id]`\n\nRead full details for one user story. After `work set`, omit the ID to use the active work item:\n\n```sh\nagentia cicd work get --json\nagentia cicd work get a0SKC000000CmZ2AU --json\n```\n\nUse this before starting work to understand title, status, acceptance criteria, and related fields.\n\n### `agentia cicd work set <id>`\n\nFlag the user story as the active work item (in progress) and prepare the correct git branch:\n\n```sh\nagentia cicd work set a0SKC000000CmZ2AU --json\n# or by name:\nagentia cicd work set US-0001 --json\n```\n\nWhat it does:\n\n1. Calls Copado to set the work item and resolve the base branch\n2. Requires a **clean tracked working tree** (stash or commit first if dirty)\n3. Fetches `origin/<base-branch>`\n4. Creates or checks out `feature/<user-story-name>`\n5. Records the last work item ID, name, and base branch for later commands\n\nOptional: `--base-branch <name>` overrides the base branch from the API.\n\nAfter success, stay on that feature branch for all implementation commits.\n\n### `agentia cicd work publish`\n\nPublish committed changes to git and register them with Copado:\n\n```sh\nagentia cicd work publish --json\n```\n\n`cicd work push` / `agentia_work_push` remain compatibility aliases of this command.\n\nPrerequisites:\n\n- Current branch is `feature/US-XXXX` (from `work set`)\n- No uncommitted tracked changes (commit first)\n- `work set` was run so a base branch is recorded\n\nLocks the tip commit after fetching `origin/<lastBaseBranch>` and collecting `origin/<lastBaseBranch>..HEAD`, runs `git push origin <branch>`, then registers the commits with Copado.\n\n### `agentia cicd work commit --cloud`\n\nCreate a Copado cloud commit job for selected metadata:\n\n```sh\nagentia cicd work commit --cloud --message \"Commit AccountService\" --metadata-name AccountService --metadata-type ApexClass --metadata-category SFDX --json\nagentia cicd work commit a0SKC000000CmZ2AU --cloud --file commit-request.json --json\n```\n\nUse this when the metadata commit should be performed by Copado rather than by local Git. The command preflights the user story, submits the commit request, and waits for the job by default. For bundled metadata with `SelectiveCommit`, include `--selection` values for the files inside the bundle. MCP uses camelCase fields such as `metadataName`, `metadataType`, `metadataCategory`, `selection`, and `wait`. For Salesforce metadata, always set `--metadata-category SFDX` or MCP `metadataCategory: \"SFDX\"` (maps to change field `c`). Without `c:SFDX`, Copado SFDX deploy logs \"Salesforce changes not found.\" and skips the deploy.\n\n### `agentia cicd work test --local`\n\nRun local project quality gates without submitting:\n\n```sh\nagentia cicd work test --local --json\nagentia cicd work test --local --apex-test-classes=MyTest,OtherTest --json\n```\n\nIf the project root contains `.agentia_quality_gates.sh` (macOS/Linux) or `.agentia_quality_gates.cmd` (Windows), that script runs and the command stops on failure. If no project script exists, `work test` warns, runs the same sample script `agentia setup --create-local-quality-gates` would create from a temporary file (then deletes it), and does not write those files into the repository. Only `--local` is supported for now. Optional `--apex-test-classes=class1,class2` is passed to the script as `AGENTIA_APEX_TEST_CLASSES` (MCP: `apexTestClasses`). Sample scripts call `agentia cicd work test apex` for that Apex step.\n\n### `agentia cicd work test apex`\n\nRun named Apex test classes. This is the usual Apex step inside project-root local quality gates (`.agentia_quality_gates.sh` / `.agentia_quality_gates.cmd`) when those scripts are configured; `work test` and `work submit` pass `--apex-test-classes` into the script as `AGENTIA_APEX_TEST_CLASSES`. Invoke it directly for a targeted rerun without the rest of the gates.\n\n```sh\nagentia cicd work test apex -t HelloWorldTest --json\nagentia cicd work test apex --apex-test-classes=MyTest,OtherTest -w 10 --json\n```\n\nRequired `--apex-test-classes` (or `-t`) is comma-separated. Optional `--wait` (or `-w`) is minutes and defaults to 60. The command runs `sf apex run test --class-names <names> -c --json --wait <minutes>` without a shell. Human output shows the test-run summary on pass, or failing tests with Message and StackTrace on failure. `--json` omits Salesforce org and user Ids. MCP: `agentia_work_test_apex`.\n\n### `agentia cicd work submit`\n\nFlag the user story as ready for review. Runs local project quality gates (when present), then pipeline quality gates and validation:\n\n```sh\nagentia cicd work submit --json\nagentia cicd work submit --apex-test-classes=MyTest,OtherTest --json\nagentia cicd work submit --skip-local-tests --json\nagentia cicd work submit --done --json\nagentia cicd work submit --deploy --json\nagentia cicd work submit --done --skip-nested-metadata-detection --json\n```\n\nSame branch/clean-tree rules as `work publish`. If the project root contains `.agentia_quality_gates.sh` (macOS/Linux) or `.agentia_quality_gates.cmd` (Windows), that script runs first and submit stops on failure. Unlike `work test`, submit does not run stock sample gates when those files are missing. Use `--apex-test-classes=class1,class2` to pass Apex test classes to the script as `AGENTIA_APEX_TEST_CLASSES` (MCP: `apexTestClasses`). Use `--skip-local-tests` to skip local gates. After that, submit fetches `origin/<lastBaseBranch>` and counts `origin/<lastBaseBranch>..HEAD` before checking origin. No commits is an error unless the Story has a `Data Set - Salesforce` or `Data Template - Salesforce` deployment step. When commits exist, unpushed work is still pushed even if those data steps are present, then submit continues. With `--done` or `--deploy` (MCP: `done` or `deploy`), submit matches Copado UI Submit when promoting (validate=false / headless work/done) and honors `--skip-nested-metadata-detection`. Prefer `submit --done` (or `--deploy`) over the compatibility alias `cicd work done`.\n\n---\n\n## Agent rules\n\n1. **Prefer MCP over CLI.** When Agentia MCP tools are available, use them instead of running `agentia` in the shell.\n2. **Discover before acting.** List assigned stories, then `get` the chosen ID, then `set` before editing files.\n3. **One story, one feature branch.** Do not mix unrelated commits on the same `feature/US-XXXX` branch.\n4. **Choose the right commit path.** Use normal `git add` / `git commit` followed by `agentia_work_publish` for local Git work. Use `agentia_work_commit` / `agentia cicd work commit --cloud` for Copado cloud metadata commits.\n5. **Keep the tree clean** before `set`, `publish`, and `submit`. Those steps fail if tracked changes are pending.\n6. **Prefer structured results.** MCP returns JSON; for CLI, use `--json` and do not scrape human table output.\n7. **Order matters.** `set` \u2192 git commit or cloud commit \u2192 `publish` when local Git commits exist \u2192 `submit` (optionally `--done`). `submit` fetches `origin/<lastBaseBranch>` and counts `origin/<lastBaseBranch>..HEAD` before checking origin; it auto-publishes only when that feature-only range is non-empty and origin is behind. A Data Set or Data Template deployment step can waive the empty-history error, but not publish validation when commits exist. `set` is still required first.\n8. **Confirm intent for `submit --done` / `--deploy`.** Promotion deploys to the next stage; do not run it unless the user asked to promote/deploy.\n";
11
+ export declare const BUNDLED_AGENTS_MD = "# Agentia CLI for AI Agents\n\nUse Agentia to manage Copado user stories end-to-end: pick work, prepare a git branch, push changes, submit for review, and promote.\n\n**Prefer the Agentia MCP server when it is available.** If tools such as `agentia_work_list`, `agentia_work_set`, `agentia_work_commit`, `agentia_work_publish`, and `agentia_work_submit` are registered, call those instead of shelling out to the `agentia` CLI. Fall back to CLI commands only when MCP is not configured.\n\nWhen using the CLI, prefer `--json` on every command so you can parse structured output instead of terminal tables.\n\nAuthentication must already be configured (`agentia auth set` / keychain, or local gateway mode). Run from a git repository that is a Copado-managed project.\n\n## Typical workflow\n\n```text\nlist \u2192 get \u2192 set \u2192 (implement & commit or cloud commit) \u2192 publish \u2192 submit [--done]\n```\n\n| Step | MCP tool (preferred) | CLI fallback | Purpose |\n| --- | --- | --- | --- |\n| 1 | `agentia_work_list` (`assignedToMe: true`) | `agentia cicd work list --assigned-to-me --json` | Show user stories assigned to you |\n| 2 | `agentia_work_get` | `agentia cicd work get [id] --json` | Read user story details (omit id after `work set`) |\n| 3 | `agentia_work_set` | `agentia cicd work set <id> --json` | Mark in progress and prepare the feature branch |\n| 4 | *(your edits + `git commit`)* or `agentia_work_commit` | *(your edits + `git commit`)* or `agentia cicd work commit --cloud --json` | Implement the story or create a Copado cloud metadata commit |\n| 5 | `agentia_work_publish` | `agentia cicd work publish --json` | Publish local Git commits and register them with Copado |\n| 6 | `agentia_work_submit` | `agentia cicd work submit --json` | Flag ready for review (pipeline quality gates / validation) |\n| 7 | `agentia_work_submit` (`done: true` or `deploy: true`) | `agentia cicd work submit --done --json` | Promote and deploy to the next stage (Copado UI Submit promote) |\n\nDo not skip `work set` before coding. Later steps expect a `feature/<user-story-name>` branch and a recorded base branch from `work set`.\n\n---\n\n## Commands\n\nCLI examples below are the fallback when MCP is unavailable. MCP tool names and arguments mirror these commands (camelCase args instead of flags).\n\n### `agentia cicd work list`\n\nShow user stories. For \u201Cassigned to me\u201D, always use:\n\n```sh\nagentia cicd work list --assigned-to-me --json\n```\n\nUseful filters: `--status`, `--project-name`, `--name`, `--owned-by-me`. Do not combine `--assigned-to-me` with `--owned-by-me` or `--assignee-id`.\n\n### `agentia cicd work get [id]`\n\nRead full details for one user story. After `work set`, omit the ID to use the active work item:\n\n```sh\nagentia cicd work get --json\nagentia cicd work get a0SKC000000CmZ2AU --json\n```\n\nUse this before starting work to understand title, status, acceptance criteria, and related fields.\n\n### `agentia cicd work set <id>`\n\nFlag the user story as the active work item (in progress) and prepare the correct git branch:\n\n```sh\nagentia cicd work set a0SKC000000CmZ2AU --json\n# or by name:\nagentia cicd work set US-0001 --json\n```\n\nWhat it does:\n\n1. Calls Copado to set the work item and resolve the base branch\n2. Requires a **clean tracked working tree** (stash or commit first if dirty)\n3. Fetches `origin/<base-branch>`\n4. Creates or checks out `feature/<user-story-name>`\n5. Records the last work item ID, name, and base branch for later commands\n\nOptional: `--base-branch <name>` overrides the base branch from the API.\n\nAfter success, stay on that feature branch for all implementation commits.\n\n### `agentia cicd work publish`\n\nPublish committed changes to git and register them with Copado:\n\n```sh\nagentia cicd work publish --json\n```\n\n`cicd work push` / `agentia_work_push` remain compatibility aliases of this command.\n\nPrerequisites:\n\n- Current branch is `feature/US-XXXX` (from `work set`)\n- No uncommitted tracked changes (commit first)\n- `work set` was run so a base branch is recorded\n\nLocks the tip commit after fetching `origin/<lastBaseBranch>` and collecting `origin/<lastBaseBranch>..HEAD`, runs `git push origin <branch>`, then registers the commits with Copado.\n\n### `agentia cicd work commit --cloud`\n\nCreate a Copado cloud commit job for selected metadata:\n\n```sh\nagentia cicd work commit --cloud --message \"Commit AccountService\" --metadata-name AccountService --metadata-type ApexClass --metadata-category SFDX --json\nagentia cicd work commit a0SKC000000CmZ2AU --cloud --file commit-request.json --json\n```\n\nUse this when the metadata commit should be performed by Copado rather than by local Git. The command preflights the user story, submits the commit request, and waits for the job by default. For bundled metadata with `SelectiveCommit`, include `--selection` values for the files inside the bundle. MCP uses camelCase fields such as `metadataName`, `metadataType`, `metadataCategory`, `selection`, and `wait`. For Salesforce metadata, always set `--metadata-category SFDX` or MCP `metadataCategory: \"SFDX\"` (maps to change field `c`). Without `c:SFDX`, Copado SFDX deploy logs \"Salesforce changes not found.\" and skips the deploy.\n\n### `agentia cicd work test --local`\n\nRun local project quality gates without submitting:\n\n```sh\nagentia cicd work test --local --json\nagentia cicd work test --local --apex-test-classes=MyTest,OtherTest --json\n```\n\nIf the project root contains `.agentia_quality_gates.sh` (macOS/Linux) or `.agentia_quality_gates.cmd` (Windows), that script runs and the command stops on failure. If no project script exists, `work test` warns, runs the same sample script offered by `agentia setup` from a temporary file (then deletes it), and does not write those files into the repository. Only `--local` is supported for now. Optional `--apex-test-classes=class1,class2` is passed to the script as `AGENTIA_APEX_TEST_CLASSES` (MCP: `apexTestClasses`). Sample scripts call `agentia cicd work test apex` for that Apex step.\n\n### `agentia cicd work test apex`\n\nRun named Apex test classes. This is the usual Apex step inside project-root local quality gates (`.agentia_quality_gates.sh` / `.agentia_quality_gates.cmd`) when those scripts are configured; `work test` and `work submit` pass `--apex-test-classes` into the script as `AGENTIA_APEX_TEST_CLASSES`. Invoke it directly for a targeted rerun without the rest of the gates.\n\n```sh\nagentia cicd work test apex -t HelloWorldTest --json\nagentia cicd work test apex --apex-test-classes=MyTest,OtherTest -w 10 --json\n```\n\nRequired `--apex-test-classes` (or `-t`) is comma-separated. Optional `--wait` (or `-w`) is minutes and defaults to 60. The command runs `sf apex run test --class-names <names> -c --json --wait <minutes>` without a shell. Human output shows the test-run summary on pass, or failing tests with Message and StackTrace on failure. `--json` omits Salesforce org and user Ids. MCP: `agentia_work_test_apex`.\n\n### `agentia cicd work submit`\n\nFlag the user story as ready for review. Runs local project quality gates (when present), then pipeline quality gates and validation:\n\n```sh\nagentia cicd work submit --json\nagentia cicd work submit --apex-test-classes=MyTest,OtherTest --json\nagentia cicd work submit --skip-local-tests --json\nagentia cicd work submit --done --json\nagentia cicd work submit --deploy --json\nagentia cicd work submit --done --skip-nested-metadata-detection --json\n```\n\nSame branch/clean-tree rules as `work publish`. If the project root contains `.agentia_quality_gates.sh` (macOS/Linux) or `.agentia_quality_gates.cmd` (Windows), that script runs first and submit stops on failure. Unlike `work test`, submit does not run stock sample gates when those files are missing. Use `--apex-test-classes=class1,class2` to pass Apex test classes to the script as `AGENTIA_APEX_TEST_CLASSES` (MCP: `apexTestClasses`). Use `--skip-local-tests` to skip local gates. After that, submit fetches `origin/<lastBaseBranch>` and counts `origin/<lastBaseBranch>..HEAD` before checking origin. No commits is an error unless the Story has a `Data Set - Salesforce` or `Data Template - Salesforce` deployment step. When commits exist, unpushed work is still pushed even if those data steps are present, then submit continues. With `--done` or `--deploy` (MCP: `done` or `deploy`), submit matches Copado UI Submit when promoting (validate=false / headless work/done) and honors `--skip-nested-metadata-detection`. Prefer `submit --done` (or `--deploy`) over the compatibility alias `cicd work done`.\n\n---\n\n## Agent rules\n\n1. **Prefer MCP over CLI.** When Agentia MCP tools are available, use them instead of running `agentia` in the shell.\n2. **Discover before acting.** List assigned stories, then `get` the chosen ID, then `set` before editing files.\n3. **One story, one feature branch.** Do not mix unrelated commits on the same `feature/US-XXXX` branch.\n4. **Choose the right commit path.** Use normal `git add` / `git commit` followed by `agentia_work_publish` for local Git work. Use `agentia_work_commit` / `agentia cicd work commit --cloud` for Copado cloud metadata commits.\n5. **Keep the tree clean** before `set`, `publish`, and `submit`. Those steps fail if tracked changes are pending.\n6. **Prefer structured results.** MCP returns JSON; for CLI, use `--json` and do not scrape human table output.\n7. **Order matters.** `set` \u2192 git commit or cloud commit \u2192 `publish` when local Git commits exist \u2192 `submit` (optionally `--done`). `submit` fetches `origin/<lastBaseBranch>` and counts `origin/<lastBaseBranch>..HEAD` before checking origin; it auto-publishes only when that feature-only range is non-empty and origin is behind. A Data Set or Data Template deployment step can waive the empty-history error, but not publish validation when commits exist. `set` is still required first.\n8. **Confirm intent for `submit --done` / `--deploy`.** Promotion deploys to the next stage; do not run it unless the user asked to promote/deploy.\n";
10
12
  export declare function qualityGatesExplanation(bin?: string): string;
@@ -1,5 +1,7 @@
1
1
  import { QUALITY_GATES_SCRIPT_UNIX, QUALITY_GATES_SCRIPT_WINDOWS } from './local-quality-gates.js';
2
2
  export const AGENTIA_GITIGNORE_ENTRY = '.agentia/config.user.json';
3
+ export const AGENTIA_IDEX_GITIGNORE_ENTRY = '.agentia/idex';
4
+ export const AGENTIA_GITIGNORE_ENTRIES = [AGENTIA_GITIGNORE_ENTRY, AGENTIA_IDEX_GITIGNORE_ENTRY];
3
5
  export const AGENTIA_AGENTS_START_MARKER = '<!-- agentia:managed:start -->';
4
6
  export const AGENTIA_AGENTS_END_MARKER = '<!-- agentia:managed:end -->';
5
7
  /** Legacy whole-directory ignores that should be migrated to {@link AGENTIA_GITIGNORE_ENTRY}. */
@@ -158,7 +160,7 @@ agentia cicd work test --local --json
158
160
  agentia cicd work test --local --apex-test-classes=MyTest,OtherTest --json
159
161
  \`\`\`
160
162
 
161
- If the project root contains \`${QUALITY_GATES_SCRIPT_UNIX}\` (macOS/Linux) or \`${QUALITY_GATES_SCRIPT_WINDOWS}\` (Windows), that script runs and the command stops on failure. If no project script exists, \`work test\` warns, runs the same sample script \`agentia setup --create-local-quality-gates\` would create from a temporary file (then deletes it), and does not write those files into the repository. Only \`--local\` is supported for now. Optional \`--apex-test-classes=class1,class2\` is passed to the script as \`AGENTIA_APEX_TEST_CLASSES\` (MCP: \`apexTestClasses\`). Sample scripts call \`agentia cicd work test apex\` for that Apex step.
163
+ If the project root contains \`${QUALITY_GATES_SCRIPT_UNIX}\` (macOS/Linux) or \`${QUALITY_GATES_SCRIPT_WINDOWS}\` (Windows), that script runs and the command stops on failure. If no project script exists, \`work test\` warns, runs the same sample script offered by \`agentia setup\` from a temporary file (then deletes it), and does not write those files into the repository. Only \`--local\` is supported for now. Optional \`--apex-test-classes=class1,class2\` is passed to the script as \`AGENTIA_APEX_TEST_CLASSES\` (MCP: \`apexTestClasses\`). Sample scripts call \`agentia cicd work test apex\` for that Apex step.
162
164
 
163
165
  ### \`agentia cicd work test ap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mFAAmF;QACnF,6KAA6K;KAC9K,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AACd,CAAC"}
@@ -1,13 +1,13 @@
1
1
  import { homedir } from 'node:os';
2
2
  import { normalizeAiDomain, normalizeAiOrgId } from './ai-config.js';
3
- import { applyAuthSet, formatCicdApiKeyHelp, getAiAuthStatus, getCicdAuthStatus, getCrtAuthStatus, } from './auth-config.js';
3
+ import { applyAuthSet, formatCicdApiKeyHelp, formatPersonalAccessKeyHelp, getAiAuthStatus, getCicdAuthStatus, getCrtAuthStatus, } from './auth-config.js';
4
4
  import { readAuthProfile } from './auth-profile.js';
5
5
  import { normalizeCicdBaseUrl } from './cicd-gateway.js';
6
6
  import { detectCursorInstall, getCursorMcpStatus, globalCursorMcpPath, localCursorMcpPath, upsertAgentiaCursorMcp, } from './cursor-mcp-config.js';
7
7
  import { resolveProjectContext, runProjectSetup, } from './project-setup.js';
8
8
  import { createInquirerSetupPrompts } from './setup-prompts.js';
9
9
  import { runSetupSkills } from './setup-skills.js';
10
- import { formatTestingConfigurationFieldList, normalizeCrtDomain, normalizeCrtOrgId, } from './testing-config.js';
10
+ import { formatTestingConfigurationFieldList, normalizeCrtDomain, normalizeCrtOrgId } from './testing-config.js';
11
11
  let testWizardDeps;
12
12
  export function setSetupWizardDepsForTests(deps) {
13
13
  testWizardDeps = deps;
@@ -39,6 +39,9 @@ function logSection(log, title) {
39
39
  log('');
40
40
  log(title);
41
41
  }
42
+ function formatAuthScope(source) {
43
+ return source === 'local' ? 'Project-scoped' : 'Global';
44
+ }
42
45
  function formatCicdStatusLine(status) {
43
46
  if (!status.set) {
44
47
  if (status.local && status.baseUrl) {
@@ -47,9 +50,7 @@ function formatCicdStatusLine(status) {
47
50
  return 'CICD: not set';
48
51
  }
49
52
  const endpoint = status.baseUrl ?? 'not set';
50
- const localSuffix = status.local ? ', local' : '';
51
- const sourceSuffix = status.source === undefined ? '' : `, source: ${status.source}`;
52
- return `CICD: ${status.masked} (endpoint: ${endpoint}${localSuffix}${sourceSuffix})`;
53
+ return `${formatAuthScope(status.source)} authentication found:\nAPI Key: ${status.masked}\nServer URL: ${endpoint}`;
53
54
  }
54
55
  function formatCrtStatusLine(status) {
55
56
  const domain = status.domain ?? 'not set';
@@ -72,22 +73,26 @@ function formatCrtStatusLine(status) {
72
73
  })
73
74
  .join(', ')}`);
74
75
  }
75
- return `CRT: incomplete (PAK: ${pak}, domain: ${domain}, org: ${orgId}${details.length === 0 ? '' : `; ${details.join('; ')}`})`;
76
+ return `CRT: incomplete (Personal Access Key: ${pak}, domain: ${domain}, org: ${orgId}${details.length === 0 ? '' : `; ${details.join('; ')}`})`;
76
77
  }
77
- const sourceSuffix = status.source === undefined ? '' : `, source: ${status.source}`;
78
- return `CRT: ${status.masked} (domain: ${domain}, org: ${orgId}${sourceSuffix})`;
78
+ return `${formatAuthScope(status.source)} authentication found:\nPersonal Access Key: ${status.masked}\nDomain: ${domain}\nOrganization: ${orgId}`;
79
79
  }
80
80
  function formatAiStatusLine(status) {
81
- const context = `domain: ${status.domain ?? 'not set'}, org: ${status.orgId ?? 'not set'}, workspace: ${status.workspaceId ?? 'not set'}`;
82
- const sourceSuffix = status.source === undefined ? '' : `, source: ${status.source}`;
83
- return status.set ? `AI: ${status.masked} (${context}${sourceSuffix})` : `AI: not set (${context})`;
81
+ return status.set
82
+ ? `${formatAuthScope(status.source)} authentication found:\nPersonal Access Key: ${status.masked}\nDomain: ${status.domain ?? 'not set'}\nOrganization: ${status.orgId ?? 'not set'}\nWorkspace: ${status.workspaceId ?? 'not set'}`
83
+ : `AI: not set (domain: ${status.domain ?? 'not set'}, org: ${status.orgId ?? 'not set'}, workspace: ${status.workspaceId ?? 'not set'})`;
84
84
  }
85
85
  async function configureAi(context) {
86
86
  const { deps, log, options, prompts } = context;
87
87
  const current = deps.getAiAuthStatus();
88
88
  log(formatAiStatusLine(current));
89
89
  if (options.noPrompt || prompts === undefined) {
90
- return { configured: current.set, domain: current.domain ?? undefined, orgId: current.orgId ?? undefined, status: current.set ? 'unchanged' : 'skipped' };
90
+ return {
91
+ configured: current.set,
92
+ domain: current.domain ?? undefined,
93
+ orgId: current.orgId ?? undefined,
94
+ status: current.set ? 'unchanged' : 'skipped',
95
+ };
91
96
  }
92
97
  let shouldConfigure = await prompts.confirm({
93
98
  default: !current.set,
@@ -103,13 +108,19 @@ async function configureAi(context) {
103
108
  scope = 'global';
104
109
  if (!shouldConfigure) {
105
110
  log('Skipped AI authentication.');
106
- return { configured: current.set, domain: current.domain ?? undefined, orgId: current.orgId ?? undefined, status: 'skipped' };
111
+ return {
112
+ configured: current.set,
113
+ domain: current.domain ?? undefined,
114
+ orgId: current.orgId ?? undefined,
115
+ status: 'skipped',
116
+ };
107
117
  }
108
118
  }
109
119
  scope ??= await setupAuthScope('ai', false, prompts);
120
+ log(formatPersonalAccessKeyHelp());
110
121
  const pak = await prompts.password({
111
- message: 'AI PAK',
112
- validate: (value) => (value.trim().length > 0 ? true : 'AI PAK cannot be empty.'),
122
+ message: 'AI Personal Access Key (PAK)',
123
+ validate: (value) => (value.trim().length > 0 ? true : 'AI Personal Access Key cannot be empty.'),
113
124
  });
114
125
  const domain = await prompts.input({
115
126
  default: current.domain ?? undefined,
@@ -149,11 +160,21 @@ async function configureAi(context) {
149
160
  scope,
150
161
  }));
151
162
  log(`Stored AI domain: ${result.ai?.domain ?? domain}.`);
152
- return { configured: true, domain: result.ai?.domain ?? domain, orgId: (result.ai?.orgId ?? normalizeAiOrgId(orgRaw)).toString(), status: current.set ? 'updated' : 'created' };
163
+ return {
164
+ configured: true,
165
+ domain: result.ai?.domain ?? domain,
166
+ orgId: (result.ai?.orgId ?? normalizeAiOrgId(orgRaw)).toString(),
167
+ status: current.set ? 'updated' : 'created',
168
+ };
153
169
  }
154
170
  catch (error) {
155
171
  log(error.message);
156
- return { configured: current.set, domain: current.domain ?? undefined, orgId: current.orgId ?? undefined, status: 'failed' };
172
+ return {
173
+ configured: current.set,
174
+ domain: current.domain ?? undefined,
175
+ orgId: current.orgId ?? undefined,
176
+ status: 'failed',
177
+ };
157
178
  }
158
179
  }
159
180
  async function runWithSpinner(options, message, action) {
@@ -170,18 +191,18 @@ async function setupAuthScope(type, globalConfigured, prompts) {
170
191
  return 'local';
171
192
  return prompts.select({
172
193
  choices: [
173
- { name: 'Global (this machine)', value: 'global' },
174
- { name: 'Local (this project and user)', value: 'local' },
194
+ { name: 'Global (all projects)', value: 'global' },
195
+ { name: 'Project-scoped (this project)', value: 'local' },
175
196
  ],
176
197
  message: `Where should ${type.toUpperCase()} authentication be stored?`,
177
198
  });
178
199
  }
179
200
  function setupAuthPrompt(type, configured) {
180
201
  if (hasLocalAuthProfile(type))
181
- return `Reconfigure local ${type.toUpperCase()} authentication?`;
202
+ return `Reconfigure project-scoped ${type.toUpperCase()} authentication?`;
182
203
  if (configured)
183
- return `Create local ${type.toUpperCase()} authentication?`;
184
- return `Configure global ${type.toUpperCase()} authentication?`;
204
+ return `Create project-scoped ${type.toUpperCase()} authentication?`;
205
+ return `Configure global ${type.toUpperCase()} authentication for all projects?`;
185
206
  }
186
207
  async function configureCicd(context) {
187
208
  const { deps, log, options, prompts } = context;
@@ -299,7 +320,13 @@ async function configureCrt(context) {
299
320
  default: !currentReady,
300
321
  message: setupAuthPrompt('crt', currentReady),
301
322
  });
302
- let scope = hasLocalAuthProfile('crt') ? 'local' : currentReady ? 'local' : current.source === 'global' ? 'global' : undefined;
323
+ let scope = hasLocalAuthProfile('crt')
324
+ ? 'local'
325
+ : currentReady
326
+ ? 'local'
327
+ : current.source === 'global'
328
+ ? 'global'
329
+ : undefined;
303
330
  if (!shouldConfigure) {
304
331
  shouldConfigure =
305
332
  currentReady && current.source === 'global' && !hasLocalAuthProfile('crt')
@@ -318,12 +345,13 @@ async function configureCrt(context) {
318
345
  }
319
346
  }
320
347
  scope ??= await setupAuthScope('crt', false, prompts);
348
+ log(formatPersonalAccessKeyHelp());
321
349
  while (true) {
322
350
  // Sequential prompts are required to retry authentication with new credentials.
323
351
  // eslint-disable-next-line no-await-in-loop
324
352
  const pat = await prompts.password({
325
- message: 'CRT PAK',
326
- validate: (value) => (value.trim().length > 0 ? true : 'CRT PAK cannot be empty.'),
353
+ message: 'CRT Personal Access Key (PAK)',
354
+ validate: (value) => (value.trim().length > 0 ? true : 'CRT Personal Access Key cannot be empty.'),
327
355
  });
328
356
  // eslint-disable-next-line no-await-in-loop
329
357
  const orgRaw = await prompts.input({
@@ -392,7 +420,7 @@ async function configureCrt(context) {
392
420
  // eslint-disable-next-line no-await-in-loop
393
421
  const retry = await prompts.confirm({
394
422
  default: true,
395
- message: 'CRT authentication failed. Try another PAT token?',
423
+ message: 'CRT authentication failed. Try another Personal Access Key?',
396
424
  });
397
425
  if (!retry) {
398
426
  return {
@@ -519,9 +547,10 @@ function buildNextSteps(params) {
519
547
  export async function runSetupWizard(options = {}, deps = {}) {
520
548
  const resolved = resolveWizardDeps(deps);
521
549
  const bin = options.bin ?? 'agentia';
522
- const log = options.log ?? (() => {
523
- /* no human output */
524
- });
550
+ const log = options.log ??
551
+ (() => {
552
+ /* no human output */
553
+ });
525
554
  const noPrompt = options.noPrompt ?? false;
526
555
  const prompts = noPrompt ? undefined : (resolved.prompts ?? createInquirerSetupPrompts());
527
556
  const cwd = options.cwd ?? process.cwd();